The network devices use IRQ #9 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/net/ne2000-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 9f78ff11246..11166592246 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -15,6 +15,7 @@ enum IsaIrqNumber { ISA_IRQ_FDC_DEFAULT = 6, ISA_IRQ_PAR_DEFAULT = 7, ISA_IRQ_RTC_DEFAULT = 8, + ISA_IRQ_NET_DEFAULT = 9, ISA_NUM_IRQS = 16 }; diff --git a/hw/net/ne2000-isa.c b/hw/net/ne2000-isa.c index dd6f6e34d3c..e31e86c14af 100644 --- a/hw/net/ne2000-isa.c +++ b/hw/net/ne2000-isa.c @@ -80,7 +80,7 @@ static void isa_ne2000_realizefn(DeviceState *dev, Error **errp) static Property ne2000_isa_properties[] = { DEFINE_PROP_UINT32("iobase", ISANE2000State, iobase, 0x300), - DEFINE_PROP_UINT32("irq", ISANE2000State, isairq, 9), + DEFINE_PROP_UINT32("irq", ISANE2000State, isairq, ISA_IRQ_NET_DEFAULT), DEFINE_NIC_PROPERTIES(ISANE2000State, ne2000.c), DEFINE_PROP_END_OF_LIST(), }; -- 2.26.2