summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/3c90x.c
Commit message (Collapse)AuthorAgeFilesLines
* [3c90x] Fix High-MTU packet receptionThomas Miletich2013-08-201-0/+4
| | | | | | | | | | Prevent the card from flagging packets of 1518 bytes length as overlength. This fixes the High-MTU loopback test. Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [3c90x] Don't round up transmit packet lengthThomas Miletich2013-08-201-3/+4
| | | | | | | | | | The 3c90x B and C revisions support rounding up the packet length to a specific boundary. Disable this feature to avoid overlength packets. This fixes the loopback test. Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [3c90x] Stall upload engine before setting RX ring addressThomas Miletich2013-08-201-0/+4
| | | | | | | | According to the 3c90x datasheet we have to stall the upload (receive) engine before setting the receive ring address. Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pci] Make driver PCI ID a property of the PCI deviceMichael Brown2011-02-171-2/+1Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [3c90x] Clean up reset codeThomas Miletich2011-02-081-15/+10Star
| | | | | | | | | | | | | Remove duplicate hardware resets, remove network interface logic reset. This also fixes a bug where some 3c905C variants would return bogus EEPROM values because of a too short delay after the network reset. Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com> Reported-by: Peter Huewe <peterhuewe@gmx.de> Tested-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [3c90x] More fine-grained debugging levelsThomas Miletich2011-02-081-23/+23
| | | | | | | | | DBG is reserved for errors and important warnings only. DBG2 for additional information, e.g. "received packet". DBGP is used to print the name of every function as it is called. Signed-off-by: Thomas Miletich<thomas.miletich@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [netdevice] Call netdev_link_[up|down|err]() only while registeredMichael Brown2010-09-051-3/+3
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Rename gPXE to iPXEMichael Brown2010-04-201-14/+14
| | | | | | | | | | | Access to the gpxe.org and etherboot.org domains and associated resources has been revoked by the registrant of the domain. Work around this problem by renaming project from gPXE to iPXE, and updating URLs to match. Also update README, LOG and COPYRIGHTS to remove obsolete information. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [3c90x] Fix a3c90x_close() and a3c90x_remove() methods.Thomas Miletich2009-10-151-3/+3
| | | | | | | | | | | Both methods disabled packet tx and rx just to have it enabled again by calling a3c90x_reset(). Fixed by disabling tx and rx after the call to a3c90x_reset(). Tested by booting Ubuntu intrepid(8.10) directly from gPXE and pxelinux. Tested on 3c905, 3c905B, 3c905C. Signed-off-by: Marty Connor <mdc@etherboot.org>
* [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().
* [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.
* [3c90x] Add missing size_t format specifierJoshua Oreman2009-03-311-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [pci] Add driver_data field to struct pci_device_idThomas Miletich2009-03-261-22/+22
| | | | | Modified-by: Michael Brown <mcb30@etherboot.org> Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [3c90x] 3c90x driver rewrite using gPXE APIThomas Miletich2009-03-131-935/+900Star
| | | | | | | | | | | | | | | 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>
* [timer] Formalise the timer APIMichael Brown2008-10-121-2/+2
| | | | | | 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().
* Modify gPXE core and drivers to work with the new timer subsystemAlexey Zaytsev2008-03-021-3/+4
| | | | Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
* 3c90x driver fix (legacy) from Geert StaapersMarty Connor2007-12-201-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | From: Geert Stappers <stappers@stappers.nl> To: etherboot-developers@lists.sourceforge.net Subject: [Etherboot-developers] 3c90x polling again [patch] Date: Thu, 29 Nov 2007 09:22:36 +0100 User-Agent: Mutt/1.5.16 (2007-06-11) Hello, gPXE didn't work on 3COM 905C Tornado cards for me. It did transmit the DHCP request, but it didn't see the DHCP offer. Adding debug print statements allready solved the problem. Attached is a patch that has a cleaner delay then print statements. The core of it is - for(i=0;i<40000;i++); + mdelay(1); There was no research if the change is about a longer delay or about code NOT being optimized away. It works for me :-) Cheers Geert Stappers
* Remove *_fill_nic() calls, and directly set nic->ioaddr and nic->irqno .Marty Connor2007-12-131-2/+8
| | | | | | | | | | This needs to be done manually because if the irq() routine is implemented then we want something like "nic->irqno = pci->irqno;", else we do "nic->irqno = 0;" nic->ioaddr may also need to be set carefully. Also added local variables to end of many files, for emacs indentation to match kernel style (tab does 8 space indent).
* eth_ntoa fixupsMarty Connor2006-09-191-2/+3
|
* Added a very quick and dirty compatibility layer, to allowMichael Brown2006-06-051-1/+0Star
| | | | not-yet-updated drivers to at least function.
* Restructured PCI subsystem to fit the new device model.Michael Brown2006-05-161-2/+2
| | | | | | | | | | | | | | 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.
* Fix to compile under gpxeMichael Brown2006-03-161-1/+1
|
* Merge from Etherboot 5.4Michael Brown2006-03-161-1/+21
|
* 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-5/+8
| | | | | | | | | | | | | | | | | | | | | | #!/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...
* 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
* 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
* Finished by handMichael Brown2005-04-131-11/+12
|
* Automatically updated usingMichael Brown2005-04-131-4/+8
| | | | 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/+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
* Automatically updated usingMichael Brown2005-04-131-3/+5
| | | | perl -pi -0777 -e 's/_probe\s*\(\s*struct dev \*dev,\s*struct pci_device \*(\w+?)\s*\)\s*{(\s*)struct nic \*nic.*?$/_probe ( struct dev *dev ) {\n${2}struct nic *nic = nic_device ( dev );\n${2}struct pci_device *$1 = pci_device ( dev );/ms' *.c
* Auto-updated usingMichael Brown2005-04-131-8/+4Star
| | | | | | perl -pi -0777 -e 's/static struct pci_driver (\w+) __pci_driver = {.*\.name\s*=\s*(\"\S+\").*\.probe\s*=\s*(\w+).*\.ids\s*=\s*(\w+).*\.class\s*=\s*(\w+).*?};/static struct pci_driver $1 =\n\tPCI_DRIVER ( $2, $4, $5 );\n\nBOOT_DRIVER ( $2, $3 );/ms' *.c perl -pi -e 's/(PCI_DRIVER \(.*, )0 \);/${1}PCI_NO_CLASS );/' *.c
* Initial revisionMichael Brown2005-03-081-0/+996