1. 27 11月, 2012 28 次提交
  2. 14 11月, 2012 3 次提交
  3. 13 11月, 2012 1 次提交
  4. 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
  5. 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
  6. 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
  7. 09 10月, 2012 2 次提交
    • K
      [SCSI] storvsc: Account for in-transit packets in the RESET path · 5c1b10ab
      K. Y. Srinivasan 提交于
      Properly account for I/O in transit before returning from the RESET call.
      In the absense of this patch, we could have a situation where the host may
      respond to a command that was issued prior to the issuance of the RESET
      command at some arbitrary time after responding to the RESET command.
      Currently, the host does not do anything with the RESET command.
      Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      5c1b10ab
    • J
      [SCSI] qla2xxx: fix potential deadlock on ha->hardware_lock · f24b5cb8
      Jiri Kosina 提交于
      Lockdep reports:
      
      === [ cut here ] ===
       =========================================================
       [ INFO: possible irq lock inversion dependency detected ]
       3.6.0-0.0.0.28.36b5ec9-default #1 Not tainted
       ---------------------------------------------------------
       qla2xxx_1_dpc/368 just changed the state of lock:
        (&(&ha->vport_slock)->rlock){+.....}, at: [<ffffffffa009b377>] qla2x00_configure_hba+0x197/0x3c0 [qla2xxx]
       but this lock was taken by another, HARDIRQ-safe lock in the past:
        (&(&ha->hardware_lock)->rlock){-.....}
      
      and interrupts could create inverse lock ordering between them.
      
      other info that might help us debug this:
       Possible interrupt unsafe locking scenario:
      
             CPU0                    CPU1
             ----                    ----
        lock(&(&ha->vport_slock)->rlock);
                                     local_irq_disable();
                                     lock(&(&ha->hardware_lock)->rlock);
                                     lock(&(&ha->vport_slock)->rlock);
        <Interrupt>
          lock(&(&ha->hardware_lock)->rlock);
      === [ cut here ] ===
      
      Fix the potential deadlock by disabling IRQs while holding ha->vport_slock.
      Reported-and-tested-by: NSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      Acked-by: NSaurav Kashyap <saurav.kashyap@qlogic.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      f24b5cb8