aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/team
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-08-22 17:21:38 -0400
committerDavid S. Miller <davem@davemloft.net>2012-08-22 17:21:38 -0400
commit1304a7343b30fc4f16045412efdbb4179a3d9255 (patch)
tree83d667ac4f62e30f70305ce4cc7e030e3465f92e /drivers/net/team
parent1d76efe1577b4323609b1bcbfafa8b731eda071a (diff)
parent23dcfa61bac244e1200ff9ad19c6e9144dcb6bb5 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers/net/team')
-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 bc36d13c2675..c8a3f108dc94 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -913,16 +913,17 @@ static void team_port_leave(struct team *team, struct team_port *port)
913} 913}
914 914
915#ifdef CONFIG_NET_POLL_CONTROLLER 915#ifdef CONFIG_NET_POLL_CONTROLLER
916static int team_port_enable_netpoll(struct team *team, struct team_port *port) 916static int team_port_enable_netpoll(struct team *team, struct team_port *port,
917 gfp_t gfp)
917{ 918{
918 struct netpoll *np; 919 struct netpoll *np;
919 int err; 920 int err;
920 921
921 np = kzalloc(sizeof(*np), GFP_KERNEL); 922 np = kzalloc(sizeof(*np), gfp);
922 if (!np) 923 if (!np)
923 return -ENOMEM; 924 return -ENOMEM;
924 925
925 err = __netpoll_setup(np, port->dev); 926 err = __netpoll_setup(np, port->dev, gfp);
926 if (err) { 927 if (err) {
927 kfree(np); 928 kfree(np);
928 return err; 929 return err;
@@ -951,7 +952,8 @@ static struct netpoll_info *team_netpoll_info(struct team *team)
951} 952}
952 953
953#else 954#else
954static int team_port_enable_netpoll(struct team *team, struct team_port *port) 955static int team_port_enable_netpoll(struct team *team, struct team_port *port,
956 gfp_t gfp)
955{ 957{
956 return 0; 958 return 0;
957} 959}
@@ -1037,7 +1039,7 @@ static int team_port_add(struct team *team, struct net_device *port_dev)
1037 } 1039 }
1038 1040
1039 if (team_netpoll_info(team)) { 1041 if (team_netpoll_info(team)) {
1040 err = team_port_enable_netpoll(team, port); 1042 err = team_port_enable_netpoll(team, port, GFP_KERNEL);
1041 if (err) { 1043 if (err) {
1042 netdev_err(dev, "Failed to enable netpoll on device %s\n", 1044 netdev_err(dev, "Failed to enable netpoll on device %s\n",
1043 portname); 1045 portname);
@@ -1633,7 +1635,7 @@ static void team_netpoll_cleanup(struct net_device *dev)
1633} 1635}
1634 1636
1635static int team_netpoll_setup(struct net_device *dev, 1637static int team_netpoll_setup(struct net_device *dev,
1636 struct netpoll_info *npifo) 1638 struct netpoll_info *npifo, gfp_t gfp)
1637{ 1639{
1638 struct team *team = netdev_priv(dev); 1640 struct team *team = netdev_priv(dev);
1639 struct team_port *port; 1641 struct team_port *port;
@@ -1641,7 +1643,7 @@ static int team_netpoll_setup(struct net_device *dev,
1641 1643
1642 mutex_lock(&team->lock); 1644 mutex_lock(&team->lock);
1643 list_for_each_entry(port, &team->port_list, list) { 1645 list_for_each_entry(port, &team->port_list, list) {
1644 err = team_port_enable_netpoll(team, port); 1646 err = team_port_enable_netpoll(team, port, gfp);
1645 if (err) { 1647 if (err) {
1646 __team_netpoll_cleanup(team); 1648 __team_netpoll_cleanup(team);
1647 break; 1649 break;