Skip to content

Commit

Permalink
ntb_hw_switchtec: Fix pff ioread to read into mmio_part_cfg_all
Browse files Browse the repository at this point in the history
[ Upstream commit 32c3d37 ]

Array mmio_part_cfg_all holds the partition configuration of all
partitions, with partition number as index. Fix this by reading into
mmio_part_cfg_all for pff.

Fixes: 0ee28f2 ("NTB: switchtec_ntb: Add link management")
Signed-off-by: Jeremy Pallotta <jmpallotta@gmail.com>
Signed-off-by: Kelvin Cao <kelvin.cao@microchip.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
jmpallotta authored and gregkh committed Mar 8, 2022
1 parent cd07b19 commit 377cbdc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/ntb/hw/mscc/ntb_hw_switchtec.c
Expand Up @@ -419,8 +419,8 @@ static void switchtec_ntb_part_link_speed(struct switchtec_ntb *sndev,
enum ntb_width *width)
{
struct switchtec_dev *stdev = sndev->stdev;

u32 pff = ioread32(&stdev->mmio_part_cfg[partition].vep_pff_inst_id);
u32 pff =
ioread32(&stdev->mmio_part_cfg_all[partition].vep_pff_inst_id);
u32 linksta = ioread32(&stdev->mmio_pff_csr[pff].pci_cap_region[13]);

if (speed)
Expand Down

0 comments on commit 377cbdc

Please sign in to comment.