From patchwork Wed Jan 2 12:28:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 1923321 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id D285C3FE37 for ; Wed, 2 Jan 2013 12:31:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752797Ab3ABMbr (ORCPT ); Wed, 2 Jan 2013 07:31:47 -0500 Received: from mail-ea0-f182.google.com ([209.85.215.182]:51656 "EHLO mail-ea0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752754Ab3ABM3B (ORCPT ); Wed, 2 Jan 2013 07:29:01 -0500 Received: by mail-ea0-f182.google.com with SMTP id a14so5909537eaa.41 for ; Wed, 02 Jan 2013 04:29:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=SVQufaUaKAKE98bP84GYp7wFiNNWdUqb7eHW/ofAWBw=; b=GY+vz6ZGPbzFgk4z2qjlmvluxN1B/EM/Y0MnGEyHg2hLYLysvId0xrONQbXG2iHO+y y/D6ih55a2T+kVCxTH2XZgfiK50w0B5C/rQm1U6vFh1fsThoQO5yjHMhlFxx9onhBON3 xSw3q7UMWyvvOvTx7l2atljH53/pqQrhwyk86HmyW/JN83Rvy74Ix0V6yKxQ2DpDzsso FD2tMuISnSHAAEfIuMnM6GWVEM+ZdSU7LBhNFclWIsuQ+M9uVoq2oO/LQDa94n8Kfx2Y VlPADA8jjL8csSMDEXThXRlkjmpMMKMKd/H75Bs9jV4Mcm0zv/nsstfrHilkhumnxXvK 4nNA== X-Received: by 10.14.203.2 with SMTP id e2mr124733234eeo.20.1357129740028; Wed, 02 Jan 2013 04:29:00 -0800 (PST) Received: from localhost (sun-0.pirko.cz. [84.16.102.25]) by mx.google.com with ESMTPS id v46sm97210987eep.1.2013.01.02.04.28.57 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 Jan 2013 04:28:59 -0800 (PST) From: Jiri Pirko To: netdev@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, faisal.latif@intel.com, roland@kernel.org, sean.hefty@intel.com, hal.rosenstock@gmail.com, fubar@us.ibm.com, andy@greyhouse.net, divy@chelsio.com, jitendra.kalsaria@qlogic.com, sony.chacko@qlogic.com, linux-driver@qlogic.com, kaber@trash.net, ursula.braun@de.ibm.com, blaschka@linux.vnet.ibm.com, linux390@de.ibm.com, shemminger@vyatta.com, bhutchings@solarflare.com, therbert@google.com, xiyou.wangcong@gmail.com, joe@perches.com, gregory.v.rose@intel.com, john.r.fastabend@intel.com, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, bridge@lists.linux-foundation.org, fbl@redhat.com Subject: [patch net-next V5 05/15] team: remove usage of netdev_set_master() Date: Wed, 2 Jan 2013 13:28:26 +0100 Message-Id: <1357129716-2450-6-git-send-email-jiri@resnulli.us> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1357129716-2450-1-git-send-email-jiri@resnulli.us> References: <1357129716-2450-1-git-send-email-jiri@resnulli.us> X-Gm-Message-State: ALoCoQnZ2TJuvkNe1XhpPq0ET1G4G9BWafCPcH/Nvm2GfA50R6p+Vl62qleSO8H0Px6fdZgFp+UU Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Signed-off-by: Jiri Pirko --- drivers/net/team/team.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c index 918a901..3df5cc1 100644 --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c @@ -1055,10 +1055,11 @@ static int team_port_add(struct team *team, struct net_device *port_dev) } } - err = netdev_set_master(port_dev, dev); + err = netdev_master_upper_dev_link(port_dev, dev); if (err) { - netdev_err(dev, "Device %s failed to set master\n", portname); - goto err_set_master; + netdev_err(dev, "Device %s failed to set upper link\n", + portname); + goto err_set_upper_link; } err = netdev_rx_handler_register(port_dev, team_handle_frame, @@ -1091,9 +1092,9 @@ err_option_port_add: netdev_rx_handler_unregister(port_dev); err_handler_register: - netdev_set_master(port_dev, NULL); + netdev_upper_dev_unlink(port_dev, dev); -err_set_master: +err_set_upper_link: team_port_disable_netpoll(port); err_enable_netpoll: @@ -1137,7 +1138,7 @@ static int team_port_del(struct team *team, struct net_device *port_dev) team_port_disable(team, port); list_del_rcu(&port->list); netdev_rx_handler_unregister(port_dev); - netdev_set_master(port_dev, NULL); + netdev_upper_dev_unlink(port_dev, dev); team_port_disable_netpoll(port); vlan_vids_del_by_dev(port_dev, dev); dev_close(port_dev);