- 10 12月, 2009 2 次提交
-
-
由 Frank Zago 提交于
On error, set bad_wr in nes_post_recv(). Stop processing ib_wr queue when an error is detected. Signed-off-by: NFrank Zago <fzago@systemfabricworks.com> Signed-off-by: NChien Tung <chien.tin.tung@intel.com> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
由 Frank Zago 提交于
On error, set bad_wr in nes_post_send(). Stop processing ib_wr queue when an error is detected. Signed-off-by: NFrank Zago <fzago@systemfabricworks.com> Signed-off-by: NChien Tung <chien.tin.tung@intel.com> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
- 06 9月, 2009 5 次提交
-
-
由 Chien Tung 提交于
Old query_port code reports static MTU and link state values. Instead, map actual MTU to next largest IB_MTU_* constant and correctly report link state. Cc: Steve Wise <swise@opengridcomputing.com> Reported-by: NJeff Squyres <jsquyres@cisco.com> Signed-off-by: NChien Tung <chien.tin.tung@intel.com> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
由 Don Wood 提交于
Use the flush status to fill in cqe status when a specific error has been identified. Subsequent flushed completions still use the flushed value. Signed-off-by: NDon Wood <donald.e.wood@intel.com> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
由 Don Wood 提交于
When a flush request is given to the hw, it will place one cqe marked as flushed (unless there is nothing to flush). An application that is waiting for all wqe's to complete will be left hanging. This modifies poll_cq to return the correct number of flushes for the pending elements on the wq. Signed-off-by: NDon Wood <donald.e.wood@intel.com> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
由 Don Wood 提交于
Implement the sending and receiving of Terminate packets. Signed-off-by: NDon Wood <donald.e.wood@intel.com> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
由 Don Wood 提交于
When a QP is destroyed, unprocessed CQ entries could still reference the QP. This change zeroes the context value at QP destroy time. By skipping over cqe's with a zero context, poll_cq no longer processes a cqe for a destroyed QP. Signed-off-by: NDon Wood <donald.e.wood@intel.com> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
- 23 6月, 2009 1 次提交
-
-
由 Faisal Latif 提交于
In nes_query_device(), max_qp_init_rd_atom is incorrectly set to max_qp_wr. This was found when a test application had a dapl async event error. Signed-off-by: NFaisal Latif <faisal.latif@intel.com> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
- 28 4月, 2009 1 次提交
-
-
由 Chien Tung 提交于
/sys/class/infiniband/nes?/fw_ver is not displaying firmware version properly (it shows 0.0.0 with the current code). Fill in the correct firmware version number. Signed-off-by: NChien Tung <chien.tin.tung@intel.com> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
- 22 4月, 2009 2 次提交
-
-
由 Miroslaw Walukiewicz 提交于
In error paths where a CQ is not created, pbl is not freeed properly. In nes_destroy_cq(), add the corresponding check for nescq->mcrqf to not call nes_free_resource() when it is already done in nes_create_cq(). Signed-off-by: NMiroslaw Walukiewicz <miroslaw.walukiewicz@intel.com> Signed-off-by: NChien Tung <chien.tin.tung@intel.com> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
由 Matt Kraai 提交于
Signed-off-by: NMatt Kraai <kraai@ftbfs.org> Acked-by: NChien Tung <chien.tin.tung@intel.com> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
- 21 4月, 2009 2 次提交
-
-
由 Don Wood 提交于
The code incorrectly failed memory registration if the buffer was not page aligned. Also, the length field is mangled causing the hardware to think the registration is much larger than it really is. The fix is to remove the page alignment restriction as well the incorrect length adjustment. Also make sure that all buffers after the first start at a page boundary, and all buffers except the last end on a page boundary. Signed-off-by: NDon Wood <donald.e.wood@intel.com> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
由 Chien Tung 提交于
Initialize pbl_count_256 to 0 to get rid of the warning: drivers/infiniband/hw/nes/nes_verbs.c: In function 'nes_reg_mr': drivers/infiniband/hw/nes/nes_verbs.c:1955: warning: 'pbl_count_256' may be used uninitialized in this function Reported-by: NRoland Dreier <rdreier@cisco.com> Signed-off-by: NChien Tung <chien.tin.tung@intel.com> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
- 13 3月, 2009 1 次提交
-
-
由 Faisal Latif 提交于
STag zero is a special STag that allows consumers to access any bus address without registering memory. The nes driver unfortunately allows STag zero to be used even with QPs created by unprivileged userspace consumers, which means that any process with direct verbs access to the nes device can read and write any memory accessible to the underlying PCI device (usually any memory in the system). Such access is usually given for cluster software such as MPI to use, so this is a local privilege escalation bug on most systems running this driver. The driver was using STag zero to receive the last streaming mode data; to allow STag zero to be disabled for unprivileged QPs, the driver now registers a special MR for this data. Cc: <stable@kernel.org> Signed-off-by: NFaisal Latif <faisal.latif@intel.com> Signed-off-by: NRoland Dreier <rolandd@cisco.com> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 07 3月, 2009 3 次提交
-
-
由 Don Wood 提交于
Two level 256 byte PBLs was not implemented so the driver could report out of memory when in fact there were PBLs still available. This solution prefers to use 4KB PBLs over two level 256B PBLs until the number of 4KB PBLs falls below a threshold. At this point the 4KB PBL structure is converted to use 256B PBLs which prevents the driver from running out of 4KB PBLs too quickly. Signed-off-by: NDon Wood <donald.e.wood@intel.com> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
由 Chien Tung 提交于
Update copyright to the new legal entity, Intel-NE, Inc., an Intel company. Update copyright for the new year. Signed-off-by: NChien Tung <chien.tin.tung@intel.com> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
由 Don Wood 提交于
Fix occurrences where the software PBL counts were changed before the hardware was updated. This bug allowed another thread to overallocate the hardware resources. Add proper PBL accounting in case nes_reg_mr() fails. Signed-off-by: NDon Wood <donald.e.wood@intel.com> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
- 06 12月, 2008 1 次提交
-
-
由 Faisal Latif 提交于
Use nes_free_cqp_request() instead of open coding. Change some continue to break in nes_cm_timer_tick, because send_entry used to be a list processed in a loop (so continue went to the next item). Now it is a single item, so using break is correct. Signed-off-by: NFaisal Latif <faisal.latif@intel.com> Signed-off-by: NChien Tung <chien.tin.tung@intel.com> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
- 03 11月, 2008 3 次提交
-
-
由 Vadim Makhervaks 提交于
Fix CQ allocation for multicast receive queue applications. Before this patch, the CQ was not lined up with the right NIC. Signed-off-by: NVadim Makhervaks <vadim.makhervaks@intel.com> Signed-off-by: NChien Tung <chien.tin.tung@intel.com> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
由 Chien Tung 提交于
* Roll back allocated structures on failures. * Use GFP_ATOMIC instead of GFP_KERNEL since we are holding a lock. * Acquire nesadapter->pbl_lock when modifying PBL counters. * Decrement PBL counters on deallocation. Signed-off-by: NChien Tung <chien.tin.tung@intel.com> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
由 Ilpo Järvinen 提交于
Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
- 21 9月, 2008 1 次提交
-
-
由 Julia Lawall 提交于
A break after a return serves no purpose, remove it. Signed-off-by: NJulia Lawall <julia@diku.dk> Reviewed-by: NRichard Genoud <richard.genoud@gmail.com> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
- 25 7月, 2008 1 次提交
-
-
由 Faisal Latif 提交于
Major rework of CM connection setup/teardown. We had a number of issues with MPI applications not starting/terminating properly over time. With these changes we were able to run longer on larger clusters. * Remove memory allocation from nes_connect() and nes_cm_connect(). * Fix mini_cm_dec_refcnt_listen() when destroying listener. * Remove unnecessary code from schedule_nes_timer() and nes_cm_timer_tick(). * Functionalize mini_cm_recv_pkt() and process_packet(). * Clean up cm_node->ref_count usage. * Reuse skbs if available. Signed-off-by: NFaisal Latif <flatif@neteffect.com> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
- 15 7月, 2008 2 次提交
-
-
由 Roland Dreier 提交于
Every caller of nes_post_cqp_request() passed it NES_CQP_REQUEST_RING_DOORBELL, so just remove that parameter and always ring the doorbell. Signed-off-by: NRoland Dreier <rolandd@cisco.com> Acked-by: NFaisal Latif <flatif@neteffect.com>
-
由 Roland Dreier 提交于
The iw_nes driver repeats the logic if (atomic_dec_and_test(&cqp_request->refcount)) { if (cqp_request->dynamic) { kfree(cqp_request); } else { spin_lock_irqsave(&nesdev->cqp.lock, flags); list_add_tail(&cqp_request->list, &nesdev->cqp_avail_reqs); spin_unlock_irqrestore(&nesdev->cqp.lock, flags); } } over and over. Wrap this up in functions nes_free_cqp_request() and nes_put_cqp_request() to simplify such code. In addition to making the source smaller and more readable, this shrinks the compiled code quite a bit: add/remove: 2/0 grow/shrink: 0/13 up/down: 164/-1692 (-1528) function old new delta nes_free_cqp_request - 147 +147 nes_put_cqp_request - 17 +17 nes_modify_qp 2316 2293 -23 nes_hw_modify_qp 737 657 -80 nes_dereg_mr 945 860 -85 flush_wqes 501 416 -85 nes_manage_apbvt 648 560 -88 nes_reg_mr 1117 1026 -91 nes_cqp_ce_handler 927 769 -158 nes_alloc_mw 1052 884 -168 nes_create_qp 5314 5141 -173 nes_alloc_fmr 2212 2035 -177 nes_destroy_cq 1097 918 -179 nes_create_cq 2787 2598 -189 nes_dealloc_mw 762 566 -196 Signed-off-by: NRoland Dreier <rolandd@cisco.com> Acked-by: NFaisal Latif <flatif@neteffect.com>
-
- 11 6月, 2008 1 次提交
-
-
由 Roland Dreier 提交于
nes_reg_user_mr() should fail if page_count becomes >= 1024 * 512 rather than just testing for strict >, because page_count is essentially used as an index into an array with 1024 * 512 entries, so allowing the loop to continue with page_count == 1024 * 512 means that memory after the end of the array is corrupted. This leads to a crash triggerable by a userspace application that requests registration of a too-big region. Also get rid of the call to pci_free_consistent() here to avoid corrupting state with a double free, since the same memory will be freed in the code jumped to at reg_user_mr_err. Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
- 30 4月, 2008 1 次提交
-
-
由 Glenn Streiff 提交于
Various cleanups: - Change // to /* .. */ - Place whitespace around binary operators. - Trim down a few long lines. - Some minor alignment formatting for better readability. - Remove some silly tabs. Signed-off-by: NGlenn Streiff <gstreiff@neteffect.com> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
- 29 4月, 2008 1 次提交
-
-
由 Arthur Kepner 提交于
Add a new parameter, dmasync, to the ib_umem_get() prototype. Use dmasync = 1 when mapping user-allocated CQs with ib_umem_get(). Signed-off-by: NArthur Kepner <akepner@sgi.com> Cc: Tony Luck <tony.luck@intel.com> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Cc: Jes Sorensen <jes@sgi.com> Cc: Randy Dunlap <randy.dunlap@oracle.com> Cc: Roland Dreier <rdreier@cisco.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: David Miller <davem@davemloft.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Grant Grundler <grundler@parisc-linux.org> Cc: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 24 4月, 2008 1 次提交
-
-
由 Roland Dreier 提交于
Remove the volatile qualifier from the cq_vbase member of struct nes_hw_cq, and add an rmb() in the one place where it looks like access order might make a difference. As usual, removing a volatile qualifier in a declaration is actually a bug fix, since a volatile qualifier is not sufficient to make sure that aggressively out-of-order CPUs don't reorder things and cause incorrect results. For example, a CPU might speculatively execute reads of other cqe fields before the NIC hardware has written those fields and before it has set the NES_CQE_VALID bit (even though those reads come after the test of the NES_CQE_VALID bit in program order), but then when the CPU actually executes the conditional test of the NES_CQE_VALID, the bit has been set, and the CPU will proceed with the results of the earlier speculative execution and end up using bogus data. This also gets rid of the warning: drivers/infiniband/hw/nes/nes_verbs.c: In function 'nes_destroy_cq': drivers/infiniband/hw/nes/nes_verbs.c:1978: warning: passing argument 3 of 'pci_free_consistent' discards qualifiers from pointer target type Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
- 20 4月, 2008 1 次提交
-
-
由 Tony Jones 提交于
This converts the main ib_device to use struct device instead of struct class_device as class_device is going away. Signed-off-by: NTony Jones <tonyj@suse.de> Signed-off-by: NKay Sievers <kay.sievers@vrfy.org> Cc: Roland Dreier <rolandd@cisco.com> Cc: Sean Hefty <sean.hefty@intel.com> Cc: Hal Rosenstock <hal.rosenstock@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 17 4月, 2008 5 次提交
-
-
由 Eli Cohen 提交于
Add a create_flags member to struct ib_qp_init_attr that will allow a kernel verbs consumer to create a pass special flags when creating a QP. Add a flag value for telling low-level drivers that a QP will be used for IPoIB UD LSO. The create_flags member will also be useful for XRC and ehca low-latency QP support. Since no create_flags handling is implemented yet, add code to all low-level drivers to return -EINVAL if create_flags is non-zero. Signed-off-by: NEli Cohen <eli@mellanox.co.il> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
由 Harvey Harrison 提交于
__FUNCTION__ is gcc-specific, use __func__ instead. Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
由 Roland Dreier 提交于
Avoid namespace pollution and allow the compiler to optimize better. Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
由 Roland Dreier 提交于
On some platforms, eg sparc64, dma_addr_t is not the same size as a pointer, so printing dma_addr_t values by casting to void * and using a %p format generates warnings. Fix this by casting to unsigned long and using %lx instead. This fixes the warnings: drivers/infiniband/hw/nes/nes_verbs.c: In function 'nes_setup_virt_qp': drivers/infiniband/hw/nes/nes_verbs.c:1047: warning: cast to pointer from integer of different size drivers/infiniband/hw/nes/nes_verbs.c:1078: warning: cast to pointer from integer of different size drivers/infiniband/hw/nes/nes_verbs.c:1078: warning: cast to pointer from integer of different size drivers/infiniband/hw/nes/nes_verbs.c: In function 'nes_reg_user_mr': drivers/infiniband/hw/nes/nes_verbs.c:2657: warning: cast to pointer from integer of different size Reported by Andrew Morton <akpm@linux-foundation.org>. Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
由 Roland Dreier 提交于
nes_unregister_ofa_device() dereferences the nesibdev pointer before testing if it's NULL. Also, the test is doubly redundant because the only caller of nes_unregister_ofa_device() is nes_destroy_ofa_device(), which already tests if nesibdev is NULL. Remove the unnecessary test. This was spotted by the Coverity checker (CID 2190). Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
- 27 2月, 2008 1 次提交
-
-
由 Glenn Streiff 提交于
Just delete the debugging statement so we don't use cqp_request after freeing it. Adrian Bunk flagged this use-after-free issue spotted by the Coverity checker. Signed-off-by: NGlenn Streiff <gstreiff@neteffect.com> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
- 26 2月, 2008 2 次提交
-
-
由 Adrian Bunk 提交于
Fix an off-by-one spotted by the Coverity checker. Signed-off-by: NAdrian Bunk <bunk@kernel.org> Signed-off-by: NGlenn Streiff <gstreiff@neteffect.com> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
由 Chien Tung 提交于
Adrian Bunk pointed out that a Coverity scan found some apparently dead code in nes_verbs.c that really shouldn't have been dead. The function nes_create_cq() was missing the assignment err = 1; just prior to an iteration that conditionally set err = 0 if a PBL was found for a given virtual CQ. I also noticed we should have been returning -EFAULT on a couple related error paths. Signed-off-by: NChien Tung <ctung@neteffect.com> Signed-off-by: NGlenn Streiff <gstreiff@neteffect.com> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
- 19 2月, 2008 1 次提交
-
-
由 Roland Dreier 提交于
In nes_create_qp(), the test if (nesqp->mmap_sq_db_index > NES_MAX_USER_WQ_REGIONS) { is used to error out if the db_index is too large; however, if the test doesn't trigger, then the index is used as nes_ucontext->mmap_nesqp[nesqp->mmap_sq_db_index] = nesqp; and mmap_nesqp is declared as struct nes_qp *mmap_nesqp[NES_MAX_USER_WQ_REGIONS]; which leads to an array overrun if the index is exactly equal to NES_MAX_USER_WQ_REGIONS. Fix this by bailing out if the index is greater than or equal to NES_MAX_USER_WQ_REGIONS. This was spotted by the Coverity checker (CID 2162). Acked-by: NGlenn Streiff <gstreiff@neteffect.com> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-
- 05 2月, 2008 1 次提交
-
-
由 Glenn Streiff 提交于
Add a standard NIC and RDMA/iWARP driver for NetEffect 1/10Gb ethernet adapters. Signed-off-by: NGlenn Streiff <gstreiff@neteffect.com> Signed-off-by: NRoland Dreier <rolandd@cisco.com>
-