summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro/stmmac/stmmac.h
diff options
context:
space:
mode:
authorJoao Pinto <Joao.Pinto@synopsys.com>2017-04-06 09:49:10 +0100
committerDavid S. Miller <davem@davemloft.net>2017-04-07 07:18:27 -0700
commitce736788e8a92c12639311a9f01d55ccc997729c (patch)
tree23cb665e5f8cf23282370d332d2b0d262ebf8c78 /drivers/net/ethernet/stmicro/stmmac/stmmac.h
parent54139cf3bb33fad075737000f22749cafe3e83a0 (diff)
net: stmmac: adding multiple buffers for TX
This patch adds the structure stmmac_tx_queue which contains tx queues specific data (previously in stmmac_priv). Signed-off-by: Joao Pinto <jpinto@synopsys.com> Tested-by: Niklas Cassel <niklas.cassel@axis.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac.h')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac.h26
1 files changed, 18 insertions, 8 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
index c7ad9e4f93d2..359f8fdde6aa 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
@@ -46,6 +46,20 @@ struct stmmac_tx_info {
bool is_jumbo;
};
+/* Frequently used values are kept adjacent for cache effect */
+struct stmmac_tx_queue {
+ u32 queue_index;
+ struct stmmac_priv *priv_data;
+ struct dma_extended_desc *dma_etx ____cacheline_aligned_in_smp;
+ struct dma_desc *dma_tx;
+ struct sk_buff **tx_skbuff;
+ struct stmmac_tx_info *tx_skbuff_dma;
+ unsigned int cur_tx;
+ unsigned int dirty_tx;
+ dma_addr_t dma_tx_phy;
+ u32 tx_tail_addr;
+};
+
struct stmmac_rx_queue {
u32 queue_index;
struct stmmac_priv *priv_data;
@@ -62,16 +76,10 @@ struct stmmac_rx_queue {
struct stmmac_priv {
/* Frequently used values are kept adjacent for cache effect */
- struct dma_extended_desc *dma_etx ____cacheline_aligned_in_smp;
- struct dma_desc *dma_tx;
- struct sk_buff **tx_skbuff;
- unsigned int cur_tx;
- unsigned int dirty_tx;
u32 tx_count_frames;
u32 tx_coal_frames;
u32 tx_coal_timer;
- struct stmmac_tx_info *tx_skbuff_dma;
- dma_addr_t dma_tx_phy;
+
int tx_coalesce;
int hwts_tx_en;
bool tx_path_in_lpi_mode;
@@ -94,6 +102,9 @@ struct stmmac_priv {
/* RX Queue */
struct stmmac_rx_queue rx_queue[MTL_MAX_RX_QUEUES];
+ /* TX Queue */
+ struct stmmac_tx_queue tx_queue[MTL_MAX_TX_QUEUES];
+
int oldlink;
int speed;
int oldduplex;
@@ -128,7 +139,6 @@ struct stmmac_priv {
spinlock_t ptp_lock;
void __iomem *mmcaddr;
void __iomem *ptpaddr;
- u32 tx_tail_addr;
u32 mss;
#ifdef CONFIG_DEBUG_FS