mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
net: fec: don't dump RX FIFO register when not available
Commit db65f35f50
("net: fec: add support of ethtool get_regs") introduce
ethool "--register-dump" interface to dump all FEC registers.
But not all silicon implementations of the Freescale FEC hardware module
have the FRBR (FIFO Receive Bound Register) and FRSR (FIFO Receive Start
Register) register, so we should not be trying to dump them on those that
don't.
To fix it we create a quirk flag, FEC_QUIRK_HAS_RFREG, and check it before
dump those RX FIFO registers.
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
fbe1222c63
commit
ec20a63aa8
2 changed files with 16 additions and 4 deletions
|
@ -452,6 +452,10 @@ struct bufdesc_ex {
|
|||
* initialisation.
|
||||
*/
|
||||
#define FEC_QUIRK_MIB_CLEAR (1 << 15)
|
||||
/* Only i.MX25/i.MX27/i.MX28 controller supports FRBR,FRSR registers,
|
||||
* those FIFO receive registers are resolved in other platforms.
|
||||
*/
|
||||
#define FEC_QUIRK_HAS_FRREG (1 << 16)
|
||||
|
||||
struct bufdesc_prop {
|
||||
int qid;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue