]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Merge branch 'net-dsa-microchip-add-MIB-counters-support'
authorDavid S. Miller <davem@davemloft.net>
Mon, 25 Feb 2019 01:49:59 +0000 (17:49 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Feb 2019 01:49:59 +0000 (17:49 -0800)
Tristram Ha says:

====================
net: dsa: microchip: add MIB counters support

This series of patches is to modify the KSZ9477 DSA driver to read MIB
counters periodically to avoid overflow.

The MIB counters should be read only when there is link.  Otherwise it is
a waste of time as hardware never increases the counters.

Functions are added to check the port link status so that MIB counters
read call is used efficiently.

v4
- Use readx_poll_timeout
- Fix using mutex in a timer callback function problem
- use dp->slave directly instead of checking whether it is valid
- Add port_cleanup function in a separate patch
- Add a mutex so that changing device variables is safe

v3
- Use netif_carrier_ok instead of checking the phy device pointer

v2
- Create macro similar to readx_poll_timeout to use with switch
- Create ksz_port_cleanup function so that variables like on_ports and
  live_ports can be updated inside it

v1
- Use readx_poll_timeout
- Do not clear MIB counters when port is enabled
- Do not advertise 1000 half-duplex mode when port is enabled
- Do not use freeze function as MIB counters may miss counts
====================

Signed-off-by: David S. Miller <davem@davemloft.net>

Trivial merge