On Fri, 11 May 2007 17:14:35 +0200 Tejun Heo <htejun@xxxxxxxxx> wrote: > Alan Cox wrote: > >>> I'd say this is a non-starter. It solves nothing and means PIO in libata > >>> is still basically unusable. > >> It doesn't solve the problem completely but still helps, FWIW. I was > > > > Most transfers for PIO are a single 512 byte transfer per command. > > Not for disks but, yeah, who uses PIO for disks. PCMCIA, embedded, CF devices .. basically everyone. > The problem is that controllers queue IRQ till the end of transfer and > raise it right after the last transfer completes. If > WQ-active-ignore-IRQ flag is set at that point && we're not holding the > lock, the IRQ handler will ignore the IRQ without clearing it, so we get > nobody-cared right after the last transfer. So, the last transfer and > clearing of WQ-active-ignore-IRQ flag should be atomic w.r.t. the IRQ > handler. Ok that makes sense. And we can't safely peek at DRQ at this point either. Holding the lock for the last word shouldn't be a problem. It isn't ideal but it is a lot less ugly than holding it for the full transfer. The private data_xfer methods in PATA are for locking IRQ off entirely so they'll convert trivially, not looked for others. Alan - 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