qemu/include/hw
Guenter Roeck 6461d7e267 fsl-imx6: Swap Ethernet interrupt defines
The sabrelite machine model used by qemu-system-arm is based on the
Freescale/NXP i.MX6Q processor. This SoC has an on-board ethernet
controller which is supported in QEMU using the imx_fec.c module
(actually called imx.enet for this model.)

The include/hw/arm/fsm-imx6.h file defines the interrupt vectors for the
imx.enet device like this:

 #define FSL_IMX6_ENET_MAC_1588_IRQ 118
 #define FSL_IMX6_ENET_MAC_IRQ 119

According to https://www.nxp.com/docs/en/reference-manual/IMX6DQRM.pdf,
page 225, in Table 3-1. ARM Cortex A9 domain interrupt summary,
interrupts are as follows.

150 ENET MAC 0 IRQ
151 ENET MAC 0 1588 Timer interrupt

where

150 - 32 == 118
151 - 32 == 119

In other words, the vector definitions in the fsl-imx6.h file are reversed.

Fixing the interrupts alone causes problems with older Linux kernels:
The Ethernet interface will fail to probe with Linux v4.9 and earlier.
Linux v4.1 and earlier will crash due to a bug in Ethernet driver probe
error handling. This is a Linux kernel problem, not a qemu problem:
the Linux kernel only worked by accident since it requested both interrupts.

For backward compatibility, generate the Ethernet interrupt on both interrupt
lines. This was shown to work from all Linux kernel releases starting with
v3.16.

