]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'net-Resolve-races-in-phy-accessors'
authorDavid S. Miller <davem@davemloft.net>
Wed, 3 Jan 2018 16:00:24 +0000 (11:00 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 3 Jan 2018 16:00:24 +0000 (11:00 -0500)
commit69b092eed71208e03e6f871e392778586bb354ae
tree9144b3005e8ca0fe15e047c50dcabb0b8051f9a1
parent49a37d0776487acafb248fc9b873184fde027c8e
parentee4cdfa46d22d7027742d49aeed077cbba1a7399
Merge branch 'net-Resolve-races-in-phy-accessors'

Russell King says:

====================
Resolve races in phy accessors

This series resolves races with various accesses to PHY registers.
The first five patches are necessary before we add phylink support
to mvneta, the remaining three are merely cleanups for unobserved
races, and hence are less critical.

There are two possible classes of races that can occur: where we
write to a page register that changes the meaning of a group of
other registers, and where we read-modify-write a register.

Resolve these races by performing the accesses under the mdio bus
lock, ensuring that no other user can access the bus while the
series of atomic operations are being performed.

These patches have been posted before, and have been modified
along the lines of previous feedback:

- The third patch was originally reviewed by Florian, but as I've
  added __phy_modify() to it, I've removed that attributation.
- Included generic page-based accessors as suggested last time
  around.
- Since we have the unlocked __phy_modify() in this patch series,
  it is sensible to include the changes for this to marvell.c -
  these accessors have to change anyway to avoid deadlocks on the
  mdio bus lock.

I haven't been able to test the at803x.c changes yet beyond compile
testing - although I do have systems with an ar8035 PHY.  However,
they should be straight forward to review.

This is targetted for net-next because the races have not been
found in existing drivers, but have been observed with phylink
integrated into mvneta - that's not to say that the races do not
exist today, they are just unobserved (probably through lack of
rigorous enough testing.)  The race provoking condition is detailed
in patch 5.
====================

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