Hi Feng,
Sounds like situation with Marvell is similar to Qemu.
As I wrote earlier in this thread, Qemu also doesn't use PIO Setup FIS, it
puts only D2H FIS at the end of a PIO command. That's why Reza checked if
there are other controllers that behave similarly, and he found that
Marvell would be one.
So, for both of them, it means that your patch will not break out at all,
as it will never get to check:
if (PrdCount == DataCount) { .. }
Cheers,
A. Sava
On Wed, Aug 13, 2014 at 4:04 AM, Tian, Feng <[email protected]> wrote:
> Hi, Reza
>
> Thanks for your effort, Reza. I made a little coding style enhancement
> based on your proposed patch. please help view it.
>
> PS: I am a little curious on "some Marvel controllers use D2H only instead
> of PIO Setup FIS". If it's that case, does it mean current logic will never
> break out the loop? Do we need enhance code to handle this?
>
> Thanks
> Feng
>
> -----Original Message-----
> From: Reza Jelveh [mailto:[email protected]]
> Sent: Tuesday, August 12, 2014 19:10
> To: Tian, Feng
> Cc: [email protected]; [email protected]
> Subject: Re: [edk2] [PATCH 2/2] MdeModulePkg: Check D2H register status in
> AhciPioTransfer
>
> On 11/08/14 01:07, Tian, Feng wrote:
> > Hi, Reza
> >
> > IMHO, it should jump out the loop at the below point if we put break
> statement inside the new if.
> >
> > PrdCount = *(volatile UINT32 *)
> (&(AhciRegisters->AhciCmdList[0].AhciCmdPrdbc));
> > if (PrdCount == DataCount) {
> > break;
> > }
> >
> > As I have no the test env, could you help me verify if it's true?
>
> I see what you mean now. Yes, this works fine, I also found out that
> apparently some Marvel controllers use D2H only instead of PIO Setup FIS.
> Intel controllers don't have that problem.
>
> I have adjusted the patch according to your suggestion.
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>
>
------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel