net: mvpp2: do not sleep in set_rx_mode

This patch replaces GFP_KERNEL by GFP_ATOMIC to avoid sleeping in the
ndo_set_rx_mode() call which is called with BH disabled.

Fixes: 3f518509de ("ethernet: Add new driver for Marvell Armada 375 network unit")
Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Antoine Tenart 2017-10-24 11:41:28 +02:00 committed by David S. Miller
parent 20746d717e
commit 239dd4ee48

View File

@ -3396,7 +3396,7 @@ mvpp2_prs_mac_da_range_find(struct mvpp2 *priv, int pmap, const u8 *da,
struct mvpp2_prs_entry *pe; struct mvpp2_prs_entry *pe;
int tid; int tid;
pe = kzalloc(sizeof(*pe), GFP_KERNEL); pe = kzalloc(sizeof(*pe), GFP_ATOMIC);
if (!pe) if (!pe)
return NULL; return NULL;
mvpp2_prs_tcam_lu_set(pe, MVPP2_PRS_LU_MAC); mvpp2_prs_tcam_lu_set(pe, MVPP2_PRS_LU_MAC);
@ -3458,7 +3458,7 @@ static int mvpp2_prs_mac_da_accept(struct mvpp2 *priv, int port,
if (tid < 0) if (tid < 0)
return tid; return tid;
pe = kzalloc(sizeof(*pe), GFP_KERNEL); pe = kzalloc(sizeof(*pe), GFP_ATOMIC);
if (!pe) if (!pe)
return -ENOMEM; return -ENOMEM;
mvpp2_prs_tcam_lu_set(pe, MVPP2_PRS_LU_MAC); mvpp2_prs_tcam_lu_set(pe, MVPP2_PRS_LU_MAC);