Patchwork via-velocity : fix no link detection on boot

login
register
mail settings
Submitter Séguier Régis
Date June 16, 2009, 9:25 p.m.
Message ID <1245187549-12021-1-git-send-email-rseguier@e-teleport.net>
Download mbox | patch
Permalink /patch/28750/
State Accepted
Delegated to: David Miller
Headers show

Comments

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

Signed-off-by: Seguier Regis <rseguier@e-teleport.net>
---
 drivers/net/via-velocity.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
David Miller - June 18, 2009, 2:03 a.m.
From: Seguier Regis <rseguier@e-teleport.net>
Date: Tue, 16 Jun 2009 21:25:49 +0000

> on boot, link is always up.
> 
> Signed-off-by: Seguier Regis <rseguier@e-teleport.net>

Applied.
--
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

Patch

diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index 754a4b1..4563dce 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -989,8 +989,10 @@  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);