public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michał Nazarewicz" <m.nazarewicz@samsung.com>
To: Josua Dietze <digidietze@draisberghof.de>,
	Alan Stern <stern@rowland.harvard.edu>
Cc: Daniel Mack <daniel@caiaq.de>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Kernel development list <linux-kernel@vger.kernel.org>,
	USB list <linux-usb@vger.kernel.org>,
	Kyungmin Park <kyungmin.park@samsung.com>
Subject: Re: USB gadget with drivers "on board"
Date: Wed, 28 Apr 2010 10:46:12 +0200	[thread overview]
Message-ID: <op.vbu6nahq7p4s8u@pikus> (raw)
In-Reply-To: <4BD5F43E.4090404@draisberghof.de>

>> On Mon, 26 Apr 2010, Josua Dietze wrote:
>>> These are the notorious mode switching devices. In Windows, they
>>> obviously install a special storage driver doing one specific action
>>> on each following plugging.
>>> This action - some storage or control command - will "flip" the
>>> device, making it "disconnect" and returning as a completely different
>>> composite device.
>>>
>>> Storage commands used for this procedure range from "SCSI rezero" over
>>> "passthrough" to "SCSI eject", or involve vendor specific stuff.

> Alan Stern schrieb:
>> I was going to say the same thing.  For ease of use, I recommend using
>> a "SCSI eject" to trigger the mode change.  That way, Linux users who
>> don't have the usb-modeswitch program installed can get the same effect
>> by running eject.

On Mon, 26 Apr 2010 22:14:54 +0200, Josua Dietze <digidietze@draisberghof.de> wrote:

> Important for the Linux handling is that "mode 1" is clearly
> distinguishable from "mode 2", either by using a different product ID
> or by setting a different class for the device or interface 0 (will
> most likely be "8" for the install mode).

So it will be enough to change the USB device class for the zeroth
interface for udev to recognise the mass storage to be ejected?  Note
that I will use mass storage in the second mode as well.

Also, I think that it might be a good idea to make some "standardised"
mechanism for all such devices so that a generic udev code could be
written.  Adding things to the descriptors may be difficult in a way,
but maybe adding "[NoCD]" to the interface name would be enough.

-- 
Best regards,                                        _     _
| Humble Liege of Serenely Enlightened Majesty of  o' \,=./ `o
| Computer Science,  Michał "mina86" Nazarewicz       (o o)
+----[mina86*mina86.com]---[mina86*jabber.org]----ooO--(_)--Ooo--

  reply	other threads:[~2010-04-28  8:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-26  8:29 USB gadget with drivers "on board" Michał Nazarewicz
2010-04-26 14:16 ` Daniel Mack
2010-04-26 14:42   ` Michał Nazarewicz
2010-04-26 14:57     ` Daniel Mack
2010-04-26 15:45       ` Michał Nazarewicz
2010-04-26 17:37         ` Josua Dietze
2010-04-26 19:34           ` Alan Stern
2010-04-26 20:14             ` Josua Dietze
2010-04-28  8:46               ` Michał Nazarewicz [this message]
2010-04-28 11:31                 ` Michał Nazarewicz
2010-04-28 11:41                 ` Josua Dietze
2010-04-28 11:54                   ` Michał Nazarewicz
2010-04-28 15:59                 ` Alan Stern

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=op.vbu6nahq7p4s8u@pikus \
    --to=m.nazarewicz@samsung.com \
    --cc=daniel@caiaq.de \
    --cc=digidietze@draisberghof.de \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=stern@rowland.harvard.edu \
    /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