int scsi_slave(struct scsi_device *devp, int (*callback)(void));
Solaris DDI specific (Solaris DDI).
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
- Do not wait for resources. Return a NULL pointer.
- SLEEP_FUNC
- Wait indefinitely for resources.
- Other Values
- callback points to a function which is called when resources may have become available. callback must return either 0 (indicating that it attempted to allocate resources but again failed to do so), in which case it is put back on a list to be called again later, or 1 indicating either success in allocating resources or indicating that it no longer cares for a retry.
scsi_slave() returns: