[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cb38f340-a410-26a4-43be-5f549c980ff3@bang-olufsen.dk>
Date: Sun, 22 Aug 2021 22:33:02 +0000
From: Alvin Šipraga <ALSI@...g-olufsen.dk>
To: Andrew Lunn <andrew@...n.ch>,
Alvin Šipraga <alvin@...s.dk>
CC: Linus Walleij <linus.walleij@...aro.org>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
Michael Rasmussen <MIR@...g-olufsen.dk>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH net-next 1/5] net: dsa: realtek-smi: fix mdio_free bug
on module unload
Hi Andrew,
On 8/22/21 11:40 PM, Andrew Lunn wrote:
> On Sun, Aug 22, 2021 at 09:31:39PM +0200, Alvin Šipraga wrote:
>> From: Alvin Šipraga <alsi@...g-olufsen.dk>
>>
>> realtek-smi-core fails to unregister the slave MII bus on module unload,
>> raising the following BUG warning:
>>
>> mdio_bus.c:650: BUG_ON(bus->state != MDIOBUS_UNREGISTERED);
>>
>> kernel BUG at drivers/net/phy/mdio_bus.c:650!
>> Internal error: Oops - BUG: 0 [#1] PREEMPT_RT SMP
>> Call trace:
>> mdiobus_free+0x4c/0x50
>> devm_mdiobus_free+0x18/0x20
>> release_nodes.isra.0+0x1c0/0x2b0
>> devres_release_all+0x38/0x58
>> device_release_driver_internal+0x124/0x1e8
>> driver_detach+0x54/0xe0
>> bus_remove_driver+0x60/0xd8
>> driver_unregister+0x34/0x60
>> platform_driver_unregister+0x18/0x20
>> realtek_smi_driver_exit+0x14/0x1c [realtek_smi]
>>
>> Fix this by duly unregistering the slave MII bus with
>> mdiobus_unregister. We do this in the DSA teardown path, since
>> registration is performed in the DSA setup path.
>
> Looking at the setup code, is there anything undoing what
> rtl8366rb_setup_cascaded_irq() does?
No, there isn't. I neglected to mention in the rtl8365mb patch that I
reworked the IRQ setup (compared with rtl8366rb) so that it could be
torn down in a neat way. So you will see that the new driver does it
properly, but I did not touch rtl8366rb because I am not using it. I am
happy to do the same to rtl8366rb but I don't think I should make it
part of this series. What do you think?
>
> This patch however loos O.K.
>
> Reviewed-by: Andrew Lunn <andrew@...n.ch>
>
> Andrew
>
Powered by blists - more mailing lists