summaryrefslogtreecommitdiffstats
path: root/src/drivers/net
Commit message (Collapse)AuthorAgeFilesLines
...
* [infiniband] Split queue set functionality out of ipoib.c to ib_qset.cMichael Brown2009-07-181-137/+32Star
|
* [netdevice] Make ll_broadcast per-netdevice rather than per-ll_protocolMichael Brown2009-07-183-7/+22
| | | | | | | | | IPoIB has a link-layer broadcast address that varies according to the partition key. We currently go through several contortions to pretend that the link-layer address is a fixed constant; by making the broadcast address a property of the network device rather than the link-layer protocol it will be possible to simplify IPoIB's broadcast handling.
* [rtl8139] Split debug messages into DBGLVL_LOG and DBGLVL_EXTRAMichael Brown2009-06-231-13/+18
|
* [e1000] Ensure descriptor is fully written before sending packetMichael Brown2009-06-231-0/+1
| | | | Reported-by: Mark McLoughlin <markmc@redhat.com>
* [netdevice] Add netdev argument to link-layer push and pull handlersJoshua Oreman2009-06-231-2/+6
| | | | | | | | | | | | | | | In order to construct outgoing link-layer frames or parse incoming ones properly, some protocols (such as 802.11) need more state than is available in the existing variables passed to the link-layer protocol handlers. To remedy this, add struct net_device *netdev as the first argument to each of these functions, so that more information can be fetched from the link layer-private part of the network device. Updated all three call sites (netdevice.c, efi_snp.c, pxe_undi.c) and both implementations (ethernet.c, ipoib.c) of ll_protocol to use the new argument. Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [misc] Fix source files erroneously marked as executableMichael Brown2009-06-021-0/+0
|
* [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-1872-0/+147
| | | | | 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-2633-318/+318
| | | | | 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>
* [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.
* [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>
* [infiniband] Call ib_open() only when opening the IPoIB net deviceMichael Brown2009-01-021-0/+12
| | | | | 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".)
* [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>
* [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>
* [virtio] Split virtio-net.c into several files.Laurent Vivier2008-11-191-202/+3Star
| | | | 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-198-38/+40
| | | | | | 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-1916-88/+88
| | | | | | 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.
* [infiniband] Respect hop pointer when building directed route SMP return pathMichael Brown2008-11-121-45/+47
| | | | | | | | | | | | 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.
* [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-111-8/+10
| | | | | | | | 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-111-60/+49Star
| | | | | | | | | | | | | | | | | 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-111-5/+16
| | | | | | | | | | | | | | 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>
* [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.
* [phantom] Unhalt/halt all PEGs during driver startup/shutdownMichael Brown2008-10-282-0/+70
| | | | | | | | | | | A hardware bug means that reads through the expansion ROM BAR can return corrupted data if the PEGs are running. This breaks platforms that re-read the expansion ROM after invoking gPXE code, such as IBM blade servers. Halt PEGs during driver shutdown, and unhalt PEGs during driver startup if we detect that this is not the first startup since power-on.
* [phantom] Add line count limit to phantom_dmesg()Michael Brown2008-10-281-22/+57
| | | | | The Phantom firmware debug logs can be extremely long, so add the ability to restrict the output to the last N lines.
* [phantom] Change register space abstraction to match other driversMichael Brown2008-10-242-54/+46Star
| | | | | | | Most other Phantom drivers define a register space in terms of a 64M virtual address space. While this doesn't map in any meaningful way to the actual addresses used on the latest cards, it makes maintenance easier if we do the same.
* [tg3] Add PCI ID for BCM5786Michael Brown2008-10-211-0/+1
| | | | Contributed by Steve Cayford <cayfo001@umn.edu>
* [etherfabric] Merge changes from vendor treeMichael Brown2008-10-172-2337/+3348
| | | | Also clean up minor errors in the use of debug macros.
* virtio-net: Fix kick/wait logicEduardo Habkost2008-10-161-3/+5
| | | | | | | | | | | | | | | | | | | | | | The virtnet_transmit() logic for waiting the packet to be transmitted is reversed: we can't wait the packet to be transmitted if we didn't kick() the ring yet. The vring_more_used() while loop logic is reversed also, that explains why the code works today. The current code risks trying to free a buffer from the used ring when none was available, that will happen most times because KVM doesn't handle the packet immediately on kick(). Luckily it was working because it was unlikely to have a buffer still queued for transmit when virtnet_transmit() was called. Also, adds a BUG_ON() to vring_get_buf(), to catch cases where we try to free a buffer from the used ring when there was none available. Patch for Etherboot. gPXE has the same problem on the code, but I hadn't a chance to test gPXE using virtio-net yet. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
* [netdevice] Change link-layer push() and pull() methods to take raw typesMichael Brown2008-10-161-14/+13Star
| | | | | | | | | | EFI requires us to be able to specify the source address for individual transmitted packets, and to be able to extract the destination address on received packets. Take advantage of this to rationalise the push() and pull() methods so that push() takes a (dest,source,proto) tuple and pull() returns a (dest,source,proto) tuple.