1. 13 2月, 2007 1 次提交
  2. 23 9月, 2006 2 次提交
  3. 10 5月, 2006 1 次提交
    • R
      IB/mthca: Fix race in reference counting · a3285aa4
      Roland Dreier 提交于
      Fix races in in destroying various objects.  If a destroy routine
      waits for an object to become free by doing
      
      	wait_event(&obj->wait, !atomic_read(&obj->refcount));
      	/* now clean up and destroy the object */
      
      and another place drops a reference to the object by doing
      
      	if (atomic_dec_and_test(&obj->refcount))
      		wake_up(&obj->wait);
      
      then this is susceptible to a race where the wait_event() and final
      freeing of the object occur between the atomic_dec_and_test() and the
      wake_up().  And this is a use-after-free, since wake_up() will be
      called on part of the already-freed object.
      
      Fix this in mthca by replacing the atomic_t refcounts with plain old
      integers protected by a spinlock.  This makes it possible to do the
      decrement of the reference count and the wake_up() so that it appears
      as a single atomic operation to the code waiting on the wait queue.
      
      While touching this code, also simplify mthca_cq_clean(): the CQ being
      cleaned cannot go away, because it still has a QP attached to it.  So
      there's no reason to be paranoid and look up the CQ by number; it's
      perfectly safe to use the pointer that the callers already have.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      a3285aa4
  4. 13 4月, 2006 1 次提交
    • J
      IB/mthca: Fix max_srq_sge returned by ib_query_device for Tavor devices · 59fef3b1
      Jack Morgenstein 提交于
      The driver allocates SRQ WQEs size with a power of 2 size both for
      Tavor and for memfree. For Tavor, however, the hardware only requires
      the WQE size to be a multiple of 16, not a power of 2, and the max
      number of scatter-gather allowed is reported accordingly by the
      firmware (and this is the value currently returned by
      ib_query_device() and ibv_query_device()).
      
      If the max number of scatter/gather entries reported by the FW is used
      when creating an SRQ, the creation will fail for Tavor, since the
      required WQE size will be increased to the next power of 2, which
      turns out to be larger than the device permitted max WQE size (which
      is not a power of 2).
      
      This patch reduces the reported SRQ max wqe size so that it can be used
      successfully in creating an SRQ on Tavor HCAs.
      Signed-off-by: NJack Morgenstein <jackm@mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      59fef3b1
  5. 11 4月, 2006 1 次提交
    • J
      IB: simplify static rate encoding · bf6a9e31
      Jack Morgenstein 提交于
      Push translation of static rate to HCA format into low-level drivers,
      where it belongs.  For static rate encoding, use encoding of rate
      field from IB standard PathRecord, with addition of value 0, for
      backwards compatibility with current usage.  The changes are:
      
       - Add enum ib_rate to midlayer includes.
       - Get rid of static rate translation in IPoIB; just use static rate
         directly from Path and MulticastGroup records.
       - Update mthca driver to translate absolute static rate into the
         format used by hardware.  This also fixes mthca's static rate
         handling for HCAs that are capable of 4X DDR.
      Signed-off-by: NJack Morgenstein <jackm@mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      bf6a9e31
  6. 03 4月, 2006 1 次提交
    • R
      IB/mthca: Always build debugging code unless CONFIG_EMBEDDED=y · 227c939b
      Roland Dreier 提交于
      Change the mthca debugging trace output code so that it can enabled
      and disabled at runtime with the debug_level module parameter in
      sysfs.  Also, don't allow CONFIG_INFINIBAND_MTHCA_DEBUG to be disabled
      unless CONFIG_EMBEDDED is selected.  We want users (and especially
      distros) to have this turned on unless they really need to save space,
      because by the time we want debugging output, it's usually too late to
      rebuild a kernel.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      227c939b
  7. 21 3月, 2006 7 次提交
  8. 14 2月, 2006 1 次提交
  9. 31 1月, 2006 1 次提交
  10. 13 1月, 2006 1 次提交
  11. 09 1月, 2006 1 次提交
  12. 11 11月, 2005 1 次提交
  13. 05 11月, 2005 1 次提交
  14. 29 10月, 2005 1 次提交
  15. 28 10月, 2005 1 次提交
    • R
      [IB] mthca: first pass at catastrophic error reporting · 3d155f8c
      Roland Dreier 提交于
      Add some initial support for detecting and reporting catastrophic
      errors reported by Mellanox HCAs.  We start a periodic timer which
      polls the catastrophic error reporting buffer in device memory.  If an
      error is detected, we dump the contents of the buffer for port-mortem
      debugging, and report a fatal asynchronous error to higher levels.
      
      In the future we can try to recover from these errors by resetting the
      device, but this will require some work in higher-level code as well.
      Let's get this in now, so that we at least get catastrophic errors
      reported in logs.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      3d155f8c
  16. 18 10月, 2005 3 次提交
  17. 27 8月, 2005 6 次提交
  18. 08 7月, 2005 3 次提交
  19. 28 6月, 2005 4 次提交
  20. 17 4月, 2005 2 次提交