summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-linus' of ↵Linus Torvalds2005-11-181-19/+18
|\ | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
| * IB/mthca: Safer max_send_sge/max_recv_sge calculationMichael S. Tsirkin2005-11-181-4/+6
| | | | | | | | | | | | | | | | | | Calculation of QP capabilities still isn't exactly right in mthca: max_send_sge/max_recv_sge fields returned in create_qp can exceed the handware supported limits. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * [IB] mthca: don't disable RDMA writes if no responder resourcesRoland Dreier2005-11-151-15/+12
| | | | | | | | | | | | | | | | | | | | Responder resources are only required to handle RDMA reads and atomic operations, not RDMA writes. So the driver should allow RDMA writes even if responder resources are set to 0. This is especially important for the UC transport -- with the old code, it was impossible to enable RDMA writes for UC QPs. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [PATCH] PCI: removed unneeded .owner field from struct pci_driverGreg Kroah-Hartman2005-11-101-1/+0
|/ | | | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Merge branch 'for-linus' of ↵Linus Torvalds2005-11-1010-29/+137
|\ | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
| * [IB] mthca: fix posting long lists of receive work requestsMichael S. Tsirkin2005-11-103-5/+39
| | | | | | | | | | | | | | | | | | In Tavor mode, when posting a long list of receive work requests, a doorbell must be rung every 256 requests. Add code to do this when required. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * [IB] mthca: fix wraparound handling in mthca_cq_clean()Roland Dreier2005-11-101-10/+6
| | | | | | | | | | | | | | | | Handle case where prod_index has wrapped around and become less than cq->cons_index by checking that their difference as a signed int is positive rather than comparing directly. Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * [IB] mthca: fix posting of atomic operationsMichael S. Tsirkin2005-11-101-4/+4
| | | | | | | | | | | | | | | | The size of work requests for atomic operations was computed incorrectly in mthca: all sizeofs need to be divided by 16. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * [IB] uverbs: have kernel return QP capabilitiesJack Morgenstein2005-11-106-9/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the computation of QP capabilities (max scatter/gather entries, max inline data, etc) into the kernel, and have the uverbs module return the values as part of the create QP response. This keeps precise knowledge of device limits in the low-level kernel driver. This requires an ABI bump, so while we're making changes, get rid of the max_sge parameter for the modify SRQ command -- it's not used and shouldn't be there. Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * [IB] mthca: fix typo in catastrophic error pollingRoland Dreier2005-11-101-1/+1
| | | | | | | | | | | | | | Fix a typo in the rearming of the catastrophic error polling timer: we should rearm the timer as long as the stop flag is _not_ set. Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * [IB] mthca: report page size capabilityJack Morgenstein2005-11-043-0/+3
| | | | | | | | | | | | | | Report the device's real page size capability in mthca_query_device(). Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | [PATCH] fix remaining missing includesTim Schmielau2005-11-072-0/+6
|/ | | | | | | | | | 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 '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
|\
OpenPOWER on IntegriCloud