Patchwork via-velocity : fix no link detection on boot

login
register
mail settings
Submitter Séguier Régis
Date June 16, 2009, 8:33 p.m.
Message ID <1245184399-11890-1-git-send-email-rseguier@e-teleport.net>
Download mbox | patch
Permalink /patch/28749/
State Changes Requested
Delegated to: David Miller
Headers show

Comments

Séguier Régis - June 16, 2009, 8:33 p.m.
on boot, link is always up.

Signed-off-by: Seguier Regis <rseguier@e-teleport.net>
---
 drivers/net/via-velocity.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

Patch

diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index 754a4b1..bd3335e 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -989,8 +989,11 @@  static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi
 	if (ret < 0)
 		goto err_iounmap;
 
-	if (velocity_get_link(dev))
+	if (!velocity_get_link(dev))
+	{
 		netif_carrier_off(dev);
+		vptr->mii_status |= VELOCITY_LINK_FAIL;
+	}
 
 	velocity_print_info(vptr);
 	pci_set_drvdata(pdev, dev);