aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2013-07-15 18:32:43 -0400
committerJames Bottomley <JBottomley@Parallels.com>2013-08-23 13:16:36 -0400
commit572709e2061fa55b573d7b7ff39d2c785d4bbd25 (patch)
treec3893ea42c9bcf2c437f5bad5f209357f939eaa8 /drivers/scsi/lpfc
parent48a5a664d0f8b69689ed52ff59fdd7626bfb79be (diff)
[SCSI] lpfc 8.3.41: Fixed max value of lpfc_lun_queue_depth
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r--drivers/scsi/lpfc/lpfc_attr.c9
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c34
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c11
-rw-r--r--drivers/scsi/lpfc/lpfc_vport.c3
4 files changed, 44 insertions, 13 deletions
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index 5cb08ae3e8c2..9937e572efdb 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -2591,9 +2591,12 @@ LPFC_VPORT_ATTR_R(enable_da_id, 1, 0, 1,
2591 2591
2592/* 2592/*
2593# lun_queue_depth: This parameter is used to limit the number of outstanding 2593# lun_queue_depth: This parameter is used to limit the number of outstanding
2594# commands per FCP LUN. Value range is [1,128]. Default value is 30. 2594# commands per FCP LUN. Value range is [1,512]. Default value is 30.
2595# If this parameter value is greater than 1/8th the maximum number of exchanges
2596# supported by the HBA port, then the lun queue depth will be reduced to
2597# 1/8th the maximum number of exchanges.
2595*/ 2598*/
2596LPFC_VPORT_ATTR_R(lun_queue_depth, 30, 1, 128, 2599LPFC_VPORT_ATTR_R(lun_queue_depth, 30, 1, 512,
2597 "Max number of FCP commands we can queue to a specific LUN"); 2600 "Max number of FCP commands we can queue to a specific LUN");
2598 2601
2599/* 2602/*
@@ -2601,7 +2604,7 @@ LPFC_VPORT_ATTR_R(lun_queue_depth, 30, 1, 128,
2601# commands per target port. Value range is [10,65535]. Default value is 65535. 2604# commands per target port. Value range is [10,65535]. Default value is 65535.
2602*/ 2605*/
2603LPFC_VPORT_ATTR_R(tgt_queue_depth, 65535, 10, 65535, 2606LPFC_VPORT_ATTR_R(tgt_queue_depth, 65535, 10, 65535,
2604 "Max number of FCP commands we can queue to a specific target port"); 2607 "Max number of FCP commands we can queue to a specific target port");
2605 2608
2606/* 2609/*
2607# hba_queue_depth: This parameter is used to limit the number of outstanding 2610# hba_queue_depth: This parameter is used to limit the number of outstanding
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index e0b20fad8502..a7f3328424f8 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -472,10 +472,22 @@ lpfc_config_port_post(struct lpfc_hba *phba)
472 lpfc_sli_read_link_ste(phba); 472 lpfc_sli_read_link_ste(phba);
473 473
474 /* Reset the DFT_HBA_Q_DEPTH to the max xri */ 474 /* Reset the DFT_HBA_Q_DEPTH to the max xri */
475 if (phba->cfg_hba_queue_depth > (mb->un.varRdConfig.max_xri+1)) 475 i = (mb->un.varRdConfig.max_xri + 1);
476 phba->cfg_hba_queue_depth = 476 if (phba->cfg_hba_queue_depth > i) {
477 (mb->un.varRdConfig.max_xri + 1) - 477 lpfc_printf_log(phba, KERN_WARNING, LOG_INIT,
478 lpfc_sli4_get_els_iocb_cnt(phba); 478 "3359 HBA queue depth changed from %d to %d\n",
479 phba->cfg_hba_queue_depth, i);
480 phba->cfg_hba_queue_depth = i;
481 }
482
483 /* Reset the DFT_LUN_Q_DEPTH to (max xri >> 3) */
484 i = (mb->un.varRdConfig.max_xri >> 3);
485 if (phba->pport->cfg_lun_queue_depth > i) {
486 lpfc_printf_log(phba, KERN_WARNING, LOG_INIT,
487 "3360 LUN queue depth changed from %d to %d\n",
488 phba->pport->cfg_lun_queue_depth, i);
489 phba->pport->cfg_lun_queue_depth = i;
490 }
479 491
480 phba->lmt = mb->un.varRdConfig.lmt; 492 phba->lmt = mb->un.varRdConfig.lmt;
481 493
@@ -6664,12 +6676,14 @@ lpfc_sli4_read_config(struct lpfc_hba *phba)
6664 goto read_cfg_out; 6676 goto read_cfg_out;
6665 6677
6666 /* Reset the DFT_HBA_Q_DEPTH to the max xri */ 6678 /* Reset the DFT_HBA_Q_DEPTH to the max xri */
6667 if (phba->cfg_hba_queue_depth > 6679 length = phba->sli4_hba.max_cfg_param.max_xri -
6668 (phba->sli4_hba.max_cfg_param.max_xri - 6680 lpfc_sli4_get_els_iocb_cnt(phba);
6669 lpfc_sli4_get_els_iocb_cnt(phba))) 6681 if (phba->cfg_hba_queue_depth > length) {
6670 phba->cfg_hba_queue_depth = 6682 lpfc_printf_log(phba, KERN_WARNING, LOG_INIT,
6671 phba->sli4_hba.max_cfg_param.max_xri - 6683 "3361 HBA queue depth changed from %d to %d\n",
6672 lpfc_sli4_get_els_iocb_cnt(phba); 6684 phba->cfg_hba_queue_depth, length);
6685 phba->cfg_hba_queue_depth = length;
6686 }
6673 6687
6674 if (bf_get(lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) != 6688 if (bf_get(lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) !=
6675 LPFC_SLI_INTF_IF_TYPE_2) 6689 LPFC_SLI_INTF_IF_TYPE_2)
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 230f9eddb797..a4e3f4757405 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -6163,6 +6163,7 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba)
6163 kfree(vpd); 6163 kfree(vpd);
6164 goto out_free_mbox; 6164 goto out_free_mbox;
6165 } 6165 }
6166
6166 mqe = &mboxq->u.mqe; 6167 mqe = &mboxq->u.mqe;
6167 phba->sli_rev = bf_get(lpfc_mbx_rd_rev_sli_lvl, &mqe->un.read_rev); 6168 phba->sli_rev = bf_get(lpfc_mbx_rd_rev_sli_lvl, &mqe->un.read_rev);
6168 if (bf_get(lpfc_mbx_rd_rev_fcoe, &mqe->un.read_rev)) 6169 if (bf_get(lpfc_mbx_rd_rev_fcoe, &mqe->un.read_rev))
@@ -6249,6 +6250,16 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba)
6249 phba->vpd.rev.fcphHigh, phba->vpd.rev.fcphLow, 6250 phba->vpd.rev.fcphHigh, phba->vpd.rev.fcphLow,
6250 phba->vpd.rev.feaLevelHigh, phba->vpd.rev.feaLevelLow); 6251 phba->vpd.rev.feaLevelHigh, phba->vpd.rev.feaLevelLow);
6251 6252
6253 /* Reset the DFT_LUN_Q_DEPTH to (max xri >> 3) */
6254 rc = (phba->sli4_hba.max_cfg_param.max_xri >> 3);
6255 if (phba->pport->cfg_lun_queue_depth > rc) {
6256 lpfc_printf_log(phba, KERN_WARNING, LOG_INIT,
6257 "3362 LUN queue depth changed from %d to %d\n",
6258 phba->pport->cfg_lun_queue_depth, rc);
6259 phba->pport->cfg_lun_queue_depth = rc;
6260 }
6261
6262
6252 /* 6263 /*
6253 * Discover the port's supported feature set and match it against the 6264 * Discover the port's supported feature set and match it against the
6254 * hosts requests. 6265 * hosts requests.
diff --git a/drivers/scsi/lpfc/lpfc_vport.c b/drivers/scsi/lpfc/lpfc_vport.c
index e28e431564b0..6b9f9bdb6c98 100644
--- a/drivers/scsi/lpfc/lpfc_vport.c
+++ b/drivers/scsi/lpfc/lpfc_vport.c
@@ -387,6 +387,9 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable)
387 /* Create binary sysfs attribute for vport */ 387 /* Create binary sysfs attribute for vport */
388 lpfc_alloc_sysfs_attr(vport); 388 lpfc_alloc_sysfs_attr(vport);
389 389
390 /* Set the DFT_LUN_Q_DEPTH accordingly */
391 vport->cfg_lun_queue_depth = phba->pport->cfg_lun_queue_depth;
392
390 *(struct lpfc_vport **)fc_vport->dd_data = vport; 393 *(struct lpfc_vport **)fc_vport->dd_data = vport;
391 vport->fc_vport = fc_vport; 394 vport->fc_vport = fc_vport;
392 395