Lines Matching refs:buffer_info
1049 tpd_ring->buffer_info = kzalloc(size, GFP_KERNEL); in atl1_setup_ring_resources()
1050 if (unlikely(!tpd_ring->buffer_info)) { in atl1_setup_ring_resources()
1056 rfd_ring->buffer_info = in atl1_setup_ring_resources()
1057 (tpd_ring->buffer_info + tpd_ring->count); in atl1_setup_ring_resources()
1123 kfree(tpd_ring->buffer_info); in atl1_setup_ring_resources()
1151 struct atl1_buffer *buffer_info; in atl1_clean_rx_ring() local
1158 buffer_info = &rfd_ring->buffer_info[i]; in atl1_clean_rx_ring()
1159 if (buffer_info->dma) { in atl1_clean_rx_ring()
1160 pci_unmap_page(pdev, buffer_info->dma, in atl1_clean_rx_ring()
1161 buffer_info->length, PCI_DMA_FROMDEVICE); in atl1_clean_rx_ring()
1162 buffer_info->dma = 0; in atl1_clean_rx_ring()
1164 if (buffer_info->skb) { in atl1_clean_rx_ring()
1165 dev_kfree_skb(buffer_info->skb); in atl1_clean_rx_ring()
1166 buffer_info->skb = NULL; in atl1_clean_rx_ring()
1171 memset(rfd_ring->buffer_info, 0, size); in atl1_clean_rx_ring()
1190 struct atl1_buffer *buffer_info; in atl1_clean_tx_ring() local
1197 buffer_info = &tpd_ring->buffer_info[i]; in atl1_clean_tx_ring()
1198 if (buffer_info->dma) { in atl1_clean_tx_ring()
1199 pci_unmap_page(pdev, buffer_info->dma, in atl1_clean_tx_ring()
1200 buffer_info->length, PCI_DMA_TODEVICE); in atl1_clean_tx_ring()
1201 buffer_info->dma = 0; in atl1_clean_tx_ring()
1206 buffer_info = &tpd_ring->buffer_info[i]; in atl1_clean_tx_ring()
1207 if (buffer_info->skb) { in atl1_clean_tx_ring()
1208 dev_kfree_skb_any(buffer_info->skb); in atl1_clean_tx_ring()
1209 buffer_info->skb = NULL; in atl1_clean_tx_ring()
1214 memset(tpd_ring->buffer_info, 0, size); in atl1_clean_tx_ring()
1240 kfree(tpd_ring->buffer_info); in atl1_free_ring_resources()
1244 tpd_ring->buffer_info = NULL; in atl1_free_ring_resources()
1248 rfd_ring->buffer_info = NULL; in atl1_free_ring_resources()
1785 rfd_ring->buffer_info[rfd_ring->next_to_clean].alloced = 0; in atl1_clean_alloc_flag()
1857 struct atl1_buffer *buffer_info, *next_info; in atl1_alloc_rx_buffers() local
1866 buffer_info = &rfd_ring->buffer_info[rfd_next_to_use]; in atl1_alloc_rx_buffers()
1867 next_info = &rfd_ring->buffer_info[next_next]; in atl1_alloc_rx_buffers()
1869 while (!buffer_info->alloced && !next_info->alloced) { in atl1_alloc_rx_buffers()
1870 if (buffer_info->skb) { in atl1_alloc_rx_buffers()
1871 buffer_info->alloced = 1; in atl1_alloc_rx_buffers()
1885 buffer_info->alloced = 1; in atl1_alloc_rx_buffers()
1886 buffer_info->skb = skb; in atl1_alloc_rx_buffers()
1887 buffer_info->length = (u16) adapter->rx_buffer_len; in atl1_alloc_rx_buffers()
1890 buffer_info->dma = pci_map_page(pdev, page, offset, in atl1_alloc_rx_buffers()
1893 rfd_desc->buffer_addr = cpu_to_le64(buffer_info->dma); in atl1_alloc_rx_buffers()
1902 buffer_info = &rfd_ring->buffer_info[rfd_next_to_use]; in atl1_alloc_rx_buffers()
1903 next_info = &rfd_ring->buffer_info[next_next]; in atl1_alloc_rx_buffers()
1928 struct atl1_buffer *buffer_info; in atl1_intr_rx() local
1995 buffer_info = &rfd_ring->buffer_info[rrd->buf_indx]; in atl1_intr_rx()
2009 buffer_info->alloced = 0; in atl1_intr_rx()
2016 pci_unmap_page(adapter->pdev, buffer_info->dma, in atl1_intr_rx()
2017 buffer_info->length, PCI_DMA_FROMDEVICE); in atl1_intr_rx()
2018 buffer_info->dma = 0; in atl1_intr_rx()
2019 skb = buffer_info->skb; in atl1_intr_rx()
2038 buffer_info->skb = NULL; in atl1_intr_rx()
2039 buffer_info->alloced = 0; in atl1_intr_rx()
2075 struct atl1_buffer *buffer_info; in atl1_intr_tx() local
2084 buffer_info = &tpd_ring->buffer_info[sw_tpd_next_to_clean]; in atl1_intr_tx()
2085 if (buffer_info->dma) { in atl1_intr_tx()
2086 pci_unmap_page(adapter->pdev, buffer_info->dma, in atl1_intr_tx()
2087 buffer_info->length, PCI_DMA_TODEVICE); in atl1_intr_tx()
2088 buffer_info->dma = 0; in atl1_intr_tx()
2091 if (buffer_info->skb) { in atl1_intr_tx()
2092 dev_kfree_skb_irq(buffer_info->skb); in atl1_intr_tx()
2093 buffer_info->skb = NULL; in atl1_intr_tx()
2208 struct atl1_buffer *buffer_info; in atl1_tx_map() local
2222 buffer_info = &tpd_ring->buffer_info[next_to_use]; in atl1_tx_map()
2223 BUG_ON(buffer_info->skb); in atl1_tx_map()
2225 buffer_info->skb = NULL; in atl1_tx_map()
2231 buffer_info->length = hdr_len; in atl1_tx_map()
2234 buffer_info->dma = pci_map_page(adapter->pdev, page, in atl1_tx_map()
2248 buffer_info = in atl1_tx_map()
2249 &tpd_ring->buffer_info[next_to_use]; in atl1_tx_map()
2250 buffer_info->skb = NULL; in atl1_tx_map()
2251 buffer_info->length = in atl1_tx_map()
2254 data_len -= buffer_info->length; in atl1_tx_map()
2259 buffer_info->dma = pci_map_page(adapter->pdev, in atl1_tx_map()
2260 page, offset, buffer_info->length, in atl1_tx_map()
2268 buffer_info->length = buf_len; in atl1_tx_map()
2271 buffer_info->dma = pci_map_page(adapter->pdev, page, in atl1_tx_map()
2287 buffer_info = &tpd_ring->buffer_info[next_to_use]; in atl1_tx_map()
2288 BUG_ON(buffer_info->skb); in atl1_tx_map()
2290 buffer_info->skb = NULL; in atl1_tx_map()
2291 buffer_info->length = (buf_len > ATL1_MAX_TX_BUF_LEN) ? in atl1_tx_map()
2293 buf_len -= buffer_info->length; in atl1_tx_map()
2294 buffer_info->dma = skb_frag_dma_map(&adapter->pdev->dev, in atl1_tx_map()
2296 buffer_info->length, DMA_TO_DEVICE); in atl1_tx_map()
2304 buffer_info->skb = skb; in atl1_tx_map()
2311 struct atl1_buffer *buffer_info; in atl1_tx_queue() local
2318 buffer_info = &tpd_ring->buffer_info[next_to_use]; in atl1_tx_queue()
2322 tpd->buffer_addr = cpu_to_le64(buffer_info->dma); in atl1_tx_queue()
2324 tpd->word2 |= (cpu_to_le16(buffer_info->length) & in atl1_tx_queue()