OSDN Git Service

Retry allocations in case of ENODEV
authorJerry Zhang <zhangjerry@google.com>
Fri, 3 Feb 2017 02:14:33 +0000 (18:14 -0800)
committerJerry Zhang <zhangjerry@google.com>
Mon, 6 Feb 2017 20:01:56 +0000 (12:01 -0800)
commitb4f54266042f0553b41409a3d1f0542b684c2129
treecf18305909249f4ff86438b8bc3f32791c0fa8ae
parent4418030f45cca8cad25051f49b142988fb635037
Retry allocations in case of ENODEV

Unlike the read() and write() calls, the ioctl() call
does not wait for endpoints to be enabled, which is
problematic if ioctls() are the first calls on the
usb connection, since they may be called before the
endpoints are set up. We'll have to retry if this
causes them to fail.

Bug: 34822471
Test: Change configs to mtp and ptp
Change-Id: I89610b9614c33f0b22535cc68cd0c9b502cb55c9
media/mtp/MtpFfsHandle.cpp
media/mtp/MtpFfsHandle.h