aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-24 20:06:01 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-24 20:06:01 -0400
commitd7757be133cc05620608af46acd178686681b7ef (patch)
tree32f68fd9d1fc58337a74c75db3e29790df219f67 /drivers/infiniband/ulp
parent94e0fb086fc5663c38bbc0fe86d698be8314f82f (diff)
parent216c7f92b9ca7766600a3a04b9dda445a9217832 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: IPoIB: Don't turn on carrier for a non-active port IB/mthca: Fix access to freed memory in catastrophic event handling mlx4_core: Pass cache line size to device FW RDMA/nes: Remove duplicate .ndo_set_mac_address field initialization IB/mad: Fix lock-lock-timer deadlock in RMPP code
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_multicast.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
index 25874fc680c9..8763c1ea5eb4 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
@@ -362,12 +362,19 @@ void ipoib_mcast_carrier_on_task(struct work_struct *work)
362{ 362{
363 struct ipoib_dev_priv *priv = container_of(work, struct ipoib_dev_priv, 363 struct ipoib_dev_priv *priv = container_of(work, struct ipoib_dev_priv,
364 carrier_on_task); 364 carrier_on_task);
365 struct ib_port_attr attr;
365 366
366 /* 367 /*
367 * Take rtnl_lock to avoid racing with ipoib_stop() and 368 * Take rtnl_lock to avoid racing with ipoib_stop() and
368 * turning the carrier back on while a device is being 369 * turning the carrier back on while a device is being
369 * removed. 370 * removed.
370 */ 371 */
372 if (ib_query_port(priv->ca, priv->port, &attr) ||
373 attr.state != IB_PORT_ACTIVE) {
374 ipoib_dbg(priv, "Keeping carrier off until IB port is active\n");
375 return;
376 }
377
371 rtnl_lock(); 378 rtnl_lock();
372 netif_carrier_on(priv->dev); 379 netif_carrier_on(priv->dev);
373 rtnl_unlock(); 380 rtnl_unlock();