All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] usb-mtp: fix usb_mtp_get_device_info so that libmtp on the guest doesn't complain
@ 2016-04-17 11:29 Isaac Lozano
  2016-04-26  9:11 ` Stefan Hajnoczi
  2016-05-11  8:34 ` Gerd Hoffmann
  0 siblings, 2 replies; 4+ messages in thread
From: Isaac Lozano @ 2016-04-17 11:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: kraxel, Isaac Lozano

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 <109lozanoi@gmail.com>
---
 hw/usb/dev-mtp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c
index bda84a6..1be85ae 100644
--- a/hw/usb/dev-mtp.c
+++ b/hw/usb/dev-mtp.c
@@ -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);
 
-- 
2.8.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] usb-mtp: fix usb_mtp_get_device_info so that libmtp on the guest doesn't complain
  2016-04-17 11:29 [Qemu-devel] [PATCH] usb-mtp: fix usb_mtp_get_device_info so that libmtp on the guest doesn't complain Isaac Lozano
@ 2016-04-26  9:11 ` Stefan Hajnoczi
  2016-04-26 21:28   ` Bandan Das
  2016-05-11  8:34 ` Gerd Hoffmann
  1 sibling, 1 reply; 4+ messages in thread
From: Stefan Hajnoczi @ 2016-04-26  9:11 UTC (permalink / raw)
  To: Isaac Lozano; +Cc: qemu-devel, kraxel

[-- Attachment #1: Type: text/plain, Size: 996 bytes --]

On Sun, Apr 17, 2016 at 04:29:53AM -0700, Isaac Lozano wrote:
> 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 <109lozanoi@gmail.com>
> ---
>  hw/usb/dev-mtp.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Welcome to QEMU!

Link to MTP Vendor Extension Identification Message page for other
reviewers:
https://msdn.microsoft.com/en-us/library/ff632482.aspx

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] usb-mtp: fix usb_mtp_get_device_info so that libmtp on the guest doesn't complain
  2016-04-26  9:11 ` Stefan Hajnoczi
@ 2016-04-26 21:28   ` Bandan Das
  0 siblings, 0 replies; 4+ messages in thread
From: Bandan Das @ 2016-04-26 21:28 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: Isaac Lozano, qemu-devel, kraxel

Stefan Hajnoczi <stefanha@gmail.com> writes:

> On Sun, Apr 17, 2016 at 04:29:53AM -0700, Isaac Lozano wrote:
>> 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 <109lozanoi@gmail.com>
>> ---
>>  hw/usb/dev-mtp.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> Welcome to QEMU!
>
> Link to MTP Vendor Extension Identification Message page for other
> reviewers:
> https://msdn.microsoft.com/en-us/library/ff632482.aspx

I am confused why the MTP spec on usb.org specifies in 5.1.1.2 that
this value should be 0xffffffff for MTP devices. Is it just not updated
or there are similar MS specific differences to watch out for ? Either
way, it seems libmtp will always be a good reference when we are stuck
with such discrepencies.

> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] usb-mtp: fix usb_mtp_get_device_info so that libmtp on the guest doesn't complain
  2016-04-17 11:29 [Qemu-devel] [PATCH] usb-mtp: fix usb_mtp_get_device_info so that libmtp on the guest doesn't complain Isaac Lozano
  2016-04-26  9:11 ` Stefan Hajnoczi
@ 2016-05-11  8:34 ` Gerd Hoffmann
  1 sibling, 0 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2016-05-11  8:34 UTC (permalink / raw)
  To: Isaac Lozano; +Cc: qemu-devel

On So, 2016-04-17 at 04:29 -0700, Isaac Lozano wrote:
> 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 <109lozanoi@gmail.com>

added to usb patch queue.

thanks,
  Gerd

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-05-11  8:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-17 11:29 [Qemu-devel] [PATCH] usb-mtp: fix usb_mtp_get_device_info so that libmtp on the guest doesn't complain Isaac Lozano
2016-04-26  9:11 ` Stefan Hajnoczi
2016-04-26 21:28   ` Bandan Das
2016-05-11  8:34 ` Gerd Hoffmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.