Lines Matching refs:fbr
289 struct fbr_lookup *fbr[NUM_FBRS]; member
742 if (rx_ring->fbr[1]->buffsize == 4096) in et131x_rx_dma_enable()
744 else if (rx_ring->fbr[1]->buffsize == 8192) in et131x_rx_dma_enable()
746 else if (rx_ring->fbr[1]->buffsize == 16384) in et131x_rx_dma_enable()
750 if (rx_ring->fbr[0]->buffsize == 256) in et131x_rx_dma_enable()
752 else if (rx_ring->fbr[0]->buffsize == 512) in et131x_rx_dma_enable()
754 else if (rx_ring->fbr[0]->buffsize == 1024) in et131x_rx_dma_enable()
1575 struct fbr_lookup *fbr = rx_local->fbr[id]; in et131x_config_rx_dma_regs() local
1592 fbr_entry = fbr->ring_virtaddr; in et131x_config_rx_dma_regs()
1593 for (entry = 0; entry < fbr->num_entries; entry++) { in et131x_config_rx_dma_regs()
1594 fbr_entry->addr_hi = fbr->bus_high[entry]; in et131x_config_rx_dma_regs()
1595 fbr_entry->addr_lo = fbr->bus_low[entry]; in et131x_config_rx_dma_regs()
1601 writel(upper_32_bits(fbr->ring_physaddr), base_hi); in et131x_config_rx_dma_regs()
1602 writel(lower_32_bits(fbr->ring_physaddr), base_lo); in et131x_config_rx_dma_regs()
1603 writel(fbr->num_entries - 1, num_des); in et131x_config_rx_dma_regs()
1609 fbr->local_full = ET_DMA10_WRAP; in et131x_config_rx_dma_regs()
1610 writel(((fbr->num_entries * LO_MARK_PERCENT_FOR_RX) / 100) - 1, in et131x_config_rx_dma_regs()
1866 struct fbr_lookup *fbr; in et131x_rx_dma_memory_alloc() local
1869 rx_ring->fbr[0] = kzalloc(sizeof(*fbr), GFP_KERNEL); in et131x_rx_dma_memory_alloc()
1870 if (rx_ring->fbr[0] == NULL) in et131x_rx_dma_memory_alloc()
1872 rx_ring->fbr[1] = kzalloc(sizeof(*fbr), GFP_KERNEL); in et131x_rx_dma_memory_alloc()
1873 if (rx_ring->fbr[1] == NULL) in et131x_rx_dma_memory_alloc()
1894 rx_ring->fbr[0]->buffsize = 256; in et131x_rx_dma_memory_alloc()
1895 rx_ring->fbr[0]->num_entries = 512; in et131x_rx_dma_memory_alloc()
1896 rx_ring->fbr[1]->buffsize = 2048; in et131x_rx_dma_memory_alloc()
1897 rx_ring->fbr[1]->num_entries = 512; in et131x_rx_dma_memory_alloc()
1899 rx_ring->fbr[0]->buffsize = 512; in et131x_rx_dma_memory_alloc()
1900 rx_ring->fbr[0]->num_entries = 1024; in et131x_rx_dma_memory_alloc()
1901 rx_ring->fbr[1]->buffsize = 4096; in et131x_rx_dma_memory_alloc()
1902 rx_ring->fbr[1]->num_entries = 512; in et131x_rx_dma_memory_alloc()
1904 rx_ring->fbr[0]->buffsize = 1024; in et131x_rx_dma_memory_alloc()
1905 rx_ring->fbr[0]->num_entries = 768; in et131x_rx_dma_memory_alloc()
1906 rx_ring->fbr[1]->buffsize = 16384; in et131x_rx_dma_memory_alloc()
1907 rx_ring->fbr[1]->num_entries = 128; in et131x_rx_dma_memory_alloc()
1910 rx_ring->psr_entries = rx_ring->fbr[0]->num_entries + in et131x_rx_dma_memory_alloc()
1911 rx_ring->fbr[1]->num_entries; in et131x_rx_dma_memory_alloc()
1914 fbr = rx_ring->fbr[id]; in et131x_rx_dma_memory_alloc()
1916 bufsize = sizeof(struct fbr_desc) * fbr->num_entries; in et131x_rx_dma_memory_alloc()
1917 fbr->ring_virtaddr = dma_alloc_coherent(&adapter->pdev->dev, in et131x_rx_dma_memory_alloc()
1919 &fbr->ring_physaddr, in et131x_rx_dma_memory_alloc()
1921 if (!fbr->ring_virtaddr) { in et131x_rx_dma_memory_alloc()
1930 fbr = rx_ring->fbr[id]; in et131x_rx_dma_memory_alloc()
1931 fbr_chunksize = (FBR_CHUNKS * fbr->buffsize); in et131x_rx_dma_memory_alloc()
1933 for (i = 0; i < fbr->num_entries / FBR_CHUNKS; i++) { in et131x_rx_dma_memory_alloc()
1936 fbr->mem_virtaddrs[i] = dma_alloc_coherent( in et131x_rx_dma_memory_alloc()
1938 &fbr->mem_physaddrs[i], in et131x_rx_dma_memory_alloc()
1941 if (!fbr->mem_virtaddrs[i]) { in et131x_rx_dma_memory_alloc()
1948 fbr_physaddr = fbr->mem_physaddrs[i]; in et131x_rx_dma_memory_alloc()
1956 fbr->virt[k] = (u8 *)fbr->mem_virtaddrs[i] + in et131x_rx_dma_memory_alloc()
1957 (j * fbr->buffsize); in et131x_rx_dma_memory_alloc()
1962 fbr->bus_high[k] = upper_32_bits(fbr_physaddr); in et131x_rx_dma_memory_alloc()
1963 fbr->bus_low[k] = lower_32_bits(fbr_physaddr); in et131x_rx_dma_memory_alloc()
1964 fbr_physaddr += fbr->buffsize; in et131x_rx_dma_memory_alloc()
2010 struct fbr_lookup *fbr; in et131x_rx_dma_memory_free() local
2026 fbr = rx_ring->fbr[id]; in et131x_rx_dma_memory_free()
2028 if (!fbr || !fbr->ring_virtaddr) in et131x_rx_dma_memory_free()
2032 for (ii = 0; ii < fbr->num_entries / FBR_CHUNKS; ii++) { in et131x_rx_dma_memory_free()
2033 if (fbr->mem_virtaddrs[ii]) { in et131x_rx_dma_memory_free()
2034 bufsize = fbr->buffsize * FBR_CHUNKS; in et131x_rx_dma_memory_free()
2038 fbr->mem_virtaddrs[ii], in et131x_rx_dma_memory_free()
2039 fbr->mem_physaddrs[ii]); in et131x_rx_dma_memory_free()
2041 fbr->mem_virtaddrs[ii] = NULL; in et131x_rx_dma_memory_free()
2045 bufsize = sizeof(struct fbr_desc) * fbr->num_entries; in et131x_rx_dma_memory_free()
2049 fbr->ring_virtaddr, in et131x_rx_dma_memory_free()
2050 fbr->ring_physaddr); in et131x_rx_dma_memory_free()
2052 fbr->ring_virtaddr = NULL; in et131x_rx_dma_memory_free()
2076 kfree(rx_ring->fbr[0]); in et131x_rx_dma_memory_free()
2077 kfree(rx_ring->fbr[1]); in et131x_rx_dma_memory_free()
2130 struct fbr_lookup *fbr = rx_local->fbr[ring_index]; in nic_return_rfd() local
2135 if (buff_index < fbr->num_entries) { in nic_return_rfd()
2145 next = (struct fbr_desc *)(fbr->ring_virtaddr) + in nic_return_rfd()
2146 INDEX10(fbr->local_full); in nic_return_rfd()
2152 next->addr_hi = fbr->bus_high[buff_index]; in nic_return_rfd()
2153 next->addr_lo = fbr->bus_low[buff_index]; in nic_return_rfd()
2156 free_buff_ring = bump_free_buff_ring(&fbr->local_full, in nic_return_rfd()
2157 fbr->num_entries - 1); in nic_return_rfd()
2196 struct fbr_lookup *fbr; in nic_rx_pkts() local
2218 fbr = rx_local->fbr[ring_index]; in nic_rx_pkts()
2233 if (ring_index > 1 || buff_index > fbr->num_entries - 1) { in nic_rx_pkts()
2281 skb_put_data(skb, fbr->virt[buff_index], rfd->len); in nic_rx_pkts()