From bd31642ad8cc8302e2455a072a745dad9ea579b9 Mon Sep 17 00:00:00 2001 From: Werner Zeh Date: Mon, 16 Oct 2017 08:53:34 +0200 Subject: [PATCH] intel/i210: Set bus master bit in command register There are still Ethernet drivers out there in the wild which expect that the master enable bit was set by firmware. A missing master enable bit will lead to a non-functional driver. Though it is clear the task of the driver to set this bit it is too late now. So work around this issue on firmware level...again! Change-Id: I677b22c643b73634b1a2129d948b991446e1f8fd Signed-off-by: Werner Zeh Reviewed-on: https://review.coreboot.org/22036 Tested-by: build bot (Jenkins) Reviewed-by: Mario Scheithauer --- src/drivers/intel/i210/i210.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/drivers/intel/i210/i210.c b/src/drivers/intel/i210/i210.c index 656e4f3c89..47b6d16d0b 100644 --- a/src/drivers/intel/i210/i210.c +++ b/src/drivers/intel/i210/i210.c @@ -1,7 +1,7 @@ /* * This file is part of the coreboot project. * - * Copyright (C) 2014-2016 Siemens AG. + * Copyright (C) 2014-2017 Siemens AG. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -218,9 +219,15 @@ static void init(struct device *dev) return; } +static void set_resources(device_t dev) +{ + pci_dev_set_resources(dev); + dev->command |= PCI_COMMAND_MASTER; +} + static struct device_operations i210_ops = { .read_resources = pci_dev_read_resources, - .set_resources = pci_dev_set_resources, + .set_resources = set_resources, .enable_resources = pci_dev_enable_resources, .init = init, .scan_bus = 0,