Skip to content

Commit

Permalink
Merge branch 'stmmac-Coalesce-and-tail-addr-fixes'
Browse files Browse the repository at this point in the history
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 <jbrunet@baylibre.com>
	on a113 s400 board (single queue)
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Sep 19, 2018
2 parents 5211da9 + 0431100 commit 87ebcff
Show file tree
Hide file tree
Showing 4 changed files with 149 additions and 108 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/stmicro/stmmac/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,10 @@ struct stmmac_safety_stats {
#define MAX_DMA_RIWT 0xff
#define MIN_DMA_RIWT 0x20
/* Tx coalesce parameters */
#define STMMAC_COAL_TX_TIMER 40000
#define STMMAC_COAL_TX_TIMER 1000
#define STMMAC_MAX_COAL_TX_TICK 100000
#define STMMAC_TX_MAX_FRAMES 256
#define STMMAC_TX_FRAMES 64
#define STMMAC_TX_FRAMES 25

/* Packets types */
enum packets_types {
Expand Down
14 changes: 12 additions & 2 deletions drivers/net/ethernet/stmicro/stmmac/stmmac.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ struct stmmac_tx_info {

/* Frequently used values are kept adjacent for cache effect */
struct stmmac_tx_queue {
u32 tx_count_frames;
struct timer_list txtimer;
u32 queue_index;
struct stmmac_priv *priv_data;
struct dma_extended_desc *dma_etx ____cacheline_aligned_in_smp;
Expand All @@ -73,7 +75,14 @@ struct stmmac_rx_queue {
u32 rx_zeroc_thresh;
dma_addr_t dma_rx_phy;
u32 rx_tail_addr;
};

struct stmmac_channel {
struct napi_struct napi ____cacheline_aligned_in_smp;
struct stmmac_priv *priv_data;
u32 index;
int has_rx;
int has_tx;
};

struct stmmac_tc_entry {
Expand Down Expand Up @@ -109,14 +118,12 @@ struct stmmac_pps_cfg {

struct stmmac_priv {
/* Frequently used values are kept adjacent for cache effect */
u32 tx_count_frames;
u32 tx_coal_frames;
u32 tx_coal_timer;

int tx_coalesce;
int hwts_tx_en;
bool tx_path_in_lpi_mode;
struct timer_list txtimer;
bool tso;

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

/* Generic channel for NAPI */
struct stmmac_channel channel[STMMAC_CH_MAX];

bool oldlink;
int speed;
int oldduplex;
Expand Down
Loading

0 comments on commit 87ebcff

Please sign in to comment.