From: Greg KH Subject: [patch 01/20] sata_mv: fix irq port status usage Date: Fri, 24 Mar 2006 20:26:13 -0800 Message-ID: <20060325042613.GB21260@kroah.com> References: <20060325041355.180237000@quad.kroah.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from dsl093-040-174.pdx1.dsl.speakeasy.net ([66.93.40.174]:24508 "EHLO aria.kroah.org") by vger.kernel.org with ESMTP id S1750796AbWCYE0e (ORCPT ); Fri, 24 Mar 2006 23:26:34 -0500 Content-Disposition: inline; filename="sata_mv-fix-irq-port-status-usage.patch" In-Reply-To: <20060325042556.GA21260@kroah.com> Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: linux-kernel@vger.kernel.org, stable@kernel.org, Andrew Morton , Linus Torvalds Cc: Justin Forbes , Zwane Mwaikambo , Theodore Ts'o , Randy Dunlap , Dave Jones , Chuck Wolber , alan@lxorguk.ukuu.org.uk, "linux-ide@vger.kernel.org" , Jeff Garzik , Chris Wright , Greg Kroah-Hartman -stable review patch. If anyone has any objections, please let us know. ------------------ From: Jeff Garzik Interrupt handler did not properly initialize a variable on a per-port basis, leading to incorrect behavior on ports other than port 0. Bug caught and fixed by Mark Lord. Signed-off-by: Jeff Garzik Signed-off-by: Chris Wright Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/sata_mv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-2.6.16.orig/drivers/scsi/sata_mv.c +++ linux-2.6.16/drivers/scsi/sata_mv.c @@ -1192,7 +1192,6 @@ static void mv_host_intr(struct ata_host u32 hc_irq_cause; int shift, port, port0, hard_port, handled; unsigned int err_mask; - u8 ata_status = 0; if (hc == 0) { port0 = 0; @@ -1210,6 +1209,7 @@ static void mv_host_intr(struct ata_host hc,relevant,hc_irq_cause); for (port = port0; port < port0 + MV_PORTS_PER_HC; port++) { + u8 ata_status = 0; ap = host_set->ports[port]; hard_port = port & MV_PORT_MASK; /* range 0-3 */ handled = 0; /* ensure ata_status is set if handled++ */ --