MTP: add a new parameter for cancelEvents function
Currently, cancelEvents in MTP will cancel the requests
one by one, and it will check each response to confirm
success or failure. However, if kernel usb controller
driver got the cancel request, the driver will handle
all requests in the same endpoint so that the second
io_cancel in cancelEvents will be useless. This behavior
change start from kernel 5.x.
This patch will add a parameter to check whether kernel
usb controller driver uses the new behavior so that MTP
could cancel the requests correctly.
Bug: 181729410
Test: cancel a transmitting file and then check the MTP operation
Merged-In: I4e172fa62c297ac33b0c97c67f3f7baa817fd8bf
(cherry picked from commit 305e62ec197f65ebf29d79e8d03ea3b296b4e690)
Signed-off-by: sekaiacg <sekaiacg@gmail.com>
Change-Id: I8963d69b7b7fb6d6d8fe71c293551e2ab9f13470
2 files changed