Lines Matching refs:curr_bd
1215 struct emac_tx_bd __iomem *curr_bd;
1254 curr_bd = mem + (cnt * bd_size);
1255 curr_bd->next = txch->bd_pool_head;
1256 txch->bd_pool_head = curr_bd;
1331 struct emac_tx_bd __iomem *curr_bd;
1347 curr_bd = txch->active_queue_head;
1348 while (curr_bd != NULL) {
1349 dma_unmap_single(emac_dev, curr_bd->buff_ptr,
1350 curr_bd->off_b_len & EMAC_RX_BD_BUF_SIZE,
1354 &curr_bd->buf_token, 1, ch);
1355 if (curr_bd != txch->active_queue_tail)
1356 curr_bd = curr_bd->next;
1408 struct emac_tx_bd __iomem *curr_bd;
1422 curr_bd = txch->active_queue_head;
1423 if (NULL == curr_bd) {
1430 BD_CACHE_INVALIDATE(curr_bd, EMAC_BD_LENGTH_FOR_CACHE);
1431 frame_status = curr_bd->mode;
1432 while ((curr_bd) &&
1435 emac_write(EMAC_TXCP(ch), emac_virt_to_phys(curr_bd, priv));
1436 txch->active_queue_head = curr_bd->next;
1438 if (curr_bd->next) { /* misqueued packet */
1439 emac_write(EMAC_TXHDP(ch), curr_bd->h_next);
1446 dma_unmap_single(emac_dev, curr_bd->buff_ptr,
1447 curr_bd->off_b_len & EMAC_RX_BD_BUF_SIZE,
1450 *tx_complete_ptr = (u32) curr_bd->buf_token;
1453 curr_bd->next = txch->bd_pool_head;
1454 txch->bd_pool_head = curr_bd;
1457 txch->last_hw_bdprocessed = curr_bd;
1458 curr_bd = txch->active_queue_head;
1459 if (curr_bd) {
1460 BD_CACHE_INVALIDATE(curr_bd, EMAC_BD_LENGTH_FOR_CACHE);
1461 frame_status = curr_bd->mode;
1487 struct emac_tx_bd __iomem *curr_bd;
1501 curr_bd = txch->bd_pool_head;
1502 if (curr_bd == NULL) {
1508 txch->bd_pool_head = curr_bd->next;
1509 curr_bd->buf_token = buf_list->buf_token;
1510 curr_bd->buff_ptr = dma_map_single(&priv->ndev->dev, buf_list->data_ptr,
1512 curr_bd->off_b_len = buf_list->length;
1513 curr_bd->h_next = 0;
1514 curr_bd->next = NULL;
1515 curr_bd->mode = (EMAC_CPPI_SOP_BIT | EMAC_CPPI_OWNERSHIP_BIT |
1519 BD_CACHE_WRITEBACK_INVALIDATE(curr_bd, EMAC_BD_LENGTH_FOR_CACHE);
1523 txch->active_queue_head = curr_bd;
1524 txch->active_queue_tail = curr_bd;
1527 emac_virt_to_phys(curr_bd, priv));
1536 tail_bd->next = curr_bd;
1537 txch->active_queue_tail = curr_bd;
1539 tail_bd->h_next = (int)emac_virt_to_phys(curr_bd, priv);
1543 emac_virt_to_phys(curr_bd, priv));
1683 struct emac_rx_bd __iomem *curr_bd;
1716 curr_bd = mem + (cnt * bd_size);
1718 curr_bd->data_ptr = emac_net_alloc_rx_buf(priv,
1720 (void __force **)&curr_bd->buf_token,
1722 if (curr_bd->data_ptr == NULL) {
1730 curr_bd->h_next = emac_virt_to_phys(rxch->active_queue_head,
1732 curr_bd->buff_ptr = dma_map_single(emac_dev, curr_bd->data_ptr,
1734 curr_bd->off_b_len = rxch->buf_size;
1735 curr_bd->mode = EMAC_CPPI_OWNERSHIP_BIT;
1738 BD_CACHE_WRITEBACK_INVALIDATE((u32) curr_bd,
1740 curr_bd->next = rxch->active_queue_head;
1741 rxch->active_queue_head = curr_bd;
1810 struct emac_rx_bd __iomem *curr_bd;
1814 curr_bd = rxch->active_queue_head;
1815 while (curr_bd) {
1816 if (curr_bd->buf_token) {
1818 curr_bd->buff_ptr,
1819 curr_bd->off_b_len
1824 curr_bd->buf_token);
1826 curr_bd = curr_bd->next;
1980 * @curr_bd: current buffer descriptor
1990 struct emac_rx_bd __iomem *curr_bd,
1996 curr_bd->h_next = 0;
1997 curr_bd->buff_ptr = dma_map_single(&priv->ndev->dev, buffer,
1999 curr_bd->off_b_len = rxch->buf_size;
2000 curr_bd->mode = EMAC_CPPI_OWNERSHIP_BIT;
2001 curr_bd->next = NULL;
2002 curr_bd->data_ptr = buffer;
2003 curr_bd->buf_token = buf_token;
2006 BD_CACHE_WRITEBACK_INVALIDATE(curr_bd, EMAC_BD_LENGTH_FOR_CACHE);
2008 rxch->active_queue_head = curr_bd;
2009 rxch->active_queue_tail = curr_bd;
2020 rxch->active_queue_tail = curr_bd;
2021 tail_bd->next = curr_bd;
2023 tail_bd->h_next = emac_virt_to_phys(curr_bd, priv);
2027 emac_virt_to_phys(curr_bd, priv));
2081 struct emac_rx_bd __iomem *curr_bd;
2095 curr_bd = rxch->active_queue_head;
2096 BD_CACHE_INVALIDATE(curr_bd, EMAC_BD_LENGTH_FOR_CACHE);
2097 frame_status = curr_bd->mode;
2099 while ((curr_bd) &&
2112 rx_buf_obj->data_ptr = (char *)curr_bd->data_ptr;
2113 rx_buf_obj->length = curr_bd->off_b_len & EMAC_RX_BD_BUF_SIZE;
2114 rx_buf_obj->buf_token = curr_bd->buf_token;
2116 dma_unmap_single(&priv->ndev->dev, curr_bd->buff_ptr,
2117 curr_bd->off_b_len & EMAC_RX_BD_BUF_SIZE,
2124 emac_write(EMAC_RXCP(ch), emac_virt_to_phys(curr_bd, priv));
2126 last_bd = curr_bd;
2127 curr_bd = last_bd->next;
2128 rxch->active_queue_head = curr_bd;
2132 if (curr_bd) {
2135 emac_virt_to_phys(curr_bd, priv));
2151 curr_bd = rxch->active_queue_head;
2152 if (curr_bd) {
2153 BD_CACHE_INVALIDATE(curr_bd, EMAC_BD_LENGTH_FOR_CACHE);
2154 frame_status = curr_bd->mode;