diff options
author | Ronald G. Minnich <rminnich@gmail.com> | 2016-11-21 08:19:11 -0800 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2016-11-21 18:06:33 +0100 |
commit | 76a6586eeff9b27a33c1b5684262df4e80692cf4 (patch) | |
tree | d09f547d693fa86881ed7b60f18342459e7b31b1 | |
parent | ebbd12f8bcfb1f21db7991c5272515fb76600b66 (diff) |
net/r8167: do net set bus msater enable
It's very dangerous to set bus master enable, and more so on
a NIC, where random broadcast packets can end up in memory
in unexpected ways.
If your kernel has trouble with the fact that we do not set
bus master enable, you need to fix your kernel.
Change-Id: If07fde7961ad80125567240cb43db036346bef97
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-on: https://review.coreboot.org/17559
Reviewed-by: Timothy Pearson <tpearson@raptorengineering.com>
Tested-by: build bot (Jenkins)
-rw-r--r-- | src/drivers/net/r8168.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/drivers/net/r8168.c b/src/drivers/net/r8168.c index 43016935e6..1e6db57a1b 100644 --- a/src/drivers/net/r8168.c +++ b/src/drivers/net/r8168.c @@ -45,9 +45,9 @@ static void r8168_init(struct device *dev) struct resource *nic_res = find_resource(dev, PCI_BASE_ADDRESS_0); u16 nic_port = (u16)nic_res->base; - /* Set bus master */ - pci_write_config16(dev, PCI_COMMAND, PCI_COMMAND_MASTER - | PCI_COMMAND_MEMORY | PCI_COMMAND_IO); + /* Ensble but do not set bus master. That's dangerous on a NIC. */ + pci_write_config16(dev, PCI_COMMAND, + PCI_COMMAND_MEMORY | PCI_COMMAND_IO); /* Reset NIC */ printk(BIOS_DEBUG, "r8168: Resetting NIC..."); |