Index: linux_for_test/drivers/pci/probe.c =================================================================== --- linux_for_test.orig/drivers/pci/probe.c 2016-05-09 21:55:25.419688131 +0800 +++ linux_for_test/drivers/pci/probe.c 2016-05-18 23:29:13.650362034 +0800 @@ -1596,6 +1596,15 @@ } EXPORT_SYMBOL(pci_bus_read_dev_vendor_id); +static int blacklist_pci; +static int __init parse_blacklist_pci(char *str) +{ + get_option(&str, &blacklist_pci); + printk("blacklist pci device, str:%s, result:%x\n", + str, blacklist_pci); + return 0; +} +early_param("blacklist_pci", parse_blacklist_pci); /* * Read the config data for a PCI device, sanity-check it * and fill in the dev structure... @@ -1605,9 +1614,10 @@ struct pci_dev *dev; u32 l; - if (!pci_bus_read_dev_vendor_id(bus, devfn, &l, 60*1000)) + if (!pci_bus_read_dev_vendor_id(bus, devfn, &l, 60*1000)|| + l == (u32)blacklist_pci) return NULL; - + printk("%s for device:%x\n", __FUNCTION__, l); dev = pci_alloc_dev(bus); if (!dev) return NULL;