Messages in this thread | | | Date | Wed, 24 Nov 2004 10:21:06 -0500 (EST) | From | Nicolas Pitre <> | Subject | Re: "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/
| |