linux-embedded.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.ml.walleij-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Roger Quadros <roger.quadros-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
Cc: Steve Calfee
	<stevecalfee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"Balbi Felipe (Nokia-D/Helsinki)"
	<felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>,
	Linux USB Mailing List
	<linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"Krogerus Heikki (EXT-Teleca/Helsinki)"
	<ext-heikki.krogerus-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>,
	"Kaliuta Yauheni (Nokia-D/Helsinki)"
	<Yauheni.Kaliuta-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>,
	"Mandy Arnaud.2 (EXT-Teleca/Helsinki)"
	<ext-arnaud.2.mandy-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>,
	Greg KH <greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>,
	David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>,
	linux-embedded
	<linux-embedded-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Tim Bird <tim.bird-mEdOJwZ7QcZBDgjK7y7TUQ@public.gmane.org>,
	"libmtp-discuss-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org"
	<libmtp-discuss-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: [RFC/PATCH 0/2] u_char.c and mtp.c patches
Date: Wed, 21 Apr 2010 01:44:17 +0200	[thread overview]
Message-ID: <i2x63386a3d1004201644g685b8ddeo609c6eaa8c07ed1f@mail.gmail.com> (raw)
In-Reply-To: <4BCD619B.2000907-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>

2010/4/20 Roger Quadros <roger.quadros-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>:

>> http://libmtp.cvs.sourceforge.net/viewvc/*checkout*/libmtp/libmtp/src/libusb-glue.c?revision=1.284
>
> Do you know if these older Windows OSes request the OS descriptor when the
> device uses a standard USB class code?

I haven't tested, but I think Windows will attempt to always use the OS
descriptor first and foremost.

> AFAIK the MTP device device should use PTP Class, Subclass and protocol
> codes (i.e. 6:1:1). In this case Windows XP treats it as a PTP device (even
> if the device implements OS descriptors).
>
> I'm sure all MTP devices in the market that implement OS descriptors use
> Vendor Specific class (i.e. 0xff:0:0) which is not the right thing to do
> after MTP has been standardized by usb.if.

Yes they should, but still very few devices, if any, use the PTP class code.

The reason behind, and the reason to why they use the OS descriptor at all,
if I understood correctly, was that Microsoft actually *wanted* to use the PTP
class for MTP devices, but to do that the MTP extensions had to pass
through the USB IF standardization process which took some three years or
so. In the meantime USB IF forbade them to use the PTP class code for
something that was not officially a PTP extension.

So these devices all are class 0xff  "vendor specific" or 0x00 "defined at
interface level". (One device mistakedly use class code 111 decimal!)
I haven't however looked at what they're using as bInterfaceClass really,
perhaps there are MTP devices out there that define themselves as PTP,
I've never heard of one, other than the experimental device that was used
to implement the proper detection algorithm in libmtp.

I think Windows only knows they are MTP devices by either
probing the OS descriptor or having a built-in table of MTP-compliant
vendor/device ID pairs. Probably both, because some of the very earliest
"PMC" (Portable Media Center) models didn't even have OS descriptors.

I guess Felipe may have first-hand experience with using the PTP class
code only? Maybe this works in the latest Windowses, post-USB IF
standardization? No idea.

Maybe tagging a device with the PTP class  and subclass 0x01 will make
it always fall back to PTP mode only under Windows, MTP features disabled,
this would not surprise me one bit.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2010-04-20 23:44 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1268123742-22968-1-git-send-email-felipe.balbi@nokia.com>
     [not found] ` <1268123742-22968-1-git-send-email-felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2010-04-18 15:24   ` [RFC/PATCH 0/2] u_char.c and mtp.c patches Linus Walleij
     [not found]     ` <x2m63386a3d1004180824u30bea481t3a11ed889c26b293-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-04-19 16:10       ` Linus Walleij
2010-04-19 16:26         ` Felipe Balbi
     [not found]           ` <20100419162611.GA15131-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2010-04-19 16:55             ` Michał Nazarewicz
2010-04-19 17:15               ` Greg KH
     [not found]                 ` <20100419171534.GA30381-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2010-04-19 17:24                   ` Felipe Balbi
2010-04-19 18:57                     ` Michał Nazarewicz
2010-04-19 20:04                       ` Felipe Balbi
     [not found]                         ` <20100419200457.GB27643-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2010-04-21 10:12                           ` Michał Nazarewicz
2010-04-19 19:23             ` Linus Walleij
2010-04-19 20:07               ` Felipe Balbi
     [not found]                 ` <20100419200727.GC27643-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2010-04-19 22:44                   ` Greg KH
2010-04-20  6:22                     ` Felipe Balbi
2010-04-20 23:57                       ` Greg KH
     [not found]                     ` <p2ze3bf744d1004230602nd09a7570jb3cee76f87ba8c00@mail.gmail.com>
     [not found]                       ` <p2ze3bf744d1004230602nd09a7570jb3cee76f87ba8c00-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-04-23 13:04                         ` [Libmtp-discuss] " Felipe Balbi
     [not found]               ` <p2p63386a3d1004191223jb650984ft37372276e4870e87-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-04-19 21:03                 ` Steve Calfee
2010-04-19 23:10                   ` Linus Walleij
2010-04-20  8:11                     ` Roger Quadros
     [not found]                       ` <4BCD619B.2000907-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2010-04-20 23:44                         ` Linus Walleij [this message]
     [not found]                           ` <i2x63386a3d1004201644g685b8ddeo609c6eaa8c07ed1f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-04-21  7:07                             ` Roger Quadros
     [not found]                               ` <4BCEA444.20307-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2010-04-21 20:02                                 ` Linus Walleij
     [not found]                   ` <l2s4a5ff6bc1004191403nfe758331h3b70cdfd40568338-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-04-20  5:21                     ` Felipe Balbi
2010-04-20  7:54               ` Roger Quadros

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=i2x63386a3d1004201644g685b8ddeo609c6eaa8c07ed1f@mail.gmail.com \
    --to=linus.ml.walleij-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=Yauheni.Kaliuta-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org \
    --cc=david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org \
    --cc=ext-arnaud.2.mandy-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org \
    --cc=ext-heikki.krogerus-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org \
    --cc=felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org \
    --cc=greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org \
    --cc=libmtp-discuss-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=linux-embedded-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=roger.quadros-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org \
    --cc=stevecalfee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=tim.bird-mEdOJwZ7QcZBDgjK7y7TUQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).