diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-22 14:59:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-22 14:59:51 -0400 |
commit | 59ef7a83f1127038a433464597df02e2dc9540e7 (patch) | |
tree | 725d262fc2e68eb9c592d76265f878cec73f8f2d /arch/powerpc/platforms | |
parent | 5165aece0efac6574fc3e32b6f1c2a964820d1c6 (diff) | |
parent | 2af5066f664cb011cf17d2e4414491fe24597e07 (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: (74 commits)
PCI: make msi_free_irqs() to use msix_mask_irq() instead of open coded write
PCI: Fix the NIU MSI-X problem in a better way
PCI ASPM: remove get_root_port_link
PCI ASPM: cleanup pcie_aspm_sanity_check
PCI ASPM: remove has_switch field
PCI ASPM: cleanup calc_Lx_latency
PCI ASPM: cleanup pcie_aspm_get_cap_device
PCI ASPM: cleanup clkpm checks
PCI ASPM: cleanup __pcie_aspm_check_state_one
PCI ASPM: cleanup initialization
PCI ASPM: cleanup change input argument of aspm functions
PCI ASPM: cleanup misc in struct pcie_link_state
PCI ASPM: cleanup clkpm state in struct pcie_link_state
PCI ASPM: cleanup latency field in struct pcie_link_state
PCI ASPM: cleanup aspm state field in struct pcie_link_state
PCI ASPM: fix typo in struct pcie_link_state
PCI: drivers/pci/slot.c should depend on CONFIG_SYSFS
PCI: remove redundant __msi_set_enable()
PCI PM: consistently use type bool for wake enable variable
x86/ACPI: Correct maximum allowed _CRS returned resources and warn if exceeded
...
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/pseries/eeh_driver.c | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c index 9a2a6e32f00f..0e8db6771252 100644 --- a/arch/powerpc/platforms/pseries/eeh_driver.c +++ b/arch/powerpc/platforms/pseries/eeh_driver.c | |||
@@ -122,7 +122,7 @@ static void eeh_enable_irq(struct pci_dev *dev) | |||
122 | * passed back in "userdata". | 122 | * passed back in "userdata". |
123 | */ | 123 | */ |
124 | 124 | ||
125 | static void eeh_report_error(struct pci_dev *dev, void *userdata) | 125 | static int eeh_report_error(struct pci_dev *dev, void *userdata) |
126 | { | 126 | { |
127 | enum pci_ers_result rc, *res = userdata; | 127 | enum pci_ers_result rc, *res = userdata; |
128 | struct pci_driver *driver = dev->driver; | 128 | struct pci_driver *driver = dev->driver; |
@@ -130,19 +130,21 @@ static void eeh_report_error(struct pci_dev *dev, void *userdata) | |||
130 | dev->error_state = pci_channel_io_frozen; | 130 | dev->error_state = pci_channel_io_frozen; |
131 | 131 | ||
132 | if (!driver) | 132 | if (!driver) |
133 | return; | 133 | return 0; |
134 | 134 | ||
135 | eeh_disable_irq(dev); | 135 | eeh_disable_irq(dev); |
136 | 136 | ||
137 | if (!driver->err_handler || | 137 | if (!driver->err_handler || |
138 | !driver->err_handler->error_detected) | 138 | !driver->err_handler->error_detected) |
139 | return; | 139 | return 0; |
140 | 140 | ||
141 | rc = driver->err_handler->error_detected (dev, pci_channel_io_frozen); | 141 | rc = driver->err_handler->error_detected (dev, pci_channel_io_frozen); |
142 | 142 | ||
143 | /* A driver that needs a reset trumps all others */ | 143 | /* A driver that needs a reset trumps all others */ |
144 | if (rc == PCI_ERS_RESULT_NEED_RESET) *res = rc; | 144 | if (rc == PCI_ERS_RESULT_NEED_RESET) *res = rc; |
145 | if (*res == PCI_ERS_RESULT_NONE) *res = rc; | 145 | if (*res == PCI_ERS_RESULT_NONE) *res = rc; |
146 | |||
147 | return 0; | ||
146 | } | 148 | } |
147 | 149 | ||
148 | /** | 150 | /** |
@@ -153,7 +155,7 @@ static void eeh_report_error(struct pci_dev *dev, void *userdata) | |||
153 | * Cumulative response passed back in "userdata". | 155 | * Cumulative response passed back in "userdata". |
154 | */ | 156 | */ |
155 | 157 | ||
156 | static void eeh_report_mmio_enabled(struct pci_dev *dev, void *userdata) | 158 | static int eeh_report_mmio_enabled(struct pci_dev *dev, void *userdata) |
157 | { | 159 | { |
158 | enum pci_ers_result rc, *res = userdata; | 160 | enum pci_ers_result rc, *res = userdata; |
159 | struct pci_driver *driver = dev->driver; | 161 | struct pci_driver *driver = dev->driver; |
@@ -161,26 +163,28 @@ static void eeh_report_mmio_enabled(struct pci_dev *dev, void *userdata) | |||
161 | if (!driver || | 163 | if (!driver || |
162 | !driver->err_handler || | 164 | !driver->err_handler || |
163 | !driver->err_handler->mmio_enabled) | 165 | !driver->err_handler->mmio_enabled) |
164 | return; | 166 | return 0; |
165 | 167 | ||
166 | rc = driver->err_handler->mmio_enabled (dev); | 168 | rc = driver->err_handler->mmio_enabled (dev); |
167 | 169 | ||
168 | /* A driver that needs a reset trumps all others */ | 170 | /* A driver that needs a reset trumps all others */ |
169 | if (rc == PCI_ERS_RESULT_NEED_RESET) *res = rc; | 171 | if (rc == PCI_ERS_RESULT_NEED_RESET) *res = rc; |
170 | if (*res == PCI_ERS_RESULT_NONE) *res = rc; | 172 | if (*res == PCI_ERS_RESULT_NONE) *res = rc; |
173 | |||
174 | return 0; | ||
171 | } | 175 | } |
172 | 176 | ||
173 | /** | 177 | /** |
174 | * eeh_report_reset - tell device that slot has been reset | 178 | * eeh_report_reset - tell device that slot has been reset |
175 | */ | 179 | */ |
176 | 180 | ||
177 | static void eeh_report_reset(struct pci_dev *dev, void *userdata) | 181 | static int eeh_report_reset(struct pci_dev *dev, void *userdata) |
178 | { | 182 | { |
179 | enum pci_ers_result rc, *res = userdata; | 183 | enum pci_ers_result rc, *res = userdata; |
180 | struct pci_driver *driver = dev->driver; | 184 | struct pci_driver *driver = dev->driver; |
181 | 185 | ||
182 | if (!driver) | 186 | if (!driver) |
183 | return; | 187 | return 0; |
184 | 188 | ||
185 | dev->error_state = pci_channel_io_normal; | 189 | dev->error_state = pci_channel_io_normal; |
186 | 190 | ||
@@ -188,35 +192,39 @@ static void eeh_report_reset(struct pci_dev *dev, void *userdata) | |||
188 | 192 | ||
189 | if (!driver->err_handler || | 193 | if (!driver->err_handler || |
190 | !driver->err_handler->slot_reset) | 194 | !driver->err_handler->slot_reset) |
191 | return; | 195 | return 0; |
192 | 196 | ||
193 | rc = driver->err_handler->slot_reset(dev); | 197 | rc = driver->err_handler->slot_reset(dev); |
194 | if ((*res == PCI_ERS_RESULT_NONE) || | 198 | if ((*res == PCI_ERS_RESULT_NONE) || |
195 | (*res == PCI_ERS_RESULT_RECOVERED)) *res = rc; | 199 | (*res == PCI_ERS_RESULT_RECOVERED)) *res = rc; |
196 | if (*res == PCI_ERS_RESULT_DISCONNECT && | 200 | if (*res == PCI_ERS_RESULT_DISCONNECT && |
197 | rc == PCI_ERS_RESULT_NEED_RESET) *res = rc; | 201 | rc == PCI_ERS_RESULT_NEED_RESET) *res = rc; |
202 | |||
203 | return 0; | ||
198 | } | 204 | } |
199 | 205 | ||
200 | /** | 206 | /** |
201 | * eeh_report_resume - tell device to resume normal operations | 207 | * eeh_report_resume - tell device to resume normal operations |
202 | */ | 208 | */ |
203 | 209 | ||
204 | static void eeh_report_resume(struct pci_dev *dev, void *userdata) | 210 | static int eeh_report_resume(struct pci_dev *dev, void *userdata) |
205 | { | 211 | { |
206 | struct pci_driver *driver = dev->driver; | 212 | struct pci_driver *driver = dev->driver; |
207 | 213 | ||
208 | dev->error_state = pci_channel_io_normal; | 214 | dev->error_state = pci_channel_io_normal; |
209 | 215 | ||
210 | if (!driver) | 216 | if (!driver) |
211 | return; | 217 | return 0; |
212 | 218 | ||
213 | eeh_enable_irq(dev); | 219 | eeh_enable_irq(dev); |
214 | 220 | ||
215 | if (!driver->err_handler || | 221 | if (!driver->err_handler || |
216 | !driver->err_handler->resume) | 222 | !driver->err_handler->resume) |
217 | return; | 223 | return 0; |
218 | 224 | ||
219 | driver->err_handler->resume(dev); | 225 | driver->err_handler->resume(dev); |
226 | |||
227 | return 0; | ||
220 | } | 228 | } |
221 | 229 | ||
222 | /** | 230 | /** |
@@ -226,22 +234,24 @@ static void eeh_report_resume(struct pci_dev *dev, void *userdata) | |||
226 | * dead, and that no further recovery attempts will be made on it. | 234 | * dead, and that no further recovery attempts will be made on it. |
227 | */ | 235 | */ |
228 | 236 | ||
229 | static void eeh_report_failure(struct pci_dev *dev, void *userdata) | 237 | static int eeh_report_failure(struct pci_dev *dev, void *userdata) |
230 | { | 238 | { |
231 | struct pci_driver *driver = dev->driver; | 239 | struct pci_driver *driver = dev->driver; |
232 | 240 | ||
233 | dev->error_state = pci_channel_io_perm_failure; | 241 | dev->error_state = pci_channel_io_perm_failure; |
234 | 242 | ||
235 | if (!driver) | 243 | if (!driver) |
236 | return; | 244 | return 0; |
237 | 245 | ||
238 | eeh_disable_irq(dev); | 246 | eeh_disable_irq(dev); |
239 | 247 | ||
240 | if (!driver->err_handler || | 248 | if (!driver->err_handler || |
241 | !driver->err_handler->error_detected) | 249 | !driver->err_handler->error_detected) |
242 | return; | 250 | return 0; |
243 | 251 | ||
244 | driver->err_handler->error_detected(dev, pci_channel_io_perm_failure); | 252 | driver->err_handler->error_detected(dev, pci_channel_io_perm_failure); |
253 | |||
254 | return 0; | ||
245 | } | 255 | } |
246 | 256 | ||
247 | /* ------------------------------------------------------- */ | 257 | /* ------------------------------------------------------- */ |