Skip to content

Commit

Permalink
[libata] sata_mv: fix irq port status usage
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff Garzik committed Mar 21, 2006
1 parent 29b2548 commit cd85f6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/sata_mv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1353,7 +1353,6 @@ static void mv_host_intr(struct ata_host_set *host_set, u32 relevant,
u32 hc_irq_cause;
int shift, port, port0, hard_port, handled;
unsigned int err_mask;
u8 ata_status = 0;

if (hc == 0) {
port0 = 0;
Expand All @@ -1371,6 +1370,7 @@ static void mv_host_intr(struct ata_host_set *host_set, u32 relevant,
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++ */
Expand Down

0 comments on commit cd85f6e

Please sign in to comment.