aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_els.c
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2006-04-15 11:53:05 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-04-19 20:48:58 -0400
commit82d9a2a2900b17223117dc10b56503acc678c337 (patch)
tree757f398e585a6bbe64ebedae98b0957cab770279 /drivers/scsi/lpfc/lpfc_els.c
parent4b0b91d4611aba058c16440f9841906853741330 (diff)
[SCSI] lpfc 8.1.5 : Fixed FC protocol violation in handling of PRLO.
Fixed FC protocol violation in handling of PRLO. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_els.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_els.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index 45abc76ff898..e3d8b7f47f12 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -1913,6 +1913,7 @@ lpfc_els_rsp_acc(struct lpfc_hba * phba, uint32_t flag,
1913 uint8_t *pcmd; 1913 uint8_t *pcmd;
1914 uint16_t cmdsize; 1914 uint16_t cmdsize;
1915 int rc; 1915 int rc;
1916 ELS_PKT *els_pkt_ptr;
1916 1917
1917 psli = &phba->sli; 1918 psli = &phba->sli;
1918 pring = &psli->ring[LPFC_ELS_RING]; /* ELS ring */ 1919 pring = &psli->ring[LPFC_ELS_RING]; /* ELS ring */
@@ -1951,6 +1952,23 @@ lpfc_els_rsp_acc(struct lpfc_hba * phba, uint32_t flag,
1951 pcmd += sizeof (uint32_t); 1952 pcmd += sizeof (uint32_t);
1952 memcpy(pcmd, &phba->fc_sparam, sizeof (struct serv_parm)); 1953 memcpy(pcmd, &phba->fc_sparam, sizeof (struct serv_parm));
1953 break; 1954 break;
1955 case ELS_CMD_PRLO:
1956 cmdsize = sizeof (uint32_t) + sizeof (PRLO);
1957 elsiocb = lpfc_prep_els_iocb(phba, 0, cmdsize, oldiocb->retry,
1958 ndlp, ndlp->nlp_DID, ELS_CMD_PRLO);
1959 if (!elsiocb)
1960 return 1;
1961
1962 icmd = &elsiocb->iocb;
1963 icmd->ulpContext = oldcmd->ulpContext; /* Xri */
1964 pcmd = (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
1965
1966 memcpy(pcmd, ((struct lpfc_dmabuf *) oldiocb->context2)->virt,
1967 sizeof (uint32_t) + sizeof (PRLO));
1968 *((uint32_t *) (pcmd)) = ELS_CMD_PRLO_ACC;
1969 els_pkt_ptr = (ELS_PKT *) pcmd;
1970 els_pkt_ptr->un.prlo.acceptRspCode = PRLO_REQ_EXECUTED;
1971 break;
1954 default: 1972 default:
1955 return 1; 1973 return 1;
1956 } 1974 }