The pff ioread32 currently is:
u32 pff = ioread32(&stdev->mmio_part_cfg[partition].vep_pff_inst_id);
but it should be:
u32 pff = ioread32(&stdev->mmio_part_cfg_all[partition].vep_pff_inst_id);
Since the partition index is provided as an argument, the index should apply to the base of the partition config registers (mmio_part_cfg_all), not the self_partition offset (mmio_part_cfg). This line of code caused an issue when we had 3 partitions and the 3rd partition returned an invalid pff (0xFFFFFFFF).
Also, the code should verify that pff is a valid index. I suggest the following.
The pff ioread32 currently is: u32 pff = ioread32(&stdev->mmio_part_cfg[partition].vep_pff_inst_id);
but it should be: u32 pff = ioread32(&stdev->mmio_part_cfg_all[partition].vep_pff_inst_id);
Since the partition index is provided as an argument, the index should apply to the base of the partition config registers (mmio_part_cfg_all), not the self_partition offset (mmio_part_cfg). This line of code caused an issue when we had 3 partitions and the 3rd partition returned an invalid pff (0xFFFFFFFF).
Also, the code should verify that pff is a valid index. I suggest the following.