qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug 1839367] Re: Wrong interrupts generated for I.MX6 FEC controller


From: Thomas Huth
Subject: [Bug 1839367] Re: Wrong interrupts generated for I.MX6 FEC controller
Date: Sun, 09 May 2021 15:11:43 -0000

This is an automated cleanup. This bug report has been moved to QEMU's
new bug tracker on gitlab.com and thus gets marked as 'expired' now.
Please continue with the discussion here:

 https://gitlab.com/qemu-project/qemu/-/issues/224


** Changed in: qemu
       Status: Confirmed => Expired

** Bug watch added: gitlab.com/qemu-project/qemu/-/issues #224
   https://gitlab.com/qemu-project/qemu/-/issues/224

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1839367

Title:
  Wrong interrupts generated for I.MX6 FEC controller

Status in QEMU:
  Expired

Bug description:
  The imx_eth_update function in hw/net/imx_fec.c has the following
  comment
  
(https://github.com/qemu/qemu/blob/864ab314f1d924129d06ac7b571f105a2b76a4b2/hw/net/imx_fec.c#L421-L445):

      /*
       * Previous versions of qemu had the ENET_INT_MAC and ENET_INT_MAC
       * interrupts swapped. This worked with older versions of Linux (4.14
       * and older) since Linux associated both interrupt lines with Ethernet
       * MAC interrupts. Specifically,
       * - Linux 4.15 and later have separate interrupt handlers for the MAC and
       *   timer interrupts. Those versions of Linux fail with versions of QEMU
       *   with swapped interrupt assignments.
       * - In linux 4.14, both interrupt lines were registered with the Ethernet
       *   MAC interrupt handler. As a result, all versions of qemu happen to
       *   work, though that is accidental.
       * - In Linux 4.9 and older, the timer interrupt was registered directly
       *   with the Ethernet MAC interrupt handler. The MAC interrupt was
       *   redirected to a GPIO interrupt to work around erratum ERR006687.
       *   This was implemented using the SOC's IOMUX block. In qemu, this GPIO
       *   interrupt never fired since IOMUX is currently not supported in qemu.
       *   Linux instead received MAC interrupts on the timer interrupt.
       *   As a result, qemu versions with the swapped interrupt assignment 
work,
       *   albeit accidentally, but qemu versions with the correct interrupt
       *   assignment fail.
       *
       * To ensure that all versions of Linux work, generate ENET_INT_MAC
       * interrrupts on both interrupt lines. This should be changed if and when
       * qemu supports IOMUX.
       */

  Unfortunately, this behavior causes the QNX Sabrelite BSP
  (http://blackberry.qnx.com/en/developers/bsp) to hang on ethernet
  initialization. This is caused by the fact that QEMU is firing the
  ENET_INT_TS_TIMER timer interrupt unexpectedly (when the ENET_INT_MAC
  flag is set). The BSP functions correctly on the actual hardware, but
  it is unable to handle the deliberately incorrect interrupt firing by
  QEMU.

  From reading the comment, it appears that this behavior is necessary
  to support certain versions of Linux. However, it would be very useful
  to be able to restore the correct interrupt behavior (possibly via a
  command-line flag).

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1839367/+subscriptions



reply via email to

[Prev in Thread] Current Thread [Next in Thread]