]> Git Repo - qemu.git/commitdiff
usb-mtp: fix usb_mtp_get_device_info so that libmtp on the guest doesn't complain
authorIsaac Lozano <[email protected]>
Sun, 17 Apr 2016 11:29:53 +0000 (04:29 -0700)
committerGerd Hoffmann <[email protected]>
Wed, 11 May 2016 08:33:49 +0000 (10:33 +0200)
If an application uses libmtp on the guest system,
it will complain with the warning message:
LIBMTP WARNING: VendorExtensionID: ffffffff
LIBMTP WARNING: VendorExtensionDesc: (null)
LIBMTP WARNING: this typically means the device is PTP (i.e. a camera) but
not a MTP device at all. Trying to continue anyway.

This is because libmtp expects a MTP Vendor Extension ID of 0x00000006 and a
MTP Version of 0x0064. These numbers are taken from Microsoft's MTP Vendor
Extension Identification Message page and are what most physical devices
show.

Signed-off-by: Isaac Lozano <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Message-id: 1460892593[email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
hw/usb/dev-mtp.c

index bda84a64bdc6da1aae7471f392f52badf1415ec2..1be85ae75a591bcf10886783a34ae0c18176434c 100644 (file)
@@ -788,8 +788,8 @@ static MTPData *usb_mtp_get_device_info(MTPState *s, MTPControl *c)
     trace_usb_mtp_op_get_device_info(s->dev.addr);
 
     usb_mtp_add_u16(d, 100);
-    usb_mtp_add_u32(d, 0xffffffff);
-    usb_mtp_add_u16(d, 0x0101);
+    usb_mtp_add_u32(d, 0x00000006);
+    usb_mtp_add_u16(d, 0x0064);
     usb_mtp_add_wstr(d, L"");
     usb_mtp_add_u16(d, 0x0000);
 
This page took 0.03021 seconds and 4 git commands to generate.