• J
    ide: fix DMA register transitions · 9da82227
    John Snow 提交于
    ATA8-APT defines the state transitions for both a host controller and
    for the hardware device during the lifecycle of a DMA transfer, in
    section 9.7 "DMA command protocol."
    
    One of the interesting tidbits here is that when a device transitions
    from DDMA0 ("Prepare state") to DDMA1 ("Data_Transfer State"), it can
    choose to set either BSY or DRQ to signal this transition, but not both.
    
    as ide_sector_dma_start is the last point in our preparation process
    before we begin the real data transfer process (for either AHCI or BMDMA),
    this is the correct transition point for DDMA0 to DDMA1.
    
    I have chosen !BSY && DRQ for QEMU to make the transition from DDMA0 the
    most obvious.
    Reported-by: NBenjamin David Lunt <fys@fysnet.net>
    Signed-off-by: NJohn Snow <jsnow@redhat.com>
    Reviewed-by: NKevin Wolf <kwolf@redhat.com>
    Tested-by: NStefan Weil <sw@weilnetz.de>
    Message-id: 1470175541-19344-1-git-send-email-jsnow@redhat.com
    Signed-off-by: NJohn Snow <jsnow@redhat.com>
    9da82227
core.c 81.1 KB