diff options
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r-- | drivers/pci/pci.c | 230 |
1 files changed, 100 insertions, 130 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index b01bd5bba8e6..34b5fe025dd4 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/pm_runtime.h> | 28 | #include <linux/pm_runtime.h> |
29 | #include <linux/pci_hotplug.h> | 29 | #include <linux/pci_hotplug.h> |
30 | #include <linux/vmalloc.h> | 30 | #include <linux/vmalloc.h> |
31 | #include <linux/pci-ats.h> | ||
31 | #include <asm/setup.h> | 32 | #include <asm/setup.h> |
32 | #include <asm/dma.h> | 33 | #include <asm/dma.h> |
33 | #include <linux/aer.h> | 34 | #include <linux/aer.h> |
@@ -455,7 +456,7 @@ struct resource *pci_find_parent_resource(const struct pci_dev *dev, | |||
455 | pci_bus_for_each_resource(bus, r, i) { | 456 | pci_bus_for_each_resource(bus, r, i) { |
456 | if (!r) | 457 | if (!r) |
457 | continue; | 458 | continue; |
458 | if (res->start && resource_contains(r, res)) { | 459 | if (resource_contains(r, res)) { |
459 | 460 | ||
460 | /* | 461 | /* |
461 | * If the window is prefetchable but the BAR is | 462 | * If the window is prefetchable but the BAR is |
@@ -1173,6 +1174,8 @@ void pci_restore_state(struct pci_dev *dev) | |||
1173 | 1174 | ||
1174 | /* PCI Express register must be restored first */ | 1175 | /* PCI Express register must be restored first */ |
1175 | pci_restore_pcie_state(dev); | 1176 | pci_restore_pcie_state(dev); |
1177 | pci_restore_pasid_state(dev); | ||
1178 | pci_restore_pri_state(dev); | ||
1176 | pci_restore_ats_state(dev); | 1179 | pci_restore_ats_state(dev); |
1177 | pci_restore_vc_state(dev); | 1180 | pci_restore_vc_state(dev); |
1178 | 1181 | ||
@@ -1960,12 +1963,13 @@ EXPORT_SYMBOL(pci_wake_from_d3); | |||
1960 | /** | 1963 | /** |
1961 | * pci_target_state - find an appropriate low power state for a given PCI dev | 1964 | * pci_target_state - find an appropriate low power state for a given PCI dev |
1962 | * @dev: PCI device | 1965 | * @dev: PCI device |
1966 | * @wakeup: Whether or not wakeup functionality will be enabled for the device. | ||
1963 | * | 1967 | * |
1964 | * Use underlying platform code to find a supported low power state for @dev. | 1968 | * Use underlying platform code to find a supported low power state for @dev. |
1965 | * If the platform can't manage @dev, return the deepest state from which it | 1969 | * If the platform can't manage @dev, return the deepest state from which it |
1966 | * can generate wake events, based on any available PME info. | 1970 | * can generate wake events, based on any available PME info. |
1967 | */ | 1971 | */ |
1968 | static pci_power_t pci_target_state(struct pci_dev *dev) | 1972 | static pci_power_t pci_target_state(struct pci_dev *dev, bool wakeup) |
1969 | { | 1973 | { |
1970 | pci_power_t target_state = PCI_D3hot; | 1974 | pci_power_t target_state = PCI_D3hot; |
1971 | 1975 | ||
@@ -2002,7 +2006,7 @@ static pci_power_t pci_target_state(struct pci_dev *dev) | |||
2002 | if (dev->current_state == PCI_D3cold) | 2006 | if (dev->current_state == PCI_D3cold) |
2003 | target_state = PCI_D3cold; | 2007 | target_state = PCI_D3cold; |
2004 | 2008 | ||
2005 | if (device_may_wakeup(&dev->dev)) { | 2009 | if (wakeup) { |
2006 | /* | 2010 | /* |
2007 | * Find the deepest state from which the device can generate | 2011 | * Find the deepest state from which the device can generate |
2008 | * wake-up events, make it the target state and enable device | 2012 | * wake-up events, make it the target state and enable device |
@@ -2028,13 +2032,14 @@ static pci_power_t pci_target_state(struct pci_dev *dev) | |||
2028 | */ | 2032 | */ |
2029 | int pci_prepare_to_sleep(struct pci_dev *dev) | 2033 | int pci_prepare_to_sleep(struct pci_dev *dev) |
2030 | { | 2034 | { |
2031 | pci_power_t target_state = pci_target_state(dev); | 2035 | bool wakeup = device_may_wakeup(&dev->dev); |
2036 | pci_power_t target_state = pci_target_state(dev, wakeup); | ||
2032 | int error; | 2037 | int error; |
2033 | 2038 | ||
2034 | if (target_state == PCI_POWER_ERROR) | 2039 | if (target_state == PCI_POWER_ERROR) |
2035 | return -EIO; | 2040 | return -EIO; |
2036 | 2041 | ||
2037 | pci_enable_wake(dev, target_state, device_may_wakeup(&dev->dev)); | 2042 | pci_enable_wake(dev, target_state, wakeup); |
2038 | 2043 | ||
2039 | error = pci_set_power_state(dev, target_state); | 2044 | error = pci_set_power_state(dev, target_state); |
2040 | 2045 | ||
@@ -2067,9 +2072,10 @@ EXPORT_SYMBOL(pci_back_from_sleep); | |||
2067 | */ | 2072 | */ |
2068 | int pci_finish_runtime_suspend(struct pci_dev *dev) | 2073 | int pci_finish_runtime_suspend(struct pci_dev *dev) |
2069 | { | 2074 | { |
2070 | pci_power_t target_state = pci_target_state(dev); | 2075 | pci_power_t target_state; |
2071 | int error; | 2076 | int error; |
2072 | 2077 | ||
2078 | target_state = pci_target_state(dev, device_can_wakeup(&dev->dev)); | ||
2073 | if (target_state == PCI_POWER_ERROR) | 2079 | if (target_state == PCI_POWER_ERROR) |
2074 | return -EIO; | 2080 | return -EIO; |
2075 | 2081 | ||
@@ -2105,8 +2111,8 @@ bool pci_dev_run_wake(struct pci_dev *dev) | |||
2105 | if (!dev->pme_support) | 2111 | if (!dev->pme_support) |
2106 | return false; | 2112 | return false; |
2107 | 2113 | ||
2108 | /* PME-capable in principle, but not from the intended sleep state */ | 2114 | /* PME-capable in principle, but not from the target power state */ |
2109 | if (!pci_pme_capable(dev, pci_target_state(dev))) | 2115 | if (!pci_pme_capable(dev, pci_target_state(dev, false))) |
2110 | return false; | 2116 | return false; |
2111 | 2117 | ||
2112 | while (bus->parent) { | 2118 | while (bus->parent) { |
@@ -2141,10 +2147,12 @@ EXPORT_SYMBOL_GPL(pci_dev_run_wake); | |||
2141 | bool pci_dev_keep_suspended(struct pci_dev *pci_dev) | 2147 | bool pci_dev_keep_suspended(struct pci_dev *pci_dev) |
2142 | { | 2148 | { |
2143 | struct device *dev = &pci_dev->dev; | 2149 | struct device *dev = &pci_dev->dev; |
2150 | bool wakeup = device_may_wakeup(dev); | ||
2144 | 2151 | ||
2145 | if (!pm_runtime_suspended(dev) | 2152 | if (!pm_runtime_suspended(dev) |
2146 | || pci_target_state(pci_dev) != pci_dev->current_state | 2153 | || pci_target_state(pci_dev, wakeup) != pci_dev->current_state |
2147 | || platform_pci_need_resume(pci_dev)) | 2154 | || platform_pci_need_resume(pci_dev) |
2155 | || (pci_dev->dev_flags & PCI_DEV_FLAGS_NEEDS_RESUME)) | ||
2148 | return false; | 2156 | return false; |
2149 | 2157 | ||
2150 | /* | 2158 | /* |
@@ -2160,7 +2168,7 @@ bool pci_dev_keep_suspended(struct pci_dev *pci_dev) | |||
2160 | spin_lock_irq(&dev->power.lock); | 2168 | spin_lock_irq(&dev->power.lock); |
2161 | 2169 | ||
2162 | if (pm_runtime_suspended(dev) && pci_dev->current_state < PCI_D3cold && | 2170 | if (pm_runtime_suspended(dev) && pci_dev->current_state < PCI_D3cold && |
2163 | !device_may_wakeup(dev)) | 2171 | !wakeup) |
2164 | __pci_pme_active(pci_dev, false); | 2172 | __pci_pme_active(pci_dev, false); |
2165 | 2173 | ||
2166 | spin_unlock_irq(&dev->power.lock); | 2174 | spin_unlock_irq(&dev->power.lock); |
@@ -3708,46 +3716,6 @@ void pci_intx(struct pci_dev *pdev, int enable) | |||
3708 | } | 3716 | } |
3709 | EXPORT_SYMBOL_GPL(pci_intx); | 3717 | EXPORT_SYMBOL_GPL(pci_intx); |
3710 | 3718 | ||
3711 | /** | ||
3712 | * pci_intx_mask_supported - probe for INTx masking support | ||
3713 | * @dev: the PCI device to operate on | ||
3714 | * | ||
3715 | * Check if the device dev support INTx masking via the config space | ||
3716 | * command word. | ||
3717 | */ | ||
3718 | bool pci_intx_mask_supported(struct pci_dev *dev) | ||
3719 | { | ||
3720 | bool mask_supported = false; | ||
3721 | u16 orig, new; | ||
3722 | |||
3723 | if (dev->broken_intx_masking) | ||
3724 | return false; | ||
3725 | |||
3726 | pci_cfg_access_lock(dev); | ||
3727 | |||
3728 | pci_read_config_word(dev, PCI_COMMAND, &orig); | ||
3729 | pci_write_config_word(dev, PCI_COMMAND, | ||
3730 | orig ^ PCI_COMMAND_INTX_DISABLE); | ||
3731 | pci_read_config_word(dev, PCI_COMMAND, &new); | ||
3732 | |||
3733 | /* | ||
3734 | * There's no way to protect against hardware bugs or detect them | ||
3735 | * reliably, but as long as we know what the value should be, let's | ||
3736 | * go ahead and check it. | ||
3737 | */ | ||
3738 | if ((new ^ orig) & ~PCI_COMMAND_INTX_DISABLE) { | ||
3739 | dev_err(&dev->dev, "Command register changed from 0x%x to 0x%x: driver or hardware bug?\n", | ||
3740 | orig, new); | ||
3741 | } else if ((new ^ orig) & PCI_COMMAND_INTX_DISABLE) { | ||
3742 | mask_supported = true; | ||
3743 | pci_write_config_word(dev, PCI_COMMAND, orig); | ||
3744 | } | ||
3745 | |||
3746 | pci_cfg_access_unlock(dev); | ||
3747 | return mask_supported; | ||
3748 | } | ||
3749 | EXPORT_SYMBOL_GPL(pci_intx_mask_supported); | ||
3750 | |||
3751 | static bool pci_check_and_set_intx_mask(struct pci_dev *dev, bool mask) | 3719 | static bool pci_check_and_set_intx_mask(struct pci_dev *dev, bool mask) |
3752 | { | 3720 | { |
3753 | struct pci_bus *bus = dev->bus; | 3721 | struct pci_bus *bus = dev->bus; |
@@ -3798,7 +3766,7 @@ done: | |||
3798 | * @dev: the PCI device to operate on | 3766 | * @dev: the PCI device to operate on |
3799 | * | 3767 | * |
3800 | * Check if the device dev has its INTx line asserted, mask it and | 3768 | * Check if the device dev has its INTx line asserted, mask it and |
3801 | * return true in that case. False is returned if not interrupt was | 3769 | * return true in that case. False is returned if no interrupt was |
3802 | * pending. | 3770 | * pending. |
3803 | */ | 3771 | */ |
3804 | bool pci_check_and_mask_intx(struct pci_dev *dev) | 3772 | bool pci_check_and_mask_intx(struct pci_dev *dev) |
@@ -4068,40 +4036,6 @@ static int pci_dev_reset_slot_function(struct pci_dev *dev, int probe) | |||
4068 | return pci_reset_hotplug_slot(dev->slot->hotplug, probe); | 4036 | return pci_reset_hotplug_slot(dev->slot->hotplug, probe); |
4069 | } | 4037 | } |
4070 | 4038 | ||
4071 | static int __pci_dev_reset(struct pci_dev *dev, int probe) | ||
4072 | { | ||
4073 | int rc; | ||
4074 | |||
4075 | might_sleep(); | ||
4076 | |||
4077 | rc = pci_dev_specific_reset(dev, probe); | ||
4078 | if (rc != -ENOTTY) | ||
4079 | goto done; | ||
4080 | |||
4081 | if (pcie_has_flr(dev)) { | ||
4082 | if (!probe) | ||
4083 | pcie_flr(dev); | ||
4084 | rc = 0; | ||
4085 | goto done; | ||
4086 | } | ||
4087 | |||
4088 | rc = pci_af_flr(dev, probe); | ||
4089 | if (rc != -ENOTTY) | ||
4090 | goto done; | ||
4091 | |||
4092 | rc = pci_pm_reset(dev, probe); | ||
4093 | if (rc != -ENOTTY) | ||
4094 | goto done; | ||
4095 | |||
4096 | rc = pci_dev_reset_slot_function(dev, probe); | ||
4097 | if (rc != -ENOTTY) | ||
4098 | goto done; | ||
4099 | |||
4100 | rc = pci_parent_bus_reset(dev, probe); | ||
4101 | done: | ||
4102 | return rc; | ||
4103 | } | ||
4104 | |||
4105 | static void pci_dev_lock(struct pci_dev *dev) | 4039 | static void pci_dev_lock(struct pci_dev *dev) |
4106 | { | 4040 | { |
4107 | pci_cfg_access_lock(dev); | 4041 | pci_cfg_access_lock(dev); |
@@ -4127,26 +4061,18 @@ static void pci_dev_unlock(struct pci_dev *dev) | |||
4127 | pci_cfg_access_unlock(dev); | 4061 | pci_cfg_access_unlock(dev); |
4128 | } | 4062 | } |
4129 | 4063 | ||
4130 | /** | 4064 | static void pci_dev_save_and_disable(struct pci_dev *dev) |
4131 | * pci_reset_notify - notify device driver of reset | ||
4132 | * @dev: device to be notified of reset | ||
4133 | * @prepare: 'true' if device is about to be reset; 'false' if reset attempt | ||
4134 | * completed | ||
4135 | * | ||
4136 | * Must be called prior to device access being disabled and after device | ||
4137 | * access is restored. | ||
4138 | */ | ||
4139 | static void pci_reset_notify(struct pci_dev *dev, bool prepare) | ||
4140 | { | 4065 | { |
4141 | const struct pci_error_handlers *err_handler = | 4066 | const struct pci_error_handlers *err_handler = |
4142 | dev->driver ? dev->driver->err_handler : NULL; | 4067 | dev->driver ? dev->driver->err_handler : NULL; |
4143 | if (err_handler && err_handler->reset_notify) | ||
4144 | err_handler->reset_notify(dev, prepare); | ||
4145 | } | ||
4146 | 4068 | ||
4147 | static void pci_dev_save_and_disable(struct pci_dev *dev) | 4069 | /* |
4148 | { | 4070 | * dev->driver->err_handler->reset_prepare() is protected against |
4149 | pci_reset_notify(dev, true); | 4071 | * races with ->remove() by the device lock, which must be held by |
4072 | * the caller. | ||
4073 | */ | ||
4074 | if (err_handler && err_handler->reset_prepare) | ||
4075 | err_handler->reset_prepare(dev); | ||
4150 | 4076 | ||
4151 | /* | 4077 | /* |
4152 | * Wake-up device prior to save. PM registers default to D0 after | 4078 | * Wake-up device prior to save. PM registers default to D0 after |
@@ -4168,23 +4094,18 @@ static void pci_dev_save_and_disable(struct pci_dev *dev) | |||
4168 | 4094 | ||
4169 | static void pci_dev_restore(struct pci_dev *dev) | 4095 | static void pci_dev_restore(struct pci_dev *dev) |
4170 | { | 4096 | { |
4171 | pci_restore_state(dev); | 4097 | const struct pci_error_handlers *err_handler = |
4172 | pci_reset_notify(dev, false); | 4098 | dev->driver ? dev->driver->err_handler : NULL; |
4173 | } | ||
4174 | |||
4175 | static int pci_dev_reset(struct pci_dev *dev, int probe) | ||
4176 | { | ||
4177 | int rc; | ||
4178 | |||
4179 | if (!probe) | ||
4180 | pci_dev_lock(dev); | ||
4181 | |||
4182 | rc = __pci_dev_reset(dev, probe); | ||
4183 | 4099 | ||
4184 | if (!probe) | 4100 | pci_restore_state(dev); |
4185 | pci_dev_unlock(dev); | ||
4186 | 4101 | ||
4187 | return rc; | 4102 | /* |
4103 | * dev->driver->err_handler->reset_done() is protected against | ||
4104 | * races with ->remove() by the device lock, which must be held by | ||
4105 | * the caller. | ||
4106 | */ | ||
4107 | if (err_handler && err_handler->reset_done) | ||
4108 | err_handler->reset_done(dev); | ||
4188 | } | 4109 | } |
4189 | 4110 | ||
4190 | /** | 4111 | /** |
@@ -4206,7 +4127,13 @@ static int pci_dev_reset(struct pci_dev *dev, int probe) | |||
4206 | */ | 4127 | */ |
4207 | int __pci_reset_function(struct pci_dev *dev) | 4128 | int __pci_reset_function(struct pci_dev *dev) |
4208 | { | 4129 | { |
4209 | return pci_dev_reset(dev, 0); | 4130 | int ret; |
4131 | |||
4132 | pci_dev_lock(dev); | ||
4133 | ret = __pci_reset_function_locked(dev); | ||
4134 | pci_dev_unlock(dev); | ||
4135 | |||
4136 | return ret; | ||
4210 | } | 4137 | } |
4211 | EXPORT_SYMBOL_GPL(__pci_reset_function); | 4138 | EXPORT_SYMBOL_GPL(__pci_reset_function); |
4212 | 4139 | ||
@@ -4231,7 +4158,27 @@ EXPORT_SYMBOL_GPL(__pci_reset_function); | |||
4231 | */ | 4158 | */ |
4232 | int __pci_reset_function_locked(struct pci_dev *dev) | 4159 | int __pci_reset_function_locked(struct pci_dev *dev) |
4233 | { | 4160 | { |
4234 | return __pci_dev_reset(dev, 0); | 4161 | int rc; |
4162 | |||
4163 | might_sleep(); | ||
4164 | |||
4165 | rc = pci_dev_specific_reset(dev, 0); | ||
4166 | if (rc != -ENOTTY) | ||
4167 | return rc; | ||
4168 | if (pcie_has_flr(dev)) { | ||
4169 | pcie_flr(dev); | ||
4170 | return 0; | ||
4171 | } | ||
4172 | rc = pci_af_flr(dev, 0); | ||
4173 | if (rc != -ENOTTY) | ||
4174 | return rc; | ||
4175 | rc = pci_pm_reset(dev, 0); | ||
4176 | if (rc != -ENOTTY) | ||
4177 | return rc; | ||
4178 | rc = pci_dev_reset_slot_function(dev, 0); | ||
4179 | if (rc != -ENOTTY) | ||
4180 | return rc; | ||
4181 | return pci_parent_bus_reset(dev, 0); | ||
4235 | } | 4182 | } |
4236 | EXPORT_SYMBOL_GPL(__pci_reset_function_locked); | 4183 | EXPORT_SYMBOL_GPL(__pci_reset_function_locked); |
4237 | 4184 | ||
@@ -4248,7 +4195,26 @@ EXPORT_SYMBOL_GPL(__pci_reset_function_locked); | |||
4248 | */ | 4195 | */ |
4249 | int pci_probe_reset_function(struct pci_dev *dev) | 4196 | int pci_probe_reset_function(struct pci_dev *dev) |
4250 | { | 4197 | { |
4251 | return pci_dev_reset(dev, 1); | 4198 | int rc; |
4199 | |||
4200 | might_sleep(); | ||
4201 | |||
4202 | rc = pci_dev_specific_reset(dev, 1); | ||
4203 | if (rc != -ENOTTY) | ||
4204 | return rc; | ||
4205 | if (pcie_has_flr(dev)) | ||
4206 | return 0; | ||
4207 | rc = pci_af_flr(dev, 1); | ||
4208 | if (rc != -ENOTTY) | ||
4209 | return rc; | ||
4210 | rc = pci_pm_reset(dev, 1); | ||
4211 | if (rc != -ENOTTY) | ||
4212 | return rc; | ||
4213 | rc = pci_dev_reset_slot_function(dev, 1); | ||
4214 | if (rc != -ENOTTY) | ||
4215 | return rc; | ||
4216 | |||
4217 | return pci_parent_bus_reset(dev, 1); | ||
4252 | } | 4218 | } |
4253 | 4219 | ||
4254 | /** | 4220 | /** |
@@ -4271,15 +4237,17 @@ int pci_reset_function(struct pci_dev *dev) | |||
4271 | { | 4237 | { |
4272 | int rc; | 4238 | int rc; |
4273 | 4239 | ||
4274 | rc = pci_dev_reset(dev, 1); | 4240 | rc = pci_probe_reset_function(dev); |
4275 | if (rc) | 4241 | if (rc) |
4276 | return rc; | 4242 | return rc; |
4277 | 4243 | ||
4244 | pci_dev_lock(dev); | ||
4278 | pci_dev_save_and_disable(dev); | 4245 | pci_dev_save_and_disable(dev); |
4279 | 4246 | ||
4280 | rc = pci_dev_reset(dev, 0); | 4247 | rc = __pci_reset_function_locked(dev); |
4281 | 4248 | ||
4282 | pci_dev_restore(dev); | 4249 | pci_dev_restore(dev); |
4250 | pci_dev_unlock(dev); | ||
4283 | 4251 | ||
4284 | return rc; | 4252 | return rc; |
4285 | } | 4253 | } |
@@ -4295,20 +4263,18 @@ int pci_try_reset_function(struct pci_dev *dev) | |||
4295 | { | 4263 | { |
4296 | int rc; | 4264 | int rc; |
4297 | 4265 | ||
4298 | rc = pci_dev_reset(dev, 1); | 4266 | rc = pci_probe_reset_function(dev); |
4299 | if (rc) | 4267 | if (rc) |
4300 | return rc; | 4268 | return rc; |
4301 | 4269 | ||
4302 | pci_dev_save_and_disable(dev); | 4270 | if (!pci_dev_trylock(dev)) |
4271 | return -EAGAIN; | ||
4303 | 4272 | ||
4304 | if (pci_dev_trylock(dev)) { | 4273 | pci_dev_save_and_disable(dev); |
4305 | rc = __pci_dev_reset(dev, 0); | 4274 | rc = __pci_reset_function_locked(dev); |
4306 | pci_dev_unlock(dev); | 4275 | pci_dev_unlock(dev); |
4307 | } else | ||
4308 | rc = -EAGAIN; | ||
4309 | 4276 | ||
4310 | pci_dev_restore(dev); | 4277 | pci_dev_restore(dev); |
4311 | |||
4312 | return rc; | 4278 | return rc; |
4313 | } | 4279 | } |
4314 | EXPORT_SYMBOL_GPL(pci_try_reset_function); | 4280 | EXPORT_SYMBOL_GPL(pci_try_reset_function); |
@@ -4458,7 +4424,9 @@ static void pci_bus_save_and_disable(struct pci_bus *bus) | |||
4458 | struct pci_dev *dev; | 4424 | struct pci_dev *dev; |
4459 | 4425 | ||
4460 | list_for_each_entry(dev, &bus->devices, bus_list) { | 4426 | list_for_each_entry(dev, &bus->devices, bus_list) { |
4427 | pci_dev_lock(dev); | ||
4461 | pci_dev_save_and_disable(dev); | 4428 | pci_dev_save_and_disable(dev); |
4429 | pci_dev_unlock(dev); | ||
4462 | if (dev->subordinate) | 4430 | if (dev->subordinate) |
4463 | pci_bus_save_and_disable(dev->subordinate); | 4431 | pci_bus_save_and_disable(dev->subordinate); |
4464 | } | 4432 | } |
@@ -4473,7 +4441,9 @@ static void pci_bus_restore(struct pci_bus *bus) | |||
4473 | struct pci_dev *dev; | 4441 | struct pci_dev *dev; |
4474 | 4442 | ||
4475 | list_for_each_entry(dev, &bus->devices, bus_list) { | 4443 | list_for_each_entry(dev, &bus->devices, bus_list) { |
4444 | pci_dev_lock(dev); | ||
4476 | pci_dev_restore(dev); | 4445 | pci_dev_restore(dev); |
4446 | pci_dev_unlock(dev); | ||
4477 | if (dev->subordinate) | 4447 | if (dev->subordinate) |
4478 | pci_bus_restore(dev->subordinate); | 4448 | pci_bus_restore(dev->subordinate); |
4479 | } | 4449 | } |