Re: [usb-storage] Toshiba G450 kernel patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 07 October 2009 15:23:06 Alan Stern wrote:
> On Wed, 7 Oct 2009, Josua Dietze wrote:
> 
> > Greg KH schrieb:
> > 
> > > On Tue, Oct 06, 2009 at 05:21:01PM -0700, Matthew Dharm wrote:
> > >> On Tue, Oct 06, 2009 at 03:40:35PM -0700, Greg KH wrote:
> > >>> On Tue, Oct 06, 2009 at 02:24:03PM -0700, Matthew Dharm wrote:
> > >>>> On Tue, Oct 06, 2009 at 11:16:07PM +0200, Peter Magdina wrote:
> > >>>>> Imagine you already have some USB serial device plugged and running
> > >>>>> and you decide to plug this one. I am not sure, because I don't
> > >>>>> have much experiences, but I guess you will have to unload usbserial
> > >>>>> module and load it once again with vendor/product params, don't you?
> > >>>>> And what will happen with already using other USB device ?
> > >>>> That's a fair criticism.  But I think the right thing to do here is to make
> > >>>> usb-serial accept new VID/PIDs without needing to be unloaded/reloaded,
> > >>>> then do everything in userspace.
> > >>> That works today for all usb devices with the sysfs new_id file.  So
> > >>> nothing needs to be done :)
> > >> In that case, we should reject this patch and push all of this into
> > >> userspace.
> > > 
> > > Ok, if it works there, fine :)
> > 
> > It does. As I said the script of usb_modeswitch will add the ID to 
> > "option" after switching via "new_id" (if it's not bound to "cdc_acm").
> 
> In fact, it would be useful to have a small patch adding the Toshiba's
> ID permanently to the option driver (assuming that is the correct 
> driver for this device).

Yes, I have tested it with my patch of course and option driver handles it
very well.
Below is everything what should be patched in option driver for this device.

Peter


Signed-off-by: Peter Magdina <peter@xxxxxxxxxx>

diff -Nparu linux-2.6.31.1-old/drivers/usb/serial/option.c linux-2.6.31.1-new/drivers/usb/serial/option.c
--- linux-2.6.31.1-old/drivers/usb/serial/option.c      2009-10-03 00:14:54.000000000 +0200
+++ linux-2.6.31.1-new/drivers/usb/serial/option.c      2009-10-06 23:16:50.000000000 +0200
@@ -317,6 +317,7 @@ static int  option_resume(struct usb_ser
 /* TOSHIBA PRODUCTS */
 #define TOSHIBA_VENDOR_ID                      0x0930
 #define TOSHIBA_PRODUCT_HSDPA_MINICARD         0x1302
+#define TOSHIBA_PRODUCT_G450                   0x0d45

 #define ALINK_VENDOR_ID                                0x1e0e
 #define ALINK_PRODUCT_3GU                      0x9200
@@ -578,6 +579,7 @@ static struct usb_device_id option_ids[]
        { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4523) },
        { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H20_4515) },
        { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H20_4519) },
+       { USB_DEVICE(TOSHIBA_VENDOR_ID, TOSHIBA_PRODUCT_G450) },
        { USB_DEVICE(TOSHIBA_VENDOR_ID, TOSHIBA_PRODUCT_HSDPA_MINICARD ) }, /* Toshiba 3G HSDPA == Novatel Expedite EU870D MiniCard */
        { USB_DEVICE(ALINK_VENDOR_ID, 0x9000) },
        { USB_DEVICE_AND_INTERFACE_INFO(ALINK_VENDOR_ID, ALINK_PRODUCT_3GU, 0xff, 0xff, 0xff) },

Signed-off-by: Peter Magdina <peter@xxxxxxxxxx>

diff -Nparu linux-2.6.31.1-old/drivers/usb/serial/option.c linux-2.6.31.1-new/drivers/usb/serial/option.c
--- linux-2.6.31.1-old/drivers/usb/serial/option.c	2009-10-03 00:14:54.000000000 +0200
+++ linux-2.6.31.1-new/drivers/usb/serial/option.c	2009-10-06 23:16:50.000000000 +0200
@@ -317,6 +317,7 @@ static int  option_resume(struct usb_ser
 /* TOSHIBA PRODUCTS */
 #define TOSHIBA_VENDOR_ID			0x0930
 #define TOSHIBA_PRODUCT_HSDPA_MINICARD		0x1302
+#define TOSHIBA_PRODUCT_G450			0x0d45
 
 #define ALINK_VENDOR_ID				0x1e0e
 #define ALINK_PRODUCT_3GU			0x9200
@@ -578,6 +579,7 @@ static struct usb_device_id option_ids[]
 	{ USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4523) },
 	{ USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H20_4515) },
 	{ USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H20_4519) },
+	{ USB_DEVICE(TOSHIBA_VENDOR_ID, TOSHIBA_PRODUCT_G450) },
 	{ USB_DEVICE(TOSHIBA_VENDOR_ID, TOSHIBA_PRODUCT_HSDPA_MINICARD ) }, /* Toshiba 3G HSDPA == Novatel Expedite EU870D MiniCard */
 	{ USB_DEVICE(ALINK_VENDOR_ID, 0x9000) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ALINK_VENDOR_ID, ALINK_PRODUCT_3GU, 0xff, 0xff, 0xff) },

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux