summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ocrdma (follow)
Commit message (Collapse)AuthorAgeFilesLines
* RDMA/ocrdma: Fix several stack info leaksDan Carpenter2013-07-301-1/+4
| | | | | | | | | A grab bag of places which don't properly initialize stack data. I removed one place which cleared ".rsvd" because it's not needed now that I have added a memset() earlier in the function. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
* RDMA/ocrdma: Remove unused includeRoland Dreier2013-07-261-1/+0
| | | | | | | I'd like to remove rdma/ib_cache.h some day, so let's avoid proliferating uses of it unnecessarily. Signed-off-by: Roland Dreier <roland@purestorage.com>
* RDMA/ocrdma: Fix error return code in ocrdma_set_create_qp_rq_cmd()Wei Yongjun2013-06-241-1/+1
| | | | | | | | Fix to return -ENOMEM in the alloc dma coherent error case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Roland Dreier <roland@purestorage.com>
* RDMA/ocrdma: Reorg structures to avoid paddingNaresh Gottumukkala2013-06-201-6/+8
| | | | | | | Reorg structures to better packing to avoid cacheline padding. Signed-off-by: Naresh Gottumukkala <bgottumukkala@emulex.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
* RDMA/ocrdma: Change macros to inline funtionsNaresh Gottumukkala2013-06-203-20/+40
| | | | | Signed-off-by: Naresh Gottumukkala <bgottumukkala@emulex.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
* RDMA/ocrdma: Set bad_wr in error caseNaresh Gottumukkala2013-06-201-0/+2
| | | | | | | Fix post_send to set the bad_wr in error case. Signed-off-by: Naresh Gottumukkala <bgottumukkala@emulex.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
* RDMA/ocrdma: Replace ocrdma_err with pr_errNaresh Gottumukkala2013-06-204-74/+70
| | | | | | | Remove private macro ocrdma_err and replace with standard pr_err. Signed-off-by: Naresh Gottumukkala <bgottumukkala@emulex.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
* RDMA/ocrdma: Use MCC_CREATE_EXT_V1 for MCC createNaresh Gottumukkala2013-06-202-44/+15
| | | | | | | Use MCC_CREATE_EXT_V1 to create MCC_queue to receive RoCE events. Signed-off-by: Naresh Gottumukkala <bgottumukkala@emulex.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
* RDMA/ocrdma: Remove use_cnt for queuesGottumukkala, Naresh2013-06-203-43/+1
| | | | | | | Remove use_cnt. Rely on IB midlayer to keep track of the use count. Signed-off-by: Naresh Gottumukkala <bgottumukkala@emulex.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
* IB/ocrdma: convert to idr_alloc()Tejun Heo2013-02-281-13/+1
| | | | | | | | | Convert to the much saner new idr interface. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Roland Dreier <roland@purestorage.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* RDMA/ocrdma: Fix CQE expansion of unsignaled WQEParav Pandit2012-09-141-4/+4
| | | | | | | | | Fix CQE expansion of unsignaled WQE -- don't expand the CQE when the WQE index of the completed CQE matches with last pending WQE (tail) in the queue. Signed-off-by: Parav Pandit <parav.pandit@emulex.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
* RDMA/ocrdma: Don't call vlan_dev_real_dev() for non-VLAN netdevsRoland Dreier2012-08-111-8/+8
| | | | | | | | If CONFIG_VLAN_8021Q is not set, then vlan_dev_real_dev() just goes BUG(), so we shouldn't call it unless we're actually dealing with a VLAN netdev. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
* RDMA/ocrdma: Fix check of GSI CQsRoland Dreier2012-07-271-1/+3
| | | | | | | | | | It looks like one check was accidentally duplicated, and the other 3 checks were left out. This was detected by scripts/coccinelle/tests/doubletest.cocci: drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:895:6-54: duplicated argument to && or || Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
*-. Merge branches 'cma', 'cxgb4', 'misc', 'mlx4-sriov', 'mlx-cleanups', ↵Roland Dreier2012-07-232-5/+4
|\ \ | | | | | | | | | 'ocrdma' and 'qib' into for-linus
| | * RDMA/ocrdma: Fix assignment of max_srq_sge in device queryRoland Dreier2012-07-081-1/+1
| |/ |/| | | | | | | | | | | | | We want to set attr->max_srq_sge to dev->attr.max_srq_sge, not to itself. This was detected by Coverity (CID 709210). Signed-off-by: Roland Dreier <roland@purestorage.com>
| * IB: Use IS_ENABLED(CONFIG_IPV6)Roland Dreier2012-07-091-4/+3
|/ | | | | | Instead of testing defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) Signed-off-by: Roland Dreier <roland@purestorage.com>
* RDMA/ocrdma: Fix off by one in ocrdma_query_gid()Dan Carpenter2012-06-141-1/+1
| | | | | | | | The dev->sgid_tbl[] array is allocated in ocrdma_alloc_resources(). It has OCRDMA_MAX_SGID elements so the test here is off by one. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
* RDMA/ocrdma: Fixed RQ error CQE pollingParav Pandit2012-06-111-1/+3
| | | | | | | | Fix RQ/SRQ error CQE polling. Return error CQE to consumer for error case which was not returned previously. Signed-off-by: Parav Pandit <parav.pandit@emulex.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
* RDMA/ocrdma: Correct queue SGE calculationMahesh Vardhamanaiah2012-06-114-3/+10
| | | | | | | Fix max sge calculation for sq, rq, srq for all hardware types. Signed-off-by: Mahesh Vardhamanaiah <mahesh.vardhamanaiah@emulex.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
* RDMA/ocrdma: Correct reported max queue sizesMahesh Vardhamanaiah2012-06-112-11/+6
| | | | | | | Fix code to read the max wqe and max rqe values from mailbox response. Signed-off-by: Mahesh Vardhamanaiah <mahesh.vardhamanaiah@emulex.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
* RDMA/ocrdma: Fixed GID table for vlan and eventsParav Pandit2012-06-111-29/+34
| | | | | | | | | 1. Fix reporting GID table addition events. 2. Enable vlan based GID entries only when VLAN is enabled at compile time (test CONFIG_VLAN_8021Q / CONFIG_VLAN_8021Q_MODULE). Signed-off-by: Parav Pandit <parav.pandit@emulex.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
* RDMA/ocrdma: Remove unnecessary version.h includesDevendra Naga2012-05-292-2/+0
| | | | | | | | | | "make versioncheck" shows: drivers/infiniband/hw/ocrdma/ocrdma_main.c: 29 linux/version.h not needed. drivers/infiniband/hw/ocrdma/ocrdma_verbs.h: 31 linux/version.h not needed. Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
* RDMA/ocrdma: Fix signaled event for SRQ_LIMIT_REACHEDParav Pandit2012-05-291-1/+1
| | | | | Signed-off-by: Parav Pandit <parav.pandit@emulex.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
* RDMA/ocrdma: Correct queue free count mathParav Pandit2012-05-294-17/+1
| | | | | | | | Correct queue free count math for SQ, RQ for all hardware type. Update user-kernel ABI interface. Signed-off-by: Parav Pandit <parav.pandit@emulex.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
* RDMA/ocrdma: Fix build with IPV6=nRoland Dreier2012-05-082-9/+22
| | | | | | | | | | | | | | | When IPV6 is not enabled: ERROR: "register_inet6addr_notifier" [drivers/infiniband/hw/ocrdma/ocrdma.ko] undefined! ERROR: "unregister_inet6addr_notifier" [drivers/infiniband/hw/ocrdma/ocrdma.ko] undefined! Fix this by wrapping the inet6 calls in #ifdef IPV6. Also make the ocrdma module depend on (IPV6 || IPV6=n) to forbid the case of modular ipv6 but built-in ocrdma (which can't work, because ocrdma calls ipv6 functions). Reported-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Roland Dreier <roland@purestorage.com>
* RDMA/ocrdma: Tiny locking cleanupDan Carpenter2012-05-081-5/+5
| | | | | | | | | | We only need to disable the IRQs one time. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> [ Rename "wq_flags" to more conventional "flags." - Roland ] Signed-off-by: Roland Dreier <roland@purestorage.com>
* RDMA/ocrdma: Fix check for NULL instead of IS_ERRDan Carpenter2012-05-081-2/+2
| | | | | | | | The ocrdma_alloc_lkey() function never returns NULL pointers -- it returns ERR_PTRs. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
* RDMA/ocrdma: Don't sleep in atomic notifier handlerSasha Levin2012-05-082-16/+23
| | | | | | | | | | | | | | | | | Events sent to ocrdma_inet6addr_event() are sent from an atomic context, therefore we can't try to lock a mutex within the notifier callback. We could just switch the mutex to a spinlock since all it does it protect a list, but I've gone ahead and switched the list to use RCU instead. I couldn't fully test it since I don't have IB hardware, so if it doesn't fully work for some reason let me know and I'll switch it back to using a spinlock. Signed-off-by: Sasha Levin <levinsasha928@gmail.com> [ Fixed locking in ocrdma_add(). - Roland ] Signed-off-by: Roland Dreier <roland@purestorage.com>
* RDMA/ocrdma: Remove write-only variablesRoland Dreier2012-05-082-10/+2
| | | | Signed-off-by: Roland Dreier <roland@purestorage.com>
* RDMA/ocrdma: Set event's device member in ocrdma_dispatch_ibevent()Roland Dreier2012-05-081-1/+3
| | | | | | | | | | | | | | We need to set ib_evt.device, or else ib_dispatch_event() will crash when we call it for unaffiliated events (and consumers may get confused in their QP/CQ/SRQ event handler for affiliated events). Also fix sparse warning: drivers/infiniband/hw/ocrdma/ocrdma_hw.c:678:36: warning: Using plain integer as NULL pointer There's no need to clear ib_evt, since every member is initialized. Signed-off-by: Roland Dreier <roland@purestorage.com>
* RDMA/ocrdma: Make needlessly global functions/structs staticRoland Dreier2012-05-082-9/+9
| | | | Signed-off-by: Roland Dreier <roland@purestorage.com>
* RDMA/ocrdma: Fix warnings about uninitialized variablesRoland Dreier2012-05-082-3/+4
| | | | | | | | | | | | | | | | | | | | | | First, fix drivers/infiniband/hw/ocrdma/ocrdma_verbs.c: In function 'ocrdma_alloc_pd': drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:371:17: warning: 'dpp_page_addr' may be used uninitialized in this function [-Wuninitialized] drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:337:6: note: 'dpp_page_addr' was declared here which seems that it may border on a bug (the call to ocrdma_del_mmap() might conceivably do bad things if pd->dpp_enabled is not set and dpp_page_addr ends up with just the wrong value). Also take care of: drivers/infiniband/hw/ocrdma/ocrdma_hw.c: In function 'ocrdma_init_hw': drivers/infiniband/hw/ocrdma/ocrdma_hw.c:2587:5: warning: 'status' may be used uninitialized in this function [-Wuninitialized] drivers/infiniband/hw/ocrdma/ocrdma_hw.c:2549:17: note: 'status' was declared here which is only real if num_eq == 0, which should be impossible. Signed-off-by: Roland Dreier <roland@purestorage.com>
* RDMA/ocrdma: Add driver for Emulex OneConnect IBoE RDMA adapterParav Pandit2012-05-0812-0/+8391
Signed-off-by: Parav Pandit <parav.pandit@emulex.com> Signed-off-by: Roland Dreier <roland@purestorage.com>