Link: https://bugs.launchpad.net/qemu/+bug/1753309
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Message-id: 1520723090-22130-1-git-send-email-linux@roeck-us.net
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-03-19 18:23:24 +00:00
..
acpi tests: add test for TPM TIS device 2018-02-21 07:24:50 -05:00
adc STM32F2xx: Add the ADC device 2016-10-04 13:28:07 +01:00
arm fsl-imx6: Swap Ethernet interrupt defines 2018-03-19 18:23:24 +00:00
audio hw/audio/wm8750: move WM8750 declarations from i2c/i2c.h to audio/wm8750.h 2018-02-02 08:19:25 +01:00
block Include less of the generated modular QAPI headers 2018-03-02 13:45:50 -06:00
char hw/isa: Move parallel_hds_isa_init() to hw/char/parallel-isa.c 2018-03-12 16:12:47 +01:00
core hw/core/split-irq: Device that splits IRQ lines 2018-03-02 11:03:45 +00:00
cpu hw: remove "qemu/osdep.h" from header files 2017-12-18 17:07:02 +03:00
cris char: rename CharDriverState Chardev 2017-01-27 18:07:59 +01:00
display hw/display/vga: extract public API from i386/pc to "hw/display/vga.h" 2017-12-18 17:07:02 +03:00
dma hw/dma/i8257: Rename DMA_init() to i8257_dma_init() 2018-03-12 16:12:48 +01:00
gpio bcm2835_gpio: add bcm2835 gpio controller 2017-02-28 17:10:00 +00:00
i2c i2c: Move the bus class to i2c.h 2018-03-01 11:05:45 +00:00
i386 pc: correct misspelled CPU model-id for pc 2.2 2018-03-16 16:29:07 -03:00
ide Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
input hw/input/i8042: Extract declarations from i386/pc.h into input/i8042.h 2018-03-12 16:12:48 +01:00
intc heathrow: QOMify heathrow PIC 2018-03-06 13:16:29 +11:00
ipack ipack: Update e-mail address 2016-05-18 15:04:27 +03:00
ipmi ipmi: introduce an ipmi_bmc_gen_event() API 2017-04-26 12:41:55 +10:00
isa hw/isa/superio: Add the SMC FDC37C669 Super I/O 2018-03-12 16:12:49 +01:00
kvm
lm32 intc: make HMP 'info irq' and 'info pic' commands use InterruptStatsProvider interface 2016-10-04 10:00:25 +02:00
m68k hw/char/mcf_uart: QOMify the ColdFire UART 2017-02-16 14:06:56 +01:00
mem nvdimm: add 'unarmed' option 2018-01-19 11:18:51 -02:00
mips mips: malta/boston: replace cpu_model with cpu_type 2017-10-27 16:04:28 +02:00
misc mac_newworld: use object link to pass OpenPIC object to macio 2018-03-06 13:16:29 +11:00
net imx_fec: Reserve full FSL_IMX25_FEC_SIZE page for the register file 2018-01-11 13:25:38 +00:00
nvram Clean up includes 2018-02-09 05:05:11 +01:00
pci hw/ppc/prep: Fix implicit creation of "-drive if=scsi" devices 2018-03-18 18:27:23 +11:00
pci-bridge Clean up includes 2018-02-09 05:05:11 +01:00
pci-host pci: Add support for Designware IP block 2018-03-09 17:09:43 +00:00
ppc ppc/spapr-caps: Convert cap-ibs to custom spapr-cap 2018-03-06 13:16:29 +11:00
riscv SiFive Freedom U Series RISC-V Machine 2018-03-07 08:30:28 +13:00
s390x s390x/sclp: clean up sclp masks 2018-03-08 15:49:23 +01:00
scsi hw/mips/jazz: Fix implicit creation of "-drive if=scsi" devices 2018-03-12 16:12:47 +01:00
sd sdcard: use the registerfields API to access the OCR register 2018-02-22 15:12:52 +00:00
sh4 char: rename CharDriverState Chardev 2017-01-27 18:07:59 +01:00
smbios Move include qemu/option.h from qemu-common.h to actual users 2018-02-09 13:52:16 +01:00
sparc sun4u_iommu: update to reflect IOMMU is no longer part of the APB device 2018-01-09 21:48:20 +00:00
ssi xilinx_spips: Set all of the reset values 2017-12-13 17:59:26 +00:00
timer xlnx-zynqmp-rtc: Add basic time support 2018-03-02 10:45:34 +00:00
tricore Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
unicore32 hw/unicore32: restrict hw addr defines to source file 2017-12-18 17:07:02 +03:00
usb usb: Add basic code to emulate Chipidea USB IP 2018-02-09 10:40:30 +00:00
vfio vfio-pci: Allow mmap of MSIX BAR 2018-03-13 11:17:31 -06:00
virtio cryptodev-vhost-user: add crypto session handler 2018-03-01 18:26:17 +02:00
watchdog watchdog: wdt_aspeed: Add support for the reset width register 2017-09-04 15:21:54 +01:00
xen pci: Add pci_dev_bus_num() helper 2017-12-05 19:13:45 +02:00
xtensa Clean up includes 2018-02-09 05:05:11 +01:00
boards.h machine: add memory-encryption option 2018-03-13 12:04:03 +01:00
bt.h char: rename CharDriverState Chardev 2017-01-27 18:07:59 +01:00
compat.h virtio-blk: enable multiple vectors when using multiple I/O queues 2018-02-08 21:06:41 +02:00
devices.h sm501: QOMify 2017-04-24 12:32:12 +01:00
elf_ops.h Add symbol table callback interface to load_elf 2018-03-07 08:30:28 +13:00
empty_slot.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
fw-path-provider.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
hotplug.h qdev: hotplug: drop HotplugHandler.post_plug callback 2016-11-15 17:20:37 +02:00
hw.h migration: Split qemu-file.h 2017-06-01 18:49:22 +02:00
ide.h xen-platform: add missing disk unplug option 2017-01-27 15:23:29 -08:00
irq.h hw/core/split-irq: Device that splits IRQ lines 2018-03-02 11:03:45 +00:00
loader-fit.h Use #include "..." for our own headers, <...> for others 2018-02-09 05:05:11 +01:00
loader.h Add symbol table callback interface to load_elf 2018-03-07 08:30:28 +13:00
nmi.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
or-irq.h include/hw/or-irq.h: Add missing include guard 2018-03-02 11:03:45 +00:00
pcmcia.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
platform-bus.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
ptimer.h include/hw/ptimer.h: Add documentation comments 2017-07-11 17:44:27 +03:00
qdev-core.h qdev: Add new qdev_init_gpio_in_named_with_opaque() 2018-03-02 11:03:45 +00:00
qdev-dma.h qdev: Remove hex8/32/64 property types 2014-02-14 21:12:04 +01:00
qdev-properties.h qapi: Empty out qapi-schema.json 2018-03-02 13:45:50 -06:00
qdev.h
register.h hw: register: Run post_write hook on reset 2018-03-01 11:05:43 +00:00
registerfields.h Use #include "..." for our own headers, <...> for others 2018-02-09 05:05:11 +01:00
stream.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
sysbus.h sysbus: Remove ignored return value of FindSysbusDeviceFunc 2016-09-27 17:03:34 -03:00
usb.h usb: Remove legacy -usbdevice options (host, serial, disk and net) 2018-01-26 07:15:08 +01:00