From patchwork Mon Aug 13 15:27:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 1313801 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 0E31CDF223 for ; Mon, 13 Aug 2012 15:31:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751364Ab2HMPbh (ORCPT ); Mon, 13 Aug 2012 11:31:37 -0400 Received: from mail-ee0-f46.google.com ([74.125.83.46]:55454 "EHLO mail-ee0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752480Ab2HMP1d (ORCPT ); Mon, 13 Aug 2012 11:27:33 -0400 Received: by mail-ee0-f46.google.com with SMTP id l10so1192511eei.19 for ; Mon, 13 Aug 2012 08:27:33 -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=kKkurp8SD9pOTL2gz5COQOKevns2VWGW/4TaElC+n9Y=; b=R56LFFAZlX+ZEzcCj/6kyMzaXucZexl624PJxTDy5tw6+P0PO9GzZKLQ922O0E6CV3 r/X4Hqp6L6kJVHB/IvpsDrL8Cbq9W8QIlVaWE0OnddxyUvSWKQDKBzqapbm6+OghaQ2K KobioKhTswKkJnlSILSOaZc7aZs/Havz+Q2akpM7RM2RIIDWcqsezD7vE8Y/ut98WCxf 1mTNuxflLCajYuIZldJcNHTztlW19tN+rxchKgmrY8JhGp6dg0f/3WocpGqOGILfqvq7 kJZ/w4ZHaQGd/oFml6JgjtCWH7OSu0cYLXOIYdd4wRdxUS5Jy5017M5HEmT6olAxqdmL XRag== Received: by 10.14.216.198 with SMTP id g46mr1172997eep.32.1344871653151; Mon, 13 Aug 2012 08:27:33 -0700 (PDT) Received: from localhost (nat-pool-brq-t.redhat.com. [209.132.186.34]) by mx.google.com with ESMTPS id 45sm19813920eed.17.2012.08.13.08.27.31 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 13 Aug 2012 08:27:32 -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 05/16] team: remove usage of netdev_set_master() Date: Mon, 13 Aug 2012 17:27:04 +0200 Message-Id: <1344871635-1052-6-git-send-email-jiri@resnulli.us> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1344871635-1052-1-git-send-email-jiri@resnulli.us> References: <1344871635-1052-1-git-send-email-jiri@resnulli.us> X-Gm-Message-State: ALoCoQkSTQfAAaSEUteGQGrlMPDbxI1uvAKjO033xwbLxBOJgzIlPwHSK5NtzIpsezdCTl8rjMVV 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..0533cbf 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_unique_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);