Skip to content

Commit 87ebcff

Browse files
committed
Merge branch 'stmmac-Coalesce-and-tail-addr-fixes'
Jose Abreu says: ==================== net: stmmac: Coalesce and tail addr fixes The fix for coalesce timer and a fix in tail address setting that impacts XGMAC2 operation. The series is: Tested-by: Jerome Brunet <[email protected]> on a113 s400 board (single queue) ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 5211da9 + 0431100 commit 87ebcff

File tree

4 files changed

+149
-108
lines changed

4 files changed

+149
-108
lines changed

drivers/net/ethernet/stmicro/stmmac/common.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,10 @@ struct stmmac_safety_stats {
258258
#define MAX_DMA_RIWT 0xff
259259
#define MIN_DMA_RIWT 0x20
260260
/* Tx coalesce parameters */
261-
#define STMMAC_COAL_TX_TIMER 40000
261+
#define STMMAC_COAL_TX_TIMER 1000
262262
#define STMMAC_MAX_COAL_TX_TICK 100000
263263
#define STMMAC_TX_MAX_FRAMES 256
264-
#define STMMAC_TX_FRAMES 64
264+
#define STMMAC_TX_FRAMES 25
265265

266266
/* Packets types */
267267
enum packets_types {

drivers/net/ethernet/stmicro/stmmac/stmmac.h

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ struct stmmac_tx_info {
4848

4949
/* Frequently used values are kept adjacent for cache effect */
5050
struct stmmac_tx_queue {
51+
u32 tx_count_frames;
52+
struct timer_list txtimer;
5153
u32 queue_index;
5254
struct stmmac_priv *priv_data;
5355
struct dma_extended_desc *dma_etx ____cacheline_aligned_in_smp;
@@ -73,7 +75,14 @@ struct stmmac_rx_queue {
7375
u32 rx_zeroc_thresh;
7476
dma_addr_t dma_rx_phy;
7577
u32 rx_tail_addr;
78+
};
79+
80+
struct stmmac_channel {
7681
struct napi_struct napi ____cacheline_aligned_in_smp;
82+
struct stmmac_priv *priv_data;
83+
u32 index;
84+
int has_rx;
85+
int has_tx;
7786
};
7887

7988
struct stmmac_tc_entry {
@@ -109,14 +118,12 @@ struct stmmac_pps_cfg {
109118

110119
struct stmmac_priv {
111120
/* Frequently used values are kept adjacent for cache effect */
112-
u32 tx_count_frames;
113121
u32 tx_coal_frames;
114122
u32 tx_coal_timer;
115123

116124
int tx_coalesce;
117125
int hwts_tx_en;
118126
bool tx_path_in_lpi_mode;
119-
struct timer_list txtimer;
120127
bool tso;
121128

122129
unsigned int dma_buf_sz;
@@ -137,6 +144,9 @@ struct stmmac_priv {
137144
/* TX Queue */
138145
struct stmmac_tx_queue tx_queue[MTL_MAX_TX_QUEUES];
139146

147+
/* Generic channel for NAPI */
148+
struct stmmac_channel channel[STMMAC_CH_MAX];
149+
140150
bool oldlink;
141151
int speed;
142152
int oldduplex;

0 commit comments

Comments
 (0)