Lines Matching defs:queue

130  * @wqe: The work Queue Entry to put on the Work queue.
150 /* sanity check on queue memory */
228 * This routine will update the HBA index of a queue to reflect consumption of
230 * an entry the host calls this function to update the queue's internal
236 /* sanity check on queue memory */
246 * @mqe: The Mailbox Queue Entry to put on the Work queue.
261 /* sanity check on queue memory */
288 * This routine will update the HBA index of a queue to reflect consumption of
290 * an entry the host calls this function to update the queue's internal
297 /* sanity check on queue memory */
312 * the queue's internal hba index, and return the EQE. If no valid EQEs are in
321 /* sanity check on queue memory */
386 * the queue should be rearmed when ringing the doorbell.
394 /* sanity check on queue memory */
424 * the queue should be rearmed when ringing the doorbell.
432 /* sanity check on queue memory */
553 * the queue's internal hba index, and return the CQE. If no valid CQEs are in
562 /* sanity check on queue memory */
606 * queue should be rearmed when ringing the doorbell.
614 /* sanity check on queue memory */
639 * queue should be rearmed when ringing the doorbell.
647 /* sanity check on queue memory */
680 /* sanity check on queue memory */
727 * This routine will update the HBA index of a queue to reflect consumption of
729 * consumed an entry the host calls this function to update the queue's
736 /* sanity check on queue memory */
1306 /* Check if TXQ queue needs to be serviced */
2083 * firmware. If able to post the RQE to the RQ it will queue the hbq entry to
2213 * @qno: HBQ queue number.
2423 * will wake up thread waiting on the wait queue pointed by context1
2635 * mailbox commands to the mboxq_cmpl queue and signals the worker thread.
2637 * completed mailbox commands in mboxq_cmpl queue to the upper layers. This
3160 /* remove from txcmpl queue list */
3207 /* remove from txcmpl queue list */
3995 * queue. The caller does not hold any lock. The function will remove each
3996 * response iocb from the response worker queue and calls the handle
4013 /* Get the response iocb from the head of work queue */
4646 /* Perform FCoE PCI function reset before freeing queue memory */
6437 * @pmb: pointer to the driver internal queue element for mailbox command.
7709 "0381 Error %d during queue setup.\n ", rc);
8046 * completion queue.
8061 /* Check for completions on mailbox completion queue */
8093 * checks to see if mbox completions are on the mailbox completion queue
8095 * mailbox completion queue.
8132 * associated with the mbox completion queue (this could include
8133 * mailbox commands, async events, els commands, receive queue data
8235 * will return MBX_BUSY after queuing the mailbox into mailbox queue.
8259 /* processing mbox queue from intr_handler */
8330 * SLI2 mode to queue and process multiple mbox commands.
8358 /* Another mailbox command is still being processed, queue this
8639 * the driver internal pending mailbox queue. It will then try to wait out the
8694 * commands from the driver internal pending mailbox queue. It makes sure
8953 "mailbox command queue: x%x x%x\n",
9066 /* Get the next mailbox command from head of queue */
9399 * @sglq: Pointer to the scatter gather queue object.
9504 * lpfc_sli_iocb2wqe - Convert the IOCB to a work queue entry.
9507 * @wqe: Pointer to the work queue entry.
10271 * be setup based on what work queue we used.
10837 * command sub-system: pending mailbox command queue; the outstanding mailbox
10838 * command; and completed mailbox command queue. It is caller's responsibility
10841 * pending mailbox command queue from the various clients must be stopped;
10860 /* The pending mailbox command queue */
10868 /* The completed mailbox command queue */
10996 * - Free mailbox commands in the mailbox queue.
12286 * command queue. If the mailbox command sub-system shutdown is due to
13120 /* Get the first event from the head of the event queue */
13125 /* Notify aborted XRI for ELS work queue */
13255 * @irspiocbq: Pointer to work-queue completion queue entry.
13257 * This routine handles an ELS work-queue completion event and construct
13323 * @mcqe: Pointer to mailbox completion queue entry.
13325 * This routine process a mailbox completion queue entry with asynchronous
13360 * @mcqe: Pointer to mailbox completion queue entry.
13362 * This routine process a mailbox completion queue entry with mailbox
13479 * lpfc_sli4_sp_handle_mcqe - Process a mailbox completion queue entry
13482 * @cqe: Pointer to mailbox completion queue entry.
13484 * This routine process a mailbox completion queue entry, it invokes the
13511 * lpfc_sli4_sp_handle_els_wcqe - Handle els work-queue completion event
13514 * @wcqe: Pointer to work-queue completion queue entry.
13516 * This routine handles an ELS work-queue completion event.
13556 /* Save off the slow-path queue event for work thread to process */
13570 * @wcqe: Pointer to work-queue completion queue entry.
13579 /* sanity check on queue memory */
13582 /* Check for the slow-path ELS work queue */
13597 * @cq: Pointer to a WQ completion queue.
13598 * @wcqe: Pointer to work-queue completion queue entry.
13617 /* Notify aborted XRI for NVME work queue */
13656 * lpfc_sli4_sp_handle_rcqe - Process a receive-queue completion queue entry
13658 * @rcqe: Pointer to receive-queue completion queue entry.
13660 * This routine process a receive-queue completion queue entry.
13676 /* sanity check on queue memory */
13756 * lpfc_sli4_sp_handle_cqe - Process a slow path completion queue entry
13758 * @cq: Pointer to the completion queue.
13759 * @cqe: Pointer to a completion queue entry.
13761 * This routine process a slow-path work-queue or receive queue completion queue
13773 /* Copy the work queue CQE and convert endian order if needed */
13812 * lpfc_sli4_sp_handle_eqe - Process a slow-path event queue entry
13814 * @eqe: Pointer to fast-path event queue entry.
13815 * @speq: Pointer to slow-path event queue.
13817 * This routine process a event queue entry from the slow-path event queue.
13819 * completion event on a completion queue, if not, an error shall be logged
13821 * queue and process all the entries on that completion queue, rearm the
13822 * completion queue, and then return.
13860 "0390 Cannot schedule queue work "
13873 * This routine processes completion queue entries in a CQ. While a valid
13874 * queue element is found, the handler is called. During processing checks
13944 "0369 No entry from completion queue "
13957 * lpfc_sli4_sp_process_cq - Process a slow-path event queue entry
13961 * to the type of queue bound to it.
13998 "0370 Invalid completion queue type (%d)\n",
14012 "0394 Cannot schedule queue work "
14053 * lpfc_sli4_fp_handle_fcp_wcqe - Process fast-path work queue completion entry
14056 * @wcqe: Pointer to work-queue completion queue entry.
14058 * This routine process a fast-path work queue completion entry from fast-path
14059 * event queue for FCP command response completion.
14072 /* If resource errors reported from HBA, reduce queue
14141 * @cq: Pointer to completion queue.
14142 * @wcqe: Pointer to work-queue completion queue entry.
14155 /* Check for fast-path FCP work queue release */
14175 * lpfc_sli4_nvmet_handle_rcqe - Process a receive-queue completion queue entry
14177 * @cq: Pointer to completion queue.
14178 * @rcqe: Pointer to receive-queue completion queue entry.
14180 * This routine process a receive-queue completion queue entry.
14206 /* sanity check on queue memory */
14283 * lpfc_sli4_fp_handle_cqe - Process fast-path work queue completion entry
14285 * @cq: Pointer to the completion queue.
14286 * @cqe: Pointer to fast-path completion queue entry.
14288 * This routine process a fast-path work queue completion entry from fast-path
14289 * event queue for FCP command response completion.
14300 /* Copy the work queue CQE and convert endian order if needed */
14375 "0383 Cannot schedule queue work "
14383 * lpfc_sli4_hba_handle_eqe - Process a fast-path event queue entry
14385 * @eq: Pointer to the queue structure.
14386 * @eqe: Pointer to fast-path event queue entry.
14388 * This routine process a event queue entry from the fast-path event queue.
14390 * completion event on a completion queue, if not, an error shall be logged
14392 * queue and process all the entries on the completion queue, rearm the
14393 * completion queue, and then return.
14449 "queue identifier: eqcqid=%d, fcpcqid=%d\n",
14465 * __lpfc_sli4_hba_process_cq - Process a fast-path event queue entry
14502 "0367 Cannot schedule queue work "
14704 * out the invalidate queue so we can see the updated
14818 * lpfc_sli4_queue_free - free a queue structure and associated memory
14819 * @queue: The queue structure to free.
14821 * This function frees a queue structure and the DMAable memory used for
14822 * the host resident queue. This function must be called after destroying the
14823 * queue on the HBA.
14826 lpfc_sli4_queue_free(struct lpfc_queue *queue)
14830 if (!queue)
14833 if (!list_empty(&queue->wq_list))
14834 list_del(&queue->wq_list);
14836 while (!list_empty(&queue->page_list)) {
14837 list_remove_head(&queue->page_list, dmabuf, struct lpfc_dmabuf,
14839 dma_free_coherent(&queue->phba->pcidev->dev, queue->page_size,
14843 if (queue->rqbp) {
14844 lpfc_free_rq_buffer(queue->phba, queue);
14845 kfree(queue->rqbp);
14848 if (!list_empty(&queue->cpu_list))
14849 list_del(&queue->cpu_list);
14851 kfree(queue);
14856 * lpfc_sli4_queue_alloc - Allocate and initialize a queue structure
14857 * @phba: The HBA that this queue is being created on.
14858 * @page_size: The size of a queue page
14859 * @entry_size: The size of each queue entry for this queue.
14860 * @entry_count: The number of entries that this queue will handle.
14861 * @cpu: The cpu that will primarily utilize this queue.
14863 * This function allocates a queue structure and the DMAable memory used for
14864 * the host resident queue. This function must be called before creating the
14865 * queue on the HBA.
14871 struct lpfc_queue *queue;
14885 queue = kzalloc_node(sizeof(*queue) + (sizeof(void *) * pgcnt),
14887 if (!queue)
14890 INIT_LIST_HEAD(&queue->list);
14891 INIT_LIST_HEAD(&queue->_poll_list);
14892 INIT_LIST_HEAD(&queue->wq_list);
14893 INIT_LIST_HEAD(&queue->wqfull_list);
14894 INIT_LIST_HEAD(&queue->page_list);
14895 INIT_LIST_HEAD(&queue->child_list);
14896 INIT_LIST_HEAD(&queue->cpu_list);
14898 /* Set queue parameters now. If the system cannot provide memory
14901 queue->page_count = pgcnt;
14902 queue->q_pgs = (void **)&queue[1];
14903 queue->entry_cnt_per_pg = hw_page_size / entry_size;
14904 queue->entry_size = entry_size;
14905 queue->entry_count = entry_count;
14906 queue->page_size = hw_page_size;
14907 queue->phba = phba;
14909 for (x = 0; x < queue->page_count; x++) {
14922 list_add_tail(&dmabuf->list, &queue->page_list);
14924 queue->q_pgs[x] = dmabuf->virt;
14926 INIT_WORK(&queue->irqwork, lpfc_sli4_hba_process_cq);
14927 INIT_WORK(&queue->spwork, lpfc_sli4_sp_process_cq);
14928 INIT_DELAYED_WORK(&queue->sched_irqwork, lpfc_sli4_dly_hba_process_cq);
14929 INIT_DELAYED_WORK(&queue->sched_spwork, lpfc_sli4_dly_sp_process_cq);
14933 return queue;
14935 lpfc_sli4_queue_free(queue);
14941 * @phba: HBA structure that indicates port to create a queue on.
15085 * @phba: HBA structure that indicates port to create a queue on.
15086 * @eq: The queue structure to use to create the event queue.
15089 * This function creates an event queue, as detailed in @eq, on a port,
15094 * determine the number of pages to allocate and use for this queue. This
15096 * event queue. This function is asynchronous and will wait for the mailbox
15100 * memory this function will return -ENOMEM. If the queue create mailbox command
15115 /* sanity check on queue memory */
15225 * @phba: HBA structure that indicates port to create a queue on.
15226 * @cq: The queue structure to use to create the completion queue.
15227 * @eq: The event queue to bind this completion queue to.
15228 * @type: Type of queue (EQ, GCQ, MCQ, WCQ, etc).
15229 * @subtype: Functional purpose of the queue (MBOX, IO, ELS, NVMET, etc).
15231 * This function creates a completion queue, as detailed in @wq, on a port,
15236 * determine the number of pages to allocate and use for this queue. The @eq
15237 * is used to indicate which event queue to bind this completion queue to. This
15239 * completion queue. This function is asynchronous and will wait for the mailbox
15243 * memory this function will return -ENOMEM. If the queue create mailbox command
15257 /* sanity check on queue memory */
15352 /* Set up completion queue's type and subtype */
15373 * @phba: HBA structure that indicates port to create a queue on.
15374 * @cqp: The queue structure array to use to create the completion queues.
15375 * @hdwq: The hardware queue array with the EQ to bind completion queues to.
15376 * @type: Type of queue (EQ, GCQ, MCQ, WCQ, etc).
15377 * @subtype: Functional purpose of the queue (MBOX, IO, ELS, NVMET, etc).
15379 * This function creates a set of completion queue, s to support MRQ
15385 * determine the number of pages to allocate and use for this queue. The @eq
15386 * is used to indicate which event queue to bind this completion queue to. This
15388 * completion queue. This function is asynchronous and will wait for the mailbox
15392 * memory this function will return -ENOMEM. If the queue create mailbox command
15411 /* sanity check on queue memory */
15569 /* Set up completion queue's type and subtype */
15626 * @phba: HBA structure that indicates port to create a queue on.
15627 * @mq: The queue structure to use to create the mailbox queue.
15629 * @cq: The completion queue to associate with this cq.
15685 * @phba: HBA structure that indicates port to create a queue on.
15686 * @mq: The queue structure to use to create the mailbox queue.
15687 * @cq: The completion queue to associate with this cq.
15688 * @subtype: The queue's subtype.
15690 * This function creates a mailbox queue, as detailed in @mq, on a port,
15695 * determine the number of pages to allocate and use for this queue. This
15697 * mailbox queue. This function is asynchronous and will wait for the mailbox
15701 * memory this function will return -ENOMEM. If the queue create mailbox command
15717 /* sanity check on queue memory */
15839 * @phba: HBA structure that indicates port to create a queue on.
15840 * @wq: The queue structure to use to create the work queue.
15841 * @cq: The completion queue to bind this work queue to.
15842 * @subtype: The subtype of the work queue indicating its functionality.
15844 * This function creates a work queue, as detailed in @wq, on a port, described
15849 * determine the number of pages to allocate and use for this queue. The @cq
15850 * is used to indicate which completion queue to bind this work queue to. This
15852 * work queue. This function is asynchronous and will wait for the mailbox
15856 * memory this function will return -ENOMEM. If the queue create mailbox command
15881 /* sanity check on queue memory */
16107 * @phba: HBA structure that indicates port to create a queue on.
16108 * @hrq: The queue structure to use to create the header receive queue.
16109 * @drq: The queue structure to use to create the data receive queue.
16110 * @cq: The completion queue to bind this work queue to.
16111 * @subtype: The subtype of the work queue indicating its functionality.
16113 * This function creates a receive buffer queue pair , as detailed in @hrq and
16119 * number of pages to use for this queue. The @cq is used to indicate which
16120 * completion queue to bind received buffers that are posted to these queues to.
16122 * receive queue pair. This function is asynchronous and will wait for the
16126 * memory this function will return -ENOMEM. If the queue create mailbox command
16144 /* sanity check on queue memory */
16293 /* now create the data queue */
16397 * @phba: HBA structure that indicates port to create a queue on.
16398 * @hrqp: The queue structure array to use to create the header receive queues.
16399 * @drqp: The queue structure array to use to create the data receive queues.
16400 * @cqp: The completion queue array to bind these receive queues to.
16401 * @subtype: Functional purpose of the queue (MBOX, IO, ELS, NVMET, etc).
16403 * This function creates a receive buffer queue pair , as detailed in @hrq and
16409 * number of pages to use for this queue. The @cq is used to indicate which
16410 * completion queue to bind received buffers that are posted to these queues to.
16412 * receive queue pair. This function is asynchronous and will wait for the
16416 * memory this function will return -ENOMEM. If the queue create mailbox command
16474 /* sanity check on queue memory */
16576 /* Initialize all RQs with associated queue id */
16591 * @phba: HBA structure that indicates port to destroy a queue on.
16592 * @eq: The queue structure associated with the queue to destroy.
16594 * This function destroys a queue, as detailed in @eq by sending an mailbox
16595 * command, specific to the type of queue, to the HBA.
16597 * The @eq struct is used to get the queue ID of the queue to destroy.
16599 * On success this function will return a zero. If the queue destroy mailbox
16610 /* sanity check on queue memory */
16649 * @phba: HBA structure that indicates port to destroy a queue on.
16650 * @cq: The queue structure associated with the queue to destroy.
16652 * This function destroys a queue, as detailed in @cq by sending an mailbox
16653 * command, specific to the type of queue, to the HBA.
16655 * The @cq struct is used to get the queue ID of the queue to destroy.
16657 * On success this function will return a zero. If the queue destroy mailbox
16668 /* sanity check on queue memory */
16704 * @phba: HBA structure that indicates port to destroy a queue on.
16705 * @mq: The queue structure associated with the queue to destroy.
16707 * This function destroys a queue, as detailed in @mq by sending an mailbox
16708 * command, specific to the type of queue, to the HBA.
16710 * The @mq struct is used to get the queue ID of the queue to destroy.
16712 * On success this function will return a zero. If the queue destroy mailbox
16723 /* sanity check on queue memory */
16759 * @phba: HBA structure that indicates port to destroy a queue on.
16760 * @wq: The queue structure associated with the queue to destroy.
16762 * This function destroys a queue, as detailed in @wq by sending an mailbox
16763 * command, specific to the type of queue, to the HBA.
16765 * The @wq struct is used to get the queue ID of the queue to destroy.
16767 * On success this function will return a zero. If the queue destroy mailbox
16778 /* sanity check on queue memory */
16815 * @phba: HBA structure that indicates port to destroy a queue on.
16816 * @hrq: The queue structure associated with the queue to destroy.
16817 * @drq: The queue structure associated with the queue to destroy.
16819 * This function destroys a queue, as detailed in @rq by sending an mailbox
16820 * command, specific to the type of queue, to the HBA.
16822 * The @rq struct is used to get the queue ID of the queue to destroy.
16824 * On success this function will return a zero. If the queue destroy mailbox
16836 /* sanity check on queue memory */
19759 * @phba: HBA structure that indicates port to create a queue on.
20112 * @sglq: Pointer to the scatter gather queue object.
20236 * @qp: Pointer to HDW queue.
20518 * @qp: pointer to HDW queue
20770 * @qp: pointer to HDW queue