Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

inquiry-vendor-id(9p) [opensolaris man page]

inquiry-device-type(9P) 				   Kernel Properties for Drivers				   inquiry-device-type(9P)

NAME
inquiry-device-type, inquiry-vendor-id, inquiry-product-id, inquiry-revision-id, inquiry-serial-no - inquiry properties for SCSI devices DESCRIPTION
These are optional properties, typically created by the system, for SCSI target devices. References to these properties should use their sys/scsi/impl/inquiry.h defined names. inquiry-device-type is an integer property. When present, the least significant byte of the value indicates the device type as defined by the SCSI standard. Consumers of this property should compare the property values with DTYPE_* values defined in sys/scsi/generic/inquiry.h. inquiry-vendor-id is a string property. When present, it contains the vendor information. This information typically comes from the scsi_inquiry(9S) "inq_vid" field. inquiry-product-id is a string property. When present, it contains the product identification. This information typically comes from the scsi_inquiry(9S) "inq_pid" field. inquiry-revision-id is a string property. When present, it contains the product revision. This revision typically comes from the scsi_inquiry(9S) "inq_rev" field. inquiry-serial-no is a string property. When present, it contains the serial number. The serial number is typically obtained from the EVPD "Unit Serial Number" SCSI INQUIRY data (page 0x80). SEE ALSO
scsi_inquiry(9S) Writing Device Drivers NOTES
Values established at tran_tgt_init(9E) time by an HBA driver take precedence over values established by the system, and HBA driver values may not be the same length as the typical scsi_inquiry(9S) field. SunOS 5.11 18 May 2001 inquiry-device-type(9P)

Check Out this Related Man Page

scsi_probe(9F)						   Kernel Functions for Drivers 					    scsi_probe(9F)

NAME
scsi_probe - utility for probing a scsi device SYNOPSIS
#include <sys/scsi/scsi.h> int scsi_probe(struct scsi_device *devp, int (*waitfunc); INTERFACE LEVEL
Solaris DDI specific (Solaris DDI). PARAMETERS
devp Pointer to a scsi_device(9S) structure waitfunc NULL_FUNC or SLEEP_FUNC DESCRIPTION
scsi_probe() determines whether a target/lun is present and sets up the scsi_device structure with inquiry data. scsi_probe() uses the SCSI Inquiry command to test if the device exists. It can retry the Inquiry command as appropriate. If scsi_probe() is successful, it will allocate space for the scsi_inquiry structure and assign the address to the sd_inq member of the scsi_device(9S) structure. scsi_probe() will then fill in this scsi_inquiry(9S) structure and return SCSIPROBE_EXISTS. If scsi_probe() is unsuccessful, it returns SCSIPROBE_NOMEM in spite of callback set to SLEEP_FUNC. scsi_unprobe(9F) is used to undo the effect of scsi_probe(). If the target is a non-CCS device, SCSIPROBE_NONCCS will be returned. waitfunc indicates what the allocator routines should do when resources are not available; the valid values are: NULL_FUNC Do not wait for resources. Return SCSIPROBE_NOMEM or SCSIPROBE_FAILURE SLEEP_FUNC Wait indefinitely for resources. RETURN VALUES
scsi_probe() returns: SCSIPROBE_BUSY Device exists but is currently busy. SCSIPROBE_EXISTS Device exists and inquiry data is valid. SCSIPROBE_FAILURE Polled command failure. SCSIPROBE_NOMEM No space available for structures. SCSIPROBE_NOMEM_CB No space available for structures but callback request has been queued. SCSIPROBE_NONCCS Device exists but inquiry data is not valid. SCSIPROBE_NORESP Device does not respond to an INQUIRY. CONTEXT
scsi_probe() is normally called from the target driver's probe(9E) or attach(9E) routine. In any case, this routine should not be called from interrupt context, because it can sleep waiting for memory to be allocated. EXAMPLES
Example 1: Using scsi_probe() switch (scsi_probe(devp, NULL_FUNC)) { default: case SCSIPROBE_NORESP: case SCSIPROBE_NONCCS: case SCSIPROBE_NOMEM: case SCSIPROBE_FAILURE: case SCSIPROBE_BUSY: break; case SCSIPROBE_EXISTS: switch (devp->sd_inq->inq_dtype) { case DTYPE_DIRECT: rval = DDI_PROBE_SUCCESS; break; case DTYPE_RODIRECT: rval = DDI_PROBE_SUCCESS; break; case DTYPE_NOTPRESENT: default: break; } } scsi_unprobe(devp); SEE ALSO
attach(9E), probe(9E), scsi_slave(9F), scsi_unprobe(9F), scsi_unslave(9F), scsi_device(9S), scsi_inquiry(9S) ANSI Small Computer System Interface-2 (SCSI-2) Writing Device Drivers NOTES
A waitfunc function other than NULL_FUNC or SLEEP_FUNC is not supported and may have unexpected results. SunOS 5.10 26 Feb 2002 scsi_probe(9F)
Man Page