summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
Commit message (Collapse)AuthorAgeFilesLines
* [PATCH] changing CONFIG_LOCALVERSION rebuilds too much, for no good reasonOlaf Hering2005-11-091-1/+0
| | | | | | | | | | | | | | | | | | | | | This patch removes almost all inclusions of linux/version.h. The 3 #defines are unused in most of the touched files. A few drivers use the simple KERNEL_VERSION(a,b,c) macro, which is unfortunatly in linux/version.h. There are also lots of #ifdef for long obsolete kernels, this was not touched. In a few places, the linux/version.h include was move to where the LINUX_VERSION_CODE was used. quilt vi `find * -type f -name "*.[ch]"|xargs grep -El '(UTS_RELEASE|LINUX_VERSION_CODE|KERNEL_VERSION|linux/version.h)'|grep -Ev '(/(boot|coda|drm)/|~$)'` search pattern: /UTS_RELEASE\|LINUX_VERSION_CODE\|KERNEL_VERSION\|linux\/\(utsname\|version\).h Signed-off-by: Olaf Hering <olh@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] kfree cleanup: misc remaining driversJesper Juhl2005-11-071-4/+2
| | | | | | | | | | | | | | | | | | This is the remaining misc drivers/ part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in misc files in drivers/. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Acked-by: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org> Acked-by: Roland Dreier <rolandd@cisco.com> Acked-by: Pierre Ossman <drzeus@drzeus.cx> Acked-by: Jean Delvare <khali@linux-fr.org> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: Len Brown <len.brown@intel.com> Acked-by: "Antonino A. Daplas" <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] fix remaining missing includesTim Schmielau2005-11-077-0/+16
| | | | | | | | | | Fix more include file problems that surfaced since I submitted the previous fix-missing-includes.patch. This should now allow not to include sched.h from module.h, which is done by a followup patch. Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Merge branch 'srp' of ↵Linus Torvalds2005-11-046-0/+1865
|\ | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
| * IB: Add SCSI RDMA Protocol (SRP) initiatorRoland Dreier2005-11-026-0/+1865
| | | | | | | | | | | | | | Add an InfiniBand SCSI RDMA Protocol (SRP) initiator. This driver is used to talk talk to InfiniBand SRP targets (storage devices). Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | Merge branch 'for-linus' of ↵Linus Torvalds2005-11-0424-118/+165
|\ \ | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
| * | [IB] mthca: check P_Key index in modify QPJack Morgenstein2005-11-031-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | Make sure that the P_Key index passed into mthca_modify_qp() is within the device's P_Key table. Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * | [IB] umad: fix hot remove of IB devicesRoland Dreier2005-11-031-16/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix hotplug of devices for ib_umad module: when a device goes away, kill off all MAD agents for open files associated with that device, and make sure that the device is not touched again after ib_umad returns from its remove_one function. Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * | [IB] mthca: fix format of FW versionRoland Dreier2005-11-022-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Mellanox has decided that the components of the firmware version are really meant to be displayed in decimal, e.g. 0x000400070190 is version 4.7.400. Change the format we use from "%x.%x.%x" to "%d.%d.%d" to match this convention. Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * | [IPoIB] don't compile debug code if debugging isn't enabledRoland Dreier2005-11-023-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Don't build ipoib_mcast_iter_ functions if CONFIG_INFINIBAND_IPOIB_DEBUG is not enabled -- their only callers will not be built either. Also move the prototype for ipoib_open() to ipoib.h to fix a sparse warning. Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * | [IPoIB] remove unneeded initializations to 0Roland Dreier2005-11-021-9/+2
| | | | | | | | | | | | | | | | | | | | | Shrink our source and .text a little by removing a few assignments of NULL and 0 to memory that is already cleared as part of the allocation. Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * | [IB] kzalloc() conversionsRoland Dreier2005-11-0211-62/+27
| | | | | | | | | | | | | | | | | | | | | Replace kmalloc()+memset(,0,) with kzalloc(), for a net savings of 35 source lines and about 500 bytes of text. Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * | [IPoIB] cleanups: fix comment, remove useless variablesRoland Dreier2005-10-312-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | Minor cleanups: fix a misleading comment, and get rid of attr_mask variables that are only used to hold constants (just use the constants directly). Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * | [IB] mthca: Avoid SRQ free WQE list corruptionRoland Dreier2005-10-311-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | Fix wqe_to_link() to use a structure field that we know is definitely always unused for receive work requests, so that it really avoids the free list corruption bug that the comment claims it does. Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * | [IB] uverbs: Avoid NULL pointer deref on CQ async eventRoland Dreier2005-10-313-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Userspace CQs that have no completion event channel attached end up with their cq_context set to NULL. However, asynchronous events like "CQ overrun" can still occur on such CQs, so add a uverbs_file member to struct ib_ucq_object that we can follow to deliver these events. Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * | [IPoIB] use spin_trylock_irqsave()Roland Dreier2005-10-291-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | Use spin_trylock_irqsave() in ipoib_start_xmit() instead of reinventing it out of local_irq_save(), spin_trylock() and local_irq_restore(). Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * | [IB] mthca: report asynchronous CQ eventsMichael S. Tsirkin2005-10-293-3/+36
| |/ | | | | | | | | | | | | Implement reporting asynchronous CQ events in Mellanox HCA driver. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [PATCH] fix missing includesTim Schmielau2005-10-309-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I recently picked up my older work to remove unnecessary #includes of sched.h, starting from a patch by Dave Jones to not include sched.h from module.h. This reduces the number of indirect includes of sched.h by ~300. Another ~400 pointless direct includes can be removed after this disentangling (patch to follow later). However, quite a few indirect includes need to be fixed up for this. In order to feed the patches through -mm with as little disturbance as possible, I've split out the fixes I accumulated up to now (complete for i386 and x86_64, more archs to follow later) and post them before the real patch. This way this large part of the patch is kept simple with only adding #includes, and all hunks are independent of each other. So if any hunk rejects or gets in the way of other patches, just drop it. My scripts will pick it up again in the next round. Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | [PATCH] missing include in infinibandAl Viro2005-10-291-0/+1
|/ | | | | | | | | use of IS_ERR/PTR_ERR in infiniband/core/agent.c, without a portable chain of includes pulling err.h (breaks on a bunch of platforms). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: Roland Dreier <rolandd@cisco.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [IB] fix up class_device_create() callsRoland Dreier2005-10-282-3/+4
| | | | | | | Fix class_device_create() calls to match the new prototype which takes a parent device pointer. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6Roland Dreier2005-10-284-4/+4
|\
| * Merge ../bleed-2.6Greg KH2005-10-284-4/+4
| |\
| | * [PATCH] gfp_t: drivers/infinibandAl Viro2005-10-284-4/+4
| | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * | [PATCH] Driver Core: fix up all callers of class_device_create()Greg Kroah-Hartman2005-10-281-1/+1
| |/ | | | | | | | | | | | | | | The previous patch adding the ability to nest struct class_device changed the paramaters to the call class_device_create(). This patch fixes up all in-kernel users of the function. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * [PATCH] ib: mthca: Always re-arm EQs in mthca_tavor_interrupt()Roland Dreier2005-10-231-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | We should always re-arm an event queue's interrupt in mthca_tavor_interrupt() if the corresponding bit is set in the event cause register (ECR), even if we didn't find any entries in the EQ. If we don't, then there's a window where we miss an EQ entry and then get stuck because we don't get another EQ event. Signed-off-by: Roland Dreier <rolandd@cisco.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | [IB] uverbs: Fix device lifetime problemsRoland Dreier2005-10-283-95/+182
| | | | | | | | | | | | | | | | | | Move ib_uverbs module to using cdev_alloc() and class_device_create() so that we can handle device lifetime properly. Now we can make sure we keep all of our data structures around until the last way to reach them is gone. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [IB] umad: Fix device lifetime problemsRoland Dreier2005-10-281-109/+159
| | | | | | | | | | | | | | | | | | Move ib_umad module to using cdev_alloc() and class_device_create() so that we can handle device lifetime properly. Now we can make sure we keep all of our data structures around until the last way to reach them is gone. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [IPoIB] Drop RX packets when out of memoryRoland Dreier2005-10-283-60/+85
| | | | | | | | | | | | | | | | | | | | Change the way IPoIB handles RX packets when it can't allocate a new receive skbuff. If the allocation of a new receive skb fails, we now drop the packet we just received and repost the original receive skb. This means that the receive ring always stays full and we don't have to monkey around with trying to schedule a refill task for later. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [IB] ib_umad: various cleanupsSean Hefty2005-10-271-52/+21
| | | | | | | | | | | | | | | | | | | | | | Simplify user_mad.c code in a few places, and convert from kmalloc() + memset() to kzalloc(). This also fixes a theoretical race window by not accessing packet->length after posting the send buffer (the send could complete and packet could be freed before we get to the return statement at the end of ib_umad_write()). Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [IB] ib_umad: fix crash when freeing send buffersRoland Dreier2005-10-271-2/+2
| | | | | | | | | | | | | | | | | | The conversion of user_mad.c to the new MAD send API was slightly off: in a few places, we used packet->msg instead of packet->msg->mad when referring to the actual data buffer, which ended up corrupting the underlying data structure and crashing when we free an invalid pointer. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [IB] mthca: first pass at catastrophic error reportingRoland Dreier2005-10-275-1/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add some initial support for detecting and reporting catastrophic errors reported by Mellanox HCAs. We start a periodic timer which polls the catastrophic error reporting buffer in device memory. If an error is detected, we dump the contents of the buffer for port-mortem debugging, and report a fatal asynchronous error to higher levels. In the future we can try to recover from these errors by resetting the device, but this will require some work in higher-level code as well. Let's get this in now, so that we at least get catastrophic errors reported in logs. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [IB] simplify mad_rmpp.c:alloc_response_msg()Roland Dreier2005-10-251-16/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change alloc_response_msg() in mad_rmpp.c to return the struct it allocates directly (or an error code a la ERR_PTR), rather than returning a status and passing the struct back in a pointer param. This simplifies the code and gets rid of warnings like drivers/infiniband/core/mad_rmpp.c: In function nack_recv: drivers/infiniband/core/mad_rmpp.c:192: warning: msg may be used uninitialized in this function with newer versions of gcc. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [IB] mthca: correct modify QP attribute masks for UCRoland Dreier2005-10-251-7/+3
| | | | | | | | | | | | | | | | The UC transport does not support RDMA reads or atomic operations, so we shouldn't require or even allow the consumer to set attributes relating to these operations for UC QPs. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [IB] Fix MAD layer DMA mappings to avoid touching data buffer once mappedSean Hefty2005-10-2512-809/+441
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MAD layer was violating the DMA API by touching data buffers used for sends after the DMA mapping was done. This causes problems on non-cache-coherent architectures, because the device doing DMA won't see updates to the payload buffers that exist only in the CPU cache. Fix this by having all MAD consumers use ib_create_send_mad() to allocate their send buffers, and moving the DMA mapping into the MAD layer so it can be done just before calling send (and after any modifications of the send buffer by the MAD layer). Tested on a non-cache-coherent PowerPC 440SPe system. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [IB] CM: Fix initialization of QP attributes for UC QPs.Sean Hefty2005-10-241-14/+24
| | | | | | | | | | | | | | | | | | Fix cm_init_qp_init_attr(), cm_init_qp_rtr_attr() and cm_init_qp_rts_attr() so that they correctly handle the differences between UC and RC QPs. This fixes problems with setting up UC QPs through the CM. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | Manual merge of for-linus to upstream (fix conflicts in ↵Roland Dreier2005-10-245-10/+21
|\ \ | | | | | | | | | drivers/infiniband/core/ucm.c)
| * | [IB] Add idr_destroy() calls on module unloadRoland Dreier2005-10-244-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | Add idr_destroy() calls to the module_exit() functions of the four IB driver modules that use idrs, so we don't leak idr_layer_cache objects when these modules are unloaded. Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * | [IB] mthca: Always re-arm EQs in mthca_tavor_interrupt()Roland Dreier2005-10-221-10/+11
| |/ | | | | | | | | | | | | | | | | | | We should always re-arm an event queue's interrupt in mthca_tavor_interrupt() if the corresponding bit is set in the event cause register (ECR), even if we didn't find any entries in the EQ. If we don't, then there's a window where we miss an EQ entry and then get stuck because we don't get another EQ event. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [IB] user_mad: Use class_device.devtRoland Dreier2005-10-201-15/+2
| | | | | | | | | | | | | | Use devt member of struct class_device so that we don't have to create our own "dev" file in sysfs. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [IB] user_mad: trivial coding style fixesRoland Dreier2005-10-201-8/+8
| | | | | | | | | | | | Add spaces after "sizeof" operator to match the rest of file. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [IB] cm: Add missing break in switchRoland Dreier2005-10-201-0/+1
| | | | | | | | | | | | | | | | | | Add missing "break" in switch statement. Without the break, the CM ended up always falling through and setting every connection request to use RC transport, which meant that UC connections didn't work. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [IB] mthca: Don't enter QP into MCG more than once.Jack Morgenstein2005-10-181-1/+6
| | | | | | | | | | | | | | Avoid entering a QP as member of a multicast group multiple times. Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [IB] Fail sysfs queries after device is unregisteredRoland Dreier2005-10-181-0/+16
| | | | | | | | | | | | | | | | | | | | We keep IB device structures around until the last sysfs reference is gone, but we shouldn't ask the low-level driver to do anything after the LLD unregisters the device. To handle this, check the reg_state field and just fail sysfs show() requests if the device has already been unregistered. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [IB] mthca: Add struct pci_driver.owner fieldRoland Dreier2005-10-181-0/+1
| | | | | | | | | | | | Set mthca_driver.owner to THIS_MODULE. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [IB] mthca: Use enum in mthca_alloc_db() prototypeRoland Dreier2005-10-182-2/+4
| | | | | | | | | | | | | | | | Make the type parameter of mthca_alloc_db() be an enum mthca_db_type instead of an int. This doesn't have any practical effect but documents the functions a little better. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [IPoIB] Improve ipoib_timeout() outputRoland Dreier2005-10-181-2/+5
| | | | | | | | | | | | | | | | Use jiffies_to_msecs() so we print a human-readable time so we don't have to worry about what HZ is configured to, and print out a few values to make post-mortem analysis easier. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [IB] ucm: quiet sparse warningsRoland Dreier2005-10-171-2/+2
| | | | | | | | | | | | Make ctx_id_mutex and ctx_id_table static to quiet sparse warnings. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [IB] CM: bind IDs to a specific deviceSean Hefty2005-10-172-67/+192
| | | | | | | | | | | | | | Bind communication identifiers to a device to support device removal. Export per HCA CM devices to userspace. Signed-off-by: Sean Hefty <sean.hefty@intel.com>
* | [IB] merge ucm.h into ucm.cSean Hefty2005-10-172-104/+41
| | | | | | | | | | | | Eliminate ucm.h. Replace ucm_dbg with direct call to printk KERN_ERR. Signed-off-by: Sean Hefty <sean.hefty@intel.com>
* | [IB] uverbs: Implement more commandsRoland Dreier2005-10-173-1/+572
| | | | | | | | | | | | | | | | | | | | Add kernel support for userspace calling poll CQ, request CQ notification, post send, post receive, post SRQ receive, create AH and destroy AH commands. These commands allow us to support userspace verbs for devices that can't perform these operations directly from userspace (eg the PathScale HCA). Signed-off-by: Roland Dreier <rolandd@cisco.com>
OpenPOWER on IntegriCloud