Skip to contentSkip to conversation

net: e1000: Support 64-bit physical address

PATCH New York Sun 3 participants 4 messages Aug 18, 2015 – Aug 25, 2015 Network drivers

lore
Share & tools
lore

York Sun

author
#0 lore raw

PATCH 1/1 net: e1000: Support 64-bit physical address

From: Mingkai Hu <[email protected]>

High 32-bit address is needed when u-boot runs in 64-bit space. Tested on armv8-based LS2085ARDB.

---

 drivers/net/e1000.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/e1000.c +4 -4
index d5d48b1..e816410 100644
@@ -4980,8 +4980,8 @@ e1000_configure_tx(struct e1000_hw *hw)
 	unsigned long tipg, tarc;
 	uint32_t ipgr1, ipgr2;
 
-	E1000_WRITE_REG(hw, TDBAL, (unsigned long)tx_base);
-	E1000_WRITE_REG(hw, TDBAH, 0);
+	E1000_WRITE_REG(hw, TDBAL, (unsigned long)tx_base & 0xffffffff);
+	E1000_WRITE_REG(hw, TDBAH, (unsigned long)tx_base >> 32);
 
 	E1000_WRITE_REG(hw, TDLEN, 128);
 
@@ -5124,8 +5124,8 @@ e1000_configure_rx(struct e1000_hw *hw)
 		E1000_WRITE_FLUSH(hw);
 	}
 	/* Setup the Base and Length of the Rx Descriptor Ring */
-	E1000_WRITE_REG(hw, RDBAL, (unsigned long)rx_base);
-	E1000_WRITE_REG(hw, RDBAH, 0);
+	E1000_WRITE_REG(hw, RDBAL, (unsigned long)rx_base & 0xffffffff);
+	E1000_WRITE_REG(hw, RDBAH, (unsigned long)rx_base >> 32);
 
 	E1000_WRITE_REG(hw, RDLEN, 128);
 
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH 1/1 net: e1000: Support 64-bit physical address

Hi,

Quoted 11 lines · Joe Hershberger
Quoted 7 lines · York Sun

From: Mingkai Hu <[email protected]>

High 32-bit address is needed when u-boot runs in 64-bit space. Tested on armv8-based LS2085ARDB.

Applied to u-boot-net, thanks!
-Joe

Unfortunately this commit causes build warnings on 32-bit systems.

drivers/net/e1000.c: In function ?e1000_configure_tx?:
drivers/net/e1000.c:4982:2: warning: right shift count >= width of type [enabled by default]
drivers/net/e1000.c: In function ?e1000_configure_rx?:
drivers/net/e1000.c:5126:2: warning: right shift count >= width of type [enabled by default]

Regards,
Bin