diff options
author | James Bottomley <jejb@titanic.(none)> | 2005-08-28 12:31:14 -0400 |
---|---|---|
committer | James Bottomley <jejb@titanic.(none)> | 2005-08-28 12:31:14 -0400 |
commit | 33aa687db90dd8541bd5e9a762eebf880eaee767 (patch) | |
tree | dac741e1f3f43a1de2433a21b874a093783717f3 /include/scsi/scsi_device.h | |
parent | 1cf72699c1530c3e4ac3d58344f6a6a40a2f46d3 (diff) |
[SCSI] convert SPI transport class to scsi_execute
This one's slightly more difficult. The transport class uses
REQ_FAILFAST, so another interface (scsi_execute) had to be invented to
take the extra flag. Also, the sense functions are shifted around to
allow spi_execute to place data directly into a struct scsi_sense_hdr.
With this change, there's probably a lot of unnecessary sense buffer
allocation going on which we can fix later.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/scsi/scsi_device.h')
-rw-r--r-- | include/scsi/scsi_device.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 9181068883ce..5ad08b70763c 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -256,6 +256,19 @@ extern void int_to_scsilun(unsigned int, struct scsi_lun *); | |||
256 | extern const char *scsi_device_state_name(enum scsi_device_state); | 256 | extern const char *scsi_device_state_name(enum scsi_device_state); |
257 | extern int scsi_is_sdev_device(const struct device *); | 257 | extern int scsi_is_sdev_device(const struct device *); |
258 | extern int scsi_is_target_device(const struct device *); | 258 | extern int scsi_is_target_device(const struct device *); |
259 | extern int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, | ||
260 | int data_direction, void *buffer, unsigned bufflen, | ||
261 | unsigned char *sense, int timeout, int retries, | ||
262 | int flag); | ||
263 | |||
264 | static inline int | ||
265 | scsi_execute_req(struct scsi_device *sdev, const unsigned char *cmd, | ||
266 | int data_direction, void *buffer, unsigned bufflen, | ||
267 | unsigned char *sense, int timeout, int retries) | ||
268 | { | ||
269 | return scsi_execute(sdev, cmd, data_direction, buffer, bufflen, sense, | ||
270 | timeout, retries, 0); | ||
271 | } | ||
259 | static inline int scsi_device_online(struct scsi_device *sdev) | 272 | static inline int scsi_device_online(struct scsi_device *sdev) |
260 | { | 273 | { |
261 | return sdev->sdev_state != SDEV_OFFLINE; | 274 | return sdev->sdev_state != SDEV_OFFLINE; |