mirror of
https://github.com/LineageOS/android_kernel_samsung_msm8226.git
synced 2026-09-29 00:00:25 +02:00
MDM control bridge driver unlinks the pending URBs when control bridge gets closed as a result of usb cable disconnect. Driver sends set_control_line_state request to MDM upon bridge close. Right after sending the setup request driver unlinks the pending URBs. In case if the URB is unlinked after setup stage is completed, status stage remains pending. This results in a control transfer stall. Similarly, when the bridge is reopened as a result of USB cable plug-in, the interrupt URB is not resubmitted, which can also lead to a QMI stall since the MDM is waiting indefinitely to send its response available notification. Fix these two potential stall conditions by not unlinking URBs upon cable disconnect; this will allow in-progress control transfers to finish gracefully and will also allow notification interrupts to always be handled. Unlinking of the URBs will happen during MDM device disconnect, instead of upon bridge close. CRs-Fixed: 419128,418478 Change-Id: I81690b2fd9e56b8f05a14945b0063080ca6dbd7b Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>