ramips: 5.10: copy patches from 5.4
[openwrt/staging/rmilecki.git] / target / linux / ramips / patches-5.10 / 0108-staging-mt7621-pci-fix-register-to-set-up-virtual-br.patch
1 From 0a3085ae142d8f5cf905b104bc66db3721a2fa33 Mon Sep 17 00:00:00 2001
2 From: Sergio Paracuellos <sergio.paracuellos@gmail.com>
3 Date: Thu, 19 Mar 2020 10:57:33 +0100
4 Subject: [PATCH] staging: mt7621-pci: fix register to set up virtual bridges
5
6 Instead of being using PCI Configuration and Status Register to
7 set up virtual bridges we are using CONFIG_ADDR Register which is
8 wrong. Hence, set the correct value.
9
10 Fixes: 9a5e71a68d20 ("staging: mt7621-pci: simplify 'mt7621_pcie_init_virtual_bridges' function")
11 Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
12 Link: https://lore.kernel.org/r/20200319095733.1557-1-sergio.paracuellos@gmail.com
13 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
14 ---
15 drivers/staging/mt7621-pci/pci-mt7621.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18 --- a/drivers/staging/mt7621-pci/pci-mt7621.c
19 +++ b/drivers/staging/mt7621-pci/pci-mt7621.c
20 @@ -603,7 +603,7 @@ static int mt7621_pcie_init_virtual_brid
21 if ((pcie_link_status & BIT(i)) == 0)
22 p2p_br_devnum[i] = n++;
23
24 - pcie_rmw(pcie, RALINK_PCI_CONFIG_ADDR,
25 + pcie_rmw(pcie, RALINK_PCI_PCICFG_ADDR,
26 PCIE_P2P_BR_DEVNUM_MASK_FULL,
27 (p2p_br_devnum[0] << PCIE_P2P_BR_DEVNUM0_SHIFT) |
28 (p2p_br_devnum[1] << PCIE_P2P_BR_DEVNUM1_SHIFT) |