Re: eepro100 (PCI ID 82820) lockups/failure

Richard B. Johnson (root@chaos.analogic.com)
Tue, 7 Aug 2001 08:11:32 -0400 (EDT)


On Tue, 7 Aug 2001, Andrey Savochkin wrote:
[SNIPPED...]

>
> However, for this particular case I'm interested about a loop like
> while((a = readb(reg)) && --count >= 0);
> I wonder if there are circumstances in which the repeated read's can return
> "cached" values or whatever, so that the loop will result in significantly less
> number of bus cycles than it's supposed?
> My understanding is that there shouldn't be such.
>
> Best regards
> Andrey

You should have obtained access to the PCI address space by using
ioremap_nocache(). If so, every read will go to the bus. However,
what is actually read will be long-words so, if the device assumes
something else, its broken. FYI, some ISA word-addressed boards
have been "converted" to PCI by glueing on a PCI interface chip.
They require some strange hacks to work, like reading a byte register
by using the lowest long-word-aligned address that will contain that
byte and shifting the result.

Cheers,
Dick Johnson

Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).

I was going to compile a list of innovations that could be
attributed to Microsoft. Once I realized that Ctrl-Alt-Del
was handled in the BIOS, I found that there aren't any.

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