diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_ct.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_ct.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c index 7fc74cf5823b..26dae8bae2d1 100644 --- a/drivers/scsi/lpfc/lpfc_ct.c +++ b/drivers/scsi/lpfc/lpfc_ct.c | |||
@@ -34,6 +34,7 @@ | |||
34 | 34 | ||
35 | #include "lpfc_hw.h" | 35 | #include "lpfc_hw.h" |
36 | #include "lpfc_sli.h" | 36 | #include "lpfc_sli.h" |
37 | #include "lpfc_nl.h" | ||
37 | #include "lpfc_disc.h" | 38 | #include "lpfc_disc.h" |
38 | #include "lpfc_scsi.h" | 39 | #include "lpfc_scsi.h" |
39 | #include "lpfc.h" | 40 | #include "lpfc.h" |
@@ -134,25 +135,24 @@ lpfc_ct_unsol_event(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, | |||
134 | } | 135 | } |
135 | list_del(&head); | 136 | list_del(&head); |
136 | } else { | 137 | } else { |
137 | struct lpfc_iocbq *next; | 138 | INIT_LIST_HEAD(&head); |
138 | 139 | list_add_tail(&head, &piocbq->list); | |
139 | list_for_each_entry_safe(iocbq, next, &piocbq->list, list) { | 140 | list_for_each_entry(iocbq, &head, list) { |
140 | icmd = &iocbq->iocb; | 141 | icmd = &iocbq->iocb; |
141 | if (icmd->ulpBdeCount == 0) | 142 | if (icmd->ulpBdeCount == 0) |
142 | lpfc_ct_unsol_buffer(phba, piocbq, NULL, 0); | 143 | lpfc_ct_unsol_buffer(phba, iocbq, NULL, 0); |
143 | for (i = 0; i < icmd->ulpBdeCount; i++) { | 144 | for (i = 0; i < icmd->ulpBdeCount; i++) { |
144 | paddr = getPaddr(icmd->un.cont64[i].addrHigh, | 145 | paddr = getPaddr(icmd->un.cont64[i].addrHigh, |
145 | icmd->un.cont64[i].addrLow); | 146 | icmd->un.cont64[i].addrLow); |
146 | mp = lpfc_sli_ringpostbuf_get(phba, pring, | 147 | mp = lpfc_sli_ringpostbuf_get(phba, pring, |
147 | paddr); | 148 | paddr); |
148 | size = icmd->un.cont64[i].tus.f.bdeSize; | 149 | size = icmd->un.cont64[i].tus.f.bdeSize; |
149 | lpfc_ct_unsol_buffer(phba, piocbq, mp, size); | 150 | lpfc_ct_unsol_buffer(phba, iocbq, mp, size); |
150 | lpfc_in_buf_free(phba, mp); | 151 | lpfc_in_buf_free(phba, mp); |
151 | } | 152 | } |
152 | list_del(&iocbq->list); | ||
153 | lpfc_sli_release_iocbq(phba, iocbq); | ||
154 | lpfc_post_buffer(phba, pring, i); | 153 | lpfc_post_buffer(phba, pring, i); |
155 | } | 154 | } |
155 | list_del(&head); | ||
156 | } | 156 | } |
157 | } | 157 | } |
158 | 158 | ||
@@ -212,7 +212,7 @@ lpfc_alloc_ct_rsp(struct lpfc_hba *phba, int cmdcode, struct ulp_bde64 *bpl, | |||
212 | else | 212 | else |
213 | list_add_tail(&mp->list, &mlist->list); | 213 | list_add_tail(&mp->list, &mlist->list); |
214 | 214 | ||
215 | bpl->tus.f.bdeFlags = BUFF_USE_RCV; | 215 | bpl->tus.f.bdeFlags = BUFF_TYPE_BDE_64I; |
216 | /* build buffer ptr list for IOCB */ | 216 | /* build buffer ptr list for IOCB */ |
217 | bpl->addrLow = le32_to_cpu(putPaddrLow(mp->phys) ); | 217 | bpl->addrLow = le32_to_cpu(putPaddrLow(mp->phys) ); |
218 | bpl->addrHigh = le32_to_cpu(putPaddrHigh(mp->phys) ); | 218 | bpl->addrHigh = le32_to_cpu(putPaddrHigh(mp->phys) ); |
@@ -283,7 +283,7 @@ lpfc_gen_req(struct lpfc_vport *vport, struct lpfc_dmabuf *bmp, | |||
283 | icmd->un.genreq64.bdl.ulpIoTag32 = 0; | 283 | icmd->un.genreq64.bdl.ulpIoTag32 = 0; |
284 | icmd->un.genreq64.bdl.addrHigh = putPaddrHigh(bmp->phys); | 284 | icmd->un.genreq64.bdl.addrHigh = putPaddrHigh(bmp->phys); |
285 | icmd->un.genreq64.bdl.addrLow = putPaddrLow(bmp->phys); | 285 | icmd->un.genreq64.bdl.addrLow = putPaddrLow(bmp->phys); |
286 | icmd->un.genreq64.bdl.bdeFlags = BUFF_TYPE_BDL; | 286 | icmd->un.genreq64.bdl.bdeFlags = BUFF_TYPE_BLP_64; |
287 | icmd->un.genreq64.bdl.bdeSize = (num_entry * sizeof (struct ulp_bde64)); | 287 | icmd->un.genreq64.bdl.bdeSize = (num_entry * sizeof (struct ulp_bde64)); |
288 | 288 | ||
289 | if (usr_flg) | 289 | if (usr_flg) |
@@ -861,7 +861,7 @@ lpfc_cmpl_ct(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
861 | 861 | ||
862 | retry++; | 862 | retry++; |
863 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, | 863 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
864 | "0216 Retrying NS cmd %x\n", cmdcode); | 864 | "0250 Retrying NS cmd %x\n", cmdcode); |
865 | rc = lpfc_ns_cmd(vport, cmdcode, retry, 0); | 865 | rc = lpfc_ns_cmd(vport, cmdcode, retry, 0); |
866 | if (rc == 0) | 866 | if (rc == 0) |
867 | goto out; | 867 | goto out; |