qemu/include/hw/arm
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
..
allwinner-a10.h arm: allwinner-a10: Add SATA 2015-11-06 14:09:01 -05:00
arm.h arm: fix armv7m_init() declaration to match definition 2017-10-12 13:20:07 +01:00
armv7m.h armv7m: Forward init-svtor property to CPU object 2018-03-02 11:03:45 +00:00
aspeed_soc.h hw/arm/aspeed: simplify using the 'unimplemented device' for aspeed_soc.io 2018-02-15 18:29:36 +00:00
bcm2835_peripherals.h bcm2835: add sdhost and gpio controllers 2017-02-28 17:10:00 +00:00
bcm2836.h bcm2836: Make CPU type configurable 2018-02-15 18:33:46 +00:00
digic.h qemu-common: push cpu.h inclusion out of qemu-common.h 2016-05-19 16:42:29 +02:00
exynos4210.h hw/arm/exynos: Move DRAM initialization next boards 2017-06-13 14:56:57 +01:00
fdt.h hw/arm/sysbus-fdt: enable vfio-calxeda-xgmac dynamic instantiation 2015-06-19 14:17:44 +01:00
fsl-imx6.h fsl-imx6: Swap Ethernet interrupt defines 2018-03-19 18:23:24 +00:00
fsl-imx7.h i.MX: Add i.MX7 SOC implementation. 2018-03-09 17:09:43 +00:00
fsl-imx25.h imx_fec: Reserve full FSL_IMX25_FEC_SIZE page for the register file 2018-01-11 13:25:38 +00:00
fsl-imx31.h i.MX: Split the CCM class into an abstract base class and a concrete class 2015-12-17 13:37:15 +00:00
iotkit.h hw/arm/iotkit: Model Arm IOT Kit 2018-03-02 11:03:45 +00:00
linux-boot-if.h hw/arm: new interface for devices which need to behave differently for kernel boot 2015-09-08 17:38:43 +01:00
msf2-soc.h msf2: Add Smartfusion2 SoC 2017-09-21 16:36:56 +01:00
omap.h Replace all occurances of __FUNCTION__ with __func__ 2018-01-22 09:46:18 +01:00
primecell.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
pxa.h Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
raspi_platform.h bcm2835_peripherals: add rollup device for bcm2835 peripherals 2016-02-03 15:00:45 +00:00
sharpsl.h Replace all occurances of __FUNCTION__ with __func__ 2018-01-22 09:46:18 +01:00
soc_dma.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
stm32f205_soc.h arm: drop intermediate cpu_model -> cpu type parsing and use cpu type directly 2017-09-19 09:09:32 -03:00
sysbus-fdt.h hw/arm/sysbus-fdt: helpers for platform bus nodes addition 2015-06-02 15:44:28 +01:00
virt.h hw/arm/virt: Add a user option to disallow ITS instantiation 2017-02-28 12:08:16 +00:00
xlnx-zynqmp.h xlnx-zynqmp: Connect the RTC device 2018-03-02 10:45:35 +00:00