[coreboot-gerrit] Change in coreboot[master]: intel/i210: Set bus master bit in command register

Werner Zeh (Code Review) gerrit at coreboot.org
Mon Oct 16 09:00:45 CEST 2017


Werner Zeh has uploaded this change for review. ( https://review.coreboot.org/22036


Change subject: intel/i210: Set bus master bit in command register
......................................................................

intel/i210: Set bus master bit in command register

There are still Ethernet drivers out there in the wild which expects
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 <werner.zeh at siemens.com>
---
M src/drivers/intel/i210/i210.c
1 file changed, 10 insertions(+), 2 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/36/22036/1

diff --git a/src/drivers/intel/i210/i210.c b/src/drivers/intel/i210/i210.c
index 656e4f3..aa8e41b 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 <device/pci.h>
 #include <device/pci_ids.h>
 #include <device/pci_ops.h>
+#include <device/pci_def.h>
 #include <string.h>
 #include <types.h>
 #include <delay.h>
@@ -218,9 +219,16 @@
 	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,

-- 
To view, visit https://review.coreboot.org/22036
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I677b22c643b73634b1a2129d948b991446e1f8fd
Gerrit-Change-Number: 22036
Gerrit-PatchSet: 1
Gerrit-Owner: Werner Zeh <werner.zeh at siemens.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20171016/7c211831/attachment.html>


More information about the coreboot-gerrit mailing list