From c64dc900d0567dd8e8a26ab0a0102be6072986fc Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 31 May 2020 12:24:41 +0200 Subject: [PATCH] Hurd: Do not identify devices during scan Let us keep the bus scan light-weight. Whoever is interested in device IDs, still has to call pci_fill_info(PCI_FILL_IDENT), which handles this in generic way. --- lib/hurd.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lib/hurd.c b/lib/hurd.c index 873bb78..c1edadd 100644 --- a/lib/hurd.c +++ b/lib/hurd.c @@ -118,8 +118,6 @@ enum_devices(const char *parent, struct pci_access *a, int domain, int bus, DIR *dir; struct dirent *entry; char path[NAME_MAX]; - uint32_t vd; - uint8_t ht; struct pci_dev *d; dir = opendir(parent); @@ -191,16 +189,7 @@ enum_devices(const char *parent, struct pci_access *a, int domain, int bus, d->bus = bus; d->dev = dev; d->func = func; - pci_link_dev(a, d); - - vd = pci_read_long(d, PCI_VENDOR_ID); - ht = pci_read_byte(d, PCI_HEADER_TYPE); - - d->vendor_id = vd & 0xffff; - d->device_id = vd >> 16U; - d->known_fields = PCI_FILL_IDENT; - d->hdrtype = ht; } } -- 2.39.2