]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - include/scsi/scsi_transport_fc.h
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
[mv-sheeva.git] / include / scsi / scsi_transport_fc.h
index 81ea7b4bf81ee99746520d4c353e3dc9330bbcfc..06f72bab9df0af520039506ece89079d549178aa 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  *  FiberChannel transport specific attributes exported to sysfs.
  *
  *  Copyright (c) 2003 Silicon Graphics, Inc.  All rights reserved.
@@ -104,7 +104,7 @@ enum fc_vport_state {
 
 
 
-/* 
+/*
  * FC Classes of Service
  * Note: values are not enumerated, as they can be "or'd" together
  * for reporting (e.g. report supported_classes). If you alter this list,
@@ -117,7 +117,7 @@ enum fc_vport_state {
 #define FC_COS_CLASS4                  0x10
 #define FC_COS_CLASS6                  0x40
 
-/* 
+/*
  * FC Port Speeds
  * Note: values are not enumerated, as they can be "or'd" together
  * for reporting (e.g. report supported_speeds). If you alter this list,
@@ -163,8 +163,8 @@ enum fc_tgtid_binding_type  {
 
 
 /* Macro for use in defining Virtual Port attributes */
-#define FC_VPORT_ATTR(_name,_mode,_show,_store)                                \
-struct class_device_attribute class_device_attr_vport_##_name =        \
+#define FC_VPORT_ATTR(_name,_mode,_show,_store)                \
+struct device_attribute dev_attr_vport_##_name =       \
        __ATTR(_name,_mode,_show,_store)
 
 
@@ -176,7 +176,7 @@ struct class_device_attribute class_device_attr_vport_##_name =     \
  * ports has a unique presense on the SAN, and may be instantiated via
  * NPIV, Virtual Fabrics, or via additional ALPAs. As the vport is a
  * unique presense, each vport has it's own view of the fabric,
- * authentication priviledge, and priorities.
+ * authentication privilege, and priorities.
  *
  * A virtual port may support 1 or more FC4 roles. Typically it is a
  * FCP Initiator. It could be a FCP Target, or exist sole for an IP over FC
@@ -223,6 +223,7 @@ struct fc_vport {
        u8 flags;
        struct list_head peers;
        struct device dev;
+       struct work_struct vport_delete_work;
 } __attribute__((aligned(sizeof(unsigned long))));
 
 /* bit field values for struct fc_vport "flags" field: */
@@ -233,8 +234,8 @@ struct fc_vport {
 
 #define        dev_to_vport(d)                         \
        container_of(d, struct fc_vport, dev)
-#define transport_class_to_vport(classdev)     \
-       dev_to_vport(classdev->dev)
+#define transport_class_to_vport(dev)          \
+       dev_to_vport(dev->parent)
 #define vport_to_shost(v)                      \
        (v->shost)
 #define vport_to_shost_channel(v)              \
@@ -270,7 +271,7 @@ struct fc_rport_identifiers {
 
 /* Macro for use in defining Remote Port attributes */
 #define FC_RPORT_ATTR(_name,_mode,_show,_store)                                \
-struct class_device_attribute class_device_attr_rport_##_name =        \
+struct device_attribute dev_attr_rport_##_name =       \
        __ATTR(_name,_mode,_show,_store)
 
 
@@ -340,8 +341,8 @@ struct fc_rport {   /* aka fc_starget_attrs */
 
 #define        dev_to_rport(d)                         \
        container_of(d, struct fc_rport, dev)
-#define transport_class_to_rport(classdev)     \
-       dev_to_rport(classdev->dev)
+#define transport_class_to_rport(dev)  \
+       dev_to_rport(dev->parent)
 #define rport_to_shost(r)                      \
        dev_to_shost(r->dev.parent)
 
@@ -397,7 +398,7 @@ struct fc_host_statistics {
        u64 prim_seq_protocol_err_count;
        u64 invalid_tx_word_count;
        u64 invalid_crc_count;
-       
+
        /* fc4 statistics  (only FCP supported currently) */
        u64 fcp_input_requests;
        u64 fcp_output_requests;
@@ -588,15 +589,19 @@ struct fc_function_template {
        int     (*vport_disable)(struct fc_vport *, bool);
        int     (*vport_delete)(struct fc_vport *);
 
+       /* target-mode drivers' functions */
+       int     (* tsk_mgmt_response)(struct Scsi_Host *, u64, u64, int);
+       int     (* it_nexus_response)(struct Scsi_Host *, u64, int);
+
        /* allocation lengths for host-specific data */
        u32                             dd_fcrport_size;
        u32                             dd_fcvport_size;
 
-       /* 
+       /*
         * The driver sets these to tell the transport class it
         * wants the attributes displayed in sysfs.  If the show_ flag
         * is not set, the attribute will be private to the transport
-        * class 
+        * class
         */
 
        /* remote port fixed attributes */
@@ -631,6 +636,8 @@ struct fc_function_template {
        unsigned long   show_host_fabric_name:1;
        unsigned long   show_host_symbolic_name:1;
        unsigned long   show_host_system_hostname:1;
+
+       unsigned long   disable_target_scan:1;
 };