aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* Merge branch 'semaphore' of ↵Linus Torvalds2008-04-18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc * 'semaphore' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc: Remove DEBUG_SEMAPHORE from Kconfig Improve semaphore documentation Simplify semaphore implementation Add down_timeout and change ACPI to use it Introduce down_killable() Generic semaphore implementation Add semaphore.h to kernel_lock.c Fix quota.h includes
| * Remove DEBUG_SEMAPHORE from KconfigMatthew Wilcox2008-04-17
| | | | | | | | | | | | | | | | Alpha and FRV mutexes had an option to print lots of debugging messages in their semaphore implementation. This feature has not been carried over to the generic semaphores, so remove the stale Kconfig option. Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
| * Improve semaphore documentationMatthew Wilcox2008-04-17
| | | | | | | | | | | | | | | | Move documentation from semaphore.h to semaphore.c as requested by Andrew Morton. Also reformat to kernel-doc style and add some more notes about the implementation. Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
| * Simplify semaphore implementationMatthew Wilcox2008-04-17
| | | | | | | | | | | | | | | | | | By removing the negative values of 'count' and relying on the wait_list to indicate whether we have any waiters, we can simplify the implementation by removing the protection against an unlikely race condition. Thanks to David Howells for his suggestions. Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
| * Add down_timeout and change ACPI to use itMatthew Wilcox2008-04-17
| | | | | | | | | | | | | | | | | | ACPI currently emulates a timeout for semaphores with calls to down_trylock and sleep. This produces horrible behaviour in terms of fairness and excessive wakeups. Now that we have a unified semaphore implementation, adding a real down_trylock is almost trivial. Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
| * Introduce down_killable()Matthew Wilcox2008-04-17
| | | | | | | | | | | | down_killable() is the functional counterpart of mutex_lock_killable. Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
| * Generic semaphore implementationMatthew Wilcox2008-04-17
| | | | | | | | | | | | | | | | | | | | | | Semaphores are no longer performance-critical, so a generic C implementation is better for maintainability, debuggability and extensibility. Thanks to Peter Zijlstra for fixing the lockdep warning. Thanks to Harvey Harrison for pointing out that the unlikely() was unnecessary. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Acked-by: Ingo Molnar <mingo@elte.hu>
| * Add semaphore.h to kernel_lock.cMatthew Wilcox2008-04-17
| | | | | | | | | | | | | | | | kernel_lock.c uses DECLARE_MUTEX, up() and down() without explicitly including asm/semaphore.h. This is fragile and leaves it vulnerable to breakage during header reorganisations. Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
| * Fix quota.h includesMatthew Wilcox2008-04-17
| | | | | | | | | | | | | | | | | | | | quota.h currently relies on asm/semaphore.h (through some chain; it doesn't actually include semaphore.h itself) to include wait.h. As well as being bad practice to rely on an implicit include, subsequent patches will break this. While I'm in this file, add atomic.h and list.h, and sort the list of includes. Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
* | Merge branch 'for-linus' of ↵Linus Torvalds2008-04-18
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (104 commits) IB/iser: Don't change itt endianness IB/mlx4: Update module version and release date IPoIB: Handle case when P_Key is deleted and re-added at same index IB/iser: Release connection resources on RDMA_CM_EVENT_DEVICE_REMOVAL event IB/mlx4: Fix incorrect comment IB/mlx4: Fix race when detaching a QP from a multicast group IB/ehca: Support all ibv_devinfo values in query_device() and query_port() RDMA/nes: Free IRQ before killing tasklet IB/mthca: Update module version and release date IB/mlx4: Update QP state if query QP succeeds IB/mthca: Update QP state if query QP succeeds RDMA/amso1100: Add check for NULL reply_msg in c2_intr() IB/mlx4: Add support for resizing CQs IB/mlx4: Add support for modifying CQ moderation parameters IPoIB: Support modifying IPoIB CQ event moderation IB/core: Add support for modify CQ IPoIB: Add basic ethtool support mlx4_core: Increase max number of QPs to 128K RDMA/amso1100: Add support for "send with invalidate" work requests IB/core: Add support for "send with invalidate" work requests ...
| * | IB/iser: Don't change itt endiannessErez Zilber2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/mlx4: Fix incorrect commentEli Cohen2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | mlx4 hardware does not support external DDR memory. Moreover, UAR area (BAR 2) can change depending on FW version. Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * | IB/mlx4: Fix race when detaching a QP from a multicast groupEli Cohen2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When detaching the last QP from an MCG entry, we need to make sure that at any time, there will be no entry with zero number of QPs which is linked to the list of the MCGs of the corresponding hash index. So don't write back the MCG entry if we are removing the last QP; just unlink the entry. Also, remove an unnecessary MCG read when attaching a QP requires allocation of a new entry in the AMGM. Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * | IB/ehca: Support all ibv_devinfo values in query_device() and query_port()Stefan Roscher2008-04-17
| | | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | | 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>
| * | mlx4_core: Increase max number of QPs to 128KJack Morgenstein2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | With the advent large clusters which utilize multicore hosts, 64K QPs is not enough. We should increase the default maximum for QPs to 128K. Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * | RDMA/amso1100: Add support for "send with invalidate" work requestsRoland Dreier2008-04-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-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | | 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>
| * | IB/ipath: Isolate 7220-specific contentMichael Albaugh2008-04-17
| | | | | | | | | | | | | | | | | | | | | 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>
| * | IB/ipath: Header file changes to support IBA7220Ralph Campbell2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Set LID filtering for HCAs that support it.Dave Olson2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | IB/ipath: Add support for IBTA 1.2 HeartbeatDave Olson2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | IB/ipath: Make link state transition code ignore (transient) link recoveryDave Olson2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | IB/ipath: Add support for 7220 receive queue changesRalph Campbell2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | | | | | 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: Allow old and new diagnostic packet formatsMichael Albaugh2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | 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>