summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath
Commit message (Collapse)AuthorAgeFilesLines
* IB/ipath: Reset the retry counter for RDMA_READ_RESPONSE_MIDDLE packetsPatrick Marchand Latifi2008-03-111-0/+4
| | | | | | | | Reset the retry counter when we get a good RDMA_READ_RESPONSE_MIDDLE packet. This fix will prevent the requester from reporting a retry exceeded error too early. Signed-off-by: Patrick Marchand Latifi <patrick.latifi@qlogic.com>
* IB/ipath: Fix error completion put on send CQ instead of recv CQPatrick Marchand Latifi2008-03-111-1/+1
| | | | | | | | | A work completion entry could be placed on the wrong completion queue when an RC QP is placed in the error state. Signed-off-by: Patrick Marchand Latifi <patrick.latifi@qlogic.com> Acked-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Fix RC QP initializationPatrick Marchand Latifi2008-03-111-4/+5
| | | | | | | | | | | | | This patch fixes the initialization of RC QPs, since we would rely on the queue pair type (ibqp->qp_type) being set, but this field is only initialized when we return from ipath_create_qp (it is initialized by the user-level verbs library). The fix is to not depend on this field to initialize the send and the receive state of the RC QP. Signed-off-by: Patrick Marchand Latifi <patrick.latifi@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Fix potentially wrong RNR retry counter returned in ipath_query_qp()Patrick Marchand Latifi2008-03-111-1/+1
| | | | | | | | | | | | | | | There can be a case where the requester's rnr retry counter (s_rnr_retry) is less than the number of rnr retries allowed per QP (s_rnr_retry_cnt). This can happen if the s_rnr_retry counter is being decremented and an ipath_query_qp call is issued during that time frame. The fix is to always return the number of rnr retries allowed per QP instead of the requester's rnr counter. Found by code review. Signed-off-by: Patrick Marchand Latifi <patrick.latifi@qlogic.com> Acked-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Fix IB compliance problems with link state vs physical stateRalph Campbell2008-03-115-22/+18
| | | | | | | | | | | | | | Subnet manager SetPortinfo messages distingush between changing the link state (DOWN, ARM, ACTIVE) and the link physical state (POLL, SLEEP, DISABLED). These are somewhat independent commands and affect when link width and speed changes take effect. Without this patch, a link DOWN physical state NOP command was causing the link width and speed settings to take effect which should only happen when the link physical state is goes down (either by a SMP or some link physical error like link errors exceeding the threshold). Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Remove unnecessary castJan Engelhardt2008-01-251-2/+1
| | | | | Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Trivial simplification of ipath_make_ud_req()Ralph Campbell2008-01-251-2/+1
| | | | | | | | Move the increment of s_hdrwords into the existing if block that tests if we're doing a send with immediate, to save one test of the opcode. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Add mappings from HW register to PortInfo port physical stateRalph Campbell2008-01-252-16/+41
| | | | | | | | Add new mappings from port physical state (a HW register value) to the IB SubnGet(PortInfo) port physical state. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Changes to support PIO bandwidth check on IBA7220Dave Olson2008-01-254-1/+49
| | | | | | | | | | | The IBA7220 uses a count-based triggering mechanism, and therefore can't use the same bandwidth verification mechanism as older chips. To support the 7220, allow enabling and disabling armlaunch errors on application request. Minor robustness improvements as well. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Minor cleanup of unused fields and chip-specific errorsDave Olson2008-01-252-59/+25
| | | | | | | Clean up some unused header fields, minor related cleanup. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: New sysfs entries to control 7220 featuresMichael Albaugh2008-01-252-0/+366
| | | | | | | | | IBA7220 includes many more configurable IB settings. Getting/setting these is now grouped into a pair of chip specific functions accessed via function pointers. Provide sysfs access to these settings. Signed-off-by: Michael Albaugh <michael.albaugh@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Add new chip-specific functions to older chips, consistent initDave Olson2008-01-254-26/+407
| | | | | | | | | This adds the new (sometimes empty) chip-specific functions to the older chips, and makes the initialization and related functions consistent across all 3 chips. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Remove unused MDIO interface codeDave Olson2008-01-255-168/+2
| | | | | | | | This code has been unused for some time, but still had leftovers from when it was used. Signed-off-by: Dave Olson <dave.olson@qlogic.com Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Fix some sparse warnings about shadowed symbolsRoland Dreier2008-01-252-4/+1
| | | | | | | | | | There are a few places in the ipath driver where a variable is re-declared within a block where it is already in scope. Most of these extra declarations can simply be removed, since the variable from the outer scope is used in a way so that it does not need to keep its variable across the block with the re-declaration. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Drop support for the original QHT7040 boardDave Olson2008-01-251-2/+1
| | | | | | | | | | The original QHT7040 had significant performance issues so there was an additional check in the driver for a newer serial number. Support for the small quantities of that board shipped has been dropped, so this patch removes the special checks to simplify the code. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* 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/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/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>
* 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/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/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>
* IB/ipath: Fix crash on unload introduced by sysfs changesRoland Dreier2008-01-251-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>
* Infiniband: make ipath driver use default driver groups.Greg Kroah-Hartman2008-01-243-40/+10
| | | | | | | | | | | | | | | | 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>
* IB/ipath: Fix receiving UD messages with immediate dataRalph Campbell2008-01-161-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>
* IB/ipath: Normalize error return codes for posting work requestsRalph Campbell2007-11-202-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>
* IB/ipath: Fix offset returned to ibv_modify_srq()Ralph Campbell2007-11-201-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>
* IB/ipath: Fix error path in QP creationRalph Campbell2007-11-201-6/+9
| | | | | | | | | | This patch fixes the code which frees the partially allocated QP resources if there was an error while creating the QP. In particular, the QPN wasn't deallocated and the QP wasn't removed from the hash table. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Fix offset returned to ibv_resize_cq()Ralph Campbell2007-11-201-5/+14
| | | | | | | | The wrong offset was being returned to libipathverbs so that when ibv_resize_cq() calls mmap(), it always fails. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Fix race with ACK retry timeout list managementRalph Campbell2007-11-131-2/+3
| | | | | | | | | | | When an ACK is received, the QP is removed from the timeout list and then if there are still pending send WQEs, the QP is put back on the timeout list. It is possible that another post send has put the QP on the timeout list thus, a check needs to be made before trying to do it again or the list is corrupted. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Fix memory leak in ipath_resize_cq() if copy_to_user() failsRalph Campbell2007-11-131-4/+7
| | | | | | Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Patrick Marchand Latifi <patrick.latifi@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Fix incorrect use of sizeof on msg buffer (function argument)Dave Olson2007-10-301-9/+9
| | | | | | | | | | | | | | Inside a function declared as void foo(char bar[512]) the value of sizeof bar is the size of a pointer, not 512. So avoid constructions like this by passing the size explicitly. Also reduce the size of the buffer to 128 bytes (512 was overly generous). Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Limit length checksummed in eepromMichael Albaugh2007-10-301-1/+9
| | | | | | | | | | | | The small eeprom that holds the GUID etc. contains a data-length, but if the actual eeprom is new or has been erased, that byte will be 0xFF, which is greater than the maximum physical length of the eeprom, and more importantly greater than the length of the buffer we vmalloc'd. Sanity-check the length to avoid the possbility of reading past end of buffer. Signed-off-by: Michael Albaugh <Michael.Albaugh@Qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Fix a race where s_last is updated without lock heldRalph Campbell2007-10-301-5/+9
| | | | | | | | | | | | There is a small window where a send work queue entry could be overwritten by ib_post_send() because s_last is updated before the entry is read. This patch closes the window by acquiring the lock and updating the last send work queue entry index after reading the wr_id. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* [SG] Update drivers to use sg helpersJens Axboe2007-10-222-3/+3
| | | | Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
OpenPOWER on IntegriCloud