Re: [PATCH 1/2] Revert "net: smsc911x: Make Runtime PM handling more fine-grained"

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

 



Hi Wolfram,

On Thu, Mar 16, 2023 at 8:46 AM Wolfram Sang
<wsa+renesas@xxxxxxxxxxxxxxxxxxxx> wrote:
> This reverts commit 1e30b8d755b81b0d1585cb22bc753e9f2124fe87. Running
> 'ifconfig' with the interface down BUGs. This is the culprit:
>
>         smsc911x_get_stats from dev_get_stats+0xe4/0xf4
>
> The above function is called with the clocks off, so register read
> fails. Enabling clocks in the above functions does not work, because it
> is called in atomic context. So, let's return to the simple and working
> PM we had before.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>

Thanks for your patch!

In sh_eth this was fixed differently, by adding a check for
mdp->is_opened to sh_eth_get_stats() [1].
I believe the modern way would be to add a check for netif_running()
instead.

Would adding such a check to smsc911x_get_stats() work for you, too?

[1] 7fa2955ff70ce453 ("sh_eth: Fix sleeping function called from
invalid context")

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux