From 6deac6f2b46f84b8822683cce92eab4edf2ade5e Mon Sep 17 00:00:00 2001 From: Alexander Duyck Date: Mon, 5 Oct 2009 06:36:01 +0000 Subject: [PATCH] igb: add flushes between RAR writes when setting mac address There are some switches that will do write combining when they see two sequential regions written. In order to avoid any possible write combining issues it is necessary to add a flush after writing each piece of a rar register. Signed-off-by: Alexander Duyck Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller --- drivers/net/igb/e1000_mac.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/igb/e1000_mac.c b/drivers/net/igb/e1000_mac.c index 4969a5b1cf3c..2ad358a240bf 100644 --- a/drivers/net/igb/e1000_mac.c +++ b/drivers/net/igb/e1000_mac.c @@ -247,8 +247,15 @@ void igb_rar_set(struct e1000_hw *hw, u8 *addr, u32 index) if (rar_low || rar_high) rar_high |= E1000_RAH_AV; + /* + * Some bridges will combine consecutive 32-bit writes into + * a single burst write, which will malfunction on some parts. + * The flushes avoid this. + */ wr32(E1000_RAL(index), rar_low); + wrfl(); wr32(E1000_RAH(index), rar_high); + wrfl(); } /** -- 2.20.1