summaryrefslogtreecommitdiffstats
path: root/src/drivers
Commit message (Collapse)AuthorAgeFilesLines
* [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.
* [netdevice] Split multicast hashing out into an mc_hash methodMichael Brown2008-10-161-0/+16
| | | | | | Multicast hashing is an ugly overlap between network and link layers. EFI requires us to provide access to this functionality, so move it out of ipv4.c and expose it as a method of the link layer.
* [netdevice] Add maximum packet length as a net device propertyMichael Brown2008-10-161-4/+1Star
| | | | | Currently this length is set at device allocation time, and is never changed.
* [timer] Formalise the timer APIMichael Brown2008-10-125-17/+17
| | | | | | We now have two implementations for the timer API: one using the time-of-day counter at 40:70 and one using RDTSC. Both make use of timer2_udelay().
* [phantom] Add missing #include <gpxe/io.h>Michael Brown2008-10-121-0/+1
|
* [rtl8139] Add missing #include <string.h>Michael Brown2008-10-121-0/+1
|
* [natsemi] Add missing #include <string.h>Michael Brown2008-10-121-0/+1
|
* [e1000] Add missing #include <string.h>Michael Brown2008-10-121-0/+1
|
* [ioapi] Remove old io.h file and switch all users over to <gpxe/io.h>Michael Brown2008-10-1210-10/+10
|
* [cs89x0] Simplify obscure loop syntaxMichael Brown2008-10-121-2/+2
|
* [e1000] Fix dubious syntax in e1000 I/O wrapper macrosMichael Brown2008-10-121-24/+24
|
* [makefile] Add -Wformat-nonliteral as an extra warning categoryMichael Brown2008-10-103-3/+3
| | | | | | | | | | | -Wformat-nonliteral is not enabled by -Wall and needs to be explicitly specified. Modified the few files that use nonliteral format strings to work with this new setting in place. Inspired by a patch from Carl Karsten <carl@personnelware.com> and an identical patch from Rorschach <r0rschach@lavabit.com>.
* [i2c] Generalise i2c bit-bashing support to addressless devicesMichael Brown2008-10-012-42/+111
| | | | | | | | | | | | | | | | | | | | | | Some devices (e.g. the Atmel AT24C11) have no concept of a device address; they respond to every device address and use this value as the word address. Some other devices use part of the device address field to extend the word address field. Generalise the i2c bit-bashing support to handle this by defining the device address length and word address length as properties of an i2c device. The word address is assumed to overflow into the device address field if the address used exceeds the width of the word address field. Also add a bus reset mechanism. i2c chips don't usually have a reset line, so rebooting the host will not clear any bizarre state that the chip may be in. We reset the bus by clocking SCL until we see SDA high, at which point we know we can generate a start condition and have it seen by all devices. We then generate a stop condition to leave the bus in a known state prior to use. Finally, add some extra debugging messages to i2c_bit.c.
* [arbel] Fix off-by-one error in the failure path in arbel_probe()Michael Brown2008-10-011-4/+4
|
* [hermon] Fix off-by-one error in the failure path in hermon_probe()Michael Brown2008-10-011-4/+4
|
* [tg3] Add PCI IDMichael Brown2008-09-291-0/+1
| | | | Reported working by Martin Kreiner <m.kreiner@levigo.de>
* [hermon] Allocate only as much memory as is needed for ICM and ICM AUXMichael Brown2008-09-281-47/+62
| | | | | | Use individual page mappings rather than a single whole-region mapping, to avoid the waste of memory that occurs due to the constraint that each mapped block must be aligned on its own size.
* [arbel] Allocate sufficient space for firmware bufferMichael Brown2008-09-251-1/+1
| | | | | | We were accidentally allocating only half the required amount of memory (given the alignment method) for the firmware buffer, leading to conflicts between the firmware buffer and gPXE code/data segments.
* [hermon] Allocate sufficient space for firmware bufferMichael Brown2008-09-251-1/+1
| | | | | | We were accidentally allocating only half the required amount of memory (given the alignment method) for the firmware buffer, leading to conflicts between the firmware buffer and gPXE code/data segments.
* [phantom] Skip command PEG initialisation if PEG is already runningMichael Brown2008-09-241-0/+11
| | | | | | | It is possible for the BIOS to use the UNDI API to bring up the NIC prior to system boot. If this happens, UNM_NIC_REG_CMDPEG_STATE will contain the value 0xf00f (UNM_NIC_REG_CMDPEG_STATE_INITIALIZE_ACK), and we should skip initialising the command PEG.
* [phantom] Omit an initialisation step now performed by the firmwareMichael Brown2008-09-241-2/+0Star
| | | | | | The firmware will now determine the right port mode on all cards, so the PXE driver doesn't have to set it. (Setting the port mode apparently breaks some newer cards.)
* [phantom] Fix P3 B1 silicon bug workaroundMichael Brown2008-08-271-1/+3
| | | | | | Commit f58cc3f introduced a temporary workaround for a bug in current prototype silicon, but failed to apply it to all eight PCI functions within the device.
* [phantom] Remove comment that no longer matches realityMichael Brown2008-08-261-3/+0Star
|
* [phantom] Temporary workaround for bug in prototype (P3 B1) siliconMichael Brown2008-08-262-1/+14
|
* [undi] Fill in ProtType correctly in PXENV_UNDI_ISRMichael Brown2008-08-201-21/+22
| | | | | | | | | Determine the network-layer packet type and fill it in for UNDI clients. This is required by some NBPs such as emBoot's winBoot/i. This change requires refactoring the link-layer portions of the gPXE netdevice API, so that it becomes possible to strip the link-layer header without passing the packet up the network stack.
* [virtio] Add legacy driver for KVM virtio-netStefan Hajnoczi2008-08-014-0/+723
| | | | | | | | This patch adds support for the virtio-net adapter provided by KVM. Written by Laurent Vivier <Laurent.Vivier@bull.net> for Etherboot. Wrapped as legacy driver for gPXE by Stefan Hajnoczi <stefanha@gmail.com>.
* [tg3] Added support for tg3-5754.Andrew Schran2008-07-242-25/+66
| | | | | | | In tg3_chip_reset(), the PCI_EXPRESS change is taken from the Linux tg3 driver. I am not sure what exactly it does (it is not documented in the Linux driver), but it is necessary for the NIC to work correctly.
* [phantom] Add new board typeMichael Brown2008-07-242-0/+2
|
* [phantom] Guard against partially-written status descriptorsMichael Brown2008-07-171-15/+28
| | | | | | | | | | | Conjecture: The hardware issues 64-bit DMA writes of status descriptors, which some PCI bridges seem to split into two 32-bit writes in reverse order (i.e. dword 1 first). This means that we sometimes observe a partial status descriptor. Add an explicit check to ensure that the descriptor is complete before processing it. Also ensure that the RDS consumer counter is incremented only when we know that we have actually consumed an RX descriptor.
* [forcedeth] Add support for PCI ID 10de:0373Andrew Schran2008-07-101-0/+4
|
* [hermon] Add support for MT26418 deviceMichael Brown2008-07-091-0/+1
| | | | | PCI ID supplied (and tested) by Frederic Temporelli <frederic.temporelli@bull.net>
* [phantom] Remove warning relating to now-fixed firmware bugMichael Brown2008-07-081-11/+0Star
|
* [phantom] Add NetXen dual copyrightMichael Brown2008-07-083-0/+21
|
* [phantom] Initialise RCVPEG before reading MAC addressesMichael Brown2008-07-081-4/+4
|
* [phantom] Add support for NetXen Phantom NICsMichael Brown2008-07-055-0/+3065
|
* [ns8390] Use stub files instead of src/ConfigH. Peter Anvin2008-06-304-0/+23
| | | | | | | | | | | ns8390.c can produce four different drivers (one PCI, three ISA.) The ISA driver requires setting a few macros; do that by setting defines in stub files instead of using src/Config. Currently, all the ISA drivers are broken (they were not enabled by default), so #if 0 them out. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* [tg3] Recognize the BCM5789Steven Walter2008-06-271-0/+1
| | | | | | Add an entry to tg3_nics for the BCM5789 Signed-off-by: Steven Walter <stevenrwalter@gmail.com>
* [via-rhine] Fix erroneous uses of memory I/O instead of port I/OStefan Hajnoczi2008-06-121-3/+3
|
* [libc] Fix isdigit(), islower() and isupper().Michael Brown2008-05-192-12/+6Star
| | | | From: Stefan Hajnoczi <stefanha@gmail.com>
* [tg3] Add support for tg3-5721Michael Brown2008-05-192-1/+4
| | | | | | | | | | From: Daniel Mealha Cabrita <dancab@utfpr.edu.br> I've added tg3-5721 support for gPXE, the patch (against gpxe-0.9.3) is attached to this message. This chipset is present in HP ML150 G2 servers (possibly other HP machines as well).
* [MTNIC] Minor cleanups of vendor-provided driver for Mellanox 10GigE cardsMichael Brown2008-04-222-88/+77Star
| | | | | | | | | Drivers are not allowed to call printf(). Converted eprintf() to DBG(), and removed spurious startup banner. Fixed hardcoded inclusion of little_bswap.h Use EIO rather than 1 as an error number.
* [NETDEV] Add notion of link stateMichael Brown2008-04-227-1/+37
| | | | | | | | | | | Add ability for network devices to flag link up/down state to the networking core. Autobooting code will now wait for link-up before attempting DHCP. IPoIB reflects the Infiniband link state as the network device link state (which is not strictly correct; we also need a succesful IPoIB IPv4 broadcast group join), but is probably more informative.
* [Infiniband] Fix event queue doorbell ringing on ArbelMichael Brown2008-04-222-2/+14
|
* [Infiniband] Add multiport support for Arbel cardsMichael Brown2008-04-223-18/+304
|
* [Infiniband] Move event-queue process from driver to Infiniband coreMichael Brown2008-04-213-228/+253
|
* [Hermon] Fix event queue doorbells.Michael Brown2008-04-182-24/+60
| | | | | | Event queue doorbells must use UAR pages 0-127 depending on event queue number; other doorbells must use pages 128+ (and we choose to use page 128).
* [Infiniband] Add preliminary multiple port support for Hermon cardsMichael Brown2008-04-183-100/+504
| | | | | | | | | | | | Infiniband devices no longer block waiting for link-up in register_ibdev(). Hermon driver needs to create an event queue and poll for link-up events. Infiniband core needs to reread MAD parameters when link state changes. IPoIB needs to cope with Infiniband link parameters being only partially available at probe and open time.
* [Drivers-r8169] Add support for newer rtl8169 variants from Hilko BengenMarty Connor2008-03-311-221/+360
| | | | | 03-19-2008, Hilko Bengen, Cleanups and fixes for newer cards (successfully tested with 8110SC-d onboard NIC)