diff options
| author | James Bottomley <jejb@raven.il.steeleye.com> | 2003-06-25 04:36:58 -0500 |
|---|---|---|
| committer | James Bottomley <jejb@raven.il.steeleye.com> | 2003-06-25 04:36:58 -0500 |
| commit | 5c8dfe47db6bcc3473576860645547af072c176e (patch) | |
| tree | 0e5a22bfca9c44fe4f3a37e541dd4592742c7a29 /include | |
| parent | 1d8c1ffb63346237de365aff8f01c2bfc699f61a (diff) | |
SCSI: abstract mode_sense 6 and 10 out completely
Move the mode_sense request routines to a central location and make
all block device consumers use it. Also abstract the header as
part of the return to hide the 6/10 differences.
Diffstat (limited to 'include')
| -rw-r--r-- | include/scsi/scsi_device.h | 5 | ||||
| -rw-r--r-- | include/scsi/scsi_request.h | 15 |
2 files changed, 20 insertions, 0 deletions
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index d19cd9797544..c49c124fde74 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -7,6 +7,7 @@ struct request_queue; struct scsi_cmnd; +struct scsi_mode_data; struct scsi_device { @@ -103,4 +104,8 @@ extern int scsi_track_queue_full(struct scsi_device *, int); extern int scsi_set_medium_removal(struct scsi_device *, char); +extern 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); + #endif /* _SCSI_SCSI_DEVICE_H */ diff --git a/include/scsi/scsi_request.h b/include/scsi/scsi_request.h index 17cfe3f71d15..e1c9fb7a760e 100644 --- a/include/scsi/scsi_request.h +++ b/include/scsi/scsi_request.h @@ -55,4 +55,19 @@ extern void scsi_do_req(struct scsi_request *, const void *cmnd, void (*done) (struct scsi_cmnd *), int timeout, int retries); +struct scsi_mode_data { + __u16 length; + __u16 block_descriptor_length; + __u8 medium_type; + __u8 device_specific; + __u8 header_length; + __u8 longlba:1; +}; + +extern int __scsi_mode_sense(struct scsi_request *SRpnt, int dbd, + int modepage, unsigned char *buffer, int len, + int timeout, int retries, + struct scsi_mode_data *data); + + #endif /* _SCSI_SCSI_REQUEST_H */ |
