summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/rtl8139.c
Commit message (Collapse)AuthorAgeFilesLines
* [netdevice] Separate out the concept of hardware and link-layer addressesMichael Brown2009-08-121-1/+1
| | | | | | | | | | | The hardware address is an intrinsic property of the hardware, while the link-layer address can be changed at runtime. This separation is exposed via APIs such as PXE and EFI, but is currently elided by gPXE. Expose the hardware and link-layer addresses as separate properties within a net device. Drivers should now fill in hw_addr, which will be used to initialise ll_addr at the time of calling register_netdev().
* [rtl8139] Split debug messages into DBGLVL_LOG and DBGLVL_EXTRAMichael Brown2009-06-231-13/+18
|
* [legal] Add a selection of FILE_LICENCE declarationsMichael Brown2009-05-181-0/+2
| | | | | Add FILE_LICENCE declarations to almost all files that make up the various standard builds of gPXE.
* [pci] Add driver_data field to struct pci_device_idThomas Miletich2009-03-261-14/+14
| | | | | Modified-by: Michael Brown <mcb30@etherboot.org> Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [rtl8139] 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-121-1/+1
|
* [NETDEV] Add notion of link stateMichael Brown2008-04-221-0/+3
| | | | | | | | | | | 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.
* [Settings] Migrate DHCP and NVO code to the new settings API (untested)Michael Brown2008-03-211-14/+18
|
* Modify gPXE core and drivers to work with the new timer subsystemAlexey Zaytsev2008-03-021-1/+1
| | | | Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
* Various warnings fixups for OpenBSD with gcc-3.3.5.Michael Brown2007-12-071-1/+1
|
* Added missing "static"Michael Brown2007-07-091-1/+1
|
* Use net_device_operations structure and netdev_nullify() to allow forMichael Brown2007-07-071-20/+28
| | | | | | | | | | | safe dropping of the netdev ref by the driver while other refs still exist. Add netdev_irq() method. Net device open()/close() methods should no longer enable or disable IRQs. Remove rx_quota; it wasn't used anywhere and added too much complexity to implementing correct interrupt-masking behaviour in pxe_undi.c.
* Use netdev_rx_err() to report receive errors.Michael Brown2007-07-051-0/+2
|
* Kill off now-redundant _irq() methods.Michael Brown2007-07-031-28/+0Star
|
* Avoid double free on I/O buffer when rtl_transmit() returns failure.Michael Brown2007-07-031-2/+1Star
| | | | Convert printf() to DBG(); printf() is not allowed in drivers.
* Enable/disable interrupts at open/close time.Michael Brown2007-07-031-0/+9
|
* Kill off hotplug.h and just make net devices normal reference-countedMichael Brown2007-06-271-21/+14Star
| | | | | | structures. DHCP still broken and #if 0'd out.
* Add missing call to free_iob().Michael Brown2007-06-101-0/+1
|
* Update email addresses in driversMarty Connor2007-06-091-1/+1
|
* pkbuff->iobuf changeoverMichael Brown2007-05-191-19/+19
| | | | | | | | Achieved via Perl using: perl -pi -e 's/pk_buff/io_buffer/g; s/Packet buffer/I\/O buffer/ig; ' \ -e 's/pkbuff\.h/iobuf.h/g; s/pkb_/iob_/g; s/_pkb/_iob/g; ' \ -e 's/pkb/iobuf/g; s/PKB/IOB/g;'
* Use stdio.h instead of vsprintf.hMichael Brown2007-01-191-1/+1
|
* Include stdlib.h rather than malloc.hMichael Brown2007-01-181-1/+2
|
* Respect the RX quota. This improves poll time by about 0.7us when theMichael Brown2007-01-181-0/+1
| | | | quota is 1.
* Extract packet-padding login from rtl8139.c to a separate pkbpad.c file.Michael Brown2007-01-111-21/+2Star
|
* Add "name" field to struct device to allow human-readable hardware deviceMichael Brown2007-01-101-0/+1
| | | | | | | | | | | names. Add "dev" pointer in struct net_device to tie network interfaces back to a hardware device. Force natural alignment of data types in __table() macros. This seems to prevent gcc from taking the unilateral decision to occasionally increase their alignment (which screws up the table packing).
* Add RX quotas to the net device poll() method. This avoids the problemMichael Brown2007-01-091-2/+3
| | | | | | of alloc_pkb() exhaustion when e.g. an iSCSI-booted DOS session is left idle for a long time at the C:\ prompt and builds up a huge packet backlog.
* Autopadding was sometimes overwriting the struct list_head at the endMichael Brown2007-01-091-7/+16
| | | | | | | | | | | | of the packet buffer. Although pkbuffs are guaranteed to be at least PKB_ZLEN bytes long, there's no guarantee that the data starts at the start of the packet buffer. Since we have to align data for rtl8139 anyway, and since the start of the packet buffer is guaranteed to be aligned to PKB_ALIGN, we may as well just shuffle the packet down so that it starts at the start of the packet buffer. This simultaneously aligns the packet and ensures that there is enough room for the zero-padding.
* Added net device TX queue; this will be needed to support the PXE UNDI APIMichael Brown2007-01-091-13/+2Star
| | | | | | (which will need us to wait for TX completions). Added debug autocolourisation to netdevice.c
* Make open() and close() an official part of the netdevice API.Michael Brown2007-01-041-10/+2Star
| | | | Call netdevice's poll() and transmit() methods only when device is open.
* Add support for non-volatile stored options in the RTL8139 EEPROM.Michael Brown2006-12-061-1/+38
|
* Added the generic block-splitting code to nvs.cMichael Brown2006-12-041-21/+1Star
|
* Abstracted out part of the concept of an SPI device to a generalised NVSMichael Brown2006-12-041-8/+10
| | | | | | | device. Separated the mechanisms of non-volatile storage access and non-volatile stored options.
* Changed length parameter in SPI methods to be a byte length, rather thanMichael Brown2006-12-041-1/+1
| | | | a word length.
* Generalised the SPI abstraction layer to also be able to handle interfacesMichael Brown2006-12-041-26/+24Star
| | | | | | that don't provide the full flexibility of a bit-bashing interface. Temporarily hacked rtl8139.c to use the new interface.
* Generalise three-wire interface to generic SPI interface.Michael Brown2006-06-141-42/+38Star
| | | | | Update rtl8139 driver to instantiate an SPI interface with a three-wire device attached.
* Rewrote to use the new net driver API, the updated PCI API, and theMichael Brown2006-05-271-316/+372
| | | | generic three-wire serial device support for EEPROM access.
* Restructured PCI subsystem to fit the new device model.Michael Brown2006-05-161-1/+1
| | | | | | | | | | | | | | Generic PCI code now handles 64-bit BARs correctly when setting "membase"; drivers should need to call pci_bar_start() only if they want to use BARs other than the first memory or I/O BAR. Split rarely-used PCI functions out into pciextra.c. Core PCI code is now 662 bytes (down from 1308 bytes in Etherboot 5.4). 284 bytes of this saving comes from the pci/pciextra split. Cosmetic changes to lots of drivers (e.g. vendor_id->vendor in order to match the names used in Linux).
* Header rearrangement.Michael Brown2006-04-241-1/+1
| | | | | | | | | I want to get to the point where any header in include/ reflects a standard user-level header (e.g. a POSIX header), while everything that's specific to gPXE lives in include/gpxe/. Headers that reflect a Linux header (e.g. if_ether.h) should also be in include/gpxe/, with the same name as the Linux header and, preferably, the same names used for the definitions.
* Symbol fixupsMichael Brown2005-05-031-2/+6
|
* Automatically updated withMichael Brown2005-04-261-2/+1Star
| | | | perl -pi -0777 -e 's/^static struct \w+_driver (\w+) =\s*(\w+_DRIVER \()/${2} ${1},/msg' *.c
* Automatically updated with the programMichael Brown2005-04-211-8/+11
| | | | | | | | | | | | | | | | | | | | | | #!/usr/bin/perl -w -pi -0777 use strict; ( my $type ) = /find_(\w+?)_boot_device/ or die "Could not find type\n"; ( my $disable ) = /\.disable\s*=\s*(\w+)/ or die "Could not locate disable\n"; s/(${disable}\s*\(\s*struct\s+nic\s+\*nic)(\s*\)\s*\{)(\s*)/${1}, struct ${type}_device \*${type} __unused${2}${3}nic_disable ( nic );${3}/s; s/(${disable}\s*\(\s*struct\s+nic\s+\*nic)(\s*\)\s*;)/${1}, struct ${type}_device \*${type}${2}/g; s/^\s*.disable\s*=\s*${disable}\s*,\s*?$//m; s/(_probe\s*\(\s*)struct\s+dev\s+\*dev/${1}struct nic \*nic/g; s/^\s*struct\s+nic\s+\*nic\s*=\s*nic_device\s*\(\s*dev\s*\)\s*;\s*?$//m; s/^(\s*)(nic->(ioaddr|irqno)\s*=\s*${type})/${1}${type}_fill_nic ( nic, ${type} );\n${1}${2}/m;
* Place the call to adjust_pci_device() back in the individual drivers,Michael Brown2005-04-161-0/+2
| | | | | since we probably shouldn't be doing this to arbitrary devices during a PCI bus scan...
* Fixed up automatic modifications by hand.Michael Brown2005-04-141-1/+1
|
* Automatically modified byMichael Brown2005-04-141-4/+1Star
| | | | perl -pi -0777 -e 's/\s*?if\s*\(\s*!\s*find_pci_device.*?,\s*\&(\w+)\s*\)\s*\)\s*return\s*0;(.*BOOT_DRIVER\s*\(.*?,)(.*?\))/$2 find_pci_boot_device, $1,$3/sm' *.c
* Made amenable to automatic update.Michael Brown2005-04-141-1/+0Star
|
* Automatically updated usingMichael Brown2005-04-141-2/+1Star
| | | | | | perl -pi -0777 -e 's/(_probe\s*\(\s*struct\s+dev.*?)(\s*\)\s*{.*?$)\s*struct pci_device.*?=\s*pci_device \( dev \);$/${1}, struct pci_device *pci${2}/ms' *.c sis900 excluded from update
* Hand-finishedMichael Brown2005-04-131-30/+27Star
|
* Automatically updated usingMichael Brown2005-04-131-5/+9
| | | | perl -pi -0777 -e 's/^(\s*)dev->disable(\s*)=\s*(\w+)_disable;\s*nic->poll\s*=\s*(\w+);\s*nic->transmit\s*=\s*(\w+);\s*nic->irq\s*=\s*(\w+);/static struct nic_operations ${3}_operations;\nstatic struct nic_operations ${3}_operations = {\n\t.connect\t= dummy_connect,\n\t.poll\t\t= $4,\n\t.transmit\t= $5,\n\t.irq\t\t= $6,\n\t.disable\t= ${3}_disable,\n};${1}nic->nic_op\t= &${3}_operations;/msg' *.c
* Automatically updated usingMichael Brown2005-04-131-2/+2
| | | | | | perl -pi -e 's/(_probe\s*\(\s*struct )dev \*.*?(\s*\);)/${1}dev *dev$2/' *.c perl -pi -e 's/(_disable\s*\(\s*struct )dev \*.*?(\s*\);)/${1}nic *nic$2/' *.c
* Automatically updated usingMichael Brown2005-04-131-3/+1Star
| | | | | | perl -pi -0777 -e 's/_disable\s*\(\s*struct dev \*dev\s*\)\s*{\s*struct nic \*nic.*?$/_disable ( struct nic *nic ) {/ms' *.c perl -pi -0777 -e 's/_disable\s*\(\s*struct dev \*dev(\s*__unused)?\)\s*{/_disable ( struct nic *nic$1 ) {/ms' *.c