Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762770AbXJOMuT (ORCPT ); Mon, 15 Oct 2007 08:50:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758956AbXJOMuG (ORCPT ); Mon, 15 Oct 2007 08:50:06 -0400 Received: from mx2.go2.pl ([193.17.41.42]:51271 "EHLO poczta.o2.pl" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1758926AbXJOMuF (ORCPT ); Mon, 15 Oct 2007 08:50:05 -0400 Date: Mon, 15 Oct 2007 14:53:01 +0200 From: Jarek Poplawski To: "Maciej W\. Rozycki" Cc: Andy Fleming , Andrew Morton , Jeff Garzik , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] PHYLIB: IRQ event workqueue handling fixes Message-ID: <20071015125301.GC3015@ff.dom.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1017 Lines: 30 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. - 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/