Skip to content

Commit d497b7e

Browse files
niklas88Vasily Gorbik
authored andcommitted
s390/pci: add error message on device number limit
The config option CONFIG_PCI_NR_FUNCTIONS sets a limit on the number of PCI functions we can support. Previously on reaching this limit there was no indication why newly attached devices are not recognized by Linux which could be quite confusing. Thus this patch adds a pr_err() for this case. Reviewed-by: Peter Oberparleiter <[email protected]> Signed-off-by: Niklas Schnelle <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
1 parent 794b884 commit d497b7e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/s390/pci/pci.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,8 @@ static int zpci_alloc_domain(struct zpci_dev *zdev)
673673
zdev->domain = find_first_zero_bit(zpci_domain, ZPCI_NR_DEVICES);
674674
if (zdev->domain == ZPCI_NR_DEVICES) {
675675
spin_unlock(&zpci_domain_lock);
676+
pr_err("Adding PCI function %08x failed because the configured limit of %d is reached\n",
677+
zdev->fid, ZPCI_NR_DEVICES);
676678
return -ENOSPC;
677679
}
678680
set_bit(zdev->domain, zpci_domain);

0 commit comments

Comments
 (0)