powerpc/pseries: pci - logic bug
Subsystems (2)
PATCH 1/1 powerpc/pseries: pci - logic bug
The checks on num_vfs in pseries_pci_sriov_enable() are ANDed where OR was apparently intended. Change it to OR.
Fixes 9a7f6b438664 ("powerpc/pseries/pci: Associate PEs to VFs in configure SR-IOV")
Acked-by Nayna Jain <[email protected]>
Tested-by R Nageswara Sastry <[email protected]>
Cc [email protected] # 4.16
Signed-off-by George Wilson <[email protected]>
--- arch/powerpc/platforms/pseries/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/platforms/pseries/pci.c +1 -1
@@ -132,7 +132,7 @@ static int pseries_pci_sriov_enable(struct pci_dev *pdev, u16 num_vfs)/* First integer stores max config */ max_config_vfs =of_read_number (&max_vfs[0 ],1 ); -if (max_config_vfs < num_vfs && num_vfs >MAX_VFS_FOR_MAP_PE ) { +if (max_config_vfs < num_vfs || num_vfs >MAX_VFS_FOR_MAP_PE ) { dev_err(&pdev->dev, "Num VFs %x > %x Configurable VFs\n", num_vfs, (num_vfs > MAX_VFS_FOR_MAP_PE) ?
Signature · 1 line
2.47.3