summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-linus' of ↵Linus Torvalds2005-11-049-17/+54
|\ | | | | | | 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] 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>
| * [IB] kzalloc() conversionsRoland Dreier2005-11-022-6/+2
| | | | | | | | | | | | | | 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>
| * [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] 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-307-0/+14
|/ | | | | | | | | | | | | | | | | | | | | 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>
* Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6Roland Dreier2005-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] 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] 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] 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-251-63/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Manual merge of for-linus to upstream (fix conflicts in ↵Roland Dreier2005-10-241-10/+11
|\ \ | | | | | | | | | drivers/infiniband/core/ucm.c)
| * | [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] 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] 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>
* | [IB] uverbs: Add a mask of device methods allowed for userspaceRoland Dreier2005-10-171-0/+20
| | | | | | | | | | | | | | Give each device a uverbs_cmd_mask, so that a low-level driver can control which methods may be called on behalf of userspace. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [IB] mthca: Better limit checking and reportingJack Morgenstein2005-10-177-12/+40
| | | | | | | | | | | | | | | | | | Check the sizes of CQs, QPs and SRQs when creating objects, and fail instead of creating too-big queues. Also return real limits instead of just plausible-sounding values from mthca_query_device(). Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [IB] mthca: detect SRQ overflowRoland Dreier2005-10-171-0/+15
| | | | | | | | | | | | | | | | | | The hardware relies on us keeping one extra work request that never gets used in SRQs. Add checks to the SRQ work request posting functions so that they fail when someone is about to use up that extra work request, rather than when someone uses the very last work request. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [IB] mthca: SRQ limit reached eventsRoland Dreier2005-10-174-4/+45
| | | | | | | | | | | | | | | | | | Our hardware supports generating an event when the number of receives posted to a shared receive queue (SRQ) falls below a user-specified limit. Implement mthca_modify_srq() to arm the limit, and add code to handle dispatching SRQ events when they occur. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [IB] mthca: Fill in more fields in query_port methodJack Morgenstein2005-10-171-0/+4
| | | | | | | | | | | | | | | | Add code to fill in the bad_pkey_cntr, max_mtu, active_mtu and subnet_timeout fields in mthca_query_port(). Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [IB] uverbs: Add device-specific ABI version attributeRoland Dreier2005-10-172-0/+7
| | | | | | | | | | | | | | Add abi_version attribute to uverbs class devices to allow for ABI versioning of device-specific interfaces. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [IB] mthca: Report correct atomic capabilityJack Morgenstein2005-10-173-0/+4
|/ | | | | | | Return correct atomic capability flag from mthca query function. Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* [IB] mthca: Fix memory leak on device closeMichael S. Tsirkin2005-09-301-24/+21
| | | | | | | Remember to free the multicast group context memory table. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* [IB] mthca: fix hw_ver value returned from mthca_query_deviceJack Morgenstein2005-09-271-1/+1
| | | | | | | The IB spec defines the field to be 32 bits, not 16 bits. Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* [IB] mthca: Round up number of slots in HCA context memory tableMichael S. Tsirkin2005-09-261-1/+1
| | | | | | | | | | When allocating a table for mem-free HCA context, don't assume that obj_size * nobj is an even multiple of MTHCA_TABLE_CHUNK_SIZE. In particular, make sure we allocate at least one slot even if the table is smaller than MTHCA_TABLE_CHUNK_SIZE. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* [IB] mthca: Fix off by one bug in mthca_map_cmdMichael S. Tsirkin2005-09-261-2/+2
| | | | | | | | The loop in mthca_map_cmd() would fill one entry past the end of the mailbox buffer before calling the firmware command. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* [IB] mthca: fix off by one in clr_int calculationMichael S. Tsirkin2005-09-261-1/+1
| | | | | | | | We should use the first word of the clear interrupt register if the bit we're after is < 32, not < 31. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* [IB] mthca: Fix doorbell record resource leakRoland Dreier2005-09-261-4/+13
| | | | | | | | | | | If we allocate a bunch of doorbell records and then free them, we'll end up with completely empty pages, which we then free. However, when we come back to allocate more doorbell pages, we have to reallocate those empty pages rather than always trying to take a slot that we've never used. If we don't, we eventually use up every slot and fail to allocate a doorbell record, even though we have plenty of free space. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* [PATCH] IB/mthca: Fix device removal memory leakMichael S. Tsirkin2005-09-201-0/+1
| | | | | | | Clean up QP table array on device removal. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* [PATCH] IB/mthca: Don't try to set srq->last for userspace SRQsRoland Dreier2005-09-191-1/+2
| | | | | | | | Userspace SRQs don't have a buffer allocated for them in the kernel, so it doesn't make sense to set srq->last during initialization. In fact, this can crash trying to follow a nonexistent buffer pointer. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* [PATCH] IB/mthca: Fix posting work requests to shared receive queuesRoland Dreier2005-09-181-6/+4
| | | | | | | | | | The error handling paths in mthca_tavor_post_srq_recv() and mthca_arbel_post_srq_recv() are quite bogus, the result of a screwed up merge. Fix them so they work as intended. Pointed out by Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* [PATCH] IB/mthca: Initialize eq->nent before we use itRoland Dreier2005-09-181-11/+5
| | | | | | | | | | | | In mthca_create_eq(), we call get_eqe() before setting eq->nent. This is wrong, because get_eqe() uses eq->nent. Fix this, and clean up the code a little while we're at it. (We got lucky with the current code, because eq->nent was cleared to 0, which get_eqe() made happen to do the right thing) Pointed out by Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* [PATCH] IB/mthca: fix posting of first work requestRoland Dreier2005-09-182-34/+28
| | | | | | | | | | | Fix posting first WQE for mem-free HCAs: we need to link to previous WQE even in that case. While we're at it, simplify code for Tavor-mode HCAs. We don't really need the conditional test there either; we can similarly always link to the previous WQE. Based on Michael S. Tsirkin's analogous fix for userspace libmthca. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* [PATCH] IB/mthca: assign ACK timeout field correctlyRoland Dreier2005-09-181-1/+1
| | | | | | | | | The hardware reads the ACK timeout field from the most significant 5 bits of struct mthca_qp_path's ackto field, not the least significant bits. This fix has the driver put the timeout in the right place. Without this, we get a timeout that is 2^8 times too small. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* Merge master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband Linus Torvalds2005-09-111-12/+33
|\
| * [PATCH] IB: Initialize qp->waitMichael S. Tsirkin2005-09-071-0/+1
| | | | | | | | | | | | | | Add missing call to init_waitqueue_head(). Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * [PATCH] IB: really reset QPsRoland Dreier2005-09-071-12/+32
| | | | | | | | | | | | | | When we modify a QP to the RESET state, completely clean up the QP so that it is really and truly reset. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [PATCH] PCI: remove CONFIG_PCI_NAMESAdrian Bunk2005-09-082-8/+8
|/ | | | | | | This patch removes CONFIG_PCI_NAMES. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] IB: move include files to include/rdmaRoland Dreier2005-08-269-16/+14
| | | | | | | | Move the InfiniBand headers from drivers/infiniband/include to include/rdma. This allows InfiniBand-using code to live elsewhere, and lets us remove the ugly EXTRA_CFLAGS include path from the InfiniBand Makefiles. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* [PATCH] IB/mthca: Add SRQ implementationRoland Dreier2005-08-2613-25/+857
| | | | | | | Add mthca support for shared receive queues (SRQs), including userspace SRQs. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* [PATCH] IB/mthca: Handle context tables smaller than our chunk sizeRoland Dreier2005-08-261-1/+6
| | | | | | | | | | | | When creating a table in context memory where the table is smaller than our chunk size, we don't want to allocate and map a full chunk. Instead, allocate just enough memory to cover the table. This can be pretty simple because all tables are a power-of-2 size, so either the table is a multiple of the chunk size, or it's smaller than one chunk. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* [PATCH] IB/mthca: Move WQE structures into their own headerRoland Dreier2005-08-262-74/+115
| | | | | | | | Move the definitions of the WQE structures from mthca_qp.c into mthca_wqe.h, so that we'll be able to share them when we add the SRQ code in mthca_srq.c. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* [PATCH] IB/mthca: Simplify handling of completions with errorRoland Dreier2005-08-262-9/+9
| | | | | | | | Mem-free HCAs never generate error CQEs that complete multiple WQEs, so just skip the call to mthca_free_err_wqe() for them rather than having logic to handle the mem-free case in mthca_free_err_wqe(). Signed-off-by: Roland Dreier <rolandd@cisco.com>
* [PATCH] IB/mthca: Factor out common queue alloc codeRoland Dreier2005-08-265-224/+141
| | | | | | | | Clean up the allocation of memory for queues by factoring out the common code into mthca_buf_alloc() and mthca_buf_free(). Now CQs and QPs share the same queue allocation code, which we'll also use for SRQs. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* [PATCH] IB/mthca: Report correct max_msg_szRoland Dreier2005-08-261-0/+3
| | | | | | | | Set the max_msg_sz port property correctly in mthca's port_query function. Also zero out the attr struct so that we don't leave any other members uninitialized. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* [PATCH] IB/mthca: Use correct port width capability valueRoland Dreier2005-08-265-13/+10
| | | | | | | | | When we call the INIT_IB firmware command to bring up a port, use the actual port width capability returned by the QUERY_DEV_LIM command instead of always trying to enable both 1X and 4X. This fixes breakage seen when the firmware is build to allow 4X only. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* [PATCH] IB: Remove unnecessary includes of <linux/version.h>Olaf Hering2005-08-261-1/+0
| | | | | | | | changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason. Remove unneeded includes of <linux/version.h>. Signed-off-by: Olaf Hering <olh@suse.de> Signed-off-by: Roland Dreier <rolandd@cisco.com>