scsi_test_unit_ready — test if unit is ready
int scsi_test_unit_ready
(struct scsi_device * sdev, int timeout, int retries, struct scsi_sense_hdr * sshdr_external);
scsi device to change the state of.
command timeout
number of retries before failing
Optional pointer to struct scsi_sense_hdr for returning sense. Make sure that this is cleared before passing in.
Returns zero if unsuccessful or an error if TUR failed. For removable media, a return of NOT_READY or UNIT_ATTENTION is translated to success, with the ->changed flag updated.