Hello, On 01/14/2010 09:42 PM, Sergei Shtylyov wrote: >> +static bool piix_irq_check(struct ata_port *ap) >> +{ >> + if (unlikely(!ap->ioaddr.bmdma_addr)) >> + return false; >> + >> + return ap->ops->bmdma_status(ap) & ATA_DMA_INTR; >> +} >> + >> > > I'm not at all sure that old, pre-ICH controllers set this bit also > for the PIO mode commands, not only for DMA. And if you didn't make such > assumption, I don't see why this can't be generic and placed into > libata-sff.c instead... Because different controllers have different mechanisms for detecting pending IRQ? Also, I think the current round is a bit dangerous in that it might end up accessing registers while the driver is doing polling PIO. Having spurious IRQ clearing support would definitely be helpful for such conditions but it might also lead to silent data corruption which is worse. I'll update the patch series so that the mechanism only kicks in only when the controller is believed to be completely idle. Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html