lkml.org 
[lkml]   [2002]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] pcnet32 cable status check
Kent Yoder wrote:
> +static void pcnet32_watchdog(struct net_device *dev)
> +{
> + struct pcnet32_private *lp = dev->priv;
> +
> + /* Print the link status if it has changed */
> + if (lp->mii)
> + mii_check_media (&lp->mii_if, 1, 0);
> +
> + mod_timer (&(lp->watchdog_timer), PCNET32_WATCHDOG_TIMEOUT);
> +}


Looks good ;-)

One small thing -- since you appear to test all cases for (lp->mii)
before calling mod_timer, I don't think you need to test lp->mii inside
the timer...

As Felipe mentioned, using the link interrupt instead of a timer is
preferred -- but my own preference would be to apply your patch with the
small remove-lp->mii-check fixup, and then investigate the support of
link interrupts. The reasoning is that, pcnet32 covers a ton of chips,
and not all may support a link interrupt.

Jeff



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:29    [W:1.479 / U:0.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site