In order to finalize handling GET_STATUS setup request, sending ack
to the host is required. Otherwise, setup request stalls and the next
request cannot be handled because the stall of request is condiered
endpoint halt. To prevent this, the response of GET_STATUS is sent
explicitly.
Change-Id: I09307d2db5f9b50483d194bbf4eedb56854466c6
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
if (kernel_reset == FALSE) {
kernel_reset = TRUE;
}
-
status = read(g_usb_ep0, NULL, 0);
if (status < 0) {
ERR("IOCTL MTP_SEND_RESET_ACK Failed [%d]\n",
return;
} */
+ status = write(g_usb_ep0, &statusreq_data, sizeof(statusreq_data));
+ if (status < 0) {
+ char error[256];
+ ERR("Failed to write data for GETSTATUS request\n: %s",
+ strerror_r(errno, error, sizeof(error)));
+ }
+
break;
case USB_PTPREQUEST_GETEVENT: