diff options
author | John Snow <jsnow@redhat.com> | 2020-07-24 01:22:55 -0400 |
---|---|---|
committer | John Snow <jsnow@redhat.com> | 2020-10-01 13:04:16 -0400 |
commit | f14bc040b073257f0eb8200042634c0d15f59ea7 (patch) | |
tree | a9005107b978c83f19dc9d21b918e52048535f93 /hw | |
parent | 98d98912238d9f4f4c41bda0a3d944d0cff934ce (diff) | |
download | qemu-f14bc040b073257f0eb8200042634c0d15f59ea7.zip qemu-f14bc040b073257f0eb8200042634c0d15f59ea7.tar.gz qemu-f14bc040b073257f0eb8200042634c0d15f59ea7.tar.bz2 |
ide: don't tamper with the device register
In real ISA operation, register writes go out to an entire bus channel
and all listening devices receive the write. The devices do not toggle
the DEV bit based on their own configuration, nor does the HBA
intermediate or tamper with that value.
The reality of the matter is that DEV0/DEV1 accordingly will react to
command register writes based on whether or not the device was selected.
This does not fix a known bug, but it makes the code slightly simpler
and more obvious.
Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/ide/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/ide/core.c b/hw/ide/core.c index 84499e2..29dc5dc 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1297,8 +1297,8 @@ void ide_ioport_write(void *opaque, uint32_t addr, uint32_t val) break; case ATA_IOPORT_WR_DEVICE_HEAD: /* FIXME: HOB readback uses bit 7 */ - bus->ifs[0].select = (val & ~0x10) | 0xa0; - bus->ifs[1].select = (val | 0x10) | 0xa0; + bus->ifs[0].select = val | 0xa0; + bus->ifs[1].select = val | 0xa0; /* select drive */ bus->unit = (val >> 4) & 1; break; |