aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband (follow)
AgeCommit message (Collapse)AuthorFilesLines
2008-04-16IB/ipath: Isolate 7220-specific contentMichael Albaugh1-0/+57
This patch adds a new ASIC-specific header file for the HCAs using the IBA7220. Signed-off-by: Michael Albaugh <Michael.Albaugh@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB/ipath: Header file changes to support IBA7220Ralph Campbell4-54/+282
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>
2008-04-16IB/ipath: Fix up error handlingRalph Campbell3-17/+66
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>
2008-04-16IB/ipath: Fix check for no interrupts to reliably fallback to INTxDave Olson3-22/+42
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>
2008-04-16IB/ipath: Enable reduced PIO update for HCAs that support it.Dave Olson3-1/+45
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>
2008-04-16IB/ipath: Set LID filtering for HCAs that support it.Dave Olson1-2/+7
Whenever the LID is set, notify the HCA specific code so that the appropriate HW registers can be updated. Also log the info on the console at low priority. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB/ipath: Add support for IBTA 1.2 HeartbeatDave Olson2-3/+30
This patch adds code to enable/disable the IBTA 1.2 heartbeat for testing if the HCA supports it. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB/ipath: Make link state transition code ignore (transient) link recoveryDave Olson1-1/+15
The hardware-based recovery doesn't need any intervention, and in a few cases we can get a bit confused about state and skip steps such as turning off the link state LED when we consider recovery to be "down". So ignore this transition, and either we recover in hardware, or we transition to down, and will handle it then. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB/ipath: Add support for 7220 receive queue changesRalph Campbell10-225/+305
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>
2008-04-16IB/ipath: Fix some white space and code style issuesRalph Campbell6-35/+38
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>
2008-04-16IB/ipath: Allow old and new diagnostic packet formatsMichael Albaugh1-2/+7
This patch checks for old and new format writes to send a packet via the diagnostic interface. Signed-off-by: Michael Albaugh <Michael.Albaugh@Qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB/core: Check optional verbs before using themDotan Barak1-1/+6
Make sure that a device implements the modify_srq and reg_phys_mr optional methods before calling them. Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB/ipath: Fix time comparison to use time_after_eq()Robert P. J. Day1-1/+2
Raw comparison against jiffies will fail if jiffies wraps, although since ipath currently only supports 64-bit architectures, this is rather far-fetched. Still, it's better to use time_after_eq(). Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB/mlx4: Micro-optimize mlx4_ib_post_send()Roland Dreier1-8/+8
Rather than have build_mlx_header() return a negative value on failure and the length of the segments it builds on success, add a pointer parameter to return the length and return 0 on success. This matches the calling convention used for build_lso_seg() and generates slightly smaller code -- eg, on 64-bit x86: add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-22 (-22) function old new delta mlx4_ib_post_send 2023 2001 -22 Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB/mlx4: Add IPoIB LSO supportEli Cohen4-9/+73
Add TSO support to the mlx4_ib driver. Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IPoIB: Add LSO supportEli Cohen5-36/+92
For HCAs that support TCP segmentation offload (IB_DEVICE_UD_TSO), set NETIF_F_TSO and use HW LSO to offload TCP segmentation. Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB/core: Add creation flags to struct ib_qp_init_attrEli Cohen7-0/+21
Add a create_flags member to struct ib_qp_init_attr that will allow a kernel verbs consumer to create a pass special flags when creating a QP. Add a flag value for telling low-level drivers that a QP will be used for IPoIB UD LSO. The create_flags member will also be useful for XRC and ehca low-latency QP support. Since no create_flags handling is implemented yet, add code to all low-level drivers to return -EINVAL if create_flags is non-zero. Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB/ipath: EEPROM support for 7220 devices, robustness improvements, cleanupMichael Albaugh3-67/+439
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>
2008-04-16IB/ipath: Use PIO buffer for RC ACKsRalph Campbell1-18/+39
This reduces the latency for RC ACKs when a PIO buffer is available. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB/ipath: Make send buffers available for kernel if not allocated to userRalph Campbell8-145/+225
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>
2008-04-16IB/ipath: Prevent link-recovery code from negating admin disableMichael Albaugh6-29/+55
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>
2008-04-16IB/ipath: Remove some useless (void) castsRalph Campbell2-9/+9
Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB/ipath: Change the module authorRalph Campbell1-1/+1
Update the module author to the current email address. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16RDMA/nes: Use more concise list_for_each_entry()Robert P. J. Day1-6/+2
In list iteration code, you normally wouldn't be calling "container_of()" directly anyway, you'd be invoking "list_entry()". But you don't even need that here, "list_for_each_entry()" is fine. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Acked-by: Glenn Streiff <gstreiff@neteffect.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB: Use shorter list_splice_init() for brevityRobert P. J. Day2-4/+2
Convert list_splice() + INIT_LIST_HEAD() to the equivalent list_splice_init() Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16RDMA/iwcm: Test rdma_create_id() for IS_ERR rather than 0Julia Lawall1-1/+1
The function rdma_create_id() always returns either a valid pointer or a value made with ERR_PTR, so its result should be tested with IS_ERR, not with a test for 0. The problem was found using the following semantic match. (http://www.emn.fr/x-info/coccinelle/) //<smpl> @a@ expression E, E1; statement S,S1; position p; @@ E = rdma_create_id(...) ... when != E = E1 if@p (E) S else S1 @n@ position a.p; expression E,E1; statement S,S1; @@ E = NULL ... when != E = E1 if@p (E) S else S1 @depends on !n@ expression E; statement S,S1; position a.p; @@ * if@p (E) S else S1 //</smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16RDMA/nes: Remove session_id from nes_cm stuffRoland Dreier2-9/+0
The session_id members of struct nes_cm_listener and struct nes_cm_node are write-only, so remove them. This allows the session_id member of struct nes_cm_core to be removed as well, since it is only used to write those other session_id values. This removes the use of current->tgid (which will be deprecated) pointed out by Pavel Emelyanov <xemul@openvz.org>. Acked-by: Glenn Streiff <gstreiff@neteffect.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB/ipath: Fix PCI config write size used to clear linkctrl error bitsRoland Dreier1-1/+1
In slave_or_pri_blk(), pci_write_config_byte() is used to write a 16-bit quantity to clear linkctrl CRC error bits. This is clearly a bug and also causes the warning drivers/infiniband/hw/ipath/ipath_iba6110.c: In function 'slave_or_pri_blk': drivers/infiniband/hw/ipath/ipath_iba6110.c:849: warning: overflow in implicit constant conversion Fix this by using pci_write_config_word() instead. Acked-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB/ipath: Fix sanity checks on QP number of WRs and SGEsRalph Campbell1-10/+16
The receive queue number of WRs and SGEs shouldn't be checked if a SRQ is specified. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB/ipath: Remove useless commentsRalph Campbell1-2/+0
Remove useless comment about list removal since locks are held and the code checks that the QP is on the list before removing it. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB/ipath: HW workaround for case where chip can send but not receiveDave Olson3-0/+24
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>
2008-04-16IB/ipath: Add code to support multiple link speeds and widthsRalph Campbell3-33/+69
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>
2008-04-16IB/ipath: Head of Line blocking vs forward progress of user appsJohn Gregor7-182/+310
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>
2008-04-16IB/ipath: Make debug error message match the constraint that is checked forRalph Campbell1-1/+1
Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB/ipath: Don't try to handle freeze mode HW errors if diagnostic modeRalph Campbell1-1/+1
Don't try to handle freeze mode HW errors if the driver is in diagnostic mode since some tests can cause errors that shouldn't be processed. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB/ipath: Fix link up LED displayArthur Jones1-1/+1
The check for link up was incorrect, thus setting the LED display inconsistently with the link state. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB/ipath: Fix error recovery for send buffer status after chip freeze modeRalph Campbell1-1/+2
The error recovery code for updating the driver's cached status information for which send buffers are busy or free wasn't updated for IBA7220. It should be similar to the initialization code in enable_chip(). Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB/ipath: Fix byte order of pioavail in handle_errors()Ralph Campbell1-3/+3
Fix byte order of value assigned to pioavailshadow. This bug was detected by sparse endianness warnings. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB/mthca: Avoid integer overflow when allocating huge ICM tableRoland Dreier1-1/+3
In mthca_alloc_icm_table(), the number of entries to allocate for the table->icm array is computed by calculating obj_size * nobj and then dividing by MTHCA_TABLE_CHUNK_SIZE. If nobj is really large, then obj_size * nobj may overflow and the division may get the wrong value (even a negative value). Fix this by calculating the number of objects per chunk and then dividing nobj by this value instead. This patch allows crazy configurations such as loading ib_mthca with the module parameter num_mtt=33554432 to work properly. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB/mthca: Avoid integer overflow when dealing with profile sizeRoland Dreier3-7/+10
mthca_make_profile() returns the size in bytes of the HCA context layout it creates, or a negative value if an error occurs. However, the return value is declared as u64 and the memfree initialization path casts this value to int to test if it is negative. This makes it think incorrectly than an error has occurred if the context size happens to be bigger than 2GB, since this turns into a negative int. Fix this by having mthca_make_profile() return an s64 and testing for an error by checking whether this 64-bit value itself is negative. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB/ehca: Remove tgid checkingHoang-Nam Nguyen7-162/+0
Pavel Emelyanov <xemul@openvz.org> mentioned in <http://lkml.org/lkml/2008/3/17/131> that the task_struct->tgid field is about to become deprecated, so the uses in the ehca driver need to be fixed up. However, all the uses in ehca are for some object ownership checking that is not really needed, and anyway is implementing a policy that should be in common code rather than a low-level driver. So just remove all the checks. Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB/srp: Enforce protocol limit on srp_sg_tablesizeDavid Dillow1-1/+6
The current SRP initiator will allow unlimited s/g entries in the indirect descriptors lists, but the entry count field in the SRP_CMD request is 8 bits, so setting srp_sg_tablesize too large will open the possibility of wrapping the count and generating invalid requests. Clamp srp_sg_tablesize to the protocol limits to prevent surprises. Reported by Martin W. Schlining III <mschlining@datadirectnet.com>. Signed-off-by: David Dillow <dillowda@ornl.gov> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB/ipath: Enable 4KB MTUDave Olson8-65/+45
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>
2008-04-16IB/ipath: Shared context code needs to be sure device is usableDave Olson1-1/+1
The code was checking if units are present, but not that present units were usable (link up, etc.) Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB/ipath: Provide I/O bus speeds for diagnostic purposesArthur Jones4-23/+85
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>
2008-04-16IB/ipath: Make some constants chip-specific, related cleanupDave Olson3-30/+35
This patch makes some constants chip-specific, and makes some related changes to prepare for supporting another HCA. Signed-off-by: Dave Olson <dave.olson@qlogic.com Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB/ipath: Misc sparse warning cleanupArthur Jones2-4/+7
Recent sparse versions and kernel cleanups knock down the false positive rate of the ipath driver code to a point where having it be sparse clean is worthwhile. Here we fixup the sparse warnings. Some of these warnings (and the impetus to run sparse again) are due to work by Roland Dreier. Signed-off-by: Arthur Jones <arthur.jones@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB/mthca: Add IPoIB checksum offload supportEli Cohen6-13/+30
Arbel and Sinai devices support checksum generation and verification of TCP and UDP packets for UD IPoIB messages. This patch checks if the HCA supports this and sets the IB_DEVICE_UD_IP_CSUM capability flag if it does. It implements support for handling the IB_SEND_IP_CSUM send flag and setting the csum_ok field in receive work completions. Signed-off-by: Eli Cohen <eli@mellnaox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IB/mlx4: Add IPoIB checksum offload supportEli Cohen3-0/+21
ConnectX devices support checksum generation and verification of TCP and UDP packets for UD IPoIB messages. This patch checks if the HCA supports this and sets the IB_DEVICE_UD_IP_CSUM capability flag if it does. It implements support for handling the IB_SEND_IP_CSUM send flag and setting the csum_ok field in receive work completions. Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Ali Ayub <ali@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16IPoIB: Use checksum offload support if availableEli Cohen4-1/+41
For HCAs that support checksum offload (ie that set IB_DEVICE_UD_IP_CSUM in the device capabilities flags), have IPoIB set NETIF_F_IP_CSUM and use the HCA to generate and verify IP checksums. Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>