mirror of
https://github.com/xcat2/xNBA.git
synced 2025-08-25 20:50:29 +00:00
[realtek] Always set high dword of ring address registers
Some RTL8169 cards (observed with an RTL8169SC) power up with garbage values in the ring address registers, and do not clear the registers on reset. Fix by always setting the high dword of the ring address registers. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -409,11 +409,9 @@ static int realtek_create_ring ( struct realtek_nic *rtl,
|
||||
|
||||
/* Program ring address */
|
||||
address = virt_to_bus ( ring->desc );
|
||||
writel ( ( ( ( uint64_t ) address ) >> 32 ),
|
||||
rtl->regs + ring->reg + 4 );
|
||||
writel ( ( address & 0xffffffffUL ), rtl->regs + ring->reg );
|
||||
if ( sizeof ( physaddr_t ) > sizeof ( uint32_t ) ) {
|
||||
writel ( ( ( ( uint64_t ) address ) >> 32 ),
|
||||
rtl->regs + ring->reg + 4 );
|
||||
}
|
||||
DBGC ( rtl, "REALTEK %p ring %02x is at [%08llx,%08llx)\n",
|
||||
rtl, ring->reg, ( ( unsigned long long ) address ),
|
||||
( ( unsigned long long ) address + ring->len ) );
|
||||
|
Reference in New Issue
Block a user