OSDN Git Service

lan78xx: Fix exception on link speed change
authorJohn Efstathiades <john.efstathiades@pebblebay.com>
Tue, 24 Aug 2021 18:56:09 +0000 (19:56 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 25 Aug 2021 09:55:43 +0000 (10:55 +0100)
commitb1f6696daafebea243ed59ed18a8b10cfd33b474
treec9303cd6c998e442e1a2de26b8cfb1feef8f7268
parent3415f6baaddb9b39d7112247ab39ef3c700f882e
lan78xx: Fix exception on link speed change

An exception is sometimes seen when the link speed is changed
from auto-negotiation to a fixed speed, or vice versa. The
exception occurs when the MAC is reset (due to the link speed
change) at the same time as the PHY state machine is accessing
a PHY register. The following changes fix this problem.

Rework the MAC reset to ensure there is no outstanding MDIO
register transaction before the reset and then wait until the
reset is complete before allowing any further MAC register access.

Signed-off-by: John Efstathiades <john.efstathiades@pebblebay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/lan78xx.c