summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel@ziswiler.com>2014-10-21 14:15:00 +0200
committerStefan Agner <stefan.agner@toradex.com>2014-10-23 11:11:05 +0200
commit0e0456837c33ed7b8c09c75cb9ae8cccc95ce645 (patch)
tree34c6a814c01f05ed42e42965c8be11cb056da72a
parentf56d52eb5419325cecac674156b200ed61f82ed6 (diff)
e1000: fix sw fw sync on igb i210/i211
I finally had a look at the datasheet and spotted an additional register address difference between regular E1000 and i210/i211 chips. This patch fixes this and now successfully works on programmed i210/i211 as well as unprogrammed i211. Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
-rw-r--r--drivers/net/e1000.c6
-rw-r--r--drivers/net/e1000.h1
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c
index a13c03b8c9..c44c63b7c5 100644
--- a/drivers/net/e1000.c
+++ b/drivers/net/e1000.c
@@ -1115,7 +1115,10 @@ e1000_swfw_sync_acquire(struct e1000_hw *hw, uint16_t mask)
if (e1000_get_hw_eeprom_semaphore(hw))
return -E1000_ERR_SWFW_SYNC;
- swfw_sync = E1000_READ_REG(hw, SW_FW_SYNC);
+ if (hw->mac_type == e1000_igb)
+ swfw_sync = E1000_READ_REG(hw, I210_SW_FW_SYNC);
+ else
+ swfw_sync = E1000_READ_REG(hw, SW_FW_SYNC);
if (!(swfw_sync & (fwmask | swmask)))
break;
@@ -4439,7 +4442,6 @@ e1000_phy_hw_reset(struct e1000_hw *hw)
if (hw->mac_type >= e1000_82571)
mdelay(10);
-
} else {
/* Read the Extended Device Control Register, assert the PHY_RESET_DIR
* bit to put the PHY into reset. Then, take it out of reset.
diff --git a/drivers/net/e1000.h b/drivers/net/e1000.h
index b025ecc4fc..6d110eb5d5 100644
--- a/drivers/net/e1000.h
+++ b/drivers/net/e1000.h
@@ -2497,6 +2497,7 @@ struct e1000_hw {
#define ICH_GFPREG_BASE_MASK 0x1FFF
#define ICH_FLASH_LINEAR_ADDR_MASK 0x00FFFFFF
+#define E1000_I210_SW_FW_SYNC 0x5B50 /* Software-Firmware Synchronization - RW */
#define E1000_SW_FW_SYNC 0x05B5C /* Software-Firmware Synchronization - RW */
/* SPI EEPROM Status Register */