linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Elder <elder@linaro.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, evgreen@chromium.org,
	bjorn.andersson@linaro.org, cpratapa@codeaurora.org,
	subashab@codeaurora.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net 2/2] net: ipa: re-enable NAPI before enabling interrupt
Date: Fri, 8 Jan 2021 14:16:18 -0600	[thread overview]
Message-ID: <49105454-8f5e-6fa6-bdef-fa68c4510d62@linaro.org> (raw)
In-Reply-To: <20210107183803.47308e23@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>

On 1/7/21 8:38 PM, Jakub Kicinski wrote:
> On Thu,  7 Jan 2021 15:43:25 -0600 Alex Elder wrote:
>> @@ -743,21 +743,21 @@ static void gsi_channel_freeze(struct gsi_channel *channel)
>>   	set_bit(GSI_CHANNEL_FLAG_STOPPING, channel->flags);
>>   	smp_mb__after_atomic();	/* Ensure gsi_channel_poll() sees new value */
>>   
>> -	napi_disable(&channel->napi);
>> -
>>   	gsi_irq_ieob_disable(channel->gsi, channel->evt_ring_id);
>> +
>> +	napi_disable(&channel->napi);
>>   }
> 
> So patch 1 is entirely for the purpose of keeping the code symmetric
> here? I can't think of other reason why masking this IRQ couldn't be
> left after NAPI is disabled, and that should work as you expect.

No, that is not the purpose of the first patch.

But regardless, I'm really glad you pushed back on this
because it made me step back and re-evaluate in a different
way what was happening during suspend.  Your earlier response
(about what happens during napi_disable()) also helped me to
see there's probably something *else* wrong with how the
driver is stopping channels.

I was going to go into more detail here but for now
let me just rescind this series.  I will be reworking
the channel stop/suspend logic and will send that work
out when it's tested and ready.

Thanks.

					-Alex

>>   /* Allow transactions to be used on the channel again. */
>>   static void gsi_channel_thaw(struct gsi_channel *channel)
>>   {
>> -	gsi_irq_ieob_enable(channel->gsi, channel->evt_ring_id);
>> -
>>   	/* Allow the NAPI poll loop to re-enable interrupts again */
>>   	clear_bit(GSI_CHANNEL_FLAG_STOPPING, channel->flags);
>>   	smp_mb__after_atomic();	/* Ensure gsi_channel_poll() sees new value */
>>   
>>   	napi_enable(&channel->napi);
>> +
>> +	gsi_irq_ieob_enable(channel->gsi, channel->evt_ring_id);
>>   }


      reply	other threads:[~2021-01-08 20:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-07 21:43 [PATCH net 0/2] net: ipa: fix a suspend hang Alex Elder
2021-01-07 21:43 ` [PATCH net 1/2] net: ipa: introduce atomic channel STOPPING flag Alex Elder
2021-01-07 21:43 ` [PATCH net 2/2] net: ipa: re-enable NAPI before enabling interrupt Alex Elder
2021-01-08  2:38   ` Jakub Kicinski
2021-01-08 20:16     ` Alex Elder [this message]

Reply instructions:

You may reply publicly 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=49105454-8f5e-6fa6-bdef-fa68c4510d62@linaro.org \
    --to=elder@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=cpratapa@codeaurora.org \
    --cc=davem@davemloft.net \
    --cc=evgreen@chromium.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=subashab@codeaurora.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).