mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
Merge "usb: dwc3: gadget: Update chain bit correctly when using sg list"
This commit is contained in:
commit
4ac4ea5987
1 changed files with 8 additions and 1 deletions
|
|
@ -1062,7 +1062,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 clubbing the list of sgs which shares a page
|
||||
* boundary into one and giving it to USB driver. With this the
|
||||
* number of sgs mapped it not equal to the the number of sgs
|
||||
* passed. Mark the chain bit to false if it is the last mapped
|
||||
* sg.
|
||||
*/
|
||||
if (sg_is_last(s) || (i == remaining - 1))
|
||||
chain = false;
|
||||
|
||||
if (rem && usb_endpoint_dir_out(dep->endpoint.desc) && !chain) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue