Download C - Oracle Documentation

Transcript
11
case SCSIPROBE_FAILURE:
case SCSIPROBE_NORESP:
case SCSIPROBE_NOMEM:
/*
* In these cases, device may be powered off,
* in which case we may be able to successfully
* probe it at some future time - referred to
* as ‘deferred attach’.
*/
rval = DDI_PROBE_PARTIAL;
break;
case SCSIPROBE_NONCCS:
default:
/*
* Device isn’t of the type we can deal with,
* and/or it will never be useable.
*/
rval = DDI_PROBE_FAILURE;
break;
case SCSIPROBE_EXISTS:
/*
* There is a device at the target/lun address. Check
* inq_dtype to make sure that it is the right device
* type. See scsi_inquiry(9S)for possible device types.
*/
switch (sdp->sd_inq->inq_dtype) {
case DTYPE_PRINTER:
scsi_log(sdp, “xx”, SCSI_DEBUG,
“found %s device at target%d, lun%d\n”,
scsi_dname((int)sdp->sd_inq->inq_dtype),
target, lun);
rval = DDI_PROBE_SUCCESS;
break;
case DTYPE_NOTPRESENT:
default:
rval = DDI_PROBE_FAILURE;
break;
}
}
scsi_unprobe(sdp);
return (rval);
}
SCSI Target Drivers
235