All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] smsc95xx: mark link down on startup and let PHY interrupt deal with carrier changes
@ 2012-04-20  9:35 Paolo Pisati
  2012-04-24  4:25 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Paolo Pisati @ 2012-04-20  9:35 UTC (permalink / raw)
  To: netdev

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(-)

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[] = {
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] smsc95xx: mark link down on startup and let PHY interrupt deal with carrier changes
  2012-04-20  9:35 [PATCH] smsc95xx: mark link down on startup and let PHY interrupt deal with carrier changes Paolo Pisati
@ 2012-04-24  4:25 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-04-24  4:25 UTC (permalink / raw)
  To: paolo.pisati; +Cc: netdev, steve.glendinning

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?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-24  4:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-20  9:35 [PATCH] smsc95xx: mark link down on startup and let PHY interrupt deal with carrier changes Paolo Pisati
2012-04-24  4:25 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.