Skip to content

Commit 794b884

Browse files
niklas88Vasily Gorbik
authored andcommitted
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 <[email protected]> Signed-off-by: Niklas Schnelle <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
1 parent 247f265 commit 794b884

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/s390/pci/pci.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <linux/seq_file.h>
2828
#include <linux/jump_label.h>
2929
#include <linux/pci.h>
30+
#include <linux/printk.h>
3031

3132
#include <asm/isc.h>
3233
#include <asm/airq.h>
@@ -659,6 +660,8 @@ static int zpci_alloc_domain(struct zpci_dev *zdev)
659660
spin_lock(&zpci_domain_lock);
660661
if (test_bit(zdev->domain, zpci_domain)) {
661662
spin_unlock(&zpci_domain_lock);
663+
pr_err("Adding PCI function %08x failed because domain %04x is already assigned\n",
664+
zdev->fid, zdev->domain);
662665
return -EEXIST;
663666
}
664667
set_bit(zdev->domain, zpci_domain);

0 commit comments

Comments
 (0)