All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] pci: don't skip vendor ID 0
@ 2017-01-25  5:25 Gregory Fong
  2017-01-25 14:14 ` Bin Meng
  0 siblings, 1 reply; 8+ messages in thread
From: Gregory Fong @ 2017-01-25  5:25 UTC (permalink / raw)
  To: u-boot

Unlike 0xffff, 0 is not an invalid vendor ID.

Signed-off-by: Gregory Fong <gregory.fong@virgingalactic.com>
---
Based on question initially asked here:
http://lists.denx.de/pipermail/u-boot/2016-December/276172.html

I've been looking through the book I have on PCI and through various online
resources, and haven't been able to find evidence that a vendor ID of 0 is
invalid, even if it's unusual.  There are still issues in how this will be
handled in e.g. drivers/pci/pci_common.c because pci_hose_find_devices() still
assumes that a vendor and device ID of 0 mean that the last pci_device_id is
reached, but this change at least allows the device's PCI BARs to get
programmed if the vendor ID is 0.

 drivers/pci/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 6b36c18..3ee7180 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -366,7 +366,7 @@ int pci_hose_scan_bus(struct pci_controller *hose, int bus)
 
 		pci_hose_read_config_word(hose, dev, PCI_VENDOR_ID, &vendor);
 
-		if (vendor == 0xffff || vendor == 0x0000)
+		if (vendor == 0xffff)
 			continue;
 
 		if (!PCI_FUNC(dev))
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-01-27  3:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-25  5:25 [U-Boot] [PATCH] pci: don't skip vendor ID 0 Gregory Fong
2017-01-25 14:14 ` Bin Meng
2017-01-25 21:23   ` Gregory Fong
2017-01-26 10:08     ` Bin Meng
2017-01-26 12:26       ` Leon Woestenberg
2017-01-26 13:19         ` Gregory Fong
2017-01-26 13:57           ` Leon Woestenberg
2017-01-27  3:11             ` Gregory Fong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.