* [PATCH v2] net: e1000: fix i210 register remapping
@ 2016-10-31 16:58 Lucas Stach
2016-11-02 14:08 ` Andrey Smirnov
2016-11-03 6:09 ` Sascha Hauer
0 siblings, 2 replies; 3+ messages in thread
From: Lucas Stach @ 2016-10-31 16:58 UTC (permalink / raw)
To: barebox
Don't mask out the remapping flag before checking the register offset,
otherwise none of the switch statements will ever match.
Fixes: ff6a64d42ffc (e1000: Consolidate register offset fixups)
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
v2: don't break it the other way around
---
drivers/net/e1000/regio.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/e1000/regio.c b/drivers/net/e1000/regio.c
index b2e9d7b6a7df..1610d5851f05 100644
--- a/drivers/net/e1000/regio.c
+++ b/drivers/net/e1000/regio.c
@@ -5,8 +5,6 @@
static uint32_t e1000_true_offset(struct e1000_hw *hw, uint32_t reg)
{
if (reg & E1000_MIGHT_BE_REMAPPED) {
- reg &= ~E1000_MIGHT_BE_REMAPPED;
-
if (hw->mac_type == e1000_igb) {
switch (reg) {
case E1000_EEWR:
@@ -19,7 +17,8 @@ static uint32_t e1000_true_offset(struct e1000_hw *hw, uint32_t reg)
reg = E1000_I210_EEMNGCTL;
break;
}
- };
+ }
+ reg &= ~E1000_MIGHT_BE_REMAPPED;
}
return reg;
--
2.10.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] net: e1000: fix i210 register remapping
2016-10-31 16:58 [PATCH v2] net: e1000: fix i210 register remapping Lucas Stach
@ 2016-11-02 14:08 ` Andrey Smirnov
2016-11-03 6:09 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Andrey Smirnov @ 2016-11-02 14:08 UTC (permalink / raw)
To: Lucas Stach; +Cc: barebox
On Mon, Oct 31, 2016 at 9:58 AM, Lucas Stach <l.stach@pengutronix.de> wrote:
> Don't mask out the remapping flag before checking the register offset,
> otherwise none of the switch statements will ever match.
>
> Fixes: ff6a64d42ffc (e1000: Consolidate register offset fixups)
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
FWIW, as an author of the bug (sorry!):
Acked-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> ---
> v2: don't break it the other way around
> ---
> drivers/net/e1000/regio.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/e1000/regio.c b/drivers/net/e1000/regio.c
> index b2e9d7b6a7df..1610d5851f05 100644
> --- a/drivers/net/e1000/regio.c
> +++ b/drivers/net/e1000/regio.c
> @@ -5,8 +5,6 @@
> static uint32_t e1000_true_offset(struct e1000_hw *hw, uint32_t reg)
> {
> if (reg & E1000_MIGHT_BE_REMAPPED) {
> - reg &= ~E1000_MIGHT_BE_REMAPPED;
> -
> if (hw->mac_type == e1000_igb) {
> switch (reg) {
> case E1000_EEWR:
> @@ -19,7 +17,8 @@ static uint32_t e1000_true_offset(struct e1000_hw *hw, uint32_t reg)
> reg = E1000_I210_EEMNGCTL;
> break;
> }
> - };
> + }
> + reg &= ~E1000_MIGHT_BE_REMAPPED;
> }
>
> return reg;
> --
> 2.10.1
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] net: e1000: fix i210 register remapping
2016-10-31 16:58 [PATCH v2] net: e1000: fix i210 register remapping Lucas Stach
2016-11-02 14:08 ` Andrey Smirnov
@ 2016-11-03 6:09 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2016-11-03 6:09 UTC (permalink / raw)
To: Lucas Stach; +Cc: barebox
On Mon, Oct 31, 2016 at 05:58:12PM +0100, Lucas Stach wrote:
> Don't mask out the remapping flag before checking the register offset,
> otherwise none of the switch statements will ever match.
>
> Fixes: ff6a64d42ffc (e1000: Consolidate register offset fixups)
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
> v2: don't break it the other way around
> ---
Applied, thanks
Sascha
> drivers/net/e1000/regio.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/e1000/regio.c b/drivers/net/e1000/regio.c
> index b2e9d7b6a7df..1610d5851f05 100644
> --- a/drivers/net/e1000/regio.c
> +++ b/drivers/net/e1000/regio.c
> @@ -5,8 +5,6 @@
> static uint32_t e1000_true_offset(struct e1000_hw *hw, uint32_t reg)
> {
> if (reg & E1000_MIGHT_BE_REMAPPED) {
> - reg &= ~E1000_MIGHT_BE_REMAPPED;
> -
> if (hw->mac_type == e1000_igb) {
> switch (reg) {
> case E1000_EEWR:
> @@ -19,7 +17,8 @@ static uint32_t e1000_true_offset(struct e1000_hw *hw, uint32_t reg)
> reg = E1000_I210_EEMNGCTL;
> break;
> }
> - };
> + }
> + reg &= ~E1000_MIGHT_BE_REMAPPED;
> }
>
> return reg;
> --
> 2.10.1
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-11-03 6:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-31 16:58 [PATCH v2] net: e1000: fix i210 register remapping Lucas Stach
2016-11-02 14:08 ` Andrey Smirnov
2016-11-03 6:09 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox