aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2008-06-13 12:52:12 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2008-06-25 19:05:16 -0400
commit531f254e5cdadb894f04ed27107cdb34c15817ea (patch)
treebd9420afda94848c76f49da6eebd67fe39d8c3fa
parent80ccba1186d48fa728dc4b1456cc07ffb07da501 (diff)
PCIE: aer: use dev_printk when possible
Convert printks to use dev_printk(). Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
-rw-r--r--drivers/pci/pcie/aer/aerdrv.c8
-rw-r--r--drivers/pci/pcie/aer/aerdrv_acpi.c8
-rw-r--r--drivers/pci/pcie/aer/aerdrv_core.c24
3 files changed, 19 insertions, 21 deletions
diff --git a/drivers/pci/pcie/aer/aerdrv.c b/drivers/pci/pcie/aer/aerdrv.c
index b7a3aa602d40..77036f46acfe 100644
--- a/drivers/pci/pcie/aer/aerdrv.c
+++ b/drivers/pci/pcie/aer/aerdrv.c
@@ -220,8 +220,7 @@ static int __devinit aer_probe (struct pcie_device *dev,
220 220
221 /* Alloc rpc data structure */ 221 /* Alloc rpc data structure */
222 if (!(rpc = aer_alloc_rpc(dev))) { 222 if (!(rpc = aer_alloc_rpc(dev))) {
223 printk(KERN_DEBUG "%s: Alloc rpc fails on PCIE device[%s]\n", 223 dev_printk(KERN_DEBUG, device, "alloc rpc failed\n");
224 __func__, device->bus_id);
225 aer_remove(dev); 224 aer_remove(dev);
226 return -ENOMEM; 225 return -ENOMEM;
227 } 226 }
@@ -229,8 +228,7 @@ static int __devinit aer_probe (struct pcie_device *dev,
229 /* Request IRQ ISR */ 228 /* Request IRQ ISR */
230 if ((status = request_irq(dev->irq, aer_irq, IRQF_SHARED, "aerdrv", 229 if ((status = request_irq(dev->irq, aer_irq, IRQF_SHARED, "aerdrv",
231 dev))) { 230 dev))) {
232 printk(KERN_DEBUG "%s: Request ISR fails on PCIE device[%s]\n", 231 dev_printk(KERN_DEBUG, device, "request IRQ failed\n");
233 __func__, device->bus_id);
234 aer_remove(dev); 232 aer_remove(dev);
235 return status; 233 return status;
236 } 234 }
@@ -274,7 +272,7 @@ static pci_ers_result_t aer_root_reset(struct pci_dev *dev)
274 * to issue Configuration Requests to those devices. 272 * to issue Configuration Requests to those devices.
275 */ 273 */
276 msleep(200); 274 msleep(200);
277 printk(KERN_DEBUG "Complete link reset at Root[%s]\n", dev->dev.bus_id); 275 dev_printk(KERN_DEBUG, &dev->dev, "Root Port link has been reset\n");
278 276
279 /* Enable Root Port's interrupt in response to error messages */ 277 /* Enable Root Port's interrupt in response to error messages */
280 pci_read_config_dword(dev, pos + PCI_ERR_ROOT_STATUS, &status); 278 pci_read_config_dword(dev, pos + PCI_ERR_ROOT_STATUS, &status);
diff --git a/drivers/pci/pcie/aer/aerdrv_acpi.c b/drivers/pci/pcie/aer/aerdrv_acpi.c
index d39a78dbd026..30f581b8791f 100644
--- a/drivers/pci/pcie/aer/aerdrv_acpi.c
+++ b/drivers/pci/pcie/aer/aerdrv_acpi.c
@@ -50,10 +50,10 @@ int aer_osc_setup(struct pcie_device *pciedev)
50 } 50 }
51 51
52 if (ACPI_FAILURE(status)) { 52 if (ACPI_FAILURE(status)) {
53 printk(KERN_DEBUG "AER service couldn't init device %s - %s\n", 53 dev_printk(KERN_DEBUG, &pciedev->device, "AER service couldn't "
54 pciedev->device.bus_id, 54 "init device: %s\n",
55 (status == AE_SUPPORT || status == AE_NOT_FOUND) ? 55 (status == AE_SUPPORT || status == AE_NOT_FOUND) ?
56 "no _OSC support" : "Run ACPI _OSC fails"); 56 "no _OSC support" : "_OSC failed");
57 return -1; 57 return -1;
58 } 58 }
59 59
diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c
index aaa82392d1dc..ee5e7b5176d0 100644
--- a/drivers/pci/pcie/aer/aerdrv_core.c
+++ b/drivers/pci/pcie/aer/aerdrv_core.c
@@ -221,9 +221,9 @@ static void report_error_detected(struct pci_dev *dev, void *data)
221 * of a driver for this device is unaware of 221 * of a driver for this device is unaware of
222 * its hw state. 222 * its hw state.
223 */ 223 */
224 printk(KERN_DEBUG "Device ID[%s] has %s\n", 224 dev_printk(KERN_DEBUG, &dev->dev, "device has %s\n",
225 dev->dev.bus_id, (dev->driver) ? 225 dev->driver ?
226 "no AER-aware driver" : "no driver"); 226 "no AER-aware driver" : "no driver");
227 } 227 }
228 return; 228 return;
229 } 229 }
@@ -304,7 +304,7 @@ static pci_ers_result_t broadcast_error_message(struct pci_dev *dev,
304{ 304{
305 struct aer_broadcast_data result_data; 305 struct aer_broadcast_data result_data;
306 306
307 printk(KERN_DEBUG "Broadcast %s message\n", error_mesg); 307 dev_printk(KERN_DEBUG, &dev->dev, "broadcast %s message\n", error_mesg);
308 result_data.state = state; 308 result_data.state = state;
309 if (cb == report_error_detected) 309 if (cb == report_error_detected)
310 result_data.result = PCI_ERS_RESULT_CAN_RECOVER; 310 result_data.result = PCI_ERS_RESULT_CAN_RECOVER;
@@ -404,18 +404,16 @@ static pci_ers_result_t reset_link(struct pcie_device *aerdev,
404 data.aer_driver = 404 data.aer_driver =
405 to_service_driver(aerdev->device.driver); 405 to_service_driver(aerdev->device.driver);
406 } else { 406 } else {
407 printk(KERN_DEBUG "No link-reset support to Device ID" 407 dev_printk(KERN_DEBUG, &dev->dev, "no link-reset "
408 "[%s]\n", 408 "support\n");
409 dev->dev.bus_id);
410 return PCI_ERS_RESULT_DISCONNECT; 409 return PCI_ERS_RESULT_DISCONNECT;
411 } 410 }
412 } 411 }
413 412
414 status = data.aer_driver->reset_link(udev); 413 status = data.aer_driver->reset_link(udev);
415 if (status != PCI_ERS_RESULT_RECOVERED) { 414 if (status != PCI_ERS_RESULT_RECOVERED) {
416 printk(KERN_DEBUG "Link reset at upstream Device ID" 415 dev_printk(KERN_DEBUG, &dev->dev, "link reset at upstream "
417 "[%s] failed\n", 416 "device %s failed\n", pci_name(udev));
418 udev->dev.bus_id);
419 return PCI_ERS_RESULT_DISCONNECT; 417 return PCI_ERS_RESULT_DISCONNECT;
420 } 418 }
421 419
@@ -511,10 +509,12 @@ static void handle_error_source(struct pcie_device * aerdev,
511 } else { 509 } else {
512 status = do_recovery(aerdev, dev, info.severity); 510 status = do_recovery(aerdev, dev, info.severity);
513 if (status == PCI_ERS_RESULT_RECOVERED) { 511 if (status == PCI_ERS_RESULT_RECOVERED) {
514 printk(KERN_DEBUG "AER driver successfully recovered\n"); 512 dev_printk(KERN_DEBUG, &dev->dev, "AER driver "
513 "successfully recovered\n");
515 } else { 514 } else {
516 /* TODO: Should kernel panic here? */ 515 /* TODO: Should kernel panic here? */
517 printk(KERN_DEBUG "AER driver didn't recover\n"); 516 dev_printk(KERN_DEBUG, &dev->dev, "AER driver didn't "
517 "recover\n");
518 } 518 }
519 } 519 }
520} 520}