aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/cxgb3/iwch_provider.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-11-14 08:38:28 -0500
committerTakashi Iwai <tiwai@suse.de>2009-11-14 08:38:28 -0500
commit0c3c35e148dbc03106038dd25816fb9f3a084d86 (patch)
tree8b8cc6a027353a0f242f61362b35b0942da61b83 /drivers/infiniband/hw/cxgb3/iwch_provider.c
parent50d40f187f9182ee8caa1b83f80a0e11e2226baa (diff)
parent5e08fe570c2dbabb5015c37049eb9a451e55c890 (diff)
Merge branch 'fix/misc' into topic/misc
Diffstat (limited to 'drivers/infiniband/hw/cxgb3/iwch_provider.c')
-rw-r--r--drivers/infiniband/hw/cxgb3/iwch_provider.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c
index 6895523779d..ed7175549eb 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_provider.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c
@@ -37,6 +37,7 @@
37#include <linux/delay.h> 37#include <linux/delay.h>
38#include <linux/errno.h> 38#include <linux/errno.h>
39#include <linux/list.h> 39#include <linux/list.h>
40#include <linux/sched.h>
40#include <linux/spinlock.h> 41#include <linux/spinlock.h>
41#include <linux/ethtool.h> 42#include <linux/ethtool.h>
42#include <linux/rtnetlink.h> 43#include <linux/rtnetlink.h>
@@ -1199,11 +1200,14 @@ static int iwch_query_port(struct ib_device *ibdev,
1199 props->state = IB_PORT_DOWN; 1200 props->state = IB_PORT_DOWN;
1200 else { 1201 else {
1201 inetdev = in_dev_get(netdev); 1202 inetdev = in_dev_get(netdev);
1202 if (inetdev->ifa_list) 1203 if (inetdev) {
1203 props->state = IB_PORT_ACTIVE; 1204 if (inetdev->ifa_list)
1204 else 1205 props->state = IB_PORT_ACTIVE;
1206 else
1207 props->state = IB_PORT_INIT;
1208 in_dev_put(inetdev);
1209 } else
1205 props->state = IB_PORT_INIT; 1210 props->state = IB_PORT_INIT;
1206 in_dev_put(inetdev);
1207 } 1211 }
1208 1212
1209 props->port_cap_flags = 1213 props->port_cap_flags =