mirror of
https://github.com/torvalds/linux.git
synced 2026-09-11 20:13:02 +02:00
powerpc/pseries/pci: Fix misleading VF limit error message
When the number of requested VFs exceeds MAX_VFS_FOR_MAP_PE, the message prints that limit but labels it "Configurable VFs". Report the configurable VF limit and the PE mapping limit with separate error messages. Suggested-by: Christophe Leroy <chleroy@kernel.org> Signed-off-by: Jiangshan Yi <yijiangshan@kylinos.cn> Reviewed-by: Christophe Leroy <chleroy@kernel.org> [Maddy: Fixed Christophe's reviewed by tag] Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20260813063731.399598-1-yijiangshan@kylinos.cn
This commit is contained in:
parent
449f60f99f
commit
b1824233b1
|
|
@ -132,11 +132,14 @@ 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) {
|
||||
dev_err(&pdev->dev,
|
||||
"Num VFs %x > %x Configurable VFs\n",
|
||||
num_vfs, (num_vfs > MAX_VFS_FOR_MAP_PE) ?
|
||||
MAX_VFS_FOR_MAP_PE : max_config_vfs);
|
||||
if (max_config_vfs < num_vfs) {
|
||||
dev_err(&pdev->dev, "Num VFs %x > %x Configurable VFs\n",
|
||||
num_vfs, max_config_vfs);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (num_vfs > MAX_VFS_FOR_MAP_PE) {
|
||||
dev_err(&pdev->dev, "Num VFs %x > %x PE mapping limit\n",
|
||||
num_vfs, MAX_VFS_FOR_MAP_PE);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user