From: Jeff Garzik <jgarzik@pobox.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Russell King <rmk+lkml@arm.linux.org.uk>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [RFC] pata_icside driver
Date: Sun, 08 Apr 2007 21:03:10 -0400 [thread overview]
Message-ID: <461990CE.8080609@pobox.com> (raw)
In-Reply-To: <20070408195956.4e7d50c0@the-village.bc.nu>
Alan Cox wrote:
>> The second FIXME area is ata_irq_ack - it is unconditionally coded
>> for SFF-type interfaces. I believe that using this function in
>> non-BMDMA interfaces is wrong - it attempts to read from the BMDMA
>> registers irrespective of whether ap->ioaddr.bmdma_addr is set or
>> not. The question this poses is: what should non-BMDMA implementations
>> use for this method? Note that pata_platform also uses this
>> function despite not supporting BMDMA which seems even more suspicious.
>
> Thats a bug that has arrived again. The older code was corrected to
> handle this properly but the fix appears to have become lost. The
> ioread/iowrite code actually made quite a mess (all the address reporting
> is also broken) and we do some iffy things like compare the iomap result
> with zero and assume thats the same as checking for true bus zero
> addresses.
>
> 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.
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.
Jeff
next prev parent reply other threads:[~2007-04-09 1:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-30 11:00 [PATCH] Provide dummy devm_ioport_* if !HAS_IOPORT Russell King
2007-03-30 11:08 ` [RFC] pata_platform for ARM RiscPC Russell King
2007-04-08 10:18 ` [RFC] pata_icside driver Russell King
2007-04-08 18:59 ` Alan Cox
2007-04-09 1:03 ` Jeff Garzik [this message]
2007-04-09 9:56 ` Alan Cox
2007-04-09 10:56 ` Jeff Garzik
2007-04-09 11:13 ` Jeff Garzik
2007-04-09 11:36 ` Russell King
2007-04-09 12:02 ` Jeff Garzik
2007-04-08 20:09 ` Alan Cox
2007-04-09 8:18 ` Russell King
2007-04-09 8:24 ` Roland Dreier
2007-04-09 8:44 ` Russell King
2007-04-09 10:25 ` Alan Cox
2007-04-09 11:33 ` Russell King
2007-04-21 15:09 ` Russell King
2007-04-09 11:32 ` [RFC] pata_platform for ARM RiscPC Jeff Garzik
2007-03-30 11:08 ` [PATCH] Provide dummy devm_ioport_* if !HAS_IOPORT Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=461990CE.8080609@pobox.com \
--to=jgarzik@pobox.com \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk+lkml@arm.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.