aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath (follow)
AgeCommit message (Collapse)AuthorFilesLines
2008-01-25IB/ipath: Remove unnecessary castJan Engelhardt1-2/+1
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IB/ipath: Trivial simplification of ipath_make_ud_req()Ralph Campbell1-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>
2008-01-25IB/ipath: Add mappings from HW register to PortInfo port physical stateRalph Campbell2-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>
2008-01-25IB/ipath: Changes to support PIO bandwidth check on IBA7220Dave Olson4-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>
2008-01-25IB/ipath: Minor cleanup of unused fields and chip-specific errorsDave Olson2-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>
2008-01-25IB/ipath: New sysfs entries to control 7220 featuresMichael Albaugh2-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>
2008-01-25IB/ipath: Add new chip-specific functions to older chips, consistent initDave Olson4-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>
2008-01-25IB/ipath: Remove unused MDIO interface codeDave Olson5-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>
2008-01-25IB/ipath: Fix some sparse warnings about shadowed symbolsRoland Dreier2-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>
2008-01-25IB/ipath: Drop support for the original QHT7040 boardDave Olson1-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>
2008-01-25IB/ipath: Add ipath_read_ireg() abstractionArthur Jones2-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>
2008-01-25IB/ipath: Add flag and handling for chips with swapped register bugRalph Campbell5-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>
2008-01-25IB/ipath: Port config has on-chip effects for 7220Ralph Campbell5-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>
2008-01-25IB/ipath: Allow more flexible user register alignmentsRalph Campbell4-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>
2008-01-25IB/ipath: Clean up some commentsDave Olson6-13/+11
Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25IB/ipath: Export hardware counters more consistentlyRalph Campbell5-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>
2008-01-25IB/ipath: MAD performance sampling registers supportRalph Campbell5-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>
2008-01-25IB/ipath: Changes for fields moving from devdata to portdataDave Olson5-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>
2008-01-25IB/ipath: Generalize some xxx_SHIFT macrosDave Olson7-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>
2008-01-25IB/ipath: kreceive uses portdata rather than devdataRalph Campbell6-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>
2008-01-25IB/ipath: Cleanup ipath_get_egrbuf()Ralph Campbell1-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>
2008-01-25IB/ipath: Fix RNR NAK handlingRalph Campbell2-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>
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-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/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/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-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-24Infiniband: make ipath driver use default driver groups.Greg Kroah-Hartman3-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>
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>
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>
2007-11-20IB/ipath: Fix error path in QP creationRalph Campbell1-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>
2007-11-20IB/ipath: Fix offset returned to ibv_resize_cq()Ralph Campbell1-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>
2007-11-13IB/ipath: Fix race with ACK retry timeout list managementRalph Campbell1-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>
2007-11-13IB/ipath: Fix memory leak in ipath_resize_cq() if copy_to_user() failsRalph Campbell1-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>
2007-10-30IB/ipath: Fix incorrect use of sizeof on msg buffer (function argument)Dave Olson1-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>
2007-10-30IB/ipath: Limit length checksummed in eepromMichael Albaugh1-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>
2007-10-30IB/ipath: Fix a race where s_last is updated without lock heldRalph Campbell1-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>
2007-10-22[SG] Update drivers to use sg helpersJens Axboe2-3/+3
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-16infiniband: sg chaining supportJens Axboe1-4/+6
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-09IB/ipath: Minor fix to ordering of freeing and zeroing of tid pages.Dave Olson1-3/+4
Fixed to be the same as everywhere else. copy and then zero the page * in the array first, and then pass the copy to the VM routines. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-09IB/ipath: Remove redundant link state checksRalph Campbell1-6/+0
This patch removes some redundant checks when the SMA changes the link state since the same checks are made in the lower level function that sets the state. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-09IB/ipath: Fix IB_EVENT_PORT_ERR eventRalph Campbell5-12/+31
The link state event calls were being generated when the SM told the SMA to change link states. This works for IB_EVENT_PORT_ACTIVE but not if the link goes down and stays down. The fix is to generate event calls from the interrupt handler when the HW link state changes. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-09IB/ipath: Better handling of unexpected GPIO interruptsMichael Albaugh1-4/+6
The General Purpose I/O pins can be configured to cause interrupts. At the end of the interrupt code dealing with all known causes, a message is output if any bits remain un-handled. Since this is a "can't happen" scenario, it should only be triggered by bugs elsewhere. It is harmless, and potentially beneficial, to limit the damage by masking any such unexpected interrupts. This patch adds disabling of interrupts from any pins that should not have been allowed to interrupt, in addition to emitting a message. Signed-off-by: Michael Albaugh <Michael.Albaugh@Qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>