diff options
author | Michael Brown | 2006-12-18 16:28:34 +0100 |
---|---|---|
committer | Michael Brown | 2006-12-18 16:28:34 +0100 |
commit | a497e16767dc81f0c5aef2c9102f4ca5bbbf93f9 (patch) | |
tree | 914f9e49a43a0e73484551782ab0fcfdc8b63dc1 /src | |
parent | Print welcome banner in bold (which will come out as bright white text (diff) | |
download | ipxe-a497e16767dc81f0c5aef2c9102f4ca5bbbf93f9.tar.gz ipxe-a497e16767dc81f0c5aef2c9102f4ca5bbbf93f9.tar.xz ipxe-a497e16767dc81f0c5aef2c9102f4ca5bbbf93f9.zip |
The "increment MAC address by port number" hack applies only to EF1.
Diffstat (limited to 'src')
-rw-r--r-- | src/drivers/net/etherfabric.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/drivers/net/etherfabric.c b/src/drivers/net/etherfabric.c index 9040f0cf..e760b124 100644 --- a/src/drivers/net/etherfabric.c +++ b/src/drivers/net/etherfabric.c @@ -1218,8 +1218,13 @@ static int ef1002_read_eeprom ( struct efab_nic *efab ) { struct i2c_interface *i2c = &efab->ef1002_i2c.i2c; struct i2c_device *i2cdev = &efab->ef1002_eeprom; - return ( i2c->read ( i2c, i2cdev, EF1_EEPROM_HWADDR_OFFSET, - efab->mac_addr, sizeof ( efab->mac_addr ) ) == 0); + if ( i2c->read ( i2c, i2cdev, EF1_EEPROM_HWADDR_OFFSET, + efab->mac_addr, sizeof ( efab->mac_addr ) ) != 0 ) + return 0; + + efab->mac_addr[ETH_ALEN-1] += efab->port; + + return 1; } /** RX descriptor */ @@ -3194,7 +3199,6 @@ static int efab_init_nic ( struct efab_nic *efab ) { /* Read MAC address from EEPROM */ if ( ! efab->op->read_eeprom ( efab ) ) return 0; - efab->mac_addr[ETH_ALEN-1] += efab->port; /* Initialise MAC and wait for link up */ if ( ! efab_init_mac ( efab ) ) |