aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband (follow)
AgeCommit message (Collapse)AuthorFilesLines
2008-01-25IB/ehca: Forward event client-reregister-required to registered clientsHoang-Nam Nguyen1-0/+12
This patch allows ehca to forward event client-reregister-required to registered clients. One such event is generated by a switch eg. after its reboot. Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IB/mlx4: Micro-optimize mlx4_ib_poll_one()Roland Dreier1-4/+5
Rather than byte-swapping cqe->g_mlpath_rqpn each time we extract a field from it, byte-swap it once into a temporary variable. This results in smaller, better code -- eg, on 32-bit x86: add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-5 (-5) function old new delta mlx4_ib_poll_cq 1188 1183 -5 Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IB/mthca: Remove MSI support as scheduledAdrian Bunk3-44/+13
Remove MSI support from the mthca driver, as scheduled. There is no reason to use MSI instead of MSI-X, since MSI-X performs better. No one has spoken up since MSI support was deprecated in commit f6be6fbe ("IB/mthca: Schedule MSI support for removal"), so apparently the MSI support is unused. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IB/iser: Typo fix (s/destory/destroy/)Oliver Pinter1-1/+1
Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IB/iser: update URLs of iSER docsErez Zilber1-2/+2
Signed-off-by: Erez Zilber <erezz@voltaire.com>
2008-01-25RDMA/cma: add support for rdma_migrate_id() Sean Hefty1-0/+92
This is based on user feedback from Doug Ledford at RedHat: Events that occur on an rdma_cm_id are reported to userspace through an event channel. Connection request events are reported on the event channel associated with the listen. When the connection is accepted, a new rdma_cm_id is created and automatically uses the listen event channel. This is suboptimal where the user only wants listen events on that channel. Additionally, it may be desirable to have events related to connection establishment use a different event channel than those related to already established connections. Allow the user to migrate an rdma_cm_id between event channels. All pending events associated with the rdma_cm_id are moved to the new event channel. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25RDMA/cma: Reenable device removal on passive sideVladimir Sokolovsky1-1/+3
Enable conn_id remove on the passive side after connection establishment. This corrects an issue where the IB driver can't be unloaded after running applications over RDS. The 'dev_remove' counter does not reach 0 for established connections on the passive side. This problem is limited to device removal, and only occurs on the passive side if there are established connections. Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.co.il> Reviewed-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IB/mad: Fix incorrect access to items on local_listSean Hefty1-2/+0
In cancel_mads(), MADs are moved from the wait_list and local_list to a cancel_list for processing. However, the structures on these two lists are not the same. The wait_list references struct ib_mad_send_wr_private, but local_list references struct ib_mad_local_private. Cancel_mads() treats all items moved to the cancel_list as struct ib_mad_send_wr_private. This leads to a system crash when requests are moved from the local_list to the cancel_list. Fix this by leaving local_list alone. All requests on the local_list have completed are just awaiting processing by a queued worker thread. Bug (crash) reported by Dotan Barak <dotanb@dev.mellanox.co.il>. Problem with local_list access reported by Robert Reynolds <rreynolds@opengridcomputing.com>. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IB/cm: Add basic performance countersSean Hefty2-40/+303
Add performance/debug counters to track sent/received messages, retries, and duplicates. Counters are tracked per CM message type, per port. The counters are always enabled, so intrusive state tracking is not done. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IB/mad: Report number of times a mad was retriedSean Hefty3-4/+10
To allow ULPs to tune timeout values and capture retry statistics, report the number of times that a mad send operation was retried. For RMPP mads, report the total number of times that the any portion (send window) of the send operation was retried. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IB/multicast: Report errors on multicast groups if P_key changesSean Hefty1-10/+45
P_key changes can invalidate multicast groups. Report errors on all multicast groups affected by a pkey change. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IB: Spelling fixes in commentsJoe Perches2-2/+2
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IB/ipath: Convert from .nopage to .faultNick Piggin2-21/+12
Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IB/ipath: Add the work completion error code to the QP error debug outputRalph Campbell1-2/+2
Add the work completion error code to the QP error debug output. This makes it easier to determine the cause of the error. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IB/ipath: Better comment for rmb() in ipath_intr()Arthur Jones1-1/+9
An internal code review found the comment here lacking -- update it with more specifics of how and why the rmb() is there. Signed-off-by: Arthur Jones <arthur.jones@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IB/ipath: Fix comments for ipath_create_srq()Ralph Campbell1-2/+2
During a code review, someone noticed the comments didn't match the code. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IB/ipath: Fix error returned from ib_resize_cq if new size smaller than # entriesRalph Campbell1-1/+1
The gen2_basic tests check for the errno value when a CQ is resized smaller than the number of outstanding completions queue on the CQ. This patch changes ib_ipath to return EINVAL which is what ib_mthca returns and what gen2_basic expects. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IB/ipath: Fix sendctrl lockingJohn Gregor6-29/+72
Code review pointed out that the locking around uses of ipath_sendctrl and kr_sendctrl were, in several places, incorrect and/or inconsistent. Signed-off-by: John Gregor <john.gregor@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IB/ipath: Remove dead code for user process waiting for send bufferRalph Campbell2-30/+0
At one point in time there was code to allow a user process to wait for a send buffer if none were available. This feature was never used and most of the code was removed. This removes some missed unused code. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25RDMA/cxgb3: Support version 5.0 firmwareSteve Wise1-19/+2
The 5.0 firmware now supports translating sgls in recv work requests, so remove the host driver logic currently doing the translation. Note: this change requires 5.0 firmware. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25RDMA/cxgb3: Hold rtnl_lock() around ethtool get_drvinfo callSteve Wise1-0/+5
Currently the call into cxgb3 to get the driver info is not serialized. The iw_cxgb3 module needs to hold the rtnl_lock around the ethtool ops call like dev_ioctl() does. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25drivers/infiniband: Add missing "space"Joe Perches3-5/+5
Add missing spaces in the middle of format strings. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IB/ipath: Convert ipath_eep_sem semaphore to a mutexMatthias Kaehlcke3-12/+13
Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Acked-by: Michael Albaugh <Michael.Albaugh@qlogic.com> Tested-by: Arthur Jones <arthur.jones@qlogic.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IB/mad: Enable loopback of DR SMP responses from userspaceSteve Welch2-4/+20
The local loopback of an outgoing DR SMP response is limited to those that originate at the driver specific SMA implementation during the driver specific process_mad() function. This patch enables a returning DR SMP originating in userspace (or elsewhere) to be delivered to the local managment stack. In this specific case the driver process_mad() function does not consume or process the MAD, so a reponse mad has not be created and the original MAD must manually be copied to the MAD buffer that is to be handed off to the local agent. Signed-off-by: Steve Welch <swelch@systemfabricworks.com> Acked-by: Hal Rosenstock <hal@xsigo.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IB/ipath: Enable loopback of DR SMP responses from userspaceRalph Campbell1-2/+2
This patch is in response to reviewing a patch to the core MAD processing which fixes loopback of directed route packets to/from user level MAD agents. This change enables the core code to work for ib_ipath by fixing the return code from the ipath process_mad method. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IB/mad: Remove redundant NULL pointer check in ib_mad_recv_done_handler()Ralph Campbell1-9/+0
In ib_mad_recv_done_handler(), the response pointer is checked for NULL after allocating it. It is then checked again in the local process_mad() path but there is no possibility of it changing in between. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Acked-by: Hal Rosenstock <hal@xsigo.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25RDMA/iwcm: Set initiator depth and responder resources to device max valuesSteve Wise1-0/+10
Set the initiator depth and responder resources to the device max values for new connect request events in the iWARP connection manager. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IB/ipath: Improve interrupt handler cache footprintDave Olson1-2/+2
Improve interrupt handler cache footprint by noinline'ing error functions that are rarely called. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IPoIB/cm: Add connected mode support for devices without SRQsPradeep Satyanarayana4-43/+200
Some IB adapters (notably IBM's eHCA) do not implement SRQs (shared receive queues). The current IPoIB connected mode support only works on devices that support SRQs. Fix this by adding support for using the receive queue of each connected mode receive QP. The disadvantage of this compared to using an SRQ is that it means a full queue of receives must be posted for each remote connected mode peer, which means that total memory usage is potentially much higher than when using SRQs. To manage this, add a new module parameter "max_nonsrq_conn_qp" that limits the number of connections allowed per interface. The rest of the changes are fairly straightforward: we use a table of struct ipoib_cm_rx to hold all the active connections, and put the table index of the connection in the high bits of receive WR IDs. This is needed because we cannot rely on the struct ib_wc.qp field for non-SRQ receive completions. Most of the rest of the changes just test whether or not an SRQ is available, and post receives or find received packets in the right place depending on the answer. Cleaning up dead connections actually becomes simpler, because we do not have to do the "last WQE reached" dance that is required to destroy QPs attached to an SRQ. We just move the QP to the error state and wait for all pending receives to be flushed. Signed-off-by: Pradeep Satyanarayana <pradeeps@linux.vnet.ibm.com> [ Completely rewritten and split up, based on Pradeep's work. Several bugs fixed and no doubt several bugs introduced. - Roland ] Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IPoIB/cm: Factor out ipoib_cm_free_rx_reap_list()Roland Dreier1-22/+21
Factor out the code for going through the rx_reap list of struct ipoib_cm_rx and freeing each one. This consolidates the code duplicated between ipoib_cm_dev_stop() and ipoib_cm_rx_reap() and reduces the risk of error when adding additional accounting. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IPoIB/cm: Factor out ipoib_cm_create_srq()Roland Dreier1-17/+30
Factor out the code to create an SRQ and allocate the receive ring in ipoib_cm_dev_init() into a new function ipoib_cm_create_srq(). This will make the code neater when support for devices that don't implement SRQs is added. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IPoIB/cm: Factor out ipoib_cm_free_rx_ring()Roland Dreier1-9/+19
Factor out the code to unmap/free skbs and free the receive ring in ipoib_cm_dev_cleanup() into a new function ipoib_cm_free_rx_ring(). This function will be called from a couple of other places when support for devices that don't implement SRQs is added. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IPoIB: Trivial formatting cleanupsRoland Dreier6-130/+130
Fix whitespace blunders, convert "foo* bar" to "foo *bar", etc. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IB/ipath: Fix crash on unload introduced by sysfs changesRoland Dreier1-1/+2
Commit 23b9c1ab ("Infiniband: make ipath driver use default driver groups.") introduced a bug in the ipath driver where ipath_device_create_group() fell through into the error path, even on success, which meant that the sysfs groups it created would always get removed right away. This made ipath_device_remove_group() hit the BUG_ON() in sysfs_remove_group() when it tried to remove those groups a second time. Correct the return path so that the groups stick around until they are supposed to be cleaned up. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-24Kobject: convert drivers/* from kobject_unregister() to kobject_put()Greg Kroah-Hartman1-3/+3
There is no need for kobject_unregister() anymore, thanks to Kay's kobject cleanup changes, so replace all instances of it with kobject_put(). Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24Infiniband: make ipath driver use default driver groups.Greg Kroah-Hartman4-45/+18
Make the ipath driver use the new driver functions so that it does not touch the sysfs portion of the driver structure. We also remove the redundant symlink from the device back to the driver, as it is already in the sysfs tree. Any userspace tools should be using the standard symlink, not some driver specific one. Cc: Roland Dreier <rdreier@cisco.com> Cc: Bryan O'Sullivan <bryan.osullivan@qlogic.com> Cc: Arthur Jones <arthur.jones@qlogic.com> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24Kobject: change drivers/infiniband to use kobject_init_and_addGreg Kroah-Hartman1-26/+9
Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Roland Dreier <rolandd@cisco.com> Cc: Sean Hefty <mshefty@ichips.intel.com> Cc: Hal Rosenstock <hal.rosenstock@gmail.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-16IB/ipath: Fix receiving UD messages with immediate dataRalph Campbell1-22/+22
This fixes a small bug in ipath_ud_rcv()'s handling of UD messages with immediate data. We need to test whether immediate data is present and update the header size accordingly *before* testing the packet size from the header against the actual received length. Otherwise the wrong header size will be used and all messages with immediate data will be dropped. This bug keeps MVAPICH-UD and HP MPI from working at all on ipath devices. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-08IB/srp: Release transport before removing hostDave Dillow1-1/+1
The documented call sequence for removing a host is to call the transport xxx_remove_host() prior to scsi_remove_host(). The SRP transport used to crash when that order was followed, but as it is now fixed, use the documented order. Signed-off-by: David Dillow <dillowda@ornl.gov> Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-08IB/mlx4: Fix value of pkey_index in QP1 completionsDotan Barak1-1/+1
Fix the value of pkey_index in completions to get a valid value for GSI QPs. Without this fix, incoming GSI packets on port 2 get an invalid P_Key index in the completion, which prevents the MAD layer from sending back a response, which can make the second port of ConnectX HCAs completely useless. Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-03IB/srp: Fix list corruption/oops on module reloadDavid Dillow1-0/+1
Add a missing call to srp_remove_host() in srp_remove_one() so that we don't leak SRP transport class list entries. Tested-by: David Dillow <dillowda@ornl.gov> Acked-by: FUJITA Tomonori <tomof@acm.org> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-12-13IB/ehca: Fix lock flag variable location, bump version numberJoachim Fenkes3-2/+2
Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-12-12IB/ehca: Serialize HCA-related hCalls if necessaryJoachim Fenkes3-17/+25
Several pSeries firmware versions share a rare locking issue in the HCA-related hCalls. Check for a feature flag that indicates the issue being fixed and serialize all HCA hCalls if not. Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-12-12IB/ehca: Return correct number of SGEs for SRQJoachim Fenkes1-2/+2
Firmware would round up the number of SGEs to four, because the WQE structure holds four SGEs. For SRQ, only three are supported, so return a fixed value instead. Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-11-30IB/ehca: Fix static rate if path faster than linkJoachim Fenkes1-2/+6
The formula would yield -1 if the path is faster than the link, which is wrong in a bad way (max throttling). Clamp to 0, which is the correct value. Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-11-27IPoIB: Fix oops if xmit is called when priv->broadcast is NULLJack Morgenstein1-0/+3
If a port goes down, ipoib_ib_dev_down() is invoked -- which flushes the mcasts (clearing priv->broadcast) and clearing the path record cache. If ipoib_start_xmit() is then invoked (before the broadcast group is rejoined), a kernel oops results from attempting to access priv->broadcast, which is still unset. Returning NULL from path_rec_create() if priv->broadcast is NULL is a harmless way of bypassing the problem -- the offending packet is simply discarded "without prejudice." Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-11-24IB/iser: Add missing counter increment in iser_data_buf_aligned_len()Erez Zilber1-2/+4
While adding sg chaining support to iSER, a "for" loop was replaced with a "for_each_sg" loop. The "for" loop included the incrementation of 2 variables. Only one of them is incremented in the current "for_each_sg" loop. This caused iSER to think that all data is unaligned, and all data was copied to aligned buffers. This patch increments the missing counter inside the "for_each_sg" loop whenever necessary. Signed-off-by: Erez Zilber <erezz@voltaire.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-11-24IB/ehca: Fix static rate regressionJoachim Fenkes1-2/+2
Wrong choice of port number caused modify_qp() to fail -- fixed. Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-11-20IB/ipath: Normalize error return codes for posting work requestsRalph Campbell2-4/+6
The error codes for ib_post_send(), ib_post_recv(), and ib_post_srq_recv() were inconsistent. Use EINVAL for too many SGEs and ENOMEM for too many WRs. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-11-20IB/ipath: Fix offset returned to ibv_modify_srq()Ralph Campbell1-17/+25
The wrong offset was being returned to libipathverbs so that when ibv_modify_srq() calls mmap(), it always fails. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>