diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_init.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 54 |
1 files changed, 29 insertions, 25 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index a7b5566ea0b5..12ab1eae47f9 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -3004,12 +3004,11 @@ lpfc_sli4_async_fcoe_evt(struct lpfc_hba *phba, | |||
3004 | spin_unlock_irq(&phba->hbalock); | 3004 | spin_unlock_irq(&phba->hbalock); |
3005 | 3005 | ||
3006 | /* Read the FCF table and re-discover SAN. */ | 3006 | /* Read the FCF table and re-discover SAN. */ |
3007 | rc = lpfc_sli4_read_fcf_record(phba, | 3007 | rc = lpfc_sli4_read_fcf_record(phba, LPFC_FCOE_FCF_GET_FIRST); |
3008 | LPFC_FCOE_FCF_GET_FIRST); | ||
3009 | if (rc) | 3008 | if (rc) |
3010 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 3009 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, |
3011 | "2547 Read FCF record failed 0x%x\n", | 3010 | "2547 Read FCF record failed 0x%x\n", |
3012 | rc); | 3011 | rc); |
3013 | break; | 3012 | break; |
3014 | 3013 | ||
3015 | case LPFC_FCOE_EVENT_TYPE_FCF_TABLE_FULL: | 3014 | case LPFC_FCOE_EVENT_TYPE_FCF_TABLE_FULL: |
@@ -3021,7 +3020,7 @@ lpfc_sli4_async_fcoe_evt(struct lpfc_hba *phba, | |||
3021 | 3020 | ||
3022 | case LPFC_FCOE_EVENT_TYPE_FCF_DEAD: | 3021 | case LPFC_FCOE_EVENT_TYPE_FCF_DEAD: |
3023 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 3022 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, |
3024 | "2549 FCF disconnected fron network index 0x%x" | 3023 | "2549 FCF disconnected from network index 0x%x" |
3025 | " tag 0x%x\n", acqe_fcoe->index, | 3024 | " tag 0x%x\n", acqe_fcoe->index, |
3026 | acqe_fcoe->event_tag); | 3025 | acqe_fcoe->event_tag); |
3027 | /* If the event is not for currently used fcf do nothing */ | 3026 | /* If the event is not for currently used fcf do nothing */ |
@@ -3917,7 +3916,7 @@ lpfc_free_sgl_list(struct lpfc_hba *phba) | |||
3917 | rc = lpfc_sli4_remove_all_sgl_pages(phba); | 3916 | rc = lpfc_sli4_remove_all_sgl_pages(phba); |
3918 | if (rc) { | 3917 | if (rc) { |
3919 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 3918 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, |
3920 | "2005 Unable to deregister pages from HBA: %x", rc); | 3919 | "2005 Unable to deregister pages from HBA: %x\n", rc); |
3921 | } | 3920 | } |
3922 | kfree(phba->sli4_hba.lpfc_els_sgl_array); | 3921 | kfree(phba->sli4_hba.lpfc_els_sgl_array); |
3923 | } | 3922 | } |
@@ -4366,7 +4365,8 @@ lpfc_setup_bg(struct lpfc_hba *phba, struct Scsi_Host *shost) | |||
4366 | _dump_buf_data = | 4365 | _dump_buf_data = |
4367 | (char *) __get_free_pages(GFP_KERNEL, pagecnt); | 4366 | (char *) __get_free_pages(GFP_KERNEL, pagecnt); |
4368 | if (_dump_buf_data) { | 4367 | if (_dump_buf_data) { |
4369 | printk(KERN_ERR "BLKGRD allocated %d pages for " | 4368 | lpfc_printf_log(phba, KERN_ERR, LOG_BG, |
4369 | "9043 BLKGRD: allocated %d pages for " | ||
4370 | "_dump_buf_data at 0x%p\n", | 4370 | "_dump_buf_data at 0x%p\n", |
4371 | (1 << pagecnt), _dump_buf_data); | 4371 | (1 << pagecnt), _dump_buf_data); |
4372 | _dump_buf_data_order = pagecnt; | 4372 | _dump_buf_data_order = pagecnt; |
@@ -4377,17 +4377,20 @@ lpfc_setup_bg(struct lpfc_hba *phba, struct Scsi_Host *shost) | |||
4377 | --pagecnt; | 4377 | --pagecnt; |
4378 | } | 4378 | } |
4379 | if (!_dump_buf_data_order) | 4379 | if (!_dump_buf_data_order) |
4380 | printk(KERN_ERR "BLKGRD ERROR unable to allocate " | 4380 | lpfc_printf_log(phba, KERN_ERR, LOG_BG, |
4381 | "9044 BLKGRD: ERROR unable to allocate " | ||
4381 | "memory for hexdump\n"); | 4382 | "memory for hexdump\n"); |
4382 | } else | 4383 | } else |
4383 | printk(KERN_ERR "BLKGRD already allocated _dump_buf_data=0x%p" | 4384 | lpfc_printf_log(phba, KERN_ERR, LOG_BG, |
4385 | "9045 BLKGRD: already allocated _dump_buf_data=0x%p" | ||
4384 | "\n", _dump_buf_data); | 4386 | "\n", _dump_buf_data); |
4385 | if (!_dump_buf_dif) { | 4387 | if (!_dump_buf_dif) { |
4386 | while (pagecnt) { | 4388 | while (pagecnt) { |
4387 | _dump_buf_dif = | 4389 | _dump_buf_dif = |
4388 | (char *) __get_free_pages(GFP_KERNEL, pagecnt); | 4390 | (char *) __get_free_pages(GFP_KERNEL, pagecnt); |
4389 | if (_dump_buf_dif) { | 4391 | if (_dump_buf_dif) { |
4390 | printk(KERN_ERR "BLKGRD allocated %d pages for " | 4392 | lpfc_printf_log(phba, KERN_ERR, LOG_BG, |
4393 | "9046 BLKGRD: allocated %d pages for " | ||
4391 | "_dump_buf_dif at 0x%p\n", | 4394 | "_dump_buf_dif at 0x%p\n", |
4392 | (1 << pagecnt), _dump_buf_dif); | 4395 | (1 << pagecnt), _dump_buf_dif); |
4393 | _dump_buf_dif_order = pagecnt; | 4396 | _dump_buf_dif_order = pagecnt; |
@@ -4398,10 +4401,12 @@ lpfc_setup_bg(struct lpfc_hba *phba, struct Scsi_Host *shost) | |||
4398 | --pagecnt; | 4401 | --pagecnt; |
4399 | } | 4402 | } |
4400 | if (!_dump_buf_dif_order) | 4403 | if (!_dump_buf_dif_order) |
4401 | printk(KERN_ERR "BLKGRD ERROR unable to allocate " | 4404 | lpfc_printf_log(phba, KERN_ERR, LOG_BG, |
4405 | "9047 BLKGRD: ERROR unable to allocate " | ||
4402 | "memory for hexdump\n"); | 4406 | "memory for hexdump\n"); |
4403 | } else | 4407 | } else |
4404 | printk(KERN_ERR "BLKGRD already allocated _dump_buf_dif=0x%p\n", | 4408 | lpfc_printf_log(phba, KERN_ERR, LOG_BG, |
4409 | "9048 BLKGRD: already allocated _dump_buf_dif=0x%p\n", | ||
4405 | _dump_buf_dif); | 4410 | _dump_buf_dif); |
4406 | } | 4411 | } |
4407 | 4412 | ||
@@ -5072,10 +5077,9 @@ lpfc_sli4_queue_create(struct lpfc_hba *phba) | |||
5072 | /* It does not make sense to have more EQs than WQs */ | 5077 | /* It does not make sense to have more EQs than WQs */ |
5073 | if (cfg_fcp_eq_count > phba->cfg_fcp_wq_count) { | 5078 | if (cfg_fcp_eq_count > phba->cfg_fcp_wq_count) { |
5074 | lpfc_printf_log(phba, KERN_WARNING, LOG_INIT, | 5079 | lpfc_printf_log(phba, KERN_WARNING, LOG_INIT, |
5075 | "2593 The number of FCP EQs (%d) is more " | 5080 | "2593 The FCP EQ count(%d) cannot be greater " |
5076 | "than the number of FCP WQs (%d), take " | 5081 | "than the FCP WQ count(%d), limiting the " |
5077 | "the number of FCP EQs same as than of " | 5082 | "FCP EQ count to %d\n", cfg_fcp_eq_count, |
5078 | "WQs (%d)\n", cfg_fcp_eq_count, | ||
5079 | phba->cfg_fcp_wq_count, | 5083 | phba->cfg_fcp_wq_count, |
5080 | phba->cfg_fcp_wq_count); | 5084 | phba->cfg_fcp_wq_count); |
5081 | cfg_fcp_eq_count = phba->cfg_fcp_wq_count; | 5085 | cfg_fcp_eq_count = phba->cfg_fcp_wq_count; |
@@ -7271,15 +7275,15 @@ lpfc_sli4_get_els_iocb_cnt(struct lpfc_hba *phba) | |||
7271 | 7275 | ||
7272 | if (phba->sli_rev == LPFC_SLI_REV4) { | 7276 | if (phba->sli_rev == LPFC_SLI_REV4) { |
7273 | if (max_xri <= 100) | 7277 | if (max_xri <= 100) |
7274 | return 4; | 7278 | return 10; |
7275 | else if (max_xri <= 256) | 7279 | else if (max_xri <= 256) |
7276 | return 8; | 7280 | return 25; |
7277 | else if (max_xri <= 512) | 7281 | else if (max_xri <= 512) |
7278 | return 16; | 7282 | return 50; |
7279 | else if (max_xri <= 1024) | 7283 | else if (max_xri <= 1024) |
7280 | return 32; | 7284 | return 100; |
7281 | else | 7285 | else |
7282 | return 48; | 7286 | return 150; |
7283 | } else | 7287 | } else |
7284 | return 0; | 7288 | return 0; |
7285 | } | 7289 | } |
@@ -8117,15 +8121,15 @@ lpfc_exit(void) | |||
8117 | if (lpfc_enable_npiv) | 8121 | if (lpfc_enable_npiv) |
8118 | fc_release_transport(lpfc_vport_transport_template); | 8122 | fc_release_transport(lpfc_vport_transport_template); |
8119 | if (_dump_buf_data) { | 8123 | if (_dump_buf_data) { |
8120 | printk(KERN_ERR "BLKGRD freeing %lu pages for _dump_buf_data " | 8124 | printk(KERN_ERR "9062 BLKGRD: freeing %lu pages for " |
8121 | "at 0x%p\n", | 8125 | "_dump_buf_data at 0x%p\n", |
8122 | (1L << _dump_buf_data_order), _dump_buf_data); | 8126 | (1L << _dump_buf_data_order), _dump_buf_data); |
8123 | free_pages((unsigned long)_dump_buf_data, _dump_buf_data_order); | 8127 | free_pages((unsigned long)_dump_buf_data, _dump_buf_data_order); |
8124 | } | 8128 | } |
8125 | 8129 | ||
8126 | if (_dump_buf_dif) { | 8130 | if (_dump_buf_dif) { |
8127 | printk(KERN_ERR "BLKGRD freeing %lu pages for _dump_buf_dif " | 8131 | printk(KERN_ERR "9049 BLKGRD: freeing %lu pages for " |
8128 | "at 0x%p\n", | 8132 | "_dump_buf_dif at 0x%p\n", |
8129 | (1L << _dump_buf_dif_order), _dump_buf_dif); | 8133 | (1L << _dump_buf_dif_order), _dump_buf_dif); |
8130 | free_pages((unsigned long)_dump_buf_dif, _dump_buf_dif_order); | 8134 | free_pages((unsigned long)_dump_buf_dif, _dump_buf_dif_order); |
8131 | } | 8135 | } |