Thread (14 messages) 14 messages, 4 authors, 2009-10-30

Re: [PATCH] sky2: set carrier off in probe

From: Brandon Philips <hidden>
Date: 2009-10-30 03:51:30

On 20:09 Thu 29 Oct 2009, Stephen Hemminger wrote:
On Thu, 29 Oct 2009 16:58:07 -0700
Brandon Philips [off-list ref] wrote:
quoted
Before bringing up a sky2 interface up ethtool reports 
"Link detected: yes". Do as ixgbe does and netif_carrier_off() on
probe().

Signed-off-by: Brandon Philips <redacted>

---
 drivers/net/sky2.c |    2 ++
 1 file changed, 2 insertions(+)

Index: linux-2.6/drivers/net/sky2.c
===================================================================
--- linux-2.6.orig/drivers/net/sky2.c
+++ linux-2.6/drivers/net/sky2.c
@@ -4538,6 +4538,8 @@ static int __devinit sky2_probe(struct p
 		goto err_out_free_netdev;
 	}
 
+	netif_carrier_off(dev);
+
 	netif_napi_add(dev, &hw->napi, sky2_poll, NAPI_WEIGHT);
 
 	err = request_irq(pdev->irq, sky2_intr,
IMHO carrier is meaningless until device is up? What software
cares?
A customer had a script that was testing for ethtool reporting "Link
detected: yes" and taking some sort of action. They found other
drivers reported "Link detected: No" until the first interface up.

The right thing to do is up the interface first before looking at the
the Link state, and I told them to do that, but I figured that this
patch made sense too to fix the initial buglet.

Cheers,

	Brandon
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help