diff options
Diffstat (limited to 'include/scsi/scsi_transport.h')
| -rw-r--r-- | include/scsi/scsi_transport.h | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/include/scsi/scsi_transport.h b/include/scsi/scsi_transport.h index a4f1837a33b..af244f4bba5 100644 --- a/include/scsi/scsi_transport.h +++ b/include/scsi/scsi_transport.h @@ -21,7 +21,10 @@ #define SCSI_TRANSPORT_H #include <linux/transport_class.h> +#include <linux/blkdev.h> +#include <linux/bug.h> #include <scsi/scsi_host.h> +#include <scsi/scsi_device.h> struct scsi_transport_template { /* the attribute containers */ @@ -29,6 +32,11 @@ struct scsi_transport_template { struct transport_container target_attrs; struct transport_container device_attrs; + /* + * If set, called from sysfs and legacy procfs rescanning code. + */ + int (*user_scan)(struct Scsi_Host *, uint, uint, uint); + /* The size of the specific transport attribute structure (a * space of this size will be left at the end of the * scsi_* structure */ @@ -43,10 +51,38 @@ struct scsi_transport_template { * True if the transport wants to use a host-based work-queue */ unsigned int create_work_queue : 1; + + /* + * Allows a transport to override the default error handler. + */ + void (* eh_strategy_handler)(struct Scsi_Host *); + + /* + * This is an optional routine that allows the transport to become + * involved when a scsi io timer fires. The return value tells the + * timer routine how to finish the io timeout handling: + * EH_HANDLED: I fixed the error, please complete the command + * EH_RESET_TIMER: I need more time, reset the timer and + * begin counting again + * EH_NOT_HANDLED Begin normal error recovery + */ + enum blk_eh_timer_return (*eh_timed_out)(struct scsi_cmnd *); + + /* + * Used as callback for the completion of i_t_nexus request + * for target drivers. + */ + int (* it_nexus_response)(struct Scsi_Host *, u64, int); + + /* + * Used as callback for the completion of task management + * request for target drivers. + */ + int (* tsk_mgmt_response)(struct Scsi_Host *, u64, u64, int); }; #define transport_class_to_shost(tc) \ - dev_to_shost((tc)->dev) + dev_to_shost((tc)->parent) /* Private area maintenance. The driver requested allocations come |
