summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
Commit message (Collapse)AuthorAgeFilesLines
* RDMA/nes: Remove volatile qualifier from struct nes_hw_cq.cq_vbaseRoland Dreier2008-04-232-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | Remove the volatile qualifier from the cq_vbase member of struct nes_hw_cq, and add an rmb() in the one place where it looks like access order might make a difference. As usual, removing a volatile qualifier in a declaration is actually a bug fix, since a volatile qualifier is not sufficient to make sure that aggressively out-of-order CPUs don't reorder things and cause incorrect results. For example, a CPU might speculatively execute reads of other cqe fields before the NIC hardware has written those fields and before it has set the NES_CQE_VALID bit (even though those reads come after the test of the NES_CQE_VALID bit in program order), but then when the CPU actually executes the conditional test of the NES_CQE_VALID, the bit has been set, and the CPU will proceed with the results of the earlier speculative execution and end up using bogus data. This also gets rid of the warning: drivers/infiniband/hw/nes/nes_verbs.c: In function 'nes_destroy_cq': drivers/infiniband/hw/nes/nes_verbs.c:1978: warning: passing argument 3 of 'pci_free_consistent' discards qualifiers from pointer target type Signed-off-by: Roland Dreier <rolandd@cisco.com>
* mlx4_core: Move kernel doorbell management into coreYevgeny Petrilin2008-04-236-160/+16
| | | | | | | | | In addition to mlx4_ib, there will be ethernet and FC consumers of mlx4_core, so move the code for managing kernel doorbells into the core module to avoid having to duplicate this multiple times. Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ehca: Bump version number to 0026Joachim Fenkes2008-04-231-1/+1
| | | | | Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ehca: Make some module parameters bool, update descriptionsJoachim Fenkes2008-04-231-19/+18
| | | | | Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ehca: Remove mr_largepage parameterJoachim Fenkes2008-04-231-19/+3
| | | | | | | Always enable large page support; didn't seem to cause problems for anyone. Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ehca: Move high-volume debug output to higher debug levelsJoachim Fenkes2008-04-237-56/+63
| | | | | Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ehca: Prevent posting of SQ WQEs if QP not in RTSJoachim Fenkes2008-04-233-0/+9
| | | | | | | ...as required by IB Spec, C10-29. Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IPoIB: Handle 4K IB MTU for UD (datagram) modeShirley Ma2008-04-236-49/+134
| | | | | | | | | | | This patch enables IPoIB to use 4K UD messages (when the underlying device and fabrics support a 4K MTU) by using two scatter buffers when PAGE_SIZE is less than or equal to thhe HCA IB MTU size. The first buffer is for IPoIB header + GRH header, and the second buffer is the IPoIB payload, which is 4K-4. Signed-off-by: Shirley Ma <xma@us.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* RDMA/nes: Fix adapter reset after PXE bootChien Tung2008-04-232-13/+13
| | | | | | | | | | | | | | | | After PXE boot, the iw_nes driver does a full reset to ensure the card is in a clean state. However, it doesn't wait for firmware to complete its work before issuing a port reset to enable the ports, which leads to problems bringing up the ports. The solution is to wait for firmware to complete its work before proceeding with port reset. This bug was flagged by Roland Dreier <rolandd@cisco.com>. Cc: <stable@kernel.org> Signed-off-by: Chien Tung <ctung@neteffect.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* RDMA/nes: Print IPv4 addresses in a readable formatRoland Dreier2008-04-233-9/+13
| | | | | | | | Use NIPQUAD_FMT instead of printing raw 32-bit hex quantities in debugging output. Acked-by: Glenn Streiff <gstreiff@neteffect.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* RDMA/nes: Use print_mac() to format ethernet addresses for printingRoland Dreier2008-04-233-21/+15
| | | | | | | | | | | | | | | Removing open-coded MAC formats shrinks the source and the generated code too, eg on x86-64: add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-103 (-103) function old new delta make_cm_node 932 912 -20 nes_netdev_set_mac_address 427 406 -21 nes_netdev_set_multicast_list 1148 1124 -24 nes_probe 2349 2311 -38 Acked-by: Glenn Streiff <gstreiff@neteffect.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Correct capitalization "IntX" -> "INTx"Roland Dreier2008-04-212-6/+6
| | | | | | Match what the PCI specification uses. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Remove tests of PCI_MSI in ipath_iba7220.cRoland Dreier2008-04-211-9/+4
| | | | | | | | The PCI MSI interface is stubbed out properly so that all the functions just return failure if PCI_MSI=n, so there's no reason to have "#ifdef CONFIG_PCI_MSI" blocks in ipath_iba7220.c. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Remove dependency on PCI_MSI || HT_IRQRoland Dreier2008-04-211-1/+1
| | | | | | | | | Before IBA7220 support was added, the ipath driver didn't support any hardware unless PCI_MSI and/or HT_IRQ was enabled. However, the IBA7220 can generate INTx interrupts, so it makes sense to allow the driver to be build even if PCI_MSI=n and HT_IRQ=n. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Build IBA7220 code unconditionallyRoland Dreier2008-04-211-2/+4
| | | | | | | | | | | | | | | The new IBA7220 code added a call to ipath_init_iba7220_funcs() that is compiled unconditionally, but only built the IBA7220 code if PCI_MSI is enabled. Fix this by building the IBA7220 file unconditonally. This fixes build breakage when PCI_MSI=n, HT_IRQ=y and INFINIBAND_IPATH=y reported by Ingo Molnar <mingo@elte.hu>: drivers/built-in.o: In function `ipath_init_one': ipath_driver.c:(.devinit.text+0x1e5bc): undefined reference to `ipath_init_iba7220_funcs' Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Remove reference to dev->class_dev ↵Roland Dreier2008-04-211-1/+0
| | | | | | | | | | | Commit 124b4dcb ("IB/ipath: add calls to new 7220 code and enable in build") inadvertently added core to set dev->class_dev.dev back into ib_ipath. This is completely redundant since commit 1912ffbb ("IB: Set class_dev->dev in core for nice device symlink"), which removed class_dev setting from low-level drivers, and also will break the build when class_dev is removed completely from struct ib_device. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Fix module parameter description for disable_smaPaul Bolle2008-04-211-1/+1
| | | | | | | | | | Describe disable_sma parameter with its name rather than the internal ib_ipath_disable_sma variable name, so that the description shows up properly in modinfo. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Acked-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* RDMA/nes: Remove unneeded function declarationsRoland Dreier2008-04-212-15/+0
| | | | | | | Remove redundant static declarations of functions that are defined before they are used in the source. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6Linus Torvalds2008-04-2116-404/+450
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6: (36 commits) SCSI: convert struct class_device to struct device DRM: remove unused dev_class IB: rename "dev" to "srp_dev" in srp_host structure IB: convert struct class_device to struct device memstick: convert struct class_device to struct device driver core: replace remaining __FUNCTION__ occurrences sysfs: refill attribute buffer when reading from offset 0 PM: Remove destroy_suspended_device() Firmware: add iSCSI iBFT Support PM: Remove legacy PM (fix) Kobject: Replace list_for_each() with list_for_each_entry(). SYSFS: Explicitly include required header file slab.h. Driver core: make device_is_registered() work for class devices PM: Convert wakeup flag accessors to inline functions PM: Make wakeup flags available whenever CONFIG_PM is set PM: Fix misuse of wakeup flag accessors in serial core Driver core: Call device_pm_add() after bus_add_device() in device_add() PM: Handle device registrations during suspend/resume block: send disk "change" event for rescan_partitions() sysdev: detect multiple driver registrations ... Fixed trivial conflict in include/linux/memory.h due to semaphore header file change (made irrelevant by the change to mutex).
| * SCSI: convert struct class_device to struct deviceTony Jones2008-04-192-62/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | It's big, but there doesn't seem to be a way to split it up smaller... 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> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * IB: rename "dev" to "srp_dev" in srp_host structureGreg Kroah-Hartman2008-04-192-24/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This sets us up to be able to convert the srp_host to use a struct device instead of a class_device. Based on a original patch from Tony Jones, but split up into this piece by Greg. Signed-off-by: Tony Jones <tonyj@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Reviewed-by: 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: convert struct class_device to struct deviceTony Jones2008-04-1914-318/+351
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Convert asm/semaphore.h users to linux/semaphore.hMatthew Wilcox2008-04-182-3/+2
| | | | | | | | Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
* | drivers: Remove unnecessary inclusions of asm/semaphore.hMatthew Wilcox2008-04-182-2/+0
|/ | | | | | | | | None of these files use any of the functionality promised by asm/semaphore.h. It's possible that they rely on it dragging in some unrelated header file, but I can't build all these files, so we'll have fix any build failures as they come up. Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
* IB/iser: Don't change itt endiannessErez Zilber2008-04-161-2/+2
| | | | | | | | | The itt field in struct iscsi_data is not defined with any particular endianness. open-iscsi should use it as-is without byte-swapping it. This fixes sparse warnings coming from doing ntohl(hdr->itt). Signed-off-by: Erez Zilber <erezz@voltaire.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mlx4: Update module version and release dateJack Morgenstein2008-04-161-2/+2
| | | | | | | | The mlx4_ib driver is stable enough for production use, so bump the version number to 1.0 to indicate this. Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IPoIB: Handle case when P_Key is deleted and re-added at same indexRoland Dreier2008-04-162-7/+7
| | | | | | | | | | | | | | | | | | | | | If a P_Key is deleted and then re-added at the same index, then IPoIB gets confused because __ipoib_ib_dev_flush() only checks whether the index is the same without checking whether the P_Key was present, so the interface is stopped when the P_Key is deleted, but the event when the P_Key is re-added gets ignored and the interface never gets restarted. Also, switch to using ib_find_pkey() instead of ib_find_cached_pkey() everywhere in IPoIB, since none of the places that look for P_Keys are in a fast path or in non-sleeping context, and in general we want to kill off the whole caching infrastructure eventually. This also fixes consistency problems caused because some IPoIB queries were cached and some were uncached during the window where the cache was not updated. Thanks to Venkata Subramonyam <vsubramo@cisco.com> for debugging this problem and testing this fix. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/iser: Release connection resources on RDMA_CM_EVENT_DEVICE_REMOVAL eventErez Zilber2008-04-161-4/+1
| | | | | | | | | | | When a RDMA_CM_EVENT_DEVICE_REMOVAL event is raised, iSER should release the connection resources. This is necessary when the IB HCA module is unloaded while open-iscsi is still running. Currently, iSER just BUG()s. Signed-off-by: Erez Zilber <erezz@voltaire.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ehca: Support all ibv_devinfo values in query_device() and query_port()Stefan Roscher2008-04-161-48/+79
| | | | | | | Also, introduce a few inline helper functions to make the code more readable. Signed-off-by: Stefan Roscher <stefan.roscher@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* RDMA/nes: Free IRQ before killing taskletRoland Dreier2008-04-161-2/+2
| | | | | | | | | | Move the free_irq() call in nes_remove() to before the tasklet_kill(); otherwise there is a window after tasklet_kill() where a new interrupt can be handled and reschedule the tasklet, leading to a use-after-free crash. Cc: <stable@kernel.org> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Update module version and release dateJack Morgenstein2008-04-161-2/+2
| | | | | | | | The ib_mthca driver has been stable for a while, so bump the version number to 1.0 to indicate this. Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mlx4: Update QP state if query QP succeedsDotan Barak2008-04-161-5/+12
| | | | | | | | | If the QP was moved to another state (such as SQE) by the hardware, then after this change the user won't have to set the IBV_QP_CUR_STATE mask in order to execute modify QP in order to recover from this state. Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Update QP state if query QP succeedsDotan Barak2008-04-161-6/+14
| | | | | | | | | If the QP was moved to another state (such as SQE) by the hardware, then after this change the user won't have to set the IBV_QP_CUR_STATE mask in order to execute modify QP in order to recover from this state. Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* RDMA/amso1100: Add check for NULL reply_msg in c2_intr()Tom Tucker2008-04-162-3/+7
| | | | | | | | | Fix a place where we might dereference a NULL pointer; this fixes Coverity CID 1392. On inspection I also found a place where we could attempt to kmem_cache_free() a NULL pointer, so fix this too. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mlx4: Add support for resizing CQsVladimir Sokolovsky2008-04-163-33/+270
| | | | | Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mlx4: Add support for modifying CQ moderation parametersEli Cohen2008-04-163-0/+10
| | | | | Signed-off-by: Eli Cohen <eli@mellnaox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IPoIB: Support modifying IPoIB CQ event moderationEli Cohen2008-04-162-0/+52
| | | | | | | | | | | This can be used to tune at run time the parameters controlling the event (interrupt) generation rate and thus reduce the overhead incurred by handling interrupts resulting in better throughput. Since IPoIB uses a single CQ for both RX and TX, RX is chosen to dictate configuration for both RX and TX. Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/core: Add support for modify CQEli Cohen2008-04-161-0/+7
| | | | | | | | Add support for modifying CQ parameters for controlling event generation moderation. Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IPoIB: Add basic ethtool supportEli Cohen2008-04-164-1/+59
| | | | | | | Just add the infrastructure so we can add functionality later. Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* RDMA/amso1100: Add support for "send with invalidate" work requestsRoland Dreier2008-04-162-8/+17
| | | | | | | | Handle IB_WR_SEND_WITH_INV work requests. This resurrects a patch sent long ago by Mikkel Hagen <mhagen@iol.unh.edu>. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/core: Add support for "send with invalidate" work requestsRoland Dreier2008-04-1612-26/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new IB_WR_SEND_WITH_INV send opcode that can be used to mark a "send with invalidate" work request as defined in the iWARP verbs and the InfiniBand base memory management extensions. Also put "imm_data" and a new "invalidate_rkey" member in a new "ex" union in struct ib_send_wr. The invalidate_rkey member can be used to pass in an R_Key/STag to be invalidated. Add this new union to struct ib_uverbs_send_wr. Add code to copy the invalidate_rkey field in ib_uverbs_post_send(). Fix up low-level drivers to deal with the change to struct ib_send_wr, and just remove the imm_data initialization from net/sunrpc/xprtrdma/, since that code never does any send with immediate operations. Also, move the existing IB_DEVICE_SEND_W_INV flag to a new bit, since the iWARP drivers currently in the tree set the bit. The amso1100 driver at least will silently fail to honor the IB_SEND_INVALIDATE bit if passed in as part of userspace send requests (since it does not implement kernel bypass work request queueing). Remove the flag from all existing drivers that set it until we know which ones are OK. The values chosen for the new flag is not consecutive to avoid clashing with flags defined in the XRC patches, which are not merged yet but which are already in use and are likely to be merged soon. This resurrects a patch sent long ago by Mikkel Hagen <mhagen@iol.unh.edu>. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Update copyright dates for files changed in 2008Ralph Campbell2008-04-1618-18/+18
| | | | | 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-1613-136/+896
| | | | | | | | | 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-166-34/+83
| | | | | | | | | | | 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: User mode send DMAArthur Jones2008-04-161-0/+879
| | | | | | | | | A new file which allows the IBA7220 send DMA engine to be used from userland. The routines here are not linked in yet, that will happen in a follow-on patch... Signed-off-by: Arthur Jones <arthur.jones@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: User mode send DMA header fileArthur Jones2008-04-161-0/+54
| | | | | | | | | A new header file which allows the IBA7220 send DMA engine to be used from userland. The definitions here are not used yet, that will happen in a follow-on patch... Signed-off-by: Arthur Jones <arthur.jones@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Add code for IBA7220 send DMAJohn Gregor2008-04-161-0/+743
| | | | | | | | | The IBA7220 HCA has a new feature to DMA data to the on chip send buffers instead of or in addition to the host CPU doing the data transfer. This patch adds code to support the send DMA queue. Signed-off-by: John Gregor <john.gregor@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Add IBA7220-specific SERDES initialization dataRalph Campbell2008-04-161-0/+1082
| | | | | | | This patch adds binary data to initialize the IB SERDES. Signed-off-by: Michael Albaugh <Michael.Albaugh@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: Support for SerDes portion of IBA7220Michael Albaugh2008-04-161-0/+1462
| | | | | | | | The control and initialization of the SerDes blocks of the IBA7220 is sufficiently complex to merit a separate file. Signed-off-by: Michael Albaugh <Michael.Albaugh@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: HCA-specific code to support IBA7220Ralph Campbell2008-04-161-0/+2571
| | | | | | | This patch adds the HCA-specific code for the IBA7220 HCA. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
OpenPOWER on IntegriCloud