Re: [PATCH net-next v2 1/2] net: stmmac: dwmac-motorcomm: remove the device at shutdown
From: Maxime Chevallier
Date: Tue Nov 24 2026 - 12:01:15 EST
On 11/20/26 11:27, Magnus Leatti wrote:
> No .shutdown here, so reboot, kexec and power-off leave the MAC and
> DMA running. This chip keeps its registers through S5 too.
>
> Hook .shutdown to stmmac_dvr_remove(): interface closed, DMA and MAC
> stopped, PHY dropped.
>
> Suggested-by: Yao Zi <me@xxxxxxxx>
> Signed-off-by: Magnus Leatti <magnusleatti@xxxxxxxxxxxxxx>
Reviewed-by: Maxime Chevallier <maxime.chevallier@xxxxxxxxxxx>
Maxime
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c
> index 42f0b11a7b60..63ce2301a0f6 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c
> @@ -374,6 +374,7 @@ static struct pci_driver dwmac_motorcomm_pci_driver = {
> .id_table = dwmac_motorcomm_pci_id_table,
> .probe = motorcomm_probe,
> .remove = motorcomm_remove,
> + .shutdown = motorcomm_remove,
> .driver = {
> .pm = &stmmac_simple_pm_ops,
> },