iw_cxgb4: limit IRD/ORD advertised to ULP by device max.
authorSteve Wise <swise@opengridcomputing.com>
Fri, 19 Aug 2016 14:29:07 +0000 (07:29 -0700)
committerDoug Ledford <dledford@redhat.com>
Mon, 22 Aug 2016 19:00:42 +0000 (15:00 -0400)
commit7f446abf12d741f4e29f00c633cb5fa67c2eee71
treed87ade4c085e68b3529cfded8545b45a9d655aec
parente0cf75deab8155334c8228eb7f097b15127d0a49
iw_cxgb4: limit IRD/ORD advertised to ULP by device max.

The i40iw initiator sends an MPA-request with ird = 63, ord = 63. The
cxgb4 responder sends a RST.  Since the inbound ord=63 and it exceeds
the max_ird/c4iw_max_read_depth (=32 default), chelsio decides to abort.

Instead, cxgb4 should adjust the ord/ird down before presenting it to
the ULP.

Reported-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/cxgb4/cm.c