[ARM] armv7: add support for asid-tagged VIVT I-cache
[powerpc.git] / include / scsi / scsi_transport_fc.h
index c74be5d..1e79730 100644 (file)
@@ -29,6 +29,7 @@
 
 #include <linux/sched.h>
 #include <scsi/scsi.h>
+#include <scsi/scsi_netlink.h>
 
 struct scsi_transport_template;
 
@@ -107,6 +108,8 @@ enum fc_port_state {
 #define FC_PORTSPEED_2GBIT             2
 #define FC_PORTSPEED_4GBIT             4
 #define FC_PORTSPEED_10GBIT            8
+#define FC_PORTSPEED_8GBIT             0x10
+#define FC_PORTSPEED_16GBIT            0x20
 #define FC_PORTSPEED_NOT_NEGOTIATED    (1 << 15) /* Speed not established */
 
 /*
@@ -194,6 +197,7 @@ struct fc_rport {   /* aka fc_starget_attrs */
        u32 roles;
        enum fc_port_state port_state;  /* Will only be ONLINE or UNKNOWN */
        u32 scsi_target_id;
+       u32 fast_io_fail_tmo;
 
        /* exported data */
        void *dd_data;                  /* Used for driver-specific storage */
@@ -204,8 +208,9 @@ struct fc_rport {   /* aka fc_starget_attrs */
        u8 flags;
        struct list_head peers;
        struct device dev;
-       struct work_struct dev_loss_work;
+       struct delayed_work dev_loss_work;
        struct work_struct scan_work;
+       struct delayed_work fail_io_work;
        struct work_struct stgt_delete_work;
        struct work_struct rport_delete_work;
 } __attribute__((aligned(sizeof(unsigned long))));
@@ -283,6 +288,30 @@ struct fc_host_statistics {
 };
 
 
+/*
+ * FC Event Codes - Polled and Async, following FC HBAAPI v2.0 guidelines
+ */
+
+/*
+ * fc_host_event_code: If you alter this, you also need to alter
+ * scsi_transport_fc.c (for the ascii descriptions).
+ */
+enum fc_host_event_code  {
+       FCH_EVT_LIP                     = 0x1,
+       FCH_EVT_LINKUP                  = 0x2,
+       FCH_EVT_LINKDOWN                = 0x3,
+       FCH_EVT_LIPRESET                = 0x4,
+       FCH_EVT_RSCN                    = 0x5,
+       FCH_EVT_ADAPTER_CHANGE          = 0x103,
+       FCH_EVT_PORT_UNKNOWN            = 0x200,
+       FCH_EVT_PORT_OFFLINE            = 0x201,
+       FCH_EVT_PORT_ONLINE             = 0x202,
+       FCH_EVT_PORT_FABRIC             = 0x204,
+       FCH_EVT_LINK_UNKNOWN            = 0x500,
+       FCH_EVT_VENDOR_UNIQUE           = 0xffff,
+};
+
+
 /*
  * FC Local Port (Host) Attributes
  *
@@ -420,6 +449,9 @@ struct fc_function_template {
 
        int     (*issue_fc_host_lip)(struct Scsi_Host *);
 
+       void    (*dev_loss_tmo_callbk)(struct fc_rport *);
+       void    (*terminate_rport_io)(struct fc_rport *);
+
        /* allocation lengths for host-specific data */
        u32                             dd_fcrport_size;
 
@@ -526,5 +558,14 @@ struct fc_rport *fc_remote_port_add(struct Scsi_Host *shost,
 void fc_remote_port_delete(struct fc_rport  *rport);
 void fc_remote_port_rolechg(struct fc_rport  *rport, u32 roles);
 int scsi_is_fc_rport(const struct device *);
+u32 fc_get_event_number(void);
+void fc_host_post_event(struct Scsi_Host *shost, u32 event_number,
+               enum fc_host_event_code event_code, u32 event_data);
+void fc_host_post_vendor_event(struct Scsi_Host *shost, u32 event_number,
+               u32 data_len, char * data_buf, u64 vendor_id);
+       /* Note: when specifying vendor_id to fc_host_post_vendor_event()
+        *   be sure to read the Vendor Type and ID formatting requirements
+        *   specified in scsi_netlink.h
+        */
 
 #endif /* SCSI_TRANSPORT_FC_H */