1. 25 7月, 2015 12 次提交
  2. 13 6月, 2015 1 次提交
  3. 31 5月, 2015 1 次提交
    • B
      target: Move task tag into struct se_cmd + support 64-bit tags · 649ee054
      Bart Van Assche 提交于
      Simplify target core and target drivers by storing the task tag
      a.k.a. command identifier inside struct se_cmd.
      
      For several transports (e.g. SRP) tags are 64 bits wide.
      Hence add support for 64-bit tags.
      
      (Fix core_tmr_abort_task conversion spec warnings - nab)
      (Fix up usb-gadget to use 16-bit tags - HCH + bart)
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Andy Grover <agrover@redhat.com>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: <qla2xxx-upstream@qlogic.com>
      Cc: Felipe Balbi <balbi@ti.com>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Juergen Gross <jgross@suse.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      649ee054
  4. 15 4月, 2015 1 次提交
    • C
      target: simplify the target template registration API · 9ac8928e
      Christoph Hellwig 提交于
      Instead of calling target_fabric_configfs_init() +
      target_fabric_configfs_register() / target_fabric_configfs_deregister()
      target_fabric_configfs_free() from every target driver, rewrite the API
      so that we have simple register/unregister functions that operate on
      a const operations vector.
      
      This patch also fixes a memory leak in several target drivers. Several
      target drivers namely called target_fabric_configfs_deregister()
      without calling target_fabric_configfs_free().
      
      A large part of this patch is based on earlier changes from
      Bart Van Assche <bart.vanassche@sandisk.com>.
      
      (v2: Add a new TF_CIT_SETUP_DRV macro so that the core configfs code
      can declare attributes as either core only or for drivers)
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      9ac8928e
  5. 04 12月, 2014 1 次提交
  6. 02 10月, 2014 3 次提交
  7. 25 9月, 2014 13 次提交
  8. 17 9月, 2014 1 次提交
  9. 25 6月, 2014 1 次提交
  10. 04 6月, 2014 1 次提交
    • N
      qla2xxx: Convert to percpu_ida session tag pre-allocation · 51a07f84
      Nicholas Bellinger 提交于
      This patch converts qla2xxx target code to use generic percpu_ida
      tag allocation provided by target-core, thus removing the original
      kmem_cache_zalloc() for each struct qla_tgt_cmd descriptor in the
      incoming ATIO packet fast-path.
      
      This includes the conversion of qlt_handle_cmd_for_atio() to perform
      qla_tgt_sess lookup before dispatching a command descriptor into
      qla_tgt_wq process context, along with handling the case where no
      active session exists, and subsequently kicking off a seperate
      process context for qlt_create_sess_from_atio() to create a new one.
      
      It also includes moving tag allocation into generic code within
      qlt_get_tag(), so that the same logic can be shared between
      qlt_handle_cmd_for_atio() + qlt_create_sess_from_atio() contexts.
      Also, __qlt_do_work() has been made generic between both normal
      process context in qlt_do_work() + qlt_create_sess_from_atio().
      
      Next, update qlt_free_cmd() to release the percpu-ida tags, and
      drop the now-unused global qla_tgt_cmd_cachep.
      
      Finally in tcm_qla2xxx code, tcm_qla2xxx_check_initiator_node_acl()
      has been updated to use transport_init_session_tags() along with a
      hardcoded TCM_QLA2XXX_DEFAULT_TAGS=2088 as the number of qla_tgt_cmd
      descriptors to pre-allocate per qla_tgt_sess instance.
      
      (Use ha->fw_xcb_count if available to calculate num_tags, and
       also factor in extra pad tags - Quinn)
      
      Cc: Saurav Kashyap <saurav.kashyap@qlogic.com>
      Cc: Quinn Tran <quinn.tran@qlogic.com>
      Cc: Giridhar Malavali <giridhar.malavali@qlogic.com>
      Cc: Chad Dupuis <chad.dupuis@qlogic.com>
      Cc: Roland Dreier <roland@kernel.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      51a07f84
  11. 03 6月, 2014 1 次提交
  12. 19 5月, 2014 2 次提交
    • Q
      qla2xxx: ABTS cause double free of qla_tgt_cmd +. · 7b898542
      Quinn Tran 提交于
      Fix double free problem within qla2xxx driver where
      current code prematurely free qla_tgt_cmd while firmware
      still has the command.  When firmware release the command
      after abort, the code attempt a second free as part of
      command completion processing.
      
      When TCM start the free process, NULL pointer was hit.
      
      ------
      WARNING: CPU: 8 PID: 43613 at lib/list_debug.c:62 __list_del_entry+0x82/0xd0()
      list_del corruption. next->prev should be ffff88082b5cfb08, but was 6b6b6b6b6b6b6b6b
      CPU: 8 PID: 43613 Comm: kworker/8:0 Tainted: GF       W  O 3.13.0-rc3-nab_t10dif+ #6
      Hardware name: HP ProLiant DL380p Gen8, BIOS P70 08/20/2012
      Workqueue: events cache_reap
      000000000000003e ffff88081b2e3c78 ffffffff815a051f 000000000000003e
      ffff88081b2e3cc8 ffff88081b2e3cb8 ffffffff8104fc2c 0000000000000000
      ffff88082b5cfb00 ffff88081c788d00 ffff88082b5d7200 ffff88082b5d3080
      Call Trace:
      [<ffffffff815a051f>] dump_stack+0x49/0x62
      [<ffffffff8104fc2c>] warn_slowpath_common+0x8c/0xc0
      [<ffffffff8104fd16>] warn_slowpath_fmt+0x46/0x50
      [<ffffffff812b6592>] __list_del_entry+0x82/0xd0
      [<ffffffff8106d48c>] process_one_work+0x12c/0x510
      [<ffffffff8106d4d3>] ? process_one_work+0x173/0x510
      [<ffffffff8106ebdf>] worker_thread+0x11f/0x3a0
      [<ffffffff8106eac0>] ? manage_workers+0x170/0x170
      [<ffffffff81074f26>] kthread+0xf6/0x120
      [<ffffffff8109f103>] ? __lock_release+0x133/0x1b0
      [<ffffffff81074e30>] ? __init_kthread_worker+0x70/0x70
      [<ffffffff815aec2c>] ret_from_fork+0x7c/0xb0
      [<ffffffff81074e30>] ? __init_kthread_worker+0x70/0x70
      ---[ end trace dfc05c3f7caf8ebe ]---
      BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
      IP: [<ffffffff8106d391>] process_one_work+0x31/0x510
      -------
      Signed-off-by: NQuinn Tran <quinn.tran@qlogic.com>
      Signed-off-by: NGiridhar Malavali <giridhar.malavali@qlogic.com>
      Signed-off-by: NSaurav Kashyap <saurav.kashyap@qlogic.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      7b898542
    • Q
      qla2xxx: T10-Dif: add T10-PI support · f83adb61
      Quinn Tran 提交于
      Add support for T10-Dif for Target Mode to qla driver.
      The driver will look for firmware attribute that support
      this feature.  When the feature is present, the capabilities
      will be report to TCM layer.
      
      Add CTIO CRC2 iocb to build T10-Dif commands.
      Add support routines to process good & error cases.
      Signed-off-by: NQuinn Tran <quinn.tran@qlogic.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NGiridhar Malavali <giridhar.malavali@qlogic.com>
      Signed-off-by: NSaurav Kashyap <saurav.kashyap@qlogic.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      f83adb61
  13. 25 2月, 2014 1 次提交
    • D
      qla2xxx: Fix kernel panic on selective retransmission request · 6f58c780
      Dr. Greg Wettstein 提交于
      A selective retransmission request (SRR) is a fibre-channel
      protocol control request which provides support for requesting
      retransmission of a data sequence in response to an issue such as
      frame loss or corruption.  These events are experienced
      infrequently in fibre-channel based networks which makes
      it difficult to test and assess codepaths which handle these
      events.
      
      We were fortunate enough, for some definition of fortunate, to
      have a metro-area single-mode SAN link which, at 10 GBPS
      sustained load levels, would consistently generate SRR's in
      a SCST based target implementation using our SCST/in-kernel
      Qlogic target interface driver.  In response to an SRR the
      in-kernel Qlogic target driver immediately panics resulting
      in a catastrophic storage failure for serviced initiators.
      
      The culprit was a debug statement in the qla_target.c file which
      does not verify that a pointer to the SCSI CDB is not null.
      The unchecked pointer dereference results in the kernel panic
      and resultant system failure.
      
      The other two references to the SCSI CDB by the SRR handling code
      use a ternary operator to verify a non-null pointer is being
      acted on.  This patch simply adds a similar test to the implicated
      debug statement.
      
      This patch is a candidate for any stable kernel being maintained
      since it addresses a potentially catastrophic event with
      minimal downside.
      Signed-off-by: NDr. Greg Wettstein <greg@enjellic.com>
      Cc: <stable@vger.kernel.org> #3.5+
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      6f58c780
  14. 21 2月, 2014 1 次提交
    • N
      qla2xxx: Check + fail when npiv_vports_inuse exists in shutdown · 3c231bda
      Nicholas Bellinger 提交于
      This patch adds an check to qlt_stop_phase1() to avoid shutdown
      when the base_vha contains a non-zero fc_host->npiv_vports_inuse
      count.
      
      This includes holding qla_tgt_mutex in qlt_stop_phase1() between
      the fc_host->npiv_vports_inuse check + setting of tgt->tgt_stop to
      avoid a possible race between qlt_lport_register() -> tcm_qla2xxx
      -> tcm_qla2xxx_lport_register_npiv_cb() calling fc_vport_create().
      
      Cc: Sawan Chandak <sawan.chandak@qlogic.com>
      Cc: Quinn Tran <quinn.tran@qlogic.com>
      Cc: Saurav Kashyap <saurav.kashyap@qlogic.com>
      Cc: Giridhar Malavali <giridhar.malavali@qlogic.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      3c231bda