提交 76f8cdb2 编写于 作者: Y York Sun 提交者: Tom Rini

net/e1000: Fix EEPROM access error

Commit 95186063 may have changed
the logic unintentially from "if (!(swfw_sync & (fwmask | swmask)))"
to "if ((swfw_sync & swmask) && !(swfw_sync & fwmask))". This change
breaks some e1000 NIC with a message "ERROR: Unable to read EEPROM!".
Signed-off-by: NYork Sun <yorksun@freescale.com>
CC: Marek Vasut <marex@denx.de>
CC: Tim Harvey <tharvey@gateworks.com>
Acked-by: NMarcel Ziswiler <marcel@ziswiler.com>
上级 99819458
......@@ -1113,7 +1113,7 @@ e1000_swfw_sync_acquire(struct e1000_hw *hw, uint16_t mask)
return -E1000_ERR_SWFW_SYNC;
swfw_sync = E1000_READ_REG(hw, SW_FW_SYNC);
if ((swfw_sync & swmask) && !(swfw_sync & fwmask))
if (!(swfw_sync & (fwmask | swmask)))
break;
/* firmware currently using resource (fwmask) */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册