IB/mthca: Fix corner cases in max_rd_atomic value handling in modify QP