Skip to content

Commit

Permalink
[libata sata_mv] handle lack of hardware nIEN support
Browse files Browse the repository at this point in the history
Handle errata (it was unintentional on this h/w, whereas its intentional
on others) whereby the nIEN bit in Device Control is ignored, leading to
a situation where a hardware interrupt completes the qc before the
polling code has a chance to.

This will get fixed The Right Way(tm) once Albert Lee's irq-pio
branch is merged, as the more natural PIO method on this hardware is
interrupt-driven.
  • Loading branch information
Jeff Garzik committed Nov 17, 2005
1 parent 2237467 commit a2c91a8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/scsi/sata_mv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1219,6 +1219,10 @@ static void mv_host_intr(struct ata_host_set *host_set, u32 relevant,
handled++;
}

if (ap &&
(ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR)))
continue;

err_mask = ac_err_mask(ata_status);

shift = port << 1; /* (port * 2) */
Expand All @@ -1237,7 +1241,8 @@ static void mv_host_intr(struct ata_host_set *host_set, u32 relevant,
VPRINTK("port %u IRQ found for qc, "
"ata_status 0x%x\n", port,ata_status);
/* mark qc status appropriately */
ata_qc_complete(qc, err_mask);
if (!(qc->tf.ctl & ATA_NIEN))
ata_qc_complete(qc, err_mask);
}
}
}
Expand Down

0 comments on commit a2c91a8

Please sign in to comment.