Lines Matching refs:buffer_info

1733 	struct lan743x_tx_buffer_info *buffer_info = NULL;  in lan743x_tx_release_desc()  local
1739 buffer_info = &tx->buffer_info[descriptor_index]; in lan743x_tx_release_desc()
1740 if (!(buffer_info->flags & TX_BUFFER_INFO_FLAG_ACTIVE)) in lan743x_tx_release_desc()
1751 if (buffer_info->dma_ptr) { in lan743x_tx_release_desc()
1752 if (buffer_info->flags & in lan743x_tx_release_desc()
1755 buffer_info->dma_ptr, in lan743x_tx_release_desc()
1756 buffer_info->buffer_length, in lan743x_tx_release_desc()
1760 buffer_info->dma_ptr, in lan743x_tx_release_desc()
1761 buffer_info->buffer_length, in lan743x_tx_release_desc()
1764 buffer_info->dma_ptr = 0; in lan743x_tx_release_desc()
1765 buffer_info->buffer_length = 0; in lan743x_tx_release_desc()
1767 if (!buffer_info->skb) in lan743x_tx_release_desc()
1770 if (!(buffer_info->flags & TX_BUFFER_INFO_FLAG_TIMESTAMP_REQUESTED)) { in lan743x_tx_release_desc()
1771 dev_kfree_skb_any(buffer_info->skb); in lan743x_tx_release_desc()
1777 dev_kfree_skb_any(buffer_info->skb); in lan743x_tx_release_desc()
1779 ignore_sync = (buffer_info->flags & in lan743x_tx_release_desc()
1782 buffer_info->skb, ignore_sync); in lan743x_tx_release_desc()
1786 buffer_info->skb = NULL; in lan743x_tx_release_desc()
1789 buffer_info->flags &= ~TX_BUFFER_INFO_FLAG_ACTIVE; in lan743x_tx_release_desc()
1792 memset(buffer_info, 0, sizeof(*buffer_info)); in lan743x_tx_release_desc()
1820 memset(tx->buffer_info, 0, in lan743x_tx_release_all_descriptors()
1821 sizeof(*tx->buffer_info) * (tx->ring_size)); in lan743x_tx_release_all_descriptors()
1873 struct lan743x_tx_buffer_info *buffer_info = NULL; in lan743x_tx_frame_start() local
1883 buffer_info = &tx->buffer_info[tx->frame_tail]; in lan743x_tx_frame_start()
1894 buffer_info->skb = NULL; in lan743x_tx_frame_start()
1895 buffer_info->dma_ptr = dma_ptr; in lan743x_tx_frame_start()
1896 buffer_info->buffer_length = first_buffer_length; in lan743x_tx_frame_start()
1897 buffer_info->flags |= TX_BUFFER_INFO_FLAG_ACTIVE; in lan743x_tx_frame_start()
1924 struct lan743x_tx_buffer_info *buffer_info = NULL; in lan743x_tx_frame_add_lso() local
1938 buffer_info = &tx->buffer_info[tx->frame_tail]; in lan743x_tx_frame_add_lso()
1945 buffer_info->skb = NULL; in lan743x_tx_frame_add_lso()
1946 buffer_info->dma_ptr = 0; in lan743x_tx_frame_add_lso()
1947 buffer_info->buffer_length = 0; in lan743x_tx_frame_add_lso()
1948 buffer_info->flags |= TX_BUFFER_INFO_FLAG_ACTIVE; in lan743x_tx_frame_add_lso()
1965 struct lan743x_tx_buffer_info *buffer_info = NULL; in lan743x_tx_frame_add_fragment() local
1982 buffer_info = &tx->buffer_info[tx->frame_tail]; in lan743x_tx_frame_add_fragment()
2008 buffer_info->skb = NULL; in lan743x_tx_frame_add_fragment()
2009 buffer_info->dma_ptr = dma_ptr; in lan743x_tx_frame_add_fragment()
2010 buffer_info->buffer_length = fragment_length; in lan743x_tx_frame_add_fragment()
2011 buffer_info->flags |= TX_BUFFER_INFO_FLAG_ACTIVE; in lan743x_tx_frame_add_fragment()
2012 buffer_info->flags |= TX_BUFFER_INFO_FLAG_SKB_FRAGMENT; in lan743x_tx_frame_add_fragment()
2031 struct lan743x_tx_buffer_info *buffer_info = NULL; in lan743x_tx_frame_end() local
2043 buffer_info = &tx->buffer_info[tx->frame_tail]; in lan743x_tx_frame_end()
2044 buffer_info->skb = skb; in lan743x_tx_frame_end()
2046 buffer_info->flags |= TX_BUFFER_INFO_FLAG_TIMESTAMP_REQUESTED; in lan743x_tx_frame_end()
2048 buffer_info->flags |= TX_BUFFER_INFO_FLAG_IGNORE_SYNC; in lan743x_tx_frame_end()
2209 kfree(tx->buffer_info); in lan743x_tx_ring_cleanup()
2210 tx->buffer_info = NULL; in lan743x_tx_ring_cleanup()
2257 cpu_ptr = kcalloc(tx->ring_size, sizeof(*tx->buffer_info), GFP_KERNEL); in lan743x_tx_ring_init()
2262 tx->buffer_info = (struct lan743x_tx_buffer_info *)cpu_ptr; in lan743x_tx_ring_init()
2435 struct lan743x_rx_buffer_info *buffer_info; in lan743x_rx_init_ring_element() local
2444 buffer_info = &rx->buffer_info[index]; in lan743x_rx_init_ring_element()
2453 if (buffer_info->dma_ptr) { in lan743x_rx_init_ring_element()
2462 buffer_info->buffer_length); in lan743x_rx_init_ring_element()
2464 used_length = buffer_info->buffer_length; in lan743x_rx_init_ring_element()
2465 dma_sync_single_for_cpu(dev, buffer_info->dma_ptr, in lan743x_rx_init_ring_element()
2468 dma_unmap_single_attrs(dev, buffer_info->dma_ptr, in lan743x_rx_init_ring_element()
2469 buffer_info->buffer_length, in lan743x_rx_init_ring_element()
2474 buffer_info->skb = skb; in lan743x_rx_init_ring_element()
2475 buffer_info->dma_ptr = dma_ptr; in lan743x_rx_init_ring_element()
2476 buffer_info->buffer_length = buffer_length; in lan743x_rx_init_ring_element()
2477 descriptor->data1 = cpu_to_le32(DMA_ADDR_LOW32(buffer_info->dma_ptr)); in lan743x_rx_init_ring_element()
2478 descriptor->data2 = cpu_to_le32(DMA_ADDR_HIGH32(buffer_info->dma_ptr)); in lan743x_rx_init_ring_element()
2489 struct lan743x_rx_buffer_info *buffer_info; in lan743x_rx_reuse_ring_element() local
2493 buffer_info = &rx->buffer_info[index]; in lan743x_rx_reuse_ring_element()
2495 descriptor->data1 = cpu_to_le32(DMA_ADDR_LOW32(buffer_info->dma_ptr)); in lan743x_rx_reuse_ring_element()
2496 descriptor->data2 = cpu_to_le32(DMA_ADDR_HIGH32(buffer_info->dma_ptr)); in lan743x_rx_reuse_ring_element()
2499 ((buffer_info->buffer_length) & in lan743x_rx_reuse_ring_element()
2506 struct lan743x_rx_buffer_info *buffer_info; in lan743x_rx_release_ring_element() local
2510 buffer_info = &rx->buffer_info[index]; in lan743x_rx_release_ring_element()
2514 if (buffer_info->dma_ptr) { in lan743x_rx_release_ring_element()
2516 buffer_info->dma_ptr, in lan743x_rx_release_ring_element()
2517 buffer_info->buffer_length, in lan743x_rx_release_ring_element()
2519 buffer_info->dma_ptr = 0; in lan743x_rx_release_ring_element()
2522 if (buffer_info->skb) { in lan743x_rx_release_ring_element()
2523 dev_kfree_skb(buffer_info->skb); in lan743x_rx_release_ring_element()
2524 buffer_info->skb = NULL; in lan743x_rx_release_ring_element()
2527 memset(buffer_info, 0, sizeof(*buffer_info)); in lan743x_rx_release_ring_element()
2551 struct lan743x_rx_buffer_info *buffer_info; in lan743x_rx_process_buffer() local
2570 buffer_info = &rx->buffer_info[rx->last_head]; in lan743x_rx_process_buffer()
2599 buffer_length = buffer_info->buffer_length; in lan743x_rx_process_buffer()
2610 skb = buffer_info->skb; in lan743x_rx_process_buffer()
2734 if (rx->buffer_info && rx->ring_cpu_ptr) { in lan743x_rx_ring_cleanup()
2749 kfree(rx->buffer_info); in lan743x_rx_ring_cleanup()
2750 rx->buffer_info = NULL; in lan743x_rx_ring_cleanup()
2803 cpu_ptr = kcalloc(rx->ring_size, sizeof(*rx->buffer_info), in lan743x_rx_ring_init()
2809 rx->buffer_info = (struct lan743x_rx_buffer_info *)cpu_ptr; in lan743x_rx_ring_init()