diff options
author | Chien Tung <chien.tin.tung@intel.com> | 2010-08-23 10:32:36 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2010-10-06 15:59:56 -0400 |
commit | 293277215636e1586fcf6386b0b64457c6dfdb68 (patch) | |
tree | 31837c6cec03965445c3ae78595b501f88bfef61 | |
parent | 4d8d6389b26d8bee06cd706caf1fd3f1ccaa0205 (diff) |
RDMA/nes: Report correct port state if interface is down
With commit cd6860eb ("RDMA/nes: Fix hangs on ifdown") we no longer
remove nes interfaces on ifdown. On nes_query_port(), add an
additional check of the netdev queue and report IB_PORT_DOWN if the
queue is not running.
Signed-off-by: Chien Tung <chien.tin.tung@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r-- | drivers/infiniband/hw/nes/nes_verbs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c index b89972c6a357..2374efbdda6b 100644 --- a/drivers/infiniband/hw/nes/nes_verbs.c +++ b/drivers/infiniband/hw/nes/nes_verbs.c | |||
@@ -584,7 +584,9 @@ static int nes_query_port(struct ib_device *ibdev, u8 port, struct ib_port_attr | |||
584 | props->lmc = 0; | 584 | props->lmc = 0; |
585 | props->sm_lid = 0; | 585 | props->sm_lid = 0; |
586 | props->sm_sl = 0; | 586 | props->sm_sl = 0; |
587 | if (nesvnic->linkup) | 587 | if (netif_queue_stopped(netdev)) |
588 | props->state = IB_PORT_DOWN; | ||
589 | else if (nesvnic->linkup) | ||
588 | props->state = IB_PORT_ACTIVE; | 590 | props->state = IB_PORT_ACTIVE; |
589 | else | 591 | else |
590 | props->state = IB_PORT_DOWN; | 592 | props->state = IB_PORT_DOWN; |