Skip to content

Commit d9639ac

Browse files
committed
Revert "net: bcmgenet: Reset RBUF on first open"
This reverts commit be05083.
1 parent 0c14736 commit d9639ac

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

drivers/net/ethernet/broadcom/genet/bcmgenet.c

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3310,7 +3310,7 @@ static void bcmgenet_get_hw_addr(struct bcmgenet_priv *priv,
33103310
}
33113311

33123312
/* Returns a reusable dma control register value */
3313-
static u32 bcmgenet_dma_disable(struct bcmgenet_priv *priv, bool flush_rx)
3313+
static u32 bcmgenet_dma_disable(struct bcmgenet_priv *priv)
33143314
{
33153315
unsigned int i;
33163316
u32 reg;
@@ -3335,14 +3335,6 @@ static u32 bcmgenet_dma_disable(struct bcmgenet_priv *priv, bool flush_rx)
33353335
udelay(10);
33363336
bcmgenet_umac_writel(priv, 0, UMAC_TX_FLUSH);
33373337

3338-
if (flush_rx) {
3339-
reg = bcmgenet_rbuf_ctrl_get(priv);
3340-
bcmgenet_rbuf_ctrl_set(priv, reg | BIT(0));
3341-
udelay(10);
3342-
bcmgenet_rbuf_ctrl_set(priv, reg);
3343-
udelay(10);
3344-
}
3345-
33463338
return dma_ctrl;
33473339
}
33483340

@@ -3406,8 +3398,8 @@ static int bcmgenet_open(struct net_device *dev)
34063398

34073399
bcmgenet_set_hw_addr(priv, dev->dev_addr);
34083400

3409-
/* Disable RX/TX DMA and flush TX and RX queues */
3410-
dma_ctrl = bcmgenet_dma_disable(priv, true);
3401+
/* Disable RX/TX DMA and flush TX queues */
3402+
dma_ctrl = bcmgenet_dma_disable(priv);
34113403

34123404
/* Reinitialize TDMA and RDMA and SW housekeeping */
34133405
ret = bcmgenet_init_dma(priv);
@@ -4292,7 +4284,7 @@ static int bcmgenet_resume(struct device *d)
42924284
bcmgenet_hfb_create_rxnfc_filter(priv, rule);
42934285

42944286
/* Disable RX/TX DMA and flush TX queues */
4295-
dma_ctrl = bcmgenet_dma_disable(priv, false);
4287+
dma_ctrl = bcmgenet_dma_disable(priv);
42964288

42974289
/* Reinitialize TDMA and RDMA and SW housekeeping */
42984290
ret = bcmgenet_init_dma(priv);

0 commit comments

Comments
 (0)