diff options
author | Kelvin Cao <[email protected]> | 2021-10-14 14:18:57 +0000 |
---|---|---|
committer | Bjorn Helgaas <[email protected]> | 2021-10-14 09:22:47 -0500 |
commit | 1420ac218abcc1df809eedfb0f7351941b01c785 (patch) | |
tree | f0fffb8eda32909f30295592d94b222ada161eb9 | |
parent | 551ec658b69807318aeef5506da886cf9587b251 (diff) |
PCI/switchtec: Update the way of getting management VEP instance ID
Gen4 firmware adds DMA VEP and NVMe VEP support in VEP (virtual EP)
instance ID register in addtion to management EP, update the way of
getting management VEP instance ID.
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Kelvin Cao <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
-rw-r--r-- | drivers/pci/switch/switchtec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c index 5c300ff3921d..97a93c9b4629 100644 --- a/drivers/pci/switch/switchtec.c +++ b/drivers/pci/switch/switchtec.c @@ -1133,7 +1133,7 @@ static int ioctl_pff_to_port(struct switchtec_dev *stdev, break; } - reg = ioread32(&pcfg->vep_pff_inst_id); + reg = ioread32(&pcfg->vep_pff_inst_id) & 0xFF; if (reg == p.pff) { p.port = SWITCHTEC_IOCTL_PFF_VEP; break; @@ -1179,7 +1179,7 @@ static int ioctl_port_to_pff(struct switchtec_dev *stdev, p.pff = ioread32(&pcfg->usp_pff_inst_id); break; case SWITCHTEC_IOCTL_PFF_VEP: - p.pff = ioread32(&pcfg->vep_pff_inst_id); + p.pff = ioread32(&pcfg->vep_pff_inst_id) & 0xFF; break; default: if (p.port > ARRAY_SIZE(pcfg->dsp_pff_inst_id)) @@ -1553,7 +1553,7 @@ static void init_pff(struct switchtec_dev *stdev) if (reg < stdev->pff_csr_count) stdev->pff_local[reg] = 1; - reg = ioread32(&pcfg->vep_pff_inst_id); + reg = ioread32(&pcfg->vep_pff_inst_id) & 0xFF; if (reg < stdev->pff_csr_count) stdev->pff_local[reg] = 1; |