[resend... sorry]

On 22.08.14 12:37, Reza Jelveh wrote:
> On 22/08/14 06:09, Tian, Feng wrote:
>> Hi, Reza
>>
>> ATA spec said the Diagnostics cmd doesn't care DEV bit. Where did you meet 
>> such issue?
> Qemu, might just be a bug. But why does ide.c first switch to slave device
> read the slave status and then sends the diagnostics to the master, whereas
> IdeMode only sends diagnostics immediately?
> 

The problem is that QEMU's IDE emulation code only resets the sector
information on a few commands. The master/slave switch is not among them.

So what happens is that we get

  * DIAG (-> set ID fields)
  * slave switch
  * sector (ID) read

but since the IDE emulation code never had a trigger where it would set
the sector (ID) fields to the slave disk, they stay at the master's values.

However, if we do

  * slave switch
  * DIAG (-> set ID fields)
  * sector (ID) read

the DIAG call can now successfully set the slave's IDs in our sector /
head / whatever ID fields.

I agree that the patch description of this patch does not exactly make
the above obvious. Reza, could you please rework it to properly explain
to readers why the order matters?


Alex


------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to