Re: [PATCH net-next 10/12] net: stmmac: tc956x: add TC956x/QPS615 support
From: Andrew Lunn
Date: Thu May 07 2026 - 10:22:14 EST
> Hi Alex,
>
> Do you think if a shutdown callback like this is required? It looks like the
> driver sometimes does a MDIO MMIO read when the PCIe link is down, causing
> the board to reset due to SoC side PCIe NoC timeout.
>
> After this change, the board can always shutdown gracefully.
>
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-tc956x.c
> b/drivers/net/ethernet/stmicro/stmmac/dwmac-tc956x.c
> index 4e8b4a185583..34b8e3fe1b51 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-tc956x.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-tc956x.c
> @@ -767,6 +767,17 @@ static void tc956x_dwmac_remove(struct auxiliary_device
> *adev)
> tc956x_mac_disable(td);
> }
>
> +static void tc956x_dwmac_shutdown(struct auxiliary_device *adev)
> +{
> + struct device *dev = &adev->dev;
> + int ret;
> +
> + ret = stmmac_suspend(dev);
It seems odd to do a suspend in shutdown.
But lets backtrack. Why is the PCIe link down?
Andrew