Re: [RFC/PATCH 0/2] u_char.c and mtp.c patches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ext Linus Walleij wrote:
2010/4/19 Steve Calfee <stevecalfee@xxxxxxxxx>:

For 6 months, a while ago, I was working on virtual USB stuff for a
company. I did analyser traces of many devices including many MS
devices (mice, webcam, keyboard, joystick), and never found any device
from MS or anyone that supported that command. All devices that I saw
just replied (properly) with a STALL - and Winxp would just continue
on and handle the device.

I don't think they add it to that kind of devices. Only MTP players
for what I've seen. Maybe some weirdo RNDIS stuff use it too?

But as you see Windows issues this command to absolutely everything
you plug in, I've been thinking about how we could emulate the same
behaviour in Linux but actually I think it's a bit insane and only take
extra time to send that command to whatever you plug in.

Still it would be nice to know directly from userspace if a device that
was plugged in was MTP or not, especially we need this for udev
rules (or HAL, DeviceKit etc, whatever) that want to make the device
read/writable for the console user when it's plugged in.

When you say "older windowses", which one; the only earlier ones with
USB was 98 and descendants and somewhat 95.

Especially the Win98 and Win2000 stuff that comes with the Windows
Media Player has to respond to it.

Actually Windows probably has some internal list of devices and
specific quirks it has to use for them to work properly, but I'm not
sure. (I asked them about it I think, but didn't get any replies.)

Also have you found a device that actually responds to the "get
osdescriptor" request?

Almost all MTP devices out there does, check the logs here:
http://libmtp.cvs.sourceforge.net/viewvc/libmtp/libmtp/logs/

If the device responds with something sane for command 0xee
the MTP stack will go on to issue special commands, you can find
our code for this here:
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?

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.

cheers,
-roger
--
To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Gstreamer Embedded]     [Linux MMC Devel]     [U-Boot V2]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux ARM Kernel]     [Linux OMAP]     [Linux SCSI]

  Powered by Linux