Commit c02d481c authored by Jack Pham's avatar Jack Pham
Browse files

usb: smd: Always call smd_close upon cable disconnect



During subsystem restart, SMD_EVENT_CLOSE is sent via callback,
which the DUN and RMNET control modules mistakenly interpret as the
channel being closed automatically. This causes a problem when the
modem comes back online and notifies via SMD_EVENT_OPEN: the gadget
driver now has a handle to an open SMD channel even without a USB
connection. Then when the USB cable is reconnected, due to disconnect
being called first, it accidentally closes the re-opened channel,
causing the following smd_open() to fail because it is busy being
closed.

Instead, simply always call smd_close() on actual disconnect,
so that the subsequent connect will successfully be able to open the
channel.

CRs-fixed: 327710
Change-Id: Ia7b3e52638f9bdc96c083cb16e0231e7af7ff884
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent 240fc0f5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment