summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* IB/ipath: Add ipath_read_ireg() abstractionArthur Jones2008-01-252-2/+10
| | | | | | | | Different chips have different width interrupt status registers, so add a flag and accessor function to decide which width register read to use. Signed-off-by: Arthur Jones <arthur.jones@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Add flag and handling for chips with swapped register bugRalph Campbell2008-01-255-16/+10
| | | | | | | | | The 6110 had a bug that caused some registers to be swapped; it was fixed for the 7220 (and didn't affect the 6120 because it had fewer registers). This adds a flag and related code to handle that, and includes some minor cleanups in the same area. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
* IB/ipath: Port config has on-chip effects for 7220Ralph Campbell2008-01-255-4/+24
| | | | | | | | | | The number of configured ports for the 7220 changes the number of eager TIDs available per port, for all but port 0 (kernel port) which remains constant, so add a field to give port0 count separate from the portdata structure. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Allow more flexible user register alignmentsRalph Campbell2008-01-254-5/+22
| | | | | | | | | User registers have different alignments on different chips (4KB on older, 64KB on 7220). Allow mapping the user registers on kernels with page sizes up to 64K. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Clean up some commentsDave Olson2008-01-256-13/+11
| | | | | Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Export hardware counters more consistentlyRalph Campbell2008-01-255-17/+328
| | | | | | | | | | | Various hardware counters are exported via the ipath file system (since it is binary data). The old file format was very dependent on the HW offsets for these registers. Newer HCA chips can have different counters at different offsets. This patch adds a level of indirection to make the file format consistent across HCAs. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: MAD performance sampling registers supportRalph Campbell2008-01-255-44/+101
| | | | | | | | Add support for QLogic HCAs which have hardware performance sampling registers for PortSamplesControl and PortSamplesResult MADs. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/srp: Add identifying information to log messagesDavid Dillow2008-01-251-46/+71
| | | | | | | | | | | | | When you have multiple targets, it gets really confusing when you try to track down who did a reset when there is no identifying information in the log message, especially when the same extension ID is mapped through two different local IB ports. So, add an identifier that can be used to track back to which local IB port/remote target pair is the one having problems. Signed-off-by: David Dillow <dillowda@ornl.gov> Acked-by: Pete Wyckoff <pw@osc.edu> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IPoIB/CM: Enable SRQ support on HCAs that support fewer than 16 SG entriesPradeep Satyanarayana2008-01-253-14/+49
| | | | | | | | | | | | | Some HCAs (such as ehca2) support SRQ, but only support fewer than 16 SG entries for SRQs. Currently IPoIB/CM implicitly assumes all HCAs will support 16 SG entries for SRQs (to handle a 64K MTU with 4K pages). This patch removes that restriction by limiting the maximum MTU in connected mode to what the maximum number of SRQ SG entries allows. This patch addresses <https://bugs.openfabrics.org/show_bug.cgi?id=728> Signed-off-by: Pradeep Satyanarayana <pradeeps@linux.vnet.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/srp: Enable SG list chainingDavid Dillow2008-01-251-0/+1
| | | | | | | | | | | | | | | | | | | By default, the SCSI mid-layer seems to send down 512KB requests (sg_tablesize = 256), with some requests occasionally combined. By allowing the mid-layer to chain requests, we can easily grow to 1024KB or larger -- I've tested 4096KB I/O requests with no problems. I looked through the DMA paths on the hardware drivers to ensure they could take advantage of the SG chaining, and it seems that every one except ipath uses the system's DMA routines, which have been converted to handle chaining. ipath looks like it should be OK, but I have no way to test it. Signed-off-by: David Dillow <dillowda@ornl.gov> [ Tested on ipath. - Roland ] Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/srp: Respect target credit limitDavid Dillow2008-01-252-4/+14
| | | | | | | | | | | | | | | | | | | The current SRP initiator will send requests even if it has no credits available. The results of sending extra requests are vendor specific, but on some devices, overrunning credits will cost 85% of peak performance -- e.g. 100 MB/s vs 720 MB/s. Other devices may just drop the requests. This patch will tell the SCSI midlayer to queue requests if there are fewer than two credits remaining, and will not issue a task management request if there are no credits remaining. The mid-layer will retry the queued command once an outstanding command completes. The patch also removes the unlikely() in __srp_get_tx_iu(), as it is not at all unlikely to hit this limit under heavy load. Signed-off-by: David Dillow <dillowda@ornl.gov> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IPoIB: improve IPv4/IPv6 to IB mcast mapping functionsRolf Manderscheid2008-01-252-7/+1
| | | | | | | | | | | | | | | | An IPoIB subnet on an IB fabric that spans multiple IB subnets can't use link-local scope in multicast GIDs. The existing routines that map IP/IPv6 multicast addresses into IB link-level addresses hard-code the scope to link-local, and they also leave the partition key field uninitialised. This patch adds a parameter (the link-level broadcast address) to the mapping routines, allowing them to initialise both the scope and the P_Key appropriately, and fixes up the call sites. The next step will be to add a way to configure the scope for an IPoIB interface. Signed-off-by: Rolf Manderscheid <rvm@obsidianresearch.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Changes for fields moving from devdata to portdataDave Olson2008-01-255-36/+17
| | | | | | | | | This patch moves some arrays that were defined per-device to be variables defined in the per context data structure, thus avoiding extra kzalloc() calls. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Generalize some xxx_SHIFT macrosDave Olson2008-01-257-13/+40
| | | | | | | | | | In preparation for upcoming chips that have different values for INFINIPATH_R_PORTENABLE_SHIFT, INFINIPATH_R_INTRAVAIL_SHIFT, INFINIPATH_R_TAILUPD_SHIFT, and portcfg_shift, remove the shared #defines and use device-specific variables instead. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: kreceive uses portdata rather than devdataRalph Campbell2008-01-256-26/+46
| | | | | | | | kreceive is now portdata * instead of devdata * and other kreceive related cleanups.... Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Cleanup ipath_get_egrbuf()Ralph Campbell2008-01-251-4/+2
| | | | | | | Remove an unused parameter and fix up the comment. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Fix RNR NAK handlingRalph Campbell2008-01-252-12/+12
| | | | | | | | | | | | | This patch fixes a couple of minor problems with RNR NAK handling: - The insertion sort was causing extra delay when inserting ahead vs. behind an existing entry on the list. - A resend of a first packet of a message which is still not ready, needs another RNR NAK (i.e., it was suppressed when it shouldn't). - Also, the resend tasklet doesn't need to be woken up unless the ACK/NAK actually indicates progress has been made. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ehca: Forward event client-reregister-required to registered clientsHoang-Nam Nguyen2008-01-251-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>
* IB/mlx4: Micro-optimize mlx4_ib_poll_one()Roland Dreier2008-01-251-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>
* IB/mthca: Remove MSI support as scheduledAdrian Bunk2008-01-253-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>
* IB/iser: Typo fix (s/destory/destroy/)Oliver Pinter2008-01-251-1/+1
| | | | | Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/iser: update URLs of iSER docsErez Zilber2008-01-251-2/+2
| | | | Signed-off-by: Erez Zilber <erezz@voltaire.com>
* RDMA/cma: add support for rdma_migrate_id() Sean Hefty2008-01-251-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>
* RDMA/cma: Reenable device removal on passive sideVladimir Sokolovsky2008-01-251-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>
* IB/mad: Fix incorrect access to items on local_listSean Hefty2008-01-251-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>
* IB/cm: Add basic performance countersSean Hefty2008-01-252-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>
* IB/mad: Report number of times a mad was retriedSean Hefty2008-01-253-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>
* IB/multicast: Report errors on multicast groups if P_key changesSean Hefty2008-01-251-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>
* IB: Spelling fixes in commentsJoe Perches2008-01-252-2/+2
| | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* mlx4_core: Fix max_eqs masking in QUERY_DEV_CAPJack Morgenstein2008-01-251-1/+1
| | | | | | | | | | | log_max_eqs is a 4-bit field, not a 3-bit field in the response to the QUERY_DEV_CAP FW command, so we should mask with 0xf instead of 0x7 when reading it. Found by Yossi Leybovitch of Mellanox. Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Convert from .nopage to .faultNick Piggin2008-01-252-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>
* IB/ipath: Add the work completion error code to the QP error debug outputRalph Campbell2008-01-251-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>
* IB/ipath: Better comment for rmb() in ipath_intr()Arthur Jones2008-01-251-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>
* IB/ipath: Fix comments for ipath_create_srq()Ralph Campbell2008-01-251-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>
* IB/ipath: Fix error returned from ib_resize_cq if new size smaller than # ↵Ralph Campbell2008-01-251-1/+1
| | | | | | | | | | | | entries 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>
* IB/ipath: Fix sendctrl lockingJohn Gregor2008-01-256-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>
* IB/ipath: Remove dead code for user process waiting for send bufferRalph Campbell2008-01-252-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>
* RDMA/cxgb3: Support version 5.0 firmwareSteve Wise2008-01-251-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>
* RDMA/cxgb3: Hold rtnl_lock() around ethtool get_drvinfo callSteve Wise2008-01-251-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>
* drivers/infiniband: Add missing "space"Joe Perches2008-01-253-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>
* IB/ipath: Convert ipath_eep_sem semaphore to a mutexMatthias Kaehlcke2008-01-253-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>
* IB/mad: Enable loopback of DR SMP responses from userspaceSteve Welch2008-01-252-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>
* IB/ipath: Enable loopback of DR SMP responses from userspaceRalph Campbell2008-01-251-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>
* IB/mad: Remove redundant NULL pointer check in ib_mad_recv_done_handler()Ralph Campbell2008-01-251-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>
* RDMA/iwcm: Set initiator depth and responder resources to device max valuesSteve Wise2008-01-251-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>
* IB/ipath: Improve interrupt handler cache footprintDave Olson2008-01-251-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>
* IPoIB/cm: Add connected mode support for devices without SRQsPradeep Satyanarayana2008-01-254-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>
* IPoIB/cm: Factor out ipoib_cm_free_rx_reap_list()Roland Dreier2008-01-251-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>
* IPoIB/cm: Factor out ipoib_cm_create_srq()Roland Dreier2008-01-251-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>
* IPoIB/cm: Factor out ipoib_cm_free_rx_ring()Roland Dreier2008-01-251-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>
OpenPOWER on IntegriCloud