]> git.baikalelectronics.ru Git - kernel.git/commit
gianfar: Don't enable RX Filer if not supported
authorHamish Martin <hamish.martin@alliedtelesis.co.nz>
Tue, 15 Dec 2015 01:14:50 +0000 (14:14 +1300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Dec 2015 23:31:00 +0000 (18:31 -0500)
commitddae2bea3c0f9455ad0decac6ec030d2acb60fb7
treec5a1423e2e454f628c60d6180ac672086e99ca18
parent625a4cec08dcf6461a4140cc5c95176239d15366
gianfar: Don't enable RX Filer if not supported

After commit 80858877decd ("gianfar: Don't enable the Filer w/o the
Parser"), 'TSEC' model controllers (for example as seen on MPC8541E)
always have 8 bytes stripped from the front of received frames.
Only 'eTSEC' gianfar controllers have the RX Filer capability (amongst
other enhancements). Previously this was treated as always enabled
for both 'TSEC' and 'eTSEC' controllers.
In commit 80858877decd ("gianfar: Don't enable the Filer w/o the Parser")
a subtle change was made to the setting of 'uses_rxfcb' to effectively
always set it (since 'rx_filer_enable' was always true). This had the
side-effect of always stripping 8 bytes from the front of received frames
on 'TSEC' type controllers.

We now only enable the RX Filer capability on controller types that
support it, thereby avoiding the issue for 'TSEC' type controllers.

Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
Signed-off-by: Hamish Martin <hamish.martin@alliedtelesis.co.nz>
Reviewed-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/gianfar.c
drivers/net/ethernet/freescale/gianfar.h