Skip to content

Commit

Permalink
DO NOT COMMIT
Browse files Browse the repository at this point in the history
mt76: add patch fixing firmware timeout on MT7996

This should be committed to mt76.git rather than a patch here.
  • Loading branch information
dangowrt committed Jan 28, 2024
1 parent 681a623 commit d117077
Showing 1 changed file with 77 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
From patchwork Thu Dec 21 09:41:18 2023
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Lorenzo Bianconi <lorenzo@kernel.org>
X-Patchwork-Id: 13501530
X-Patchwork-Delegate: nbd@nbd.name
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 C5226405D0
for <linux-wireless@vger.kernel.org>; Thu, 21 Dec 2023 09:41:23 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org
header.b="OOiKugYq"
Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5312C433C7;
Thu, 21 Dec 2023 09:41:22 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1703151683;
bh=4KB9cNfKyUtmstEW8ccP6ovy2zqVxJYT1eY1JmYfZcg=;
h=From:To:Cc:Subject:Date:From;
b=OOiKugYq0AEpmAk309FFVzvkuUnsOSvSyJoBPoESRrdpgEDm7w4lx+VUxdj+Jix7P
6ZTHxrhMvLkOFfKDXFtyilEJIDEyQr+S1f7jyH0/zwYVafd1w8cYKHxE7TmAP0nojz
g6tOmBfV86PANZEQX4WAIewpW9LZYVxuX6RGOnm9WOH4vIHeJnyB4BBDNblQIqIIUv
aslzZGLv+mlco3vOKOB6hYI1YmwmeFbPRpP6HY/Zz+TgdlTpq7IhnZQlq3b++2K9in
zcAyzXcbB7jyegeuSQtkRjxGTDksTjC5M/TJkLNb+nuBtC+AK8nH6b3qQTym6fKeXF
T9LWd8Tv1BvtA==
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: nbd@nbd.name
Cc: lorenzo.bianconi@redhat.com,
linux-wireless@vger.kernel.org,
sujuan.chen@mediatek.com
Subject: [PATCH] wifi: mt76: mt7996: fix fw loading timeout
Date: Thu, 21 Dec 2023 10:41:18 +0100
Message-ID:
<7c0df5b926c2fd6383cde8c9ee50b313443110ab.1703151499.git.lorenzo@kernel.org>
X-Mailer: git-send-email 2.43.0
Precedence: bulk
X-Mailing-List: linux-wireless@vger.kernel.org
List-Id: <linux-wireless.vger.kernel.org>
List-Subscribe: <mailto:linux-wireless+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:linux-wireless+unsubscribe@vger.kernel.org>
MIME-Version: 1.0

Fix the following firmware loading error due to a wrong dma register
configuration if wed is disabled.

[ 8.245881] mt7996e_hif 0001:01:00.0: assign IRQ: got 128
[ 8.251308] mt7996e_hif 0001:01:00.0: enabling device (0000 -> 0002)
[ 8.257674] mt7996e_hif 0001:01:00.0: enabling bus mastering
[ 8.263488] mt7996e 0000:01:00.0: assign IRQ: got 126
[ 8.268537] mt7996e 0000:01:00.0: enabling device (0000 -> 0002)
[ 8.274551] mt7996e 0000:01:00.0: enabling bus mastering
[ 28.648773] mt7996e 0000:01:00.0: Message 00000010 (seq 1) timeout
[ 28.654959] mt7996e 0000:01:00.0: Failed to get patch semaphore
[ 29.661033] mt7996e: probe of 0000:01:00.0 failed with error -11

Suggested-by: Sujuan Chen <sujuan.chen@mediatek.com>
Fixes: 4920a3a1285f ("wifi: mt76: mt7996: set DMA mask to 36 bits for boards with more than 4GB of RAM")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/wireless/mediatek/mt76/mt7996/dma.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

--- a/mt7996/dma.c
+++ b/mt7996/dma.c
@@ -237,7 +237,8 @@ void mt7996_dma_start(struct mt7996_dev
MT_WFDMA0_GLO_CFG_TX_DMA_EN |
MT_WFDMA0_GLO_CFG_RX_DMA_EN |
MT_WFDMA0_GLO_CFG_OMIT_TX_INFO |
- MT_WFDMA0_GLO_CFG_OMIT_RX_INFO_PFET2);
+ MT_WFDMA0_GLO_CFG_OMIT_RX_INFO_PFET2 |
+ MT_WFDMA0_GLO_CFG_EXT_EN);

if (dev->hif2)
mt76_set(dev, MT_WFDMA0_GLO_CFG + hif1_ofs,

0 comments on commit d117077

Please sign in to comment.