• Felipe Balbi's avatar
    usb: dwc3: fix TRB completion when multiple TRBs are started · 0b93a4c8
    Felipe Balbi authored
    After commit 2ec2a8be (usb: dwc3: gadget:
    always enable IOC on bulk/interrupt transfers)
    we created a situation where it was possible to
    hang a bulk/interrupt endpoint if we had more
    than one pending request in our queue and they
    were both started with a single Start Transfer
    command.
    
    The problems triggers because we had not enabled
    Transfer In Progress event for those endpoints
    and we were not able to process early giveback
    of requests completed without LST bit set.
    
    Fix the problem by finally enabling Xfer In Progress
    event for all endpoint types, except control.
    
    Fixes: 2ec2a8be (usb: dwc3: gadget: always
    	enable IOC on bulk/interrupt transfers)
    Cc: <stable@vger.kernel.org> # v3.14+
    Reported-by: default avatarPratyush Anand <pratyush.anand@st.com>
    Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
    0b93a4c8
gadget.c 69.6 KB