Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp670208pxb; Tue, 5 Apr 2022 18:06:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTpoRj2XpuNCWKFcbdxu7FU49lcHy17W0eVRQKepAnVWGb1VeKSx8qgwFJXkedwC32RczB X-Received: by 2002:a17:906:6a17:b0:6e1:13c3:e35c with SMTP id qw23-20020a1709066a1700b006e113c3e35cmr6179904ejc.760.1649207175975; Tue, 05 Apr 2022 18:06:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649207175; cv=none; d=google.com; s=arc-20160816; b=j1K2S+H7DXIzW4kFzPM2kFRemgCBxHftolk0iJDcMer4u4+UsUHRoALYAczoCvnFG6 LvvEWZPo86Op9EFDAb+FYu7S9zemZbxQunSodjog5dxHkFaDLLlaynBqNG5TJJ/tfPDz j2Az2BlMtIDZXhnCmd33uEQSp8RMlhdIqt+DcECx4qU9jVZCKjgtnMo4nioTVqCN/CVC OJaP4Ur7KZbnMQoTIfmBCbUla7W+RnJaD8HNJQ15ZEIWBU7OIPcE9ah3nRj92FPLVseq gF6kpKR0lpODVDGuzh+8+6sT4qsH1SJrwuJ0D205TzaEbkKgfyTixD/zFnmYR498iR0s O48A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8DgL6NJysYO7sVV3WiAE2dKEncHbxHPN4OByKjF3yq4=; b=U9pNsHqkUUm1wSPoyhRouChXpobxXWmqGuSobg2JP/iAkj+jJlC9lUK8DGtM6J+kdy CfXq902nDAo14XC8Ta9Tn8llXI9AytmBH+IMWTh6cINTgh0UqRW7ZI9c1r7sw/vSEVjK NmV9wRk6U9jjtTVvITrI21My07oYS4fV5qSgqKM/XvBSU6AckURKZxbHR1zj89DtY7GQ 3X0o6wFPqriqYWZCEO8SrDqgxR8KVos+wHJtP4/jQrUkqmuVSdYbitF/HBQrXSqKZv5e Vrrl6b5jmxQkvWZUSS42BRauJZSZt0dO/uv2xroKClASeGq5qefQkufZZC4bU9yyPREz 7uUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vQAKpub3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o23-20020a170906775700b006e075aa2304si9842321ejn.895.2022.04.05.18.05.50; Tue, 05 Apr 2022 18:06:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vQAKpub3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240332AbiDEIqE (ORCPT + 99 others); Tue, 5 Apr 2022 04:46:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233332AbiDEIGO (ORCPT ); Tue, 5 Apr 2022 04:06:14 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 064FD6972C; Tue, 5 Apr 2022 01:01:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 560F961806; Tue, 5 Apr 2022 08:01:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5D9D6C385B2; Tue, 5 Apr 2022 08:01:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649145700; bh=xZqW6bhmtjzrBnDxdcWjv2+8BAXwYVWbAoDYitT4kk0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vQAKpub3RMBjVgwiiWzqNGRimznDyhUhuT56t6kq/8CrpWIGVbpSDYu1UbK/Qj8U9 bYHsGzUHx5SRevlt5/86HSCnapsvnTBUadnioVIxRuWW3ydYCMPDtvOy8AF0tc3ctn fwiU/iHfIQjn4PoqaOMGa8HUjyvqnmnSQnBTUJBg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lorenzo Bianconi , Felix Fietkau , Sasha Levin Subject: [PATCH 5.17 0497/1126] mt76: mt7921: do not always disable fw runtime-pm Date: Tue, 5 Apr 2022 09:20:44 +0200 Message-Id: <20220405070422.215177427@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lorenzo Bianconi [ Upstream commit b44eeb8cbdf2b88f2844f11e4f263b0abed5b5b0 ] After commit 'd430dffbe9dd ("mt76: mt7921: fix a possible race enabling/disabling runtime-pm")', runtime-pm is always disabled in the fw even if the user requests to enable it toggling debugfs node since mt7921_pm_interface_iter routine will use pm->enable to configure the fw. Fix the issue moving enable variable configuration before running mt7921_pm_interface_iter routine. Fixes: d430dffbe9dd ("mt76: mt7921: fix a possible race enabling/disabling runtime-pm") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin --- drivers/net/wireless/mediatek/mt76/mt7921/debugfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/debugfs.c b/drivers/net/wireless/mediatek/mt76/mt7921/debugfs.c index 86fd7292b229..45a393070e46 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/debugfs.c +++ b/drivers/net/wireless/mediatek/mt76/mt7921/debugfs.c @@ -291,13 +291,12 @@ mt7921_pm_set(void *data, u64 val) pm->enable = false; mt76_connac_pm_wake(&dev->mphy, pm); + pm->enable = val; ieee80211_iterate_active_interfaces(mt76_hw(dev), IEEE80211_IFACE_ITER_RESUME_ALL, mt7921_pm_interface_iter, dev); mt76_connac_mcu_set_deep_sleep(&dev->mt76, pm->ds_enable); - - pm->enable = val; mt76_connac_power_save_sched(&dev->mphy, pm); out: mutex_unlock(&dev->mt76.mutex); -- 2.34.1