mcs7830: Fix link state detection
authorOndrej Zary <linux@rainbow-software.org>
Thu, 11 Oct 2012 22:51:41 +0000 (22:51 +0000)
committerDavid S. Miller <davem@davemloft.net>
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 <linux@rainbow-software.org>
Reported-by: Michael Leun <lkml20120218@newton.leun.net>
Tested-by: Michael Leun <lkml20120218@newton.leun.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/mcs7830.c