scsi_mode_sense — issue a mode sense, falling back from 10 to six bytes if necessary.
int scsi_mode_sense ( | struct scsi_device * sdev, |
| int dbd, | |
| int modepage, | |
| unsigned char * buffer, | |
| int len, | |
| int timeout, | |
| int retries, | |
| struct scsi_mode_data * data, | |
struct scsi_sense_hdr * sshdr); |
struct scsi_device * sdevSCSI device to be queried
int dbdset if mode sense will allow block descriptors to be returned
int modepagemode page being requested
unsigned char * bufferrequest buffer (may not be smaller than eight bytes)
int lenlength of request buffer.
int timeoutcommand timeout
int retriesnumber of retries before failing
struct scsi_mode_data * datareturns a structure abstracting the mode header data
struct scsi_sense_hdr * sshdrplace to put sense data (or NULL if no sense to be collected). must be SCSI_SENSE_BUFFERSIZE big.