Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755140Ab0DZUPB (ORCPT ); Mon, 26 Apr 2010 16:15:01 -0400 Received: from 007.netroom.de ([194.0.247.207]:11131 "EHLO 007.netroom.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753417Ab0DZUPA (ORCPT ); Mon, 26 Apr 2010 16:15:00 -0400 Message-ID: <4BD5F43E.4090404@draisberghof.de> Date: Mon, 26 Apr 2010 22:14:54 +0200 From: Josua Dietze User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Alan Stern CC: =?UTF-8?B?TWljaGHFgiBOYXphcmV3aWN6?= , Daniel Mack , Marek Szyprowski , Kernel development list , USB list , Kyungmin Park Subject: Re: USB gadget with drivers "on board" References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1519 Lines: 36 Alan Stern schrieb: > 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. > > 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. 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). And it might be a good idea not to re-use any known ID for the install mode, like the 05c6:1000 which my Samsung phone and loads of other devices are using. This makes switch handling complicated (though not impossible). Josua Dietze -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/