Subject: Re: [PATCH/RFC] ata: Add support for the MPC52xx ATA controller using libata

From: Sylvain Munaut <[email-masked]>
Date: Fri, 17 Nov 2006 20:09:59 +0100

Jarno Manninen wrote:
> On Friday 17 November 2006 00:12, Sylvain Munaut wrote:
>
>   
>> * The manual states we should check for the TIP bit before all
>> PIO transaction. That's not really supported by libata and requires
>> reimplementing almost all the hooks. But after talking to Freescale,
>> it turnsout it's not really necessary. So this driver doesn't implement
>> that check. I noticed no problem so far ...
>>     
>
> I've had some bad experiences with 2.4 line kernel when using BAPI 2.2 on Rev. 
> A 5200 while imposing heavy I/O load. Problems manifested as hanging XLB-bus 
> and so on. Funny thing is that combinations like Rev.A + BAPI 2.1 and Rev.B + 
> BAPI 2.[12] seem to be immune while doing similar stress tests.
>
> Problems went away after wrapping PIO access like this:
>
> 1. Stop XLB-pipelining
> 2. Wait for TIP bit to go down.
> 3. Do the access
> 4. Restore XLB-pipelining.
>
> Just polling for the TIP bit is not enough due to errata on Rev. A if the 
> pipelining is enabled.
>
> Just in case if someone else is having mysterious hangs on Rev.A:s with newer 
> microcode. :)
>   
Thanks for the info ! I'll certainly try to remember that.

The currentl kernel doesn't handle DMA so far so there is no problem and
we deactivate
XLB pipelining.

Since the current libata doesn't really support overriding IO accessors,
I'd keep it like
that for now. Apparently some other architecture needs special IO stuff
so we could see
a way to hook io accessor soon, and then we can change it if we notice
big problems.

    Sylvain