mcs7830: Fix link state detection
authorOndrej Zary <[email protected]>
Thu, 11 Oct 2012 22:51:41 +0000 (22:51 +0000)
committerDavid S. Miller <[email protected]>
Fri, 12 Oct 2012 17:56:52 +0000 (13:56 -0400)
commitdabdaf0caa3af520dbc1df87b2fb4e77224037bd
tree27de4c1b7c097ab07193e4ba29c6a11a6a08b53c
parent93ac0ef016a1b223d23fbb5e0397cab75a8f7d34
mcs7830: Fix link state detection

The device had an undocumented "feature": it can provide a sequence of
spurious link-down status data even if the link is up all the time.
A sequence of 10 was seen so update the link state only after the device
reports the same link state 20 times.

Signed-off-by: Ondrej Zary <[email protected]>
Reported-by: Michael Leun <[email protected]>
Tested-by: Michael Leun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/usb/mcs7830.c