public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Policy re. cellular USB modem mode switch
@ 2008-08-09  2:45 Oliver Martin
  2008-08-09  2:49 ` [PATCH] Add vendor/product id of ZTE MF628 to option Oliver Martin
  2008-08-09  4:38 ` Policy re. cellular USB modem mode switch Greg KH
  0 siblings, 2 replies; 4+ messages in thread
From: Oliver Martin @ 2008-08-09  2:45 UTC (permalink / raw)
  To: linux-kernel

Hello,

trying to get my ZTE MF628 HSDPA modem to work left me wondering if
there is an established policy whether or not to include the "mode
switch" code most cellular USB modems need in the kernel or not.
Currently, the MF628 requires a userspace helper called usb_modeswitch
to be called [1] to change from mass storage mode to serial mode.
After, that it can be used with the usbserial driver or preferably,
after one adds the right vendor and product id, with the option driver.

The only other such device I know is the Huawei E220, which doesn't
require any userspace tools since 2.6.20. The usb_modeswitch website
lists quite a lot of devices as supported, do any other of them
*require* the use of this (or another) userspace tool? If so, is this
considered acceptable?

The main reason I'm asking this is to find out if I should try to put
the mode switch code in the kernel or not. In the meantime, I'll reply
to this message with a patch to add the vendor/product id of the MF628
to the option driver, which I guess is needed in any case.

Regards,
Oliver

[1] http://www.draisberghof.de/usb_modeswitch/
http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?t=81

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] Add vendor/product id of ZTE MF628 to option
  2008-08-09  2:45 Policy re. cellular USB modem mode switch Oliver Martin
@ 2008-08-09  2:49 ` Oliver Martin
  2008-08-09  4:53   ` Greg KH
  2008-08-09  4:38 ` Policy re. cellular USB modem mode switch Greg KH
  1 sibling, 1 reply; 4+ messages in thread
From: Oliver Martin @ 2008-08-09  2:49 UTC (permalink / raw)
  To: Oliver Martin; +Cc: linux-kernel

This adds the vendor and product id (19d2:0015) of the ZTE MF628 HSDPA
modem to the option driver. It still needs a mode switch command issued
beforehand, this is currently handled by a userspace tool.

Signed-off-by: Oliver Martin <oliver.martin@student.tuwien.ac.at>

Index: linux-2.6.27-rc2/drivers/usb/serial/option.c
===================================================================
--- linux-2.6.27-rc2.orig/drivers/usb/serial/option.c	2008-08-08 23:10:09.000000000 +0200
+++ linux-2.6.27-rc2/drivers/usb/serial/option.c	2008-08-08 23:10:33.000000000 +0200
@@ -197,6 +197,10 @@
 #define TELIT_VENDOR_ID				0x1bc7
 #define TELIT_PRODUCT_UC864E			0x1003
 
+/* ZTE PRODUCTS */
+#define ZTE_VENDOR_ID				0x19d2
+#define ZTE_PRODUCT_MF628			0x0015
+
 static struct usb_device_id option_ids[] = {
 	{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
 	{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
@@ -308,6 +312,7 @@
 	{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */
 	{ USB_DEVICE(MAXON_VENDOR_ID, 0x6280) }, /* BP3-USB & BP3-EXT HSDPA */
 	{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) },
+	{ USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628) },
 	{ } /* Terminating entry */
 };
 MODULE_DEVICE_TABLE(usb, option_ids);

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Policy re. cellular USB modem mode switch
  2008-08-09  2:45 Policy re. cellular USB modem mode switch Oliver Martin
  2008-08-09  2:49 ` [PATCH] Add vendor/product id of ZTE MF628 to option Oliver Martin
@ 2008-08-09  4:38 ` Greg KH
  1 sibling, 0 replies; 4+ messages in thread
From: Greg KH @ 2008-08-09  4:38 UTC (permalink / raw)
  To: Oliver Martin; +Cc: linux-kernel

On Sat, Aug 09, 2008 at 04:45:30AM +0200, Oliver Martin wrote:
> Hello,
> 
> trying to get my ZTE MF628 HSDPA modem to work left me wondering if
> there is an established policy whether or not to include the "mode
> switch" code most cellular USB modems need in the kernel or not.

Questions like this have been hashed out numerous times already on the
linux-usb mailing list.

> Currently, the MF628 requires a userspace helper called usb_modeswitch
> to be called [1] to change from mass storage mode to serial mode.
> After, that it can be used with the usbserial driver or preferably,
> after one adds the right vendor and product id, with the option driver.

Never use the usbserial generic driver with a device you actually want
to go fast :)

The option driver is better.

For switching modes, use the userspace program, it's not going to be
done within the kernel.  See the linux-usb archives for details.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Add vendor/product id of ZTE MF628 to option
  2008-08-09  2:49 ` [PATCH] Add vendor/product id of ZTE MF628 to option Oliver Martin
@ 2008-08-09  4:53   ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2008-08-09  4:53 UTC (permalink / raw)
  To: Oliver Martin; +Cc: linux-kernel

On Sat, Aug 09, 2008 at 04:49:26AM +0200, Oliver Martin wrote:
> This adds the vendor and product id (19d2:0015) of the ZTE MF628 HSDPA
> modem to the option driver. It still needs a mode switch command issued
> beforehand, this is currently handled by a userspace tool.
> 
> Signed-off-by: Oliver Martin <oliver.martin@student.tuwien.ac.at>

In the future, please CC: any usb patch to the linux-usb mailing list,
and the USB maintainer to make sure it gets picked up properly.
Otherwise, odds are I'll miss it :(

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-08-09  5:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-09  2:45 Policy re. cellular USB modem mode switch Oliver Martin
2008-08-09  2:49 ` [PATCH] Add vendor/product id of ZTE MF628 to option Oliver Martin
2008-08-09  4:53   ` Greg KH
2008-08-09  4:38 ` Policy re. cellular USB modem mode switch Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox