Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2459018pxb; Tue, 13 Apr 2021 02:21:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMrz81s3GlhdWPMHzDYlDtKVK+FKj097tCxpj4UawgFy6kbqTKXN5NeEfMOACmEIOENuRJ X-Received: by 2002:a63:6c83:: with SMTP id h125mr22780009pgc.50.1618305682900; Tue, 13 Apr 2021 02:21:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618305682; cv=none; d=google.com; s=arc-20160816; b=CvaE8bLXlDq7z86M4jq/FSdl9N54JDkw7gKgPzLOa7uQAHUiDKiz5xeQ0WL8n1U1ND WYRBa6ylWudsaV5y5aALejZ4ehDYovGD8vYp6YaL1Tv1pw8f9Jl4Kc9mYTgsfBThy3wb /+1m+gKTzzWsZLY04sAI65MMNLApf24y5U2cPTYBZm1jzW/uADpH4Mjrrhg5TPmvSMD8 tjrTzJeE0KAWL82kZhPSRJatJPU/9kOEgDvoE2Epi8xZDspJCXwZHsA46BxG3Qe8w5TE nvzRmwPYcJwoDGzs2W2xhVP4ix+7mkLf8ri8MZjcBxiFshWwZ/4aCk63bdQMdt4IFs+i 5uow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=m5zoIayrY3V7dDk23d0je6jFwO8MVGB0BhRh1zn3v4U=; b=dTw7a6RG0+Er58l7O0GEcV5fNJWxUCsWr5utdQm4eeRE/n7BBofWHTS4QYi1xGwD+6 pZK/y3qiJvP7S0ljuxwgISdvzOiBZ8hy1rXVNPn3br9pwBL1KQTDd3gZa16CCtMzTTwZ fOa9+hoZH27vWof/JrPeWlag1SvrvSo2J6u+6wqBuBNSsONHRI6c8PpqHkumZEVPLFw8 WFot6vpAHS9n2OEkGcCp84rLErwnqZK/hFA0pdAdjhquVK6bkbejlWAf2DPVqZhpnB9D D9ptmYaDsA9ngeVLgd5RD7yKk6KSiP82eIhWXUOty1bA6CbGIvGfJKWVOZp4iaDBvlQt toiA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e24si18311364pga.369.2021.04.13.02.21.08; Tue, 13 Apr 2021 02:21:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238878AbhDMH07 (ORCPT + 99 others); Tue, 13 Apr 2021 03:26:59 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:49424 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S230446AbhDMH0x (ORCPT ); Tue, 13 Apr 2021 03:26:53 -0400 X-UUID: dc8304c882da4c8ba8b66eb16e0725ad-20210413 X-UUID: dc8304c882da4c8ba8b66eb16e0725ad-20210413 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1425415315; Tue, 13 Apr 2021 15:26:27 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 13 Apr 2021 15:26:25 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 13 Apr 2021 15:26:25 +0800 From: Ryder Lee To: Felix Fietkau , Lorenzo Bianconi CC: Shayne Chen , , , Ryder Lee Subject: [PATCH 2/2] mt76: mt7915: only free skbs after mt7915_dma_reset() when reset happens Date: Tue, 13 Apr 2021 15:26:20 +0800 Message-ID: <6f531ab347f2c95ccc979b905e1882811dbf88fe.1618297567.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <1fc26bda42fcd85b4bcebc8520601c70b882aa34.1618297567.git.ryder.lee@mediatek.com> References: <1fc26bda42fcd85b4bcebc8520601c70b882aa34.1618297567.git.ryder.lee@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 0FBF8B1C5867ACE187B03BCE64CBA3125AD649F31450D63B2D80902F88F920552000:8 X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org In mt7915_mac_reset_work(), make sure freeing skbs after mt7915_dma_reset(). Signed-off-by: Ryder Lee --- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c index e61dfe966f0a..423f1b9202ce 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c @@ -1627,12 +1627,12 @@ void mt7915_mac_reset_work(struct work_struct *work) mt76_wr(dev, MT_MCU_INT_EVENT, MT_MCU_INT_EVENT_DMA_STOPPED); - mt7915_tx_token_put(dev); - idr_init(&dev->token); - if (mt7915_wait_reset_state(dev, MT_MCU_CMD_RESET_DONE)) { mt7915_dma_reset(dev); + mt7915_tx_token_put(dev); + idr_init(&dev->token); + mt76_wr(dev, MT_MCU_INT_EVENT, MT_MCU_INT_EVENT_DMA_INIT); mt7915_wait_reset_state(dev, MT_MCU_CMD_RECOVERY_DONE); } -- 2.18.0