All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ryder Lee <ryder.lee@mediatek.com>
To: Felix Fietkau <nbd@nbd.name>,
	Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Cc: Shayne Chen <shayne.chen@mediatek.com>,
	<linux-wireless@vger.kernel.org>,
	<linux-mediatek@lists.infradead.org>,
	Ryder Lee <ryder.lee@mediatek.com>,
	Zhiqiang Yang <zhiqiang.yang@mediatek.com>
Subject: [PATCH] mt76: mt7915: only set PCIE_RECOGNITION_ID when using the second hif
Date: Wed, 27 Jan 2021 12:10:18 +0800	[thread overview]
Message-ID: <121208af32ad8850fe04feb6707f3fe2304d8353.1611720332.git.ryder.lee@mediatek.com> (raw)

To avoid connection issue on mt7622.

Signed-off-by: Zhiqiang Yang <zhiqiang.yang@mediatek.com>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
---
 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


WARNING: multiple messages have this Message-ID (diff)
From: Ryder Lee <ryder.lee@mediatek.com>
To: Felix Fietkau <nbd@nbd.name>,
	Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Cc: linux-mediatek@lists.infradead.org,
	Zhiqiang Yang <zhiqiang.yang@mediatek.com>,
	Ryder Lee <ryder.lee@mediatek.com>,
	linux-wireless@vger.kernel.org,
	Shayne Chen <shayne.chen@mediatek.com>
Subject: [PATCH] mt76: mt7915: only set PCIE_RECOGNITION_ID when using the second hif
Date: Wed, 27 Jan 2021 12:10:18 +0800	[thread overview]
Message-ID: <121208af32ad8850fe04feb6707f3fe2304d8353.1611720332.git.ryder.lee@mediatek.com> (raw)

To avoid connection issue on mt7622.

Signed-off-by: Zhiqiang Yang <zhiqiang.yang@mediatek.com>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
---
 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
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

             reply	other threads:[~2021-01-27  4:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-27  4:10 Ryder Lee [this message]
2021-01-27  4:10 ` [PATCH] mt76: mt7915: only set PCIE_RECOGNITION_ID when using the second hif Ryder Lee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=121208af32ad8850fe04feb6707f3fe2304d8353.1611720332.git.ryder.lee@mediatek.com \
    --to=ryder.lee@mediatek.com \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=nbd@nbd.name \
    --cc=shayne.chen@mediatek.com \
    --cc=zhiqiang.yang@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.