diff options
author | Greg Kroah-Hartman | 2020-03-10 08:12:46 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2020-03-10 08:12:46 +0100 |
commit | 8e567ed9e244f6af2ecfd22a7204612ec361d334 (patch) | |
tree | bf558612f56dcdd862ead3fefd1aa5abaac15688 /drivers/usb/dwc3 | |
parent | 6701adfa9693bd20b89f2cce57754ced2c18ed3b (diff) | |
parent | 2c523b344dfa65a3738e7039832044aa133c75fb (diff) |
Merge 5.6-rc5 into usb-next
We need the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 1b7d2f9cb673..1e00bf2d65a2 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1071,7 +1071,14 @@ static void dwc3_prepare_one_trb_sg(struct dwc3_ep *dep, unsigned int rem = length % maxp; unsigned chain = true; - if (sg_is_last(s)) + /* + * IOMMU driver is coalescing the list of sgs which shares a + * page boundary into one and giving it to USB driver. With + * this the number of sgs mapped is not equal to the number of + * sgs passed. So mark the chain bit to false if it isthe last + * mapped sg. + */ + if (i == remaining - 1) chain = false; if (rem && usb_endpoint_dir_out(dep->endpoint.desc) && !chain) { |