linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v3 0/6] net: phy: mscc: various improvements to Microsemi PHY driver
@ 2018-10-08 10:07 Quentin Schulz
  2018-10-08 10:07 ` [PATCH net-next v3 1/6] net: phy: mscc: migrate to phy_select/restore_page functions Quentin Schulz
                   ` (6 more replies)
  0 siblings, 7 replies; 25+ messages in thread
From: Quentin Schulz @ 2018-10-08 10:07 UTC (permalink / raw)
  To: davem, andrew, f.fainelli
  Cc: allan.nielsen, linux-kernel, netdev, thomas.petazzoni,
	alexandre.belloni, Quentin Schulz

The Microsemi PHYs have multiple banks of registers (called pages).
Registers can only be accessed from one page, if we need a register from
another page, we need to switch the page and the registers of all other
pages are not accessible anymore.

Basically, to read register 5 from page 0, 1, 2, etc., you do the same
phy_read(phydev, 5); but you need to set the desired page beforehand.

In order to guarantee that two concurrent functions do not change the
page, we need to do some locking per page. This can be achieved with the
use of phy_select_page and phy_restore_page functions but phy_write/read
calls in-between those two functions shall be replaced by their
lock-free alternative __phy_write/read.

The Microsemi PHYs have several counters so let's make them available as PHY
statistics.

The VSC 8530/31/40/41 also need to update their EEE init sequence in order to
avoid packet losses and improve performance.

This patch series also makes some minor cosmetic changes to the driver.

Thanks,
Quentin

v3:
  - add reviewed-by,
  - use phy_read/write/modify_paged whenever possible instead of the
  combo phy_select_page, __phy_read/write/modify, phy_restore_page when
  only one __phy_read/write/modify was executed,

v2:
  - add patch to migrate MSCC driver to use phy_restore/select_page,
  - migrate all patches from v1 to use those two functions,
  - put the multiple lines of constants writes in an array and iterate over
  it to write the values,
  - add reviewed-bys,

Quentin Schulz (4):
  net: phy: mscc: migrate to phy_select/restore_page functions
  net: phy: mscc: remove unneeded parenthesis
  net: phy: mscc: shorten `x != 0` condition to `x`
  net: phy: mscc: remove unneeded temporary variable

Raju Lakkaraju (2):
  net: phy: mscc: add ethtool statistics counters
  net: phy: mscc: Add EEE init sequence

 drivers/net/phy/mscc.c | 352 +++++++++++++++++++++++++++++------------
 1 file changed, 255 insertions(+), 97 deletions(-)

-- 
2.17.1


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

end of thread, other threads:[~2018-11-20 14:17 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-08 10:07 [PATCH net-next v3 0/6] net: phy: mscc: various improvements to Microsemi PHY driver Quentin Schulz
2018-10-08 10:07 ` [PATCH net-next v3 1/6] net: phy: mscc: migrate to phy_select/restore_page functions Quentin Schulz
2018-11-19 14:57   ` Andreas Schwab
2018-11-19 15:10     ` Andrew Lunn
2018-11-19 15:13       ` Andreas Schwab
2018-11-19 15:28         ` Andrew Lunn
2018-11-19 15:40           ` Alexandre Belloni
2018-11-19 15:50             ` Andreas Schwab
2018-11-19 16:12               ` Andrew Lunn
2018-11-19 16:14                 ` Andreas Schwab
2018-11-19 16:25                   ` Andrew Lunn
2018-11-19 16:32                     ` Andreas Schwab
2018-11-19 16:44                       ` Andrew Lunn
2018-11-20 11:39                 ` Andreas Schwab
2018-11-20 13:20                   ` Quentin Schulz
2018-11-20 13:48     ` [PATCH] net: phy: mscc: fix locking in vsc85xx_default_config Andreas Schwab
2018-11-20 13:55       ` Quentin Schulz
2018-11-20 14:01         ` Andreas Schwab
2018-11-20 14:17           ` Quentin Schulz
2018-10-08 10:07 ` [PATCH net-next v3 2/6] net: phy: mscc: add ethtool statistics counters Quentin Schulz
2018-10-08 10:07 ` [PATCH net-next v3 3/6] net: phy: mscc: Add EEE init sequence Quentin Schulz
2018-10-08 10:07 ` [PATCH net-next v3 4/6] net: phy: mscc: remove unneeded parenthesis Quentin Schulz
2018-10-08 10:07 ` [PATCH net-next v3 5/6] net: phy: mscc: shorten `x != 0` condition to `x` Quentin Schulz
2018-10-08 10:07 ` [PATCH net-next v3 6/6] net: phy: mscc: remove unneeded temporary variable Quentin Schulz
2018-10-08 17:29 ` [PATCH net-next v3 0/6] net: phy: mscc: various improvements to Microsemi PHY driver 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).