From: Chris Wright Date: Thu, 6 Jul 2006 19:39:23 +0000 (-0700) Subject: via-velocity link detection cleanup, fwd from Daniel Drake X-Git-Tag: v2.6.16.24~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=128f3c4d2f34cb0773c012c172c1301b49c1fd19;p=thirdparty%2Fkernel%2Fstable-queue.git via-velocity link detection cleanup, fwd from Daniel Drake --- diff --git a/queue-2.6.17/series b/queue-2.6.17/series index 8d6a2346f25..d11f2424c4d 100644 --- a/queue-2.6.17/series +++ b/queue-2.6.17/series @@ -8,3 +8,4 @@ dvb-fix-ci-on-old-knc1-dvbc-cards.patch dvb-fix-ci-interface-on-pro-knc1-cards.patch pnp-suppress-request_irq-warning.patch reduce-acpi-verbosity-on-null-handle-condition.patch +via-velocity-the-link-is-not-correctly-detected-when-the-device-starts.patch diff --git a/queue-2.6.17/via-velocity-the-link-is-not-correctly-detected-when-the-device-starts.patch b/queue-2.6.17/via-velocity-the-link-is-not-correctly-detected-when-the-device-starts.patch new file mode 100644 index 00000000000..c29de355349 --- /dev/null +++ b/queue-2.6.17/via-velocity-the-link-is-not-correctly-detected-when-the-device-starts.patch @@ -0,0 +1,53 @@ +From stable-bounces@linux.kernel.org Sun Jul 2 03:51:13 2006 +Date: Sun, 02 Jul 2006 11:54:53 +0100 +From: Daniel Drake +To: stable@kernel.org +Cc: romieu@fr.zoreil.com +Subject: via-velocity: the link is not correctly detected when the device starts + +From: Francois Romieu + +via-velocity: the link is not correctly detected when the device starts + +The patch fixes http://bugzilla.kernel.org/show_bug.cgi?id=6711 + +Signed-off-by: Roy Marples +Signed-off-by: Francois Romieu +Signed-off-by: Chris Wright +--- + +--- + drivers/net/via-velocity.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- linux-2.6.17.3.orig/drivers/net/via-velocity.c ++++ linux-2.6.17.3/drivers/net/via-velocity.c +@@ -248,6 +248,7 @@ static void velocity_free_rd_ring(struct + 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(str + 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 veloci + + 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);