From patchwork Wed Jan 2 12:28:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 1923411 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 88839DF25A for ; Wed, 2 Jan 2013 12:36:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752090Ab3ABMgF (ORCPT ); Wed, 2 Jan 2013 07:36:05 -0500 Received: from mail-ee0-f42.google.com ([74.125.83.42]:58296 "EHLO mail-ee0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752667Ab3ABMgD (ORCPT ); Wed, 2 Jan 2013 07:36:03 -0500 X-Greylist: delayed 398 seconds by postgrey-1.27 at vger.kernel.org; Wed, 02 Jan 2013 07:36:02 EST Received: by mail-ee0-f42.google.com with SMTP id c41so7074649eek.29 for ; Wed, 02 Jan 2013 04:36:01 -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=YqJAK7gZhQNAcUL2zMXjJTVM4sWOh7ik/HweGvQo518=; b=EUHVbglYsrH2kD8hEpfPQV62xwEQhpQ2bh6QAuEDRZT4ld4xCs7U/iRW4NiTu911zi C1mghJa+gmCQQFBw1nax3jM7eYDvzxbb5sJZrvATyx1Yuj9LZ+fPejRtdtzzJTGTAbPU jZiRt5kYJrc+8VtCWb5Nh4O/Wcn4jiywBkJHFMWzGr8fB+vdWAuEBa0ppBSp2Nph7jA1 rCzjEN5lUfpkssWk2G32jtbeSrVb3pS8jASb8gvFwoBAg8n5lCr8Kxcrx06C1UhfcpnN whb3XaFftcsrg7BJG/zIkLLDsB2oIwKpSCm3FX9cCb4k9DNq7XhNWSJMbfPKjArVxPjz mF0g== X-Received: by 10.14.184.134 with SMTP id s6mr124363907eem.43.1357129763840; Wed, 02 Jan 2013 04:29:23 -0800 (PST) Received: from localhost (sun-0.pirko.cz. [84.16.102.25]) by mx.google.com with ESMTPS id b49sm97357390eem.16.2013.01.02.04.29.21 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 Jan 2013 04:29:23 -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 12/15] nes: remove usage of dev->master Date: Wed, 2 Jan 2013 13:28:33 +0100 Message-Id: <1357129716-2450-13-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: ALoCoQnvwf5SiTAhiKW0eYI/yGWcPzBowOlhZUr+t+A1jTA5kOva9seAn2hLXy+LhksBVHJRADha 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/infiniband/hw/nes/nes.c | 8 +++++--- drivers/infiniband/hw/nes/nes_cm.c | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/hw/nes/nes.c b/drivers/infiniband/hw/nes/nes.c index 748db2d..d129c36 100644 --- a/drivers/infiniband/hw/nes/nes.c +++ b/drivers/infiniband/hw/nes/nes.c @@ -135,6 +135,7 @@ static int nes_inetaddr_event(struct notifier_block *notifier, struct net_device *event_netdev = ifa->ifa_dev->dev; struct nes_device *nesdev; struct net_device *netdev; + struct net_device *upper_dev; struct nes_vnic *nesvnic; unsigned int is_bonded; @@ -145,8 +146,9 @@ static int nes_inetaddr_event(struct notifier_block *notifier, nesdev, nesdev->netdev[0]->name); netdev = nesdev->netdev[0]; nesvnic = netdev_priv(netdev); + upper_dev = netdev_master_upper_dev_get(netdev); is_bonded = netif_is_bond_slave(netdev) && - (netdev->master == event_netdev); + (upper_dev == event_netdev); if ((netdev == event_netdev) || is_bonded) { if (nesvnic->rdma_enabled == 0) { nes_debug(NES_DBG_NETDEV, "Returning without processing event for %s since" @@ -179,9 +181,9 @@ static int nes_inetaddr_event(struct notifier_block *notifier, /* fall through */ case NETDEV_CHANGEADDR: /* Add the address to the IP table */ - if (netdev->master) + if (upper_dev) nesvnic->local_ipaddr = - ((struct in_device *)netdev->master->ip_ptr)->ifa_list->ifa_address; + ((struct in_device *)upper_dev->ip_ptr)->ifa_list->ifa_address; else nesvnic->local_ipaddr = ifa->ifa_address; diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c index 22ea67e..24b9f1a 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c @@ -1340,7 +1340,7 @@ static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip, int arpi } if (netif_is_bond_slave(nesvnic->netdev)) - netdev = nesvnic->netdev->master; + netdev = netdev_master_upper_dev_get(nesvnic->netdev); else netdev = nesvnic->netdev;