1. 12 4月, 2014 1 次提交
    • S
      RDMA/cxgb4: SQ flush fix · b4e2901c
      Steve Wise 提交于
      There is a race when moving a QP from RTS->CLOSING where a SQ work
      request could be posted after the FW receives the RDMA_RI/FINI WR.
      The SQ work request will never get processed, and should be completed
      with FLUSHED status.  Function c4iw_flush_sq(), however was dropping
      the oldest SQ work request when in CLOSING or IDLE states, instead of
      completing the pending work request. If that oldest pending work
      request was actually complete and has a CQE in the CQ, then when that
      CQE is proceessed in poll_cq, we'll BUG_ON() due to the inconsistent
      SQ/CQ state.
      
      This is a very small timing hole and has only been hit once so far.
      
      The fix is two-fold:
      
      1) c4iw_flush_sq() MUST always flush all non-completed WRs with FLUSHED
         status regardless of the QP state.
      
      2) In c4iw_modify_rc_qp(), always set the "in error" bit on the queue
         before moving the state out of RTS.  This ensures that the state
         transition will not happen while another thread is in
         post_rc_send(), because set_state() and post_rc_send() both aquire
         the qp spinlock.  Also, once we transition the state out of RTS,
         subsequent calls to post_rc_send() will fail because the "in error"
         bit is set.  I don't think this fully closes the race where the FW
         can get a FINI followed a SQ work request being posted (because
         they are posted to differente EQs), but the #1 fix will handle the
         issue by flushing the SQ work request.
      Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      b4e2901c
  2. 25 3月, 2014 1 次提交
  3. 21 3月, 2014 3 次提交
  4. 14 8月, 2013 2 次提交
    • S
      RDMA/cxgb4: Fix accounting for unsignaled SQ WRs to deal with wrap · 27ca34f5
      Steve Wise 提交于
      When determining how many WRs are completed with a signaled CQE,
      correctly deal with queue wraps.
      Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NVipul Pandya <vipul@chelsio.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      27ca34f5
    • S
      RDMA/cxgb4: Fix QP flush logic · 1cf24dce
      Steve Wise 提交于
      This patch makes following fixes in QP flush logic:
      
      - correctly flushes unsignaled WRs followed by a signaled WR
      - supports for flushing a CQ bound to multiple QPs
      - resets cidx_flush if a active queue starts getting HW CQEs again
      - marks WQ in error when we leave RTS. This was only being done for
        user queues, but we need it for kernel queues too so that
        post_send/post_recv will start returning the appropriate error
        synchronously
      - eats unsignaled read resp CQEs. HW always inserts CQEs so we must
        silently discard them if the read work request was unsignaled.
      - handles QP flushes with pending SW CQEs. The flush and out of order
        completion logic has a bug where if out of order completions are
        flushed but not yet polled by the consumer and the qp is then
        flushed then we end up inserting duplicate completions.
      - c4iw_flush_sq() should only flush wrs that have not already been
        flushed.  Since we already track where in the SQ we've flushed via
        sq.cidx_flush, just start at that point and flush any remaining.
        This bug only caused a problem in the presence of unsignaled work
        requests.
      Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NVipul Pandya <vipul@chelsio.com>
      
      [ Fixed sparse warning due to htonl/ntohl confusion.  - Roland ]
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      1cf24dce
  5. 29 11月, 2011 1 次提交
  6. 01 11月, 2011 1 次提交
  7. 15 10月, 2011 1 次提交
  8. 18 6月, 2011 1 次提交
  9. 29 9月, 2010 2 次提交
  10. 28 9月, 2010 1 次提交
    • R
      RDMA/cxgb4: Fix warnings about casts to/from pointers of different sizes · c8e081a1
      Roland Dreier 提交于
      Fix:
      
        drivers/infiniband/hw/cxgb4/qp.c: In function ‘create_qp’:
        drivers/infiniband/hw/cxgb4/qp.c:147: warning: cast from pointer to integer of different size
        drivers/infiniband/hw/cxgb4/qp.c: In function ‘rdma_fini’:
        drivers/infiniband/hw/cxgb4/qp.c:988: warning: cast from pointer to integer of different size
        drivers/infiniband/hw/cxgb4/qp.c: In function ‘rdma_init’:
        drivers/infiniband/hw/cxgb4/qp.c:1063: warning: cast from pointer to integer of different size
        drivers/infiniband/hw/cxgb4/mem.c: In function ‘write_adapter_mem’:
        drivers/infiniband/hw/cxgb4/mem.c:74: warning: cast from pointer to integer of different size
        drivers/infiniband/hw/cxgb4/cq.c: In function ‘destroy_cq’:
        drivers/infiniband/hw/cxgb4/cq.c:58: warning: cast from pointer to integer of different size
        drivers/infiniband/hw/cxgb4/cq.c: In function ‘create_cq’:
        drivers/infiniband/hw/cxgb4/cq.c:135: warning: cast from pointer to integer of different size
        drivers/infiniband/hw/cxgb4/cm.c: In function ‘fw6_msg’:
        drivers/infiniband/hw/cxgb4/cm.c:2326: warning: cast to pointer from integer of different size
      
      by casting pointers to unsigned long instead of u64.
      Reported-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      c8e081a1
  11. 22 7月, 2010 1 次提交
  12. 07 7月, 2010 2 次提交
  13. 25 5月, 2010 2 次提交
  14. 22 4月, 2010 1 次提交