From: Greg KH <gregkh@suse.de>
To: Maciej Szmigiero <mhej@o2.pl>
Cc: Johan Hovold <jhovold@gmail.com>, Joe Perches <joe@perches.com>,
Alan Cox <alan@linux.intel.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [USB]Add Samsung SGH-I500/Android modem ID switch to visor driver
Date: Sat, 5 Feb 2011 11:28:31 -0800 [thread overview]
Message-ID: <20110205192831.GA334@suse.de> (raw)
In-Reply-To: <4D4D9F37.4010201@o2.pl>
On Sat, Feb 05, 2011 at 08:04:23PM +0100, Maciej Szmigiero wrote:
> [USB]Add Samsung SGH-I500/Android modem ID switch to visor driver
>
> Samsung decided to reuse USB ID of its old CDMA phone SGH-I500 for the
> modem part of some of their Android phones. At least Galaxy Spica
> is affected.
Ick, no way, that's horrible.
> This modem needs ACM driver and does not work with visor driver which
> binds the conflicting ID for SGH-I500.
> Because SGH-I500 is pretty an old hardware its best to add switch to visor
> driver in cause somebody still wants to use that phone with Linux.
>
> Note that this is needed only when using the Android phone as modem,
> not in USB storage or ADB mode.
If the phone switches to modem mode, does it show up as a ACM class
device?
>
> Signed-off-by: Maciej Szmigiero <mhej@o2.pl>
>
> diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
> index 15a5d89..5e56ab3 100644
> --- a/drivers/usb/serial/visor.c
> +++ b/drivers/usb/serial/visor.c
> @@ -52,6 +52,7 @@ static int palm_os_4_probe(struct usb_serial *serial,
>
> /* Parameters that may be passed into the module. */
> static int debug;
> +static int enable_i500;
> static __u16 vendor;
> static __u16 product;
>
> @@ -479,6 +480,10 @@ static int visor_probe(struct usb_serial *serial,
>
> dbg("%s", __func__);
>
> + if ((!enable_i500) && (id->idVendor == SAMSUNG_VENDOR_ID) &&
> + (id->idProduct == SAMSUNG_SPH_I500_ID))
> + return -ENODEV;
> +
> if (serial->dev->actconfig->desc.bConfigurationValue != 1) {
> dev_err(&serial->dev->dev, "active config #%d != 1 ??\n",
> serial->dev->actconfig->desc.bConfigurationValue);
> @@ -718,6 +723,11 @@ MODULE_LICENSE("GPL");
> module_param(debug, bool, S_IRUGO | S_IWUSR);
> MODULE_PARM_DESC(debug, "Debug enabled or not");
>
> +module_param(enable_i500, bool, S_IRUGO);
> +MODULE_PARM_DESC(enable_i500, "Enable support for Samsung SPH-I500. "
> + "Causes USBID conflict with modem in Samsung "
> + "Android phones");
> +
Is there any way to dynamically detect this? We don't want it to be a
module parameter, as we will never know to set it.
Surely the configuration of the device looks different somehow? If it
reports itself as an ACM device, we should be able to detect that,
right?
thanks,
greg k-h
next prev parent reply other threads:[~2011-02-05 19:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-05 19:04 [USB]Add Samsung SGH-I500/Android modem ID switch to visor driver Maciej Szmigiero
2011-02-05 19:28 ` Greg KH [this message]
2011-02-05 19:40 ` Maciej Szmigiero
2011-02-05 21:41 ` Maciej Szmigiero
2011-02-05 23:29 ` Sergei Shtylyov
2011-02-06 20:04 ` Maciej Szmigiero
2011-02-07 11:25 ` Sergei Shtylyov
2011-02-07 11:42 ` Maciej Szmigiero
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=20110205192831.GA334@suse.de \
--to=gregkh@suse.de \
--cc=alan@linux.intel.com \
--cc=jhovold@gmail.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mhej@o2.pl \
/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