summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorSergio Paracuellos <sergio.paracuellos@gmail.com>2020-04-13 17:50:17 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-16 12:33:02 +0200
commitcddc585ec92c074025d2d76bc0f6ec120e44fe8a (patch)
tree01d53c52444b52818f5188a118bff68ac6459c39 /drivers/staging
parent535bd126d65364b51d9bdeccf584979b7ff1ded3 (diff)
downloadlinux-cddc585ec92c074025d2d76bc0f6ec120e44fe8a.tar.bz2
staging: mt7621-pci: add clarification comment in 'mt7621_pcie_init_virtual_bridges'
Add a comment explaining a bit what is going on in this function. It would be helfulp for other people for a better understanding of the code. Suggested-by: NeilBrown <neil@brown.name> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20200413155018.31921-2-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/mt7621-pci/pci-mt7621.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c
index 6a9f4b6cdd93..eede8d9268ac 100644
--- a/drivers/staging/mt7621-pci/pci-mt7621.c
+++ b/drivers/staging/mt7621-pci/pci-mt7621.c
@@ -622,6 +622,11 @@ static int mt7621_pcie_init_virtual_bridges(struct mt7621_pcie *pcie)
if (pcie_link_status == 0)
return -1;
+ /*
+ * Assign device numbers from zero to the enabled ports,
+ * then assigning remaining device numbers to any disabled
+ * ports.
+ */
n = 0;
for (i = 0; i < PCIE_P2P_CNT; i++)
if (pcie_link_status & BIT(i))