aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorNiklas Schnelle <schnelle@linux.ibm.com>2019-11-28 09:31:52 +0100
committerVasily Gorbik <gor@linux.ibm.com>2019-11-30 10:52:46 +0100
commitd497b7ec836d2c900993f1c43b2ddff5f8a6b129 (patch)
treec4396df9b9386e3e80c403b91cb445ca10800030 /arch
parents390/pci: add error message for UID collision (diff)
downloadlinux-dev-d497b7ec836d2c900993f1c43b2ddff5f8a6b129.tar.xz
linux-dev-d497b7ec836d2c900993f1c43b2ddff5f8a6b129.zip
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 <oberpar@linux.ibm.com> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/s390/pci/pci.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c
index 4901f5d1c479..2e377f2b7b6d 100644
--- a/arch/s390/pci/pci.c
+++ b/arch/s390/pci/pci.c
@@ -673,6 +673,8 @@ static int zpci_alloc_domain(struct zpci_dev *zdev)
zdev->domain = find_first_zero_bit(zpci_domain, ZPCI_NR_DEVICES);
if (zdev->domain == ZPCI_NR_DEVICES) {
spin_unlock(&zpci_domain_lock);
+ pr_err("Adding PCI function %08x failed because the configured limit of %d is reached\n",
+ zdev->fid, ZPCI_NR_DEVICES);
return -ENOSPC;
}
set_bit(zdev->domain, zpci_domain);