diff options
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 46e062dafd85..e01428895823 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c | |||
@@ -904,6 +904,7 @@ lpfc_sli_handle_fast_ring_event(struct lpfc_hba * phba, | |||
904 | { | 904 | { |
905 | struct lpfc_pgp *pgp = &phba->slim2p->mbx.us.s2.port[pring->ringno]; | 905 | struct lpfc_pgp *pgp = &phba->slim2p->mbx.us.s2.port[pring->ringno]; |
906 | IOCB_t *irsp = NULL; | 906 | IOCB_t *irsp = NULL; |
907 | IOCB_t *entry = NULL; | ||
907 | struct lpfc_iocbq *cmdiocbq = NULL; | 908 | struct lpfc_iocbq *cmdiocbq = NULL; |
908 | struct lpfc_iocbq rspiocbq; | 909 | struct lpfc_iocbq rspiocbq; |
909 | uint32_t status; | 910 | uint32_t status; |
@@ -948,7 +949,17 @@ lpfc_sli_handle_fast_ring_event(struct lpfc_hba * phba, | |||
948 | 949 | ||
949 | rmb(); | 950 | rmb(); |
950 | while (pring->rspidx != portRspPut) { | 951 | while (pring->rspidx != portRspPut) { |
951 | irsp = (IOCB_t *) IOCB_ENTRY(pring->rspringaddr, pring->rspidx); | 952 | /* |
953 | * Fetch an entry off the ring and copy it into a local data | ||
954 | * structure. The copy involves a byte-swap since the | ||
955 | * network byte order and pci byte orders are different. | ||
956 | */ | ||
957 | entry = (IOCB_t *) IOCB_ENTRY(pring->rspringaddr, pring->rspidx); | ||
958 | lpfc_sli_pcimem_bcopy((uint32_t *) entry, | ||
959 | (uint32_t *) &rspiocbq.iocb, | ||
960 | sizeof (IOCB_t)); | ||
961 | irsp = &rspiocbq.iocb; | ||
962 | |||
952 | type = lpfc_sli_iocb_cmd_type(irsp->ulpCommand & CMD_IOCB_MASK); | 963 | type = lpfc_sli_iocb_cmd_type(irsp->ulpCommand & CMD_IOCB_MASK); |
953 | pring->stats.iocb_rsp++; | 964 | pring->stats.iocb_rsp++; |
954 | rsp_cmpl++; | 965 | rsp_cmpl++; |
@@ -980,10 +991,6 @@ lpfc_sli_handle_fast_ring_event(struct lpfc_hba * phba, | |||
980 | break; | 991 | break; |
981 | } | 992 | } |
982 | 993 | ||
983 | rspiocbq.iocb.un.ulpWord[4] = irsp->un.ulpWord[4]; | ||
984 | rspiocbq.iocb.ulpStatus = irsp->ulpStatus; | ||
985 | rspiocbq.iocb.ulpContext = irsp->ulpContext; | ||
986 | rspiocbq.iocb.ulpIoTag = irsp->ulpIoTag; | ||
987 | cmdiocbq = lpfc_sli_txcmpl_ring_iotag_lookup(phba, | 994 | cmdiocbq = lpfc_sli_txcmpl_ring_iotag_lookup(phba, |
988 | pring, | 995 | pring, |
989 | &rspiocbq); | 996 | &rspiocbq); |