hw/net: implement MIB counters in mcf_fec driver
The FEC ethernet hardware module used on ColdFire SoC parts contains a block of RAM used to maintain hardware counters. This block is accessible via the usual FEC register address space. There is currently no support for this in the QEMU mcf_fec driver. Add support for storing a MIB RAM block, and provide register level access to it. Also implement a basic set of stats collection functions to populate MIB data fields. This support tested running a Linux target and using the net-tools "ethtool -S" option. As of linux-4.9 the kernels FEC driver makes accesses to the MIB counters during its initialization (which it never did before), and so this version of Linux will now fail with the QEMU error: qemu: hardware error: mcf_fec_read: Bad address 0x200 This MIB counter support fixes this problem. Signed-off-by: NGreg Ungerer <gerg@uclinux.org> Reviewed-by: NLaurent Vivier <laurent@vivier.eu> Signed-off-by: NJason Wang <jasowang@redhat.com>
Showing
想要评论请 注册 或 登录