Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c89af1a3 authored by Stanislaw Gruszka's avatar Stanislaw Gruszka Committed by David S. Miller
Browse files

bnx2x: avoid TX timeout when stopping device



When stop device call netif_carrier_off() just after disabling TX queue to
avoid possibility of netdev watchdog warning and ->ndo_tx_timeout() invocation.

Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Acked-by: default avatarEilon Greenstein <eilong@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a0ba6760
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -8499,6 +8499,7 @@ static int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode)


	/* Disable HW interrupts, NAPI and Tx */
	/* Disable HW interrupts, NAPI and Tx */
	bnx2x_netif_stop(bp, 1);
	bnx2x_netif_stop(bp, 1);
	netif_carrier_off(bp->dev);


	del_timer_sync(&bp->timer);
	del_timer_sync(&bp->timer);
	SHMEM_WR(bp, func_mb[BP_FUNC(bp)].drv_pulse_mb,
	SHMEM_WR(bp, func_mb[BP_FUNC(bp)].drv_pulse_mb,
@@ -8524,8 +8525,6 @@ static int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode)


	bp->state = BNX2X_STATE_CLOSED;
	bp->state = BNX2X_STATE_CLOSED;


	netif_carrier_off(bp->dev);

	/* The last driver must disable a "close the gate" if there is no
	/* The last driver must disable a "close the gate" if there is no
	 * parity attention or "process kill" pending.
	 * parity attention or "process kill" pending.
	 */
	 */
@@ -13431,6 +13430,7 @@ static int bnx2x_eeh_nic_unload(struct bnx2x *bp)
	bp->rx_mode = BNX2X_RX_MODE_NONE;
	bp->rx_mode = BNX2X_RX_MODE_NONE;


	bnx2x_netif_stop(bp, 0);
	bnx2x_netif_stop(bp, 0);
	netif_carrier_off(bp->dev);


	del_timer_sync(&bp->timer);
	del_timer_sync(&bp->timer);
	bp->stats_state = STATS_STATE_DISABLED;
	bp->stats_state = STATS_STATE_DISABLED;
@@ -13457,8 +13457,6 @@ static int bnx2x_eeh_nic_unload(struct bnx2x *bp)


	bp->state = BNX2X_STATE_CLOSED;
	bp->state = BNX2X_STATE_CLOSED;


	netif_carrier_off(bp->dev);

	return 0;
	return 0;
}
}