Message ID | 1334914521-5990-1-git-send-email-paolo.pisati@canonical.com |
---|---|
State | Superseded, archived |
Delegated to: | David Miller |
Headers | show |
From: Paolo Pisati <paolo.pisati@canonical.com> Date: Fri, 20 Apr 2012 11:35:21 +0200 > Without this patch sysfs reports the cable as present > > flag@flag-desktop:~$ cat /sys/class/net/eth0/carrier > 1 > > while it's not: > > flag@flag-desktop:~$ sudo mii-tool eth0 > eth0: no link > > Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> I suspect Steve didn't set the FLAG_LINK_INTR bit intentionally, and that the link status IRQ is not reliable on all smsc95xx chips. Steve? -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index 3444514..93d3252 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -1192,7 +1192,7 @@ static const struct driver_info smsc95xx_info = { .rx_fixup = smsc95xx_rx_fixup, .tx_fixup = smsc95xx_tx_fixup, .status = smsc95xx_status, - .flags = FLAG_ETHER | FLAG_SEND_ZLP, + .flags = FLAG_ETHER | FLAG_SEND_ZLP | FLAG_LINK_INTR, }; static const struct usb_device_id products[] = {
Without this patch sysfs reports the cable as present flag@flag-desktop:~$ cat /sys/class/net/eth0/carrier 1 while it's not: flag@flag-desktop:~$ sudo mii-tool eth0 eth0: no link Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> --- drivers/net/usb/smsc95xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)