From patchwork Tue Aug 14 15:05:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 1321001 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 2A8FC40211 for ; Tue, 14 Aug 2012 15:11:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756544Ab2HNPGO (ORCPT ); Tue, 14 Aug 2012 11:06:14 -0400 Received: from mail-ey0-f174.google.com ([209.85.215.174]:40617 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756546Ab2HNPGL (ORCPT ); Tue, 14 Aug 2012 11:06:11 -0400 Received: by mail-ey0-f174.google.com with SMTP id c11so194844eaa.19 for ; Tue, 14 Aug 2012 08:06:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=MwKaBmNsTEztUbb/oc9p9ed5d0I2idHfTfyZPTA7y2I=; b=RDc6u5wBjto76M5t0BPNx8DLs4+E8IkJMoYtcdXyPaaW9JSayvkgkgdlDSIODNq5KF kirQftuWfpoiKXS6/AI252x3achMz3msLSP9Uc9aLSBMvnoVVv+ZSiaM30C+8qBWaqTw Zoun2AIooesxFcKcYDrl+N0Ji6QmiCrrFJwz02CXWDwAIV0Sti+PnDaZwFMGBe2AFotu wxtcmi5+pRLN41TcW0FgLsYJkCk3zJGpg2EPClEisI+bgQyihdRlvbB1blQi8WpqU6yp Y04PMWbDCm4wiWb45qvkctkWB1yRII1pXguhqPhhcAJZk7674eXl2BZ8iXy8VpZJvo2T 2tzQ== Received: by 10.14.204.72 with SMTP id g48mr19870538eeo.45.1344956770392; Tue, 14 Aug 2012 08:06:10 -0700 (PDT) Received: from localhost (nat-pool-brq-t.redhat.com. [209.132.186.34]) by mx.google.com with ESMTPS id u8sm7578733eel.11.2012.08.14.08.06.09 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 14 Aug 2012 08:06:09 -0700 (PDT) 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 v2 05/15] team: remove usage of netdev_set_master() Date: Tue, 14 Aug 2012 17:05:38 +0200 Message-Id: <1344956748-2099-6-git-send-email-jiri@resnulli.us> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1344956748-2099-1-git-send-email-jiri@resnulli.us> References: <1344956748-2099-1-git-send-email-jiri@resnulli.us> X-Gm-Message-State: ALoCoQk5g7OJV4zhioRZe/AMIsX4B2qJsN8x/aB7T0bX3t3FBuLKFxq4peo3vf+bwEBLKofG8wXf 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 ba10c46..dabddc5 100644 --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c @@ -1040,10 +1040,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, @@ -1076,9 +1077,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: @@ -1121,7 +1122,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);