[PATCH] usb-serial fix to use usb_driver_set_configuration

[email protected]
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
Greg --

Here is a patch that fixes the problem revealed
by the ti_usb_3410_5052 patch from Oleg.  I am
not sure this is the right way to fix it, but
I did test this briefly, and it worked for me.

This is a patch against 2.6.21-rc5.

-- Al
Signed-off-by: Al Borchers <[email protected]>

diff -ur --exclude-from=dontdiff linux-2.6.21-rc5.orig/drivers/usb/serial/usb-serial.c linux-2.6.21-rc5.new/drivers/usb/serial/usb-serial.c
--- linux-2.6.21-rc5.orig/drivers/usb/serial/usb-serial.c	2007-04-02 07:23:29.000000000 -0500
+++ linux-2.6.21-rc5.new/drivers/usb/serial/usb-serial.c	2007-04-02 05:37:59.000000000 -0500
@@ -118,7 +118,7 @@
 
 	dbg("%s", __FUNCTION__);
 
-	if (serial == NULL)
+	if (serial == NULL || serial->minor < 0)
 		return;
 
 	spin_lock(&table_lock);
@@ -610,6 +610,7 @@
 	serial->dev = usb_get_dev(dev);
 	serial->type = driver;
 	serial->interface = interface;
+	serial->minor = -1;
 	kref_init(&serial->kref);
 
 	return serial;
Only in linux-2.6.21-rc5.new/include/asm-i386: asm-offsets.h
diff -ur --exclude-from=dontdiff linux-2.6.21-rc5.orig/include/linux/usb/serial.h linux-2.6.21-rc5.new/include/linux/usb/serial.h
--- linux-2.6.21-rc5.orig/include/linux/usb/serial.h	2007-04-02 07:23:29.000000000 -0500
+++ linux-2.6.21-rc5.new/include/linux/usb/serial.h	2007-04-02 05:36:15.000000000 -0500
@@ -128,7 +128,7 @@
 	struct usb_device *		dev;
 	struct usb_serial_driver *	type;
 	struct usb_interface *		interface;
-	unsigned char			minor;
+	short				minor;
 	unsigned char			num_ports;
 	unsigned char			num_port_pointers;
 	char				num_interrupt_in;

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.