1. 21 3月, 2006 2 次提交
    • R
      IB/mthca: Get rid of might_sleep() annotations · 399d7921
      Roland Dreier 提交于
      The might_sleep() annotations in mthca are silly -- they all occur
      shortly before calls that will end up in core functions like kmalloc()
      that will print the same warning in an unsafe context anyway.  In
      fact, beyond cluttering the source, we're actually bloating text with
      CONFIG_DEBUG_SPINLOCK_SLEEP and/or CONFIG_PREEMPT_VOLUNTARY set.
      
      With both options set, getting rid of the might_sleep()s saves a lot:
      add/remove: 0/0 grow/shrink: 0/7 up/down: 0/-171 (-171)
      function                                     old     new   delta
      mthca_pd_alloc                               132     109     -23
      mthca_init_cq                                969     946     -23
      mthca_mr_alloc                               592     568     -24
      mthca_pd_free                                 67      42     -25
      mthca_free_mr                                219     194     -25
      mthca_free_cq                                570     545     -25
      mthca_fmr_alloc                              742     716     -26
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      399d7921
    • R
      IB/mthca: Make functions that never fail return void · d9b98b0f
      Roland Dreier 提交于
      The function mthca_free_err_wqe() can never fail, so get rid of its
      return value.  That means handle_error_cqe() doesn't have to check
      what mthca_free_err_wqe() returns, which means it can't fail either
      and doesn't have to return anything either.  All this results in
      simpler source code and a slight object code improvement:
      
      add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-10 (-10)
      function                                     old     new   delta
      mthca_free_err_wqe                            83      81      -2
      mthca_poll_cq                               1758    1750      -8
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      d9b98b0f
  2. 14 2月, 2006 1 次提交
  3. 11 2月, 2006 1 次提交
    • R
      IB/mthca: Don't print debugging info until we have all values · f295c79b
      Roland Dreier 提交于
      When debugging is enabled, the mthca_QUERY_DEV_LIM() firmware command
      function prints out some of the device limits that it queries.
      However the debugging prints happen before all of the fields are
      extracted from the firmware response, so some of the values that get
      printed are uninitialized junk.  Move the prints to the end of the
      function to fix this.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      f295c79b
  4. 31 1月, 2006 3 次提交
    • R
      IB/mthca: Semaphore to mutex conversions · fd9cfdd1
      Roland Dreier 提交于
      Convert semaphores to mutexes in mthca.  Leave firmware command
      interface poll_sem and event_sem as semaphores.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      fd9cfdd1
    • M
      IB/mthca: Don't cancel commands on a signal · e3aa31c5
      Michael S. Tsirkin 提交于
      We have run into the following problem: if a task receives a signal
      while in the process of e.g. destroying a resource (which could be
      because the relevant file was closed) mthca could bail out from trying
      to take a command interface semaphore without performing the
      appropriate command to tell hardware that the resource is being
      destroyed.
      
      As a result we see messages like
       ib_mthca 0000:04:00.0: HW2SW_CQ failed (-4)
      
      In this case, hardware could access the resource after the memory has
      been freed, possibly causing memory corruption.
      
      A simple solution is to replace down_interruptible() by down() in
      command interface activation.
      Signed-off-by: NMichael S. Tsirkin <mst@mellanox.co.il>
      [ It's also not safe to bail out on multicast table operations, since
        they may be invoked on the cleanup path too.  So use down() for
        mcg_table.sem too. ]
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      e3aa31c5
    • M
      IB/mthca: Relax UAR size check · cbd2981a
      Michael S. Tsirkin 提交于
      There are some cards around that have UAR (user access region) size
      different from 8 MB.  Relax our sanity check to make sure that the PCI
      BAR is big enough to access the UAR size reported by the device
      firmware instead.
      Signed-off-by: NMichael S. Tsirkin <mst@mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      cbd2981a
  5. 22 1月, 2006 1 次提交
  6. 13 1月, 2006 4 次提交
  7. 10 1月, 2006 5 次提交
  8. 09 1月, 2006 1 次提交
  9. 07 1月, 2006 6 次提交
  10. 06 1月, 2006 3 次提交
  11. 05 1月, 2006 1 次提交
  12. 16 12月, 2005 4 次提交
  13. 10 12月, 2005 4 次提交
  14. 01 12月, 2005 1 次提交
  15. 30 11月, 2005 1 次提交
  16. 29 11月, 2005 1 次提交
  17. 19 11月, 2005 1 次提交