From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761909AbXJSIOS (ORCPT ); Fri, 19 Oct 2007 04:14:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752499AbXJSIOC (ORCPT ); Fri, 19 Oct 2007 04:14:02 -0400 Received: from mx12.go2.pl ([193.17.41.142]:55806 "EHLO poczta.o2.pl" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751312AbXJSIOA (ORCPT ); Fri, 19 Oct 2007 04:14:00 -0400 Date: Fri, 19 Oct 2007 10:17:06 +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: <20071019081706.GA2598@ff.dom.local> References: <20071015125301.GC3015@ff.dom.local> <20071016062108.GB1000@ff.dom.local> <20071017085809.GA1658@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 On Thu, Oct 18, 2007 at 12:30:35PM +0100, Maciej W. Rozycki wrote: > On Wed, 17 Oct 2007, Jarek Poplawski wrote: ... > > 2) phy_change() doesn't reenable irq line after it sees returns > > with errors; IMHO it should at least write some warning, but maybe > > try some safety plan, so enable_irq() and try to disable interrupts > > and free_irq() on the next call (if it happens). (But, I can be very > > wrong with this - maybe it's OK and official way.) > > No way to do this safely -- at this point the device probably still has > its interrupt output asserted and the register to clear it is > inaccessible, so enabling the line will enter an infinite loop. At this > point the system is no longer stable, so it is better to keep at least > some functionality, so that it may be attempted to be shut down cleanly, > rather than make it completely irresponsive. The alternative is panic(). But then... your patch seems to make it possible, because it enables irq to the initial state of the counter. Of course, this could happen on closing only. Jarek P.