Lines Matching refs:buffer_info
1576 struct lan743x_tx_buffer_info *buffer_info = NULL; in lan743x_tx_release_desc() local
1582 buffer_info = &tx->buffer_info[descriptor_index]; in lan743x_tx_release_desc()
1583 if (!(buffer_info->flags & TX_BUFFER_INFO_FLAG_ACTIVE)) in lan743x_tx_release_desc()
1594 if (buffer_info->dma_ptr) { in lan743x_tx_release_desc()
1595 if (buffer_info->flags & in lan743x_tx_release_desc()
1598 buffer_info->dma_ptr, in lan743x_tx_release_desc()
1599 buffer_info->buffer_length, in lan743x_tx_release_desc()
1603 buffer_info->dma_ptr, in lan743x_tx_release_desc()
1604 buffer_info->buffer_length, in lan743x_tx_release_desc()
1607 buffer_info->dma_ptr = 0; in lan743x_tx_release_desc()
1608 buffer_info->buffer_length = 0; in lan743x_tx_release_desc()
1610 if (!buffer_info->skb) in lan743x_tx_release_desc()
1613 if (!(buffer_info->flags & TX_BUFFER_INFO_FLAG_TIMESTAMP_REQUESTED)) { in lan743x_tx_release_desc()
1614 dev_kfree_skb_any(buffer_info->skb); in lan743x_tx_release_desc()
1620 dev_kfree_skb_any(buffer_info->skb); in lan743x_tx_release_desc()
1622 ignore_sync = (buffer_info->flags & in lan743x_tx_release_desc()
1625 buffer_info->skb, ignore_sync); in lan743x_tx_release_desc()
1629 buffer_info->skb = NULL; in lan743x_tx_release_desc()
1632 buffer_info->flags &= ~TX_BUFFER_INFO_FLAG_ACTIVE; in lan743x_tx_release_desc()
1635 memset(buffer_info, 0, sizeof(*buffer_info)); in lan743x_tx_release_desc()
1663 memset(tx->buffer_info, 0, in lan743x_tx_release_all_descriptors()
1664 sizeof(*tx->buffer_info) * (tx->ring_size)); in lan743x_tx_release_all_descriptors()
1760 struct lan743x_tx_buffer_info *buffer_info = NULL; in lan743x_tx_frame_start() local
1770 buffer_info = &tx->buffer_info[tx->frame_tail]; in lan743x_tx_frame_start()
1781 buffer_info->skb = NULL; in lan743x_tx_frame_start()
1782 buffer_info->dma_ptr = dma_ptr; in lan743x_tx_frame_start()
1783 buffer_info->buffer_length = first_buffer_length; in lan743x_tx_frame_start()
1784 buffer_info->flags |= TX_BUFFER_INFO_FLAG_ACTIVE; in lan743x_tx_frame_start()
1811 struct lan743x_tx_buffer_info *buffer_info = NULL; in lan743x_tx_frame_add_lso() local
1825 buffer_info = &tx->buffer_info[tx->frame_tail]; in lan743x_tx_frame_add_lso()
1832 buffer_info->skb = NULL; in lan743x_tx_frame_add_lso()
1833 buffer_info->dma_ptr = 0; in lan743x_tx_frame_add_lso()
1834 buffer_info->buffer_length = 0; in lan743x_tx_frame_add_lso()
1835 buffer_info->flags |= TX_BUFFER_INFO_FLAG_ACTIVE; in lan743x_tx_frame_add_lso()
1852 struct lan743x_tx_buffer_info *buffer_info = NULL; in lan743x_tx_frame_add_fragment() local
1869 buffer_info = &tx->buffer_info[tx->frame_tail]; in lan743x_tx_frame_add_fragment()
1895 buffer_info->skb = NULL; in lan743x_tx_frame_add_fragment()
1896 buffer_info->dma_ptr = dma_ptr; in lan743x_tx_frame_add_fragment()
1897 buffer_info->buffer_length = fragment_length; in lan743x_tx_frame_add_fragment()
1898 buffer_info->flags |= TX_BUFFER_INFO_FLAG_ACTIVE; in lan743x_tx_frame_add_fragment()
1899 buffer_info->flags |= TX_BUFFER_INFO_FLAG_SKB_FRAGMENT; in lan743x_tx_frame_add_fragment()
1918 struct lan743x_tx_buffer_info *buffer_info = NULL; in lan743x_tx_frame_end() local
1930 buffer_info = &tx->buffer_info[tx->frame_tail]; in lan743x_tx_frame_end()
1931 buffer_info->skb = skb; in lan743x_tx_frame_end()
1933 buffer_info->flags |= TX_BUFFER_INFO_FLAG_TIMESTAMP_REQUESTED; in lan743x_tx_frame_end()
1935 buffer_info->flags |= TX_BUFFER_INFO_FLAG_IGNORE_SYNC; in lan743x_tx_frame_end()
2096 kfree(tx->buffer_info); in lan743x_tx_ring_cleanup()
2097 tx->buffer_info = NULL; in lan743x_tx_ring_cleanup()
2144 cpu_ptr = kcalloc(tx->ring_size, sizeof(*tx->buffer_info), GFP_KERNEL); in lan743x_tx_ring_init()
2149 tx->buffer_info = (struct lan743x_tx_buffer_info *)cpu_ptr; in lan743x_tx_ring_init()
2322 struct lan743x_rx_buffer_info *buffer_info; in lan743x_rx_init_ring_element() local
2331 buffer_info = &rx->buffer_info[index]; in lan743x_rx_init_ring_element()
2340 if (buffer_info->dma_ptr) { in lan743x_rx_init_ring_element()
2349 buffer_info->buffer_length); in lan743x_rx_init_ring_element()
2351 used_length = buffer_info->buffer_length; in lan743x_rx_init_ring_element()
2352 dma_sync_single_for_cpu(dev, buffer_info->dma_ptr, in lan743x_rx_init_ring_element()
2355 dma_unmap_single_attrs(dev, buffer_info->dma_ptr, in lan743x_rx_init_ring_element()
2356 buffer_info->buffer_length, in lan743x_rx_init_ring_element()
2361 buffer_info->skb = skb; in lan743x_rx_init_ring_element()
2362 buffer_info->dma_ptr = dma_ptr; in lan743x_rx_init_ring_element()
2363 buffer_info->buffer_length = buffer_length; in lan743x_rx_init_ring_element()
2364 descriptor->data1 = cpu_to_le32(DMA_ADDR_LOW32(buffer_info->dma_ptr)); in lan743x_rx_init_ring_element()
2365 descriptor->data2 = cpu_to_le32(DMA_ADDR_HIGH32(buffer_info->dma_ptr)); in lan743x_rx_init_ring_element()
2376 struct lan743x_rx_buffer_info *buffer_info; in lan743x_rx_reuse_ring_element() local
2380 buffer_info = &rx->buffer_info[index]; in lan743x_rx_reuse_ring_element()
2382 descriptor->data1 = cpu_to_le32(DMA_ADDR_LOW32(buffer_info->dma_ptr)); in lan743x_rx_reuse_ring_element()
2383 descriptor->data2 = cpu_to_le32(DMA_ADDR_HIGH32(buffer_info->dma_ptr)); in lan743x_rx_reuse_ring_element()
2386 ((buffer_info->buffer_length) & in lan743x_rx_reuse_ring_element()
2393 struct lan743x_rx_buffer_info *buffer_info; in lan743x_rx_release_ring_element() local
2397 buffer_info = &rx->buffer_info[index]; in lan743x_rx_release_ring_element()
2401 if (buffer_info->dma_ptr) { in lan743x_rx_release_ring_element()
2403 buffer_info->dma_ptr, in lan743x_rx_release_ring_element()
2404 buffer_info->buffer_length, in lan743x_rx_release_ring_element()
2406 buffer_info->dma_ptr = 0; in lan743x_rx_release_ring_element()
2409 if (buffer_info->skb) { in lan743x_rx_release_ring_element()
2410 dev_kfree_skb(buffer_info->skb); in lan743x_rx_release_ring_element()
2411 buffer_info->skb = NULL; in lan743x_rx_release_ring_element()
2414 memset(buffer_info, 0, sizeof(*buffer_info)); in lan743x_rx_release_ring_element()
2438 struct lan743x_rx_buffer_info *buffer_info; in lan743x_rx_process_buffer() local
2457 buffer_info = &rx->buffer_info[rx->last_head]; in lan743x_rx_process_buffer()
2486 buffer_length = buffer_info->buffer_length; in lan743x_rx_process_buffer()
2497 skb = buffer_info->skb; in lan743x_rx_process_buffer()
2621 if (rx->buffer_info && rx->ring_cpu_ptr) { in lan743x_rx_ring_cleanup()
2636 kfree(rx->buffer_info); in lan743x_rx_ring_cleanup()
2637 rx->buffer_info = NULL; in lan743x_rx_ring_cleanup()
2690 cpu_ptr = kcalloc(rx->ring_size, sizeof(*rx->buffer_info), in lan743x_rx_ring_init()
2696 rx->buffer_info = (struct lan743x_rx_buffer_info *)cpu_ptr; in lan743x_rx_ring_init()