mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
usb: dwc3: gadget: Correct the logic for queuing sgs
The present code correctly fetches the req which were previously not queued from the started_list but fails to continue queuing from the sg where it previously stopped queuing (because of the unavailable TRB's). This patch correct's the code to continue queuing from the correct sg present in the sglist. For example, consider 5 sgs in req. Because of limited TRB's among the 5 sgs only 3 got queued. This patch corrects the code to start queuing from correct sg i.e 4th sg when the TRBs are available. Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
This commit is contained in:
parent
a31e63b608
commit
c96e6725db
2 changed files with 22 additions and 3 deletions
|
@ -834,6 +834,7 @@ struct dwc3_hwparams {
|
|||
* @sg: pointer to first incomplete sg
|
||||
* @start_sg: pointer to the sg which should be queued next
|
||||
* @num_pending_sgs: counter to pending sgs
|
||||
* @num_queued_sgs: counter to the number of sgs which already got queued
|
||||
* @remaining: amount of data remaining
|
||||
* @epnum: endpoint number to which this request refers
|
||||
* @trb: pointer to struct dwc3_trb
|
||||
|
@ -852,6 +853,7 @@ struct dwc3_request {
|
|||
struct scatterlist *start_sg;
|
||||
|
||||
unsigned num_pending_sgs;
|
||||
unsigned int num_queued_sgs;
|
||||
unsigned remaining;
|
||||
u8 epnum;
|
||||
struct dwc3_trb *trb;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue