]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit019c0735aedc29f2d3ee51f1d49e41cdc8e1d1de
treec9303cd6c998e442e1a2de26b8cfb1feef8f7268
parent349be923498af24412c831083f4175bb0d7ec14c
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