- 25 Oct, 2005 1 commit
-
-
Sean Hefty authored
The MAD layer was violating the DMA API by touching data buffers used for sends after the DMA mapping was done. This causes problems on non-cache-coherent architectures, because the device doing DMA won't see updates to the payload buffers that exist only in the CPU cache. Fix this by having all MAD consumers use ib_create_send_mad() to allocate their send buffers, and moving the DMA mapping into the MAD layer so it can be done just before calling send (and after any modifications of the send buffer by the MAD layer). Tested on a non-cache-coherent PowerPC 440SPe system. Signed-off-by:
Sean Hefty <sean.hefty@intel.com> Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
- 24 Oct, 2005 2 commits
-
-
Sean Hefty authored
Fix cm_init_qp_init_attr(), cm_init_qp_rtr_attr() and cm_init_qp_rts_attr() so that they correctly handle the differences between UC and RC QPs. This fixes problems with setting up UC QPs through the CM. Signed-off-by:
Sean Hefty <sean.hefty@intel.com> Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
Roland Dreier authored
Add idr_destroy() calls to the module_exit() functions of the four IB driver modules that use idrs, so we don't leak idr_layer_cache objects when these modules are unloaded. Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
- 23 Oct, 2005 1 commit
-
-
Roland Dreier authored
We should always re-arm an event queue's interrupt in mthca_tavor_interrupt() if the corresponding bit is set in the event cause register (ECR), even if we didn't find any entries in the EQ. If we don't, then there's a window where we miss an EQ entry and then get stuck because we don't get another EQ event. Signed-off-by:
Roland Dreier <rolandd@cisco.com> Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
- 22 Oct, 2005 1 commit
-
-
Roland Dreier authored
We should always re-arm an event queue's interrupt in mthca_tavor_interrupt() if the corresponding bit is set in the event cause register (ECR), even if we didn't find any entries in the EQ. If we don't, then there's a window where we miss an EQ entry and then get stuck because we don't get another EQ event. Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
- 20 Oct, 2005 3 commits
-
-
Roland Dreier authored
Use devt member of struct class_device so that we don't have to create our own "dev" file in sysfs. Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
Roland Dreier authored
Add spaces after "sizeof" operator to match the rest of file. Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
Roland Dreier authored
Add missing "break" in switch statement. Without the break, the CM ended up always falling through and setting every connection request to use RC transport, which meant that UC connections didn't work. Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
- 18 Oct, 2005 5 commits
-
-
Jack Morgenstein authored
Avoid entering a QP as member of a multicast group multiple times. Signed-off-by:
Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
Roland Dreier authored
We keep IB device structures around until the last sysfs reference is gone, but we shouldn't ask the low-level driver to do anything after the LLD unregisters the device. To handle this, check the reg_state field and just fail sysfs show() requests if the device has already been unregistered. Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
Roland Dreier authored
Set mthca_driver.owner to THIS_MODULE. Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
Roland Dreier authored
Make the type parameter of mthca_alloc_db() be an enum mthca_db_type instead of an int. This doesn't have any practical effect but documents the functions a little better. Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
Roland Dreier authored
Use jiffies_to_msecs() so we print a human-readable time so we don't have to worry about what HZ is configured to, and print out a few values to make post-mortem analysis easier. Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
- 17 Oct, 2005 20 commits
-
-
Roland Dreier authored
Make ctx_id_mutex and ctx_id_table static to quiet sparse warnings. Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
Sean Hefty authored
Bind communication identifiers to a device to support device removal. Export per HCA CM devices to userspace. Signed-off-by:
Sean Hefty <sean.hefty@intel.com>
-
Sean Hefty authored
Eliminate ucm.h. Replace ucm_dbg with direct call to printk KERN_ERR. Signed-off-by:
Sean Hefty <sean.hefty@intel.com>
-
Roland Dreier authored
Add kernel support for userspace calling poll CQ, request CQ notification, post send, post receive, post SRQ receive, create AH and destroy AH commands. These commands allow us to support userspace verbs for devices that can't perform these operations directly from userspace (eg the PathScale HCA). Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
Roland Dreier authored
Give each device a uverbs_cmd_mask, so that a low-level driver can control which methods may be called on behalf of userspace. Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
Roland Dreier authored
If the SA query module's initialization fails for a device, then that device won't have a struct ib_sa_device associated. We should fail SA queries in that case, rather than blindly dereferencing the NULL pointer we get back from ib_get_client_data(). Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
Roland Dreier authored
A couple of functions were missing spin_unlock calls in error paths. Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
Roland Dreier authored
ipoib_create_qp() no longer creates IPoIB's QP, so it shouldn't destroy the QP on failure -- that unwinding happens elsewhere, so the current code can cause a double free. While we're at it, the function's name should match what it actually does, so rename it to ipoib_init_qp(). Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
Jack Morgenstein authored
Check the sizes of CQs, QPs and SRQs when creating objects, and fail instead of creating too-big queues. Also return real limits instead of just plausible-sounding values from mthca_query_device(). Signed-off-by:
Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
Roland Dreier authored
There is a bug in ib_mad_init_device(): if ib_agent_port_open() fails for a given port, then the current code doesn't call ib_mad_port_close() for that port. Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
Roland Dreier authored
The hardware relies on us keeping one extra work request that never gets used in SRQs. Add checks to the SRQ work request posting functions so that they fail when someone is about to use up that extra work request, rather than when someone uses the very last work request. Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
Roland Dreier authored
Our hardware supports generating an event when the number of receives posted to a shared receive queue (SRQ) falls below a user-specified limit. Implement mthca_modify_srq() to arm the limit, and add code to handle dispatching SRQ events when they occur. Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
Roland Dreier authored
Check port number before passing query_port or modify_port operations on to device driver. Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
Roland Dreier authored
Reject userspace memory registrations with invalid permission flags: "local write" is required if "remote write" or "remote atomic" is also requested. Pointed out by Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
Jack Morgenstein authored
Add code to fill in the bad_pkey_cntr, max_mtu, active_mtu and subnet_timeout fields in mthca_query_port(). Signed-off-by:
Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
Roland Dreier authored
Add abi_version attribute to uverbs class devices to allow for ABI versioning of device-specific interfaces. Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
Roland Dreier authored
By waiting to add resources to our lists until after the last operation that can fail, we don't have to remove them from their lists in the error path. Also, we should hold the idr mutex until we know whether resource creation has succeed or failed, to avoid someone finding a resource in our table before we're ready. Loosely based on work by Robert Walsh <rjwalsh@pathscale.com>. Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
Roland Dreier authored
Introduce new userspace verbs ABI version 3. This eliminates some unneeded commands, and adds support for user-created completion channels. This cleans up problems with file leaks on error paths, and also makes sure that file descriptors are always installed into the correct process. Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
Jack Morgenstein authored
Return correct atomic capability flag from mthca query function. Signed-off-by:
Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
Jack Morgenstein authored
Add checks so that we only allow multicast attach/detach with a valid multicast GID and the correct QP type. Signed-off-by:
Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
- 08 Oct, 2005 1 commit
-
-
Al Viro authored
- added typedef unsigned int __nocast gfp_t; - replaced __nocast uses for gfp flags with gfp_t - it gives exactly the same warnings as far as sparse is concerned, doesn't change generated code (from gcc point of view we replaced unsigned int with typedef) and documents what's going on far better. Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
- 30 Sep, 2005 1 commit
-
-
Michael S. Tsirkin authored
Remember to free the multicast group context memory table. Signed-off-by:
Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
- 29 Sep, 2005 1 commit
-
-
Roland Dreier authored
Rename IPoIB driver's path_lookup() to ipoib_path_lookup() to avoid a clashes with the kernel global path_lookup(). We don't hit this with the current kernel source, but some external patches seem to trigger this, and it's cleaner to avoid clashing with global names anyway. Signed-off-by:
Roland Dreier <rolandd@cisco.com> refs/heads/for-linus
-
- 27 Sep, 2005 2 commits
-
-
Jack Morgenstein authored
The IB spec defines the field to be 32 bits, not 16 bits. Signed-off-by:
Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
Michael S. Tsirkin authored
When allocating a table for mem-free HCA context, don't assume that obj_size * nobj is an even multiple of MTHCA_TABLE_CHUNK_SIZE. In particular, make sure we allocate at least one slot even if the table is smaller than MTHCA_TABLE_CHUNK_SIZE. Signed-off-by:
Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
- 26 Sep, 2005 2 commits
-
-
Roland Dreier authored
Al Viro pointed out that the current IB userspace verbs interface allows userspace to cause mischief by closing file descriptors before we're ready, or issuing the same command twice at the same time. This patch closes those races, and fixes other obvious problems such as a module reference leak. Some other interface bogosities will require an ABI change to fix properly, so I'm deferring those fixes until 2.6.15. Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-
Michael S. Tsirkin authored
The loop in mthca_map_cmd() would fill one entry past the end of the mailbox buffer before calling the firmware command. Signed-off-by:
Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by:
Roland Dreier <rolandd@cisco.com>
-