diff options
| author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-03-16 20:44:06 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-03-16 20:44:06 -0700 |
| commit | 46182ed3d5436f5987f197dcab174949d24f97d6 (patch) | |
| tree | 87c6f112264948389862256a751201dbf9f74ab8 /usb | |
| parent | c880c32ab82281b6df838ba8ddf89a4d654a2102 (diff) | |
| download | patches-46182ed3d5436f5987f197dcab174949d24f97d6.tar.gz | |
usb bug fixes and device ids
Diffstat (limited to 'usb')
11 files changed, 187 insertions, 20 deletions
diff --git a/usb/usb-cp2101-new-device-id.patch b/usb/usb-cp2101-new-device-id.patch new file mode 100644 index 00000000000000..b291bebfccc796 --- /dev/null +++ b/usb/usb-cp2101-new-device-id.patch @@ -0,0 +1,27 @@ +From alex@miranova.com Mon Mar 16 20:26:24 2009 +From: Alex Stephens <alex@miranova.com> +Date: Tue, 17 Mar 2009 00:06:19 +0000 +Subject: USB: CP2101 New Device ID +To: greg@kroah.com +Message-ID: <1237248379.19374.101.camel@ubuntu.ubuntu-domain> + +From: Alex Stephens alex@miranova.com + +One new device ID for CP2101 driver. + +Signed-off-by: Alex Stephens alex@miranova.com + +--- + drivers/usb/serial/cp210x.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/usb/serial/cp210x.c ++++ b/drivers/usb/serial/cp210x.c +@@ -87,6 +87,7 @@ static struct usb_device_id id_table [] + { USB_DEVICE(0x10c4, 0x8293) }, /* Telegesys ETRX2USB */ + { USB_DEVICE(0x10C4, 0x8341) }, /* Siemens MC35PU GPRS Modem */ + { USB_DEVICE(0x10C4, 0x83A8) }, /* Amber Wireless AMB2560 */ ++ { USB_DEVICE(0x10C4, 0x846E) }, /* BEI USB Sensor Interface (VCP) */ + { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ + { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */ + { USB_DEVICE(0x10C4, 0xF001) }, /* Elan Digital Systems USBscope50 */ diff --git a/usb/usb-fix-cp2101-usb-serial-device-driver-termios-functions-for-console-use.patch b/usb/usb-fix-cp2101-usb-serial-device-driver-termios-functions-for-console-use.patch new file mode 100644 index 00000000000000..41dbb44d530eac --- /dev/null +++ b/usb/usb-fix-cp2101-usb-serial-device-driver-termios-functions-for-console-use.patch @@ -0,0 +1,140 @@ +From dvomlehn@cisco.com Mon Mar 16 20:26:56 2009 +From: VomLehn <dvomlehn@cisco.com> +Date: Thu, 12 Mar 2009 14:37:42 -0700 +Subject: USB: Fix cp2101 USB serial device driver termios functions for console use +Message-ID: <20090312213742.GA7231@cuplxvomd02.corp.sa.net> +Content-Disposition: inline + + +This is really a follow up to the modifications Alan Cox made for commit +95da310e66ee8090119596c70ca8432e57f9a97f to pass a tty_struct to various +interface functions, which broke the serial configuration (termios) functions +when the device is being used as a console. These changes restore the +configuration to proper functioning both as a tty and as a console. As Alan +notes in that commit, these changes will need to be tweaked when we have +a proper console abstraction. + +Signed-off-by: David VomLehn <dvomlehn@cisco.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/cp210x.c | 53 +++++++++++++++++++++++++++++++++++--------- + 1 file changed, 43 insertions(+), 10 deletions(-) + +--- a/drivers/usb/serial/cp210x.c ++++ b/drivers/usb/serial/cp210x.c +@@ -38,17 +38,21 @@ static int cp2101_open(struct tty_struct + static void cp2101_cleanup(struct usb_serial_port *); + static void cp2101_close(struct tty_struct *, struct usb_serial_port *, + struct file*); +-static void cp2101_get_termios(struct tty_struct *); ++static void cp2101_get_termios(struct tty_struct *, ++ struct usb_serial_port *port); ++static void cp2101_get_termios_port(struct usb_serial_port *port, ++ unsigned int *cflagp, unsigned int *baudp); + static void cp2101_set_termios(struct tty_struct *, struct usb_serial_port *, + struct ktermios*); + static int cp2101_tiocmget(struct tty_struct *, struct file *); + static int cp2101_tiocmset(struct tty_struct *, struct file *, + unsigned int, unsigned int); ++static int cp2101_tiocmset_port(struct usb_serial_port *port, struct file *, ++ unsigned int, unsigned int); + static void cp2101_break_ctl(struct tty_struct *, int); + static int cp2101_startup(struct usb_serial *); + static void cp2101_shutdown(struct usb_serial *); + +- + static int debug; + + static struct usb_device_id id_table [] = { +@@ -369,10 +373,12 @@ static int cp2101_open(struct tty_struct + } + + /* Configure the termios structure */ +- cp2101_get_termios(tty); ++ cp2101_get_termios(tty, port); + + /* Set the DTR and RTS pins low */ +- cp2101_tiocmset(tty, NULL, TIOCM_DTR | TIOCM_RTS, 0); ++ cp2101_tiocmset_port(tty ? (struct usb_serial_port *) tty->driver_data ++ : port, ++ NULL, TIOCM_DTR | TIOCM_RTS, 0); + + return 0; + } +@@ -414,9 +420,31 @@ static void cp2101_close(struct tty_stru + * from the device, corrects any unsupported values, and configures the + * termios structure to reflect the state of the device + */ +-static void cp2101_get_termios (struct tty_struct *tty) ++static void cp2101_get_termios(struct tty_struct *tty, ++ struct usb_serial_port *port) ++{ ++ unsigned int baud; ++ ++ if (tty) { ++ cp2101_get_termios_port(tty->driver_data, ++ &tty->termios->c_cflag, &baud); ++ tty_encode_baud_rate(tty, baud, baud); ++ } ++ ++ else { ++ unsigned int cflag; ++ cflag = 0; ++ cp2101_get_termios_port(port, &cflag, &baud); ++ } ++} ++ ++/* ++ * cp2101_get_termios_port ++ * This is the heart of cp2101_get_termios which always uses a &usb_serial_port. ++ */ ++static void cp2101_get_termios_port(struct usb_serial_port *port, ++ unsigned int *cflagp, unsigned int *baudp) + { +- struct usb_serial_port *port = tty->driver_data; + unsigned int cflag, modem_ctl[4]; + unsigned int baud; + unsigned int bits; +@@ -429,9 +457,9 @@ static void cp2101_get_termios (struct t + baud = cp2101_quantise_baudrate((BAUD_RATE_GEN_FREQ + baud/2)/ baud); + + dbg("%s - baud rate = %d", __func__, baud); ++ *baudp = baud; + +- tty_encode_baud_rate(tty, baud, baud); +- cflag = tty->termios->c_cflag; ++ cflag = *cflagp; + + cp2101_get_config(port, CP2101_BITS, &bits, 2); + cflag &= ~CSIZE; +@@ -537,7 +565,7 @@ static void cp2101_get_termios (struct t + cflag &= ~CRTSCTS; + } + +- tty->termios->c_cflag = cflag; ++ *cflagp = cflag; + } + + static void cp2101_set_termios(struct tty_struct *tty, +@@ -669,6 +697,12 @@ static int cp2101_tiocmset (struct tty_s + unsigned int set, unsigned int clear) + { + struct usb_serial_port *port = tty->driver_data; ++ return cp2101_tiocmset_port(port, file, set, clear); ++} ++ ++static int cp2101_tiocmset_port(struct usb_serial_port *port, struct file *file, ++ unsigned int set, unsigned int clear) ++{ + unsigned int control = 0; + + dbg("%s - port %d", __func__, port->number); +@@ -693,7 +727,6 @@ static int cp2101_tiocmset (struct tty_s + dbg("%s - control = 0x%.4x", __func__, control); + + return cp2101_set_config(port, CP2101_CONTROL, &control, 2); +- + } + + static int cp2101_tiocmget (struct tty_struct *tty, struct file *file) diff --git a/usb/usb-storage-make-alauda-a-separate-module.patch b/usb/usb-storage-make-alauda-a-separate-module.patch index 37f1d1519c744d..1d163c73edea58 100644 --- a/usb/usb-storage-make-alauda-a-separate-module.patch +++ b/usb/usb-storage-make-alauda-a-separate-module.patch @@ -427,7 +427,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* Reported by RTE <raszilki@yandex.ru> */ UNUSUAL_DEV( 0x058f, 0x6387, 0x0141, 0x0141, "JetFlash", -@@ -975,13 +968,6 @@ UNUSUAL_DEV( 0x07af, 0x0006, 0x0100, 0x +@@ -977,13 +970,6 @@ UNUSUAL_DEV( 0x07af, 0x0006, 0x0100, 0x US_FL_SINGLE_LUN ), #endif diff --git a/usb/usb-storage-make-datafab-a-separate-module.patch b/usb/usb-storage-make-datafab-a-separate-module.patch index bfa8a7283be303..10940a401d71fd 100644 --- a/usb/usb-storage-make-datafab-a-separate-module.patch +++ b/usb/usb-storage-make-datafab-a-separate-module.patch @@ -346,7 +346,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +#endif /* defined(CONFIG_USB_STORAGE_DATAFAB) || ... */ --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h -@@ -990,84 +990,6 @@ UNUSUAL_DEV( 0x07b4, 0x010a, 0x0102, 0x +@@ -992,84 +992,6 @@ UNUSUAL_DEV( 0x07b4, 0x010a, 0x0102, 0x US_SC_SCSI, US_PR_ALAUDA, init_alauda, 0 ), #endif @@ -431,7 +431,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* Datafab KECF-USB / Sagatek DCS-CF / Simpletech Flashlink UCF-100 * Only revision 1.13 tested (same for all of the above devices, * based on the Datafab DF-UG-07 chip). Needed for US_FL_FIX_INQUIRY. -@@ -1271,14 +1193,6 @@ UNUSUAL_DEV( 0x0bc2, 0x3010, 0x0000, 0x0 +@@ -1273,14 +1195,6 @@ UNUSUAL_DEV( 0x0bc2, 0x3010, 0x0000, 0x0 US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_SANE_SENSE ), diff --git a/usb/usb-storage-make-freecom-a-separate-module.patch b/usb/usb-storage-make-freecom-a-separate-module.patch index b7333209fd7c53..7220e1a8985c2b 100644 --- a/usb/usb-storage-make-freecom-a-separate-module.patch +++ b/usb/usb-storage-make-freecom-a-separate-module.patch @@ -249,7 +249,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ums-sddr55-objs := sddr55.o --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h -@@ -956,13 +956,6 @@ UNUSUAL_DEV( 0x0781, 0x0100, 0x0100, 0x +@@ -958,13 +958,6 @@ UNUSUAL_DEV( 0x0781, 0x0100, 0x0100, 0x US_SC_SCSI, US_PR_CB, NULL, US_FL_SINGLE_LUN ), diff --git a/usb/usb-storage-make-isd200-a-separate-module.patch b/usb/usb-storage-make-isd200-a-separate-module.patch index 6af7785aba0b61..351bf1bc220ada 100644 --- a/usb/usb-storage-make-isd200-a-separate-module.patch +++ b/usb/usb-storage-make-isd200-a-separate-module.patch @@ -275,7 +275,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* Submitted by Sven Anderson <sven-linux@anderson.de> * There are at least four ProductIDs used for iPods, so I added 0x1202 and * 0x1204. They just need the US_FL_FIX_CAPACITY. As the bcdDevice appears -@@ -1373,14 +1339,6 @@ UNUSUAL_DEV( 0x0bc2, 0x3010, 0x0000, 0x0 +@@ -1375,14 +1341,6 @@ UNUSUAL_DEV( 0x0bc2, 0x3010, 0x0000, 0x0 US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_SANE_SENSE ), diff --git a/usb/usb-storage-make-onetouch-a-separate-module.patch b/usb/usb-storage-make-onetouch-a-separate-module.patch index ddc0b993a86ecc..ce7deea34ec2cf 100644 --- a/usb/usb-storage-make-onetouch-a-separate-module.patch +++ b/usb/usb-storage-make-onetouch-a-separate-module.patch @@ -203,7 +203,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> -#endif --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h -@@ -1180,23 +1180,6 @@ UNUSUAL_DEV( 0x0c45, 0x1060, 0x0100, 0x0 +@@ -1182,23 +1182,6 @@ UNUSUAL_DEV( 0x0c45, 0x1060, 0x0100, 0x0 US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_SINGLE_LUN ), diff --git a/usb/usb-storage-make-sddr09-a-separate-module.patch b/usb/usb-storage-make-sddr09-a-separate-module.patch index ec4328364ee398..abcfd058beab53 100644 --- a/usb/usb-storage-make-sddr09-a-separate-module.patch +++ b/usb/usb-storage-make-sddr09-a-separate-module.patch @@ -326,7 +326,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* Reported by Darsen Lu <darsen@micro.ee.nthu.edu.tw> */ UNUSUAL_DEV( 0x066f, 0x8000, 0x0001, 0x0001, "SigmaTel", -@@ -1055,14 +1034,6 @@ UNUSUAL_DEV( 0x0781, 0x0100, 0x0100, 0x +@@ -1057,14 +1036,6 @@ UNUSUAL_DEV( 0x0781, 0x0100, 0x0100, 0x US_SC_SCSI, US_PR_CB, NULL, US_FL_SINGLE_LUN ), @@ -341,7 +341,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> #ifdef CONFIG_USB_STORAGE_FREECOM UNUSUAL_DEV( 0x07ab, 0xfc01, 0x0000, 0x9999, "Freecom", -@@ -1089,12 +1060,7 @@ UNUSUAL_DEV( 0x07af, 0x0005, 0x0100, 0x +@@ -1091,12 +1062,7 @@ UNUSUAL_DEV( 0x07af, 0x0005, 0x0100, 0x US_SC_DEVICE, US_PR_DEVICE, usb_stor_euscsi_init, US_FL_SCM_MULT_TARG ), diff --git a/usb/usb-storage-make-sddr55-a-separate-module.patch b/usb/usb-storage-make-sddr55-a-separate-module.patch index 9fbf69477a7a57..29173ee1a3eb94 100644 --- a/usb/usb-storage-make-sddr55-a-separate-module.patch +++ b/usb/usb-storage-make-sddr55-a-separate-module.patch @@ -224,7 +224,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> -#endif --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h -@@ -1096,15 +1096,6 @@ UNUSUAL_DEV( 0x07c4, 0xa006, 0x0000, 0xf +@@ -1098,15 +1098,6 @@ UNUSUAL_DEV( 0x07c4, 0xa006, 0x0000, 0xf US_SC_SCSI, US_PR_DATAFAB, NULL, 0 ), #endif @@ -240,7 +240,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> #ifdef CONFIG_USB_STORAGE_DATAFAB /* Submitted by Olaf Hering <olh@suse.de> */ -@@ -1114,14 +1105,6 @@ UNUSUAL_DEV( 0x07c4, 0xa109, 0x0000, 0x +@@ -1116,14 +1107,6 @@ UNUSUAL_DEV( 0x07c4, 0xa109, 0x0000, 0x US_SC_SCSI, US_PR_DATAFAB, NULL, 0 ), #endif @@ -255,7 +255,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> #ifdef CONFIG_USB_STORAGE_DATAFAB /* Reported by Felix Moeller <felix@derklecks.de> -@@ -1346,13 +1329,6 @@ UNUSUAL_DEV( 0x0c0b, 0xa109, 0x0000, 0xf +@@ -1348,13 +1331,6 @@ UNUSUAL_DEV( 0x0c0b, 0xa109, 0x0000, 0xf US_SC_SCSI, US_PR_DATAFAB, NULL, US_FL_SINGLE_LUN ), #endif @@ -269,7 +269,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> UNUSUAL_DEV( 0x0d49, 0x7310, 0x0000, 0x9999, "Maxtor", -@@ -2039,14 +2015,6 @@ UNUSUAL_DEV( 0x4146, 0xba01, 0x0100, 0x +@@ -2041,14 +2017,6 @@ UNUSUAL_DEV( 0x4146, 0xba01, 0x0100, 0x "Micro Mini 1GB", US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE ), diff --git a/usb/usb-storage-make-shuttle_usbat-a-separate-module.patch b/usb/usb-storage-make-shuttle_usbat-a-separate-module.patch index 18436cfa79ab3b..616c06ed3ce496 100644 --- a/usb/usb-storage-make-shuttle_usbat-a-separate-module.patch +++ b/usb/usb-storage-make-shuttle_usbat-a-separate-module.patch @@ -467,7 +467,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* Reported by Dmitry Khlystov <adminimus@gmail.com> */ UNUSUAL_DEV( 0x04e8, 0x507c, 0x0220, 0x0220, "Samsung", -@@ -970,14 +950,6 @@ UNUSUAL_DEV( 0x0781, 0x0002, 0x0009, 0x +@@ -972,14 +952,6 @@ UNUSUAL_DEV( 0x0781, 0x0002, 0x0009, 0x US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_CAPACITY ), diff --git a/usb/usb-suspend-resume-support-for-option-driver.patch b/usb/usb-suspend-resume-support-for-option-driver.patch index 78a17aba8b3a1d..11a2074bcb07f9 100644 --- a/usb/usb-suspend-resume-support-for-option-driver.patch +++ b/usb/usb-suspend-resume-support-for-option-driver.patch @@ -33,7 +33,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* Vendor and product IDs */ #define OPTION_VENDOR_ID 0x0AF0 -@@ -527,6 +529,8 @@ static struct usb_driver option_driver = +@@ -523,6 +525,8 @@ static struct usb_driver option_driver = .name = "option", .probe = usb_serial_probe, .disconnect = usb_serial_disconnect, @@ -42,7 +42,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> .id_table = option_ids, .no_dynamic_id = 1, }; -@@ -555,6 +559,8 @@ static struct usb_serial_driver option_1 +@@ -551,6 +555,8 @@ static struct usb_serial_driver option_1 .attach = option_startup, .shutdown = option_shutdown, .read_int_callback = option_instat_callback, @@ -51,7 +51,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> }; static int debug; -@@ -825,10 +831,10 @@ static void option_instat_callback(struc +@@ -821,10 +827,10 @@ static void option_instat_callback(struc req_pkt->bRequestType, req_pkt->bRequest); } } else @@ -64,7 +64,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> urb->dev = serial->dev; err = usb_submit_urb(urb, GFP_ATOMIC); if (err) -@@ -847,7 +853,6 @@ static int option_write_room(struct tty_ +@@ -843,7 +849,6 @@ static int option_write_room(struct tty_ portdata = usb_get_serial_port_data(port); @@ -72,7 +72,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> for (i = 0; i < N_OUT_URB; i++) { this_urb = portdata->out_urbs[i]; if (this_urb && !test_bit(i, &portdata->out_busy)) -@@ -1109,14 +1114,12 @@ bail_out_error: +@@ -1105,14 +1110,12 @@ bail_out_error: return 1; } @@ -88,7 +88,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* Stop reading/writing urbs */ for (i = 0; i < serial->num_ports; ++i) { port = serial->port[i]; -@@ -1126,6 +1129,17 @@ static void option_shutdown(struct usb_s +@@ -1122,6 +1125,17 @@ static void option_shutdown(struct usb_s for (j = 0; j < N_OUT_URB; j++) usb_kill_urb(portdata->out_urbs[j]); } @@ -106,7 +106,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* Now free them */ for (i = 0; i < serial->num_ports; ++i) { -@@ -1156,6 +1170,66 @@ static void option_shutdown(struct usb_s +@@ -1152,6 +1166,66 @@ static void option_shutdown(struct usb_s } } |
