diff --git a/drivers/platform/x86/p2sb.c b/drivers/platform/x86/p2sb.c index 31f38309b389..e9038e8ebc87 100644 --- a/drivers/platform/x86/p2sb.c +++ b/drivers/platform/x86/p2sb.c @@ -89,6 +89,12 @@ static void p2sb_scan_and_cache_devfn(struct pci_bus *bus, unsigned int devfn) return; p2sb_read_bar0(pdev, &cache->res); + + pr_info("%s: devfn=%x.%x\n", __func__, + PCI_SLOT(devfn), PCI_FUNC(devfn)); + pr_info("%s: %llx-%llx: %lx\n", __func__, + cache->res.start, cache->res.end, cache->res.flags); + cache->bus_dev_id = bus->dev.id; pci_stop_and_remove_bus_device(pdev); @@ -130,6 +136,8 @@ static int p2sb_cache_resources(void) u16 class; int ret; + pr_info("%s\n", __func__); + /* Get devfn for P2SB device itself */ p2sb_get_devfn(&devfn_p2sb); @@ -157,6 +165,9 @@ static int p2sb_cache_resources(void) * Unhide the P2SB device here, if needed. */ pci_bus_read_config_dword(bus, devfn_p2sb, P2SBC, &value); + + pr_info("%s: P2SBC_HIDE=%lu\n", __func__, value & P2SBC_HIDE); + if (value & P2SBC_HIDE) pci_bus_write_config_dword(bus, devfn_p2sb, P2SBC, 0); @@ -189,6 +200,8 @@ int p2sb_bar(struct pci_bus *bus, unsigned int devfn, struct resource *mem) { struct p2sb_res_cache *cache; + pr_info("%s\n", __func__); + bus = p2sb_get_bus(bus); if (!bus) return -ENODEV; @@ -204,6 +217,12 @@ int p2sb_bar(struct pci_bus *bus, unsigned int devfn, struct resource *mem) return -ENOENT; memcpy(mem, &cache->res, sizeof(*mem)); + + pr_info("%s: devfn=%x.%x\n", __func__, + PCI_SLOT(devfn), PCI_FUNC(devfn)); + pr_info("%s: %llx-%llx: %lx\n", __func__, + cache->res.start, cache->res.end, cache->res.flags); + return 0; } EXPORT_SYMBOL_GPL(p2sb_bar);