Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2466308pxb; Tue, 13 Apr 2021 02:34:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWF5egEYfVMdDC8pZLxX7euPqbf9Fw72Irm2oWsji3wzINtCyTyqfLNxj7XFCPEmdbHAL3 X-Received: by 2002:a17:903:114:b029:eb:3963:9d1a with SMTP id y20-20020a1709030114b02900eb39639d1amr506429plc.79.1618306495812; Tue, 13 Apr 2021 02:34:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618306495; cv=none; d=google.com; s=arc-20160816; b=kMD5RynOnrcIjSgaj7N8fp1RgJW9XAKvHZSTHqSO08brMM4nHne2Zd6P0sQVm1lzIN 5O0nBxeFgUG6zB1b8zJqWT892VRRW9LIpp+8ciPGZxcnycXMIj+4lQ89mNStT9nW/xqG PHAYPAkwZGatxFsQo0pK+ojvQv++1D/0Ezb4f/ugnVGswVSqj+VBtUBqlwkAutuKQr/t WajrKg3G+GpS0wUF9weHLNFHucS0BEeBX3AS12CLJ/9ARxJfspOAcIwGTwRqTEQWe3r+ qyIHTpLUrK4vI9E/uWf6GA4beCwpJmWgvdNVW0asG2ySgm6JAgolvN8bl4Vcq1kNN3G6 LM9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=EUsS/Y4dwVEv+qXerS3Un85FzJG9/RJC6rwATWINQQE=; b=B4yr+7cz1U4m54RhcNYNHRLEw037gVGuIQ3OO+MjNgANI8NXhoFO6Ap83s1PKi8VuG pPv3rq5lr+GYhYe08epUQNTvyIj5rh8owIUc4wj5wdmM2kJeoc+6Zyh65mqF4x9Yd5D7 t0wrp2T4yHoxBBTydrQz5V1Qgr0cmZPuoqLyETA45PWBN+0f9vFGkQIy4lm1RwG+bBes BakXXcUKZ8Xov3RfLmDFqH5lpNCz3GyTBLIPAiADeLcZiicyzjXc731+lo2fz4D+YfbE aRLszSEGhVzIasLqWwmz2fI+73IyRjX+Zrbq5N61QVlX16tdGnDMzUCAE+kWyhIIt+Og b/NQ== 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 x12si15145543pla.150.2021.04.13.02.34.42; Tue, 13 Apr 2021 02:34:55 -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 S239816AbhDMIAf (ORCPT + 99 others); Tue, 13 Apr 2021 04:00:35 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:45725 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S230271AbhDMIAd (ORCPT ); Tue, 13 Apr 2021 04:00:33 -0400 X-UUID: a70d75a4288f4ef6989e2bce33a09400-20210413 X-UUID: a70d75a4288f4ef6989e2bce33a09400-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 731366077; Tue, 13 Apr 2021 16:00:10 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 13 Apr 2021 16:00:09 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 13 Apr 2021 16:00:09 +0800 From: Ryder Lee To: Felix Fietkau , Lorenzo Bianconi CC: Shayne Chen , , , Ryder Lee Subject: [PATCH v2 1/2] mt76: mt7615: only free skbs after mt7615_dma_reset() when reset happens Date: Tue, 13 Apr 2021 16:00:06 +0800 Message-ID: X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org In mt7615_mac_reset_work(), make sure freeing skbs after mt7615_dma_reset(). Signed-off-by: Ryder Lee --- changes since v2: - split v1 into two patches - remove original mt7615_tx_token_put. --- drivers/net/wireless/mediatek/mt76/mt7615/pci_mac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/pci_mac.c b/drivers/net/wireless/mediatek/mt76/mt7615/pci_mac.c index 7694391603dd..baaf734c6950 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/pci_mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/pci_mac.c @@ -304,12 +304,12 @@ void mt7615_mac_reset_work(struct work_struct *work) mt7615_hif_int_event_trigger(dev, MT_MCU_INT_EVENT_PDMA_STOPPED); - mt7615_tx_token_put(dev); - idr_init(&dev->token); - if (mt7615_wait_reset_state(dev, MT_MCU_CMD_RESET_DONE)) { mt7615_dma_reset(dev); + mt7615_tx_token_put(dev); + idr_init(&dev->token); + mt76_wr(dev, MT_WPDMA_MEM_RNG_ERR, 0); mt7615_hif_int_event_trigger(dev, MT_MCU_INT_EVENT_PDMA_INIT); -- 2.18.0