1. 19 5月, 2012 6 次提交
  2. 16 5月, 2012 2 次提交
  3. 09 5月, 2012 1 次提交
  4. 25 4月, 2012 3 次提交
  5. 12 4月, 2012 1 次提交
    • R
      IB/srpt: Set srq_type to IB_SRQT_BASIC · 6f360336
      Roland Dreier 提交于
      Since commit 96104eda ("RDMA/core: Add SRQ type field"), kernel
      users of SRQs need to specify srq_type = IB_SRQT_BASIC in struct
      ib_srq_init_attr, or else most low-level drivers will fail in
      when srpt_add_one() calls ib_create_srq() and gets -ENOSYS.
      
      (mlx4_ib works OK nearly all of the time, because it just needs
      srq_type != IB_SRQT_XRC.  And apparently nearly everyone using
      ib_srpt is using mlx4 hardware)
      Reported-by: NAlexey Shvetsov <alexxy@gentoo.org>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      6f360336
  6. 03 4月, 2012 2 次提交
  7. 29 3月, 2012 1 次提交
  8. 20 3月, 2012 1 次提交
  9. 18 3月, 2012 1 次提交
    • N
      ib_srpt: Fix srpt_handle_cmd send_ioctx->ioctx_kref leak on exception · 187e70a5
      Nicholas Bellinger 提交于
      This patch addresses a bug in srpt_handle_cmd() failure handling where
      send_ioctx->kref is being leaked with the local extra reference after init,
      causing the expected kref_put() in srpt_handle_send_comp() to not be the final
      call to invoke srpt_put_send_ioctx_kref() -> transport_generic_free_cmd() and
      perform se_cmd descriptor memory release.
      
      It also fixes a SCF_SCSI_RESERVATION_CONFLICT handling bug where this code
      is incorrectly falling through to transport_handle_cdb_direct() after
      invoking srpt_queue_status() to send SAM_STAT_RESERVATION_CONFLICT status.
      
      Note this patch is for >= v3.3 mainline code, and current lio-core.git
      code has already been converted to target_submit_cmd() + se_cmd->cmd_kref usage,
      and internal ioctx->kref usage has been removed.  I'm including this patch
      now into target-pending/for-next with a CC' for v3.3 stable.
      
      Cc: Bart Van Assche <bvanassche@acm.org>
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      187e70a5
  10. 13 3月, 2012 2 次提交
  11. 11 3月, 2012 1 次提交
  12. 09 3月, 2012 1 次提交
    • O
      IB: Change CQE "csum_ok" field to a bit flag · d927d505
      Or Gerlitz 提交于
      Use a bit in wc_flags rather then a whole integer to hold the
      "checksum OK" flag.  By itself, this change doesn't reduce the size of
      struct ib_wc on 64bit machines -- it stays on 56 bytes because of
      padding.  However, it will allow to add more fields in the future
      without enlarging the struct.  Also, it will let us have a unified
      approach with future libibverbs checksum offload reporting, because a
      bit flag doesn't break the library ABI.
      
      This patch was suggested during conversation with Liran Liss
      <liranl@mellanox.com>.
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Reviewed-by: NSean Hefty <sean.hefty@intel.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      d927d505
  13. 08 3月, 2012 2 次提交
  14. 07 3月, 2012 1 次提交
    • O
      mlx4_core: Get rid of redundant ext_port_cap flags · 8154c07f
      Or Gerlitz 提交于
      While doing the work for commit a6f7feae ("IB/mlx4: pass SMP
      vendor-specific attribute MADs to firmware") we realized that the
      firmware would respond on all sorts of vendor-specific MADs.
      Therefore commit 97285b78 ("mlx4_core: Add extended port
      capabilities support") adds redundant code into the driver, since
      there's no real reaon to maintain the extended capabilities of the
      port, as they can be queried on demand (e.g the FDR10 capability).
      
      This patch reverts commit 97285b78 and removes the check for
      extended caps from the mlx4_ib driver port query flow.
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      8154c07f
  15. 06 3月, 2012 4 次提交
    • H
      RDMA/ucma: Fix AB-BA deadlock · 186834b5
      Hefty, Sean 提交于
      When we destroy a cm_id, we must purge associated events from the
      event queue.  If the cm_id is for a listen request, we also purge
      corresponding pending connect requests.  This requires destroying
      the cm_id's associated with the connect requests by calling
      rdma_destroy_id().  rdma_destroy_id() blocks until all outstanding
      callbacks have completed.
      
      The issue is that we hold file->mut while purging events from the
      event queue.  We also acquire file->mut in our event handler.  Calling
      rdma_destroy_id() while holding file->mut can lead to a deadlock,
      since the event handler callback cannot acquire file->mut, which
      prevents rdma_destroy_id() from completing.
      
      Fix this by moving events to purge from the event queue to a temporary
      list.  We can then release file->mut and call rdma_destroy_id()
      outside of holding any locks.
      
      Bug report by Or Gerlitz <ogerlitz@mellanox.com>:
      
          [ INFO: possible circular locking dependency detected ]
          3.3.0-rc5-00008-g79f1e43-dirty #34 Tainted: G          I
      
          tgtd/9018 is trying to acquire lock:
           (&id_priv->handler_mutex){+.+.+.}, at: [<ffffffffa0359a41>] rdma_destroy_id+0x33/0x1f0 [rdma_cm]
      
          but task is already holding lock:
           (&file->mut){+.+.+.}, at: [<ffffffffa02470fe>] ucma_free_ctx+0xb6/0x196 [rdma_ucm]
      
          which lock already depends on the new lock.
      
      
          the existing dependency chain (in reverse order) is:
      
          -> #1 (&file->mut){+.+.+.}:
                 [<ffffffff810682f3>] lock_acquire+0xf0/0x116
                 [<ffffffff8135f179>] mutex_lock_nested+0x64/0x2e6
                 [<ffffffffa0247636>] ucma_event_handler+0x148/0x1dc [rdma_ucm]
                 [<ffffffffa035a79a>] cma_ib_handler+0x1a7/0x1f7 [rdma_cm]
                 [<ffffffffa0333e88>] cm_process_work+0x32/0x119 [ib_cm]
                 [<ffffffffa03362ab>] cm_work_handler+0xfb8/0xfe5 [ib_cm]
                 [<ffffffff810423e2>] process_one_work+0x2bd/0x4a6
                 [<ffffffff810429e2>] worker_thread+0x1d6/0x350
                 [<ffffffff810462a6>] kthread+0x84/0x8c
                 [<ffffffff81369624>] kernel_thread_helper+0x4/0x10
      
          -> #0 (&id_priv->handler_mutex){+.+.+.}:
                 [<ffffffff81067b86>] __lock_acquire+0x10d5/0x1752
                 [<ffffffff810682f3>] lock_acquire+0xf0/0x116
                 [<ffffffff8135f179>] mutex_lock_nested+0x64/0x2e6
                 [<ffffffffa0359a41>] rdma_destroy_id+0x33/0x1f0 [rdma_cm]
                 [<ffffffffa024715f>] ucma_free_ctx+0x117/0x196 [rdma_ucm]
                 [<ffffffffa0247255>] ucma_close+0x77/0xb4 [rdma_ucm]
                 [<ffffffff810df6ef>] fput+0x117/0x1cf
                 [<ffffffff810dc76e>] filp_close+0x6d/0x78
                 [<ffffffff8102b667>] put_files_struct+0xbd/0x17d
                 [<ffffffff8102b76d>] exit_files+0x46/0x4e
                 [<ffffffff8102d057>] do_exit+0x299/0x75d
                 [<ffffffff8102d599>] do_group_exit+0x7e/0xa9
                 [<ffffffff8103ae4b>] get_signal_to_deliver+0x536/0x555
                 [<ffffffff81001717>] do_signal+0x39/0x634
                 [<ffffffff81001d39>] do_notify_resume+0x27/0x69
                 [<ffffffff81361c03>] retint_signal+0x46/0x83
      
          other info that might help us debug this:
      
           Possible unsafe locking scenario:
      
                 CPU0                    CPU1
                 ----                    ----
            lock(&file->mut);
                                         lock(&id_priv->handler_mutex);
                                         lock(&file->mut);
            lock(&id_priv->handler_mutex);
      
           *** DEADLOCK ***
      
          1 lock held by tgtd/9018:
           #0:  (&file->mut){+.+.+.}, at: [<ffffffffa02470fe>] ucma_free_ctx+0xb6/0x196 [rdma_ucm]
      
          stack backtrace:
          Pid: 9018, comm: tgtd Tainted: G          I  3.3.0-rc5-00008-g79f1e43-dirty #34
          Call Trace:
           [<ffffffff81029e9c>] ? console_unlock+0x18e/0x207
           [<ffffffff81066433>] print_circular_bug+0x28e/0x29f
           [<ffffffff81067b86>] __lock_acquire+0x10d5/0x1752
           [<ffffffff810682f3>] lock_acquire+0xf0/0x116
           [<ffffffffa0359a41>] ? rdma_destroy_id+0x33/0x1f0 [rdma_cm]
           [<ffffffff8135f179>] mutex_lock_nested+0x64/0x2e6
           [<ffffffffa0359a41>] ? rdma_destroy_id+0x33/0x1f0 [rdma_cm]
           [<ffffffff8106546d>] ? trace_hardirqs_on_caller+0x11e/0x155
           [<ffffffff810654b1>] ? trace_hardirqs_on+0xd/0xf
           [<ffffffffa0359a41>] rdma_destroy_id+0x33/0x1f0 [rdma_cm]
           [<ffffffffa024715f>] ucma_free_ctx+0x117/0x196 [rdma_ucm]
           [<ffffffffa0247255>] ucma_close+0x77/0xb4 [rdma_ucm]
           [<ffffffff810df6ef>] fput+0x117/0x1cf
           [<ffffffff810dc76e>] filp_close+0x6d/0x78
           [<ffffffff8102b667>] put_files_struct+0xbd/0x17d
           [<ffffffff8102b5cc>] ? put_files_struct+0x22/0x17d
           [<ffffffff8102b76d>] exit_files+0x46/0x4e
           [<ffffffff8102d057>] do_exit+0x299/0x75d
           [<ffffffff8102d599>] do_group_exit+0x7e/0xa9
           [<ffffffff8103ae4b>] get_signal_to_deliver+0x536/0x555
           [<ffffffff810654b1>] ? trace_hardirqs_on+0xd/0xf
           [<ffffffff81001717>] do_signal+0x39/0x634
           [<ffffffff8135e037>] ? printk+0x3c/0x45
           [<ffffffff8106546d>] ? trace_hardirqs_on_caller+0x11e/0x155
           [<ffffffff810654b1>] ? trace_hardirqs_on+0xd/0xf
           [<ffffffff81361803>] ? _raw_spin_unlock_irq+0x2b/0x40
           [<ffffffff81039011>] ? set_current_blocked+0x44/0x49
           [<ffffffff81361bce>] ? retint_signal+0x11/0x83
           [<ffffffff81001d39>] do_notify_resume+0x27/0x69
           [<ffffffff8118a1fe>] ? trace_hardirqs_on_thunk+0x3a/0x3f
           [<ffffffff81361c03>] retint_signal+0x46/0x83
      Signed-off-by: NSean Hefty <sean.hefty@intel.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      186834b5
    • K
      IB/ehca: Fix ilog2() compile failure · bd50f892
      Kyle McMartin 提交于
      I'm getting compile failures building this driver, which I narrowed
      down to the ilog2 call in ehca_get_max_hwpage_size...
      
          ERROR: ".____ilog2_NaN" [drivers/infiniband/hw/ehca/ib_ehca.ko]
          undefined!
          make[1]: *** [__modpost] Error 1
          make: *** [modules] Error 2
      
      The use of shca->hca_cap_mr_pgsize is confusing the compiler, and
      resulting in the __builtin_constant_p in ilog2 going insane.
      
      I tried making it take the u32 pgsize as an argument and the expansion
      of shca->_pgsize in the caller, but that failed as well.
      
      With this patch in place, the driver compiles on my GCC 4.6.2 here.
      Suggested-by: NRoland Dreier <roland@purestorage.com>
      Signed-off-by: NKyle McMartin <kmcmarti@redhat.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      bd50f892
    • O
      IB: Use central enum for speed instead of hard-coded values · 2e96691c
      Or Gerlitz 提交于
      The kernel IB stack uses one enumeration for IB speed, which wasn't
      explicitly specified in the verbs header file.  Add that enum, and use
      it all over the code.
      
      The IB speed/width notation is also used by iWARP and IBoE HW drivers,
      which use the convention of rate = speed * width to advertise their
      port link rate.
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      2e96691c
    • O
      IB/iser: Post initial receive buffers before sending the final login request · 89e984e2
      Or Gerlitz 提交于
      An iser target may send iscsi NO-OP PDUs as soon as it marks the iSER
      iSCSI session as fully operative.  This means that there is window
      where there are no posted receive buffers on the initiator side, so
      it's possible for the iSER RC connection to break because of RNR NAK /
      retry errors.  To fix this, rely on the flags bits in the login
      request to have FFP (0x3) in the lower nibble as a marker for the
      final login request, and post an initial chunk of receive buffers
      before sending that login request instead of after getting the login
      response.
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      89e984e2
  16. 05 3月, 2012 1 次提交
  17. 28 2月, 2012 3 次提交
  18. 27 2月, 2012 1 次提交
  19. 26 2月, 2012 6 次提交