From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, Alan Cox <alan@redhat.com>,
Linux IDE <linux-ide@vger.kernel.org>
Subject: Re: [PATCH] libata: Add MMIO support to pata_sil680
Date: Thu, 24 May 2007 20:06:10 +1000 [thread overview]
Message-ID: <1180001170.32247.1054.camel@localhost.localdomain> (raw)
In-Reply-To: <46552A63.4080002@pobox.com>
On Thu, 2007-05-24 at 02:02 -0400, Jeff Garzik wrote:
> MMIO has always been like this (libata-core.c):
>
> /* software reset. causes dev0 to be selected */
> iowrite8(ap->ctl, ioaddr->ctl_addr);
> udelay(20); /* FIXME: flush */
> iowrite8(ap->ctl | ATA_SRST, ioaddr->ctl_addr);
> udelay(20); /* FIXME: flush */
> iowrite8(ap->ctl, ioaddr->ctl_addr);
Yup, one of the things my patch adds is a mmio_flush optional hook that
I added in there just before the udelay's.
> The problem is mainly in finding registers you can read without side
> effects or confusing the controller which might also be doing in-silicon
> reset procedures.
>
> The above is not correct per PCI posting, hence the FIXME, but it works
> so far for all tested cases.
Yes. For most MMIO controllers, reading the PRD table base address is
probably a good enough way to acheive this.
> The timing is irrelevant for SATA (this merely triggers a FIS to be
> sent). Most of PATA is not MMIO, so this problem is avoided. Thus the
> potential affected cases are PATA MMIO, which is largely PDC and SiI, IIRC.
>
> Ben's patch got merged because it does not change the status quo. This
> warrants looking at -- its a core problem as shown above -- but it
> requires thinking and testing on a problematic platform :) Maybe we can
> read a PCI config register or innocuous vendor-specific register, for
> the flush, on the few cases where it matters.
I'm adding a hook for that with a generic sff version that controllers
like sil can use that just reads the dbdma prd table pointer.
Now there is still the question of wether the taskfile read for the
400ns delay in ata_pause is correct or not..
Cheers,
Ben.
next prev parent reply other threads:[~2007-05-24 10:06 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-15 6:12 [PATCH] libata: Add MMIO support to pata_sil680 Benjamin Herrenschmidt
2007-05-15 6:14 ` Benjamin Herrenschmidt
2007-05-23 13:42 ` Alan Cox
2007-05-23 22:48 ` Benjamin Herrenschmidt
2007-05-23 23:31 ` Alan Cox
2007-05-23 23:43 ` Benjamin Herrenschmidt
2007-05-24 0:13 ` Alan Cox
2007-05-24 3:42 ` Benjamin Herrenschmidt
2007-05-24 9:54 ` Alan Cox
2007-05-24 10:52 ` Jeff Garzik
2007-05-24 11:09 ` Alan Cox
2007-05-24 11:09 ` Jeff Garzik
2007-05-25 0:29 ` Jeff Garzik
2007-05-25 0:40 ` Alan Cox
2007-05-25 0:51 ` Jeff Garzik
2007-05-25 14:20 ` Alan Cox
2007-05-28 2:21 ` Jeff Garzik
2007-05-24 6:02 ` Jeff Garzik
2007-05-24 9:33 ` Alan Cox
2007-05-24 9:55 ` Jeff Garzik
2007-05-24 10:08 ` Benjamin Herrenschmidt
2007-05-24 20:56 ` Mark Lord
2007-05-24 22:52 ` Benjamin Herrenschmidt
2007-05-25 11:32 ` Mark Lord
2007-05-24 10:06 ` Benjamin Herrenschmidt [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-05-16 0:21 Benjamin Herrenschmidt
2007-05-16 12:05 ` Alan Cox
2007-05-16 12:12 ` Benjamin Herrenschmidt
2007-05-18 1:00 ` Jeff Garzik
2007-05-15 6:11 Benjamin Herrenschmidt
2007-05-15 6:14 ` Benjamin Herrenschmidt
2007-05-15 11:08 ` Alan Cox
2007-05-15 20:32 ` Benjamin Herrenschmidt
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=1180001170.32247.1054.camel@localhost.localdomain \
--to=benh@kernel.crashing.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=alan@redhat.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).