[libmtp/f15] Bring in bugfixes from 1.1.1 without changing ABI.
Linus Walleij
snirkel at fedoraproject.org
Sat Oct 22 20:03:43 UTC 2011
commit 8855d6f7b6e0e25e461321685b157614014426dd
Author: Linus Walleij <triad at df.lth.se>
Date: Sat Oct 22 22:03:17 2011 +0200
Bring in bugfixes from 1.1.1 without changing ABI.
device-db.patch | 246 +++++++++++++++++++++++++++++++++++++++++--------
libmtp.spec | 8 +-
probe-3-ep-only.patch | 18 ----
various-bugs.patch | 72 ++++++++++++++
4 files changed, 284 insertions(+), 60 deletions(-)
---
diff --git a/device-db.patch b/device-db.patch
index 9fd89eb..4ce7ff6 100644
--- a/device-db.patch
+++ b/device-db.patch
@@ -1,6 +1,6 @@
diff -ur libmtp-1.0.6-orig/src/device-flags.h libmtp-1.0.6/src/device-flags.h
--- libmtp-1.0.6-orig/src/device-flags.h 2011-06-23 19:33:51.735858314 +0200
-+++ libmtp-1.0.6/src/device-flags.h 2011-06-23 19:34:26.427601600 +0200
++++ libmtp-1.0.6/src/device-flags.h 2011-10-22 22:01:10.637077837 +0200
@@ -3,7 +3,7 @@
* Special device flags to deal with bugs in specific devices.
*
@@ -148,7 +148,7 @@ diff -ur libmtp-1.0.6-orig/src/device-flags.h libmtp-1.0.6/src/device-flags.h
#define DEVICE_FLAG_MATCH_PTP_INTERFACE 0x00800000
/**
* This flag is like DEVICE_FLAG_OGG_IS_UNKNOWN but for FLAC
-@@ -255,3 +255,14 @@
+@@ -255,3 +255,24 @@
* device to switch from USB mass storage to MTP mode we think.
*/
#define DEVICE_FLAG_SWITCH_MODE_BLACKBERRY 0x04000000
@@ -163,9 +163,19 @@ diff -ur libmtp-1.0.6-orig/src/device-flags.h libmtp-1.0.6/src/device-flags.h
+ * like this, so it's not done by default.
+ */
+#define DEVICE_FLAG_FORCE_RESET_ON_CLOSE 0x10000000
++/**
++ * All these bug flags need to be set on Android devices,
++ * they claim to support MTP operations they actually
++ * cannot handle. These are auto-assigned to devices reporting
++ * "android.com" in their device extension descriptor.
++ */
++#define DEVICE_FLAGS_ANDROID_BUGS \
++ (DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST | \
++ DEVICE_FLAG_BROKEN_SET_OBJECT_PROPLIST | \
++ DEVICE_FLAG_BROKEN_SEND_OBJECT_PROPLIST)
diff -ur libmtp-1.0.6-orig/src/music-players.h libmtp-1.0.6/src/music-players.h
--- libmtp-1.0.6-orig/src/music-players.h 2011-06-23 19:33:51.737858300 +0200
-+++ libmtp-1.0.6/src/music-players.h 2011-06-23 19:34:20.416646069 +0200
++++ libmtp-1.0.6/src/music-players.h 2011-10-22 22:00:58.108163270 +0200
@@ -119,7 +119,7 @@
// get all objects with the getobjectproplist command..
{ "Samsung", 0x04e8, "YH-820", 0x502e, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL },
@@ -195,12 +205,15 @@ diff -ur libmtp-1.0.6-orig/src/music-players.h libmtp-1.0.6/src/music-players.h
// From Santi Béjar <sbejar at gmail.com> - not sure this is MTP...
// { "Samsung", 0x04e8, "Z170 Mobile Phone", 0x6601, DEVICE_FLAG_UNLOAD_DRIVER },
// From Santi Béjar <sbejar at gmail.com> - not sure this is MTP...
-@@ -248,13 +254,25 @@
+@@ -248,13 +254,28 @@
// Guessing on .spl flag, maybe needs NO_ZERO_READS, whatdoIknow
{ "Samsung", 0x04e8, "GT-S8500", 0x6819,
DEVICE_FLAG_UNLOAD_DRIVER | DEVICE_FLAG_PLAYLIST_SPL_V1 },
-+ // Reported by anonymous sourceforge user
-+ { "Samsung", 0x04e8, "GT-P7510/Galaxy Tab 10.1", 0x6860,
++ // Reported by anonymous sourceforge user - this is an Android
++ // device. It seems to be hard to use this device under Linux,
++ // which may be because it seems to implement fairly strong
++ // Microsoft DRM stuff.
++ { "Samsung", 0x04e8, "GT-P7510/Galaxy Tab 10.1/S2", 0x6860,
+ DEVICE_FLAG_UNLOAD_DRIVER |
+ DEVICE_FLAG_LONG_TIMEOUT },
// From: Erik Berglund <erikjber at users.sourceforge.net>
@@ -224,33 +237,39 @@ diff -ur libmtp-1.0.6-orig/src/music-players.h libmtp-1.0.6/src/music-players.h
DEVICE_FLAG_PLAYLIST_SPL_V1 },
// From anonymous Sourceforge user
{ "Samsung", 0x04e8, "GT-S5230", 0xe20c, DEVICE_FLAG_NONE },
-@@ -329,14 +347,23 @@
+@@ -329,14 +350,29 @@
DEVICE_FLAG_UNLOAD_DRIVER },
// From Anonymous SourceForge User
{ "Philips", 0x0471, "GoGear VIBE SA2VBE[08|16]K/02", 0x20b7,
- DEVICE_FLAG_UNLOAD_DRIVER },
+ DEVICE_FLAG_UNLOAD_DRIVER },
++ // From Anonymous SourceForge User
++ { "Philips", 0x0471, "GoGear Ariaz", 0x20b9,
++ DEVICE_FLAG_UNLOAD_DRIVER },
++ // From Anonymous SourceForge User
++ { "Philips", 0x0471, "GoGear Vibe/02", 0x20e5,
++ DEVICE_FLAG_UNLOAD_DRIVER },
// from XNJB user
{ "Philips", 0x0471, "PSA235", 0x7e01, DEVICE_FLAG_NONE },
-
- /*
++ /*
+ * Acer
+ */
+ // Reported by anonymous sourceforge user
+ { "Acer", 0x0502, "Iconia TAB A500 v1", 0x3325, DEVICE_FLAG_NONE },
+ // Reported by: Franck VDL <franckv at users.sourceforge.net>
+ { "Acer", 0x0502, "Iconia TAB A500 v2", 0x3341, DEVICE_FLAG_NONE },
-+
-+
-+ /*
++ // Reported by: Arvin Schnell <arvins at users.sourceforge.net>
++ { "Acer", 0x0502, "Iconia TAB A100", 0x3349, DEVICE_FLAG_NONE },
+
+ /*
* SanDisk
- * several devices (c150 for sure) are definately dual-mode and must
+ * several devices (c150 for sure) are definately dual-mode and must
* have the USB mass storage driver that hooks them unloaded first.
* They all have problematic dual-mode making the device unload effect
* uncertain on these devices.
-@@ -345,8 +372,9 @@
+@@ -345,8 +381,9 @@
* Old chipsets: e200/c200 use PP5024 from Nvidia (formerly PortalPlayer).
* m200 use TCC770 from Telechips.
*
@@ -262,16 +281,53 @@ diff -ur libmtp-1.0.6-orig/src/music-players.h libmtp-1.0.6/src/music-players.h
* and DEVICE_FLAG_ALWAYS_PROBE_DESCRIPTOR to work properly.
*
* For more info see: http://daniel.haxx.se/sansa/v2.html
-@@ -553,7 +581,7 @@
+@@ -436,7 +473,12 @@
+ DEVICE_FLAG_NO_RELEASE_INTERFACE | DEVICE_FLAG_ALWAYS_PROBE_DESCRIPTOR |
+ DEVICE_FLAG_BROKEN_SET_SAMPLE_DIMENSIONS |
+ DEVICE_FLAG_CANNOT_HANDLE_DATEMODIFIED},
+-
++ // Reported by mattyj2001 at users.sourceforge.net
++ { "SanDisk", 0x0781, "Sansa Clip Zip", 0x74e4,
++ DEVICE_FLAG_UNLOAD_DRIVER | DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST |
++ DEVICE_FLAG_NO_RELEASE_INTERFACE | DEVICE_FLAG_ALWAYS_PROBE_DESCRIPTOR |
++ DEVICE_FLAG_BROKEN_SET_SAMPLE_DIMENSIONS |
++ DEVICE_FLAG_CANNOT_HANDLE_DATEMODIFIED},
+
+ /*
+ * iRiver
+@@ -553,7 +595,9 @@
* Dell
*/
{ "Dell, Inc", 0x413c, "DJ Itty", 0x4500, DEVICE_FLAG_NONE },
-
++ /* Reported by: JR */
++ { "Dell, Inc", 0x413c, "Dell Streak 7", 0xb10b, DEVICE_FLAGS_ANDROID_BUGS },
+
/*
* Toshiba
* Tentatively flagged all Toshiba devices with
-@@ -758,14 +786,14 @@
+@@ -647,6 +691,10 @@
+ * so on older kernels special care is needed to remove the
+ * USB mass storage driver that erroneously binds to the device
+ * interface.
++ *
++ * More problematic, this manufacturer+device ID seems to be
++ * reused in a USB Mass Storage device named "Zipy Fox 8GB",
++ * which means libmtp may mistreat it.
+ */
+ { "Dunlop", 0x10d6, "MP3 player 1GB / EGOMAN MD223AFD", 0x2200, DEVICE_FLAG_UNLOAD_DRIVER},
+ // Reported by Steven Black <stevenblack1956 at users.sourceforge.net>
+@@ -733,6 +781,9 @@
+ // this flag atleast is needed
+ { "Nokia", 0x0421, "5800 XpressMusic v2", 0x0155,
+ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL },
++ // Yet another version... I think
++ { "Nokia", 0x0421, "5800 XpressMusic v3", 0x0159,
++ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL },
+ // From an anonymous SourceForge user
+ // Not verified to be MTP
+ { "Nokia", 0x0421, "E63", 0x0179, DEVICE_FLAG_NONE },
+@@ -758,14 +809,18 @@
{ "Nokia", 0x0421, "6600i", 0x0297, DEVICE_FLAG_NONE },
// From: Karthik Paithankar <whyagain2005 at users.sourceforge.net>
{ "Nokia", 0x0421, "2710", 0x02c1, DEVICE_FLAG_NONE },
@@ -284,12 +340,16 @@ diff -ur libmtp-1.0.6-orig/src/music-players.h libmtp-1.0.6/src/music-players.h
{ "Nokia", 0x0421, "N8 (Ovi mode)", 0x0302, DEVICE_FLAG_NONE },
- // https://sourceforge.net/tracker/index.php?func=detail&aid=2692473&group_id=8874&atid=358874
- { "Nokia", 0x0421, "5200", 0x0421, DEVICE_FLAG_NONE },
++ // From: Martijn Hoogendoorn <m.hoogendoorn at gmail.com>
++ { "Nokia", 0x0421, "E7", 0x0334, DEVICE_FLAG_NONE },
+ // From: Raul Metsma <raul at innovaatik.ee>
-+ { "Nokia", 0x0421, "E7", 0x0335, DEVICE_FLAG_NONE },
++ { "Nokia", 0x0421, "E7 (Ovi mode)", 0x0335, DEVICE_FLAG_NONE },
++ // Reported by Anonymous SourceForge user
++ { "Nokia", 0x0421, "N950", 0x03d2, DEVICE_FLAG_NONE },
// From: http://nds2.nokia.com/files/support/global/phones/software/Nokia_3250_WMP10_driver.inf
{ "Nokia", 0x0421, "3250 Mobile Phone", 0x0462, DEVICE_FLAG_NONE },
// From http://nds2.nokia.com/files/support/global/phones/software/Nokia_N93_WMP10_Driver.inf
-@@ -778,6 +806,10 @@
+@@ -778,6 +833,10 @@
{ "Nokia", 0x0421, "5700 XpressMusic Mobile Phone", 0x04b4, DEVICE_FLAG_NONE },
// From: Mitchell Hicks <mitchix at yahoo.com>
{ "Nokia", 0x0421, "5300 Mobile Phone", 0x04ba, DEVICE_FLAG_NONE },
@@ -300,7 +360,7 @@ diff -ur libmtp-1.0.6-orig/src/music-players.h libmtp-1.0.6/src/music-players.h
// From Christian Arnold <webmaster at arctic-media.de>
{ "Nokia", 0x0421, "N73 Mobile Phone", 0x04d1, DEVICE_FLAG_UNLOAD_DRIVER },
// From Swapan <swapan at yahoo.com>
-@@ -874,7 +906,7 @@
+@@ -874,7 +933,7 @@
*/
// Reported by XNJB user
{ "Disney", 0x0aa6, "MixMax", 0x6021, DEVICE_FLAG_NONE },
@@ -309,7 +369,7 @@ diff -ur libmtp-1.0.6-orig/src/music-players.h libmtp-1.0.6/src/music-players.h
{ "Tevion", 0x0aa6, "MD 81488", 0x3011, DEVICE_FLAG_NONE },
// Reported by Peter Hedlund <peter at peterandlinda.com>
{ "MyMusix", 0x0aa6, "PD-6070", 0x9601, DEVICE_FLAG_UNLOAD_DRIVER |
-@@ -935,6 +967,10 @@
+@@ -935,6 +994,10 @@
{ "Cowon", 0x0e21, "iAudio J3 (MTP mode)", 0x0921,
DEVICE_FLAG_UNLOAD_DRIVER | DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST |
DEVICE_FLAG_OGG_IS_UNKNOWN | DEVICE_FLAG_FLAC_IS_UNKNOWN },
@@ -320,7 +380,7 @@ diff -ur libmtp-1.0.6-orig/src/music-players.h libmtp-1.0.6/src/music-players.h
/*
* Insignia, dual-mode.
-@@ -956,16 +992,27 @@
+@@ -956,16 +1019,27 @@
{ "LG Electronics Inc.", 0x043e, "UP3", 0x70b1, DEVICE_FLAG_NONE },
// Reported by Joseph Nahmias <joe at nahimas.net>
{ "LG Electronics Inc.", 0x1004, "VX8550 V CAST Mobile Phone", 0x6010,
@@ -351,7 +411,7 @@ diff -ur libmtp-1.0.6-orig/src/music-players.h libmtp-1.0.6/src/music-players.h
/*
* Sony
-@@ -977,105 +1024,130 @@
+@@ -977,105 +1051,138 @@
{ "Sony", 0x054c, "Walkman NWZ-A815/NWZ-A818", 0x0325,
DEVICE_FLAG_UNLOAD_DRIVER |
DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST |
@@ -476,6 +536,14 @@ diff -ur libmtp-1.0.6-orig/src/music-players.h libmtp-1.0.6/src/music-players.h
- DEVICE_FLAG_UNIQUE_FILENAMES },
+ DEVICE_FLAG_UNIQUE_FILENAMES |
+ DEVICE_FLAG_FORCE_RESET_ON_CLOSE },
++ // Reported by anonymous SourceForge user
++ { "Sony", 0x054c, "Walkman NWZ-W252B", 0x04bb,
++ DEVICE_FLAG_UNLOAD_DRIVER |
++ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST |
++ DEVICE_FLAG_UNIQUE_FILENAMES |
++ DEVICE_FLAG_FORCE_RESET_ON_CLOSE },
++ // Suspect this device has strong DRM features
++ // See https://answers.launchpad.net/ubuntu/+source/libmtp/+question/149587
{ "Sony", 0x054c, "Walkman NWZ-B153F", 0x04be,
DEVICE_FLAG_UNLOAD_DRIVER |
DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST |
@@ -503,25 +571,105 @@ diff -ur libmtp-1.0.6-orig/src/music-players.h libmtp-1.0.6/src/music-players.h
/*
* SonyEricsson
-@@ -1117,8 +1189,17 @@
- { "SonyEricsson", 0x0fce, "U5", 0x0133, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
+@@ -1084,41 +1191,80 @@
+ * for now.
+ */
+ // Reported by Thomas Schweitzer <thomas_-_s at users.sourceforge.net>
+- { "SonyEricsson", 0x0fce, "K550i", 0xe000, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
++ { "SonyEricsson", 0x0fce, "K550i", 0xe000,
++ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
+ // Reported by Øyvind Stegard <stegaro at users.sourceforge.net>
+- { "SonyEricsson", 0x0fce, "K850i", 0x0075, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
++ { "SonyEricsson", 0x0fce, "K850i", 0x0075,
++ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
+ // Reported by Michael Eriksson
+- { "SonyEricsson", 0x0fce, "W910", 0x0076, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
++ { "SonyEricsson", 0x0fce, "W910", 0x0076,
++ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
+ // Reported by Zack <zackdvd at users.sourceforge.net>
+- { "SonyEricsson", 0x0fce, "W890i", 0x00b3, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
++ { "SonyEricsson", 0x0fce, "W890i", 0x00b3,
++ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
+ // Reported by robert dot ahlskog at gmail
+- { "SonyEricsson", 0x0fce, "W760i", 0x00c6, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
++ { "SonyEricsson", 0x0fce, "W760i", 0x00c6,
++ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
+ // Reported by Linus Åkesson <linusakesson at users.sourceforge.net>
+- { "SonyEricsson", 0x0fce, "C902", 0x00d4, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
++ { "SonyEricsson", 0x0fce, "C902", 0x00d4,
++ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
+ // Reported by an anonymous SourceForge user
+- { "SonyEricsson", 0x0fce, "C702", 0x00d9, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
++ { "SonyEricsson", 0x0fce, "C702", 0x00d9,
++ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
+ // Reported by Christian Zuckschwerdt <christian at zuckschwerdt.org>
+- { "SonyEricsson", 0x0fce, "W980", 0x00da, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
++ { "SonyEricsson", 0x0fce, "W980", 0x00da,
++ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
+ // Reported by David Taylor <davidt-libmtp at yadt.co.uk>
+- { "SonyEricsson", 0x0fce, "C905", 0x00ef, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
++ { "SonyEricsson", 0x0fce, "C905", 0x00ef,
++ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
+ // Reported by David House <dmhouse at users.sourceforge.net>
+ { "SonyEricsson", 0x0fce, "W595", 0x00f3,
+- DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL | DEVICE_FLAG_BROKEN_SET_OBJECT_PROPLIST },
++ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL |
++ DEVICE_FLAG_BROKEN_SET_OBJECT_PROPLIST },
+ // Reported by Mattias Evensson <mevensson at users.sourceforge.net>
+- { "SonyEricsson", 0x0fce, "W902", 0x00f5, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
++ { "SonyEricsson", 0x0fce, "W902", 0x00f5,
++ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
+ // Reported by Sarunas <sarunas at users.sourceforge.net>
+ // Doesn't need any flags according to reporter
+- { "SonyEricsson", 0x0fce, "T700", 0x00fb, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL },
++ { "SonyEricsson", 0x0fce, "T700", 0x00fb,
++ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL },
+ // Reported by Stéphane Pontier <shadow_walker at users.sourceforge.net>
+- { "SonyEricsson", 0x0fce, "W705/W715", 0x0105, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
++ { "SonyEricsson", 0x0fce, "W705/W715", 0x0105,
++ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
+ // Reported by Håkan Kvist
+- { "SonyEricsson", 0x0fce, "W995", 0x0112, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
++ { "SonyEricsson", 0x0fce, "W995", 0x0112,
++ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
+ // Reported by anonymous SourceForge user
+- { "SonyEricsson", 0x0fce, "U5", 0x0133, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
++ { "SonyEricsson", 0x0fce, "U5", 0x0133,
++ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
// Reported by Flo <lhugsereg at users.sourceforge.net>
- { "SonyEricsson", 0x0fce, "U8i", 0x013a, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
+- { "SonyEricsson", 0x0fce, "U8i", 0x013a, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
++ { "SonyEricsson", 0x0fce, "U8i", 0x013a,
++ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
+ // Reported by xirotyu <xirotyu at users.sourceforge.net>
-+ { "SonyEricsson", 0x0fce, "j10i2 (Elm)", 0x0144, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
++ { "SonyEricsson", 0x0fce, "j10i2 (Elm)", 0x0144,
++ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
++ // Reported by Serge Chirik <schirik at users.sourceforge.net>
++ { "SonyEricsson", 0x0fce, "j108i (Cedar)", 0x014e,
++ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
+ // Reported by Jonas Salling <>
+ // Erroneous MTP implementation seems to be from Aricent, returns
+ // broken transaction ID.
-+ { "SonyEricsson", 0x0fce, "LT15i (Xperia arc)", 0x14f, DEVICE_FLAG_IGNORE_HEADER_ERRORS },
++ { "SonyEricsson", 0x0fce, "LT15i (Xperia arc)", 0x14f,
++ DEVICE_FLAG_IGNORE_HEADER_ERRORS },
++ // Reported by Eamonn Webster <eweb at users.sourceforge.net>
++ // Guessing on the ignore errors flag
++ { "SonyEricsson", 0x0fce, "Xperia Neo", 0x0156,
++ DEVICE_FLAG_IGNORE_HEADER_ERRORS },
++ // Reported by <wealas at users.sourceforge.net>
++ { "SonyEricsson", 0x0fce, "ST18a", 0x161,
++ DEVICE_FLAG_IGNORE_HEADER_ERRORS },
// Reported by Jonas Nyrén <spectralmks at users.sourceforge.net>
- { "SonyEricsson", 0x0fce, "W302", 0x10c8, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
+- { "SonyEricsson", 0x0fce, "W302", 0x10c8, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
++ { "SonyEricsson", 0x0fce, "W302", 0x10c8,
++ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
+ // Reported by Anonymous Sourceforge user
-+ { "SonyEricsson", 0x0fce, "j10i (Elm)", 0xd144, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
++ { "SonyEricsson", 0x0fce, "j10i (Elm)", 0xd144,
++ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
+
/*
-@@ -1130,7 +1211,7 @@
+@@ -1130,7 +1276,7 @@
DEVICE_FLAG_BROKEN_SET_OBJECT_PROPLIST |
DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL },
// Reported by Steven Roemen <sdroemen at users.sourceforge.net>
@@ -530,26 +678,35 @@ diff -ur libmtp-1.0.6-orig/src/music-players.h libmtp-1.0.6/src/music-players.h
DEVICE_FLAG_NONE },
// Reported by anonymous user
{ "Motorola", 0x22b8, "Milestone / Verizon Droid", 0x41dc,
-@@ -1155,7 +1236,17 @@
+@@ -1155,8 +1301,25 @@
// Reported by anonymous user
{ "Motorola", 0x22b8, "RAZR2 V8/U9/Z6", 0x6415,
DEVICE_FLAG_BROKEN_SET_OBJECT_PROPLIST },
-
+-
+ // Reported by Google Inc's Yavor Goulishev <yavor at google.com>
+ // Android 3.0 MTP stack seems to announce that it supports the
+ // list operations, but they do not work?
-+ { "Motorola", 0x22b8, "Xoom (ID 1)", 0x70a8,
-+ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST |
-+ DEVICE_FLAG_BROKEN_SET_OBJECT_PROPLIST |
-+ DEVICE_FLAG_BROKEN_SEND_OBJECT_PROPLIST },
-+ { "Motorola", 0x22b8, "Xoom (ID 2)", 0x70a9,
-+ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST |
-+ DEVICE_FLAG_BROKEN_SET_OBJECT_PROPLIST |
-+ DEVICE_FLAG_BROKEN_SEND_OBJECT_PROPLIST },
-
++ { "Motorola", 0x22b8, "Xoom (ID 1)", 0x70a8, DEVICE_FLAGS_ANDROID_BUGS },
++
++ /*
++ * Google
++ * These guys lend their Vendor ID to anyone who comes down the
++ * road to produce an Android tablet it seems... The Vendor ID
++ * was originally used for Nexus phones
++ */
++ { "Google Inc (for Sony)", 0x18d1, "S1", 0x05b3,
++ DEVICE_FLAGS_ANDROID_BUGS },
++ // WiFi-only version of Xoom
++ // See: http://bugzilla.gnome.org/show_bug.cgi?id=647506
++ { "Google Inc (for Motorola)", 0x18d1, "Xoom (MZ604)", 0x70a8,
++ DEVICE_FLAGS_ANDROID_BUGS },
++ { "Google Inc (for Motorola)", 0x22b8, "Xoom (ID 2)", 0x70a9,
++ DEVICE_FLAGS_ANDROID_BUGS },
/*
* Media Keg
-@@ -1253,9 +1344,21 @@
+ */
+@@ -1253,9 +1416,30 @@
{ "Apple", 0x05ac, "iPod Touch 3rd Gen", 0x1299, DEVICE_FLAG_NONE },
{ "Apple", 0x05ac, "iPad", 0x129a, DEVICE_FLAG_NONE },
@@ -569,6 +726,15 @@ diff -ur libmtp-1.0.6-orig/src/music-players.h libmtp-1.0.6/src/music-players.h
+ */
+ { "Asus", 0x0b05, "TF101 Eeepad Transformer", 0x4e0f, DEVICE_FLAG_NONE },
+ { "Asus", 0x0b05, "FT101 Eeepad Transformer", 0x4e1f, DEVICE_FLAG_NONE },
++
++
++ /*
++ * Lenovo
++ */
++ // Reported by anonymous sourceforge user
++ // Adding Android default bug flags since it appears to be an Android
++ { "Lenovo", 0x17ef, "Lenovo ThinkPad Tablet", 0x741c,
++ DEVICE_FLAGS_ANDROID_BUGS },
/*
* Other strange stuff.
diff --git a/libmtp.spec b/libmtp.spec
index 79775f6..c562175 100644
--- a/libmtp.spec
+++ b/libmtp.spec
@@ -3,13 +3,13 @@
Name: libmtp
Version: 1.0.6
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: A software library for MTP media players
URL: http://libmtp.sourceforge.net/
Group: System Environment/Libraries
Source0: http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
-Patch0: probe-3-ep-only.patch
+Patch0: various-bugs.patch
Patch1: device-db.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
License: LGPLv2+
@@ -122,6 +122,10 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Sat Oct 22 2011 Linus Walleij <triad at df.lth.se> 1.0.6-4
+- Bring in as many bug fixes from the 1.1.1 release we can without
+ changing the ABI.
+
* Thu Jun 23 2011 Linus Walleij <triad at df.lth.se> 1.0.6-3
- Update the device database to latest version in an attempt to
address issues with Android tablets like the Xoom and Asus tablets
diff --git a/various-bugs.patch b/various-bugs.patch
new file mode 100644
index 0000000..059419f
--- /dev/null
+++ b/various-bugs.patch
@@ -0,0 +1,72 @@
+diff -ur libmtp-1.0.6-orig/src/libusb-glue.c libmtp-1.0.6/src/libusb-glue.c
+--- libmtp-1.0.6-orig/src/libusb-glue.c 2011-06-23 19:33:51.736858307 +0200
++++ libmtp-1.0.6/src/libusb-glue.c 2011-10-22 21:58:02.431358209 +0200
+@@ -275,6 +275,13 @@
+ &dev->config[i].interface[j].altsetting[k];
+
+ /*
++ * MTP interfaces have three endpoints, two bulk and one
++ * interrupt. Don't probe anything else.
++ */
++ if (intf->bNumEndpoints != 3)
++ continue;
++
++ /*
+ * We only want to probe for the OS descriptor if the
+ * device is USB_CLASS_VENDOR_SPEC or one of the interfaces
+ * in it is, so flag if we find an interface like this.
+@@ -1753,6 +1760,16 @@
+ usb_resetep(ptp_usb->handle, ptp_usb->outep);
+ usb_release_interface(ptp_usb->handle, (int) ptp_usb->interface);
+ }
++ if (FLAG_FORCE_RESET_ON_CLOSE(ptp_usb)) {
++ /*
++ * Some devices really love to get reset after being
++ * disconnected. Again, since Windows never disconnects
++ * a device closing behaviour is seldom or never exercised
++ * on devices when engineered and often error prone.
++ * Reset may help some.
++ */
++ usb_reset(ptp_usb->handle);
++ }
+ usb_close(ptp_usb->handle);
+ }
+
+@@ -1911,10 +1928,9 @@
+ */
+ if ((ret = ptp_opensession(params, 1)) == PTP_ERROR_IO) {
+ LIBMTP_ERROR("PTP_ERROR_IO: failed to open session, trying again after resetting USB interface\n");
+- close_usb(ptp_usb);
+-
+ LIBMTP_ERROR("LIBMTP libusb: Attempt to reset device\n");
+ usb_reset(ptp_usb->handle);
++ close_usb(ptp_usb);
+
+ if(init_ptp_usb(params, ptp_usb, libusb_device) <0) {
+ LIBMTP_ERROR("LIBMTP PANIC: Could not init USB on second attempt\n");
+Endast i libmtp-1.0.6/src: libusb-glue.c.orig
+diff -ur libmtp-1.0.6-orig/util/mtp-hotplug.c libmtp-1.0.6/util/mtp-hotplug.c
+--- libmtp-1.0.6-orig/util/mtp-hotplug.c 2011-06-23 19:33:51.713858478 +0200
++++ libmtp-1.0.6/util/mtp-hotplug.c 2011-10-22 21:54:01.921989656 +0200
+@@ -140,6 +140,12 @@
+ printf("SUBSYSTEM==\"usb\", GOTO=\"libmtp_usb_rules\"\n"
+ "GOTO=\"libmtp_rules_end\"\n\n"
+ "LABEL=\"libmtp_usb_rules\"\n\n");
++ printf("# Some sensitive devices we surely don\'t wanna probe, color instruments\n");
++ printf("ATTR{idVendor}==\"0670\", GOTO=\"libmtp_rules_end\"\n");
++ printf("ATTR{idVendor}==\"0765\", GOTO=\"libmtp_rules_end\"\n");
++ printf("ATTR{idVendor}==\"085c\", GOTO=\"libmtp_rules_end\"\n");
++ printf("ATTR{idVendor}==\"0971\", GOTO=\"libmtp_rules_end\"\n");
++ printf("\n");
+ break;
+ case style_udev_old:
+ printf("# UDEV-style hotplug map for libmtp\n");
+@@ -242,7 +248,7 @@
+ * every USB device that is either PTP or vendor specific
+ */
+ printf("\n# Autoprobe vendor-specific, communication and PTP devices\n");
+- printf("ENV{ID_MTP_DEVICE}!=\"1\", ATTR{bDeviceClass}==\"00|02|06|ff\", PROGRAM=\"%smtp-probe /sys$env{DEVPATH} $attr{busnum} $attr{devnum}\", RESULT==\"1\", %s", mtp_probe_dir, action);
++ printf("ENV{ID_MTP_DEVICE}!=\"1\", ENV{MTP_NO_PROBE}!=\"1\", ENV{COLOR_MEASUREMENT_DEVICE}!=\"1\", ENV{libsane_matched}!=\"yes\", ATTR{bDeviceClass}==\"00|02|06|ef|ff\", PROGRAM=\"%smtp-probe /sys$env{DEVPATH} $attr{busnum} $attr{devnum}\", RESULT==\"1\", %s", mtp_probe_dir, action);
+ if (udev_group != NULL) printf(", GROUP=\"%s\"", udev_group);
+ if (udev_mode != NULL) printf(", MODE=\"%s\"", udev_mode);
+ printf("\n");
More information about the scm-commits
mailing list