lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1550882211-10381-1-git-send-email-Tristram.Ha@microchip.com>
Date:   Fri, 22 Feb 2019 16:36:46 -0800
From:   <Tristram.Ha@...rochip.com>
To:     Sergio Paracuellos <sergio.paracuellos@...il.com>,
        Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>,
        Pavel Machek <pavel@....cz>
CC:     Tristram Ha <Tristram.Ha@...rochip.com>,
        <UNGLinuxDriver@...rochip.com>, <netdev@...r.kernel.org>
Subject: [PATCH v4 net-next 0/4] net: dsa: microchip: add MIB counters support

From: Tristram Ha <Tristram.Ha@...rochip.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