aboutsummaryrefslogtreecommitdiff
path: root/hw/ide
diff options
context:
space:
mode:
authorBernhard Beschow <shentey@gmail.com>2023-05-31 23:10:42 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2023-07-11 00:11:25 +0200
commit17d6a4a32589c54d16ecb27c5116c2e4aca1b742 (patch)
tree53b11cee6f909bbd79e63481cfbafde753b4222c /hw/ide
parent5fe24213f0c17c3050a7c9e95db459198e27de0e (diff)
hw/ide/pci: Replace some magic numbers by constants
Signed-off-by: Bernhard Beschow <shentey@gmail.com> Message-Id: <20230531211043.41724-7-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'hw/ide')
-rw-r--r--hw/ide/pci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/ide/pci.c b/hw/ide/pci.c
index 0b26a4ce9f..a25b352537 100644
--- a/hw/ide/pci.c
+++ b/hw/ide/pci.c
@@ -320,7 +320,8 @@ void bmdma_cmd_writeb(BMDMAState *bm, uint32_t val)
void bmdma_status_writeb(BMDMAState *bm, uint32_t val)
{
- bm->status = (val & 0x60) | (bm->status & 1) | (bm->status & ~val & 0x06);
+ bm->status = (val & 0x60) | (bm->status & BM_STATUS_DMAING)
+ | (bm->status & ~val & (BM_STATUS_ERROR | BM_STATUS_INT));
}
static uint64_t bmdma_addr_read(void *opaque, hwaddr addr,