Lines Matching defs:queue
254 * @wqe: The work Queue Entry to put on the Work queue.
274 /* sanity check on queue memory */
353 * This routine will update the HBA index of a queue to reflect consumption of
355 * an entry the host calls this function to update the queue's internal
361 /* sanity check on queue memory */
371 * @mqe: The Mailbox Queue Entry to put on the Work queue.
386 /* sanity check on queue memory */
413 * This routine will update the HBA index of a queue to reflect consumption of
415 * an entry the host calls this function to update the queue's internal
422 /* sanity check on queue memory */
437 * the queue's internal hba index, and return the EQE. If no valid EQEs are in
446 /* sanity check on queue memory */
511 * the queue should be rearmed when ringing the doorbell.
519 /* sanity check on queue memory */
549 * the queue should be rearmed when ringing the doorbell.
557 /* sanity check on queue memory */
678 * the queue's internal hba index, and return the CQE. If no valid CQEs are in
687 /* sanity check on queue memory */
731 * queue should be rearmed when ringing the doorbell.
739 /* sanity check on queue memory */
764 * queue should be rearmed when ringing the doorbell.
772 /* sanity check on queue memory */
805 /* sanity check on queue memory */
852 * This routine will update the HBA index of a queue to reflect consumption of
854 * consumed an entry the host calls this function to update the queue's
861 /* sanity check on queue memory */
1422 /* Check if TXQ queue needs to be serviced */
2478 * firmware. If able to post the RQE to the RQ it will queue the hbq entry to
2608 * @qno: HBQ queue number.
2818 * will wake up thread waiting on the wait queue pointed by context1
3044 * mailbox commands to the mboxq_cmpl queue and signals the worker thread.
3046 * completed mailbox commands in mboxq_cmpl queue to the upper layers. This
3667 /* remove from txcmpl queue list */
3703 /* remove from txcmpl queue list */
4506 * queue. The caller does not hold any lock. The function will remove each
4507 * response iocb from the response worker queue and calls the handle
4524 /* Get the response iocb from the head of work queue */
5181 /* Perform FCoE PCI function reset before freeing queue memory */
6966 * @pmb: pointer to the driver internal queue element for mailbox command.
8808 "0381 Error %d during queue setup.\n ", rc);
9135 * completion queue.
9150 /* Check for completions on mailbox completion queue */
9182 * checks to see if mbox completions are on the mailbox completion queue
9184 * mailbox completion queue.
9221 * associated with the mbox completion queue (this could include
9222 * mailbox commands, async events, els commands, receive queue data
9326 * will return MBX_BUSY after queuing the mailbox into mailbox queue.
9350 /* processing mbox queue from intr_handler */
9421 * SLI2 mode to queue and process multiple mbox commands.
9449 /* Another mailbox command is still being processed, queue this
9730 * the driver internal pending mailbox queue. It will then try to wait out the
9813 * commands from the driver internal pending mailbox queue. It makes sure
10090 "mailbox command queue: x%x x%x\n",
10203 /* Get the next mailbox command from head of queue */
11230 * be setup based on what work queue we used.
11253 * out the invalidate queue so we can see the updated
11827 * command sub-system: pending mailbox command queue; the outstanding mailbox
11828 * command; and completed mailbox command queue. It is caller's responsibility
11831 * pending mailbox command queue from the various clients must be stopped;
11850 /* The pending mailbox command queue */
11858 /* The completed mailbox command queue */
11991 * - Free mailbox commands in the mailbox queue.
12561 * -EINVAL, if the iocb is not an FCP I/O, not on the TX cmpl queue, premarked as
12575 /* iocb must be for FCP IO, already exists on the TX cmpl queue,
13295 * command queue. If the mailbox command sub-system shutdown is due to
13870 /* Do NOT queue MBX_HEARTBEAT to the worker
14143 /* Get the first event from the head of the event queue */
14148 /* Notify aborted XRI for ELS work queue */
14162 * @irspiocbq: Pointer to work-queue completion queue entry.
14164 * This routine handles an ELS work-queue completion event and construct
14237 * @mcqe: Pointer to mailbox completion queue entry.
14239 * This routine process a mailbox completion queue entry with asynchronous
14274 * @mcqe: Pointer to mailbox completion queue entry.
14276 * This routine process a mailbox completion queue entry with mailbox
14376 /* Do NOT queue MBX_HEARTBEAT to the worker thread for processing. */
14395 /* There is mailbox completion work to queue to the worker thread */
14424 * lpfc_sli4_sp_handle_mcqe - Process a mailbox completion queue entry
14427 * @cqe: Pointer to mailbox completion queue entry.
14429 * This routine process a mailbox completion queue entry, it invokes the
14456 * lpfc_sli4_sp_handle_els_wcqe - Handle els work-queue completion event
14459 * @wcqe: Pointer to work-queue completion queue entry.
14461 * This routine handles an ELS work-queue completion event.
14501 /* Save off the slow-path queue event for work thread to process */
14515 * @wcqe: Pointer to work-queue completion queue entry.
14524 /* sanity check on queue memory */
14527 /* Check for the slow-path ELS work queue */
14542 * @cq: Pointer to a WQ completion queue.
14543 * @wcqe: Pointer to work-queue completion queue entry.
14562 /* Notify aborted XRI for NVME work queue */
14601 * lpfc_sli4_sp_handle_rcqe - Process a receive-queue completion queue entry
14603 * @rcqe: Pointer to receive-queue completion queue entry.
14605 * This routine process a receive-queue completion queue entry.
14621 /* sanity check on queue memory */
14733 * lpfc_sli4_sp_handle_cqe - Process a slow path completion queue entry
14735 * @cq: Pointer to the completion queue.
14736 * @cqe: Pointer to a completion queue entry.
14738 * This routine process a slow-path work-queue or receive queue completion queue
14750 /* Copy the work queue CQE and convert endian order if needed */
14789 * lpfc_sli4_sp_handle_eqe - Process a slow-path event queue entry
14791 * @eqe: Pointer to fast-path event queue entry.
14792 * @speq: Pointer to slow-path event queue.
14794 * This routine process a event queue entry from the slow-path event queue.
14796 * completion event on a completion queue, if not, an error shall be logged
14798 * queue and process all the entries on that completion queue, rearm the
14799 * completion queue, and then return.
14837 "0390 Cannot schedule queue work "
14849 * This routine processes completion queue entries in a CQ. While a valid
14850 * queue element is found, the handler is called. During processing checks
14915 "0369 No entry from completion queue "
14928 * __lpfc_sli4_sp_process_cq - Process a slow-path event queue entry
14932 * to the type of queue bound to it.
14969 "0370 Invalid completion queue type (%d)\n",
14983 "0394 Cannot schedule queue work "
15024 * lpfc_sli4_fp_handle_fcp_wcqe - Process fast-path work queue completion entry
15027 * @wcqe: Pointer to work-queue completion queue entry.
15029 * This routine process a fast-path work queue completion entry from fast-path
15030 * event queue for FCP command response completion.
15042 /* If resource errors reported from HBA, reduce queue
15106 * @cq: Pointer to completion queue.
15107 * @wcqe: Pointer to work-queue completion queue entry.
15120 /* Check for fast-path FCP work queue release */
15140 * lpfc_sli4_nvmet_handle_rcqe - Process a receive-queue completion queue entry
15142 * @cq: Pointer to completion queue.
15143 * @rcqe: Pointer to receive-queue completion queue entry.
15145 * This routine process a receive-queue completion queue entry.
15171 /* sanity check on queue memory */
15280 * lpfc_sli4_fp_handle_cqe - Process fast-path work queue completion entry
15282 * @cq: Pointer to the completion queue.
15283 * @cqe: Pointer to fast-path completion queue entry.
15285 * This routine process a fast-path work queue completion entry from fast-path
15286 * event queue for FCP command response completion.
15297 /* Copy the work queue CQE and convert endian order if needed */
15342 * __lpfc_sli4_hba_process_cq - Process a fast-path event queue entry
15377 "0367 Cannot schedule queue work "
15403 * lpfc_sli4_hba_handle_eqe - Process a fast-path event queue entry
15405 * @eq: Pointer to the queue structure.
15406 * @eqe: Pointer to fast-path event queue entry.
15409 * This routine process a event queue entry from the fast-path event queue.
15411 * completion event on a completion queue, if not, an error shall be logged
15413 * queue and process all the entries on the completion queue, rearm the
15414 * completion queue, and then return.
15471 "queue identifier: eqcqid=%d, fcpcqid=%d\n",
15496 "0383 Cannot schedule queue work "
15779 * lpfc_sli4_queue_free - free a queue structure and associated memory
15780 * @queue: The queue structure to free.
15782 * This function frees a queue structure and the DMAable memory used for
15783 * the host resident queue. This function must be called after destroying the
15784 * queue on the HBA.
15787 lpfc_sli4_queue_free(struct lpfc_queue *queue)
15791 if (!queue)
15794 if (!list_empty(&queue->wq_list))
15795 list_del(&queue->wq_list);
15797 while (!list_empty(&queue->page_list)) {
15798 list_remove_head(&queue->page_list, dmabuf, struct lpfc_dmabuf,
15800 dma_free_coherent(&queue->phba->pcidev->dev, queue->page_size,
15804 if (queue->rqbp) {
15805 lpfc_free_rq_buffer(queue->phba, queue);
15806 kfree(queue->rqbp);
15809 if (!list_empty(&queue->cpu_list))
15810 list_del(&queue->cpu_list);
15812 kfree(queue);
15817 * lpfc_sli4_queue_alloc - Allocate and initialize a queue structure
15818 * @phba: The HBA that this queue is being created on.
15819 * @page_size: The size of a queue page
15820 * @entry_size: The size of each queue entry for this queue.
15821 * @entry_count: The number of entries that this queue will handle.
15822 * @cpu: The cpu that will primarily utilize this queue.
15824 * This function allocates a queue structure and the DMAable memory used for
15825 * the host resident queue. This function must be called before creating the
15826 * queue on the HBA.
15832 struct lpfc_queue *queue;
15846 queue = kzalloc_node(sizeof(*queue) + (sizeof(void *) * pgcnt),
15848 if (!queue)
15851 INIT_LIST_HEAD(&queue->list);
15852 INIT_LIST_HEAD(&queue->_poll_list);
15853 INIT_LIST_HEAD(&queue->wq_list);
15854 INIT_LIST_HEAD(&queue->wqfull_list);
15855 INIT_LIST_HEAD(&queue->page_list);
15856 INIT_LIST_HEAD(&queue->child_list);
15857 INIT_LIST_HEAD(&queue->cpu_list);
15859 /* Set queue parameters now. If the system cannot provide memory
15862 queue->page_count = pgcnt;
15863 queue->q_pgs = (void **)&queue[1];
15864 queue->entry_cnt_per_pg = hw_page_size / entry_size;
15865 queue->entry_size = entry_size;
15866 queue->entry_count = entry_count;
15867 queue->page_size = hw_page_size;
15868 queue->phba = phba;
15870 for (x = 0; x < queue->page_count; x++) {
15883 list_add_tail(&dmabuf->list, &queue->page_list);
15885 queue->q_pgs[x] = dmabuf->virt;
15887 INIT_WORK(&queue->irqwork, lpfc_sli4_hba_process_cq);
15888 INIT_WORK(&queue->spwork, lpfc_sli4_sp_process_cq);
15889 INIT_DELAYED_WORK(&queue->sched_irqwork, lpfc_sli4_dly_hba_process_cq);
15890 INIT_DELAYED_WORK(&queue->sched_spwork, lpfc_sli4_dly_sp_process_cq);
15894 return queue;
15896 lpfc_sli4_queue_free(queue);
15902 * @phba: HBA structure that indicates port to create a queue on.
16045 * @phba: HBA structure that indicates port to create a queue on.
16046 * @eq: The queue structure to use to create the event queue.
16049 * This function creates an event queue, as detailed in @eq, on a port,
16054 * determine the number of pages to allocate and use for this queue. This
16056 * event queue. This function is asynchronous and will wait for the mailbox
16060 * memory this function will return -ENOMEM. If the queue create mailbox command
16075 /* sanity check on queue memory */
16241 * @phba: HBA structure that indicates port to create a queue on.
16242 * @cq: The queue structure to use to create the completion queue.
16243 * @eq: The event queue to bind this completion queue to.
16244 * @type: Type of queue (EQ, GCQ, MCQ, WCQ, etc).
16245 * @subtype: Functional purpose of the queue (MBOX, IO, ELS, NVMET, etc).
16247 * This function creates a completion queue, as detailed in @wq, on a port,
16252 * determine the number of pages to allocate and use for this queue. The @eq
16253 * is used to indicate which event queue to bind this completion queue to. This
16255 * completion queue. This function is asynchronous and will wait for the mailbox
16259 * memory this function will return -ENOMEM. If the queue create mailbox command
16273 /* sanity check on queue memory */
16368 /* Set up completion queue's type and subtype */
16387 * @phba: HBA structure that indicates port to create a queue on.
16388 * @cqp: The queue structure array to use to create the completion queues.
16389 * @hdwq: The hardware queue array with the EQ to bind completion queues to.
16390 * @type: Type of queue (EQ, GCQ, MCQ, WCQ, etc).
16391 * @subtype: Functional purpose of the queue (MBOX, IO, ELS, NVMET, etc).
16393 * This function creates a set of completion queue, s to support MRQ
16399 * determine the number of pages to allocate and use for this queue. The @eq
16400 * is used to indicate which event queue to bind this completion queue to. This
16402 * completion queue. This function is asynchronous and will wait for the mailbox
16406 * memory this function will return -ENOMEM. If the queue create mailbox command
16425 /* sanity check on queue memory */
16583 /* Set up completion queue's type and subtype */
16640 * @phba: HBA structure that indicates port to create a queue on.
16641 * @mq: The queue structure to use to create the mailbox queue.
16643 * @cq: The completion queue to associate with this cq.
16699 * @phba: HBA structure that indicates port to create a queue on.
16700 * @mq: The queue structure to use to create the mailbox queue.
16701 * @cq: The completion queue to associate with this cq.
16702 * @subtype: The queue's subtype.
16704 * This function creates a mailbox queue, as detailed in @mq, on a port,
16709 * determine the number of pages to allocate and use for this queue. This
16711 * mailbox queue. This function is asynchronous and will wait for the mailbox
16715 * memory this function will return -ENOMEM. If the queue create mailbox command
16731 /* sanity check on queue memory */
16853 * @phba: HBA structure that indicates port to create a queue on.
16854 * @wq: The queue structure to use to create the work queue.
16855 * @cq: The completion queue to bind this work queue to.
16856 * @subtype: The subtype of the work queue indicating its functionality.
16858 * This function creates a work queue, as detailed in @wq, on a port, described
16863 * determine the number of pages to allocate and use for this queue. The @cq
16864 * is used to indicate which completion queue to bind this work queue to. This
16866 * work queue. This function is asynchronous and will wait for the mailbox
16870 * memory this function will return -ENOMEM. If the queue create mailbox command
16895 /* sanity check on queue memory */
17115 * @phba: HBA structure that indicates port to create a queue on.
17116 * @hrq: The queue structure to use to create the header receive queue.
17117 * @drq: The queue structure to use to create the data receive queue.
17118 * @cq: The completion queue to bind this work queue to.
17119 * @subtype: The subtype of the work queue indicating its functionality.
17121 * This function creates a receive buffer queue pair , as detailed in @hrq and
17127 * number of pages to use for this queue. The @cq is used to indicate which
17128 * completion queue to bind received buffers that are posted to these queues to.
17130 * receive queue pair. This function is asynchronous and will wait for the
17134 * memory this function will return -ENOMEM. If the queue create mailbox command
17152 /* sanity check on queue memory */
17301 /* now create the data queue */
17405 * @phba: HBA structure that indicates port to create a queue on.
17406 * @hrqp: The queue structure array to use to create the header receive queues.
17407 * @drqp: The queue structure array to use to create the data receive queues.
17408 * @cqp: The completion queue array to bind these receive queues to.
17409 * @subtype: Functional purpose of the queue (MBOX, IO, ELS, NVMET, etc).
17411 * This function creates a receive buffer queue pair , as detailed in @hrq and
17417 * number of pages to use for this queue. The @cq is used to indicate which
17418 * completion queue to bind received buffers that are posted to these queues to.
17420 * receive queue pair. This function is asynchronous and will wait for the
17424 * memory this function will return -ENOMEM. If the queue create mailbox command
17482 /* sanity check on queue memory */
17584 /* Initialize all RQs with associated queue id */
17599 * @phba: HBA structure that indicates port to destroy a queue on.
17600 * @eq: The queue structure associated with the queue to destroy.
17602 * This function destroys a queue, as detailed in @eq by sending an mailbox
17603 * command, specific to the type of queue, to the HBA.
17605 * The @eq struct is used to get the queue ID of the queue to destroy.
17607 * On success this function will return a zero. If the queue destroy mailbox
17618 /* sanity check on queue memory */
17657 * @phba: HBA structure that indicates port to destroy a queue on.
17658 * @cq: The queue structure associated with the queue to destroy.
17660 * This function destroys a queue, as detailed in @cq by sending an mailbox
17661 * command, specific to the type of queue, to the HBA.
17663 * The @cq struct is used to get the queue ID of the queue to destroy.
17665 * On success this function will return a zero. If the queue destroy mailbox
17676 /* sanity check on queue memory */
17712 * @phba: HBA structure that indicates port to destroy a queue on.
17713 * @mq: The queue structure associated with the queue to destroy.
17715 * This function destroys a queue, as detailed in @mq by sending an mailbox
17716 * command, specific to the type of queue, to the HBA.
17718 * The @mq struct is used to get the queue ID of the queue to destroy.
17720 * On success this function will return a zero. If the queue destroy mailbox
17731 /* sanity check on queue memory */
17767 * @phba: HBA structure that indicates port to destroy a queue on.
17768 * @wq: The queue structure associated with the queue to destroy.
17770 * This function destroys a queue, as detailed in @wq by sending an mailbox
17771 * command, specific to the type of queue, to the HBA.
17773 * The @wq struct is used to get the queue ID of the queue to destroy.
17775 * On success this function will return a zero. If the queue destroy mailbox
17786 /* sanity check on queue memory */
17823 * @phba: HBA structure that indicates port to destroy a queue on.
17824 * @hrq: The queue structure associated with the queue to destroy.
17825 * @drq: The queue structure associated with the queue to destroy.
17827 * This function destroys a queue, as detailed in @rq by sending an mailbox
17828 * command, specific to the type of queue, to the HBA.
17830 * The @rq struct is used to get the queue ID of the queue to destroy.
17832 * On success this function will return a zero. If the queue destroy mailbox
17844 /* sanity check on queue memory */
20867 * @phba: HBA structure that indicates port to create a queue on.
21189 * @sglq: Pointer to the scatter gather queue object.
21313 * @qp: Pointer to HDW queue.
21675 * @qp: pointer to HDW queue
21926 * @qp: pointer to HDW queue