Skip to content

Commit 663544b

Browse files
committed
Merge branch 'pci/controller/vmd'
- Fix disable of bridge windows during domain reset; previously we cleared the base/limit registers, which left the windows enabled (Nirmal Patel) * pci/controller/vmd: PCI: vmd: Disable bridge window for domain reset
2 parents 5ffe43c + f73eedc commit 663544b

File tree

1 file changed

+17
-2
lines changed
  • drivers/pci/controller

1 file changed

+17
-2
lines changed

drivers/pci/controller/vmd.c

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,8 +541,23 @@ static void vmd_domain_reset(struct vmd_dev *vmd)
541541
PCI_CLASS_BRIDGE_PCI))
542542
continue;
543543

544-
memset_io(base + PCI_IO_BASE, 0,
545-
PCI_ROM_ADDRESS1 - PCI_IO_BASE);
544+
/*
545+
* Temporarily disable the I/O range before updating
546+
* PCI_IO_BASE.
547+
*/
548+
writel(0x0000ffff, base + PCI_IO_BASE_UPPER16);
549+
/* Update lower 16 bits of I/O base/limit */
550+
writew(0x00f0, base + PCI_IO_BASE);
551+
/* Update upper 16 bits of I/O base/limit */
552+
writel(0, base + PCI_IO_BASE_UPPER16);
553+
554+
/* MMIO Base/Limit */
555+
writel(0x0000fff0, base + PCI_MEMORY_BASE);
556+
557+
/* Prefetchable MMIO Base/Limit */
558+
writel(0, base + PCI_PREF_LIMIT_UPPER32);
559+
writel(0x0000fff0, base + PCI_PREF_MEMORY_BASE);
560+
writel(0xffffffff, base + PCI_PREF_BASE_UPPER32);
546561
}
547562
}
548563
}

0 commit comments

Comments
 (0)