Skip to content

Commit

Permalink
r8169: fix broken register writes
Browse files Browse the repository at this point in the history
This is quite similar to b39fe41
though said registers are not even documented as 64-bit registers
- as opposed to the initial TxDescStartAddress ones - but as single
bytes which must be combined into 32 bits at the MMIO read/write
level before being merged into a 64 bit logical entity.

Credits go to Ben Hutchings <ben@decadent.org.uk> for the MAR
registers (aka "multicast is broken for ages on ARM) and to
Timo Teräs <timo.teras@iki.fi> for the MAC registers.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Francois Romieu authored and davem330 committed Mar 28, 2010
1 parent 1546a71 commit 78f1cd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -2820,8 +2820,8 @@ static void rtl_rar_set(struct rtl8169_private *tp, u8 *addr)
spin_lock_irq(&tp->lock);

RTL_W8(Cfg9346, Cfg9346_Unlock);
RTL_W32(MAC0, low);
RTL_W32(MAC4, high);
RTL_W32(MAC0, low);
RTL_W8(Cfg9346, Cfg9346_Lock);

spin_unlock_irq(&tp->lock);
Expand Down Expand Up @@ -4747,8 +4747,8 @@ static void rtl_set_rx_mode(struct net_device *dev)
mc_filter[1] = swab32(data);
}

RTL_W32(MAR0 + 0, mc_filter[0]);
RTL_W32(MAR0 + 4, mc_filter[1]);
RTL_W32(MAR0 + 0, mc_filter[0]);

RTL_W32(RxConfig, tmp);

Expand Down

0 comments on commit 78f1cd0

Please sign in to comment.