summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw
Commit message (Collapse)AuthorAgeFilesLines
* IB/ipath: kbuild infrastructureBryan O'Sullivan2006-03-312-0/+52
| | | | | | | | Integrate the ipath core and OpenIB drivers into the kernel build infrastructure. Add entry to MAINTAINERS. Signed-off-by: Bryan O'Sullivan <bos@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: infiniband verbs supportBryan O'Sullivan2006-03-312-0/+1555
| | | | | | | | The ipath_verbs.c file implements the driver-specific components of the kernel's Infiniband verbs layer. Signed-off-by: Bryan O'Sullivan <bos@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: misc infiniband code, part 2Bryan O'Sullivan2006-03-313-0/+2817
| | | | | | | | Management datagram support, queue pairs, and reliable and unreliable connections. Signed-off-by: Bryan O'Sullivan <bos@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: misc infiniband code, part 1Bryan O'Sullivan2006-03-314-0/+1187
| | | | | | | | Completion queues, local and remote memory keys, and memory region support. Signed-off-by: Bryan O'Sullivan <bos@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: infiniband RC protocol supportBryan O'Sullivan2006-03-311-0/+1857
| | | | | | | | This is an implementation of the Infiniband RC ("reliable connection") protocol. Signed-off-by: Bryan O'Sullivan <bos@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: infiniband UC and UD protocol supportBryan O'Sullivan2006-03-312-0/+1266
| | | | | | | | These files implement the Infiniband UC ("unreliable connection") and UD ("unreliable datagram") protocols. Signed-off-by: Bryan O'Sullivan <bos@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: infiniband header filesBryan O'Sullivan2006-03-312-0/+804
| | | | | | | These header files are used by the layered Infiniband driver. Signed-off-by: Bryan O'Sullivan <bos@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: layering interfaces used by higher-level driver codeBryan O'Sullivan2006-03-312-0/+1696
| | | | | | | | The layering interfaces are used to implement the Infiniband protocols and the ethernet emulation driver. Signed-off-by: Bryan O'Sullivan <bos@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: support for userspace apps using core driverBryan O'Sullivan2006-03-312-0/+2117
| | | | | | | | | | These files introduce a char device that userspace apps use to gain direct memory-mapped access to the InfiniPath hardware, and routines for pinning and unpinning user memory in cases where the hardware needs to DMA into the user address space. Signed-off-by: Bryan O'Sullivan <bos@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: sysfs and ipathfs support for core driverBryan O'Sullivan2006-03-312-0/+1383
| | | | | | | | | | | | | The ipathfs filesystem contains files that are not appropriate for sysfs, because they contain binary data. The hierarchy is simple; the top-level directory contains driver-wide attribute files, while numbered subdirectories contain per-device attribute files. Our userspace code currently expects this filesystem to be mounted on /ipathfs, but a final location has not yet been chosen. Signed-off-by: Bryan O'Sullivan <bos@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: misc driver support codeBryan O'Sullivan2006-03-314-0/+1914
| | | | | | | | | | | | | | | | | | | | | | | | | EEPROM support, interrupt handling, statistics gathering, and write combining management for x86_64. A note regarding i2c: The Atmel EEPROM hardware we use looks like an i2c device electrically, but is not i2c compliant at all from a functional perspective. We tried using the kernel's i2c support to talk to it, but failed. Normal i2c devices have a single 7-bit or 10-bit i2c address that they respond to. Valid 7-bit addresses range from 0x03 to 0x77. Addresses 0x00 to 0x02 and 0x78 to 0x7F are special reserved addresses (e.g. 0x00 is the "general call" address.) The Atmel device, on the other hand, responds to ALL addresses. It's designed to be the only device on a given i2c bus. A given i2c device address corresponds to the memory address within the i2c device itself. At least one reason why the linux core i2c stuff won't work for this is that it prohibits access to reserved addresses like 0x00, which are really valid addresses on the Atmel devices. Signed-off-by: Bryan O'Sullivan <bos@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: chip initialisation code, and diag supportBryan O'Sullivan2006-03-312-0/+1330
| | | | | | | | | | | ipath_init_chip.c sets up an InfiniPath device for use. ipath_diag.c permits userspace diagnostic tools to read and write a chip's registers. It is different in purpose from the mmap interfaces to the /sys/bus/pci resource files. Signed-off-by: Bryan O'Sullivan <bos@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: support for PCI Express devicesBryan O'Sullivan2006-03-311-0/+1247
| | | | | | | | This file contains routines and definitions specific to InfiniPath devices that have PCI Express interfaces. Signed-off-by: Bryan O'Sullivan <bos@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: support for HyperTransport devicesBryan O'Sullivan2006-03-311-0/+1586
| | | | | | | | The ipath_ht400.c file contains routines and definitions specific to HyperTransport-based InfiniPath devices. Signed-off-by: Bryan O'Sullivan <bos@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: core driver header filesBryan O'Sullivan2006-03-315-0/+2305
| | | | | | | | | | | | | | ipath_common.h and ips_common.h contain definitions shared between userspace and the kernel. ipath_kernel.h is the core driver header file. ipath_debug.h contains mask values used for controlling driver debugging. ipath_registers.h contains bitmask definitions used in chip registers. Signed-off-by: Bryan O'Sullivan <bos@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ipath: core device driverBryan O'Sullivan2006-03-311-0/+1983
| | | | | | | | | | | | | The ipath driver is a low-level driver for PathScale InfiniPath host channel adapters (HCAs) based on the HT-400 and PE-800 chips, including the InfiniPath HT-460, the small form factor InfiniPath HT-460, the InfiniPath HT-470 and the Linux Networx LS/X. The ipath_driver.c file contains much of the low-level device handling code. Signed-off-by: Bryan O'Sullivan <bos@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Fix section mismatch problemsRoland Dreier2006-03-299-12/+12
| | | | | | | | | Quite a few cleanup functions in mthca were marked as __devexit. However, they could also be called from error paths during initialization, so they cannot be marked that way. Just delete all of the incorrect annotations. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Fix check of size in SRQ creationJack Morgenstein2006-03-291-1/+1
| | | | | | | | | | | | | | | The previous patch for Tavor broke MemFree logic. The driver should perform limit check only for Tavor. For MemFree, the check is incorrect, since ds (WQE stride) is always a power-of-2 (although the max_desc_size may not be). In Tavor, however, WQE stride and desc_size are the same, and are not necessarily power-of-2. The check was really for the WQE stride (and it Tavor, we use max_desc_size for the stride). Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Fix modify QP error pathRoland Dreier2006-03-241-10/+11
| | | | | | | | | If the call to mthca_MODIFY_QP() failed, then mthca_modify_qp() would still do some things it shouldn't, such as store away attributes for special QPs. Fix this, and simplify the code, by simply jumping to the exit path if mthca_MODIFY_QP() fails. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Fix indentationRoland Dreier2006-03-241-2/+2
| | | | | | Fix some whitespace damage (indenting with spaces) that snuck in. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Fix uninitialized variable in mthca_alloc_qp()Jack Morgenstein2006-03-241-4/+5
| | | | | | | | mthca_alloc_sqp() by mthca_set_qp_size() need to set qp->transport before calling mthca_set_qp_size(), since the value is used there. Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Check SRQ limit in modify SRQ operationJack Morgenstein2006-03-241-0/+2
| | | | | | | | | When setting the shared receive queue (SRQ) watermark in a modify SRQ operation, make sure that the supplied value is not larger than the full size of the SRQ. Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Check that SRQ WQE size does not exceed device's max valueJack Morgenstein2006-03-241-0/+4
| | | | | | | | | | Guarantee the calculated work queue entry size does not exceed the max allowable WQE size when creating an SRQ. This is a problem with Arbel in Tavor-compatibility mode because the current WQE size computation method rounds up to next power of 2. Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Check that sgid_index and path_mtu are valid in modify_qpDotan Barak2006-03-241-4/+23
| | | | | | | | Add a check that the modify QP parameters sgid_index and path_mtu are valid, since they might come from userspace. Signed-off-by: Dotan Barak <dotanb@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Query SRQ srq_limit fixesEli Cohen2006-03-201-4/+8
| | | | | | | | | | Fix endianness handling of srq_limit: it is big-endian in the context structure, so we need to swab it before returning it. Also add support for srq_limit query for Tavor (non-MemFree) HCAs. Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Correct reported SRQ size in MemFree case.Dotan Barak2006-03-201-2/+2
| | | | | | | | | MemFree devices need to reserve one shared receive queue (SRQ) work request for internal use, so the capacity returned from the create_srq and query_srq methods should be srq->max - 1. Signed-off-by: Dotan Barak <dotanb@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Coverity fix to mthca_init_eq_table()Roland Dreier2006-03-201-1/+1
| | | | | | | | Fix bug found by coverity: the loop body never executed, because it was doing for (i = 0; i < MTHCA_EQ_CMD; ++i), but MTHCA_EQ_CMD is 0. The correct loop bound is MTHCA_NUM_EQ, to loop over all EQs. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Update firmware versionsRoland Dreier2006-03-201-3/+3
| | | | | | Update known firmware versions in driver's table to the latest releases. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Optimize large messages on Sinai HCAsEli Cohen2006-03-205-17/+51
| | | | | | | | | | | | Sinai (one-port PCI Express) HCAs get improved throughput for messages bigger than 80 KB in DDR mode if memory keys are formatted in a specific way. The enhancement only works if the memory key table is smaller than 2^24 entries. For larger tables, the enhancement is off and a warning is printed (to avoid silent performance loss). Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Michael Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Use an enum for HCA page sizeIshai Rabinovitz2006-03-204-30/+37
| | | | | | | | | | | Use a named enum for the HCA's internal page size, rather than having magic values of 4096 and shifts by 12 all over the code. Also, fix one minor bug in EQ handling: only one HCA page is mapped to the HCA during initialization, but a full kernel page is unmapped during cleanup. This might cause problems when PAGE_SIZE != 4096. Signed-off-by: Ishai Rabinovitz <ishai@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Check alternate P_Key index when setting alternate pathDotan Barak2006-03-201-2/+8
| | | | | | | | | Check that the alternate P_Key index is in range when setting the alternate path for a QP. Also make a cosmetic touch up to the debug message printed when the main P_Key index is out of range. Signed-off-by: Dotan Barak <dotanb@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Add support for send work request fence flagDotan Barak2006-03-201-2/+6
| | | | | | | | Add support for IB_SEND_FENCE flag in post_send methods. Signed-off-by: Dotan Barak <dotanb@mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Implement query_ah methodJack Morgenstein2006-03-203-0/+33
| | | | | | | | | Implement query_ah (except for AVs which are in HCA memory). This is needed to implement RMPP duplicate session detection on sending side (extraction of DGID/DLID and GRH flag from address handle). Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Write FW commands through doorbell pageEli Cohen2006-03-202-23/+136
| | | | | | | | | | | | | | | | | | | This patch is checks whether the HCA supports posting FW commands through a doorbell page (user access region 0, or "UAR0"). If this is supported, the driver maps UAR0 and uses it for FW commands. This can be controlled by the value of a writable module parameter fw_cmd_doorbell. When the parameter is 0, the commands are posted through HCR using the old method; otherwise if HCA is capable commands go through UAR0. This use of UAR0 to post commands eliminates the need for polling the "go" bit prior to posting a new command. Since reading from a PCI device is much more expensive then issuing a posted write, it is expected that issuing FW commands this way will provide better CPU utilization. Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Return actual capacity from create_srqDotan Barak2006-03-201-0/+3
| | | | | | | | | Have mthca's create_srq method return the actual capacity of the SRQ that gets created. Also update comments in <rdma/ib_verbs.h> to clarify that this is what is expected from ib_create_srq(). Signed-off-by: Dotan Barak <dotanb@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Bump driver version and release dateRoland Dreier2006-03-201-2/+2
| | | | Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Support for query QP and SRQEli Cohen2006-03-206-1/+184
| | | | | | | Implement the query_qp and query_srq methods in mthca. Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Convert to use ib_modify_qp_is_ok()Roland Dreier2006-03-203-290/+76
| | | | | | | Use ib_modify_qp_is_ok() in mthca, and delete the big table of attributes for queue pair state transitions. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Generate SQ drained events when requestedRoland Dreier2006-03-202-2/+15
| | | | | | | | Add low-level driver support to ib_mthca so that consumers can request a "send queue drained" event be generated when a transiton to the SQD state completes. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB: Enable FMR pool user to set page sizeOr Gerlitz2006-03-201-5/+5
| | | | | | | | | | This patch allows the consumer to set the page size of "pages" mapped by the pool FMRs, which is a feature already existing in the base verbs API. On the cosmetic side it changes ib_fmr_attr.page_size field to be named page_shift. Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Add modify_device method to set node descriptionRoland Dreier2006-03-202-1/+48
| | | | | | | | | Add a modify_device method to mthca, which implements setting the node description. This makes the writable "node_desc" sysfs attribute work for Mellanox HCAs. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Whitespace cleanupsRoland Dreier2006-03-209-26/+26
| | | | | | | Remove trailing whitespace and fix indentation that with spaces instead of tabs. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Add device-specific support for resizing CQsRoland Dreier2006-03-207-52/+308
| | | | | | | Add low-level driver support for resizing CQs (both kernel and userspace) to mthca. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Get rid of might_sleep() annotationsRoland Dreier2006-03-203-13/+0
| | | | | | | | | | | | | | | | | | | | | The might_sleep() annotations in mthca are silly -- they all occur shortly before calls that will end up in core functions like kmalloc() that will print the same warning in an unsafe context anyway. In fact, beyond cluttering the source, we're actually bloating text with CONFIG_DEBUG_SPINLOCK_SLEEP and/or CONFIG_PREEMPT_VOLUNTARY set. With both options set, getting rid of the might_sleep()s saves a lot: add/remove: 0/0 grow/shrink: 0/7 up/down: 0/-171 (-171) function old new delta mthca_pd_alloc 132 109 -23 mthca_init_cq 969 946 -23 mthca_mr_alloc 592 568 -24 mthca_pd_free 67 42 -25 mthca_free_mr 219 194 -25 mthca_free_cq 570 545 -25 mthca_fmr_alloc 742 716 -26 Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Make functions that never fail return voidRoland Dreier2006-03-203-22/+15
| | | | | | | | | | | | | | | The function mthca_free_err_wqe() can never fail, so get rid of its return value. That means handle_error_cqe() doesn't have to check what mthca_free_err_wqe() returns, which means it can't fail either and doesn't have to return anything either. All this results in simpler source code and a slight object code improvement: add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-10 (-10) function old new delta mthca_free_err_wqe 83 81 -2 mthca_poll_cq 1758 1750 -8 Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: bump driver version and release dateRoland Dreier2006-02-131-2/+2
| | | | Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Don't print debugging info until we have all valuesRoland Dreier2006-02-101-19/+19
| | | | | | | | | | | When debugging is enabled, the mthca_QUERY_DEV_LIM() firmware command function prints out some of the device limits that it queries. However the debugging prints happen before all of the fields are extracted from the firmware response, so some of the values that get printed are uninitialized junk. Move the prints to the end of the function to fix this. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Semaphore to mutex conversionsRoland Dreier2006-01-306-36/+37
| | | | | | | Convert semaphores to mutexes in mthca. Leave firmware command interface poll_sem and event_sem as semaphores. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Don't cancel commands on a signalMichael S. Tsirkin2006-01-302-16/+7
| | | | | | | | | | | | | | | | | | | | | | | | We have run into the following problem: if a task receives a signal while in the process of e.g. destroying a resource (which could be because the relevant file was closed) mthca could bail out from trying to take a command interface semaphore without performing the appropriate command to tell hardware that the resource is being destroyed. As a result we see messages like ib_mthca 0000:04:00.0: HW2SW_CQ failed (-4) In this case, hardware could access the resource after the memory has been freed, possibly causing memory corruption. A simple solution is to replace down_interruptible() by down() in command interface activation. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> [ It's also not safe to bail out on multicast table operations, since they may be invoked on the cleanup path too. So use down() for mcg_table.sem too. ] Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Relax UAR size checkMichael S. Tsirkin2006-01-301-2/+8
| | | | | | | | | | There are some cards around that have UAR (user access region) size different from 8 MB. Relax our sanity check to make sure that the PCI BAR is big enough to access the UAR size reported by the device firmware instead. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
OpenPOWER on IntegriCloud