Skip to content
  • Udipto Goswami's avatar
    usb: gadget: u_serial: Rectify the list operations is rx/tx path · fb8bceab
    Udipto Goswami authored
    
    
    Commit I714c7fe681 ("usb: gadget: u_serial: Dequeue request on
    gserial_disconnect") had introduced additional two pools,
    queued_write_pool & queued_read_pool in order to dequeue requests
    on gserial_disconnect. Currently in the rx/tx paths, the driver
    extracts the request from write/read_pool and moves it to the
    queued pool. This is done before the request is queued.
    Now when the completion is called, the request is added back
    to the head write/read_pool.
    
    The approach should be when the request is successfully queued,
    only then move it to the queued pool and when the request_completion
    is called move it back to the write/read pool. This will ensure
    that the request is only one list either read/write pool or the
    queued_read/write pool.
    
    Change-Id: Ic16cb8ec09c5a58b3ea673750f06468f184e724c
    Signed-off-by: default avatarUdipto Goswami <quic_ugoswami@quicinc.com>
    fb8bceab