[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <57AB589D.3010509@codeaurora.org>
Date: Wed, 10 Aug 2016 11:38:53 -0500
From: Timur Tabi <timur@...eaurora.org>
To: Florian Fainelli <f.fainelli@...il.com>,
Lino Sanfilippo <LinoSanfilippo@....de>,
netdev@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-msm@...r.kernel.org, sdharia@...eaurora.org,
shankerd@...eaurora.org, vikrams@...eaurora.org,
cov@...eaurora.org, gavidov@...eaurora.org, robh+dt@...nel.org,
andrew@...n.ch, bjorn.andersson@...aro.org, mlangsdo@...hat.com,
jcm@...hat.com, agross@...eaurora.org, davem@...emloft.net
Subject: Re: [PATCH] [v7] net: emac: emac gigabit ethernet controller driver
Florian Fainelli wrote:
>> >Is there an easy way for me to stop the RX path before I set rxbuf_size?
>> > Some netif_xxx function I can call?
> napi_disable() should take care of that.
It appears that if I call netif_stop_queue() *afer* calling
napi_disable(), I get a hang and/or TX timeout. Since emac_mac_down()
does this:
netif_stop_queue(netdev);
napi_disable(&adpt->rx_q.napi);
I cannot call just napi_disable() in emac_change_mtu(), because when I
then call emac_mac_down(), the first thing it does is call
netif_stop_queue(), and that's when I timeout/hang.
Unfortunately, I cannot even do this:
netif_stop_queue(netdev);
napi_disable(&adpt->rx_q.napi);
netif_stop_queue(netdev);
napi_disable(&adpt->rx_q.napi);
Even though I've already called netif_stop_queue(), calling it again
causes the timeout/hang.
Is this expected? I never understood why I needed to call
netif_stop_queue() before napi_disable(). I do see some drivers do not
call netif_stop_queue(). I even saw a driver that calls them in reverse
order, so I don't understand why that sequence breaks for me but not him.
--
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc. Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
Powered by blists - more mailing lists