Lines Matching defs:iocb
873 * lpfc_cmd_iocb - Get next command iocb entry in the ring
877 * This function returns pointer to next command iocb entry
879 * other threads consume the next command iocb.
890 * lpfc_resp_iocb - Get next response iocb entry in the ring
894 * This function returns pointer to next response iocb entry
896 * that no other thread consume the next response iocb.
907 * __lpfc_sli_get_iocbq - Allocates an iocb object from iocb pool
911 * allocates a new driver iocb object from the iocb pool. If the
913 * allocated iocb object else it returns NULL.
1234 * __lpfc_sli_get_els_sglq - Allocates an iocb object from sgl pool
1239 * or the fc els ring lock held depending on the iocb usage. This function
1305 * __lpfc_sli_get_nvmet_sglq - Allocates an iocb object from sgl pool
1333 * lpfc_sli_get_iocbq - Allocates an iocb object from iocb pool
1337 * allocates a new driver iocb object from the iocb pool. If the
1339 * allocated iocb object else it returns NULL.
1354 * __lpfc_sli_release_iocbq_s4 - Release iocb to the iocb pool
1356 * @iocbq: Pointer to driver iocb object.
1358 * This function is called to release the driver iocb object
1359 * to the iocb pool. The iotag in the iocb object
1360 * does not change for each use of the iocb object. This function
1361 * clears all other fields of the iocb object when it is freed.
1442 * __lpfc_sli_release_iocbq_s3 - Release iocb to the iocb pool
1444 * @iocbq: Pointer to driver iocb object.
1446 * This function is called to release the driver iocb object to the
1447 * iocb pool. The iotag in the iocb object does not change for each
1448 * use of the iocb object. This function clears all other fields of
1449 * the iocb object when it is freed. The hbalock is asserted held in
1459 memset_startat(iocbq, 0, iocb);
1465 * __lpfc_sli_release_iocbq - Release iocb to the iocb pool
1467 * @iocbq: Pointer to driver iocb object.
1470 * iocb object to the iocb pool. The iotag in the iocb object
1471 * does not change for each use of the iocb object. This function
1472 * clears all other fields of the iocb object when it is freed.
1484 * lpfc_sli_release_iocbq - Release iocb to the iocb pool
1486 * @iocbq: Pointer to driver iocb object.
1488 * This function is called with no lock held to release the iocb to
1489 * iocb pool.
1534 piocb->iocb.ulpStatus = ulpstatus;
1535 piocb->iocb.un.ulpWord[4] = ulpWord4;
1547 * lpfc_sli_iocb_cmd_type - Get the iocb type
1548 * @iocb_cmnd: iocb command code.
1550 * This function is called by ring event handler function to get the iocb type.
1551 * This function translates the iocb command to an iocb command type used to
1554 * LPFC_UNKNOWN_IOCB if it is an unsupported iocb
1555 * LPFC_SOL_IOCB if it is a solicited iocb completion
1556 * LPFC_ABORT_IOCB if it is an abort iocb
1557 * LPFC_UNSOL_IOCB if it is an unsolicited iocb
1706 * lpfc_sli_ringtxcmpl_put - Adds new iocb to the txcmplq
1709 * @piocb: Pointer to the driver iocb object.
1713 * new iocb to txcmplq of the given ring. This function always returns
1750 * iocb in txq of the given ring. If there is any iocb in
1751 * the txq, the function returns first iocb in the list after
1752 * removing the iocb from the list, else it returns NULL.
1768 * @cmdiocb: Pointer to driver command iocb object.
1769 * @rspiocb: Pointer to driver response iocb object.
2040 * lpfc_sli_next_iocb_slot - Get next iocb slot in the ring
2045 * iocb without releasing the lock. If the caller releases the lock,
2046 * iocb slot returned by the function is not guaranteed to be available.
2047 * The function returns pointer to the next available iocb slot if there
2099 * lpfc_sli_next_iotag - Get an iotag for the iocb
2101 * @iocbq: Pointer to driver iocb object.
2103 * This function gets an iotag for the iocb. If there is no unused iotag and
2174 * lpfc_sli_submit_iocb - Submit an iocb to the firmware
2177 * @iocb: Pointer to iocb slot in the ring.
2178 * @nextiocb: Pointer to driver iocb object which need to be
2181 * This function is called to post a new iocb to the firmware. This
2182 * function copies the new iocb to ring iocb slot and updates the
2183 * ring pointers. It adds the new iocb to txcmplq if there is
2184 * a completion call back for this iocb else the function will free the
2185 * iocb object. The hbalock is asserted held in the code path calling
2190 IOCB_t *iocb, struct lpfc_iocbq *nextiocb)
2195 nextiocb->iocb.ulpIoTag = (nextiocb->cmd_cmpl) ? nextiocb->iotag : 0;
2201 *(((uint32_t *) &nextiocb->iocb) + 4),
2202 *(((uint32_t *) &nextiocb->iocb) + 6),
2203 *(((uint32_t *) &nextiocb->iocb) + 7));
2207 * Issue iocb command to adapter
2209 lpfc_sli_pcimem_bcopy(&nextiocb->iocb, iocb, phba->iocb_cmd_size);
2298 IOCB_t *iocb;
2316 while ((iocb = lpfc_sli_next_iocb_slot(phba, pring)) &&
2318 lpfc_sli_submit_iocb(phba, pring, iocb, nextiocb);
2320 if (iocb)
3392 irsp = &saveq->iocb;
3435 * lpfc_sli_process_unsol_iocb - Unsolicited iocb handler
3438 * @saveq: Pointer to the unsolicited iocb.
3441 * when there is an unsolicited iocb posted to the response ring by the
3445 * When the function returns 1 the caller can free the iocb object otherwise
3446 * upper layer functions will free the iocb objects.
3459 irsp = &saveq->iocb;
3470 "ASYNC_STATUS iocb received evt_code "
3509 "an unsolicited iocb. tag 0x%x\n",
3521 " unsolicited iocb. tag 0x%x\n",
3526 irsp = &iocbq->iocb;
3536 "buffer for an unsolicited iocb"
3550 "iocb. tag 0x%x\n",
3576 if (iocbq->iocb.unsli3.rcvsli3.ox_id ==
3577 saveq->iocb.unsli3.rcvsli3.ox_id) {
3587 if (saveq->iocb.ulpStatus != IOSTAT_INTERMED_RSP) {
3590 irsp = &saveq->iocb;
3601 w5p = (WORD5 *)&(saveq->iocb.un.ulpWord[5]);
3639 * lpfc_sli_iocbq_lookup - Find command iocb for the given response iocb
3642 * @prspiocb: Pointer to response iocb object.
3644 * This function looks up the iocb_lookup table to get the command iocb
3645 * corresponding to the given response iocb using the iotag of the
3646 * response iocb. The driver calls this function with the hbalock held
3648 * This function returns the command iocb object if it finds the command
3649 * iocb else returns NULL.
3662 iotag = prspiocb->iocb.ulpIoTag;
3683 * lpfc_sli_iocbq_lookup_by_tag - Find command iocb for the iotag
3688 * This function looks up the iocb_lookup table to get the command iocb
3691 * This function returns the command iocb object if it finds the command
3692 * iocb else returns NULL.
3720 * lpfc_sli_process_sol_iocb - process solicited iocb completion
3723 * @saveq: Pointer to the response iocb to be processed.
3726 * rings when there is a new response iocb in the response ring.
3728 * gets the command iocb associated with the response iocb and
3729 * calls the completion handler for the command iocb. If there
3731 * associated with command iocb. If the response iocb is for
3732 * an already aborted command iocb, the status of the completion
3761 iotag = saveq->iocb.ulpIoTag;
3790 saveq->iocb.ulpStatus =
3792 saveq->iocb.un.ulpWord[4] =
3888 * This function is called from the iocb ring event handlers when
3979 * The function processes each response iocb in the response ring until it
3980 * finds an iocb with LE bit set and chains all the iocbs up to the iocb with
3981 * LE bit set. The function will call the completion handler of the command iocb
3982 * if the response iocb indicates a completion for a command iocb or it is
3984 * function if this is an unsolicited iocb.
4038 (uint32_t *) &rspiocbq.iocb,
4041 irsp = &rspiocbq.iocb;
4079 * Idle exchange closed via ABTS from port. No iocb
4168 * lpfc_sli_sp_handle_rspiocb - Handle slow-path response iocb
4175 * seeing the iocb with the LE bit set. The function will call
4176 * lpfc_sli_process_sol_iocb function if the response iocb indicates a
4177 * completion of a command iocb. The function will call the
4178 * lpfc_sli_process_unsol_iocb function if this is an unsolicited iocb.
4180 * iocb is an abort completion. The function returns NULL when the response
4181 * iocb has the LE bit set and all the chained iocbs are processed, otherwise
4182 * this function shall chain the iocb on to the iocb_continueq and return the
4183 * response iocb passed in.
4203 /* First add the response iocb to the countinueq list */
4209 * associated with this iocb completion.
4234 irsp = &rspiocbp->iocb;
4274 * Fetch the iocb command type and call the correct completion
4371 * remove each response iocb in the response ring and calls the handle
4372 * response iocb routine (lpfc_sli_sp_handle_rspiocb) to process it.
4419 * The process is to get the next available response iocb, get
4420 * a free iocb from the list, copy the response data into the
4421 * free iocb, insert to the continuation list, and update the
4423 * iocb's in the ring available to DMA as fast as possible but
4424 * pays a penalty for a copy operation. Since the iocb is
4440 lpfc_sli_pcimem_bcopy(entry, &rspiocbp->iocb,
4442 irsp = &rspiocbp->iocb;
4505 * ELS response iocb on the driver internal slow-path response iocb worker
4507 * response iocb from the response worker queue and calls the handle
4508 * response iocb routine (lpfc_sli_sp_handle_rspiocb) to process it.
4524 /* Get the response iocb from the head of work queue */
4564 * This function aborts all iocbs in the given ring and frees all the iocb
4565 * objects in txq. This function issues an abort iocb for all the iocb commands
4574 struct lpfc_iocbq *iocb, *next_iocb;
4595 list_for_each_entry_safe(iocb, next_iocb,
4598 iocb, NULL);
4610 list_for_each_entry_safe(iocb, next_iocb,
4613 iocb, NULL);
4635 * This function aborts all iocbs in FCP rings and frees all the iocb
4636 * objects in txq. This function issues an abort iocb for all the iocb commands
4663 * This function flushes all iocbs in the IO ring and frees all the iocb
4665 * for all the iocb commands in txcmplq, they will just be returned with
5066 * register. After the HBA resets, this function resets all the iocb ring
5693 * the SLI, setup iocb rings and HBQ rings. In the end the function
8893 /* Initialize and populate the iocb list per host */
8895 "2821 initialize iocb list with %d entries\n",
8900 "1413 Failed to init iocb list.\n");
9382 /* If HBA has a deferred error attention, fail the iocb. */
10342 * __lpfc_sli_ringtx_put - Add an iocb to the txq
10345 * @piocb: Pointer to address of newly added command iocb.
10349 * iocb to the txq when SLI layer cannot submit the command iocb
10360 /* Insert the caller's iocb in the txq tail for later processing. */
10365 * lpfc_sli_next_iocb - Get the next iocb in the txq
10368 * @piocb: Pointer to address of newly added command iocb.
10371 * iocb is submitted to the firmware. This function checks
10377 * If there is no iocb in the txq then the function will return
10401 * @ring_number: SLI ring number to issue iocb on.
10402 * @piocb: Pointer to command iocb.
10406 * an iocb command to an HBA with SLI-3 interface spec. If the PCI slot is
10412 * processing new iocb. If there is no slot available in the ring and
10413 * flag & SLI_IOCB_RET_IOCB is set, the new iocb is added to the txq, otherwise
10417 * after it successfully submit the iocb to firmware or after adding to the
10425 IOCB_t *iocb;
10431 (piocb->iocb.ulpCommand != CMD_ABORT_XRI_CN) &&
10432 (piocb->iocb.ulpCommand != CMD_CLOSE_XRI_CN)) {
10435 piocb->iocb.ulpCommand);
10445 /* If HBA has a deferred error attention, fail the iocb. */
10467 switch (piocb->iocb.ulpCommand) {
10494 while ((iocb = lpfc_sli_next_iocb_slot(phba, pring)) &&
10496 lpfc_sli_submit_iocb(phba, pring, iocb, nextiocb);
10498 if (iocb)
10522 * __lpfc_sli_issue_fcp_io_s3 - SLI3 device for sending fcp io iocb
10525 * @piocb: Pointer to command iocb.
10529 * send an iocb command to an HBA with SLI-3 interface spec.
10553 * @piocb: Pointer to command iocb.
10631 * @ring_number: SLI ring number to issue iocb on.
10632 * @piocb: Pointer to command iocb.
10636 * an iocb command to an HBA with SLI-4 interface spec.
10639 * after it successfully submit the iocb to firmware or after adding to the
10747 * __lpfc_sli_issue_iocb - Wrapper func of lockless version for issuing iocb
10773 cmd = &cmdiocbq->iocb;
10920 cmd = &cmdiocbq->iocb;
11009 icmd = &cmdiocbq->iocb;
11101 icmd = &cmdiocbq->iocb;
11213 * @piocb: Pointer to command iocb.
11229 * for abort iocb hba_wqidx should already
11274 * @piocb: Pointer to command iocb.
11338 /* Adjust cmd/rsp ring iocb entries more evenly */
11393 * @iocbq: Pointer to iocb object.
11412 vpi = iocbq->iocb.un.asyncstat.sub_ctxt_tag;
11413 rpi = iocbq->iocb.ulpContext;
11418 vpi, rpi, iocbq->iocb.ulpStatus);
11427 if (iocbq->iocb.ulpStatus == IOSTAT_LOCAL_REJECT)
11435 vpi, rpi, iocbq->iocb.ulpStatus,
11436 iocbq->iocb.ulpContext);
11483 * lpfc_sli_async_event_handler - ASYNC iocb handler function
11486 * @iocbq: Pointer to iocb object.
11489 * function when there is an ASYNC event iocb in the ring.
11505 icmd = &iocbq->iocb;
11729 * lpfc_sli4_queue_init sets up mailbox queues and iocb queues for each
11785 * lpfc_sli_queue_init sets up mailbox queues and iocb queues for each
11886 * - Send abort for all iocb commands associated with this
11899 struct lpfc_iocbq *iocb, *next_iocb;
11923 list_for_each_entry_safe(iocb, next_iocb,
11925 if (iocb->vport != vport)
11927 list_move_tail(&iocb->list, &completions);
11929 list_for_each_entry_safe(iocb, next_iocb,
11931 if (iocb->vport != vport)
11933 lpfc_sli_issue_abort_iotag(phba, pring, iocb,
11950 list_for_each_entry_safe(iocb, next_iocb,
11952 if (iocb->vport != vport)
11954 list_move_tail(&iocb->list, &completions);
11957 list_for_each_entry_safe(iocb, next_iocb,
11959 if (iocb->vport != vport)
11961 lpfc_sli_issue_abort_iotag(phba, pring, iocb,
11982 * This function cleans up all iocb, buffers, mailbox commands
11988 * - Iterate through the iocb txq and free each entry
12163 * allocates a tag for buffer posted using CMD_QUE_XRI64_CX iocb. The
12189 * Buffers posted using CMD_QUE_XRI64_CX iocb are in pring->postbufq
12191 * iocb is posted to the response ring with the tag of the buffer.
12194 * iocb. If the buffer is found then lpfc_dmabuf object of the
12272 * @cmdiocb: Pointer to driver command iocb object.
12273 * @rspiocb: Pointer to driver response iocb object.
12278 * associated with the abort iocb.
12291 * will return the iocb. Just Log the message.
12302 "0327 Cannot abort els iocb x%px "
12308 cmdiocb->iocb.un.acxri.abortContextTag,
12320 * @cmdiocb: Pointer to driver command iocb object.
12321 * @rspiocb: Pointer to driver response iocb object.
12344 irsp = &rspiocb->iocb;
12377 * lpfc_sli_issue_abort_iotag - Abort function for a command iocb
12380 * @cmdiocb: Pointer to driver command iocb object.
12383 * This function issues an abort iocb for the provided command iocb. In case
12384 * of unloading, the abort iocb will not be issued to commands on the ELS
12388 * when the command iocb is an abort request.
12424 * If we're unloading, don't abort iocb on the ELS ring, but change
12450 iotag = cmdiocb->iocb.ulpIoTag;
12455 ulp_context = cmdiocb->iocb.ulpContext;
12468 cmdiocb->iocb.ulpClass,
12518 * iocb off txcmplq and call compl in case of IOCB_ERROR.
12554 * @iocbq: Pointer to iocb object.
12557 * This function acts as an iocb filter for functions which abort FCP iocbs.
12560 * -ENODEV, if a null iocb or vport ptr is encountered
12561 * -EINVAL, if the iocb is not an FCP I/O, not on the TX cmpl queue, premarked as
12562 * driver already started the abort process, or is an abort iocb itself
12563 * 0, passes criteria for aborting the FCP I/O iocb
12575 /* iocb must be for FCP IO, already exists on the TX cmpl queue,
12576 * can't be premarked as driver aborted, nor be an ABORT iocb itself
12592 * @iocbq: Pointer to driver iocb object.
12598 * This function acts as an iocb filter for validating a lun/SCSI target/SCSI
12602 * 0 if the filtering criteria is met for the given iocb and will return
12605 * given iocb is for the SCSI device specified by vport, tgt_id and
12608 * given iocb is for the SCSI target specified by vport and tgt_id
12611 * given iocb is for the SCSI host associated with the given vport.
12711 * @cmdiocb: Pointer to command iocb object.
12712 * @rspiocb: Pointer to response iocb object.
12714 * This function is called when an aborted FCP iocb completes. This
12716 * This function frees the iocb.
12728 cmdiocb->iocb.un.acxri.abortContextTag,
12909 iotag = iocbq->iocb.ulpIoTag;
12914 ulp_context = iocbq->iocb.ulpContext;
12928 iocbq->iocb.ulpClass, cqid,
12972 * @cmdiocbq: Pointer to command iocb.
12973 * @rspiocbq: Pointer to response iocb.
12981 * This function copy the contents of the response iocb to the
12982 * response iocb memory object provided by the caller of
12984 * sleeps for the iocb completion.
13000 * A time out has occurred for the iocb. If a time out
13042 * @piocbq: Pointer to command iocb.
13066 * lpfc_sli_issue_iocb_wait - Synchronous function to issue iocb commands
13069 * @piocb: Pointer to command iocb.
13070 * @prspiocbq: Pointer to response iocb.
13073 * This function issues the iocb to firmware and waits for the
13074 * iocb to complete. The cmd_cmpl field of the shall be used
13078 * that will provide the needed clean up. If the iocb command is
13082 * a status of IOCB_TIMEDOUT. The caller should not free the iocb
13084 * The function waits for the iocb completion using an
13086 * This function will sleep while waiting for iocb completion.
13090 * This function assumes that the iocb completions occur while
13092 * the thread which process iocb completion for this ring.
13093 * This function clears the cmd_flag of the iocb object before
13094 * issuing the iocb and the iocb completion handler sets this
13095 * flag and wakes this thread when the iocb completes.
13096 * The contents of the response iocb will be copied to prspiocbq
13112 struct lpfc_iocbq *iocb;
13159 * IOCB timed out. Inform the wake iocb wait
13189 list_for_each_entry(iocb, &pring->txq, list) {
13192 list_for_each_entry(iocb, &pring->txcmplq, list) {
14203 /* Put the iocb back on the txcmplq */
18052 * This function gets an xritag for the iocb. If there is no unused xritag
18847 * lpfc_sli4_seq_abort_rsp_cmpl - BLS ABORT RSP seq abort iocb complete handler
18852 * This function handles the sequence abort response iocb command complete
18854 * accept iocb.
18867 if (rsp_iocbq && rsp_iocbq->iocb.ulpStatus)
18936 /* Allocate buffer for rsp iocb */
19184 /* put the first buffer into the first iocb */
19278 "iocb Rctl x%x Type x%x received\n",
19295 /* Free iocb created in lpfc_prep_seq */
21223 pwqeq->iocb.ulpIoTag = pwqeq->iotag;
21416 * @cmdiocb: Pointer to driver command iocb object.