fec: Do not access unexisting register in Coldfire
Subsystems (3)
PATCH 1/1 fec: Do not access unexisting register in Coldfire
From: Fabio Estevam <[email protected]>
Commit 55cd48c821de ("net: fec: stop the "rcv is not +last, " error messages") introduces a write to a register that does not exist in Coldfire.
Move the FEC_FTRL register access inside the FEC_QUIRK_HAS_RACC 'if' block, so that we guarantee it will not be used on Coldfire CPUs.
--- drivers/net/ethernet/freescale/fec_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/freescale/fec_main.c +1 -1
@@ -943,8 +943,8 @@ fec_restart(struct net_device *ndev) else val &= ~FEC_RACC_OPTIONS;writel (val, fep->hwp +FEC_RACC ); + writel(PKT_MAXBUF_SIZE, fep->hwp + FEC_FTRL); } -writel (PKT_MAXBUF_SIZE , fep->hwp +FEC_FTRL );#endif /*
Signature · 1 line
1.9.1
From: Fabio Estevam <[email protected]>
Date: Thu, 31 Mar 2016 12:05:17 -0300
Quoted 11 lines
From: Fabio Estevam <[email protected]>
Commit
55cd48c821de("net: fec: stop the "rcv is not +last, " error messages") introduces a write to a register that does not exist in Coldfire.Move the
FEC_FTRLregister access inside theFEC_QUIRK_HAS_RACC'if' block, so that we guarantee it will not be used on Coldfire CPUs.Reported-by Greg Ungerer <[email protected]>Signed-off-by Fabio Estevam <[email protected]>
Applied, thanks.
Thanks for taking care of that Fabio.
Regards
Greg
Quoted 30 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Commit
55cd48c821de("net: fec: stop the "rcv is not +last, " error messages") introduces a write to a register that does not exist in Coldfire.Move the
FEC_FTRLregister access inside theFEC_QUIRK_HAS_RACC'if' block, so that we guarantee it will not be used on Coldfire CPUs.Reported-by Greg Ungerer <[email protected]>Signed-off-by Fabio Estevam <[email protected]>--- drivers/net/ethernet/freescale/fec_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ethernet/freescale/fec_main.c +1
-1@@ -943,8 +943,8 @@ fec_restart(struct net_device *ndev) else val &= ~FEC_RACC_OPTIONS;writel (val, fep->hwp +FEC_RACC ); + writel(PKT_MAXBUF_SIZE, fep->hwp + FEC_FTRL); } -writel (PKT_MAXBUF_SIZE , fep->hwp +FEC_FTRL );#endif /*
From: Fabio Estevam <[email protected]> Sent: Thursday, March 31, 2016 11:05 PM
Quoted 36 lines
To: [email protected]
Cc: Fugang Duan <[email protected]>; [email protected]; [email protected]; [email protected]; Fabio Estevam <[email protected]>
Subject: [PATCH] fec: Do not access unexisting register in ColdfireFrom: Fabio Estevam <[email protected]>
Commit
55cd48c821de("net: fec: stop the "rcv is not +last, " error messages") introduces a write to a register that does not exist in Coldfire.Move the
FEC_FTRLregister access inside theFEC_QUIRK_HAS_RACC'if' block, so that we guarantee it will not be used on Coldfire CPUs.Reported-by Greg Ungerer <[email protected]>Signed-off-by Fabio Estevam <[email protected]>--- drivers/net/ethernet/freescale/fec_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ethernet/freescale/fec_main.c +1
-2@@ -943,8 +943,8 @@ fec_restart(struct net_device *ndev) else val &= ~FEC_RACC_OPTIONS;writel (val, fep->hwp +FEC_RACC ); + writel(PKT_MAXBUF_SIZE, fep->hwp + FEC_FTRL); } -writel (PKT_MAXBUF_SIZE , fep->hwp +FEC_FTRL );#endif /* --
Quoted 1 line
1.9.1
If you stick to do it like this, you must add comments on the quirk flag FEC_QUIRK_HAS_RACC.