Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp673776pxb; Tue, 5 Apr 2022 18:13:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxFS3yHMuHrxl44F0XvPc2EFeJGqFbOLcHF5WcF0UKHHpCznccpNX3/Pt6E6GJaP3E6Rim X-Received: by 2002:aa7:c58f:0:b0:41c:d8c6:b6a5 with SMTP id g15-20020aa7c58f000000b0041cd8c6b6a5mr6321067edq.181.1649207630055; Tue, 05 Apr 2022 18:13:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649207630; cv=none; d=google.com; s=arc-20160816; b=mASNax2KCWNYFTTVlnw2Az9Tt/1L2LkJs/Cwoc6jI3msIab+LrDhqLg/L+eu2QvM1w 24wlSiuWr0d64FdQS2Jlv8PnTqAGJmBQj9hjwAd5jlWSWR0TZcZv5TPpCIdHKHDnDIT/ JtpPydBKhwnG0B/l0xGKwO9GAwrxuPQcexU5mYGlQxMbhmf9zeprV6QUh0oDAUHcKiU0 Nt1e2zJVwB13C5r2jSP8tn6ZeAfZcxsvFfJT946RqkwNx0DT3xFgf0upg6fnX+hOBN0E GfOcAohRpOyJ1qfGCE+pBYo9/RM2pgHy2VzUaR8/T1OIRe7qG+Z4pShvP//e1ImJO86g S/iQ== 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=pRrvPgFJElq+zhvmvOvBr1svxdNOvgNza68tYKjnytY=; b=0X98b1srKsuh/UXyzEDrj6xR89BnT4PVj6Ks/kiv6VPyBaE7mXd6oXF6IORK36V8/h Z5S1VEkfw4lP4fk2mLBFhTuM2utKqqVfqIQYdjkM5TZJ/h9IqM8I5D1f0QoE3j1A09v1 d01xDgSxDlRyJNblhGZWYCzAFjrtG7QLTX/rcZmBPohbbiR2yG3vZo4MAnBIrCg+k7sP YY6aRVEEZ+LL5ntCM42BG9HLxuqxTdpjlUDA9iSVoIYkAKMkTOGhIiwlYsJSjEvAbPG1 0D0kfUxCGPOcA8ZxOxdmuzXvn/PIQtgzeJKfRIe1JTAkKUbWaFKDDBuNQLKwUDRM0M3H g/Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="s9i/wjug"; 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 gs12-20020a170906f18c00b006df76385ddesi10052378ejb.638.2022.04.05.18.13.20; Tue, 05 Apr 2022 18:13:50 -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="s9i/wjug"; 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 S240262AbiDEIbu (ORCPT + 99 others); Tue, 5 Apr 2022 04:31:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236064AbiDEIBO (ORCPT ); Tue, 5 Apr 2022 04:01:14 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90E1749FB3; Tue, 5 Apr 2022 00:59:16 -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 ams.source.kernel.org (Postfix) with ESMTPS id 49AC9B81B14; Tue, 5 Apr 2022 07:59:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AAF54C340EE; Tue, 5 Apr 2022 07:59:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649145554; bh=oArQntQ2xK9uXGxSl7HUbf1gsJ4VFCTOgbBBaJnSz1Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s9i/wjugkXQ8q5yEqTs1gEQhcUYfMgo/8HWVke2pnZ450/Y/Z1KxyXK1D+VTvldqe lo8UNpmdnT5pUFovwtFw13zwkxXGUzrcfFwqgYiRrcN6kRK8dPx8X1GlF70jcNygfk Yn8WvGg0CdR5j6PkISitr+h+bTsrV2Uta++r9NIs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sean Wang , Mark Chen , Marcel Holtmann , Sasha Levin Subject: [PATCH 5.17 0447/1126] Bluetooth: mt7921s: fix bus hang with wrong privilege Date: Tue, 5 Apr 2022 09:19:54 +0200 Message-Id: <20220405070420.744521088@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: Mark Chen [ Upstream commit 752aea58489fd42f5c54dc50cb098d19e486ae61 ] According to chip hw flow, mt7921s need to re-acquire privilege again before normal running. Otherwise, the bus may be stuck in an abnormal status. Fixes: c603bf1f94d0 ("Bluetooth: btmtksdio: add MT7921s Bluetooth support") Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Mark Chen Signed-off-by: Marcel Holtmann Signed-off-by: Sasha Levin --- drivers/bluetooth/btmtksdio.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/bluetooth/btmtksdio.c b/drivers/bluetooth/btmtksdio.c index d4e2541a4873..c05578b52d33 100644 --- a/drivers/bluetooth/btmtksdio.c +++ b/drivers/bluetooth/btmtksdio.c @@ -872,6 +872,15 @@ static int btmtksdio_setup(struct hci_dev *hdev) err = mt79xx_setup(hdev, fwname); if (err < 0) return err; + + err = btmtksdio_fw_pmctrl(bdev); + if (err < 0) + return err; + + err = btmtksdio_drv_pmctrl(bdev); + if (err < 0) + return err; + break; case 0x7663: case 0x7668: -- 2.34.1