]> git.baikalelectronics.ru Git - kernel.git/commit
net: fec: don't access RACC register when not available
authorGreg Ungerer <gerg@uclinux.org>
Sat, 20 Jun 2015 05:51:57 +0000 (15:51 +1000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Jun 2015 00:02:40 +0000 (17:02 -0700)
commitc081b5b5d5bc8e29b605f22936fb92165612aa72
tree1ef11b8b18564f92e3947a4b60f6663c565c8c5e
parentce05a2feb1787ee20e752cabd8bc3e4004ede86d
net: fec: don't access RACC register when not available

Not all silicon implementations of the Freescale FEC hardware module
have the RACC (Receive Accelerator Function) register, so we should not
be trying to access it on those that don't. Currently none of the ColdFire
based parts with a FEC have it.

Support for RACC was introduced by commit 19896b43 ("net: fec: Enable imx6
enet checksum acceleration"). A fix was introduced in commit 1abbf2b7
("net: fec: Fix build for MCF5272") that disables its use on the ColdFire
M5272 part, but it doesn't fix the general case of other ColdFire parts.

To fix we create a quirk flag, FEC_QUIRK_HAS_RACC, and check it before
working with the RACC register.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec.h
drivers/net/ethernet/freescale/fec_main.c