|
|
#include <sys/scsi/scsi.h>
int scsi_probe(struct scsi_device *devp, int (*waitfunc)());
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.
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:
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);
ANSI Small Computer System Interface-2 (SCSI-2)
|
|
Created by unroff & hp-tools. © by Hans-Peter Bischof. All Rights Reserved (1997).
Last modified 21/April/97