Commit ffd86bbe authored by Lennert Buytenhek's avatar Lennert Buytenhek

mv643xx_eth: remove write-only interrupt coalescing variables

Remove the write-only ->[rt]x_int_coal members from struct
mv643xx_eth_private.  In the process, tweak the RX/TX interrupt
mitigation code so that it is compiled by default, and set the
default coalescing delays to 0 usec.
Signed-off-by: default avatarLennert Buytenhek <buytenh@marvell.com>
Acked-by: default avatarDale Farnsworth <dale@farnsworth.org>
parent 13d64285
...@@ -60,12 +60,6 @@ static char mv643xx_eth_driver_version[] = "1.0"; ...@@ -60,12 +60,6 @@ static char mv643xx_eth_driver_version[] = "1.0";
#define MV643XX_ETH_CHECKSUM_OFFLOAD_TX #define MV643XX_ETH_CHECKSUM_OFFLOAD_TX
#define MV643XX_ETH_NAPI #define MV643XX_ETH_NAPI
#define MV643XX_ETH_TX_FAST_REFILL #define MV643XX_ETH_TX_FAST_REFILL
#undef MV643XX_ETH_COAL
#define MV643XX_ETH_TX_COAL 100
#ifdef MV643XX_ETH_COAL
#define MV643XX_ETH_RX_COAL 100
#endif
#ifdef MV643XX_ETH_CHECKSUM_OFFLOAD_TX #ifdef MV643XX_ETH_CHECKSUM_OFFLOAD_TX
#define MAX_DESCS_PER_SKB (MAX_SKB_FRAGS + 1) #define MAX_DESCS_PER_SKB (MAX_SKB_FRAGS + 1)
...@@ -322,8 +316,6 @@ struct mv643xx_eth_private { ...@@ -322,8 +316,6 @@ struct mv643xx_eth_private {
struct mib_counters mib_counters; struct mib_counters mib_counters;
spinlock_t lock; spinlock_t lock;
u32 rx_int_coal;
u32 tx_int_coal;
struct mii_if_info mii; struct mii_if_info mii;
/* /*
...@@ -1681,9 +1673,7 @@ static void port_start(struct net_device *dev) ...@@ -1681,9 +1673,7 @@ static void port_start(struct net_device *dev)
} }
} }
#ifdef MV643XX_ETH_COAL static void set_rx_coal(struct mv643xx_eth_private *mp, unsigned int delay)
static unsigned int set_rx_coal(struct mv643xx_eth_private *mp,
unsigned int delay)
{ {
unsigned int port_num = mp->port_num; unsigned int port_num = mp->port_num;
unsigned int coal = ((mp->shared->t_clk / 1000000) * delay) / 64; unsigned int coal = ((mp->shared->t_clk / 1000000) * delay) / 64;
...@@ -1693,20 +1683,14 @@ static unsigned int set_rx_coal(struct mv643xx_eth_private *mp, ...@@ -1693,20 +1683,14 @@ static unsigned int set_rx_coal(struct mv643xx_eth_private *mp,
((coal & 0x3fff) << 8) | ((coal & 0x3fff) << 8) |
(rdl(mp, SDMA_CONFIG(port_num)) (rdl(mp, SDMA_CONFIG(port_num))
& 0xffc000ff)); & 0xffc000ff));
return coal;
} }
#endif
static unsigned int set_tx_coal(struct mv643xx_eth_private *mp, static void set_tx_coal(struct mv643xx_eth_private *mp, unsigned int delay)
unsigned int delay)
{ {
unsigned int coal = ((mp->shared->t_clk / 1000000) * delay) / 64; unsigned int coal = ((mp->shared->t_clk / 1000000) * delay) / 64;
/* Set TX Coalescing mechanism */ /* Set TX Coalescing mechanism */
wrl(mp, TX_FIFO_URGENT_THRESHOLD(mp->port_num), coal << 4); wrl(mp, TX_FIFO_URGENT_THRESHOLD(mp->port_num), coal << 4);
return coal;
} }
static void port_init(struct mv643xx_eth_private *mp) static void port_init(struct mv643xx_eth_private *mp)
...@@ -1752,13 +1736,8 @@ static int mv643xx_eth_open(struct net_device *dev) ...@@ -1752,13 +1736,8 @@ static int mv643xx_eth_open(struct net_device *dev)
port_start(dev); port_start(dev);
/* Interrupt Coalescing */ set_rx_coal(mp, 0);
set_tx_coal(mp, 0);
#ifdef MV643XX_ETH_COAL
mp->rx_int_coal = set_rx_coal(mp, MV643XX_ETH_RX_COAL);
#endif
mp->tx_int_coal = set_tx_coal(mp, MV643XX_ETH_TX_COAL);
/* Unmask phy and link status changes interrupts */ /* Unmask phy and link status changes interrupts */
wrl(mp, INT_MASK_EXT(port_num), INT_EXT_LINK | INT_EXT_PHY | INT_EXT_TX); wrl(mp, INT_MASK_EXT(port_num), INT_EXT_LINK | INT_EXT_PHY | INT_EXT_TX);
......
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