aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla4xxx/ql4_os.c
diff options
context:
space:
mode:
authorVikas Chaudhary <vikas.chaudhary@qlogic.com>2010-07-10 05:21:02 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-07-28 10:05:23 -0400
commitc2660df310a3c445194748b54f51b7224639e742 (patch)
treeb6f8d1410afc4d071e036124dfa59e7afd0aba7e /drivers/scsi/qla4xxx/ql4_os.c
parentf4f5df23bf72208d0c2f1d8be629839924c2f4c2 (diff)
[SCSI] qla4xxx: replace all dev_info, dev_warn, dev_err with ql4_printk
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/qla4xxx/ql4_os.c')
-rw-r--r--drivers/scsi/qla4xxx/ql4_os.c62
1 files changed, 32 insertions, 30 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 64a1288e06b..daf5a4bf9b0 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -588,8 +588,8 @@ static int qla4xxx_mem_alloc(struct scsi_qla_host *ha)
588 ha->queues = dma_alloc_coherent(&ha->pdev->dev, ha->queues_len, 588 ha->queues = dma_alloc_coherent(&ha->pdev->dev, ha->queues_len,
589 &ha->queues_dma, GFP_KERNEL); 589 &ha->queues_dma, GFP_KERNEL);
590 if (ha->queues == NULL) { 590 if (ha->queues == NULL) {
591 dev_warn(&ha->pdev->dev, 591 ql4_printk(KERN_WARNING, ha,
592 "Memory Allocation failed - queues.\n"); 592 "Memory Allocation failed - queues.\n");
593 593
594 goto mem_alloc_error_exit; 594 goto mem_alloc_error_exit;
595 } 595 }
@@ -625,8 +625,8 @@ static int qla4xxx_mem_alloc(struct scsi_qla_host *ha)
625 ha->srb_mempool = mempool_create(SRB_MIN_REQ, mempool_alloc_slab, 625 ha->srb_mempool = mempool_create(SRB_MIN_REQ, mempool_alloc_slab,
626 mempool_free_slab, srb_cachep); 626 mempool_free_slab, srb_cachep);
627 if (ha->srb_mempool == NULL) { 627 if (ha->srb_mempool == NULL) {
628 dev_warn(&ha->pdev->dev, 628 ql4_printk(KERN_WARNING, ha,
629 "Memory Allocation failed - SRB Pool.\n"); 629 "Memory Allocation failed - SRB Pool.\n");
630 630
631 goto mem_alloc_error_exit; 631 goto mem_alloc_error_exit;
632 } 632 }
@@ -1301,7 +1301,7 @@ dpc_post_reset_ha:
1301 DDB_DS_SESSION_ACTIVE) { 1301 DDB_DS_SESSION_ACTIVE) {
1302 atomic_set(&ddb_entry->state, 1302 atomic_set(&ddb_entry->state,
1303 DDB_STATE_ONLINE); 1303 DDB_STATE_ONLINE);
1304 dev_info(&ha->pdev->dev, 1304 ql4_printk(KERN_INFO, ha,
1305 "scsi%ld: %s: ddb[%d]" 1305 "scsi%ld: %s: ddb[%d]"
1306 " marked ONLINE\n", 1306 " marked ONLINE\n",
1307 ha->host_no, __func__, 1307 ha->host_no, __func__,
@@ -1465,12 +1465,12 @@ int qla4xxx_iospace_config(struct scsi_qla_host *ha)
1465 pio_flags = pci_resource_flags(ha->pdev, 0); 1465 pio_flags = pci_resource_flags(ha->pdev, 0);
1466 if (pio_flags & IORESOURCE_IO) { 1466 if (pio_flags & IORESOURCE_IO) {
1467 if (pio_len < MIN_IOBASE_LEN) { 1467 if (pio_len < MIN_IOBASE_LEN) {
1468 dev_warn(&ha->pdev->dev, 1468 ql4_printk(KERN_WARNING, ha,
1469 "Invalid PCI I/O region size\n"); 1469 "Invalid PCI I/O region size\n");
1470 pio = 0; 1470 pio = 0;
1471 } 1471 }
1472 } else { 1472 } else {
1473 dev_warn(&ha->pdev->dev, "region #0 not a PIO resource\n"); 1473 ql4_printk(KERN_WARNING, ha, "region #0 not a PIO resource\n");
1474 pio = 0; 1474 pio = 0;
1475 } 1475 }
1476 1476
@@ -1480,20 +1480,21 @@ int qla4xxx_iospace_config(struct scsi_qla_host *ha)
1480 mmio_flags = pci_resource_flags(ha->pdev, 1); 1480 mmio_flags = pci_resource_flags(ha->pdev, 1);
1481 1481
1482 if (!(mmio_flags & IORESOURCE_MEM)) { 1482 if (!(mmio_flags & IORESOURCE_MEM)) {
1483 dev_err(&ha->pdev->dev, 1483 ql4_printk(KERN_ERR, ha,
1484 "region #0 not an MMIO resource, aborting\n"); 1484 "region #0 not an MMIO resource, aborting\n");
1485 1485
1486 goto iospace_error_exit; 1486 goto iospace_error_exit;
1487 } 1487 }
1488
1488 if (mmio_len < MIN_IOBASE_LEN) { 1489 if (mmio_len < MIN_IOBASE_LEN) {
1489 dev_err(&ha->pdev->dev, 1490 ql4_printk(KERN_ERR, ha,
1490 "Invalid PCI mem region size, aborting\n"); 1491 "Invalid PCI mem region size, aborting\n");
1491 goto iospace_error_exit; 1492 goto iospace_error_exit;
1492 } 1493 }
1493 1494
1494 if (pci_request_regions(ha->pdev, DRIVER_NAME)) { 1495 if (pci_request_regions(ha->pdev, DRIVER_NAME)) {
1495 dev_warn(&ha->pdev->dev, 1496 ql4_printk(KERN_WARNING, ha,
1496 "Failed to reserve PIO/MMIO regions\n"); 1497 "Failed to reserve PIO/MMIO regions\n");
1497 1498
1498 goto iospace_error_exit; 1499 goto iospace_error_exit;
1499 } 1500 }
@@ -1502,8 +1503,8 @@ int qla4xxx_iospace_config(struct scsi_qla_host *ha)
1502 ha->pio_length = pio_len; 1503 ha->pio_length = pio_len;
1503 ha->reg = ioremap(mmio, MIN_IOBASE_LEN); 1504 ha->reg = ioremap(mmio, MIN_IOBASE_LEN);
1504 if (!ha->reg) { 1505 if (!ha->reg) {
1505 dev_err(&ha->pdev->dev, 1506 ql4_printk(KERN_ERR, ha,
1506 "cannot remap MMIO, aborting\n"); 1507 "cannot remap MMIO, aborting\n");
1507 1508
1508 goto iospace_error_exit; 1509 goto iospace_error_exit;
1509 } 1510 }
@@ -1629,7 +1630,7 @@ static int __devinit qla4xxx_probe_adapter(struct pci_dev *pdev,
1629 if (ret) 1630 if (ret)
1630 goto probe_failed_ioconfig; 1631 goto probe_failed_ioconfig;
1631 1632
1632 dev_info(&ha->pdev->dev, "Found an ISP%04x, irq %d, iobase 0x%p\n", 1633 ql4_printk(KERN_INFO, ha, "Found an ISP%04x, irq %d, iobase 0x%p\n",
1633 pdev->device, pdev->irq, ha->reg); 1634 pdev->device, pdev->irq, ha->reg);
1634 1635
1635 qla4xxx_config_dma_addressing(ha); 1636 qla4xxx_config_dma_addressing(ha);
@@ -1645,8 +1646,8 @@ static int __devinit qla4xxx_probe_adapter(struct pci_dev *pdev,
1645 1646
1646 /* Allocate dma buffers */ 1647 /* Allocate dma buffers */
1647 if (qla4xxx_mem_alloc(ha)) { 1648 if (qla4xxx_mem_alloc(ha)) {
1648 dev_warn(&ha->pdev->dev, 1649 ql4_printk(KERN_WARNING, ha,
1649 "[ERROR] Failed to allocate memory for adapter\n"); 1650 "[ERROR] Failed to allocate memory for adapter\n");
1650 1651
1651 ret = -ENOMEM; 1652 ret = -ENOMEM;
1652 goto probe_failed; 1653 goto probe_failed;
@@ -1673,7 +1674,7 @@ static int __devinit qla4xxx_probe_adapter(struct pci_dev *pdev,
1673 } 1674 }
1674 1675
1675 if (!test_bit(AF_ONLINE, &ha->flags)) { 1676 if (!test_bit(AF_ONLINE, &ha->flags)) {
1676 dev_warn(&ha->pdev->dev, "Failed to initialize adapter\n"); 1677 ql4_printk(KERN_WARNING, ha, "Failed to initialize adapter\n");
1677 1678
1678 ret = -ENODEV; 1679 ret = -ENODEV;
1679 goto probe_failed; 1680 goto probe_failed;
@@ -1689,8 +1690,9 @@ static int __devinit qla4xxx_probe_adapter(struct pci_dev *pdev,
1689 1690
1690 ret = scsi_init_shared_tag_map(host, MAX_SRBS); 1691 ret = scsi_init_shared_tag_map(host, MAX_SRBS);
1691 if (ret) { 1692 if (ret) {
1692 dev_warn(&ha->pdev->dev, "scsi_init_shared_tag_map failed\n"); 1693 ql4_printk(KERN_WARNING, ha,
1693 goto probe_failed; 1694 "scsi_init_shared_tag_map failed\n");
1695 goto probe_failed;
1694 } 1696 }
1695 1697
1696 /* Startup the kernel thread for this host adapter. */ 1698 /* Startup the kernel thread for this host adapter. */
@@ -1699,7 +1701,7 @@ static int __devinit qla4xxx_probe_adapter(struct pci_dev *pdev,
1699 sprintf(buf, "qla4xxx_%lu_dpc", ha->host_no); 1701 sprintf(buf, "qla4xxx_%lu_dpc", ha->host_no);
1700 ha->dpc_thread = create_singlethread_workqueue(buf); 1702 ha->dpc_thread = create_singlethread_workqueue(buf);
1701 if (!ha->dpc_thread) { 1703 if (!ha->dpc_thread) {
1702 dev_warn(&ha->pdev->dev, "Unable to start DPC thread!\n"); 1704 ql4_printk(KERN_WARNING, ha, "Unable to start DPC thread!\n");
1703 ret = -ENODEV; 1705 ret = -ENODEV;
1704 goto probe_failed; 1706 goto probe_failed;
1705 } 1707 }
@@ -1958,7 +1960,7 @@ static int qla4xxx_eh_abort(struct scsi_cmnd *cmd)
1958 int ret = SUCCESS; 1960 int ret = SUCCESS;
1959 int wait = 0; 1961 int wait = 0;
1960 1962
1961 dev_info(&ha->pdev->dev, 1963 ql4_printk(KERN_INFO, ha,
1962 "scsi%ld:%d:%d: Abort command issued cmd=%p, pid=%ld\n", 1964 "scsi%ld:%d:%d: Abort command issued cmd=%p, pid=%ld\n",
1963 ha->host_no, id, lun, cmd, serial); 1965 ha->host_no, id, lun, cmd, serial);
1964 1966
@@ -1990,7 +1992,7 @@ static int qla4xxx_eh_abort(struct scsi_cmnd *cmd)
1990 } 1992 }
1991 } 1993 }
1992 1994
1993 dev_info(&ha->pdev->dev, 1995 ql4_printk(KERN_INFO, ha,
1994 "scsi%ld:%d:%d: Abort command - %s\n", 1996 "scsi%ld:%d:%d: Abort command - %s\n",
1995 ha->host_no, id, lun, (ret == SUCCESS) ? "succeded" : "failed"); 1997 ha->host_no, id, lun, (ret == SUCCESS) ? "succeded" : "failed");
1996 1998
@@ -2013,7 +2015,7 @@ static int qla4xxx_eh_device_reset(struct scsi_cmnd *cmd)
2013 if (!ddb_entry) 2015 if (!ddb_entry)
2014 return ret; 2016 return ret;
2015 2017
2016 dev_info(&ha->pdev->dev, 2018 ql4_printk(KERN_INFO, ha,
2017 "scsi%ld:%d:%d:%d: DEVICE RESET ISSUED.\n", ha->host_no, 2019 "scsi%ld:%d:%d:%d: DEVICE RESET ISSUED.\n", ha->host_no,
2018 cmd->device->channel, cmd->device->id, cmd->device->lun); 2020 cmd->device->channel, cmd->device->id, cmd->device->lun);
2019 2021
@@ -2026,13 +2028,13 @@ static int qla4xxx_eh_device_reset(struct scsi_cmnd *cmd)
2026 /* FIXME: wait for hba to go online */ 2028 /* FIXME: wait for hba to go online */
2027 stat = qla4xxx_reset_lun(ha, ddb_entry, cmd->device->lun); 2029 stat = qla4xxx_reset_lun(ha, ddb_entry, cmd->device->lun);
2028 if (stat != QLA_SUCCESS) { 2030 if (stat != QLA_SUCCESS) {
2029 dev_info(&ha->pdev->dev, "DEVICE RESET FAILED. %d\n", stat); 2031 ql4_printk(KERN_INFO, ha, "DEVICE RESET FAILED. %d\n", stat);
2030 goto eh_dev_reset_done; 2032 goto eh_dev_reset_done;
2031 } 2033 }
2032 2034
2033 if (qla4xxx_eh_wait_for_commands(ha, scsi_target(cmd->device), 2035 if (qla4xxx_eh_wait_for_commands(ha, scsi_target(cmd->device),
2034 cmd->device)) { 2036 cmd->device)) {
2035 dev_info(&ha->pdev->dev, 2037 ql4_printk(KERN_INFO, ha,
2036 "DEVICE RESET FAILED - waiting for " 2038 "DEVICE RESET FAILED - waiting for "
2037 "commands.\n"); 2039 "commands.\n");
2038 goto eh_dev_reset_done; 2040 goto eh_dev_reset_done;
@@ -2043,7 +2045,7 @@ static int qla4xxx_eh_device_reset(struct scsi_cmnd *cmd)
2043 MM_LUN_RESET) != QLA_SUCCESS) 2045 MM_LUN_RESET) != QLA_SUCCESS)
2044 goto eh_dev_reset_done; 2046 goto eh_dev_reset_done;
2045 2047
2046 dev_info(&ha->pdev->dev, 2048 ql4_printk(KERN_INFO, ha,
2047 "scsi(%ld:%d:%d:%d): DEVICE RESET SUCCEEDED.\n", 2049 "scsi(%ld:%d:%d:%d): DEVICE RESET SUCCEEDED.\n",
2048 ha->host_no, cmd->device->channel, cmd->device->id, 2050 ha->host_no, cmd->device->channel, cmd->device->id,
2049 cmd->device->lun); 2051 cmd->device->lun);
@@ -2128,7 +2130,7 @@ static int qla4xxx_eh_host_reset(struct scsi_cmnd *cmd)
2128 return FAILED; 2130 return FAILED;
2129 } 2131 }
2130 2132
2131 dev_info(&ha->pdev->dev, 2133 ql4_printk(KERN_INFO, ha,
2132 "scsi(%ld:%d:%d:%d): HOST RESET ISSUED.\n", ha->host_no, 2134 "scsi(%ld:%d:%d:%d): HOST RESET ISSUED.\n", ha->host_no,
2133 cmd->device->channel, cmd->device->id, cmd->device->lun); 2135 cmd->device->channel, cmd->device->id, cmd->device->lun);
2134 2136
@@ -2150,7 +2152,7 @@ static int qla4xxx_eh_host_reset(struct scsi_cmnd *cmd)
2150 if (qla4xxx_recover_adapter(ha) == QLA_SUCCESS) 2152 if (qla4xxx_recover_adapter(ha) == QLA_SUCCESS)
2151 return_status = SUCCESS; 2153 return_status = SUCCESS;
2152 2154
2153 dev_info(&ha->pdev->dev, "HOST RESET %s.\n", 2155 ql4_printk(KERN_INFO, ha, "HOST RESET %s.\n",
2154 return_status == FAILED ? "FAILED" : "SUCCEDED"); 2156 return_status == FAILED ? "FAILED" : "SUCCEDED");
2155 2157
2156 return return_status; 2158 return return_status;