[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220409151557.207980-9-martin@kaiser.cx>
Date: Sat, 9 Apr 2022 17:15:57 +0200
From: Martin Kaiser <martin@...ser.cx>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Larry Finger <Larry.Finger@...inger.net>,
Phillip Potter <phil@...lpotter.co.uk>,
Michael Straube <straube.linux@...il.com>,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
Martin Kaiser <martin@...ser.cx>
Subject: [PATCH 8/8] staging: r8188eu: remove the bInSuspend loop
Remove the loop in rtw_pwr_wakeup that waits while the system is
suspended.
pwrpriv->bInSuspend is set in rtw_suspend and cleared in rtw_resume. These
functions are the .suspend and .resume functions of the struct usb_driver
for r8188eu.
A usb_driver's suspend and resume functions are called when the entire
system goes into suspend or runtime suspend.
All of the code paths for rtw_pwr_wakeup start at ioctl handlers.
We can remove the loop that checks bInSuspend. It's not possible to call
an ioctl while the entire system is suspended.
Signed-off-by: Martin Kaiser <martin@...ser.cx>
---
I tried to track down who calls suspend and resume of an usb_driver. My
understanding is that all of these calls come from the pm layer and that
the suspend and resume affects the whole system, not just the usb device.
drivers/staging/r8188eu/core/rtw_pwrctrl.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_pwrctrl.c b/drivers/staging/r8188eu/core/rtw_pwrctrl.c
index 717a9bb26c19..093794414d67 100644
--- a/drivers/staging/r8188eu/core/rtw_pwrctrl.c
+++ b/drivers/staging/r8188eu/core/rtw_pwrctrl.c
@@ -369,10 +369,6 @@ int rtw_pwr_wakeup(struct adapter *padapter)
while (pwrpriv->ps_processing && time_before(jiffies, timeout))
msleep(10);
- /* System suspend is not allowed to wakeup */
- while (pwrpriv->bInSuspend && time_before(jiffies, timeout))
- msleep(10);
-
/* I think this should be check in IPS, LPS, autosuspend functions... */
if (check_fwstate(pmlmepriv, _FW_LINKED))
goto exit;
--
2.30.2
Powered by blists - more mailing lists