On Monday, May 19, 2014 02:19:52 PM you wrote:
> On Sat, 2014-05-17 at 05:08 +0700, Alif Mubarak Ahmad wrote:
> > This device vendor and product id is 1c9e:9800
> > It is working as serial interface with generic usbserial driver.
> > I thought it is more suitable to use usbserial option driver, which
> > has better capability distinguishing between modem serial interface
> > and micro sd storage interface.
>
> Hi,
>
> does this solve the problem?
>
> Regards
> Oliver
>
> From a086773ae5dd1c417264937d049b93f45bac3991 Mon Sep 17 00:00:00
2001
> From: Oliver Neukum <[email protected]>
> Date: Mon, 19 May 2014 14:13:51 +0200
> Subject: [PATCH] option: add device ID
>
> Reported by Alif Mubarak Ahmad:
>
> This device vendor and product id is 1c9e:9800
> It is working as serial interface with generic usbserial driver.
> I thought it is more suitable to use usbserial option driver, which has
> better capability distinguishing between modem serial interface and micro
> sd storage interface.
>
> Signed-off-by: Oliver Neukum <[email protected]>
> ---
> drivers/usb/serial/option.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
> index f213ee9..5853fdf 100644
> --- a/drivers/usb/serial/option.c
> +++ b/drivers/usb/serial/option.c
> @@ -351,6 +351,9 @@ static void option_instat_callback(struct urb *urb);
> /* Zoom */
> #define ZOOM_PRODUCT_4597 0x9607
>
> +/* SU9800 usb 3g modem*/
> +#define SU9800_PRODUCT 0x9800
> +
> /* Haier products */
> #define HAIER_VENDOR_ID 0x201e
> #define HAIER_PRODUCT_CE100 0x2009
> @@ -1575,6 +1578,7 @@ static const struct usb_device_id option_ids[] = {
> { USB_DEVICE(LONGCHEER_VENDOR_ID,
FOUR_G_SYSTEMS_PRODUCT_W14),
> .driver_info = (kernel_ulong_t)&four_g_w14_blacklist
> },
> + { USB_DEVICE_INTERFACE_CLASS(LONGCHEER_VENDOR_ID,
SU9800_PRODUCT, 0xff) },
> { USB_DEVICE(LONGCHEER_VENDOR_ID, ZOOM_PRODUCT_4597) },
> { USB_DEVICE(LONGCHEER_VENDOR_ID, IBALL_3_5G_CONNECT) },
> { USB_DEVICE(HAIER_VENDOR_ID, HAIER_PRODUCT_CE100) },
I've applied the patch, but it seems rejected. I am using kernel 3.10.36 for
use with OpenWrt.
Applying patch generic/821-fixed-su9800.patch
patching file drivers/usb/serial/option.c
Hunk #1 succeeded at 326 with fuzz 2 (offset -25 lines).
patch unexpectedly ends in middle of line
Hunk #2 FAILED at 1578.
1 out of 2 hunks FAILED -- rejects in file drivers/usb/serial/option.c
Patch generic/821-fixed-su9800.patch does not apply (enforce with -f)
And now I'm trying to patch it manually. Here is the diff file generated by
quilt.
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -326,6 +326,9 @@ static void option_instat_callback(struc
/* Zoom */
#define ZOOM_PRODUCT_4597 0x9607
+/* SU9800 usb 3g modem*/
+#define SU9800_PRODUCT 0x9800
+
/* Haier products */
#define HAIER_VENDOR_ID 0x201e
#define HAIER_PRODUCT_CE100 0x2009
@@ -1503,6 +1506,7 @@ static const struct usb_device_id option
{ USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14),
.driver_info = (kernel_ulong_t)&four_g_w14_blacklist
},
+ { USB_DEVICE_INTERFACE_CLASS(LONGCHEER_VENDOR_ID,
SU9800_PRODUCT, 0xff)
{ USB_DEVICE(LONGCHEER_VENDOR_ID, ZOOM_PRODUCT_4597) },
{ USB_DEVICE(LONGCHEER_VENDOR_ID, IBALL_3_5G_CONNECT) },
{ USB_DEVICE(HAIER_VENDOR_ID, HAIER_PRODUCT_CE100) },
For your information, manually triggering echo 1c9e 9800 > /sys/bus/usb-
serial/drivers/option1/new_id works just fine.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html