Re: [PATCH net-next 3/3] net: stmmac: Convert to phylink and remove phylib logic

From: Jon Hunter
Date: Tue Jun 18 2019 - 06:24:03 EST



On 18/06/2019 10:46, Jose Abreu wrote:
> From: Jon Hunter <jonathanh@xxxxxxxxxx>
>
>> I am not certain but I don't believe so. We are using a static IP address
>> and mounting the root file-system via NFS when we see this ...
>
> Can you please add a call to napi_synchronize() before every
> napi_disable() calls, like this:
>
> if (queue < rx_queues_cnt) {
> napi_synchronize(&ch->rx_napi);
> napi_disable(&ch->rx_napi);
> }
>
> if (queue < tx_queues_cnt) {
> napi_synchronize(&ch->tx_napi);
> napi_disable(&ch->tx_napi);
> }
>
> [ I can send you a patch if you prefer ]

Yes I can try this and for completeness you mean ...

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 4ca46289a742..d4a12cb64d8e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -146,10 +146,15 @@ static void stmmac_disable_all_queues(struct stmmac_priv *priv)
for (queue = 0; queue < maxq; queue++) {
struct stmmac_channel *ch = &priv->channel[queue];

- if (queue < rx_queues_cnt)
+ if (queue < rx_queues_cnt) {
+ napi_synchronize(&ch->rx_napi);
napi_disable(&ch->rx_napi);
- if (queue < tx_queues_cnt)
+ }
+
+ if (queue < tx_queues_cnt) {
+ napi_synchronize(&ch->tx_napi);
napi_disable(&ch->tx_napi);
+ }
}
}

Cheers
Jon

--
nvpublic