]> mj.ucw.cz Git - pciutils.git/commitdiff
Hurd: Do not identify devices during scan
authorMartin Mares <mj@ucw.cz>
Sun, 31 May 2020 10:24:41 +0000 (12:24 +0200)
committerMartin Mares <mj@ucw.cz>
Sun, 31 May 2020 10:24:41 +0000 (12:24 +0200)
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

index 873bb78b48557ac07b5203465cdf76bfa0b58cf4..c1edaddd2b1b91da75dedcc5e35f7f9d7d6f4492 100644 (file)
@@ -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;
        }
     }