1. 07 3月, 2007 8 次提交
  2. 02 3月, 2007 2 次提交
    • R
      IB/mthca: Fix error path in mthca_alloc_memfree() · 88171cfe
      Roland Dreier 提交于
      The garbled logic in mthca_alloc_memfree() causes it to return 0, even
      if it fails to allocate all doorbell records.  Fix it to return -ENOMEM
      when it fails.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      88171cfe
    • H
      IB/ehca: Fix sync between completion handler and destroy cq · 31726798
      Hoang-Nam Nguyen 提交于
      This patch fixes two issues reported by Roland Dreier and Christoph Hellwig:
      
      - Mismatched sync/locking between completion handler and destroy cq We
        introduced a counter nr_events per cq to track number of irq events
        seen. This counter is incremented when an event queue entry is seen
        and decremented after completion handler has been called regardless
        if scaling code is active or not. Note that nr_callbacks tracks
        number of events assigned to a cpu and both counters can potentially
        diverge.
      
        The sync between running completion handler and destroy cq is done
        by using the global spin lock ehca_cq_idr_lock.
      
      - Replace yield by wait_event on the counter above to become zero.
      Signed-off-by: NHoang-Nam Nguyen <hnguyen@de.ibm.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      31726798
  3. 24 2月, 2007 2 次提交
  4. 21 2月, 2007 1 次提交
  5. 18 2月, 2007 1 次提交
  6. 17 2月, 2007 9 次提交
  7. 15 2月, 2007 1 次提交
  8. 13 2月, 2007 7 次提交
  9. 12 2月, 2007 1 次提交
  10. 11 2月, 2007 3 次提交
    • A
      IB/ehca: Fix memleak on module unloading · 65e5c026
      Akinobu Mita 提交于
      Percpu data is not freed on module unloading.
      
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Christoph Raisch <raisch@de.ibm.com>
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Acked-by: NHoang-Nam Nguyen <hnguyen@de.ibm.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      65e5c026
    • D
      IB/mthca: Work around gcc bug on sparc64 · 6bdd61d8
      David Howells 提交于
      For some reason gcc-3.4.5 on sparc64 does:
      
       WARNING: "____ilog2_NaN" [drivers/infiniband/hw/mthca/ib_mthca.ko] undefined!
      
      Points to note:
      
       (1) The asm volatile flush/flushw are just markers for viewing what comes out
           in the assembly; removing them has no effect on the result.
      
       (2) Changing almost anything else in dwh__mthca_arbel_init_srq_context() or
           dwh__mthca_alloc_srq() causes the problem to go away.
      
      The compiler command line issued by the kernel build is:
      
      /opt/crosstool/gcc-3.4.5-glibc-2.3.6/sparc64-unknown-linux-gnu/bin/sparc64-unknown-linux-gnu-gcc -fno-strict-aliasing -fno-common -Os -m64 -mno-fpu -mcpu=ultrasparc -mcmodel=medlow -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wa,--undeclared-regs -pg -fno-omit-frame-pointer -fno-optimize-sibling-calls -fasynchronous-unwind-tables -g  -c -o drivers/infiniband/hw/mthca/.tmp_mthca_srq.o drivers/infiniband/hw/mthca/mthca_srq.c
      
      This can be reduced to this whilst still retaining the problem:
      
      /opt/crosstool/gcc-3.4.5-glibc-2.3.6/sparc64-unknown-linux-gnu/bin/sparc64-unknown-linux-gnu-gcc -m64 -c -o drivers/infiniband/hw/mthca/mthca_srq.o drivers/infiniband/hw/mthca/mthca_srq.c -Os
      
      Removing -Os or changing it to -O or -O0 thru -O6 gets rid of the problem.
      
      This patch to the kernel code fixes the problem:
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      6bdd61d8
    • R
      IB/mthca: Use correct structure size in call to memset() · 99d4f22e
      Roland Dreier 提交于
      When clearing the ib_ah_attr parameter in to_ib_ah_attr(), use sizeof
      *ib_ah_attr instead of sizeof *path.
      
      Pointed out by Jack Morgenstein <jackm@mellanox.co.il>.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      99d4f22e
  11. 05 2月, 2007 3 次提交
    • H
      IB/ehca: Remove obsolete prototypes · b45bfcc1
      Hoang-Nam Nguyen 提交于
      Remove prototypes for functions that don't exist.
      Signed-off-by: NHoang-Nam Nguyen <hnguyen@de.ibm.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      b45bfcc1
    • H
      IB/ehca: Remove use of do_mmap() · 4c34bdf5
      Hoang-Nam Nguyen 提交于
      This patch removes do_mmap() from ehca:
       - Call remap_pfn_range() for hardware register block
       - Use vm_insert_page() to register memory allocated for completion
         queues and queue pairs
       - The actual mmap() call/trigger is now controlled by user space,
         ie. libehca
      Signed-off-by: NHoang-Nam Nguyen <hnguyen@de.ibm.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      4c34bdf5
    • M
      IB: Return qp pointer as part of ib_wc · 062dbb69
      Michael S. Tsirkin 提交于
      struct ib_wc currently only includes the local QP number: this matches
      the IB spec, but seems mostly useless. The following patch replaces
      this with the pointer to qp itself, and updates all low level drivers
      and all users.
      
      This has the following advantages:
      - Ability to get a per-qp context through wc->qp->qp_context
      - Existing drivers already have the qp pointer ready in poll cq, so
        this change actually saves a tiny bit (extra memory read) on data path
        (for ehca it would actually be expensive to find the QP pointer when
        polling a CQ, but ehca does not support SRQ so we can leave wc->qp as
        NULL for ehca)
      - Users that need the QP number can still get it through wc->qp->qp_num
      
      Use case:
      
      In IPoIB connected mode code, I have a common CQ shared by multiple
      QPs.  To track connection usage, I need a way to get at some per-QP
      context upon the completion, and I would like to avoid allocating
      context object per work request just to stick a QP pointer into it.
      With this code, I can just use wc->qp->qp_context.
      Signed-off-by: NMichael S. Tsirkin <mst@mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      062dbb69
  12. 23 1月, 2007 2 次提交