aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_ct.c
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2009-10-02 15:16:45 -0400
committerJames Bottomley <James.Bottomley@suse.de>2009-12-04 13:01:40 -0500
commit6669f9bb902b8c3f5e33cb8c32c8c0eec6ed68ed (patch)
treee143e916abc71ff3c7edb7a5508d480391efc1ee /drivers/scsi/lpfc/lpfc_ct.c
parent4d9ab994e214d35107017c342aca42477b137316 (diff)
[SCSI] lpfc 8.3.5: fix VPI registration, error clean up and add support for vlink events
This patch includes the following fixes and new features: - Fix mask size for CT field in WQE - Fix VPI base not used when unregistering VPI on port 1. - Fix UNREG_VPI mailbox command to unreg the correct VPI - Fixed Check for aborted els command - Fix error when trying to load driver with wrong firmware on FCoE HBA. - Fix bug with probe_one routines not putting the Scsi_Host back upon error - Add support for Clear Virtual Link Async Events - Add support for unsolicited CT exchange sequence abort - Add 0x0714 OCeXXXXX PCI ID Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_ct.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_ct.c34
1 files changed, 33 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c
index 9a1bd9534d7..e724048bf39 100644
--- a/drivers/scsi/lpfc/lpfc_ct.c
+++ b/drivers/scsi/lpfc/lpfc_ct.c
@@ -87,7 +87,6 @@ void
87lpfc_ct_unsol_event(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, 87lpfc_ct_unsol_event(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
88 struct lpfc_iocbq *piocbq) 88 struct lpfc_iocbq *piocbq)
89{ 89{
90
91 struct lpfc_dmabuf *mp = NULL; 90 struct lpfc_dmabuf *mp = NULL;
92 IOCB_t *icmd = &piocbq->iocb; 91 IOCB_t *icmd = &piocbq->iocb;
93 int i; 92 int i;
@@ -160,6 +159,39 @@ lpfc_ct_unsol_event(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
160 } 159 }
161} 160}
162 161
162/**
163 * lpfc_sli4_ct_abort_unsol_event - Default handle for sli4 unsol abort
164 * @phba: Pointer to HBA context object.
165 * @pring: Pointer to the driver internal I/O ring.
166 * @piocbq: Pointer to the IOCBQ.
167 *
168 * This function serves as the default handler for the sli4 unsolicited
169 * abort event. It shall be invoked when there is no application interface
170 * registered unsolicited abort handler. This handler does nothing but
171 * just simply releases the dma buffer used by the unsol abort event.
172 **/
173void
174lpfc_sli4_ct_abort_unsol_event(struct lpfc_hba *phba,
175 struct lpfc_sli_ring *pring,
176 struct lpfc_iocbq *piocbq)
177{
178 IOCB_t *icmd = &piocbq->iocb;
179 struct lpfc_dmabuf *bdeBuf;
180 uint32_t size;
181
182 /* Forward abort event to any process registered to receive ct event */
183 lpfc_bsg_ct_unsol_event(phba, pring, piocbq);
184
185 /* If there is no BDE associated with IOCB, there is nothing to do */
186 if (icmd->ulpBdeCount == 0)
187 return;
188 bdeBuf = piocbq->context2;
189 piocbq->context2 = NULL;
190 size = icmd->un.cont64[0].tus.f.bdeSize;
191 lpfc_ct_unsol_buffer(phba, piocbq, bdeBuf, size);
192 lpfc_in_buf_free(phba, bdeBuf);
193}
194
163static void 195static void
164lpfc_free_ct_rsp(struct lpfc_hba *phba, struct lpfc_dmabuf *mlist) 196lpfc_free_ct_rsp(struct lpfc_hba *phba, struct lpfc_dmabuf *mlist)
165{ 197{