aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2012-03-01 22:34:36 -0500
committerJames Bottomley <JBottomley@Parallels.com>2012-03-27 03:26:29 -0400
commit5c1db2accd4b3e21aa7440526af9d2d0ccf5241c (patch)
tree52389bd42996f84699fc66160e822e2b97f5ebe2
parent41899be7e8b95c9c8b51ad4ff932769af508306f (diff)
[SCSI] lpfc 8.3.30: Fix driver handling of XRI Aborted CQE response
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>
-rw-r--r--drivers/scsi/lpfc/lpfc_hw4.h6
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c15
2 files changed, 18 insertions, 3 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h
index 9e2b9b227e1a..4aecb5c4e602 100644
--- a/drivers/scsi/lpfc/lpfc_hw4.h
+++ b/drivers/scsi/lpfc/lpfc_hw4.h
@@ -338,6 +338,12 @@ struct lpfc_cqe {
338#define CQE_CODE_XRI_ABORTED 0x5 338#define CQE_CODE_XRI_ABORTED 0x5
339#define CQE_CODE_RECEIVE_V1 0x9 339#define CQE_CODE_RECEIVE_V1 0x9
340 340
341/*
342 * Define mask value for xri_aborted and wcqe completed CQE extended status.
343 * Currently, extended status is limited to 9 bits (0x0 -> 0x103) .
344 */
345#define WCQE_PARAM_MASK 0x1FF;
346
341/* completion queue entry for wqe completions */ 347/* completion queue entry for wqe completions */
342struct lpfc_wcqe_complete { 348struct lpfc_wcqe_complete {
343 uint32_t word0; 349 uint32_t word0;
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 99afe1522273..c516b040d45c 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -8388,6 +8388,7 @@ lpfc_sli4_abts_err_handler(struct lpfc_hba *phba,
8388 struct sli4_wcqe_xri_aborted *axri) 8388 struct sli4_wcqe_xri_aborted *axri)
8389{ 8389{
8390 struct lpfc_vport *vport; 8390 struct lpfc_vport *vport;
8391 uint32_t ext_status = 0;
8391 8392
8392 if (!ndlp || !NLP_CHK_NODE_ACT(ndlp)) { 8393 if (!ndlp || !NLP_CHK_NODE_ACT(ndlp)) {
8393 lpfc_printf_log(phba, KERN_INFO, LOG_SLI, 8394 lpfc_printf_log(phba, KERN_INFO, LOG_SLI,
@@ -8399,12 +8400,20 @@ lpfc_sli4_abts_err_handler(struct lpfc_hba *phba,
8399 vport = ndlp->vport; 8400 vport = ndlp->vport;
8400 lpfc_printf_log(phba, KERN_WARNING, LOG_SLI, 8401 lpfc_printf_log(phba, KERN_WARNING, LOG_SLI,
8401 "3116 Port generated FCP XRI ABORT event on " 8402 "3116 Port generated FCP XRI ABORT event on "
8402 "vpi %d rpi %d xri x%x status 0x%x\n", 8403 "vpi %d rpi %d xri x%x status 0x%x parameter x%x\n",
8403 ndlp->vport->vpi, ndlp->nlp_rpi, 8404 ndlp->vport->vpi, ndlp->nlp_rpi,
8404 bf_get(lpfc_wcqe_xa_xri, axri), 8405 bf_get(lpfc_wcqe_xa_xri, axri),
8405 bf_get(lpfc_wcqe_xa_status, axri)); 8406 bf_get(lpfc_wcqe_xa_status, axri),
8407 axri->parameter);
8406 8408
8407 if (bf_get(lpfc_wcqe_xa_status, axri) == IOSTAT_LOCAL_REJECT) 8409 /*
8410 * Catch the ABTS protocol failure case. Older OCe FW releases returned
8411 * LOCAL_REJECT and 0 for a failed ABTS exchange and later OCe and
8412 * LPe FW releases returned LOCAL_REJECT and SEQUENCE_TIMEOUT.
8413 */
8414 ext_status = axri->parameter & WCQE_PARAM_MASK;
8415 if ((bf_get(lpfc_wcqe_xa_status, axri) == IOSTAT_LOCAL_REJECT) &&
8416 ((ext_status == IOERR_SEQUENCE_TIMEOUT) || (ext_status == 0)))
8408 lpfc_sli_abts_recover_port(vport, ndlp); 8417 lpfc_sli_abts_recover_port(vport, ndlp);
8409} 8418}
8410 8419