IB/qib: Fix QP check when looping back to/from QP1