From: Marc Zyngier <hidden> Date: 2018-12-29 09:42:04
On Sat, 29 Dec 2018 00:02:57 +0000,
Stefan Wahren [off-list ref] wrote:
Hi Stephan,
Hi,
while booting my Raspberry Pi 3 B+ with Linux 4.20 (arm64/defconfig)
i'm getting the following warning:
[ 11.005738] irq 79 handler irq_default_primary_handler+0x0/0x8 enabled interrupts
[...]
This seems to come from the lan78xx driver, because i don't get this
warning on the RPI 3B (smsc95xx).
What's the approach to fix this issue? Is it just simply replace
spin_lock_irq() with spin_lock_irqsave() at the right places?
No, this is more pathological than that. The USB framework seems to be
using threaded interrupts, which implies that interrupts are
re-enabled as soon as it has run.
In turn, this driver is using handle_simple_irq() as its flow, which
definitely expect interrupts to be disabled.
I have no insight in how this driver works, but I'm happy to help if
someone explains the interrupt flow of this thing.
M.
--
Jazz is not dead, it just smell funny.
HI Marc & Stephen,
Most of engineers are out until New Year's Day.
LAN78xx driver uses irq_domain for phy interrupt, but smsc95xx uses polling.
Need to check flow again, you can try that comment out "lan78xx_setup_irq_domain" to
make dev->domain_data.phyirq = 0 which forces PHY polling.
Can you share if this is filed on RPI forum?
Also, it would be appreciated if you can create a ticket on Microchip site at
https://www.microchip.com/technical-support/hot-topics
Best Regards,
Woojung
-----Original Message-----
From: Marc Zyngier <redacted>
Sent: Saturday, December 29, 2018 4:42 AM
To: Stefan Wahren <redacted>
Cc: Woojung Huh - C21699 <Woojung.Huh@microchip.com>; Eric Anholt
[off-list ref]; UNGLinuxDriver [off-list ref];
netdev@vger.kernel.org; linux-arm-kernel@lists.infradead.org
Subject: Re: lan78xx: WARNING: irq 79 handler enabled interrupts
On Sat, 29 Dec 2018 00:02:57 +0000,
Stefan Wahren [off-list ref] wrote:
Hi Stephan,
quoted
Hi,
while booting my Raspberry Pi 3 B+ with Linux 4.20 (arm64/defconfig)
i'm getting the following warning:
[ 11.005738] irq 79 handler irq_default_primary_handler+0x0/0x8 enabled
interrupts
[...]
quoted
This seems to come from the lan78xx driver, because i don't get this
warning on the RPI 3B (smsc95xx).
What's the approach to fix this issue? Is it just simply replace
spin_lock_irq() with spin_lock_irqsave() at the right places?
No, this is more pathological than that. The USB framework seems to be
using threaded interrupts, which implies that interrupts are
re-enabled as soon as it has run.
In turn, this driver is using handle_simple_irq() as its flow, which
definitely expect interrupts to be disabled.
I have no insight in how this driver works, but I'm happy to help if
someone explains the interrupt flow of this thing.
M.
--
Jazz is not dead, it just smell funny.
From: Stefan Wahren <hidden> Date: 2019-01-01 21:32:07
Hi Woojung,
Woojung.Huh@microchip.com hat am 30. Dezember 2018 um 04:25 geschrieben:
HI Marc & Stephen,
Most of engineers are out until New Year's Day.
thanks. I didn't expect a reply that fast.
LAN78xx driver uses irq_domain for phy interrupt, but smsc95xx uses polling.
Need to check flow again, you can try that comment out "lan78xx_setup_irq_domain" to
make dev->domain_data.phyirq = 0 which forces PHY polling.
I tested your suggestion with multi_v7_defconfig (32 bit) and arm64/defconfig.
The warning disappeared and Ethernet is still working.
Only the old issue that we can't receive until a first packet has been send out reappear. But this should be manageable.
Can you share if this is filed on RPI forum?
I didn't submit this to the raspberrypi.org forum / github. They mostly care about the next LTS release 4.19 and not really about arm64.
But an Arch Linux user (aarch64 using Mainline kernel) already discovered this issue:
https://archlinuxarm.org/forum/viewtopic.php?f=65&t=13302
Hi Stefan,
Thanks for information and creating a ticket.
Did quick check on a PC machine with 4.20 rc. However, not seeing same warning.
Look need time to repro and get details on same build & target you are using.
Regards,
Woojung
-----Original Message-----
From: Stefan Wahren <redacted>
Sent: Tuesday, January 1, 2019 4:32 PM
To: Woojung Huh - C21699 <Woojung.Huh@microchip.com>
Cc: eric@anholt.net; UNGLinuxDriver <UNGLinuxDriver@microchip.com>; marc.zyngier@arm.com;
netdev@vger.kernel.org; linux-arm-kernel@lists.infradead.org
Subject: RE: lan78xx: WARNING: irq 79 handler enabled interrupts
Hi Woojung,
quoted
Woojung.Huh@microchip.com hat am 30. Dezember 2018 um 04:25 geschrieben:
HI Marc & Stephen,
Most of engineers are out until New Year's Day.
thanks. I didn't expect a reply that fast.
quoted
LAN78xx driver uses irq_domain for phy interrupt, but smsc95xx uses polling.
Need to check flow again, you can try that comment out "lan78xx_setup_irq_domain" to
make dev->domain_data.phyirq = 0 which forces PHY polling.
I tested your suggestion with multi_v7_defconfig (32 bit) and arm64/defconfig.
The warning disappeared and Ethernet is still working.
Only the old issue that we can't receive until a first packet has been send out reappear. But this should
be manageable.
quoted
Can you share if this is filed on RPI forum?
I didn't submit this to the raspberrypi.org forum / github. They mostly care about the next LTS release
4.19 and not really about arm64.
But an Arch Linux user (aarch64 using Mainline kernel) already discovered this issue:
https://archlinuxarm.org/forum/viewtopic.php?f=65&t=13302
From: Stefan Wahren <hidden> Date: 2019-02-05 19:58:01
Hi,
Stefan Wahren [off-list ref] hat am 1. Januar 2019 um 22:31 geschrieben:
Hi Woojung,
quoted
Woojung.Huh@microchip.com hat am 30. Dezember 2018 um 04:25 geschrieben:
HI Marc & Stephen,
Most of engineers are out until New Year's Day.
thanks. I didn't expect a reply that fast.
quoted
LAN78xx driver uses irq_domain for phy interrupt, but smsc95xx uses polling.
Need to check flow again, you can try that comment out "lan78xx_setup_irq_domain" to
make dev->domain_data.phyirq = 0 which forces PHY polling.
I tested your suggestion with multi_v7_defconfig (32 bit) and arm64/defconfig.
The warning disappeared and Ethernet is still working.
Only the old issue that we can't receive until a first packet has been send out reappear. But this should be manageable.
i got informed that the engineers are busy with other issues and come back later to this :-(
Since i'm getting requests to provide my PHY polling patch, here it is: