diff options
author | 2014-11-26 17:03:52 +0000 | |
---|---|---|
committer | 2014-11-26 17:03:52 +0000 | |
commit | cd57b134c66522b5a91ce2d16363ae4f702132e8 (patch) | |
tree | 748c5509623ebb224623114c6580de160545b06d | |
parent | Drop sysmerge.log ; it used to be handy for batch mode but now the (diff) | |
download | wireguard-openbsd-cd57b134c66522b5a91ce2d16363ae4f702132e8.tar.xz wireguard-openbsd-cd57b134c66522b5a91ce2d16363ae4f702132e8.zip |
The onboard ix(4) interfaces on the SPARC T5 machines don't have a valid MAC
address in their EEPROM. Use the MAC address given by the "local-mac-address"
Open Firmware property instead.
ok mikeb@, deraadt@
-rw-r--r-- | sys/dev/pci/ixgbe.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/dev/pci/ixgbe.c b/sys/dev/pci/ixgbe.c index 8eb42ab30db..301903a8eb9 100644 --- a/sys/dev/pci/ixgbe.c +++ b/sys/dev/pci/ixgbe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ixgbe.c,v 1.13 2013/08/05 19:58:05 mikeb Exp $ */ +/* $OpenBSD: ixgbe.c,v 1.14 2014/11/26 17:03:52 kettenis Exp $ */ /****************************************************************************** @@ -37,6 +37,10 @@ #include <dev/pci/ixgbe.h> +#ifdef __sparc64__ +#include <dev/ofw/openfirm.h> +#endif + void ixgbe_set_pci_config_data_generic(struct ixgbe_hw *hw, uint16_t link_status); @@ -618,6 +622,14 @@ int32_t ixgbe_get_mac_addr_generic(struct ixgbe_hw *hw, uint8_t *mac_addr) DEBUGFUNC("ixgbe_get_mac_addr_generic"); +#ifdef __sparc64__ + struct ixgbe_osdep *os = hw->back; + + if (OF_getprop(PCITAG_NODE(os->os_pa.pa_tag), "local-mac-address", + mac_addr, ETHER_ADDR_LEN) == ETHER_ADDR_LEN) + return IXGBE_SUCCESS; +#endif + rar_high = IXGBE_READ_REG(hw, IXGBE_RAH(0)); rar_low = IXGBE_READ_REG(hw, IXGBE_RAL(0)); |