[SCSI] qla2xxx: Swap enablement order of EFT and FCE.

The firmware group has suggested that FCE (Fibre Channel Event)
tracing be enabled prior to EFT (Extended Firmware Tracing) to
maximize the capturing of data on the wire. This change has no
real semantic effect on driver operation, as it's mostly a
shuffling of code.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>

authored by

Andrew Vasquez and committed by
James Bottomley
436a7b11 1ee27146

+43 -43
+43 -43
drivers/scsi/qla2xxx/qla_init.c
··· 768 768 mem_size = (ha->fw_memory_size - 0x100000 + 1) * 769 769 sizeof(uint32_t); 770 770 771 + /* Allocate memory for Fibre Channel Event Buffer. */ 772 + if (!IS_QLA25XX(ha)) 773 + goto try_eft; 774 + 775 + tc = dma_alloc_coherent(&ha->pdev->dev, FCE_SIZE, &tc_dma, 776 + GFP_KERNEL); 777 + if (!tc) { 778 + qla_printk(KERN_WARNING, ha, "Unable to allocate " 779 + "(%d KB) for FCE.\n", FCE_SIZE / 1024); 780 + goto try_eft; 781 + } 782 + 783 + memset(tc, 0, FCE_SIZE); 784 + rval = qla2x00_enable_fce_trace(ha, tc_dma, FCE_NUM_BUFFERS, 785 + ha->fce_mb, &ha->fce_bufs); 786 + if (rval) { 787 + qla_printk(KERN_WARNING, ha, "Unable to initialize " 788 + "FCE (%d).\n", rval); 789 + dma_free_coherent(&ha->pdev->dev, FCE_SIZE, tc, 790 + tc_dma); 791 + ha->flags.fce_enabled = 0; 792 + goto try_eft; 793 + } 794 + 795 + qla_printk(KERN_INFO, ha, "Allocated (%d KB) for FCE...\n", 796 + FCE_SIZE / 1024); 797 + 798 + fce_size = sizeof(struct qla2xxx_fce_chain) + EFT_SIZE; 799 + ha->flags.fce_enabled = 1; 800 + ha->fce_dma = tc_dma; 801 + ha->fce = tc; 802 + try_eft: 771 803 /* Allocate memory for Extended Trace Buffer. */ 772 804 tc = dma_alloc_coherent(&ha->pdev->dev, EFT_SIZE, &tc_dma, 773 805 GFP_KERNEL); ··· 825 793 eft_size = EFT_SIZE; 826 794 ha->eft_dma = tc_dma; 827 795 ha->eft = tc; 828 - 829 - /* Allocate memory for Fibre Channel Event Buffer. */ 830 - if (!IS_QLA25XX(ha)) 831 - goto cont_alloc; 832 - 833 - tc = dma_alloc_coherent(&ha->pdev->dev, FCE_SIZE, &tc_dma, 834 - GFP_KERNEL); 835 - if (!tc) { 836 - qla_printk(KERN_WARNING, ha, "Unable to allocate " 837 - "(%d KB) for FCE.\n", FCE_SIZE / 1024); 838 - goto cont_alloc; 839 - } 840 - 841 - memset(tc, 0, FCE_SIZE); 842 - rval = qla2x00_enable_fce_trace(ha, tc_dma, FCE_NUM_BUFFERS, 843 - ha->fce_mb, &ha->fce_bufs); 844 - if (rval) { 845 - qla_printk(KERN_WARNING, ha, "Unable to initialize " 846 - "FCE (%d).\n", rval); 847 - dma_free_coherent(&ha->pdev->dev, FCE_SIZE, tc, 848 - tc_dma); 849 - ha->flags.fce_enabled = 0; 850 - goto cont_alloc; 851 - } 852 - 853 - qla_printk(KERN_INFO, ha, "Allocated (%d KB) for FCE...\n", 854 - FCE_SIZE / 1024); 855 - 856 - fce_size = sizeof(struct qla2xxx_fce_chain) + EFT_SIZE; 857 - ha->flags.fce_enabled = 1; 858 - ha->fce_dma = tc_dma; 859 - ha->fce = tc; 860 796 } 861 797 cont_alloc: 862 798 req_q_size = ha->request_q_length * sizeof(request_t); ··· 3286 3286 ha->isp_abort_cnt = 0; 3287 3287 clear_bit(ISP_ABORT_RETRY, &ha->dpc_flags); 3288 3288 3289 - if (ha->eft) { 3290 - memset(ha->eft, 0, EFT_SIZE); 3291 - rval = qla2x00_enable_eft_trace(ha, 3292 - ha->eft_dma, EFT_NUM_BUFFERS); 3293 - if (rval) { 3294 - qla_printk(KERN_WARNING, ha, 3295 - "Unable to reinitialize EFT " 3296 - "(%d).\n", rval); 3297 - } 3298 - } 3299 - 3300 3289 if (ha->fce) { 3301 3290 ha->flags.fce_enabled = 1; 3302 3291 memset(ha->fce, 0, ··· 3298 3309 "Unable to reinitialize FCE " 3299 3310 "(%d).\n", rval); 3300 3311 ha->flags.fce_enabled = 0; 3312 + } 3313 + } 3314 + 3315 + if (ha->eft) { 3316 + memset(ha->eft, 0, EFT_SIZE); 3317 + rval = qla2x00_enable_eft_trace(ha, 3318 + ha->eft_dma, EFT_NUM_BUFFERS); 3319 + if (rval) { 3320 + qla_printk(KERN_WARNING, ha, 3321 + "Unable to reinitialize EFT " 3322 + "(%d).\n", rval); 3301 3323 } 3302 3324 } 3303 3325 } else { /* failed the ISP abort */