Loading
usb: u_bam_data: Reset DBM only if USB request was dequeued
When using USB DBM for Bam2Bam mode, if usb_req is dequeued
as part of bus suspend then corresponding DBM EP should also
be reset along with USB BAM and IPA pipe resets.
USB BAM driver takes care of resetting BAM pipes at the end
of suspend routine after USB_CONS is released. But, in case
where USB BUS is resumed before usb_bam could finish suspend
there is a possbility that usb_bam doesn't dequeued the IN
usb_req and it doesn't reset pipes as well. But, u_bam_data
driver unaware of this still resets DBM EP on resume which
results in DATA stall. Fix this by adding a check to perform
DBM reset only if usb_request was dequeued. This would ensure
that as part of following usb_bam_resume pipes would also be
reset.
CRs-fixed: 779200
Change-Id: I78ff8feac27883fb53705025785113708863bbd2
Signed-off-by:
Manu Gautam <mgautam@codeaurora.org>