summaryrefslogtreecommitdiff
path: root/drivers/net/e1000.c
Commit message (Collapse)AuthorAgeLines
* e1000: fix no nvm buildMarcel Ziswiler2014-09-24-0/+2
| | | | | | | | | | | Fix the following build error in case CONFIG_E1000_NO_NVM is enabled: CC drivers/net/e1000.o drivers/net/e1000.c: In function ‘e1000_initialize’: drivers/net/e1000.c:5365:5: error: ‘struct e1000_hw’ has no member named ‘eeprom_semaphore_present’ make[1]: *** [drivers/net/e1000.o] Error 1 make: *** [drivers/net] Error 2 Acked-by: Marek Vasut <marex@denx.de>
* e1000: add i210 supportMarek Vasut2014-08-21-27/+168
| | | | | | | Add i210 support to the e1000 driver. Signed-off-by: Marek Vasut <marex@denx.de> Acked-by: Tim Harvey <tharvey@gateworks.com>
* e1000: Implement dcache supportMarek Vasut2014-08-21-22/+49
| | | | | | | | Implement proper support for cache flushing and invalidation into the Intel e1000 NIC driver. Signed-off-by: Marek Vasut <marex@denx.de> Acked-by: Tim Harvey <tharvey@gateworks.com>
* e1000: remove redundant assignmentDavid Müller (ELSOFT AG)2014-04-18-1/+0
| | | | | Signed-off-by: David Mueller <d.mueller@elsoft.ch> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* drivers/net/e1000: Introduce CONFIG_E1000_NO_NVMRojhalat Ibrahim2013-11-22-5/+29
| | | | | | | | | | | The e1000 driver expects to always have some kind of non-volatile memory attached directly to the ethernet controller chip. This means that I would have to add an additional separate flash chip to my custom board just to store essentially the MAC address. Since I don't want to do that, this patch introduces a new config option CONFIG_E1000_NO_NVM. If defined it disables all accesses to the NVM. I have tested the patch with a 82574 controller. Signed-off-by: Rojhalat Ibrahim <imr@rtschenk.de>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-24-16/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* Consolidate bool typeYork Sun2013-04-01-60/+60
| | | | | | | | | | | | | 'bool' is defined in random places. This patch consolidates them into a single header file include/linux/types.h, using stdbool.h introduced in C99. All other #define, typedef and enum are removed. They are all consistent with true = 1, false = 0. Replace FALSE, False with false. Replace TRUE, True with true. Skip *.py, *.php, lib/* files. Signed-off-by: York Sun <yorksun@freescale.com>
* e1000e : Correct Rx Threshold granularityRuchika Gupta2012-12-15-0/+10
| | | | | | | | | | | | | | In e1000e driver, Rx descriptor queue is used such that hardware can add only one descriptor at a time. So the WTHRESH granularity in RXDCTL should be set to single descriptor. This would ensure that every time controller fills a Rx descriptor, it is flushed to host memory. Earlier this granularity was in cache line units i.e 2 descriptors. This leads to controller always waiting for 2 descriptors before flushing them out. But since not more than one Rx BD is actually available , the accumulation condition never gets hit. Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com> Signed-off-by: Vakul Garg <vakul@freescale.com> Acked-by: Roy Zang <tie-fei.zang@freescale.com>
* ppc4xx: Remove AP1000 board supportStefan Roese2012-10-15-41/+1
| | | | | | | | | As the board seems to be unmaintained for some time, lets remove the support in mainline completely. Signed-off-by: Stefan Roese <sr@denx.de> Cc: James MacAulay <james.macaulay@amirix.com> Acked-by: Marek Vasut <marex@denx.de>
* drivers/net/e1000.c: Fix compile warningJoe Hershberger2012-05-22-3/+2
| | | | | | | | Fix this: e1000.c: In function 'e1000_initialize': e1000.c:5264:13: warning: assignment from incompatible pointer type Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* drivers/net/e1000.c: Fix GCC 4.6 build warningsAnatolij Gustschin2011-12-20-1/+1
| | | | | | | | | | | | | | Fix: e1000.c: In function 'e1000_read_mac_addr': e1000.c:1149:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] e1000.c:1149:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Kyle Moffett <Kyle.D.Moffett@boeing.com> Acked-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
* e1000: fix unused variable waring for e1000 driverZang Roy-R619112011-11-17-3/+3
| | | | | | | | | | | | | Fix the following build warning in drivers/net/e1000.c e1000.c: In function 'e1000_reset_hw': e1000.c:1373:11: warning: variable 'icr' set but not used [-Wunused-but-set-variable] e1000.c: In function 'e1000_phy_init_script': e1000.c:4395:11: warning: variable 'ret_val' set but not used [-Wunused-but-set-variable] Signed-off-by: Roy Zang <tie-fei.zang@freescale.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Kyle Moffett <Kyle.D.Moffett@boeing.com>
* e1000: fix bugs from recent commitsWolfgang Denk2011-11-03-0/+1
| | | | | | | | | | | | | | Commit 114d7fc0 "e1000: Rewrite EEPROM checksum error to give more information" failed to initialize the checksum variable which should result in random results. Fix that. Commit 2326a94d caused a ton of "unused variable 'x'" warnings. Fix these. While we are at it, remove some bogus parens. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Kyle Moffett <Kyle.D.Moffett@boeing.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Tested-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
* e1000: Allow direct access to the E1000 SPI EEPROM deviceKyle Moffett2011-10-28-1/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a part of the manufacturing process for some of our custom hardware, we are programming the EEPROMs attached to our Intel 82571EB controllers from software using U-Boot and Linux. This code provides several conditionally-compiled features to assist in our manufacturing process: CONFIG_CMD_E1000: This is a basic "e1000" command which allows querying the controller and (if other config options are set) performing EEPROM programming. In particular, with CONFIG_E1000_SPI this allows you to display a hex-dump of the EEPROM, copy to/from main memory, and verify/update the software checksum. CONFIG_E1000_SPI_GENERIC: Build a generic SPI driver providing the standard U-Boot SPI driver interface. This allows commands such as "sspi" to access the bus attached to the E1000 controller. Additionally, some E1000 chipsets can support user data in a reserved space in the E1000 EEPROM which could be used for U-Boot environment storage. CONFIG_E1000_SPI: The core SPI access code used by the above interfaces. For example, the following commands allow you to program the EEPROM from a USB device (assumes CONFIG_E1000_SPI and CONFIG_CMD_E1000 are enabled): usb start fatload usb 0 $loadaddr 82571EB_No_Mgmt_Discrete-LOM.bin e1000 0 spi program $loadaddr 0 1024 e1000 0 spi checksum update Please keep in mind that the Intel-provided .eep files are organized as 16-bit words. When converting them to binary form for programming you must byteswap each 16-bit word so that it is in little-endian form. This means that when reading and writing words to the SPI EEPROM, the bit ordering for each word looks like this on the wire: Time >>> ------------------------------------------------------------------ ... [7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8], ... ------------------------------------------------------------------ (MSB is 15, LSB is 0). Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com> Cc: Ben Warren <biggerbadderben@gmail.com>
* e1000: Export core EEPROM access functions for SPI supportKyle Moffett2011-10-28-17/+5
| | | | | | | | | | | | A followup patch will be adding a configurable feature to enable programming of E1000 EEPROMs from the command line or via the generic U-Boot SPI interface. In order for it to work it needs access to certain E1000-internal functions, so export those in the e1000.h header file. Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com> Cc: Ben Warren <biggerbadderben@gmail.com>
* e1000: Rewrite EEPROM checksum error to give more informationKyle Moffett2011-10-28-18/+28
| | | | | | | | As an aide to debugging, we should print out the expected value of the EEPROM checksum in addition to just saying that it is wrong. Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com> Cc: Ben Warren <biggerbadderben@gmail.com>
* e1000: Restructure and streamline PCI device probingKyle Moffett2011-10-28-64/+62
| | | | | | | | | | | | | | | | | | | | | | | By allocating the e1000 device structures much earlier, we can easily generate better error messages and siginficantly clean things up. The only user-visable change (aside from reworded error messages) is that a detected e1000 device which fails to initialize due to software or hardware error will still be allocated a device number. As one example, consider a system with 2 e1000 PCI devices where the first controller has a corrupted EEPROM. Using the old code the second controller would be "e1000#0", while with this change it would be "e1000#1". This change should hopefully make such EEPROM errors much more straightforward to handle correctly in boot scripts and the like. It is also necessary for a followup patch which allows SPI programming of an e1000 controller's EEPROM even if the checksum is invalid. Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com> Cc: Ben Warren <biggerbadderben@gmail.com>
* e1000: Clean up handling of dual-port NICs and support 82571Kyle Moffett2011-10-28-33/+33
| | | | | | | Consolidate the test for a dual-port NIC to one location for easy modification, then fix support for the dual-port 82571. Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
* consolidate mdelay by providing a common function for all usersAnatolij Gustschin2011-10-22-1/+0
| | | | | | | | | There are several mdelay() definitions in the driver and board code. Remove them all and provide a common mdelay() in lib/time.c. Signed-off-by: Anatolij Gustschin <agust@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
* Net: Add Intel E1000 82574L PCIe card supportRoy Zang2011-04-11-8/+25
| | | | | | | | | Add Intel E1000 82574L PCIe card support. Test on MPC8544DS and MPC8572 board. Add the missing contact information for future support. Signed-off-by: Roy Zang <tie-fei.zang@freescale.com> Acked-by: Kumar Gala <galak@kernel.crashing.org>
* e1000: fix compile warningWolfgang Denk2010-11-26-1/+2
| | | | | | | | | Get rid of compiler warning: e1000.c: In function 'e1000_transmit': e1000.c:5028: warning: passing argument 1 of 'virt_to_phys' discards qualifiers from pointer target type Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Stefan Roese <sr@denx.de>
* net: e1000: typo using wrong argument to sizeofMatthew McClintock2010-11-17-1/+1
| | | | | | Typo from 4b29bdb0ed08412d225a8be94f61fc6c37a59dd5 Signed-off-by: Matthew McClintock <msm@freescale.com>
* net: e1000: Add initialized eth_device & e1000_hw structureKumar Gala2010-11-14-0/+14
| | | | | | | | | | | | | | nic and hw structures are allocated via malloc i.e. return memory is not zero initialized. Because of this few structure member like "function pointers" are initialized with garbage values. It may cause problem. for eg. during eth_initialize, dev->write_hwaddr is used. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Fixed typo. Signed-off-by: Wolfgang Denk <wd@denx.de>
* net: e1000: Add support for the Intel 82546GB controllerReinhard Arlt2009-12-13-0/+1
| | | | | | | | | This chip is equipped for example on the esd PMC-ETH2-GB board. So let's add it to the list of supported chips to the e1000 driver. Signed-off-by: Reinhard Arlt <reinhard.arlt@esd.eu> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* Use different PBA value for E1000 PCI and PCIe cardsRoy Zang2009-09-04-2/+10
| | | | | Signed-off-by: Roy Zang <tie-fei.zang@freescale.com> Acked-by: André Schwarz <andre.schwarz@matrix-vision.de>
* e1000: fix PCI memory addressingTimur Tabi2009-08-21-8/+9
| | | | | | | | | | | The Intel E1000 driver was making assumptions about the relationship between some virtual, physical, and PCI addresses. Also fix some bad usage of the DEBUGOUT macro Signed-off-by: Timur Tabi <timur@freescale.com> Acked-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* Fix E1000 build warning on AP1000 boardRoy Zang2009-08-10-44/+44
| | | | | | | | | | Fix E1000 build warning on AP1000 board Fix the build warning on AP1000 board: e1000.c:131: warning: 'e1000_read_eeprom' used but never defined e1000.c:2012: warning: 'e1000_set_phy_mode' defined but not used Signed-off-by: Roy Zang <tie-fei.zang@freescale.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* Add Intel E1000 PCIE card supportRoy Zang2009-08-08-467/+2631
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on Intel PRO/1000 Network Driver 7.3.20-k2 Add Intel E1000 PCIE card support. The following cards are added: INTEL_82571EB_COPPER INTEL_82571EB_FIBER, INTEL_82571EB_SERDES INTEL_82571EB_QUAD_COPPER INTEL_82571PT_QUAD_COPPER INTEL_82571EB_QUAD_FIBER INTEL_82571EB_QUAD_COPPER_LOWPROFILE INTEL_82571EB_SERDES_DUAL INTEL_82571EB_SERDES_QUAD INTEL_82572EI_COPPER INTEL_82572EI_FIBER INTEL_82572EI_SERDES INTEL_82572EI INTEL_82573E INTEL_82573E_IAMT INTEL_82573L INTEL_82546GB_QUAD_COPPER_KSP3 INTEL_80003ES2LAN_COPPER_DPT INTEL_80003ES2LAN_SERDES_DPT INTEL_80003ES2LAN_COPPER_SPT INTEL_80003ES2LAN_SERDES_SPT 82571EB_COPPER dual ports, 82572EI single port, 82572EI_COPPER single port PCIE cards and 82545EM_COPPER, 82541GI_LF pci cards are tested on both P2020 board and MPC8544DS board. Signed-off-by: Roy Zang <tie-fei.zang@freescale.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* drivers/net/e1000.c: missing terminator for supported devicesStefan Althoefer2009-01-27-0/+1
| | | | Signed-off-by: Stefan Althoefer <stefan.althoefer@web.de>
* Moved initialization of E1000 Ethernet controller to board_eth_init()Ben Warren2008-09-02-1/+1
| | | | | | | | | | | Affected boards: ap1000 mvbc_p PM854 Removed initialization of the driver from net/eth.c Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* Fix merge problemsStefan Roese2008-08-06-6/+7
| | | | Signed-off-by: Stefan Roese <sr@denx.de>
* e1000: add support for 82545GM 64bit PCI-X copper variantPaul Gortmaker2008-07-10-0/+2
| | | | | | | This PCI-X e1000 variant works by just adding in the correct PCI IDs in the appropriate places. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* net: Conditional COBJS inclusion of network driversShinya Kuribayashi2008-06-09-5/+0
| | | | | | | Replace COBJS-y with appropriate driver config names. Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* E1000: Add support for the 82541GI LF Intel Pro 1000 GT Desktop AdapterWolfgang Grandegger2008-06-02-0/+2
| | | | | Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* Coding Style cleanup; update CHANGELOGWolfgang Denk2008-04-13-77/+76
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* new PHY @ e1000 - 2nd tryAndre Schwarz2008-03-30-3/+51
| | | | | | | | Add 82541ER device with latest integrated IGP2 PHY. Introduced CONFIG_E1000_FALLBACK_MAC for NIC bring-up with empty eeprom. Signed-off-by: Andre Schwarz <andre.schwarz@matrix-vision.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* drivers/net : move net drivers to drivers/netJean-Christophe PLAGNIOL-VILLARD2007-11-25-0/+3016
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>