From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758268AbcAYVCm (ORCPT ); Mon, 25 Jan 2016 16:02:42 -0500 Received: from transparentnimenzy.cz ([31.31.77.140]:34730 "EHLO smtp.devoid-pointer.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757396AbcAYVCj (ORCPT ); Mon, 25 Jan 2016 16:02:39 -0500 Message-ID: <1453755751.3994.2.camel@devoid-pointer.net> Subject: Re: [PATCH 0/2] Add a skeleton module to perform a basic initialization on certain USB devices From: Michal =?ISO-8859-1?Q?Mal=FD?= To: Jiri Kosina Cc: =?ISO-8859-1?Q?Bj=F8rn?= Mork , gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, dmitry.torokhov@gmail.com, elias.vds@gmail.com, edwin@velds.nl, simon@mungewell.org Date: Mon, 25 Jan 2016 22:02:31 +0100 In-Reply-To: References: <1453545311-5721-1-git-send-email-madcatxster@devoid-pointer.net> <87zivwbh07.fsf@nemi.mork.no> <6032606.IBdJ88hxWq@the-raza> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.4 (3.18.4-1.fc23) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2016-01-25 at 15:17 +0100, Jiri Kosina wrote: > On Sat, 23 Jan 2016, Michal Malý wrote: > > > I briefly considered leaving the switch up to the userspace and > handling the  > > device in the kernel only once it's been switched. I am however > uncertain how  > > to advertise this to the users. Writing a tiny app that would > currently handle  > > just one device seems like an overkill, abusing usb_modeswitch > seems counter- > > intuitive as it's purpose is to handle various USB modems.  > > Well, originally usb_modeswitch (beware, it's called "modeswitch", > not  > "modemswitch" :) ) was purely for handling ZeroCD on USB 3G modems, > and  > it's currently still by far the most common case, but there are > other  > devices being handled by that package now; I for example recall some  > HP printers needing a magic USB command to be sent to it before they > would  > start printing, and usb_modeswitch is handling those now AFAIK. > > So if we do this in userspace, I think usb_modeswitch is not a bad > choice. Ok, that's interesting... I tinkered with usb_modeswitch a bit and I made it switch the G920 just fine after a while. Consider the patches dropped then, letting usb_modeswitch take care of this sounds reasonable. Michal