[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <z7rcnzmmk44fjn3bnh3mrtub4r62keliwjutvyydjjcn6qp26g@bsuz6hj36ok7>
Date: Tue, 28 May 2024 15:41:09 -0500
From: Andrew Halaney <ahalaney@...hat.com>
To: "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>
Cc: Serge Semin <fancer.lancer@...il.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>, Jose Abreu <joabreu@...opsys.com>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>, netdev@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH net-next 4/5] net: stmmac: remove unnecessary
netif_carrier_off()
On Tue, May 28, 2024 at 12:48:53PM GMT, Russell King (Oracle) wrote:
> It is incorrect to call netif_carrier_off(), or in fact any driver
> teardown, before unregister_netdev() has been called.
>
> unregister_netdev() unpublishes the network device from userspace, and
> takes the interface down if it was up prior to returning. Therefore,
> once the call has returned, we are guaranteed that .ndo_stop() will
> have been called for an interface that was up. Phylink will take the
> carrier down via phylink_stop(), making any manipulation of the carrier
> in the remove path unnecessary.
>
> In the stmmac_release() path, the netif_carrier_off() call follows the
> call to phylink_stop(), so this call is redundant.
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
Reviewed-by: Andrew Halaney <ahalaney@...hat.com>
Powered by blists - more mailing lists