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 may 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.
|