[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 6/7] hw/ide/pci: Replace some magic numbers by constants
From: |
Bernhard Beschow |
Subject: |
[PATCH v3 6/7] hw/ide/pci: Replace some magic numbers by constants |
Date: |
Wed, 31 May 2023 23:10:42 +0200 |
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
hw/ide/pci.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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,
--
2.40.1
- [PATCH v3 0/7] VIA and general PCI IDE cleanup, Bernhard Beschow, 2023/05/31
- [PATCH v3 1/7] hw/ide/pci: Expose legacy interrupts as named GPIOs, Bernhard Beschow, 2023/05/31
- [PATCH v3 2/7] hw/ide/via: Wire up IDE legacy interrupts in host device, Bernhard Beschow, 2023/05/31
- [PATCH v3 3/7] hw/isa/vt82c686: Remove via_isa_set_irq(), Bernhard Beschow, 2023/05/31
- [PATCH v3 5/7] hw/ide: Extract bmdma_status_writeb(), Bernhard Beschow, 2023/05/31
- [PATCH v3 6/7] hw/ide/pci: Replace some magic numbers by constants,
Bernhard Beschow <=
- [PATCH v3 7/7] hw/ide/piix: Move registration of VMStateDescription to DeviceClass, Bernhard Beschow, 2023/05/31
- [PATCH v3 4/7] hw/ide: Extract IDEBus assignment into bmdma_init(), Bernhard Beschow, 2023/05/31