summaryrefslogtreecommitdiffstats
path: root/mtp
diff options
context:
space:
mode:
Diffstat (limited to 'mtp')
-rwxr-xr-xmtp/mtp_MtpServer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/mtp/mtp_MtpServer.cpp b/mtp/mtp_MtpServer.cpp
index 96a1e9453..b53d07a8f 100755
--- a/mtp/mtp_MtpServer.cpp
+++ b/mtp/mtp_MtpServer.cpp
@@ -56,6 +56,11 @@ int twmtp_MtpServer::setup()
{
usePtp = false;
MyMtpDatabase* mtpdb = new MyMtpDatabase();
+ /* Sleep for a bit before we open the MTP USB device because some
+ * devices are not ready due to the kernel not responding to our
+ * sysfs requests right away.
+ */
+ usleep(800000);
#ifdef USB_MTP_DEVICE
#define STRINGIFY(x) #x
#define EXPAND(x) STRINGIFY(x)