From patchwork Wed Mar 4 12:22:56 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Miller X-Patchwork-Id: 24038 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 88766DDFF7 for ; Wed, 4 Mar 2009 23:23:12 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753296AbZCDMXM (ORCPT ); Wed, 4 Mar 2009 07:23:12 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751618AbZCDMXM (ORCPT ); Wed, 4 Mar 2009 07:23:12 -0500 Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:60462 "EHLO sunset.davemloft.net" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751206AbZCDMXL (ORCPT ); Wed, 4 Mar 2009 07:23:11 -0500 Received: from localhost (localhost [127.0.0.1]) by sunset.davemloft.net (Postfix) with ESMTP id 47F2C35C04E; Wed, 4 Mar 2009 04:22:56 -0800 (PST) Date: Wed, 04 Mar 2009 04:22:56 -0800 (PST) Message-Id: <20090304.042256.64908696.davem@davemloft.net> To: mroos@linux.ee Cc: sparclinux@vger.kernel.org Subject: Re: esp scsi problem on shutdown - sunhme related? From: David Miller In-Reply-To: <20090304.040958.28041245.davem@davemloft.net> References: <20090304.034528.162386526.davem@davemloft.net> <20090304.040958.28041245.davem@davemloft.net> X-Mailer: Mew version 6.1 on Emacs 22.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org From: David Miller Date: Wed, 04 Mar 2009 04:09:58 -0800 (PST) > I'm not exactly sure how I'll fix this. I'll try to come > up with a scheme and post a patch for you to test tomorrow. I lied :-) I think the following simple approach might work. Can you give it a try? Thanks! --- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c index e289376..e1a40b3 100644 --- a/arch/sparc/kernel/irq_64.c +++ b/arch/sparc/kernel/irq_64.c @@ -325,15 +325,12 @@ static void sun4u_set_affinity(unsigned int virt_irq, static void sun4u_irq_disable(unsigned int virt_irq) { - struct irq_handler_data *data = get_irq_chip_data(virt_irq); - - if (likely(data)) { - unsigned long imap = data->imap; - unsigned long tmp = upa_readq(imap); - - tmp &= ~IMAP_VALID; - upa_writeq(tmp, imap); - } + /* Don't do anything. The desc->status check for + * IRQ_DISABLED in handler_irq() will skip the + * handler call and that will leave the interrupt + * in the sent state. The next ->enable() call will + * hit the ICLR register to reset the state machine. + */ } static void sun4u_irq_eoi(unsigned int virt_irq) @@ -746,7 +743,8 @@ void handler_irq(int irq, struct pt_regs *regs) desc = irq_desc + virt_irq; - desc->handle_irq(virt_irq, desc); + if (!(desc->status & IRQ_DISABLED)) + desc->handle_irq(virt_irq, desc); bucket_pa = next_pa; }