summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro/stmmac/stmmac.h
diff options
context:
space:
mode:
authorLABBE Corentin2017-03-29 07:05:40 +0200
committerDavid S. Miller2017-03-30 19:50:26 +0200
commit5bacd77849173c8b7d4c75d5289557e73bd724db (patch)
treef076a561cd505249b4f924fdfd1e0eef751e2290 /drivers/net/ethernet/stmicro/stmmac/stmmac.h
parentMerge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirshe... (diff)
downloadkernel-qcow2-linux-5bacd77849173c8b7d4c75d5289557e73bd724db.tar.gz
kernel-qcow2-linux-5bacd77849173c8b7d4c75d5289557e73bd724db.tar.xz
kernel-qcow2-linux-5bacd77849173c8b7d4c75d5289557e73bd724db.zip
Revert "net: stmmac: enable multiple buffers"
The commit aff3d9eff843 ("net: stmmac: enable multiple buffers") breaks numerous boards. while some patch exists for fixing some of it, dwmac-sunxi is still broken with it. Since this patch is very huge, it will be better to split it in smaller part. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.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.h49
1 files changed, 14 insertions, 35 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
index 6ec671c9be84..cd8fb619b1e9 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
@@ -46,35 +46,6 @@ 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;
- struct dma_extended_desc *dma_erx;
- struct dma_desc *dma_rx ____cacheline_aligned_in_smp;
- struct sk_buff **rx_skbuff;
- dma_addr_t *rx_skbuff_dma;
- struct napi_struct napi ____cacheline_aligned_in_smp;
- unsigned int cur_rx;
- unsigned int dirty_rx;
- u32 rx_zeroc_thresh;
- dma_addr_t dma_rx_phy;
- u32 rx_tail_addr;
-};
-
struct stmmac_priv {
/* Frequently used values are kept adjacent for cache effect */
struct dma_extended_desc *dma_etx ____cacheline_aligned_in_smp;
@@ -85,22 +56,28 @@ struct stmmac_priv {
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;
struct timer_list txtimer;
bool tso;
- /* TX Queue */
- struct stmmac_tx_queue *tx_queue;
-
- /* RX Queue */
- struct stmmac_rx_queue *rx_queue;
-
+ struct dma_desc *dma_rx ____cacheline_aligned_in_smp;
+ struct dma_extended_desc *dma_erx;
+ struct sk_buff **rx_skbuff;
+ unsigned int cur_rx;
+ unsigned int dirty_rx;
unsigned int dma_buf_sz;
unsigned int rx_copybreak;
+ unsigned int rx_zeroc_thresh;
u32 rx_riwt;
int hwts_rx_en;
+ dma_addr_t *rx_skbuff_dma;
+ dma_addr_t dma_rx_phy;
+
+ struct napi_struct napi ____cacheline_aligned_in_smp;
void __iomem *ioaddr;
struct net_device *dev;
@@ -142,6 +119,8 @@ struct stmmac_priv {
spinlock_t ptp_lock;
void __iomem *mmcaddr;
void __iomem *ptpaddr;
+ u32 rx_tail_addr;
+ u32 tx_tail_addr;
u32 mss;
#ifdef CONFIG_DEBUG_FS