summaryrefslogtreecommitdiffstats
path: root/src/drivers
Commit message (Collapse)AuthorAgeFilesLines
...
* [ethernet] Update mii.h and use it in drivers that had a private copyDaniel Verkamp2009-05-2612-531/+91Star
| | | | Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [ethernet] Move struct mii_if_info to mii.hDaniel Verkamp2009-05-262-13/+0Star
| | | | Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [legal] Add a selection of FILE_LICENCE declarationsMichael Brown2009-05-18102-1/+206
| | | | | Add FILE_LICENCE declarations to almost all files that make up the various standard builds of gPXE.
* [3c90x] Add missing size_t format specifierJoshua Oreman2009-03-311-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [pcnet32] Fix received packet corruptionMichael Brown2009-03-261-3/+3
| | | | | | | | | | The pcnet32 driver mismanages its RX buffers, with the result that packets get corrupted if more than one packet arrives between calls to poll(). Originally-fixed-by: Bill Lortz <Bill.Lortz@premier.org> Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com> Tested-by: Stefan Hajnoczi <stefanha@gmail.com>
* [forcedeth] Add support for newer forcedeth NICsThomas Miletich2009-03-261-7/+34
| | | | | | | Also adds the MAC_ADDR_CORRECT flag, to indicate whether or not the MAC address needs to be fixed up by the driver. Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [pci] Add driver_data field to struct pci_device_idThomas Miletich2009-03-2636-325/+325
| | | | | Modified-by: Michael Brown <mcb30@etherboot.org> Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [3c90x] Remove src/drivers/3c90x.txtMarty Connor2009-03-131-307/+0Star
| | | | | | | Most of the 3c90x.txt file is obsolete. The content from the file has been placed here: http://etherboot.org/wiki/appnotes/3c90x_issues
* [3c90x] 3c90x driver rewrite using gPXE APIThomas Miletich2009-03-132-935/+1200
| | | | | | | | | | | | | | | This is a major rewrite of the legacy etherboot 3c90x driver using the gPXE API for much improved performance over the legacy driver it replaces. This driver has been tested on 3c905, 3c905B, and 3c905C cards. Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com> Reviewed-by: Marty Connor <mdc@etherboot.org> Tested-by: Marty Connor <mdc@etherboot.org> Tested-by: Daniel Verkamp <daniel@drv.nu> Signed-off-by: Marty Connor <mdc@etherboot.org>
* [tables] Redefine methods for accessing linker tablesMichael Brown2009-03-135-30/+5Star
| | | | | | | | | | | | | | | Intel's C compiler (icc) chokes on the zero-length arrays that we currently use as part of the mechanism for accessing linker table entries. Abstract away the zero-length arrays, to make a port to icc easier. Introduce macros such as for_each_table_entry() to simplify the common case of iterating over all entries in a linker table. Represent table names as #defined string constants rather than unquoted literals; this avoids visual confusion between table names and C variable or type names, and also allows us to force a compilation error in the event of incorrect table names.
* [sundance] Add reset completion checkThomas Miletich2009-02-271-0/+16
| | | | | | | | Following the example of the Linux driver, we add a check and delay to make sure that the NIC has finished resetting before the driver issues any additional commands. Signed-off-by: Marty Connor <mdc@etherboot.org>
* [infiniband] Kill off obsolete mlx_ipoib directoryMichael Brown2009-02-2529-16486/+0Star
| | | | | | This directory contains the old Etherboot implementation of IPoIB boot from Mellanox, which has long been obsoleted by gPXE's own implementation.
* [scsi] Fix DBG() message reporting of error numberMichael Brown2009-02-191-2/+2
|
* [mtnic] Add multiport support and some minor fixesItay Gazit2009-02-092-600/+702
| | | | Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [sundance] Added NIC variantThomas Miletich2009-02-061-0/+1
| | | | | | | | | This previously unsupported NIC variant was was found to work using the current driver: PCI_ROM(0x13f0, 0x0200, "ip100a", "IC+ IP100A"), Signed-off-by: Marty Connor <mdc@etherboot.org>
* [scsi] Cope with targets that send multiple CHECK CONDITIONS at power-onMichael Brown2009-01-301-5/+19
| | | | | | | | | | | | | | | Some targets send a spurious CHECK CONDITION message in response to the first SCSI command. We issue (and ignore the status of) an arbitary harmless SCSI command (a READ CAPACITY (10)) in order to draw out this response. The Solaris Comstar target seems to send more than one spurious CHECK CONDITION response. Attempt up to SCSI_MAX_DUMMY_READ_CAP dummy READ CAPACITY (10) commands before assuming that error responses are meaningful. Problem reported by Kristof Van Doorsselaere <kvandoor@aserver.com> and Shiva Shankar <802.11e@gmail.com>.
* [infiniband] Call ib_open() only when opening the IPoIB net deviceMichael Brown2009-01-023-0/+20
| | | | | Defer the call to ib_open() until we want to actually open the device, rather than when the device is registered.
* [etherfabric] Make use of pci_bar_start() 64-bit cleanMichael Brown2008-12-121-2/+3
| | | | | | | | Driver was storing the result of pci_bar_start() and pci_bar_size() in an int, rather than an unsigned long. (Bug was introduced in the vendor's tree in commit eac85cd "Port etherfabric driver to net_device api".)
* [pci] Enable memory cycles in adjust_pci_device()Michael Brown2008-12-121-1/+2
| | | | | | | adjust_pci_device() has historically enabled bus-mastering and I/O cycles, but has never previously needed to enable memory cycles. Some EFI systems seem not to enable memory cycles by default, so add that to the list of PCI command register bits that we force on.
* [e1000] Use PCI_BASE_ADDRESS_* symbols instead of integersMarty Connor2008-12-051-2/+2
| | | | | | | | | | | When compiling for the Linux kernel, PCI_BASE_ADDRESS_0 == 0, and PCI_BASE_ADDRESS_1 == 1. This is not so when compiling for gPXE. We must use the symbolic names rather than integers to get the correct values. Bug identified and patch supplied by: George Chou <george.chou@advantech.com>
* [hermon] Fix permissions broken in 3a799e9 ("Add PCI ID for ConnectX QDR card")Michael Brown2008-12-051-0/+0
| | | | | | The patch file supplied for commit 3a799e9 ("[hermon] Add PCI ID for ConnectX QDR card") accidentally marked drivers/infiniband/hermon.c as being executable.
* [hermon] Add PCI ID for ConnectX QDR cardMichael Brown2008-12-041-0/+1
| | | | Patch provided by Itay Gazit <itaygazit@gmail.com>.
* [b44] Add driver for Broadcom bcm44xx cardsPantelis Koukousoulas2008-11-222-0/+1416
| | | | | | | | | | | | | | | | | | This driver is based on Stefan Hajnoczi's summer work, which is in turn based on version 1.01 of the linux b44 driver. I just assembled the pieces and fixed/added a few pieces here and there to make it work for my hardware. The most major limitation is that this driver won't work on systems with >1GB RAM due to the card not having enough address bits for that and gPXE not working around this limitation. Still, other than that the driver works well enough for at least 2 users :) and the above limitation can always be fixed when somebody wants it bad enough :) Signed-off-by: Pantelis Koukousoulas <pktoss@gmail.com>
* [blockdev] Move block device operations to structure block_device_operationsLaurent Vivier2008-11-193-8/+24
| | | | Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
* [virtio] Split virtio-net.c into several files.Laurent Vivier2008-11-193-202/+201Star
| | | | Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
* [virtio] Consolidate virtio-net static data into a struct vring_virtqueueLaurent Vivier2008-11-191-55/+64
| | | | Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
* [virtio] Remove dependency on nic for virtio PCI functionsLaurent Vivier2008-11-191-14/+14
| | | | Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
* [virtio] Consolidate vring_get_buf() by using a buffer list to add to the vringLaurent Vivier2008-11-191-41/+44
| | | | Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
* [virtio] Move virtio-pci.h and virtio-ring.h to include/gpxeLaurent Vivier2008-11-193-189/+2Star
| | | | Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
* [x86_64] Fix assorted 64-bit compilation errors and warningsMichael Brown2008-11-1911-39/+44
| | | | | | Remove various 32-bit assumptions scattered throughout the codebase. The code is still not necessarily 64-bit clean, but will at least compile.
* [i386] Change [u]int32_t to [unsigned] int, rather than [unsigned] longMichael Brown2008-11-1924-103/+103
| | | | | | This brings us in to line with Linux definitions, and also simplifies adding x86_64 support since both platforms have 2-byte shorts, 4-byte ints and 8-byte long longs.
* [r8169] New rtl8169 family driverMarty Connor2008-11-182-1070/+2595
| | | | | This is a completely rewritten version of the rtl8169 family driver using the gPXE driver API.
* [linda] Add missing copyright noticesMichael Brown2008-11-182-0/+34
|
* [linda] Purge references to 8051Michael Brown2008-11-182-12/+12
|
* [infiniband] Respect hop pointer when building directed route SMP return pathMichael Brown2008-11-122-46/+60
| | | | | | | | | | | | The return path in directed route SMPs lists the egress ports in order from SM to node, rather than from node to SM. To write to the correct offset within the return path, we need to parse the hop pointer. This is held within the class-specific data portion of the MAD header, which was previously unused by us and defined to be a uint16_t. Define this field to be a union type; this requires some rearrangement of ib_mad.h and corresponding changes to ipoib.c.
* [linda] Add support for QLogic 7220-based Infiniband HCAsMichael Brown2008-11-115-0/+5558
| | | | | | | | | These cards very nearly support our current IB Verbs model. There is one minor difference: multicast packets will always be delivered by the hardware to QP0, so the driver has to redirect them to the appropriate QP. This means that QP owners may see receive completions for buffers that they never posted. Nothing in our current codebase will break because of this.
* [infiniband] Add raw packet parser and constructorMichael Brown2008-11-111-0/+234
| | | | | | | This can be used with cards that require the driver to construct and parse packet headers manually. Headers are optionally handled out-of-line from the packet payload, since some such cards will split received headers into a separate ring buffer.
* [infiniband] Add a standalone subnet management agentMichael Brown2008-11-111-0/+541
| | | | | This generic SMA code can be used for any cards that do not provide firmware-based embedded SMAs.
* [ipoib] Kill off the IPoIB pseudo-headerMichael Brown2008-11-111-109/+197
| | | | | | | | | Some Infiniband cards will not be as accommodating as the Arbel and Hermon cards in providing enough space for us to push a fake extra header at the start of the received packet. We must therefore make do with squeezing enough information to identify source and destination addresses into the two bytes of padding within a genuine IPoIB link-layer header.
* [infiniband] Split subnet management agent client out into ib_smc.cMichael Brown2008-11-114-100/+278
| | | | | | | | Not all Infiniband cards have embedded subnet management agents. Split out the code that communicates with such an embedded SMA into a separate ib_smc.c file, and have drivers call ib_smc_update() explicitly when they suspect that the answers given by the embedded SMA may have changed.
* [infiniband] Pass address vector in receive completionsMichael Brown2008-11-113-104/+101Star
| | | | | | | | | | | | | | | | | Receive completion handlers now get passed an address vector containing the information extracted from the packet headers (including the GRH, if present), and only the payload remains in the I/O buffer. This breaks the symmetry between transmit and receive completions, so remove the ib_completer_t type and use an ib_completion_queue_operations structure instead. Rename the "destination QPN" and "destination LID" fields in struct ib_address_vector to reflect its new dual usage. Since the ib_completion structure now contains only an IB status code, ("syndrome") replace it with a generic gPXE integer status code.
* [infiniband] Maintain queue fill level as a property of a work queueMichael Brown2008-11-111-11/+4Star
| | | | | Both queue owners and drivers often need to keep track of the fill level, so let's make it a generic property.
* [infiniband] Flush uncompleted work queue entries at QP teardownMichael Brown2008-11-113-35/+32Star
| | | | | | | | | | | | | | Avoid leaking I/O buffers in ib_destroy_qp() by completing any outstanding work queue entries with a generic error code. This requires the completion handlers to be available to ib_destroy_qp(), which is done by making them static configuration parameters of the CQ (set by ib_create_cq()) rather than being provided on each call to ib_poll_cq(). This mimics the functionality of netdev_{tx,rx}_flush(). The netdev flush functions would previously have been catching any I/O buffers leaked by the IPoIB data queue (though not by the IPoIB metadata queue).
* [ne2k_isa] Restore support for ne2k isa cardsPantelis Koukousoulas2008-11-081-0/+373
| | | | | | | | | | | | | | | | | Add the simplified ne2k_isa driver. It is just a selective copy+paste of the relevant parts from ns8390.c plus a little trivial hacking to make it actually work. It is true that the code is pretty ugly, but: a) ns8390.c is worse b) It is only 372 lines and no #ifdefs c) It works both in qemu/bochs and in real hardware and we all know it is easier to cleanup working code Hope someone will find the time to rewrite this driver properly, but until then at least for me this is an ok solution. Signed-off-by: Pantelis Koukousoulas <pktoss@gmail.com>
* [isa] Fix a small typo in isa.c.Pantelis Koukousoulas2008-11-081-2/+2
| | | | | | | With this patch ISA drivers actually get probed so they have a fair chance of working now. Signed-off-by: Pantelis Koukousoulas <pktoss@gmail.com>
* [phantom] Do not halt PEGs on driver shutdownMichael Brown2008-11-081-15/+0Star
| | | | | | | | Halting the PEGs breaks platforms where there is sideband access to the NIC (e.g. HP machines using iLO). (We have to retain the unhalting code because on some other platforms (e.g. IBM blades with BOFM) the pre-PXE firmware must halt the PEGs to avoid issues with the BIOS rereading via the expansion ROM BAR.)
* [phantom] Allow for PXE boot to be enabled/disabled on a per-port basisMichael Brown2008-11-012-0/+32
| | | | | | | | | This is something of an ugly hack to accommodate an OEM requirement. The NIC has only one expansion ROM BAR, rather than one per port. To allow individual ports to be selectively enabled/disabled for PXE boot (as required), we must therefore leave the expansion ROM always enabled, and place the per-port enable/disable logic within the gPXE driver.
* [phantom] Assume one net device per PCI functionMichael Brown2008-10-312-764/+339Star
| | | | | | | | The Phantom firmware selectively disables PCI functions based on the board type, with the end result that we see one PCI function for each network port. This allows us to eliminate the code for reading from flash and, more importantly, removes knowledge of the board type magic number from the gPXE driver.
* [settings] Add the notion of a "tag magic" to numbered settingsMichael Brown2008-10-301-16/+24
| | | | | | | | | | | | | | | | | | | Settings can be constructed using a dotted-decimal notation, to allow for access to unnamed settings. The default interpretation is as a DHCP option number (with encapsulated options represented as "<encapsulating option>.<encapsulated option>". In several contexts (e.g. SMBIOS, Phantom CLP), it is useful to interpret the dotted-decimal notation as referring to non-DHCP options. In this case, it becomes necessary for these contexts to ignore standard DHCP options, otherwise we end up trying to, for example, retrieve the boot filename from SMBIOS. Allow settings blocks to specify a "tag magic". When dotted-decimal notation is used to construct a setting, the tag magic value of the originating settings block will be ORed in to the tag number. Store/fetch methods can then check for the magic number before interpreting arbitrarily-numbered settings.
* [phantom] Add CLP settings interfaceMichael Brown2008-10-282-0/+368
| | | | | | This interface provides access to firmware settings (e.g. MAC address) that will apply to all drivers loaded for the duration of the current system boot.