diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-11 15:18:16 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-11 15:18:16 -0500 |
commit | 11bd04f6f35621193311c32e0721142b073a7794 (patch) | |
tree | 00979740582bb26e8d3756bf3526c85f19f66a46 /drivers/pcmcia/cardbus.c | |
parent | 4e2ccdb0409146f8cf64a11b6ef82a9c928ced2a (diff) | |
parent | 9e0b5b2c447ad0caa075a5cfef86def62e1782ff (diff) |
Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (109 commits)
PCI: fix coding style issue in pci_save_state()
PCI: add pci_request_acs
PCI: fix BUG_ON triggered by logical PCIe root port removal
PCI: remove ifdefed pci_cleanup_aer_correct_error_status
PCI: unconditionally clear AER uncorr status register during cleanup
x86/PCI: claim SR-IOV BARs in pcibios_allocate_resource
PCI: portdrv: remove redundant definitions
PCI: portdrv: remove unnecessary struct pcie_port_data
PCI: portdrv: minor cleanup for pcie_port_device_register
PCI: portdrv: add missing irq cleanup
PCI: portdrv: enable device before irq initialization
PCI: portdrv: cleanup service irqs initialization
PCI: portdrv: check capabilities first
PCI: portdrv: move PME capability check
PCI: portdrv: remove redundant pcie type calculation
PCI: portdrv: cleanup pcie_device registration
PCI: portdrv: remove redundant pcie_port_device_probe
PCI: Always set prefetchable base/limit upper32 registers
PCI: read-modify-write the pcie device control register when initiating pcie flr
PCI: show dma_mask bits in /sys
...
Fixed up conflicts in:
arch/x86/kernel/amd_iommu_init.c
drivers/pci/dmar.c
drivers/pci/hotplug/acpiphp_glue.c
Diffstat (limited to 'drivers/pcmcia/cardbus.c')
-rw-r--r-- | drivers/pcmcia/cardbus.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/drivers/pcmcia/cardbus.c b/drivers/pcmcia/cardbus.c index 4cd70d056810..a73b040ddbfb 100644 --- a/drivers/pcmcia/cardbus.c +++ b/drivers/pcmcia/cardbus.c | |||
@@ -184,26 +184,33 @@ fail: | |||
184 | 184 | ||
185 | =====================================================================*/ | 185 | =====================================================================*/ |
186 | 186 | ||
187 | /* | 187 | static void cardbus_config_irq_and_cls(struct pci_bus *bus, int irq) |
188 | * Since there is only one interrupt available to CardBus | ||
189 | * devices, all devices downstream of this device must | ||
190 | * be using this IRQ. | ||
191 | */ | ||
192 | static void cardbus_assign_irqs(struct pci_bus *bus, int irq) | ||
193 | { | 188 | { |
194 | struct pci_dev *dev; | 189 | struct pci_dev *dev; |
195 | 190 | ||
196 | list_for_each_entry(dev, &bus->devices, bus_list) { | 191 | list_for_each_entry(dev, &bus->devices, bus_list) { |
197 | u8 irq_pin; | 192 | u8 irq_pin; |
198 | 193 | ||
194 | /* | ||
195 | * Since there is only one interrupt available to | ||
196 | * CardBus devices, all devices downstream of this | ||
197 | * device must be using this IRQ. | ||
198 | */ | ||
199 | pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &irq_pin); | 199 | pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &irq_pin); |
200 | if (irq_pin) { | 200 | if (irq_pin) { |
201 | dev->irq = irq; | 201 | dev->irq = irq; |
202 | pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq); | 202 | pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq); |
203 | } | 203 | } |
204 | 204 | ||
205 | /* | ||
206 | * Some controllers transfer very slowly with 0 CLS. | ||
207 | * Configure it. This may fail as CLS configuration | ||
208 | * is mandatory only for MWI. | ||
209 | */ | ||
210 | pci_set_cacheline_size(dev); | ||
211 | |||
205 | if (dev->subordinate) | 212 | if (dev->subordinate) |
206 | cardbus_assign_irqs(dev->subordinate, irq); | 213 | cardbus_config_irq_and_cls(dev->subordinate, irq); |
207 | } | 214 | } |
208 | } | 215 | } |
209 | 216 | ||
@@ -228,7 +235,7 @@ int __ref cb_alloc(struct pcmcia_socket * s) | |||
228 | */ | 235 | */ |
229 | pci_bus_size_bridges(bus); | 236 | pci_bus_size_bridges(bus); |
230 | pci_bus_assign_resources(bus); | 237 | pci_bus_assign_resources(bus); |
231 | cardbus_assign_irqs(bus, s->pci_irq); | 238 | cardbus_config_irq_and_cls(bus, s->pci_irq); |
232 | 239 | ||
233 | /* socket specific tune function */ | 240 | /* socket specific tune function */ |
234 | if (s->tune_bridge) | 241 | if (s->tune_bridge) |