[coreboot-gerrit] Change in coreboot[master]: pci_device:[WIP] Write vendor ID to subsystem vendor ID

Rizwan Qureshi (Code Review) gerrit at coreboot.org
Thu Apr 27 15:37:00 CEST 2017


Rizwan Qureshi has uploaded a new change for review. ( https://review.coreboot.org/19467 )

Change subject: pci_device:[WIP] Write vendor ID to subsystem vendor ID
......................................................................

pci_device:[WIP] Write vendor ID to subsystem vendor ID

Write vendor ID to subsystem vendor ID if subsystem vendor ID
is not provided.

Change-Id: I5027331a6adf9109767415ba22dfcb17b35ef54b
Signed-off-by: Rizwan Qureshi <rizwan.qureshi at intel.com>
---
M src/device/pci_device.c
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/67/19467/2

diff --git a/src/device/pci_device.c b/src/device/pci_device.c
index b2e3c9a..1732c35 100644
--- a/src/device/pci_device.c
+++ b/src/device/pci_device.c
@@ -653,7 +653,11 @@
 
 void pci_dev_set_subsystem(struct device *dev, unsigned vendor, unsigned device)
 {
-	pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
+	if (!vendor || !device)
+		pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
+				   pci_read_config32(dev, PCI_VENDOR_ID));
+	else
+		pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
 			   ((device & 0xffff) << 16) | (vendor & 0xffff));
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5027331a6adf9109767415ba22dfcb17b35ef54b
Gerrit-PatchSet: 2
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Rizwan Qureshi <rizwan.qureshi at intel.com>
Gerrit-Reviewer: Aamir Bohra <aamir.bohra at intel.com>
Gerrit-Reviewer: Bora Guvendik <bora.guvendik at intel.com>
Gerrit-Reviewer: Hannah Williams <hannah.williams at intel.com>
Gerrit-Reviewer: Subrata Banik <subrata.banik at intel.com>



More information about the coreboot-gerrit mailing list