diff options
author | Vikas Chaudhary <vikas.chaudhary@qlogic.com> | 2010-07-10 05:21:02 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-28 10:05:23 -0400 |
commit | c2660df310a3c445194748b54f51b7224639e742 (patch) | |
tree | b6f8d1410afc4d071e036124dfa59e7afd0aba7e | |
parent | f4f5df23bf72208d0c2f1d8be629839924c2f4c2 (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>
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_init.c | 50 | ||||
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_isr.c | 8 | ||||
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_mbx.c | 4 | ||||
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_os.c | 62 |
4 files changed, 63 insertions, 61 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c index 539546df0376..5fc19c44bada 100644 --- a/drivers/scsi/qla4xxx/ql4_init.c +++ b/drivers/scsi/qla4xxx/ql4_init.c | |||
@@ -297,7 +297,7 @@ static int qla4xxx_fw_ready(struct scsi_qla_host *ha) | |||
297 | uint32_t timeout_count; | 297 | uint32_t timeout_count; |
298 | int ready = 0; | 298 | int ready = 0; |
299 | 299 | ||
300 | DEBUG2(dev_info(&ha->pdev->dev, "Waiting for Firmware Ready..\n")); | 300 | DEBUG2(ql4_printk(KERN_INFO, ha, "Waiting for Firmware Ready..\n")); |
301 | for (timeout_count = ADAPTER_INIT_TOV; timeout_count > 0; | 301 | for (timeout_count = ADAPTER_INIT_TOV; timeout_count > 0; |
302 | timeout_count--) { | 302 | timeout_count--) { |
303 | if (test_and_clear_bit(DPC_GET_DHCP_IP_ADDR, &ha->dpc_flags)) | 303 | if (test_and_clear_bit(DPC_GET_DHCP_IP_ADDR, &ha->dpc_flags)) |
@@ -370,29 +370,29 @@ static int qla4xxx_fw_ready(struct scsi_qla_host *ha) | |||
370 | 370 | ||
371 | if (!qla4xxx_wait_for_ip_config(ha) || | 371 | if (!qla4xxx_wait_for_ip_config(ha) || |
372 | timeout_count == 1) { | 372 | timeout_count == 1) { |
373 | DEBUG2(dev_info(&ha->pdev->dev, | 373 | DEBUG2(ql4_printk(KERN_INFO, ha, |
374 | "Firmware Ready..\n")); | 374 | "Firmware Ready..\n")); |
375 | /* The firmware is ready to process SCSI | 375 | /* The firmware is ready to process SCSI |
376 | commands. */ | 376 | commands. */ |
377 | DEBUG2(dev_info(&ha->pdev->dev, | 377 | DEBUG2(ql4_printk(KERN_INFO, ha, |
378 | "scsi%ld: %s: MEDIA TYPE" | 378 | "scsi%ld: %s: MEDIA TYPE" |
379 | " - %s\n", ha->host_no, | 379 | " - %s\n", ha->host_no, |
380 | __func__, (ha->addl_fw_state & | 380 | __func__, (ha->addl_fw_state & |
381 | FW_ADDSTATE_OPTICAL_MEDIA) | 381 | FW_ADDSTATE_OPTICAL_MEDIA) |
382 | != 0 ? "OPTICAL" : "COPPER")); | 382 | != 0 ? "OPTICAL" : "COPPER")); |
383 | DEBUG2(dev_info(&ha->pdev->dev, | 383 | DEBUG2(ql4_printk(KERN_INFO, ha, |
384 | "scsi%ld: %s: DHCPv4 STATE" | 384 | "scsi%ld: %s: DHCPv4 STATE" |
385 | " Enabled %s\n", ha->host_no, | 385 | " Enabled %s\n", ha->host_no, |
386 | __func__, (ha->addl_fw_state & | 386 | __func__, (ha->addl_fw_state & |
387 | FW_ADDSTATE_DHCPv4_ENABLED) != 0 ? | 387 | FW_ADDSTATE_DHCPv4_ENABLED) != 0 ? |
388 | "YES" : "NO")); | 388 | "YES" : "NO")); |
389 | DEBUG2(dev_info(&ha->pdev->dev, | 389 | DEBUG2(ql4_printk(KERN_INFO, ha, |
390 | "scsi%ld: %s: LINK %s\n", | 390 | "scsi%ld: %s: LINK %s\n", |
391 | ha->host_no, __func__, | 391 | ha->host_no, __func__, |
392 | (ha->addl_fw_state & | 392 | (ha->addl_fw_state & |
393 | FW_ADDSTATE_LINK_UP) != 0 ? | 393 | FW_ADDSTATE_LINK_UP) != 0 ? |
394 | "UP" : "DOWN")); | 394 | "UP" : "DOWN")); |
395 | DEBUG2(dev_info(&ha->pdev->dev, | 395 | DEBUG2(ql4_printk(KERN_INFO, ha, |
396 | "scsi%ld: %s: iSNS Service " | 396 | "scsi%ld: %s: iSNS Service " |
397 | "Started %s\n", | 397 | "Started %s\n", |
398 | ha->host_no, __func__, | 398 | ha->host_no, __func__, |
@@ -445,7 +445,7 @@ static int qla4xxx_init_firmware(struct scsi_qla_host *ha) | |||
445 | { | 445 | { |
446 | int status = QLA_ERROR; | 446 | int status = QLA_ERROR; |
447 | 447 | ||
448 | dev_info(&ha->pdev->dev, "Initializing firmware..\n"); | 448 | ql4_printk(KERN_INFO, ha, "Initializing firmware..\n"); |
449 | if (qla4xxx_initialize_fw_cb(ha) == QLA_ERROR) { | 449 | if (qla4xxx_initialize_fw_cb(ha) == QLA_ERROR) { |
450 | DEBUG2(printk("scsi%ld: %s: Failed to initialize firmware " | 450 | DEBUG2(printk("scsi%ld: %s: Failed to initialize firmware " |
451 | "control block\n", ha->host_no, __func__)); | 451 | "control block\n", ha->host_no, __func__)); |
@@ -694,18 +694,18 @@ int qla4_is_relogin_allowed(struct scsi_qla_host *ha, uint32_t conn_err) | |||
694 | err_code = ((conn_err & 0x00ff0000) >> 16); | 694 | err_code = ((conn_err & 0x00ff0000) >> 16); |
695 | login_rsp_sts_class = ((conn_err & 0x0000ff00) >> 8); | 695 | login_rsp_sts_class = ((conn_err & 0x0000ff00) >> 8); |
696 | if (err_code == 0x1c || err_code == 0x06) { | 696 | if (err_code == 0x1c || err_code == 0x06) { |
697 | DEBUG2(dev_info(&ha->pdev->dev, | 697 | DEBUG2(ql4_printk(KERN_INFO, ha, |
698 | ": conn_err=0x%08x, send target completed" | 698 | ": conn_err=0x%08x, send target completed" |
699 | " or access denied failure\n", conn_err)); | 699 | " or access denied failure\n", conn_err)); |
700 | relogin = 0; | 700 | relogin = 0; |
701 | } | 701 | } |
702 | if ((err_code == 0x08) && (login_rsp_sts_class == 0x02)) { | 702 | if ((err_code == 0x08) && (login_rsp_sts_class == 0x02)) { |
703 | /* Login Response PDU returned an error. | 703 | /* Login Response PDU returned an error. |
704 | Login Response Status in Error Code Detail | 704 | Login Response Status in Error Code Detail |
705 | indicates login should not be retried.*/ | 705 | indicates login should not be retried.*/ |
706 | DEBUG2(dev_info(&ha->pdev->dev, | 706 | DEBUG2(ql4_printk(KERN_INFO, ha, |
707 | ": conn_err=0x%08x, do not retry relogin\n", | 707 | ": conn_err=0x%08x, do not retry relogin\n", |
708 | conn_err)); | 708 | conn_err)); |
709 | relogin = 0; | 709 | relogin = 0; |
710 | } | 710 | } |
711 | 711 | ||
@@ -736,13 +736,13 @@ static int qla4xxx_build_ddb_list(struct scsi_qla_host *ha) | |||
736 | fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), | 736 | fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), |
737 | &fw_ddb_entry_dma, GFP_KERNEL); | 737 | &fw_ddb_entry_dma, GFP_KERNEL); |
738 | if (fw_ddb_entry == NULL) { | 738 | if (fw_ddb_entry == NULL) { |
739 | DEBUG2(dev_info(&ha->pdev->dev, "%s: DMA alloc failed\n", | 739 | DEBUG2(ql4_printk(KERN_INFO, ha, "%s: DMA alloc failed\n", |
740 | __func__)); | 740 | __func__)); |
741 | 741 | ||
742 | goto exit_build_ddb_list_no_free; | 742 | goto exit_build_ddb_list_no_free; |
743 | } | 743 | } |
744 | 744 | ||
745 | dev_info(&ha->pdev->dev, "Initializing DDBs ...\n"); | 745 | ql4_printk(KERN_INFO, ha, "Initializing DDBs ...\n"); |
746 | for (fw_ddb_index = 0; fw_ddb_index < MAX_DDB_ENTRIES; | 746 | for (fw_ddb_index = 0; fw_ddb_index < MAX_DDB_ENTRIES; |
747 | fw_ddb_index = next_fw_ddb_index) { | 747 | fw_ddb_index = next_fw_ddb_index) { |
748 | /* First, let's see if a device exists here */ | 748 | /* First, let's see if a device exists here */ |
@@ -826,7 +826,7 @@ next_one: | |||
826 | } | 826 | } |
827 | 827 | ||
828 | status = QLA_SUCCESS; | 828 | status = QLA_SUCCESS; |
829 | dev_info(&ha->pdev->dev, "DDB list done..\n"); | 829 | ql4_printk(KERN_INFO, ha, "DDB list done..\n"); |
830 | 830 | ||
831 | exit_build_ddb_list: | 831 | exit_build_ddb_list: |
832 | dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), fw_ddb_entry, | 832 | dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), fw_ddb_entry, |
@@ -1080,17 +1080,17 @@ static int qla4xxx_config_nvram(struct scsi_qla_host *ha) | |||
1080 | } | 1080 | } |
1081 | 1081 | ||
1082 | /* Get EEPRom Parameters from NVRAM and validate */ | 1082 | /* Get EEPRom Parameters from NVRAM and validate */ |
1083 | dev_info(&ha->pdev->dev, "Configuring NVRAM ...\n"); | 1083 | ql4_printk(KERN_INFO, ha, "Configuring NVRAM ...\n"); |
1084 | if (qla4xxx_is_nvram_configuration_valid(ha) == QLA_SUCCESS) { | 1084 | if (qla4xxx_is_nvram_configuration_valid(ha) == QLA_SUCCESS) { |
1085 | spin_lock_irqsave(&ha->hardware_lock, flags); | 1085 | spin_lock_irqsave(&ha->hardware_lock, flags); |
1086 | extHwConfig.Asuint32_t = | 1086 | extHwConfig.Asuint32_t = |
1087 | rd_nvram_word(ha, eeprom_ext_hw_conf_offset(ha)); | 1087 | rd_nvram_word(ha, eeprom_ext_hw_conf_offset(ha)); |
1088 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | 1088 | spin_unlock_irqrestore(&ha->hardware_lock, flags); |
1089 | } else { | 1089 | } else { |
1090 | dev_warn(&ha->pdev->dev, | 1090 | ql4_printk(KERN_WARNING, ha, |
1091 | "scsi%ld: %s: EEProm checksum invalid. " | 1091 | "scsi%ld: %s: EEProm checksum invalid. " |
1092 | "Please update your EEPROM\n", ha->host_no, | 1092 | "Please update your EEPROM\n", ha->host_no, |
1093 | __func__); | 1093 | __func__); |
1094 | 1094 | ||
1095 | /* Attempt to set defaults */ | 1095 | /* Attempt to set defaults */ |
1096 | if (is_qla4010(ha)) | 1096 | if (is_qla4010(ha)) |
@@ -1128,7 +1128,7 @@ void qla4xxx_pci_config(struct scsi_qla_host *ha) | |||
1128 | uint16_t w; | 1128 | uint16_t w; |
1129 | int status; | 1129 | int status; |
1130 | 1130 | ||
1131 | dev_info(&ha->pdev->dev, "Configuring PCI space...\n"); | 1131 | ql4_printk(KERN_INFO, ha, "Configuring PCI space...\n"); |
1132 | 1132 | ||
1133 | pci_set_master(ha->pdev); | 1133 | pci_set_master(ha->pdev); |
1134 | status = pci_set_mwi(ha->pdev); | 1134 | status = pci_set_mwi(ha->pdev); |
@@ -1150,7 +1150,7 @@ static int qla4xxx_start_firmware_from_flash(struct scsi_qla_host *ha) | |||
1150 | unsigned long flags; | 1150 | unsigned long flags; |
1151 | uint32_t mbox_status; | 1151 | uint32_t mbox_status; |
1152 | 1152 | ||
1153 | dev_info(&ha->pdev->dev, "Starting firmware ...\n"); | 1153 | ql4_printk(KERN_INFO, ha, "Starting firmware ...\n"); |
1154 | 1154 | ||
1155 | /* | 1155 | /* |
1156 | * Start firmware from flash ROM | 1156 | * Start firmware from flash ROM |
@@ -1569,7 +1569,7 @@ int qla4xxx_process_ddb_changed(struct scsi_qla_host *ha, uint32_t fw_ddb_index, | |||
1569 | } else { | 1569 | } else { |
1570 | /* Device went away, mark device missing */ | 1570 | /* Device went away, mark device missing */ |
1571 | if (atomic_read(&ddb_entry->state) == DDB_STATE_ONLINE) { | 1571 | if (atomic_read(&ddb_entry->state) == DDB_STATE_ONLINE) { |
1572 | DEBUG2(dev_info(&ha->pdev->dev, "%s mark missing " | 1572 | DEBUG2(ql4_printk(KERN_INFO, ha, "%s mark missing " |
1573 | "ddb_entry 0x%p sess 0x%p conn 0x%p\n", | 1573 | "ddb_entry 0x%p sess 0x%p conn 0x%p\n", |
1574 | __func__, ddb_entry, | 1574 | __func__, ddb_entry, |
1575 | ddb_entry->sess, ddb_entry->conn)); | 1575 | ddb_entry->sess, ddb_entry->conn)); |
diff --git a/drivers/scsi/qla4xxx/ql4_isr.c b/drivers/scsi/qla4xxx/ql4_isr.c index 68d7942bf2e3..aa65697a86b4 100644 --- a/drivers/scsi/qla4xxx/ql4_isr.c +++ b/drivers/scsi/qla4xxx/ql4_isr.c | |||
@@ -122,8 +122,8 @@ static void qla4xxx_status_entry(struct scsi_qla_host *ha, | |||
122 | "handle 0x%x, sp=%p. This cmd may have already " | 122 | "handle 0x%x, sp=%p. This cmd may have already " |
123 | "been completed.\n", ha->host_no, __func__, | 123 | "been completed.\n", ha->host_no, __func__, |
124 | le32_to_cpu(sts_entry->handle), srb)); | 124 | le32_to_cpu(sts_entry->handle), srb)); |
125 | dev_warn(&ha->pdev->dev, "%s invalid status entry:" | 125 | ql4_printk(KERN_WARNING, ha, "%s invalid status entry:" |
126 | " handle=0x%0x\n", __func__, sts_entry->handle); | 126 | " handle=0x%0x\n", __func__, sts_entry->handle); |
127 | set_bit(DPC_RESET_HA, &ha->dpc_flags); | 127 | set_bit(DPC_RESET_HA, &ha->dpc_flags); |
128 | return; | 128 | return; |
129 | } | 129 | } |
@@ -134,8 +134,8 @@ static void qla4xxx_status_entry(struct scsi_qla_host *ha, | |||
134 | "OS pkt->handle=%d srb=%p srb->state:%d\n", | 134 | "OS pkt->handle=%d srb=%p srb->state:%d\n", |
135 | ha->host_no, __func__, sts_entry->handle, | 135 | ha->host_no, __func__, sts_entry->handle, |
136 | srb, srb->state)); | 136 | srb, srb->state)); |
137 | dev_warn(&ha->pdev->dev, "Command is NULL:" | 137 | ql4_printk(KERN_WARNING, ha, "Command is NULL:" |
138 | " already returned to OS (srb=%p)\n", srb); | 138 | " already returned to OS (srb=%p)\n", srb); |
139 | return; | 139 | return; |
140 | } | 140 | } |
141 | 141 | ||
diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c index 0d3a65268419..940ee561ee0a 100644 --- a/drivers/scsi/qla4xxx/ql4_mbx.c +++ b/drivers/scsi/qla4xxx/ql4_mbx.c | |||
@@ -607,7 +607,7 @@ int qla4xxx_get_fwddb_entry(struct scsi_qla_host *ha, | |||
607 | if (fw_ddb_entry) { | 607 | if (fw_ddb_entry) { |
608 | options = le16_to_cpu(fw_ddb_entry->options); | 608 | options = le16_to_cpu(fw_ddb_entry->options); |
609 | if (options & DDB_OPT_IPV6_DEVICE) { | 609 | if (options & DDB_OPT_IPV6_DEVICE) { |
610 | dev_info(&ha->pdev->dev, "%s: DDB[%d] MB0 %04x Tot %d " | 610 | ql4_printk(KERN_INFO, ha, "%s: DDB[%d] MB0 %04x Tot %d " |
611 | "Next %d State %04x ConnErr %08x %pI6 " | 611 | "Next %d State %04x ConnErr %08x %pI6 " |
612 | ":%04d \"%s\"\n", __func__, fw_ddb_index, | 612 | ":%04d \"%s\"\n", __func__, fw_ddb_index, |
613 | mbox_sts[0], mbox_sts[2], mbox_sts[3], | 613 | mbox_sts[0], mbox_sts[2], mbox_sts[3], |
@@ -616,7 +616,7 @@ int qla4xxx_get_fwddb_entry(struct scsi_qla_host *ha, | |||
616 | le16_to_cpu(fw_ddb_entry->port), | 616 | le16_to_cpu(fw_ddb_entry->port), |
617 | fw_ddb_entry->iscsi_name); | 617 | fw_ddb_entry->iscsi_name); |
618 | } else { | 618 | } else { |
619 | dev_info(&ha->pdev->dev, "%s: DDB[%d] MB0 %04x Tot %d " | 619 | ql4_printk(KERN_INFO, ha, "%s: DDB[%d] MB0 %04x Tot %d " |
620 | "Next %d State %04x ConnErr %08x %pI4 " | 620 | "Next %d State %04x ConnErr %08x %pI4 " |
621 | ":%04d \"%s\"\n", __func__, fw_ddb_index, | 621 | ":%04d \"%s\"\n", __func__, fw_ddb_index, |
622 | mbox_sts[0], mbox_sts[2], mbox_sts[3], | 622 | mbox_sts[0], mbox_sts[2], mbox_sts[3], |
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 64a1288e06b4..daf5a4bf9b0a 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; |