Lines Matching defs:rxch
482 struct emac_rxch *rxch[EMAC_DEF_MAX_RX_CH];
1684 struct emac_rxch *rxch = NULL;
1686 rxch = kzalloc(sizeof(struct emac_rxch), GFP_KERNEL);
1687 if (NULL == rxch) {
1691 priv->rxch[ch] = rxch;
1692 rxch->buf_size = priv->rx_buf_size;
1693 rxch->service_max = EMAC_DEF_RX_MAX_SERVICE;
1694 rxch->queue_active = 0;
1695 rxch->teardown_pending = 0;
1699 rxch->mac_addr[cnt] = param[cnt];
1704 rxch->num_bd = (priv->ctrl_ram_size >> 1) / bd_size;
1705 rxch->alloc_size = (((bd_size * rxch->num_bd) + 0xF) & ~0xF);
1706 rxch->bd_mem = EMAC_RX_BD_MEM(priv);
1707 __memzero((void __force *)rxch->bd_mem, rxch->alloc_size);
1708 rxch->pkt_queue.buf_list = &rxch->buf_queue;
1712 (((u32 __force) rxch->bd_mem + 0xF) & ~0xF);
1713 rxch->active_queue_head = NULL;
1714 rxch->active_queue_tail = mem;
1715 for (cnt = 0; cnt < rxch->num_bd; cnt++) {
1719 rxch->buf_size,
1725 kfree(rxch);
1730 curr_bd->h_next = emac_virt_to_phys(rxch->active_queue_head,
1733 rxch->buf_size, DMA_FROM_DEVICE);
1734 curr_bd->off_b_len = rxch->buf_size;
1740 curr_bd->next = rxch->active_queue_head;
1741 rxch->active_queue_head = curr_bd;
1745 RX BD ready to be given to RX HDP and rxch->active_queue_tail
1787 struct emac_rxch *rxch = priv->rxch[ch];
1789 if (rxch) {
1790 rxch->teardown_pending = 1;
1794 rxch->teardown_pending = 0;
1809 struct emac_rxch *rxch = priv->rxch[ch];
1812 if (rxch) {
1814 curr_bd = rxch->active_queue_head;
1828 if (rxch->bd_mem)
1829 rxch->bd_mem = NULL;
1830 kfree(rxch);
1831 priv->rxch[ch] = NULL;
1951 struct emac_rxch *rxch = priv->rxch[EMAC_DEF_RX_CH];
1962 /* If the interface is down - rxch is NULL. */
1965 memcpy(rxch->mac_addr, sa->sa_data, ndev->addr_len);
1966 emac_setmac(priv, EMAC_DEF_RX_CH, rxch->mac_addr);
1993 struct emac_rxch *rxch = priv->rxch[ch];
1998 rxch->buf_size, DMA_FROM_DEVICE);
1999 curr_bd->off_b_len = rxch->buf_size;
2007 if (rxch->active_queue_head == NULL) {
2008 rxch->active_queue_head = curr_bd;
2009 rxch->active_queue_tail = curr_bd;
2010 if (0 != rxch->queue_active) {
2012 emac_virt_to_phys(rxch->active_queue_head, priv));
2013 rxch->queue_active = 1;
2019 tail_bd = rxch->active_queue_tail;
2020 rxch->active_queue_tail = curr_bd;
2030 ++rxch->end_of_queue_add;
2033 ++rxch->recycled_bd;
2087 struct emac_rxch *rxch = priv->rxch[ch];
2089 if (unlikely(1 == rxch->teardown_pending))
2091 ++rxch->proc_count;
2095 curr_bd = rxch->active_queue_head;
2103 new_buffer = emac_net_alloc_rx_buf(priv, rxch->buf_size,
2106 ++rxch->out_of_rx_buffers;
2125 ++rxch->processed_bd;
2128 rxch->active_queue_head = curr_bd;
2133 ++rxch->mis_queued_packets;
2137 ++rxch->end_of_queue;
2138 rxch->queue_active = 0;
2151 curr_bd = rxch->active_queue_head;
2231 struct emac_rxch *rxch = priv->rxch[ch];
2232 emac_setmac(priv, ch, rxch->mac_addr);
2234 rxch->queue_active = 1;
2236 emac_virt_to_phys(rxch->active_queue_head, priv));