summaryrefslogtreecommitdiffstats
path: root/src/drivers/infiniband
Commit message (Collapse)AuthorAgeFilesLines
* [golan] Set log_max_qp to 1Ameer Mahagneh2018-03-202-4/+3Star
| | | | | | | This is required to work around a bug in some firmware versions. Signed-off-by: Ameer Mahagneh <ameerm@mellanox.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [golan] Do not assume all devices are identicalMichael Brown2018-03-181-5/+2Star
| | | | | | | | Remove the global variable shomron_nodnic_supported, since it may have different values for different PCI devices. Originally-fixed-by: Mohammed Taha <mohammedt@mellanox.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Avoid implicit-fallthrough warnings on GCC 7Michael Brown2017-03-291-0/+1
| | | | | | Reported-by: Vinson Lee <vlee@freedesktop.org> Reported-by: Liang Yan <lyan@suse.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [golan] Bug fixes and improved paging allocation methodRaed Salem2017-03-2317-555/+199Star
| | | | | | | | Updates: - revert Support for clear interrupt via BAR Signed-off-by: Raed Salem <raeds@mellanox.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [hermon] Assert that mapping length is non-zeroMichael Brown2017-03-221-0/+1
| | | | | | | An (impossible) mapping length of zero produces a negative bit shift, which is technically undefined. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [arbel] Assert that mapping length is non-zeroMichael Brown2017-03-221-0/+1
| | | | | | | An (impossible) mapping length of zero produces a negative bit shift, which is technically undefined. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Return status code from ib_create_cq() and ib_create_qp()Michael Brown2017-03-222-20/+16Star
| | | | | | | | | | | | Any underlying errors arising during ib_create_cq() or ib_create_qp() are lost since the functions simply return NULL on error. This makes debugging harder, since a debug-enabled build is required to discover the root cause of the error. Fix by returning a status code from these functions, thereby allowing any underlying errors to be propagated. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [qib7322] Use correct length for memset()Michael Brown2017-03-211-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [linda] Use correct length for memset()Michael Brown2017-03-211-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [arbel] Avoid potential integer overflow when calculating memory mappingsMichael Brown2017-03-211-1/+1
| | | | | | | | When the area to be mapped straddles the 2GB boundary, the expression (high+size) will overflow on the first loop iteration. Fix by using (end-size), which cannot underflow. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [hermon] Avoid potential integer overflow when calculating memory mappingsMichael Brown2017-03-211-1/+1
| | | | | | | | When the area to be mapped straddles the 2GB boundary, the expression (high+size) will overflow on the first loop iteration. Fix by using (end-size), which cannot underflow. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [golan] Update Connect-IB, ConnectX-4 and ConnectX-4 Lx (Infiniband) supportRaed Salem2016-12-0823-152/+901
| | | | | | | | | | | | | | Updates: - Nodnic: Support for arm cq doorbell via the UAR BAR - Ensure hardware is quiescent when no interface is open - WinPE WA - Support for clear interrupt via BAR - Nodnic: Support for send TX doorbells via the UAR BAR - Added ConnectX-5EX device - Added ConnectX-5 device Signed-off-by: Raed Salem <raeds@mellanox.com> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [golan] Fix building with GCC 6Michael Brown2016-05-042-6/+21
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [golan] Add missing iounmap()Wissam Shoukair2016-04-121-1/+2
| | | | | Signed-off-by: Wissam Shoukair <wissams@mellanox.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [mlx_icmd] Fix compilation error in GCC versions newer than 4.6.4Wissam Shoukair2016-04-121-1/+1
| | | | | Signed-off-by: Wissam Shoukair <wissams@mellanox.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [qib7322] Validate payload lengthMichael Brown2016-03-301-3/+10
| | | | | | | | | | | There is no way for the hardware to give us an invalid length in the LRH, since it must have parsed this length field in order to perform header splitting. However, this is difficult to prove conclusively. Add an unnecessary length check to explicitly reject any packets larger than the posted receive I/O buffer. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [linda] Validate payload lengthMichael Brown2016-03-301-3/+10
| | | | | | | | | | | There is no way for the hardware to give us an invalid length in the LRH, since it must have parsed this length field in order to perform header splitting. However, this is difficult to prove conclusively. Add an unnecessary length check to explicitly reject any packets larger than the posted receive I/O buffer. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [golan] Fix build error on some versions of gccChristian Hesse2016-03-231-1/+1
| | | | | | | | | | | Some versions of gcc complain that "'__bswap_variable_32' is static but used in inline function 'golan_check_rc_and_cmd_status' which is not static". Fix by making golan_check_rc_and_cmd_status() a static inline. Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [golan] Add Connect-IB, ConnectX-4 and ConnectX-4 Lx (Infiniband) supportWissam Shoukair2016-03-2255-0/+13087
| | | | | Signed-off-by: Wissam Shoukair <wissams@mellanox.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [arbel] Fix received packet lengthMichael Brown2016-03-221-2/+3
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [hermon] Fix received packet lengthMichael Brown2016-03-221-2/+3
| | | | | Debugged-by: Wissam Shoukair <wissams@mellanox.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [arbel] Allocate space for GRH on UD queue pairsMichael Brown2016-03-212-16/+55
| | | | | | | As with the previous commit (for Hermon), allocate a separate ring buffer to hold received GRHs. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [hermon] Allocate space for GRH on UD queue pairsMichael Brown2016-03-212-12/+47
| | | | | | | | | | | | | | | | | | | | | | | | | The Infiniband specification (volume 1, section 11.4.1.2 "Post Receive Request") notes that for UD QPs, the GRH will be placed in the first 40 bytes of the receive buffer if present. (If no GRH is present, which is normal, then the first 40 bytes of the receive buffer will be unused.) Mellanox hardware performs this placement automatically: other headers will be stripped (and their values returned via the CQE), but the first 40 bytes of the data buffer will be consumed by the (probably non-existent) GRH. This does not fit neatly into iPXE's internal abstraction, which expects the data buffer to represent just the data payload with the addresses from the GRH (if present) passed as additional parameters to ib_complete_recv(). The end result of this discrepancy is that attempts to receive full-sized 2048-byte IPoIB packets on Mellanox hardware will fail. Fix by allocating a separate ring buffer to hold the received GRHs. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [qib7322] Add missing iounmap()Michael Brown2016-03-201-1/+3
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [linda] Add missing iounmap()Michael Brown2016-03-201-1/+3
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [arbel] Add missing iounmap()Michael Brown2016-03-201-10/+14
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [hermon] Add missing iounmap()Michael Brown2016-03-201-22/+20Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pseudobit] Rename bitops.h to pseudobit.hMichael Brown2016-03-162-4/+4
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [qib7322] Use standard readq() and writeq() implementationsMichael Brown2016-03-121-26/+8Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [linda] Use standard readq() and writeq() implementationsMichael Brown2016-03-121-26/+8Star
| | | | | | | | | This driver is the original source of the current readq() and writeq() implementations for 32-bit iPXE. Switch to using the now-centralised definitions, to avoid including architecture-specific code in an otherwise architecture-independent driver. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Assign names to queue pairsMichael Brown2016-03-081-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Relicense files under GPL2_OR_LATER_OR_UBDLMichael Brown2015-03-021-1/+5
| | | | | | | | | | | | | | | Relicence files with kind permission from the following contributors: Alex Williamson <alex.williamson@redhat.com> Eduardo Habkost <ehabkost@redhat.com> Greg Jednaszewski <jednaszewski@gmail.com> H. Peter Anvin <hpa@zytor.com> Marin Hannache <git@mareo.fr> Robin Smidsrød <robin@smidsrod.no> Shao Miller <sha0.miller@gmail.com> Thomas Horsten <thomas@horsten.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Relicense files under GPL2_OR_LATER_OR_UBDLMichael Brown2015-03-025-5/+21
| | | | | | | Relicense files for which I am the sole author (as identified by util/relicense.pl). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [hermon] Use PCI VPD for non-volatile option storageMichael Brown2012-10-252-2/+40
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Include destination address vector in ib_complete_recv()Michael Brown2012-08-314-10/+26
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Use explicit "source" and "dest" address vector parameter namesMichael Brown2012-08-314-89/+93
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Allow queue pairs to have a custom allocator for receive iobufsMichael Brown2012-08-311-1/+7
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Update FSF mailing address in GPL licence textsMichael Brown2012-07-208-8/+16
| | | | | Suggested-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [qib7322] Fix compiler warning on gcc 4.7Michael Brown2012-07-201-0/+3
| | | | | Originally-fixed-by: Christian Hesse <list@eworm.de> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [arbel] Ensure hardware is quiescent when no interfaces are openMichael Brown2011-11-162-92/+271
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [arbel] Reorder code in preparation for quiescing patchMichael Brown2011-11-151-190/+197
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [hermon] Ensure hardware is quiescent when no interfaces are openMichael Brown2011-11-152-81/+217
| | | | | | | | | | | | | WinPE has been observed to call PXENV_UNDI_SHUTDOWN but not PXENV_STOP_UNDI. This means that Hermon hardware is left partially active (firmware running and one event queue mapped) when WinPE starts up, which can cause a Blue Screen of Death. Fix by ensuring that the hardware is left quiescent (with the firmware stopped) when no interfaces are open. Reported-by: Itay Gazit <itayg@mellanox.co.il> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [hermon] Reorder code in preparation for quiescing patchMichael Brown2011-11-151-641/+648
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [arbel] Add (not-yet-functional) support for RC queue pairsMichael Brown2011-10-242-8/+111
| | | | | | | | | | | | | Arbel seems to crash the system as soon as the first send WQE completes on an RC queue pair. (NOPs complete successfully, so this is a problem specific to the work queue rather than the completion queue.) The cause of this problem has remained unknown for over a year. Check in the non-functioning code to avoid bit-rot, and in the hope that someone will find the fix. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [hermon] Remove temporary workaround for missing BOFM mport supportMichael Brown2011-05-041-39/+15Star
| | | | | | | This reverts commit 15c1200 ("[hermon] Work around missing mport support in current BOFM implementations"). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [hermon] Work around missing mport support in current BOFM implementationsMichael Brown2011-04-081-15/+39
| | | | | | | | | | | | | | | | | | | | | | | Current BOFM versions are unable to create entries with mport>1, which means that only the port 1 MAC address can be explicitly specified. Work around this by using the provided MAC address as a base address for all subsequent ports. For example, if BOFM assigns the address 00:1A:64:76:00:09 for port 1 then we will assign the addresses 00:1A:64:76:00:09 for port 1 00:1A:64:76:00:0a for port 2 Future BOFM versions that may correctly support mport will work with this scheme without modification provided that the BOFM entries are created in increasing order of mport. Since BOFM tools tend to generate entries in increasing order (of slot, port, etc), this is not an unreasonable compromise. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [arbel] Stop firmware only once on shutdownMichael Brown2011-04-081-1/+0Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [hermon] Stop firmware only once on shutdownMichael Brown2011-04-081-1/+0Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [qib7322] Avoid unused variable warning in gcc 4.6Michael Brown2011-03-161-4/+0Star
| | | | | | Reported-by: Ralph Giles <giles@thaumas.net> Tested-by: Ralph Giles <giles@thaumas.net> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [hermon] Avoid unused variable warning in gcc 4.6Michael Brown2011-03-161-2/+0Star
| | | | | | Reported-by: Ralph Giles <giles@thaumas.net> Tested-by: Ralph Giles <giles@thaumas.net> Signed-off-by: Michael Brown <mcb30@ipxe.org>