diff options
Diffstat (limited to 'include/scsi/scsi_device.h')
-rw-r--r-- | include/scsi/scsi_device.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 835af8ecbb7c..da63722c0123 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -8,8 +8,17 @@ | |||
8 | 8 | ||
9 | struct request_queue; | 9 | struct request_queue; |
10 | struct scsi_cmnd; | 10 | struct scsi_cmnd; |
11 | struct scsi_mode_data; | ||
12 | struct scsi_lun; | 11 | struct scsi_lun; |
12 | struct scsi_sense_hdr; | ||
13 | |||
14 | struct scsi_mode_data { | ||
15 | __u32 length; | ||
16 | __u16 block_descriptor_length; | ||
17 | __u8 medium_type; | ||
18 | __u8 device_specific; | ||
19 | __u8 header_length; | ||
20 | __u8 longlba:1; | ||
21 | }; | ||
13 | 22 | ||
14 | /* | 23 | /* |
15 | * sdev state: If you alter this, you also need to alter scsi_sysfs.c | 24 | * sdev state: If you alter this, you also need to alter scsi_sysfs.c |
@@ -228,7 +237,8 @@ extern int scsi_set_medium_removal(struct scsi_device *, char); | |||
228 | 237 | ||
229 | extern int scsi_mode_sense(struct scsi_device *sdev, int dbd, int modepage, | 238 | extern int scsi_mode_sense(struct scsi_device *sdev, int dbd, int modepage, |
230 | unsigned char *buffer, int len, int timeout, | 239 | unsigned char *buffer, int len, int timeout, |
231 | int retries, struct scsi_mode_data *data); | 240 | int retries, struct scsi_mode_data *data, |
241 | struct scsi_sense_hdr *); | ||
232 | extern int scsi_test_unit_ready(struct scsi_device *sdev, int timeout, | 242 | extern int scsi_test_unit_ready(struct scsi_device *sdev, int timeout, |
233 | int retries); | 243 | int retries); |
234 | extern int scsi_device_set_state(struct scsi_device *sdev, | 244 | extern int scsi_device_set_state(struct scsi_device *sdev, |
@@ -247,6 +257,14 @@ extern void int_to_scsilun(unsigned int, struct scsi_lun *); | |||
247 | extern const char *scsi_device_state_name(enum scsi_device_state); | 257 | extern const char *scsi_device_state_name(enum scsi_device_state); |
248 | extern int scsi_is_sdev_device(const struct device *); | 258 | extern int scsi_is_sdev_device(const struct device *); |
249 | extern int scsi_is_target_device(const struct device *); | 259 | extern int scsi_is_target_device(const struct device *); |
260 | extern int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, | ||
261 | int data_direction, void *buffer, unsigned bufflen, | ||
262 | unsigned char *sense, int timeout, int retries, | ||
263 | int flag); | ||
264 | extern int scsi_execute_req(struct scsi_device *sdev, const unsigned char *cmd, | ||
265 | int data_direction, void *buffer, unsigned bufflen, | ||
266 | struct scsi_sense_hdr *, int timeout, int retries); | ||
267 | |||
250 | static inline int scsi_device_online(struct scsi_device *sdev) | 268 | static inline int scsi_device_online(struct scsi_device *sdev) |
251 | { | 269 | { |
252 | return sdev->sdev_state != SDEV_OFFLINE; | 270 | return sdev->sdev_state != SDEV_OFFLINE; |