Lines Matching refs:reply_q
1671 _base_process_reply_queue(struct adapter_reply_queue *reply_q) in _base_process_reply_queue() argument
1679 u8 msix_index = reply_q->msix_index; in _base_process_reply_queue()
1680 struct MPT3SAS_ADAPTER *ioc = reply_q->ioc; in _base_process_reply_queue()
1685 if (!atomic_add_unless(&reply_q->busy, 1, 1)) in _base_process_reply_queue()
1688 rpf = &reply_q->reply_post_free[reply_q->reply_post_host_index]; in _base_process_reply_queue()
1692 atomic_dec(&reply_q->busy); in _base_process_reply_queue()
1759 reply_q->reply_post_host_index = in _base_process_reply_queue()
1760 (reply_q->reply_post_host_index == in _base_process_reply_queue()
1762 reply_q->reply_post_host_index + 1; in _base_process_reply_queue()
1764 reply_q->reply_post_free[reply_q->reply_post_host_index]. in _base_process_reply_queue()
1774 writel(reply_q->reply_post_host_index | in _base_process_reply_queue()
1779 writel(reply_q->reply_post_host_index | in _base_process_reply_queue()
1784 if (!reply_q->is_iouring_poll_q && in _base_process_reply_queue()
1785 !reply_q->irq_poll_scheduled) { in _base_process_reply_queue()
1786 reply_q->irq_poll_scheduled = true; in _base_process_reply_queue()
1787 irq_poll_sched(&reply_q->irqpoll); in _base_process_reply_queue()
1789 atomic_dec(&reply_q->busy); in _base_process_reply_queue()
1794 if (!reply_q->reply_post_host_index) in _base_process_reply_queue()
1795 rpf = reply_q->reply_post_free; in _base_process_reply_queue()
1803 atomic_dec(&reply_q->busy); in _base_process_reply_queue()
1808 writel(reply_q->reply_post_host_index, in _base_process_reply_queue()
1810 atomic_dec(&reply_q->busy); in _base_process_reply_queue()
1830 writel(reply_q->reply_post_host_index | ((msix_index & 7) << in _base_process_reply_queue()
1834 writel(reply_q->reply_post_host_index | (msix_index << in _base_process_reply_queue()
1837 atomic_dec(&reply_q->busy); in _base_process_reply_queue()
1852 struct adapter_reply_queue *reply_q; in mpt3sas_blk_mq_poll() local
1860 reply_q = ioc->io_uring_poll_queues[qid].reply_q; in mpt3sas_blk_mq_poll()
1862 num_entries = _base_process_reply_queue(reply_q); in mpt3sas_blk_mq_poll()
1878 struct adapter_reply_queue *reply_q = bus_id; in _base_interrupt() local
1879 struct MPT3SAS_ADAPTER *ioc = reply_q->ioc; in _base_interrupt()
1883 if (reply_q->irq_poll_scheduled) in _base_interrupt()
1885 return ((_base_process_reply_queue(reply_q) > 0) ? in _base_interrupt()
1899 struct adapter_reply_queue *reply_q; in _base_irqpoll() local
1902 reply_q = container_of(irqpoll, struct adapter_reply_queue, in _base_irqpoll()
1904 if (reply_q->irq_line_enable) { in _base_irqpoll()
1905 disable_irq_nosync(reply_q->os_irq); in _base_irqpoll()
1906 reply_q->irq_line_enable = false; in _base_irqpoll()
1908 num_entries = _base_process_reply_queue(reply_q); in _base_irqpoll()
1911 reply_q->irq_poll_scheduled = false; in _base_irqpoll()
1912 reply_q->irq_line_enable = true; in _base_irqpoll()
1913 enable_irq(reply_q->os_irq); in _base_irqpoll()
1920 _base_process_reply_queue(reply_q); in _base_irqpoll()
1935 struct adapter_reply_queue *reply_q, *next; in _base_init_irqpolls() local
1940 list_for_each_entry_safe(reply_q, next, &ioc->reply_queue_list, list) { in _base_init_irqpolls()
1941 if (reply_q->is_iouring_poll_q) in _base_init_irqpolls()
1943 irq_poll_init(&reply_q->irqpoll, in _base_init_irqpolls()
1945 reply_q->irq_poll_scheduled = false; in _base_init_irqpolls()
1946 reply_q->irq_line_enable = true; in _base_init_irqpolls()
1947 reply_q->os_irq = pci_irq_vector(ioc->pdev, in _base_init_irqpolls()
1948 reply_q->msix_index); in _base_init_irqpolls()
1977 struct adapter_reply_queue *reply_q; in mpt3sas_base_sync_reply_irqs() local
1985 list_for_each_entry(reply_q, &ioc->reply_queue_list, list) { in mpt3sas_base_sync_reply_irqs()
1990 if (reply_q->msix_index == 0) in mpt3sas_base_sync_reply_irqs()
1993 if (reply_q->is_iouring_poll_q) { in mpt3sas_base_sync_reply_irqs()
1994 _base_process_reply_queue(reply_q); in mpt3sas_base_sync_reply_irqs()
1998 synchronize_irq(pci_irq_vector(ioc->pdev, reply_q->msix_index)); in mpt3sas_base_sync_reply_irqs()
1999 if (reply_q->irq_poll_scheduled) { in mpt3sas_base_sync_reply_irqs()
2003 irq_poll_disable(&reply_q->irqpoll); in mpt3sas_base_sync_reply_irqs()
2004 irq_poll_enable(&reply_q->irqpoll); in mpt3sas_base_sync_reply_irqs()
2008 if (reply_q->irq_poll_scheduled) { in mpt3sas_base_sync_reply_irqs()
2009 reply_q->irq_poll_scheduled = false; in mpt3sas_base_sync_reply_irqs()
2010 reply_q->irq_line_enable = true; in mpt3sas_base_sync_reply_irqs()
2011 enable_irq(reply_q->os_irq); in mpt3sas_base_sync_reply_irqs()
2016 _base_process_reply_queue(reply_q); in mpt3sas_base_sync_reply_irqs()
3086 struct adapter_reply_queue *reply_q, *next; in mpt3sas_base_free_irq() local
3091 list_for_each_entry_safe(reply_q, next, &ioc->reply_queue_list, list) { in mpt3sas_base_free_irq()
3092 list_del(&reply_q->list); in mpt3sas_base_free_irq()
3093 if (reply_q->is_iouring_poll_q) { in mpt3sas_base_free_irq()
3094 kfree(reply_q); in mpt3sas_base_free_irq()
3099 irq = pci_irq_vector(ioc->pdev, reply_q->msix_index); in mpt3sas_base_free_irq()
3102 free_irq(pci_irq_vector(ioc->pdev, reply_q->msix_index), in mpt3sas_base_free_irq()
3103 reply_q); in mpt3sas_base_free_irq()
3104 kfree(reply_q); in mpt3sas_base_free_irq()
3119 struct adapter_reply_queue *reply_q; in _base_request_irq() local
3122 reply_q = kzalloc(sizeof(struct adapter_reply_queue), GFP_KERNEL); in _base_request_irq()
3123 if (!reply_q) { in _base_request_irq()
3128 reply_q->ioc = ioc; in _base_request_irq()
3129 reply_q->msix_index = index; in _base_request_irq()
3131 atomic_set(&reply_q->busy, 0); in _base_request_irq()
3135 snprintf(reply_q->name, MPT_NAME_LENGTH, "%s%d-mq-poll%d", in _base_request_irq()
3137 reply_q->is_iouring_poll_q = 1; in _base_request_irq()
3138 ioc->io_uring_poll_queues[qid].reply_q = reply_q; in _base_request_irq()
3144 snprintf(reply_q->name, MPT_NAME_LENGTH, "%s%d-msix%d", in _base_request_irq()
3147 snprintf(reply_q->name, MPT_NAME_LENGTH, "%s%d", in _base_request_irq()
3150 IRQF_SHARED, reply_q->name, reply_q); in _base_request_irq()
3153 reply_q->name, pci_irq_vector(pdev, index)); in _base_request_irq()
3154 kfree(reply_q); in _base_request_irq()
3158 INIT_LIST_HEAD(&reply_q->list); in _base_request_irq()
3159 list_add_tail(&reply_q->list, &ioc->reply_queue_list); in _base_request_irq()
3173 struct adapter_reply_queue *reply_q; in _base_assign_reply_queues() local
3207 list_for_each_entry(reply_q, &ioc->reply_queue_list, list) { in _base_assign_reply_queues()
3210 if (reply_q->msix_index < ioc->high_iops_queues || in _base_assign_reply_queues()
3211 reply_q->msix_index >= ioc->iopoll_q_start_index) in _base_assign_reply_queues()
3215 reply_q->msix_index); in _base_assign_reply_queues()
3218 reply_q->msix_index); in _base_assign_reply_queues()
3225 ioc->cpu_msix_table[cpu] = reply_q->msix_index; in _base_assign_reply_queues()
3236 list_for_each_entry(reply_q, &ioc->reply_queue_list, list) { in _base_assign_reply_queues()
3239 if (reply_q->msix_index < ioc->high_iops_queues || in _base_assign_reply_queues()
3240 reply_q->msix_index >= ioc->iopoll_q_start_index) in _base_assign_reply_queues()
3250 ioc->cpu_msix_table[cpu] = reply_q->msix_index; in _base_assign_reply_queues()
3598 struct adapter_reply_queue *reply_q; in mpt3sas_base_map_resources() local
3721 list_for_each_entry(reply_q, &ioc->reply_queue_list, list) { in mpt3sas_base_map_resources()
3722 if (reply_q->msix_index >= ioc->iopoll_q_start_index) { in mpt3sas_base_map_resources()
3724 reply_q->name, reply_q->msix_index); in mpt3sas_base_map_resources()
3729 reply_q->name, in mpt3sas_base_map_resources()
3731 pci_irq_vector(ioc->pdev, reply_q->msix_index)); in mpt3sas_base_map_resources()
8141 struct adapter_reply_queue *reply_q; in _base_make_ioc_operational() local
8213 list_for_each_entry(reply_q, &ioc->reply_queue_list, list) { in _base_make_ioc_operational()
8219 reply_q->reply_post_free = in _base_make_ioc_operational()
8222 reply_q->reply_post_free = reply_post_free_contig; in _base_make_ioc_operational()
8226 reply_q->reply_post_host_index = 0; in _base_make_ioc_operational()
8228 reply_q->reply_post_free[i].Words = in _base_make_ioc_operational()
8255 list_for_each_entry(reply_q, &ioc->reply_queue_list, list) { in _base_make_ioc_operational()
8257 writel((reply_q->msix_index & 7)<< in _base_make_ioc_operational()
8259 ioc->replyPostRegisterIndex[reply_q->msix_index/8]); in _base_make_ioc_operational()
8261 writel(reply_q->msix_index << in _base_make_ioc_operational()