1. 28 2月, 2017 1 次提交
  2. 19 2月, 2017 1 次提交
  3. 09 2月, 2017 5 次提交
  4. 18 1月, 2017 1 次提交
  5. 15 12月, 2016 2 次提交
  6. 16 7月, 2016 3 次提交
  7. 24 2月, 2016 5 次提交
  8. 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
  9. 08 1月, 2016 5 次提交
  10. 27 8月, 2015 5 次提交
  11. 25 7月, 2015 6 次提交
    • A
      qla2xxx: disable scsi_transport_fc registration in target mode · d20ed91b
      Alexei Potashnik 提交于
      There are multiple reasons for disabling this:
      
      1. It provides no functional benefit. We pretty much only get a few more
      sysfs entries for each port, but all that information is already
      available from /sys/kernel/debug/target/qla-session-X
      
      2. It already only works in private-loop mode. By disabling we'll be
      getting more uniform behavior with fabric mode.
      
      3. It creates complications for the new PLOGI handling mechanism:
      scsi_transport_fc port deletion timer could race with new session
      from initiator and cause logout after successful login.
      
      Cc: <stable@vger.kernel.org> # v3.18+
      Signed-off-by: NAlexei Potashnik <alexei@purestorage.com>
      Signed-off-by: NHimanshu Madhani <himanshu.madhani@qlogic.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      d20ed91b
    • A
      qla2xxx: added sess generations to detect RSCN update races · df673274
      Alexei Potashnik 提交于
      RSCN processing in qla2xxx driver can run in parallel with ELS/IO
      processing. As such the decision to remove disappeared fc port's
      session could be stale, because a new login sequence has occurred
      since and created a brand new session.
      
      Previous mechanism of dealing with this by delaying deletion request
      was prone to erroneous deletions if the event that was supposed to
      cancel the deletion never arrived or has been delayed in processing.
      
      New mechanism relies on a time-like generation counter to serialize
      RSCN updates relative to ELS/IO updates.
      
      Cc: <stable@vger.kernel.org> # v3.18+
      Signed-off-by: NAlexei Potashnik <alexei@purestorage.com>
      Signed-off-by: NHimanshu Madhani <himanshu.madhani@qlogic.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      df673274
    • A
      qla2xxx: delay plogi/prli ack until existing sessions are deleted · a6ca8878
      Alexei Potashnik 提交于
      - keep qla_tgt_sess object on the session list until it's freed
      
      - modify use of sess->deleted flag to differentiate delayed
        session deletion that can be cancelled from irreversible one:
        QLA_SESS_DELETION_PENDING vs QLA_SESS_DELETION_IN_PROGRESS
      
      - during IN_PROGRESS deletion all newly arrived commands and TMRs will
        be rejected, existing commands and TMRs will be terminated when
        given by the core to the fabric or simply dropped if session logout
        has already happened (logout terminates all existing exchanges)
      
      - new PLOGI will initiate deletion of the following sessions
        (unless deletion is already IN_PROGRESS):
        - with the same port_name (with logout)
        - different port_name, different loop_id but the same port_id
          (with logout)
        - different port_name, different port_id, but the same loop_id
          (without logout)
      
      - additionally each new PLOGI will store imm notify iocb in the
        same port_name session being deleted. When deletion process
        completes this iocb will be acked. Only the most recent PLOGI
        iocb is stored. The older ones will be terminated when replaced.
      
      - new PRLI will initiate deletion of the following sessions
        (unless deletion is already IN_PROGRESS):
        - different port_name, different port_id, but the same loop_id
         (without logout)
      
      Cc: <stable@vger.kernel.org> # v3.18+
      Signed-off-by: NAlexei Potashnik <alexei@purestorage.com>
      Acked-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>
      a6ca8878
    • R
      qla2xxx: kill sessions/log out initiator on RSCN and port down events · b2032fd5
      Roland Dreier 提交于
      To fix some issues talking to ESX, this patch modifies the qla2xxx driver
      so that it never logs into remote ports.  This has the side effect of
      getting rid of the "rports" entirely, which means we never log out of
      initiators and never tear down sessions when an initiator goes away.
      
      This is mostly OK, except that we can run into trouble if we have
      initiator A assigned FC address X:Y:Z by the fabric talking to us, and
      then initiator A goes away.  Some time (could be a long time) later,
      initiator B comes along and also gets FC address X:Y:Z (which is
      available again, because initiator A is gone).  If initiator B starts
      talking to us, then we'll still have the session for initiator A, and
      since we look up incoming IO based on the FC address X:Y:Z, initiator B
      will end up using ACLs for initiator A.
      
      Fix this by:
      
       1. Handling RSCN events somewhat differently; instead of completely
          skipping the processing of fcports, we look through the list, and if
          an fcport disappears, we tell the target code the tear down the
          session and tell the HBA FW to release the N_Port handle.
      
       2. Handling "port down" events by flushing all of our sessions.  The
          firmware was already releasing the N_Port handle but we want the
          target code to drop all the sessions too.
      
      Cc: <stable@vger.kernel.org> # v3.18+
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      Signed-off-by: NAlexei Potashnik <alexei@purestorage.com>
      Acked-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>
      b2032fd5
    • H
    • S
      qla2xxx: Fix hardware lock/unlock issue causing kernel panic. · ba9f6f64
      Saurav Kashyap 提交于
      [ Upstream commit ef86cb20 ]
      
      This patch fixes a kernel panic for qla2xxx Target core
      Module driver introduced by a fix in the qla2xxx initiator code.
      
      Commit ef86cb20 ("qla2xxx: Mark port lost when we receive an RSCN for it.")
      introduced the regression for qla2xxx Target driver.
      
      Stack trace will have following signature
      
       --- <NMI exception stack> ---
      [ffff88081faa3cc8] _raw_spin_lock_irqsave at ffffffff815b1f03
      [ffff88081faa3cd0] qlt_fc_port_deleted at ffffffffa096ccd0 [qla2xxx]
      [ffff88081faa3d20] qla2x00_schedule_rport_del at ffffffffa0913831[qla2xxx]
      [ffff88081faa3d50] qla2x00_mark_device_lost at ffffffffa09159c5[qla2xxx]
      [ffff88081faa3db0] qla2x00_async_event at ffffffffa0938d59 [qla2xxx]
      [ffff88081faa3e30] qla24xx_msix_default at ffffffffa093a326 [qla2xxx]
      [ffff88081faa3e90] handle_irq_event_percpu at ffffffff810a7b8d
      [ffff88081faa3ee0] handle_irq_event at ffffffff810a7d32
      [ffff88081faa3f10] handle_edge_irq at ffffffff810ab6b9
      [ffff88081faa3f30] handle_irq at ffffffff8100619c
      [ffff88081faa3f70] do_IRQ at ffffffff815b4b1c
       --- <IRQ stack> ---
      
      Cc: <stable@vger.kernel.org> # v3.18+
      Signed-off-by: NSaurav Kashyap <saurav.kashyap@qlogic.com>
      Signed-off-by: NHimanshu Madhani <himanshu.madhani@qlogic.com>
      Reviewed-by: NNicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      ba9f6f64
  12. 13 6月, 2015 1 次提交
  13. 10 4月, 2015 2 次提交
  14. 07 3月, 2015 1 次提交
  15. 15 12月, 2014 1 次提交