From patchwork Sun May 23 21:10:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 446378 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 708A3C47082 for ; Sun, 23 May 2021 21:10:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 549C261166 for ; Sun, 23 May 2021 21:10:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231967AbhEWVLt (ORCPT ); Sun, 23 May 2021 17:11:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:47522 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231956AbhEWVLr (ORCPT ); Sun, 23 May 2021 17:11:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7EC046115C; Sun, 23 May 2021 21:10:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621804220; bh=Ke6C6FSUZPvNm8d+fgoJ9SxaMboKfwRiskany4b9b28=; h=From:To:Cc:Subject:Date:From; b=D9DtP2+jWfiA1e87KVa/BOSU1nfK3B/z0p+AgZrpdpgv7u6rsEMaEB4Ab2/IUUfqZ jNtbdOGOfFMP9f6la8MpFMfHNRLkTN3siJHg346OexcMLI3A/huqqkAaHBkIG/XnO9 2heprUEXTx4VFK7GtUgUcIoEbY7kkMWHYLIr/xqVpwWvn//jr5qA5LFsvtTckISXlc OaKAAjYq7HjVjv4HFcXTFHW3KuqOi8OQMm1sk7IWuYAqX+8tgtTFyzmGvhXLQCU2C4 gPWaUZ2cfCDbiZCCHDSgTDV9fbubIgzVwtvUbPNUPENm+eDmvI1XcxPmxthbV5KyQC GLbJnv/Fj8CfA== From: Lorenzo Bianconi To: nbd@nbd.name Cc: lorenzo.bianconi@redhat.com, linux-wireless@vger.kernel.org, sean.wang@mediatek.com Subject: [PATCH] mt76: mt7921: reset wfsys during hw probe Date: Sun, 23 May 2021 23:10:12 +0200 Message-Id: <95460c02cce327d43337afc72c431757fb42ecb5.1621804119.git.lorenzo@kernel.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This patch fixes a mcu hang during device probe on Marvell ESPRESSObin after a hot reboot. Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt7921/dma.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/dma.c b/drivers/net/wireless/mediatek/mt76/mt7921/dma.c index bd9143dc865f..7fca7dc466b8 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/dma.c +++ b/drivers/net/wireless/mediatek/mt76/mt7921/dma.c @@ -402,6 +402,10 @@ int mt7921_dma_init(struct mt7921_dev *dev) if (ret) return ret; + ret = mt7921_wfsys_reset(dev); + if (ret) + return ret; + /* init tx queue */ ret = mt7921_init_tx_queues(&dev->phy, MT7921_TXQ_BAND0, MT7921_TX_RING_SIZE);