usb: cdns3: gadget: using correct sg operations
authorPeter Chen <peter.chen@nxp.com>
Thu, 10 Sep 2020 09:11:23 +0000 (17:11 +0800)
committerFelipe Balbi <balbi@kernel.org>
Fri, 2 Oct 2020 06:57:45 +0000 (09:57 +0300)
commitabc6b579048e2084ea28c677dd11106d67fe8498
treeaeb73ba0accfa3a31d0da5939290f68d25bdb2f6
parent31b5de5f3799a6d1656c0ed3f9ec2c8432eeaeac
usb: cdns3: gadget: using correct sg operations

It needs to use request->num_mapped_sgs to indicate mapped sg number,
the request->num_sgs is the sg number before the mapping. These two
entries have different values for the platforms which iommu or
swiotlb is used. Besides, it needs to use correct sg APIs for
mapped sg list for TRB assignment.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
drivers/usb/cdns3/gadget.c