diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 12:30:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 12:30:25 -0400 |
commit | 96a3e8af5a54c324535472ca946215d5bafe6539 (patch) | |
tree | e59b48aa3fa2b8c6c1f59f76b7b4c71f9c694093 /drivers/pci/pcie/portdrv_pci.c | |
parent | a87451052fb914744571fc3ab39fcbf4fa4ef944 (diff) | |
parent | d4f09c5d7fbabd1389a5f03f5c9329d790f544e3 (diff) |
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
...
Diffstat (limited to 'drivers/pci/pcie/portdrv_pci.c')
-rw-r--r-- | drivers/pci/pcie/portdrv_pci.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c index ed4d09498337..696caed5fdf5 100644 --- a/drivers/pci/pcie/portdrv_pci.c +++ b/drivers/pci/pcie/portdrv_pci.c | |||
@@ -259,11 +259,9 @@ static pci_ers_result_t pcie_portdrv_error_detected(struct pci_dev *dev, | |||
259 | enum pci_channel_state error) | 259 | enum pci_channel_state error) |
260 | { | 260 | { |
261 | struct aer_broadcast_data data = {error, PCI_ERS_RESULT_CAN_RECOVER}; | 261 | struct aer_broadcast_data data = {error, PCI_ERS_RESULT_CAN_RECOVER}; |
262 | int ret; | ||
263 | |||
264 | /* can not fail */ | ||
265 | ret = device_for_each_child(&dev->dev, &data, error_detected_iter); | ||
266 | 262 | ||
263 | /* get true return value from &data */ | ||
264 | device_for_each_child(&dev->dev, &data, error_detected_iter); | ||
267 | return data.result; | 265 | return data.result; |
268 | } | 266 | } |
269 | 267 | ||
@@ -295,10 +293,9 @@ static int mmio_enabled_iter(struct device *device, void *data) | |||
295 | static pci_ers_result_t pcie_portdrv_mmio_enabled(struct pci_dev *dev) | 293 | static pci_ers_result_t pcie_portdrv_mmio_enabled(struct pci_dev *dev) |
296 | { | 294 | { |
297 | pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED; | 295 | pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED; |
298 | int retval; | ||
299 | 296 | ||
300 | /* get true return value from &status */ | 297 | /* get true return value from &status */ |
301 | retval = device_for_each_child(&dev->dev, &status, mmio_enabled_iter); | 298 | device_for_each_child(&dev->dev, &status, mmio_enabled_iter); |
302 | return status; | 299 | return status; |
303 | } | 300 | } |
304 | 301 | ||
@@ -330,7 +327,6 @@ static int slot_reset_iter(struct device *device, void *data) | |||
330 | static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev) | 327 | static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev) |
331 | { | 328 | { |
332 | pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED; | 329 | pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED; |
333 | int retval; | ||
334 | 330 | ||
335 | /* If fatal, restore cfg space for possible link reset at upstream */ | 331 | /* If fatal, restore cfg space for possible link reset at upstream */ |
336 | if (dev->error_state == pci_channel_io_frozen) { | 332 | if (dev->error_state == pci_channel_io_frozen) { |
@@ -341,8 +337,7 @@ static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev) | |||
341 | } | 337 | } |
342 | 338 | ||
343 | /* get true return value from &status */ | 339 | /* get true return value from &status */ |
344 | retval = device_for_each_child(&dev->dev, &status, slot_reset_iter); | 340 | device_for_each_child(&dev->dev, &status, slot_reset_iter); |
345 | |||
346 | return status; | 341 | return status; |
347 | } | 342 | } |
348 | 343 | ||
@@ -368,9 +363,7 @@ static int resume_iter(struct device *device, void *data) | |||
368 | 363 | ||
369 | static void pcie_portdrv_err_resume(struct pci_dev *dev) | 364 | static void pcie_portdrv_err_resume(struct pci_dev *dev) |
370 | { | 365 | { |
371 | int retval; | 366 | device_for_each_child(&dev->dev, NULL, resume_iter); |
372 | /* nothing to do with error value, if it ever happens */ | ||
373 | retval = device_for_each_child(&dev->dev, NULL, resume_iter); | ||
374 | } | 367 | } |
375 | 368 | ||
376 | /* | 369 | /* |