Re: [RFC] pata_icside driver

From: Alan Cox
Date: Mon Apr 09 2007 - 05:54:11 EST


On Sun, 08 Apr 2007 21:03:10 -0400
Jeff Garzik <jgarzik@xxxxxxxxx> wrote:
> > ata_irq_ack is part of the SFF layer so its fine that it assumes SFF but
> > its wrong that it is used unconditionally and it shouldn't be used this
> > way. It just needs a (!ap->ioaddr.bmdma_addr) test adding (assuming thats
> > valid for iomap)
>
> No. It does not need such a test, as it requires BMDMA, not just an
> SFF-style Status register. It is up to the driver to decide whether or
> not ata_irq_ack() is appropriate for your hardware.

Then no SFF hardware can use ata_irq_ack. Not one card: Because in every
case it is permissible that BAR4 is not allocated and the device is
running non-DMA, or that the SFF hardware does not support DMA.

> pata_icside needs its own ata_irq_ack -- which may just be as simple as
> reading the Status register to clear the interrupt condition.
>
> If others need this as well, ata_sff_irq_ack() would be a good generic
> function to create.

We should just rename ata_irq_ack(). It is in libata-sff, so it's either
wrong (missing a test), or in the wrong file completely.

Alan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/