From patchwork Mon Aug 13 15:27:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 1313661 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 EDE813FC81 for ; Mon, 13 Aug 2012 15:29:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753097Ab2HMP14 (ORCPT ); Mon, 13 Aug 2012 11:27:56 -0400 Received: from mail-ey0-f174.google.com ([209.85.215.174]:43254 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753041Ab2HMP1x (ORCPT ); Mon, 13 Aug 2012 11:27:53 -0400 Received: by mail-ey0-f174.google.com with SMTP id c11so1186780eaa.19 for ; Mon, 13 Aug 2012 08:27:53 -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=Zhdnb8OsyFQWN3huwSos9RhmLdy9E8K3nC4ivFUwmjA=; b=CaBmmEFsXqDWjTjABnLDsvbEsIKRoVPxQekDAEuVMNSonY+dkCF5+9LGab2vzL8t8m 8dIKXMD7BQIltyxLI33+axbsTe6iusMeD4m4BolAmKYPWXe2W93qXzGIT8ygVYU4t2On nvlqF86ORtu0zWiZfkosO4uCcNXZSzSPNUzWnJyGs2zgTrOO8kzqi303VnDVCI825Opp YAhF65lIw7q+EB4itn3yOsaVvh/dtH5j8YQRGvsgYnjaH27w0MqymY61tRE1G1NNamXS 05D3YLD81WT0VgUmH/mbuZaZYJwGRIzpoohoo96TlyLiyRXubC3Es2hzeb11E6u0CgNp o3gw== Received: by 10.14.216.198 with SMTP id g46mr1174373eep.32.1344871672690; Mon, 13 Aug 2012 08:27:52 -0700 (PDT) Received: from localhost (nat-pool-brq-t.redhat.com. [209.132.186.34]) by mx.google.com with ESMTPS id m45sm9184746eep.16.2012.08.13.08.27.51 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 13 Aug 2012 08:27:52 -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 12/16] nes: remove usage of dev->master Date: Mon, 13 Aug 2012 17:27:11 +0200 Message-Id: <1344871635-1052-13-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: ALoCoQlB6dsEcudTXPEb/TnfinsPsMpH7bLqjbzML+Ts+oqptYRIq6D6tCFz4QnO3d/8GkT5jfd0 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 7140199..e58e9af 100644 --- a/drivers/infiniband/hw/nes/nes.c +++ b/drivers/infiniband/hw/nes/nes.c @@ -140,6 +140,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; @@ -150,8 +151,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_unique_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" @@ -184,9 +186,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 020e95c..15e6340 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c @@ -1352,7 +1352,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_unique_upper_dev_get(nesvnic->netdev); else netdev = nesvnic->netdev;