[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1344871635-1052-9-git-send-email-jiri@resnulli.us>
Date: Mon, 13 Aug 2012 17:27:07 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, edumazet@...gle.com, faisal.latif@...el.com,
roland@...nel.org, sean.hefty@...el.com, hal.rosenstock@...il.com,
fubar@...ibm.com, andy@...yhouse.net, divy@...lsio.com,
jitendra.kalsaria@...gic.com, sony.chacko@...gic.com,
linux-driver@...gic.com, kaber@...sh.net, ursula.braun@...ibm.com,
blaschka@...ux.vnet.ibm.com, linux390@...ibm.com,
shemminger@...tta.com, bhutchings@...arflare.com,
therbert@...gle.com, xiyou.wangcong@...il.com, joe@...ches.com,
gregory.v.rose@...el.com, john.r.fastabend@...el.com,
linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-s390@...r.kernel.org, bridge@...ts.linux-foundation.org,
fbl@...hat.com
Subject: [patch net-next 08/16] cxgb3: remove usage of dev->master
Signed-off-by: Jiri Pirko <jiri@...nulli.us>
---
drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c
index 2dbbcbb..28365db 100644
--- a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c
+++ b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c
@@ -182,14 +182,17 @@ static struct net_device *get_iff_from_mac(struct adapter *adapter,
struct net_device *dev = adapter->port[i];
if (!memcmp(dev->dev_addr, mac, ETH_ALEN)) {
+ rcu_read_lock();
if (vlan && vlan != VLAN_VID_MASK) {
- rcu_read_lock();
dev = __vlan_find_dev_deep(dev, vlan);
- rcu_read_unlock();
} else if (netif_is_bond_slave(dev)) {
- while (dev->master)
- dev = dev->master;
+ struct net_device *upper_dev;
+
+ while ((upper_dev =
+ netdev_unique_upper_dev_get_rcu(dev)))
+ dev = upper_dev;
}
+ rcu_read_unlock();
return dev;
}
}
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists