Lines Matching refs:reply_q

1429 _base_process_reply_queue(struct adapter_reply_queue *reply_q)  in _base_process_reply_queue()  argument
1437 u8 msix_index = reply_q->msix_index; in _base_process_reply_queue()
1438 struct MPT3SAS_ADAPTER *ioc = reply_q->ioc; in _base_process_reply_queue()
1443 if (!atomic_add_unless(&reply_q->busy, 1, 1)) in _base_process_reply_queue()
1446 rpf = &reply_q->reply_post_free[reply_q->reply_post_host_index]; in _base_process_reply_queue()
1450 atomic_dec(&reply_q->busy); in _base_process_reply_queue()
1517 reply_q->reply_post_host_index = in _base_process_reply_queue()
1518 (reply_q->reply_post_host_index == in _base_process_reply_queue()
1520 reply_q->reply_post_host_index + 1; in _base_process_reply_queue()
1522 reply_q->reply_post_free[reply_q->reply_post_host_index]. in _base_process_reply_queue()
1532 writel(reply_q->reply_post_host_index | in _base_process_reply_queue()
1537 writel(reply_q->reply_post_host_index | in _base_process_reply_queue()
1542 if (!reply_q->irq_poll_scheduled) { in _base_process_reply_queue()
1543 reply_q->irq_poll_scheduled = true; in _base_process_reply_queue()
1544 irq_poll_sched(&reply_q->irqpoll); in _base_process_reply_queue()
1546 atomic_dec(&reply_q->busy); in _base_process_reply_queue()
1551 if (!reply_q->reply_post_host_index) in _base_process_reply_queue()
1552 rpf = reply_q->reply_post_free; in _base_process_reply_queue()
1560 atomic_dec(&reply_q->busy); in _base_process_reply_queue()
1565 writel(reply_q->reply_post_host_index, in _base_process_reply_queue()
1567 atomic_dec(&reply_q->busy); in _base_process_reply_queue()
1587 writel(reply_q->reply_post_host_index | ((msix_index & 7) << in _base_process_reply_queue()
1591 writel(reply_q->reply_post_host_index | (msix_index << in _base_process_reply_queue()
1594 atomic_dec(&reply_q->busy); in _base_process_reply_queue()
1608 struct adapter_reply_queue *reply_q = bus_id; in _base_interrupt() local
1609 struct MPT3SAS_ADAPTER *ioc = reply_q->ioc; in _base_interrupt()
1613 if (reply_q->irq_poll_scheduled) in _base_interrupt()
1615 return ((_base_process_reply_queue(reply_q) > 0) ? in _base_interrupt()
1629 struct adapter_reply_queue *reply_q; in _base_irqpoll() local
1632 reply_q = container_of(irqpoll, struct adapter_reply_queue, in _base_irqpoll()
1634 if (reply_q->irq_line_enable) { in _base_irqpoll()
1635 disable_irq(reply_q->os_irq); in _base_irqpoll()
1636 reply_q->irq_line_enable = false; in _base_irqpoll()
1638 num_entries = _base_process_reply_queue(reply_q); in _base_irqpoll()
1641 reply_q->irq_poll_scheduled = false; in _base_irqpoll()
1642 reply_q->irq_line_enable = true; in _base_irqpoll()
1643 enable_irq(reply_q->os_irq); in _base_irqpoll()
1658 struct adapter_reply_queue *reply_q, *next; in _base_init_irqpolls() local
1663 list_for_each_entry_safe(reply_q, next, &ioc->reply_queue_list, list) { in _base_init_irqpolls()
1664 irq_poll_init(&reply_q->irqpoll, in _base_init_irqpolls()
1666 reply_q->irq_poll_scheduled = false; in _base_init_irqpolls()
1667 reply_q->irq_line_enable = true; in _base_init_irqpolls()
1668 reply_q->os_irq = pci_irq_vector(ioc->pdev, in _base_init_irqpolls()
1669 reply_q->msix_index); in _base_init_irqpolls()
1696 struct adapter_reply_queue *reply_q; in mpt3sas_base_sync_reply_irqs() local
1704 list_for_each_entry(reply_q, &ioc->reply_queue_list, list) { in mpt3sas_base_sync_reply_irqs()
1709 if (reply_q->msix_index == 0) in mpt3sas_base_sync_reply_irqs()
1711 if (reply_q->irq_poll_scheduled) { in mpt3sas_base_sync_reply_irqs()
1715 irq_poll_disable(&reply_q->irqpoll); in mpt3sas_base_sync_reply_irqs()
1716 irq_poll_enable(&reply_q->irqpoll); in mpt3sas_base_sync_reply_irqs()
1717 reply_q->irq_poll_scheduled = false; in mpt3sas_base_sync_reply_irqs()
1718 reply_q->irq_line_enable = true; in mpt3sas_base_sync_reply_irqs()
1719 enable_irq(reply_q->os_irq); in mpt3sas_base_sync_reply_irqs()
1722 synchronize_irq(pci_irq_vector(ioc->pdev, reply_q->msix_index)); in mpt3sas_base_sync_reply_irqs()
2816 struct adapter_reply_queue *reply_q, *next; in _base_free_irq() local
2821 list_for_each_entry_safe(reply_q, next, &ioc->reply_queue_list, list) { in _base_free_irq()
2822 list_del(&reply_q->list); in _base_free_irq()
2825 reply_q->msix_index), NULL); in _base_free_irq()
2826 free_irq(pci_irq_vector(ioc->pdev, reply_q->msix_index), in _base_free_irq()
2827 reply_q); in _base_free_irq()
2828 kfree(reply_q); in _base_free_irq()
2843 struct adapter_reply_queue *reply_q; in _base_request_irq() local
2846 reply_q = kzalloc(sizeof(struct adapter_reply_queue), GFP_KERNEL); in _base_request_irq()
2847 if (!reply_q) { in _base_request_irq()
2852 reply_q->ioc = ioc; in _base_request_irq()
2853 reply_q->msix_index = index; in _base_request_irq()
2855 atomic_set(&reply_q->busy, 0); in _base_request_irq()
2857 snprintf(reply_q->name, MPT_NAME_LENGTH, "%s%d-msix%d", in _base_request_irq()
2860 snprintf(reply_q->name, MPT_NAME_LENGTH, "%s%d", in _base_request_irq()
2863 IRQF_SHARED, reply_q->name, reply_q); in _base_request_irq()
2866 reply_q->name, pci_irq_vector(pdev, index)); in _base_request_irq()
2867 kfree(reply_q); in _base_request_irq()
2871 INIT_LIST_HEAD(&reply_q->list); in _base_request_irq()
2872 list_add_tail(&reply_q->list, &ioc->reply_queue_list); in _base_request_irq()
2889 struct adapter_reply_queue *reply_q; in _base_assign_reply_queues() local
2921 list_for_each_entry(reply_q, &ioc->reply_queue_list, list) { in _base_assign_reply_queues()
2924 if (reply_q->msix_index < ioc->high_iops_queues) in _base_assign_reply_queues()
2928 reply_q->msix_index); in _base_assign_reply_queues()
2931 reply_q->msix_index); in _base_assign_reply_queues()
2938 ioc->cpu_msix_table[cpu] = reply_q->msix_index; in _base_assign_reply_queues()
2949 list_for_each_entry(reply_q, &ioc->reply_queue_list, list) { in _base_assign_reply_queues()
2952 if (reply_q->msix_index < ioc->high_iops_queues) in _base_assign_reply_queues()
2962 ioc->cpu_msix_table[cpu] = reply_q->msix_index; in _base_assign_reply_queues()
3232 struct adapter_reply_queue *reply_q; in mpt3sas_base_map_resources() local
3346 list_for_each_entry(reply_q, &ioc->reply_queue_list, list) in mpt3sas_base_map_resources()
3348 reply_q->name, in mpt3sas_base_map_resources()
3350 pci_irq_vector(ioc->pdev, reply_q->msix_index)); in mpt3sas_base_map_resources()
6736 struct adapter_reply_queue *reply_q; in _base_make_ioc_operational() local
6808 list_for_each_entry(reply_q, &ioc->reply_queue_list, list) { in _base_make_ioc_operational()
6814 reply_q->reply_post_free = in _base_make_ioc_operational()
6817 reply_q->reply_post_free = reply_post_free_contig; in _base_make_ioc_operational()
6821 reply_q->reply_post_host_index = 0; in _base_make_ioc_operational()
6823 reply_q->reply_post_free[i].Words = in _base_make_ioc_operational()
6850 list_for_each_entry(reply_q, &ioc->reply_queue_list, list) { in _base_make_ioc_operational()
6852 writel((reply_q->msix_index & 7)<< in _base_make_ioc_operational()
6854 ioc->replyPostRegisterIndex[reply_q->msix_index/8]); in _base_make_ioc_operational()
6856 writel(reply_q->msix_index << in _base_make_ioc_operational()