Loading drivers/pci/hotplug.c +21 −32 Original line number Diff line number Diff line Loading @@ -20,46 +20,35 @@ int pci_hotplug (struct device *dev, char **envp, int num_envp, scratch = buffer; /* stuff we want to pass to /sbin/hotplug */ envp[i++] = scratch; length += scnprintf (scratch, buffer_size - length, "PCI_CLASS=%04X", pdev->class); if ((buffer_size - length <= 0) || (i >= num_envp)) if (add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, &length, "PCI_CLASS=%04X", pdev->class)) return -ENOMEM; ++length; scratch += length; envp[i++] = scratch; length += scnprintf (scratch, buffer_size - length, "PCI_ID=%04X:%04X", pdev->vendor, pdev->device); if ((buffer_size - length <= 0) || (i >= num_envp)) if (add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, &length, "PCI_ID=%04X:%04X", pdev->vendor, pdev->device)) return -ENOMEM; ++length; scratch += length; envp[i++] = scratch; length += scnprintf (scratch, buffer_size - length, if (add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, &length, "PCI_SUBSYS_ID=%04X:%04X", pdev->subsystem_vendor, pdev->subsystem_device); if ((buffer_size - length <= 0) || (i >= num_envp)) pdev->subsystem_device)) return -ENOMEM; ++length; scratch += length; envp[i++] = scratch; length += scnprintf (scratch, buffer_size - length, "PCI_SLOT_NAME=%s", pci_name(pdev)); if ((buffer_size - length <= 0) || (i >= num_envp)) if (add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, &length, "PCI_SLOT_NAME=%s", pci_name(pdev))) return -ENOMEM; envp[i++] = scratch; length += scnprintf (scratch, buffer_size - length, if (add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, &length, "MODALIAS=pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x", pdev->vendor, pdev->device, pdev->subsystem_vendor, pdev->subsystem_device, (u8)(pdev->class >> 16), (u8)(pdev->class >> 8), (u8)(pdev->class)); if ((buffer_size - length <= 0) || (i >= num_envp)) (u8)(pdev->class))) return -ENOMEM; envp[i] = NULL; Loading drivers/pci/hotplug/pciehprm_acpi.c +4 −4 Original line number Diff line number Diff line Loading @@ -1696,15 +1696,15 @@ void pciehprm_enable_card( pci_bus->number = func->bus; devfn = PCI_DEVFN(func->device, func->function); rc = pci_bus_read_config_word(pci_bus, devfn, PCI_COMMAND, &command); rc = pci_bus_read_config_word(pci_bus, devfn, PCI_COMMAND, &cmd); if (card_type == PCI_HEADER_TYPE_BRIDGE) { rc = pci_bus_read_config_word(pci_bus, devfn, PCI_BRIDGE_CONTROL, &bcommand); rc = pci_bus_read_config_word(pci_bus, devfn, PCI_BRIDGE_CONTROL, &bcmd); } cmd = command = command | PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE command = cmd | PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE | PCI_COMMAND_IO | PCI_COMMAND_MEMORY; bcmd = bcommand = bcommand | PCI_BRIDGE_CTL_NO_ISA; bcommand = bcmd | PCI_BRIDGE_CTL_NO_ISA; ab = find_acpi_bridge_by_bus(acpi_bridges_head, ctrl->seg, ctrl->bus); if (ab) { Loading drivers/pci/pci.h +0 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,6 @@ static inline int pci_proc_detach_bus(struct pci_bus *bus) { return 0; } #endif /* Functions for PCI Hotplug drivers to use */ extern struct pci_bus * pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int busnr); extern unsigned int pci_do_scan_bus(struct pci_bus *bus); extern int pci_remove_device_safe(struct pci_dev *dev); extern unsigned char pci_max_busnr(void); Loading drivers/pci/probe.c +33 −17 Original line number Diff line number Diff line Loading @@ -753,26 +753,18 @@ pci_scan_device(struct pci_bus *bus, int devfn) kfree(dev); return NULL; } device_initialize(&dev->dev); dev->dev.release = pci_release_dev; pci_dev_get(dev); dev->dev.dma_mask = &dev->dma_mask; dev->dev.coherent_dma_mask = 0xffffffffull; return dev; } struct pci_dev * __devinit pci_scan_single_device(struct pci_bus *bus, int devfn) void __devinit pci_device_add(struct pci_dev *dev, struct pci_bus *bus) { struct pci_dev *dev; dev = pci_scan_device(bus, devfn); pci_scan_msi_device(dev); device_initialize(&dev->dev); dev->dev.release = pci_release_dev; pci_dev_get(dev); if (!dev) return NULL; dev->dev.dma_mask = &dev->dma_mask; dev->dev.coherent_dma_mask = 0xffffffffull; /* Fix up broken headers */ pci_fixup_device(pci_fixup_header, dev); Loading @@ -785,6 +777,19 @@ pci_scan_single_device(struct pci_bus *bus, int devfn) spin_lock(&pci_bus_lock); list_add_tail(&dev->bus_list, &bus->devices); spin_unlock(&pci_bus_lock); } struct pci_dev * __devinit pci_scan_single_device(struct pci_bus *bus, int devfn) { struct pci_dev *dev; dev = pci_scan_device(bus, devfn); if (!dev) return NULL; pci_device_add(dev, bus); pci_scan_msi_device(dev); return dev; } Loading Loading @@ -881,7 +886,8 @@ unsigned int __devinit pci_do_scan_bus(struct pci_bus *bus) return max; } struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, int bus, struct pci_ops *ops, void *sysdata) struct pci_bus * __devinit pci_create_bus(struct device *parent, int bus, struct pci_ops *ops, void *sysdata) { int error; struct pci_bus *b; Loading Loading @@ -938,8 +944,6 @@ struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, int bus, b->resource[0] = &ioport_resource; b->resource[1] = &iomem_resource; b->subordinate = pci_scan_child_bus(b); return b; sys_create_link_err: Loading @@ -957,6 +961,18 @@ struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, int bus, kfree(b); return NULL; } EXPORT_SYMBOL_GPL(pci_create_bus); struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, int bus, struct pci_ops *ops, void *sysdata) { struct pci_bus *b; b = pci_create_bus(parent, bus, ops, sysdata); if (b) b->subordinate = pci_scan_child_bus(b); return b; } EXPORT_SYMBOL(pci_scan_bus_parented); #ifdef CONFIG_HOTPLUG Loading drivers/pci/quirks.c +6 −0 Original line number Diff line number Diff line Loading @@ -876,6 +876,12 @@ static void __init asus_hides_smbus_hostbridge(struct pci_dev *dev) case 0xC00C: /* Samsung P35 notebook */ asus_hides_smbus = 1; } } else if (unlikely(dev->subsystem_vendor == PCI_VENDOR_ID_COMPAQ)) { if (dev->device == PCI_DEVICE_ID_INTEL_82855PM_HB) switch(dev->subsystem_device) { case 0x0058: /* Compaq Evo N620c */ asus_hides_smbus = 1; } } } DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82845_HB, asus_hides_smbus_hostbridge ); Loading Loading
drivers/pci/hotplug.c +21 −32 Original line number Diff line number Diff line Loading @@ -20,46 +20,35 @@ int pci_hotplug (struct device *dev, char **envp, int num_envp, scratch = buffer; /* stuff we want to pass to /sbin/hotplug */ envp[i++] = scratch; length += scnprintf (scratch, buffer_size - length, "PCI_CLASS=%04X", pdev->class); if ((buffer_size - length <= 0) || (i >= num_envp)) if (add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, &length, "PCI_CLASS=%04X", pdev->class)) return -ENOMEM; ++length; scratch += length; envp[i++] = scratch; length += scnprintf (scratch, buffer_size - length, "PCI_ID=%04X:%04X", pdev->vendor, pdev->device); if ((buffer_size - length <= 0) || (i >= num_envp)) if (add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, &length, "PCI_ID=%04X:%04X", pdev->vendor, pdev->device)) return -ENOMEM; ++length; scratch += length; envp[i++] = scratch; length += scnprintf (scratch, buffer_size - length, if (add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, &length, "PCI_SUBSYS_ID=%04X:%04X", pdev->subsystem_vendor, pdev->subsystem_device); if ((buffer_size - length <= 0) || (i >= num_envp)) pdev->subsystem_device)) return -ENOMEM; ++length; scratch += length; envp[i++] = scratch; length += scnprintf (scratch, buffer_size - length, "PCI_SLOT_NAME=%s", pci_name(pdev)); if ((buffer_size - length <= 0) || (i >= num_envp)) if (add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, &length, "PCI_SLOT_NAME=%s", pci_name(pdev))) return -ENOMEM; envp[i++] = scratch; length += scnprintf (scratch, buffer_size - length, if (add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, &length, "MODALIAS=pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x", pdev->vendor, pdev->device, pdev->subsystem_vendor, pdev->subsystem_device, (u8)(pdev->class >> 16), (u8)(pdev->class >> 8), (u8)(pdev->class)); if ((buffer_size - length <= 0) || (i >= num_envp)) (u8)(pdev->class))) return -ENOMEM; envp[i] = NULL; Loading
drivers/pci/hotplug/pciehprm_acpi.c +4 −4 Original line number Diff line number Diff line Loading @@ -1696,15 +1696,15 @@ void pciehprm_enable_card( pci_bus->number = func->bus; devfn = PCI_DEVFN(func->device, func->function); rc = pci_bus_read_config_word(pci_bus, devfn, PCI_COMMAND, &command); rc = pci_bus_read_config_word(pci_bus, devfn, PCI_COMMAND, &cmd); if (card_type == PCI_HEADER_TYPE_BRIDGE) { rc = pci_bus_read_config_word(pci_bus, devfn, PCI_BRIDGE_CONTROL, &bcommand); rc = pci_bus_read_config_word(pci_bus, devfn, PCI_BRIDGE_CONTROL, &bcmd); } cmd = command = command | PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE command = cmd | PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE | PCI_COMMAND_IO | PCI_COMMAND_MEMORY; bcmd = bcommand = bcommand | PCI_BRIDGE_CTL_NO_ISA; bcommand = bcmd | PCI_BRIDGE_CTL_NO_ISA; ab = find_acpi_bridge_by_bus(acpi_bridges_head, ctrl->seg, ctrl->bus); if (ab) { Loading
drivers/pci/pci.h +0 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,6 @@ static inline int pci_proc_detach_bus(struct pci_bus *bus) { return 0; } #endif /* Functions for PCI Hotplug drivers to use */ extern struct pci_bus * pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int busnr); extern unsigned int pci_do_scan_bus(struct pci_bus *bus); extern int pci_remove_device_safe(struct pci_dev *dev); extern unsigned char pci_max_busnr(void); Loading
drivers/pci/probe.c +33 −17 Original line number Diff line number Diff line Loading @@ -753,26 +753,18 @@ pci_scan_device(struct pci_bus *bus, int devfn) kfree(dev); return NULL; } device_initialize(&dev->dev); dev->dev.release = pci_release_dev; pci_dev_get(dev); dev->dev.dma_mask = &dev->dma_mask; dev->dev.coherent_dma_mask = 0xffffffffull; return dev; } struct pci_dev * __devinit pci_scan_single_device(struct pci_bus *bus, int devfn) void __devinit pci_device_add(struct pci_dev *dev, struct pci_bus *bus) { struct pci_dev *dev; dev = pci_scan_device(bus, devfn); pci_scan_msi_device(dev); device_initialize(&dev->dev); dev->dev.release = pci_release_dev; pci_dev_get(dev); if (!dev) return NULL; dev->dev.dma_mask = &dev->dma_mask; dev->dev.coherent_dma_mask = 0xffffffffull; /* Fix up broken headers */ pci_fixup_device(pci_fixup_header, dev); Loading @@ -785,6 +777,19 @@ pci_scan_single_device(struct pci_bus *bus, int devfn) spin_lock(&pci_bus_lock); list_add_tail(&dev->bus_list, &bus->devices); spin_unlock(&pci_bus_lock); } struct pci_dev * __devinit pci_scan_single_device(struct pci_bus *bus, int devfn) { struct pci_dev *dev; dev = pci_scan_device(bus, devfn); if (!dev) return NULL; pci_device_add(dev, bus); pci_scan_msi_device(dev); return dev; } Loading Loading @@ -881,7 +886,8 @@ unsigned int __devinit pci_do_scan_bus(struct pci_bus *bus) return max; } struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, int bus, struct pci_ops *ops, void *sysdata) struct pci_bus * __devinit pci_create_bus(struct device *parent, int bus, struct pci_ops *ops, void *sysdata) { int error; struct pci_bus *b; Loading Loading @@ -938,8 +944,6 @@ struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, int bus, b->resource[0] = &ioport_resource; b->resource[1] = &iomem_resource; b->subordinate = pci_scan_child_bus(b); return b; sys_create_link_err: Loading @@ -957,6 +961,18 @@ struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, int bus, kfree(b); return NULL; } EXPORT_SYMBOL_GPL(pci_create_bus); struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, int bus, struct pci_ops *ops, void *sysdata) { struct pci_bus *b; b = pci_create_bus(parent, bus, ops, sysdata); if (b) b->subordinate = pci_scan_child_bus(b); return b; } EXPORT_SYMBOL(pci_scan_bus_parented); #ifdef CONFIG_HOTPLUG Loading
drivers/pci/quirks.c +6 −0 Original line number Diff line number Diff line Loading @@ -876,6 +876,12 @@ static void __init asus_hides_smbus_hostbridge(struct pci_dev *dev) case 0xC00C: /* Samsung P35 notebook */ asus_hides_smbus = 1; } } else if (unlikely(dev->subsystem_vendor == PCI_VENDOR_ID_COMPAQ)) { if (dev->device == PCI_DEVICE_ID_INTEL_82855PM_HB) switch(dev->subsystem_device) { case 0x0058: /* Compaq Evo N620c */ asus_hides_smbus = 1; } } } DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82845_HB, asus_hides_smbus_hostbridge ); Loading