]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
hw/ide/pci: Replace some magic numbers by constants
authorBernhard Beschow <shentey@gmail.com>
Wed, 31 May 2023 21:10:42 +0000 (23:10 +0200)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 10 Jul 2023 22:11:25 +0000 (00:11 +0200)
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>
hw/ide/pci.c

index 0b26a4ce9fb78c803694a5aa2161bcfbab5815e6..a25b3525374292d9253183aea9c19cd652c5af16 100644 (file)
@@ -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,