Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: mpt3sas: Convert uses of pr_<level> with MPT3SAS_FMT to ioc_<level>

Use a more common logging style.

Done using the perl script below and some typing

$ git grep --name-only -w MPT3SAS_FMT -- "*.c" | \
xargs perl -i -e 'local $/; while (<>) { s/\bpr_(info|err|notice|warn)\s*\(\s*MPT3SAS_FMT\s*("[^"]+"(?:\s*\\?\s*"[^"]+"\s*){0,5}\s*),\s*ioc->name\s*/ioc_\1(ioc, \2/g; print;}'

Miscellanea for these conversions:

o Coalesce formats
o Realign arguments
o Remove unnecessary parentheses
o Use casts to u64 instead of unsigned long long where appropriate
o Convert broken pr_info uses to pr_cont
o Fix broken format string concatenation with line continuations and
excess whitespace

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Suganath Prabu <suganath-prabu.subramani@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Joe Perches and committed by
Martin K. Petersen
919d8a3f 645a20c6

+1532 -1981
+464 -599
drivers/scsi/mpt3sas/mpt3sas_base.c
··· 122 122 if (!(status & MPT3_CMD_RESET)) 123 123 issue_reset = 1; 124 124 125 - pr_err(MPT3SAS_FMT "Command %s\n", ioc->name, 126 - ((issue_reset == 0) ? "terminated due to Host Reset" : "Timeout")); 125 + ioc_err(ioc, "Command %s\n", 126 + issue_reset == 0 ? "terminated due to Host Reset" : "Timeout"); 127 127 _debug_dump_mf(mpi_request, sz); 128 128 129 129 return issue_reset; ··· 336 336 return ct->chain_buffer; 337 337 } 338 338 } 339 - pr_info(MPT3SAS_FMT 340 - "Provided chain_buffer_dma address is not in the lookup list\n", 341 - ioc->name); 339 + ioc_info(ioc, "Provided chain_buffer_dma address is not in the lookup list\n"); 342 340 return NULL; 343 341 } 344 342 ··· 392 394 /* Get scsi_cmd using smid */ 393 395 scmd = mpt3sas_scsih_scsi_lookup_get(ioc, smid); 394 396 if (scmd == NULL) { 395 - pr_err(MPT3SAS_FMT "scmd is NULL\n", ioc->name); 397 + ioc_err(ioc, "scmd is NULL\n"); 396 398 return; 397 399 } 398 400 ··· 564 566 565 567 doorbell = mpt3sas_base_get_iocstate(ioc, 0); 566 568 if ((doorbell & MPI2_IOC_STATE_MASK) == MPI2_IOC_STATE_MASK) { 567 - pr_err(MPT3SAS_FMT "SAS host is non-operational !!!!\n", 568 - ioc->name); 569 + ioc_err(ioc, "SAS host is non-operational !!!!\n"); 569 570 570 571 /* It may be possible that EEH recovery can resolve some of 571 572 * pci bus failure issues rather removing the dead ioc function ··· 597 600 p = kthread_run(mpt3sas_remove_dead_ioc_func, ioc, 598 601 "%s_dead_ioc_%d", ioc->driver_name, ioc->id); 599 602 if (IS_ERR(p)) 600 - pr_err(MPT3SAS_FMT 601 - "%s: Running mpt3sas_dead_ioc thread failed !!!!\n", 602 - ioc->name, __func__); 603 + ioc_err(ioc, "%s: Running mpt3sas_dead_ioc thread failed !!!!\n", 604 + __func__); 603 605 else 604 - pr_err(MPT3SAS_FMT 605 - "%s: Running mpt3sas_dead_ioc thread success !!!!\n", 606 - ioc->name, __func__); 606 + ioc_err(ioc, "%s: Running mpt3sas_dead_ioc thread success !!!!\n", 607 + __func__); 607 608 return; /* don't rearm timer */ 608 609 } 609 610 ··· 609 614 610 615 if ((doorbell & MPI2_IOC_STATE_MASK) != MPI2_IOC_STATE_OPERATIONAL) { 611 616 rc = mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER); 612 - pr_warn(MPT3SAS_FMT "%s: hard reset: %s\n", ioc->name, 613 - __func__, (rc == 0) ? "success" : "failed"); 617 + ioc_warn(ioc, "%s: hard reset: %s\n", 618 + __func__, rc == 0 ? "success" : "failed"); 614 619 doorbell = mpt3sas_base_get_iocstate(ioc, 0); 615 620 if ((doorbell & MPI2_IOC_STATE_MASK) == MPI2_IOC_STATE_FAULT) 616 621 mpt3sas_base_fault_info(ioc, doorbell & ··· 652 657 ioc->fault_reset_work_q = 653 658 create_singlethread_workqueue(ioc->fault_reset_work_q_name); 654 659 if (!ioc->fault_reset_work_q) { 655 - pr_err(MPT3SAS_FMT "%s: failed (line=%d)\n", 656 - ioc->name, __func__, __LINE__); 660 + ioc_err(ioc, "%s: failed (line=%d)\n", __func__, __LINE__); 657 661 return; 658 662 } 659 663 spin_lock_irqsave(&ioc->ioc_reset_in_progress_lock, flags); ··· 694 700 void 695 701 mpt3sas_base_fault_info(struct MPT3SAS_ADAPTER *ioc , u16 fault_code) 696 702 { 697 - pr_err(MPT3SAS_FMT "fault_state(0x%04x)!\n", 698 - ioc->name, fault_code); 703 + ioc_err(ioc, "fault_state(0x%04x)!\n", fault_code); 699 704 } 700 705 701 706 /** ··· 721 728 mpt3sas_base_fault_info(ioc , doorbell); 722 729 else { 723 730 writel(0xC0FFEE00, &ioc->chip->Doorbell); 724 - pr_err(MPT3SAS_FMT "Firmware is halted due to command timeout\n", 725 - ioc->name); 731 + ioc_err(ioc, "Firmware is halted due to command timeout\n"); 726 732 } 727 733 728 734 if (ioc->fwfault_debug == 2) ··· 948 956 break; 949 957 } 950 958 951 - pr_warn(MPT3SAS_FMT "ioc_status: %s(0x%04x), request(0x%p),(%s)\n", 952 - ioc->name, desc, ioc_status, request_hdr, func_str); 959 + ioc_warn(ioc, "ioc_status: %s(0x%04x), request(0x%p),(%s)\n", 960 + desc, ioc_status, request_hdr, func_str); 953 961 954 962 _debug_dump_mf(request_hdr, frame_sz/4); 955 963 } ··· 995 1003 { 996 1004 Mpi2EventDataSasDiscovery_t *event_data = 997 1005 (Mpi2EventDataSasDiscovery_t *)mpi_reply->EventData; 998 - pr_info(MPT3SAS_FMT "Discovery: (%s)", ioc->name, 999 - (event_data->ReasonCode == MPI2_EVENT_SAS_DISC_RC_STARTED) ? 1000 - "start" : "stop"); 1006 + ioc_info(ioc, "Discovery: (%s)", 1007 + event_data->ReasonCode == MPI2_EVENT_SAS_DISC_RC_STARTED ? 1008 + "start" : "stop"); 1001 1009 if (event_data->DiscoveryStatus) 1002 1010 pr_cont(" discovery_status(0x%08x)", 1003 1011 le32_to_cpu(event_data->DiscoveryStatus)); ··· 1051 1059 { 1052 1060 Mpi26EventDataPCIeEnumeration_t *event_data = 1053 1061 (Mpi26EventDataPCIeEnumeration_t *)mpi_reply->EventData; 1054 - pr_info(MPT3SAS_FMT "PCIE Enumeration: (%s)", ioc->name, 1055 - (event_data->ReasonCode == 1056 - MPI26_EVENT_PCIE_ENUM_RC_STARTED) ? 1057 - "start" : "stop"); 1062 + ioc_info(ioc, "PCIE Enumeration: (%s)", 1063 + event_data->ReasonCode == MPI26_EVENT_PCIE_ENUM_RC_STARTED ? 1064 + "start" : "stop"); 1058 1065 if (event_data->EnumerationStatus) 1059 - pr_info("enumeration_status(0x%08x)", 1060 - le32_to_cpu(event_data->EnumerationStatus)); 1061 - pr_info("\n"); 1066 + pr_cont("enumeration_status(0x%08x)", 1067 + le32_to_cpu(event_data->EnumerationStatus)); 1068 + pr_cont("\n"); 1062 1069 return; 1063 1070 } 1064 1071 case MPI2_EVENT_PCIE_TOPOLOGY_CHANGE_LIST: ··· 1068 1077 if (!desc) 1069 1078 return; 1070 1079 1071 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, desc); 1080 + ioc_info(ioc, "%s\n", desc); 1072 1081 } 1073 1082 1074 1083 /** ··· 1119 1128 break; 1120 1129 } 1121 1130 1122 - pr_warn(MPT3SAS_FMT 1123 - "log_info(0x%08x): originator(%s), code(0x%02x), sub_code(0x%04x)\n", 1124 - ioc->name, log_info, 1125 - originator_str, sas_loginfo.dw.code, 1126 - sas_loginfo.dw.subcode); 1131 + ioc_warn(ioc, "log_info(0x%08x): originator(%s), code(0x%02x), sub_code(0x%04x)\n", 1132 + log_info, 1133 + originator_str, sas_loginfo.dw.code, sas_loginfo.dw.subcode); 1127 1134 } 1128 1135 1129 1136 /** ··· 1141 1152 1142 1153 mpi_reply = mpt3sas_base_get_reply_virt_addr(ioc, reply); 1143 1154 if (unlikely(!mpi_reply)) { 1144 - pr_err(MPT3SAS_FMT "mpi_reply not valid at %s:%d/%s()!\n", 1145 - ioc->name, __FILE__, __LINE__, __func__); 1155 + ioc_err(ioc, "mpi_reply not valid at %s:%d/%s()!\n", 1156 + __FILE__, __LINE__, __func__); 1146 1157 return; 1147 1158 } 1148 1159 ioc_status = le16_to_cpu(mpi_reply->IOCStatus); ··· 1238 1249 delayed_event_ack->EventContext = mpi_reply->EventContext; 1239 1250 list_add_tail(&delayed_event_ack->list, 1240 1251 &ioc->delayed_event_ack_list); 1241 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 1242 - "DELAYED: EVENT ACK: event (0x%04x)\n", 1243 - ioc->name, le16_to_cpu(mpi_reply->Event))); 1252 + dewtprintk(ioc, 1253 + ioc_info(ioc, "DELAYED: EVENT ACK: event (0x%04x)\n", 1254 + le16_to_cpu(mpi_reply->Event))); 1244 1255 goto out; 1245 1256 } 1246 1257 ··· 2587 2598 2588 2599 out: 2589 2600 si_meminfo(&s); 2590 - pr_info(MPT3SAS_FMT 2591 - "%d BIT PCI BUS DMA ADDRESSING SUPPORTED, total mem (%ld kB)\n", 2592 - ioc->name, ioc->dma_mask, convert_to_kb(s.totalram)); 2601 + ioc_info(ioc, "%d BIT PCI BUS DMA ADDRESSING SUPPORTED, total mem (%ld kB)\n", 2602 + ioc->dma_mask, convert_to_kb(s.totalram)); 2593 2603 2594 2604 return 0; 2595 2605 } ··· 2627 2639 2628 2640 base = pci_find_capability(ioc->pdev, PCI_CAP_ID_MSIX); 2629 2641 if (!base) { 2630 - dfailprintk(ioc, pr_info(MPT3SAS_FMT "msix not supported\n", 2631 - ioc->name)); 2642 + dfailprintk(ioc, ioc_info(ioc, "msix not supported\n")); 2632 2643 return -EINVAL; 2633 2644 } 2634 2645 ··· 2645 2658 pci_read_config_word(ioc->pdev, base + 2, &message_control); 2646 2659 ioc->msix_vector_count = (message_control & 0x3FF) + 1; 2647 2660 } 2648 - dinitprintk(ioc, pr_info(MPT3SAS_FMT 2649 - "msix is supported, vector_count(%d)\n", 2650 - ioc->name, ioc->msix_vector_count)); 2661 + dinitprintk(ioc, ioc_info(ioc, "msix is supported, vector_count(%d)\n", 2662 + ioc->msix_vector_count)); 2651 2663 return 0; 2652 2664 } 2653 2665 ··· 2688 2702 2689 2703 reply_q = kzalloc(sizeof(struct adapter_reply_queue), GFP_KERNEL); 2690 2704 if (!reply_q) { 2691 - pr_err(MPT3SAS_FMT "unable to allocate memory %d!\n", 2692 - ioc->name, (int)sizeof(struct adapter_reply_queue)); 2705 + ioc_err(ioc, "unable to allocate memory %zu!\n", 2706 + sizeof(struct adapter_reply_queue)); 2693 2707 return -ENOMEM; 2694 2708 } 2695 2709 reply_q->ioc = ioc; ··· 2747 2761 const cpumask_t *mask = pci_irq_get_affinity(ioc->pdev, 2748 2762 reply_q->msix_index); 2749 2763 if (!mask) { 2750 - pr_warn(MPT3SAS_FMT "no affinity for msi %x\n", 2751 - ioc->name, reply_q->msix_index); 2764 + ioc_warn(ioc, "no affinity for msi %x\n", 2765 + reply_q->msix_index); 2752 2766 continue; 2753 2767 } 2754 2768 ··· 2843 2857 r = pci_alloc_irq_vectors(ioc->pdev, 1, ioc->reply_queue_count, 2844 2858 irq_flags); 2845 2859 if (r < 0) { 2846 - dfailprintk(ioc, pr_info(MPT3SAS_FMT 2847 - "pci_alloc_irq_vectors failed (r=%d) !!!\n", 2848 - ioc->name, r)); 2860 + dfailprintk(ioc, 2861 + ioc_info(ioc, "pci_alloc_irq_vectors failed (r=%d) !!!\n", 2862 + r)); 2849 2863 goto try_ioapic; 2850 2864 } 2851 2865 ··· 2868 2882 ioc->reply_queue_count = 1; 2869 2883 r = pci_alloc_irq_vectors(ioc->pdev, 1, 1, PCI_IRQ_LEGACY); 2870 2884 if (r < 0) { 2871 - dfailprintk(ioc, pr_info(MPT3SAS_FMT 2872 - "pci_alloc_irq_vector(legacy) failed (r=%d) !!!\n", 2873 - ioc->name, r)); 2885 + dfailprintk(ioc, 2886 + ioc_info(ioc, "pci_alloc_irq_vector(legacy) failed (r=%d) !!!\n", 2887 + r)); 2874 2888 } else 2875 2889 r = _base_request_irq(ioc, 0); 2876 2890 ··· 2925 2939 phys_addr_t chip_phys = 0; 2926 2940 struct adapter_reply_queue *reply_q; 2927 2941 2928 - dinitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", 2929 - ioc->name, __func__)); 2942 + dinitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); 2930 2943 2931 2944 ioc->bars = pci_select_bars(pdev, IORESOURCE_MEM); 2932 2945 if (pci_enable_device_mem(pdev)) { 2933 - pr_warn(MPT3SAS_FMT "pci_enable_device_mem: failed\n", 2934 - ioc->name); 2946 + ioc_warn(ioc, "pci_enable_device_mem: failed\n"); 2935 2947 ioc->bars = 0; 2936 2948 return -ENODEV; 2937 2949 } ··· 2937 2953 2938 2954 if (pci_request_selected_regions(pdev, ioc->bars, 2939 2955 ioc->driver_name)) { 2940 - pr_warn(MPT3SAS_FMT "pci_request_selected_regions: failed\n", 2941 - ioc->name); 2956 + ioc_warn(ioc, "pci_request_selected_regions: failed\n"); 2942 2957 ioc->bars = 0; 2943 2958 r = -ENODEV; 2944 2959 goto out_fail; ··· 2950 2967 2951 2968 2952 2969 if (_base_config_dma_addressing(ioc, pdev) != 0) { 2953 - pr_warn(MPT3SAS_FMT "no suitable DMA mask for %s\n", 2954 - ioc->name, pci_name(pdev)); 2970 + ioc_warn(ioc, "no suitable DMA mask for %s\n", pci_name(pdev)); 2955 2971 r = -ENODEV; 2956 2972 goto out_fail; 2957 2973 } ··· 2973 2991 } 2974 2992 2975 2993 if (ioc->chip == NULL) { 2976 - pr_err(MPT3SAS_FMT "unable to map adapter memory! " 2977 - " or resource not found\n", ioc->name); 2994 + ioc_err(ioc, "unable to map adapter memory! or resource not found\n"); 2978 2995 r = -EINVAL; 2979 2996 goto out_fail; 2980 2997 } ··· 3039 3058 "IO-APIC enabled"), 3040 3059 pci_irq_vector(ioc->pdev, reply_q->msix_index)); 3041 3060 3042 - pr_info(MPT3SAS_FMT "iomem(%pap), mapped(0x%p), size(%d)\n", 3043 - ioc->name, &chip_phys, ioc->chip, memap_sz); 3044 - pr_info(MPT3SAS_FMT "ioport(0x%016llx), size(%d)\n", 3045 - ioc->name, (unsigned long long)pio_chip, pio_sz); 3061 + ioc_info(ioc, "iomem(%pap), mapped(0x%p), size(%d)\n", 3062 + &chip_phys, ioc->chip, memap_sz); 3063 + ioc_info(ioc, "ioport(0x%016llx), size(%d)\n", 3064 + (unsigned long long)pio_chip, pio_sz); 3046 3065 3047 3066 /* Save PCI configuration state for recovery from PCI AER/EEH errors */ 3048 3067 pci_save_state(pdev); ··· 3157 3176 spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); 3158 3177 if (list_empty(&ioc->internal_free_list)) { 3159 3178 spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); 3160 - pr_err(MPT3SAS_FMT "%s: smid not available\n", 3161 - ioc->name, __func__); 3179 + ioc_err(ioc, "%s: smid not available\n", __func__); 3162 3180 return 0; 3163 3181 } 3164 3182 ··· 3525 3545 case MPI2_MFGPAGE_DEVID_SAS2008: 3526 3546 switch (ioc->pdev->subsystem_device) { 3527 3547 case MPT2SAS_INTEL_RMS2LL080_SSDID: 3528 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3529 - MPT2SAS_INTEL_RMS2LL080_BRANDING); 3548 + ioc_info(ioc, "%s\n", 3549 + MPT2SAS_INTEL_RMS2LL080_BRANDING); 3530 3550 break; 3531 3551 case MPT2SAS_INTEL_RMS2LL040_SSDID: 3532 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3533 - MPT2SAS_INTEL_RMS2LL040_BRANDING); 3552 + ioc_info(ioc, "%s\n", 3553 + MPT2SAS_INTEL_RMS2LL040_BRANDING); 3534 3554 break; 3535 3555 case MPT2SAS_INTEL_SSD910_SSDID: 3536 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3537 - MPT2SAS_INTEL_SSD910_BRANDING); 3556 + ioc_info(ioc, "%s\n", 3557 + MPT2SAS_INTEL_SSD910_BRANDING); 3538 3558 break; 3539 3559 default: 3540 - pr_info(MPT3SAS_FMT 3541 - "Intel(R) Controller: Subsystem ID: 0x%X\n", 3542 - ioc->name, ioc->pdev->subsystem_device); 3560 + ioc_info(ioc, "Intel(R) Controller: Subsystem ID: 0x%X\n", 3561 + ioc->pdev->subsystem_device); 3543 3562 break; 3544 3563 } 3545 3564 case MPI2_MFGPAGE_DEVID_SAS2308_2: 3546 3565 switch (ioc->pdev->subsystem_device) { 3547 3566 case MPT2SAS_INTEL_RS25GB008_SSDID: 3548 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3549 - MPT2SAS_INTEL_RS25GB008_BRANDING); 3567 + ioc_info(ioc, "%s\n", 3568 + MPT2SAS_INTEL_RS25GB008_BRANDING); 3550 3569 break; 3551 3570 case MPT2SAS_INTEL_RMS25JB080_SSDID: 3552 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3553 - MPT2SAS_INTEL_RMS25JB080_BRANDING); 3571 + ioc_info(ioc, "%s\n", 3572 + MPT2SAS_INTEL_RMS25JB080_BRANDING); 3554 3573 break; 3555 3574 case MPT2SAS_INTEL_RMS25JB040_SSDID: 3556 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3557 - MPT2SAS_INTEL_RMS25JB040_BRANDING); 3575 + ioc_info(ioc, "%s\n", 3576 + MPT2SAS_INTEL_RMS25JB040_BRANDING); 3558 3577 break; 3559 3578 case MPT2SAS_INTEL_RMS25KB080_SSDID: 3560 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3561 - MPT2SAS_INTEL_RMS25KB080_BRANDING); 3579 + ioc_info(ioc, "%s\n", 3580 + MPT2SAS_INTEL_RMS25KB080_BRANDING); 3562 3581 break; 3563 3582 case MPT2SAS_INTEL_RMS25KB040_SSDID: 3564 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3565 - MPT2SAS_INTEL_RMS25KB040_BRANDING); 3583 + ioc_info(ioc, "%s\n", 3584 + MPT2SAS_INTEL_RMS25KB040_BRANDING); 3566 3585 break; 3567 3586 case MPT2SAS_INTEL_RMS25LB040_SSDID: 3568 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3569 - MPT2SAS_INTEL_RMS25LB040_BRANDING); 3587 + ioc_info(ioc, "%s\n", 3588 + MPT2SAS_INTEL_RMS25LB040_BRANDING); 3570 3589 break; 3571 3590 case MPT2SAS_INTEL_RMS25LB080_SSDID: 3572 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3573 - MPT2SAS_INTEL_RMS25LB080_BRANDING); 3591 + ioc_info(ioc, "%s\n", 3592 + MPT2SAS_INTEL_RMS25LB080_BRANDING); 3574 3593 break; 3575 3594 default: 3576 - pr_info(MPT3SAS_FMT 3577 - "Intel(R) Controller: Subsystem ID: 0x%X\n", 3578 - ioc->name, ioc->pdev->subsystem_device); 3595 + ioc_info(ioc, "Intel(R) Controller: Subsystem ID: 0x%X\n", 3596 + ioc->pdev->subsystem_device); 3579 3597 break; 3580 3598 } 3581 3599 case MPI25_MFGPAGE_DEVID_SAS3008: 3582 3600 switch (ioc->pdev->subsystem_device) { 3583 3601 case MPT3SAS_INTEL_RMS3JC080_SSDID: 3584 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3585 - MPT3SAS_INTEL_RMS3JC080_BRANDING); 3602 + ioc_info(ioc, "%s\n", 3603 + MPT3SAS_INTEL_RMS3JC080_BRANDING); 3586 3604 break; 3587 3605 3588 3606 case MPT3SAS_INTEL_RS3GC008_SSDID: 3589 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3590 - MPT3SAS_INTEL_RS3GC008_BRANDING); 3607 + ioc_info(ioc, "%s\n", 3608 + MPT3SAS_INTEL_RS3GC008_BRANDING); 3591 3609 break; 3592 3610 case MPT3SAS_INTEL_RS3FC044_SSDID: 3593 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3594 - MPT3SAS_INTEL_RS3FC044_BRANDING); 3611 + ioc_info(ioc, "%s\n", 3612 + MPT3SAS_INTEL_RS3FC044_BRANDING); 3595 3613 break; 3596 3614 case MPT3SAS_INTEL_RS3UC080_SSDID: 3597 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3598 - MPT3SAS_INTEL_RS3UC080_BRANDING); 3615 + ioc_info(ioc, "%s\n", 3616 + MPT3SAS_INTEL_RS3UC080_BRANDING); 3599 3617 break; 3600 3618 default: 3601 - pr_info(MPT3SAS_FMT 3602 - "Intel(R) Controller: Subsystem ID: 0x%X\n", 3603 - ioc->name, ioc->pdev->subsystem_device); 3619 + ioc_info(ioc, "Intel(R) Controller: Subsystem ID: 0x%X\n", 3620 + ioc->pdev->subsystem_device); 3604 3621 break; 3605 3622 } 3606 3623 break; 3607 3624 default: 3608 - pr_info(MPT3SAS_FMT 3609 - "Intel(R) Controller: Subsystem ID: 0x%X\n", 3610 - ioc->name, ioc->pdev->subsystem_device); 3625 + ioc_info(ioc, "Intel(R) Controller: Subsystem ID: 0x%X\n", 3626 + ioc->pdev->subsystem_device); 3611 3627 break; 3612 3628 } 3613 3629 break; ··· 3612 3636 case MPI2_MFGPAGE_DEVID_SAS2008: 3613 3637 switch (ioc->pdev->subsystem_device) { 3614 3638 case MPT2SAS_DELL_6GBPS_SAS_HBA_SSDID: 3615 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3616 - MPT2SAS_DELL_6GBPS_SAS_HBA_BRANDING); 3639 + ioc_info(ioc, "%s\n", 3640 + MPT2SAS_DELL_6GBPS_SAS_HBA_BRANDING); 3617 3641 break; 3618 3642 case MPT2SAS_DELL_PERC_H200_ADAPTER_SSDID: 3619 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3620 - MPT2SAS_DELL_PERC_H200_ADAPTER_BRANDING); 3643 + ioc_info(ioc, "%s\n", 3644 + MPT2SAS_DELL_PERC_H200_ADAPTER_BRANDING); 3621 3645 break; 3622 3646 case MPT2SAS_DELL_PERC_H200_INTEGRATED_SSDID: 3623 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3624 - MPT2SAS_DELL_PERC_H200_INTEGRATED_BRANDING); 3647 + ioc_info(ioc, "%s\n", 3648 + MPT2SAS_DELL_PERC_H200_INTEGRATED_BRANDING); 3625 3649 break; 3626 3650 case MPT2SAS_DELL_PERC_H200_MODULAR_SSDID: 3627 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3628 - MPT2SAS_DELL_PERC_H200_MODULAR_BRANDING); 3651 + ioc_info(ioc, "%s\n", 3652 + MPT2SAS_DELL_PERC_H200_MODULAR_BRANDING); 3629 3653 break; 3630 3654 case MPT2SAS_DELL_PERC_H200_EMBEDDED_SSDID: 3631 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3632 - MPT2SAS_DELL_PERC_H200_EMBEDDED_BRANDING); 3655 + ioc_info(ioc, "%s\n", 3656 + MPT2SAS_DELL_PERC_H200_EMBEDDED_BRANDING); 3633 3657 break; 3634 3658 case MPT2SAS_DELL_PERC_H200_SSDID: 3635 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3636 - MPT2SAS_DELL_PERC_H200_BRANDING); 3659 + ioc_info(ioc, "%s\n", 3660 + MPT2SAS_DELL_PERC_H200_BRANDING); 3637 3661 break; 3638 3662 case MPT2SAS_DELL_6GBPS_SAS_SSDID: 3639 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3640 - MPT2SAS_DELL_6GBPS_SAS_BRANDING); 3663 + ioc_info(ioc, "%s\n", 3664 + MPT2SAS_DELL_6GBPS_SAS_BRANDING); 3641 3665 break; 3642 3666 default: 3643 - pr_info(MPT3SAS_FMT 3644 - "Dell 6Gbps HBA: Subsystem ID: 0x%X\n", 3645 - ioc->name, ioc->pdev->subsystem_device); 3667 + ioc_info(ioc, "Dell 6Gbps HBA: Subsystem ID: 0x%X\n", 3668 + ioc->pdev->subsystem_device); 3646 3669 break; 3647 3670 } 3648 3671 break; 3649 3672 case MPI25_MFGPAGE_DEVID_SAS3008: 3650 3673 switch (ioc->pdev->subsystem_device) { 3651 3674 case MPT3SAS_DELL_12G_HBA_SSDID: 3652 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3653 - MPT3SAS_DELL_12G_HBA_BRANDING); 3675 + ioc_info(ioc, "%s\n", 3676 + MPT3SAS_DELL_12G_HBA_BRANDING); 3654 3677 break; 3655 3678 default: 3656 - pr_info(MPT3SAS_FMT 3657 - "Dell 12Gbps HBA: Subsystem ID: 0x%X\n", 3658 - ioc->name, ioc->pdev->subsystem_device); 3679 + ioc_info(ioc, "Dell 12Gbps HBA: Subsystem ID: 0x%X\n", 3680 + ioc->pdev->subsystem_device); 3659 3681 break; 3660 3682 } 3661 3683 break; 3662 3684 default: 3663 - pr_info(MPT3SAS_FMT 3664 - "Dell HBA: Subsystem ID: 0x%X\n", ioc->name, 3665 - ioc->pdev->subsystem_device); 3685 + ioc_info(ioc, "Dell HBA: Subsystem ID: 0x%X\n", 3686 + ioc->pdev->subsystem_device); 3666 3687 break; 3667 3688 } 3668 3689 break; ··· 3668 3695 case MPI25_MFGPAGE_DEVID_SAS3008: 3669 3696 switch (ioc->pdev->subsystem_device) { 3670 3697 case MPT3SAS_CISCO_12G_8E_HBA_SSDID: 3671 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3672 - MPT3SAS_CISCO_12G_8E_HBA_BRANDING); 3698 + ioc_info(ioc, "%s\n", 3699 + MPT3SAS_CISCO_12G_8E_HBA_BRANDING); 3673 3700 break; 3674 3701 case MPT3SAS_CISCO_12G_8I_HBA_SSDID: 3675 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3676 - MPT3SAS_CISCO_12G_8I_HBA_BRANDING); 3702 + ioc_info(ioc, "%s\n", 3703 + MPT3SAS_CISCO_12G_8I_HBA_BRANDING); 3677 3704 break; 3678 3705 case MPT3SAS_CISCO_12G_AVILA_HBA_SSDID: 3679 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3680 - MPT3SAS_CISCO_12G_AVILA_HBA_BRANDING); 3706 + ioc_info(ioc, "%s\n", 3707 + MPT3SAS_CISCO_12G_AVILA_HBA_BRANDING); 3681 3708 break; 3682 3709 default: 3683 - pr_info(MPT3SAS_FMT 3684 - "Cisco 12Gbps SAS HBA: Subsystem ID: 0x%X\n", 3685 - ioc->name, ioc->pdev->subsystem_device); 3710 + ioc_info(ioc, "Cisco 12Gbps SAS HBA: Subsystem ID: 0x%X\n", 3711 + ioc->pdev->subsystem_device); 3686 3712 break; 3687 3713 } 3688 3714 break; 3689 3715 case MPI25_MFGPAGE_DEVID_SAS3108_1: 3690 3716 switch (ioc->pdev->subsystem_device) { 3691 3717 case MPT3SAS_CISCO_12G_AVILA_HBA_SSDID: 3692 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3693 - MPT3SAS_CISCO_12G_AVILA_HBA_BRANDING); 3718 + ioc_info(ioc, "%s\n", 3719 + MPT3SAS_CISCO_12G_AVILA_HBA_BRANDING); 3694 3720 break; 3695 3721 case MPT3SAS_CISCO_12G_COLUSA_MEZZANINE_HBA_SSDID: 3696 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3697 - MPT3SAS_CISCO_12G_COLUSA_MEZZANINE_HBA_BRANDING 3698 - ); 3722 + ioc_info(ioc, "%s\n", 3723 + MPT3SAS_CISCO_12G_COLUSA_MEZZANINE_HBA_BRANDING); 3699 3724 break; 3700 3725 default: 3701 - pr_info(MPT3SAS_FMT 3702 - "Cisco 12Gbps SAS HBA: Subsystem ID: 0x%X\n", 3703 - ioc->name, ioc->pdev->subsystem_device); 3726 + ioc_info(ioc, "Cisco 12Gbps SAS HBA: Subsystem ID: 0x%X\n", 3727 + ioc->pdev->subsystem_device); 3704 3728 break; 3705 3729 } 3706 3730 break; 3707 3731 default: 3708 - pr_info(MPT3SAS_FMT 3709 - "Cisco SAS HBA: Subsystem ID: 0x%X\n", 3710 - ioc->name, ioc->pdev->subsystem_device); 3732 + ioc_info(ioc, "Cisco SAS HBA: Subsystem ID: 0x%X\n", 3733 + ioc->pdev->subsystem_device); 3711 3734 break; 3712 3735 } 3713 3736 break; ··· 3712 3743 case MPI2_MFGPAGE_DEVID_SAS2004: 3713 3744 switch (ioc->pdev->subsystem_device) { 3714 3745 case MPT2SAS_HP_DAUGHTER_2_4_INTERNAL_SSDID: 3715 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3716 - MPT2SAS_HP_DAUGHTER_2_4_INTERNAL_BRANDING); 3746 + ioc_info(ioc, "%s\n", 3747 + MPT2SAS_HP_DAUGHTER_2_4_INTERNAL_BRANDING); 3717 3748 break; 3718 3749 default: 3719 - pr_info(MPT3SAS_FMT 3720 - "HP 6Gbps SAS HBA: Subsystem ID: 0x%X\n", 3721 - ioc->name, ioc->pdev->subsystem_device); 3750 + ioc_info(ioc, "HP 6Gbps SAS HBA: Subsystem ID: 0x%X\n", 3751 + ioc->pdev->subsystem_device); 3722 3752 break; 3723 3753 } 3724 3754 case MPI2_MFGPAGE_DEVID_SAS2308_2: 3725 3755 switch (ioc->pdev->subsystem_device) { 3726 3756 case MPT2SAS_HP_2_4_INTERNAL_SSDID: 3727 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3728 - MPT2SAS_HP_2_4_INTERNAL_BRANDING); 3757 + ioc_info(ioc, "%s\n", 3758 + MPT2SAS_HP_2_4_INTERNAL_BRANDING); 3729 3759 break; 3730 3760 case MPT2SAS_HP_2_4_EXTERNAL_SSDID: 3731 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3732 - MPT2SAS_HP_2_4_EXTERNAL_BRANDING); 3761 + ioc_info(ioc, "%s\n", 3762 + MPT2SAS_HP_2_4_EXTERNAL_BRANDING); 3733 3763 break; 3734 3764 case MPT2SAS_HP_1_4_INTERNAL_1_4_EXTERNAL_SSDID: 3735 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3736 - MPT2SAS_HP_1_4_INTERNAL_1_4_EXTERNAL_BRANDING); 3765 + ioc_info(ioc, "%s\n", 3766 + MPT2SAS_HP_1_4_INTERNAL_1_4_EXTERNAL_BRANDING); 3737 3767 break; 3738 3768 case MPT2SAS_HP_EMBEDDED_2_4_INTERNAL_SSDID: 3739 - pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3740 - MPT2SAS_HP_EMBEDDED_2_4_INTERNAL_BRANDING); 3769 + ioc_info(ioc, "%s\n", 3770 + MPT2SAS_HP_EMBEDDED_2_4_INTERNAL_BRANDING); 3741 3771 break; 3742 3772 default: 3743 - pr_info(MPT3SAS_FMT 3744 - "HP 6Gbps SAS HBA: Subsystem ID: 0x%X\n", 3745 - ioc->name, ioc->pdev->subsystem_device); 3773 + ioc_info(ioc, "HP 6Gbps SAS HBA: Subsystem ID: 0x%X\n", 3774 + ioc->pdev->subsystem_device); 3746 3775 break; 3747 3776 } 3748 3777 default: 3749 - pr_info(MPT3SAS_FMT 3750 - "HP SAS HBA: Subsystem ID: 0x%X\n", 3751 - ioc->name, ioc->pdev->subsystem_device); 3778 + ioc_info(ioc, "HP SAS HBA: Subsystem ID: 0x%X\n", 3779 + ioc->pdev->subsystem_device); 3752 3780 break; 3753 3781 } 3754 3782 default: ··· 3772 3806 u16 smid, ioc_status; 3773 3807 size_t data_length; 3774 3808 3775 - dinitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name, 3776 - __func__)); 3809 + dinitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); 3777 3810 3778 3811 if (ioc->base_cmds.status & MPT3_CMD_PENDING) { 3779 - pr_err(MPT3SAS_FMT "%s: internal command already in use\n", 3780 - ioc->name, __func__); 3812 + ioc_err(ioc, "%s: internal command already in use\n", __func__); 3781 3813 return -EAGAIN; 3782 3814 } 3783 3815 ··· 3783 3819 fwpkg_data = pci_alloc_consistent(ioc->pdev, data_length, 3784 3820 &fwpkg_data_dma); 3785 3821 if (!fwpkg_data) { 3786 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 3787 - ioc->name, __FILE__, __LINE__, __func__); 3822 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 3823 + __FILE__, __LINE__, __func__); 3788 3824 return -ENOMEM; 3789 3825 } 3790 3826 3791 3827 smid = mpt3sas_base_get_smid(ioc, ioc->base_cb_idx); 3792 3828 if (!smid) { 3793 - pr_err(MPT3SAS_FMT "%s: failed obtaining a smid\n", 3794 - ioc->name, __func__); 3829 + ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); 3795 3830 r = -EAGAIN; 3796 3831 goto out; 3797 3832 } ··· 3809 3846 /* Wait for 15 seconds */ 3810 3847 wait_for_completion_timeout(&ioc->base_cmds.done, 3811 3848 FW_IMG_HDR_READ_TIMEOUT*HZ); 3812 - pr_info(MPT3SAS_FMT "%s: complete\n", 3813 - ioc->name, __func__); 3849 + ioc_info(ioc, "%s: complete\n", __func__); 3814 3850 if (!(ioc->base_cmds.status & MPT3_CMD_COMPLETE)) { 3815 - pr_err(MPT3SAS_FMT "%s: timeout\n", 3816 - ioc->name, __func__); 3851 + ioc_err(ioc, "%s: timeout\n", __func__); 3817 3852 _debug_dump_mf(mpi_request, 3818 3853 sizeof(Mpi25FWUploadRequest_t)/4); 3819 3854 r = -ETIME; ··· 3825 3864 if (ioc_status == MPI2_IOCSTATUS_SUCCESS) { 3826 3865 FWImgHdr = (Mpi2FWImageHeader_t *)fwpkg_data; 3827 3866 if (FWImgHdr->PackageVersion.Word) { 3828 - pr_info(MPT3SAS_FMT "FW Package Version" 3829 - "(%02d.%02d.%02d.%02d)\n", 3830 - ioc->name, 3831 - FWImgHdr->PackageVersion.Struct.Major, 3832 - FWImgHdr->PackageVersion.Struct.Minor, 3833 - FWImgHdr->PackageVersion.Struct.Unit, 3834 - FWImgHdr->PackageVersion.Struct.Dev); 3867 + ioc_info(ioc, "FW Package Version (%02d.%02d.%02d.%02d)\n", 3868 + FWImgHdr->PackageVersion.Struct.Major, 3869 + FWImgHdr->PackageVersion.Struct.Minor, 3870 + FWImgHdr->PackageVersion.Struct.Unit, 3871 + FWImgHdr->PackageVersion.Struct.Dev); 3835 3872 } 3836 3873 } else { 3837 3874 _debug_dump_mf(&mpi_reply, ··· 3859 3900 3860 3901 bios_version = le32_to_cpu(ioc->bios_pg3.BiosVersion); 3861 3902 strncpy(desc, ioc->manu_pg0.ChipName, 16); 3862 - pr_info(MPT3SAS_FMT "%s: FWVersion(%02d.%02d.%02d.%02d), "\ 3863 - "ChipRevision(0x%02x), BiosVersion(%02d.%02d.%02d.%02d)\n", 3864 - ioc->name, desc, 3865 - (ioc->facts.FWVersion.Word & 0xFF000000) >> 24, 3866 - (ioc->facts.FWVersion.Word & 0x00FF0000) >> 16, 3867 - (ioc->facts.FWVersion.Word & 0x0000FF00) >> 8, 3868 - ioc->facts.FWVersion.Word & 0x000000FF, 3869 - ioc->pdev->revision, 3870 - (bios_version & 0xFF000000) >> 24, 3871 - (bios_version & 0x00FF0000) >> 16, 3872 - (bios_version & 0x0000FF00) >> 8, 3873 - bios_version & 0x000000FF); 3903 + ioc_info(ioc, "%s: FWVersion(%02d.%02d.%02d.%02d), ChipRevision(0x%02x), BiosVersion(%02d.%02d.%02d.%02d)\n", 3904 + desc, 3905 + (ioc->facts.FWVersion.Word & 0xFF000000) >> 24, 3906 + (ioc->facts.FWVersion.Word & 0x00FF0000) >> 16, 3907 + (ioc->facts.FWVersion.Word & 0x0000FF00) >> 8, 3908 + ioc->facts.FWVersion.Word & 0x000000FF, 3909 + ioc->pdev->revision, 3910 + (bios_version & 0xFF000000) >> 24, 3911 + (bios_version & 0x00FF0000) >> 16, 3912 + (bios_version & 0x0000FF00) >> 8, 3913 + bios_version & 0x000000FF); 3874 3914 3875 3915 _base_display_OEMs_branding(ioc); 3876 3916 ··· 3878 3920 i++; 3879 3921 } 3880 3922 3881 - pr_info(MPT3SAS_FMT "Protocol=(", ioc->name); 3923 + ioc_info(ioc, "Protocol=("); 3882 3924 3883 3925 if (ioc->facts.ProtocolFlags & MPI2_IOCFACTS_PROTOCOL_SCSI_INITIATOR) { 3884 - pr_info("Initiator"); 3926 + pr_cont("Initiator"); 3885 3927 i++; 3886 3928 } 3887 3929 3888 3930 if (ioc->facts.ProtocolFlags & MPI2_IOCFACTS_PROTOCOL_SCSI_TARGET) { 3889 - pr_info("%sTarget", i ? "," : ""); 3931 + pr_cont("%sTarget", i ? "," : ""); 3890 3932 i++; 3891 3933 } 3892 3934 3893 3935 i = 0; 3894 - pr_info("), "); 3895 - pr_info("Capabilities=("); 3936 + pr_cont("), Capabilities=("); 3896 3937 3897 3938 if (!ioc->hide_ir_msg) { 3898 3939 if (ioc->facts.IOCCapabilities & 3899 3940 MPI2_IOCFACTS_CAPABILITY_INTEGRATED_RAID) { 3900 - pr_info("Raid"); 3941 + pr_cont("Raid"); 3901 3942 i++; 3902 3943 } 3903 3944 } 3904 3945 3905 3946 if (ioc->facts.IOCCapabilities & MPI2_IOCFACTS_CAPABILITY_TLR) { 3906 - pr_info("%sTLR", i ? "," : ""); 3947 + pr_cont("%sTLR", i ? "," : ""); 3907 3948 i++; 3908 3949 } 3909 3950 3910 3951 if (ioc->facts.IOCCapabilities & MPI2_IOCFACTS_CAPABILITY_MULTICAST) { 3911 - pr_info("%sMulticast", i ? "," : ""); 3952 + pr_cont("%sMulticast", i ? "," : ""); 3912 3953 i++; 3913 3954 } 3914 3955 3915 3956 if (ioc->facts.IOCCapabilities & 3916 3957 MPI2_IOCFACTS_CAPABILITY_BIDIRECTIONAL_TARGET) { 3917 - pr_info("%sBIDI Target", i ? "," : ""); 3958 + pr_cont("%sBIDI Target", i ? "," : ""); 3918 3959 i++; 3919 3960 } 3920 3961 3921 3962 if (ioc->facts.IOCCapabilities & MPI2_IOCFACTS_CAPABILITY_EEDP) { 3922 - pr_info("%sEEDP", i ? "," : ""); 3963 + pr_cont("%sEEDP", i ? "," : ""); 3923 3964 i++; 3924 3965 } 3925 3966 3926 3967 if (ioc->facts.IOCCapabilities & 3927 3968 MPI2_IOCFACTS_CAPABILITY_SNAPSHOT_BUFFER) { 3928 - pr_info("%sSnapshot Buffer", i ? "," : ""); 3969 + pr_cont("%sSnapshot Buffer", i ? "," : ""); 3929 3970 i++; 3930 3971 } 3931 3972 3932 3973 if (ioc->facts.IOCCapabilities & 3933 3974 MPI2_IOCFACTS_CAPABILITY_DIAG_TRACE_BUFFER) { 3934 - pr_info("%sDiag Trace Buffer", i ? "," : ""); 3975 + pr_cont("%sDiag Trace Buffer", i ? "," : ""); 3935 3976 i++; 3936 3977 } 3937 3978 3938 3979 if (ioc->facts.IOCCapabilities & 3939 3980 MPI2_IOCFACTS_CAPABILITY_EXTENDED_BUFFER) { 3940 - pr_info("%sDiag Extended Buffer", i ? "," : ""); 3981 + pr_cont("%sDiag Extended Buffer", i ? "," : ""); 3941 3982 i++; 3942 3983 } 3943 3984 3944 3985 if (ioc->facts.IOCCapabilities & 3945 3986 MPI2_IOCFACTS_CAPABILITY_TASK_SET_FULL_HANDLING) { 3946 - pr_info("%sTask Set Full", i ? "," : ""); 3987 + pr_cont("%sTask Set Full", i ? "," : ""); 3947 3988 i++; 3948 3989 } 3949 3990 3950 3991 iounit_pg1_flags = le32_to_cpu(ioc->iounit_pg1.Flags); 3951 3992 if (!(iounit_pg1_flags & MPI2_IOUNITPAGE1_NATIVE_COMMAND_Q_DISABLE)) { 3952 - pr_info("%sNCQ", i ? "," : ""); 3993 + pr_cont("%sNCQ", i ? "," : ""); 3953 3994 i++; 3954 3995 } 3955 3996 3956 - pr_info(")\n"); 3997 + pr_cont(")\n"); 3957 3998 } 3958 3999 3959 4000 /** ··· 3985 4028 sizeof(Mpi2SasIOUnit1PhyData_t)); 3986 4029 sas_iounit_pg1 = kzalloc(sz, GFP_KERNEL); 3987 4030 if (!sas_iounit_pg1) { 3988 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 3989 - ioc->name, __FILE__, __LINE__, __func__); 4031 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 4032 + __FILE__, __LINE__, __func__); 3990 4033 goto out; 3991 4034 } 3992 4035 if ((mpt3sas_config_get_sas_iounit_pg1(ioc, &mpi_reply, 3993 4036 sas_iounit_pg1, sz))) { 3994 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 3995 - ioc->name, __FILE__, __LINE__, __func__); 4037 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 4038 + __FILE__, __LINE__, __func__); 3996 4039 goto out; 3997 4040 } 3998 4041 ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & 3999 4042 MPI2_IOCSTATUS_MASK; 4000 4043 if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { 4001 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 4002 - ioc->name, __FILE__, __LINE__, __func__); 4044 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 4045 + __FILE__, __LINE__, __func__); 4003 4046 goto out; 4004 4047 } 4005 4048 ··· 4031 4074 else 4032 4075 dmd_new = 4033 4076 dmd & MPI2_SASIOUNIT1_REPORT_MISSING_TIMEOUT_MASK; 4034 - pr_info(MPT3SAS_FMT "device_missing_delay: old(%d), new(%d)\n", 4035 - ioc->name, dmd_orignal, dmd_new); 4036 - pr_info(MPT3SAS_FMT "ioc_missing_delay: old(%d), new(%d)\n", 4037 - ioc->name, io_missing_delay_original, 4038 - io_missing_delay); 4077 + ioc_info(ioc, "device_missing_delay: old(%d), new(%d)\n", 4078 + dmd_orignal, dmd_new); 4079 + ioc_info(ioc, "ioc_missing_delay: old(%d), new(%d)\n", 4080 + io_missing_delay_original, 4081 + io_missing_delay); 4039 4082 ioc->device_missing_delay = dmd_new; 4040 4083 ioc->io_missing_delay = io_missing_delay; 4041 4084 } ··· 4146 4189 struct chain_tracker *ct; 4147 4190 struct reply_post_struct *rps; 4148 4191 4149 - dexitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name, 4150 - __func__)); 4192 + dexitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); 4151 4193 4152 4194 if (ioc->request) { 4153 4195 pci_free_consistent(ioc->pdev, ioc->request_dma_sz, 4154 4196 ioc->request, ioc->request_dma); 4155 - dexitprintk(ioc, pr_info(MPT3SAS_FMT 4156 - "request_pool(0x%p): free\n", 4157 - ioc->name, ioc->request)); 4197 + dexitprintk(ioc, 4198 + ioc_info(ioc, "request_pool(0x%p): free\n", 4199 + ioc->request)); 4158 4200 ioc->request = NULL; 4159 4201 } 4160 4202 4161 4203 if (ioc->sense) { 4162 4204 dma_pool_free(ioc->sense_dma_pool, ioc->sense, ioc->sense_dma); 4163 4205 dma_pool_destroy(ioc->sense_dma_pool); 4164 - dexitprintk(ioc, pr_info(MPT3SAS_FMT 4165 - "sense_pool(0x%p): free\n", 4166 - ioc->name, ioc->sense)); 4206 + dexitprintk(ioc, 4207 + ioc_info(ioc, "sense_pool(0x%p): free\n", 4208 + ioc->sense)); 4167 4209 ioc->sense = NULL; 4168 4210 } 4169 4211 4170 4212 if (ioc->reply) { 4171 4213 dma_pool_free(ioc->reply_dma_pool, ioc->reply, ioc->reply_dma); 4172 4214 dma_pool_destroy(ioc->reply_dma_pool); 4173 - dexitprintk(ioc, pr_info(MPT3SAS_FMT 4174 - "reply_pool(0x%p): free\n", 4175 - ioc->name, ioc->reply)); 4215 + dexitprintk(ioc, 4216 + ioc_info(ioc, "reply_pool(0x%p): free\n", 4217 + ioc->reply)); 4176 4218 ioc->reply = NULL; 4177 4219 } 4178 4220 ··· 4179 4223 dma_pool_free(ioc->reply_free_dma_pool, ioc->reply_free, 4180 4224 ioc->reply_free_dma); 4181 4225 dma_pool_destroy(ioc->reply_free_dma_pool); 4182 - dexitprintk(ioc, pr_info(MPT3SAS_FMT 4183 - "reply_free_pool(0x%p): free\n", 4184 - ioc->name, ioc->reply_free)); 4226 + dexitprintk(ioc, 4227 + ioc_info(ioc, "reply_free_pool(0x%p): free\n", 4228 + ioc->reply_free)); 4185 4229 ioc->reply_free = NULL; 4186 4230 } 4187 4231 ··· 4193 4237 ioc->reply_post_free_dma_pool, 4194 4238 rps->reply_post_free, 4195 4239 rps->reply_post_free_dma); 4196 - dexitprintk(ioc, pr_info(MPT3SAS_FMT 4197 - "reply_post_free_pool(0x%p): free\n", 4198 - ioc->name, rps->reply_post_free)); 4240 + dexitprintk(ioc, 4241 + ioc_info(ioc, "reply_post_free_pool(0x%p): free\n", 4242 + rps->reply_post_free)); 4199 4243 rps->reply_post_free = NULL; 4200 4244 } 4201 4245 } while (ioc->rdpq_array_enable && ··· 4223 4267 } 4224 4268 4225 4269 if (ioc->config_page) { 4226 - dexitprintk(ioc, pr_info(MPT3SAS_FMT 4227 - "config_page(0x%p): free\n", ioc->name, 4228 - ioc->config_page)); 4270 + dexitprintk(ioc, 4271 + ioc_info(ioc, "config_page(0x%p): free\n", 4272 + ioc->config_page)); 4229 4273 pci_free_consistent(ioc->pdev, ioc->config_page_sz, 4230 4274 ioc->config_page, ioc->config_page_dma); 4231 4275 } ··· 4294 4338 int i, j; 4295 4339 struct chain_tracker *ct; 4296 4340 4297 - dinitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name, 4298 - __func__)); 4341 + dinitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); 4299 4342 4300 4343 4301 4344 retry_sz = 0; ··· 4323 4368 else if (sg_tablesize > MPT_MAX_PHYS_SEGMENTS) { 4324 4369 sg_tablesize = min_t(unsigned short, sg_tablesize, 4325 4370 SG_MAX_SEGMENTS); 4326 - pr_warn(MPT3SAS_FMT 4327 - "sg_tablesize(%u) is bigger than kernel " 4328 - "defined SG_CHUNK_SIZE(%u)\n", ioc->name, 4329 - sg_tablesize, MPT_MAX_PHYS_SEGMENTS); 4371 + ioc_warn(ioc, "sg_tablesize(%u) is bigger than kernel defined SG_CHUNK_SIZE(%u)\n", 4372 + sg_tablesize, MPT_MAX_PHYS_SEGMENTS); 4330 4373 } 4331 4374 ioc->shost->sg_tablesize = sg_tablesize; 4332 4375 } ··· 4334 4381 if (ioc->internal_depth < INTERNAL_CMDS_COUNT) { 4335 4382 if (facts->RequestCredit <= (INTERNAL_CMDS_COUNT + 4336 4383 INTERNAL_SCSIIO_CMDS_COUNT)) { 4337 - pr_err(MPT3SAS_FMT "IOC doesn't have enough Request \ 4338 - Credits, it has just %d number of credits\n", 4339 - ioc->name, facts->RequestCredit); 4384 + ioc_err(ioc, "IOC doesn't have enough Request Credits, it has just %d number of credits\n", 4385 + facts->RequestCredit); 4340 4386 return -ENOMEM; 4341 4387 } 4342 4388 ioc->internal_depth = 10; ··· 4434 4482 ioc->reply_free_queue_depth = ioc->hba_queue_depth + 64; 4435 4483 } 4436 4484 4437 - dinitprintk(ioc, pr_info(MPT3SAS_FMT "scatter gather: " \ 4438 - "sge_in_main_msg(%d), sge_per_chain(%d), sge_per_io(%d), " 4439 - "chains_per_io(%d)\n", ioc->name, ioc->max_sges_in_main_message, 4440 - ioc->max_sges_in_chain_message, ioc->shost->sg_tablesize, 4441 - ioc->chains_needed_per_io)); 4485 + dinitprintk(ioc, 4486 + ioc_info(ioc, "scatter gather: sge_in_main_msg(%d), sge_per_chain(%d), sge_per_io(%d), chains_per_io(%d)\n", 4487 + ioc->max_sges_in_main_message, 4488 + ioc->max_sges_in_chain_message, 4489 + ioc->shost->sg_tablesize, 4490 + ioc->chains_needed_per_io)); 4442 4491 4443 4492 /* reply post queue, 16 byte align */ 4444 4493 reply_post_free_sz = ioc->reply_post_queue_depth * ··· 4454 4501 sizeof(struct reply_post_struct), GFP_KERNEL); 4455 4502 4456 4503 if (!ioc->reply_post) { 4457 - pr_err(MPT3SAS_FMT "reply_post_free pool: kcalloc failed\n", 4458 - ioc->name); 4504 + ioc_err(ioc, "reply_post_free pool: kcalloc failed\n"); 4459 4505 goto out; 4460 4506 } 4461 4507 ioc->reply_post_free_dma_pool = dma_pool_create("reply_post_free pool", 4462 4508 &ioc->pdev->dev, sz, 16, 0); 4463 4509 if (!ioc->reply_post_free_dma_pool) { 4464 - pr_err(MPT3SAS_FMT 4465 - "reply_post_free pool: dma_pool_create failed\n", 4466 - ioc->name); 4510 + ioc_err(ioc, "reply_post_free pool: dma_pool_create failed\n"); 4467 4511 goto out; 4468 4512 } 4469 4513 i = 0; ··· 4470 4520 GFP_KERNEL, 4471 4521 &ioc->reply_post[i].reply_post_free_dma); 4472 4522 if (!ioc->reply_post[i].reply_post_free) { 4473 - pr_err(MPT3SAS_FMT 4474 - "reply_post_free pool: dma_pool_alloc failed\n", 4475 - ioc->name); 4523 + ioc_err(ioc, "reply_post_free pool: dma_pool_alloc failed\n"); 4476 4524 goto out; 4477 4525 } 4478 4526 memset(ioc->reply_post[i].reply_post_free, 0, sz); 4479 - dinitprintk(ioc, pr_info(MPT3SAS_FMT 4480 - "reply post free pool (0x%p): depth(%d)," 4481 - "element_size(%d), pool_size(%d kB)\n", ioc->name, 4482 - ioc->reply_post[i].reply_post_free, 4483 - ioc->reply_post_queue_depth, 8, sz/1024)); 4484 - dinitprintk(ioc, pr_info(MPT3SAS_FMT 4485 - "reply_post_free_dma = (0x%llx)\n", ioc->name, 4486 - (unsigned long long) 4487 - ioc->reply_post[i].reply_post_free_dma)); 4527 + dinitprintk(ioc, 4528 + ioc_info(ioc, "reply post free pool (0x%p): depth(%d), element_size(%d), pool_size(%d kB)\n", 4529 + ioc->reply_post[i].reply_post_free, 4530 + ioc->reply_post_queue_depth, 4531 + 8, sz / 1024)); 4532 + dinitprintk(ioc, 4533 + ioc_info(ioc, "reply_post_free_dma = (0x%llx)\n", 4534 + (u64)ioc->reply_post[i].reply_post_free_dma)); 4488 4535 total_sz += sz; 4489 4536 } while (ioc->rdpq_array_enable && (++i < ioc->reply_queue_count)); 4490 4537 4491 4538 if (ioc->dma_mask == 64) { 4492 4539 if (_base_change_consistent_dma_mask(ioc, ioc->pdev) != 0) { 4493 - pr_warn(MPT3SAS_FMT 4494 - "no suitable consistent DMA mask for %s\n", 4495 - ioc->name, pci_name(ioc->pdev)); 4540 + ioc_warn(ioc, "no suitable consistent DMA mask for %s\n", 4541 + pci_name(ioc->pdev)); 4496 4542 goto out; 4497 4543 } 4498 4544 } ··· 4500 4554 * with some internal commands that could be outstanding 4501 4555 */ 4502 4556 ioc->shost->can_queue = ioc->scsiio_depth - INTERNAL_SCSIIO_CMDS_COUNT; 4503 - dinitprintk(ioc, pr_info(MPT3SAS_FMT 4504 - "scsi host: can_queue depth (%d)\n", 4505 - ioc->name, ioc->shost->can_queue)); 4557 + dinitprintk(ioc, 4558 + ioc_info(ioc, "scsi host: can_queue depth (%d)\n", 4559 + ioc->shost->can_queue)); 4506 4560 4507 4561 4508 4562 /* contiguous pool for request and chains, 16 byte align, one extra " ··· 4520 4574 ioc->request_dma_sz = sz; 4521 4575 ioc->request = pci_alloc_consistent(ioc->pdev, sz, &ioc->request_dma); 4522 4576 if (!ioc->request) { 4523 - pr_err(MPT3SAS_FMT "request pool: pci_alloc_consistent " \ 4524 - "failed: hba_depth(%d), chains_per_io(%d), frame_sz(%d), " 4525 - "total(%d kB)\n", ioc->name, ioc->hba_queue_depth, 4526 - ioc->chains_needed_per_io, ioc->request_sz, sz/1024); 4577 + ioc_err(ioc, "request pool: pci_alloc_consistent failed: hba_depth(%d), chains_per_io(%d), frame_sz(%d), total(%d kB)\n", 4578 + ioc->hba_queue_depth, ioc->chains_needed_per_io, 4579 + ioc->request_sz, sz / 1024); 4527 4580 if (ioc->scsiio_depth < MPT3SAS_SAS_QUEUE_DEPTH) 4528 4581 goto out; 4529 4582 retry_sz = 64; ··· 4532 4587 } 4533 4588 4534 4589 if (retry_sz) 4535 - pr_err(MPT3SAS_FMT "request pool: pci_alloc_consistent " \ 4536 - "succeed: hba_depth(%d), chains_per_io(%d), frame_sz(%d), " 4537 - "total(%d kb)\n", ioc->name, ioc->hba_queue_depth, 4538 - ioc->chains_needed_per_io, ioc->request_sz, sz/1024); 4590 + ioc_err(ioc, "request pool: pci_alloc_consistent succeed: hba_depth(%d), chains_per_io(%d), frame_sz(%d), total(%d kb)\n", 4591 + ioc->hba_queue_depth, ioc->chains_needed_per_io, 4592 + ioc->request_sz, sz / 1024); 4539 4593 4540 4594 /* hi-priority queue */ 4541 4595 ioc->hi_priority = ioc->request + ((ioc->scsiio_depth + 1) * ··· 4548 4604 ioc->internal_dma = ioc->hi_priority_dma + (ioc->hi_priority_depth * 4549 4605 ioc->request_sz); 4550 4606 4551 - dinitprintk(ioc, pr_info(MPT3SAS_FMT 4552 - "request pool(0x%p): depth(%d), frame_size(%d), pool_size(%d kB)\n", 4553 - ioc->name, ioc->request, ioc->hba_queue_depth, ioc->request_sz, 4554 - (ioc->hba_queue_depth * ioc->request_sz)/1024)); 4607 + dinitprintk(ioc, 4608 + ioc_info(ioc, "request pool(0x%p): depth(%d), frame_size(%d), pool_size(%d kB)\n", 4609 + ioc->request, ioc->hba_queue_depth, 4610 + ioc->request_sz, 4611 + (ioc->hba_queue_depth * ioc->request_sz) / 1024)); 4555 4612 4556 - dinitprintk(ioc, pr_info(MPT3SAS_FMT "request pool: dma(0x%llx)\n", 4557 - ioc->name, (unsigned long long) ioc->request_dma)); 4613 + dinitprintk(ioc, 4614 + ioc_info(ioc, "request pool: dma(0x%llx)\n", 4615 + (unsigned long long)ioc->request_dma)); 4558 4616 total_sz += sz; 4559 4617 4560 - dinitprintk(ioc, pr_info(MPT3SAS_FMT "scsiio(0x%p): depth(%d)\n", 4561 - ioc->name, ioc->request, ioc->scsiio_depth)); 4618 + dinitprintk(ioc, 4619 + ioc_info(ioc, "scsiio(0x%p): depth(%d)\n", 4620 + ioc->request, ioc->scsiio_depth)); 4562 4621 4563 4622 ioc->chain_depth = min_t(u32, ioc->chain_depth, MAX_CHAIN_DEPTH); 4564 4623 sz = ioc->scsiio_depth * sizeof(struct chain_lookup); 4565 4624 ioc->chain_lookup = kzalloc(sz, GFP_KERNEL); 4566 4625 if (!ioc->chain_lookup) { 4567 - pr_err(MPT3SAS_FMT "chain_lookup: __get_free_pages " 4568 - "failed\n", ioc->name); 4626 + ioc_err(ioc, "chain_lookup: __get_free_pages failed\n"); 4569 4627 goto out; 4570 4628 } 4571 4629 ··· 4575 4629 for (i = 0; i < ioc->scsiio_depth; i++) { 4576 4630 ioc->chain_lookup[i].chains_per_smid = kzalloc(sz, GFP_KERNEL); 4577 4631 if (!ioc->chain_lookup[i].chains_per_smid) { 4578 - pr_err(MPT3SAS_FMT "chain_lookup: " 4579 - " kzalloc failed\n", ioc->name); 4632 + ioc_err(ioc, "chain_lookup: kzalloc failed\n"); 4580 4633 goto out; 4581 4634 } 4582 4635 } ··· 4584 4639 ioc->hpr_lookup = kcalloc(ioc->hi_priority_depth, 4585 4640 sizeof(struct request_tracker), GFP_KERNEL); 4586 4641 if (!ioc->hpr_lookup) { 4587 - pr_err(MPT3SAS_FMT "hpr_lookup: kcalloc failed\n", 4588 - ioc->name); 4642 + ioc_err(ioc, "hpr_lookup: kcalloc failed\n"); 4589 4643 goto out; 4590 4644 } 4591 4645 ioc->hi_priority_smid = ioc->scsiio_depth + 1; 4592 - dinitprintk(ioc, pr_info(MPT3SAS_FMT 4593 - "hi_priority(0x%p): depth(%d), start smid(%d)\n", 4594 - ioc->name, ioc->hi_priority, 4595 - ioc->hi_priority_depth, ioc->hi_priority_smid)); 4646 + dinitprintk(ioc, 4647 + ioc_info(ioc, "hi_priority(0x%p): depth(%d), start smid(%d)\n", 4648 + ioc->hi_priority, 4649 + ioc->hi_priority_depth, ioc->hi_priority_smid)); 4596 4650 4597 4651 /* initialize internal queue smid's */ 4598 4652 ioc->internal_lookup = kcalloc(ioc->internal_depth, 4599 4653 sizeof(struct request_tracker), GFP_KERNEL); 4600 4654 if (!ioc->internal_lookup) { 4601 - pr_err(MPT3SAS_FMT "internal_lookup: kcalloc failed\n", 4602 - ioc->name); 4655 + ioc_err(ioc, "internal_lookup: kcalloc failed\n"); 4603 4656 goto out; 4604 4657 } 4605 4658 ioc->internal_smid = ioc->hi_priority_smid + ioc->hi_priority_depth; 4606 - dinitprintk(ioc, pr_info(MPT3SAS_FMT 4607 - "internal(0x%p): depth(%d), start smid(%d)\n", 4608 - ioc->name, ioc->internal, 4609 - ioc->internal_depth, ioc->internal_smid)); 4659 + dinitprintk(ioc, 4660 + ioc_info(ioc, "internal(0x%p): depth(%d), start smid(%d)\n", 4661 + ioc->internal, 4662 + ioc->internal_depth, ioc->internal_smid)); 4610 4663 /* 4611 4664 * The number of NVMe page sized blocks needed is: 4612 4665 * (((sg_tablesize * 8) - 1) / (page_size - 8)) + 1 ··· 4628 4685 sz = sizeof(struct pcie_sg_list) * ioc->scsiio_depth; 4629 4686 ioc->pcie_sg_lookup = kzalloc(sz, GFP_KERNEL); 4630 4687 if (!ioc->pcie_sg_lookup) { 4631 - pr_info(MPT3SAS_FMT 4632 - "PCIe SGL lookup: kzalloc failed\n", ioc->name); 4688 + ioc_info(ioc, "PCIe SGL lookup: kzalloc failed\n"); 4633 4689 goto out; 4634 4690 } 4635 4691 sz = nvme_blocks_needed * ioc->page_size; 4636 4692 ioc->pcie_sgl_dma_pool = 4637 4693 dma_pool_create("PCIe SGL pool", &ioc->pdev->dev, sz, 16, 0); 4638 4694 if (!ioc->pcie_sgl_dma_pool) { 4639 - pr_info(MPT3SAS_FMT 4640 - "PCIe SGL pool: dma_pool_create failed\n", 4641 - ioc->name); 4695 + ioc_info(ioc, "PCIe SGL pool: dma_pool_create failed\n"); 4642 4696 goto out; 4643 4697 } 4644 4698 ··· 4648 4708 ioc->pcie_sgl_dma_pool, GFP_KERNEL, 4649 4709 &ioc->pcie_sg_lookup[i].pcie_sgl_dma); 4650 4710 if (!ioc->pcie_sg_lookup[i].pcie_sgl) { 4651 - pr_info(MPT3SAS_FMT 4652 - "PCIe SGL pool: dma_pool_alloc failed\n", 4653 - ioc->name); 4711 + ioc_info(ioc, "PCIe SGL pool: dma_pool_alloc failed\n"); 4654 4712 goto out; 4655 4713 } 4656 4714 for (j = 0; j < ioc->chains_per_prp_buffer; j++) { ··· 4662 4724 } 4663 4725 } 4664 4726 4665 - dinitprintk(ioc, pr_info(MPT3SAS_FMT "PCIe sgl pool depth(%d), " 4666 - "element_size(%d), pool_size(%d kB)\n", ioc->name, 4667 - ioc->scsiio_depth, sz, (sz * ioc->scsiio_depth)/1024)); 4668 - dinitprintk(ioc, pr_info(MPT3SAS_FMT "Number of chains can " 4669 - "fit in a PRP page(%d)\n", ioc->name, 4670 - ioc->chains_per_prp_buffer)); 4727 + dinitprintk(ioc, 4728 + ioc_info(ioc, "PCIe sgl pool depth(%d), element_size(%d), pool_size(%d kB)\n", 4729 + ioc->scsiio_depth, sz, 4730 + (sz * ioc->scsiio_depth) / 1024)); 4731 + dinitprintk(ioc, 4732 + ioc_info(ioc, "Number of chains can fit in a PRP page(%d)\n", 4733 + ioc->chains_per_prp_buffer)); 4671 4734 total_sz += sz * ioc->scsiio_depth; 4672 4735 } 4673 4736 4674 4737 ioc->chain_dma_pool = dma_pool_create("chain pool", &ioc->pdev->dev, 4675 4738 ioc->chain_segment_sz, 16, 0); 4676 4739 if (!ioc->chain_dma_pool) { 4677 - pr_err(MPT3SAS_FMT "chain_dma_pool: dma_pool_create failed\n", 4678 - ioc->name); 4740 + ioc_err(ioc, "chain_dma_pool: dma_pool_create failed\n"); 4679 4741 goto out; 4680 4742 } 4681 4743 for (i = 0; i < ioc->scsiio_depth; i++) { ··· 4686 4748 ioc->chain_dma_pool, GFP_KERNEL, 4687 4749 &ct->chain_buffer_dma); 4688 4750 if (!ct->chain_buffer) { 4689 - pr_err(MPT3SAS_FMT "chain_lookup: " 4690 - " pci_pool_alloc failed\n", ioc->name); 4751 + ioc_err(ioc, "chain_lookup: pci_pool_alloc failed\n"); 4691 4752 _base_release_memory_pools(ioc); 4692 4753 goto out; 4693 4754 } ··· 4694 4757 total_sz += ioc->chain_segment_sz; 4695 4758 } 4696 4759 4697 - dinitprintk(ioc, pr_info(MPT3SAS_FMT 4698 - "chain pool depth(%d), frame_size(%d), pool_size(%d kB)\n", 4699 - ioc->name, ioc->chain_depth, ioc->chain_segment_sz, 4700 - ((ioc->chain_depth * ioc->chain_segment_sz))/1024)); 4760 + dinitprintk(ioc, 4761 + ioc_info(ioc, "chain pool depth(%d), frame_size(%d), pool_size(%d kB)\n", 4762 + ioc->chain_depth, ioc->chain_segment_sz, 4763 + (ioc->chain_depth * ioc->chain_segment_sz) / 1024)); 4701 4764 4702 4765 /* sense buffers, 4 byte align */ 4703 4766 sz = ioc->scsiio_depth * SCSI_SENSE_BUFFERSIZE; 4704 4767 ioc->sense_dma_pool = dma_pool_create("sense pool", &ioc->pdev->dev, sz, 4705 4768 4, 0); 4706 4769 if (!ioc->sense_dma_pool) { 4707 - pr_err(MPT3SAS_FMT "sense pool: dma_pool_create failed\n", 4708 - ioc->name); 4770 + ioc_err(ioc, "sense pool: dma_pool_create failed\n"); 4709 4771 goto out; 4710 4772 } 4711 4773 ioc->sense = dma_pool_alloc(ioc->sense_dma_pool, GFP_KERNEL, 4712 4774 &ioc->sense_dma); 4713 4775 if (!ioc->sense) { 4714 - pr_err(MPT3SAS_FMT "sense pool: dma_pool_alloc failed\n", 4715 - ioc->name); 4776 + ioc_err(ioc, "sense pool: dma_pool_alloc failed\n"); 4716 4777 goto out; 4717 4778 } 4718 4779 /* sense buffer requires to be in same 4 gb region. ··· 4732 4797 dma_pool_create("sense pool", &ioc->pdev->dev, sz, 4733 4798 roundup_pow_of_two(sz), 0); 4734 4799 if (!ioc->sense_dma_pool) { 4735 - pr_err(MPT3SAS_FMT "sense pool: pci_pool_create failed\n", 4736 - ioc->name); 4800 + ioc_err(ioc, "sense pool: pci_pool_create failed\n"); 4737 4801 goto out; 4738 4802 } 4739 4803 ioc->sense = dma_pool_alloc(ioc->sense_dma_pool, GFP_KERNEL, 4740 4804 &ioc->sense_dma); 4741 4805 if (!ioc->sense) { 4742 - pr_err(MPT3SAS_FMT "sense pool: pci_pool_alloc failed\n", 4743 - ioc->name); 4806 + ioc_err(ioc, "sense pool: pci_pool_alloc failed\n"); 4744 4807 goto out; 4745 4808 } 4746 4809 } 4747 - dinitprintk(ioc, pr_info(MPT3SAS_FMT 4748 - "sense pool(0x%p): depth(%d), element_size(%d), pool_size" 4749 - "(%d kB)\n", ioc->name, ioc->sense, ioc->scsiio_depth, 4750 - SCSI_SENSE_BUFFERSIZE, sz/1024)); 4751 - dinitprintk(ioc, pr_info(MPT3SAS_FMT "sense_dma(0x%llx)\n", 4752 - ioc->name, (unsigned long long)ioc->sense_dma)); 4810 + dinitprintk(ioc, 4811 + ioc_info(ioc, "sense pool(0x%p): depth(%d), element_size(%d), pool_size(%d kB)\n", 4812 + ioc->sense, ioc->scsiio_depth, 4813 + SCSI_SENSE_BUFFERSIZE, sz / 1024)); 4814 + dinitprintk(ioc, 4815 + ioc_info(ioc, "sense_dma(0x%llx)\n", 4816 + (unsigned long long)ioc->sense_dma)); 4753 4817 total_sz += sz; 4754 4818 4755 4819 /* reply pool, 4 byte align */ ··· 4756 4822 ioc->reply_dma_pool = dma_pool_create("reply pool", &ioc->pdev->dev, sz, 4757 4823 4, 0); 4758 4824 if (!ioc->reply_dma_pool) { 4759 - pr_err(MPT3SAS_FMT "reply pool: dma_pool_create failed\n", 4760 - ioc->name); 4825 + ioc_err(ioc, "reply pool: dma_pool_create failed\n"); 4761 4826 goto out; 4762 4827 } 4763 4828 ioc->reply = dma_pool_alloc(ioc->reply_dma_pool, GFP_KERNEL, 4764 4829 &ioc->reply_dma); 4765 4830 if (!ioc->reply) { 4766 - pr_err(MPT3SAS_FMT "reply pool: dma_pool_alloc failed\n", 4767 - ioc->name); 4831 + ioc_err(ioc, "reply pool: dma_pool_alloc failed\n"); 4768 4832 goto out; 4769 4833 } 4770 4834 ioc->reply_dma_min_address = (u32)(ioc->reply_dma); 4771 4835 ioc->reply_dma_max_address = (u32)(ioc->reply_dma) + sz; 4772 - dinitprintk(ioc, pr_info(MPT3SAS_FMT 4773 - "reply pool(0x%p): depth(%d), frame_size(%d), pool_size(%d kB)\n", 4774 - ioc->name, ioc->reply, 4775 - ioc->reply_free_queue_depth, ioc->reply_sz, sz/1024)); 4776 - dinitprintk(ioc, pr_info(MPT3SAS_FMT "reply_dma(0x%llx)\n", 4777 - ioc->name, (unsigned long long)ioc->reply_dma)); 4836 + dinitprintk(ioc, 4837 + ioc_info(ioc, "reply pool(0x%p): depth(%d), frame_size(%d), pool_size(%d kB)\n", 4838 + ioc->reply, ioc->reply_free_queue_depth, 4839 + ioc->reply_sz, sz / 1024)); 4840 + dinitprintk(ioc, 4841 + ioc_info(ioc, "reply_dma(0x%llx)\n", 4842 + (unsigned long long)ioc->reply_dma)); 4778 4843 total_sz += sz; 4779 4844 4780 4845 /* reply free queue, 16 byte align */ ··· 4781 4848 ioc->reply_free_dma_pool = dma_pool_create("reply_free pool", 4782 4849 &ioc->pdev->dev, sz, 16, 0); 4783 4850 if (!ioc->reply_free_dma_pool) { 4784 - pr_err(MPT3SAS_FMT "reply_free pool: dma_pool_create failed\n", 4785 - ioc->name); 4851 + ioc_err(ioc, "reply_free pool: dma_pool_create failed\n"); 4786 4852 goto out; 4787 4853 } 4788 4854 ioc->reply_free = dma_pool_alloc(ioc->reply_free_dma_pool, GFP_KERNEL, 4789 4855 &ioc->reply_free_dma); 4790 4856 if (!ioc->reply_free) { 4791 - pr_err(MPT3SAS_FMT "reply_free pool: dma_pool_alloc failed\n", 4792 - ioc->name); 4857 + ioc_err(ioc, "reply_free pool: dma_pool_alloc failed\n"); 4793 4858 goto out; 4794 4859 } 4795 4860 memset(ioc->reply_free, 0, sz); 4796 - dinitprintk(ioc, pr_info(MPT3SAS_FMT "reply_free pool(0x%p): " \ 4797 - "depth(%d), element_size(%d), pool_size(%d kB)\n", ioc->name, 4798 - ioc->reply_free, ioc->reply_free_queue_depth, 4, sz/1024)); 4799 - dinitprintk(ioc, pr_info(MPT3SAS_FMT 4800 - "reply_free_dma (0x%llx)\n", 4801 - ioc->name, (unsigned long long)ioc->reply_free_dma)); 4861 + dinitprintk(ioc, 4862 + ioc_info(ioc, "reply_free pool(0x%p): depth(%d), element_size(%d), pool_size(%d kB)\n", 4863 + ioc->reply_free, ioc->reply_free_queue_depth, 4864 + 4, sz / 1024)); 4865 + dinitprintk(ioc, 4866 + ioc_info(ioc, "reply_free_dma (0x%llx)\n", 4867 + (unsigned long long)ioc->reply_free_dma)); 4802 4868 total_sz += sz; 4803 4869 4804 4870 if (ioc->rdpq_array_enable) { ··· 4808 4876 &ioc->pdev->dev, reply_post_free_array_sz, 16, 0); 4809 4877 if (!ioc->reply_post_free_array_dma_pool) { 4810 4878 dinitprintk(ioc, 4811 - pr_info(MPT3SAS_FMT "reply_post_free_array pool: " 4812 - "dma_pool_create failed\n", ioc->name)); 4879 + ioc_info(ioc, "reply_post_free_array pool: dma_pool_create failed\n")); 4813 4880 goto out; 4814 4881 } 4815 4882 ioc->reply_post_free_array = ··· 4816 4885 GFP_KERNEL, &ioc->reply_post_free_array_dma); 4817 4886 if (!ioc->reply_post_free_array) { 4818 4887 dinitprintk(ioc, 4819 - pr_info(MPT3SAS_FMT "reply_post_free_array pool: " 4820 - "dma_pool_alloc failed\n", ioc->name)); 4888 + ioc_info(ioc, "reply_post_free_array pool: dma_pool_alloc failed\n")); 4821 4889 goto out; 4822 4890 } 4823 4891 } ··· 4824 4894 ioc->config_page = pci_alloc_consistent(ioc->pdev, 4825 4895 ioc->config_page_sz, &ioc->config_page_dma); 4826 4896 if (!ioc->config_page) { 4827 - pr_err(MPT3SAS_FMT 4828 - "config page: dma_pool_alloc failed\n", 4829 - ioc->name); 4897 + ioc_err(ioc, "config page: dma_pool_alloc failed\n"); 4830 4898 goto out; 4831 4899 } 4832 - dinitprintk(ioc, pr_info(MPT3SAS_FMT 4833 - "config page(0x%p): size(%d)\n", 4834 - ioc->name, ioc->config_page, ioc->config_page_sz)); 4835 - dinitprintk(ioc, pr_info(MPT3SAS_FMT "config_page_dma(0x%llx)\n", 4836 - ioc->name, (unsigned long long)ioc->config_page_dma)); 4900 + dinitprintk(ioc, 4901 + ioc_info(ioc, "config page(0x%p): size(%d)\n", 4902 + ioc->config_page, ioc->config_page_sz)); 4903 + dinitprintk(ioc, 4904 + ioc_info(ioc, "config_page_dma(0x%llx)\n", 4905 + (unsigned long long)ioc->config_page_dma)); 4837 4906 total_sz += ioc->config_page_sz; 4838 4907 4839 - pr_info(MPT3SAS_FMT "Allocated physical memory: size(%d kB)\n", 4840 - ioc->name, total_sz/1024); 4841 - pr_info(MPT3SAS_FMT 4842 - "Current Controller Queue Depth(%d),Max Controller Queue Depth(%d)\n", 4843 - ioc->name, ioc->shost->can_queue, facts->RequestCredit); 4844 - pr_info(MPT3SAS_FMT "Scatter Gather Elements per IO(%d)\n", 4845 - ioc->name, ioc->shost->sg_tablesize); 4908 + ioc_info(ioc, "Allocated physical memory: size(%d kB)\n", 4909 + total_sz / 1024); 4910 + ioc_info(ioc, "Current Controller Queue Depth(%d),Max Controller Queue Depth(%d)\n", 4911 + ioc->shost->can_queue, facts->RequestCredit); 4912 + ioc_info(ioc, "Scatter Gather Elements per IO(%d)\n", 4913 + ioc->shost->sg_tablesize); 4846 4914 return 0; 4847 4915 4848 4916 out: ··· 4918 4990 do { 4919 4991 int_status = readl(&ioc->chip->HostInterruptStatus); 4920 4992 if (int_status & MPI2_HIS_IOC2SYS_DB_STATUS) { 4921 - dhsprintk(ioc, pr_info(MPT3SAS_FMT 4922 - "%s: successful count(%d), timeout(%d)\n", 4923 - ioc->name, __func__, count, timeout)); 4993 + dhsprintk(ioc, 4994 + ioc_info(ioc, "%s: successful count(%d), timeout(%d)\n", 4995 + __func__, count, timeout)); 4924 4996 return 0; 4925 4997 } 4926 4998 ··· 4928 5000 count++; 4929 5001 } while (--cntdn); 4930 5002 4931 - pr_err(MPT3SAS_FMT 4932 - "%s: failed due to timeout count(%d), int_status(%x)!\n", 4933 - ioc->name, __func__, count, int_status); 5003 + ioc_err(ioc, "%s: failed due to timeout count(%d), int_status(%x)!\n", 5004 + __func__, count, int_status); 4934 5005 return -EFAULT; 4935 5006 } 4936 5007 ··· 4944 5017 do { 4945 5018 int_status = readl(&ioc->chip->HostInterruptStatus); 4946 5019 if (int_status & MPI2_HIS_IOC2SYS_DB_STATUS) { 4947 - dhsprintk(ioc, pr_info(MPT3SAS_FMT 4948 - "%s: successful count(%d), timeout(%d)\n", 4949 - ioc->name, __func__, count, timeout)); 5020 + dhsprintk(ioc, 5021 + ioc_info(ioc, "%s: successful count(%d), timeout(%d)\n", 5022 + __func__, count, timeout)); 4950 5023 return 0; 4951 5024 } 4952 5025 ··· 4954 5027 count++; 4955 5028 } while (--cntdn); 4956 5029 4957 - pr_err(MPT3SAS_FMT 4958 - "%s: failed due to timeout count(%d), int_status(%x)!\n", 4959 - ioc->name, __func__, count, int_status); 5030 + ioc_err(ioc, "%s: failed due to timeout count(%d), int_status(%x)!\n", 5031 + __func__, count, int_status); 4960 5032 return -EFAULT; 4961 5033 4962 5034 } ··· 4982 5056 do { 4983 5057 int_status = readl(&ioc->chip->HostInterruptStatus); 4984 5058 if (!(int_status & MPI2_HIS_SYS2IOC_DB_STATUS)) { 4985 - dhsprintk(ioc, pr_info(MPT3SAS_FMT 4986 - "%s: successful count(%d), timeout(%d)\n", 4987 - ioc->name, __func__, count, timeout)); 5059 + dhsprintk(ioc, 5060 + ioc_info(ioc, "%s: successful count(%d), timeout(%d)\n", 5061 + __func__, count, timeout)); 4988 5062 return 0; 4989 5063 } else if (int_status & MPI2_HIS_IOC2SYS_DB_STATUS) { 4990 5064 doorbell = readl(&ioc->chip->Doorbell); ··· 5001 5075 } while (--cntdn); 5002 5076 5003 5077 out: 5004 - pr_err(MPT3SAS_FMT 5005 - "%s: failed due to timeout count(%d), int_status(%x)!\n", 5006 - ioc->name, __func__, count, int_status); 5078 + ioc_err(ioc, "%s: failed due to timeout count(%d), int_status(%x)!\n", 5079 + __func__, count, int_status); 5007 5080 return -EFAULT; 5008 5081 } 5009 5082 ··· 5024 5099 do { 5025 5100 doorbell_reg = readl(&ioc->chip->Doorbell); 5026 5101 if (!(doorbell_reg & MPI2_DOORBELL_USED)) { 5027 - dhsprintk(ioc, pr_info(MPT3SAS_FMT 5028 - "%s: successful count(%d), timeout(%d)\n", 5029 - ioc->name, __func__, count, timeout)); 5102 + dhsprintk(ioc, 5103 + ioc_info(ioc, "%s: successful count(%d), timeout(%d)\n", 5104 + __func__, count, timeout)); 5030 5105 return 0; 5031 5106 } 5032 5107 ··· 5034 5109 count++; 5035 5110 } while (--cntdn); 5036 5111 5037 - pr_err(MPT3SAS_FMT 5038 - "%s: failed due to timeout count(%d), doorbell_reg(%x)!\n", 5039 - ioc->name, __func__, count, doorbell_reg); 5112 + ioc_err(ioc, "%s: failed due to timeout count(%d), doorbell_reg(%x)!\n", 5113 + __func__, count, doorbell_reg); 5040 5114 return -EFAULT; 5041 5115 } 5042 5116 ··· 5054 5130 int r = 0; 5055 5131 5056 5132 if (reset_type != MPI2_FUNCTION_IOC_MESSAGE_UNIT_RESET) { 5057 - pr_err(MPT3SAS_FMT "%s: unknown reset_type\n", 5058 - ioc->name, __func__); 5133 + ioc_err(ioc, "%s: unknown reset_type\n", __func__); 5059 5134 return -EFAULT; 5060 5135 } 5061 5136 ··· 5062 5139 MPI2_IOCFACTS_CAPABILITY_EVENT_REPLAY)) 5063 5140 return -EFAULT; 5064 5141 5065 - pr_info(MPT3SAS_FMT "sending message unit reset !!\n", ioc->name); 5142 + ioc_info(ioc, "sending message unit reset !!\n"); 5066 5143 5067 5144 writel(reset_type << MPI2_DOORBELL_FUNCTION_SHIFT, 5068 5145 &ioc->chip->Doorbell); ··· 5072 5149 } 5073 5150 ioc_state = _base_wait_on_iocstate(ioc, MPI2_IOC_STATE_READY, timeout); 5074 5151 if (ioc_state) { 5075 - pr_err(MPT3SAS_FMT 5076 - "%s: failed going to ready state (ioc_state=0x%x)\n", 5077 - ioc->name, __func__, ioc_state); 5152 + ioc_err(ioc, "%s: failed going to ready state (ioc_state=0x%x)\n", 5153 + __func__, ioc_state); 5078 5154 r = -EFAULT; 5079 5155 goto out; 5080 5156 } 5081 5157 out: 5082 - pr_info(MPT3SAS_FMT "message unit reset: %s\n", 5083 - ioc->name, ((r == 0) ? "SUCCESS" : "FAILED")); 5158 + ioc_info(ioc, "message unit reset: %s\n", 5159 + r == 0 ? "SUCCESS" : "FAILED"); 5084 5160 return r; 5085 5161 } 5086 5162 ··· 5105 5183 5106 5184 /* make sure doorbell is not in use */ 5107 5185 if ((readl(&ioc->chip->Doorbell) & MPI2_DOORBELL_USED)) { 5108 - pr_err(MPT3SAS_FMT 5109 - "doorbell is in use (line=%d)\n", 5110 - ioc->name, __LINE__); 5186 + ioc_err(ioc, "doorbell is in use (line=%d)\n", __LINE__); 5111 5187 return -EFAULT; 5112 5188 } 5113 5189 ··· 5120 5200 &ioc->chip->Doorbell); 5121 5201 5122 5202 if ((_base_spin_on_doorbell_int(ioc, 5))) { 5123 - pr_err(MPT3SAS_FMT 5124 - "doorbell handshake int failed (line=%d)\n", 5125 - ioc->name, __LINE__); 5203 + ioc_err(ioc, "doorbell handshake int failed (line=%d)\n", 5204 + __LINE__); 5126 5205 return -EFAULT; 5127 5206 } 5128 5207 writel(0, &ioc->chip->HostInterruptStatus); 5129 5208 5130 5209 if ((_base_wait_for_doorbell_ack(ioc, 5))) { 5131 - pr_err(MPT3SAS_FMT 5132 - "doorbell handshake ack failed (line=%d)\n", 5133 - ioc->name, __LINE__); 5210 + ioc_err(ioc, "doorbell handshake ack failed (line=%d)\n", 5211 + __LINE__); 5134 5212 return -EFAULT; 5135 5213 } 5136 5214 ··· 5140 5222 } 5141 5223 5142 5224 if (failed) { 5143 - pr_err(MPT3SAS_FMT 5144 - "doorbell handshake sending request failed (line=%d)\n", 5145 - ioc->name, __LINE__); 5225 + ioc_err(ioc, "doorbell handshake sending request failed (line=%d)\n", 5226 + __LINE__); 5146 5227 return -EFAULT; 5147 5228 } 5148 5229 5149 5230 /* now wait for the reply */ 5150 5231 if ((_base_wait_for_doorbell_int(ioc, timeout))) { 5151 - pr_err(MPT3SAS_FMT 5152 - "doorbell handshake int failed (line=%d)\n", 5153 - ioc->name, __LINE__); 5232 + ioc_err(ioc, "doorbell handshake int failed (line=%d)\n", 5233 + __LINE__); 5154 5234 return -EFAULT; 5155 5235 } 5156 5236 ··· 5157 5241 & MPI2_DOORBELL_DATA_MASK); 5158 5242 writel(0, &ioc->chip->HostInterruptStatus); 5159 5243 if ((_base_wait_for_doorbell_int(ioc, 5))) { 5160 - pr_err(MPT3SAS_FMT 5161 - "doorbell handshake int failed (line=%d)\n", 5162 - ioc->name, __LINE__); 5244 + ioc_err(ioc, "doorbell handshake int failed (line=%d)\n", 5245 + __LINE__); 5163 5246 return -EFAULT; 5164 5247 } 5165 5248 reply[1] = le16_to_cpu(readl(&ioc->chip->Doorbell) ··· 5167 5252 5168 5253 for (i = 2; i < default_reply->MsgLength * 2; i++) { 5169 5254 if ((_base_wait_for_doorbell_int(ioc, 5))) { 5170 - pr_err(MPT3SAS_FMT 5171 - "doorbell handshake int failed (line=%d)\n", 5172 - ioc->name, __LINE__); 5255 + ioc_err(ioc, "doorbell handshake int failed (line=%d)\n", 5256 + __LINE__); 5173 5257 return -EFAULT; 5174 5258 } 5175 5259 if (i >= reply_bytes/2) /* overflow case */ ··· 5181 5267 5182 5268 _base_wait_for_doorbell_int(ioc, 5); 5183 5269 if (_base_wait_for_doorbell_not_used(ioc, 5) != 0) { 5184 - dhsprintk(ioc, pr_info(MPT3SAS_FMT 5185 - "doorbell is in use (line=%d)\n", ioc->name, __LINE__)); 5270 + dhsprintk(ioc, 5271 + ioc_info(ioc, "doorbell is in use (line=%d)\n", 5272 + __LINE__)); 5186 5273 } 5187 5274 writel(0, &ioc->chip->HostInterruptStatus); 5188 5275 ··· 5223 5308 void *request; 5224 5309 u16 wait_state_count; 5225 5310 5226 - dinitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name, 5227 - __func__)); 5311 + dinitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); 5228 5312 5229 5313 mutex_lock(&ioc->base_cmds.mutex); 5230 5314 5231 5315 if (ioc->base_cmds.status != MPT3_CMD_NOT_USED) { 5232 - pr_err(MPT3SAS_FMT "%s: base_cmd in use\n", 5233 - ioc->name, __func__); 5316 + ioc_err(ioc, "%s: base_cmd in use\n", __func__); 5234 5317 rc = -EAGAIN; 5235 5318 goto out; 5236 5319 } ··· 5237 5324 ioc_state = mpt3sas_base_get_iocstate(ioc, 1); 5238 5325 while (ioc_state != MPI2_IOC_STATE_OPERATIONAL) { 5239 5326 if (wait_state_count++ == 10) { 5240 - pr_err(MPT3SAS_FMT 5241 - "%s: failed due to ioc not operational\n", 5242 - ioc->name, __func__); 5327 + ioc_err(ioc, "%s: failed due to ioc not operational\n", 5328 + __func__); 5243 5329 rc = -EFAULT; 5244 5330 goto out; 5245 5331 } 5246 5332 ssleep(1); 5247 5333 ioc_state = mpt3sas_base_get_iocstate(ioc, 1); 5248 - pr_info(MPT3SAS_FMT 5249 - "%s: waiting for operational state(count=%d)\n", 5250 - ioc->name, __func__, wait_state_count); 5334 + ioc_info(ioc, "%s: waiting for operational state(count=%d)\n", 5335 + __func__, wait_state_count); 5251 5336 } 5252 5337 5253 5338 smid = mpt3sas_base_get_smid(ioc, ioc->base_cb_idx); 5254 5339 if (!smid) { 5255 - pr_err(MPT3SAS_FMT "%s: failed obtaining a smid\n", 5256 - ioc->name, __func__); 5340 + ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); 5257 5341 rc = -EAGAIN; 5258 5342 goto out; 5259 5343 } ··· 5318 5408 void *request; 5319 5409 u16 wait_state_count; 5320 5410 5321 - dinitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name, 5322 - __func__)); 5411 + dinitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); 5323 5412 5324 5413 mutex_lock(&ioc->base_cmds.mutex); 5325 5414 5326 5415 if (ioc->base_cmds.status != MPT3_CMD_NOT_USED) { 5327 - pr_err(MPT3SAS_FMT "%s: base_cmd in use\n", 5328 - ioc->name, __func__); 5416 + ioc_err(ioc, "%s: base_cmd in use\n", __func__); 5329 5417 rc = -EAGAIN; 5330 5418 goto out; 5331 5419 } ··· 5332 5424 ioc_state = mpt3sas_base_get_iocstate(ioc, 1); 5333 5425 while (ioc_state != MPI2_IOC_STATE_OPERATIONAL) { 5334 5426 if (wait_state_count++ == 10) { 5335 - pr_err(MPT3SAS_FMT 5336 - "%s: failed due to ioc not operational\n", 5337 - ioc->name, __func__); 5427 + ioc_err(ioc, "%s: failed due to ioc not operational\n", 5428 + __func__); 5338 5429 rc = -EFAULT; 5339 5430 goto out; 5340 5431 } 5341 5432 ssleep(1); 5342 5433 ioc_state = mpt3sas_base_get_iocstate(ioc, 1); 5343 - pr_info(MPT3SAS_FMT 5344 - "%s: waiting for operational state(count=%d)\n", 5345 - ioc->name, 5346 - __func__, wait_state_count); 5434 + ioc_info(ioc, "%s: waiting for operational state(count=%d)\n", 5435 + __func__, wait_state_count); 5347 5436 } 5348 5437 5349 5438 smid = mpt3sas_base_get_smid(ioc, ioc->base_cb_idx); 5350 5439 if (!smid) { 5351 - pr_err(MPT3SAS_FMT "%s: failed obtaining a smid\n", 5352 - ioc->name, __func__); 5440 + ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); 5353 5441 rc = -EAGAIN; 5354 5442 goto out; 5355 5443 } ··· 5399 5495 struct mpt3sas_port_facts *pfacts; 5400 5496 int mpi_reply_sz, mpi_request_sz, r; 5401 5497 5402 - dinitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name, 5403 - __func__)); 5498 + dinitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); 5404 5499 5405 5500 mpi_reply_sz = sizeof(Mpi2PortFactsReply_t); 5406 5501 mpi_request_sz = sizeof(Mpi2PortFactsRequest_t); ··· 5410 5507 (u32 *)&mpi_request, mpi_reply_sz, (u16 *)&mpi_reply, 5); 5411 5508 5412 5509 if (r != 0) { 5413 - pr_err(MPT3SAS_FMT "%s: handshake failed (r=%d)\n", 5414 - ioc->name, __func__, r); 5510 + ioc_err(ioc, "%s: handshake failed (r=%d)\n", __func__, r); 5415 5511 return r; 5416 5512 } 5417 5513 ··· 5494 5592 struct mpt3sas_facts *facts; 5495 5593 int mpi_reply_sz, mpi_request_sz, r; 5496 5594 5497 - dinitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name, 5498 - __func__)); 5595 + dinitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); 5499 5596 5500 5597 r = _base_wait_for_iocstate(ioc, 10); 5501 5598 if (r) { ··· 5511 5610 (u32 *)&mpi_request, mpi_reply_sz, (u16 *)&mpi_reply, 5); 5512 5611 5513 5612 if (r != 0) { 5514 - pr_err(MPT3SAS_FMT "%s: handshake failed (r=%d)\n", 5515 - ioc->name, __func__, r); 5613 + ioc_err(ioc, "%s: handshake failed (r=%d)\n", __func__, r); 5516 5614 return r; 5517 5615 } 5518 5616 ··· 5563 5663 */ 5564 5664 ioc->page_size = 1 << facts->CurrentHostPageSize; 5565 5665 if (ioc->page_size == 1) { 5566 - pr_info(MPT3SAS_FMT "CurrentHostPageSize is 0: Setting " 5567 - "default host page size to 4k\n", ioc->name); 5666 + ioc_info(ioc, "CurrentHostPageSize is 0: Setting default host page size to 4k\n"); 5568 5667 ioc->page_size = 1 << MPT3SAS_HOST_PAGE_SIZE_4K; 5569 5668 } 5570 - dinitprintk(ioc, pr_info(MPT3SAS_FMT "CurrentHostPageSize(%d)\n", 5571 - ioc->name, facts->CurrentHostPageSize)); 5669 + dinitprintk(ioc, 5670 + ioc_info(ioc, "CurrentHostPageSize(%d)\n", 5671 + facts->CurrentHostPageSize)); 5572 5672 5573 - dinitprintk(ioc, pr_info(MPT3SAS_FMT 5574 - "hba queue depth(%d), max chains per io(%d)\n", 5575 - ioc->name, facts->RequestCredit, 5576 - facts->MaxChainDepth)); 5577 - dinitprintk(ioc, pr_info(MPT3SAS_FMT 5578 - "request frame size(%d), reply frame size(%d)\n", ioc->name, 5579 - facts->IOCRequestFrameSize * 4, facts->ReplyFrameSize * 4)); 5673 + dinitprintk(ioc, 5674 + ioc_info(ioc, "hba queue depth(%d), max chains per io(%d)\n", 5675 + facts->RequestCredit, facts->MaxChainDepth)); 5676 + dinitprintk(ioc, 5677 + ioc_info(ioc, "request frame size(%d), reply frame size(%d)\n", 5678 + facts->IOCRequestFrameSize * 4, 5679 + facts->ReplyFrameSize * 4)); 5580 5680 return 0; 5581 5681 } 5582 5682 ··· 5596 5696 u16 ioc_status; 5597 5697 u32 reply_post_free_array_sz = 0; 5598 5698 5599 - dinitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name, 5600 - __func__)); 5699 + dinitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); 5601 5700 5602 5701 memset(&mpi_request, 0, sizeof(Mpi2IOCInitRequest_t)); 5603 5702 mpi_request.Function = MPI2_FUNCTION_IOC_INIT; ··· 5662 5763 sizeof(Mpi2IOCInitReply_t), (u16 *)&mpi_reply, 10); 5663 5764 5664 5765 if (r != 0) { 5665 - pr_err(MPT3SAS_FMT "%s: handshake failed (r=%d)\n", 5666 - ioc->name, __func__, r); 5766 + ioc_err(ioc, "%s: handshake failed (r=%d)\n", __func__, r); 5667 5767 return r; 5668 5768 } 5669 5769 5670 5770 ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & MPI2_IOCSTATUS_MASK; 5671 5771 if (ioc_status != MPI2_IOCSTATUS_SUCCESS || 5672 5772 mpi_reply.IOCLogInfo) { 5673 - pr_err(MPT3SAS_FMT "%s: failed\n", ioc->name, __func__); 5773 + ioc_err(ioc, "%s: failed\n", __func__); 5674 5774 r = -EIO; 5675 5775 } 5676 5776 ··· 5740 5842 u16 smid; 5741 5843 u16 ioc_status; 5742 5844 5743 - pr_info(MPT3SAS_FMT "sending port enable !!\n", ioc->name); 5845 + ioc_info(ioc, "sending port enable !!\n"); 5744 5846 5745 5847 if (ioc->port_enable_cmds.status & MPT3_CMD_PENDING) { 5746 - pr_err(MPT3SAS_FMT "%s: internal command already in use\n", 5747 - ioc->name, __func__); 5848 + ioc_err(ioc, "%s: internal command already in use\n", __func__); 5748 5849 return -EAGAIN; 5749 5850 } 5750 5851 5751 5852 smid = mpt3sas_base_get_smid(ioc, ioc->port_enable_cb_idx); 5752 5853 if (!smid) { 5753 - pr_err(MPT3SAS_FMT "%s: failed obtaining a smid\n", 5754 - ioc->name, __func__); 5854 + ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); 5755 5855 return -EAGAIN; 5756 5856 } 5757 5857 ··· 5763 5867 mpt3sas_base_put_smid_default(ioc, smid); 5764 5868 wait_for_completion_timeout(&ioc->port_enable_cmds.done, 300*HZ); 5765 5869 if (!(ioc->port_enable_cmds.status & MPT3_CMD_COMPLETE)) { 5766 - pr_err(MPT3SAS_FMT "%s: timeout\n", 5767 - ioc->name, __func__); 5870 + ioc_err(ioc, "%s: timeout\n", __func__); 5768 5871 _debug_dump_mf(mpi_request, 5769 5872 sizeof(Mpi2PortEnableRequest_t)/4); 5770 5873 if (ioc->port_enable_cmds.status & MPT3_CMD_RESET) ··· 5776 5881 mpi_reply = ioc->port_enable_cmds.reply; 5777 5882 ioc_status = le16_to_cpu(mpi_reply->IOCStatus) & MPI2_IOCSTATUS_MASK; 5778 5883 if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { 5779 - pr_err(MPT3SAS_FMT "%s: failed with (ioc_status=0x%08x)\n", 5780 - ioc->name, __func__, ioc_status); 5884 + ioc_err(ioc, "%s: failed with (ioc_status=0x%08x)\n", 5885 + __func__, ioc_status); 5781 5886 r = -EFAULT; 5782 5887 goto out; 5783 5888 } 5784 5889 5785 5890 out: 5786 5891 ioc->port_enable_cmds.status = MPT3_CMD_NOT_USED; 5787 - pr_info(MPT3SAS_FMT "port enable: %s\n", ioc->name, ((r == 0) ? 5788 - "SUCCESS" : "FAILED")); 5892 + ioc_info(ioc, "port enable: %s\n", r == 0 ? "SUCCESS" : "FAILED"); 5789 5893 return r; 5790 5894 } 5791 5895 ··· 5800 5906 Mpi2PortEnableRequest_t *mpi_request; 5801 5907 u16 smid; 5802 5908 5803 - pr_info(MPT3SAS_FMT "sending port enable !!\n", ioc->name); 5909 + ioc_info(ioc, "sending port enable !!\n"); 5804 5910 5805 5911 if (ioc->port_enable_cmds.status & MPT3_CMD_PENDING) { 5806 - pr_err(MPT3SAS_FMT "%s: internal command already in use\n", 5807 - ioc->name, __func__); 5912 + ioc_err(ioc, "%s: internal command already in use\n", __func__); 5808 5913 return -EAGAIN; 5809 5914 } 5810 5915 5811 5916 smid = mpt3sas_base_get_smid(ioc, ioc->port_enable_cb_idx); 5812 5917 if (!smid) { 5813 - pr_err(MPT3SAS_FMT "%s: failed obtaining a smid\n", 5814 - ioc->name, __func__); 5918 + ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); 5815 5919 return -EAGAIN; 5816 5920 } 5817 5921 ··· 5912 6020 int r = 0; 5913 6021 int i; 5914 6022 5915 - dinitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name, 5916 - __func__)); 6023 + dinitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); 5917 6024 5918 6025 if (ioc->base_cmds.status & MPT3_CMD_PENDING) { 5919 - pr_err(MPT3SAS_FMT "%s: internal command already in use\n", 5920 - ioc->name, __func__); 6026 + ioc_err(ioc, "%s: internal command already in use\n", __func__); 5921 6027 return -EAGAIN; 5922 6028 } 5923 6029 5924 6030 smid = mpt3sas_base_get_smid(ioc, ioc->base_cb_idx); 5925 6031 if (!smid) { 5926 - pr_err(MPT3SAS_FMT "%s: failed obtaining a smid\n", 5927 - ioc->name, __func__); 6032 + ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); 5928 6033 return -EAGAIN; 5929 6034 } 5930 6035 ioc->base_cmds.status = MPT3_CMD_PENDING; ··· 5938 6049 mpt3sas_base_put_smid_default(ioc, smid); 5939 6050 wait_for_completion_timeout(&ioc->base_cmds.done, 30*HZ); 5940 6051 if (!(ioc->base_cmds.status & MPT3_CMD_COMPLETE)) { 5941 - pr_err(MPT3SAS_FMT "%s: timeout\n", 5942 - ioc->name, __func__); 6052 + ioc_err(ioc, "%s: timeout\n", __func__); 5943 6053 _debug_dump_mf(mpi_request, 5944 6054 sizeof(Mpi2EventNotificationRequest_t)/4); 5945 6055 if (ioc->base_cmds.status & MPT3_CMD_RESET) ··· 5946 6058 else 5947 6059 r = -ETIME; 5948 6060 } else 5949 - dinitprintk(ioc, pr_info(MPT3SAS_FMT "%s: complete\n", 5950 - ioc->name, __func__)); 6061 + dinitprintk(ioc, ioc_info(ioc, "%s: complete\n", __func__)); 5951 6062 ioc->base_cmds.status = MPT3_CMD_NOT_USED; 5952 6063 return r; 5953 6064 } ··· 6002 6115 u32 count; 6003 6116 u32 hcb_size; 6004 6117 6005 - pr_info(MPT3SAS_FMT "sending diag reset !!\n", ioc->name); 6118 + ioc_info(ioc, "sending diag reset !!\n"); 6006 6119 6007 - drsprintk(ioc, pr_info(MPT3SAS_FMT "clear interrupts\n", 6008 - ioc->name)); 6120 + drsprintk(ioc, ioc_info(ioc, "clear interrupts\n")); 6009 6121 6010 6122 count = 0; 6011 6123 do { 6012 6124 /* Write magic sequence to WriteSequence register 6013 6125 * Loop until in diagnostic mode 6014 6126 */ 6015 - drsprintk(ioc, pr_info(MPT3SAS_FMT 6016 - "write magic sequence\n", ioc->name)); 6127 + drsprintk(ioc, ioc_info(ioc, "write magic sequence\n")); 6017 6128 writel(MPI2_WRSEQ_FLUSH_KEY_VALUE, &ioc->chip->WriteSequence); 6018 6129 writel(MPI2_WRSEQ_1ST_KEY_VALUE, &ioc->chip->WriteSequence); 6019 6130 writel(MPI2_WRSEQ_2ND_KEY_VALUE, &ioc->chip->WriteSequence); ··· 6027 6142 goto out; 6028 6143 6029 6144 host_diagnostic = readl(&ioc->chip->HostDiagnostic); 6030 - drsprintk(ioc, pr_info(MPT3SAS_FMT 6031 - "wrote magic sequence: count(%d), host_diagnostic(0x%08x)\n", 6032 - ioc->name, count, host_diagnostic)); 6145 + drsprintk(ioc, 6146 + ioc_info(ioc, "wrote magic sequence: count(%d), host_diagnostic(0x%08x)\n", 6147 + count, host_diagnostic)); 6033 6148 6034 6149 } while ((host_diagnostic & MPI2_DIAG_DIAG_WRITE_ENABLE) == 0); 6035 6150 6036 6151 hcb_size = readl(&ioc->chip->HCBSize); 6037 6152 6038 - drsprintk(ioc, pr_info(MPT3SAS_FMT "diag reset: issued\n", 6039 - ioc->name)); 6153 + drsprintk(ioc, ioc_info(ioc, "diag reset: issued\n")); 6040 6154 writel(host_diagnostic | MPI2_DIAG_RESET_ADAPTER, 6041 6155 &ioc->chip->HostDiagnostic); 6042 6156 ··· 6058 6174 6059 6175 if (host_diagnostic & MPI2_DIAG_HCB_MODE) { 6060 6176 6061 - drsprintk(ioc, pr_info(MPT3SAS_FMT 6062 - "restart the adapter assuming the HCB Address points to good F/W\n", 6063 - ioc->name)); 6177 + drsprintk(ioc, 6178 + ioc_info(ioc, "restart the adapter assuming the HCB Address points to good F/W\n")); 6064 6179 host_diagnostic &= ~MPI2_DIAG_BOOT_DEVICE_SELECT_MASK; 6065 6180 host_diagnostic |= MPI2_DIAG_BOOT_DEVICE_SELECT_HCDW; 6066 6181 writel(host_diagnostic, &ioc->chip->HostDiagnostic); 6067 6182 6068 - drsprintk(ioc, pr_info(MPT3SAS_FMT 6069 - "re-enable the HCDW\n", ioc->name)); 6183 + drsprintk(ioc, ioc_info(ioc, "re-enable the HCDW\n")); 6070 6184 writel(hcb_size | MPI2_HCB_SIZE_HCB_ENABLE, 6071 6185 &ioc->chip->HCBSize); 6072 6186 } 6073 6187 6074 - drsprintk(ioc, pr_info(MPT3SAS_FMT "restart the adapter\n", 6075 - ioc->name)); 6188 + drsprintk(ioc, ioc_info(ioc, "restart the adapter\n")); 6076 6189 writel(host_diagnostic & ~MPI2_DIAG_HOLD_IOC_RESET, 6077 6190 &ioc->chip->HostDiagnostic); 6078 6191 6079 - drsprintk(ioc, pr_info(MPT3SAS_FMT 6080 - "disable writes to the diagnostic register\n", ioc->name)); 6192 + drsprintk(ioc, 6193 + ioc_info(ioc, "disable writes to the diagnostic register\n")); 6081 6194 writel(MPI2_WRSEQ_FLUSH_KEY_VALUE, &ioc->chip->WriteSequence); 6082 6195 6083 - drsprintk(ioc, pr_info(MPT3SAS_FMT 6084 - "Wait for FW to go to the READY state\n", ioc->name)); 6196 + drsprintk(ioc, ioc_info(ioc, "Wait for FW to go to the READY state\n")); 6085 6197 ioc_state = _base_wait_on_iocstate(ioc, MPI2_IOC_STATE_READY, 20); 6086 6198 if (ioc_state) { 6087 - pr_err(MPT3SAS_FMT 6088 - "%s: failed going to ready state (ioc_state=0x%x)\n", 6089 - ioc->name, __func__, ioc_state); 6199 + ioc_err(ioc, "%s: failed going to ready state (ioc_state=0x%x)\n", 6200 + __func__, ioc_state); 6090 6201 goto out; 6091 6202 } 6092 6203 6093 - pr_info(MPT3SAS_FMT "diag reset: SUCCESS\n", ioc->name); 6204 + ioc_info(ioc, "diag reset: SUCCESS\n"); 6094 6205 return 0; 6095 6206 6096 6207 out: 6097 - pr_err(MPT3SAS_FMT "diag reset: FAILED\n", ioc->name); 6208 + ioc_err(ioc, "diag reset: FAILED\n"); 6098 6209 return -EFAULT; 6099 6210 } 6100 6211 ··· 6107 6228 int rc; 6108 6229 int count; 6109 6230 6110 - dinitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name, 6111 - __func__)); 6231 + dinitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); 6112 6232 6113 6233 if (ioc->pci_error_recovery) 6114 6234 return 0; 6115 6235 6116 6236 ioc_state = mpt3sas_base_get_iocstate(ioc, 0); 6117 - dhsprintk(ioc, pr_info(MPT3SAS_FMT "%s: ioc_state(0x%08x)\n", 6118 - ioc->name, __func__, ioc_state)); 6237 + dhsprintk(ioc, 6238 + ioc_info(ioc, "%s: ioc_state(0x%08x)\n", 6239 + __func__, ioc_state)); 6119 6240 6120 6241 /* if in RESET state, it should move to READY state shortly */ 6121 6242 count = 0; ··· 6123 6244 while ((ioc_state & MPI2_IOC_STATE_MASK) != 6124 6245 MPI2_IOC_STATE_READY) { 6125 6246 if (count++ == 10) { 6126 - pr_err(MPT3SAS_FMT 6127 - "%s: failed going to ready state (ioc_state=0x%x)\n", 6128 - ioc->name, __func__, ioc_state); 6247 + ioc_err(ioc, "%s: failed going to ready state (ioc_state=0x%x)\n", 6248 + __func__, ioc_state); 6129 6249 return -EFAULT; 6130 6250 } 6131 6251 ssleep(1); ··· 6136 6258 return 0; 6137 6259 6138 6260 if (ioc_state & MPI2_DOORBELL_USED) { 6139 - dhsprintk(ioc, pr_info(MPT3SAS_FMT 6140 - "unexpected doorbell active!\n", 6141 - ioc->name)); 6261 + dhsprintk(ioc, ioc_info(ioc, "unexpected doorbell active!\n")); 6142 6262 goto issue_diag_reset; 6143 6263 } 6144 6264 ··· 6180 6304 struct adapter_reply_queue *reply_q; 6181 6305 Mpi2ReplyDescriptorsUnion_t *reply_post_free_contig; 6182 6306 6183 - dinitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name, 6184 - __func__)); 6307 + dinitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); 6185 6308 6186 6309 /* clean the delayed target reset list */ 6187 6310 list_for_each_entry_safe(delayed_tr, delayed_tr_next, ··· 6340 6465 void 6341 6466 mpt3sas_base_free_resources(struct MPT3SAS_ADAPTER *ioc) 6342 6467 { 6343 - dexitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name, 6344 - __func__)); 6468 + dexitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); 6345 6469 6346 6470 /* synchronizing freeing resource with pci_access_mutex lock */ 6347 6471 mutex_lock(&ioc->pci_access_mutex); ··· 6368 6494 int r, i; 6369 6495 int cpu_id, last_cpu_id = 0; 6370 6496 6371 - dinitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name, 6372 - __func__)); 6497 + dinitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); 6373 6498 6374 6499 /* setup cpu_msix_table */ 6375 6500 ioc->cpu_count = num_online_cpus(); ··· 6378 6505 ioc->cpu_msix_table = kzalloc(ioc->cpu_msix_table_sz, GFP_KERNEL); 6379 6506 ioc->reply_queue_count = 1; 6380 6507 if (!ioc->cpu_msix_table) { 6381 - dfailprintk(ioc, pr_info(MPT3SAS_FMT 6382 - "allocation for cpu_msix_table failed!!!\n", 6383 - ioc->name)); 6508 + dfailprintk(ioc, 6509 + ioc_info(ioc, "allocation for cpu_msix_table failed!!!\n")); 6384 6510 r = -ENOMEM; 6385 6511 goto out_free_resources; 6386 6512 } ··· 6388 6516 ioc->reply_post_host_index = kcalloc(ioc->cpu_msix_table_sz, 6389 6517 sizeof(resource_size_t *), GFP_KERNEL); 6390 6518 if (!ioc->reply_post_host_index) { 6391 - dfailprintk(ioc, pr_info(MPT3SAS_FMT "allocation " 6392 - "for reply_post_host_index failed!!!\n", 6393 - ioc->name)); 6519 + dfailprintk(ioc, 6520 + ioc_info(ioc, "allocation for reply_post_host_index failed!!!\n")); 6394 6521 r = -ENOMEM; 6395 6522 goto out_free_resources; 6396 6523 } ··· 6618 6747 void 6619 6748 mpt3sas_base_detach(struct MPT3SAS_ADAPTER *ioc) 6620 6749 { 6621 - dexitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name, 6622 - __func__)); 6750 + dexitprintk(ioc, ioc_info(ioc, "%s\n", __func__)); 6623 6751 6624 6752 mpt3sas_base_stop_watchdog(ioc); 6625 6753 mpt3sas_base_free_resources(ioc); ··· 6651 6781 { 6652 6782 mpt3sas_scsih_pre_reset_handler(ioc); 6653 6783 mpt3sas_ctl_pre_reset_handler(ioc); 6654 - dtmprintk(ioc, pr_info(MPT3SAS_FMT 6655 - "%s: MPT3_IOC_PRE_RESET\n", ioc->name, __func__)); 6784 + dtmprintk(ioc, ioc_info(ioc, "%s: MPT3_IOC_PRE_RESET\n", __func__)); 6656 6785 } 6657 6786 6658 6787 /** ··· 6662 6793 { 6663 6794 mpt3sas_scsih_after_reset_handler(ioc); 6664 6795 mpt3sas_ctl_after_reset_handler(ioc); 6665 - dtmprintk(ioc, pr_info(MPT3SAS_FMT 6666 - "%s: MPT3_IOC_AFTER_RESET\n", ioc->name, __func__)); 6796 + dtmprintk(ioc, ioc_info(ioc, "%s: MPT3_IOC_AFTER_RESET\n", __func__)); 6667 6797 if (ioc->transport_cmds.status & MPT3_CMD_PENDING) { 6668 6798 ioc->transport_cmds.status |= MPT3_CMD_RESET; 6669 6799 mpt3sas_base_free_smid(ioc, ioc->transport_cmds.smid); ··· 6703 6835 { 6704 6836 mpt3sas_scsih_reset_done_handler(ioc); 6705 6837 mpt3sas_ctl_reset_done_handler(ioc); 6706 - dtmprintk(ioc, pr_info(MPT3SAS_FMT 6707 - "%s: MPT3_IOC_DONE_RESET\n", ioc->name, __func__)); 6838 + dtmprintk(ioc, ioc_info(ioc, "%s: MPT3_IOC_DONE_RESET\n", __func__)); 6708 6839 } 6709 6840 6710 6841 /** ··· 6750 6883 u32 ioc_state; 6751 6884 u8 is_fault = 0, is_trigger = 0; 6752 6885 6753 - dtmprintk(ioc, pr_info(MPT3SAS_FMT "%s: enter\n", ioc->name, 6754 - __func__)); 6886 + dtmprintk(ioc, ioc_info(ioc, "%s: enter\n", __func__)); 6755 6887 6756 6888 if (ioc->pci_error_recovery) { 6757 - pr_err(MPT3SAS_FMT "%s: pci error recovery reset\n", 6758 - ioc->name, __func__); 6889 + ioc_err(ioc, "%s: pci error recovery reset\n", __func__); 6759 6890 r = 0; 6760 6891 goto out_unlocked; 6761 6892 } ··· 6807 6942 _base_reset_done_handler(ioc); 6808 6943 6809 6944 out: 6810 - dtmprintk(ioc, pr_info(MPT3SAS_FMT "%s: %s\n", 6811 - ioc->name, __func__, ((r == 0) ? "SUCCESS" : "FAILED"))); 6945 + dtmprintk(ioc, 6946 + ioc_info(ioc, "%s: %s\n", 6947 + __func__, r == 0 ? "SUCCESS" : "FAILED")); 6812 6948 6813 6949 spin_lock_irqsave(&ioc->ioc_reset_in_progress_lock, flags); 6814 6950 ioc->shost_recovery = 0; ··· 6825 6959 mpt3sas_trigger_master(ioc, 6826 6960 MASTER_TRIGGER_ADAPTER_RESET); 6827 6961 } 6828 - dtmprintk(ioc, pr_info(MPT3SAS_FMT "%s: exit\n", ioc->name, 6829 - __func__)); 6962 + dtmprintk(ioc, ioc_info(ioc, "%s: exit\n", __func__)); 6830 6963 return r; 6831 6964 }
+20 -28
drivers/scsi/mpt3sas/mpt3sas_config.c
··· 175 175 if (!desc) 176 176 return; 177 177 178 - pr_info(MPT3SAS_FMT 179 - "%s: %s(%d), action(%d), form(0x%08x), smid(%d)\n", 180 - ioc->name, calling_function_name, desc, 181 - mpi_request->Header.PageNumber, mpi_request->Action, 182 - le32_to_cpu(mpi_request->PageAddress), smid); 178 + ioc_info(ioc, "%s: %s(%d), action(%d), form(0x%08x), smid(%d)\n", 179 + calling_function_name, desc, 180 + mpi_request->Header.PageNumber, mpi_request->Action, 181 + le32_to_cpu(mpi_request->PageAddress), smid); 183 182 184 183 if (!mpi_reply) 185 184 return; 186 185 187 186 if (mpi_reply->IOCStatus || mpi_reply->IOCLogInfo) 188 - pr_info(MPT3SAS_FMT 189 - "\tiocstatus(0x%04x), loginfo(0x%08x)\n", 190 - ioc->name, le16_to_cpu(mpi_reply->IOCStatus), 191 - le32_to_cpu(mpi_reply->IOCLogInfo)); 187 + ioc_info(ioc, "\tiocstatus(0x%04x), loginfo(0x%08x)\n", 188 + le16_to_cpu(mpi_reply->IOCStatus), 189 + le32_to_cpu(mpi_reply->IOCLogInfo)); 192 190 } 193 191 194 192 /** ··· 208 210 mem->page = dma_alloc_coherent(&ioc->pdev->dev, mem->sz, 209 211 &mem->page_dma, GFP_KERNEL); 210 212 if (!mem->page) { 211 - pr_err(MPT3SAS_FMT 212 - "%s: dma_alloc_coherent failed asking for (%d) bytes!!\n", 213 - ioc->name, __func__, mem->sz); 213 + ioc_err(ioc, "%s: dma_alloc_coherent failed asking for (%d) bytes!!\n", 214 + __func__, mem->sz); 214 215 r = -ENOMEM; 215 216 } 216 217 } else { /* use tmp buffer if less than 512 bytes */ ··· 310 313 311 314 mutex_lock(&ioc->config_cmds.mutex); 312 315 if (ioc->config_cmds.status != MPT3_CMD_NOT_USED) { 313 - pr_err(MPT3SAS_FMT "%s: config_cmd in use\n", 314 - ioc->name, __func__); 316 + ioc_err(ioc, "%s: config_cmd in use\n", __func__); 315 317 mutex_unlock(&ioc->config_cmds.mutex); 316 318 return -EAGAIN; 317 319 } ··· 358 362 r = -EFAULT; 359 363 goto free_mem; 360 364 } 361 - pr_info(MPT3SAS_FMT "%s: attempting retry (%d)\n", 362 - ioc->name, __func__, retry_count); 365 + ioc_info(ioc, "%s: attempting retry (%d)\n", 366 + __func__, retry_count); 363 367 } 364 368 wait_state_count = 0; 365 369 ioc_state = mpt3sas_base_get_iocstate(ioc, 1); 366 370 while (ioc_state != MPI2_IOC_STATE_OPERATIONAL) { 367 371 if (wait_state_count++ == MPT3_CONFIG_PAGE_DEFAULT_TIMEOUT) { 368 - pr_err(MPT3SAS_FMT 369 - "%s: failed due to ioc not operational\n", 370 - ioc->name, __func__); 372 + ioc_err(ioc, "%s: failed due to ioc not operational\n", 373 + __func__); 371 374 ioc->config_cmds.status = MPT3_CMD_NOT_USED; 372 375 r = -EFAULT; 373 376 goto free_mem; 374 377 } 375 378 ssleep(1); 376 379 ioc_state = mpt3sas_base_get_iocstate(ioc, 1); 377 - pr_info(MPT3SAS_FMT 378 - "%s: waiting for operational state(count=%d)\n", 379 - ioc->name, __func__, wait_state_count); 380 + ioc_info(ioc, "%s: waiting for operational state(count=%d)\n", 381 + __func__, wait_state_count); 380 382 } 381 383 if (wait_state_count) 382 - pr_info(MPT3SAS_FMT "%s: ioc is operational\n", 383 - ioc->name, __func__); 384 + ioc_info(ioc, "%s: ioc is operational\n", __func__); 384 385 385 386 smid = mpt3sas_base_get_smid(ioc, ioc->config_cb_idx); 386 387 if (!smid) { 387 - pr_err(MPT3SAS_FMT "%s: failed obtaining a smid\n", 388 - ioc->name, __func__); 388 + ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); 389 389 ioc->config_cmds.status = MPT3_CMD_NOT_USED; 390 390 r = -EAGAIN; 391 391 goto free_mem; ··· 445 453 } 446 454 447 455 if (retry_count) 448 - pr_info(MPT3SAS_FMT "%s: retry (%d) completed!!\n", \ 449 - ioc->name, __func__, retry_count); 456 + ioc_info(ioc, "%s: retry (%d) completed!!\n", 457 + __func__, retry_count); 450 458 451 459 if ((ioc_status == MPI2_IOCSTATUS_SUCCESS) && 452 460 config_page && mpi_request->Action ==
+208 -285
drivers/scsi/mpt3sas/mpt3sas_ctl.c
··· 185 185 if (!desc) 186 186 return; 187 187 188 - pr_info(MPT3SAS_FMT "%s: %s, smid(%d)\n", 189 - ioc->name, calling_function_name, desc, smid); 188 + ioc_info(ioc, "%s: %s, smid(%d)\n", calling_function_name, desc, smid); 190 189 191 190 if (!mpi_reply) 192 191 return; 193 192 194 193 if (mpi_reply->IOCStatus || mpi_reply->IOCLogInfo) 195 - pr_info(MPT3SAS_FMT 196 - "\tiocstatus(0x%04x), loginfo(0x%08x)\n", 197 - ioc->name, le16_to_cpu(mpi_reply->IOCStatus), 198 - le32_to_cpu(mpi_reply->IOCLogInfo)); 194 + ioc_info(ioc, "\tiocstatus(0x%04x), loginfo(0x%08x)\n", 195 + le16_to_cpu(mpi_reply->IOCStatus), 196 + le32_to_cpu(mpi_reply->IOCLogInfo)); 199 197 200 198 if (mpi_request->Function == MPI2_FUNCTION_SCSI_IO_REQUEST || 201 199 mpi_request->Function == ··· 206 208 sas_device = mpt3sas_get_sdev_by_handle(ioc, 207 209 le16_to_cpu(scsi_reply->DevHandle)); 208 210 if (sas_device) { 209 - pr_warn(MPT3SAS_FMT "\tsas_address(0x%016llx), phy(%d)\n", 210 - ioc->name, (unsigned long long) 211 - sas_device->sas_address, sas_device->phy); 212 - pr_warn(MPT3SAS_FMT 213 - "\tenclosure_logical_id(0x%016llx), slot(%d)\n", 214 - ioc->name, (unsigned long long) 215 - sas_device->enclosure_logical_id, sas_device->slot); 211 + ioc_warn(ioc, "\tsas_address(0x%016llx), phy(%d)\n", 212 + (u64)sas_device->sas_address, 213 + sas_device->phy); 214 + ioc_warn(ioc, "\tenclosure_logical_id(0x%016llx), slot(%d)\n", 215 + (u64)sas_device->enclosure_logical_id, 216 + sas_device->slot); 216 217 sas_device_put(sas_device); 217 218 } 218 219 if (!sas_device) { 219 220 pcie_device = mpt3sas_get_pdev_by_handle(ioc, 220 221 le16_to_cpu(scsi_reply->DevHandle)); 221 222 if (pcie_device) { 222 - pr_warn(MPT3SAS_FMT 223 - "\tWWID(0x%016llx), port(%d)\n", ioc->name, 224 - (unsigned long long)pcie_device->wwid, 225 - pcie_device->port_num); 223 + ioc_warn(ioc, "\tWWID(0x%016llx), port(%d)\n", 224 + (unsigned long long)pcie_device->wwid, 225 + pcie_device->port_num); 226 226 if (pcie_device->enclosure_handle != 0) 227 - pr_warn(MPT3SAS_FMT 228 - "\tenclosure_logical_id(0x%016llx), slot(%d)\n", 229 - ioc->name, (unsigned long long) 230 - pcie_device->enclosure_logical_id, 231 - pcie_device->slot); 227 + ioc_warn(ioc, "\tenclosure_logical_id(0x%016llx), slot(%d)\n", 228 + (u64)pcie_device->enclosure_logical_id, 229 + pcie_device->slot); 232 230 pcie_device_put(pcie_device); 233 231 } 234 232 } 235 233 if (scsi_reply->SCSIState || scsi_reply->SCSIStatus) 236 - pr_info(MPT3SAS_FMT 237 - "\tscsi_state(0x%02x), scsi_status" 238 - "(0x%02x)\n", ioc->name, 239 - scsi_reply->SCSIState, 240 - scsi_reply->SCSIStatus); 234 + ioc_info(ioc, "\tscsi_state(0x%02x), scsi_status(0x%02x)\n", 235 + scsi_reply->SCSIState, 236 + scsi_reply->SCSIStatus); 241 237 } 242 238 } 243 239 ··· 458 466 int i; 459 467 u8 issue_reset; 460 468 461 - dtmprintk(ioc, pr_info(MPT3SAS_FMT 462 - "%s: MPT3_IOC_PRE_RESET\n", ioc->name, __func__)); 469 + dtmprintk(ioc, ioc_info(ioc, "%s: MPT3_IOC_PRE_RESET\n", __func__)); 463 470 for (i = 0; i < MPI2_DIAG_BUF_TYPE_COUNT; i++) { 464 471 if (!(ioc->diag_buffer_status[i] & 465 472 MPT3_DIAG_BUFFER_IS_REGISTERED)) ··· 478 487 */ 479 488 void mpt3sas_ctl_after_reset_handler(struct MPT3SAS_ADAPTER *ioc) 480 489 { 481 - dtmprintk(ioc, pr_info(MPT3SAS_FMT 482 - "%s: MPT3_IOC_AFTER_RESET\n", ioc->name, __func__)); 490 + dtmprintk(ioc, ioc_info(ioc, "%s: MPT3_IOC_AFTER_RESET\n", __func__)); 483 491 if (ioc->ctl_cmds.status & MPT3_CMD_PENDING) { 484 492 ioc->ctl_cmds.status |= MPT3_CMD_RESET; 485 493 mpt3sas_base_free_smid(ioc, ioc->ctl_cmds.smid); ··· 496 506 { 497 507 int i; 498 508 499 - dtmprintk(ioc, pr_info(MPT3SAS_FMT 500 - "%s: MPT3_IOC_DONE_RESET\n", ioc->name, __func__)); 509 + dtmprintk(ioc, ioc_info(ioc, "%s: MPT3_IOC_DONE_RESET\n", __func__)); 501 510 502 511 for (i = 0; i < MPI2_DIAG_BUF_TYPE_COUNT; i++) { 503 512 if (!(ioc->diag_buffer_status[i] & ··· 601 612 } 602 613 603 614 if (!found) { 604 - dctlprintk(ioc, pr_info(MPT3SAS_FMT 605 - "%s: handle(0x%04x), lun(%d), no active mid!!\n", 606 - ioc->name, 607 - desc, le16_to_cpu(tm_request->DevHandle), lun)); 615 + dctlprintk(ioc, 616 + ioc_info(ioc, "%s: handle(0x%04x), lun(%d), no active mid!!\n", 617 + desc, le16_to_cpu(tm_request->DevHandle), 618 + lun)); 608 619 tm_reply = ioc->ctl_cmds.reply; 609 620 tm_reply->DevHandle = tm_request->DevHandle; 610 621 tm_reply->Function = MPI2_FUNCTION_SCSI_TASK_MGMT; ··· 620 631 return 1; 621 632 } 622 633 623 - dctlprintk(ioc, pr_info(MPT3SAS_FMT 624 - "%s: handle(0x%04x), lun(%d), task_mid(%d)\n", ioc->name, 625 - desc, le16_to_cpu(tm_request->DevHandle), lun, 626 - le16_to_cpu(tm_request->TaskMID))); 634 + dctlprintk(ioc, 635 + ioc_info(ioc, "%s: handle(0x%04x), lun(%d), task_mid(%d)\n", 636 + desc, le16_to_cpu(tm_request->DevHandle), lun, 637 + le16_to_cpu(tm_request->TaskMID))); 627 638 return 0; 628 639 } 629 640 ··· 661 672 issue_reset = 0; 662 673 663 674 if (ioc->ctl_cmds.status != MPT3_CMD_NOT_USED) { 664 - pr_err(MPT3SAS_FMT "%s: ctl_cmd in use\n", 665 - ioc->name, __func__); 675 + ioc_err(ioc, "%s: ctl_cmd in use\n", __func__); 666 676 ret = -EAGAIN; 667 677 goto out; 668 678 } ··· 670 682 ioc_state = mpt3sas_base_get_iocstate(ioc, 1); 671 683 while (ioc_state != MPI2_IOC_STATE_OPERATIONAL) { 672 684 if (wait_state_count++ == 10) { 673 - pr_err(MPT3SAS_FMT 674 - "%s: failed due to ioc not operational\n", 675 - ioc->name, __func__); 685 + ioc_err(ioc, "%s: failed due to ioc not operational\n", 686 + __func__); 676 687 ret = -EFAULT; 677 688 goto out; 678 689 } 679 690 ssleep(1); 680 691 ioc_state = mpt3sas_base_get_iocstate(ioc, 1); 681 - pr_info(MPT3SAS_FMT 682 - "%s: waiting for operational state(count=%d)\n", 683 - ioc->name, 684 - __func__, wait_state_count); 692 + ioc_info(ioc, "%s: waiting for operational state(count=%d)\n", 693 + __func__, wait_state_count); 685 694 } 686 695 if (wait_state_count) 687 - pr_info(MPT3SAS_FMT "%s: ioc is operational\n", 688 - ioc->name, __func__); 696 + ioc_info(ioc, "%s: ioc is operational\n", __func__); 689 697 690 698 mpi_request = kzalloc(ioc->request_sz, GFP_KERNEL); 691 699 if (!mpi_request) { 692 - pr_err(MPT3SAS_FMT 693 - "%s: failed obtaining a memory for mpi_request\n", 694 - ioc->name, __func__); 700 + ioc_err(ioc, "%s: failed obtaining a memory for mpi_request\n", 701 + __func__); 695 702 ret = -ENOMEM; 696 703 goto out; 697 704 } ··· 709 726 if (mpi_request->Function == MPI2_FUNCTION_SCSI_TASK_MGMT) { 710 727 smid = mpt3sas_base_get_smid_hpr(ioc, ioc->ctl_cb_idx); 711 728 if (!smid) { 712 - pr_err(MPT3SAS_FMT "%s: failed obtaining a smid\n", 713 - ioc->name, __func__); 729 + ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); 714 730 ret = -EAGAIN; 715 731 goto out; 716 732 } ··· 805 823 ioc->build_nvme_prp(ioc, smid, nvme_encap_request, 806 824 data_out_dma, data_out_sz, data_in_dma, data_in_sz); 807 825 if (test_bit(device_handle, ioc->device_remove_in_progress)) { 808 - dtmprintk(ioc, pr_info(MPT3SAS_FMT "handle(0x%04x) :" 809 - "ioctl failed due to device removal in progress\n", 810 - ioc->name, device_handle)); 826 + dtmprintk(ioc, 827 + ioc_info(ioc, "handle(0x%04x): ioctl failed due to device removal in progress\n", 828 + device_handle)); 811 829 mpt3sas_base_free_smid(ioc, smid); 812 830 ret = -EINVAL; 813 831 goto out; ··· 825 843 mpt3sas_base_get_sense_buffer_dma(ioc, smid); 826 844 memset(ioc->ctl_cmds.sense, 0, SCSI_SENSE_BUFFERSIZE); 827 845 if (test_bit(device_handle, ioc->device_remove_in_progress)) { 828 - dtmprintk(ioc, pr_info(MPT3SAS_FMT 829 - "handle(0x%04x) :ioctl failed due to device removal in progress\n", 830 - ioc->name, device_handle)); 846 + dtmprintk(ioc, 847 + ioc_info(ioc, "handle(0x%04x) :ioctl failed due to device removal in progress\n", 848 + device_handle)); 831 849 mpt3sas_base_free_smid(ioc, smid); 832 850 ret = -EINVAL; 833 851 goto out; ··· 845 863 Mpi2SCSITaskManagementRequest_t *tm_request = 846 864 (Mpi2SCSITaskManagementRequest_t *)request; 847 865 848 - dtmprintk(ioc, pr_info(MPT3SAS_FMT 849 - "TASK_MGMT: handle(0x%04x), task_type(0x%02x)\n", 850 - ioc->name, 851 - le16_to_cpu(tm_request->DevHandle), tm_request->TaskType)); 866 + dtmprintk(ioc, 867 + ioc_info(ioc, "TASK_MGMT: handle(0x%04x), task_type(0x%02x)\n", 868 + le16_to_cpu(tm_request->DevHandle), 869 + tm_request->TaskType)); 852 870 ioc->got_task_abort_from_ioctl = 1; 853 871 if (tm_request->TaskType == 854 872 MPI2_SCSITASKMGMT_TASKTYPE_ABORT_TASK || ··· 863 881 ioc->got_task_abort_from_ioctl = 0; 864 882 865 883 if (test_bit(device_handle, ioc->device_remove_in_progress)) { 866 - dtmprintk(ioc, pr_info(MPT3SAS_FMT 867 - "handle(0x%04x) :ioctl failed due to device removal in progress\n", 868 - ioc->name, device_handle)); 884 + dtmprintk(ioc, 885 + ioc_info(ioc, "handle(0x%04x) :ioctl failed due to device removal in progress\n", 886 + device_handle)); 869 887 mpt3sas_base_free_smid(ioc, smid); 870 888 ret = -EINVAL; 871 889 goto out; ··· 911 929 case MPI2_FUNCTION_SATA_PASSTHROUGH: 912 930 { 913 931 if (test_bit(device_handle, ioc->device_remove_in_progress)) { 914 - dtmprintk(ioc, pr_info(MPT3SAS_FMT 915 - "handle(0x%04x) :ioctl failed due to device removal in progress\n", 916 - ioc->name, device_handle)); 932 + dtmprintk(ioc, 933 + ioc_info(ioc, "handle(0x%04x) :ioctl failed due to device removal in progress\n", 934 + device_handle)); 917 935 mpt3sas_base_free_smid(ioc, smid); 918 936 ret = -EINVAL; 919 937 goto out; ··· 999 1017 Mpi2SCSITaskManagementReply_t *tm_reply = 1000 1018 (Mpi2SCSITaskManagementReply_t *)mpi_reply; 1001 1019 1002 - pr_info(MPT3SAS_FMT "TASK_MGMT: " \ 1003 - "IOCStatus(0x%04x), IOCLogInfo(0x%08x), " 1004 - "TerminationCount(0x%08x)\n", ioc->name, 1005 - le16_to_cpu(tm_reply->IOCStatus), 1006 - le32_to_cpu(tm_reply->IOCLogInfo), 1007 - le32_to_cpu(tm_reply->TerminationCount)); 1020 + ioc_info(ioc, "TASK_MGMT: IOCStatus(0x%04x), IOCLogInfo(0x%08x), TerminationCount(0x%08x)\n", 1021 + le16_to_cpu(tm_reply->IOCStatus), 1022 + le32_to_cpu(tm_reply->IOCLogInfo), 1023 + le32_to_cpu(tm_reply->TerminationCount)); 1008 1024 } 1009 1025 1010 1026 /* copy out xdata to user */ ··· 1034 1054 MPI2_FUNCTION_RAID_SCSI_IO_PASSTHROUGH || mpi_request->Function == 1035 1055 MPI2_FUNCTION_NVME_ENCAPSULATED)) { 1036 1056 if (karg.sense_data_ptr == NULL) { 1037 - pr_info(MPT3SAS_FMT "Response buffer provided" 1038 - " by application is NULL; Response data will" 1039 - " not be returned.\n", ioc->name); 1057 + ioc_info(ioc, "Response buffer provided by application is NULL; Response data will not be returned\n"); 1040 1058 goto out; 1041 1059 } 1042 1060 sz_arg = (mpi_request->Function == ··· 1057 1079 mpi_request->Function == 1058 1080 MPI2_FUNCTION_RAID_SCSI_IO_PASSTHROUGH || 1059 1081 mpi_request->Function == MPI2_FUNCTION_SATA_PASSTHROUGH)) { 1060 - pr_info(MPT3SAS_FMT "issue target reset: handle = (0x%04x)\n", 1061 - ioc->name, 1062 - le16_to_cpu(mpi_request->FunctionDependent1)); 1082 + ioc_info(ioc, "issue target reset: handle = (0x%04x)\n", 1083 + le16_to_cpu(mpi_request->FunctionDependent1)); 1063 1084 mpt3sas_halt_firmware(ioc); 1064 1085 pcie_device = mpt3sas_get_pdev_by_handle(ioc, 1065 1086 le16_to_cpu(mpi_request->FunctionDependent1)); ··· 1105 1128 { 1106 1129 struct mpt3_ioctl_iocinfo karg; 1107 1130 1108 - dctlprintk(ioc, pr_info(MPT3SAS_FMT "%s: enter\n", ioc->name, 1109 - __func__)); 1131 + dctlprintk(ioc, ioc_info(ioc, "%s: enter\n", 1132 + __func__)); 1110 1133 1111 1134 memset(&karg, 0 , sizeof(karg)); 1112 1135 if (ioc->pfacts) ··· 1165 1188 return -EFAULT; 1166 1189 } 1167 1190 1168 - dctlprintk(ioc, pr_info(MPT3SAS_FMT "%s: enter\n", ioc->name, 1169 - __func__)); 1191 + dctlprintk(ioc, ioc_info(ioc, "%s: enter\n", 1192 + __func__)); 1170 1193 1171 1194 karg.event_entries = MPT3SAS_CTL_EVENT_LOG_SIZE; 1172 1195 memcpy(karg.event_types, ioc->event_type, ··· 1196 1219 return -EFAULT; 1197 1220 } 1198 1221 1199 - dctlprintk(ioc, pr_info(MPT3SAS_FMT "%s: enter\n", ioc->name, 1200 - __func__)); 1222 + dctlprintk(ioc, ioc_info(ioc, "%s: enter\n", 1223 + __func__)); 1201 1224 1202 1225 memcpy(ioc->event_type, karg.event_types, 1203 1226 MPI2_EVENT_NOTIFY_EVENTMASK_WORDS * sizeof(u32)); ··· 1236 1259 return -EFAULT; 1237 1260 } 1238 1261 1239 - dctlprintk(ioc, pr_info(MPT3SAS_FMT "%s: enter\n", ioc->name, 1240 - __func__)); 1262 + dctlprintk(ioc, ioc_info(ioc, "%s: enter\n", 1263 + __func__)); 1241 1264 1242 1265 number_bytes = karg.hdr.max_data_size - 1243 1266 sizeof(struct mpt3_ioctl_header); ··· 1283 1306 ioc->is_driver_loading) 1284 1307 return -EAGAIN; 1285 1308 1286 - dctlprintk(ioc, pr_info(MPT3SAS_FMT "%s: enter\n", ioc->name, 1287 - __func__)); 1309 + dctlprintk(ioc, ioc_info(ioc, "%s: enter\n", 1310 + __func__)); 1288 1311 1289 1312 retval = mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER); 1290 - pr_info(MPT3SAS_FMT "host reset: %s\n", 1291 - ioc->name, ((!retval) ? "SUCCESS" : "FAILED")); 1313 + ioc_info(ioc, "host reset: %s\n", ((!retval) ? "SUCCESS" : "FAILED")); 1292 1314 return 0; 1293 1315 } 1294 1316 ··· 1416 1440 return -EFAULT; 1417 1441 } 1418 1442 1419 - dctlprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name, 1420 - __func__)); 1443 + dctlprintk(ioc, ioc_info(ioc, "%s\n", 1444 + __func__)); 1421 1445 1422 1446 rc = _ctl_btdh_search_sas_device(ioc, &karg); 1423 1447 if (!rc) ··· 1488 1512 u32 ioc_state; 1489 1513 u8 issue_reset = 0; 1490 1514 1491 - dctlprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name, 1492 - __func__)); 1515 + dctlprintk(ioc, ioc_info(ioc, "%s\n", 1516 + __func__)); 1493 1517 1494 1518 ioc_state = mpt3sas_base_get_iocstate(ioc, 1); 1495 1519 if (ioc_state != MPI2_IOC_STATE_OPERATIONAL) { 1496 - pr_err(MPT3SAS_FMT 1497 - "%s: failed due to ioc not operational\n", 1498 - ioc->name, __func__); 1520 + ioc_err(ioc, "%s: failed due to ioc not operational\n", 1521 + __func__); 1499 1522 rc = -EAGAIN; 1500 1523 goto out; 1501 1524 } 1502 1525 1503 1526 if (ioc->ctl_cmds.status != MPT3_CMD_NOT_USED) { 1504 - pr_err(MPT3SAS_FMT "%s: ctl_cmd in use\n", 1505 - ioc->name, __func__); 1527 + ioc_err(ioc, "%s: ctl_cmd in use\n", __func__); 1506 1528 rc = -EAGAIN; 1507 1529 goto out; 1508 1530 } 1509 1531 1510 1532 buffer_type = diag_register->buffer_type; 1511 1533 if (!_ctl_diag_capability(ioc, buffer_type)) { 1512 - pr_err(MPT3SAS_FMT 1513 - "%s: doesn't have capability for buffer_type(0x%02x)\n", 1514 - ioc->name, __func__, buffer_type); 1534 + ioc_err(ioc, "%s: doesn't have capability for buffer_type(0x%02x)\n", 1535 + __func__, buffer_type); 1515 1536 return -EPERM; 1516 1537 } 1517 1538 1518 1539 if (ioc->diag_buffer_status[buffer_type] & 1519 1540 MPT3_DIAG_BUFFER_IS_REGISTERED) { 1520 - pr_err(MPT3SAS_FMT 1521 - "%s: already has a registered buffer for buffer_type(0x%02x)\n", 1522 - ioc->name, __func__, 1523 - buffer_type); 1541 + ioc_err(ioc, "%s: already has a registered buffer for buffer_type(0x%02x)\n", 1542 + __func__, buffer_type); 1524 1543 return -EINVAL; 1525 1544 } 1526 1545 1527 1546 if (diag_register->requested_buffer_size % 4) { 1528 - pr_err(MPT3SAS_FMT 1529 - "%s: the requested_buffer_size is not 4 byte aligned\n", 1530 - ioc->name, __func__); 1547 + ioc_err(ioc, "%s: the requested_buffer_size is not 4 byte aligned\n", 1548 + __func__); 1531 1549 return -EINVAL; 1532 1550 } 1533 1551 1534 1552 smid = mpt3sas_base_get_smid(ioc, ioc->ctl_cb_idx); 1535 1553 if (!smid) { 1536 - pr_err(MPT3SAS_FMT "%s: failed obtaining a smid\n", 1537 - ioc->name, __func__); 1554 + ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); 1538 1555 rc = -EAGAIN; 1539 1556 goto out; 1540 1557 } ··· 1562 1593 request_data = pci_alloc_consistent( 1563 1594 ioc->pdev, request_data_sz, &request_data_dma); 1564 1595 if (request_data == NULL) { 1565 - pr_err(MPT3SAS_FMT "%s: failed allocating memory" \ 1566 - " for diag buffers, requested size(%d)\n", 1567 - ioc->name, __func__, request_data_sz); 1596 + ioc_err(ioc, "%s: failed allocating memory for diag buffers, requested size(%d)\n", 1597 + __func__, request_data_sz); 1568 1598 mpt3sas_base_free_smid(ioc, smid); 1569 1599 return -ENOMEM; 1570 1600 } ··· 1580 1612 mpi_request->VF_ID = 0; /* TODO */ 1581 1613 mpi_request->VP_ID = 0; 1582 1614 1583 - dctlprintk(ioc, pr_info(MPT3SAS_FMT 1584 - "%s: diag_buffer(0x%p), dma(0x%llx), sz(%d)\n", 1585 - ioc->name, __func__, request_data, 1586 - (unsigned long long)request_data_dma, 1587 - le32_to_cpu(mpi_request->BufferLength))); 1615 + dctlprintk(ioc, 1616 + ioc_info(ioc, "%s: diag_buffer(0x%p), dma(0x%llx), sz(%d)\n", 1617 + __func__, request_data, 1618 + (unsigned long long)request_data_dma, 1619 + le32_to_cpu(mpi_request->BufferLength))); 1588 1620 1589 1621 for (i = 0; i < MPT3_PRODUCT_SPECIFIC_DWORDS; i++) 1590 1622 mpi_request->ProductSpecific[i] = ··· 1605 1637 1606 1638 /* process the completed Reply Message Frame */ 1607 1639 if ((ioc->ctl_cmds.status & MPT3_CMD_REPLY_VALID) == 0) { 1608 - pr_err(MPT3SAS_FMT "%s: no reply message\n", 1609 - ioc->name, __func__); 1640 + ioc_err(ioc, "%s: no reply message\n", __func__); 1610 1641 rc = -EFAULT; 1611 1642 goto out; 1612 1643 } ··· 1616 1649 if (ioc_status == MPI2_IOCSTATUS_SUCCESS) { 1617 1650 ioc->diag_buffer_status[buffer_type] |= 1618 1651 MPT3_DIAG_BUFFER_IS_REGISTERED; 1619 - dctlprintk(ioc, pr_info(MPT3SAS_FMT "%s: success\n", 1620 - ioc->name, __func__)); 1652 + dctlprintk(ioc, ioc_info(ioc, "%s: success\n", __func__)); 1621 1653 } else { 1622 - pr_info(MPT3SAS_FMT 1623 - "%s: ioc_status(0x%04x) log_info(0x%08x)\n", 1624 - ioc->name, __func__, 1625 - ioc_status, le32_to_cpu(mpi_reply->IOCLogInfo)); 1654 + ioc_info(ioc, "%s: ioc_status(0x%04x) log_info(0x%08x)\n", 1655 + __func__, 1656 + ioc_status, le32_to_cpu(mpi_reply->IOCLogInfo)); 1626 1657 rc = -EFAULT; 1627 1658 } 1628 1659 ··· 1654 1689 memset(&diag_register, 0, sizeof(struct mpt3_diag_register)); 1655 1690 1656 1691 if (bits_to_register & 1) { 1657 - pr_info(MPT3SAS_FMT "registering trace buffer support\n", 1658 - ioc->name); 1692 + ioc_info(ioc, "registering trace buffer support\n"); 1659 1693 ioc->diag_trigger_master.MasterData = 1660 1694 (MASTER_TRIGGER_FW_FAULT + MASTER_TRIGGER_ADAPTER_RESET); 1661 1695 diag_register.buffer_type = MPI2_DIAG_BUF_TYPE_TRACE; ··· 1665 1701 } 1666 1702 1667 1703 if (bits_to_register & 2) { 1668 - pr_info(MPT3SAS_FMT "registering snapshot buffer support\n", 1669 - ioc->name); 1704 + ioc_info(ioc, "registering snapshot buffer support\n"); 1670 1705 diag_register.buffer_type = MPI2_DIAG_BUF_TYPE_SNAPSHOT; 1671 1706 /* register for 2MB buffers */ 1672 1707 diag_register.requested_buffer_size = 2 * (1024 * 1024); ··· 1674 1711 } 1675 1712 1676 1713 if (bits_to_register & 4) { 1677 - pr_info(MPT3SAS_FMT "registering extended buffer support\n", 1678 - ioc->name); 1714 + ioc_info(ioc, "registering extended buffer support\n"); 1679 1715 diag_register.buffer_type = MPI2_DIAG_BUF_TYPE_EXTENDED; 1680 1716 /* register for 2MB buffers */ 1681 1717 diag_register.requested_buffer_size = 2 * (1024 * 1024); ··· 1730 1768 return -EFAULT; 1731 1769 } 1732 1770 1733 - dctlprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name, 1734 - __func__)); 1771 + dctlprintk(ioc, ioc_info(ioc, "%s\n", 1772 + __func__)); 1735 1773 1736 1774 buffer_type = karg.unique_id & 0x000000ff; 1737 1775 if (!_ctl_diag_capability(ioc, buffer_type)) { 1738 - pr_err(MPT3SAS_FMT 1739 - "%s: doesn't have capability for buffer_type(0x%02x)\n", 1740 - ioc->name, __func__, buffer_type); 1776 + ioc_err(ioc, "%s: doesn't have capability for buffer_type(0x%02x)\n", 1777 + __func__, buffer_type); 1741 1778 return -EPERM; 1742 1779 } 1743 1780 1744 1781 if ((ioc->diag_buffer_status[buffer_type] & 1745 1782 MPT3_DIAG_BUFFER_IS_REGISTERED) == 0) { 1746 - pr_err(MPT3SAS_FMT 1747 - "%s: buffer_type(0x%02x) is not registered\n", 1748 - ioc->name, __func__, buffer_type); 1783 + ioc_err(ioc, "%s: buffer_type(0x%02x) is not registered\n", 1784 + __func__, buffer_type); 1749 1785 return -EINVAL; 1750 1786 } 1751 1787 if ((ioc->diag_buffer_status[buffer_type] & 1752 1788 MPT3_DIAG_BUFFER_IS_RELEASED) == 0) { 1753 - pr_err(MPT3SAS_FMT 1754 - "%s: buffer_type(0x%02x) has not been released\n", 1755 - ioc->name, __func__, buffer_type); 1789 + ioc_err(ioc, "%s: buffer_type(0x%02x) has not been released\n", 1790 + __func__, buffer_type); 1756 1791 return -EINVAL; 1757 1792 } 1758 1793 1759 1794 if (karg.unique_id != ioc->unique_id[buffer_type]) { 1760 - pr_err(MPT3SAS_FMT 1761 - "%s: unique_id(0x%08x) is not registered\n", 1762 - ioc->name, __func__, karg.unique_id); 1795 + ioc_err(ioc, "%s: unique_id(0x%08x) is not registered\n", 1796 + __func__, karg.unique_id); 1763 1797 return -EINVAL; 1764 1798 } 1765 1799 1766 1800 request_data = ioc->diag_buffer[buffer_type]; 1767 1801 if (!request_data) { 1768 - pr_err(MPT3SAS_FMT 1769 - "%s: doesn't have memory allocated for buffer_type(0x%02x)\n", 1770 - ioc->name, __func__, buffer_type); 1802 + ioc_err(ioc, "%s: doesn't have memory allocated for buffer_type(0x%02x)\n", 1803 + __func__, buffer_type); 1771 1804 return -ENOMEM; 1772 1805 } 1773 1806 ··· 1798 1841 return -EFAULT; 1799 1842 } 1800 1843 1801 - dctlprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name, 1802 - __func__)); 1844 + dctlprintk(ioc, ioc_info(ioc, "%s\n", 1845 + __func__)); 1803 1846 1804 1847 karg.application_flags = 0; 1805 1848 buffer_type = karg.buffer_type; 1806 1849 1807 1850 if (!_ctl_diag_capability(ioc, buffer_type)) { 1808 - pr_err(MPT3SAS_FMT 1809 - "%s: doesn't have capability for buffer_type(0x%02x)\n", 1810 - ioc->name, __func__, buffer_type); 1851 + ioc_err(ioc, "%s: doesn't have capability for buffer_type(0x%02x)\n", 1852 + __func__, buffer_type); 1811 1853 return -EPERM; 1812 1854 } 1813 1855 1814 1856 if ((ioc->diag_buffer_status[buffer_type] & 1815 1857 MPT3_DIAG_BUFFER_IS_REGISTERED) == 0) { 1816 - pr_err(MPT3SAS_FMT 1817 - "%s: buffer_type(0x%02x) is not registered\n", 1818 - ioc->name, __func__, buffer_type); 1858 + ioc_err(ioc, "%s: buffer_type(0x%02x) is not registered\n", 1859 + __func__, buffer_type); 1819 1860 return -EINVAL; 1820 1861 } 1821 1862 1822 1863 if (karg.unique_id & 0xffffff00) { 1823 1864 if (karg.unique_id != ioc->unique_id[buffer_type]) { 1824 - pr_err(MPT3SAS_FMT 1825 - "%s: unique_id(0x%08x) is not registered\n", 1826 - ioc->name, __func__, karg.unique_id); 1865 + ioc_err(ioc, "%s: unique_id(0x%08x) is not registered\n", 1866 + __func__, karg.unique_id); 1827 1867 return -EINVAL; 1828 1868 } 1829 1869 } 1830 1870 1831 1871 request_data = ioc->diag_buffer[buffer_type]; 1832 1872 if (!request_data) { 1833 - pr_err(MPT3SAS_FMT 1834 - "%s: doesn't have buffer for buffer_type(0x%02x)\n", 1835 - ioc->name, __func__, buffer_type); 1873 + ioc_err(ioc, "%s: doesn't have buffer for buffer_type(0x%02x)\n", 1874 + __func__, buffer_type); 1836 1875 return -ENOMEM; 1837 1876 } 1838 1877 ··· 1850 1897 karg.diagnostic_flags = ioc->diagnostic_flags[buffer_type]; 1851 1898 1852 1899 if (copy_to_user(arg, &karg, sizeof(struct mpt3_diag_query))) { 1853 - pr_err(MPT3SAS_FMT 1854 - "%s: unable to write mpt3_diag_query data @ %p\n", 1855 - ioc->name, __func__, arg); 1900 + ioc_err(ioc, "%s: unable to write mpt3_diag_query data @ %p\n", 1901 + __func__, arg); 1856 1902 return -EFAULT; 1857 1903 } 1858 1904 return 0; ··· 1875 1923 u32 ioc_state; 1876 1924 int rc; 1877 1925 1878 - dctlprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name, 1879 - __func__)); 1926 + dctlprintk(ioc, ioc_info(ioc, "%s\n", 1927 + __func__)); 1880 1928 1881 1929 rc = 0; 1882 1930 *issue_reset = 0; ··· 1887 1935 MPT3_DIAG_BUFFER_IS_REGISTERED) 1888 1936 ioc->diag_buffer_status[buffer_type] |= 1889 1937 MPT3_DIAG_BUFFER_IS_RELEASED; 1890 - dctlprintk(ioc, pr_info(MPT3SAS_FMT 1891 - "%s: skipping due to FAULT state\n", ioc->name, 1892 - __func__)); 1938 + dctlprintk(ioc, 1939 + ioc_info(ioc, "%s: skipping due to FAULT state\n", 1940 + __func__)); 1893 1941 rc = -EAGAIN; 1894 1942 goto out; 1895 1943 } 1896 1944 1897 1945 if (ioc->ctl_cmds.status != MPT3_CMD_NOT_USED) { 1898 - pr_err(MPT3SAS_FMT "%s: ctl_cmd in use\n", 1899 - ioc->name, __func__); 1946 + ioc_err(ioc, "%s: ctl_cmd in use\n", __func__); 1900 1947 rc = -EAGAIN; 1901 1948 goto out; 1902 1949 } 1903 1950 1904 1951 smid = mpt3sas_base_get_smid(ioc, ioc->ctl_cb_idx); 1905 1952 if (!smid) { 1906 - pr_err(MPT3SAS_FMT "%s: failed obtaining a smid\n", 1907 - ioc->name, __func__); 1953 + ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); 1908 1954 rc = -EAGAIN; 1909 1955 goto out; 1910 1956 } ··· 1932 1982 1933 1983 /* process the completed Reply Message Frame */ 1934 1984 if ((ioc->ctl_cmds.status & MPT3_CMD_REPLY_VALID) == 0) { 1935 - pr_err(MPT3SAS_FMT "%s: no reply message\n", 1936 - ioc->name, __func__); 1985 + ioc_err(ioc, "%s: no reply message\n", __func__); 1937 1986 rc = -EFAULT; 1938 1987 goto out; 1939 1988 } ··· 1943 1994 if (ioc_status == MPI2_IOCSTATUS_SUCCESS) { 1944 1995 ioc->diag_buffer_status[buffer_type] |= 1945 1996 MPT3_DIAG_BUFFER_IS_RELEASED; 1946 - dctlprintk(ioc, pr_info(MPT3SAS_FMT "%s: success\n", 1947 - ioc->name, __func__)); 1997 + dctlprintk(ioc, ioc_info(ioc, "%s: success\n", __func__)); 1948 1998 } else { 1949 - pr_info(MPT3SAS_FMT 1950 - "%s: ioc_status(0x%04x) log_info(0x%08x)\n", 1951 - ioc->name, __func__, 1952 - ioc_status, le32_to_cpu(mpi_reply->IOCLogInfo)); 1999 + ioc_info(ioc, "%s: ioc_status(0x%04x) log_info(0x%08x)\n", 2000 + __func__, 2001 + ioc_status, le32_to_cpu(mpi_reply->IOCLogInfo)); 1953 2002 rc = -EFAULT; 1954 2003 } 1955 2004 ··· 1980 2033 return -EFAULT; 1981 2034 } 1982 2035 1983 - dctlprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name, 1984 - __func__)); 2036 + dctlprintk(ioc, ioc_info(ioc, "%s\n", 2037 + __func__)); 1985 2038 1986 2039 buffer_type = karg.unique_id & 0x000000ff; 1987 2040 if (!_ctl_diag_capability(ioc, buffer_type)) { 1988 - pr_err(MPT3SAS_FMT 1989 - "%s: doesn't have capability for buffer_type(0x%02x)\n", 1990 - ioc->name, __func__, buffer_type); 2041 + ioc_err(ioc, "%s: doesn't have capability for buffer_type(0x%02x)\n", 2042 + __func__, buffer_type); 1991 2043 return -EPERM; 1992 2044 } 1993 2045 1994 2046 if ((ioc->diag_buffer_status[buffer_type] & 1995 2047 MPT3_DIAG_BUFFER_IS_REGISTERED) == 0) { 1996 - pr_err(MPT3SAS_FMT 1997 - "%s: buffer_type(0x%02x) is not registered\n", 1998 - ioc->name, __func__, buffer_type); 2048 + ioc_err(ioc, "%s: buffer_type(0x%02x) is not registered\n", 2049 + __func__, buffer_type); 1999 2050 return -EINVAL; 2000 2051 } 2001 2052 2002 2053 if (karg.unique_id != ioc->unique_id[buffer_type]) { 2003 - pr_err(MPT3SAS_FMT 2004 - "%s: unique_id(0x%08x) is not registered\n", 2005 - ioc->name, __func__, karg.unique_id); 2054 + ioc_err(ioc, "%s: unique_id(0x%08x) is not registered\n", 2055 + __func__, karg.unique_id); 2006 2056 return -EINVAL; 2007 2057 } 2008 2058 2009 2059 if (ioc->diag_buffer_status[buffer_type] & 2010 2060 MPT3_DIAG_BUFFER_IS_RELEASED) { 2011 - pr_err(MPT3SAS_FMT 2012 - "%s: buffer_type(0x%02x) is already released\n", 2013 - ioc->name, __func__, 2014 - buffer_type); 2061 + ioc_err(ioc, "%s: buffer_type(0x%02x) is already released\n", 2062 + __func__, buffer_type); 2015 2063 return 0; 2016 2064 } 2017 2065 2018 2066 request_data = ioc->diag_buffer[buffer_type]; 2019 2067 2020 2068 if (!request_data) { 2021 - pr_err(MPT3SAS_FMT 2022 - "%s: doesn't have memory allocated for buffer_type(0x%02x)\n", 2023 - ioc->name, __func__, buffer_type); 2069 + ioc_err(ioc, "%s: doesn't have memory allocated for buffer_type(0x%02x)\n", 2070 + __func__, buffer_type); 2024 2071 return -ENOMEM; 2025 2072 } 2026 2073 ··· 2025 2084 MPT3_DIAG_BUFFER_IS_RELEASED; 2026 2085 ioc->diag_buffer_status[buffer_type] &= 2027 2086 ~MPT3_DIAG_BUFFER_IS_DIAG_RESET; 2028 - pr_err(MPT3SAS_FMT 2029 - "%s: buffer_type(0x%02x) was released due to host reset\n", 2030 - ioc->name, __func__, buffer_type); 2087 + ioc_err(ioc, "%s: buffer_type(0x%02x) was released due to host reset\n", 2088 + __func__, buffer_type); 2031 2089 return 0; 2032 2090 } 2033 2091 ··· 2064 2124 return -EFAULT; 2065 2125 } 2066 2126 2067 - dctlprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name, 2068 - __func__)); 2127 + dctlprintk(ioc, ioc_info(ioc, "%s\n", 2128 + __func__)); 2069 2129 2070 2130 buffer_type = karg.unique_id & 0x000000ff; 2071 2131 if (!_ctl_diag_capability(ioc, buffer_type)) { 2072 - pr_err(MPT3SAS_FMT 2073 - "%s: doesn't have capability for buffer_type(0x%02x)\n", 2074 - ioc->name, __func__, buffer_type); 2132 + ioc_err(ioc, "%s: doesn't have capability for buffer_type(0x%02x)\n", 2133 + __func__, buffer_type); 2075 2134 return -EPERM; 2076 2135 } 2077 2136 2078 2137 if (karg.unique_id != ioc->unique_id[buffer_type]) { 2079 - pr_err(MPT3SAS_FMT 2080 - "%s: unique_id(0x%08x) is not registered\n", 2081 - ioc->name, __func__, karg.unique_id); 2138 + ioc_err(ioc, "%s: unique_id(0x%08x) is not registered\n", 2139 + __func__, karg.unique_id); 2082 2140 return -EINVAL; 2083 2141 } 2084 2142 2085 2143 request_data = ioc->diag_buffer[buffer_type]; 2086 2144 if (!request_data) { 2087 - pr_err(MPT3SAS_FMT 2088 - "%s: doesn't have buffer for buffer_type(0x%02x)\n", 2089 - ioc->name, __func__, buffer_type); 2145 + ioc_err(ioc, "%s: doesn't have buffer for buffer_type(0x%02x)\n", 2146 + __func__, buffer_type); 2090 2147 return -ENOMEM; 2091 2148 } 2092 2149 2093 2150 request_size = ioc->diag_buffer_sz[buffer_type]; 2094 2151 2095 2152 if ((karg.starting_offset % 4) || (karg.bytes_to_read % 4)) { 2096 - pr_err(MPT3SAS_FMT "%s: either the starting_offset " \ 2097 - "or bytes_to_read are not 4 byte aligned\n", ioc->name, 2098 - __func__); 2153 + ioc_err(ioc, "%s: either the starting_offset or bytes_to_read are not 4 byte aligned\n", 2154 + __func__); 2099 2155 return -EINVAL; 2100 2156 } 2101 2157 ··· 2099 2163 return -EINVAL; 2100 2164 2101 2165 diag_data = (void *)(request_data + karg.starting_offset); 2102 - dctlprintk(ioc, pr_info(MPT3SAS_FMT 2103 - "%s: diag_buffer(%p), offset(%d), sz(%d)\n", 2104 - ioc->name, __func__, 2105 - diag_data, karg.starting_offset, karg.bytes_to_read)); 2166 + dctlprintk(ioc, 2167 + ioc_info(ioc, "%s: diag_buffer(%p), offset(%d), sz(%d)\n", 2168 + __func__, diag_data, karg.starting_offset, 2169 + karg.bytes_to_read)); 2106 2170 2107 2171 /* Truncate data on requests that are too large */ 2108 2172 if ((diag_data + karg.bytes_to_read < diag_data) || ··· 2113 2177 2114 2178 if (copy_to_user((void __user *)uarg->diagnostic_data, 2115 2179 diag_data, copy_size)) { 2116 - pr_err(MPT3SAS_FMT 2117 - "%s: Unable to write mpt_diag_read_buffer_t data @ %p\n", 2118 - ioc->name, __func__, diag_data); 2180 + ioc_err(ioc, "%s: Unable to write mpt_diag_read_buffer_t data @ %p\n", 2181 + __func__, diag_data); 2119 2182 return -EFAULT; 2120 2183 } 2121 2184 2122 2185 if ((karg.flags & MPT3_FLAGS_REREGISTER) == 0) 2123 2186 return 0; 2124 2187 2125 - dctlprintk(ioc, pr_info(MPT3SAS_FMT 2126 - "%s: Reregister buffer_type(0x%02x)\n", 2127 - ioc->name, __func__, buffer_type)); 2188 + dctlprintk(ioc, 2189 + ioc_info(ioc, "%s: Reregister buffer_type(0x%02x)\n", 2190 + __func__, buffer_type)); 2128 2191 if ((ioc->diag_buffer_status[buffer_type] & 2129 2192 MPT3_DIAG_BUFFER_IS_RELEASED) == 0) { 2130 - dctlprintk(ioc, pr_info(MPT3SAS_FMT 2131 - "%s: buffer_type(0x%02x) is still registered\n", 2132 - ioc->name, __func__, buffer_type)); 2193 + dctlprintk(ioc, 2194 + ioc_info(ioc, "%s: buffer_type(0x%02x) is still registered\n", 2195 + __func__, buffer_type)); 2133 2196 return 0; 2134 2197 } 2135 2198 /* Get a free request frame and save the message context. 2136 2199 */ 2137 2200 2138 2201 if (ioc->ctl_cmds.status != MPT3_CMD_NOT_USED) { 2139 - pr_err(MPT3SAS_FMT "%s: ctl_cmd in use\n", 2140 - ioc->name, __func__); 2202 + ioc_err(ioc, "%s: ctl_cmd in use\n", __func__); 2141 2203 rc = -EAGAIN; 2142 2204 goto out; 2143 2205 } 2144 2206 2145 2207 smid = mpt3sas_base_get_smid(ioc, ioc->ctl_cb_idx); 2146 2208 if (!smid) { 2147 - pr_err(MPT3SAS_FMT "%s: failed obtaining a smid\n", 2148 - ioc->name, __func__); 2209 + ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); 2149 2210 rc = -EAGAIN; 2150 2211 goto out; 2151 2212 } ··· 2180 2247 2181 2248 /* process the completed Reply Message Frame */ 2182 2249 if ((ioc->ctl_cmds.status & MPT3_CMD_REPLY_VALID) == 0) { 2183 - pr_err(MPT3SAS_FMT "%s: no reply message\n", 2184 - ioc->name, __func__); 2250 + ioc_err(ioc, "%s: no reply message\n", __func__); 2185 2251 rc = -EFAULT; 2186 2252 goto out; 2187 2253 } ··· 2191 2259 if (ioc_status == MPI2_IOCSTATUS_SUCCESS) { 2192 2260 ioc->diag_buffer_status[buffer_type] |= 2193 2261 MPT3_DIAG_BUFFER_IS_REGISTERED; 2194 - dctlprintk(ioc, pr_info(MPT3SAS_FMT "%s: success\n", 2195 - ioc->name, __func__)); 2262 + dctlprintk(ioc, ioc_info(ioc, "%s: success\n", __func__)); 2196 2263 } else { 2197 - pr_info(MPT3SAS_FMT 2198 - "%s: ioc_status(0x%04x) log_info(0x%08x)\n", 2199 - ioc->name, __func__, 2200 - ioc_status, le32_to_cpu(mpi_reply->IOCLogInfo)); 2264 + ioc_info(ioc, "%s: ioc_status(0x%04x) log_info(0x%08x)\n", 2265 + __func__, ioc_status, 2266 + le32_to_cpu(mpi_reply->IOCLogInfo)); 2201 2267 rc = -EFAULT; 2202 2268 } 2203 2269 ··· 2380 2450 ret = _ctl_diag_read_buffer(ioc, arg); 2381 2451 break; 2382 2452 default: 2383 - dctlprintk(ioc, pr_info(MPT3SAS_FMT 2384 - "unsupported ioctl opcode(0x%08x)\n", ioc->name, cmd)); 2453 + dctlprintk(ioc, 2454 + ioc_info(ioc, "unsupported ioctl opcode(0x%08x)\n", 2455 + cmd)); 2385 2456 break; 2386 2457 } 2387 2458 ··· 2771 2840 return -EINVAL; 2772 2841 2773 2842 ioc->logging_level = val; 2774 - pr_info(MPT3SAS_FMT "logging_level=%08xh\n", ioc->name, 2775 - ioc->logging_level); 2843 + ioc_info(ioc, "logging_level=%08xh\n", 2844 + ioc->logging_level); 2776 2845 return strlen(buf); 2777 2846 } 2778 2847 static DEVICE_ATTR(logging_level, S_IRUGO | S_IWUSR, _ctl_logging_level_show, ··· 2808 2877 return -EINVAL; 2809 2878 2810 2879 ioc->fwfault_debug = val; 2811 - pr_info(MPT3SAS_FMT "fwfault_debug=%d\n", ioc->name, 2812 - ioc->fwfault_debug); 2880 + ioc_info(ioc, "fwfault_debug=%d\n", 2881 + ioc->fwfault_debug); 2813 2882 return strlen(buf); 2814 2883 } 2815 2884 static DEVICE_ATTR(fwfault_debug, S_IRUGO | S_IWUSR, ··· 2889 2958 ssize_t rc = 0; 2890 2959 2891 2960 if (!ioc->is_warpdrive) { 2892 - pr_err(MPT3SAS_FMT "%s: BRM attribute is only for" 2893 - " warpdrive\n", ioc->name, __func__); 2961 + ioc_err(ioc, "%s: BRM attribute is only for warpdrive\n", 2962 + __func__); 2894 2963 goto out; 2895 2964 } 2896 2965 /* pci_access_mutex lock acquired by sysfs show path */ ··· 2904 2973 sz = offsetof(Mpi2IOUnitPage3_t, GPIOVal) + (sizeof(u16) * 36); 2905 2974 io_unit_pg3 = kzalloc(sz, GFP_KERNEL); 2906 2975 if (!io_unit_pg3) { 2907 - pr_err(MPT3SAS_FMT "%s: failed allocating memory " 2908 - "for iounit_pg3: (%d) bytes\n", ioc->name, __func__, sz); 2976 + ioc_err(ioc, "%s: failed allocating memory for iounit_pg3: (%d) bytes\n", 2977 + __func__, sz); 2909 2978 goto out; 2910 2979 } 2911 2980 2912 2981 if (mpt3sas_config_get_iounit_pg3(ioc, &mpi_reply, io_unit_pg3, sz) != 2913 2982 0) { 2914 - pr_err(MPT3SAS_FMT 2915 - "%s: failed reading iounit_pg3\n", ioc->name, 2916 - __func__); 2983 + ioc_err(ioc, "%s: failed reading iounit_pg3\n", 2984 + __func__); 2917 2985 goto out; 2918 2986 } 2919 2987 2920 2988 ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & MPI2_IOCSTATUS_MASK; 2921 2989 if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { 2922 - pr_err(MPT3SAS_FMT "%s: iounit_pg3 failed with " 2923 - "ioc_status(0x%04x)\n", ioc->name, __func__, ioc_status); 2990 + ioc_err(ioc, "%s: iounit_pg3 failed with ioc_status(0x%04x)\n", 2991 + __func__, ioc_status); 2924 2992 goto out; 2925 2993 } 2926 2994 2927 2995 if (io_unit_pg3->GPIOCount < 25) { 2928 - pr_err(MPT3SAS_FMT "%s: iounit_pg3->GPIOCount less than " 2929 - "25 entries, detected (%d) entries\n", ioc->name, __func__, 2930 - io_unit_pg3->GPIOCount); 2996 + ioc_err(ioc, "%s: iounit_pg3->GPIOCount less than 25 entries, detected (%d) entries\n", 2997 + __func__, io_unit_pg3->GPIOCount); 2931 2998 goto out; 2932 2999 } 2933 3000 ··· 2968 3039 struct DIAG_BUFFER_START *request_data; 2969 3040 2970 3041 if (!ioc->diag_buffer[MPI2_DIAG_BUF_TYPE_TRACE]) { 2971 - pr_err(MPT3SAS_FMT 2972 - "%s: host_trace_buffer is not registered\n", 2973 - ioc->name, __func__); 3042 + ioc_err(ioc, "%s: host_trace_buffer is not registered\n", 3043 + __func__); 2974 3044 return 0; 2975 3045 } 2976 3046 2977 3047 if ((ioc->diag_buffer_status[MPI2_DIAG_BUF_TYPE_TRACE] & 2978 3048 MPT3_DIAG_BUFFER_IS_REGISTERED) == 0) { 2979 - pr_err(MPT3SAS_FMT 2980 - "%s: host_trace_buffer is not registered\n", 2981 - ioc->name, __func__); 3049 + ioc_err(ioc, "%s: host_trace_buffer is not registered\n", 3050 + __func__); 2982 3051 return 0; 2983 3052 } 2984 3053 ··· 3016 3089 u32 size; 3017 3090 3018 3091 if (!ioc->diag_buffer[MPI2_DIAG_BUF_TYPE_TRACE]) { 3019 - pr_err(MPT3SAS_FMT 3020 - "%s: host_trace_buffer is not registered\n", 3021 - ioc->name, __func__); 3092 + ioc_err(ioc, "%s: host_trace_buffer is not registered\n", 3093 + __func__); 3022 3094 return 0; 3023 3095 } 3024 3096 3025 3097 if ((ioc->diag_buffer_status[MPI2_DIAG_BUF_TYPE_TRACE] & 3026 3098 MPT3_DIAG_BUFFER_IS_REGISTERED) == 0) { 3027 - pr_err(MPT3SAS_FMT 3028 - "%s: host_trace_buffer is not registered\n", 3029 - ioc->name, __func__); 3099 + ioc_err(ioc, "%s: host_trace_buffer is not registered\n", 3100 + __func__); 3030 3101 return 0; 3031 3102 } 3032 3103 ··· 3113 3188 MPT3_DIAG_BUFFER_IS_RELEASED) == 0)) 3114 3189 goto out; 3115 3190 memset(&diag_register, 0, sizeof(struct mpt3_diag_register)); 3116 - pr_info(MPT3SAS_FMT "posting host trace buffers\n", 3117 - ioc->name); 3191 + ioc_info(ioc, "posting host trace buffers\n"); 3118 3192 diag_register.buffer_type = MPI2_DIAG_BUF_TYPE_TRACE; 3119 3193 diag_register.requested_buffer_size = (1024 * 1024); 3120 3194 diag_register.unique_id = 0x7075900; ··· 3129 3205 if ((ioc->diag_buffer_status[MPI2_DIAG_BUF_TYPE_TRACE] & 3130 3206 MPT3_DIAG_BUFFER_IS_RELEASED)) 3131 3207 goto out; 3132 - pr_info(MPT3SAS_FMT "releasing host trace buffer\n", 3133 - ioc->name); 3208 + ioc_info(ioc, "releasing host trace buffer\n"); 3134 3209 mpt3sas_send_diag_release(ioc, MPI2_DIAG_BUF_TYPE_TRACE, 3135 3210 &issue_reset); 3136 3211 }
+623 -802
drivers/scsi/mpt3sas/mpt3sas_scsih.c
··· 418 418 419 419 if ((mpt3sas_config_get_sas_device_pg0(ioc, &mpi_reply, &sas_device_pg0, 420 420 MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, handle))) { 421 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", ioc->name, 422 - __FILE__, __LINE__, __func__); 421 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 422 + __FILE__, __LINE__, __func__); 423 423 return -ENXIO; 424 424 } 425 425 ··· 442 442 return -ENXIO; 443 443 444 444 /* else error case */ 445 - pr_err(MPT3SAS_FMT 446 - "handle(0x%04x), ioc_status(0x%04x), failure at %s:%d/%s()!\n", 447 - ioc->name, handle, ioc_status, 448 - __FILE__, __LINE__, __func__); 445 + ioc_err(ioc, "handle(0x%04x), ioc_status(0x%04x), failure at %s:%d/%s()!\n", 446 + handle, ioc_status, __FILE__, __LINE__, __func__); 449 447 return -EIO; 450 448 } 451 449 ··· 506 508 (ioc->bios_pg2.ReqBootDeviceForm & 507 509 MPI2_BIOSPAGE2_FORM_MASK), 508 510 &ioc->bios_pg2.RequestedBootDevice)) { 509 - dinitprintk(ioc, pr_info(MPT3SAS_FMT 510 - "%s: req_boot_device(0x%016llx)\n", 511 - ioc->name, __func__, 512 - (unsigned long long)sas_address)); 511 + dinitprintk(ioc, 512 + ioc_info(ioc, "%s: req_boot_device(0x%016llx)\n", 513 + __func__, (u64)sas_address)); 513 514 ioc->req_boot_device.device = device; 514 515 ioc->req_boot_device.channel = channel; 515 516 } ··· 520 523 (ioc->bios_pg2.ReqAltBootDeviceForm & 521 524 MPI2_BIOSPAGE2_FORM_MASK), 522 525 &ioc->bios_pg2.RequestedAltBootDevice)) { 523 - dinitprintk(ioc, pr_info(MPT3SAS_FMT 524 - "%s: req_alt_boot_device(0x%016llx)\n", 525 - ioc->name, __func__, 526 - (unsigned long long)sas_address)); 526 + dinitprintk(ioc, 527 + ioc_info(ioc, "%s: req_alt_boot_device(0x%016llx)\n", 528 + __func__, (u64)sas_address)); 527 529 ioc->req_alt_boot_device.device = device; 528 530 ioc->req_alt_boot_device.channel = channel; 529 531 } ··· 534 538 (ioc->bios_pg2.CurrentBootDeviceForm & 535 539 MPI2_BIOSPAGE2_FORM_MASK), 536 540 &ioc->bios_pg2.CurrentBootDevice)) { 537 - dinitprintk(ioc, pr_info(MPT3SAS_FMT 538 - "%s: current_boot_device(0x%016llx)\n", 539 - ioc->name, __func__, 540 - (unsigned long long)sas_address)); 541 + dinitprintk(ioc, 542 + ioc_info(ioc, "%s: current_boot_device(0x%016llx)\n", 543 + __func__, (u64)sas_address)); 541 544 ioc->current_boot_device.device = device; 542 545 ioc->current_boot_device.channel = channel; 543 546 } ··· 747 752 sas_device->chassis_slot); 748 753 } else { 749 754 if (sas_device->enclosure_handle != 0) 750 - pr_info(MPT3SAS_FMT 751 - "enclosure logical id(0x%016llx), slot(%d) \n", 752 - ioc->name, (unsigned long long) 753 - sas_device->enclosure_logical_id, 754 - sas_device->slot); 755 + ioc_info(ioc, "enclosure logical id(0x%016llx), slot(%d)\n", 756 + (u64)sas_device->enclosure_logical_id, 757 + sas_device->slot); 755 758 if (sas_device->connector_name[0] != '\0') 756 - pr_info(MPT3SAS_FMT 757 - "enclosure level(0x%04x), connector name( %s)\n", 758 - ioc->name, sas_device->enclosure_level, 759 - sas_device->connector_name); 759 + ioc_info(ioc, "enclosure level(0x%04x), connector name( %s)\n", 760 + sas_device->enclosure_level, 761 + sas_device->connector_name); 760 762 if (sas_device->is_chassis_slot_valid) 761 - pr_info(MPT3SAS_FMT "chassis slot(0x%04x)\n", 762 - ioc->name, sas_device->chassis_slot); 763 + ioc_info(ioc, "chassis slot(0x%04x)\n", 764 + sas_device->chassis_slot); 763 765 } 764 766 } 765 767 ··· 776 784 777 785 if (!sas_device) 778 786 return; 779 - pr_info(MPT3SAS_FMT 780 - "removing handle(0x%04x), sas_addr(0x%016llx)\n", 781 - ioc->name, sas_device->handle, 782 - (unsigned long long) sas_device->sas_address); 787 + ioc_info(ioc, "removing handle(0x%04x), sas_addr(0x%016llx)\n", 788 + sas_device->handle, (u64)sas_device->sas_address); 783 789 784 790 _scsih_display_enclosure_chassis_info(ioc, sas_device, NULL, NULL); 785 791 ··· 862 872 { 863 873 unsigned long flags; 864 874 865 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 866 - "%s: handle(0x%04x), sas_addr(0x%016llx)\n", 867 - ioc->name, __func__, sas_device->handle, 868 - (unsigned long long)sas_device->sas_address)); 875 + dewtprintk(ioc, 876 + ioc_info(ioc, "%s: handle(0x%04x), sas_addr(0x%016llx)\n", 877 + __func__, sas_device->handle, 878 + (u64)sas_device->sas_address)); 869 879 870 880 dewtprintk(ioc, _scsih_display_enclosure_chassis_info(ioc, sas_device, 871 881 NULL, NULL)); ··· 913 923 { 914 924 unsigned long flags; 915 925 916 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 917 - "%s: handle(0x%04x), sas_addr(0x%016llx)\n", ioc->name, 918 - __func__, sas_device->handle, 919 - (unsigned long long)sas_device->sas_address)); 926 + dewtprintk(ioc, 927 + ioc_info(ioc, "%s: handle(0x%04x), sas_addr(0x%016llx)\n", 928 + __func__, sas_device->handle, 929 + (u64)sas_device->sas_address)); 920 930 921 931 dewtprintk(ioc, _scsih_display_enclosure_chassis_info(ioc, sas_device, 922 932 NULL, NULL)); ··· 1063 1073 1064 1074 if (!pcie_device) 1065 1075 return; 1066 - pr_info(MPT3SAS_FMT 1067 - "removing handle(0x%04x), wwid(0x%016llx)\n", 1068 - ioc->name, pcie_device->handle, 1069 - (unsigned long long) pcie_device->wwid); 1076 + ioc_info(ioc, "removing handle(0x%04x), wwid(0x%016llx)\n", 1077 + pcie_device->handle, (u64)pcie_device->wwid); 1070 1078 if (pcie_device->enclosure_handle != 0) 1071 - pr_info(MPT3SAS_FMT 1072 - "removing enclosure logical id(0x%016llx), slot(%d)\n", 1073 - ioc->name, 1074 - (unsigned long long)pcie_device->enclosure_logical_id, 1075 - pcie_device->slot); 1079 + ioc_info(ioc, "removing enclosure logical id(0x%016llx), slot(%d)\n", 1080 + (u64)pcie_device->enclosure_logical_id, 1081 + pcie_device->slot); 1076 1082 if (pcie_device->connector_name[0] != '\0') 1077 - pr_info(MPT3SAS_FMT 1078 - "removing enclosure level(0x%04x), connector name( %s)\n", 1079 - ioc->name, pcie_device->enclosure_level, 1080 - pcie_device->connector_name); 1083 + ioc_info(ioc, "removing enclosure level(0x%04x), connector name( %s)\n", 1084 + pcie_device->enclosure_level, 1085 + pcie_device->connector_name); 1081 1086 1082 1087 spin_lock_irqsave(&ioc->pcie_device_lock, flags); 1083 1088 if (!list_empty(&pcie_device->list)) { ··· 1131 1146 { 1132 1147 unsigned long flags; 1133 1148 1134 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 1135 - "%s: handle (0x%04x), wwid(0x%016llx)\n", ioc->name, __func__, 1136 - pcie_device->handle, (unsigned long long)pcie_device->wwid)); 1149 + dewtprintk(ioc, 1150 + ioc_info(ioc, "%s: handle (0x%04x), wwid(0x%016llx)\n", 1151 + __func__, 1152 + pcie_device->handle, (u64)pcie_device->wwid)); 1137 1153 if (pcie_device->enclosure_handle != 0) 1138 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 1139 - "%s: enclosure logical id(0x%016llx), slot( %d)\n", 1140 - ioc->name, __func__, 1141 - (unsigned long long)pcie_device->enclosure_logical_id, 1142 - pcie_device->slot)); 1154 + dewtprintk(ioc, 1155 + ioc_info(ioc, "%s: enclosure logical id(0x%016llx), slot( %d)\n", 1156 + __func__, 1157 + (u64)pcie_device->enclosure_logical_id, 1158 + pcie_device->slot)); 1143 1159 if (pcie_device->connector_name[0] != '\0') 1144 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 1145 - "%s: enclosure level(0x%04x), connector name( %s)\n", 1146 - ioc->name, __func__, pcie_device->enclosure_level, 1147 - pcie_device->connector_name)); 1160 + dewtprintk(ioc, 1161 + ioc_info(ioc, "%s: enclosure level(0x%04x), connector name( %s)\n", 1162 + __func__, pcie_device->enclosure_level, 1163 + pcie_device->connector_name)); 1148 1164 1149 1165 spin_lock_irqsave(&ioc->pcie_device_lock, flags); 1150 1166 pcie_device_get(pcie_device); ··· 1177 1191 { 1178 1192 unsigned long flags; 1179 1193 1180 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 1181 - "%s: handle (0x%04x), wwid(0x%016llx)\n", ioc->name, __func__, 1182 - pcie_device->handle, (unsigned long long)pcie_device->wwid)); 1194 + dewtprintk(ioc, 1195 + ioc_info(ioc, "%s: handle (0x%04x), wwid(0x%016llx)\n", 1196 + __func__, 1197 + pcie_device->handle, (u64)pcie_device->wwid)); 1183 1198 if (pcie_device->enclosure_handle != 0) 1184 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 1185 - "%s: enclosure logical id(0x%016llx), slot( %d)\n", 1186 - ioc->name, __func__, 1187 - (unsigned long long)pcie_device->enclosure_logical_id, 1188 - pcie_device->slot)); 1199 + dewtprintk(ioc, 1200 + ioc_info(ioc, "%s: enclosure logical id(0x%016llx), slot( %d)\n", 1201 + __func__, 1202 + (u64)pcie_device->enclosure_logical_id, 1203 + pcie_device->slot)); 1189 1204 if (pcie_device->connector_name[0] != '\0') 1190 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 1191 - "%s: enclosure level(0x%04x), connector name( %s)\n", 1192 - ioc->name, __func__, pcie_device->enclosure_level, 1193 - pcie_device->connector_name)); 1205 + dewtprintk(ioc, 1206 + ioc_info(ioc, "%s: enclosure level(0x%04x), connector name( %s)\n", 1207 + __func__, pcie_device->enclosure_level, 1208 + pcie_device->connector_name)); 1194 1209 1195 1210 spin_lock_irqsave(&ioc->pcie_device_lock, flags); 1196 1211 pcie_device_get(pcie_device); ··· 1291 1304 { 1292 1305 unsigned long flags; 1293 1306 1294 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 1295 - "%s: handle(0x%04x), wwid(0x%016llx)\n", ioc->name, __func__, 1296 - raid_device->handle, (unsigned long long)raid_device->wwid)); 1307 + dewtprintk(ioc, 1308 + ioc_info(ioc, "%s: handle(0x%04x), wwid(0x%016llx)\n", 1309 + __func__, 1310 + raid_device->handle, (u64)raid_device->wwid)); 1297 1311 1298 1312 spin_lock_irqsave(&ioc->raid_device_lock, flags); 1299 1313 list_add_tail(&raid_device->list, &ioc->raid_device_list); ··· 1845 1857 1846 1858 if ((mpt3sas_config_get_sas_device_pg0(ioc, &mpi_reply, &sas_device_pg0, 1847 1859 MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, handle))) { 1848 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 1849 - ioc->name, __FILE__, __LINE__, __func__); 1860 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 1861 + __FILE__, __LINE__, __func__); 1850 1862 return; 1851 1863 } 1852 1864 1853 1865 ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & 1854 1866 MPI2_IOCSTATUS_MASK; 1855 1867 if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { 1856 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 1857 - ioc->name, __FILE__, __LINE__, __func__); 1868 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 1869 + __FILE__, __LINE__, __func__); 1858 1870 return; 1859 1871 } 1860 1872 ··· 1940 1952 if (mpt3sas_config_get_raid_volume_pg0(ioc, &mpi_reply, &vol_pg0, 1941 1953 MPI2_RAID_VOLUME_PGAD_FORM_HANDLE, handle, 1942 1954 sizeof(Mpi2RaidVolPage0_t))) { 1943 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 1944 - ioc->name, __FILE__, __LINE__, __func__); 1955 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 1956 + __FILE__, __LINE__, __func__); 1945 1957 percent_complete = 0; 1946 1958 goto out; 1947 1959 } ··· 1994 2006 if (mpt3sas_config_get_raid_volume_pg0(ioc, &mpi_reply, &vol_pg0, 1995 2007 MPI2_RAID_VOLUME_PGAD_FORM_HANDLE, handle, 1996 2008 sizeof(Mpi2RaidVolPage0_t))) { 1997 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 1998 - ioc->name, __FILE__, __LINE__, __func__); 2009 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 2010 + __FILE__, __LINE__, __func__); 1999 2011 goto out; 2000 2012 } 2001 2013 ··· 2091 2103 2092 2104 if ((mpt3sas_config_get_number_pds(ioc, raid_device->handle, 2093 2105 &num_pds)) || !num_pds) { 2094 - dfailprintk(ioc, pr_warn(MPT3SAS_FMT 2095 - "failure at %s:%d/%s()!\n", ioc->name, __FILE__, __LINE__, 2096 - __func__)); 2106 + dfailprintk(ioc, 2107 + ioc_warn(ioc, "failure at %s:%d/%s()!\n", 2108 + __FILE__, __LINE__, __func__)); 2097 2109 return 1; 2098 2110 } 2099 2111 ··· 2102 2114 sizeof(Mpi2RaidVol0PhysDisk_t)); 2103 2115 vol_pg0 = kzalloc(sz, GFP_KERNEL); 2104 2116 if (!vol_pg0) { 2105 - dfailprintk(ioc, pr_warn(MPT3SAS_FMT 2106 - "failure at %s:%d/%s()!\n", ioc->name, __FILE__, __LINE__, 2107 - __func__)); 2117 + dfailprintk(ioc, 2118 + ioc_warn(ioc, "failure at %s:%d/%s()!\n", 2119 + __FILE__, __LINE__, __func__)); 2108 2120 return 1; 2109 2121 } 2110 2122 2111 2123 if ((mpt3sas_config_get_raid_volume_pg0(ioc, &mpi_reply, vol_pg0, 2112 2124 MPI2_RAID_VOLUME_PGAD_FORM_HANDLE, raid_device->handle, sz))) { 2113 - dfailprintk(ioc, pr_warn(MPT3SAS_FMT 2114 - "failure at %s:%d/%s()!\n", ioc->name, __FILE__, __LINE__, 2115 - __func__)); 2125 + dfailprintk(ioc, 2126 + ioc_warn(ioc, "failure at %s:%d/%s()!\n", 2127 + __FILE__, __LINE__, __func__)); 2116 2128 kfree(vol_pg0); 2117 2129 return 1; 2118 2130 } ··· 2203 2215 raid_device = mpt3sas_raid_device_find_by_handle(ioc, handle); 2204 2216 spin_unlock_irqrestore(&ioc->raid_device_lock, flags); 2205 2217 if (!raid_device) { 2206 - dfailprintk(ioc, pr_warn(MPT3SAS_FMT 2207 - "failure at %s:%d/%s()!\n", ioc->name, __FILE__, 2208 - __LINE__, __func__)); 2218 + dfailprintk(ioc, 2219 + ioc_warn(ioc, "failure at %s:%d/%s()!\n", 2220 + __FILE__, __LINE__, __func__)); 2209 2221 return 1; 2210 2222 } 2211 2223 2212 2224 if (_scsih_get_volume_capabilities(ioc, raid_device)) { 2213 - dfailprintk(ioc, pr_warn(MPT3SAS_FMT 2214 - "failure at %s:%d/%s()!\n", ioc->name, __FILE__, 2215 - __LINE__, __func__)); 2225 + dfailprintk(ioc, 2226 + ioc_warn(ioc, "failure at %s:%d/%s()!\n", 2227 + __FILE__, __LINE__, __func__)); 2216 2228 return 1; 2217 2229 } 2218 2230 ··· 2296 2308 if (sas_target_priv_data->flags & MPT_TARGET_FLAGS_RAID_COMPONENT) { 2297 2309 if (mpt3sas_config_get_volume_handle(ioc, handle, 2298 2310 &volume_handle)) { 2299 - dfailprintk(ioc, pr_warn(MPT3SAS_FMT 2300 - "failure at %s:%d/%s()!\n", ioc->name, 2301 - __FILE__, __LINE__, __func__)); 2311 + dfailprintk(ioc, 2312 + ioc_warn(ioc, "failure at %s:%d/%s()!\n", 2313 + __FILE__, __LINE__, __func__)); 2302 2314 return 1; 2303 2315 } 2304 2316 if (volume_handle && mpt3sas_config_get_volume_wwid(ioc, 2305 2317 volume_handle, &volume_wwid)) { 2306 - dfailprintk(ioc, pr_warn(MPT3SAS_FMT 2307 - "failure at %s:%d/%s()!\n", ioc->name, 2308 - __FILE__, __LINE__, __func__)); 2318 + dfailprintk(ioc, 2319 + ioc_warn(ioc, "failure at %s:%d/%s()!\n", 2320 + __FILE__, __LINE__, __func__)); 2309 2321 return 1; 2310 2322 } 2311 2323 } ··· 2317 2329 sas_device_priv_data->sas_target->sas_address); 2318 2330 if (!pcie_device) { 2319 2331 spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); 2320 - dfailprintk(ioc, pr_warn(MPT3SAS_FMT 2321 - "failure at %s:%d/%s()!\n", ioc->name, __FILE__, 2322 - __LINE__, __func__)); 2332 + dfailprintk(ioc, 2333 + ioc_warn(ioc, "failure at %s:%d/%s()!\n", 2334 + __FILE__, __LINE__, __func__)); 2323 2335 return 1; 2324 2336 } 2325 2337 ··· 2365 2377 sas_device_priv_data->sas_target->sas_address); 2366 2378 if (!sas_device) { 2367 2379 spin_unlock_irqrestore(&ioc->sas_device_lock, flags); 2368 - dfailprintk(ioc, pr_warn(MPT3SAS_FMT 2369 - "failure at %s:%d/%s()!\n", ioc->name, __FILE__, __LINE__, 2370 - __func__)); 2380 + dfailprintk(ioc, 2381 + ioc_warn(ioc, "failure at %s:%d/%s()!\n", 2382 + __FILE__, __LINE__, __func__)); 2371 2383 return 1; 2372 2384 } 2373 2385 ··· 2503 2515 desc = "unknown"; 2504 2516 break; 2505 2517 } 2506 - pr_warn(MPT3SAS_FMT "response_code(0x%01x): %s\n", 2507 - ioc->name, response_code, desc); 2518 + ioc_warn(ioc, "response_code(0x%01x): %s\n", response_code, desc); 2508 2519 } 2509 2520 2510 2521 /** ··· 2641 2654 2642 2655 ioc_state = mpt3sas_base_get_iocstate(ioc, 0); 2643 2656 if (ioc_state & MPI2_DOORBELL_USED) { 2644 - dhsprintk(ioc, pr_info(MPT3SAS_FMT 2645 - "unexpected doorbell active!\n", ioc->name)); 2657 + dhsprintk(ioc, ioc_info(ioc, "unexpected doorbell active!\n")); 2646 2658 rc = mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER); 2647 2659 return (!rc) ? SUCCESS : FAILED; 2648 2660 } ··· 2655 2669 2656 2670 smid = mpt3sas_base_get_smid_hpr(ioc, ioc->tm_cb_idx); 2657 2671 if (!smid) { 2658 - pr_err(MPT3SAS_FMT "%s: failed obtaining a smid\n", 2659 - ioc->name, __func__); 2672 + ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); 2660 2673 return FAILED; 2661 2674 } 2662 2675 2663 - dtmprintk(ioc, pr_info(MPT3SAS_FMT 2664 - "sending tm: handle(0x%04x), task_type(0x%02x), smid(%d), timeout(%d), tr_method(0x%x)\n", 2665 - ioc->name, handle, type, smid_task, timeout, tr_method)); 2676 + dtmprintk(ioc, 2677 + ioc_info(ioc, "sending tm: handle(0x%04x), task_type(0x%02x), smid(%d), timeout(%d), tr_method(0x%x)\n", 2678 + handle, type, smid_task, timeout, tr_method)); 2666 2679 ioc->tm_cmds.status = MPT3_CMD_PENDING; 2667 2680 mpi_request = mpt3sas_base_get_msg_frame(ioc, smid); 2668 2681 ioc->tm_cmds.smid = smid; ··· 2694 2709 if (ioc->tm_cmds.status & MPT3_CMD_REPLY_VALID) { 2695 2710 mpt3sas_trigger_master(ioc, MASTER_TRIGGER_TASK_MANAGMENT); 2696 2711 mpi_reply = ioc->tm_cmds.reply; 2697 - dtmprintk(ioc, pr_info(MPT3SAS_FMT "complete tm: " \ 2698 - "ioc_status(0x%04x), loginfo(0x%08x), term_count(0x%08x)\n", 2699 - ioc->name, le16_to_cpu(mpi_reply->IOCStatus), 2700 - le32_to_cpu(mpi_reply->IOCLogInfo), 2701 - le32_to_cpu(mpi_reply->TerminationCount))); 2712 + dtmprintk(ioc, 2713 + ioc_info(ioc, "complete tm: ioc_status(0x%04x), loginfo(0x%08x), term_count(0x%08x)\n", 2714 + le16_to_cpu(mpi_reply->IOCStatus), 2715 + le32_to_cpu(mpi_reply->IOCLogInfo), 2716 + le32_to_cpu(mpi_reply->TerminationCount))); 2702 2717 if (ioc->logging_level & MPT_DEBUG_TM) { 2703 2718 _scsih_response_code(ioc, mpi_reply->ResponseCode); 2704 2719 if (mpi_reply->IOCStatus) ··· 3045 3060 struct MPT3SAS_ADAPTER *ioc = shost_priv(scmd->device->host); 3046 3061 int r, retval; 3047 3062 3048 - pr_info(MPT3SAS_FMT "attempting host reset! scmd(%p)\n", 3049 - ioc->name, scmd); 3063 + ioc_info(ioc, "attempting host reset! scmd(%p)\n", scmd); 3050 3064 scsi_print_command(scmd); 3051 3065 3052 3066 if (ioc->is_driver_loading || ioc->remove_host) { 3053 - pr_info(MPT3SAS_FMT "Blocking the host reset\n", 3054 - ioc->name); 3067 + ioc_info(ioc, "Blocking the host reset\n"); 3055 3068 r = FAILED; 3056 3069 goto out; 3057 3070 } ··· 3057 3074 retval = mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER); 3058 3075 r = (retval < 0) ? FAILED : SUCCESS; 3059 3076 out: 3060 - pr_info(MPT3SAS_FMT "host reset: %s scmd(%p)\n", 3061 - ioc->name, ((r == SUCCESS) ? "SUCCESS" : "FAILED"), scmd); 3077 + ioc_info(ioc, "host reset: %s scmd(%p)\n", 3078 + r == SUCCESS ? "SUCCESS" : "FAILED", scmd); 3062 3079 3063 3080 return r; 3064 3081 } ··· 3597 3614 tr_method = MPI2_SCSITASKMGMT_MSGFLAGS_LINK_RESET; 3598 3615 } 3599 3616 if (sas_target_priv_data) { 3600 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 3601 - "setting delete flag: handle(0x%04x), sas_addr(0x%016llx)\n", 3602 - ioc->name, handle, 3603 - (unsigned long long)sas_address)); 3617 + dewtprintk(ioc, 3618 + ioc_info(ioc, "setting delete flag: handle(0x%04x), sas_addr(0x%016llx)\n", 3619 + handle, (u64)sas_address)); 3604 3620 if (sas_device) { 3605 3621 if (sas_device->enclosure_handle != 0) 3606 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 3607 - "setting delete flag:enclosure logical " 3608 - "id(0x%016llx), slot(%d)\n", ioc->name, 3609 - (unsigned long long) 3610 - sas_device->enclosure_logical_id, 3611 - sas_device->slot)); 3622 + dewtprintk(ioc, 3623 + ioc_info(ioc, "setting delete flag:enclosure logical id(0x%016llx), slot(%d)\n", 3624 + (u64)sas_device->enclosure_logical_id, 3625 + sas_device->slot)); 3612 3626 if (sas_device->connector_name[0] != '\0') 3613 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 3614 - "setting delete flag: enclosure " 3615 - "level(0x%04x), connector name( %s)\n", 3616 - ioc->name, sas_device->enclosure_level, 3617 - sas_device->connector_name)); 3627 + dewtprintk(ioc, 3628 + ioc_info(ioc, "setting delete flag: enclosure level(0x%04x), connector name( %s)\n", 3629 + sas_device->enclosure_level, 3630 + sas_device->connector_name)); 3618 3631 } else if (pcie_device) { 3619 3632 if (pcie_device->enclosure_handle != 0) 3620 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 3621 - "setting delete flag: logical " 3622 - "id(0x%016llx), slot(%d)\n", ioc->name, 3623 - (unsigned long long) 3624 - pcie_device->enclosure_logical_id, 3625 - pcie_device->slot)); 3633 + dewtprintk(ioc, 3634 + ioc_info(ioc, "setting delete flag: logical id(0x%016llx), slot(%d)\n", 3635 + (u64)pcie_device->enclosure_logical_id, 3636 + pcie_device->slot)); 3626 3637 if (pcie_device->connector_name[0] != '\0') 3627 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 3628 - "setting delete flag:, enclosure " 3629 - "level(0x%04x), " 3630 - "connector name( %s)\n", ioc->name, 3631 - pcie_device->enclosure_level, 3632 - pcie_device->connector_name)); 3638 + dewtprintk(ioc, 3639 + ioc_info(ioc, "setting delete flag:, enclosure level(0x%04x), connector name( %s)\n", 3640 + pcie_device->enclosure_level, 3641 + pcie_device->connector_name)); 3633 3642 } 3634 3643 _scsih_ublock_io_device(ioc, sas_address); 3635 3644 sas_target_priv_data->handle = MPT3SAS_INVALID_DEVICE_HANDLE; ··· 3635 3660 INIT_LIST_HEAD(&delayed_tr->list); 3636 3661 delayed_tr->handle = handle; 3637 3662 list_add_tail(&delayed_tr->list, &ioc->delayed_tr_list); 3638 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 3639 - "DELAYED:tr:handle(0x%04x), (open)\n", 3640 - ioc->name, handle)); 3663 + dewtprintk(ioc, 3664 + ioc_info(ioc, "DELAYED:tr:handle(0x%04x), (open)\n", 3665 + handle)); 3641 3666 goto out; 3642 3667 } 3643 3668 3644 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 3645 - "tr_send:handle(0x%04x), (open), smid(%d), cb(%d)\n", 3646 - ioc->name, handle, smid, 3647 - ioc->tm_tr_cb_idx)); 3669 + dewtprintk(ioc, 3670 + ioc_info(ioc, "tr_send:handle(0x%04x), (open), smid(%d), cb(%d)\n", 3671 + handle, smid, ioc->tm_tr_cb_idx)); 3648 3672 mpi_request = mpt3sas_base_get_msg_frame(ioc, smid); 3649 3673 memset(mpi_request, 0, sizeof(Mpi2SCSITaskManagementRequest_t)); 3650 3674 mpi_request->Function = MPI2_FUNCTION_SCSI_TASK_MGMT; ··· 3691 3717 struct _sc_list *delayed_sc; 3692 3718 3693 3719 if (ioc->pci_error_recovery) { 3694 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 3695 - "%s: host in pci error recovery\n", __func__, 3696 - ioc->name)); 3720 + dewtprintk(ioc, 3721 + ioc_info(ioc, "%s: host in pci error recovery\n", 3722 + __func__)); 3697 3723 return 1; 3698 3724 } 3699 3725 ioc_state = mpt3sas_base_get_iocstate(ioc, 1); 3700 3726 if (ioc_state != MPI2_IOC_STATE_OPERATIONAL) { 3701 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 3702 - "%s: host is not operational\n", __func__, ioc->name)); 3727 + dewtprintk(ioc, 3728 + ioc_info(ioc, "%s: host is not operational\n", 3729 + __func__)); 3703 3730 return 1; 3704 3731 } 3705 3732 if (unlikely(!mpi_reply)) { 3706 - pr_err(MPT3SAS_FMT "mpi_reply not valid at %s:%d/%s()!\n", 3707 - ioc->name, __FILE__, __LINE__, __func__); 3733 + ioc_err(ioc, "mpi_reply not valid at %s:%d/%s()!\n", 3734 + __FILE__, __LINE__, __func__); 3708 3735 return 1; 3709 3736 } 3710 3737 mpi_request_tm = mpt3sas_base_get_msg_frame(ioc, smid); 3711 3738 handle = le16_to_cpu(mpi_request_tm->DevHandle); 3712 3739 if (handle != le16_to_cpu(mpi_reply->DevHandle)) { 3713 - dewtprintk(ioc, pr_err(MPT3SAS_FMT 3714 - "spurious interrupt: handle(0x%04x:0x%04x), smid(%d)!!!\n", 3715 - ioc->name, handle, 3716 - le16_to_cpu(mpi_reply->DevHandle), smid)); 3740 + dewtprintk(ioc, 3741 + ioc_err(ioc, "spurious interrupt: handle(0x%04x:0x%04x), smid(%d)!!!\n", 3742 + handle, 3743 + le16_to_cpu(mpi_reply->DevHandle), smid)); 3717 3744 return 0; 3718 3745 } 3719 3746 3720 3747 mpt3sas_trigger_master(ioc, MASTER_TRIGGER_TASK_MANAGMENT); 3721 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 3722 - "tr_complete:handle(0x%04x), (open) smid(%d), ioc_status(0x%04x), " 3723 - "loginfo(0x%08x), completed(%d)\n", ioc->name, 3724 - handle, smid, le16_to_cpu(mpi_reply->IOCStatus), 3725 - le32_to_cpu(mpi_reply->IOCLogInfo), 3726 - le32_to_cpu(mpi_reply->TerminationCount))); 3748 + dewtprintk(ioc, 3749 + ioc_info(ioc, "tr_complete:handle(0x%04x), (open) smid(%d), ioc_status(0x%04x), loginfo(0x%08x), completed(%d)\n", 3750 + handle, smid, le16_to_cpu(mpi_reply->IOCStatus), 3751 + le32_to_cpu(mpi_reply->IOCLogInfo), 3752 + le32_to_cpu(mpi_reply->TerminationCount))); 3727 3753 3728 3754 smid_sas_ctrl = mpt3sas_base_get_smid(ioc, ioc->tm_sas_control_cb_idx); 3729 3755 if (!smid_sas_ctrl) { ··· 3733 3759 INIT_LIST_HEAD(&delayed_sc->list); 3734 3760 delayed_sc->handle = le16_to_cpu(mpi_request_tm->DevHandle); 3735 3761 list_add_tail(&delayed_sc->list, &ioc->delayed_sc_list); 3736 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 3737 - "DELAYED:sc:handle(0x%04x), (open)\n", 3738 - ioc->name, handle)); 3762 + dewtprintk(ioc, 3763 + ioc_info(ioc, "DELAYED:sc:handle(0x%04x), (open)\n", 3764 + handle)); 3739 3765 return _scsih_check_for_pending_tm(ioc, smid); 3740 3766 } 3741 3767 3742 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 3743 - "sc_send:handle(0x%04x), (open), smid(%d), cb(%d)\n", 3744 - ioc->name, handle, smid_sas_ctrl, 3745 - ioc->tm_sas_control_cb_idx)); 3768 + dewtprintk(ioc, 3769 + ioc_info(ioc, "sc_send:handle(0x%04x), (open), smid(%d), cb(%d)\n", 3770 + handle, smid_sas_ctrl, ioc->tm_sas_control_cb_idx)); 3746 3771 mpi_request = mpt3sas_base_get_msg_frame(ioc, smid_sas_ctrl); 3747 3772 memset(mpi_request, 0, sizeof(Mpi2SasIoUnitControlRequest_t)); 3748 3773 mpi_request->Function = MPI2_FUNCTION_SAS_IO_UNIT_CONTROL; ··· 3776 3803 mpt3sas_base_get_reply_virt_addr(ioc, reply); 3777 3804 3778 3805 if (likely(mpi_reply)) { 3779 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 3780 - "sc_complete:handle(0x%04x), (open) " 3781 - "smid(%d), ioc_status(0x%04x), loginfo(0x%08x)\n", 3782 - ioc->name, le16_to_cpu(mpi_reply->DevHandle), smid, 3783 - le16_to_cpu(mpi_reply->IOCStatus), 3784 - le32_to_cpu(mpi_reply->IOCLogInfo))); 3806 + dewtprintk(ioc, 3807 + ioc_info(ioc, "sc_complete:handle(0x%04x), (open) smid(%d), ioc_status(0x%04x), loginfo(0x%08x)\n", 3808 + le16_to_cpu(mpi_reply->DevHandle), smid, 3809 + le16_to_cpu(mpi_reply->IOCStatus), 3810 + le32_to_cpu(mpi_reply->IOCLogInfo))); 3785 3811 if (le16_to_cpu(mpi_reply->IOCStatus) == 3786 3812 MPI2_IOCSTATUS_SUCCESS) { 3787 3813 clear_bit(le16_to_cpu(mpi_reply->DevHandle), 3788 3814 ioc->device_remove_in_progress); 3789 3815 } 3790 3816 } else { 3791 - pr_err(MPT3SAS_FMT "mpi_reply not valid at %s:%d/%s()!\n", 3792 - ioc->name, __FILE__, __LINE__, __func__); 3817 + ioc_err(ioc, "mpi_reply not valid at %s:%d/%s()!\n", 3818 + __FILE__, __LINE__, __func__); 3793 3819 } 3794 3820 return mpt3sas_check_for_pending_internal_cmds(ioc, smid); 3795 3821 } ··· 3825 3853 INIT_LIST_HEAD(&delayed_tr->list); 3826 3854 delayed_tr->handle = handle; 3827 3855 list_add_tail(&delayed_tr->list, &ioc->delayed_tr_volume_list); 3828 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 3829 - "DELAYED:tr:handle(0x%04x), (open)\n", 3830 - ioc->name, handle)); 3856 + dewtprintk(ioc, 3857 + ioc_info(ioc, "DELAYED:tr:handle(0x%04x), (open)\n", 3858 + handle)); 3831 3859 return; 3832 3860 } 3833 3861 3834 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 3835 - "tr_send:handle(0x%04x), (open), smid(%d), cb(%d)\n", 3836 - ioc->name, handle, smid, 3837 - ioc->tm_tr_volume_cb_idx)); 3862 + dewtprintk(ioc, 3863 + ioc_info(ioc, "tr_send:handle(0x%04x), (open), smid(%d), cb(%d)\n", 3864 + handle, smid, ioc->tm_tr_volume_cb_idx)); 3838 3865 mpi_request = mpt3sas_base_get_msg_frame(ioc, smid); 3839 3866 memset(mpi_request, 0, sizeof(Mpi2SCSITaskManagementRequest_t)); 3840 3867 mpi_request->Function = MPI2_FUNCTION_SCSI_TASK_MGMT; ··· 3869 3898 return 1; 3870 3899 } 3871 3900 if (unlikely(!mpi_reply)) { 3872 - pr_err(MPT3SAS_FMT "mpi_reply not valid at %s:%d/%s()!\n", 3873 - ioc->name, __FILE__, __LINE__, __func__); 3901 + ioc_err(ioc, "mpi_reply not valid at %s:%d/%s()!\n", 3902 + __FILE__, __LINE__, __func__); 3874 3903 return 1; 3875 3904 } 3876 3905 3877 3906 mpi_request_tm = mpt3sas_base_get_msg_frame(ioc, smid); 3878 3907 handle = le16_to_cpu(mpi_request_tm->DevHandle); 3879 3908 if (handle != le16_to_cpu(mpi_reply->DevHandle)) { 3880 - dewtprintk(ioc, pr_err(MPT3SAS_FMT 3881 - "spurious interrupt: handle(0x%04x:0x%04x), smid(%d)!!!\n", 3882 - ioc->name, handle, 3883 - le16_to_cpu(mpi_reply->DevHandle), smid)); 3909 + dewtprintk(ioc, 3910 + ioc_err(ioc, "spurious interrupt: handle(0x%04x:0x%04x), smid(%d)!!!\n", 3911 + handle, le16_to_cpu(mpi_reply->DevHandle), 3912 + smid)); 3884 3913 return 0; 3885 3914 } 3886 3915 3887 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 3888 - "tr_complete:handle(0x%04x), (open) smid(%d), ioc_status(0x%04x), " 3889 - "loginfo(0x%08x), completed(%d)\n", ioc->name, 3890 - handle, smid, le16_to_cpu(mpi_reply->IOCStatus), 3891 - le32_to_cpu(mpi_reply->IOCLogInfo), 3892 - le32_to_cpu(mpi_reply->TerminationCount))); 3916 + dewtprintk(ioc, 3917 + ioc_info(ioc, "tr_complete:handle(0x%04x), (open) smid(%d), ioc_status(0x%04x), loginfo(0x%08x), completed(%d)\n", 3918 + handle, smid, le16_to_cpu(mpi_reply->IOCStatus), 3919 + le32_to_cpu(mpi_reply->IOCLogInfo), 3920 + le32_to_cpu(mpi_reply->TerminationCount))); 3893 3921 3894 3922 return _scsih_check_for_pending_tm(ioc, smid); 3895 3923 } ··· 3918 3948 ioc->internal_lookup[i].cb_idx = ioc->base_cb_idx; 3919 3949 spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); 3920 3950 3921 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 3922 - "EVENT ACK: event(0x%04x), smid(%d), cb(%d)\n", 3923 - ioc->name, le16_to_cpu(event), smid, 3924 - ioc->base_cb_idx)); 3951 + dewtprintk(ioc, 3952 + ioc_info(ioc, "EVENT ACK: event(0x%04x), smid(%d), cb(%d)\n", 3953 + le16_to_cpu(event), smid, ioc->base_cb_idx)); 3925 3954 ack_request = mpt3sas_base_get_msg_frame(ioc, smid); 3926 3955 memset(ack_request, 0, sizeof(Mpi2EventAckRequest_t)); 3927 3956 ack_request->Function = MPI2_FUNCTION_EVENT_ACK; ··· 3976 4007 ioc->internal_lookup[i].cb_idx = ioc->tm_sas_control_cb_idx; 3977 4008 spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); 3978 4009 3979 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 3980 - "sc_send:handle(0x%04x), (open), smid(%d), cb(%d)\n", 3981 - ioc->name, handle, smid, 3982 - ioc->tm_sas_control_cb_idx)); 4010 + dewtprintk(ioc, 4011 + ioc_info(ioc, "sc_send:handle(0x%04x), (open), smid(%d), cb(%d)\n", 4012 + handle, smid, ioc->tm_sas_control_cb_idx)); 3983 4013 mpi_request = mpt3sas_base_get_msg_frame(ioc, smid); 3984 4014 memset(mpi_request, 0, sizeof(Mpi2SasIoUnitControlRequest_t)); 3985 4015 mpi_request->Function = MPI2_FUNCTION_SAS_IO_UNIT_CONTROL; ··· 4139 4171 MPI2_EVENT_SAS_TOPO_ES_RESPONDING) { 4140 4172 if (le16_to_cpu(local_event_data->ExpanderDevHandle) == 4141 4173 expander_handle) { 4142 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 4143 - "setting ignoring flag\n", ioc->name)); 4174 + dewtprintk(ioc, 4175 + ioc_info(ioc, "setting ignoring flag\n")); 4144 4176 fw_event->ignore = 1; 4145 4177 } 4146 4178 } ··· 4211 4243 MPI2_EVENT_SAS_TOPO_ES_RESPONDING) { 4212 4244 if (le16_to_cpu(local_event_data->SwitchDevHandle) == 4213 4245 switch_handle) { 4214 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 4215 - "setting ignoring flag for switch event\n", 4216 - ioc->name)); 4246 + dewtprintk(ioc, 4247 + ioc_info(ioc, "setting ignoring flag for switch event\n")); 4217 4248 fw_event->ignore = 1; 4218 4249 } 4219 4250 } ··· 4241 4274 sas_target_priv_data = 4242 4275 raid_device->starget->hostdata; 4243 4276 sas_target_priv_data->deleted = 1; 4244 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 4245 - "setting delete flag: handle(0x%04x), " 4246 - "wwid(0x%016llx)\n", ioc->name, handle, 4247 - (unsigned long long) raid_device->wwid)); 4277 + dewtprintk(ioc, 4278 + ioc_info(ioc, "setting delete flag: handle(0x%04x), wwid(0x%016llx)\n", 4279 + handle, (u64)raid_device->wwid)); 4248 4280 } 4249 4281 spin_unlock_irqrestore(&ioc->raid_device_lock, flags); 4250 4282 } ··· 4345 4379 INIT_LIST_HEAD(&delayed_tr->list); 4346 4380 delayed_tr->handle = handle; 4347 4381 list_add_tail(&delayed_tr->list, &ioc->delayed_tr_list); 4348 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 4349 - "DELAYED:tr:handle(0x%04x), (open)\n", ioc->name, 4350 - handle)); 4382 + dewtprintk(ioc, 4383 + ioc_info(ioc, "DELAYED:tr:handle(0x%04x), (open)\n", 4384 + handle)); 4351 4385 } else 4352 4386 _scsih_tm_tr_send(ioc, handle); 4353 4387 } ··· 4390 4424 Mpi2EventDataTemperature_t *event_data) 4391 4425 { 4392 4426 if (ioc->temp_sensors_count >= event_data->SensorNum) { 4393 - pr_err(MPT3SAS_FMT "Temperature Threshold flags %s%s%s%s" 4394 - " exceeded for Sensor: %d !!!\n", ioc->name, 4395 - ((le16_to_cpu(event_data->Status) & 0x1) == 1) ? "0 " : " ", 4396 - ((le16_to_cpu(event_data->Status) & 0x2) == 2) ? "1 " : " ", 4397 - ((le16_to_cpu(event_data->Status) & 0x4) == 4) ? "2 " : " ", 4398 - ((le16_to_cpu(event_data->Status) & 0x8) == 8) ? "3 " : " ", 4399 - event_data->SensorNum); 4400 - pr_err(MPT3SAS_FMT "Current Temp In Celsius: %d\n", 4401 - ioc->name, event_data->CurrentTemperature); 4427 + ioc_err(ioc, "Temperature Threshold flags %s%s%s%s exceeded for Sensor: %d !!!\n", 4428 + le16_to_cpu(event_data->Status) & 0x1 ? "0 " : " ", 4429 + le16_to_cpu(event_data->Status) & 0x2 ? "1 " : " ", 4430 + le16_to_cpu(event_data->Status) & 0x4 ? "2 " : " ", 4431 + le16_to_cpu(event_data->Status) & 0x8 ? "3 " : " ", 4432 + event_data->SensorNum); 4433 + ioc_err(ioc, "Current Temp In Celsius: %d\n", 4434 + event_data->CurrentTemperature); 4402 4435 } 4403 4436 } 4404 4437 ··· 4445 4480 scmd->result = DID_RESET << 16; 4446 4481 scmd->scsi_done(scmd); 4447 4482 } 4448 - dtmprintk(ioc, pr_info(MPT3SAS_FMT "completing %d cmds\n", 4449 - ioc->name, count)); 4483 + dtmprintk(ioc, ioc_info(ioc, "completing %d cmds\n", count)); 4450 4484 } 4451 4485 4452 4486 /** ··· 4644 4680 4645 4681 smid = mpt3sas_base_get_smid_scsiio(ioc, ioc->scsi_io_cb_idx, scmd); 4646 4682 if (!smid) { 4647 - pr_err(MPT3SAS_FMT "%s: failed obtaining a smid\n", 4648 - ioc->name, __func__); 4683 + ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); 4649 4684 _scsih_set_satl_pending(scmd, false); 4650 4685 goto out; 4651 4686 } ··· 4882 4919 scsi_print_command(scmd); 4883 4920 4884 4921 if (priv_target->flags & MPT_TARGET_FLAGS_VOLUME) { 4885 - pr_warn(MPT3SAS_FMT "\t%s wwid(0x%016llx)\n", ioc->name, 4886 - device_str, (unsigned long long)priv_target->sas_address); 4922 + ioc_warn(ioc, "\t%s wwid(0x%016llx)\n", 4923 + device_str, (u64)priv_target->sas_address); 4887 4924 } else if (priv_target->flags & MPT_TARGET_FLAGS_PCIE_DEVICE) { 4888 4925 pcie_device = mpt3sas_get_pdev_from_target(ioc, priv_target); 4889 4926 if (pcie_device) { 4890 - pr_info(MPT3SAS_FMT "\twwid(0x%016llx), port(%d)\n", 4891 - ioc->name, 4892 - (unsigned long long)pcie_device->wwid, 4893 - pcie_device->port_num); 4927 + ioc_info(ioc, "\twwid(0x%016llx), port(%d)\n", 4928 + (u64)pcie_device->wwid, pcie_device->port_num); 4894 4929 if (pcie_device->enclosure_handle != 0) 4895 - pr_info(MPT3SAS_FMT 4896 - "\tenclosure logical id(0x%016llx), " 4897 - "slot(%d)\n", ioc->name, 4898 - (unsigned long long) 4899 - pcie_device->enclosure_logical_id, 4900 - pcie_device->slot); 4930 + ioc_info(ioc, "\tenclosure logical id(0x%016llx), slot(%d)\n", 4931 + (u64)pcie_device->enclosure_logical_id, 4932 + pcie_device->slot); 4901 4933 if (pcie_device->connector_name[0]) 4902 - pr_info(MPT3SAS_FMT 4903 - "\tenclosure level(0x%04x)," 4904 - "connector name( %s)\n", 4905 - ioc->name, pcie_device->enclosure_level, 4906 - pcie_device->connector_name); 4934 + ioc_info(ioc, "\tenclosure level(0x%04x), connector name( %s)\n", 4935 + pcie_device->enclosure_level, 4936 + pcie_device->connector_name); 4907 4937 pcie_device_put(pcie_device); 4908 4938 } 4909 4939 } else { 4910 4940 sas_device = mpt3sas_get_sdev_from_target(ioc, priv_target); 4911 4941 if (sas_device) { 4912 - pr_warn(MPT3SAS_FMT 4913 - "\tsas_address(0x%016llx), phy(%d)\n", 4914 - ioc->name, (unsigned long long) 4915 - sas_device->sas_address, sas_device->phy); 4942 + ioc_warn(ioc, "\tsas_address(0x%016llx), phy(%d)\n", 4943 + (u64)sas_device->sas_address, sas_device->phy); 4916 4944 4917 4945 _scsih_display_enclosure_chassis_info(ioc, sas_device, 4918 4946 NULL, NULL); ··· 4912 4958 } 4913 4959 } 4914 4960 4915 - pr_warn(MPT3SAS_FMT 4916 - "\thandle(0x%04x), ioc_status(%s)(0x%04x), smid(%d)\n", 4917 - ioc->name, le16_to_cpu(mpi_reply->DevHandle), 4918 - desc_ioc_state, ioc_status, smid); 4919 - pr_warn(MPT3SAS_FMT 4920 - "\trequest_len(%d), underflow(%d), resid(%d)\n", 4921 - ioc->name, scsi_bufflen(scmd), scmd->underflow, 4922 - scsi_get_resid(scmd)); 4923 - pr_warn(MPT3SAS_FMT 4924 - "\ttag(%d), transfer_count(%d), sc->result(0x%08x)\n", 4925 - ioc->name, le16_to_cpu(mpi_reply->TaskTag), 4926 - le32_to_cpu(mpi_reply->TransferCount), scmd->result); 4927 - pr_warn(MPT3SAS_FMT 4928 - "\tscsi_status(%s)(0x%02x), scsi_state(%s)(0x%02x)\n", 4929 - ioc->name, desc_scsi_status, 4930 - scsi_status, desc_scsi_state, scsi_state); 4961 + ioc_warn(ioc, "\thandle(0x%04x), ioc_status(%s)(0x%04x), smid(%d)\n", 4962 + le16_to_cpu(mpi_reply->DevHandle), 4963 + desc_ioc_state, ioc_status, smid); 4964 + ioc_warn(ioc, "\trequest_len(%d), underflow(%d), resid(%d)\n", 4965 + scsi_bufflen(scmd), scmd->underflow, scsi_get_resid(scmd)); 4966 + ioc_warn(ioc, "\ttag(%d), transfer_count(%d), sc->result(0x%08x)\n", 4967 + le16_to_cpu(mpi_reply->TaskTag), 4968 + le32_to_cpu(mpi_reply->TransferCount), scmd->result); 4969 + ioc_warn(ioc, "\tscsi_status(%s)(0x%02x), scsi_state(%s)(0x%02x)\n", 4970 + desc_scsi_status, scsi_status, desc_scsi_state, scsi_state); 4931 4971 4932 4972 if (scsi_state & MPI2_SCSI_STATE_AUTOSENSE_VALID) { 4933 4973 struct sense_info data; 4934 4974 _scsih_normalize_sense(scmd->sense_buffer, &data); 4935 - pr_warn(MPT3SAS_FMT 4936 - "\t[sense_key,asc,ascq]: [0x%02x,0x%02x,0x%02x], count(%d)\n", 4937 - ioc->name, data.skey, 4938 - data.asc, data.ascq, le32_to_cpu(mpi_reply->SenseCount)); 4975 + ioc_warn(ioc, "\t[sense_key,asc,ascq]: [0x%02x,0x%02x,0x%02x], count(%d)\n", 4976 + data.skey, data.asc, data.ascq, 4977 + le32_to_cpu(mpi_reply->SenseCount)); 4939 4978 } 4940 4979 if (scsi_state & MPI2_SCSI_STATE_RESPONSE_INFO_VALID) { 4941 4980 response_info = le32_to_cpu(mpi_reply->ResponseInfo); ··· 4963 5016 mpi_request.Flags = MPI2_SEP_REQ_FLAGS_DEVHANDLE_ADDRESS; 4964 5017 if ((mpt3sas_base_scsi_enclosure_processor(ioc, &mpi_reply, 4965 5018 &mpi_request)) != 0) { 4966 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", ioc->name, 4967 - __FILE__, __LINE__, __func__); 5019 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 5020 + __FILE__, __LINE__, __func__); 4968 5021 goto out; 4969 5022 } 4970 5023 sas_device->pfa_led_on = 1; 4971 5024 4972 5025 if (mpi_reply.IOCStatus || mpi_reply.IOCLogInfo) { 4973 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 4974 - "enclosure_processor: ioc_status (0x%04x), loginfo(0x%08x)\n", 4975 - ioc->name, le16_to_cpu(mpi_reply.IOCStatus), 4976 - le32_to_cpu(mpi_reply.IOCLogInfo))); 5026 + dewtprintk(ioc, 5027 + ioc_info(ioc, "enclosure_processor: ioc_status (0x%04x), loginfo(0x%08x)\n", 5028 + le16_to_cpu(mpi_reply.IOCStatus), 5029 + le32_to_cpu(mpi_reply.IOCLogInfo))); 4977 5030 goto out; 4978 5031 } 4979 5032 out: ··· 5080 5133 sizeof(Mpi2EventDataSasDeviceStatusChange_t); 5081 5134 event_reply = kzalloc(sz, GFP_KERNEL); 5082 5135 if (!event_reply) { 5083 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 5084 - ioc->name, __FILE__, __LINE__, __func__); 5136 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 5137 + __FILE__, __LINE__, __func__); 5085 5138 goto out; 5086 5139 } 5087 5140 ··· 5371 5424 u16 attached_handle; 5372 5425 u8 link_rate; 5373 5426 5374 - dtmprintk(ioc, pr_info(MPT3SAS_FMT 5375 - "updating handles for sas_host(0x%016llx)\n", 5376 - ioc->name, (unsigned long long)ioc->sas_hba.sas_address)); 5427 + dtmprintk(ioc, 5428 + ioc_info(ioc, "updating handles for sas_host(0x%016llx)\n", 5429 + (u64)ioc->sas_hba.sas_address)); 5377 5430 5378 5431 sz = offsetof(Mpi2SasIOUnitPage0_t, PhyData) + (ioc->sas_hba.num_phys 5379 5432 * sizeof(Mpi2SasIOUnit0PhyData_t)); 5380 5433 sas_iounit_pg0 = kzalloc(sz, GFP_KERNEL); 5381 5434 if (!sas_iounit_pg0) { 5382 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 5383 - ioc->name, __FILE__, __LINE__, __func__); 5435 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 5436 + __FILE__, __LINE__, __func__); 5384 5437 return; 5385 5438 } 5386 5439 ··· 5430 5483 5431 5484 mpt3sas_config_get_number_hba_phys(ioc, &num_phys); 5432 5485 if (!num_phys) { 5433 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 5434 - ioc->name, __FILE__, __LINE__, __func__); 5486 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 5487 + __FILE__, __LINE__, __func__); 5435 5488 return; 5436 5489 } 5437 5490 ioc->sas_hba.phy = kcalloc(num_phys, 5438 5491 sizeof(struct _sas_phy), GFP_KERNEL); 5439 5492 if (!ioc->sas_hba.phy) { 5440 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 5441 - ioc->name, __FILE__, __LINE__, __func__); 5493 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 5494 + __FILE__, __LINE__, __func__); 5442 5495 goto out; 5443 5496 } 5444 5497 ioc->sas_hba.num_phys = num_phys; ··· 5448 5501 sizeof(Mpi2SasIOUnit0PhyData_t)); 5449 5502 sas_iounit_pg0 = kzalloc(sz, GFP_KERNEL); 5450 5503 if (!sas_iounit_pg0) { 5451 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 5452 - ioc->name, __FILE__, __LINE__, __func__); 5504 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 5505 + __FILE__, __LINE__, __func__); 5453 5506 return; 5454 5507 } 5455 5508 if ((mpt3sas_config_get_sas_iounit_pg0(ioc, &mpi_reply, 5456 5509 sas_iounit_pg0, sz))) { 5457 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 5458 - ioc->name, __FILE__, __LINE__, __func__); 5510 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 5511 + __FILE__, __LINE__, __func__); 5459 5512 goto out; 5460 5513 } 5461 5514 ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & 5462 5515 MPI2_IOCSTATUS_MASK; 5463 5516 if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { 5464 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 5465 - ioc->name, __FILE__, __LINE__, __func__); 5517 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 5518 + __FILE__, __LINE__, __func__); 5466 5519 goto out; 5467 5520 } 5468 5521 ··· 5471 5524 sizeof(Mpi2SasIOUnit1PhyData_t)); 5472 5525 sas_iounit_pg1 = kzalloc(sz, GFP_KERNEL); 5473 5526 if (!sas_iounit_pg1) { 5474 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 5475 - ioc->name, __FILE__, __LINE__, __func__); 5527 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 5528 + __FILE__, __LINE__, __func__); 5476 5529 goto out; 5477 5530 } 5478 5531 if ((mpt3sas_config_get_sas_iounit_pg1(ioc, &mpi_reply, 5479 5532 sas_iounit_pg1, sz))) { 5480 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 5481 - ioc->name, __FILE__, __LINE__, __func__); 5533 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 5534 + __FILE__, __LINE__, __func__); 5482 5535 goto out; 5483 5536 } 5484 5537 ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & 5485 5538 MPI2_IOCSTATUS_MASK; 5486 5539 if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { 5487 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 5488 - ioc->name, __FILE__, __LINE__, __func__); 5540 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 5541 + __FILE__, __LINE__, __func__); 5489 5542 goto out; 5490 5543 } 5491 5544 ··· 5504 5557 for (i = 0; i < ioc->sas_hba.num_phys ; i++) { 5505 5558 if ((mpt3sas_config_get_phy_pg0(ioc, &mpi_reply, &phy_pg0, 5506 5559 i))) { 5507 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 5508 - ioc->name, __FILE__, __LINE__, __func__); 5560 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 5561 + __FILE__, __LINE__, __func__); 5509 5562 goto out; 5510 5563 } 5511 5564 ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & 5512 5565 MPI2_IOCSTATUS_MASK; 5513 5566 if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { 5514 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 5515 - ioc->name, __FILE__, __LINE__, __func__); 5567 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 5568 + __FILE__, __LINE__, __func__); 5516 5569 goto out; 5517 5570 } 5518 5571 ··· 5526 5579 } 5527 5580 if ((mpt3sas_config_get_sas_device_pg0(ioc, &mpi_reply, &sas_device_pg0, 5528 5581 MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, ioc->sas_hba.handle))) { 5529 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 5530 - ioc->name, __FILE__, __LINE__, __func__); 5582 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 5583 + __FILE__, __LINE__, __func__); 5531 5584 goto out; 5532 5585 } 5533 5586 ioc->sas_hba.enclosure_handle = 5534 5587 le16_to_cpu(sas_device_pg0.EnclosureHandle); 5535 5588 ioc->sas_hba.sas_address = le64_to_cpu(sas_device_pg0.SASAddress); 5536 - pr_info(MPT3SAS_FMT 5537 - "host_add: handle(0x%04x), sas_addr(0x%016llx), phys(%d)\n", 5538 - ioc->name, ioc->sas_hba.handle, 5539 - (unsigned long long) ioc->sas_hba.sas_address, 5540 - ioc->sas_hba.num_phys) ; 5589 + ioc_info(ioc, "host_add: handle(0x%04x), sas_addr(0x%016llx), phys(%d)\n", 5590 + ioc->sas_hba.handle, 5591 + (u64)ioc->sas_hba.sas_address, 5592 + ioc->sas_hba.num_phys); 5541 5593 5542 5594 if (ioc->sas_hba.enclosure_handle) { 5543 5595 if (!(mpt3sas_config_get_enclosure_pg0(ioc, &mpi_reply, ··· 5585 5639 5586 5640 if ((mpt3sas_config_get_expander_pg0(ioc, &mpi_reply, &expander_pg0, 5587 5641 MPI2_SAS_EXPAND_PGAD_FORM_HNDL, handle))) { 5588 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 5589 - ioc->name, __FILE__, __LINE__, __func__); 5642 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 5643 + __FILE__, __LINE__, __func__); 5590 5644 return -1; 5591 5645 } 5592 5646 5593 5647 ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & 5594 5648 MPI2_IOCSTATUS_MASK; 5595 5649 if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { 5596 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 5597 - ioc->name, __FILE__, __LINE__, __func__); 5650 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 5651 + __FILE__, __LINE__, __func__); 5598 5652 return -1; 5599 5653 } 5600 5654 ··· 5602 5656 parent_handle = le16_to_cpu(expander_pg0.ParentDevHandle); 5603 5657 if (_scsih_get_sas_address(ioc, parent_handle, &sas_address_parent) 5604 5658 != 0) { 5605 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 5606 - ioc->name, __FILE__, __LINE__, __func__); 5659 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 5660 + __FILE__, __LINE__, __func__); 5607 5661 return -1; 5608 5662 } 5609 5663 if (sas_address_parent != ioc->sas_hba.sas_address) { ··· 5630 5684 sas_expander = kzalloc(sizeof(struct _sas_node), 5631 5685 GFP_KERNEL); 5632 5686 if (!sas_expander) { 5633 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 5634 - ioc->name, __FILE__, __LINE__, __func__); 5687 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 5688 + __FILE__, __LINE__, __func__); 5635 5689 return -1; 5636 5690 } 5637 5691 ··· 5640 5694 sas_expander->sas_address_parent = sas_address_parent; 5641 5695 sas_expander->sas_address = sas_address; 5642 5696 5643 - pr_info(MPT3SAS_FMT "expander_add: handle(0x%04x)," \ 5644 - " parent(0x%04x), sas_addr(0x%016llx), phys(%d)\n", ioc->name, 5645 - handle, parent_handle, (unsigned long long) 5646 - sas_expander->sas_address, sas_expander->num_phys); 5697 + ioc_info(ioc, "expander_add: handle(0x%04x), parent(0x%04x), sas_addr(0x%016llx), phys(%d)\n", 5698 + handle, parent_handle, 5699 + (u64)sas_expander->sas_address, sas_expander->num_phys); 5647 5700 5648 5701 if (!sas_expander->num_phys) 5649 5702 goto out_fail; 5650 5703 sas_expander->phy = kcalloc(sas_expander->num_phys, 5651 5704 sizeof(struct _sas_phy), GFP_KERNEL); 5652 5705 if (!sas_expander->phy) { 5653 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 5654 - ioc->name, __FILE__, __LINE__, __func__); 5706 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 5707 + __FILE__, __LINE__, __func__); 5655 5708 rc = -1; 5656 5709 goto out_fail; 5657 5710 } ··· 5659 5714 mpt3sas_port = mpt3sas_transport_port_add(ioc, handle, 5660 5715 sas_address_parent); 5661 5716 if (!mpt3sas_port) { 5662 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 5663 - ioc->name, __FILE__, __LINE__, __func__); 5717 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 5718 + __FILE__, __LINE__, __func__); 5664 5719 rc = -1; 5665 5720 goto out_fail; 5666 5721 } ··· 5669 5724 for (i = 0 ; i < sas_expander->num_phys ; i++) { 5670 5725 if ((mpt3sas_config_get_expander_pg1(ioc, &mpi_reply, 5671 5726 &expander_pg1, i, handle))) { 5672 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 5673 - ioc->name, __FILE__, __LINE__, __func__); 5727 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 5728 + __FILE__, __LINE__, __func__); 5674 5729 rc = -1; 5675 5730 goto out_fail; 5676 5731 } ··· 5680 5735 if ((mpt3sas_transport_add_expander_phy(ioc, 5681 5736 &sas_expander->phy[i], expander_pg1, 5682 5737 sas_expander->parent_dev))) { 5683 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 5684 - ioc->name, __FILE__, __LINE__, __func__); 5738 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 5739 + __FILE__, __LINE__, __func__); 5685 5740 rc = -1; 5686 5741 goto out_fail; 5687 5742 } ··· 5828 5883 if (!rc) 5829 5884 return 0; 5830 5885 5831 - pr_err(MPT3SAS_FMT 5832 - "discovery errors(%s): sas_address(0x%016llx), handle(0x%04x)\n", 5833 - ioc->name, desc, (unsigned long long)sas_address, handle); 5886 + ioc_err(ioc, "discovery errors(%s): sas_address(0x%016llx), handle(0x%04x)\n", 5887 + desc, (u64)sas_address, handle); 5834 5888 return rc; 5835 5889 } 5836 5890 ··· 5923 5979 /* check if device is present */ 5924 5980 if (!(le16_to_cpu(sas_device_pg0.Flags) & 5925 5981 MPI2_SAS_DEVICE0_FLAGS_DEVICE_PRESENT)) { 5926 - pr_err(MPT3SAS_FMT 5927 - "device is not present handle(0x%04x), flags!!!\n", 5928 - ioc->name, handle); 5982 + ioc_err(ioc, "device is not present handle(0x%04x), flags!!!\n", 5983 + handle); 5929 5984 goto out_unlock; 5930 5985 } 5931 5986 ··· 5971 6028 5972 6029 if ((mpt3sas_config_get_sas_device_pg0(ioc, &mpi_reply, &sas_device_pg0, 5973 6030 MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, handle))) { 5974 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 5975 - ioc->name, __FILE__, __LINE__, __func__); 6031 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 6032 + __FILE__, __LINE__, __func__); 5976 6033 return -1; 5977 6034 } 5978 6035 5979 6036 ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & 5980 6037 MPI2_IOCSTATUS_MASK; 5981 6038 if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { 5982 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 5983 - ioc->name, __FILE__, __LINE__, __func__); 6039 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 6040 + __FILE__, __LINE__, __func__); 5984 6041 return -1; 5985 6042 } 5986 6043 ··· 5994 6051 /* check if device is present */ 5995 6052 if (!(le16_to_cpu(sas_device_pg0.Flags) & 5996 6053 MPI2_SAS_DEVICE0_FLAGS_DEVICE_PRESENT)) { 5997 - pr_err(MPT3SAS_FMT "device is not present handle(0x04%x)!!!\n", 5998 - ioc->name, handle); 6054 + ioc_err(ioc, "device is not present handle(0x04%x)!!!\n", 6055 + handle); 5999 6056 return -1; 6000 6057 } 6001 6058 ··· 6017 6074 mpt3sas_scsih_enclosure_find_by_handle(ioc, 6018 6075 le16_to_cpu(sas_device_pg0.EnclosureHandle)); 6019 6076 if (enclosure_dev == NULL) 6020 - pr_info(MPT3SAS_FMT "Enclosure handle(0x%04x)" 6021 - "doesn't match with enclosure device!\n", 6022 - ioc->name, sas_device_pg0.EnclosureHandle); 6077 + ioc_info(ioc, "Enclosure handle(0x%04x) doesn't match with enclosure device!\n", 6078 + sas_device_pg0.EnclosureHandle); 6023 6079 } 6024 6080 6025 6081 sas_device = kzalloc(sizeof(struct _sas_device), 6026 6082 GFP_KERNEL); 6027 6083 if (!sas_device) { 6028 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 6029 - ioc->name, __FILE__, __LINE__, __func__); 6084 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 6085 + __FILE__, __LINE__, __func__); 6030 6086 return 0; 6031 6087 } 6032 6088 ··· 6034 6092 if (_scsih_get_sas_address(ioc, 6035 6093 le16_to_cpu(sas_device_pg0.ParentDevHandle), 6036 6094 &sas_device->sas_address_parent) != 0) 6037 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 6038 - ioc->name, __FILE__, __LINE__, __func__); 6095 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 6096 + __FILE__, __LINE__, __func__); 6039 6097 sas_device->enclosure_handle = 6040 6098 le16_to_cpu(sas_device_pg0.EnclosureHandle); 6041 6099 if (sas_device->enclosure_handle != 0) ··· 6100 6158 sas_device->pfa_led_on = 0; 6101 6159 } 6102 6160 6103 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 6104 - "%s: enter: handle(0x%04x), sas_addr(0x%016llx)\n", 6105 - ioc->name, __func__, 6106 - sas_device->handle, (unsigned long long) 6107 - sas_device->sas_address)); 6161 + dewtprintk(ioc, 6162 + ioc_info(ioc, "%s: enter: handle(0x%04x), sas_addr(0x%016llx)\n", 6163 + __func__, 6164 + sas_device->handle, (u64)sas_device->sas_address)); 6108 6165 6109 6166 dewtprintk(ioc, _scsih_display_enclosure_chassis_info(ioc, sas_device, 6110 6167 NULL, NULL)); ··· 6121 6180 sas_device->sas_address, 6122 6181 sas_device->sas_address_parent); 6123 6182 6124 - pr_info(MPT3SAS_FMT 6125 - "removing handle(0x%04x), sas_addr(0x%016llx)\n", 6126 - ioc->name, sas_device->handle, 6127 - (unsigned long long) sas_device->sas_address); 6183 + ioc_info(ioc, "removing handle(0x%04x), sas_addr(0x%016llx)\n", 6184 + sas_device->handle, (u64)sas_device->sas_address); 6128 6185 6129 6186 _scsih_display_enclosure_chassis_info(ioc, sas_device, NULL, NULL); 6130 6187 6131 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 6132 - "%s: exit: handle(0x%04x), sas_addr(0x%016llx)\n", 6133 - ioc->name, __func__, 6134 - sas_device->handle, (unsigned long long) 6135 - sas_device->sas_address)); 6188 + dewtprintk(ioc, 6189 + ioc_info(ioc, "%s: exit: handle(0x%04x), sas_addr(0x%016llx)\n", 6190 + __func__, 6191 + sas_device->handle, (u64)sas_device->sas_address)); 6136 6192 dewtprintk(ioc, _scsih_display_enclosure_chassis_info(ioc, sas_device, 6137 6193 NULL, NULL)); 6138 6194 } ··· 6169 6231 status_str = "unknown status"; 6170 6232 break; 6171 6233 } 6172 - pr_info(MPT3SAS_FMT "sas topology change: (%s)\n", 6173 - ioc->name, status_str); 6234 + ioc_info(ioc, "sas topology change: (%s)\n", status_str); 6174 6235 pr_info("\thandle(0x%04x), enclosure_handle(0x%04x) " \ 6175 6236 "start_phy(%02d), count(%d)\n", 6176 6237 le16_to_cpu(event_data->ExpanderDevHandle), ··· 6246 6309 _scsih_sas_host_refresh(ioc); 6247 6310 6248 6311 if (fw_event->ignore) { 6249 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 6250 - "ignoring expander event\n", ioc->name)); 6312 + dewtprintk(ioc, ioc_info(ioc, "ignoring expander event\n")); 6251 6313 return 0; 6252 6314 } 6253 6315 ··· 6275 6339 /* handle siblings events */ 6276 6340 for (i = 0; i < event_data->NumEntries; i++) { 6277 6341 if (fw_event->ignore) { 6278 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 6279 - "ignoring expander event\n", ioc->name)); 6342 + dewtprintk(ioc, 6343 + ioc_info(ioc, "ignoring expander event\n")); 6280 6344 return 0; 6281 6345 } 6282 6346 if (ioc->remove_host || ioc->pci_error_recovery) ··· 6400 6464 reason_str = "unknown reason"; 6401 6465 break; 6402 6466 } 6403 - pr_info(MPT3SAS_FMT "device status change: (%s)\n" 6404 - "\thandle(0x%04x), sas address(0x%016llx), tag(%d)", 6405 - ioc->name, reason_str, le16_to_cpu(event_data->DevHandle), 6406 - (unsigned long long)le64_to_cpu(event_data->SASAddress), 6407 - le16_to_cpu(event_data->TaskTag)); 6467 + ioc_info(ioc, "device status change: (%s)\thandle(0x%04x), sas address(0x%016llx), tag(%d)", 6468 + reason_str, le16_to_cpu(event_data->DevHandle), 6469 + (u64)le64_to_cpu(event_data->SASAddress), 6470 + le16_to_cpu(event_data->TaskTag)); 6408 6471 if (event_data->ReasonCode == MPI2_EVENT_SAS_DEV_STAT_RC_SMART_DATA) 6409 - pr_info(MPT3SAS_FMT ", ASC(0x%x), ASCQ(0x%x)\n", ioc->name, 6410 - event_data->ASC, event_data->ASCQ); 6411 - pr_info("\n"); 6472 + pr_cont(", ASC(0x%x), ASCQ(0x%x)\n", 6473 + event_data->ASC, event_data->ASCQ); 6474 + pr_cont("\n"); 6412 6475 } 6413 6476 6414 6477 /** ··· 6540 6605 desc = "nvme failure status"; 6541 6606 break; 6542 6607 default: 6543 - pr_err(MPT3SAS_FMT 6544 - " NVMe discovery error(0x%02x): wwid(0x%016llx)," 6545 - "handle(0x%04x)\n", ioc->name, access_status, 6546 - (unsigned long long)wwid, handle); 6608 + ioc_err(ioc, "NVMe discovery error(0x%02x): wwid(0x%016llx), handle(0x%04x)\n", 6609 + access_status, (u64)wwid, handle); 6547 6610 return rc; 6548 6611 } 6549 6612 6550 6613 if (!rc) 6551 6614 return rc; 6552 6615 6553 - pr_info(MPT3SAS_FMT 6554 - "NVMe discovery error(%s): wwid(0x%016llx), handle(0x%04x)\n", 6555 - ioc->name, desc, 6556 - (unsigned long long)wwid, handle); 6616 + ioc_info(ioc, "NVMe discovery error(%s): wwid(0x%016llx), handle(0x%04x)\n", 6617 + desc, (u64)wwid, handle); 6557 6618 return rc; 6558 6619 } 6559 6620 ··· 6565 6634 { 6566 6635 struct MPT3SAS_TARGET *sas_target_priv_data; 6567 6636 6568 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 6569 - "%s: enter: handle(0x%04x), wwid(0x%016llx)\n", ioc->name, __func__, 6570 - pcie_device->handle, (unsigned long long) 6571 - pcie_device->wwid)); 6637 + dewtprintk(ioc, 6638 + ioc_info(ioc, "%s: enter: handle(0x%04x), wwid(0x%016llx)\n", 6639 + __func__, 6640 + pcie_device->handle, (u64)pcie_device->wwid)); 6572 6641 if (pcie_device->enclosure_handle != 0) 6573 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 6574 - "%s: enter: enclosure logical id(0x%016llx), slot(%d)\n", 6575 - ioc->name, __func__, 6576 - (unsigned long long)pcie_device->enclosure_logical_id, 6577 - pcie_device->slot)); 6642 + dewtprintk(ioc, 6643 + ioc_info(ioc, "%s: enter: enclosure logical id(0x%016llx), slot(%d)\n", 6644 + __func__, 6645 + (u64)pcie_device->enclosure_logical_id, 6646 + pcie_device->slot)); 6578 6647 if (pcie_device->connector_name[0] != '\0') 6579 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 6580 - "%s: enter: enclosure level(0x%04x), connector name( %s)\n", 6581 - ioc->name, __func__, 6582 - pcie_device->enclosure_level, 6583 - pcie_device->connector_name)); 6648 + dewtprintk(ioc, 6649 + ioc_info(ioc, "%s: enter: enclosure level(0x%04x), connector name(%s)\n", 6650 + __func__, 6651 + pcie_device->enclosure_level, 6652 + pcie_device->connector_name)); 6584 6653 6585 6654 if (pcie_device->starget && pcie_device->starget->hostdata) { 6586 6655 sas_target_priv_data = pcie_device->starget->hostdata; ··· 6589 6658 sas_target_priv_data->handle = MPT3SAS_INVALID_DEVICE_HANDLE; 6590 6659 } 6591 6660 6592 - pr_info(MPT3SAS_FMT 6593 - "removing handle(0x%04x), wwid (0x%016llx)\n", 6594 - ioc->name, pcie_device->handle, 6595 - (unsigned long long) pcie_device->wwid); 6661 + ioc_info(ioc, "removing handle(0x%04x), wwid(0x%016llx)\n", 6662 + pcie_device->handle, (u64)pcie_device->wwid); 6596 6663 if (pcie_device->enclosure_handle != 0) 6597 - pr_info(MPT3SAS_FMT 6598 - "removing : enclosure logical id(0x%016llx), slot(%d)\n", 6599 - ioc->name, 6600 - (unsigned long long)pcie_device->enclosure_logical_id, 6601 - pcie_device->slot); 6664 + ioc_info(ioc, "removing : enclosure logical id(0x%016llx), slot(%d)\n", 6665 + (u64)pcie_device->enclosure_logical_id, 6666 + pcie_device->slot); 6602 6667 if (pcie_device->connector_name[0] != '\0') 6603 - pr_info(MPT3SAS_FMT 6604 - "removing: enclosure level(0x%04x), connector name( %s)\n", 6605 - ioc->name, pcie_device->enclosure_level, 6606 - pcie_device->connector_name); 6668 + ioc_info(ioc, "removing: enclosure level(0x%04x), connector name( %s)\n", 6669 + pcie_device->enclosure_level, 6670 + pcie_device->connector_name); 6607 6671 6608 6672 if (pcie_device->starget) 6609 6673 scsi_remove_target(&pcie_device->starget->dev); 6610 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 6611 - "%s: exit: handle(0x%04x), wwid(0x%016llx)\n", ioc->name, __func__, 6612 - pcie_device->handle, (unsigned long long) 6613 - pcie_device->wwid)); 6674 + dewtprintk(ioc, 6675 + ioc_info(ioc, "%s: exit: handle(0x%04x), wwid(0x%016llx)\n", 6676 + __func__, 6677 + pcie_device->handle, (u64)pcie_device->wwid)); 6614 6678 if (pcie_device->enclosure_handle != 0) 6615 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 6616 - "%s: exit: enclosure logical id(0x%016llx), slot(%d)\n", 6617 - ioc->name, __func__, 6618 - (unsigned long long)pcie_device->enclosure_logical_id, 6619 - pcie_device->slot)); 6679 + dewtprintk(ioc, 6680 + ioc_info(ioc, "%s: exit: enclosure logical id(0x%016llx), slot(%d)\n", 6681 + __func__, 6682 + (u64)pcie_device->enclosure_logical_id, 6683 + pcie_device->slot)); 6620 6684 if (pcie_device->connector_name[0] != '\0') 6621 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 6622 - "%s: exit: enclosure level(0x%04x), connector name( %s)\n", 6623 - ioc->name, __func__, pcie_device->enclosure_level, 6624 - pcie_device->connector_name)); 6685 + dewtprintk(ioc, 6686 + ioc_info(ioc, "%s: exit: enclosure level(0x%04x), connector name( %s)\n", 6687 + __func__, 6688 + pcie_device->enclosure_level, 6689 + pcie_device->connector_name)); 6625 6690 6626 6691 kfree(pcie_device->serial_number); 6627 6692 } ··· 6687 6760 /* check if device is present */ 6688 6761 if (!(le32_to_cpu(pcie_device_pg0.Flags) & 6689 6762 MPI26_PCIEDEV0_FLAGS_DEVICE_PRESENT)) { 6690 - pr_info(MPT3SAS_FMT 6691 - "device is not present handle(0x%04x), flags!!!\n", 6692 - ioc->name, handle); 6763 + ioc_info(ioc, "device is not present handle(0x%04x), flags!!!\n", 6764 + handle); 6693 6765 spin_unlock_irqrestore(&ioc->pcie_device_lock, flags); 6694 6766 pcie_device_put(pcie_device); 6695 6767 return; ··· 6732 6806 6733 6807 if ((mpt3sas_config_get_pcie_device_pg0(ioc, &mpi_reply, 6734 6808 &pcie_device_pg0, MPI26_PCIE_DEVICE_PGAD_FORM_HANDLE, handle))) { 6735 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 6736 - ioc->name, __FILE__, __LINE__, __func__); 6809 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 6810 + __FILE__, __LINE__, __func__); 6737 6811 return 0; 6738 6812 } 6739 6813 ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & 6740 6814 MPI2_IOCSTATUS_MASK; 6741 6815 if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { 6742 - pr_err(MPT3SAS_FMT 6743 - "failure at %s:%d/%s()!\n", 6744 - ioc->name, __FILE__, __LINE__, __func__); 6816 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 6817 + __FILE__, __LINE__, __func__); 6745 6818 return 0; 6746 6819 } 6747 6820 ··· 6750 6825 /* check if device is present */ 6751 6826 if (!(le32_to_cpu(pcie_device_pg0.Flags) & 6752 6827 MPI26_PCIEDEV0_FLAGS_DEVICE_PRESENT)) { 6753 - pr_err(MPT3SAS_FMT 6754 - "device is not present handle(0x04%x)!!!\n", 6755 - ioc->name, handle); 6828 + ioc_err(ioc, "device is not present handle(0x04%x)!!!\n", 6829 + handle); 6756 6830 return 0; 6757 6831 } 6758 6832 ··· 6772 6848 6773 6849 pcie_device = kzalloc(sizeof(struct _pcie_device), GFP_KERNEL); 6774 6850 if (!pcie_device) { 6775 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 6776 - ioc->name, __FILE__, __LINE__, __func__); 6851 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 6852 + __FILE__, __LINE__, __func__); 6777 6853 return 0; 6778 6854 } 6779 6855 ··· 6814 6890 /* TODO -- Add device name once FW supports it */ 6815 6891 if (mpt3sas_config_get_pcie_device_pg2(ioc, &mpi_reply, 6816 6892 &pcie_device_pg2, MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, handle)) { 6817 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 6818 - ioc->name, __FILE__, __LINE__, __func__); 6893 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 6894 + __FILE__, __LINE__, __func__); 6819 6895 kfree(pcie_device); 6820 6896 return 0; 6821 6897 } 6822 6898 6823 6899 ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & MPI2_IOCSTATUS_MASK; 6824 6900 if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { 6825 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 6826 - ioc->name, __FILE__, __LINE__, __func__); 6901 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 6902 + __FILE__, __LINE__, __func__); 6827 6903 kfree(pcie_device); 6828 6904 return 0; 6829 6905 } ··· 6880 6956 status_str = "unknown status"; 6881 6957 break; 6882 6958 } 6883 - pr_info(MPT3SAS_FMT "pcie topology change: (%s)\n", 6884 - ioc->name, status_str); 6959 + ioc_info(ioc, "pcie topology change: (%s)\n", status_str); 6885 6960 pr_info("\tswitch_handle(0x%04x), enclosure_handle(0x%04x)" 6886 6961 "start_port(%02d), count(%d)\n", 6887 6962 le16_to_cpu(event_data->SwitchDevHandle), ··· 6953 7030 return; 6954 7031 6955 7032 if (fw_event->ignore) { 6956 - dewtprintk(ioc, pr_info(MPT3SAS_FMT "ignoring switch event\n", 6957 - ioc->name)); 7033 + dewtprintk(ioc, ioc_info(ioc, "ignoring switch event\n")); 6958 7034 return; 6959 7035 } 6960 7036 6961 7037 /* handle siblings events */ 6962 7038 for (i = 0; i < event_data->NumEntries; i++) { 6963 7039 if (fw_event->ignore) { 6964 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 6965 - "ignoring switch event\n", ioc->name)); 7040 + dewtprintk(ioc, 7041 + ioc_info(ioc, "ignoring switch event\n")); 6966 7042 return; 6967 7043 } 6968 7044 if (ioc->remove_host || ioc->pci_error_recovery) ··· 7006 7084 if (!test_bit(handle, ioc->pend_os_device_add)) 7007 7085 break; 7008 7086 7009 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 7010 - "handle(0x%04x) device not found: convert " 7011 - "event to a device add\n", ioc->name, handle)); 7087 + dewtprintk(ioc, 7088 + ioc_info(ioc, "handle(0x%04x) device not found: convert event to a device add\n", 7089 + handle)); 7012 7090 event_data->PortEntry[i].PortStatus &= 0xF0; 7013 7091 event_data->PortEntry[i].PortStatus |= 7014 7092 MPI26_EVENT_PCIE_TOPO_PS_DEV_ADDED; ··· 7091 7169 break; 7092 7170 } 7093 7171 7094 - pr_info(MPT3SAS_FMT "PCIE device status change: (%s)\n" 7095 - "\thandle(0x%04x), WWID(0x%016llx), tag(%d)", 7096 - ioc->name, reason_str, le16_to_cpu(event_data->DevHandle), 7097 - (unsigned long long)le64_to_cpu(event_data->WWID), 7098 - le16_to_cpu(event_data->TaskTag)); 7172 + ioc_info(ioc, "PCIE device status change: (%s)\n" 7173 + "\thandle(0x%04x), WWID(0x%016llx), tag(%d)", 7174 + reason_str, le16_to_cpu(event_data->DevHandle), 7175 + (u64)le64_to_cpu(event_data->WWID), 7176 + le16_to_cpu(event_data->TaskTag)); 7099 7177 if (event_data->ReasonCode == MPI26_EVENT_PCIDEV_STAT_RC_SMART_DATA) 7100 - pr_info(MPT3SAS_FMT ", ASC(0x%x), ASCQ(0x%x)\n", ioc->name, 7178 + pr_cont(", ASC(0x%x), ASCQ(0x%x)\n", 7101 7179 event_data->ASC, event_data->ASCQ); 7102 - pr_info("\n"); 7180 + pr_cont("\n"); 7103 7181 } 7104 7182 7105 7183 /** ··· 7177 7255 break; 7178 7256 } 7179 7257 7180 - pr_info(MPT3SAS_FMT "enclosure status change: (%s)\n" 7181 - "\thandle(0x%04x), enclosure logical id(0x%016llx)" 7182 - " number slots(%d)\n", ioc->name, reason_str, 7183 - le16_to_cpu(event_data->EnclosureHandle), 7184 - (unsigned long long)le64_to_cpu(event_data->EnclosureLogicalID), 7185 - le16_to_cpu(event_data->StartSlot)); 7258 + ioc_info(ioc, "enclosure status change: (%s)\n" 7259 + "\thandle(0x%04x), enclosure logical id(0x%016llx) number slots(%d)\n", 7260 + reason_str, 7261 + le16_to_cpu(event_data->EnclosureHandle), 7262 + (u64)le64_to_cpu(event_data->EnclosureLogicalID), 7263 + le16_to_cpu(event_data->StartSlot)); 7186 7264 } 7187 7265 7188 7266 /** ··· 7220 7298 kzalloc(sizeof(struct _enclosure_node), 7221 7299 GFP_KERNEL); 7222 7300 if (!enclosure_dev) { 7223 - pr_info(MPT3SAS_FMT 7224 - "failure at %s:%d/%s()!\n", ioc->name, 7225 - __FILE__, __LINE__, __func__); 7301 + ioc_info(ioc, "failure at %s:%d/%s()!\n", 7302 + __FILE__, __LINE__, __func__); 7226 7303 return; 7227 7304 } 7228 7305 rc = mpt3sas_config_get_enclosure_pg0(ioc, &mpi_reply, ··· 7279 7358 u8 task_abort_retries; 7280 7359 7281 7360 mutex_lock(&ioc->tm_cmds.mutex); 7282 - pr_info(MPT3SAS_FMT 7283 - "%s: enter: phy number(%d), width(%d)\n", 7284 - ioc->name, __func__, event_data->PhyNum, 7285 - event_data->PortWidth); 7361 + ioc_info(ioc, "%s: enter: phy number(%d), width(%d)\n", 7362 + __func__, event_data->PhyNum, event_data->PortWidth); 7286 7363 7287 7364 _scsih_block_io_all_device(ioc); 7288 7365 ··· 7290 7371 7291 7372 /* sanity checks for retrying this loop */ 7292 7373 if (max_retries++ == 5) { 7293 - dewtprintk(ioc, pr_info(MPT3SAS_FMT "%s: giving up\n", 7294 - ioc->name, __func__)); 7374 + dewtprintk(ioc, ioc_info(ioc, "%s: giving up\n", __func__)); 7295 7375 goto out; 7296 7376 } else if (max_retries > 1) 7297 - dewtprintk(ioc, pr_info(MPT3SAS_FMT "%s: %d retry\n", 7298 - ioc->name, __func__, max_retries - 1)); 7377 + dewtprintk(ioc, 7378 + ioc_info(ioc, "%s: %d retry\n", 7379 + __func__, max_retries - 1)); 7299 7380 7300 7381 termination_count = 0; 7301 7382 query_count = 0; ··· 7362 7443 task_abort_retries = 0; 7363 7444 tm_retry: 7364 7445 if (task_abort_retries++ == 60) { 7365 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 7366 - "%s: ABORT_TASK: giving up\n", ioc->name, 7367 - __func__)); 7446 + dewtprintk(ioc, 7447 + ioc_info(ioc, "%s: ABORT_TASK: giving up\n", 7448 + __func__)); 7368 7449 spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); 7369 7450 goto broadcast_aen_retry; 7370 7451 } ··· 7393 7474 } 7394 7475 7395 7476 if (ioc->broadcast_aen_pending) { 7396 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 7397 - "%s: loop back due to pending AEN\n", 7398 - ioc->name, __func__)); 7477 + dewtprintk(ioc, 7478 + ioc_info(ioc, 7479 + "%s: loop back due to pending AEN\n", 7480 + __func__)); 7399 7481 ioc->broadcast_aen_pending = 0; 7400 7482 goto broadcast_aen_retry; 7401 7483 } ··· 7405 7485 spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); 7406 7486 out_no_lock: 7407 7487 7408 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 7409 - "%s - exit, query_count = %d termination_count = %d\n", 7410 - ioc->name, __func__, query_count, termination_count)); 7488 + dewtprintk(ioc, 7489 + ioc_info(ioc, "%s - exit, query_count = %d termination_count = %d\n", 7490 + __func__, query_count, termination_count)); 7411 7491 7412 7492 ioc->broadcast_aen_busy = 0; 7413 7493 if (!ioc->shost_recovery) ··· 7429 7509 (Mpi2EventDataSasDiscovery_t *) fw_event->event_data; 7430 7510 7431 7511 if (ioc->logging_level & MPT_DEBUG_EVENT_WORK_TASK) { 7432 - pr_info(MPT3SAS_FMT "discovery event: (%s)", ioc->name, 7433 - (event_data->ReasonCode == MPI2_EVENT_SAS_DISC_RC_STARTED) ? 7434 - "start" : "stop"); 7512 + ioc_info(ioc, "discovery event: (%s)", 7513 + event_data->ReasonCode == MPI2_EVENT_SAS_DISC_RC_STARTED ? 7514 + "start" : "stop"); 7435 7515 if (event_data->DiscoveryStatus) 7436 - pr_info("discovery_status(0x%08x)", 7437 - le32_to_cpu(event_data->DiscoveryStatus)); 7438 - pr_info("\n"); 7516 + pr_cont("discovery_status(0x%08x)", 7517 + le32_to_cpu(event_data->DiscoveryStatus)); 7518 + pr_cont("\n"); 7439 7519 } 7440 7520 7441 7521 if (event_data->ReasonCode == MPI2_EVENT_SAS_DISC_RC_STARTED && ··· 7465 7545 7466 7546 switch (event_data->ReasonCode) { 7467 7547 case MPI25_EVENT_SAS_DISC_ERR_SMP_FAILED: 7468 - pr_warn(MPT3SAS_FMT "SMP command sent to the expander" 7469 - "(handle:0x%04x, sas_address:0x%016llx," 7470 - "physical_port:0x%02x) has failed", 7471 - ioc->name, le16_to_cpu(event_data->DevHandle), 7472 - (unsigned long long)le64_to_cpu(event_data->SASAddress), 7473 - event_data->PhysicalPort); 7548 + ioc_warn(ioc, "SMP command sent to the expander (handle:0x%04x, sas_address:0x%016llx, physical_port:0x%02x) has failed\n", 7549 + le16_to_cpu(event_data->DevHandle), 7550 + (u64)le64_to_cpu(event_data->SASAddress), 7551 + event_data->PhysicalPort); 7474 7552 break; 7475 7553 case MPI25_EVENT_SAS_DISC_ERR_SMP_TIMEOUT: 7476 - pr_warn(MPT3SAS_FMT "SMP command sent to the expander" 7477 - "(handle:0x%04x, sas_address:0x%016llx," 7478 - "physical_port:0x%02x) has timed out", 7479 - ioc->name, le16_to_cpu(event_data->DevHandle), 7480 - (unsigned long long)le64_to_cpu(event_data->SASAddress), 7481 - event_data->PhysicalPort); 7554 + ioc_warn(ioc, "SMP command sent to the expander (handle:0x%04x, sas_address:0x%016llx, physical_port:0x%02x) has timed out\n", 7555 + le16_to_cpu(event_data->DevHandle), 7556 + (u64)le64_to_cpu(event_data->SASAddress), 7557 + event_data->PhysicalPort); 7482 7558 break; 7483 7559 default: 7484 7560 break; ··· 7497 7581 if (!(ioc->logging_level & MPT_DEBUG_EVENT_WORK_TASK)) 7498 7582 return; 7499 7583 7500 - pr_info(MPT3SAS_FMT "pcie enumeration event: (%s) Flag 0x%02x", 7501 - ioc->name, 7502 - (event_data->ReasonCode == MPI26_EVENT_PCIE_ENUM_RC_STARTED) ? 7503 - "started" : "completed", 7504 - event_data->Flags); 7584 + ioc_info(ioc, "pcie enumeration event: (%s) Flag 0x%02x", 7585 + (event_data->ReasonCode == MPI26_EVENT_PCIE_ENUM_RC_STARTED) ? 7586 + "started" : "completed", 7587 + event_data->Flags); 7505 7588 if (event_data->EnumerationStatus) 7506 7589 pr_cont("enumeration_status(0x%08x)", 7507 7590 le32_to_cpu(event_data->EnumerationStatus)); ··· 7532 7617 mutex_lock(&ioc->scsih_cmds.mutex); 7533 7618 7534 7619 if (ioc->scsih_cmds.status != MPT3_CMD_NOT_USED) { 7535 - pr_err(MPT3SAS_FMT "%s: scsih_cmd in use\n", 7536 - ioc->name, __func__); 7620 + ioc_err(ioc, "%s: scsih_cmd in use\n", __func__); 7537 7621 rc = -EAGAIN; 7538 7622 goto out; 7539 7623 } ··· 7540 7626 7541 7627 smid = mpt3sas_base_get_smid(ioc, ioc->scsih_cb_idx); 7542 7628 if (!smid) { 7543 - pr_err(MPT3SAS_FMT "%s: failed obtaining a smid\n", 7544 - ioc->name, __func__); 7629 + ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); 7545 7630 ioc->scsih_cmds.status = MPT3_CMD_NOT_USED; 7546 7631 rc = -EAGAIN; 7547 7632 goto out; ··· 7554 7641 mpi_request->Action = MPI2_RAID_ACTION_PHYSDISK_HIDDEN; 7555 7642 mpi_request->PhysDiskNum = phys_disk_num; 7556 7643 7557 - dewtprintk(ioc, pr_info(MPT3SAS_FMT "IR RAID_ACTION: turning fast "\ 7558 - "path on for handle(0x%04x), phys_disk_num (0x%02x)\n", ioc->name, 7559 - handle, phys_disk_num)); 7644 + dewtprintk(ioc, 7645 + ioc_info(ioc, "IR RAID_ACTION: turning fast path on for handle(0x%04x), phys_disk_num (0x%02x)\n", 7646 + handle, phys_disk_num)); 7560 7647 7561 7648 init_completion(&ioc->scsih_cmds.done); 7562 7649 mpt3sas_base_put_smid_default(ioc, smid); ··· 7581 7668 log_info = 0; 7582 7669 ioc_status &= MPI2_IOCSTATUS_MASK; 7583 7670 if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { 7584 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 7585 - "IR RAID_ACTION: failed: ioc_status(0x%04x), " 7586 - "loginfo(0x%08x)!!!\n", ioc->name, ioc_status, 7587 - log_info)); 7671 + dewtprintk(ioc, 7672 + ioc_info(ioc, "IR RAID_ACTION: failed: ioc_status(0x%04x), loginfo(0x%08x)!!!\n", 7673 + ioc_status, log_info)); 7588 7674 rc = -EFAULT; 7589 7675 } else 7590 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 7591 - "IR RAID_ACTION: completed successfully\n", 7592 - ioc->name)); 7676 + dewtprintk(ioc, 7677 + ioc_info(ioc, "IR RAID_ACTION: completed successfully\n")); 7593 7678 } 7594 7679 7595 7680 out: ··· 7632 7721 7633 7722 mpt3sas_config_get_volume_wwid(ioc, handle, &wwid); 7634 7723 if (!wwid) { 7635 - pr_err(MPT3SAS_FMT 7636 - "failure at %s:%d/%s()!\n", ioc->name, 7637 - __FILE__, __LINE__, __func__); 7724 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 7725 + __FILE__, __LINE__, __func__); 7638 7726 return; 7639 7727 } 7640 7728 ··· 7646 7736 7647 7737 raid_device = kzalloc(sizeof(struct _raid_device), GFP_KERNEL); 7648 7738 if (!raid_device) { 7649 - pr_err(MPT3SAS_FMT 7650 - "failure at %s:%d/%s()!\n", ioc->name, 7651 - __FILE__, __LINE__, __func__); 7739 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 7740 + __FILE__, __LINE__, __func__); 7652 7741 return; 7653 7742 } 7654 7743 ··· 7690 7781 sas_target_priv_data = starget->hostdata; 7691 7782 sas_target_priv_data->deleted = 1; 7692 7783 } 7693 - pr_info(MPT3SAS_FMT "removing handle(0x%04x), wwid(0x%016llx)\n", 7694 - ioc->name, raid_device->handle, 7695 - (unsigned long long) raid_device->wwid); 7784 + ioc_info(ioc, "removing handle(0x%04x), wwid(0x%016llx)\n", 7785 + raid_device->handle, (u64)raid_device->wwid); 7696 7786 list_del(&raid_device->list); 7697 7787 kfree(raid_device); 7698 7788 } ··· 7833 7925 7834 7926 if ((mpt3sas_config_get_sas_device_pg0(ioc, &mpi_reply, &sas_device_pg0, 7835 7927 MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, handle))) { 7836 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 7837 - ioc->name, __FILE__, __LINE__, __func__); 7928 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 7929 + __FILE__, __LINE__, __func__); 7838 7930 return; 7839 7931 } 7840 7932 7841 7933 ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & 7842 7934 MPI2_IOCSTATUS_MASK; 7843 7935 if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { 7844 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 7845 - ioc->name, __FILE__, __LINE__, __func__); 7936 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 7937 + __FILE__, __LINE__, __func__); 7846 7938 return; 7847 7939 } 7848 7940 ··· 7872 7964 7873 7965 element = (Mpi2EventIrConfigElement_t *)&event_data->ConfigElement[0]; 7874 7966 7875 - pr_info(MPT3SAS_FMT "raid config change: (%s), elements(%d)\n", 7876 - ioc->name, (le32_to_cpu(event_data->Flags) & 7877 - MPI2_EVENT_IR_CHANGE_FLAGS_FOREIGN_CONFIG) ? 7878 - "foreign" : "native", event_data->NumElements); 7967 + ioc_info(ioc, "raid config change: (%s), elements(%d)\n", 7968 + le32_to_cpu(event_data->Flags) & MPI2_EVENT_IR_CHANGE_FLAGS_FOREIGN_CONFIG ? 7969 + "foreign" : "native", 7970 + event_data->NumElements); 7879 7971 for (i = 0; i < event_data->NumElements; i++, element++) { 7880 7972 switch (element->ReasonCode) { 7881 7973 case MPI2_EVENT_IR_CHANGE_RC_ADDED: ··· 8031 8123 handle = le16_to_cpu(event_data->VolDevHandle); 8032 8124 state = le32_to_cpu(event_data->NewValue); 8033 8125 if (!ioc->hide_ir_msg) 8034 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 8035 - "%s: handle(0x%04x), old(0x%08x), new(0x%08x)\n", 8036 - ioc->name, __func__, handle, 8037 - le32_to_cpu(event_data->PreviousValue), state)); 8126 + dewtprintk(ioc, 8127 + ioc_info(ioc, "%s: handle(0x%04x), old(0x%08x), new(0x%08x)\n", 8128 + __func__, handle, 8129 + le32_to_cpu(event_data->PreviousValue), 8130 + state)); 8038 8131 switch (state) { 8039 8132 case MPI2_RAID_VOL_STATE_MISSING: 8040 8133 case MPI2_RAID_VOL_STATE_FAILED: ··· 8055 8146 8056 8147 mpt3sas_config_get_volume_wwid(ioc, handle, &wwid); 8057 8148 if (!wwid) { 8058 - pr_err(MPT3SAS_FMT 8059 - "failure at %s:%d/%s()!\n", ioc->name, 8060 - __FILE__, __LINE__, __func__); 8149 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 8150 + __FILE__, __LINE__, __func__); 8061 8151 break; 8062 8152 } 8063 8153 8064 8154 raid_device = kzalloc(sizeof(struct _raid_device), GFP_KERNEL); 8065 8155 if (!raid_device) { 8066 - pr_err(MPT3SAS_FMT 8067 - "failure at %s:%d/%s()!\n", ioc->name, 8068 - __FILE__, __LINE__, __func__); 8156 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 8157 + __FILE__, __LINE__, __func__); 8069 8158 break; 8070 8159 } 8071 8160 ··· 8114 8207 state = le32_to_cpu(event_data->NewValue); 8115 8208 8116 8209 if (!ioc->hide_ir_msg) 8117 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 8118 - "%s: handle(0x%04x), old(0x%08x), new(0x%08x)\n", 8119 - ioc->name, __func__, handle, 8120 - le32_to_cpu(event_data->PreviousValue), state)); 8210 + dewtprintk(ioc, 8211 + ioc_info(ioc, "%s: handle(0x%04x), old(0x%08x), new(0x%08x)\n", 8212 + __func__, handle, 8213 + le32_to_cpu(event_data->PreviousValue), 8214 + state)); 8121 8215 8122 8216 switch (state) { 8123 8217 case MPI2_RAID_PD_STATE_ONLINE: ··· 8139 8231 if ((mpt3sas_config_get_sas_device_pg0(ioc, &mpi_reply, 8140 8232 &sas_device_pg0, MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, 8141 8233 handle))) { 8142 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 8143 - ioc->name, __FILE__, __LINE__, __func__); 8234 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 8235 + __FILE__, __LINE__, __func__); 8144 8236 return; 8145 8237 } 8146 8238 8147 8239 ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & 8148 8240 MPI2_IOCSTATUS_MASK; 8149 8241 if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { 8150 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 8151 - ioc->name, __FILE__, __LINE__, __func__); 8242 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 8243 + __FILE__, __LINE__, __func__); 8152 8244 return; 8153 8245 } 8154 8246 ··· 8202 8294 if (!reason_str) 8203 8295 return; 8204 8296 8205 - pr_info(MPT3SAS_FMT "raid operational status: (%s)" \ 8206 - "\thandle(0x%04x), percent complete(%d)\n", 8207 - ioc->name, reason_str, 8208 - le16_to_cpu(event_data->VolDevHandle), 8209 - event_data->PercentComplete); 8297 + ioc_info(ioc, "raid operational status: (%s)\thandle(0x%04x), percent complete(%d)\n", 8298 + reason_str, 8299 + le16_to_cpu(event_data->VolDevHandle), 8300 + event_data->PercentComplete); 8210 8301 } 8211 8302 8212 8303 /** ··· 8286 8379 mpt3sas_scsih_enclosure_find_by_handle(ioc, 8287 8380 le16_to_cpu(sas_device_pg0->EnclosureHandle)); 8288 8381 if (enclosure_dev == NULL) 8289 - pr_info(MPT3SAS_FMT "Enclosure handle(0x%04x)" 8290 - "doesn't match with enclosure device!\n", 8291 - ioc->name, sas_device_pg0->EnclosureHandle); 8382 + ioc_info(ioc, "Enclosure handle(0x%04x) doesn't match with enclosure device!\n", 8383 + sas_device_pg0->EnclosureHandle); 8292 8384 } 8293 8385 spin_lock_irqsave(&ioc->sas_device_lock, flags); 8294 8386 list_for_each_entry(sas_device, &ioc->sas_device_list, list) { ··· 8381 8475 enclosure_dev = 8382 8476 kzalloc(sizeof(struct _enclosure_node), GFP_KERNEL); 8383 8477 if (!enclosure_dev) { 8384 - pr_err(MPT3SAS_FMT 8385 - "failure at %s:%d/%s()!\n", ioc->name, 8478 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 8386 8479 __FILE__, __LINE__, __func__); 8387 8480 return; 8388 8481 } ··· 8418 8513 u16 handle; 8419 8514 u32 device_info; 8420 8515 8421 - pr_info(MPT3SAS_FMT "search for end-devices: start\n", ioc->name); 8516 + ioc_info(ioc, "search for end-devices: start\n"); 8422 8517 8423 8518 if (list_empty(&ioc->sas_device_list)) 8424 8519 goto out; ··· 8439 8534 } 8440 8535 8441 8536 out: 8442 - pr_info(MPT3SAS_FMT "search for end-devices: complete\n", 8443 - ioc->name); 8537 + ioc_info(ioc, "search for end-devices: complete\n"); 8444 8538 } 8445 8539 8446 8540 /** ··· 8532 8628 u16 handle; 8533 8629 u32 device_info; 8534 8630 8535 - pr_info(MPT3SAS_FMT "search for end-devices: start\n", ioc->name); 8631 + ioc_info(ioc, "search for end-devices: start\n"); 8536 8632 8537 8633 if (list_empty(&ioc->pcie_device_list)) 8538 8634 goto out; ··· 8544 8640 ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & 8545 8641 MPI2_IOCSTATUS_MASK; 8546 8642 if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { 8547 - pr_info(MPT3SAS_FMT "\tbreak from %s: " 8548 - "ioc_status(0x%04x), loginfo(0x%08x)\n", ioc->name, 8549 - __func__, ioc_status, 8550 - le32_to_cpu(mpi_reply.IOCLogInfo)); 8643 + ioc_info(ioc, "\tbreak from %s: ioc_status(0x%04x), loginfo(0x%08x)\n", 8644 + __func__, ioc_status, 8645 + le32_to_cpu(mpi_reply.IOCLogInfo)); 8551 8646 break; 8552 8647 } 8553 8648 handle = le16_to_cpu(pcie_device_pg0.DevHandle); ··· 8556 8653 _scsih_mark_responding_pcie_device(ioc, &pcie_device_pg0); 8557 8654 } 8558 8655 out: 8559 - pr_info(MPT3SAS_FMT "search for PCIe end-devices: complete\n", 8560 - ioc->name); 8656 + ioc_info(ioc, "search for PCIe end-devices: complete\n"); 8561 8657 } 8562 8658 8563 8659 /** ··· 8637 8735 if (!ioc->ir_firmware) 8638 8736 return; 8639 8737 8640 - pr_info(MPT3SAS_FMT "search for raid volumes: start\n", 8641 - ioc->name); 8738 + ioc_info(ioc, "search for raid volumes: start\n"); 8642 8739 8643 8740 if (list_empty(&ioc->raid_device_list)) 8644 8741 goto out; ··· 8680 8779 } 8681 8780 } 8682 8781 out: 8683 - pr_info(MPT3SAS_FMT "search for responding raid volumes: complete\n", 8684 - ioc->name); 8782 + ioc_info(ioc, "search for responding raid volumes: complete\n"); 8685 8783 } 8686 8784 8687 8785 /** ··· 8752 8852 u64 sas_address; 8753 8853 u16 handle; 8754 8854 8755 - pr_info(MPT3SAS_FMT "search for expanders: start\n", ioc->name); 8855 + ioc_info(ioc, "search for expanders: start\n"); 8756 8856 8757 8857 if (list_empty(&ioc->sas_expander_list)) 8758 8858 goto out; ··· 8775 8875 } 8776 8876 8777 8877 out: 8778 - pr_info(MPT3SAS_FMT "search for expanders: complete\n", ioc->name); 8878 + ioc_info(ioc, "search for expanders: complete\n"); 8779 8879 } 8780 8880 8781 8881 /** ··· 8793 8893 unsigned long flags; 8794 8894 LIST_HEAD(head); 8795 8895 8796 - pr_info(MPT3SAS_FMT "removing unresponding devices: start\n", 8797 - ioc->name); 8896 + ioc_info(ioc, "removing unresponding devices: start\n"); 8798 8897 8799 8898 /* removing unresponding end devices */ 8800 - pr_info(MPT3SAS_FMT "removing unresponding devices: end-devices\n", 8801 - ioc->name); 8899 + ioc_info(ioc, "removing unresponding devices: end-devices\n"); 8802 8900 /* 8803 8901 * Iterate, pulling off devices marked as non-responding. We become the 8804 8902 * owner for the reference the list had on any object we prune. ··· 8820 8922 sas_device_put(sas_device); 8821 8923 } 8822 8924 8823 - pr_info(MPT3SAS_FMT 8824 - " Removing unresponding devices: pcie end-devices\n" 8825 - , ioc->name); 8925 + ioc_info(ioc, "Removing unresponding devices: pcie end-devices\n"); 8826 8926 INIT_LIST_HEAD(&head); 8827 8927 spin_lock_irqsave(&ioc->pcie_device_lock, flags); 8828 8928 list_for_each_entry_safe(pcie_device, pcie_device_next, ··· 8840 8944 8841 8945 /* removing unresponding volumes */ 8842 8946 if (ioc->ir_firmware) { 8843 - pr_info(MPT3SAS_FMT "removing unresponding devices: volumes\n", 8844 - ioc->name); 8947 + ioc_info(ioc, "removing unresponding devices: volumes\n"); 8845 8948 list_for_each_entry_safe(raid_device, raid_device_next, 8846 8949 &ioc->raid_device_list, list) { 8847 8950 if (!raid_device->responding) ··· 8852 8957 } 8853 8958 8854 8959 /* removing unresponding expanders */ 8855 - pr_info(MPT3SAS_FMT "removing unresponding devices: expanders\n", 8856 - ioc->name); 8960 + ioc_info(ioc, "removing unresponding devices: expanders\n"); 8857 8961 spin_lock_irqsave(&ioc->sas_node_lock, flags); 8858 8962 INIT_LIST_HEAD(&tmp_list); 8859 8963 list_for_each_entry_safe(sas_expander, sas_expander_next, ··· 8868 8974 _scsih_expander_node_remove(ioc, sas_expander); 8869 8975 } 8870 8976 8871 - pr_info(MPT3SAS_FMT "removing unresponding devices: complete\n", 8872 - ioc->name); 8977 + ioc_info(ioc, "removing unresponding devices: complete\n"); 8873 8978 8874 8979 /* unblock devices */ 8875 8980 _scsih_ublock_io_all_device(ioc); ··· 8885 8992 for (i = 0 ; i < sas_expander->num_phys ; i++) { 8886 8993 if ((mpt3sas_config_get_expander_pg1(ioc, &mpi_reply, 8887 8994 &expander_pg1, i, handle))) { 8888 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 8889 - ioc->name, __FILE__, __LINE__, __func__); 8995 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 8996 + __FILE__, __LINE__, __func__); 8890 8997 return; 8891 8998 } 8892 8999 ··· 8922 9029 u8 retry_count; 8923 9030 unsigned long flags; 8924 9031 8925 - pr_info(MPT3SAS_FMT "scan devices: start\n", ioc->name); 9032 + ioc_info(ioc, "scan devices: start\n"); 8926 9033 8927 9034 _scsih_sas_host_refresh(ioc); 8928 9035 8929 - pr_info(MPT3SAS_FMT "\tscan devices: expanders start\n", ioc->name); 9036 + ioc_info(ioc, "\tscan devices: expanders start\n"); 8930 9037 8931 9038 /* expanders */ 8932 9039 handle = 0xFFFF; ··· 8935 9042 ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & 8936 9043 MPI2_IOCSTATUS_MASK; 8937 9044 if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { 8938 - pr_info(MPT3SAS_FMT "\tbreak from expander scan: " \ 8939 - "ioc_status(0x%04x), loginfo(0x%08x)\n", 8940 - ioc->name, ioc_status, 8941 - le32_to_cpu(mpi_reply.IOCLogInfo)); 9045 + ioc_info(ioc, "\tbreak from expander scan: ioc_status(0x%04x), loginfo(0x%08x)\n", 9046 + ioc_status, le32_to_cpu(mpi_reply.IOCLogInfo)); 8942 9047 break; 8943 9048 } 8944 9049 handle = le16_to_cpu(expander_pg0.DevHandle); ··· 8948 9057 _scsih_refresh_expander_links(ioc, expander_device, 8949 9058 handle); 8950 9059 else { 8951 - pr_info(MPT3SAS_FMT "\tBEFORE adding expander: " \ 8952 - "handle (0x%04x), sas_addr(0x%016llx)\n", ioc->name, 8953 - handle, (unsigned long long) 8954 - le64_to_cpu(expander_pg0.SASAddress)); 9060 + ioc_info(ioc, "\tBEFORE adding expander: handle (0x%04x), sas_addr(0x%016llx)\n", 9061 + handle, 9062 + (u64)le64_to_cpu(expander_pg0.SASAddress)); 8955 9063 _scsih_expander_add(ioc, handle); 8956 - pr_info(MPT3SAS_FMT "\tAFTER adding expander: " \ 8957 - "handle (0x%04x), sas_addr(0x%016llx)\n", ioc->name, 8958 - handle, (unsigned long long) 8959 - le64_to_cpu(expander_pg0.SASAddress)); 9064 + ioc_info(ioc, "\tAFTER adding expander: handle (0x%04x), sas_addr(0x%016llx)\n", 9065 + handle, 9066 + (u64)le64_to_cpu(expander_pg0.SASAddress)); 8960 9067 } 8961 9068 } 8962 9069 8963 - pr_info(MPT3SAS_FMT "\tscan devices: expanders complete\n", 8964 - ioc->name); 9070 + ioc_info(ioc, "\tscan devices: expanders complete\n"); 8965 9071 8966 9072 if (!ioc->ir_firmware) 8967 9073 goto skip_to_sas; 8968 9074 8969 - pr_info(MPT3SAS_FMT "\tscan devices: phys disk start\n", ioc->name); 9075 + ioc_info(ioc, "\tscan devices: phys disk start\n"); 8970 9076 8971 9077 /* phys disk */ 8972 9078 phys_disk_num = 0xFF; ··· 8973 9085 ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & 8974 9086 MPI2_IOCSTATUS_MASK; 8975 9087 if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { 8976 - pr_info(MPT3SAS_FMT "\tbreak from phys disk scan: "\ 8977 - "ioc_status(0x%04x), loginfo(0x%08x)\n", 8978 - ioc->name, ioc_status, 8979 - le32_to_cpu(mpi_reply.IOCLogInfo)); 9088 + ioc_info(ioc, "\tbreak from phys disk scan: ioc_status(0x%04x), loginfo(0x%08x)\n", 9089 + ioc_status, le32_to_cpu(mpi_reply.IOCLogInfo)); 8980 9090 break; 8981 9091 } 8982 9092 phys_disk_num = pd_pg0.PhysDiskNum; ··· 8991 9105 ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & 8992 9106 MPI2_IOCSTATUS_MASK; 8993 9107 if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { 8994 - pr_info(MPT3SAS_FMT "\tbreak from phys disk scan " \ 8995 - "ioc_status(0x%04x), loginfo(0x%08x)\n", 8996 - ioc->name, ioc_status, 8997 - le32_to_cpu(mpi_reply.IOCLogInfo)); 9108 + ioc_info(ioc, "\tbreak from phys disk scan ioc_status(0x%04x), loginfo(0x%08x)\n", 9109 + ioc_status, le32_to_cpu(mpi_reply.IOCLogInfo)); 8998 9110 break; 8999 9111 } 9000 9112 parent_handle = le16_to_cpu(sas_device_pg0.ParentDevHandle); 9001 9113 if (!_scsih_get_sas_address(ioc, parent_handle, 9002 9114 &sas_address)) { 9003 - pr_info(MPT3SAS_FMT "\tBEFORE adding phys disk: " \ 9004 - " handle (0x%04x), sas_addr(0x%016llx)\n", 9005 - ioc->name, handle, (unsigned long long) 9006 - le64_to_cpu(sas_device_pg0.SASAddress)); 9115 + ioc_info(ioc, "\tBEFORE adding phys disk: handle (0x%04x), sas_addr(0x%016llx)\n", 9116 + handle, 9117 + (u64)le64_to_cpu(sas_device_pg0.SASAddress)); 9007 9118 mpt3sas_transport_update_links(ioc, sas_address, 9008 9119 handle, sas_device_pg0.PhyNum, 9009 9120 MPI2_SAS_NEG_LINK_RATE_1_5); ··· 9014 9131 1)) { 9015 9132 ssleep(1); 9016 9133 } 9017 - pr_info(MPT3SAS_FMT "\tAFTER adding phys disk: " \ 9018 - " handle (0x%04x), sas_addr(0x%016llx)\n", 9019 - ioc->name, handle, (unsigned long long) 9020 - le64_to_cpu(sas_device_pg0.SASAddress)); 9134 + ioc_info(ioc, "\tAFTER adding phys disk: handle (0x%04x), sas_addr(0x%016llx)\n", 9135 + handle, 9136 + (u64)le64_to_cpu(sas_device_pg0.SASAddress)); 9021 9137 } 9022 9138 } 9023 9139 9024 - pr_info(MPT3SAS_FMT "\tscan devices: phys disk complete\n", 9025 - ioc->name); 9140 + ioc_info(ioc, "\tscan devices: phys disk complete\n"); 9026 9141 9027 - pr_info(MPT3SAS_FMT "\tscan devices: volumes start\n", ioc->name); 9142 + ioc_info(ioc, "\tscan devices: volumes start\n"); 9028 9143 9029 9144 /* volumes */ 9030 9145 handle = 0xFFFF; ··· 9031 9150 ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & 9032 9151 MPI2_IOCSTATUS_MASK; 9033 9152 if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { 9034 - pr_info(MPT3SAS_FMT "\tbreak from volume scan: " \ 9035 - "ioc_status(0x%04x), loginfo(0x%08x)\n", 9036 - ioc->name, ioc_status, 9037 - le32_to_cpu(mpi_reply.IOCLogInfo)); 9153 + ioc_info(ioc, "\tbreak from volume scan: ioc_status(0x%04x), loginfo(0x%08x)\n", 9154 + ioc_status, le32_to_cpu(mpi_reply.IOCLogInfo)); 9038 9155 break; 9039 9156 } 9040 9157 handle = le16_to_cpu(volume_pg1.DevHandle); ··· 9049 9170 ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & 9050 9171 MPI2_IOCSTATUS_MASK; 9051 9172 if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { 9052 - pr_info(MPT3SAS_FMT "\tbreak from volume scan: " \ 9053 - "ioc_status(0x%04x), loginfo(0x%08x)\n", 9054 - ioc->name, ioc_status, 9055 - le32_to_cpu(mpi_reply.IOCLogInfo)); 9173 + ioc_info(ioc, "\tbreak from volume scan: ioc_status(0x%04x), loginfo(0x%08x)\n", 9174 + ioc_status, le32_to_cpu(mpi_reply.IOCLogInfo)); 9056 9175 break; 9057 9176 } 9058 9177 if (volume_pg0.VolumeState == MPI2_RAID_VOL_STATE_OPTIMAL || ··· 9059 9182 memset(&element, 0, sizeof(Mpi2EventIrConfigElement_t)); 9060 9183 element.ReasonCode = MPI2_EVENT_IR_CHANGE_RC_ADDED; 9061 9184 element.VolDevHandle = volume_pg1.DevHandle; 9062 - pr_info(MPT3SAS_FMT 9063 - "\tBEFORE adding volume: handle (0x%04x)\n", 9064 - ioc->name, volume_pg1.DevHandle); 9185 + ioc_info(ioc, "\tBEFORE adding volume: handle (0x%04x)\n", 9186 + volume_pg1.DevHandle); 9065 9187 _scsih_sas_volume_add(ioc, &element); 9066 - pr_info(MPT3SAS_FMT 9067 - "\tAFTER adding volume: handle (0x%04x)\n", 9068 - ioc->name, volume_pg1.DevHandle); 9188 + ioc_info(ioc, "\tAFTER adding volume: handle (0x%04x)\n", 9189 + volume_pg1.DevHandle); 9069 9190 } 9070 9191 } 9071 9192 9072 - pr_info(MPT3SAS_FMT "\tscan devices: volumes complete\n", 9073 - ioc->name); 9193 + ioc_info(ioc, "\tscan devices: volumes complete\n"); 9074 9194 9075 9195 skip_to_sas: 9076 9196 9077 - pr_info(MPT3SAS_FMT "\tscan devices: end devices start\n", 9078 - ioc->name); 9197 + ioc_info(ioc, "\tscan devices: end devices start\n"); 9079 9198 9080 9199 /* sas devices */ 9081 9200 handle = 0xFFFF; ··· 9081 9208 ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & 9082 9209 MPI2_IOCSTATUS_MASK; 9083 9210 if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { 9084 - pr_info(MPT3SAS_FMT "\tbreak from end device scan:"\ 9085 - " ioc_status(0x%04x), loginfo(0x%08x)\n", 9086 - ioc->name, ioc_status, 9087 - le32_to_cpu(mpi_reply.IOCLogInfo)); 9211 + ioc_info(ioc, "\tbreak from end device scan: ioc_status(0x%04x), loginfo(0x%08x)\n", 9212 + ioc_status, le32_to_cpu(mpi_reply.IOCLogInfo)); 9088 9213 break; 9089 9214 } 9090 9215 handle = le16_to_cpu(sas_device_pg0.DevHandle); ··· 9097 9226 } 9098 9227 parent_handle = le16_to_cpu(sas_device_pg0.ParentDevHandle); 9099 9228 if (!_scsih_get_sas_address(ioc, parent_handle, &sas_address)) { 9100 - pr_info(MPT3SAS_FMT "\tBEFORE adding end device: " \ 9101 - "handle (0x%04x), sas_addr(0x%016llx)\n", ioc->name, 9102 - handle, (unsigned long long) 9103 - le64_to_cpu(sas_device_pg0.SASAddress)); 9229 + ioc_info(ioc, "\tBEFORE adding end device: handle (0x%04x), sas_addr(0x%016llx)\n", 9230 + handle, 9231 + (u64)le64_to_cpu(sas_device_pg0.SASAddress)); 9104 9232 mpt3sas_transport_update_links(ioc, sas_address, handle, 9105 9233 sas_device_pg0.PhyNum, MPI2_SAS_NEG_LINK_RATE_1_5); 9106 9234 retry_count = 0; ··· 9111 9241 0)) { 9112 9242 ssleep(1); 9113 9243 } 9114 - pr_info(MPT3SAS_FMT "\tAFTER adding end device: " \ 9115 - "handle (0x%04x), sas_addr(0x%016llx)\n", ioc->name, 9116 - handle, (unsigned long long) 9117 - le64_to_cpu(sas_device_pg0.SASAddress)); 9244 + ioc_info(ioc, "\tAFTER adding end device: handle (0x%04x), sas_addr(0x%016llx)\n", 9245 + handle, 9246 + (u64)le64_to_cpu(sas_device_pg0.SASAddress)); 9118 9247 } 9119 9248 } 9120 - pr_info(MPT3SAS_FMT "\tscan devices: end devices complete\n", 9121 - ioc->name); 9122 - pr_info(MPT3SAS_FMT "\tscan devices: pcie end devices start\n", 9123 - ioc->name); 9249 + ioc_info(ioc, "\tscan devices: end devices complete\n"); 9250 + ioc_info(ioc, "\tscan devices: pcie end devices start\n"); 9124 9251 9125 9252 /* pcie devices */ 9126 9253 handle = 0xFFFF; ··· 9127 9260 ioc_status = le16_to_cpu(mpi_reply.IOCStatus) 9128 9261 & MPI2_IOCSTATUS_MASK; 9129 9262 if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { 9130 - pr_info(MPT3SAS_FMT "\tbreak from pcie end device" 9131 - " scan: ioc_status(0x%04x), loginfo(0x%08x)\n", 9132 - ioc->name, ioc_status, 9133 - le32_to_cpu(mpi_reply.IOCLogInfo)); 9263 + ioc_info(ioc, "\tbreak from pcie end device scan: ioc_status(0x%04x), loginfo(0x%08x)\n", 9264 + ioc_status, le32_to_cpu(mpi_reply.IOCLogInfo)); 9134 9265 break; 9135 9266 } 9136 9267 handle = le16_to_cpu(pcie_device_pg0.DevHandle); ··· 9145 9280 parent_handle = le16_to_cpu(pcie_device_pg0.ParentDevHandle); 9146 9281 _scsih_pcie_add_device(ioc, handle); 9147 9282 9148 - pr_info(MPT3SAS_FMT "\tAFTER adding pcie end device: " 9149 - "handle (0x%04x), wwid(0x%016llx)\n", ioc->name, 9150 - handle, 9151 - (unsigned long long) le64_to_cpu(pcie_device_pg0.WWID)); 9283 + ioc_info(ioc, "\tAFTER adding pcie end device: handle (0x%04x), wwid(0x%016llx)\n", 9284 + handle, (u64)le64_to_cpu(pcie_device_pg0.WWID)); 9152 9285 } 9153 - pr_info(MPT3SAS_FMT "\tpcie devices: pcie end devices complete\n", 9154 - ioc->name); 9155 - pr_info(MPT3SAS_FMT "scan devices: complete\n", ioc->name); 9286 + ioc_info(ioc, "\tpcie devices: pcie end devices complete\n"); 9287 + ioc_info(ioc, "scan devices: complete\n"); 9156 9288 } 9157 9289 9158 9290 /** ··· 9160 9298 */ 9161 9299 void mpt3sas_scsih_pre_reset_handler(struct MPT3SAS_ADAPTER *ioc) 9162 9300 { 9163 - dtmprintk(ioc, pr_info(MPT3SAS_FMT 9164 - "%s: MPT3_IOC_PRE_RESET\n", ioc->name, __func__)); 9301 + dtmprintk(ioc, ioc_info(ioc, "%s: MPT3_IOC_PRE_RESET\n", __func__)); 9165 9302 } 9166 9303 9167 9304 /** ··· 9172 9311 void 9173 9312 mpt3sas_scsih_after_reset_handler(struct MPT3SAS_ADAPTER *ioc) 9174 9313 { 9175 - dtmprintk(ioc, pr_info(MPT3SAS_FMT 9176 - "%s: MPT3_IOC_AFTER_RESET\n", ioc->name, __func__)); 9314 + dtmprintk(ioc, ioc_info(ioc, "%s: MPT3_IOC_AFTER_RESET\n", __func__)); 9177 9315 if (ioc->scsih_cmds.status & MPT3_CMD_PENDING) { 9178 9316 ioc->scsih_cmds.status |= MPT3_CMD_RESET; 9179 9317 mpt3sas_base_free_smid(ioc, ioc->scsih_cmds.smid); ··· 9200 9340 void 9201 9341 mpt3sas_scsih_reset_done_handler(struct MPT3SAS_ADAPTER *ioc) 9202 9342 { 9203 - dtmprintk(ioc, pr_info(MPT3SAS_FMT 9204 - "%s: MPT3_IOC_DONE_RESET\n", ioc->name, __func__)); 9343 + dtmprintk(ioc, ioc_info(ioc, "%s: MPT3_IOC_DONE_RESET\n", __func__)); 9205 9344 if ((!ioc->is_driver_loading) && !(disable_discovery > 0 && 9206 9345 !ioc->sas_hba.num_phys)) { 9207 9346 _scsih_prep_device_scan(ioc); ··· 9255 9396 if (missing_delay[0] != -1 && missing_delay[1] != -1) 9256 9397 mpt3sas_base_update_missing_delay(ioc, missing_delay[0], 9257 9398 missing_delay[1]); 9258 - dewtprintk(ioc, pr_info(MPT3SAS_FMT 9259 - "port enable: complete from worker thread\n", 9260 - ioc->name)); 9399 + dewtprintk(ioc, 9400 + ioc_info(ioc, "port enable: complete from worker thread\n")); 9261 9401 break; 9262 9402 case MPT3SAS_TURN_ON_PFA_LED: 9263 9403 _scsih_turn_on_pfa_led(ioc, fw_event->device_handle); ··· 9354 9496 mpi_reply = mpt3sas_base_get_reply_virt_addr(ioc, reply); 9355 9497 9356 9498 if (unlikely(!mpi_reply)) { 9357 - pr_err(MPT3SAS_FMT "mpi_reply not valid at %s:%d/%s()!\n", 9358 - ioc->name, __FILE__, __LINE__, __func__); 9499 + ioc_err(ioc, "mpi_reply not valid at %s:%d/%s()!\n", 9500 + __FILE__, __LINE__, __func__); 9359 9501 return 1; 9360 9502 } 9361 9503 ··· 9422 9564 9423 9565 switch (le32_to_cpu(*log_code)) { 9424 9566 case MPT2_WARPDRIVE_LC_SSDT: 9425 - pr_warn(MPT3SAS_FMT "WarpDrive Warning: " 9426 - "IO Throttling has occurred in the WarpDrive " 9427 - "subsystem. Check WarpDrive documentation for " 9428 - "additional details.\n", ioc->name); 9567 + ioc_warn(ioc, "WarpDrive Warning: IO Throttling has occurred in the WarpDrive subsystem. Check WarpDrive documentation for additional details.\n"); 9429 9568 break; 9430 9569 case MPT2_WARPDRIVE_LC_SSDLW: 9431 - pr_warn(MPT3SAS_FMT "WarpDrive Warning: " 9432 - "Program/Erase Cycles for the WarpDrive subsystem " 9433 - "in degraded range. Check WarpDrive documentation " 9434 - "for additional details.\n", ioc->name); 9570 + ioc_warn(ioc, "WarpDrive Warning: Program/Erase Cycles for the WarpDrive subsystem in degraded range. Check WarpDrive documentation for additional details.\n"); 9435 9571 break; 9436 9572 case MPT2_WARPDRIVE_LC_SSDLF: 9437 - pr_err(MPT3SAS_FMT "WarpDrive Fatal Error: " 9438 - "There are no Program/Erase Cycles for the " 9439 - "WarpDrive subsystem. The storage device will be " 9440 - "in read-only mode. Check WarpDrive documentation " 9441 - "for additional details.\n", ioc->name); 9573 + ioc_err(ioc, "WarpDrive Fatal Error: There are no Program/Erase Cycles for the WarpDrive subsystem. The storage device will be in read-only mode. Check WarpDrive documentation for additional details.\n"); 9442 9574 break; 9443 9575 case MPT2_WARPDRIVE_LC_BRMF: 9444 - pr_err(MPT3SAS_FMT "WarpDrive Fatal Error: " 9445 - "The Backup Rail Monitor has failed on the " 9446 - "WarpDrive subsystem. Check WarpDrive " 9447 - "documentation for additional details.\n", 9448 - ioc->name); 9576 + ioc_err(ioc, "WarpDrive Fatal Error: The Backup Rail Monitor has failed on the WarpDrive subsystem. Check WarpDrive documentation for additional details.\n"); 9449 9577 break; 9450 9578 } 9451 9579 ··· 9457 9613 (Mpi26EventDataActiveCableExcept_t *) mpi_reply->EventData; 9458 9614 switch (ActiveCableEventData->ReasonCode) { 9459 9615 case MPI26_EVENT_ACTIVE_CABLE_INSUFFICIENT_POWER: 9460 - pr_notice(MPT3SAS_FMT 9461 - "Currently an active cable with ReceptacleID %d\n", 9462 - ioc->name, ActiveCableEventData->ReceptacleID); 9616 + ioc_notice(ioc, "Currently an active cable with ReceptacleID %d\n", 9617 + ActiveCableEventData->ReceptacleID); 9463 9618 pr_notice("cannot be powered and devices connected\n"); 9464 9619 pr_notice("to this active cable will not be seen\n"); 9465 9620 pr_notice("This active cable requires %d mW of power\n", ··· 9466 9623 break; 9467 9624 9468 9625 case MPI26_EVENT_ACTIVE_CABLE_DEGRADED: 9469 - pr_notice(MPT3SAS_FMT 9470 - "Currently a cable with ReceptacleID %d\n", 9471 - ioc->name, ActiveCableEventData->ReceptacleID); 9626 + ioc_notice(ioc, "Currently a cable with ReceptacleID %d\n", 9627 + ActiveCableEventData->ReceptacleID); 9472 9628 pr_notice( 9473 9629 "is not running at optimal speed(12 Gb/s rate)\n"); 9474 9630 break; ··· 9482 9640 sz = le16_to_cpu(mpi_reply->EventDataLength) * 4; 9483 9641 fw_event = alloc_fw_event_work(sz); 9484 9642 if (!fw_event) { 9485 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 9486 - ioc->name, __FILE__, __LINE__, __func__); 9643 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 9644 + __FILE__, __LINE__, __func__); 9487 9645 return 1; 9488 9646 } 9489 9647 ··· 9532 9690 mpt3sas_transport_port_remove(ioc, sas_expander->sas_address, 9533 9691 sas_expander->sas_address_parent); 9534 9692 9535 - pr_info(MPT3SAS_FMT 9536 - "expander_remove: handle(0x%04x), sas_addr(0x%016llx)\n", 9537 - ioc->name, 9538 - sas_expander->handle, (unsigned long long) 9539 - sas_expander->sas_address); 9693 + ioc_info(ioc, "expander_remove: handle(0x%04x), sas_addr(0x%016llx)\n", 9694 + sas_expander->handle, (unsigned long long) 9695 + sas_expander->sas_address); 9540 9696 9541 9697 spin_lock_irqsave(&ioc->sas_node_lock, flags); 9542 9698 list_del(&sas_expander->list); ··· 9569 9729 mutex_lock(&ioc->scsih_cmds.mutex); 9570 9730 9571 9731 if (ioc->scsih_cmds.status != MPT3_CMD_NOT_USED) { 9572 - pr_err(MPT3SAS_FMT "%s: scsih_cmd in use\n", 9573 - ioc->name, __func__); 9732 + ioc_err(ioc, "%s: scsih_cmd in use\n", __func__); 9574 9733 goto out; 9575 9734 } 9576 9735 ioc->scsih_cmds.status = MPT3_CMD_PENDING; 9577 9736 9578 9737 smid = mpt3sas_base_get_smid(ioc, ioc->scsih_cb_idx); 9579 9738 if (!smid) { 9580 - pr_err(MPT3SAS_FMT "%s: failed obtaining a smid\n", 9581 - ioc->name, __func__); 9739 + ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); 9582 9740 ioc->scsih_cmds.status = MPT3_CMD_NOT_USED; 9583 9741 goto out; 9584 9742 } ··· 9589 9751 mpi_request->Action = MPI2_RAID_ACTION_SYSTEM_SHUTDOWN_INITIATED; 9590 9752 9591 9753 if (!ioc->hide_ir_msg) 9592 - pr_info(MPT3SAS_FMT "IR shutdown (sending)\n", ioc->name); 9754 + ioc_info(ioc, "IR shutdown (sending)\n"); 9593 9755 init_completion(&ioc->scsih_cmds.done); 9594 9756 mpt3sas_base_put_smid_default(ioc, smid); 9595 9757 wait_for_completion_timeout(&ioc->scsih_cmds.done, 10*HZ); 9596 9758 9597 9759 if (!(ioc->scsih_cmds.status & MPT3_CMD_COMPLETE)) { 9598 - pr_err(MPT3SAS_FMT "%s: timeout\n", 9599 - ioc->name, __func__); 9760 + ioc_err(ioc, "%s: timeout\n", __func__); 9600 9761 goto out; 9601 9762 } 9602 9763 9603 9764 if (ioc->scsih_cmds.status & MPT3_CMD_REPLY_VALID) { 9604 9765 mpi_reply = ioc->scsih_cmds.reply; 9605 9766 if (!ioc->hide_ir_msg) 9606 - pr_info(MPT3SAS_FMT "IR shutdown " 9607 - "(complete): ioc_status(0x%04x), loginfo(0x%08x)\n", 9608 - ioc->name, le16_to_cpu(mpi_reply->IOCStatus), 9609 - le32_to_cpu(mpi_reply->IOCLogInfo)); 9767 + ioc_info(ioc, "IR shutdown (complete): ioc_status(0x%04x), loginfo(0x%08x)\n", 9768 + le16_to_cpu(mpi_reply->IOCStatus), 9769 + le32_to_cpu(mpi_reply->IOCLogInfo)); 9610 9770 } 9611 9771 9612 9772 out: ··· 9653 9817 sas_target_priv_data->deleted = 1; 9654 9818 scsi_remove_target(&raid_device->starget->dev); 9655 9819 } 9656 - pr_info(MPT3SAS_FMT "removing handle(0x%04x), wwid(0x%016llx)\n", 9657 - ioc->name, raid_device->handle, 9658 - (unsigned long long) raid_device->wwid); 9820 + ioc_info(ioc, "removing handle(0x%04x), wwid(0x%016llx)\n", 9821 + raid_device->handle, (u64)raid_device->wwid); 9659 9822 _scsih_raid_device_remove(ioc, raid_device); 9660 9823 } 9661 9824 list_for_each_entry_safe(pcie_device, pcienext, &ioc->pcie_device_list, ··· 10065 10230 rc = mpt3sas_port_enable(ioc); 10066 10231 10067 10232 if (rc != 0) 10068 - pr_info(MPT3SAS_FMT "port enable: FAILED\n", ioc->name); 10233 + ioc_info(ioc, "port enable: FAILED\n"); 10069 10234 } 10070 10235 10071 10236 /** ··· 10090 10255 10091 10256 if (time >= (300 * HZ)) { 10092 10257 ioc->port_enable_cmds.status = MPT3_CMD_NOT_USED; 10093 - pr_info(MPT3SAS_FMT 10094 - "port enable: FAILED with timeout (timeout=300s)\n", 10095 - ioc->name); 10258 + ioc_info(ioc, "port enable: FAILED with timeout (timeout=300s)\n"); 10096 10259 ioc->is_driver_loading = 0; 10097 10260 return 1; 10098 10261 } ··· 10099 10266 return 0; 10100 10267 10101 10268 if (ioc->start_scan_failed) { 10102 - pr_info(MPT3SAS_FMT 10103 - "port enable: FAILED with (ioc_status=0x%08x)\n", 10104 - ioc->name, ioc->start_scan_failed); 10269 + ioc_info(ioc, "port enable: FAILED with (ioc_status=0x%08x)\n", 10270 + ioc->start_scan_failed); 10105 10271 ioc->is_driver_loading = 0; 10106 10272 ioc->wait_for_discovery_to_complete = 0; 10107 10273 ioc->remove_host = 1; 10108 10274 return 1; 10109 10275 } 10110 10276 10111 - pr_info(MPT3SAS_FMT "port enable: SUCCESS\n", ioc->name); 10277 + ioc_info(ioc, "port enable: SUCCESS\n"); 10112 10278 ioc->port_enable_cmds.status = MPT3_CMD_NOT_USED; 10113 10279 10114 10280 if (ioc->wait_for_discovery_to_complete) { ··· 10418 10586 if (ioc->is_mcpu_endpoint) { 10419 10587 /* mCPU MPI support 64K max IO */ 10420 10588 shost->max_sectors = 128; 10421 - pr_info(MPT3SAS_FMT 10422 - "The max_sectors value is set to %d\n", 10423 - ioc->name, shost->max_sectors); 10589 + ioc_info(ioc, "The max_sectors value is set to %d\n", 10590 + shost->max_sectors); 10424 10591 } else { 10425 10592 if (max_sectors != 0xFFFF) { 10426 10593 if (max_sectors < 64) { 10427 10594 shost->max_sectors = 64; 10428 - pr_warn(MPT3SAS_FMT "Invalid value %d passed " \ 10429 - "for max_sectors, range is 64 to 32767. " \ 10430 - "Assigning value of 64.\n", \ 10431 - ioc->name, max_sectors); 10595 + ioc_warn(ioc, "Invalid value %d passed for max_sectors, range is 64 to 32767. Assigning value of 64.\n", 10596 + max_sectors); 10432 10597 } else if (max_sectors > 32767) { 10433 10598 shost->max_sectors = 32767; 10434 - pr_warn(MPT3SAS_FMT "Invalid value %d passed " \ 10435 - "for max_sectors, range is 64 to 32767." \ 10436 - "Assigning default value of 32767.\n", \ 10437 - ioc->name, max_sectors); 10599 + ioc_warn(ioc, "Invalid value %d passed for max_sectors, range is 64 to 32767.Assigning default value of 32767.\n", 10600 + max_sectors); 10438 10601 } else { 10439 10602 shost->max_sectors = max_sectors & 0xFFFE; 10440 - pr_info(MPT3SAS_FMT 10441 - "The max_sectors value is set to %d\n", 10442 - ioc->name, shost->max_sectors); 10603 + ioc_info(ioc, "The max_sectors value is set to %d\n", 10604 + shost->max_sectors); 10443 10605 } 10444 10606 } 10445 10607 } ··· 10453 10627 ioc->firmware_event_thread = alloc_ordered_workqueue( 10454 10628 ioc->firmware_event_name, 0); 10455 10629 if (!ioc->firmware_event_thread) { 10456 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 10457 - ioc->name, __FILE__, __LINE__, __func__); 10630 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 10631 + __FILE__, __LINE__, __func__); 10458 10632 rv = -ENODEV; 10459 10633 goto out_thread_fail; 10460 10634 } 10461 10635 10462 10636 ioc->is_driver_loading = 1; 10463 10637 if ((mpt3sas_base_attach(ioc))) { 10464 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 10465 - ioc->name, __FILE__, __LINE__, __func__); 10638 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 10639 + __FILE__, __LINE__, __func__); 10466 10640 rv = -ENODEV; 10467 10641 goto out_attach_fail; 10468 10642 } ··· 10483 10657 10484 10658 rv = scsi_add_host(shost, &pdev->dev); 10485 10659 if (rv) { 10486 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 10487 - ioc->name, __FILE__, __LINE__, __func__); 10660 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 10661 + __FILE__, __LINE__, __func__); 10488 10662 goto out_add_shost_fail; 10489 10663 } 10490 10664 ··· 10521 10695 flush_scheduled_work(); 10522 10696 scsi_block_requests(shost); 10523 10697 device_state = pci_choose_state(pdev, state); 10524 - pr_info(MPT3SAS_FMT 10525 - "pdev=0x%p, slot=%s, entering operating state [D%d]\n", 10526 - ioc->name, pdev, pci_name(pdev), device_state); 10698 + ioc_info(ioc, "pdev=0x%p, slot=%s, entering operating state [D%d]\n", 10699 + pdev, pci_name(pdev), device_state); 10527 10700 10528 10701 pci_save_state(pdev); 10529 10702 mpt3sas_base_free_resources(ioc); ··· 10544 10719 pci_power_t device_state = pdev->current_state; 10545 10720 int r; 10546 10721 10547 - pr_info(MPT3SAS_FMT 10548 - "pdev=0x%p, slot=%s, previous operating state [D%d]\n", 10549 - ioc->name, pdev, pci_name(pdev), device_state); 10722 + ioc_info(ioc, "pdev=0x%p, slot=%s, previous operating state [D%d]\n", 10723 + pdev, pci_name(pdev), device_state); 10550 10724 10551 10725 pci_set_power_state(pdev, PCI_D0); 10552 10726 pci_enable_wake(pdev, PCI_D0, 0); ··· 10577 10753 struct Scsi_Host *shost = pci_get_drvdata(pdev); 10578 10754 struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); 10579 10755 10580 - pr_info(MPT3SAS_FMT "PCI error: detected callback, state(%d)!!\n", 10581 - ioc->name, state); 10756 + ioc_info(ioc, "PCI error: detected callback, state(%d)!!\n", state); 10582 10757 10583 10758 switch (state) { 10584 10759 case pci_channel_io_normal: ··· 10614 10791 struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); 10615 10792 int rc; 10616 10793 10617 - pr_info(MPT3SAS_FMT "PCI error: slot reset callback!!\n", 10618 - ioc->name); 10794 + ioc_info(ioc, "PCI error: slot reset callback!!\n"); 10619 10795 10620 10796 ioc->pci_error_recovery = 0; 10621 10797 ioc->pdev = pdev; ··· 10625 10803 10626 10804 rc = mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER); 10627 10805 10628 - pr_warn(MPT3SAS_FMT "hard reset: %s\n", ioc->name, 10629 - (rc == 0) ? "success" : "failed"); 10806 + ioc_warn(ioc, "hard reset: %s\n", 10807 + (rc == 0) ? "success" : "failed"); 10630 10808 10631 10809 if (!rc) 10632 10810 return PCI_ERS_RESULT_RECOVERED; ··· 10648 10826 struct Scsi_Host *shost = pci_get_drvdata(pdev); 10649 10827 struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); 10650 10828 10651 - pr_info(MPT3SAS_FMT "PCI error: resume callback!!\n", ioc->name); 10829 + ioc_info(ioc, "PCI error: resume callback!!\n"); 10652 10830 10653 10831 pci_cleanup_aer_uncorrect_error_status(pdev); 10654 10832 mpt3sas_base_start_watchdog(ioc); ··· 10665 10843 struct Scsi_Host *shost = pci_get_drvdata(pdev); 10666 10844 struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); 10667 10845 10668 - pr_info(MPT3SAS_FMT "PCI error: mmio enabled callback!!\n", 10669 - ioc->name); 10846 + ioc_info(ioc, "PCI error: mmio enabled callback!!\n"); 10670 10847 10671 10848 /* TODO - dump whatever for debugging purposes */ 10672 10849
+140 -173
drivers/scsi/mpt3sas/mpt3sas_transport.c
··· 153 153 154 154 if ((mpt3sas_config_get_sas_device_pg0(ioc, &mpi_reply, &sas_device_pg0, 155 155 MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, handle))) { 156 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 157 - ioc->name, __FILE__, __LINE__, __func__); 156 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 157 + __FILE__, __LINE__, __func__); 158 158 return -ENXIO; 159 159 } 160 160 161 161 ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & 162 162 MPI2_IOCSTATUS_MASK; 163 163 if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { 164 - pr_err(MPT3SAS_FMT 165 - "handle(0x%04x), ioc_status(0x%04x)\nfailure at %s:%d/%s()!\n", 166 - ioc->name, handle, ioc_status, 167 - __FILE__, __LINE__, __func__); 164 + ioc_err(ioc, "handle(0x%04x), ioc_status(0x%04x) failure at %s:%d/%s()!\n", 165 + handle, ioc_status, __FILE__, __LINE__, __func__); 168 166 return -EIO; 169 167 } 170 168 ··· 316 318 mutex_lock(&ioc->transport_cmds.mutex); 317 319 318 320 if (ioc->transport_cmds.status != MPT3_CMD_NOT_USED) { 319 - pr_err(MPT3SAS_FMT "%s: transport_cmds in use\n", 320 - ioc->name, __func__); 321 + ioc_err(ioc, "%s: transport_cmds in use\n", __func__); 321 322 rc = -EAGAIN; 322 323 goto out; 323 324 } ··· 326 329 ioc_state = mpt3sas_base_get_iocstate(ioc, 1); 327 330 while (ioc_state != MPI2_IOC_STATE_OPERATIONAL) { 328 331 if (wait_state_count++ == 10) { 329 - pr_err(MPT3SAS_FMT 330 - "%s: failed due to ioc not operational\n", 331 - ioc->name, __func__); 332 + ioc_err(ioc, "%s: failed due to ioc not operational\n", 333 + __func__); 332 334 rc = -EFAULT; 333 335 goto out; 334 336 } 335 337 ssleep(1); 336 338 ioc_state = mpt3sas_base_get_iocstate(ioc, 1); 337 - pr_info(MPT3SAS_FMT 338 - "%s: waiting for operational state(count=%d)\n", 339 - ioc->name, __func__, wait_state_count); 339 + ioc_info(ioc, "%s: waiting for operational state(count=%d)\n", 340 + __func__, wait_state_count); 340 341 } 341 342 if (wait_state_count) 342 - pr_info(MPT3SAS_FMT "%s: ioc is operational\n", 343 - ioc->name, __func__); 343 + ioc_info(ioc, "%s: ioc is operational\n", __func__); 344 344 345 345 smid = mpt3sas_base_get_smid(ioc, ioc->transport_cb_idx); 346 346 if (!smid) { 347 - pr_err(MPT3SAS_FMT "%s: failed obtaining a smid\n", 348 - ioc->name, __func__); 347 + ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); 349 348 rc = -EAGAIN; 350 349 goto out; 351 350 } ··· 381 388 ioc->build_sg(ioc, psge, data_out_dma, data_out_sz, data_in_dma, 382 389 data_in_sz); 383 390 384 - dtransportprintk(ioc, pr_info(MPT3SAS_FMT 385 - "report_manufacture - send to sas_addr(0x%016llx)\n", 386 - ioc->name, (unsigned long long)sas_address)); 391 + dtransportprintk(ioc, 392 + ioc_info(ioc, "report_manufacture - send to sas_addr(0x%016llx)\n", 393 + (u64)sas_address)); 387 394 init_completion(&ioc->transport_cmds.done); 388 395 mpt3sas_base_put_smid_default(ioc, smid); 389 396 wait_for_completion_timeout(&ioc->transport_cmds.done, 10*HZ); 390 397 391 398 if (!(ioc->transport_cmds.status & MPT3_CMD_COMPLETE)) { 392 - pr_err(MPT3SAS_FMT "%s: timeout\n", 393 - ioc->name, __func__); 399 + ioc_err(ioc, "%s: timeout\n", __func__); 394 400 _debug_dump_mf(mpi_request, 395 401 sizeof(Mpi2SmpPassthroughRequest_t)/4); 396 402 if (!(ioc->transport_cmds.status & MPT3_CMD_RESET)) ··· 397 405 goto issue_host_reset; 398 406 } 399 407 400 - dtransportprintk(ioc, pr_info(MPT3SAS_FMT 401 - "report_manufacture - complete\n", ioc->name)); 408 + dtransportprintk(ioc, ioc_info(ioc, "report_manufacture - complete\n")); 402 409 403 410 if (ioc->transport_cmds.status & MPT3_CMD_REPLY_VALID) { 404 411 u8 *tmp; 405 412 406 413 mpi_reply = ioc->transport_cmds.reply; 407 414 408 - dtransportprintk(ioc, pr_info(MPT3SAS_FMT 409 - "report_manufacture - reply data transfer size(%d)\n", 410 - ioc->name, le16_to_cpu(mpi_reply->ResponseDataLength))); 415 + dtransportprintk(ioc, 416 + ioc_info(ioc, "report_manufacture - reply data transfer size(%d)\n", 417 + le16_to_cpu(mpi_reply->ResponseDataLength))); 411 418 412 419 if (le16_to_cpu(mpi_reply->ResponseDataLength) != 413 420 sizeof(struct rep_manu_reply)) ··· 430 439 manufacture_reply->component_revision_id; 431 440 } 432 441 } else 433 - dtransportprintk(ioc, pr_info(MPT3SAS_FMT 434 - "report_manufacture - no reply\n", ioc->name)); 442 + dtransportprintk(ioc, 443 + ioc_info(ioc, "report_manufacture - no reply\n")); 435 444 436 445 issue_host_reset: 437 446 if (issue_reset) ··· 634 643 mpt3sas_port = kzalloc(sizeof(struct _sas_port), 635 644 GFP_KERNEL); 636 645 if (!mpt3sas_port) { 637 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 638 - ioc->name, __FILE__, __LINE__, __func__); 646 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 647 + __FILE__, __LINE__, __func__); 639 648 return NULL; 640 649 } 641 650 ··· 646 655 spin_unlock_irqrestore(&ioc->sas_node_lock, flags); 647 656 648 657 if (!sas_node) { 649 - pr_err(MPT3SAS_FMT 650 - "%s: Could not find parent sas_address(0x%016llx)!\n", 651 - ioc->name, __func__, (unsigned long long)sas_address); 658 + ioc_err(ioc, "%s: Could not find parent sas_address(0x%016llx)!\n", 659 + __func__, (u64)sas_address); 652 660 goto out_fail; 653 661 } 654 662 655 663 if ((_transport_set_identify(ioc, handle, 656 664 &mpt3sas_port->remote_identify))) { 657 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 658 - ioc->name, __FILE__, __LINE__, __func__); 665 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 666 + __FILE__, __LINE__, __func__); 659 667 goto out_fail; 660 668 } 661 669 662 670 if (mpt3sas_port->remote_identify.device_type == SAS_PHY_UNUSED) { 663 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 664 - ioc->name, __FILE__, __LINE__, __func__); 671 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 672 + __FILE__, __LINE__, __func__); 665 673 goto out_fail; 666 674 } 667 675 ··· 677 687 } 678 688 679 689 if (!mpt3sas_port->num_phys) { 680 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 681 - ioc->name, __FILE__, __LINE__, __func__); 690 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 691 + __FILE__, __LINE__, __func__); 682 692 goto out_fail; 683 693 } 684 694 685 695 if (!sas_node->parent_dev) { 686 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 687 - ioc->name, __FILE__, __LINE__, __func__); 696 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 697 + __FILE__, __LINE__, __func__); 688 698 goto out_fail; 689 699 } 690 700 port = sas_port_alloc_num(sas_node->parent_dev); 691 701 if ((sas_port_add(port))) { 692 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 693 - ioc->name, __FILE__, __LINE__, __func__); 702 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 703 + __FILE__, __LINE__, __func__); 694 704 goto out_fail; 695 705 } 696 706 ··· 728 738 } 729 739 730 740 if ((sas_rphy_add(rphy))) { 731 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 732 - ioc->name, __FILE__, __LINE__, __func__); 741 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 742 + __FILE__, __LINE__, __func__); 733 743 } 734 744 735 745 if (mpt3sas_port->remote_identify.device_type == SAS_END_DEVICE) { ··· 851 861 INIT_LIST_HEAD(&mpt3sas_phy->port_siblings); 852 862 phy = sas_phy_alloc(parent_dev, phy_index); 853 863 if (!phy) { 854 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 855 - ioc->name, __FILE__, __LINE__, __func__); 864 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 865 + __FILE__, __LINE__, __func__); 856 866 return -1; 857 867 } 858 868 if ((_transport_set_identify(ioc, mpt3sas_phy->handle, 859 869 &mpt3sas_phy->identify))) { 860 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 861 - ioc->name, __FILE__, __LINE__, __func__); 870 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 871 + __FILE__, __LINE__, __func__); 862 872 sas_phy_free(phy); 863 873 return -1; 864 874 } ··· 880 890 phy_pg0.ProgrammedLinkRate >> 4); 881 891 882 892 if ((sas_phy_add(phy))) { 883 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 884 - ioc->name, __FILE__, __LINE__, __func__); 893 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 894 + __FILE__, __LINE__, __func__); 885 895 sas_phy_free(phy); 886 896 return -1; 887 897 } ··· 919 929 INIT_LIST_HEAD(&mpt3sas_phy->port_siblings); 920 930 phy = sas_phy_alloc(parent_dev, phy_index); 921 931 if (!phy) { 922 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 923 - ioc->name, __FILE__, __LINE__, __func__); 932 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 933 + __FILE__, __LINE__, __func__); 924 934 return -1; 925 935 } 926 936 if ((_transport_set_identify(ioc, mpt3sas_phy->handle, 927 937 &mpt3sas_phy->identify))) { 928 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 929 - ioc->name, __FILE__, __LINE__, __func__); 938 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 939 + __FILE__, __LINE__, __func__); 930 940 sas_phy_free(phy); 931 941 return -1; 932 942 } ··· 950 960 expander_pg1.ProgrammedLinkRate >> 4); 951 961 952 962 if ((sas_phy_add(phy))) { 953 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 954 - ioc->name, __FILE__, __LINE__, __func__); 963 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 964 + __FILE__, __LINE__, __func__); 955 965 sas_phy_free(phy); 956 966 return -1; 957 967 } ··· 1096 1106 mutex_lock(&ioc->transport_cmds.mutex); 1097 1107 1098 1108 if (ioc->transport_cmds.status != MPT3_CMD_NOT_USED) { 1099 - pr_err(MPT3SAS_FMT "%s: transport_cmds in use\n", 1100 - ioc->name, __func__); 1109 + ioc_err(ioc, "%s: transport_cmds in use\n", __func__); 1101 1110 rc = -EAGAIN; 1102 1111 goto out; 1103 1112 } ··· 1106 1117 ioc_state = mpt3sas_base_get_iocstate(ioc, 1); 1107 1118 while (ioc_state != MPI2_IOC_STATE_OPERATIONAL) { 1108 1119 if (wait_state_count++ == 10) { 1109 - pr_err(MPT3SAS_FMT 1110 - "%s: failed due to ioc not operational\n", 1111 - ioc->name, __func__); 1120 + ioc_err(ioc, "%s: failed due to ioc not operational\n", 1121 + __func__); 1112 1122 rc = -EFAULT; 1113 1123 goto out; 1114 1124 } 1115 1125 ssleep(1); 1116 1126 ioc_state = mpt3sas_base_get_iocstate(ioc, 1); 1117 - pr_info(MPT3SAS_FMT 1118 - "%s: waiting for operational state(count=%d)\n", 1119 - ioc->name, __func__, wait_state_count); 1127 + ioc_info(ioc, "%s: waiting for operational state(count=%d)\n", 1128 + __func__, wait_state_count); 1120 1129 } 1121 1130 if (wait_state_count) 1122 - pr_info(MPT3SAS_FMT "%s: ioc is operational\n", 1123 - ioc->name, __func__); 1131 + ioc_info(ioc, "%s: ioc is operational\n", __func__); 1124 1132 1125 1133 smid = mpt3sas_base_get_smid(ioc, ioc->transport_cb_idx); 1126 1134 if (!smid) { 1127 - pr_err(MPT3SAS_FMT "%s: failed obtaining a smid\n", 1128 - ioc->name, __func__); 1135 + ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); 1129 1136 rc = -EAGAIN; 1130 1137 goto out; 1131 1138 } ··· 1164 1179 data_out_dma + sizeof(struct phy_error_log_request), 1165 1180 sizeof(struct phy_error_log_reply)); 1166 1181 1167 - dtransportprintk(ioc, pr_info(MPT3SAS_FMT 1168 - "phy_error_log - send to sas_addr(0x%016llx), phy(%d)\n", 1169 - ioc->name, (unsigned long long)phy->identify.sas_address, 1170 - phy->number)); 1182 + dtransportprintk(ioc, 1183 + ioc_info(ioc, "phy_error_log - send to sas_addr(0x%016llx), phy(%d)\n", 1184 + (u64)phy->identify.sas_address, 1185 + phy->number)); 1171 1186 init_completion(&ioc->transport_cmds.done); 1172 1187 mpt3sas_base_put_smid_default(ioc, smid); 1173 1188 wait_for_completion_timeout(&ioc->transport_cmds.done, 10*HZ); 1174 1189 1175 1190 if (!(ioc->transport_cmds.status & MPT3_CMD_COMPLETE)) { 1176 - pr_err(MPT3SAS_FMT "%s: timeout\n", 1177 - ioc->name, __func__); 1191 + ioc_err(ioc, "%s: timeout\n", __func__); 1178 1192 _debug_dump_mf(mpi_request, 1179 1193 sizeof(Mpi2SmpPassthroughRequest_t)/4); 1180 1194 if (!(ioc->transport_cmds.status & MPT3_CMD_RESET)) ··· 1181 1197 goto issue_host_reset; 1182 1198 } 1183 1199 1184 - dtransportprintk(ioc, pr_info(MPT3SAS_FMT 1185 - "phy_error_log - complete\n", ioc->name)); 1200 + dtransportprintk(ioc, ioc_info(ioc, "phy_error_log - complete\n")); 1186 1201 1187 1202 if (ioc->transport_cmds.status & MPT3_CMD_REPLY_VALID) { 1188 1203 1189 1204 mpi_reply = ioc->transport_cmds.reply; 1190 1205 1191 - dtransportprintk(ioc, pr_info(MPT3SAS_FMT 1192 - "phy_error_log - reply data transfer size(%d)\n", 1193 - ioc->name, le16_to_cpu(mpi_reply->ResponseDataLength))); 1206 + dtransportprintk(ioc, 1207 + ioc_info(ioc, "phy_error_log - reply data transfer size(%d)\n", 1208 + le16_to_cpu(mpi_reply->ResponseDataLength))); 1194 1209 1195 1210 if (le16_to_cpu(mpi_reply->ResponseDataLength) != 1196 1211 sizeof(struct phy_error_log_reply)) ··· 1198 1215 phy_error_log_reply = data_out + 1199 1216 sizeof(struct phy_error_log_request); 1200 1217 1201 - dtransportprintk(ioc, pr_info(MPT3SAS_FMT 1202 - "phy_error_log - function_result(%d)\n", 1203 - ioc->name, phy_error_log_reply->function_result)); 1218 + dtransportprintk(ioc, 1219 + ioc_info(ioc, "phy_error_log - function_result(%d)\n", 1220 + phy_error_log_reply->function_result)); 1204 1221 1205 1222 phy->invalid_dword_count = 1206 1223 be32_to_cpu(phy_error_log_reply->invalid_dword); ··· 1212 1229 be32_to_cpu(phy_error_log_reply->phy_reset_problem); 1213 1230 rc = 0; 1214 1231 } else 1215 - dtransportprintk(ioc, pr_info(MPT3SAS_FMT 1216 - "phy_error_log - no reply\n", ioc->name)); 1232 + dtransportprintk(ioc, 1233 + ioc_info(ioc, "phy_error_log - no reply\n")); 1217 1234 1218 1235 issue_host_reset: 1219 1236 if (issue_reset) ··· 1256 1273 /* get hba phy error logs */ 1257 1274 if ((mpt3sas_config_get_phy_pg1(ioc, &mpi_reply, &phy_pg1, 1258 1275 phy->number))) { 1259 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 1260 - ioc->name, __FILE__, __LINE__, __func__); 1276 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 1277 + __FILE__, __LINE__, __func__); 1261 1278 return -ENXIO; 1262 1279 } 1263 1280 1264 1281 if (mpi_reply.IOCStatus || mpi_reply.IOCLogInfo) 1265 - pr_info(MPT3SAS_FMT 1266 - "phy(%d), ioc_status (0x%04x), loginfo(0x%08x)\n", 1267 - ioc->name, phy->number, 1268 - le16_to_cpu(mpi_reply.IOCStatus), 1269 - le32_to_cpu(mpi_reply.IOCLogInfo)); 1282 + ioc_info(ioc, "phy(%d), ioc_status (0x%04x), loginfo(0x%08x)\n", 1283 + phy->number, 1284 + le16_to_cpu(mpi_reply.IOCStatus), 1285 + le32_to_cpu(mpi_reply.IOCLogInfo)); 1270 1286 1271 1287 phy->invalid_dword_count = le32_to_cpu(phy_pg1.InvalidDwordCount); 1272 1288 phy->running_disparity_error_count = ··· 1401 1419 mutex_lock(&ioc->transport_cmds.mutex); 1402 1420 1403 1421 if (ioc->transport_cmds.status != MPT3_CMD_NOT_USED) { 1404 - pr_err(MPT3SAS_FMT "%s: transport_cmds in use\n", 1405 - ioc->name, __func__); 1422 + ioc_err(ioc, "%s: transport_cmds in use\n", __func__); 1406 1423 rc = -EAGAIN; 1407 1424 goto out; 1408 1425 } ··· 1411 1430 ioc_state = mpt3sas_base_get_iocstate(ioc, 1); 1412 1431 while (ioc_state != MPI2_IOC_STATE_OPERATIONAL) { 1413 1432 if (wait_state_count++ == 10) { 1414 - pr_err(MPT3SAS_FMT 1415 - "%s: failed due to ioc not operational\n", 1416 - ioc->name, __func__); 1433 + ioc_err(ioc, "%s: failed due to ioc not operational\n", 1434 + __func__); 1417 1435 rc = -EFAULT; 1418 1436 goto out; 1419 1437 } 1420 1438 ssleep(1); 1421 1439 ioc_state = mpt3sas_base_get_iocstate(ioc, 1); 1422 - pr_info(MPT3SAS_FMT 1423 - "%s: waiting for operational state(count=%d)\n", 1424 - ioc->name, __func__, wait_state_count); 1440 + ioc_info(ioc, "%s: waiting for operational state(count=%d)\n", 1441 + __func__, wait_state_count); 1425 1442 } 1426 1443 if (wait_state_count) 1427 - pr_info(MPT3SAS_FMT "%s: ioc is operational\n", 1428 - ioc->name, __func__); 1444 + ioc_info(ioc, "%s: ioc is operational\n", __func__); 1429 1445 1430 1446 smid = mpt3sas_base_get_smid(ioc, ioc->transport_cb_idx); 1431 1447 if (!smid) { 1432 - pr_err(MPT3SAS_FMT "%s: failed obtaining a smid\n", 1433 - ioc->name, __func__); 1448 + ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); 1434 1449 rc = -EAGAIN; 1435 1450 goto out; 1436 1451 } ··· 1474 1497 data_out_dma + sizeof(struct phy_control_request), 1475 1498 sizeof(struct phy_control_reply)); 1476 1499 1477 - dtransportprintk(ioc, pr_info(MPT3SAS_FMT 1478 - "phy_control - send to sas_addr(0x%016llx), phy(%d), opcode(%d)\n", 1479 - ioc->name, (unsigned long long)phy->identify.sas_address, 1480 - phy->number, phy_operation)); 1500 + dtransportprintk(ioc, 1501 + ioc_info(ioc, "phy_control - send to sas_addr(0x%016llx), phy(%d), opcode(%d)\n", 1502 + (u64)phy->identify.sas_address, 1503 + phy->number, phy_operation)); 1481 1504 init_completion(&ioc->transport_cmds.done); 1482 1505 mpt3sas_base_put_smid_default(ioc, smid); 1483 1506 wait_for_completion_timeout(&ioc->transport_cmds.done, 10*HZ); 1484 1507 1485 1508 if (!(ioc->transport_cmds.status & MPT3_CMD_COMPLETE)) { 1486 - pr_err(MPT3SAS_FMT "%s: timeout\n", 1487 - ioc->name, __func__); 1509 + ioc_err(ioc, "%s: timeout\n", __func__); 1488 1510 _debug_dump_mf(mpi_request, 1489 1511 sizeof(Mpi2SmpPassthroughRequest_t)/4); 1490 1512 if (!(ioc->transport_cmds.status & MPT3_CMD_RESET)) ··· 1491 1515 goto issue_host_reset; 1492 1516 } 1493 1517 1494 - dtransportprintk(ioc, pr_info(MPT3SAS_FMT 1495 - "phy_control - complete\n", ioc->name)); 1518 + dtransportprintk(ioc, ioc_info(ioc, "phy_control - complete\n")); 1496 1519 1497 1520 if (ioc->transport_cmds.status & MPT3_CMD_REPLY_VALID) { 1498 1521 1499 1522 mpi_reply = ioc->transport_cmds.reply; 1500 1523 1501 - dtransportprintk(ioc, pr_info(MPT3SAS_FMT 1502 - "phy_control - reply data transfer size(%d)\n", 1503 - ioc->name, le16_to_cpu(mpi_reply->ResponseDataLength))); 1524 + dtransportprintk(ioc, 1525 + ioc_info(ioc, "phy_control - reply data transfer size(%d)\n", 1526 + le16_to_cpu(mpi_reply->ResponseDataLength))); 1504 1527 1505 1528 if (le16_to_cpu(mpi_reply->ResponseDataLength) != 1506 1529 sizeof(struct phy_control_reply)) ··· 1508 1533 phy_control_reply = data_out + 1509 1534 sizeof(struct phy_control_request); 1510 1535 1511 - dtransportprintk(ioc, pr_info(MPT3SAS_FMT 1512 - "phy_control - function_result(%d)\n", 1513 - ioc->name, phy_control_reply->function_result)); 1536 + dtransportprintk(ioc, 1537 + ioc_info(ioc, "phy_control - function_result(%d)\n", 1538 + phy_control_reply->function_result)); 1514 1539 1515 1540 rc = 0; 1516 1541 } else 1517 - dtransportprintk(ioc, pr_info(MPT3SAS_FMT 1518 - "phy_control - no reply\n", ioc->name)); 1542 + dtransportprintk(ioc, 1543 + ioc_info(ioc, "phy_control - no reply\n")); 1519 1544 1520 1545 issue_host_reset: 1521 1546 if (issue_reset) ··· 1566 1591 mpi_request.PhyNum = phy->number; 1567 1592 1568 1593 if ((mpt3sas_base_sas_iounit_control(ioc, &mpi_reply, &mpi_request))) { 1569 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 1570 - ioc->name, __FILE__, __LINE__, __func__); 1594 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 1595 + __FILE__, __LINE__, __func__); 1571 1596 return -ENXIO; 1572 1597 } 1573 1598 1574 1599 if (mpi_reply.IOCStatus || mpi_reply.IOCLogInfo) 1575 - pr_info(MPT3SAS_FMT 1576 - "phy(%d), ioc_status(0x%04x), loginfo(0x%08x)\n", 1577 - ioc->name, phy->number, le16_to_cpu(mpi_reply.IOCStatus), 1578 - le32_to_cpu(mpi_reply.IOCLogInfo)); 1600 + ioc_info(ioc, "phy(%d), ioc_status(0x%04x), loginfo(0x%08x)\n", 1601 + phy->number, le16_to_cpu(mpi_reply.IOCStatus), 1602 + le32_to_cpu(mpi_reply.IOCLogInfo)); 1579 1603 1580 1604 return 0; 1581 1605 } ··· 1621 1647 sizeof(Mpi2SasIOUnit0PhyData_t)); 1622 1648 sas_iounit_pg0 = kzalloc(sz, GFP_KERNEL); 1623 1649 if (!sas_iounit_pg0) { 1624 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 1625 - ioc->name, __FILE__, __LINE__, __func__); 1650 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 1651 + __FILE__, __LINE__, __func__); 1626 1652 rc = -ENOMEM; 1627 1653 goto out; 1628 1654 } 1629 1655 if ((mpt3sas_config_get_sas_iounit_pg0(ioc, &mpi_reply, 1630 1656 sas_iounit_pg0, sz))) { 1631 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 1632 - ioc->name, __FILE__, __LINE__, __func__); 1657 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 1658 + __FILE__, __LINE__, __func__); 1633 1659 rc = -ENXIO; 1634 1660 goto out; 1635 1661 } 1636 1662 ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & 1637 1663 MPI2_IOCSTATUS_MASK; 1638 1664 if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { 1639 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 1640 - ioc->name, __FILE__, __LINE__, __func__); 1665 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 1666 + __FILE__, __LINE__, __func__); 1641 1667 rc = -EIO; 1642 1668 goto out; 1643 1669 } ··· 1646 1672 for (i = 0, discovery_active = 0; i < ioc->sas_hba.num_phys ; i++) { 1647 1673 if (sas_iounit_pg0->PhyData[i].PortFlags & 1648 1674 MPI2_SASIOUNIT0_PORTFLAGS_DISCOVERY_IN_PROGRESS) { 1649 - pr_err(MPT3SAS_FMT "discovery is active on " \ 1650 - "port = %d, phy = %d: unable to enable/disable " 1651 - "phys, try again later!\n", ioc->name, 1652 - sas_iounit_pg0->PhyData[i].Port, i); 1675 + ioc_err(ioc, "discovery is active on port = %d, phy = %d: unable to enable/disable phys, try again later!\n", 1676 + sas_iounit_pg0->PhyData[i].Port, i); 1653 1677 discovery_active = 1; 1654 1678 } 1655 1679 } ··· 1662 1690 sizeof(Mpi2SasIOUnit1PhyData_t)); 1663 1691 sas_iounit_pg1 = kzalloc(sz, GFP_KERNEL); 1664 1692 if (!sas_iounit_pg1) { 1665 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 1666 - ioc->name, __FILE__, __LINE__, __func__); 1693 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 1694 + __FILE__, __LINE__, __func__); 1667 1695 rc = -ENOMEM; 1668 1696 goto out; 1669 1697 } 1670 1698 if ((mpt3sas_config_get_sas_iounit_pg1(ioc, &mpi_reply, 1671 1699 sas_iounit_pg1, sz))) { 1672 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 1673 - ioc->name, __FILE__, __LINE__, __func__); 1700 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 1701 + __FILE__, __LINE__, __func__); 1674 1702 rc = -ENXIO; 1675 1703 goto out; 1676 1704 } 1677 1705 ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & 1678 1706 MPI2_IOCSTATUS_MASK; 1679 1707 if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { 1680 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 1681 - ioc->name, __FILE__, __LINE__, __func__); 1708 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 1709 + __FILE__, __LINE__, __func__); 1682 1710 rc = -EIO; 1683 1711 goto out; 1684 1712 } ··· 1770 1798 sizeof(Mpi2SasIOUnit1PhyData_t)); 1771 1799 sas_iounit_pg1 = kzalloc(sz, GFP_KERNEL); 1772 1800 if (!sas_iounit_pg1) { 1773 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 1774 - ioc->name, __FILE__, __LINE__, __func__); 1801 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 1802 + __FILE__, __LINE__, __func__); 1775 1803 rc = -ENOMEM; 1776 1804 goto out; 1777 1805 } 1778 1806 if ((mpt3sas_config_get_sas_iounit_pg1(ioc, &mpi_reply, 1779 1807 sas_iounit_pg1, sz))) { 1780 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 1781 - ioc->name, __FILE__, __LINE__, __func__); 1808 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 1809 + __FILE__, __LINE__, __func__); 1782 1810 rc = -ENXIO; 1783 1811 goto out; 1784 1812 } 1785 1813 ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & 1786 1814 MPI2_IOCSTATUS_MASK; 1787 1815 if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { 1788 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 1789 - ioc->name, __FILE__, __LINE__, __func__); 1816 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 1817 + __FILE__, __LINE__, __func__); 1790 1818 rc = -EIO; 1791 1819 goto out; 1792 1820 } ··· 1805 1833 1806 1834 if (mpt3sas_config_set_sas_iounit_pg1(ioc, &mpi_reply, sas_iounit_pg1, 1807 1835 sz)) { 1808 - pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", 1809 - ioc->name, __FILE__, __LINE__, __func__); 1836 + ioc_err(ioc, "failure at %s:%d/%s()!\n", 1837 + __FILE__, __LINE__, __func__); 1810 1838 rc = -ENXIO; 1811 1839 goto out; 1812 1840 } ··· 1905 1933 goto job_done; 1906 1934 1907 1935 if (ioc->transport_cmds.status != MPT3_CMD_NOT_USED) { 1908 - pr_err(MPT3SAS_FMT "%s: transport_cmds in use\n", ioc->name, 1909 - __func__); 1936 + ioc_err(ioc, "%s: transport_cmds in use\n", 1937 + __func__); 1910 1938 rc = -EAGAIN; 1911 1939 goto out; 1912 1940 } ··· 1931 1959 ioc_state = mpt3sas_base_get_iocstate(ioc, 1); 1932 1960 while (ioc_state != MPI2_IOC_STATE_OPERATIONAL) { 1933 1961 if (wait_state_count++ == 10) { 1934 - pr_err(MPT3SAS_FMT 1935 - "%s: failed due to ioc not operational\n", 1936 - ioc->name, __func__); 1962 + ioc_err(ioc, "%s: failed due to ioc not operational\n", 1963 + __func__); 1937 1964 rc = -EFAULT; 1938 1965 goto unmap_in; 1939 1966 } 1940 1967 ssleep(1); 1941 1968 ioc_state = mpt3sas_base_get_iocstate(ioc, 1); 1942 - pr_info(MPT3SAS_FMT 1943 - "%s: waiting for operational state(count=%d)\n", 1944 - ioc->name, __func__, wait_state_count); 1969 + ioc_info(ioc, "%s: waiting for operational state(count=%d)\n", 1970 + __func__, wait_state_count); 1945 1971 } 1946 1972 if (wait_state_count) 1947 - pr_info(MPT3SAS_FMT "%s: ioc is operational\n", 1948 - ioc->name, __func__); 1973 + ioc_info(ioc, "%s: ioc is operational\n", __func__); 1949 1974 1950 1975 smid = mpt3sas_base_get_smid(ioc, ioc->transport_cb_idx); 1951 1976 if (!smid) { 1952 - pr_err(MPT3SAS_FMT "%s: failed obtaining a smid\n", 1953 - ioc->name, __func__); 1977 + ioc_err(ioc, "%s: failed obtaining a smid\n", __func__); 1954 1978 rc = -EAGAIN; 1955 1979 goto unmap_in; 1956 1980 } ··· 1967 1999 ioc->build_sg(ioc, psge, dma_addr_out, dma_len_out - 4, dma_addr_in, 1968 2000 dma_len_in - 4); 1969 2001 1970 - dtransportprintk(ioc, pr_info(MPT3SAS_FMT 1971 - "%s - sending smp request\n", ioc->name, __func__)); 2002 + dtransportprintk(ioc, 2003 + ioc_info(ioc, "%s: sending smp request\n", __func__)); 1972 2004 1973 2005 init_completion(&ioc->transport_cmds.done); 1974 2006 mpt3sas_base_put_smid_default(ioc, smid); ··· 1986 2018 } 1987 2019 } 1988 2020 1989 - dtransportprintk(ioc, pr_info(MPT3SAS_FMT 1990 - "%s - complete\n", ioc->name, __func__)); 2021 + dtransportprintk(ioc, ioc_info(ioc, "%s - complete\n", __func__)); 1991 2022 1992 2023 if (!(ioc->transport_cmds.status & MPT3_CMD_REPLY_VALID)) { 1993 - dtransportprintk(ioc, pr_info(MPT3SAS_FMT 1994 - "%s - no reply\n", ioc->name, __func__)); 2024 + dtransportprintk(ioc, 2025 + ioc_info(ioc, "%s: no reply\n", __func__)); 1995 2026 rc = -ENXIO; 1996 2027 goto unmap_in; 1997 2028 } ··· 1998 2031 mpi_reply = ioc->transport_cmds.reply; 1999 2032 2000 2033 dtransportprintk(ioc, 2001 - pr_info(MPT3SAS_FMT "%s - reply data transfer size(%d)\n", 2002 - ioc->name, __func__, 2003 - le16_to_cpu(mpi_reply->ResponseDataLength))); 2034 + ioc_info(ioc, "%s: reply data transfer size(%d)\n", 2035 + __func__, 2036 + le16_to_cpu(mpi_reply->ResponseDataLength))); 2004 2037 2005 2038 memcpy(job->reply, mpi_reply, sizeof(*mpi_reply)); 2006 2039 job->reply_len = sizeof(*mpi_reply);
+50 -51
drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c
··· 72 72 u16 sz, event_data_sz; 73 73 unsigned long flags; 74 74 75 - dTriggerDiagPrintk(ioc, pr_info(MPT3SAS_FMT "%s: enter\n", 76 - ioc->name, __func__)); 75 + dTriggerDiagPrintk(ioc, ioc_info(ioc, "%s: enter\n", __func__)); 77 76 78 77 sz = offsetof(Mpi2EventNotificationReply_t, EventData) + 79 78 sizeof(struct SL_WH_TRIGGERS_EVENT_DATA_T) + 4; ··· 84 85 mpi_reply->EventDataLength = cpu_to_le16(event_data_sz); 85 86 memcpy(&mpi_reply->EventData, event_data, 86 87 sizeof(struct SL_WH_TRIGGERS_EVENT_DATA_T)); 87 - dTriggerDiagPrintk(ioc, pr_info(MPT3SAS_FMT 88 - "%s: add to driver event log\n", 89 - ioc->name, __func__)); 88 + dTriggerDiagPrintk(ioc, 89 + ioc_info(ioc, "%s: add to driver event log\n", 90 + __func__)); 90 91 mpt3sas_ctl_add_to_event_log(ioc, mpi_reply); 91 92 kfree(mpi_reply); 92 93 out: 93 94 94 95 /* clearing the diag_trigger_active flag */ 95 96 spin_lock_irqsave(&ioc->diag_trigger_lock, flags); 96 - dTriggerDiagPrintk(ioc, pr_info(MPT3SAS_FMT 97 - "%s: clearing diag_trigger_active flag\n", 98 - ioc->name, __func__)); 97 + dTriggerDiagPrintk(ioc, 98 + ioc_info(ioc, "%s: clearing diag_trigger_active flag\n", 99 + __func__)); 99 100 ioc->diag_trigger_active = 0; 100 101 spin_unlock_irqrestore(&ioc->diag_trigger_lock, flags); 101 102 102 - dTriggerDiagPrintk(ioc, pr_info(MPT3SAS_FMT "%s: exit\n", ioc->name, 103 - __func__)); 103 + dTriggerDiagPrintk(ioc, ioc_info(ioc, "%s: exit\n", 104 + __func__)); 104 105 } 105 106 106 107 /** ··· 114 115 { 115 116 u8 issue_reset = 0; 116 117 117 - dTriggerDiagPrintk(ioc, pr_info(MPT3SAS_FMT "%s: enter\n", 118 - ioc->name, __func__)); 118 + dTriggerDiagPrintk(ioc, ioc_info(ioc, "%s: enter\n", __func__)); 119 119 120 120 /* release the diag buffer trace */ 121 121 if ((ioc->diag_buffer_status[MPI2_DIAG_BUF_TYPE_TRACE] & 122 122 MPT3_DIAG_BUFFER_IS_RELEASED) == 0) { 123 - dTriggerDiagPrintk(ioc, pr_info(MPT3SAS_FMT 124 - "%s: release trace diag buffer\n", ioc->name, __func__)); 123 + dTriggerDiagPrintk(ioc, 124 + ioc_info(ioc, "%s: release trace diag buffer\n", 125 + __func__)); 125 126 mpt3sas_send_diag_release(ioc, MPI2_DIAG_BUF_TYPE_TRACE, 126 127 &issue_reset); 127 128 } 128 129 129 130 _mpt3sas_raise_sigio(ioc, event_data); 130 131 131 - dTriggerDiagPrintk(ioc, pr_info(MPT3SAS_FMT "%s: exit\n", ioc->name, 132 - __func__)); 132 + dTriggerDiagPrintk(ioc, ioc_info(ioc, "%s: exit\n", 133 + __func__)); 133 134 } 134 135 135 136 /** ··· 167 168 168 169 by_pass_checks: 169 170 170 - dTriggerDiagPrintk(ioc, pr_info(MPT3SAS_FMT 171 - "%s: enter - trigger_bitmask = 0x%08x\n", 172 - ioc->name, __func__, trigger_bitmask)); 171 + dTriggerDiagPrintk(ioc, 172 + ioc_info(ioc, "%s: enter - trigger_bitmask = 0x%08x\n", 173 + __func__, trigger_bitmask)); 173 174 174 175 /* don't send trigger if an trigger is currently active */ 175 176 if (ioc->diag_trigger_active) { ··· 181 182 if (ioc->diag_trigger_master.MasterData & trigger_bitmask) { 182 183 found_match = 1; 183 184 ioc->diag_trigger_active = 1; 184 - dTriggerDiagPrintk(ioc, pr_info(MPT3SAS_FMT 185 - "%s: setting diag_trigger_active flag\n", 186 - ioc->name, __func__)); 185 + dTriggerDiagPrintk(ioc, 186 + ioc_info(ioc, "%s: setting diag_trigger_active flag\n", 187 + __func__)); 187 188 } 188 189 spin_unlock_irqrestore(&ioc->diag_trigger_lock, flags); 189 190 ··· 201 202 mpt3sas_send_trigger_data_event(ioc, &event_data); 202 203 203 204 out: 204 - dTriggerDiagPrintk(ioc, pr_info(MPT3SAS_FMT "%s: exit\n", ioc->name, 205 - __func__)); 205 + dTriggerDiagPrintk(ioc, ioc_info(ioc, "%s: exit\n", 206 + __func__)); 206 207 } 207 208 208 209 /** ··· 238 239 return; 239 240 } 240 241 241 - dTriggerDiagPrintk(ioc, pr_info(MPT3SAS_FMT 242 - "%s: enter - event = 0x%04x, log_entry_qualifier = 0x%04x\n", 243 - ioc->name, __func__, event, log_entry_qualifier)); 242 + dTriggerDiagPrintk(ioc, 243 + ioc_info(ioc, "%s: enter - event = 0x%04x, log_entry_qualifier = 0x%04x\n", 244 + __func__, event, log_entry_qualifier)); 244 245 245 246 /* don't send trigger if an trigger is currently active */ 246 247 if (ioc->diag_trigger_active) { ··· 262 263 } 263 264 found_match = 1; 264 265 ioc->diag_trigger_active = 1; 265 - dTriggerDiagPrintk(ioc, pr_info(MPT3SAS_FMT 266 - "%s: setting diag_trigger_active flag\n", 267 - ioc->name, __func__)); 266 + dTriggerDiagPrintk(ioc, 267 + ioc_info(ioc, "%s: setting diag_trigger_active flag\n", 268 + __func__)); 268 269 } 269 270 spin_unlock_irqrestore(&ioc->diag_trigger_lock, flags); 270 271 271 272 if (!found_match) 272 273 goto out; 273 274 274 - dTriggerDiagPrintk(ioc, pr_info(MPT3SAS_FMT 275 - "%s: setting diag_trigger_active flag\n", 276 - ioc->name, __func__)); 275 + dTriggerDiagPrintk(ioc, 276 + ioc_info(ioc, "%s: setting diag_trigger_active flag\n", 277 + __func__)); 277 278 memset(&event_data, 0, sizeof(struct SL_WH_TRIGGERS_EVENT_DATA_T)); 278 279 event_data.trigger_type = MPT3SAS_TRIGGER_EVENT; 279 280 event_data.u.event.EventValue = event; 280 281 event_data.u.event.LogEntryQualifier = log_entry_qualifier; 281 282 mpt3sas_send_trigger_data_event(ioc, &event_data); 282 283 out: 283 - dTriggerDiagPrintk(ioc, pr_info(MPT3SAS_FMT "%s: exit\n", ioc->name, 284 - __func__)); 284 + dTriggerDiagPrintk(ioc, ioc_info(ioc, "%s: exit\n", 285 + __func__)); 285 286 } 286 287 287 288 /** ··· 318 319 return; 319 320 } 320 321 321 - dTriggerDiagPrintk(ioc, pr_info(MPT3SAS_FMT 322 - "%s: enter - sense_key = 0x%02x, asc = 0x%02x, ascq = 0x%02x\n", 323 - ioc->name, __func__, sense_key, asc, ascq)); 322 + dTriggerDiagPrintk(ioc, 323 + ioc_info(ioc, "%s: enter - sense_key = 0x%02x, asc = 0x%02x, ascq = 0x%02x\n", 324 + __func__, sense_key, asc, ascq)); 324 325 325 326 /* don't send trigger if an trigger is currently active */ 326 327 if (ioc->diag_trigger_active) { ··· 346 347 if (!found_match) 347 348 goto out; 348 349 349 - dTriggerDiagPrintk(ioc, pr_info(MPT3SAS_FMT 350 - "%s: setting diag_trigger_active flag\n", 351 - ioc->name, __func__)); 350 + dTriggerDiagPrintk(ioc, 351 + ioc_info(ioc, "%s: setting diag_trigger_active flag\n", 352 + __func__)); 352 353 memset(&event_data, 0, sizeof(struct SL_WH_TRIGGERS_EVENT_DATA_T)); 353 354 event_data.trigger_type = MPT3SAS_TRIGGER_SCSI; 354 355 event_data.u.scsi.SenseKey = sense_key; ··· 356 357 event_data.u.scsi.ASCQ = ascq; 357 358 mpt3sas_send_trigger_data_event(ioc, &event_data); 358 359 out: 359 - dTriggerDiagPrintk(ioc, pr_info(MPT3SAS_FMT "%s: exit\n", ioc->name, 360 - __func__)); 360 + dTriggerDiagPrintk(ioc, ioc_info(ioc, "%s: exit\n", 361 + __func__)); 361 362 } 362 363 363 364 /** ··· 392 393 return; 393 394 } 394 395 395 - dTriggerDiagPrintk(ioc, pr_info(MPT3SAS_FMT 396 - "%s: enter - ioc_status = 0x%04x, loginfo = 0x%08x\n", 397 - ioc->name, __func__, ioc_status, loginfo)); 396 + dTriggerDiagPrintk(ioc, 397 + ioc_info(ioc, "%s: enter - ioc_status = 0x%04x, loginfo = 0x%08x\n", 398 + __func__, ioc_status, loginfo)); 398 399 399 400 /* don't send trigger if an trigger is currently active */ 400 401 if (ioc->diag_trigger_active) { ··· 419 420 if (!found_match) 420 421 goto out; 421 422 422 - dTriggerDiagPrintk(ioc, pr_info(MPT3SAS_FMT 423 - "%s: setting diag_trigger_active flag\n", 424 - ioc->name, __func__)); 423 + dTriggerDiagPrintk(ioc, 424 + ioc_info(ioc, "%s: setting diag_trigger_active flag\n", 425 + __func__)); 425 426 memset(&event_data, 0, sizeof(struct SL_WH_TRIGGERS_EVENT_DATA_T)); 426 427 event_data.trigger_type = MPT3SAS_TRIGGER_MPI; 427 428 event_data.u.mpi.IOCStatus = ioc_status; 428 429 event_data.u.mpi.IocLogInfo = loginfo; 429 430 mpt3sas_send_trigger_data_event(ioc, &event_data); 430 431 out: 431 - dTriggerDiagPrintk(ioc, pr_info(MPT3SAS_FMT "%s: exit\n", ioc->name, 432 - __func__)); 432 + dTriggerDiagPrintk(ioc, ioc_info(ioc, "%s: exit\n", 433 + __func__)); 433 434 }
+27 -43
drivers/scsi/mpt3sas/mpt3sas_warpdrive.c
··· 127 127 return; 128 128 129 129 if (ioc->mfg_pg10_hide_flag == MFG_PAGE10_EXPOSE_ALL_DISKS) { 130 - pr_info(MPT3SAS_FMT "WarpDrive : Direct IO is disabled " 131 - "globally as drives are exposed\n", ioc->name); 130 + ioc_info(ioc, "WarpDrive : Direct IO is disabled globally as drives are exposed\n"); 132 131 return; 133 132 } 134 133 if (mpt3sas_get_num_volumes(ioc) > 1) { 135 134 _warpdrive_disable_ddio(ioc); 136 - pr_info(MPT3SAS_FMT "WarpDrive : Direct IO is disabled " 137 - "globally as number of drives > 1\n", ioc->name); 135 + ioc_info(ioc, "WarpDrive : Direct IO is disabled globally as number of drives > 1\n"); 138 136 return; 139 137 } 140 138 if ((mpt3sas_config_get_number_pds(ioc, raid_device->handle, 141 139 &num_pds)) || !num_pds) { 142 - pr_info(MPT3SAS_FMT "WarpDrive : Direct IO is disabled " 143 - "Failure in computing number of drives\n", ioc->name); 140 + ioc_info(ioc, "WarpDrive : Direct IO is disabled Failure in computing number of drives\n"); 144 141 return; 145 142 } 146 143 ··· 145 148 sizeof(Mpi2RaidVol0PhysDisk_t)); 146 149 vol_pg0 = kzalloc(sz, GFP_KERNEL); 147 150 if (!vol_pg0) { 148 - pr_info(MPT3SAS_FMT "WarpDrive : Direct IO is disabled " 149 - "Memory allocation failure for RVPG0\n", ioc->name); 151 + ioc_info(ioc, "WarpDrive : Direct IO is disabled Memory allocation failure for RVPG0\n"); 150 152 return; 151 153 } 152 154 153 155 if ((mpt3sas_config_get_raid_volume_pg0(ioc, &mpi_reply, vol_pg0, 154 156 MPI2_RAID_VOLUME_PGAD_FORM_HANDLE, raid_device->handle, sz))) { 155 - pr_info(MPT3SAS_FMT "WarpDrive : Direct IO is disabled " 156 - "Failure in retrieving RVPG0\n", ioc->name); 157 + ioc_info(ioc, "WarpDrive : Direct IO is disabled Failure in retrieving RVPG0\n"); 157 158 kfree(vol_pg0); 158 159 return; 159 160 } ··· 161 166 * assumed for WARPDRIVE, disable direct I/O 162 167 */ 163 168 if (num_pds > MPT_MAX_WARPDRIVE_PDS) { 164 - pr_warn(MPT3SAS_FMT "WarpDrive : Direct IO is disabled " 165 - "for the drive with handle(0x%04x): num_mem=%d, " 166 - "max_mem_allowed=%d\n", ioc->name, raid_device->handle, 167 - num_pds, MPT_MAX_WARPDRIVE_PDS); 169 + ioc_warn(ioc, "WarpDrive : Direct IO is disabled for the drive with handle(0x%04x): num_mem=%d, max_mem_allowed=%d\n", 170 + raid_device->handle, num_pds, MPT_MAX_WARPDRIVE_PDS); 168 171 kfree(vol_pg0); 169 172 return; 170 173 } ··· 172 179 vol_pg0->PhysDisk[count].PhysDiskNum) || 173 180 le16_to_cpu(pd_pg0.DevHandle) == 174 181 MPT3SAS_INVALID_DEVICE_HANDLE) { 175 - pr_info(MPT3SAS_FMT "WarpDrive : Direct IO is " 176 - "disabled for the drive with handle(0x%04x) member" 177 - "handle retrieval failed for member number=%d\n", 178 - ioc->name, raid_device->handle, 179 - vol_pg0->PhysDisk[count].PhysDiskNum); 182 + ioc_info(ioc, "WarpDrive : Direct IO is disabled for the drive with handle(0x%04x) member handle retrieval failed for member number=%d\n", 183 + raid_device->handle, 184 + vol_pg0->PhysDisk[count].PhysDiskNum); 180 185 goto out_error; 181 186 } 182 187 /* Disable direct I/O if member drive lba exceeds 4 bytes */ 183 188 dev_max_lba = le64_to_cpu(pd_pg0.DeviceMaxLBA); 184 189 if (dev_max_lba >> 32) { 185 - pr_info(MPT3SAS_FMT "WarpDrive : Direct IO is " 186 - "disabled for the drive with handle(0x%04x) member" 187 - " handle (0x%04x) unsupported max lba 0x%016llx\n", 188 - ioc->name, raid_device->handle, 189 - le16_to_cpu(pd_pg0.DevHandle), 190 - (unsigned long long)dev_max_lba); 190 + ioc_info(ioc, "WarpDrive : Direct IO is disabled for the drive with handle(0x%04x) member handle (0x%04x) unsupported max lba 0x%016llx\n", 191 + raid_device->handle, 192 + le16_to_cpu(pd_pg0.DevHandle), 193 + (u64)dev_max_lba); 191 194 goto out_error; 192 195 } 193 196 ··· 195 206 * not RAID0 196 207 */ 197 208 if (raid_device->volume_type != MPI2_RAID_VOL_TYPE_RAID0) { 198 - pr_info(MPT3SAS_FMT "WarpDrive : Direct IO is disabled " 199 - "for the drive with handle(0x%04x): type=%d, " 200 - "s_sz=%uK, blk_size=%u\n", ioc->name, 201 - raid_device->handle, raid_device->volume_type, 202 - (le32_to_cpu(vol_pg0->StripeSize) * 203 - le16_to_cpu(vol_pg0->BlockSize)) / 1024, 204 - le16_to_cpu(vol_pg0->BlockSize)); 209 + ioc_info(ioc, "WarpDrive : Direct IO is disabled for the drive with handle(0x%04x): type=%d, s_sz=%uK, blk_size=%u\n", 210 + raid_device->handle, raid_device->volume_type, 211 + (le32_to_cpu(vol_pg0->StripeSize) * 212 + le16_to_cpu(vol_pg0->BlockSize)) / 1024, 213 + le16_to_cpu(vol_pg0->BlockSize)); 205 214 goto out_error; 206 215 } 207 216 208 217 stripe_sz = le32_to_cpu(vol_pg0->StripeSize); 209 218 stripe_exp = find_first_bit(&stripe_sz, 32); 210 219 if (stripe_exp == 32) { 211 - pr_info(MPT3SAS_FMT "WarpDrive : Direct IO is disabled " 212 - "for the drive with handle(0x%04x) invalid stripe sz %uK\n", 213 - ioc->name, raid_device->handle, 214 - (le32_to_cpu(vol_pg0->StripeSize) * 215 - le16_to_cpu(vol_pg0->BlockSize)) / 1024); 220 + ioc_info(ioc, "WarpDrive : Direct IO is disabled for the drive with handle(0x%04x) invalid stripe sz %uK\n", 221 + raid_device->handle, 222 + (le32_to_cpu(vol_pg0->StripeSize) * 223 + le16_to_cpu(vol_pg0->BlockSize)) / 1024); 216 224 goto out_error; 217 225 } 218 226 raid_device->stripe_exponent = stripe_exp; 219 227 block_sz = le16_to_cpu(vol_pg0->BlockSize); 220 228 block_exp = find_first_bit(&block_sz, 16); 221 229 if (block_exp == 16) { 222 - pr_info(MPT3SAS_FMT "WarpDrive : Direct IO is disabled " 223 - "for the drive with handle(0x%04x) invalid block sz %u\n", 224 - ioc->name, raid_device->handle, 225 - le16_to_cpu(vol_pg0->BlockSize)); 230 + ioc_info(ioc, "WarpDrive : Direct IO is disabled for the drive with handle(0x%04x) invalid block sz %u\n", 231 + raid_device->handle, le16_to_cpu(vol_pg0->BlockSize)); 226 232 goto out_error; 227 233 } 228 234 raid_device->block_exponent = block_exp; 229 235 raid_device->direct_io_enabled = 1; 230 236 231 - pr_info(MPT3SAS_FMT "WarpDrive : Direct IO is Enabled for the drive" 232 - " with handle(0x%04x)\n", ioc->name, raid_device->handle); 237 + ioc_info(ioc, "WarpDrive : Direct IO is Enabled for the drive with handle(0x%04x)\n", 238 + raid_device->handle); 233 239 /* 234 240 * WARPDRIVE: Though the following fields are not used for direct IO, 235 241 * stored for future purpose: