diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-30 16:13:24 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-30 16:13:24 -0500 |
| commit | d661d76b0262f3ed649a1dea24c0119757592b09 (patch) | |
| tree | ff56854943219c16f51e18c5360b9626c3a20474 /drivers/pci/pci.c | |
| parent | b07d41b77e58baa2df2326cec68dde03cb2348c5 (diff) | |
| parent | 2d1c861871d767153538a77c498752b36d4bb4b8 (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
PCI/cardbus: Add a fixup hook and fix powerpc
PCI: change PCI nomenclature in drivers/pci/ (non-comment changes)
PCI: change PCI nomenclature in drivers/pci/ (comment changes)
PCI: fix section mismatch on update_res()
PCI: add Intel 82599 Virtual Function specific reset method
PCI: add Intel USB specific reset method
PCI: support device-specific reset methods
PCI: Handle case when no pci device can provide cache line size hint
PCI/PM: Propagate wake-up enable for PCIe devices too
vgaarbiter: fix a typo in the vgaarbiter Documentation
Diffstat (limited to 'drivers/pci/pci.c')
| -rw-r--r-- | drivers/pci/pci.c | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 0bc27e059019..864e703cf737 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
| @@ -1153,11 +1153,11 @@ pci_disable_device(struct pci_dev *dev) | |||
| 1153 | 1153 | ||
| 1154 | /** | 1154 | /** |
| 1155 | * pcibios_set_pcie_reset_state - set reset state for device dev | 1155 | * pcibios_set_pcie_reset_state - set reset state for device dev |
| 1156 | * @dev: the PCI-E device reset | 1156 | * @dev: the PCIe device reset |
| 1157 | * @state: Reset state to enter into | 1157 | * @state: Reset state to enter into |
| 1158 | * | 1158 | * |
| 1159 | * | 1159 | * |
| 1160 | * Sets the PCI-E reset state for the device. This is the default | 1160 | * Sets the PCIe reset state for the device. This is the default |
| 1161 | * implementation. Architecture implementations can override this. | 1161 | * implementation. Architecture implementations can override this. |
| 1162 | */ | 1162 | */ |
| 1163 | int __attribute__ ((weak)) pcibios_set_pcie_reset_state(struct pci_dev *dev, | 1163 | int __attribute__ ((weak)) pcibios_set_pcie_reset_state(struct pci_dev *dev, |
| @@ -1168,7 +1168,7 @@ int __attribute__ ((weak)) pcibios_set_pcie_reset_state(struct pci_dev *dev, | |||
| 1168 | 1168 | ||
| 1169 | /** | 1169 | /** |
| 1170 | * pci_set_pcie_reset_state - set reset state for device dev | 1170 | * pci_set_pcie_reset_state - set reset state for device dev |
| 1171 | * @dev: the PCI-E device reset | 1171 | * @dev: the PCIe device reset |
| 1172 | * @state: Reset state to enter into | 1172 | * @state: Reset state to enter into |
| 1173 | * | 1173 | * |
| 1174 | * | 1174 | * |
| @@ -2284,6 +2284,21 @@ static int pci_parent_bus_reset(struct pci_dev *dev, int probe) | |||
| 2284 | return 0; | 2284 | return 0; |
| 2285 | } | 2285 | } |
| 2286 | 2286 | ||
| 2287 | static int pci_dev_specific_reset(struct pci_dev *dev, int probe) | ||
| 2288 | { | ||
| 2289 | struct pci_dev_reset_methods *i; | ||
| 2290 | |||
| 2291 | for (i = pci_dev_reset_methods; i->reset; i++) { | ||
| 2292 | if ((i->vendor == dev->vendor || | ||
| 2293 | i->vendor == (u16)PCI_ANY_ID) && | ||
| 2294 | (i->device == dev->device || | ||
| 2295 | i->device == (u16)PCI_ANY_ID)) | ||
| 2296 | return i->reset(dev, probe); | ||
| 2297 | } | ||
| 2298 | |||
| 2299 | return -ENOTTY; | ||
| 2300 | } | ||
| 2301 | |||
| 2287 | static int pci_dev_reset(struct pci_dev *dev, int probe) | 2302 | static int pci_dev_reset(struct pci_dev *dev, int probe) |
| 2288 | { | 2303 | { |
| 2289 | int rc; | 2304 | int rc; |
| @@ -2296,6 +2311,10 @@ static int pci_dev_reset(struct pci_dev *dev, int probe) | |||
| 2296 | down(&dev->dev.sem); | 2311 | down(&dev->dev.sem); |
| 2297 | } | 2312 | } |
| 2298 | 2313 | ||
| 2314 | rc = pci_dev_specific_reset(dev, probe); | ||
| 2315 | if (rc != -ENOTTY) | ||
| 2316 | goto done; | ||
| 2317 | |||
| 2299 | rc = pcie_flr(dev, probe); | 2318 | rc = pcie_flr(dev, probe); |
| 2300 | if (rc != -ENOTTY) | 2319 | if (rc != -ENOTTY) |
| 2301 | goto done; | 2320 | goto done; |
| @@ -2779,6 +2798,11 @@ int __attribute__ ((weak)) pci_ext_cfg_avail(struct pci_dev *dev) | |||
| 2779 | return 1; | 2798 | return 1; |
| 2780 | } | 2799 | } |
| 2781 | 2800 | ||
| 2801 | void __weak pci_fixup_cardbus(struct pci_bus *bus) | ||
| 2802 | { | ||
| 2803 | } | ||
| 2804 | EXPORT_SYMBOL(pci_fixup_cardbus); | ||
| 2805 | |||
| 2782 | static int __init pci_setup(char *str) | 2806 | static int __init pci_setup(char *str) |
| 2783 | { | 2807 | { |
| 2784 | while (str) { | 2808 | while (str) { |
