]> 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)
commit78e81cfc406724d958ea743958f26935dc01f2bc
tree1ef11b8b18564f92e3947a4b60f6663c565c8c5e
parent12254d19d1cbda2f61936010c2e9cf381c17016e
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 2373e599 ("net: fec: Enable imx6
enet checksum acceleration"). A fix was introduced in commit 1eefdcd0
("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