aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sata_mv.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-03-20 19:49:54 -0500
committerJeff Garzik <jeff@garzik.org>2006-03-20 19:49:54 -0500
commitcd85f6e2f58282186ad720fc18482be228f0b972 (patch)
tree3722bbb4fc19a7ce41178a8c08d36b803610b03e /drivers/scsi/sata_mv.c
parent29b2548bf53ffb810394a2110161ef49f8e4780f (diff)
[libata] sata_mv: fix irq port status usage
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 <jeff@garzik.org>
Diffstat (limited to 'drivers/scsi/sata_mv.c')
-rw-r--r--drivers/scsi/sata_mv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/sata_mv.c b/drivers/scsi/sata_mv.c
index aceaf56999a5..e561281967dd 100644
--- a/drivers/scsi/sata_mv.c
+++ b/drivers/scsi/sata_mv.c
@@ -1353,7 +1353,6 @@ static void mv_host_intr(struct ata_host_set *host_set, u32 relevant,
1353 u32 hc_irq_cause; 1353 u32 hc_irq_cause;
1354 int shift, port, port0, hard_port, handled; 1354 int shift, port, port0, hard_port, handled;
1355 unsigned int err_mask; 1355 unsigned int err_mask;
1356 u8 ata_status = 0;
1357 1356
1358 if (hc == 0) { 1357 if (hc == 0) {
1359 port0 = 0; 1358 port0 = 0;
@@ -1371,6 +1370,7 @@ static void mv_host_intr(struct ata_host_set *host_set, u32 relevant,
1371 hc,relevant,hc_irq_cause); 1370 hc,relevant,hc_irq_cause);
1372 1371
1373 for (port = port0; port < port0 + MV_PORTS_PER_HC; port++) { 1372 for (port = port0; port < port0 + MV_PORTS_PER_HC; port++) {
1373 u8 ata_status = 0;
1374 ap = host_set->ports[port]; 1374 ap = host_set->ports[port];
1375 hard_port = port & MV_PORT_MASK; /* range 0-3 */ 1375 hard_port = port & MV_PORT_MASK; /* range 0-3 */
1376 handled = 0; /* ensure ata_status is set if handled++ */ 1376 handled = 0; /* ensure ata_status is set if handled++ */