RDMA/srp: Honor the max_send_sge device attribute
authorBart Van Assche <bvanassche@acm.org>
Mon, 30 Sep 2019 23:16:59 +0000 (16:16 -0700)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 4 Oct 2019 18:35:06 +0000 (15:35 -0300)
commitbf583470617e31c836afc4fa2039dabc43350533
treede3b2a9f63c44221a19e26fb6c36dc6620761827
parent14673778d06ee551a55695947548b52d503e7273
RDMA/srp: Honor the max_send_sge device attribute

Instead of assuming that max_send_sge >= 3, restrict the number of scatter
gather elements to what is supported by the RDMA adapter.

Link: https://lore.kernel.org/r/20190930231707.48259-8-bvanassche@acm.org
Cc: Honggang LI <honli@redhat.com>
Cc: Laurence Oberman <loberman@redhat.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/ulp/srp/ib_srp.c
drivers/infiniband/ulp/srp/ib_srp.h