diff options
| author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-03-04 12:04:18 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-03-04 12:04:18 -0800 |
| commit | 628ecee749980f311e3c1e94d1abadeae0ce7302 (patch) | |
| tree | 59b4c6a58ba5eaa6dea52bfa9102e911df9a71ff /usb | |
| parent | 03ffbc0ec7926a4a6e5e0b978e91dc294f9390d2 (diff) | |
| download | patches-628ecee749980f311e3c1e94d1abadeae0ce7302.tar.gz | |
more patch fun
Diffstat (limited to 'usb')
7 files changed, 237 insertions, 106 deletions
diff --git a/usb/usb-add-support-for-axesstel-mv110h-cdma-modem.patch b/usb/usb-add-support-for-axesstel-mv110h-cdma-modem.patch new file mode 100644 index 00000000000000..552318c6dead80 --- /dev/null +++ b/usb/usb-add-support-for-axesstel-mv110h-cdma-modem.patch @@ -0,0 +1,39 @@ +From kozzi11@gmail.com Tue Mar 4 11:37:39 2008 +From: Daniel Koz�k <kozzi11@gmail.com> +Date: Tue, 4 Mar 2008 18:54:53 +0100 +Subject: USB: Add support for AXESSTEL MV110H CDMA modem +To: linux-usb@vger.kernel.org +Message-ID: <813cedd60803040954j4da4ee84g197e83b4f7ec6dec@mail.gmail.com> +Content-Disposition: inline + +From: Daniel Koz�k <kozzi11@gmail.com> + +Add entry for Axesstel MV110H CDMA modem (ID: 1726:1000) to option driver + +Signed-off-by: Daniel Koz�k <kozzi11@gmail.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/option.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -120,6 +120,9 @@ static int option_send_setup(struct usb + #define ANYDATA_PRODUCT_ADU_E100A 0x6501 + #define ANYDATA_PRODUCT_ADU_500A 0x6502 + ++#define AXESSTEL_VENDOR_ID 0x1726 ++#define AXESSTEL_PRODUCT_MV110H 0x1000 ++ + #define BANDRICH_VENDOR_ID 0x1A8D + #define BANDRICH_PRODUCT_C100_1 0x1002 + #define BANDRICH_PRODUCT_C100_2 0x1003 +@@ -192,6 +195,7 @@ static struct usb_device_id option_ids[] + { USB_DEVICE(DELL_VENDOR_ID, 0x8137) }, /* Dell Wireless HSDPA 5520 */ + { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) }, + { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, ++ { USB_DEVICE(AXESSTEL_VENDOR_ID, AXESSTEL_PRODUCT_MV110H) }, + { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) }, + { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) }, + { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) }, diff --git a/usb/usb-add-usb-serial-spcp8x5-driver.patch b/usb/usb-add-usb-serial-spcp8x5-driver.patch index 0f21e1a02cda00..422d8d48eea116 100644 --- a/usb/usb-add-usb-serial-spcp8x5-driver.patch +++ b/usb/usb-add-usb-serial-spcp8x5-driver.patch @@ -14,8 +14,8 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/usb/serial/Kconfig | 10 drivers/usb/serial/Makefile | 3 - drivers/usb/serial/spcp8x5.c | 1079 +++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 1091 insertions(+), 1 deletion(-) + drivers/usb/serial/spcp8x5.c | 1076 +++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 1088 insertions(+), 1 deletion(-) --- a/drivers/usb/serial/Kconfig +++ b/drivers/usb/serial/Kconfig @@ -58,7 +58,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> obj-$(CONFIG_USB_SERIAL_WHITEHEAT) += whiteheat.o --- /dev/null +++ b/drivers/usb/serial/spcp8x5.c -@@ -0,0 +1,1079 @@ +@@ -0,0 +1,1076 @@ +/* + * spcp8x5 USB to serial adaptor driver + * @@ -252,8 +252,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +static inline void free_ringbuf(struct ringbuf *pb) +{ + if (pb != NULL) { -+ if (pb->buf_buf != NULL) -+ kfree(pb->buf_buf); ++ kfree(pb->buf_buf); + kfree(pb); + } +} @@ -387,17 +386,14 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + dev_dbg(&serial->dev->dev, "device type = %d\n", (int)type); + + for (i = 0; i < serial->num_ports; ++i) { -+ priv = kmalloc(sizeof(struct spcp8x5_private), GFP_KERNEL); ++ priv = kzalloc(sizeof(struct spcp8x5_private), GFP_KERNEL); + if (!priv) + goto cleanup; + -+ memset(priv, 0x00, sizeof(struct spcp8x5_private)); + spin_lock_init(&priv->lock); + priv->buf = alloc_ringbuf(SPCP8x5_BUF_SIZE); -+ if (priv->buf == NULL) { -+ kfree(priv); -+ goto cleanup; -+ } ++ if (priv->buf == NULL) ++ goto cleanup2; + + init_waitqueue_head(&priv->delta_msr_wait); + priv->type = type; @@ -407,6 +403,8 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + + return 0; + ++cleanup2: ++ kfree(priv); +cleanup: + for (--i; i >= 0; --i) { + priv = usb_get_serial_port_data(serial->port[i]); @@ -429,7 +427,6 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + free_ringbuf(priv->buf); + kfree(priv); + usb_set_serial_port_data(serial->port[i] , NULL); -+ priv = NULL; + } + } +} @@ -788,7 +785,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + /* reschedule the read */ + urb->status = 0; + urb->dev = port->serial->dev; -+ result = usb_submit_urb(urb , GFP_KERNEL); ++ result = usb_submit_urb(urb , GFP_ATOMIC); + if (result) + dev_dbg(&port->dev, + "failed submitting read urb %d\n", @@ -833,7 +830,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + /* Schedule the next read _if_ we are still open */ + if (port->open_count) { + urb->dev = port->serial->dev; -+ result = usb_submit_urb(urb , GFP_KERNEL); ++ result = usb_submit_urb(urb , GFP_ATOMIC); + if (result) + dev_dbg(&port->dev, "failed submitting read urb %d\n", + result); @@ -875,7 +872,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + port->write_urb->transfer_buffer_length = count; + port->write_urb->dev = port->serial->dev; + -+ result = usb_submit_urb(port->write_urb, GFP_KERNEL); ++ result = usb_submit_urb(port->write_urb, GFP_ATOMIC); + if (result) { + dev_dbg(&port->dev, "failed submitting write urb, error %d\n", + result); @@ -915,7 +912,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + __func__, urb->status); + port->write_urb->transfer_buffer_length = 1; + port->write_urb->dev = port->serial->dev; -+ result = usb_submit_urb(port->write_urb, GFP_KERNEL); ++ result = usb_submit_urb(port->write_urb, GFP_ATOMIC); + if (result) + dev_dbg(&port->dev, + "failed resubmitting write urb %d\n", result); diff --git a/usb/usb-ftdi_sio-note-missing-locking.patch b/usb/usb-ftdi_sio-note-missing-locking.patch index 82486930c8cbd7..73739d37e00453 100644 --- a/usb/usb-ftdi_sio-note-missing-locking.patch +++ b/usb/usb-ftdi_sio-note-missing-locking.patch @@ -18,7 +18,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c -@@ -524,9 +524,8 @@ static int update_mctrl(struct usb_seria +@@ -531,9 +531,8 @@ static int update_mctrl(struct usb_seria } buf = kmalloc(1, GFP_NOIO); @@ -29,7 +29,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> clear &= ~set; /* 'set' takes precedence over 'clear' */ urb_value = 0; -@@ -559,6 +558,7 @@ static int update_mctrl(struct usb_seria +@@ -566,6 +565,7 @@ static int update_mctrl(struct usb_seria (clear & TIOCM_DTR) ? "LOW" : "unchanged", (set & TIOCM_RTS) ? "HIGH" : (clear & TIOCM_RTS) ? "LOW" : "unchanged"); diff --git a/usb/usb-ftdi_sio-workaround-for-broken-matrix-orbital-serial-port.patch b/usb/usb-ftdi_sio-workaround-for-broken-matrix-orbital-serial-port.patch new file mode 100644 index 00000000000000..e7e3546058b395 --- /dev/null +++ b/usb/usb-ftdi_sio-workaround-for-broken-matrix-orbital-serial-port.patch @@ -0,0 +1,95 @@ +From kvance@kvance.com Tue Mar 4 11:53:06 2008 +From: Kevin Vance <kvance@kvance.com> +Date: Sat, 1 Mar 2008 13:49:59 -0500 (EST) +Subject: USB: ftdi_sio: Workaround for broken Matrix Orbital serial port +Cc: Greg KH <greg@kroah.com> +Message-ID: <Pine.LNX.4.64.0803011335440.22676@localhost> + + +From: Kevin Vance <kvance@kvance.com> + +Workaround for the FT232RL-based, Matrix Orbital VK204-25-USB serial port +added to the ftdi_sio driver. + +The device has an invalid endpoint descriptor, which must be modified +before it can be used. + +Signed-off-by: Kevin Vance <kvance@kvance.com> +Cc: stable <stable@kernel.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/ftdi_sio.c | 24 ++++++++++++++++++++++++ + drivers/usb/serial/ftdi_sio.h | 7 +++++++ + 2 files changed, 31 insertions(+) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -92,6 +92,7 @@ struct ftdi_sio_quirk { + }; + + static int ftdi_jtag_probe (struct usb_serial *serial); ++static int ftdi_mtxorb_hack_setup (struct usb_serial *serial); + static void ftdi_USB_UIRT_setup (struct ftdi_private *priv); + static void ftdi_HE_TIRA1_setup (struct ftdi_private *priv); + +@@ -99,6 +100,10 @@ static struct ftdi_sio_quirk ftdi_jtag_q + .probe = ftdi_jtag_probe, + }; + ++static struct ftdi_sio_quirk ftdi_mtxorb_hack_quirk = { ++ .probe = ftdi_mtxorb_hack_setup, ++}; ++ + static struct ftdi_sio_quirk ftdi_USB_UIRT_quirk = { + .port_probe = ftdi_USB_UIRT_setup, + }; +@@ -161,6 +166,8 @@ static struct usb_device_id id_table_com + { USB_DEVICE(FTDI_VID, FTDI_MTXORB_4_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_MTXORB_5_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_MTXORB_6_PID) }, ++ { USB_DEVICE(MTXORB_VK_VID, MTXORB_VK_PID), ++ .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, + { USB_DEVICE(FTDI_VID, FTDI_PERLE_ULTRAPORT_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_PIEGROUP_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_TNC_X_PID) }, +@@ -1088,6 +1095,23 @@ static int ftdi_jtag_probe(struct usb_se + return 0; + } + ++/* ++ * The Matrix Orbital VK204-25-USB has an invalid IN endpoint. ++ * We have to correct it if we want to read from it. ++ */ ++static int ftdi_mtxorb_hack_setup(struct usb_serial *serial) ++{ ++ struct usb_host_endpoint *ep = serial->dev->ep_in[1]; ++ struct usb_endpoint_descriptor *ep_desc = &ep->desc; ++ ++ if (ep->enabled && ep_desc->wMaxPacketSize == 0) { ++ ep_desc->wMaxPacketSize = 0x40; ++ info("Fixing invalid wMaxPacketSize on read pipe"); ++ } ++ ++ return 0; ++} ++ + /* ftdi_shutdown is called from usbserial:usb_serial_disconnect + * it is called when the usb device is disconnected + * +--- a/drivers/usb/serial/ftdi_sio.h ++++ b/drivers/usb/serial/ftdi_sio.h +@@ -102,6 +102,13 @@ + * (http://www.joernonline.de/dw/doku.php?id=start&idx=projects:oocdlink) */ + #define FTDI_OOCDLINK_PID 0xbaf8 /* Amontec JTAGkey */ + ++/* ++ * The following are the values for the Matrix Orbital VK204-25-USB ++ * display, which use the FT232RL. ++ */ ++#define MTXORB_VK_VID 0x1b3d ++#define MTXORB_VK_PID 0x0158 ++ + /* Interbiometrics USB I/O Board */ + /* Developed for Interbiometrics by Rudolf Gugler */ + #define INTERBIOMETRICS_VID 0x1209 diff --git a/usb/usb-remove-unnecessary-type-casting-of-urb-context.patch b/usb/usb-remove-unnecessary-type-casting-of-urb-context.patch index 3f74f2beb7739f..4a5e7e3f3c8b8a 100644 --- a/usb/usb-remove-unnecessary-type-casting-of-urb-context.patch +++ b/usb/usb-remove-unnecessary-type-casting-of-urb-context.patch @@ -323,7 +323,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> int result; --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c -@@ -1354,7 +1354,7 @@ error_no_buffer: +@@ -1378,7 +1378,7 @@ error_no_buffer: static void ftdi_write_bulk_callback (struct urb *urb) { unsigned long flags; @@ -332,7 +332,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> struct ftdi_private *priv; int data_offset; /* will be 1 for the SIO and 0 otherwise */ unsigned long countback; -@@ -1437,7 +1437,7 @@ static int ftdi_chars_in_buffer (struct +@@ -1461,7 +1461,7 @@ static int ftdi_chars_in_buffer (struct static void ftdi_read_bulk_callback (struct urb *urb) { /* ftdi_read_bulk_callback */ @@ -810,7 +810,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> dbg("%s - port %0x\n", __func__, port->number); --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c -@@ -443,7 +443,7 @@ static void option_indat_callback(struct +@@ -447,7 +447,7 @@ static void option_indat_callback(struct dbg("%s: %p", __func__, urb); endpoint = usb_pipeendpoint(urb->pipe); @@ -819,7 +819,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> if (status) { dbg("%s: nonzero status: %d on endpoint %02x.", -@@ -477,7 +477,7 @@ static void option_outdat_callback(struc +@@ -481,7 +481,7 @@ static void option_outdat_callback(struc dbg("%s", __func__); @@ -828,7 +828,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> usb_serial_port_softint(port); -@@ -495,7 +495,7 @@ static void option_instat_callback(struc +@@ -499,7 +499,7 @@ static void option_instat_callback(struc { int err; int status = urb->status; diff --git a/usb/usb-replace-remaining-__function__-occurrences.patch b/usb/usb-replace-remaining-__function__-occurrences.patch index 0f78a81f75d0b2..e740b1130695fa 100644 --- a/usb/usb-replace-remaining-__function__-occurrences.patch +++ b/usb/usb-replace-remaining-__function__-occurrences.patch @@ -5921,7 +5921,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c -@@ -519,7 +519,7 @@ static int update_mctrl(struct usb_seria +@@ -526,7 +526,7 @@ static int update_mctrl(struct usb_seria int rv; if (((set | clear) & (TIOCM_DTR | TIOCM_RTS)) == 0) { @@ -5930,7 +5930,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> return 0; /* no change */ } -@@ -547,13 +547,13 @@ static int update_mctrl(struct usb_seria +@@ -554,13 +554,13 @@ static int update_mctrl(struct usb_seria kfree(buf); if (rv < 0) { err("%s Error from MODEM_CTRL urb: DTR %s, RTS %s", @@ -5946,7 +5946,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> (set & TIOCM_DTR) ? "HIGH" : (clear & TIOCM_DTR) ? "LOW" : "unchanged", (set & TIOCM_RTS) ? "HIGH" : -@@ -633,7 +633,7 @@ static __u32 get_ftdi_divisor(struct usb +@@ -640,7 +640,7 @@ static __u32 get_ftdi_divisor(struct usb /* 1. Get the baud rate from the tty settings, this observes alt_speed hack */ baud = tty_get_baud_rate(port->tty); @@ -5955,7 +5955,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* 2. Observe async-compatible custom_divisor hack, update baudrate if needed */ -@@ -641,7 +641,7 @@ static __u32 get_ftdi_divisor(struct usb +@@ -648,7 +648,7 @@ static __u32 get_ftdi_divisor(struct usb ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST) && (priv->custom_divisor)) { baud = priv->baud_base / priv->custom_divisor; @@ -5964,7 +5964,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } /* 3. Convert baudrate to device-specific divisor */ -@@ -662,7 +662,7 @@ static __u32 get_ftdi_divisor(struct usb +@@ -669,7 +669,7 @@ static __u32 get_ftdi_divisor(struct usb case 115200: div_value = ftdi_sio_b115200; break; } /* baud */ if (div_value == 0) { @@ -5973,7 +5973,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> div_value = ftdi_sio_b9600; baud = 9600; div_okay = 0; -@@ -672,7 +672,7 @@ static __u32 get_ftdi_divisor(struct usb +@@ -679,7 +679,7 @@ static __u32 get_ftdi_divisor(struct usb if (baud <= 3000000) { div_value = ftdi_232am_baud_to_divisor(baud); } else { @@ -5982,7 +5982,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> baud = 9600; div_value = ftdi_232am_baud_to_divisor(9600); div_okay = 0; -@@ -684,7 +684,7 @@ static __u32 get_ftdi_divisor(struct usb +@@ -691,7 +691,7 @@ static __u32 get_ftdi_divisor(struct usb if (baud <= 3000000) { div_value = ftdi_232bm_baud_to_divisor(baud); } else { @@ -5991,7 +5991,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> div_value = ftdi_232bm_baud_to_divisor(9600); div_okay = 0; baud = 9600; -@@ -694,7 +694,7 @@ static __u32 get_ftdi_divisor(struct usb +@@ -701,7 +701,7 @@ static __u32 get_ftdi_divisor(struct usb if (div_okay) { dbg("%s - Baud rate set to %d (divisor 0x%lX) on chip %s", @@ -6000,7 +6000,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ftdi_chip_name[priv->chip_type]); } -@@ -795,7 +795,7 @@ static void ftdi_determine_type(struct u +@@ -802,7 +802,7 @@ static void ftdi_determine_type(struct u version = le16_to_cpu(udev->descriptor.bcdDevice); interfaces = udev->actconfig->desc.bNumInterfaces; @@ -6009,7 +6009,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> version, interfaces); if (interfaces > 1) { int inter; -@@ -813,7 +813,7 @@ static void ftdi_determine_type(struct u +@@ -820,7 +820,7 @@ static void ftdi_determine_type(struct u * to 0x200 when iSerialNumber is 0. */ if (version < 0x500) { dbg("%s: something fishy - bcdDevice too low for multi-interface device", @@ -6018,7 +6018,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } } else if (version < 0x200) { /* Old device. Assume its the original SIO. */ -@@ -851,7 +851,7 @@ static ssize_t show_latency_timer(struct +@@ -858,7 +858,7 @@ static ssize_t show_latency_timer(struct int rv = 0; @@ -6027,7 +6027,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> rv = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), -@@ -878,7 +878,7 @@ static ssize_t store_latency_timer(struc +@@ -885,7 +885,7 @@ static ssize_t store_latency_timer(struc int v = simple_strtoul(valbuf, NULL, 10); int rv = 0; @@ -6036,7 +6036,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> rv = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), -@@ -907,7 +907,7 @@ static ssize_t store_event_char(struct d +@@ -914,7 +914,7 @@ static ssize_t store_event_char(struct d int v = simple_strtoul(valbuf, NULL, 10); int rv = 0; @@ -6045,7 +6045,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> rv = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), -@@ -932,7 +932,7 @@ static int create_sysfs_attrs(struct usb +@@ -939,7 +939,7 @@ static int create_sysfs_attrs(struct usb struct ftdi_private *priv = usb_get_serial_port_data(port); int retval = 0; @@ -6054,7 +6054,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* XXX I've no idea if the original SIO supports the event_char * sysfs parameter, so I'm playing it safe. */ -@@ -954,7 +954,7 @@ static void remove_sysfs_attrs(struct us +@@ -961,7 +961,7 @@ static void remove_sysfs_attrs(struct us { struct ftdi_private *priv = usb_get_serial_port_data(port); @@ -6063,7 +6063,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* XXX see create_sysfs_attrs */ if (priv->chip_type != SIO) { -@@ -996,11 +996,11 @@ static int ftdi_sio_port_probe(struct us +@@ -1003,11 +1003,11 @@ static int ftdi_sio_port_probe(struct us struct ftdi_sio_quirk *quirk = usb_get_serial_data(port->serial); @@ -6077,7 +6077,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> return -ENOMEM; } -@@ -1049,7 +1049,7 @@ static int ftdi_sio_port_probe(struct us +@@ -1056,7 +1056,7 @@ static int ftdi_sio_port_probe(struct us /* Called from usbserial:serial_probe */ static void ftdi_USB_UIRT_setup (struct ftdi_private *priv) { @@ -6086,7 +6086,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> priv->flags |= ASYNC_SPD_CUST; priv->custom_divisor = 77; -@@ -1060,7 +1060,7 @@ static void ftdi_USB_UIRT_setup (struct +@@ -1067,7 +1067,7 @@ static void ftdi_USB_UIRT_setup (struct * baudrate (38400 gets mapped to 100000) and RTS-CTS enabled. */ static void ftdi_HE_TIRA1_setup (struct ftdi_private *priv) { @@ -6095,7 +6095,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> priv->flags |= ASYNC_SPD_CUST; priv->custom_divisor = 240; -@@ -1078,7 +1078,7 @@ static int ftdi_jtag_probe(struct usb_se +@@ -1085,7 +1085,7 @@ static int ftdi_jtag_probe(struct usb_se struct usb_device *udev = serial->dev; struct usb_interface *interface = serial->interface; @@ -6104,7 +6104,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> if (interface == udev->actconfig->interface[0]) { info("Ignoring serial port reserved for JTAG"); -@@ -1097,14 +1097,14 @@ static int ftdi_jtag_probe(struct usb_se +@@ -1121,14 +1121,14 @@ static int ftdi_mtxorb_hack_setup(struct */ static void ftdi_shutdown (struct usb_serial *serial) { @@ -6121,7 +6121,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> remove_sysfs_attrs(port); -@@ -1129,7 +1129,7 @@ static int ftdi_open (struct usb_serial +@@ -1153,7 +1153,7 @@ static int ftdi_open (struct usb_serial int result = 0; char buf[1]; /* Needed for the usb_control_msg I think */ @@ -6130,7 +6130,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> spin_lock_irqsave(&priv->tx_lock, flags); priv->tx_bytes = 0; -@@ -1174,7 +1174,7 @@ static int ftdi_open (struct usb_serial +@@ -1198,7 +1198,7 @@ static int ftdi_open (struct usb_serial ftdi_read_bulk_callback, port); result = usb_submit_urb(port->read_urb, GFP_KERNEL); if (result) @@ -6139,7 +6139,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> return result; -@@ -1196,7 +1196,7 @@ static void ftdi_close (struct usb_seria +@@ -1220,7 +1220,7 @@ static void ftdi_close (struct usb_seria struct ftdi_private *priv = usb_get_serial_port_data(port); char buf[1]; @@ -6148,7 +6148,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> mutex_lock(&port->serial->disc_mutex); if (c_cflag & HUPCL && !port->serial->disconnected){ -@@ -1243,7 +1243,7 @@ static int ftdi_write (struct usb_serial +@@ -1267,7 +1267,7 @@ static int ftdi_write (struct usb_serial int transfer_size; unsigned long flags; @@ -6157,7 +6157,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> if (count == 0) { dbg("write request of 0 bytes"); -@@ -1252,7 +1252,7 @@ static int ftdi_write (struct usb_serial +@@ -1276,7 +1276,7 @@ static int ftdi_write (struct usb_serial spin_lock_irqsave(&priv->tx_lock, flags); if (priv->tx_outstanding_urbs > URB_UPPER_LIMIT) { spin_unlock_irqrestore(&priv->tx_lock, flags); @@ -6166,7 +6166,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> return 0; } priv->tx_outstanding_urbs++; -@@ -1272,14 +1272,14 @@ static int ftdi_write (struct usb_serial +@@ -1296,14 +1296,14 @@ static int ftdi_write (struct usb_serial buffer = kmalloc (transfer_size, GFP_ATOMIC); if (!buffer) { @@ -6183,7 +6183,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> count = -ENOMEM; goto error_no_urb; } -@@ -1311,7 +1311,7 @@ static int ftdi_write (struct usb_serial +@@ -1335,7 +1335,7 @@ static int ftdi_write (struct usb_serial memcpy (buffer, buf, count); } @@ -6192,7 +6192,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* fill the buffer and send it */ usb_fill_bulk_urb(urb, port->serial->dev, -@@ -1321,7 +1321,7 @@ static int ftdi_write (struct usb_serial +@@ -1345,7 +1345,7 @@ static int ftdi_write (struct usb_serial status = usb_submit_urb(urb, GFP_ATOMIC); if (status) { @@ -6201,7 +6201,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> count = status; goto error; } else { -@@ -1335,7 +1335,7 @@ static int ftdi_write (struct usb_serial +@@ -1359,7 +1359,7 @@ static int ftdi_write (struct usb_serial * really free it when it is finished with it */ usb_free_urb(urb); @@ -6210,7 +6210,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> return count; error: usb_free_urb(urb); -@@ -1363,7 +1363,7 @@ static void ftdi_write_bulk_callback (st +@@ -1387,7 +1387,7 @@ static void ftdi_write_bulk_callback (st /* free up the transfer buffer, as usb_free_urb() does not do this */ kfree (urb->transfer_buffer); @@ -6219,7 +6219,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> if (status) { dbg("nonzero write bulk status received: %d", status); -@@ -1372,7 +1372,7 @@ static void ftdi_write_bulk_callback (st +@@ -1396,7 +1396,7 @@ static void ftdi_write_bulk_callback (st priv = usb_get_serial_port_data(port); if (!priv) { @@ -6228,7 +6228,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> return; } /* account for transferred data */ -@@ -1397,7 +1397,7 @@ static int ftdi_write_room( struct usb_s +@@ -1421,7 +1421,7 @@ static int ftdi_write_room( struct usb_s int room; unsigned long flags; @@ -6237,7 +6237,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> spin_lock_irqsave(&priv->tx_lock, flags); if (priv->tx_outstanding_urbs < URB_UPPER_LIMIT) { -@@ -1421,13 +1421,13 @@ static int ftdi_chars_in_buffer (struct +@@ -1445,13 +1445,13 @@ static int ftdi_chars_in_buffer (struct int buffered; unsigned long flags; @@ -6253,7 +6253,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> buffered = 0; } return buffered; -@@ -1445,30 +1445,30 @@ static void ftdi_read_bulk_callback (str +@@ -1469,30 +1469,30 @@ static void ftdi_read_bulk_callback (str int status = urb->status; if (urb->number_of_packets > 0) { @@ -6290,7 +6290,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } if (status) { -@@ -1506,39 +1506,39 @@ static void ftdi_process_read (struct wo +@@ -1530,39 +1530,39 @@ static void ftdi_process_read (struct wo int packet_offset; unsigned long flags; @@ -6336,7 +6336,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } else { dbg("Status only: %03oo %03oo",data[0],data[1]); } -@@ -1568,17 +1568,17 @@ static void ftdi_process_read (struct wo +@@ -1592,17 +1592,17 @@ static void ftdi_process_read (struct wo length = min(PKTSZ, urb->actual_length-packet_offset)-2; if (length < 0) { @@ -6357,7 +6357,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> break; } -@@ -1646,7 +1646,7 @@ static void ftdi_process_read (struct wo +@@ -1670,7 +1670,7 @@ static void ftdi_process_read (struct wo /* not completely processed - record progress */ priv->rx_processed = packet_offset; dbg("%s - incomplete, %d bytes processed, %d remain", @@ -6366,7 +6366,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> urb->actual_length - packet_offset); /* check if we were throttled while processing */ spin_lock_irqsave(&priv->rx_lock, flags); -@@ -1654,7 +1654,7 @@ static void ftdi_process_read (struct wo +@@ -1678,7 +1678,7 @@ static void ftdi_process_read (struct wo priv->rx_flags |= ACTUALLY_THROTTLED; spin_unlock_irqrestore(&priv->rx_lock, flags); dbg("%s - deferring remainder until unthrottled", @@ -6375,7 +6375,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> return; } spin_unlock_irqrestore(&priv->rx_lock, flags); -@@ -1663,7 +1663,7 @@ static void ftdi_process_read (struct wo +@@ -1687,7 +1687,7 @@ static void ftdi_process_read (struct wo /* delay processing of remainder */ schedule_delayed_work(&priv->rx_work, 1); } else { @@ -6384,7 +6384,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } return; } -@@ -1681,7 +1681,7 @@ static void ftdi_process_read (struct wo +@@ -1705,7 +1705,7 @@ static void ftdi_process_read (struct wo result = usb_submit_urb(port->read_urb, GFP_ATOMIC); if (result) @@ -6393,7 +6393,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } return; -@@ -1710,10 +1710,10 @@ static void ftdi_break_ctl( struct usb_s +@@ -1734,10 +1734,10 @@ static void ftdi_break_ctl( struct usb_s FTDI_SIO_SET_DATA_REQUEST_TYPE, urb_value , priv->interface, buf, 0, WDR_TIMEOUT) < 0) { @@ -6406,7 +6406,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } -@@ -1737,18 +1737,18 @@ static void ftdi_set_termios (struct usb +@@ -1761,18 +1761,18 @@ static void ftdi_set_termios (struct usb unsigned char vstop; unsigned char vstart; @@ -6428,7 +6428,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> termios->c_cflag |= CRTSCTS; } -@@ -1792,7 +1792,7 @@ static void ftdi_set_termios (struct usb +@@ -1816,7 +1816,7 @@ static void ftdi_set_termios (struct usb FTDI_SIO_SET_DATA_REQUEST_TYPE, urb_value , priv->interface, buf, 0, WDR_SHORT_TIMEOUT) < 0) { @@ -6437,7 +6437,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } /* Now do the baudrate */ -@@ -1803,14 +1803,14 @@ static void ftdi_set_termios (struct usb +@@ -1827,14 +1827,14 @@ static void ftdi_set_termios (struct usb FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE, 0, priv->interface, buf, 0, WDR_TIMEOUT) < 0) { @@ -6454,7 +6454,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } /* Ensure RTS and DTR are raised when baudrate changed from 0 */ if (!old_termios || (old_termios->c_cflag & CBAUD) == B0) { -@@ -1821,7 +1821,7 @@ static void ftdi_set_termios (struct usb +@@ -1845,7 +1845,7 @@ static void ftdi_set_termios (struct usb /* Set flow control */ /* Note device also supports DTR/CD (ugh) and Xon/Xoff in hardware */ if (cflag & CRTSCTS) { @@ -6463,7 +6463,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> if (usb_control_msg(dev, usb_sndctrlpipe(dev, 0), FTDI_SIO_SET_FLOW_CTRL_REQUEST, -@@ -1839,7 +1839,7 @@ static void ftdi_set_termios (struct usb +@@ -1863,7 +1863,7 @@ static void ftdi_set_termios (struct usb * if IXOFF is not set, the pre-xon/xoff code is executed. */ if (iflag & IXOFF) { @@ -6472,7 +6472,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> // Try to enable the XON/XOFF on the ftdi_sio // Set the vstart and vstop -- could have been done up above where // a lot of other dereferencing is done but that would be very -@@ -1860,7 +1860,7 @@ static void ftdi_set_termios (struct usb +@@ -1884,7 +1884,7 @@ static void ftdi_set_termios (struct usb } else { /* else clause to only run if cfag ! CRTSCTS and iflag ! XOFF */ /* CHECKME Assuming XON/XOFF handled by tty stack - not by device */ @@ -6481,7 +6481,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> if (usb_control_msg(dev, usb_sndctrlpipe(dev, 0), FTDI_SIO_SET_FLOW_CTRL_REQUEST, -@@ -1882,7 +1882,7 @@ static int ftdi_tiocmget (struct usb_ser +@@ -1906,7 +1906,7 @@ static int ftdi_tiocmget (struct usb_ser unsigned char buf[2]; int ret; @@ -6490,7 +6490,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> switch (priv->chip_type) { case SIO: /* Request the status from the device */ -@@ -1892,7 +1892,7 @@ static int ftdi_tiocmget (struct usb_ser +@@ -1916,7 +1916,7 @@ static int ftdi_tiocmget (struct usb_ser FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE, 0, 0, buf, 1, WDR_TIMEOUT)) < 0 ) { @@ -6499,7 +6499,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ret); return(ret); } -@@ -1909,7 +1909,7 @@ static int ftdi_tiocmget (struct usb_ser +@@ -1933,7 +1933,7 @@ static int ftdi_tiocmget (struct usb_ser FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE, 0, priv->interface, buf, 2, WDR_TIMEOUT)) < 0 ) { @@ -6508,7 +6508,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ret); return(ret); } -@@ -1928,7 +1928,7 @@ static int ftdi_tiocmget (struct usb_ser +@@ -1952,7 +1952,7 @@ static int ftdi_tiocmget (struct usb_ser static int ftdi_tiocmset(struct usb_serial_port *port, struct file * file, unsigned int set, unsigned int clear) { @@ -6517,7 +6517,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> return update_mctrl(port, set, clear); } -@@ -1937,7 +1937,7 @@ static int ftdi_ioctl (struct usb_serial +@@ -1961,7 +1961,7 @@ static int ftdi_ioctl (struct usb_serial { struct ftdi_private *priv = usb_get_serial_port_data(port); @@ -6526,7 +6526,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* Based on code from acm.c and others */ switch (cmd) { -@@ -1996,7 +1996,7 @@ static int ftdi_ioctl (struct usb_serial +@@ -2020,7 +2020,7 @@ static int ftdi_ioctl (struct usb_serial /* This is not necessarily an error - turns out the higher layers will do * some ioctls itself (see comment above) */ @@ -6535,7 +6535,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> return(-ENOIOCTLCMD); } /* ftdi_ioctl */ -@@ -2007,7 +2007,7 @@ static void ftdi_throttle (struct usb_se +@@ -2031,7 +2031,7 @@ static void ftdi_throttle (struct usb_se struct ftdi_private *priv = usb_get_serial_port_data(port); unsigned long flags; @@ -6544,7 +6544,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> spin_lock_irqsave(&priv->rx_lock, flags); priv->rx_flags |= THROTTLED; -@@ -2021,7 +2021,7 @@ static void ftdi_unthrottle (struct usb_ +@@ -2045,7 +2045,7 @@ static void ftdi_unthrottle (struct usb_ int actually_throttled; unsigned long flags; @@ -6553,7 +6553,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> spin_lock_irqsave(&priv->rx_lock, flags); actually_throttled = priv->rx_flags & ACTUALLY_THROTTLED; -@@ -2036,7 +2036,7 @@ static int __init ftdi_init (void) +@@ -2060,7 +2060,7 @@ static int __init ftdi_init (void) { int retval; @@ -6562,7 +6562,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> if (vendor > 0 && product > 0) { /* Add user specified VID/PID to reserved element of table. */ int i; -@@ -2065,7 +2065,7 @@ failed_sio_register: +@@ -2089,7 +2089,7 @@ failed_sio_register: static void __exit ftdi_exit (void) { @@ -13785,7 +13785,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> kfree(usb_get_serial_port_data(port)); --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c -@@ -306,24 +306,24 @@ module_exit(option_exit); +@@ -310,24 +310,24 @@ module_exit(option_exit); static void option_rx_throttle(struct usb_serial_port *port) { @@ -13814,7 +13814,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* Doesn't support option setting */ tty_termios_copy_hw(port->tty->termios, old_termios); option_send_setup(port); -@@ -384,7 +384,7 @@ static int option_write(struct usb_seria +@@ -388,7 +388,7 @@ static int option_write(struct usb_seria portdata = usb_get_serial_port_data(port); @@ -13823,7 +13823,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> i = 0; left = count; -@@ -405,7 +405,7 @@ static int option_write(struct usb_seria +@@ -409,7 +409,7 @@ static int option_write(struct usb_seria dbg("usb_write %p failed (err=%d)", this_urb, this_urb->status); @@ -13832,7 +13832,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> usb_pipeendpoint(this_urb->pipe), i); /* send the data */ -@@ -427,7 +427,7 @@ static int option_write(struct usb_seria +@@ -431,7 +431,7 @@ static int option_write(struct usb_seria } count -= left; @@ -13841,7 +13841,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> return count; } -@@ -440,14 +440,14 @@ static void option_indat_callback(struct +@@ -444,14 +444,14 @@ static void option_indat_callback(struct unsigned char *data = urb->transfer_buffer; int status = urb->status; @@ -13858,7 +13858,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } else { tty = port->tty; if (urb->actual_length) { -@@ -455,7 +455,7 @@ static void option_indat_callback(struct +@@ -459,7 +459,7 @@ static void option_indat_callback(struct tty_insert_flip_string(tty, data, urb->actual_length); tty_flip_buffer_push(tty); } else { @@ -13867,7 +13867,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } /* Resubmit urb so we continue receiving */ -@@ -463,7 +463,7 @@ static void option_indat_callback(struct +@@ -467,7 +467,7 @@ static void option_indat_callback(struct err = usb_submit_urb(urb, GFP_ATOMIC); if (err) printk(KERN_ERR "%s: resubmit read urb failed. " @@ -13876,7 +13876,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } } return; -@@ -475,7 +475,7 @@ static void option_outdat_callback(struc +@@ -479,7 +479,7 @@ static void option_outdat_callback(struc struct option_port_private *portdata; int i; @@ -13885,7 +13885,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> port = (struct usb_serial_port *) urb->context; -@@ -499,15 +499,15 @@ static void option_instat_callback(struc +@@ -503,15 +503,15 @@ static void option_instat_callback(struc struct option_port_private *portdata = usb_get_serial_port_data(port); struct usb_serial *serial = port->serial; @@ -13904,7 +13904,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> return; } if ((req_pkt->bRequestType == 0xA1) && -@@ -517,7 +517,7 @@ static void option_instat_callback(struc +@@ -521,7 +521,7 @@ static void option_instat_callback(struc urb->transfer_buffer + sizeof(struct usb_ctrlrequest)); @@ -13913,7 +13913,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> old_dcd_state = portdata->dcd_state; portdata->cts_state = 1; -@@ -529,11 +529,11 @@ static void option_instat_callback(struc +@@ -533,11 +533,11 @@ static void option_instat_callback(struc old_dcd_state && !portdata->dcd_state) tty_hangup(port->tty); } else { @@ -13927,7 +13927,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* Resubmit urb so we continue receiving IRQ data */ if (status != -ESHUTDOWN) { -@@ -541,7 +541,7 @@ static void option_instat_callback(struc +@@ -545,7 +545,7 @@ static void option_instat_callback(struc err = usb_submit_urb(urb, GFP_ATOMIC); if (err) dbg("%s: resubmit intr urb failed. (%d)", @@ -13936,7 +13936,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } } -@@ -560,7 +560,7 @@ static int option_write_room(struct usb_ +@@ -564,7 +564,7 @@ static int option_write_room(struct usb_ data_len += OUT_BUFLEN; } @@ -13945,7 +13945,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> return data_len; } -@@ -578,7 +578,7 @@ static int option_chars_in_buffer(struct +@@ -582,7 +582,7 @@ static int option_chars_in_buffer(struct if (this_urb && test_bit(i, &portdata->out_busy)) data_len += this_urb->transfer_buffer_length; } @@ -13954,7 +13954,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> return data_len; } -@@ -591,7 +591,7 @@ static int option_open(struct usb_serial +@@ -595,7 +595,7 @@ static int option_open(struct usb_serial portdata = usb_get_serial_port_data(port); @@ -13963,7 +13963,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* Set some sane defaults */ portdata->rts_state = 1; -@@ -603,7 +603,7 @@ static int option_open(struct usb_serial +@@ -607,7 +607,7 @@ static int option_open(struct usb_serial if (! urb) continue; if (urb->dev != serial->dev) { @@ -13972,7 +13972,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> urb->dev, serial->dev); continue; } -@@ -617,7 +617,7 @@ static int option_open(struct usb_serial +@@ -621,7 +621,7 @@ static int option_open(struct usb_serial err = usb_submit_urb(urb, GFP_KERNEL); if (err) { dbg("%s: submit urb %d failed (%d) %d", @@ -13981,7 +13981,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> urb->transfer_buffer_length); } } -@@ -645,7 +645,7 @@ static void option_close(struct usb_seri +@@ -649,7 +649,7 @@ static void option_close(struct usb_seri struct usb_serial *serial = port->serial; struct option_port_private *portdata; @@ -13990,7 +13990,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> portdata = usb_get_serial_port_data(port); portdata->rts_state = 0; -@@ -678,7 +678,7 @@ static struct urb *option_setup_urb(stru +@@ -682,7 +682,7 @@ static struct urb *option_setup_urb(stru urb = usb_alloc_urb(0, GFP_KERNEL); /* No ISO */ if (urb == NULL) { @@ -13999,7 +13999,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> return NULL; } -@@ -697,7 +697,7 @@ static void option_setup_urbs(struct usb +@@ -701,7 +701,7 @@ static void option_setup_urbs(struct usb struct usb_serial_port *port; struct option_port_private *portdata; @@ -14008,7 +14008,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> for (i = 0; i < serial->num_ports; i++) { port = serial->port[i]; -@@ -724,7 +724,7 @@ static int option_send_setup(struct usb_ +@@ -728,7 +728,7 @@ static int option_send_setup(struct usb_ struct usb_serial *serial = port->serial; struct option_port_private *portdata; @@ -14017,7 +14017,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> if (port->number != 0) return 0; -@@ -753,7 +753,7 @@ static int option_startup(struct usb_ser +@@ -757,7 +757,7 @@ static int option_startup(struct usb_ser struct option_port_private *portdata; u8 *buffer; @@ -14026,7 +14026,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* Now setup per port private data */ for (i = 0; i < serial->num_ports; i++) { -@@ -761,7 +761,7 @@ static int option_startup(struct usb_ser +@@ -765,7 +765,7 @@ static int option_startup(struct usb_ser portdata = kzalloc(sizeof(*portdata), GFP_KERNEL); if (!portdata) { dbg("%s: kmalloc for option_port_private (%d) failed!.", @@ -14035,7 +14035,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> return (1); } -@@ -786,7 +786,7 @@ static int option_startup(struct usb_ser +@@ -790,7 +790,7 @@ static int option_startup(struct usb_ser err = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); if (err) dbg("%s: submit irq_in urb failed %d", @@ -14044,7 +14044,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } option_setup_urbs(serial); -@@ -810,7 +810,7 @@ static void option_shutdown(struct usb_s +@@ -814,7 +814,7 @@ static void option_shutdown(struct usb_s struct usb_serial_port *port; struct option_port_private *portdata; diff --git a/usb/usb-serial-note-mos7480-and-option-don-t-lock-modem-status.patch b/usb/usb-serial-note-mos7480-and-option-don-t-lock-modem-status.patch index e24e00e5151a83..b1aff51d7d9b26 100644 --- a/usb/usb-serial-note-mos7480-and-option-don-t-lock-modem-status.patch +++ b/usb/usb-serial-note-mos7480-and-option-don-t-lock-modem-status.patch @@ -26,7 +26,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> mcr &= ~MCR_RTS; --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c -@@ -353,6 +353,7 @@ static int option_tiocmset(struct usb_se +@@ -357,6 +357,7 @@ static int option_tiocmset(struct usb_se portdata = usb_get_serial_port_data(port); |
