ib_srpt: Fix ch->max_sge calculation

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7410 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2018-07-10 04:14:38 +00:00
parent b2416e0f49
commit ff6864620b

View File

@@ -2244,7 +2244,7 @@ retry:
*/
ch->max_sge = sdev->dev_attr.max_sge -
min(max_sge_delta,
max_t(unsigned int, 0,
max_t(int, 0,
sdev->dev_attr.max_sge - max_sge_delta));
qp_init->cap.max_send_sge = ch->max_sge;
qp_init->cap.max_recv_sge = ch->max_sge;