Commit 21f581a5 authored by Matt Carlson's avatar Matt Carlson Committed by David S. Miller

tg3: Create a new prodring_set structure

This patch migrates most of the rx producer ring variables to a new
tg3_rx_prodring_set structure and modifies the code accordingly.
Signed-off-by: default avatarMatt Carlson <mcarlson@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cf7a7298
This diff is collapsed.
...@@ -2476,6 +2476,17 @@ struct tg3_ethtool_stats { ...@@ -2476,6 +2476,17 @@ struct tg3_ethtool_stats {
u64 nic_tx_threshold_hit; u64 nic_tx_threshold_hit;
}; };
struct tg3_rx_prodring_set {
u32 rx_std_ptr;
u32 rx_jmb_ptr;
struct tg3_rx_buffer_desc *rx_std;
struct tg3_rx_buffer_desc *rx_jmb;
struct ring_info *rx_std_buffers;
struct ring_info *rx_jmb_buffers;
dma_addr_t rx_std_mapping;
dma_addr_t rx_jmb_mapping;
};
struct tg3 { struct tg3 {
/* begin "general, frequently-used members" cacheline section */ /* begin "general, frequently-used members" cacheline section */
...@@ -2551,27 +2562,19 @@ struct tg3 { ...@@ -2551,27 +2562,19 @@ struct tg3 {
void (*write32_rx_mbox) (struct tg3 *, u32, void (*write32_rx_mbox) (struct tg3 *, u32,
u32); u32);
u32 rx_rcb_ptr; u32 rx_rcb_ptr;
u32 rx_std_ptr;
u32 rx_jumbo_ptr;
u32 rx_pending; u32 rx_pending;
u32 rx_jumbo_pending; u32 rx_jumbo_pending;
u32 rx_std_max_post;
u32 rx_pkt_map_sz;
#if TG3_VLAN_TAG_USED #if TG3_VLAN_TAG_USED
struct vlan_group *vlgrp; struct vlan_group *vlgrp;
#endif #endif
struct tg3_rx_buffer_desc *rx_std;
struct ring_info *rx_std_buffers;
dma_addr_t rx_std_mapping;
u32 rx_std_max_post;
struct tg3_rx_buffer_desc *rx_jumbo;
struct ring_info *rx_jumbo_buffers;
dma_addr_t rx_jumbo_mapping;
struct tg3_rx_buffer_desc *rx_rcb; struct tg3_rx_buffer_desc *rx_rcb;
dma_addr_t rx_rcb_mapping; dma_addr_t rx_rcb_mapping;
u32 rx_pkt_map_sz; struct tg3_rx_prodring_set prodring[1];
/* begin "everything else" cacheline(s) section */ /* begin "everything else" cacheline(s) section */
struct net_device_stats net_stats; struct net_device_stats net_stats;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment