dde_ipxe: enable flavor of I210 in apu2c4 boards

The apu2c4 boards have 3 i210 PCI devices (one for each LAN port). Other
apu2 boards use i211 device IDs according to https://www.pcengines.ch/apu2.htm
but could not be tested.

This commit also incorporates an upstream MAC address handling fix.
This commit is contained in:
Christian Helmuth 2017-12-27 21:38:36 +01:00 committed by Norman Feske
parent cefd2e22fa
commit b630bd8d6a
2 changed files with 25 additions and 3 deletions

View File

@ -1,7 +1,28 @@
diff --git a/src/drivers/net/intel.c b/src/drivers/net/intel.c diff --git a/src/drivers/net/intel.c b/src/drivers/net/intel.c
index c3a7d407..c1eef144 100644 index c3a7d407..8e8cea67 100644
--- a/src/drivers/net/intel.c --- a/src/drivers/net/intel.c
+++ b/src/drivers/net/intel.c +++ b/src/drivers/net/intel.c
@@ -219,16 +219,16 @@ static int intel_fetch_mac ( struct intel_nic *intel, uint8_t *hw_addr ) {
DBGC ( intel, "INTEL %p has autoloaded MAC address %s\n",
intel, eth_ntoa ( mac.raw ) );
- /* Try to read address from EEPROM */
- if ( ( rc = intel_fetch_mac_eeprom ( intel, hw_addr ) ) == 0 )
- return 0;
-
/* Use current address if valid */
if ( is_valid_ether_addr ( mac.raw ) ) {
memcpy ( hw_addr, mac.raw, ETH_ALEN );
return 0;
}
+ /* Otherwise, try to read address from EEPROM */
+ if ( ( rc = intel_fetch_mac_eeprom ( intel, hw_addr ) ) == 0 )
+ return 0;
+
DBGC ( intel, "INTEL %p has no MAC address to use\n", intel );
return -ENOENT;
}
@@ -305,6 +305,9 @@ static int intel_reset ( struct intel_nic *intel ) { @@ -305,6 +305,9 @@ static int intel_reset ( struct intel_nic *intel ) {
return 0; return 0;
} }
@ -12,7 +33,7 @@ index c3a7d407..c1eef144 100644
/* Reset PHY and MAC simultaneously */ /* Reset PHY and MAC simultaneously */
writel ( ( ctrl | INTEL_CTRL_RST | INTEL_CTRL_PHY_RST ), writel ( ( ctrl | INTEL_CTRL_RST | INTEL_CTRL_PHY_RST ),
intel->regs + INTEL_CTRL ); intel->regs + INTEL_CTRL );
@@ -953,6 +956,16 @@ static struct pci_device_id intel_nics[] = { @@ -953,6 +956,17 @@ static struct pci_device_id intel_nics[] = {
PCI_ROM ( 0x8086, 0x1526, "82576-5", "82576", 0 ), PCI_ROM ( 0x8086, 0x1526, "82576-5", "82576", 0 ),
PCI_ROM ( 0x8086, 0x1527, "82580-f2", "82580 Fiber", 0 ), PCI_ROM ( 0x8086, 0x1527, "82580-f2", "82580 Fiber", 0 ),
PCI_ROM ( 0x8086, 0x1533, "i210", "I210", 0 ), PCI_ROM ( 0x8086, 0x1533, "i210", "I210", 0 ),
@ -26,6 +47,7 @@ index c3a7d407..c1eef144 100644
+ PCI_ROM ( 0x8086, 0x15d7, "i219lm", "I219-LM", 0 ), + PCI_ROM ( 0x8086, 0x15d7, "i219lm", "I219-LM", 0 ),
+ PCI_ROM ( 0x8086, 0x15e3, "i219lm", "I219-LM", 0 ), + PCI_ROM ( 0x8086, 0x15e3, "i219lm", "I219-LM", 0 ),
+ PCI_ROM ( 0x8086, 0x1570, "i219v", "I219V", 0 ), + PCI_ROM ( 0x8086, 0x1570, "i219v", "I219V", 0 ),
+ PCI_ROM ( 0x8086, 0x157b, "i210-2", "I210", 0 ),
PCI_ROM ( 0x8086, 0x294c, "82566dc-2", "82566DC-2", 0 ), PCI_ROM ( 0x8086, 0x294c, "82566dc-2", "82566DC-2", 0 ),
PCI_ROM ( 0x8086, 0x2e6e, "cemedia", "CE Media Processor", 0 ), PCI_ROM ( 0x8086, 0x2e6e, "cemedia", "CE Media Processor", 0 ),
}; };

View File

@ -1 +1 @@
fade233a1bdea83652bb05a0e55d8566e3047884 a4a9f5aaa271091785023b6367e5911438144a71