diff options
author | Felix Singer <felix.singer@secunet.com> | 2020-09-07 16:15:14 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-11-16 12:14:48 +0000 |
commit | d3d0fd7d5e34128054210e257de24f7a954573f6 (patch) | |
tree | 70d73b546fdcb85fcdd29b22d655945d7b39ee4c /src/device | |
parent | 205b53ee77baa257f20265dfbc6d6d72a2e504a5 (diff) |
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>
Diffstat (limited to 'src/device')
-rw-r--r-- | src/device/pci_device.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/device/pci_device.c b/src/device/pci_device.c index f4608fc7f2..c3f356413f 100644 --- a/src/device/pci_device.c +++ b/src/device/pci_device.c @@ -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; /* |