aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2011-08-21 21:48:13 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-08-29 03:16:18 -0400
commitbf08611bcc461d83199a8449930b176823017f58 (patch)
tree61a606e4ee6fc73d119ac861887deb51e8a6c2bb /drivers/scsi
parent8dce69ff481a8d17a7d1027f23595083f28b4556 (diff)
[SCSI] lpfc 8.3.26: Fix issues pertaining to SCSI/FC protocol.
Fix issues pertaining to SCSI/FC protocol. - Allow frames destined to 0xFFFFFE to be processed by the driver by matching that DID with the physical port. - Call lpfc_sli_issue_iocb with context1 set to ndlp - In echo command accept function, adjust memcpy to limit memcpy to 1K - Set LPFC_SLI3_BG_ENABLED properly upon completion. - Skip the INIT_VFI call in lpfc_register_fcf if the FCF is already registered and go immediately to initial flogi. - use "status" variable instead of "ret" variable to hold the return of the fc_block_scsi_eh. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/lpfc/lpfc_els.c11
-rw-r--r--drivers/scsi/lpfc/lpfc_hbadisc.c2
-rw-r--r--drivers/scsi/lpfc/lpfc_scsi.c11
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c13
4 files changed, 21 insertions, 16 deletions
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index 023da0e00d38..727c793422f2 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -4082,9 +4082,6 @@ lpfc_els_rsp_rnid_acc(struct lpfc_vport *vport, uint8_t format,
4082 4082
4083 phba->fc_stat.elsXmitACC++; 4083 phba->fc_stat.elsXmitACC++;
4084 elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp; 4084 elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp;
4085 lpfc_nlp_put(ndlp);
4086 elsiocb->context1 = NULL; /* Don't need ndlp for cmpl,
4087 * it could be freed */
4088 4085
4089 rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0); 4086 rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0);
4090 if (rc == IOCB_ERROR) { 4087 if (rc == IOCB_ERROR) {
@@ -4166,6 +4163,11 @@ lpfc_els_rsp_echo_acc(struct lpfc_vport *vport, uint8_t *data,
4166 psli = &phba->sli; 4163 psli = &phba->sli;
4167 cmdsize = oldiocb->iocb.unsli3.rcvsli3.acc_len; 4164 cmdsize = oldiocb->iocb.unsli3.rcvsli3.acc_len;
4168 4165
4166 /* The accumulated length can exceed the BPL_SIZE. For
4167 * now, use this as the limit
4168 */
4169 if (cmdsize > LPFC_BPL_SIZE)
4170 cmdsize = LPFC_BPL_SIZE;
4169 elsiocb = lpfc_prep_els_iocb(vport, 0, cmdsize, oldiocb->retry, ndlp, 4171 elsiocb = lpfc_prep_els_iocb(vport, 0, cmdsize, oldiocb->retry, ndlp,
4170 ndlp->nlp_DID, ELS_CMD_ACC); 4172 ndlp->nlp_DID, ELS_CMD_ACC);
4171 if (!elsiocb) 4173 if (!elsiocb)
@@ -4189,9 +4191,6 @@ lpfc_els_rsp_echo_acc(struct lpfc_vport *vport, uint8_t *data,
4189 4191
4190 phba->fc_stat.elsXmitACC++; 4192 phba->fc_stat.elsXmitACC++;
4191 elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp; 4193 elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp;
4192 lpfc_nlp_put(ndlp);
4193 elsiocb->context1 = NULL; /* Don't need ndlp for cmpl,
4194 * it could be freed */
4195 4194
4196 rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0); 4195 rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0);
4197 if (rc == IOCB_ERROR) { 4196 if (rc == IOCB_ERROR) {
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 0b47adf9fee8..7eb34a6e8346 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -1412,7 +1412,7 @@ lpfc_register_fcf(struct lpfc_hba *phba)
1412 if (phba->pport->port_state != LPFC_FLOGI) { 1412 if (phba->pport->port_state != LPFC_FLOGI) {
1413 phba->hba_flag |= FCF_RR_INPROG; 1413 phba->hba_flag |= FCF_RR_INPROG;
1414 spin_unlock_irq(&phba->hbalock); 1414 spin_unlock_irq(&phba->hbalock);
1415 lpfc_issue_init_vfi(phba->pport); 1415 lpfc_initial_flogi(phba->pport);
1416 return; 1416 return;
1417 } 1417 }
1418 spin_unlock_irq(&phba->hbalock); 1418 spin_unlock_irq(&phba->hbalock);
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index eadd241eeff1..75a48e38c1fe 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -3056,8 +3056,9 @@ lpfc_queuecommand_lck(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *))
3056 } 3056 }
3057 ndlp = rdata->pnode; 3057 ndlp = rdata->pnode;
3058 3058
3059 if (!(phba->sli3_options & LPFC_SLI3_BG_ENABLED) && 3059 if ((scsi_get_prot_op(cmnd) != SCSI_PROT_NORMAL) &&
3060 scsi_get_prot_op(cmnd) != SCSI_PROT_NORMAL) { 3060 (!(phba->sli3_options & LPFC_SLI3_BG_ENABLED) ||
3061 (phba->sli_rev == LPFC_SLI_REV4))) {
3061 3062
3062 lpfc_printf_log(phba, KERN_ERR, LOG_BG, 3063 lpfc_printf_log(phba, KERN_ERR, LOG_BG,
3063 "9058 BLKGRD: ERROR: rcvd protected cmd:%02x" 3064 "9058 BLKGRD: ERROR: rcvd protected cmd:%02x"
@@ -3691,9 +3692,9 @@ lpfc_bus_reset_handler(struct scsi_cmnd *cmnd)
3691 fc_host_post_vendor_event(shost, fc_get_event_number(), 3692 fc_host_post_vendor_event(shost, fc_get_event_number(),
3692 sizeof(scsi_event), (char *)&scsi_event, LPFC_NL_VENDOR_ID); 3693 sizeof(scsi_event), (char *)&scsi_event, LPFC_NL_VENDOR_ID);
3693 3694
3694 ret = fc_block_scsi_eh(cmnd); 3695 status = fc_block_scsi_eh(cmnd);
3695 if (ret) 3696 if (status)
3696 return ret; 3697 return status;
3697 3698
3698 /* 3699 /*
3699 * Since the driver manages a single bus device, reset all 3700 * Since the driver manages a single bus device, reset all
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 8b799f047a99..abed73d4414a 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -5818,9 +5818,13 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba)
5818 * then turn off the global config parameters to disable the 5818 * then turn off the global config parameters to disable the
5819 * feature in the driver. This is not a fatal error. 5819 * feature in the driver. This is not a fatal error.
5820 */ 5820 */
5821 if ((phba->cfg_enable_bg) && 5821 phba->sli3_options &= ~LPFC_SLI3_BG_ENABLED;
5822 !(bf_get(lpfc_mbx_rq_ftr_rsp_dif, &mqe->un.req_ftrs))) 5822 if (phba->cfg_enable_bg) {
5823 ftr_rsp++; 5823 if (bf_get(lpfc_mbx_rq_ftr_rsp_dif, &mqe->un.req_ftrs))
5824 phba->sli3_options |= LPFC_SLI3_BG_ENABLED;
5825 else
5826 ftr_rsp++;
5827 }
5824 5828
5825 if (phba->max_vpi && phba->cfg_enable_npiv && 5829 if (phba->max_vpi && phba->cfg_enable_npiv &&
5826 !(bf_get(lpfc_mbx_rq_ftr_rsp_npiv, &mqe->un.req_ftrs))) 5830 !(bf_get(lpfc_mbx_rq_ftr_rsp_npiv, &mqe->un.req_ftrs)))
@@ -13296,7 +13300,8 @@ lpfc_fc_frame_to_vport(struct lpfc_hba *phba, struct fc_frame_header *fc_hdr,
13296 uint32_t did = (fc_hdr->fh_d_id[0] << 16 | 13300 uint32_t did = (fc_hdr->fh_d_id[0] << 16 |
13297 fc_hdr->fh_d_id[1] << 8 | 13301 fc_hdr->fh_d_id[1] << 8 |
13298 fc_hdr->fh_d_id[2]); 13302 fc_hdr->fh_d_id[2]);
13299 13303 if (did == Fabric_DID)
13304 return phba->pport;
13300 vports = lpfc_create_vport_work_array(phba); 13305 vports = lpfc_create_vport_work_array(phba);
13301 if (vports != NULL) 13306 if (vports != NULL)
13302 for (i = 0; i <= phba->max_vpi && vports[i] != NULL; i++) { 13307 for (i = 0; i <= phba->max_vpi && vports[i] != NULL; i++) {