summary refs log tree commit diff stats
path: root/util/oslib-posix.c
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@uclinux.org>2017-03-13 14:56:57 +1000
committerJason Wang <jasowang@redhat.com>2017-03-14 15:39:55 +0800
commitadb560f7fc92903f52071086a46422be1e3f4640 (patch)
treeef7e85a62795d0c966ce54153db24e888b199c50 /util/oslib-posix.c
parente630b2bf7c8a7900d1e19ca006e6335df24f2928 (diff)
downloadfocaccia-qemu-adb560f7fc92903f52071086a46422be1e3f4640.tar.gz
focaccia-qemu-adb560f7fc92903f52071086a46422be1e3f4640.zip
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: Greg Ungerer <gerg@uclinux.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'util/oslib-posix.c')
0 files changed, 0 insertions, 0 deletions