device: Enable bus mastering on system-class devices conditionally
Devices of class type "system" are arbitrary devices and it's not clear which of them need bus mastering. Therefore, enable bus mastering conditionally based on Kconfig option PCI_ALLOW_BUS_MASTER_ANY_DEVICE. Change-Id: Ia04e83606a0a081c0758ec59e52627aa1dbd2622 Signed-off-by: Felix Singer <felix.singer@secunet.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/45151 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
parent
205b53ee77
commit
d3d0fd7d5e
|
@ -1129,7 +1129,8 @@ struct device *pci_probe_dev(struct device *dev, struct bus *bus,
|
|||
dev->class = class >> 8;
|
||||
|
||||
/* Architectural/System devices always need to be bus masters. */
|
||||
if ((dev->class >> 16) == PCI_BASE_CLASS_SYSTEM)
|
||||
if ((dev->class >> 16) == PCI_BASE_CLASS_SYSTEM &&
|
||||
CONFIG(PCI_ALLOW_BUS_MASTER_ANY_DEVICE))
|
||||
dev->command |= PCI_COMMAND_MASTER;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue