On 08/08/14 01:12, Tian, Feng wrote:
> Hi, Reza
> 
> That's the problem.
> 
> For PIO DATA-OUT command protocol, D2H either indicates that the transfer was 
> completed or that's an error occurred.
> But for PIO DATA-IN command protocol, I don't see such sentence from SATA 2.6 
> spec.
> 
> If the transfer has been completed, why the loop doesn't jump out when SETUP 
> FIS received and expected data size was transferred?
> So there is only one possibility: more data transfer required but D2H 
> received here. How could we return now? Doesn't it cause data lost?

If we don't break out of the loop the opposite will happen. It will continue
pausing and reading indefinitely until the retry limit is reached.

I'm not sure if I'm right but if you were to follow the spec literally
responses to commands like identify are synchronous and don't have a D2H at
the end. OS drivers seem to have no problems with these quirks, but AhciMode.c
will simply fail with those sata controllers.

I'm guessing that some Arm controller have the same problem after seeing this
patch on the linaro mailing list:

http://lists.linaro.org/pipermail/linaro-uefi/2014-June/000275.html

According to the spec D2H here should indeed only occur on error, but this is
not always the case.

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to