'\" t .\" Title: scsi_mode_sense .\" Author: .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: SCSI mid layer .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "SCSI_MODE_SENSE" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "SCSI mid layer" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" scsi_mode_sense \- issue a mode sense, falling back from 10 to six bytes if necessary\&. .SH "SYNOPSIS" .HP \w'int\ scsi_mode_sense('u .BI "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" ");" .SH "ARGUMENTS" .PP \fIsdev\fR .RS 4 SCSI device to be queried .RE .PP \fIdbd\fR .RS 4 set if mode sense will allow block descriptors to be returned .RE .PP \fImodepage\fR .RS 4 mode page being requested .RE .PP \fIbuffer\fR .RS 4 request buffer (may not be smaller than eight bytes) .RE .PP \fIlen\fR .RS 4 length of request buffer\&. .RE .PP \fItimeout\fR .RS 4 command timeout .RE .PP \fIretries\fR .RS 4 number of retries before failing .RE .PP \fIdata\fR .RS 4 returns a structure abstracting the mode header data .RE .PP \fIsshdr\fR .RS 4 place to put sense data (or NULL if no sense to be collected)\&. must be SCSI_SENSE_BUFFERSIZE big\&. .RE .SH "DESCRIPTION" .PP Returns zero if unsuccessful, or the header offset (either 4 or 8 depending on whether a six or ten byte command was issued) if successful\&. .SH "AUTHORS" .PP \fBJames Bottomley\fR <\&James.Bottomley@hansenpartnership.com\&> .RS 4 Author. .RE .PP \fBRob Landley\fR <\&rob@landley.net\&> .RS 4 Author. .RE .SH "COPYRIGHT" .br