From: "Justin T. Gibbs" <gibbs@scsiguy.com>
To: Jeff Garzik <jgarzik@mandrakesoft.com>
Cc: Konstantin Kletschke <konsti@ludenkalle.de>,
linux-kernel@vger.kernel.org
Subject: Re: Quick aic7xxx bug hunt...
Date: Mon, 23 Sep 2002 15:54:22 -0600 [thread overview]
Message-ID: <2640410816.1032818062@aslan.btc.adaptec.com> (raw)
In-Reply-To: <3D8F874B.3070301@mandrakesoft.com>
> Justin T. Gibbs wrote:
>> On some motherboards with some chipsets, you can get these messages if
>> another busmaster (say an IDE drive or a sound card) is hogging the bus.
>> Usually this is with a VIA chipset. Its not clear why the aic7xxx_old
>> driver would behave differently other than it disables memory write
>> and invalidate PCI transactions on this chip. The new driver doesn't
>> need that work around.
>
>
> Justin,
>
> One thing I notice is at least one PCI posting bug. When using MMIO
> (write[bwlq] under Linux), you _must_ use a read[bwlq] to flush the write
> to PCI, if you wish to ensure the write posts at a certain point in the
> code.
>
> Here is the example PCI posting bug, in ahc_clear_critical_section:
>> ahc_outb(ahc, HCNTRL, ahc->unpause);
>> do {
>> ahc_delay(200);
>> } while (!ahc_is_paused(ahc));
>
> As you can see, there is no read before the udelay(), which is very wrong
> on modern CPUs with write posting... that's definitely a driver bug that
> will bite you on modern x86 motherboards [and is totally broken on ia64
> and other platforms].
>
> Please let me know if you have further questions on PCI write posting...
I somewhat doubt that any CPU would hold onto a posted write for 200us
since you are not guaranteed that a read will occur quickly and you want
those write buffers to be availble for other clients, but regardless, the
code has not been as you describe since November of last year. The
CHANGELOG reads:
Always perform a bus read prior to waiting in
a delay loop waiting for a bus write to take
effect. This ensures that the first time
through the loop the delay occurs after the
write has taken effect.
Of course, the "bug" was benign since the loop does perform a read
so the write is guaranteed to post during the first itteration through
the loop.
--
Justin
next prev parent reply other threads:[~2002-09-23 21:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-23 18:00 2.4.20-pre7-ac3 aic7xxx broken? Konstantin Kletschke
2002-09-23 19:15 ` Justin T. Gibbs
2002-09-23 21:27 ` Quick aic7xxx bug hunt Jeff Garzik
2002-09-23 21:54 ` Justin T. Gibbs [this message]
2002-09-23 22:18 ` Jeff Garzik
2002-09-23 22:44 ` Justin T. Gibbs
2002-09-23 22:50 ` Jeff Garzik
2002-09-23 22:55 ` Justin T. Gibbs
2002-09-23 23:22 ` Jeff Garzik
2002-09-23 23:28 ` Jeff Garzik
2002-09-23 7:44 ` 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=2640410816.1032818062@aslan.btc.adaptec.com \
--to=gibbs@scsiguy.com \
--cc=jgarzik@mandrakesoft.com \
--cc=konsti@ludenkalle.de \
--cc=linux-kernel@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