netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 net-next 0/4] net: dsa: microchip: add MIB counters support
@ 2019-02-23  0:36 Tristram.Ha
  2019-02-23  0:36 ` [PATCH v4 net-next 1/5] net: dsa: microchip: prepare PHY for proper advertisement Tristram.Ha
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Tristram.Ha @ 2019-02-23  0:36 UTC (permalink / raw)
  To: Sergio Paracuellos, Andrew Lunn, Florian Fainelli, Pavel Machek
  Cc: Tristram Ha, UNGLinuxDriver, netdev

From: Tristram Ha <Tristram.Ha@microchip.com>

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

Tristram Ha (5):
  net: dsa: microchip: prepare PHY for proper advertisement
  net: dsa: microchip: add MIB counter reading support
  net: dsa: microchip: get port link status
  net: dsa: microchip: remove unnecessary include headers
  net: dsa: microchip: add port_cleanup function

 drivers/net/dsa/microchip/ksz9477.c    | 147 ++++++++++++++++++++++-----------
 drivers/net/dsa/microchip/ksz_common.c | 142 ++++++++++++++++++++++++++++++-
 drivers/net/dsa/microchip/ksz_common.h |  21 ++++-
 drivers/net/dsa/microchip/ksz_priv.h   |  15 ++--
 4 files changed, 270 insertions(+), 55 deletions(-)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-02-25  4:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-23  0:36 [PATCH v4 net-next 0/4] net: dsa: microchip: add MIB counters support Tristram.Ha
2019-02-23  0:36 ` [PATCH v4 net-next 1/5] net: dsa: microchip: prepare PHY for proper advertisement Tristram.Ha
2019-02-23  0:36 ` [PATCH v4 net-next 2/5] net: dsa: microchip: add MIB counter reading support Tristram.Ha
2019-02-23  0:45   ` Florian Fainelli
2019-02-23  0:36 ` [PATCH v4 net-next 3/5] net: dsa: microchip: get port link status Tristram.Ha
2019-02-23  0:48   ` Florian Fainelli
2019-02-23  0:36 ` [PATCH v4 net-next 4/5] net: dsa: microchip: remove unnecessary include headers Tristram.Ha
2019-02-23  0:48   ` Florian Fainelli
2019-02-23  0:36 ` [PATCH v4 net-next 5/5] net: dsa: microchip: add port_cleanup function Tristram.Ha
2019-02-23  2:17   ` Florian Fainelli
2019-02-25  1:50 ` [PATCH v4 net-next 0/4] net: dsa: microchip: add MIB counters support David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).