diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-01-12 17:56:29 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-01-12 17:56:29 +0100 |
commit | da4540757d35a98a350d6e8d882a64b2d04f8581 (patch) | |
tree | ad77d8752f5db40497c819f051cbae12effb8163 /drivers/net/usb/mcs7830.c | |
parent | Merge tag 'please-pull-einj' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff) | |
parent | Linux 3.13-rc8 (diff) | |
download | linux-da4540757d35a98a350d6e8d882a64b2d04f8581.tar.xz linux-da4540757d35a98a350d6e8d882a64b2d04f8581.zip |
Merge tag 'v3.13-rc8' into x86/ras, to pick up fixes.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/net/usb/mcs7830.c')
-rw-r--r-- | drivers/net/usb/mcs7830.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/net/usb/mcs7830.c b/drivers/net/usb/mcs7830.c index 03832d3780aa..f54637828574 100644 --- a/drivers/net/usb/mcs7830.c +++ b/drivers/net/usb/mcs7830.c @@ -117,7 +117,6 @@ enum { struct mcs7830_data { u8 multi_filter[8]; u8 config; - u8 link_counter; }; static const char driver_name[] = "MOSCHIP usb-ethernet driver"; @@ -561,26 +560,16 @@ static void mcs7830_status(struct usbnet *dev, struct urb *urb) { u8 *buf = urb->transfer_buffer; bool link, link_changed; - struct mcs7830_data *data = mcs7830_get_data(dev); if (urb->actual_length < 16) return; - link = !(buf[1] & 0x20); + link = !(buf[1] == 0x20); link_changed = netif_carrier_ok(dev->net) != link; if (link_changed) { - data->link_counter++; - /* - track link state 20 times to guard against erroneous - link state changes reported sometimes by the chip - */ - if (data->link_counter > 20) { - data->link_counter = 0; - usbnet_link_change(dev, link, 0); - netdev_dbg(dev->net, "Link Status is: %d\n", link); - } - } else - data->link_counter = 0; + usbnet_link_change(dev, link, 0); + netdev_dbg(dev->net, "Link Status is: %d\n", link); + } } static const struct driver_info moschip_info = { |