[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210107214325.7077-1-elder@linaro.org>
Date: Thu, 7 Jan 2021 15:43:23 -0600
From: Alex Elder <elder@...aro.org>
To: davem@...emloft.net, kuba@...nel.org
Cc: evgreen@...omium.org, bjorn.andersson@...aro.org,
cpratapa@...eaurora.org, subashab@...eaurora.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH net 0/2] net: ipa: fix a suspend hang
The IPA driver's PM suspend callback stops all channels, and its
resume callback restarts them again. Part of stopping a channel is
disabling NAPI and disabling its I/O completion interrupt.
When stopping a channel, the IPA driver currently disables NAPI
before disabling the interrupt. It also re-enables interrupts
before re-enabling NAPI. The interrupt handler can therefore be
called while NAPI is disabled.
If the interrupt signaling a transfer completion occurs while NAPI
is disabled, NAPI polling will not be scheduled to process that
completion. That processing will be delayed, occuring only when a
subsequent interrupt schedules NAPI polling when NAPI is enabled
again.
The second patch in this series reorders the NAPI and interrupt
control calls. The completion interrupt is disabled before NAPI
when stopping a channel, and re-enabled after NAPI when starting.
This way polling to handle the completion of a transfer can begin
immediately when handling its interrupt. And if a completion occurs
while the interrupt is disabled, the handler will trigger polling
when interrupts are enabled again.
The first patch adds a flag that prevents the poll function from
re-enabling the interrupt when stopping.
Without this fix in place we would occasionally see a hang while
stopping channels during suspend.
-Alex
Alex Elder (2):
net: ipa: introduce atomic channel STOPPING flag
net: ipa: re-enable NAPI before enabling interrupt
drivers/net/ipa/gsi.c | 15 ++++++++++++---
drivers/net/ipa/gsi.h | 6 ++++++
2 files changed, 18 insertions(+), 3 deletions(-)
--
2.20.1
Powered by blists - more mailing lists