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 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 ; 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 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: List-Subscribe: List-Unsubscribe: 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" Fixes: 4920a3a1285f ("wifi: mt76: mt7996: set DMA mask to 36 bits for boards with more than 4GB of RAM") Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt7996/dma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/dma.c b/drivers/net/wireless/mediatek/mt76/mt7996/dma.c index 885ddf2c0d01..73e633d0d700 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7996/dma.c +++ b/drivers/net/wireless/mediatek/mt76/mt7996/dma.c @@ -237,7 +237,8 @@ void mt7996_dma_start(struct mt7996_dev *dev, bool reset, bool wed_reset) 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,