aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2013-07-15 18:35:04 -0400
committerJames Bottomley <JBottomley@Parallels.com>2013-08-23 13:23:51 -0400
commit3cb01c57c981c8483395562c09c82032f0550240 (patch)
tree9de693a40ff5daae9339acbf3839c295487241e4
parent71157c9eb2793054e784b94fd7678147a1a496d6 (diff)
[SCSI] lpfc 8.3.41: Add first burst support to driver
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r--drivers/scsi/lpfc/lpfc.h1
-rw-r--r--drivers/scsi/lpfc/lpfc_attr.c11
-rw-r--r--drivers/scsi/lpfc/lpfc_disc.h1
-rw-r--r--drivers/scsi/lpfc/lpfc_els.c2
-rw-r--r--drivers/scsi/lpfc/lpfc_nportdisc.c12
-rw-r--r--drivers/scsi/lpfc/lpfc_scsi.c5
6 files changed, 30 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
index 93f222d66716..f59aa2124ea2 100644
--- a/drivers/scsi/lpfc/lpfc.h
+++ b/drivers/scsi/lpfc/lpfc.h
@@ -421,6 +421,7 @@ struct lpfc_vport {
421 uint32_t cfg_enable_da_id; 421 uint32_t cfg_enable_da_id;
422 uint32_t cfg_max_scsicmpl_time; 422 uint32_t cfg_max_scsicmpl_time;
423 uint32_t cfg_tgt_queue_depth; 423 uint32_t cfg_tgt_queue_depth;
424 uint32_t cfg_first_burst_size;
424 425
425 uint32_t dev_loss_tmo_changed; 426 uint32_t dev_loss_tmo_changed;
426 427
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index 745ba85a8993..cb7b779aafe9 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -3950,6 +3950,14 @@ LPFC_VPORT_ATTR_RW(use_adisc, 0, 0, 1,
3950 "Use ADISC on rediscovery to authenticate FCP devices"); 3950 "Use ADISC on rediscovery to authenticate FCP devices");
3951 3951
3952/* 3952/*
3953# lpfc_first_burst_size: First burst size to use on the NPorts
3954# that support first burst.
3955# Value range is [0,65536]. Default value is 0.
3956*/
3957LPFC_VPORT_ATTR_RW(first_burst_size, 0, 0, 65536,
3958 "First burst size for Targets that support first burst");
3959
3960/*
3953# lpfc_max_scsicmpl_time: Use scsi command completion time to control I/O queue 3961# lpfc_max_scsicmpl_time: Use scsi command completion time to control I/O queue
3954# depth. Default value is 0. When the value of this parameter is zero the 3962# depth. Default value is 0. When the value of this parameter is zero the
3955# SCSI command completion time is not used for controlling I/O queue depth. When 3963# SCSI command completion time is not used for controlling I/O queue depth. When
@@ -4277,6 +4285,7 @@ struct device_attribute *lpfc_hba_attrs[] = {
4277 &dev_attr_lpfc_devloss_tmo, 4285 &dev_attr_lpfc_devloss_tmo,
4278 &dev_attr_lpfc_fcp_class, 4286 &dev_attr_lpfc_fcp_class,
4279 &dev_attr_lpfc_use_adisc, 4287 &dev_attr_lpfc_use_adisc,
4288 &dev_attr_lpfc_first_burst_size,
4280 &dev_attr_lpfc_ack0, 4289 &dev_attr_lpfc_ack0,
4281 &dev_attr_lpfc_topology, 4290 &dev_attr_lpfc_topology,
4282 &dev_attr_lpfc_scan_down, 4291 &dev_attr_lpfc_scan_down,
@@ -4353,6 +4362,7 @@ struct device_attribute *lpfc_vport_attrs[] = {
4353 &dev_attr_lpfc_restrict_login, 4362 &dev_attr_lpfc_restrict_login,
4354 &dev_attr_lpfc_fcp_class, 4363 &dev_attr_lpfc_fcp_class,
4355 &dev_attr_lpfc_use_adisc, 4364 &dev_attr_lpfc_use_adisc,
4365 &dev_attr_lpfc_first_burst_size,
4356 &dev_attr_lpfc_fdmi_on, 4366 &dev_attr_lpfc_fdmi_on,
4357 &dev_attr_lpfc_max_luns, 4367 &dev_attr_lpfc_max_luns,
4358 &dev_attr_nport_evt_cnt, 4368 &dev_attr_nport_evt_cnt,
@@ -5332,6 +5342,7 @@ lpfc_get_vport_cfgparam(struct lpfc_vport *vport)
5332 lpfc_restrict_login_init(vport, lpfc_restrict_login); 5342 lpfc_restrict_login_init(vport, lpfc_restrict_login);
5333 lpfc_fcp_class_init(vport, lpfc_fcp_class); 5343 lpfc_fcp_class_init(vport, lpfc_fcp_class);
5334 lpfc_use_adisc_init(vport, lpfc_use_adisc); 5344 lpfc_use_adisc_init(vport, lpfc_use_adisc);
5345 lpfc_first_burst_size_init(vport, lpfc_first_burst_size);
5335 lpfc_max_scsicmpl_time_init(vport, lpfc_max_scsicmpl_time); 5346 lpfc_max_scsicmpl_time_init(vport, lpfc_max_scsicmpl_time);
5336 lpfc_fdmi_on_init(vport, lpfc_fdmi_on); 5347 lpfc_fdmi_on_init(vport, lpfc_fdmi_on);
5337 lpfc_discovery_threads_init(vport, lpfc_discovery_threads); 5348 lpfc_discovery_threads_init(vport, lpfc_discovery_threads);
diff --git a/drivers/scsi/lpfc/lpfc_disc.h b/drivers/scsi/lpfc/lpfc_disc.h
index af49fb03dbb8..5cecfc5250a1 100644
--- a/drivers/scsi/lpfc/lpfc_disc.h
+++ b/drivers/scsi/lpfc/lpfc_disc.h
@@ -154,6 +154,7 @@ struct lpfc_node_rrq {
154#define NLP_NODEV_REMOVE 0x08000000 /* Defer removal till discovery ends */ 154#define NLP_NODEV_REMOVE 0x08000000 /* Defer removal till discovery ends */
155#define NLP_TARGET_REMOVE 0x10000000 /* Target remove in process */ 155#define NLP_TARGET_REMOVE 0x10000000 /* Target remove in process */
156#define NLP_SC_REQ 0x20000000 /* Target requires authentication */ 156#define NLP_SC_REQ 0x20000000 /* Target requires authentication */
157#define NLP_FIRSTBURST 0x40000000 /* Target supports FirstBurst */
157#define NLP_RPI_REGISTERED 0x80000000 /* nlp_rpi is valid */ 158#define NLP_RPI_REGISTERED 0x80000000 /* nlp_rpi is valid */
158 159
159/* ndlp usage management macros */ 160/* ndlp usage management macros */
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index 6b8ee7449f16..110445f0c58d 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -2122,6 +2122,8 @@ lpfc_issue_els_prli(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
2122 } 2122 }
2123 npr->estabImagePair = 1; 2123 npr->estabImagePair = 1;
2124 npr->readXferRdyDis = 1; 2124 npr->readXferRdyDis = 1;
2125 if (vport->cfg_first_burst_size)
2126 npr->writeXferRdyDis = 1;
2125 2127
2126 /* For FCP support */ 2128 /* For FCP support */
2127 npr->prliType = PRLI_FCP_TYPE; 2129 npr->prliType = PRLI_FCP_TYPE;
diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c
index 6aaf39a1f1c5..abc361259d6d 100644
--- a/drivers/scsi/lpfc/lpfc_nportdisc.c
+++ b/drivers/scsi/lpfc/lpfc_nportdisc.c
@@ -690,11 +690,15 @@ lpfc_rcv_prli(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
690 690
691 ndlp->nlp_type &= ~(NLP_FCP_TARGET | NLP_FCP_INITIATOR); 691 ndlp->nlp_type &= ~(NLP_FCP_TARGET | NLP_FCP_INITIATOR);
692 ndlp->nlp_fcp_info &= ~NLP_FCP_2_DEVICE; 692 ndlp->nlp_fcp_info &= ~NLP_FCP_2_DEVICE;
693 ndlp->nlp_flag &= ~NLP_FIRSTBURST;
693 if (npr->prliType == PRLI_FCP_TYPE) { 694 if (npr->prliType == PRLI_FCP_TYPE) {
694 if (npr->initiatorFunc) 695 if (npr->initiatorFunc)
695 ndlp->nlp_type |= NLP_FCP_INITIATOR; 696 ndlp->nlp_type |= NLP_FCP_INITIATOR;
696 if (npr->targetFunc) 697 if (npr->targetFunc) {
697 ndlp->nlp_type |= NLP_FCP_TARGET; 698 ndlp->nlp_type |= NLP_FCP_TARGET;
699 if (npr->writeXferRdyDis)
700 ndlp->nlp_flag |= NLP_FIRSTBURST;
701 }
698 if (npr->Retry) 702 if (npr->Retry)
699 ndlp->nlp_fcp_info |= NLP_FCP_2_DEVICE; 703 ndlp->nlp_fcp_info |= NLP_FCP_2_DEVICE;
700 } 704 }
@@ -1676,12 +1680,16 @@ lpfc_cmpl_prli_prli_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
1676 /* Check out PRLI rsp */ 1680 /* Check out PRLI rsp */
1677 ndlp->nlp_type &= ~(NLP_FCP_TARGET | NLP_FCP_INITIATOR); 1681 ndlp->nlp_type &= ~(NLP_FCP_TARGET | NLP_FCP_INITIATOR);
1678 ndlp->nlp_fcp_info &= ~NLP_FCP_2_DEVICE; 1682 ndlp->nlp_fcp_info &= ~NLP_FCP_2_DEVICE;
1683 ndlp->nlp_flag &= ~NLP_FIRSTBURST;
1679 if ((npr->acceptRspCode == PRLI_REQ_EXECUTED) && 1684 if ((npr->acceptRspCode == PRLI_REQ_EXECUTED) &&
1680 (npr->prliType == PRLI_FCP_TYPE)) { 1685 (npr->prliType == PRLI_FCP_TYPE)) {
1681 if (npr->initiatorFunc) 1686 if (npr->initiatorFunc)
1682 ndlp->nlp_type |= NLP_FCP_INITIATOR; 1687 ndlp->nlp_type |= NLP_FCP_INITIATOR;
1683 if (npr->targetFunc) 1688 if (npr->targetFunc) {
1684 ndlp->nlp_type |= NLP_FCP_TARGET; 1689 ndlp->nlp_type |= NLP_FCP_TARGET;
1690 if (npr->writeXferRdyDis)
1691 ndlp->nlp_flag |= NLP_FIRSTBURST;
1692 }
1685 if (npr->Retry) 1693 if (npr->Retry)
1686 ndlp->nlp_fcp_info |= NLP_FCP_2_DEVICE; 1694 ndlp->nlp_fcp_info |= NLP_FCP_2_DEVICE;
1687 } 1695 }
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index 4261469619c2..1242b6c4308b 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -4387,6 +4387,11 @@ lpfc_scsi_prep_cmnd(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd,
4387 if (datadir == DMA_TO_DEVICE) { 4387 if (datadir == DMA_TO_DEVICE) {
4388 iocb_cmd->ulpCommand = CMD_FCP_IWRITE64_CR; 4388 iocb_cmd->ulpCommand = CMD_FCP_IWRITE64_CR;
4389 iocb_cmd->ulpPU = PARM_READ_CHECK; 4389 iocb_cmd->ulpPU = PARM_READ_CHECK;
4390 if (vport->cfg_first_burst_size &&
4391 (pnode->nlp_flag & NLP_FIRSTBURST)) {
4392 piocbq->iocb.un.fcpi.fcpi_XRdy =
4393 vport->cfg_first_burst_size;
4394 }
4390 fcp_cmnd->fcpCntl3 = WRITE_DATA; 4395 fcp_cmnd->fcpCntl3 = WRITE_DATA;
4391 phba->fc4OutputRequests++; 4396 phba->fc4OutputRequests++;
4392 } else { 4397 } else {