diff options
author | Matt Carlson <mcarlson@broadcom.com> | 2009-08-28 10:00:25 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-29 18:42:50 -0400 |
commit | 21f581a5366d48d86b9ae86043fc61d44e992c0c (patch) | |
tree | bfaa5a591d663ad5d61b9cdd219409ec4922f0dd /drivers/net/tg3.h | |
parent | cf7a7298c4f47ab7546b933bb54ad3ea03a1daf6 (diff) |
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: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.h')
-rw-r--r-- | drivers/net/tg3.h | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index d029b4b9b929..7a27cffb5ada 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
@@ -2476,6 +2476,17 @@ struct tg3_ethtool_stats { | |||
2476 | u64 nic_tx_threshold_hit; | 2476 | u64 nic_tx_threshold_hit; |
2477 | }; | 2477 | }; |
2478 | 2478 | ||
2479 | struct tg3_rx_prodring_set { | ||
2480 | u32 rx_std_ptr; | ||
2481 | u32 rx_jmb_ptr; | ||
2482 | struct tg3_rx_buffer_desc *rx_std; | ||
2483 | struct tg3_rx_buffer_desc *rx_jmb; | ||
2484 | struct ring_info *rx_std_buffers; | ||
2485 | struct ring_info *rx_jmb_buffers; | ||
2486 | dma_addr_t rx_std_mapping; | ||
2487 | dma_addr_t rx_jmb_mapping; | ||
2488 | }; | ||
2489 | |||
2479 | struct tg3 { | 2490 | struct tg3 { |
2480 | /* begin "general, frequently-used members" cacheline section */ | 2491 | /* begin "general, frequently-used members" cacheline section */ |
2481 | 2492 | ||
@@ -2551,27 +2562,19 @@ struct tg3 { | |||
2551 | void (*write32_rx_mbox) (struct tg3 *, u32, | 2562 | void (*write32_rx_mbox) (struct tg3 *, u32, |
2552 | u32); | 2563 | u32); |
2553 | u32 rx_rcb_ptr; | 2564 | u32 rx_rcb_ptr; |
2554 | u32 rx_std_ptr; | ||
2555 | u32 rx_jumbo_ptr; | ||
2556 | u32 rx_pending; | 2565 | u32 rx_pending; |
2557 | u32 rx_jumbo_pending; | 2566 | u32 rx_jumbo_pending; |
2567 | u32 rx_std_max_post; | ||
2568 | u32 rx_pkt_map_sz; | ||
2558 | #if TG3_VLAN_TAG_USED | 2569 | #if TG3_VLAN_TAG_USED |
2559 | struct vlan_group *vlgrp; | 2570 | struct vlan_group *vlgrp; |
2560 | #endif | 2571 | #endif |
2561 | 2572 | ||
2562 | struct tg3_rx_buffer_desc *rx_std; | ||
2563 | struct ring_info *rx_std_buffers; | ||
2564 | dma_addr_t rx_std_mapping; | ||
2565 | u32 rx_std_max_post; | ||
2566 | |||
2567 | struct tg3_rx_buffer_desc *rx_jumbo; | ||
2568 | struct ring_info *rx_jumbo_buffers; | ||
2569 | dma_addr_t rx_jumbo_mapping; | ||
2570 | |||
2571 | struct tg3_rx_buffer_desc *rx_rcb; | 2573 | struct tg3_rx_buffer_desc *rx_rcb; |
2572 | dma_addr_t rx_rcb_mapping; | 2574 | dma_addr_t rx_rcb_mapping; |
2573 | 2575 | ||
2574 | u32 rx_pkt_map_sz; | 2576 | struct tg3_rx_prodring_set prodring[1]; |
2577 | |||
2575 | 2578 | ||
2576 | /* begin "everything else" cacheline(s) section */ | 2579 | /* begin "everything else" cacheline(s) section */ |
2577 | struct net_device_stats net_stats; | 2580 | struct net_device_stats net_stats; |