SCSI_SLAVE(9F) | Kernel Functions for Drivers | SCSI_SLAVE(9F) |
scsi_slave - utility for SCSI target drivers to establish the presence of a target
#include <sys/scsi/scsi.h> int scsi_slave(struct scsi_device *devp, int (*callback)(void));
The scsi_slave() function is obsolete. This function has been replaced by scsi_probe(9F).
devp
callback
scsi_slave() checks for the presence of a SCSI device. Target drivers may use this function in their probe(9E) routines. scsi_slave() determines if the device is present by using a Test Unit Ready command followed by an Inquiry command. If scsi_slave() is successful, it will fill in the scsi_inquiry structure, which is the sd_inq member of the scsi_device(9S) structure, and return SCSI_PROBE_EXISTS. This information can be used to determine if the target driver has probed the correct SCSI device type. callback indicates what the allocator routines should do when DMA resources are not available:
NULL_FUNC
SLEEP_FUNC
Other Values
scsi_slave() returns:
SCSIPROBE_NOMEM
SCSIPROBE_EXISTS
SCSIPROBE_NONCCS
SCSIPROBE_FAILURE
SCSIPROBE_NORESP
scsi_slave() 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.
See attributes(7) for a description of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Stability Level | Obsolete |
attributes(7), attach(9E), probe(9E), ddi_iopb_alloc(9F), makecom(9F), scsi_dmaget(9F), scsi_ifgetcap(9F), scsi_pktalloc(9F), scsi_poll(9F), scsi_probe(9F), scsi_device(9S)
ANSI Small Computer System Interface-2 (SCSI-2)
Writing Device Drivers
The scsi_slave() function is obsolete and will be discontinued in a future release. This function has been replaced by scsi_probe(9F).
September 27, 2002 | OmniOS |