1. 24 Apr, 2007 4 commits
    • Sean Hefty's avatar
      IB/ucm: Simplify ib_ucm_event() · 9d41b7fd
      Sean Hefty authored
      Use wait_event_interruptible() instead of a more complicated
      open-coded equivalent.
      Signed-off-by: default avatarSean Hefty <sean.hefty@intel.com>
      9d41b7fd
    • Sean Hefty's avatar
      RDMA/ucma: Simplify ucma_get_event() · d92f7644
      Sean Hefty authored
      Use wait_event_interruptible() instead of a more complicated
      open-coded equivalent.
      Signed-off-by: default avatarSean Hefty <sean.hefty@intel.com>
      d92f7644
    • Roland Dreier's avatar
      IB/mthca: Simplify CQ cleaning in mthca_free_qp() · 30c00986
      Roland Dreier authored
      mthca_free_qp() already has local variables to hold the QP's send_cq
      and recv_cq, so we can slightly clean up the calls to mthca_cq_clean()
      by using those local variables instead of expressions like
      to_mcq(qp->ibqp.send_cq).
      
      Also, by cleaning the recv_cq first, we can avoid worrying about
      whether the QP is attached to an SRQ for the second call, because we
      would only clean send_cq if send_cq is not equal to recv_cq, and that
      means send_cq cannot have any receive completions from the QP being
      destroyed.
      
      All this work even improves the generated code a bit:
      
      add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-5 (-5)
      function                                     old     new   delta
      mthca_free_qp                                510     505      -5
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
      30c00986
    • Roland Dreier's avatar
      IB/mthca: Fix mthca_write_mtt() on HCAs with hidden memory · 532c3b58
      Roland Dreier authored
      Commit b2875d4c ("IB/mthca: Always fill MTTs from CPU") causes a crash
      in mthca_write_mtt() with non-memfree HCAs that have their memory
      hidden (that is, have only two PCI BARs instead of having a third BAR
      that allows access to the RAM attached to the HCA) on 64-bit
      architectures.  This is because the commit just before, c20e20ab
      ("IB/mthca: Merge MR and FMR space on 64-bit systems") makes
      dev->mr_table.fmr_mtt_buddy equal to &dev->mr_table.mtt_buddy and
      hence mthca_write_mtt() tries to write directly into the HCA's MTT
      table.  However, since that table is in the HCA's memory, this is
      impossible without the PCI BAR that gives access to that memory.
      
      This causes a crash because mthca_tavor_write_mtt_seg() basically
      tries to dereference some offset of a NULL pointer.  Fix this by
      adding a test of MTHCA_FLAG_FMR in mthca_write_mtt() so that we always
      use the WRITE_MTT firmware command rather than writing directly if
      FMRs are not enabled.
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
      532c3b58
  2. 19 Apr, 2007 36 commits