The IDE controller uses IRQ #14 by default. Add this default definition to the IsaIrqNumber enum.
Avoid magic values in the code, replace them by the newly introduced definition. Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> --- include/hw/isa/isa.h | 1 + hw/ide/isa.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index 43cdc3c47b6..05622ee11e2 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -17,6 +17,7 @@ enum IsaIrqNumber { ISA_IRQ_RTC_DEFAULT = 8, ISA_IRQ_NET_DEFAULT = 9, ISA_IRQ_MOU_DEFAULT = 12, + ISA_IRQ_IDE_DEFAULT = 14, ISA_NUM_IRQS = 16 }; diff --git a/hw/ide/isa.c b/hw/ide/isa.c index 6bc19de2265..2412d568937 100644 --- a/hw/ide/isa.c +++ b/hw/ide/isa.c @@ -108,7 +108,7 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq, static Property isa_ide_properties[] = { DEFINE_PROP_UINT32("iobase", ISAIDEState, iobase, 0x1f0), DEFINE_PROP_UINT32("iobase2", ISAIDEState, iobase2, 0x3f6), - DEFINE_PROP_UINT32("irq", ISAIDEState, isairq, 14), + DEFINE_PROP_UINT32("irq", ISAIDEState, isairq, ISA_IRQ_IDE_DEFAULT), DEFINE_PROP_END_OF_LIST(), }; -- 2.26.2