qemu-e2k/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
..
9pfs 9p: fix leak in synth_name_to_path() 2018-02-19 18:27:32 +01:00
acpi qapi: Empty out qapi-schema.json 2018-03-02 13:45:50 -06:00
adc Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
alpha hw/alpha/dp264: Use the TYPE_SMC37C669_SUPERIO 2018-03-12 16:12:49 +01:00
arm hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-03-12 16:12:46 +01:00
audio hw/audio/sb16.c: change dolog() to qemu_log_mask() 2018-02-02 08:19:47 +01:00
block virtio-blk: fix race between .ioeventfd_stop() and vq handler 2018-03-08 17:38:51 +00:00
bt hw/bt: Replace fprintf(stderr, "*\n" with error_report() 2018-01-22 09:51:00 +01:00
char hw/isa: Move parallel_hds_isa_init() to hw/char/parallel-isa.c 2018-03-12 16:12:47 +01:00
core machine: add memory-encryption option 2018-03-13 12:04:03 +01:00
cpu hw: use "qemu/osdep.h" as first #include in source files 2017-12-18 17:07:02 +03:00
cris cris: use generic cpu_model parsing 2017-10-27 16:03:54 +02:00
display secondary-vga: properly close QemuConsole on unplug 2018-03-13 11:17:29 -06:00
dma hw/dma/i8257: Rename DMA_init() to i8257_dma_init() 2018-03-12 16:12:48 +01:00
gpio Replace all occurances of __FUNCTION__ with __func__ 2018-01-22 09:46:18 +01:00
hppa hw/hppa: Use qemu_log_mask instead of fprintf to stderr 2018-02-04 14:11:03 -08:00
i2c hw/i2c-ddc: Do not fail writes 2018-03-01 11:05:45 +00:00
i386 * Record-replay lockstep execution, log dumper and fixes (Alex, Pavel) 2018-03-16 11:05:03 +00:00
ide sii3112: Remove unneeded exit function 2018-03-18 18:27:23 +11:00
input hw/input/i8042: Extract declarations from i386/pc.h into input/i8042.h 2018-03-12 16:12:48 +01:00
intc openpic_kvm: drop address_space_to_flatview call 2018-03-06 14:01:27 +01:00
ipack pci: Add INTERFACE_CONVENTIONAL_PCI_DEVICE to Conventional PCI devices 2017-10-15 05:54:43 +03:00
ipmi qapi: Empty out qapi-schema.json 2018-03-02 13:45:50 -06:00
isa hw/isa/superio: Add the SMC FDC37C669 Super I/O 2018-03-12 16:12:49 +01:00
lm32 hw/lm32: Replace fprintf(stderr, "*\n" with error_report() 2018-02-06 18:29:26 +01:00
m68k m68k: mcf5208: use generic cpu_model parsing 2017-10-27 16:03:54 +02:00
mem Include less of the generated modular QAPI headers 2018-03-02 13:45:50 -06:00
microblaze xlnx-zynqmp-pmu: Connect the IPI device to the PMU 2018-01-26 11:09:09 +01:00
mips hw/isa/vt82c686: Add the TYPE_VT82C686B_SUPERIO 2018-03-12 16:12:49 +01:00
misc hw/misc/macio: Mark the macio devices with user_creatable = false 2018-03-18 18:27:23 +11:00
moxie hw/moxie: Replace fprintf(stderr, "*\n" with error_report() 2018-02-06 18:29:26 +01:00
net fsl-imx6: Swap Ethernet interrupt defines 2018-03-19 18:23:24 +00:00
nios2 Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
nvram Move include qemu/option.h from qemu-common.h to actual users 2018-02-09 13:52:16 +01:00
openrisc hw/openrisc: Replace fprintf(stderr, "*\n" with error_report() 2018-02-06 18:29:26 +01:00
pci net: allow using any PCI NICs in -net or -nic 2018-03-12 16:12:45 +01:00
pci-bridge virtio,vhost,pci,pc: features, fixes and cleanups 2018-02-13 16:33:31 +00:00
pci-host pci: Add support for Designware IP block 2018-03-09 17:09:43 +00:00
pcmcia
ppc ppc440_pcix: Change some error_report to qemu_log_mask(LOG_UNIMP, ...) 2018-03-18 18:27:23 +11:00
rdma hw/rdma: Implementation of PVRDMA device 2018-02-19 13:03:24 +02:00
riscv RISC-V Build Infrastructure 2018-03-07 08:30:28 +13:00
s390x migration: introduce postcopy-only pending 2018-03-13 17:05:41 -04:00
scsi hw/ppc/prep: Fix implicit creation of "-drive if=scsi" devices 2018-03-18 18:27:23 +11:00
sd hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-03-12 16:12:46 +01:00
sh4 pci: Rename root bus initialization functions for clarity 2017-12-05 19:13:45 +02:00
smbios Move include qemu/option.h from qemu-common.h to actual users 2018-02-09 13:52:16 +01:00
sparc hw/dma/i8257: Rename DMA_init() to i8257_dma_init() 2018-03-12 16:12:48 +01:00
sparc64 hw/input/i8042: Extract declarations from i386/pc.h into input/i8042.h 2018-03-12 16:12:48 +01:00
ssi xilinx_spips: Use 8 dummy cycles with the QIOR/QIOR4 commands 2018-03-01 11:05:44 +00:00
timer qapi: Empty out qapi-schema.json 2018-03-02 13:45:50 -06:00
tpm Merge tpm 2018/03/07 2018-03-08 12:56:39 +00:00
tricore hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-03-12 16:12:46 +01:00
unicore32 hw/input/i8042: Extract declarations from i386/pc.h into input/i8042.h 2018-03-12 16:12:48 +01:00
usb usbredir: reorder fields in USBRedirDevice to reduce padding 2018-03-12 11:43:49 +01:00
vfio ppc/spapr, vfio: Turn off MSIX emulation for VFIO devices 2018-03-13 11:17:31 -06:00
virtio qapi: Empty out qapi-schema.json 2018-03-02 13:45:50 -06:00
watchdog qapi: Empty out qapi-schema.json 2018-03-02 13:45:50 -06:00
xen virtio,vhost,pci,pc: features, fixes and cleanups 2018-02-13 16:33:31 +00:00
xenpv hw/xen*: Replace fprintf(stderr, "*\n" with error_report() 2018-02-06 18:29:46 +01:00
xtensa Move include qemu/option.h from qemu-common.h to actual users 2018-02-09 13:52:16 +01:00
Makefile.objs hw/rdma: Add wrappers and macros 2018-02-19 13:03:24 +02:00