diff options
author | Jiri Kosina <jkosina@suse.cz> | 2011-07-11 08:15:48 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-07-11 08:15:55 -0400 |
commit | b7e9c223be8ce335e30f2cf6ba588e6a4092275c (patch) | |
tree | 2d1e3b75606abc18df7ad65e51ac3f90cd68b38d /drivers/pci | |
parent | c172d82500a6cf3c32d1e650722a1055d72ce858 (diff) | |
parent | e3bbfa78bab125f58b831b5f7f45b5a305091d72 (diff) |
Merge branch 'master' into for-next
Sync with Linus' tree to be able to apply pending patches that
are based on newer code already present upstream.
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pci-driver.c | 4 | ||||
-rw-r--r-- | drivers/pci/pci.c | 8 | ||||
-rw-r--r-- | drivers/pci/pci.h | 2 | ||||
-rw-r--r-- | drivers/pci/probe.c | 2 | ||||
-rw-r--r-- | drivers/pci/quirks.c | 2 | ||||
-rw-r--r-- | drivers/pci/setup-bus.c | 15 |
6 files changed, 28 insertions, 5 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 135df164a4c1..46767c53917a 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c | |||
@@ -624,7 +624,7 @@ static int pci_pm_prepare(struct device *dev) | |||
624 | * system from the sleep state, we'll have to prevent it from signaling | 624 | * system from the sleep state, we'll have to prevent it from signaling |
625 | * wake-up. | 625 | * wake-up. |
626 | */ | 626 | */ |
627 | pm_runtime_resume(dev); | 627 | pm_runtime_get_sync(dev); |
628 | 628 | ||
629 | if (drv && drv->pm && drv->pm->prepare) | 629 | if (drv && drv->pm && drv->pm->prepare) |
630 | error = drv->pm->prepare(dev); | 630 | error = drv->pm->prepare(dev); |
@@ -638,6 +638,8 @@ static void pci_pm_complete(struct device *dev) | |||
638 | 638 | ||
639 | if (drv && drv->pm && drv->pm->complete) | 639 | if (drv && drv->pm && drv->pm->complete) |
640 | drv->pm->complete(dev); | 640 | drv->pm->complete(dev); |
641 | |||
642 | pm_runtime_put_sync(dev); | ||
641 | } | 643 | } |
642 | 644 | ||
643 | #else /* !CONFIG_PM_SLEEP */ | 645 | #else /* !CONFIG_PM_SLEEP */ |
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 56098b3e17c0..692671b11667 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -3271,11 +3271,11 @@ void __init pci_register_set_vga_state(arch_set_vga_state_t func) | |||
3271 | } | 3271 | } |
3272 | 3272 | ||
3273 | static int pci_set_vga_state_arch(struct pci_dev *dev, bool decode, | 3273 | static int pci_set_vga_state_arch(struct pci_dev *dev, bool decode, |
3274 | unsigned int command_bits, bool change_bridge) | 3274 | unsigned int command_bits, u32 flags) |
3275 | { | 3275 | { |
3276 | if (arch_set_vga_state) | 3276 | if (arch_set_vga_state) |
3277 | return arch_set_vga_state(dev, decode, command_bits, | 3277 | return arch_set_vga_state(dev, decode, command_bits, |
3278 | change_bridge); | 3278 | flags); |
3279 | return 0; | 3279 | return 0; |
3280 | } | 3280 | } |
3281 | 3281 | ||
@@ -3284,7 +3284,7 @@ static int pci_set_vga_state_arch(struct pci_dev *dev, bool decode, | |||
3284 | * @dev: the PCI device | 3284 | * @dev: the PCI device |
3285 | * @decode: true = enable decoding, false = disable decoding | 3285 | * @decode: true = enable decoding, false = disable decoding |
3286 | * @command_bits: PCI_COMMAND_IO and/or PCI_COMMAND_MEMORY | 3286 | * @command_bits: PCI_COMMAND_IO and/or PCI_COMMAND_MEMORY |
3287 | * @change_bridge_flags: traverse ancestors and change bridges | 3287 | * @flags: traverse ancestors and change bridges |
3288 | * CHANGE_BRIDGE_ONLY / CHANGE_BRIDGE | 3288 | * CHANGE_BRIDGE_ONLY / CHANGE_BRIDGE |
3289 | */ | 3289 | */ |
3290 | int pci_set_vga_state(struct pci_dev *dev, bool decode, | 3290 | int pci_set_vga_state(struct pci_dev *dev, bool decode, |
@@ -3483,6 +3483,8 @@ static int __init pci_setup(char *str) | |||
3483 | pci_no_msi(); | 3483 | pci_no_msi(); |
3484 | } else if (!strcmp(str, "noaer")) { | 3484 | } else if (!strcmp(str, "noaer")) { |
3485 | pci_no_aer(); | 3485 | pci_no_aer(); |
3486 | } else if (!strncmp(str, "realloc", 7)) { | ||
3487 | pci_realloc(); | ||
3486 | } else if (!strcmp(str, "nodomains")) { | 3488 | } else if (!strcmp(str, "nodomains")) { |
3487 | pci_no_domains(); | 3489 | pci_no_domains(); |
3488 | } else if (!strncmp(str, "cbiosize=", 9)) { | 3490 | } else if (!strncmp(str, "cbiosize=", 9)) { |
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 731e20265ace..3a39bf1f1e2c 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h | |||
@@ -146,6 +146,8 @@ static inline void pci_no_msi(void) { } | |||
146 | static inline void pci_msi_init_pci_dev(struct pci_dev *dev) { } | 146 | static inline void pci_msi_init_pci_dev(struct pci_dev *dev) { } |
147 | #endif | 147 | #endif |
148 | 148 | ||
149 | extern void pci_realloc(void); | ||
150 | |||
149 | static inline int pci_no_d1d2(struct pci_dev *dev) | 151 | static inline int pci_no_d1d2(struct pci_dev *dev) |
150 | { | 152 | { |
151 | unsigned int parent_dstates = 0; | 153 | unsigned int parent_dstates = 0; |
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 48849ffdd672..bafb3c3d4a89 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -168,7 +168,7 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, | |||
168 | res->flags |= pci_calc_resource_flags(l) | IORESOURCE_SIZEALIGN; | 168 | res->flags |= pci_calc_resource_flags(l) | IORESOURCE_SIZEALIGN; |
169 | if (type == pci_bar_io) { | 169 | if (type == pci_bar_io) { |
170 | l &= PCI_BASE_ADDRESS_IO_MASK; | 170 | l &= PCI_BASE_ADDRESS_IO_MASK; |
171 | mask = PCI_BASE_ADDRESS_IO_MASK & IO_SPACE_LIMIT; | 171 | mask = PCI_BASE_ADDRESS_IO_MASK & (u32) IO_SPACE_LIMIT; |
172 | } else { | 172 | } else { |
173 | l &= PCI_BASE_ADDRESS_MEM_MASK; | 173 | l &= PCI_BASE_ADDRESS_MEM_MASK; |
174 | mask = (u32)PCI_BASE_ADDRESS_MEM_MASK; | 174 | mask = (u32)PCI_BASE_ADDRESS_MEM_MASK; |
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index e8a140669f90..02145e9697a9 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -2761,6 +2761,8 @@ static void ricoh_mmc_fixup_r5c832(struct pci_dev *dev) | |||
2761 | } | 2761 | } |
2762 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5C832, ricoh_mmc_fixup_r5c832); | 2762 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5C832, ricoh_mmc_fixup_r5c832); |
2763 | DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5C832, ricoh_mmc_fixup_r5c832); | 2763 | DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5C832, ricoh_mmc_fixup_r5c832); |
2764 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5CE823, ricoh_mmc_fixup_r5c832); | ||
2765 | DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5CE823, ricoh_mmc_fixup_r5c832); | ||
2764 | #endif /*CONFIG_MMC_RICOH_MMC*/ | 2766 | #endif /*CONFIG_MMC_RICOH_MMC*/ |
2765 | 2767 | ||
2766 | #if defined(CONFIG_DMAR) || defined(CONFIG_INTR_REMAP) | 2768 | #if defined(CONFIG_DMAR) || defined(CONFIG_INTR_REMAP) |
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 1e9e5a5b8c81..9995842e45b5 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c | |||
@@ -47,6 +47,13 @@ struct resource_list_x { | |||
47 | (head)->next = NULL; \ | 47 | (head)->next = NULL; \ |
48 | } while (0) | 48 | } while (0) |
49 | 49 | ||
50 | int pci_realloc_enable = 0; | ||
51 | #define pci_realloc_enabled() pci_realloc_enable | ||
52 | void pci_realloc(void) | ||
53 | { | ||
54 | pci_realloc_enable = 1; | ||
55 | } | ||
56 | |||
50 | /** | 57 | /** |
51 | * add_to_list() - add a new resource tracker to the list | 58 | * add_to_list() - add a new resource tracker to the list |
52 | * @head: Head of the list | 59 | * @head: Head of the list |
@@ -1025,6 +1032,7 @@ static int __init pci_get_max_depth(void) | |||
1025 | return depth; | 1032 | return depth; |
1026 | } | 1033 | } |
1027 | 1034 | ||
1035 | |||
1028 | /* | 1036 | /* |
1029 | * first try will not touch pci bridge res | 1037 | * first try will not touch pci bridge res |
1030 | * second and later try will clear small leaf bridge res | 1038 | * second and later try will clear small leaf bridge res |
@@ -1068,6 +1076,13 @@ again: | |||
1068 | /* any device complain? */ | 1076 | /* any device complain? */ |
1069 | if (!head.next) | 1077 | if (!head.next) |
1070 | goto enable_and_dump; | 1078 | goto enable_and_dump; |
1079 | |||
1080 | /* don't realloc if asked to do so */ | ||
1081 | if (!pci_realloc_enabled()) { | ||
1082 | free_list(resource_list_x, &head); | ||
1083 | goto enable_and_dump; | ||
1084 | } | ||
1085 | |||
1071 | failed_type = 0; | 1086 | failed_type = 0; |
1072 | for (list = head.next; list;) { | 1087 | for (list = head.next; list;) { |
1073 | failed_type |= list->flags; | 1088 | failed_type |= list->flags; |