David S. Miller wrote:

> At least for the TG3PCI_MEM_WIN_DATA register, I don't know how safe
> it is to use tw32_f() there.  Reads from a location can have side
> effects, so doing a forced readback after a write could be dangerous.
> 
> And it isn't needed, as the tw32_f() done as we set the
> TG3PCI_MEM_WIN_BASE_ADDR back to zero will flush all posted
> writes.
> 
> Agreed?
> 
> 

The TG3PCI_MEM_WIN_BASE_ADDR and DATA registers are very tricky. If you
do not read back the address register before you read or write the data
register, you may not read or write to the proper address.

Reading back the data register is a safe thing to do. This guarantees
that
the data is written before we change the address register to the zero
value. Without the read, there is a danger of the value being written to
SRAM address 0 instead of the desired address.

No additional reads are required if we use config. cycles on these
registers.

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to