aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/team/team.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/team/team.c')
-rw-r--r--drivers/net/team/team.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 87707ab39430..341b65dbbcd3 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -795,16 +795,17 @@ static void team_port_leave(struct team *team, struct team_port *port)
795} 795}
796 796
797#ifdef CONFIG_NET_POLL_CONTROLLER 797#ifdef CONFIG_NET_POLL_CONTROLLER
798static int team_port_enable_netpoll(struct team *team, struct team_port *port) 798static int team_port_enable_netpoll(struct team *team, struct team_port *port,
799 gfp_t gfp)
799{ 800{
800 struct netpoll *np; 801 struct netpoll *np;
801 int err; 802 int err;
802 803
803 np = kzalloc(sizeof(*np), GFP_KERNEL); 804 np = kzalloc(sizeof(*np), gfp);
804 if (!np) 805 if (!np)
805 return -ENOMEM; 806 return -ENOMEM;
806 807
807 err = __netpoll_setup(np, port->dev); 808 err = __netpoll_setup(np, port->dev, gfp);
808 if (err) { 809 if (err) {
809 kfree(np); 810 kfree(np);
810 return err; 811 return err;
@@ -833,7 +834,8 @@ static struct netpoll_info *team_netpoll_info(struct team *team)
833} 834}
834 835
835#else 836#else
836static int team_port_enable_netpoll(struct team *team, struct team_port *port) 837static int team_port_enable_netpoll(struct team *team, struct team_port *port,
838 gfp_t gfp)
837{ 839{
838 return 0; 840 return 0;
839} 841}
@@ -913,7 +915,7 @@ static int team_port_add(struct team *team, struct net_device *port_dev)
913 } 915 }
914 916
915 if (team_netpoll_info(team)) { 917 if (team_netpoll_info(team)) {
916 err = team_port_enable_netpoll(team, port); 918 err = team_port_enable_netpoll(team, port, GFP_KERNEL);
917 if (err) { 919 if (err) {
918 netdev_err(dev, "Failed to enable netpoll on device %s\n", 920 netdev_err(dev, "Failed to enable netpoll on device %s\n",
919 portname); 921 portname);
@@ -1443,7 +1445,7 @@ static void team_netpoll_cleanup(struct net_device *dev)
1443} 1445}
1444 1446
1445static int team_netpoll_setup(struct net_device *dev, 1447static int team_netpoll_setup(struct net_device *dev,
1446 struct netpoll_info *npifo) 1448 struct netpoll_info *npifo, gfp_t gfp)
1447{ 1449{
1448 struct team *team = netdev_priv(dev); 1450 struct team *team = netdev_priv(dev);
1449 struct team_port *port; 1451 struct team_port *port;
@@ -1451,7 +1453,7 @@ static int team_netpoll_setup(struct net_device *dev,
1451 1453
1452 mutex_lock(&team->lock); 1454 mutex_lock(&team->lock);
1453 list_for_each_entry(port, &team->port_list, list) { 1455 list_for_each_entry(port, &team->port_list, list) {
1454 err = team_port_enable_netpoll(team, port); 1456 err = team_port_enable_netpoll(team, port, gfp);
1455 if (err) { 1457 if (err) {
1456 __team_netpoll_cleanup(team); 1458 __team_netpoll_cleanup(team);
1457 break; 1459 break;