summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_kernel.h
Commit message (Collapse)AuthorAgeFilesLines
* IB/ipath: Need to always request and handle PIO avail interruptsDave Olson2008-05-071-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | Now that we always use PIO for vl15 on 7220, we could get stuck forever if we happened to run out of PIO buffers from the verbs code, because the setup code wouldn't run; the interrupt was also ignored if SDMA was supported. We also have to reduce the pio update threshold if we have fewer kernel buffers than the existing threshold. Clean up the initialization a bit to get ordering safer and more sensible, and use the existing ipath_chg_kernavail call to do init, rather than doing it separately. Drop unnecessary clearing of pio buffer on pio parity error. Drop incorrect updating of pioavailshadow when exitting freeze mode (software state may not match chip state if buffer has been allocated and not yet written). If we couldn't get a kernel buffer for a while, make sure we are in sync with hardware, mainly to handle the exitting freeze case. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB: convert struct class_device to struct deviceTony Jones2008-04-191-4/+4
| | | | | | | | | | | | | | This converts the main ib_device to use struct device instead of struct class_device as class_device is going away. Signed-off-by: Tony Jones <tonyj@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Cc: Roland Dreier <rolandd@cisco.com> Cc: Sean Hefty <sean.hefty@intel.com> Cc: Hal Rosenstock <hal.rosenstock@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* IB/ipath: Update copyright dates for files changed in 2008Ralph Campbell2008-04-161-1/+1
| | | | | Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: add calls to new 7220 code and enable in buildDave Olson2008-04-161-1/+3
| | | | | | | | | This patch adds the initialization calls into the new 7220 HCA files, changes the Makefile to compile and link the new files, and code to handle send DMA. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Misc changes to prepare for IB7220 introductionArthur Jones2008-04-161-0/+1
| | | | | | | | | | | The patch adds a number of minor changes to support newer HCAs: - New send buffer control bits - New error condition bits - Locking and initialization changes - More send buffers Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Header file changes to support IBA7220Ralph Campbell2008-04-161-9/+156
| | | | | | | | This is part of a patch series to add support for a new HCA. This patch adds new fields to the header files. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Fix up error handlingRalph Campbell2008-04-161-1/+1
| | | | | | | | This patch makes chip reset more robust and reduces lock contention between user and kernel TID register updates. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Fix check for no interrupts to reliably fallback to INTxDave Olson2008-04-161-3/+2
| | | | | | | | | Newer HCAs support MSI interrupts and also INTx interrupts. Fix the code so that INTx can be reliably enabled if MSI interrupts are not working. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Enable reduced PIO update for HCAs that support it.Dave Olson2008-04-161-0/+1
| | | | | | | | | Newer HCAs have a threshold counter to reduce the number of DMAs the chip makes to update the PIO buffer availability status bits. This patch enables the feature. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Add support for 7220 receive queue changesRalph Campbell2008-04-161-16/+37
| | | | | | | | | Newer HCAs have a HW option to write a sequence number to each receive queue entry and avoid a separate DMA of the tail register to memory. This patch adds support for these changes. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Fix some white space and code style issuesRalph Campbell2008-04-161-2/+2
| | | | | | | | This patch makes some white space changes and minor non-functional changes to more closely match the code in OFED-1.3. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: EEPROM support for 7220 devices, robustness improvements, cleanupMichael Albaugh2008-04-161-2/+5
| | | | | | | | | | Add support for reading newer card's EEPROMs while continuing to support older EEPROMs. Also, add support for the temperature sensor if present. Signed-off-by: Michael Albaugh <Michael.Albaugh@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Make send buffers available for kernel if not allocated to userRalph Campbell2008-04-161-1/+10
| | | | | | | | | | | | A fixed partitioning of send buffers is determined at driver load time for user processes and kernel use. Since send buffers are a scarce resource, it makes sense to allow the kernel to use the buffers if they are not in use by a user process. Also, eliminate code duplication for ipath_force_pio_avail_update(). Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Prevent link-recovery code from negating admin disableMichael Albaugh2008-04-161-0/+2
| | | | | | | | | | | The link can be put in LINKDOWN_DISABLE state either locally or via a MAD. However, the link-recovery code will take it out of that state as a side-effect of attempts to clear SerDes/XGXS issues. We add a flag to indicate "link is down on purpose, leave it alone." Signed-off-by: Michael Albaugh <michael.albaugh@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: HW workaround for case where chip can send but not receiveDave Olson2008-04-161-0/+2
| | | | | | | | | | Workaround a QLE7140 problem that in rare cases causes flow control problems after link recovery by forcing a link retrain after recovery. A module parameter is provided to control the behavior in case it causes problems. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Add code to support multiple link speeds and widthsRalph Campbell2008-04-161-0/+2
| | | | | | | | This patch adds code to get/set portinfo to support multiple link speeds and widths. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Head of Line blocking vs forward progress of user appsJohn Gregor2008-04-161-0/+31
| | | | | | | | | | | | | | | | There's a conflict between our need to quiesce PSM-based applications to avoid HoL blocking when the IB link goes down and the apps' desire to remain running so that their quiescence timout mechanism can keep running. The compromise is to STOP the processes for a fixed period of time and then alternate between CONT and STOP until the link is again active. If there are poor interactions with subnet manager configuration at a given site, the interval can be adjusted via a module paramter. Signed-off-by: John Gregor <john.gregor@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Enable 4KB MTUDave Olson2008-04-161-0/+1
| | | | | | | | | | | Enable use of 4KB MTU. Since the driver uses more pinned memory for receive buffers when the 4KB MTU is enabled, whether or not the fabric supports that MTU, add a "mtu4096" module parameter that can be used to limit the MTU to 2KB when it is known that 4KB MTUs can't be used anyway. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Provide I/O bus speeds for diagnostic purposesArthur Jones2008-04-161-4/+5
| | | | | | | | | | Modern I/O buses like PCIe and HT can be configured for multiple speeds and widths. When an ipath HCA seems to have lower than expected performance, it is very useful to be able to display what the driver thinks the bus speed is. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Fix sparse warning about pointer signednessArthur Jones2008-04-161-1/+1
| | | | | | | | | | | | | There's no reason for the third parameter of ipath_count_units() to be a u32 *, so change it to be an int * instead. This fixes the sparse warning: drivers/infiniband/hw/ipath/ipath_file_ops.c:1654:47: warning: incorrect type in argument 3 (different signedness) drivers/infiniband/hw/ipath/ipath_file_ops.c:1654:47: expected unsigned int [usertype] *maxportsp drivers/infiniband/hw/ipath/ipath_file_ops.c:1654:47: got int *<noident> Signed-off-by: Arthur Jones <arthur.jones@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Fix IB compliance problems with link state vs physical stateRalph Campbell2008-03-111-0/+1
| | | | | | | | | | | | | | 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: Changes to support PIO bandwidth check on IBA7220Dave Olson2008-01-251-0/+2
| | | | | | | | | | | 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-251-3/+2
| | | | | | | 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-251-0/+3
| | | | | | | | | 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-251-1/+87
| | | | | | | | | 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-251-29/+0
| | | | | | | | 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: Add ipath_read_ireg() abstractionArthur Jones2008-01-251-0/+8
| | | | | | | | 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-251-0/+1
| | | | | | | | | 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-251-0/+3
| | | | | | | | | | 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-251-2/+4
| | | | | | | | | 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: Export hardware counters more consistentlyRalph Campbell2008-01-251-0/+2
| | | | | | | | | | | 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-251-0/+9
| | | | | | | | 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-251-10/+6
| | | | | | | | | 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-251-0/+6
| | | | | | | | | | 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-251-3/+14
| | | | | | | | 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: Fix sendctrl lockingJohn Gregor2008-01-251-0/+1
| | | | | | | | 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-251-4/+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-251-1/+2
| | | | | | | | 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>
* Infiniband: make ipath driver use default driver groups.Greg Kroah-Hartman2008-01-241-2/+1
| | | | | | | | | | | | | | | | 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 IB_EVENT_PORT_ERR eventRalph Campbell2007-10-091-0/+2
| | | | | | | | | | 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>
* IB/ipath: Use counters in ipath_poll and cleanup interrupts in ipath_closeArthur Jones2007-10-091-2/+6
| | | | | | | | | | | | | | | | ipath_poll() suffered from a couple subtle bugs. Under the right conditions we could leave recv interrupts enabled on an ipath user context on close, thereby taking potentially unwanted interrupts on the next open -- this is fixed by unconditionally turning off recv interrupts on close. Also, we now use counters rather than set/clear bits which allows us to make sure we catch all interrupts at the cost of changing the semantics slightly (it's now give me all events since the last time I called poll() rather than give me all events since I called _this_ poll routine). We also added some memory barriers which may help ensure we get all notifications in a timely manner. Signed-off-by: Arthur Jones <arthur.jones@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Performance optimization for CPU differencesRalph Campbell2007-10-091-0/+2
| | | | | | | | | Different processors have different ordering restrictions for write combining. By taking advantage of this, we can eliminate some write barriers when writing to the send buffers. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Workaround problem of errormask register being overwrittenDave Olson2007-07-301-9/+2
| | | | | | | | | | | | | | | On some system hardware, we are seeing moderately common cases of the chip errormask register being overwritten due to a chip bug in iba6120 that is triggered by a vendor-specific PCIe broadcast message. This patch merely checks periodically, and corrects it if needed (the overwrite can cause us to not get error and hardware error interrupts). Also, make dd->ipath_errormask the one, true canonical source for kr_errormask, and remove references to ipath_ignorederrs as it is currently unused. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: John Gregor <john.gregor@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Fix some issues with buffer cancel and sendctrl register updateDave Olson2007-07-301-1/+1
| | | | | | | | | | There was confused use of INFINIPATH_S_PIOBUFAVAILUPD (value) and IPATH_S_PIOBUFAVAILUPD (bit position). Also, some callers of ipath_cancel_sends() need kr_sendctrl restored, and some want to do it later. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Remove ipath_get_user_pages_nocopy()Roland Dreier2007-07-171-1/+0
| | | | | | It has no callers and is completely dead code. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Make a few functions staticRoland Dreier2007-07-171-1/+0
| | | | | | | | | | | | | | | | | Make some functions that are only used in a single .c file static. In addition to being a cleanup, this shrinks the generated code. On x86_64: add/remove: 1/3 grow/shrink: 2/1 up/down: 4777/-4956 (-179) function old new delta handle_errors - 3994 +3994 __verbs_timer 42 710 +668 ipath_do_ruc_send 2131 2246 +115 ipath_no_bufs_available 136 - -136 ipath_disarm_senderrbufs 639 - -639 ipath_ib_timer 658 - -658 ipath_intr 5878 2355 -3523 Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Test interrupts at driver startupArthur Jones2007-07-091-0/+5
| | | | | | | | | | All too often, interrupts do not get enabled for our card due to BIOS misconfiguration and other issues. This patch checks for that condition on startup and warns the user. This patch is based on work (check LID availability) by Robert Walsh. Signed-off-by: Arthur Jones <arthur.jones@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Remove support for preproduction HTX InfiniPath cardsRalph Campbell2007-07-091-4/+0
| | | | | | | Clean up some code by removing support for some older pre-production HTX InfiniPath cards. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
* IB/ipath: Be more cautious about coming out of freeze modeDave Olson2007-07-091-0/+1
| | | | | | | | | | We are more careful to be sure that we don't lose information about changes that occurred while we were in freeze mode, when the chip will not notify us, and try to avoid false error interrupts while doing cleanup. Put all of this logic in a new function ipath_clear_freeze(). Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Update copyright datesJohn Gregor2007-07-091-1/+1
| | | | | | | | Now that it's June, it's about time to update the copyright notices of files that have changed. Signed-off-by: John Gregor <john.gregor@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
OpenPOWER on IntegriCloud