diff options
author | Dongwoo Lee <dwoo08.lee@samsung.com> | 2022-08-22 17:23:23 +0900 |
---|---|---|
committer | Jihoon Jung <jh8801.jung@samsung.com> | 2022-09-01 07:55:04 +0000 |
commit | 361d6db400cef5ffde7561278e6b5e743ffa58c0 (patch) | |
tree | 651cbf4b80d1b947584b5c0ed09b402ba6835675 | |
parent | c9cb1eed065088503f5153eb43b09c0c956c4c92 (diff) | |
download | mtp-responder-tizen_8.0.tar.gz mtp-responder-tizen_8.0.tar.bz2 mtp-responder-tizen_8.0.zip |
ffs: Fix to send response for RESET request.tizen_8.0_m2_releasetizen_7.0_m2_releasesubmit/tizen/20220901.075652accepted/tizen/unified/20220905.124713accepted/tizen/8.0/unified/20231005.093224accepted/tizen/7.0/unified/hotfix/20221116.105204accepted/tizen/7.0/unified/20221110.060214tizen_8.0tizen_7.0_hotfixtizen_7.0accepted/tizen_8.0_unifiedaccepted/tizen_7.0_unified_hotfixaccepted/tizen_7.0_unified
Currently RESET handler calls read() for control endpoint after mtp
reset. However, as comparing with legacy slp handler, send reponse by
calling write() is the right way for sending response for RESET. Thus,
this fixes to send response instead of waiting additional request.
Change-Id: I79e42c40ac30015883db85b42c0cd941bbbbfb39
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
-rw-r--r-- | src/mtp_usb_driver_ffs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mtp_usb_driver_ffs.c b/src/mtp_usb_driver_ffs.c index a7cea9e..9efbdcb 100644 --- a/src/mtp_usb_driver_ffs.c +++ b/src/mtp_usb_driver_ffs.c @@ -546,9 +546,9 @@ static void __handle_control_request(mtp_int32 request) if (kernel_reset == FALSE) { kernel_reset = TRUE; } - status = read(g_usb_ep0, NULL, 0); + status = write(g_usb_ep0, NULL, 0); if (status < 0) { - ERR("IOCTL MTP_SEND_RESET_ACK Failed [%d]\n", + ERR("Failed to write RESET ACK [%d]\n", status); } break; |