• Xerox Lin's avatar
    usb: gadget: rndis: free response queue during REMOTE_NDIS_RESET_MSG · 207707d8
    Xerox Lin authored
    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
    block any more Rndis transfers.
    
    Hence free the rndis response queue as a part of this soft-reset so that
    the correct response for REMOTE_NDIS_RESET_MSG is sent properly during the
    response command.
    Signed-off-by: default avatarRajkumar Raghupathy <raghup@codeaurora.org>
    Signed-off-by: default avatarXerox Lin <xerox_lin@htc.com>
    [AmitP: Cherry-picked this patch and folded other relevant
            fixes from Android common kernel android-4.4]
    Signed-off-by: default avatarAmit Pundir <amit.pundir@linaro.org>
    Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
    207707d8
rndis.c 28.5 KB