Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3026719pxj; Mon, 17 May 2021 15:55:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYcOMkLJa0m4+XPIVfFYzFEyDq8CpMBThU/G8aZ2TaLNmDKiU1LE0TPv8haOoMAsR+1Hww X-Received: by 2002:a05:6e02:1bc3:: with SMTP id x3mr1662478ilv.47.1621292154251; Mon, 17 May 2021 15:55:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621292154; cv=none; d=google.com; s=arc-20160816; b=BDE69Tb7RbIjYb+uuLk4saBI7PZGTXqS3F6u1l6LDebCnSOKsBWdZEsmDygNaYVgqu 3XUUmustik7hdqnJ2c0owxcCZQON5GAij9Y7YR5RhS9Ds0NEvIK4UZUTx1/rYeEsdjIy iCHwNqUYToF28V7j3QI74GwzZaYXVE1vpkbGp5HIMCC7XwrfMwBoROOafkNh8OFSAH0A BPGYOGYXNt9IzTkkqBBp1acsN0vv6X1gta9wvsFOln3LUlwWwXrqcANEXcdrRdUGODNu uGpS87iM+PXKWbTuO+sjG7IW9iQkJD/S3XRdyYmKTbeLeTyGbnSuojp8CL4HGRshCrm4 KQ9w== 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=V5RXpg0w1ToDQZdR/KmdQfAO3+SLFSGvzjllH4a6x9A=; b=eIZkp4yP+kkuDhxSIoUTKp5l9dHnyeOxsFuGL6W1e9jHnLLz7enoy2aih8wJCVhNt8 FlOp8x0XM9P4uB/lvUyCwPZmFI9zfj09kA65Ddg7XnXDTOm5K3oO+mEfR/AX1xlPMVbZ dTEZXd7FhQB2DHUFT/Gv/QWZYj9TN9MptImoFBtVdXT3YCiqTEkBYiSjFcawQ8FfrUat 53D2d79RzXrusJS3B3xzGoBmdzOgPlWjC2alHdGlCjBotRcsor0FSygDoy+vjWNhqjol w+vb3Xm/bGyg5GlcX0QSRI+zHh88WaVZ+a7kzgLtOgf4pQOc/0U0N5KE6lfvN77g/oOR a8Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rJxUcxbo; 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 u10si6555783jad.109.2021.05.17.15.55.41; Mon, 17 May 2021 15:55:54 -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=rJxUcxbo; 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 S238747AbhEQOSP (ORCPT + 99 others); Mon, 17 May 2021 10:18:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:49306 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238440AbhEQOPs (ORCPT ); Mon, 17 May 2021 10:15:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A962A613EA; Mon, 17 May 2021 14:09:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621260566; bh=WxiO4EXeA5EqQoSx5olH+tfFxfI2Xf4bWODHUl7UKeY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rJxUcxboN452BhznbM82X0b8kDAjcXC6x/PVbphL9BPPg02qIoYrdigwWpzvy8STA LpO89lkf9nToXOPr38ZQttKzm44qM6dxAzYP+vH98tC6VRyPwYBp2bR2T9BQdhGZDY gL8J2Mdmc9lCEc5O+XYjGLawXfNkjlZjIGZnmPug= 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.12 105/363] mt76: mt7615: fix entering driver-own state on mt7663 Date: Mon, 17 May 2021 15:59:31 +0200 Message-Id: <20210517140306.161528213@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.508966430@linuxfoundation.org> References: <20210517140302.508966430@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 4ecbd5406e2a..198e9025b681 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c @@ -291,12 +291,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