]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
fec: Do not access unexisting register in Coldfire
authorFabio Estevam <fabio.estevam@nxp.com>
Thu, 31 Mar 2016 15:05:17 +0000 (12:05 -0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 31 Mar 2016 20:04:05 +0000 (16:04 -0400)
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.

Reported-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec_main.c

index 37c08158308433845f583671dc23d6db411178df..08243c2ff4b4ae3d201c95c0bbc9caa5a7bd776c 100644 (file)
@@ -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
 
        /*