Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2373777lqp; Sun, 24 Mar 2024 16:27:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU3EqI+UMcDD41Gz4/ZK19Nh0SdNUg2Jd6QMp4dcHTu8MuHhBEIA7Q6ZWzJHg9vhHPzDvO685md0Lv42EDr0GCp3HpT9Ante2H/J/s6YA== X-Google-Smtp-Source: AGHT+IGOH4OlZm9RV5RTIDyEGwfxOtV6KEg1KfhJKfyJ/QWb4miVNow89Bwu0MSLs6VcCUblVviq X-Received: by 2002:a05:620a:5201:b0:78a:3225:60c4 with SMTP id dc1-20020a05620a520100b0078a322560c4mr6187643qkb.53.1711322821415; Sun, 24 Mar 2024 16:27:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711322821; cv=pass; d=google.com; s=arc-20160816; b=gwduiTQMqMFG3ok6Io4SUZSjbbld/YHAZUFOQE26A3RFPP3osq52R7s1lYQazRDRwA xWo8hwTvdK+ctHa0YgfEbdfS7Gtn9t/SAVrAew97V0W8pyscpR4Nm2Jbs59PsvaJzxZ5 fjzJQBDq2yhYczPWACXNK/AhwqLb3CN3ZQHjr4IhXHn2va4rdKopKo4fcxt/8uzQ5Pe0 WIFqKQvrf7fJJBzLkzgZvVtQjGnyW8OhpGwjy7uetWI5i8hhVYOBZ9vVzIPODWbrQM1W zxSBRDax3db8BzMwbaycNXWdZpqC8zkVvD2sNE3qbVqNaiWce1gF6G519YSj7nV4CULr vkpw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=lFw8V9B1CGvo0pufKgfIcfZnbZ/DT6l6u9WXqzP60Ag=; fh=g7cf1n8kVvY2FWj8G7QlEeuTRAO4E+B3zMlIFEF4glU=; b=lJmYUn0PPdDvx3EKhFznIXJwxISX71W/81qFVmzBjXMMEwdR1iQmQXK6amX6FrbEoY FaaEIVJHXqZ5Jh5bd1ikZGpJWhyO2IzLDPcOAVhkpz8FomxXW3BPOmoF7wTPFlQV9y3h 2WMz0DL5+LL/0754bDgPf+9qVcFeh9c2RD4TqSQc/oIYC52fSgiTZhRhT3bu9H/zs16W nDOoEGLjK/gUtJ2h4jPaSMcgBZhcQkQTtGkL0+w8aRYCNiuLkthrjfGKJXEsRqy9JsFj CpOelCl1FToz73r54OSMU+ju8LKvRcDSaLmAQGwEIFrifnSWVU0MOrztVA+XlATtZvwO EzzQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ltpGnGpr; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113128-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113128-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id z24-20020a05620a261800b0078a46d1adebsi4187350qko.623.2024.03.24.16.27.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 16:27:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113128-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ltpGnGpr; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113128-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113128-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 174C91C21D07 for ; Sun, 24 Mar 2024 23:27:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 81CDB15E5C4; Sun, 24 Mar 2024 22:38:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ltpGnGpr" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8147E15E5A4; Sun, 24 Mar 2024 22:38:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711319935; cv=none; b=NQZVSs1gV2fVJ6xRqXaw344xFcstnVK4vIYKbjEpN9XfHDTSbYVOGEC72GIbr7c4/1LqICfEK7cFk9L9miqiu/vzMdNZSrWxNkJ321nIEshvoWD6yArXiNIc1TtyrGB4TjaHXvBCckvQzzyIAqKx+1po3cpHEDaO2dkGc1CF+HI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711319935; c=relaxed/simple; bh=1hQ0IocJrYAHyKor1VYE7+Z3UQNw34mx7Cz6RERCIpE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hZJM0W9u72XDlEQfDoHc1Blr18k8S8DHOwz/162bWIfRyjuDhnzzQGZB6D2tkT8U/z3YSCvYSDoZn7VpzdRCX3d5xBDDNfCE3a86VWwCJ/YrnJs3GR8+b0iaxZ2X8vVbhIIpnqHooSsM/PRvqOwMObaHzIXhbODtOtex8EB93C8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ltpGnGpr; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5F3CC433C7; Sun, 24 Mar 2024 22:38:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711319935; bh=1hQ0IocJrYAHyKor1VYE7+Z3UQNw34mx7Cz6RERCIpE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ltpGnGpre26xCVxp6S16DbH2GHeQynTLCArcCuBBZ+UZ1Y22T6/QXqztyh0f0GiZK 1tOwGDX767zLjoeblA3aTevOWj5WW2J3FyeUs3i85UJbIJsPxXhPNK8kiihomRdNSs 8hYT4r0yX34Awrse1H6PcYlPSBdwjD0JB/wN4eXr5KTc9Q4AFfeyF6qy4p3LxoD3Zw DXAAQBb4Dh0AgQlnrMQHbX6QPZJquwexXAO6t1Wg0sYofz0dqUXlDjkT/R2uhb1VJV fMObFXXeQCAZRPT145j0LgBEQqzflGw6IMlWe4/12sgYmWe3I9pWVGaxuTptVUKUlx 7ShmG+qgOTV6w== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Quan Zhou , Ming Yen Hsieh , Felix Fietkau , Sasha Levin Subject: [PATCH 6.8 241/715] wifi: mt76: mt7925: add flow to avoid chip bt function fail Date: Sun, 24 Mar 2024 18:27:00 -0400 Message-ID: <20240324223455.1342824-242-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Quan Zhou [ Upstream commit 9300ae0cd9e8f2407b20e0e67ee3ea03dc8b06af ] A sub-process of Wifi L0.5 reset will make chip common partition enter low power, and have chance lead to Bluetooth host-to-chip command timeout, modify the software flow according to the chip's design to solve the problem. Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips") Signed-off-by: Quan Zhou Signed-off-by: Ming Yen Hsieh Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin --- drivers/net/wireless/mediatek/mt76/mt7925/pci.c | 2 ++ drivers/net/wireless/mediatek/mt76/mt792x_regs.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/pci.c b/drivers/net/wireless/mediatek/mt76/mt7925/pci.c index 1fd99a8565415..74cfba7675beb 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7925/pci.c +++ b/drivers/net/wireless/mediatek/mt76/mt7925/pci.c @@ -386,6 +386,8 @@ static int mt7925_pci_probe(struct pci_dev *pdev, dev_info(mdev->dev, "ASIC revision: %04x\n", mdev->rev); + mt76_rmw_field(dev, MT_HW_EMI_CTL, MT_HW_EMI_CTL_SLPPROT_EN, 1); + ret = mt792x_wfsys_reset(dev); if (ret) goto err_free_dev; diff --git a/drivers/net/wireless/mediatek/mt76/mt792x_regs.h b/drivers/net/wireless/mediatek/mt76/mt792x_regs.h index a99af23e4b564..d7f9b24cd665f 100644 --- a/drivers/net/wireless/mediatek/mt76/mt792x_regs.h +++ b/drivers/net/wireless/mediatek/mt76/mt792x_regs.h @@ -389,6 +389,9 @@ #define MT_HW_CHIPID 0x70010200 #define MT_HW_REV 0x70010204 +#define MT_HW_EMI_CTL 0x18011100 +#define MT_HW_EMI_CTL_SLPPROT_EN BIT(1) + #define MT_PCIE_MAC_BASE 0x10000 #define MT_PCIE_MAC(ofs) (MT_PCIE_MAC_BASE + (ofs)) #define MT_PCIE_MAC_INT_ENABLE MT_PCIE_MAC(0x188) -- 2.43.0