From: Maciej Szmigiero <mhej@o2.pl>
To: Greg KH <gregkh@suse.de>
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, 05 Feb 2011 22:41:20 +0100 [thread overview]
Message-ID: <4D4DC400.2040302@o2.pl> (raw)
In-Reply-To: <20110205192831.GA334@suse.de>
New version of patch which autodetects devices with ACM class.
Tested on Galaxy Spica.
Signed-off-by: Maciej Szmigiero <mhej@o2.pl>
diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
index 15a5d89..e1c4527 100644
--- a/drivers/usb/serial/visor.c
+++ b/drivers/usb/serial/visor.c
@@ -27,6 +27,7 @@
#include <linux/uaccess.h>
#include <linux/usb.h>
#include <linux/usb/serial.h>
+#include <linux/usb/cdc.h>
#include "visor.h"
/*
@@ -479,6 +480,15 @@ static int visor_probe(struct usb_serial *serial,
dbg("%s", __func__);
+ /* some Samsung Android phones in modem mode have the same ID */
+ /* as SPH-I500, but they are ACM devices, so dont bind to them */
+ if ((id->idVendor == SAMSUNG_VENDOR_ID) &&
+ (id->idProduct == SAMSUNG_SPH_I500_ID) &&
+ (serial->dev->descriptor.bDeviceClass == USB_CLASS_COMM) &&
+ (serial->dev->descriptor.bDeviceSubClass ==
+ USB_CDC_SUBCLASS_ACM))
+ return -ENODEV;
+
if (serial->dev->actconfig->desc.bConfigurationValue != 1) {
dev_err(&serial->dev->dev, "active config #%d != 1 ??\n",
serial->dev->actconfig->desc.bConfigurationValue);
next prev parent reply other threads:[~2011-02-05 21:41 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
2011-02-05 19:40 ` Maciej Szmigiero
2011-02-05 21:41 ` Maciej Szmigiero [this message]
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=4D4DC400.2040302@o2.pl \
--to=mhej@o2.pl \
--cc=alan@linux.intel.com \
--cc=gregkh@suse.de \
--cc=jhovold@gmail.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/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