summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-06-22 23:33:23 -0400
committerJeff Garzik <jeff@garzik.org>2006-06-22 23:33:23 -0400
commitaf57d238aa2107e1b45d8dacad6e50db938f0567 (patch)
treec3ce4b9aa7a12e2b48a36fa01fef2190f13fc05c /drivers/net
parent39105890516b06319ffcf5ef0d0cea6c7f65bc96 (diff)
parent8a22dddb2a5b5834577afd9e25b5392218715611 (diff)
downloadblackbird-obmc-linux-af57d238aa2107e1b45d8dacad6e50db938f0567.tar.gz
blackbird-obmc-linux-af57d238aa2107e1b45d8dacad6e50db938f0567.zip
Merge branch 'upstream' of git://electric-eye.fr.zoreil.com/home/romieu/linux-2.6 into upstream
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/via-velocity.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index 2eb6b5f9ba0d..09e05fe40c38 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -248,6 +248,7 @@ static void velocity_free_rd_ring(struct velocity_info *vptr);
static void velocity_free_tx_buf(struct velocity_info *vptr, struct velocity_td_info *);
static int velocity_soft_reset(struct velocity_info *vptr);
static void mii_init(struct velocity_info *vptr, u32 mii_status);
+static u32 velocity_get_link(struct net_device *dev);
static u32 velocity_get_opt_media_mode(struct velocity_info *vptr);
static void velocity_print_link_status(struct velocity_info *vptr);
static void safe_disable_mii_autopoll(struct mac_regs __iomem * regs);
@@ -798,6 +799,9 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi
if (ret < 0)
goto err_iounmap;
+ if (velocity_get_link(dev))
+ netif_carrier_off(dev);
+
velocity_print_info(vptr);
pci_set_drvdata(pdev, dev);
@@ -1653,8 +1657,10 @@ static void velocity_error(struct velocity_info *vptr, int status)
if (linked) {
vptr->mii_status &= ~VELOCITY_LINK_FAIL;
+ netif_carrier_on(vptr->dev);
} else {
vptr->mii_status |= VELOCITY_LINK_FAIL;
+ netif_carrier_off(vptr->dev);
}
velocity_print_link_status(vptr);
OpenPOWER on IntegriCloud