Provide kstats based on the byte and packet counters available in some
authorjmatthew <jmatthew@openbsd.org>
Sun, 25 Jun 2023 22:36:09 +0000 (22:36 +0000)
committerjmatthew <jmatthew@openbsd.org>
Sun, 25 Jun 2023 22:36:09 +0000 (22:36 +0000)
commit381ded4f5913ce11e4336df1b2e9872fa06892c9
treec61686736b24123f3de2b566d2ed44db5d39fa78
parenta1b63ed3f3debc0565b60f343a78ed9efe259fb2
Provide kstats based on the byte and packet counters available in some
dwge(4) implementations.  The counters are all 32 bit, so enable reset-on-read
and accumulate them into 64 bit software counters, and enable the MMC
interrupts that indicate one or more counters is halfway to overflowing.
Tested on an RK3399, which has the counters, and an Allwinner A20, which
doesn't.

ok dlg@
sys/dev/fdt/if_dwge.c