Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1789672pxb; Fri, 26 Feb 2021 23:42:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJwa9JNtnmCBr99UGK5/CFVmFfBo5mPraGcrgnr2RlAuANxJzWtYkeMm7ITcQCDZW7ILBdya X-Received: by 2002:a17:906:3552:: with SMTP id s18mr7118650eja.497.1614411770779; Fri, 26 Feb 2021 23:42:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614411770; cv=none; d=google.com; s=arc-20160816; b=Jh0dX251GlGYY5EdDBaUoe+d5ca8jHWD9p+axhA5IsRjBr4BSdh5XngmA/hdpZn7d+ vNfDqYmFfM2uyrwV8/E2v0tVkbRdDRfOHJ1Ih8ShY/P53dQyfJqGJT1JnfOvRrE1gmP6 V6cSckp38BTeWvQe1QdYyDbiiy7P+mdCOuILeC2eg0jvkAHcW3423OVGC69Anz1oGA5a 5Qp32xRNxONjPYPoesWm1qqd46xbgHStwySC/uImFt2DkzyT9utnvqevd3YZ/LDJ1cf+ Gwffg1fHd+AfCZyoQi7eRsEuUW+L/ncBEE5IM+LlyDAco2mIILq0BzFZV7YFeOlLUdu/ rBhw== 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=UiEKjobMTSwLvXjIWfwyNe6TaSHttCezZat1Z1XO6w8=; b=JrGnjaqYXZHKThGNwgsJsXJ+aKU9/C56D7OQJ/37JhrHasTV5tkCRsrHNZoqbhNb6O Ur9PL9oL/Hoc9aljyC11/xGBgi61SNvqSw91Exgl7YRUjQKj5tq+lRNXpBfYs2fhVhQM /FQ3XADqk7LuzLbBOS7ziZZGQZe1YNyOxwDgCOzFcvWvVOK4PVjf3l1rSM69EzcL1DGA 2wPokjUgPhcmQdl4pzH+xKO5ksSxDNBBQOjReGX9nH7/NP0SeUT3b9puqytqjONSHmyL qp2c4yT5e7Hkoe9G+PilhRamp9Tt7Qp8KK+FL0T74mk6qSBG8DUcpb6MNburvQqs2X5n Vr8w== 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 u21si5452448ejt.396.2021.02.26.23.42.14; Fri, 26 Feb 2021 23:42:50 -0800 (PST) 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 S229915AbhB0HlO (ORCPT + 99 others); Sat, 27 Feb 2021 02:41:14 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:58077 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S229849AbhB0HlN (ORCPT ); Sat, 27 Feb 2021 02:41:13 -0500 X-UUID: e4d99241a3a14e83b92c10887fa4eadc-20210227 X-UUID: e4d99241a3a14e83b92c10887fa4eadc-20210227 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 1093846120; Sat, 27 Feb 2021 15:40:31 +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; Sat, 27 Feb 2021 15:40:24 +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; Sat, 27 Feb 2021 15:40:24 +0800 From: Ryder Lee To: Felix Fietkau , Lorenzo Bianconi CC: Shayne Chen , , , Ryder Lee Subject: [PATCH 4/5] mt76: mt7915: stop ext_phy queue when mac reset happens Date: Sat, 27 Feb 2021 15:39:45 +0800 Message-ID: <20a4b03ba4a347a76df67291680704dfdb7da5d6.1614411256.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Stop Tx burst for ext_phy after mac reset. Signed-off-by: Ryder Lee --- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c index 6b6ea33bd320..c653cd01b8d8 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c @@ -1607,9 +1607,10 @@ void mt7915_mac_reset_work(struct work_struct *work) set_bit(MT76_MCU_RESET, &dev->mphy.state); wake_up(&dev->mt76.mcu.wait); cancel_delayed_work_sync(&dev->mphy.mac_work); - if (phy2) + if (phy2) { + set_bit(MT76_RESET, &phy2->mt76->state); cancel_delayed_work_sync(&phy2->mt76->mac_work); - + } /* lock/unlock all queues to ensure that no tx is pending */ mt76_txq_schedule_all(&dev->mphy); if (ext_phy) @@ -1637,6 +1638,8 @@ void mt7915_mac_reset_work(struct work_struct *work) clear_bit(MT76_MCU_RESET, &dev->mphy.state); clear_bit(MT76_RESET, &dev->mphy.state); + if (phy2) + clear_bit(MT76_RESET, &phy2->mt76->state); mt76_worker_enable(&dev->mt76.tx_worker); napi_enable(&dev->mt76.tx_napi); -- 2.18.0