* [PATCH v2] wifi: wlcore: fix unbalanced pm_runtime calls
@ 2025-01-04 19:55 akemnade
2025-01-06 6:22 ` Nemanov, Michael
2025-01-10 12:51 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: akemnade @ 2025-01-04 19:55 UTC (permalink / raw)
To: kvalo, rmk+kernel, johannes.berg, miriam.rachel.korenblit, leitao,
andreas, emmanuel.grumbach, tony, linux-wireless, linux-kernel
From: Andreas Kemnade <andreas@kemnade.info>
If firmware boot failes, runtime pm is put too often:
[12092.708099] wlcore: ERROR firmware boot failed despite 3 retries
[12092.708099] wl18xx_driver wl18xx.1.auto: Runtime PM usage count underflow!
Fix that by redirecting all error gotos before runtime_get so that runtime is
not put.
Fixes: c40aad28a3cf ("wlcore: Make sure firmware is initialized in wl1271_op_add_interface()")
Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
---
Changes in V2:
- add fixes
- fix one more place
drivers/net/wireless/ti/wlcore/main.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 986b07bfa0ee8..8fb58a5d911cb 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -2612,24 +2612,24 @@ static int wl1271_op_add_interface(struct ieee80211_hw *hw,
if (test_bit(WL1271_FLAG_RECOVERY_IN_PROGRESS, &wl->flags) ||
test_bit(WLVIF_FLAG_INITIALIZED, &wlvif->flags)) {
ret = -EBUSY;
- goto out;
+ goto out_unlock;
}
ret = wl12xx_init_vif_data(wl, vif);
if (ret < 0)
- goto out;
+ goto out_unlock;
wlvif->wl = wl;
role_type = wl12xx_get_role_type(wl, wlvif);
if (role_type == WL12XX_INVALID_ROLE_TYPE) {
ret = -EINVAL;
- goto out;
+ goto out_unlock;
}
ret = wlcore_allocate_hw_queue_base(wl, wlvif);
if (ret < 0)
- goto out;
+ goto out_unlock;
/*
* TODO: after the nvs issue will be solved, move this block
@@ -2644,7 +2644,7 @@ static int wl1271_op_add_interface(struct ieee80211_hw *hw,
ret = wl12xx_init_fw(wl);
if (ret < 0)
- goto out;
+ goto out_unlock;
}
/*
--
2.39.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] wifi: wlcore: fix unbalanced pm_runtime calls
2025-01-04 19:55 [PATCH v2] wifi: wlcore: fix unbalanced pm_runtime calls akemnade
@ 2025-01-06 6:22 ` Nemanov, Michael
2025-01-10 12:51 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Nemanov, Michael @ 2025-01-06 6:22 UTC (permalink / raw)
To: akemnade, kvalo, rmk+kernel, johannes.berg,
miriam.rachel.korenblit, leitao, andreas, emmanuel.grumbach, tony,
linux-wireless, linux-kernel
On 1/4/2025 9:55 PM, akemnade@kernel.org wrote:
> From: Andreas Kemnade <andreas@kemnade.info>
>
> If firmware boot failes, runtime pm is put too often:
> [12092.708099] wlcore: ERROR firmware boot failed despite 3 retries
> [12092.708099] wl18xx_driver wl18xx.1.auto: Runtime PM usage count underflow!
> Fix that by redirecting all error gotos before runtime_get so that runtime is
> not put.
>
> Fixes: c40aad28a3cf ("wlcore: Make sure firmware is initialized in wl1271_op_add_interface()")
> Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
Reviewed-by: Michael Nemanov <michael.nemanov@ti.com>
Best regards,
Michael.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] wifi: wlcore: fix unbalanced pm_runtime calls
2025-01-04 19:55 [PATCH v2] wifi: wlcore: fix unbalanced pm_runtime calls akemnade
2025-01-06 6:22 ` Nemanov, Michael
@ 2025-01-10 12:51 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2025-01-10 12:51 UTC (permalink / raw)
To: akemnade
Cc: rmk+kernel, johannes.berg, miriam.rachel.korenblit, leitao,
andreas, emmanuel.grumbach, tony, linux-wireless, linux-kernel
akemnade@kernel.org wrote:
> From: Andreas Kemnade <andreas@kemnade.info>
>
> If firmware boot failes, runtime pm is put too often:
> [12092.708099] wlcore: ERROR firmware boot failed despite 3 retries
> [12092.708099] wl18xx_driver wl18xx.1.auto: Runtime PM usage count underflow!
> Fix that by redirecting all error gotos before runtime_get so that runtime is
> not put.
>
> Fixes: c40aad28a3cf ("wlcore: Make sure firmware is initialized in wl1271_op_add_interface()")
> Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
> Reviewed-by: Michael Nemanov <michael.nemanov@ti.com>
Patch applied to wireless-next.git, thanks.
996c934c8c19 wifi: wlcore: fix unbalanced pm_runtime calls
--
https://patchwork.kernel.org/project/linux-wireless/patch/20250104195507.402673-1-akemnade@kernel.org/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-01-10 12:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-04 19:55 [PATCH v2] wifi: wlcore: fix unbalanced pm_runtime calls akemnade
2025-01-06 6:22 ` Nemanov, Michael
2025-01-10 12:51 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox