From 76a6586eeff9b27a33c1b5684262df4e80692cf4 Mon Sep 17 00:00:00 2001 From: "Ronald G. Minnich" Date: Mon, 21 Nov 2016 08:19:11 -0800 Subject: 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 Reviewed-on: https://review.coreboot.org/17559 Reviewed-by: Timothy Pearson Tested-by: build bot (Jenkins) --- src/drivers/net/r8168.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/drivers/net') 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..."); -- cgit v1.2.3