mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
PCI changes for the v3.10 merge window:
PCI device hotplug
- Remove ACPI PCI subdrivers (Jiang Liu, Myron Stowe)
- Make acpiphp builtin only, not modular (Jiang Liu)
- Add acpiphp mutual exclusion (Jiang Liu)
Power management
- Skip "PME enabled/disabled" messages when not supported (Rafael Wysocki)
- Fix fallback to PCI_D0 (Rafael Wysocki)
Miscellaneous
- Factor quirk_io_region (Yinghai Lu)
- Cache MSI capability offsets & cleanup (Gavin Shan, Bjorn Helgaas)
- Clean up EISA resource initialization and logging (Bjorn Helgaas)
- Fix prototype warnings (Andy Shevchenko, Bjorn Helgaas)
- MIPS: Initialize of_node before scanning bus (Gabor Juhos)
- Fix pcibios_get_phb_of_node() declaration "weak" annotation (Gabor Juhos)
- Add MSI INTX_DISABLE quirks for AR8161/AR8162/etc (Xiong Huang)
- Fix aer_inject return values (Prarit Bhargava)
- Remove PME/ACPI dependency (Andrew Murray)
- Use shared PCI_BUS_NUM() and PCI_DEVID() (Shuah Khan)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIcBAABAgAGBQJRfhSWAAoJEFmIoMA60/r8GrYQAIHDsyZIuJSf6g+8Td1h+PIC
YD3wQhbyrDqQDuKU4+9cz+JsbHmnozUGA4UmlwmOGBxEa/Uauspb6yX1P1+x9Ok1
WD7Ar3BlA5OuYI/1L1mgCiA428MTujwoR4fPnC0+KFy8xk1tBpmhzzeOFohbKyFF
hMBO/Xt9tCzPATJ1LhjIH4xAykfDkbnPNHNcUKRoAkRo0CO0lS8gcTk0shXXSNng
p9kQ6c4cYZvlRIJTwlawWV09nr7mDsBYa3JClqXYZufUWfEwvIuhisJxCJ57sWi9
t+Ev8dm7VM6Cr5dV+ORArlboBFrq4f/W5U9j9GPFrRplwf+WbNT6tNGSpSDq8XhU
Q7JjNgPWVdWXe1vIsMwaO49zi45/bNehuCSFLZiyPZwedMk764tys+iYw+tMRtv1
tBR7lwESSXfagmvWyQAuQOTy6Rj26BPd2T8e2lMsvsuQO9mCyTK6Ey3YyKuqKQK/
l5Gns4vv4eaCjGXqqDGiydUjSes+r/v1bu43XiRnwPQJUKb5kr5SjN5/zSMBuUgm
TLT/bnv8qvdFxCpVQJFv4k/uzULARMdbvLtTy8osB14vNHX9jPn+xORjLaZNiO6O
7fFispMU8Om56hNkD6C451r3icRjjGlD7OA8KOlbZ8f876sLzGV9i6P9gwCoRdEB
wclDPsN7kAzw/V2sEE60
=bj8i
-----END PGP SIGNATURE-----
Merge tag 'pci-v3.10-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI updates from Bjorn Helgaas:
"PCI changes for the v3.10 merge window:
PCI device hotplug
- Remove ACPI PCI subdrivers (Jiang Liu, Myron Stowe)
- Make acpiphp builtin only, not modular (Jiang Liu)
- Add acpiphp mutual exclusion (Jiang Liu)
Power management
- Skip "PME enabled/disabled" messages when not supported (Rafael
Wysocki)
- Fix fallback to PCI_D0 (Rafael Wysocki)
Miscellaneous
- Factor quirk_io_region (Yinghai Lu)
- Cache MSI capability offsets & cleanup (Gavin Shan, Bjorn Helgaas)
- Clean up EISA resource initialization and logging (Bjorn Helgaas)
- Fix prototype warnings (Andy Shevchenko, Bjorn Helgaas)
- MIPS: Initialize of_node before scanning bus (Gabor Juhos)
- Fix pcibios_get_phb_of_node() declaration "weak" annotation (Gabor
Juhos)
- Add MSI INTX_DISABLE quirks for AR8161/AR8162/etc (Xiong Huang)
- Fix aer_inject return values (Prarit Bhargava)
- Remove PME/ACPI dependency (Andrew Murray)
- Use shared PCI_BUS_NUM() and PCI_DEVID() (Shuah Khan)"
* tag 'pci-v3.10-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (63 commits)
vfio-pci: Use cached MSI/MSI-X capabilities
vfio-pci: Use PCI_MSIX_TABLE_BIR, not PCI_MSIX_FLAGS_BIRMASK
PCI: Remove "extern" from function declarations
PCI: Use PCI_MSIX_TABLE_BIR, not PCI_MSIX_FLAGS_BIRMASK
PCI: Drop msi_mask_reg() and remove drivers/pci/msi.h
PCI: Use msix_table_size() directly, drop multi_msix_capable()
PCI: Drop msix_table_offset_reg() and msix_pba_offset_reg() macros
PCI: Drop is_64bit_address() and is_mask_bit_support() macros
PCI: Drop msi_data_reg() macro
PCI: Drop msi_lower_address_reg() and msi_upper_address_reg() macros
PCI: Drop msi_control_reg() macro and use PCI_MSI_FLAGS directly
PCI: Use cached MSI/MSI-X offsets from dev, not from msi_desc
PCI: Clean up MSI/MSI-X capability #defines
PCI: Use cached MSI-X cap while enabling MSI-X
PCI: Use cached MSI cap while enabling MSI interrupts
PCI: Remove MSI/MSI-X cap check in pci_msi_check_device()
PCI: Cache MSI/MSI-X capability offsets in struct pci_dev
PCI: Use u8, not int, for PM capability offset
[SCSI] megaraid_sas: Use correct #define for MSI-X capability
PCI: Remove "extern" from function declarations
...
This commit is contained in:
commit
96a3e8af5a
64 changed files with 884 additions and 1208 deletions
|
|
@ -275,19 +275,18 @@ static int __init eisa_request_resources(struct eisa_root_device *root,
|
|||
}
|
||||
|
||||
if (slot) {
|
||||
edev->res[i].name = NULL;
|
||||
edev->res[i].start = SLOT_ADDRESS(root, slot)
|
||||
+ (i * 0x400);
|
||||
edev->res[i].end = edev->res[i].start + 0xff;
|
||||
edev->res[i].flags = IORESOURCE_IO;
|
||||
} else {
|
||||
edev->res[i].name = NULL;
|
||||
edev->res[i].start = SLOT_ADDRESS(root, slot)
|
||||
+ EISA_VENDOR_ID_OFFSET;
|
||||
edev->res[i].end = edev->res[i].start + 3;
|
||||
edev->res[i].flags = IORESOURCE_BUSY;
|
||||
edev->res[i].flags = IORESOURCE_IO | IORESOURCE_BUSY;
|
||||
}
|
||||
|
||||
dev_printk(KERN_DEBUG, &edev->dev, "%pR\n", &edev->res[i]);
|
||||
if (request_resource(root->res, &edev->res[i]))
|
||||
goto failed;
|
||||
}
|
||||
|
|
@ -314,41 +313,40 @@ static int __init eisa_probe(struct eisa_root_device *root)
|
|||
{
|
||||
int i, c;
|
||||
struct eisa_device *edev;
|
||||
char *enabled_str;
|
||||
|
||||
printk(KERN_INFO "EISA: Probing bus %d at %s\n",
|
||||
root->bus_nr, dev_name(root->dev));
|
||||
dev_info(root->dev, "Probing EISA bus %d\n", root->bus_nr);
|
||||
|
||||
/* First try to get hold of slot 0. If there is no device
|
||||
* here, simply fail, unless root->force_probe is set. */
|
||||
|
||||
edev = kzalloc(sizeof(*edev), GFP_KERNEL);
|
||||
if (!edev) {
|
||||
printk(KERN_ERR "EISA: Couldn't allocate mainboard slot\n");
|
||||
dev_err(root->dev, "EISA: Couldn't allocate mainboard slot\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
if (eisa_request_resources(root, edev, 0)) {
|
||||
printk(KERN_WARNING \
|
||||
"EISA: Cannot allocate resource for mainboard\n");
|
||||
kfree(edev);
|
||||
if (!root->force_probe)
|
||||
return -EBUSY;
|
||||
goto force_probe;
|
||||
}
|
||||
|
||||
if (eisa_init_device(root, edev, 0)) {
|
||||
eisa_release_resources(edev);
|
||||
kfree(edev);
|
||||
if (!root->force_probe)
|
||||
return -ENODEV;
|
||||
goto force_probe;
|
||||
}
|
||||
|
||||
printk(KERN_INFO "EISA: Mainboard %s detected.\n", edev->id.sig);
|
||||
if (eisa_request_resources(root, edev, 0)) {
|
||||
dev_warn(root->dev,
|
||||
"EISA: Cannot allocate resource for mainboard\n");
|
||||
kfree(edev);
|
||||
if (!root->force_probe)
|
||||
return -EBUSY;
|
||||
goto force_probe;
|
||||
}
|
||||
|
||||
dev_info(&edev->dev, "EISA: Mainboard %s detected\n", edev->id.sig);
|
||||
|
||||
if (eisa_register_device(edev)) {
|
||||
printk(KERN_ERR "EISA: Failed to register %s\n",
|
||||
edev->id.sig);
|
||||
dev_err(&edev->dev, "EISA: Failed to register %s\n",
|
||||
edev->id.sig);
|
||||
eisa_release_resources(edev);
|
||||
kfree(edev);
|
||||
}
|
||||
|
|
@ -358,55 +356,47 @@ static int __init eisa_probe(struct eisa_root_device *root)
|
|||
for (c = 0, i = 1; i <= root->slots; i++) {
|
||||
edev = kzalloc(sizeof(*edev), GFP_KERNEL);
|
||||
if (!edev) {
|
||||
printk(KERN_ERR "EISA: Out of memory for slot %d\n", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (eisa_request_resources(root, edev, i)) {
|
||||
printk(KERN_WARNING \
|
||||
"Cannot allocate resource for EISA slot %d\n",
|
||||
i);
|
||||
kfree(edev);
|
||||
dev_err(root->dev, "EISA: Out of memory for slot %d\n",
|
||||
i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (eisa_init_device(root, edev, i)) {
|
||||
eisa_release_resources(edev);
|
||||
kfree(edev);
|
||||
continue;
|
||||
}
|
||||
|
||||
printk(KERN_INFO "EISA: slot %d : %s detected",
|
||||
i, edev->id.sig);
|
||||
|
||||
switch (edev->state) {
|
||||
case EISA_CONFIG_ENABLED | EISA_CONFIG_FORCED:
|
||||
printk(" (forced enabled)");
|
||||
break;
|
||||
|
||||
case EISA_CONFIG_FORCED:
|
||||
printk(" (forced disabled)");
|
||||
break;
|
||||
|
||||
case 0:
|
||||
printk(" (disabled)");
|
||||
break;
|
||||
if (eisa_request_resources(root, edev, i)) {
|
||||
dev_warn(root->dev,
|
||||
"Cannot allocate resource for EISA slot %d\n",
|
||||
i);
|
||||
kfree(edev);
|
||||
continue;
|
||||
}
|
||||
|
||||
printk (".\n");
|
||||
|
||||
if (edev->state == (EISA_CONFIG_ENABLED | EISA_CONFIG_FORCED))
|
||||
enabled_str = " (forced enabled)";
|
||||
else if (edev->state == EISA_CONFIG_FORCED)
|
||||
enabled_str = " (forced disabled)";
|
||||
else if (edev->state == 0)
|
||||
enabled_str = " (disabled)";
|
||||
else
|
||||
enabled_str = "";
|
||||
|
||||
dev_info(&edev->dev, "EISA: slot %d: %s detected%s\n", i,
|
||||
edev->id.sig, enabled_str);
|
||||
|
||||
c++;
|
||||
|
||||
if (eisa_register_device(edev)) {
|
||||
printk(KERN_ERR "EISA: Failed to register %s\n",
|
||||
edev->id.sig);
|
||||
dev_err(&edev->dev, "EISA: Failed to register %s\n",
|
||||
edev->id.sig);
|
||||
eisa_release_resources(edev);
|
||||
kfree(edev);
|
||||
}
|
||||
}
|
||||
|
||||
printk(KERN_INFO "EISA: Detected %d card%s.\n", c, c == 1 ? "" : "s");
|
||||
|
||||
dev_info(root->dev, "EISA: Detected %d card%s\n", c, c == 1 ? "" : "s");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,8 +25,7 @@ static int __init pci_eisa_init(struct pci_dev *pdev)
|
|||
struct resource *res, *bus_res = NULL;
|
||||
|
||||
if ((rc = pci_enable_device (pdev))) {
|
||||
printk (KERN_ERR "pci_eisa : Could not enable device %s\n",
|
||||
pci_name(pdev));
|
||||
dev_err(&pdev->dev, "Could not enable device\n");
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
@ -59,7 +58,7 @@ static int __init pci_eisa_init(struct pci_dev *pdev)
|
|||
dev_set_drvdata(pci_eisa_root.dev, &pci_eisa_root);
|
||||
|
||||
if (eisa_root_register (&pci_eisa_root)) {
|
||||
printk (KERN_ERR "pci_eisa : Could not register EISA root\n");
|
||||
dev_err(&pdev->dev, "Could not register EISA root\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue