USB: rndis: Free the rndis response queue during REMOTE_NDIS_RESET_MSG
authorxerox_lin <xerox_lin@htc.com>
Mon, 18 Aug 2014 13:54:23 +0000 (21:54 +0800)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 16 Feb 2016 21:52:02 +0000 (13:52 -0800)
commitc996cdd384f0afeb5cc0c110913391582d1d8fc0
treef5ebebc12f81385a88d82e4963dcbdf83091804b
parent62ed32043ae487f289d51d1bd45a50f59036c506
USB: rndis: Free the rndis response queue during REMOTE_NDIS_RESET_MSG

When rndis data transfer is in progress, some Windows7 Host PC is not
sending the GET_ENCAPSULATED_RESPONSE command for receiving the response
for the previous SEND_ENCAPSULATED_COMMAND processed.

The rndis function driver appends each response for the
SEND_ENCAPSULATED_COMMAND in a queue. As the above process got corrupted,
the Host sends a REMOTE_NDIS_RESET_MSG command to do a soft-reset.
As the rndis response queue is not freed, the previous response is sent
as a part of this REMOTE_NDIS_RESET_MSG's reset response and the Host
blocks any more Rndis transfers.

Hence free the rndis response queue as a part of this soft-reset so that
the current response for REMOTE_NDIS_RESET_MSG is sent properly during the
response command.

Change-Id: I8eff3849db452fe01b7d1fe4140ef1f1ad3f4fd4
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
Signed-off-by: Xerox Lin <xerox_lin@htc.com>
drivers/usb/gadget/function/rndis.c