Commit 7355f276 authored by Troy Kisky's avatar Troy Kisky Committed by David S. Miller

net: fec: add struct bufdesc_prop

This reduces code and gains speed.
Signed-off-by: default avatarTroy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 93c595f7
...@@ -448,33 +448,34 @@ struct bufdesc_ex { ...@@ -448,33 +448,34 @@ struct bufdesc_ex {
/* Controller supports RACC register */ /* Controller supports RACC register */
#define FEC_QUIRK_HAS_RACC (1 << 12) #define FEC_QUIRK_HAS_RACC (1 << 12)
struct bufdesc_prop {
int qid;
/* Address of Rx and Tx buffers */
struct bufdesc *base;
struct bufdesc *last;
struct bufdesc *cur;
dma_addr_t dma;
unsigned short ring_size;
unsigned char dsize;
unsigned char dsize_log2;
};
struct fec_enet_priv_tx_q { struct fec_enet_priv_tx_q {
int index; struct bufdesc_prop bd;
unsigned char *tx_bounce[TX_RING_SIZE]; unsigned char *tx_bounce[TX_RING_SIZE];
struct sk_buff *tx_skbuff[TX_RING_SIZE]; struct sk_buff *tx_skbuff[TX_RING_SIZE];
dma_addr_t bd_dma;
struct bufdesc *tx_bd_base;
uint tx_ring_size;
unsigned short tx_stop_threshold; unsigned short tx_stop_threshold;
unsigned short tx_wake_threshold; unsigned short tx_wake_threshold;
struct bufdesc *cur_tx;
struct bufdesc *dirty_tx; struct bufdesc *dirty_tx;
char *tso_hdrs; char *tso_hdrs;
dma_addr_t tso_hdrs_dma; dma_addr_t tso_hdrs_dma;
}; };
struct fec_enet_priv_rx_q { struct fec_enet_priv_rx_q {
int index; struct bufdesc_prop bd;
struct sk_buff *rx_skbuff[RX_RING_SIZE]; struct sk_buff *rx_skbuff[RX_RING_SIZE];
dma_addr_t bd_dma;
struct bufdesc *rx_bd_base;
uint rx_ring_size;
struct bufdesc *cur_rx;
}; };
/* The FEC buffer descriptors track the ring buffers. The rx_bd_base and /* The FEC buffer descriptors track the ring buffers. The rx_bd_base and
...@@ -514,8 +515,6 @@ struct fec_enet_private { ...@@ -514,8 +515,6 @@ struct fec_enet_private {
unsigned long work_ts; unsigned long work_ts;
unsigned long work_mdio; unsigned long work_mdio;
unsigned short bufdesc_size;
struct platform_device *pdev; struct platform_device *pdev;
int dev_id; int dev_id;
......
This diff is collapsed.
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