lkml.org 
[lkml]   [2004]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: "deadlock" between smc91x driver and link_watch
On Wed, 24 Nov 2004, Ian Campbell wrote:

> Quite right. Fixed patch included.

Small question:

> + * smc_phy_configure_wq
> + *
> + * The net_device is referenced when the work was scheduled to avoid
> + * the need for a flush_scheduled_work() in smc_close(). Drop the
> + * reference and then do the configuration.

You probably want to invert the comment here too.

> +static void smc_phy_configure_wq(void *data)
> +{
> + struct net_device *dev = data;
> + smc_phy_configure(data);
> + dev_put(dev);
> +}

[...]

> @@ -1536,10 +1553,8 @@
> /* clear everything */
> smc_shutdown(dev);
>
> - if (lp->phy_type != 0) {
> - flush_scheduled_work();
> + if (lp->phy_type != 0)
> smc_phy_powerdown(dev, lp->mii.phy_id);


How do you ensure that smc_phy_configure() can't end up being called
after smc_phy_powerdown() here?


Nicolas
-
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 14:08    [W:1.565 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site