net/mlx4_en: Fix panic on xmit while port is down
authorMoshe Shemesh <moshe@mellanox.com>
Sun, 11 Sep 2016 07:56:20 +0000 (10:56 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Sep 2016 02:40:26 +0000 (19:40 -0700)
commit7a61fc86af4a0c957c5b8c5777ab21d5cc286748
treef7908527ba24428c8426aae21a6343939b2795ae
parent564ed9b187082da79726a2f25bb88a58ebeec7e8
net/mlx4_en: Fix panic on xmit while port is down

When port is down, tx drop counter update is not needed.
Updating the counter in this case can cause a kernel
panic as when the port is down, ring can be NULL.

Fixes: 63a664b7e92b ("net/mlx4_en: fix tx_dropped bug")
Signed-off-by: Moshe Shemesh <moshe@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_tx.c