[Top] [All Lists]

How to Handle PCI Bridge Buffers?

Subject: How to Handle PCI Bridge Buffers?
From: Phil Thompson <>
Date: Mon, 07 Jan 2002 18:51:12 +0000
Organization: At Home
I am working with some hardware that has a "feature" that I'd like some
advice on how to handle. The PCI bridge has a read-ahead buffer between
the PCI bus and system memory - used by PCI bus masters. The buffer can
only be invalidated from software.

An example of the problem it causes is an ethernet device is kicked off
to go through its ring buffers. The first one has a flag saying there is
no data, so it stops. The kernel then puts data in the buffer, toggles
the flag, and kicks off the ethernet device again. The old value of the
flag is still in the read-ahead buffer so the device stops again. The
fix is obviously to invalidate the read-ahead buffer before kicking off
the device. The question is, how to do this in a generic way?

I don't want to modify the driver for every PCI device that might be
used. The only other way seems to be to add the buffer invalidation code
to outb() etc. (and hope that no driver wants to use memory mapped

Is this "feature" common? Is there existing code I can look at?

Suggestions very welcome.


<Prev in Thread] Current Thread [Next in Thread>