Subject: Re: [PATCH] PHYLIB: IRQ event workqueue handling fixes

From: Jarek Poplawski <[email-masked]>
Date: Mon, 15 Oct 2007 14:53:01 +0200

On 19-09-2007 16:38, Maciej W. Rozycki wrote:
...
> @@ -661,13 +664,22 @@ int phy_stop_interrupts(struct phy_devic
>  	if (err)
>  		phy_error(phydev);
>  
> +	free_irq(phydev->irq, phydev);
> +
>  	/*
> -	 * Finish any pending work; we might have been scheduled to be called
> -	 * from keventd ourselves, but cancel_work_sync() handles that.
> +	 * Cannot call flush_scheduled_work() here as desired because
> +	 * of rtnl_lock(), but we do not really care about what would
> +	 * be done, except from enable_irq(), so cancel any work
> +	 * possibly pending and take care of the matter below.
>  	 */
>  	cancel_work_sync(&phydev->phy_queue);

Hi,

Could you explain why cancel_work_sync() is better here than
flush_scheduled_work() wrt. rtnl_lock()?

Regards,
Jarek P.