From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Sat, 18 Oct 2014 01:40:22 +0200 Subject: [U-Boot] [RFC] net/e1000: Fix EEPROM access error In-Reply-To: <1413578646-18119-1-git-send-email-yorksun@freescale.com> References: <1413578646-18119-1-git-send-email-yorksun@freescale.com> Message-ID: <201410180140.22496.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Friday, October 17, 2014 at 10:44:06 PM, York Sun wrote: > Commit 951860634fdb557bbb58e0f99215391bc0c29779 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: York Sun > CC: Marek Vasut > CC: Tim Harvey > --- > Marek, please take a look at this change. I have no knowledge about > e1000 driver. So I don't know if the original change was intended. > Reverting this change fixes the problem I have on my board. > > drivers/net/e1000.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c > index 6e8765c..b092867 100644 > --- a/drivers/net/e1000.c > +++ b/drivers/net/e1000.c > @@ -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) */ +CC Marcel. Marcel, can you please take a look at this and test this with i210 card ? Thanks! Best regards, Marek Vasut