Netdev Archive on lore.kernel.org
 help / color / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Jose Abreu <Jose.Abreu@synopsys.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: Joao Pinto <Joao.Pinto@synopsys.com>,
	"David S . Miller" <davem@davemloft.net>,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	Alexandre Torgue <alexandre.torgue@st.com>,
	Russell King <linux@armlinux.org.uk>,
	Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	linux-tegra <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH net-next 3/3] net: stmmac: Convert to phylink and remove phylib logic
Date: Tue, 18 Jun 2019 16:20:33 +0100
Message-ID: <d96f8bea-f7ef-82ae-01ba-9c97aec0ee38@nvidia.com> (raw)
In-Reply-To: <b66c7578-172f-4443-f4c3-411525e28738@nvidia.com>


On 18/06/2019 11:18, Jon Hunter wrote:
> 
> On 18/06/2019 10:46, Jose Abreu wrote:
>> From: Jon Hunter <jonathanh@nvidia.com>
>>
>>> 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);
> +               }
>         }
>  }

So good news and bad news ...

The good news is that the above change does fix the initial crash
I am seeing. However, even with this change applied on top of
-next, it is still dying somewhere else and so there appears to
be a second issue. 

On a successful boot I see ...

[    6.150419] dwc-eth-dwmac 2490000.ethernet: Cannot get CSR clock

[    6.156441] dwc-eth-dwmac 2490000.ethernet: no reset control found

[    6.175866] dwc-eth-dwmac 2490000.ethernet: User ID: 0x10, Synopsys ID: 0x41

[    6.182912] dwc-eth-dwmac 2490000.ethernet: 	DWMAC4/5

[    6.187961] dwc-eth-dwmac 2490000.ethernet: DMA HW capability register supported

[    6.195351] dwc-eth-dwmac 2490000.ethernet: RX Checksum Offload Engine supported

[    6.202735] dwc-eth-dwmac 2490000.ethernet: TX Checksum insertion supported

[    6.209685] dwc-eth-dwmac 2490000.ethernet: Wake-Up On Lan supported

[    6.216041] dwc-eth-dwmac 2490000.ethernet: TSO supported

[    6.221433] dwc-eth-dwmac 2490000.ethernet: Enable RX Mitigation via HW Watchdog Timer

[    6.229342] dwc-eth-dwmac 2490000.ethernet: device MAC address 9a:9b:49:6f:a5:ee

[    6.236727] dwc-eth-dwmac 2490000.ethernet: TSO feature enabled

[    6.242689] libphy: stmmac: probed

On the latest -next with the patch applied I see ...

[    6.043529] dwc-eth-dwmac 2490000.ethernet: Cannot get CSR clock
[    6.049546] dwc-eth-dwmac 2490000.ethernet: no reset control found
[    6.068895] dwc-eth-dwmac 2490000.ethernet: User ID: 0x10, Synopsys ID: 0x41
[    6.075941] dwc-eth-dwmac 2490000.ethernet: 	DWMAC4/5
[    6.080989] dwc-eth-dwmac 2490000.ethernet: DMA HW capability register supported
[    6.088373] dwc-eth-dwmac 2490000.ethernet: RX Checksum Offload Engine supported
[    6.095756] dwc-eth-dwmac 2490000.ethernet: TX Checksum insertion supported
[    6.102708] dwc-eth-dwmac 2490000.ethernet: Wake-Up On Lan supported
[    6.109074] dwc-eth-dwmac 2490000.ethernet: TSO supported
[    6.114465] dwc-eth-dwmac 2490000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    6.122373] dwc-eth-dwmac 2490000.ethernet: device MAC address ee:3a:9a:b0:7e:34
[    6.129756] dwc-eth-dwmac 2490000.ethernet: TSO feature enabled

And it dies here. No more output is seen. I will try to figure
out which commit is causing this issue.

Cheers
Jon

-- 
nvpublic

  reply index

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-11 15:18 [PATCH net-next 0/3] net: stmmac: Convert to phylink Jose Abreu
2019-06-11 15:18 ` [PATCH net-next 1/3] net: stmmac: Prepare to convert " Jose Abreu
2019-06-11 15:18 ` [PATCH net-next 2/3] net: stmmac: Start adding phylink support Jose Abreu
2019-06-11 15:35   ` Russell King - ARM Linux admin
2019-06-11 15:40     ` Jose Abreu
2019-06-11 15:18 ` [PATCH net-next 3/3] net: stmmac: Convert to phylink and remove phylib logic Jose Abreu
2019-06-18  9:30   ` Jon Hunter
2019-06-18  9:35     ` Jose Abreu
2019-06-18  9:42       ` Jon Hunter
2019-06-18  9:46         ` Jose Abreu
2019-06-18 10:18           ` Jon Hunter
2019-06-18 15:20             ` Jon Hunter [this message]
2019-06-18 19:44               ` Jon Hunter
2019-06-20 14:05                 ` Jon Hunter
2019-06-25  7:37                   ` Jose Abreu
2019-06-25 11:10                     ` Jon Hunter
2019-06-25 11:25                       ` Jose Abreu
2019-06-13 21:02 ` [PATCH net-next 0/3] net: stmmac: Convert to phylink David Miller
2019-06-14 13:40 ` Corentin Labbe
2019-06-14 14:45   ` Jose Abreu
2019-07-22 12:42 ` Ondřej Jirman
2019-07-22 13:28   ` Jose Abreu
2019-07-22 13:40     ` Andrew Lunn
2019-07-22 13:58       ` Jose Abreu
2019-07-22 14:19         ` Andrew Lunn
2019-07-22 14:26           ` Jose Abreu
2019-07-22 14:39             ` Ondřej Jirman
2019-07-23  9:36               ` Jose Abreu
2019-07-22 13:49     ` Ondřej Jirman

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d96f8bea-f7ef-82ae-01ba-9c97aec0ee38@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=Joao.Pinto@synopsys.com \
    --cc=Jose.Abreu@synopsys.com \
    --cc=alexandre.torgue@st.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
		netdev@vger.kernel.org netdev@archiver.kernel.org
	public-inbox-index netdev


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox