Skip to content

Commit

Permalink
RDMA/nes: Report correct port state if interface is down
Browse files Browse the repository at this point in the history
With commit cd6860e ("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>
  • Loading branch information
Chien Tung authored and Roland Dreier committed Oct 6, 2010
1 parent 4d8d638 commit 2932772
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/infiniband/hw/nes/nes_verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,9 @@ static int nes_query_port(struct ib_device *ibdev, u8 port, struct ib_port_attr
props->lmc = 0;
props->sm_lid = 0;
props->sm_sl = 0;
if (nesvnic->linkup)
if (netif_queue_stopped(netdev))
props->state = IB_PORT_DOWN;
else if (nesvnic->linkup)
props->state = IB_PORT_ACTIVE;
else
props->state = IB_PORT_DOWN;
Expand Down

0 comments on commit 2932772

Please sign in to comment.