Re: [PATCH] pcnet32 cable status check

Felipe W Damasio
2002-10-01T16:41:38Z

----- Original Message -----
From: "Kent Yoder" <key@austin.ibm.com>
To: "Jeff Garzik" <jgarzik@pobox.com>
Cc: <linux-kernel@vger.kernel.org>; <tsbogend@alpha.franken.de>
Sent: Tuesday, October 01, 2002 1:34 PM
Subject: Re: [PATCH] pcnet32 cable status check

>
> Hi,
>
> Here's the updated version, now dependent on Jeff's new mii code. This
is
> a bit more modular as well and new functionality can be added inside the
> watchdog function without anything depending on mii.

You should use netif_carrier_{on|off} to notify the upper layer of a
link change/loss (until the otherwise is true). Check the 8139cp driver.

Also, you shouldn't need the timer stuff to keep track of link change.
Just the mii_check_media and netif_carrier_{on|off} and you should be fine.

Felipe