diff options
Diffstat (limited to 'igb.c')
-rw-r--r-- | igb.c | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -88,8 +88,8 @@ #define E1000_TCTL_RTLC 0x01000000 /* Re-transmit on late collision */ #define E1000_TCTL_NRTU 0x02000000 /* No Re-transmit on underrun */ -int -igb_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) +int igb_dump_regs(struct ethtool_drvinfo *info maybe_unused, + struct ethtool_regs *regs) { u32 *regs_buff = (u32 *)regs->data; u32 reg; @@ -859,6 +859,18 @@ igb_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) "0x03430: TDFPC (Tx data FIFO packet count) 0x%08X\n", regs_buff[550]); + /* + * Starting from kernel version 5.3 the registers dump buffer grew from + * 739 4-byte words to 740 words, and word 740 contains the RR2DCDELAY + * register. + */ + if (regs->len < 740) + return 0; + + fprintf(stdout, + "0x05BF4: RR2DCDELAY (Max. DMA read delay) 0x%08X\n", + regs_buff[739]); + return 0; } |