Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp347169pxj; Tue, 18 May 2021 04:54:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9OPigDLULdglpkbrqEyCEd0s+cInDrw0a9J50vDqoKusXJNMxkbGgtvu2r8orjDFPNaWR X-Received: by 2002:a05:6402:12d3:: with SMTP id k19mr6538657edx.52.1621338896698; Tue, 18 May 2021 04:54:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621338896; cv=none; d=google.com; s=arc-20160816; b=NEQf+nKtUoZ0sWMF/QqZ4ba5jBvHDhQgZfmA0cHUTbka+MGKDKqGPy0gi9QNb7vHnJ wdNlcPRNOEy8cd8CyqvkDhi/OBHrTpvLCUrl4oQIGNole4JPb72KnyKexvmhMsVgoSNy feiLSWhBnT0scyEIkcCfdN6smsyXxKg538rP+7RZ/yzqz4d0PTrXcqV/VIfCCqRN3tCE bSflTwFa6fFyu0tbjbRlyMBP62xMvCQzWhjwIIsNKyxN+1fq10B3dU/sXIPMlEycVr+a IBNIqmBXPCKJU2r8mtFnE9diCGTQAxdhGFZCGF8TlecaC720RN1KPrtxSAaNIuEmM16w YvLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VQoO3oCApZ3pKKm/W6X/a8FrJWlV1CnhnDGiQRRBacw=; b=WgVG4RMnx+/vSZQUqfSpY/cPHvPErcIX0+VCbZsgvvV+Y3gSYbEiRxlH8eKx8iFWbF XH1fZdP32c3ZCS/fJs/5cJi3iyXE/D+SLtKx7REGZb9+wz8JQTEmQ5gczsMDWXuGHnaQ GOB0MV00XB9uX4NhCLw6NR+w2gkXu/QsmQEdN82MQqxlpEhQg62Yal9cAfkfibvN8ypX r9XjwUErW2G+ksXj7atTtE5Fp3ayKL4NOtTy15RZ1utjugSshs3v8q2Eui6yO/nDkDJ0 V4t6X5s0Qdy4xiRd2dV7qR9Dg8pGPyz3nMbxm8bBkLUw9uFY8YA69jAePUT5rQc3+7+f MyHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Uq8yhQX+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w15si6397232eju.724.2021.05.18.04.54.22; Tue, 18 May 2021 04:54:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Uq8yhQX+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245190AbhEQPZB (ORCPT + 99 others); Mon, 17 May 2021 11:25:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:39776 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241488AbhEQPLO (ORCPT ); Mon, 17 May 2021 11:11:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D2C3D616ED; Mon, 17 May 2021 14:30:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621261853; bh=VWFWm5cUN1jSxsItT/U9HhoMnGvxh07KV69SrLyK5ns=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Uq8yhQX+CmWgKgJz6DErVQbdEuSXu3FdRlaTrzE8zsYoOrmCoNUkd8Xuq4p36HWfJ cE44i0eE5PAXyUkgRDrCyVfQiDBExS5cEO2KtIDCW6Sky2IQjFrL/53pg3xlbf7HI0 rzBZTsTS8w3idZZFsZrBwE2a/3dPhlxqCEpZ8BeI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Felix Fietkau , Sasha Levin Subject: [PATCH 5.10 076/289] mt76: mt7615: fix entering driver-own state on mt7663 Date: Mon, 17 May 2021 16:00:01 +0200 Message-Id: <20210517140307.753984717@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140305.140529752@linuxfoundation.org> References: <20210517140305.140529752@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Felix Fietkau [ Upstream commit 5c7d374444afdeb9dd534a37c4f6c13af032da0c ] Fixes hardware wakeup issues Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin --- drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c index c31036f57aef..62a971660da7 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c @@ -341,12 +341,20 @@ static int mt7615_mcu_drv_pmctrl(struct mt7615_dev *dev) u32 addr; int err; - addr = is_mt7663(mdev) ? MT_PCIE_DOORBELL_PUSH : MT_CFG_LPCR_HOST; + if (is_mt7663(mdev)) { + /* Clear firmware own via N9 eint */ + mt76_wr(dev, MT_PCIE_DOORBELL_PUSH, MT_CFG_LPCR_HOST_DRV_OWN); + mt76_poll(dev, MT_CONN_ON_MISC, MT_CFG_LPCR_HOST_FW_OWN, 0, 3000); + + addr = MT_CONN_HIF_ON_LPCTL; + } else { + addr = MT_CFG_LPCR_HOST; + } + mt76_wr(dev, addr, MT_CFG_LPCR_HOST_DRV_OWN); mt7622_trigger_hif_int(dev, true); - addr = is_mt7663(mdev) ? MT_CONN_HIF_ON_LPCTL : MT_CFG_LPCR_HOST; err = !mt76_poll_msec(dev, addr, MT_CFG_LPCR_HOST_FW_OWN, 0, 3000); mt7622_trigger_hif_int(dev, false); -- 2.30.2