Lines Matching refs:channel
768 struct xgbe_channel *channel; in axgbe_alloc_channels() local
779 channel = (struct xgbe_channel*)malloc(sizeof(struct xgbe_channel), in axgbe_alloc_channels()
782 if (channel == NULL) { in axgbe_alloc_channels()
784 free(pdata->channel[j], M_AXGBE); in axgbe_alloc_channels()
785 pdata->channel[j] = NULL; in axgbe_alloc_channels()
790 pdata->channel[i] = channel; in axgbe_alloc_channels()
798 channel = pdata->channel[i]; in axgbe_alloc_channels()
799 snprintf(channel->name, sizeof(channel->name), "channel-%d",i); in axgbe_alloc_channels()
801 channel->pdata = pdata; in axgbe_alloc_channels()
802 channel->queue_index = i; in axgbe_alloc_channels()
803 channel->dma_tag = rman_get_bustag(pdata->xgmac_res); in axgbe_alloc_channels()
804 bus_space_subregion(channel->dma_tag, in axgbe_alloc_channels()
807 &channel->dma_handle); in axgbe_alloc_channels()
808 channel->tx_ring = NULL; in axgbe_alloc_channels()
809 channel->rx_ring = NULL; in axgbe_alloc_channels()
822 free(pdata->channel[i], M_AXGBE); in axgbe_free_channels()
823 pdata->channel[i] = NULL; in axgbe_free_channels()
931 struct xgbe_channel *channel; in xgbe_dump_dma_registers() local
970 channel = pdata->channel[i]; in xgbe_dump_dma_registers()
975 DMA_CH_CR, XGMAC_DMA_IOREAD(channel, DMA_CH_CR)); in xgbe_dump_dma_registers()
977 DMA_CH_TCR, XGMAC_DMA_IOREAD(channel, DMA_CH_TCR)); in xgbe_dump_dma_registers()
979 DMA_CH_RCR, XGMAC_DMA_IOREAD(channel, DMA_CH_RCR)); in xgbe_dump_dma_registers()
981 DMA_CH_TDLR_HI, XGMAC_DMA_IOREAD(channel, DMA_CH_TDLR_HI)); in xgbe_dump_dma_registers()
983 DMA_CH_TDLR_LO, XGMAC_DMA_IOREAD(channel, DMA_CH_TDLR_LO)); in xgbe_dump_dma_registers()
985 DMA_CH_RDLR_HI, XGMAC_DMA_IOREAD(channel, DMA_CH_RDLR_HI)); in xgbe_dump_dma_registers()
987 DMA_CH_RDLR_LO, XGMAC_DMA_IOREAD(channel, DMA_CH_RDLR_LO)); in xgbe_dump_dma_registers()
989 DMA_CH_TDTR_LO, XGMAC_DMA_IOREAD(channel, DMA_CH_TDTR_LO)); in xgbe_dump_dma_registers()
991 DMA_CH_RDTR_LO, XGMAC_DMA_IOREAD(channel, DMA_CH_RDTR_LO)); in xgbe_dump_dma_registers()
993 DMA_CH_TDRLR, XGMAC_DMA_IOREAD(channel, DMA_CH_TDRLR)); in xgbe_dump_dma_registers()
995 DMA_CH_RDRLR, XGMAC_DMA_IOREAD(channel, DMA_CH_RDRLR)); in xgbe_dump_dma_registers()
997 DMA_CH_IER, XGMAC_DMA_IOREAD(channel, DMA_CH_IER)); in xgbe_dump_dma_registers()
999 DMA_CH_RIWT, XGMAC_DMA_IOREAD(channel, DMA_CH_RIWT)); in xgbe_dump_dma_registers()
1001 DMA_CH_CATDR_LO, XGMAC_DMA_IOREAD(channel, DMA_CH_CATDR_LO)); in xgbe_dump_dma_registers()
1003 DMA_CH_CARDR_LO, XGMAC_DMA_IOREAD(channel, DMA_CH_CARDR_LO)); in xgbe_dump_dma_registers()
1005 DMA_CH_CATBR_HI, XGMAC_DMA_IOREAD(channel, DMA_CH_CATBR_HI)); in xgbe_dump_dma_registers()
1007 DMA_CH_CATBR_LO, XGMAC_DMA_IOREAD(channel, DMA_CH_CATBR_LO)); in xgbe_dump_dma_registers()
1009 DMA_CH_CARBR_HI, XGMAC_DMA_IOREAD(channel, DMA_CH_CARBR_HI)); in xgbe_dump_dma_registers()
1011 DMA_CH_CARBR_LO, XGMAC_DMA_IOREAD(channel, DMA_CH_CARBR_LO)); in xgbe_dump_dma_registers()
1013 DMA_CH_SR, XGMAC_DMA_IOREAD(channel, DMA_CH_SR)); in xgbe_dump_dma_registers()
1015 DMA_CH_DSR, XGMAC_DMA_IOREAD(channel, DMA_CH_DSR)); in xgbe_dump_dma_registers()
1017 DMA_CH_DCFL, XGMAC_DMA_IOREAD(channel, DMA_CH_DCFL)); in xgbe_dump_dma_registers()
1019 DMA_CH_MFC, XGMAC_DMA_IOREAD(channel, DMA_CH_MFC)); in xgbe_dump_dma_registers()
1021 DMA_CH_TDTRO, XGMAC_DMA_IOREAD(channel, DMA_CH_TDTRO)); in xgbe_dump_dma_registers()
1023 DMA_CH_RDTRO, XGMAC_DMA_IOREAD(channel, DMA_CH_RDTRO)); in xgbe_dump_dma_registers()
1025 DMA_CH_TDWRO, XGMAC_DMA_IOREAD(channel, DMA_CH_TDWRO)); in xgbe_dump_dma_registers()
1027 DMA_CH_RDWRO, XGMAC_DMA_IOREAD(channel, DMA_CH_RDWRO)); in xgbe_dump_dma_registers()
1526 struct xgbe_channel *channel; in axgbe_interrupts_free() local
1549 channel = pdata->channel[i]; in axgbe_interrupts_free()
1550 axgbe_printf(2, "%s: rid %d\n", __func__, channel->dma_irq_rid); in axgbe_interrupts_free()
1551 irq.ii_res = channel->dma_irq_res; in axgbe_interrupts_free()
1552 irq.ii_tag = channel->dma_irq_tag; in axgbe_interrupts_free()
1686 struct xgbe_channel *channel; in axgbe_if_tx_queues_alloc() local
1699 channel = pdata->channel[i]; in axgbe_if_tx_queues_alloc()
1709 channel->tx_ring = tx_ring; in axgbe_if_tx_queues_alloc()
1732 channel = pdata->channel[j]; in axgbe_if_tx_queues_alloc()
1734 tx_ring = channel->tx_ring; in axgbe_if_tx_queues_alloc()
1739 free(channel->tx_ring, M_AXGBE); in axgbe_if_tx_queues_alloc()
1741 channel->tx_ring = NULL; in axgbe_if_tx_queues_alloc()
1755 struct xgbe_channel *channel; in axgbe_if_rx_queues_alloc() local
1772 channel = pdata->channel[i]; in axgbe_if_rx_queues_alloc()
1782 channel->rx_ring = rx_ring; in axgbe_if_rx_queues_alloc()
1805 channel = pdata->channel[j]; in axgbe_if_rx_queues_alloc()
1807 rx_ring = channel->rx_ring; in axgbe_if_rx_queues_alloc()
1812 free(channel->rx_ring, M_AXGBE); in axgbe_if_rx_queues_alloc()
1814 channel->rx_ring = NULL; in axgbe_if_rx_queues_alloc()
1828 struct xgbe_channel *channel; in axgbe_if_queues_free() local
1835 channel = pdata->channel[i]; in axgbe_if_queues_free()
1837 tx_ring = channel->tx_ring; in axgbe_if_queues_free()
1842 free(channel->tx_ring, M_AXGBE); in axgbe_if_queues_free()
1843 channel->tx_ring = NULL; in axgbe_if_queues_free()
1848 channel = pdata->channel[i]; in axgbe_if_queues_free()
1850 rx_ring = channel->rx_ring; in axgbe_if_queues_free()
1855 free(channel->rx_ring, M_AXGBE); in axgbe_if_queues_free()
1856 channel->rx_ring = NULL; in axgbe_if_queues_free()
1929 struct xgbe_channel *channel; in axgbe_if_msix_intr_assign() local
2021 channel = pdata->channel[i]; in axgbe_if_msix_intr_assign()
2025 axgbe_msix_que, channel, channel->queue_index, buf); in axgbe_if_msix_intr_assign()
2033 channel->dma_irq_rid = rid; in axgbe_if_msix_intr_assign()
2034 channel->dma_irq_res = irq.ii_res; in axgbe_if_msix_intr_assign()
2035 channel->dma_irq_tag = irq.ii_tag; in axgbe_if_msix_intr_assign()
2044 channel = pdata->channel[i]; in axgbe_if_msix_intr_assign()
2047 irq.ii_res = channel->dma_irq_res; in axgbe_if_msix_intr_assign()
2048 iflib_softirq_alloc_generic(ctx, &irq, IFLIB_INTR_TX, channel, in axgbe_if_msix_intr_assign()
2049 channel->queue_index, buf); in axgbe_if_msix_intr_assign()
2056 xgbe_enable_rx_tx_int(struct xgbe_prv_data *pdata, struct xgbe_channel *channel) in xgbe_enable_rx_tx_int() argument
2061 if (channel->tx_ring && channel->rx_ring) in xgbe_enable_rx_tx_int()
2063 else if (channel->tx_ring) in xgbe_enable_rx_tx_int()
2065 else if (channel->rx_ring) in xgbe_enable_rx_tx_int()
2071 __func__, channel->queue_index, int_id); in xgbe_enable_rx_tx_int()
2072 return (hw_if->enable_int(channel, int_id)); in xgbe_enable_rx_tx_int()
2076 xgbe_disable_rx_tx_int(struct xgbe_prv_data *pdata, struct xgbe_channel *channel) in xgbe_disable_rx_tx_int() argument
2081 if (channel->tx_ring && channel->rx_ring) in xgbe_disable_rx_tx_int()
2083 else if (channel->tx_ring) in xgbe_disable_rx_tx_int()
2085 else if (channel->rx_ring) in xgbe_disable_rx_tx_int()
2091 __func__, channel->queue_index, int_id); in xgbe_disable_rx_tx_int()
2092 hw_if->disable_int(channel, int_id); in xgbe_disable_rx_tx_int()
2101 xgbe_disable_rx_tx_int(pdata, pdata->channel[i]); in xgbe_disable_rx_tx_ints()
2107 struct xgbe_channel *channel = (struct xgbe_channel *)arg; in axgbe_msix_que() local
2108 struct xgbe_prv_data *pdata = channel->pdata; in axgbe_msix_que()
2112 __func__, channel->queue_index, in axgbe_msix_que()
2113 XGMAC_DMA_IOREAD(channel, DMA_CH_SR), in axgbe_msix_que()
2114 XGMAC_DMA_IOREAD(channel, DMA_CH_DSR), in axgbe_msix_que()
2115 XGMAC_DMA_IOREAD(channel, DMA_CH_IER), in axgbe_msix_que()
2119 (void)XGMAC_DMA_IOREAD(channel, DMA_CH_SR); in axgbe_msix_que()
2122 xgbe_disable_rx_tx_int(pdata, channel); in axgbe_msix_que()
2128 XGMAC_DMA_IOWRITE(channel, DMA_CH_SR, dma_status); in axgbe_msix_que()
2138 struct xgbe_channel *channel; in axgbe_dev_isr() local
2155 channel = pdata->channel[i]; in axgbe_dev_isr()
2157 dma_ch_isr = XGMAC_DMA_IOREAD(channel, DMA_CH_SR); in axgbe_dev_isr()
2159 channel->queue_index, dma_ch_isr, XGMAC_DMA_IOREAD(channel, in axgbe_dev_isr()
2193 XGMAC_DMA_IOWRITE(channel, DMA_CH_SR, dma_ch_isr); in axgbe_dev_isr()
2252 ret = xgbe_enable_rx_tx_int(pdata, pdata->channel[qid]); in axgbe_if_tx_queue_intr_enable()
2271 ret = xgbe_enable_rx_tx_int(pdata, pdata->channel[qid]); in axgbe_if_rx_queue_intr_enable()