1. 15 12月, 2012 3 次提交
    • R
      fcoe: Use the fcoe_sysfs control interface · 435c8667
      Robert Love 提交于
      This patch adds support for the new fcoe_sysfs
      control interface to fcoe.ko. It keeps the deprecated
      interface in tact and therefore either the legacy
      or the new control interfaces can be used. A mixed mode
      is not supported. A user must either use the new
      interfaces or the old ones, but not both.
      
      The fcoe_ctlr's link state is now driven by both the
      netdev link state as well as the fcoe_ctlr_device's
      enabled attribute. The link must be up and the
      fcoe_ctlr_device must be enabled before the FCoE
      Controller starts discovery or login.
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Acked-by: NNeil Horman <nhorman@tuxdriver.com>
      435c8667
    • R
      libfcoe, fcoe, bnx2fc: Add new fcoe control interface · 6a891b07
      Robert Love 提交于
      This patch does a few things.
      
      1) Makes /sys/bus/fcoe/ctlr_{create,destroy} interfaces.
         These interfaces take an <ifname> and will either
         create an FCoE Controller or destroy an FCoE
         Controller depending on which file is written to.
      
         The new FCoE Controller will start in a DISABLED
         state and will not do discovery or login until it
         is ENABLED. This pause will allow us to configure
         the FCoE Controller before enabling it.
      
      2) Makes the 'mode' attribute of a fcoe_ctlr_device
         writale. This allows the user to configure the mode
         in which the FCoE Controller will start in when it
         is ENABLED.
      
         Possible modes are 'Fabric', or 'VN2VN'.
      
         The default mode for a fcoe_ctlr{,_device} is 'Fabric'.
         Drivers must implement the set_fcoe_ctlr_mode routine
         to support this feature.
      
         libfcoe offers an exported routine to set a FCoE
         Controller's mode. The mode can only be changed
         when the FCoE Controller is DISABLED.
      
         This patch also removes the get_fcoe_ctlr_mode pointer
         in the fcoe_sysfs function template, the code in
         fcoe_ctlr.c to get the mode and the assignment of
         the fcoe_sysfs function pointer to the fcoe_ctlr.c
         implementation (in fcoe and bnx2fc). fcoe_sysfs can
         return that value for the mode without consulting the
         LLD.
      
      3) Make a 'enabled' attribute of a fcoe_ctlr_device. On a
         read, fcoe_sysfs will return the attribute's value. On
         a write, fcoe_sysfs will call the LLD (if there is a
         callback) to notifiy that the enalbed state has changed.
      
      This patch maintains the old FCoE control interfaces as
      module parameters, but it adds comments pointing out that
      the old interfaces are deprecated.
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Acked-by: NNeil Horman <nhorman@tuxdriver.com>
      6a891b07
    • R
      libfcoe: Add fcoe_sysfs debug logging level · 3993de61
      Robert Love 提交于
      Add a macro to print fcoe_sysfs debug statements.
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Acked-by: NNeil Horman <nhorman@tuxdriver.com>
      3993de61
  2. 05 12月, 2012 2 次提交
    • R
      libfcoe: Save some memory and optimize name lookups · ef60f674
      Robert Love 提交于
      Instead of creating a structure with an enum and a pointer
      to a string, simply allocate an array of strings and use
      the enum values for the indicies.
      
      This means that we do not need to iterate through the list
      of entries when looking up a string name by its enum key.
      
      This will also help with a latter patch that will add
      more fcoe_sysfs attributes that will also use the
      fcoe_enum_name_search macro. One attribute will also do
      a reverse lookup which requires less code when the
      enum-to-string mappings are organized as this patch makes
      them to be.
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Acked-by: NNeil Horman <nhorman@tuxdriver.com>
      ef60f674
    • V
      libfc: fix REC handling · 5b97fabd
      Vasu Dev 提交于
      Currently fc_fcp_timeout doesn't check FC_RP_FLAGS_REC_SUPPORTED
      flag first, this prevents REC request ever going out at all
      to the target having REC support. So this patches fixes the
      fc_fcp_timeout by checking FC_RP_FLAGS_REC_SUPPORTED flag first.
      
      The changed order won't cause any issue during clearing
      FC_RP_FLAGS_REC_SUPPORTED on failed IO with target not supporting
      FC_RP_FLAGS_REC_SUPPORTED, since retry on failed IO would succeed.
      Signed-off-by: NVasu Dev <vasu.dev@intel.com>
      Tested-by: NRoss Brattain <ross.b.brattain@intel.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      5b97fabd
  3. 14 11月, 2012 3 次提交
  4. 13 11月, 2012 1 次提交
  5. 29 10月, 2012 1 次提交
    • D
      qlogicpti: Fix build warning. · f7e8d9f8
      David S. Miller 提交于
      The build warns:
      
      drivers/scsi/qlogicpti.c: In function 'qpti_sbus_probe':
      drivers/scsi/qlogicpti.c:1316:45: warning: passing argument 1 of 'scsi_host_alloc' discards 'const' qualifier from pointer target type [enabled by default]
      include/scsi/scsi_host.h:778:26: note: expected 'struct scsi_host_template *' but argument is of type 'const struct scsi_host_template *'
      
      The problem is that of_device_id->data is a const void pointer.
      
      This is pretty silly in this specific instance, because for all
      matched device IDs we set match->data to the same value,
      &qpti_template.
      
      So just use that directly instead of the unnecessary and improperly
      typed abstraction.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f7e8d9f8
  6. 27 10月, 2012 3 次提交
    • R
      qla2xxx: Update target lookup session tables when a target session changes · c8292d1d
      Roland Dreier 提交于
      It is possible for the target code to change the loop_id or s_id of a
      target session in reaction to an FC fabric change.  However, the
      session structures are stored in tables that are indexed by these two
      keys, and if we just change the session structure but leave the
      pointers to it in the old places in the table, havoc can ensue.  For
      example, a new session might come along that should go in the old slot
      in the table and overwrite the old session pointer.
      
      To handle this, add a new tgt_ops->update_sess() method that also
      updates the "by loop_id" and "by s_id" lookup tables when a session
      changes, so that the keys where a session pointer is stored in these
      tables always matches the keys in the session structure itself.
      
      (nab: Drop unnecessary double inversion with FCF_CONF_COMP_SUPPORTED
            usage)
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      Cc: Chad Dupuis <chad.dupuis@qlogic.com>
      Cc: Arun Easi <arun.easi@qlogic.com>
      Cc: Saurav Kashyap <saurav.kashyap@qlogic.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      c8292d1d
    • R
      tcm_qla2xxx: Format VPD page 83h SCSI name string according to SPC · c046aa0f
      Roland Dreier 提交于
      My draft of SPC-4 says the following about the SCSI name string in
      inquiry VPD page 83h:
      
          The SCSI NAME STRING field starts with either:
      
          a) the four UTF-8 characters 'eui.' concatenated with 16, 24, or
             32 hexadecimal digits (i.e., the UTF-8 characters 0 through 9
             and A through F) for an EUI-64 based identifier (see
             7.8.6.5). The first hexadecimal digit shall be the most
             significant four bits of the first byte (i.e., most significant
             byte) of the EUI-64 based identifier;
          b) the four UTF-8 characters 'naa.' concatenated with 16 or 32
             hexadecimal digits for an NAA identifier (see 7.8.6.6). The
             first hexadecimal digit shall be the most significant four bits
             of the first byte (i.e., most significant byte) of the NAA
             identifier; or
          c) the four UTF-8 characters 'iqn.' concatenated with an iSCSI
             Name for an iSCSI-name based identifier (see iSCSI).
      
      However, the .tpg_get_wwn method for tcm_qla2xxx formats the WWN so
      the SCSI name string looks like "52:4a:93:7d:24:5f:b2:12,t,0x0001".
      This patch corrects the code so that VPD 83h gives a SPC-compliant
      SCSI name string like "naa.524a937d245fb212,t,0x0001" while leavig
      other uses alone (so configfs will still work with ':' separated WWNs).
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      Cc: Chad Dupuis <chad.dupuis@qlogic.com>
      Cc: Arun Easi <arun.easi@qlogic.com>
      Cc: Saurav Kashyap <saurav.kashyap@qlogic.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      c046aa0f
    • N
      qla2xxx: Add missing ->vport_slock while calling qlt_update_vp_map · 29c08cda
      Nicholas Bellinger 提交于
      All other callers of qlt_update_vp_map() already hold ->vport_slock
      while updating the vp target map, so go ahead and add the missing
      ->vport_slock within qla24xx_disable_vp() code.
      
      Cc: Saurav Kashyap <saurav.kashyap@qlogic.com>
      Cc: Chad Dupuis <chad.dupuis@qlogic.com>
      Cc: Arun Easi <arun.easi@qlogic.com>
      Cc: Andrew Vasquez <andrew.vasquez@qlogic.com>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Cc: Roland Dreier <roland@purestorage.com>
      Acked-by: NSaurav Kashyap <saurav.kashyap@qlogic.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      29c08cda
  7. 10 10月, 2012 2 次提交
    • A
      SCSI: ARM: make fas216_dumpinfo function conditional · 48968177
      Arnd Bergmann 提交于
      The fas216_dumpinfo function is only used by __fas216_checkmagic,
      which is conditionally compiled, so we should put both functions
      inside of the same #ifdef.
      
      Without this patch, building rpc_defconfig results in:
      
      drivers/scsi/arm/fas216.c:182:13: warning: 'fas216_dumpinfo' defined but not used [-Wunused-function]
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-scsi@vger.kernel.org
      48968177
    • A
      SCSI: ARM: ncr5380/oak uses no interrupts · ea065f13
      Arnd Bergmann 提交于
      The ncr5380 driver is included by multiple board specific
      drivers, which may or may not use the interrupt handler.
      The oak variant doesn't, and should set the DONT_USE_INTR
      macro.
      
      Without this patch, building rpc_defconfig results in:
      
      drivers/scsi/arm/../NCR5380.c:1160:20: warning: 'oakscsi_intr' defined but not used [-Wunused-function]
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-scsi@vger.kernel.org
      ea065f13
  8. 09 10月, 2012 15 次提交
  9. 08 10月, 2012 10 次提交