1. 04 10月, 2008 1 次提交
  2. 14 9月, 2008 1 次提交
    • A
      [SCSI] qla2xxx: Defer enablement of RISC interrupts until ISP initialization completes. · 048feec5
      Andrew Vasquez 提交于
      Josip Rodin noted
      (http://article.gmane.org/gmane.linux.ports.sparc/10152) the
      driver oopsing during registration of an rport to the
      FC-transport layer with a backtrace indicating a dereferencing of
      an shost->shost_data equal to NULL.  David Miller identified a
      small window in driver logic where this could happen:
      
          > Look at how the driver registers the IRQ handler before the host has
          > been registered with the SCSI layer.
          >
          > That leads to a window of time where the shost hasn't been setup
          > fully, yet ISRs can come in and trigger DPC thread events, such as
          > loop resyncs, which expect the transport area to be setup.
          >
          > But it won't be setup, because scsi_add_host() hasn't finished yet.
          >
          > Note that in Josip's crash log, we don't even see the
          >
          >         qla_printk(KERN_INFO, ha, "\n"
          >             " QLogic Fibre Channel HBA Driver: %s\n"
          >             "  QLogic %s - %s\n"
          >             "  ISP%04X: %s @ %s hdma%c, host#=%ld, fw=%s\n",
          >  ...
          >
          > message yet.
          >
          > Which means that the crash occurs between qla2x00_request_irqs()
          > and printing that message.
      
      Close this window by enabling RISC interrupts after the host has
      been registered with the SCSI midlayer.
      Reported-by: NJosip Rodin <joy@entuzijast.net>
      Cc: Stable Tree <stable@kernel.org>
      Signed-off-by: NAndrew Vasquez <andrew.vasquez@qlogic.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      048feec5
  3. 24 8月, 2008 1 次提交
  4. 16 8月, 2008 7 次提交
  5. 28 7月, 2008 1 次提交
  6. 27 7月, 2008 23 次提交
  7. 31 5月, 2008 3 次提交
  8. 15 5月, 2008 3 次提交
    • A
    • A
      [SCSI] qla2xxx: Revert "qla2xxx: Validate mid-layer 'underflow' during check-condition handling." · a7cd0232
      Andrew Vasquez 提交于
      This reverts commit 8084fe16.
      The midlayer should be given the oppotunity to interpret the
      check-condition and based on scsi_cmnd->resid determine if a
      transfer should be retried or failed.
      Signed-off-by: NAndrew Vasquez <andrew.vasquez@qlogic.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      a7cd0232
    • A
      [SCSI] qla2xxx: Disable local-interrupts while polling for RISC status. · d2ba5675
      Andrew Vasquez 提交于
      Matthew Wilcox <matthew@wil.cx> reported the following lockdep
      warning:
      
       > =================================
       > [INFO:inconsistentlockstate]
       > 2.6.26-rc1-00115-g0340eda-dirty#60
       > ---------------------------------
       > inconsistent{hardirq-on-W}->{in-hardirq-W}usage.
       > swapper/1[HC1[1]:SC0[0]:HE0:SE1]takes:
       > (&ha->hardware_lock){+-..},at:[<c035495d>]qla2300_intr_handler+0x35/0x1f5
       > {hardirq-on-W}statewasregisteredat:
       > [<c0139a16>]__lock_acquire+0x459/0xb1d
       > [<c013a091>]__lock_acquire+0xad4/0xb1d
       > [<c013a142>]lock_acquire+0x68/0x82
       > [<c035495d>]qla2300_intr_handler+0x35/0x1f5
       > [<c0506da5>]_spin_lock+0x24/0x4d
       > [<c035495d>]qla2300_intr_handler+0x35/0x1f5
       > [<c035495d>]qla2300_intr_handler+0x35/0x1f5
       > [<c01391e4>]trace_hardirqs_on+0xe7/0x10e
       > [<c034f0a6>]qla2x00_mailbox_command+0x1c6/0x433
       ...
       > other info that might help us debug this:
       > no locks held by swapper/1.
       >
       > stack backtrace:
       > Pid:1,comm:swapperNottainted2.6.26-rc1-00115-g0340eda-dirty#60
       > [<c0138121>]print_usage_bug+0x100/0x10a
       > [<c0138d37>]mark_lock+0xaa/0x395
       > [<c01399af>]__lock_acquire+0x3f2/0xb1d
       > [<c013a091>]__lock_acquire+0xad4/0xb1d
       > [<c013a142>]lock_acquire+0x68/0x82
       > [<c035495d>]qla2300_intr_handler+0x35/0x1f5
       > [<c0506da5>]_spin_lock+0x24/0x4d
       > [<c035495d>]qla2300_intr_handler+0x35/0x1f5
       > [<c035495d>]qla2300_intr_handler+0x35/0x1f5
       > [<c014a37b>]handle_IRQ_event+0x13/0x3d
       > [<c014b366>]handle_fasteoi_irq+0x76/0xab
      
      Which shows that lockdep is detecting the driver's
      interrupt-handler is run in both process and interrupt context
      with irqs-enabled in the former case.
      
      During init-time and error-recovery (after a RISC reset), the
      driver disables interrupts and 'polls' for completions by calling
      qla2x00_poll():
      
      	static inline void
      	qla2x00_poll(scsi_qla_host_t *ha)
      	{
      		ha->isp_ops->intr_handler(0, ha);
      	}
      
      which in-turn calls the ISP registered interrupt handler.  This
      patch corrects it by disabling local interrupts during polling.
      Reviewed-by: NMatthew Wilcox <willy@linux.intel.com>
      Signed-off-by: NAndrew Vasquez <andrew.vasquez@qlogic.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      d2ba5675