From: Niklas Schnelle Date: Thu, 28 Nov 2019 08:30:00 +0000 (+0100) Subject: s390/pci: add error message for UID collision X-Git-Tag: microblaze-v5.6-rc1~66^2~14 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=794b8846dcdc0c6e23bbf4e5283415cab0caa9ac;p=linux-2.6-microblaze.git s390/pci: add error message for UID collision When UID checking was turned off during runtime in the underlying hypervisor, a PCI device may be attached with the same UID. This is already detected but happens silently. Add an error message so it can more easily be understood why a device was not added. Reviewed-by: Peter Oberparleiter Signed-off-by: Niklas Schnelle Signed-off-by: Vasily Gorbik --- diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c index c7fea9bea8cb..4901f5d1c479 100644 --- a/arch/s390/pci/pci.c +++ b/arch/s390/pci/pci.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -659,6 +660,8 @@ static int zpci_alloc_domain(struct zpci_dev *zdev) spin_lock(&zpci_domain_lock); if (test_bit(zdev->domain, zpci_domain)) { spin_unlock(&zpci_domain_lock); + pr_err("Adding PCI function %08x failed because domain %04x is already assigned\n", + zdev->fid, zdev->domain); return -EEXIST; } set_bit(zdev->domain, zpci_domain);