mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: mt7915: avoid writes to MT_PCIE_RECOG_ID when not using gen1 devices
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
+6
-3
@@ -158,6 +158,12 @@ static void mt7915_pci_init_hif2(struct mt7915_dev *dev)
|
||||
{
|
||||
struct mt7915_hif *hif;
|
||||
|
||||
dev->hif_idx = ++hif_idx;
|
||||
if (!pci_get_device(PCI_VENDOR_ID_MEDIATEK, 0x7916, NULL))
|
||||
return;
|
||||
|
||||
mt76_wr(dev, MT_PCIE_RECOG_ID, dev->hif_idx | MT_PCIE_RECOG_ID_SEM);
|
||||
|
||||
hif = mt7915_pci_get_hif2(dev);
|
||||
if (!hif)
|
||||
return;
|
||||
@@ -258,9 +264,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);
|
||||
|
||||
Reference in New Issue
Block a user