cxgbe/iw_cxgbe: correctly enforce the max reg_mr depth.
Reported by: Andrew Zhu @ Netapp Obtained from: Chelsio Communications MFC after: 1 week Sponsored by: Chelsio Communications
This commit is contained in:
parent
fbb890056e
commit
9a4a1be02c
@ -682,7 +682,7 @@ static int c4iw_set_page(struct ib_mr *ibmr, u64 addr)
|
||||
{
|
||||
struct c4iw_mr *mhp = to_c4iw_mr(ibmr);
|
||||
|
||||
if (unlikely(mhp->mpl_len == mhp->max_mpl_len))
|
||||
if (unlikely(mhp->mpl_len == mhp->attr.pbl_size))
|
||||
return -ENOMEM;
|
||||
|
||||
mhp->mpl[mhp->mpl_len++] = addr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user