1. 28 6月, 2017 5 次提交
  2. 13 6月, 2017 8 次提交
  3. 25 5月, 2017 1 次提交
    • S
      scsi: qla2xxx: Fix crash due to mismatch mumber of Q-pair creation for Multi queue · b95b9452
      Sawan Chandak 提交于
      when driver is loaded with Multi Queue enabled, it was noticed that
      there was one less queue pair created.
      
      Following message would indicate this:
      
      "No resources to create additional q pair."
      
      The result of one less queue pair means that system can crash, if the
      block mq layer thinks there is an extra hardware queue available, and
      the driver will use a NULL ptr qpair in that instance.
      
      Following stack trace is seen in one of the crash:
      
      irq_create_affinity_masks+0x98/0x530
      irq_create_affinity_masks+0x98/0x530
      __pci_enable_msix+0x321/0x4e0
      mutex_lock+0x12/0x40
      pci_alloc_irq_vectors_affinity+0xb5/0x140
      qla24xx_enable_msix+0x79/0x530 [qla2xxx]
      qla2x00_request_irqs+0x61/0x2d0 [qla2xxx]
      qla2x00_probe_one+0xc73/0x2390 [qla2xxx]
      ida_simple_get+0x98/0x100
      kernfs_next_descendant_post+0x40/0x50
      local_pci_probe+0x45/0xa0
      pci_device_probe+0xfc/0x140
      driver_probe_device+0x2c5/0x470
      __driver_attach+0xdd/0xe0
      driver_probe_device+0x470/0x470
      bus_for_each_dev+0x6c/0xc0
      driver_attach+0x1e/0x20
      bus_add_driver+0x45/0x270
      driver_register+0x60/0xe0
      __pci_register_driver+0x4c/0x50
      qla2x00_module_init+0x1ce/0x21e [qla2xxx]
      
      Cc: <stable@vger.kernel.org> # v4.10+
      Signed-off-by: NSawan Chandak <sawan.chandak@cavium.com>
      Signed-off-by: NHimanshu Madhani <himanshu.madhani@cavium.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      b95b9452
  4. 05 4月, 2017 1 次提交
  5. 19 3月, 2017 5 次提交
  6. 28 2月, 2017 1 次提交
  7. 19 2月, 2017 1 次提交
  8. 09 2月, 2017 5 次提交
  9. 18 1月, 2017 1 次提交
  10. 15 12月, 2016 2 次提交
  11. 16 7月, 2016 3 次提交
  12. 24 2月, 2016 5 次提交
  13. 07 2月, 2016 1 次提交
    • Q
      qla2xxx: Fix stale pointer access. · cb43285f
      Quinn Tran 提交于
      [ Upstream Commit 84e32a06 ]
      
      Commit 84e32a06 ("qla2xxx: Use pci_enable_msix_range() instead of
      pci_enable_msix()") introduced a regression when target mode is enabled.
      In qla24xx_enable_msix(), ha->max_rsp_queues was incorrectly set
      to a value higher than the number of response queues allocated causing
      an invalid dereference. Specifically here in qla2x00_init_rings():
          *rsp->in_ptr = 0;
      
      Add additional check to make sure the pointer is valid. following
      call stack will be seen
      
      ---- 8< ----
      RIP: 0010:[<ffffffffa02ccadc>]  [<ffffffffa02ccadc>] qla2x00_init_rings+0xdc/0x320 [qla2xxx]
      RSP: 0018:ffff880429447dd8  EFLAGS: 00010082
      ....
      Call Trace:
      [<ffffffffa02ceb40>] qla2x00_abort_isp+0x170/0x6b0 [qla2xxx]
      [<ffffffffa02c6f77>] qla2x00_do_dpc+0x357/0x7f0 [qla2xxx]
      [<ffffffffa02c6c20>] ? qla2x00_relogin+0x260/0x260 [qla2xxx]
      [<ffffffff8107d2c9>] kthread+0xc9/0xe0
      [<ffffffff8107d200>] ? flush_kthread_worker+0x90/0x90
      [<ffffffff8172cc6f>] ret_from_fork+0x3f/0x70
      [<ffffffff8107d200>] ? flush_kthread_worker+0x90/0x90
      ---- 8< ----
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NQuinn Tran <quinn.tran@qlogic.com>
      Signed-off-by: NHimanshu Madhani <himanshu.madhani@qlogic.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      cb43285f
  14. 08 1月, 2016 1 次提交
    • D
      qla2xxx: Check for online flag instead of active reset when transmitting responses · 3bb67df5
      Dilip Kumar Uppugandla 提交于
      Driver has following initialization sequence for Target mode
      
      1. Driver initialization starts
      
      2. ISP Abort is scheduled when the target is enabled.
      
      qla2xxx [0000:04:00.0]-4807:25: ISP abort scheduled
      qla2xxx [0000:04:00.0]-00af:25: Performing ISP error recovery - ha=ffff880caa9e0000.
      
      3. DPC thread starts the ISP Abort
      
      4. While DPC is resetting the chip and initializing the firmware, we get
         async events from the firmware about P2P mode, LOOP UP and PORT UPDATE.
      
      5. PRLI from a initiator is delivered to us followed by a PLOGI and then a
         SCSI command which creates a session.
      
      6. If the SCSI command is a WRITE in this case, we issue XFR RDY and it
         gets dropped as can be seen with messages RESET-XFR because ISP Abort
         is still active
      
      qla2xxx [0000:04:00.0]-e902:25: RESET-XFR active/old-count/new-count = 1/1/1.
      
      7. If the SCSI command is a READ, we issue RESPONSE and they get dropped
         as well because Abort is still active.
      
      qla2xxx [0000:04:00.0]-e901:25: RESET-RSP active/old-count/new-count = 1/1/1
      
      8. Now eventually, ISP Abort finishes clearing the DPC flags.
      
      qla2xxx [0000:04:00.0]-8822:25: qla2x00_abort_isp succeeded.
      qla2xxx [0000:04:00.0]-4808:25: ISP abort end.
      
      9. Since we dropped SCSI commands silently (without any responses sent
         to the initiator) initiator waits for a SCSI timeout (which is 60
         seconds in our case), Sends an ABTS which fails since there
         no se_cmd found for the tag that ABTS is referencing as the
         commands were cleaned up in Step 6 and 7.
      
      10. Initiator send an IO after the ABTS which succeed fine.
      
      To fix the above case, the following changes have been made:
        - To prevent target from dropping commands silently, use the online flag
          instead to check for an active chip reset. Once the port is online during
          a chip reset phase, we are good to process the commands.
        - Clean up qla2x00_restart_isp to not set the online flag and process ATIO
          as it is unnecessary. During a chip reset, interrupts are enabled only
          after setting the online flag to 1, so ATIO's won't be missed and hence
          no need to process ATIO's after setting the online flag.
      Signed-off-by: NDilip Kumar Uppugandla <dilip@purestorage.com>
      Signed-off-by: NHimanshu Madhani <himanshu.madhani@qlogic.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      3bb67df5