IB/mlx4: Fix port returned from query QP for QPs in INIT state
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Wed, 18 Jul 2007 01:37:38 +0000 (18:37 -0700)
committerRoland Dreier <rolandd@cisco.com>
Wed, 18 Jul 2007 01:37:38 +0000 (18:37 -0700)
commit1c27cb71aa7d86df0271caadfcc196a0518f5e33
tree57f80f30c38fe8040944a6bad3c214db0cbe2f04
parent586bb586ae59c473393c09291e86042d263c3ddd
IB/mlx4: Fix port returned from query QP for QPs in INIT state

When a QP is in the INIT state, the sched_queue field hasn't been given
to the firmware yet, so the firmware cannot return the value when the QP
is queried.  To handle this, use the port number that is saved in the
driver's QP data structure.

Found by Dotan Barak and Yaron Gepstein of Mellanox.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/mlx4/qp.c