diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/scsi/scsi_cmnd.h | 6 | ||||
-rw-r--r-- | include/scsi/scsi_driver.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 9be0128bf303..377df4a28512 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h @@ -10,6 +10,7 @@ struct Scsi_Host; struct scsi_device; +struct scsi_driver; /* * MAX_COMMAND_SIZE is: @@ -131,6 +132,11 @@ struct scsi_cmnd { unsigned char tag; /* SCSI-II queued command tag */ }; +static inline struct scsi_driver *scsi_cmd_to_driver(struct scsi_cmnd *cmd) +{ + return *(struct scsi_driver **)cmd->request->rq_disk->private_data; +} + extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t); extern struct scsi_cmnd *__scsi_get_command(struct Scsi_Host *, gfp_t); extern void scsi_put_command(struct scsi_cmnd *); diff --git a/include/scsi/scsi_driver.h b/include/scsi/scsi_driver.h index 9fd6702f02e2..d443aa06a722 100644 --- a/include/scsi/scsi_driver.h +++ b/include/scsi/scsi_driver.h @@ -16,6 +16,7 @@ struct scsi_driver { void (*rescan)(struct device *); int (*done)(struct scsi_cmnd *); + int (*eh_action)(struct scsi_cmnd *, unsigned char *, int, int); }; #define to_scsi_driver(drv) \ container_of((drv), struct scsi_driver, gendrv) |