* [U-Boot] [RFC] net/e1000: Fix EEPROM access error
@ 2014-10-17 20:44 York Sun
2014-10-17 23:40 ` Marek Vasut
2014-10-27 22:21 ` [U-Boot] [U-Boot,RFC] " Tom Rini
0 siblings, 2 replies; 4+ messages in thread
From: York Sun @ 2014-10-17 20:44 UTC (permalink / raw)
To: u-boot
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 <yorksun@freescale.com>
CC: Marek Vasut <marex@denx.de>
CC: Tim Harvey <tharvey@gateworks.com>
---
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) */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [RFC] net/e1000: Fix EEPROM access error
2014-10-17 20:44 [U-Boot] [RFC] net/e1000: Fix EEPROM access error York Sun
@ 2014-10-17 23:40 ` Marek Vasut
2014-10-20 23:28 ` Marcel Ziswiler
2014-10-27 22:21 ` [U-Boot] [U-Boot,RFC] " Tom Rini
1 sibling, 1 reply; 4+ messages in thread
From: Marek Vasut @ 2014-10-17 23:40 UTC (permalink / raw)
To: u-boot
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 <yorksun@freescale.com>
> CC: Marek Vasut <marex@denx.de>
> CC: Tim Harvey <tharvey@gateworks.com>
> ---
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [RFC] net/e1000: Fix EEPROM access error
2014-10-17 23:40 ` Marek Vasut
@ 2014-10-20 23:28 ` Marcel Ziswiler
0 siblings, 0 replies; 4+ messages in thread
From: Marcel Ziswiler @ 2014-10-20 23:28 UTC (permalink / raw)
To: u-boot
On Sat, 2014-10-18 at 01:40 +0200, Marek Vasut wrote:
> +CC Marcel. Marcel, can you please take a look at this and test this with i210
> card ?
Good catch. Yes, I can confirm that this properly fixes at least one of
the remaining issues as previously seen on the i210/i211.
Acked-by: Marcel Ziswiler <marcel@ziswiler.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [U-Boot,RFC] net/e1000: Fix EEPROM access error
2014-10-17 20:44 [U-Boot] [RFC] net/e1000: Fix EEPROM access error York Sun
2014-10-17 23:40 ` Marek Vasut
@ 2014-10-27 22:21 ` Tom Rini
1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2014-10-27 22:21 UTC (permalink / raw)
To: u-boot
On Fri, Oct 17, 2014 at 01:44:06PM -0700, 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 <yorksun@freescale.com>
> CC: Marek Vasut <marex@denx.de>
> CC: Tim Harvey <tharvey@gateworks.com>
> Acked-by: Marcel Ziswiler <marcel@ziswiler.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141027/08796c7b/attachment.pgp>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-10-27 22:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-17 20:44 [U-Boot] [RFC] net/e1000: Fix EEPROM access error York Sun
2014-10-17 23:40 ` Marek Vasut
2014-10-20 23:28 ` Marcel Ziswiler
2014-10-27 22:21 ` [U-Boot] [U-Boot,RFC] " Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox