Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4440881pxb; Tue, 26 Jan 2021 23:50:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJzb198f+3v8rssYDXsvuGGVkGvkg/n7LKjSZKaqixtOmBQcCxDApk/ekWJ/GgLfCPY4e+Em X-Received: by 2002:a17:906:1b41:: with SMTP id p1mr6318932ejg.162.1611733828299; Tue, 26 Jan 2021 23:50:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611733828; cv=none; d=google.com; s=arc-20160816; b=LGOOI/WiqcsV3Bt7QWOGxn7kC0S2b8+moTXqhiEWHTFBxydf2L9G2Yt8f3RsYgX1tj gGIyDNlaHfarG/xFHDo5Ma1XkTJaSngScjC+dzNoWAv72Yay97VczpWtvT1hg2u9d7O7 5xEt8Tsy3e2pRUavoA910PZGKISIl4+lZkmzRCKdqHEjUeL2uDQ19QZ9SOCygSnxrQIy jX0WdQUxZdqbncBerDk1ReT9ETkE2xleR7QQfmEzVT+qkbS5RJL9tNt0Ujr3Vp4bGoJJ RivAUZ+ubUIdb0YBqjEPCCKGtU3yg6H8f6ECPcXI8L8iGrQZ8EqGS+prDW99fhRe4sOC H7Dg== 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=pl5U39gNGMGFVAb+6880pjpv6BfX65mjLybUBU9CJ5M=; b=e1iEO3Ty3CEqWZMqM1XApmeBzayH9CW6p1IrxWKyGIoo+amqg8TJmwYFlTL56nlU/v EVSMQnbLP1CRCQ2rsZYEEzWRwcexOrYqlNEyhRHfO4zAvx8Nhv4g5Hggg1tVhH6MvMF+ mWEb0MDxDNz7kuPHAgJoSHzhLpMCEq6/dc7WMrX/uqg3qT7D2kiG7G3N/cjN69Ir+H+y urRPNQaa78pdapDtER4OV7ejYGvuiTtL9dFTlXDn+tUg6XP/LiCCWqCLcL7Z6NxhgE0D lkLRD6PwZ4jm8FMHSe+D7ZFrMpdNmGt85WmTy74U4bAN5IREnvfMYtUK/BzDxyZedQoS 3o8g== 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 q21si499306ejd.515.2021.01.26.23.50.04; Tue, 26 Jan 2021 23:50:28 -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 S238550AbhA0E7Y (ORCPT + 99 others); Tue, 26 Jan 2021 23:59:24 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:52801 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S238288AbhA0ELP (ORCPT ); Tue, 26 Jan 2021 23:11:15 -0500 X-UUID: 21ca6b9cdc7d48328250d14f7d2baa33-20210127 X-UUID: 21ca6b9cdc7d48328250d14f7d2baa33-20210127 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] 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 376623221; Wed, 27 Jan 2021 12:10:22 +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; Wed, 27 Jan 2021 12:10:19 +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; Wed, 27 Jan 2021 12:10:19 +0800 From: Ryder Lee To: Felix Fietkau , Lorenzo Bianconi CC: Shayne Chen , , , Ryder Lee , Zhiqiang Yang Subject: [PATCH] mt76: mt7915: only set PCIE_RECOGNITION_ID when using the second hif Date: Wed, 27 Jan 2021 12:10:18 +0800 Message-ID: <121208af32ad8850fe04feb6707f3fe2304d8353.1611720332.git.ryder.lee@mediatek.com> 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 To avoid connection issue on mt7622. Signed-off-by: Zhiqiang Yang Signed-off-by: Ryder Lee --- drivers/net/wireless/mediatek/mt76/mt7915/pci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/pci.c b/drivers/net/wireless/mediatek/mt76/mt7915/pci.c index 64ffffdc93c9..2cb7a6ff0ffd 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/pci.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/pci.c @@ -183,6 +183,8 @@ static void mt7915_pci_init_hif2(struct mt7915_dev *dev) return; dev->hif2 = hif; + dev->hif_idx = ++hif_idx; + mt76_wr(dev, MT_PCIE_RECOG_ID, dev->hif_idx | MT_PCIE_RECOG_ID_SEM); if (devm_request_irq(dev->mt76.dev, hif->irq, mt7915_irq_handler, IRQF_SHARED, KBUILD_MODNAME "-hif", dev)) { @@ -280,9 +282,6 @@ static int mt7915_pci_probe(struct pci_dev *pdev, if (ret) goto error; - dev->hif_idx = ++hif_idx; - mt76_wr(dev, MT_PCIE_RECOG_ID, dev->hif_idx | MT_PCIE_RECOG_ID_SEM); - mt7915_pci_init_hif2(dev); ret = mt7915_register_device(dev); -- 2.18.0