aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
Commit message (Collapse)AuthorAge
* Merge branch 'for-linus' of ↵Linus Torvalds2006-01-08
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
| * IB: Set GIDs correctly in ib_create_ah_from_wc()Ralph Campbell2006-01-06
| | | | | | | | | | | | | | | | | | ib_create_ah_from_wc() doesn't create the correct return address (AH) when there is a GRH present (source & dest GIDs need to be swapped). Signed-off-by: Ralph Campbell <ralphc@pathscale.com> Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * IB/uverbs: Release event file reference on ib_uverbs_create_cq() errorJack Morgenstein2006-01-06
| | | | | | | | | | | | | | | | | | | | ib_uverbs_create_cq() should release the completion channel event file if an error occurs after it looks it up. Also, if userspace asks for a completion channel and we don't find it, an error should be returned instead of silently creating a CQ without a completion channel. Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * IB/uverbs: set ah_flags when creating address handleRalph Campbell2006-01-06
| | | | | | | | | | | | | | AH attribute's ah_flags need to be set according to the is_global flag passed in from userspace. Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * IB/uverbs: Fix reference counting on error pathsJack Morgenstein2006-01-06
| | | | | | | | | | | | | | | | | | If an operation fails after incrementing an object's reference count, then it should decrement the reference count on the error path. Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * IB/mthca: Add support for automatic path migration (APM)Dotan Barak2006-01-06
| | | | | | | | | | | | | | | | | | Add code to modify QP operation to handle setting alternate paths for connected QPs. Signed-off-by: Dotan Barak <dotanb@mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * IB/mthca: Fill in vendor_err field in completion with errorMichael S. Tsirkin2006-01-06
| | | | | | | | | | | | | | Fill vendor_err field in completion with error. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * IB/mthca: multiple fixes for multicast group handlingJack Morgenstein2006-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Multicast group management fixes: . Fix leak of mailbox memory in error handling on multicast group operations. . Free AMGM indices at detach and in attach error handling. . Fix amount to shift for aligning next_gid_index in mailbox: it starts at bit 6, not bit 5. . Allocate AMGM index after end of MGM table, in the range num_mgms to multicast table size - 1. Add some BUG_ON checks to catch cases where the index falls in the MGM hash area. . Initialize the list of QPs in a newly-allocated group from AMGM to 0 This is necessary since when a group is moved from AMGM to MGM (in the case where the MGM entry has been emptied of QPs), the AMGM entry is not reset to 0 (and we don't want an extra command to do that). Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * IB/mthca: fix for RTR-to-RTS transition in modify QPJack Morgenstein2006-01-06
| | | | | | | | | | | | | | PKEY_INDEX is not a legal parameter in the RTR->RTS transition. Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * IB/mthca: fix for SQEr-to-RTS transition in modify QPJack Morgenstein2006-01-06
| | | | | | | | | | | | | | | | | | Fixes to SQEr->RTS transition in modify_qp: 1. The flag IB_QP_ACCESS_FLAGS is optional for UC qps 2. The SQEr state is not supported for RC qps Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * IB/mthca: max_inline_data handling tweaksJack Morgenstein2006-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix a case where copying max_inline_data from a successful create_qp capabilities output to create_qp input could cause EINVAL error: mthca_set_qp_size must check max_inline_data directly against max_desc_sz; checking qp->sq.max_gs is wrong since max_inline_data depends on the qp type and does not involve max_sg. Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * IB/mthca: create_eq with size not a power of 2Michael S. Tsirkin2006-01-05
| | | | | | | | | | | | | | Fix mthca_create_eq for when the EQ size is not a power of 2. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * IB/mthca: check port validity in modify_qpJack Morgenstein2006-01-05
| | | | | | | | | | | | | | | | Modify_qp should check that the physical port number provided is a legal value. Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * IB/mthca: check return value in mthca_dev_lim callJack Morgenstein2006-01-05
| | | | | | | | | | | | | | | | Check error return on call to mthca_dev_lim for Tavor (as is done for memfree). Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * IB/mthca: fix WQE size calculation in create-srqJack Morgenstein2006-01-04
| | | | | | | | | | | | | | Thinko: 64 bytes is the minimum SRQ WQE size (not the maximum). Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * IB/mthca: Fix corner cases in max_rd_atomic value handling in modify QPJack Morgenstein2005-12-15
| | | | | | | | | | | | | | | | | | | | | | sae and sre bits should only be set when setting sra_max. Further, in the old code, if the caller specifies max_rd_atomic = 0, the sre and sae bits are still set, with the result that the QP ends up with max_rd_atomic = 1 in effect. Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * IB/mthca: Fix IB_QP_ACCESS_FLAGS handling.Jack Morgenstein2005-12-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch corrects some corner cases in managing the RAE/RRE bits in the mthca qp context. These bits need to be zero if the user requests max_dest_rd_atomic of zero. The bits need to be restored to the value implied by the qp access flags attribute in a previous (or the current) modify-qp command if the dest_rd_atomic variable is changed to non-zero. In the current implementation, the following scenario will not work: RESET-to-INIT set QP access flags to all disabled (zeroes) INIT-to-RTR set max_dest_rd_atomic=10, AND set qp_access_flags = IB_ACCESS_REMOTE_READ | IB_ACCESS_REMOTE_ATOMIC The current code will incorrectly take the access-flags value set in the RESET-to-INIT transition. We can simplify, and correct, this IB_QP_ACCESS_FLAGS handling: it is always safe to set qp access flags in the firmware command if either of IB_QP_MAX_DEST_RD_ATOMIC or IB_QP_ACCESS_FLAGS is set, so let's just set it to the correct value, always. Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * IB/mthca: Fix SRQ cleanup during QP destroyJack Morgenstein2005-12-15
| | | | | | | | | | | | | | | | When cleaning up a CQ for a QP attached to SRQ, need to free an SRQ WQE only if the CQE is a receive completion. Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * IB/mthca: Fix thinko in mthca_table_find()Michael S. Tsirkin2005-12-15
| | | | | | | | | | | | | | | | break only escapes from the innermost loop, and we want to escape both loops and return an answer. Noticed by Ishai Rabinovitch. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * IB/mthca: don't change driver's copy of attributes if modify QP failsJack Morgenstein2005-12-09
| | | | | | | | | | | | | | | | | | Only change the driver's copy of the QP attributes in modify QP after checking the modify QP command completed successfully. Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * IB/mthca: correct log2 calculationJack Morgenstein2005-12-09
| | | | | | | | | | | | | | | | | | Fix thinko in rd_atomic calculation: ffs(x) - 1 does not find the next power of 2 -- it should be fls(x - 1). Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * IB/mthca: check RDMA limitsJack Morgenstein2005-12-09
| | | | | | | | | | | | | | | | | | | | Add limit checking on rd_atomic and dest_rd_atomic attributes: especially for max_dest_rd_atomic, a value that is larger than HCA capability can cause RDB overflow and corruption of another QP. Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * IB/mthca: fix memory user DB table leakJack Morgenstein2005-12-09
| | | | | | | | | | | | | | | | | | Free the memory allocated in mthca_init_user_db_tab() when releasing the db_tab in mthca_cleanup_user_db_tab(). Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * IB/umad: fix memory leaksJack Morgenstein2005-12-09
| | | | | | | | | | | | | | | | | | Don't leak packet if it had a timeout, and don't leak timeout struct if queue_packet() fails. Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * IB/cm: avoid reusing local IDSean Hefty2005-11-30
| | | | | | | | | | | | | | | | | | | | Use an increasing local ID to avoid re-using identifiers while messages may still be outstanding on the old ID. Without this, a quick connect-disconnect-connect sequence can fail by matching messages for the new connection with the old connection. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * IB/cm: correct reported reject codeSean Hefty2005-11-30
| | | | | | | | | | | | | | | | Change reject code from TIMEOUT to CONSUMER_REJECT when destroying a cm_id in the process of connecting. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * IB/mthca: fix QP size limits for mem-free HCAsJack Morgenstein2005-11-30
| | | | | | | | | | | | | | | | | | | | | | | | Unlike tavor, the max work queue size is an exact power of 2 for arbel mode, despite what the documentation (of the QUERY_DEV_LIM firmware command) says. Without this patch, on Arbel, we can start with a QP of a valid size and get above the reported limit after rounding to the next power of two. Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [PATCH] fix more missing includesTim Schmielau2006-01-08
| | | | | | | | | | | | | | | | | | | | Include fixes for 2.6.14-git11. Should allow to remove sched.h from module.h on i386, x86_64, arm, ia64, ppc, ppc64, and s390. Probably more to come since I haven't yet checked the other archs. Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6Linus Torvalds2006-01-04
|\ \ | | | | | | | | | Trivial manual merge fixup for usb_find_interface clashes.
| * | [PATCH] driver core: replace "hotplug" by "uevent"Kay Sievers2006-01-04
| |/ | | | | | | | | | | | | | | | | Leave the overloaded "hotplug" word to susbsystems which are handling real devices. The driver core does not "plug" anything, it just exports the state to userspace and generates events. Signed-off-by: Kay Sievers <kay.sievers@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* / [INET_SOCK]: Move struct inet_sock & helper functions to net/inet_sock.hArnaldo Carvalho de Melo2006-01-03
|/ | | | | | | | | | | To help in reducing the number of include dependencies, several files were touched as they were getting needed headers indirectly for stuff they use. Thanks also to Alan Menegotto for pointing out that net/dccp/proto.c had linux/dccp.h include twice. Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* IB/uverbs: track multicast group membership for userspace QPsJack Morgenstein2005-11-29
| | | | | | | | | | uverbs needs to track which multicast groups is each qp attached to, in order to properly detach when cleanup is performed on device file close. Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: fix posting of send lists of length >= 255 on mem-free HCAsMichael S. Tsirkin2005-11-29
| | | | | | | | On mem-free HCAs, when posting a long list of send requests, a doorbell must be rung every 255 requests. Add code to handle this. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IPoIB: fix error handling in ipoib_openRoland Dreier2005-11-29
| | | | | | | If ipoib_ib_dev_up() fails after ipoib_ib_dev_open() is called, then ipoib_ib_dev_stop() needs to be called to clean up. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IPoIB: protect child list in ipoib_ib_dev_flushMichael S. Tsirkin2005-11-29
| | | | | | | race condition: ipoib_ib_dev_flush is accessing child list without locks. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IPoIB: don't zero members after we allocate with kzallocRoland Dreier2005-11-29
| | | | | | | ipoib_mcast_alloc() uses kzalloc(), so there's no need to zero out members of the mcast struct after it's allocated. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IPoIB: reinitialize mcast structs' completions for every queryMichael S. Tsirkin2005-11-29
| | | | | | | | Make sure mcast->done is initialized to uncompleted value before we submit a new query, so that it's safe to wait on. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IPoIB: always set path->query to NULL when query finishesRoland Dreier2005-11-29
| | | | | | | Always set path->query to NULL when the SA path record query completes, rather than only when we don't have an address handle. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IPoIB: reinitialize path struct's completion for every queryRoland Dreier2005-11-29
| | | | | | | | | | It's possible that IPoIB will issue multiple SA queries for the same path struct. Therefore the struct's completion needs to be initialized for each query rather than only once when the struct is allocated, or else we might not wait long enough for later queries to finish and free the path struct too soon. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/umad: fix RMPP handlingMichael S. Tsirkin2005-11-28
| | | | | | | | | | | ib_umad_write in user_mad.c is looking at rmpp_hdr field in MAD before checking that the MAD actually has the RMPP header. So for a MAD without RMPP header it looks like we are actually checking a bit inside M_Key, or something. Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: reset QP's last pointers when transitioning to reset stateMichael S. Tsirkin2005-11-28
| | | | | | | | last pointer is not updated when QP is modified to reset state. This causes data corruption if WQEs are already posted on the queue. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* [PATCH] drivers/infiniband/core/mad.c: fix use-after-release caseAdrian Bunk2005-11-27
| | | | | | | | The Coverity checker spotted this obvious use-after-release bug caused by a wrong order of the cleanups. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Merge branch 'for-linus' of ↵Linus Torvalds2005-11-18
|\ | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
| * IB/umad: make sure write()s have sufficient dataRoland Dreier2005-11-18
| | | | | | | | | | | | | | | | | | | | Make sure that userspace passes in enough data when sending a MAD. We always copy at least sizeof (struct ib_user_mad) + IB_MGMT_RMPP_HDR bytes from userspace, so anything less is definitely invalid. Also, if the length is less than this limit, it's possible for the second copy_from_user() to get a negative length and trigger a BUG(). Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * IB/mthca: Safer max_send_sge/max_recv_sge calculationMichael S. Tsirkin2005-11-18
| | | | | | | | | | | | | | | | | | Calculation of QP capabilities still isn't exactly right in mthca: max_send_sge/max_recv_sge fields returned in create_qp can exceed the handware supported limits. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * [IB] mthca: don't disable RDMA writes if no responder resourcesRoland Dreier2005-11-15
| | | | | | | | | | | | | | | | | | | | Responder resources are only required to handle RDMA reads and atomic operations, not RDMA writes. So the driver should allow RDMA writes even if responder resources are set to 0. This is especially important for the UC transport -- with the old code, it was impossible to enable RDMA writes for UC QPs. Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * [IB] srp: don't post receive if no send buf availableRoland Dreier2005-11-15
| | | | | | | | | | | | | | | | | | | | Have __srp_get_tx_iu() fail if the target port's request limit will not allow the initiator to post a send. This avoids continuing on and posting a receive, and then failing to post a corresponding send. If that happens, then the initiator will end up with an extra receive posted, and if this happens to much, the receive queue will overflow. Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * [IB] srp: increase max_lunsRoland Dreier2005-11-11
| | | | | | | | | | | | | | | | Increase SRP max_luns to 512 to match the kernel's default, since SRP storage targets can have lots of LUNs and the SRP initiator itself doesn't have any particular limit. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [PATCH] PCI: removed unneeded .owner field from struct pci_driverGreg Kroah-Hartman2005-11-10
|/ | | | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Merge branch 'for-linus' of ↵Linus Torvalds2005-11-10
|\ | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband