aboutsummaryrefslogtreecommitdiffstats
path: root/usb
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2008-04-16 10:37:17 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-16 10:37:17 -0700
commitc7291999166df1d9ad4baa7272688b19c5917d59 (patch)
tree2c38c058ac635db0c571304f39ece9b26dbbb5ae /usb
parentbf16221f0f8b11facabb83e2cd9ff6113d059435 (diff)
downloadpatches-c7291999166df1d9ad4baa7272688b19c5917d59.tar.gz
usb patches added
Diffstat (limited to 'usb')
-rw-r--r--usb/usb-add-documentation-about-callbacks.patch155
-rw-r--r--usb/usb-add-usb_dev_reset_delayed.patch2
-rw-r--r--usb/usb-cdc-acm-signedness-fix.patch57
-rw-r--r--usb/usb-cp2101-add-new-device-ids.patch38
-rw-r--r--usb/usb-don-t-explicitly-reenable-root-hub-status-interrupts.patch410
-rw-r--r--usb/usb-fix-memory-leak-in-mon_stat_release.patch33
-rw-r--r--usb/usb-g_file_storage-ignore-bulk-out-data-after-invalid-cbw.patch87
-rw-r--r--usb/usb-gadget-switch-to-put_char-returning-int.patch61
-rw-r--r--usb/usb-hcds-use-the-do_remote_wakeup-flag.patch196
-rw-r--r--usb/usb-ohci-turn-off-rd-when-remote-wakeup-is-disabled.patch35
-rw-r--r--usb/usb-remove-unnecessary-type-casting-of-urb-context.patch78
-rw-r--r--usb/usb-replace-remaining-__function__-occurrences.patch993
-rw-r--r--usb/usb-serial-more-fixes-and-groundwork-for-tty-changes.patch48
-rw-r--r--usb/usb-serial-remove-endpoints-setting-checks-from-core-and-header.patch83
-rw-r--r--usb/usb-serial-remove-unneeded-number-endpoints-settings.patch603
-rw-r--r--usb/wusb-devices-dont-use-a-set-address.patch4
-rw-r--r--usb/wusb-make-ep0-reinit-available.patch10
-rw-r--r--usb/wusb-teach-choose-address-about-wireless-devices.patch2
-rw-r--r--usb/wusb-update-devnum.patch4
19 files changed, 2324 insertions, 575 deletions
diff --git a/usb/usb-add-documentation-about-callbacks.patch b/usb/usb-add-documentation-about-callbacks.patch
new file mode 100644
index 00000000000000..b17e343140775f
--- /dev/null
+++ b/usb/usb-add-documentation-about-callbacks.patch
@@ -0,0 +1,155 @@
+From oliver@neukum.org Wed Apr 16 10:21:31 2008
+From: Oliver Neukum <oliver@neukum.org>
+Date: Wed, 16 Apr 2008 15:46:37 +0200
+Subject: USB: add documentation about callbacks
+To: Greg KH <greg@kroah.com>, Alan Stern <stern@rowland.harvard.edu>, David Brownell <david-b@pacbell.net>, linux-usb@vger.kernel.org
+Message-ID: <200804161546.38730.oliver@neukum.org>
+Content-Disposition: inline
+
+
+Add Documentation about callbacks in USB.
+
+
+Signed-off-by: Oliver Neukum <oneukum@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ Documentation/usb/callbacks.txt | 132 ++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 132 insertions(+)
+
+--- /dev/null
++++ b/Documentation/usb/callbacks.txt
+@@ -0,0 +1,132 @@
++What callbacks will usbcore do?
++===============================
++
++Usbcore will call into a driver through callbacks defined in the driver
++structure and through the completion handler of URBs a driver submits.
++Only the former are in the scope of this document. These two kinds of
++callbacks are completely independent of each other. Information on the
++completion callback can be found in Documentation/usb/URB.txt.
++
++The callbacks defined in the driver structure are:
++
++1. Hotplugging callbacks:
++
++ * @probe: Called to see if the driver is willing to manage a particular
++ * interface on a device.
++ * @disconnect: Called when the interface is no longer accessible, usually
++ * because its device has been (or is being) disconnected or the
++ * driver module is being unloaded.
++
++2. Odd backdoor through usbfs:
++
++ * @ioctl: Used for drivers that want to talk to userspace through
++ * the "usbfs" filesystem. This lets devices provide ways to
++ * expose information to user space regardless of where they
++ * do (or don't) show up otherwise in the filesystem.
++
++3. Power management (PM) callbacks:
++
++ * @suspend: Called when the device is going to be suspended.
++ * @resume: Called when the device is being resumed.
++ * @reset_resume: Called when the suspended device has been reset instead
++ * of being resumed.
++
++4. Device level operations:
++
++ * @pre_reset: Called when the device is about to be reset.
++ * @post_reset: Called after the device has been reset
++
++The ioctl interface (2) should be used only if you have a very good
++reason. Sysfs is preferred these days. The PM callbacks are covered
++separately in Documentation/usb/power-management.txt.
++
++Calling conventions
++===================
++
++All callbacks are mutually exclusive. There's no need for locking
++against other USB callbacks. All callbacks are called from a task
++context. You may sleep. However, it is important that all sleeps have a
++small fixed upper limit in time. In particular you must not call out to
++user space and await results.
++
++Hotplugging callbacks
++=====================
++
++These callbacks are intended to associate and disassociate a driver with
++an interface. A driver's bond to an interface is exclusive.
++
++The probe() callback
++--------------------
++
++int (*probe) (struct usb_interface *intf,
++ const struct usb_device_id *id);
++
++Accept or decline an interface. If you accept the device return 0,
++otherwise -ENODEV or -ENXIO. Other error codes should be used only if a
++genuine error occurred during initialisation which prevented a driver
++from accepting a device that would else have been accepted.
++You are strongly encouraged to use usbcore'sfacility,
++usb_set_intfdata(), to associate a data structure with an interface, so
++that you know which internal state and identity you associate with a
++particular interface. The device will not be suspended and you may do IO
++to the interface you are called for and endpoint 0 of the device. Device
++initialisation that doesn't take too long is a good idea here.
++
++The disconnect() callback
++-------------------------
++
++void (*disconnect) (struct usb_interface *intf);
++
++This callback is a signal to break any connection with an interface.
++You are not allowed any IO to a device after returning from this
++callback. You also may not do any other operation that may interfere
++with another driver bound the interface, eg. a power management
++operation.
++If you are called due to a physical disconnection, all your URBs will be
++killed by usbcore. Note that in this case disconnect will be called some
++time after the physical disconnection. Thus your driver must be prepared
++to deal with failing IO even prior to the callback.
++
++Device level callbacks
++======================
++
++pre_reset
++---------
++
++int (*pre_reset)(struct usb_interface *intf);
++
++Another driver or user space is triggering a reset on the device which
++contains the interface passed as an argument. Cease IO and save any
++device state you need to restore.
++
++If you need to allocate memory here, use GFP_NOIO or GFP_ATOMIC, if you
++are in atomic context.
++
++post_reset
++----------
++
++int (*post_reset)(struct usb_interface *intf);
++
++The reset has completed. Restore any saved device state and begin
++using the device again.
++
++If you need to allocate memory here, use GFP_NOIO or GFP_ATOMIC, if you
++are in atomic context.
++
++Call sequences
++==============
++
++No callbacks other than probe will be invoked for an interface
++that isn't bound to your driver.
++
++Probe will never be called for an interface bound to a driver.
++Hence following a successful probe, disconnect will be called
++before there is another probe for the same interface.
++
++Once your driver is bound to an interface, disconnect can be
++called at any time except in between pre_reset and post_reset.
++pre_reset is always followed by post_reset, even if the reset
++failed or the device has been unplugged.
++
++suspend is always followed by one of: resume, reset_resume, or
++disconnect.
diff --git a/usb/usb-add-usb_dev_reset_delayed.patch b/usb/usb-add-usb_dev_reset_delayed.patch
index 901d4217c8b1ec..5c12ecae0a28d9 100644
--- a/usb/usb-add-usb_dev_reset_delayed.patch
+++ b/usb/usb-add-usb_dev_reset_delayed.patch
@@ -17,7 +17,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
-@@ -3276,3 +3276,86 @@ int usb_reset_composite_device(struct us
+@@ -3267,3 +3267,86 @@ int usb_reset_composite_device(struct us
return ret;
}
EXPORT_SYMBOL_GPL(usb_reset_composite_device);
diff --git a/usb/usb-cdc-acm-signedness-fix.patch b/usb/usb-cdc-acm-signedness-fix.patch
new file mode 100644
index 00000000000000..efd112e21f55c5
--- /dev/null
+++ b/usb/usb-cdc-acm-signedness-fix.patch
@@ -0,0 +1,57 @@
+From david-b@pacbell.net Wed Apr 16 10:22:15 2008
+From: David Brownell <david-b@pacbell.net>
+Date: Sun, 13 Apr 2008 14:00:44 -0700
+Subject: USB: cdc-acm: signedness fix
+To: Oliver Neukum <oliver@neukum.org>
+Cc: linux-usb@vger.kernel.org
+Message-ID: <200804131400.44442.david-b@pacbell.net>
+Content-Disposition: inline
+
+
+Fix bogus assignment of "unsigned char *" to "char *": preserve
+unsignedness. These values are used directly as descriptor lengths
+when iterating through the buffer, so this *could* cause oddness
+that potentially includes oopsing. (IMO not likely, except as
+part of a malicious device...)
+
+Fix the bogus warning in CDC ACM which highlighted this problem
+(by showing a negative descriptor type). It uses the undesirable
+legacy err() for something that's not even an error; switch to
+use dev_dbg, and show descriptor types in hex notation to match
+the convention for such codes.
+
+Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
+Acked-by: Oliver Neukum <oneukum@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/class/cdc-acm.c | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/class/cdc-acm.c
++++ b/drivers/usb/class/cdc-acm.c
+@@ -804,7 +804,7 @@ static int acm_probe (struct usb_interfa
+ {
+ struct usb_cdc_union_desc *union_header = NULL;
+ struct usb_cdc_country_functional_desc *cfd = NULL;
+- char *buffer = intf->altsetting->extra;
++ unsigned char *buffer = intf->altsetting->extra;
+ int buflen = intf->altsetting->extralen;
+ struct usb_interface *control_interface;
+ struct usb_interface *data_interface;
+@@ -881,9 +881,13 @@ static int acm_probe (struct usb_interfa
+ if ((call_management_function & 3) != 3)
+ err("This device cannot do calls on its own. It is no modem.");
+ break;
+-
+ default:
+- err("Ignoring extra header, type %d, length %d", buffer[2], buffer[0]);
++ /* there are LOTS more CDC descriptors that
++ * could legitimately be found here.
++ */
++ dev_dbg(&intf->dev, "Ignoring descriptor: "
++ "type %02x, length %d\n",
++ buffer[2], buffer[0]);
+ break;
+ }
+ next_desc:
diff --git a/usb/usb-cp2101-add-new-device-ids.patch b/usb/usb-cp2101-add-new-device-ids.patch
new file mode 100644
index 00000000000000..464979193c4f0a
--- /dev/null
+++ b/usb/usb-cp2101-add-new-device-ids.patch
@@ -0,0 +1,38 @@
+From craig@microtron.org.uk Wed Apr 16 10:23:07 2008
+From: craig@microtron.org.uk
+Date: Sat, 12 Apr 2008 16:15:54 +0100
+Subject: USB: CP2101 Add new device IDs
+To: greg@kroah.com
+Cc: linux-usb-devel@lists.sourceforge.net, Craig Shelley <craig@microtron.org.uk>
+Message-ID: <12080133543815-git-send-email-craig@microtron.org.uk>
+
+
+From: Craig Shelley <craig@microtron.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/cp2101.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/usb/serial/cp2101.c
++++ b/drivers/usb/serial/cp2101.c
+@@ -53,9 +53,11 @@ static void cp2101_shutdown(struct usb_s
+ static int debug;
+
+ static struct usb_device_id id_table [] = {
++ { USB_DEVICE(0x0489, 0xE000) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */
+ { USB_DEVICE(0x08e6, 0x5501) }, /* Gemalto Prox-PU/CU contactless smartcard reader */
+ { USB_DEVICE(0x0FCF, 0x1003) }, /* Dynastream ANT development board */
+ { USB_DEVICE(0x0FCF, 0x1004) }, /* Dynastream ANT2USB */
++ { USB_DEVICE(0x0FCF, 0x1006) }, /* Dynastream ANT development board */
+ { USB_DEVICE(0x10A6, 0xAA26) }, /* Knock-off DCU-11 cable */
+ { USB_DEVICE(0x10AB, 0x10C5) }, /* Siemens MC60 Cable */
+ { USB_DEVICE(0x10B5, 0xAC70) }, /* Nokia CA-42 USB */
+@@ -71,6 +73,7 @@ static struct usb_device_id id_table []
+ { USB_DEVICE(0x10C4, 0x814A) }, /* West Mountain Radio RIGblaster P&P */
+ { USB_DEVICE(0x10C4, 0x814B) }, /* West Mountain Radio RIGtalk */
+ { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */
++ { USB_DEVICE(0x10C4, 0x81AC) }, /* MSD Dash Hawk */
+ { USB_DEVICE(0x10C4, 0x81C8) }, /* Lipowsky Industrie Elektronik GmbH, Baby-JTAG */
+ { USB_DEVICE(0x10C4, 0x81E2) }, /* Lipowsky Industrie Elektronik GmbH, Baby-LIN */
+ { USB_DEVICE(0x10C4, 0x81E7) }, /* Aerocomm Radio */
diff --git a/usb/usb-don-t-explicitly-reenable-root-hub-status-interrupts.patch b/usb/usb-don-t-explicitly-reenable-root-hub-status-interrupts.patch
new file mode 100644
index 00000000000000..22da3eef6d1a8a
--- /dev/null
+++ b/usb/usb-don-t-explicitly-reenable-root-hub-status-interrupts.patch
@@ -0,0 +1,410 @@
+From stern@rowland.harvard.edu Wed Apr 16 10:18:29 2008
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Mon, 14 Apr 2008 12:17:56 -0400 (EDT)
+Subject: USB: don't explicitly reenable root-hub status interrupts
+To: Greg KH <greg@kroah.com>
+Cc: USB list <linux-usb@vger.kernel.org>
+Message-ID: <Pine.LNX.4.44L0.0804141212530.2528-100000@iolanthe.rowland.org>
+
+
+This patch (as1069b) changes the way OHCI root-hub status-change
+interrupts are enabled. Currently a special HCD method,
+hub_irq_enable(), is called when the hub driver is finished using a
+root hub. This approach turns out to be subject to races, resulting
+in unnecessary polling.
+
+The patch does away with the method entirely. Instead, the driver
+automatically enables the RHSC interrupt when no more status changes
+are present. This scheme is safe with controllers using
+level-triggered semantics for their interrupt flags.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/core/hcd.c | 9 ------
+ drivers/usb/core/hcd.h | 2 -
+ drivers/usb/core/hub.c | 9 ------
+ drivers/usb/host/ohci-at91.c | 1
+ drivers/usb/host/ohci-au1xxx.c | 1
+ drivers/usb/host/ohci-ep93xx.c | 1
+ drivers/usb/host/ohci-hub.c | 53 +++++++++++++++++++++++-----------------
+ drivers/usb/host/ohci-lh7a404.c | 1
+ drivers/usb/host/ohci-omap.c | 1
+ drivers/usb/host/ohci-pci.c | 1
+ drivers/usb/host/ohci-pnx4008.c | 1
+ drivers/usb/host/ohci-pnx8550.c | 1
+ drivers/usb/host/ohci-ppc-of.c | 1
+ drivers/usb/host/ohci-ppc-soc.c | 1
+ drivers/usb/host/ohci-ps3.c | 1
+ drivers/usb/host/ohci-pxa27x.c | 1
+ drivers/usb/host/ohci-s3c2410.c | 1
+ drivers/usb/host/ohci-sa1111.c | 1
+ drivers/usb/host/ohci-sh.c | 1
+ drivers/usb/host/ohci-sm501.c | 1
+ drivers/usb/host/ohci-ssb.c | 1
+ drivers/usb/host/u132-hcd.c | 11 --------
+ 22 files changed, 31 insertions(+), 70 deletions(-)
+
+--- a/drivers/usb/core/hcd.c
++++ b/drivers/usb/core/hcd.c
+@@ -924,15 +924,6 @@ static int register_root_hub(struct usb_
+ return retval;
+ }
+
+-void usb_enable_root_hub_irq (struct usb_bus *bus)
+-{
+- struct usb_hcd *hcd;
+-
+- hcd = container_of (bus, struct usb_hcd, self);
+- if (hcd->driver->hub_irq_enable && hcd->state != HC_STATE_HALT)
+- hcd->driver->hub_irq_enable (hcd);
+-}
+-
+
+ /*-------------------------------------------------------------------------*/
+
+--- a/drivers/usb/core/hcd.h
++++ b/drivers/usb/core/hcd.h
+@@ -210,8 +210,6 @@ struct hc_driver {
+ int (*bus_suspend)(struct usb_hcd *);
+ int (*bus_resume)(struct usb_hcd *);
+ int (*start_port_reset)(struct usb_hcd *, unsigned port_num);
+- void (*hub_irq_enable)(struct usb_hcd *);
+- /* Needed only if port-change IRQs are level-triggered */
+
+ /* force handover of high-speed port to full-speed companion */
+ void (*relinquish_port)(struct usb_hcd *, int);
+--- a/drivers/usb/core/hub.c
++++ b/drivers/usb/core/hub.c
+@@ -2002,8 +2002,6 @@ int usb_port_resume(struct usb_device *u
+ }
+
+ clear_bit(port1, hub->busy_bits);
+- if (!hub->hdev->parent && !hub->busy_bits[0])
+- usb_enable_root_hub_irq(hub->hdev->bus);
+
+ if (status == 0)
+ status = finish_port_resume(udev);
+@@ -2919,11 +2917,6 @@ static void hub_events(void)
+
+ hub->activating = 0;
+
+- /* If this is a root hub, tell the HCD it's okay to
+- * re-enable port-change interrupts now. */
+- if (!hdev->parent && !hub->busy_bits[0])
+- usb_enable_root_hub_irq(hdev->bus);
+-
+ loop_autopm:
+ /* Allow autosuspend if we're not going to run again */
+ if (list_empty(&hub->event_list))
+@@ -3149,8 +3142,6 @@ int usb_reset_device(struct usb_device *
+ break;
+ }
+ clear_bit(port1, parent_hub->busy_bits);
+- if (!parent_hdev->parent && !parent_hub->busy_bits[0])
+- usb_enable_root_hub_irq(parent_hdev->bus);
+
+ if (ret < 0)
+ goto re_enumerate;
+--- a/drivers/usb/host/ohci-at91.c
++++ b/drivers/usb/host/ohci-at91.c
+@@ -261,7 +261,6 @@ static const struct hc_driver ohci_at91_
+ */
+ .hub_status_data = ohci_hub_status_data,
+ .hub_control = ohci_hub_control,
+- .hub_irq_enable = ohci_rhsc_enable,
+ #ifdef CONFIG_PM
+ .bus_suspend = ohci_bus_suspend,
+ .bus_resume = ohci_bus_resume,
+--- a/drivers/usb/host/ohci-au1xxx.c
++++ b/drivers/usb/host/ohci-au1xxx.c
+@@ -288,7 +288,6 @@ static const struct hc_driver ohci_au1xx
+ */
+ .hub_status_data = ohci_hub_status_data,
+ .hub_control = ohci_hub_control,
+- .hub_irq_enable = ohci_rhsc_enable,
+ #ifdef CONFIG_PM
+ .bus_suspend = ohci_bus_suspend,
+ .bus_resume = ohci_bus_resume,
+--- a/drivers/usb/host/ohci-ep93xx.c
++++ b/drivers/usb/host/ohci-ep93xx.c
+@@ -135,7 +135,6 @@ static struct hc_driver ohci_ep93xx_hc_d
+ .get_frame_number = ohci_get_frame,
+ .hub_status_data = ohci_hub_status_data,
+ .hub_control = ohci_hub_control,
+- .hub_irq_enable = ohci_rhsc_enable,
+ #ifdef CONFIG_PM
+ .bus_suspend = ohci_bus_suspend,
+ .bus_resume = ohci_bus_resume,
+--- a/drivers/usb/host/ohci-hub.c
++++ b/drivers/usb/host/ohci-hub.c
+@@ -36,18 +36,6 @@
+
+ /*-------------------------------------------------------------------------*/
+
+-/* hcd->hub_irq_enable() */
+-static void ohci_rhsc_enable (struct usb_hcd *hcd)
+-{
+- struct ohci_hcd *ohci = hcd_to_ohci (hcd);
+-
+- spin_lock_irq(&ohci->lock);
+- if (!ohci->autostop)
+- del_timer(&hcd->rh_timer); /* Prevent next poll */
+- ohci_writel(ohci, OHCI_INTR_RHSC, &ohci->regs->intrenable);
+- spin_unlock_irq(&ohci->lock);
+-}
+-
+ #define OHCI_SCHED_ENABLES \
+ (OHCI_CTRL_CLE|OHCI_CTRL_BLE|OHCI_CTRL_PLE|OHCI_CTRL_IE)
+
+@@ -374,18 +362,28 @@ static int ohci_root_hub_state_changes(s
+ int any_connected)
+ {
+ int poll_rh = 1;
++ int rhsc;
+
++ rhsc = ohci_readl(ohci, &ohci->regs->intrenable) & OHCI_INTR_RHSC;
+ switch (ohci->hc_control & OHCI_CTRL_HCFS) {
+
+ case OHCI_USB_OPER:
+- /* keep on polling until we know a device is connected
+- * and RHSC is enabled */
++ /* If no status changes are pending, enable status-change
++ * interrupts.
++ */
++ if (!rhsc && !changed) {
++ rhsc = OHCI_INTR_RHSC;
++ ohci_writel(ohci, rhsc, &ohci->regs->intrenable);
++ }
++
++ /* Keep on polling until we know a device is connected
++ * and RHSC is enabled, or until we autostop.
++ */
+ if (!ohci->autostop) {
+ if (any_connected ||
+ !device_may_wakeup(&ohci_to_hcd(ohci)
+ ->self.root_hub->dev)) {
+- if (ohci_readl(ohci, &ohci->regs->intrenable) &
+- OHCI_INTR_RHSC)
++ if (rhsc)
+ poll_rh = 0;
+ } else {
+ ohci->autostop = 1;
+@@ -398,12 +396,13 @@ static int ohci_root_hub_state_changes(s
+ ohci->autostop = 0;
+ ohci->next_statechange = jiffies +
+ STATECHANGE_DELAY;
+- } else if (time_after_eq(jiffies,
++ } else if (rhsc && time_after_eq(jiffies,
+ ohci->next_statechange)
+ && !ohci->ed_rm_list
+ && !(ohci->hc_control &
+ OHCI_SCHED_ENABLES)) {
+ ohci_rh_suspend(ohci, 1);
++ poll_rh = 0;
+ }
+ }
+ break;
+@@ -417,6 +416,12 @@ static int ohci_root_hub_state_changes(s
+ else
+ usb_hcd_resume_root_hub(ohci_to_hcd(ohci));
+ } else {
++ if (!rhsc && (ohci->autostop ||
++ ohci_to_hcd(ohci)->self.root_hub->
++ do_remote_wakeup))
++ ohci_writel(ohci, OHCI_INTR_RHSC,
++ &ohci->regs->intrenable);
++
+ /* everything is idle, no need for polling */
+ poll_rh = 0;
+ }
+@@ -438,12 +443,16 @@ static inline int ohci_rh_resume(struct
+ static int ohci_root_hub_state_changes(struct ohci_hcd *ohci, int changed,
+ int any_connected)
+ {
+- int poll_rh = 1;
+-
+- /* keep on polling until RHSC is enabled */
++ /* If RHSC is enabled, don't poll */
+ if (ohci_readl(ohci, &ohci->regs->intrenable) & OHCI_INTR_RHSC)
+- poll_rh = 0;
+- return poll_rh;
++ return 0;
++
++ /* If no status changes are pending, enable status-change interrupts */
++ if (!changed) {
++ ohci_writel(ohci, OHCI_INTR_RHSC, &ohci->regs->intrenable);
++ return 0;
++ }
++ return 1;
+ }
+
+ #endif /* CONFIG_PM */
+--- a/drivers/usb/host/ohci-lh7a404.c
++++ b/drivers/usb/host/ohci-lh7a404.c
+@@ -193,7 +193,6 @@ static const struct hc_driver ohci_lh7a4
+ */
+ .hub_status_data = ohci_hub_status_data,
+ .hub_control = ohci_hub_control,
+- .hub_irq_enable = ohci_rhsc_enable,
+ #ifdef CONFIG_PM
+ .bus_suspend = ohci_bus_suspend,
+ .bus_resume = ohci_bus_resume,
+--- a/drivers/usb/host/ohci-omap.c
++++ b/drivers/usb/host/ohci-omap.c
+@@ -466,7 +466,6 @@ static const struct hc_driver ohci_omap_
+ */
+ .hub_status_data = ohci_hub_status_data,
+ .hub_control = ohci_hub_control,
+- .hub_irq_enable = ohci_rhsc_enable,
+ #ifdef CONFIG_PM
+ .bus_suspend = ohci_bus_suspend,
+ .bus_resume = ohci_bus_resume,
+--- a/drivers/usb/host/ohci-pci.c
++++ b/drivers/usb/host/ohci-pci.c
+@@ -327,7 +327,6 @@ static const struct hc_driver ohci_pci_h
+ */
+ .hub_status_data = ohci_hub_status_data,
+ .hub_control = ohci_hub_control,
+- .hub_irq_enable = ohci_rhsc_enable,
+ #ifdef CONFIG_PM
+ .bus_suspend = ohci_bus_suspend,
+ .bus_resume = ohci_bus_resume,
+--- a/drivers/usb/host/ohci-pnx4008.c
++++ b/drivers/usb/host/ohci-pnx4008.c
+@@ -280,7 +280,6 @@ static const struct hc_driver ohci_pnx40
+ */
+ .hub_status_data = ohci_hub_status_data,
+ .hub_control = ohci_hub_control,
+- .hub_irq_enable = ohci_rhsc_enable,
+ #ifdef CONFIG_PM
+ .bus_suspend = ohci_bus_suspend,
+ .bus_resume = ohci_bus_resume,
+--- a/drivers/usb/host/ohci-pnx8550.c
++++ b/drivers/usb/host/ohci-pnx8550.c
+@@ -201,7 +201,6 @@ static const struct hc_driver ohci_pnx85
+ */
+ .hub_status_data = ohci_hub_status_data,
+ .hub_control = ohci_hub_control,
+- .hub_irq_enable = ohci_rhsc_enable,
+ #ifdef CONFIG_PM
+ .bus_suspend = ohci_bus_suspend,
+ .bus_resume = ohci_bus_resume,
+--- a/drivers/usb/host/ohci-ppc-of.c
++++ b/drivers/usb/host/ohci-ppc-of.c
+@@ -72,7 +72,6 @@ static const struct hc_driver ohci_ppc_o
+ */
+ .hub_status_data = ohci_hub_status_data,
+ .hub_control = ohci_hub_control,
+- .hub_irq_enable = ohci_rhsc_enable,
+ #ifdef CONFIG_PM
+ .bus_suspend = ohci_bus_suspend,
+ .bus_resume = ohci_bus_resume,
+--- a/drivers/usb/host/ohci-ppc-soc.c
++++ b/drivers/usb/host/ohci-ppc-soc.c
+@@ -172,7 +172,6 @@ static const struct hc_driver ohci_ppc_s
+ */
+ .hub_status_data = ohci_hub_status_data,
+ .hub_control = ohci_hub_control,
+- .hub_irq_enable = ohci_rhsc_enable,
+ #ifdef CONFIG_PM
+ .bus_suspend = ohci_bus_suspend,
+ .bus_resume = ohci_bus_resume,
+--- a/drivers/usb/host/ohci-ps3.c
++++ b/drivers/usb/host/ohci-ps3.c
+@@ -68,7 +68,6 @@ static const struct hc_driver ps3_ohci_h
+ .get_frame_number = ohci_get_frame,
+ .hub_status_data = ohci_hub_status_data,
+ .hub_control = ohci_hub_control,
+- .hub_irq_enable = ohci_rhsc_enable,
+ .start_port_reset = ohci_start_port_reset,
+ #if defined(CONFIG_PM)
+ .bus_suspend = ohci_bus_suspend,
+--- a/drivers/usb/host/ohci-pxa27x.c
++++ b/drivers/usb/host/ohci-pxa27x.c
+@@ -298,7 +298,6 @@ static const struct hc_driver ohci_pxa27
+ */
+ .hub_status_data = ohci_hub_status_data,
+ .hub_control = ohci_hub_control,
+- .hub_irq_enable = ohci_rhsc_enable,
+ #ifdef CONFIG_PM
+ .bus_suspend = ohci_bus_suspend,
+ .bus_resume = ohci_bus_resume,
+--- a/drivers/usb/host/ohci-s3c2410.c
++++ b/drivers/usb/host/ohci-s3c2410.c
+@@ -466,7 +466,6 @@ static const struct hc_driver ohci_s3c24
+ */
+ .hub_status_data = ohci_s3c2410_hub_status_data,
+ .hub_control = ohci_s3c2410_hub_control,
+- .hub_irq_enable = ohci_rhsc_enable,
+ #ifdef CONFIG_PM
+ .bus_suspend = ohci_bus_suspend,
+ .bus_resume = ohci_bus_resume,
+--- a/drivers/usb/host/ohci-sa1111.c
++++ b/drivers/usb/host/ohci-sa1111.c
+@@ -231,7 +231,6 @@ static const struct hc_driver ohci_sa111
+ */
+ .hub_status_data = ohci_hub_status_data,
+ .hub_control = ohci_hub_control,
+- .hub_irq_enable = ohci_rhsc_enable,
+ #ifdef CONFIG_PM
+ .bus_suspend = ohci_bus_suspend,
+ .bus_resume = ohci_bus_resume,
+--- a/drivers/usb/host/ohci-sh.c
++++ b/drivers/usb/host/ohci-sh.c
+@@ -68,7 +68,6 @@ static const struct hc_driver ohci_sh_hc
+ */
+ .hub_status_data = ohci_hub_status_data,
+ .hub_control = ohci_hub_control,
+- .hub_irq_enable = ohci_rhsc_enable,
+ #ifdef CONFIG_PM
+ .bus_suspend = ohci_bus_suspend,
+ .bus_resume = ohci_bus_resume,
+--- a/drivers/usb/host/ohci-sm501.c
++++ b/drivers/usb/host/ohci-sm501.c
+@@ -75,7 +75,6 @@ static const struct hc_driver ohci_sm501
+ */
+ .hub_status_data = ohci_hub_status_data,
+ .hub_control = ohci_hub_control,
+- .hub_irq_enable = ohci_rhsc_enable,
+ #ifdef CONFIG_PM
+ .bus_suspend = ohci_bus_suspend,
+ .bus_resume = ohci_bus_resume,
+--- a/drivers/usb/host/ohci-ssb.c
++++ b/drivers/usb/host/ohci-ssb.c
+@@ -81,7 +81,6 @@ static const struct hc_driver ssb_ohci_h
+
+ .hub_status_data = ohci_hub_status_data,
+ .hub_control = ohci_hub_control,
+- .hub_irq_enable = ohci_rhsc_enable,
+ #ifdef CONFIG_PM
+ .bus_suspend = ohci_bus_suspend,
+ .bus_resume = ohci_bus_resume,
+--- a/drivers/usb/host/u132-hcd.c
++++ b/drivers/usb/host/u132-hcd.c
+@@ -2934,16 +2934,6 @@ static int u132_start_port_reset(struct
+ return 0;
+ }
+
+-static void u132_hub_irq_enable(struct usb_hcd *hcd)
+-{
+- struct u132 *u132 = hcd_to_u132(hcd);
+- if (u132->going > 1) {
+- dev_err(&u132->platform_dev->dev, "device has been removed %d\n"
+- , u132->going);
+- } else if (u132->going > 0)
+- dev_err(&u132->platform_dev->dev, "device is being removed\n");
+-}
+-
+
+ #ifdef CONFIG_PM
+ static int u132_bus_suspend(struct usb_hcd *hcd)
+@@ -2995,7 +2985,6 @@ static struct hc_driver u132_hc_driver =
+ .bus_suspend = u132_bus_suspend,
+ .bus_resume = u132_bus_resume,
+ .start_port_reset = u132_start_port_reset,
+- .hub_irq_enable = u132_hub_irq_enable,
+ };
+
+ /*
diff --git a/usb/usb-fix-memory-leak-in-mon_stat_release.patch b/usb/usb-fix-memory-leak-in-mon_stat_release.patch
new file mode 100644
index 00000000000000..8202c5517202ed
--- /dev/null
+++ b/usb/usb-fix-memory-leak-in-mon_stat_release.patch
@@ -0,0 +1,33 @@
+From tom.leiming@gmail.com Wed Apr 16 10:17:02 2008
+From: tom.leiming@gmail.com
+Date: Mon, 14 Apr 2008 21:27:00 +0800
+Subject: USB: Fix memory leak in mon_stat_release
+To: greg@kroah.com
+Cc: linux-usb@vger.kernel.org, Ming Lei <tom.leiming@gmail.com>
+Message-ID: <1208179620-3417-1-git-send-email-tom.leiming@gmail.com>
+
+
+From: Ming Lei <tom.leiming@gmail.com>
+
+Fix the leak of the snap structure allocated in mon_stat_open().
+
+Signed-off-by: Ming Lei <tom.leiming@gmail.com>
+Acked-by: Pete Zaitcev <zaitcev@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/mon/mon_stat.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/usb/mon/mon_stat.c
++++ b/drivers/usb/mon/mon_stat.c
+@@ -59,6 +59,9 @@ static ssize_t mon_stat_read(struct file
+
+ static int mon_stat_release(struct inode *inode, struct file *file)
+ {
++ struct snap *sp = file->private_data;
++ file->private_data = NULL;
++ kfree(sp);
+ return 0;
+ }
+
diff --git a/usb/usb-g_file_storage-ignore-bulk-out-data-after-invalid-cbw.patch b/usb/usb-g_file_storage-ignore-bulk-out-data-after-invalid-cbw.patch
new file mode 100644
index 00000000000000..4f8be65580dd3b
--- /dev/null
+++ b/usb/usb-g_file_storage-ignore-bulk-out-data-after-invalid-cbw.patch
@@ -0,0 +1,87 @@
+From stern@rowland.harvard.edu Wed Apr 16 10:17:25 2008
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Mon, 14 Apr 2008 11:45:29 -0400 (EDT)
+Subject: USB: g_file_storage: ignore bulk-out data after invalid CBW
+To: Greg KH <greg@kroah.com>
+Cc: David Lopo <lopo.david@gmail.com>, USB list <linux-usb@vger.kernel.org>
+Message-ID: <Pine.LNX.4.44L0.0804141142140.2528-100000@iolanthe.rowland.org>
+
+
+This patch (as1061) makes g_file_storage more compliant with the
+Bulk-Only Transport specification. After an invalid CBW is received,
+the gadget must ignore any further bulk-OUT data until it is reset.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/file_storage.c | 28 +++++++++++++++-------------
+ 1 file changed, 15 insertions(+), 13 deletions(-)
+
+--- a/drivers/usb/gadget/file_storage.c
++++ b/drivers/usb/gadget/file_storage.c
+@@ -644,7 +644,7 @@ struct fsg_dev {
+
+ unsigned long atomic_bitflags;
+ #define REGISTERED 0
+-#define CLEAR_BULK_HALTS 1
++#define IGNORE_BULK_OUT 1
+ #define SUSPENDED 2
+
+ struct usb_ep *bulk_in;
+@@ -2936,8 +2936,8 @@ static int received_cbw(struct fsg_dev *
+ struct usb_request *req = bh->outreq;
+ struct bulk_cb_wrap *cbw = req->buf;
+
+- /* Was this a real packet? */
+- if (req->status)
++ /* Was this a real packet? Should it be ignored? */
++ if (req->status || test_bit(IGNORE_BULK_OUT, &fsg->atomic_bitflags))
+ return -EINVAL;
+
+ /* Is the CBW valid? */
+@@ -2948,13 +2948,17 @@ static int received_cbw(struct fsg_dev *
+ req->actual,
+ le32_to_cpu(cbw->Signature));
+
+- /* The Bulk-only spec says we MUST stall the bulk pipes!
+- * If we want to avoid stalls, set a flag so that we will
+- * clear the endpoint halts at the next reset. */
+- if (!mod_data.can_stall)
+- set_bit(CLEAR_BULK_HALTS, &fsg->atomic_bitflags);
+- fsg_set_halt(fsg, fsg->bulk_out);
++ /* The Bulk-only spec says we MUST stall the IN endpoint
++ * (6.6.1), so it's unavoidable. It also says we must
++ * retain this state until the next reset, but there's
++ * no way to tell the controller driver it should ignore
++ * Clear-Feature(HALT) requests.
++ *
++ * We aren't required to halt the OUT endpoint; instead
++ * we can simply accept and discard any data received
++ * until the next reset. */
+ halt_bulk_in_endpoint(fsg);
++ set_bit(IGNORE_BULK_OUT, &fsg->atomic_bitflags);
+ return -EINVAL;
+ }
+
+@@ -3140,6 +3144,7 @@ reset:
+ goto reset;
+ fsg->bulk_out_enabled = 1;
+ fsg->bulk_out_maxpacket = le16_to_cpu(d->wMaxPacketSize);
++ clear_bit(IGNORE_BULK_OUT, &fsg->atomic_bitflags);
+
+ if (transport_is_cbi()) {
+ d = ep_desc(fsg->gadget, &fs_intr_in_desc, &hs_intr_in_desc);
+@@ -3321,11 +3326,8 @@ static void handle_exception(struct fsg_
+ /* In case we were forced against our will to halt a
+ * bulk endpoint, clear the halt now. (The SuperH UDC
+ * requires this.) */
+- if (test_and_clear_bit(CLEAR_BULK_HALTS,
+- &fsg->atomic_bitflags)) {
++ if (test_and_clear_bit(IGNORE_BULK_OUT, &fsg->atomic_bitflags))
+ usb_ep_clear_halt(fsg->bulk_in);
+- usb_ep_clear_halt(fsg->bulk_out);
+- }
+
+ if (transport_is_bbb()) {
+ if (fsg->ep0_req_tag == exception_req_tag)
diff --git a/usb/usb-gadget-switch-to-put_char-returning-int.patch b/usb/usb-gadget-switch-to-put_char-returning-int.patch
new file mode 100644
index 00000000000000..b3ea9c6838704b
--- /dev/null
+++ b/usb/usb-gadget-switch-to-put_char-returning-int.patch
@@ -0,0 +1,61 @@
+From akpm@linux-foundation.org Wed Apr 16 10:19:38 2008
+From: Alan Cox <alan@lxorguk.ukuu.org.uk>
+Date: Mon, 14 Apr 2008 19:04:20 -0700
+Subject: usb gadget: switch to put_char returning int
+To: mm-commits@vger.kernel.org
+Cc: alan@lxorguk.ukuu.org.uk, alan@redhat.com, dbrownell@users.sourceforge.net, gregkh@suse.de
+Message-ID: <200804150204.m3F24KaE005606@imap1.linux-foundation.org>
+
+From: Alan Cox <alan@lxorguk.ukuu.org.uk>
+
+Signed-off-by: Alan Cox <alan@redhat.com>
+Acked-by: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/serial.c | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+--- a/drivers/usb/gadget/serial.c
++++ b/drivers/usb/gadget/serial.c
+@@ -170,7 +170,7 @@ static int gs_open(struct tty_struct *tt
+ static void gs_close(struct tty_struct *tty, struct file *file);
+ static int gs_write(struct tty_struct *tty,
+ const unsigned char *buf, int count);
+-static void gs_put_char(struct tty_struct *tty, unsigned char ch);
++static int gs_put_char(struct tty_struct *tty, unsigned char ch);
+ static void gs_flush_chars(struct tty_struct *tty);
+ static int gs_write_room(struct tty_struct *tty);
+ static int gs_chars_in_buffer(struct tty_struct *tty);
+@@ -883,14 +883,15 @@ exit:
+ /*
+ * gs_put_char
+ */
+-static void gs_put_char(struct tty_struct *tty, unsigned char ch)
++static int gs_put_char(struct tty_struct *tty, unsigned char ch)
+ {
+ unsigned long flags;
+ struct gs_port *port = tty->driver_data;
++ int ret = 0;
+
+ if (port == NULL) {
+ pr_err("gs_put_char: NULL port pointer\n");
+- return;
++ return 0;
+ }
+
+ gs_debug("gs_put_char: (%d,%p) char=0x%x, called from %p\n",
+@@ -910,10 +911,11 @@ static void gs_put_char(struct tty_struc
+ goto exit;
+ }
+
+- gs_buf_put(port->port_write_buf, &ch, 1);
++ ret = gs_buf_put(port->port_write_buf, &ch, 1);
+
+ exit:
+ spin_unlock_irqrestore(&port->port_lock, flags);
++ return ret;
+ }
+
+ /*
diff --git a/usb/usb-hcds-use-the-do_remote_wakeup-flag.patch b/usb/usb-hcds-use-the-do_remote_wakeup-flag.patch
new file mode 100644
index 00000000000000..f4a41b95833645
--- /dev/null
+++ b/usb/usb-hcds-use-the-do_remote_wakeup-flag.patch
@@ -0,0 +1,196 @@
+From stern@rowland.harvard.edu Wed Apr 16 10:17:42 2008
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Mon, 14 Apr 2008 12:17:10 -0400 (EDT)
+Subject: USB: HCDs use the do_remote_wakeup flag
+To: Greg KH <greg@kroah.com>
+Cc: USB list <linux-usb@vger.kernel.org>
+Message-ID: <Pine.LNX.4.44L0.0804141210570.2528-100000@iolanthe.rowland.org>
+
+
+When a USB device is suspended, whether or not it is enabled for
+remote wakeup depends on the device_may_wakeup() setting. The setting
+is then saved in the do_remote_wakeup flag.
+
+Later on, however, the device_may_wakeup() value can change because of
+user activity. So when testing whether a suspended device is or
+should be enabled for remote wakeup, we should always test
+do_remote_wakeup instead of device_may_wakeup(). This patch (as1076)
+makes that change for root hubs in several places.
+
+The patch also adjusts uhci-hcd so that when an autostopped controller
+is suspended, the remote wakeup setting agrees with the value recorded
+in the root hub's do_remote_wakeup flag.
+
+And the patch adjusts ehci-hcd so that wakeup events on selectively
+suspended ports (i.e., the bus itself isn't suspended) don't turn on
+the PME# wakeup signal.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/core/driver.c | 1 -
+ drivers/usb/host/ehci-hub.c | 17 +++++++----------
+ drivers/usb/host/ehci-pci.c | 2 +-
+ drivers/usb/host/isp116x-hcd.c | 2 +-
+ drivers/usb/host/ohci-hub.c | 5 ++---
+ drivers/usb/host/uhci-hcd.c | 21 +++++++--------------
+ 6 files changed, 18 insertions(+), 30 deletions(-)
+
+--- a/drivers/usb/core/driver.c
++++ b/drivers/usb/core/driver.c
+@@ -932,7 +932,6 @@ static int autosuspend_check(struct usb_
+ * is disabled. Also fail if any interfaces require remote wakeup
+ * but it isn't available.
+ */
+- udev->do_remote_wakeup = device_may_wakeup(&udev->dev);
+ if (udev->pm_usage_cnt > 0)
+ return -EBUSY;
+ if (udev->autosuspend_delay < 0 || udev->autosuspend_disabled)
+--- a/drivers/usb/host/ehci-hub.c
++++ b/drivers/usb/host/ehci-hub.c
+@@ -30,6 +30,8 @@
+
+ #ifdef CONFIG_PM
+
++#define PORT_WAKE_BITS (PORT_WKOC_E|PORT_WKDISC_E|PORT_WKCONN_E)
++
+ static int ehci_hub_control(
+ struct usb_hcd *hcd,
+ u16 typeReq,
+@@ -149,10 +151,10 @@ static int ehci_bus_suspend (struct usb_
+ }
+
+ /* enable remote wakeup on all ports */
+- if (device_may_wakeup(&hcd->self.root_hub->dev))
+- t2 |= PORT_WKOC_E|PORT_WKDISC_E|PORT_WKCONN_E;
++ if (hcd->self.root_hub->do_remote_wakeup)
++ t2 |= PORT_WAKE_BITS;
+ else
+- t2 &= ~(PORT_WKOC_E|PORT_WKDISC_E|PORT_WKCONN_E);
++ t2 &= ~PORT_WAKE_BITS;
+
+ if (t1 != t2) {
+ ehci_vdbg (ehci, "port %d, %08x -> %08x\n",
+@@ -174,7 +176,7 @@ static int ehci_bus_suspend (struct usb_
+
+ /* allow remote wakeup */
+ mask = INTR_MASK;
+- if (!device_may_wakeup(&hcd->self.root_hub->dev))
++ if (!hcd->self.root_hub->do_remote_wakeup)
+ mask &= ~STS_PCD;
+ ehci_writel(ehci, mask, &ehci->regs->intr_enable);
+ ehci_readl(ehci, &ehci->regs->intr_enable);
+@@ -232,8 +234,7 @@ static int ehci_bus_resume (struct usb_h
+ i = HCS_N_PORTS (ehci->hcs_params);
+ while (i--) {
+ temp = ehci_readl(ehci, &ehci->regs->port_status [i]);
+- temp &= ~(PORT_RWC_BITS
+- | PORT_WKOC_E | PORT_WKDISC_E | PORT_WKCONN_E);
++ temp &= ~(PORT_RWC_BITS | PORT_WAKE_BITS);
+ if (test_bit(i, &ehci->bus_suspended) &&
+ (temp & PORT_SUSPEND)) {
+ ehci->reset_done [i] = jiffies + msecs_to_jiffies (20);
+@@ -534,8 +535,6 @@ ehci_hub_descriptor (
+
+ /*-------------------------------------------------------------------------*/
+
+-#define PORT_WAKE_BITS (PORT_WKOC_E|PORT_WKDISC_E|PORT_WKCONN_E)
+-
+ static int ehci_hub_control (
+ struct usb_hcd *hcd,
+ u16 typeReq,
+@@ -801,8 +800,6 @@ static int ehci_hub_control (
+ if ((temp & PORT_PE) == 0
+ || (temp & PORT_RESET) != 0)
+ goto error;
+- if (device_may_wakeup(&hcd->self.root_hub->dev))
+- temp |= PORT_WAKE_BITS;
+ ehci_writel(ehci, temp | PORT_SUSPEND, status_reg);
+ break;
+ case USB_PORT_FEAT_POWER:
+--- a/drivers/usb/host/ehci-pci.c
++++ b/drivers/usb/host/ehci-pci.c
+@@ -300,7 +300,7 @@ static int ehci_pci_resume(struct usb_hc
+ if (ehci_readl(ehci, &ehci->regs->configured_flag) == FLAG_CF) {
+ int mask = INTR_MASK;
+
+- if (!device_may_wakeup(&hcd->self.root_hub->dev))
++ if (!hcd->self.root_hub->do_remote_wakeup)
+ mask &= ~STS_PCD;
+ ehci_writel(ehci, mask, &ehci->regs->intr_enable);
+ ehci_readl(ehci, &ehci->regs->intr_enable);
+--- a/drivers/usb/host/isp116x-hcd.c
++++ b/drivers/usb/host/isp116x-hcd.c
+@@ -1400,7 +1400,7 @@ static int isp116x_bus_suspend(struct us
+ spin_unlock_irqrestore(&isp116x->lock, flags);
+ val &= (~HCCONTROL_HCFS & ~HCCONTROL_RWE);
+ val |= HCCONTROL_USB_SUSPEND;
+- if (device_may_wakeup(&hcd->self.root_hub->dev))
++ if (hcd->self.root_hub->do_remote_wakeup)
+ val |= HCCONTROL_RWE;
+ /* Wait for usb transfers to finish */
+ msleep(2);
+--- a/drivers/usb/host/ohci-hub.c
++++ b/drivers/usb/host/ohci-hub.c
+@@ -103,10 +103,9 @@ __acquires(ohci->lock)
+ finish_unlinks (ohci, ohci_frame_no(ohci));
+
+ /* maybe resume can wake root hub */
+- if (device_may_wakeup(&ohci_to_hcd(ohci)->self.root_hub->dev) ||
+- autostop)
++ if (ohci_to_hcd(ohci)->self.root_hub->do_remote_wakeup || autostop) {
+ ohci->hc_control |= OHCI_CTRL_RWE;
+- else {
++ } else {
+ ohci_writel (ohci, OHCI_INTR_RHSC, &ohci->regs->intrdisable);
+ ohci->hc_control &= ~OHCI_CTRL_RWE;
+ }
+--- a/drivers/usb/host/uhci-hcd.c
++++ b/drivers/usb/host/uhci-hcd.c
+@@ -262,20 +262,12 @@ __acquires(uhci->lock)
+ {
+ int auto_stop;
+ int int_enable, egsm_enable;
++ struct usb_device *rhdev = uhci_to_hcd(uhci)->self.root_hub;
+
+ auto_stop = (new_state == UHCI_RH_AUTO_STOPPED);
+- dev_dbg(&uhci_to_hcd(uhci)->self.root_hub->dev,
+- "%s%s\n", __FUNCTION__,
++ dev_dbg(&rhdev->dev, "%s%s\n", __func__,
+ (auto_stop ? " (auto-stop)" : ""));
+
+- /* If we get a suspend request when we're already auto-stopped
+- * then there's nothing to do.
+- */
+- if (uhci->rh_state == UHCI_RH_AUTO_STOPPED) {
+- uhci->rh_state = new_state;
+- return;
+- }
+-
+ /* Enable resume-detect interrupts if they work.
+ * Then enter Global Suspend mode if _it_ works, still configured.
+ */
+@@ -285,8 +277,10 @@ __acquires(uhci->lock)
+ if (remote_wakeup_is_broken(uhci))
+ egsm_enable = 0;
+ if (resume_detect_interrupts_are_broken(uhci) || !egsm_enable ||
+- !device_may_wakeup(
+- &uhci_to_hcd(uhci)->self.root_hub->dev))
++#ifdef CONFIG_PM
++ (!auto_stop && !rhdev->do_remote_wakeup) ||
++#endif
++ (auto_stop && !device_may_wakeup(&rhdev->dev)))
+ uhci->working_RD = int_enable = 0;
+
+ outw(int_enable, uhci->io_addr + USBINTR);
+@@ -308,8 +302,7 @@ __acquires(uhci->lock)
+ return;
+ }
+ if (!(inw(uhci->io_addr + USBSTS) & USBSTS_HCH))
+- dev_warn(&uhci_to_hcd(uhci)->self.root_hub->dev,
+- "Controller not stopped yet!\n");
++ dev_warn(uhci_dev(uhci), "Controller not stopped yet!\n");
+
+ uhci_get_current_frame_number(uhci);
+
diff --git a/usb/usb-ohci-turn-off-rd-when-remote-wakeup-is-disabled.patch b/usb/usb-ohci-turn-off-rd-when-remote-wakeup-is-disabled.patch
new file mode 100644
index 00000000000000..5ac718d1d1a5fb
--- /dev/null
+++ b/usb/usb-ohci-turn-off-rd-when-remote-wakeup-is-disabled.patch
@@ -0,0 +1,35 @@
+From stern@rowland.harvard.edu Wed Apr 16 10:17:56 2008
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Mon, 14 Apr 2008 12:17:49 -0400 (EDT)
+Subject: USB: OHCI: turn off RD when remote wakeup is disabled
+To: Greg KH <greg@kroah.com>
+Cc: USB list <linux-usb@vger.kernel.org>
+Message-ID: <Pine.LNX.4.44L0.0804141212260.2528-100000@iolanthe.rowland.org>
+
+
+This patch (as1068b) disables the RD interrupt flag when an OHCI root
+hub is suspended with remote wakeup disabled. Although the spec
+clearly states that this flag permits the controller to issue an
+interrupt when a resume request from downstream is detected and not
+when a local status change occurs, some controllers mistakenly use it
+for both types of event.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/ohci-hub.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/host/ohci-hub.c
++++ b/drivers/usb/host/ohci-hub.c
+@@ -106,7 +106,8 @@ __acquires(ohci->lock)
+ if (ohci_to_hcd(ohci)->self.root_hub->do_remote_wakeup || autostop) {
+ ohci->hc_control |= OHCI_CTRL_RWE;
+ } else {
+- ohci_writel (ohci, OHCI_INTR_RHSC, &ohci->regs->intrdisable);
++ ohci_writel(ohci, OHCI_INTR_RHSC | OHCI_INTR_RD,
++ &ohci->regs->intrdisable);
+ ohci->hc_control &= ~OHCI_CTRL_RWE;
+ }
+
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 effc0bc27592b4..066a9e8d4bae56 100644
--- a/usb/usb-remove-unnecessary-type-casting-of-urb-context.patch
+++ b/usb/usb-remove-unnecessary-type-casting-of-urb-context.patch
@@ -214,7 +214,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/drivers/usb/serial/belkin_sa.c
+++ b/drivers/usb/serial/belkin_sa.c
-@@ -251,7 +251,7 @@ static void belkin_sa_close (struct usb_
+@@ -248,7 +248,7 @@ static void belkin_sa_close (struct usb_
static void belkin_sa_read_int_callback (struct urb *urb)
{
@@ -225,7 +225,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
int retval;
--- a/drivers/usb/serial/cyberjack.c
+++ b/drivers/usb/serial/cyberjack.c
-@@ -303,7 +303,7 @@ static int cyberjack_write_room( struct
+@@ -300,7 +300,7 @@ static int cyberjack_write_room( struct
static void cyberjack_read_int_callback( struct urb *urb )
{
@@ -234,7 +234,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
struct cyberjack_private *priv = usb_get_serial_port_data(port);
unsigned char *data = urb->transfer_buffer;
int status = urb->status;
-@@ -360,7 +360,7 @@ resubmit:
+@@ -357,7 +357,7 @@ resubmit:
static void cyberjack_read_bulk_callback (struct urb *urb)
{
@@ -243,7 +243,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
struct cyberjack_private *priv = usb_get_serial_port_data(port);
struct tty_struct *tty;
unsigned char *data = urb->transfer_buffer;
-@@ -412,7 +412,7 @@ static void cyberjack_read_bulk_callback
+@@ -409,7 +409,7 @@ static void cyberjack_read_bulk_callback
static void cyberjack_write_bulk_callback (struct urb *urb)
{
@@ -254,7 +254,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/drivers/usb/serial/cypress_m8.c
+++ b/drivers/usb/serial/cypress_m8.c
-@@ -1221,7 +1221,7 @@ static void cypress_unthrottle (struct u
+@@ -1209,7 +1209,7 @@ static void cypress_unthrottle (struct u
static void cypress_read_int_callback(struct urb *urb)
{
@@ -263,7 +263,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
struct cypress_private *priv = usb_get_serial_port_data(port);
struct tty_struct *tty;
unsigned char *data = urb->transfer_buffer;
-@@ -1373,7 +1373,7 @@ continue_read:
+@@ -1361,7 +1361,7 @@ continue_read:
static void cypress_write_int_callback(struct urb *urb)
{
@@ -274,7 +274,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
int status = urb->status;
--- a/drivers/usb/serial/digi_acceleport.c
+++ b/drivers/usb/serial/digi_acceleport.c
-@@ -1233,7 +1233,7 @@ static int digi_write(struct usb_serial_
+@@ -1227,7 +1227,7 @@ static int digi_write(struct usb_serial_
static void digi_write_bulk_callback(struct urb *urb)
{
@@ -283,7 +283,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
struct usb_serial *serial;
struct digi_port *priv;
struct digi_serial *serial_priv;
-@@ -1611,7 +1611,7 @@ static void digi_shutdown(struct usb_ser
+@@ -1605,7 +1605,7 @@ static void digi_shutdown(struct usb_ser
static void digi_read_bulk_callback(struct urb *urb)
{
@@ -292,7 +292,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
struct digi_port *priv;
struct digi_serial *serial_priv;
int ret;
-@@ -1670,7 +1670,7 @@ static void digi_read_bulk_callback(stru
+@@ -1664,7 +1664,7 @@ static void digi_read_bulk_callback(stru
static int digi_read_inb_callback(struct urb *urb)
{
@@ -301,7 +301,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
struct tty_struct *tty = port->tty;
struct digi_port *priv = usb_get_serial_port_data(port);
int opcode = ((unsigned char *)urb->transfer_buffer)[0];
-@@ -1760,7 +1760,7 @@ static int digi_read_inb_callback(struct
+@@ -1754,7 +1754,7 @@ static int digi_read_inb_callback(struct
static int digi_read_oob_callback(struct urb *urb)
{
@@ -312,7 +312,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
int opcode, line, status, val;
--- a/drivers/usb/serial/empeg.c
+++ b/drivers/usb/serial/empeg.c
-@@ -343,7 +343,7 @@ static void empeg_write_bulk_callback (s
+@@ -340,7 +340,7 @@ static void empeg_write_bulk_callback (s
static void empeg_read_bulk_callback (struct urb *urb)
{
@@ -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
-@@ -1380,7 +1380,7 @@ error_no_buffer:
+@@ -1377,7 +1377,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;
-@@ -1463,7 +1463,7 @@ static int ftdi_chars_in_buffer (struct
+@@ -1460,7 +1460,7 @@ static int ftdi_chars_in_buffer (struct
static void ftdi_read_bulk_callback (struct urb *urb)
{ /* ftdi_read_bulk_callback */
@@ -372,7 +372,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
unsigned char *data = urb->transfer_buffer;
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
-@@ -334,7 +334,7 @@ static void flush_and_resubmit_read_urb
+@@ -331,7 +331,7 @@ static void flush_and_resubmit_read_urb
void usb_serial_generic_read_bulk_callback (struct urb *urb)
{
@@ -381,7 +381,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
unsigned char *data = urb->transfer_buffer;
int status = urb->status;
unsigned long flags;
-@@ -362,7 +362,7 @@ EXPORT_SYMBOL_GPL(usb_serial_generic_rea
+@@ -359,7 +359,7 @@ EXPORT_SYMBOL_GPL(usb_serial_generic_rea
void usb_serial_generic_write_bulk_callback (struct urb *urb)
{
@@ -459,7 +459,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/drivers/usb/serial/ipaq.c
+++ b/drivers/usb/serial/ipaq.c
-@@ -732,7 +732,7 @@ static void ipaq_close(struct usb_serial
+@@ -729,7 +729,7 @@ static void ipaq_close(struct usb_serial
static void ipaq_read_bulk_callback(struct urb *urb)
{
@@ -468,7 +468,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
struct tty_struct *tty;
unsigned char *data = urb->transfer_buffer;
int result;
-@@ -872,7 +872,7 @@ static void ipaq_write_gather(struct usb
+@@ -869,7 +869,7 @@ static void ipaq_write_gather(struct usb
static void ipaq_write_bulk_callback(struct urb *urb)
{
@@ -479,7 +479,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
int result;
--- a/drivers/usb/serial/ir-usb.c
+++ b/drivers/usb/serial/ir-usb.c
-@@ -396,7 +396,7 @@ static int ir_write (struct usb_serial_p
+@@ -393,7 +393,7 @@ static int ir_write (struct usb_serial_p
static void ir_write_bulk_callback (struct urb *urb)
{
@@ -488,7 +488,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
int status = urb->status;
dbg("%s - port %d", __func__, port->number);
-@@ -420,7 +420,7 @@ static void ir_write_bulk_callback (stru
+@@ -417,7 +417,7 @@ static void ir_write_bulk_callback (stru
static void ir_read_bulk_callback (struct urb *urb)
{
@@ -721,7 +721,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
port->write_urb_busy = 0;
--- a/drivers/usb/serial/kl5kusb105.c
+++ b/drivers/usb/serial/kl5kusb105.c
-@@ -570,7 +570,7 @@ exit:
+@@ -567,7 +567,7 @@ exit:
static void klsi_105_write_bulk_callback ( struct urb *urb)
{
@@ -730,7 +730,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
int status = urb->status;
dbg("%s - port %d", __func__, port->number);
-@@ -631,7 +631,7 @@ static int klsi_105_write_room (struct u
+@@ -628,7 +628,7 @@ static int klsi_105_write_room (struct u
static void klsi_105_read_bulk_callback (struct urb *urb)
{
@@ -741,7 +741,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
unsigned char *data = urb->transfer_buffer;
--- a/drivers/usb/serial/mct_u232.c
+++ b/drivers/usb/serial/mct_u232.c
-@@ -517,7 +517,7 @@ static void mct_u232_close (struct usb_s
+@@ -514,7 +514,7 @@ static void mct_u232_close (struct usb_s
static void mct_u232_read_int_callback (struct urb *urb)
{
@@ -790,7 +790,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (urb == mos7840_port->write_urb_pool[i]) {
--- a/drivers/usb/serial/omninet.c
+++ b/drivers/usb/serial/omninet.c
-@@ -197,7 +197,7 @@ static void omninet_close (struct usb_se
+@@ -194,7 +194,7 @@ static void omninet_close (struct usb_se
static void omninet_read_bulk_callback (struct urb *urb)
{
@@ -799,7 +799,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
unsigned char *data = urb->transfer_buffer;
struct omninet_header *header = (struct omninet_header *) &data[0];
int status = urb->status;
-@@ -312,7 +312,7 @@ static int omninet_write_room (struct us
+@@ -309,7 +309,7 @@ static int omninet_write_room (struct us
static void omninet_write_bulk_callback (struct urb *urb)
{
/* struct omninet_header *header = (struct omninet_header *) urb->transfer_buffer; */
@@ -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
-@@ -548,7 +548,7 @@ static void option_indat_callback(struct
+@@ -545,7 +545,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.",
-@@ -582,7 +582,7 @@ static void option_outdat_callback(struc
+@@ -579,7 +579,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);
-@@ -600,7 +600,7 @@ static void option_instat_callback(struc
+@@ -597,7 +597,7 @@ static void option_instat_callback(struc
{
int err;
int status = urb->status;
@@ -839,7 +839,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/drivers/usb/serial/oti6858.c
+++ b/drivers/usb/serial/oti6858.c
-@@ -874,7 +874,7 @@ static void oti6858_shutdown(struct usb_
+@@ -871,7 +871,7 @@ static void oti6858_shutdown(struct usb_
static void oti6858_read_int_callback(struct urb *urb)
{
@@ -848,7 +848,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
struct oti6858_private *priv = usb_get_serial_port_data(port);
int transient = 0, can_recv = 0, resubmit = 1;
int status = urb->status;
-@@ -988,7 +988,7 @@ static void oti6858_read_int_callback(st
+@@ -985,7 +985,7 @@ static void oti6858_read_int_callback(st
static void oti6858_read_bulk_callback(struct urb *urb)
{
@@ -857,7 +857,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
struct oti6858_private *priv = usb_get_serial_port_data(port);
struct tty_struct *tty;
unsigned char *data = urb->transfer_buffer;
-@@ -1041,7 +1041,7 @@ static void oti6858_read_bulk_callback(s
+@@ -1038,7 +1038,7 @@ static void oti6858_read_bulk_callback(s
static void oti6858_write_bulk_callback(struct urb *urb)
{
@@ -928,7 +928,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/drivers/usb/serial/ti_usb_3410_5052.c
+++ b/drivers/usb/serial/ti_usb_3410_5052.c
-@@ -1105,7 +1105,7 @@ static void ti_break(struct usb_serial_p
+@@ -1099,7 +1099,7 @@ static void ti_break(struct usb_serial_p
static void ti_interrupt_callback(struct urb *urb)
{
@@ -937,7 +937,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
struct usb_serial_port *port;
struct usb_serial *serial = tdev->td_serial;
struct ti_port *tport;
-@@ -1188,7 +1188,7 @@ exit:
+@@ -1182,7 +1182,7 @@ exit:
static void ti_bulk_in_callback(struct urb *urb)
{
@@ -946,7 +946,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
struct usb_serial_port *port = tport->tp_port;
struct device *dev = &urb->dev->dev;
int status = urb->status;
-@@ -1254,7 +1254,7 @@ exit:
+@@ -1248,7 +1248,7 @@ exit:
static void ti_bulk_out_callback(struct urb *urb)
{
@@ -957,7 +957,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
int status = urb->status;
--- a/drivers/usb/serial/visor.c
+++ b/drivers/usb/serial/visor.c
-@@ -487,7 +487,7 @@ static int visor_chars_in_buffer (struct
+@@ -478,7 +478,7 @@ static int visor_chars_in_buffer (struct
static void visor_write_bulk_callback (struct urb *urb)
{
@@ -966,7 +966,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
struct visor_private *priv = usb_get_serial_port_data(port);
int status = urb->status;
unsigned long flags;
-@@ -511,7 +511,7 @@ static void visor_write_bulk_callback (s
+@@ -502,7 +502,7 @@ static void visor_write_bulk_callback (s
static void visor_read_bulk_callback (struct urb *urb)
{
@@ -975,7 +975,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
struct visor_private *priv = usb_get_serial_port_data(port);
unsigned char *data = urb->transfer_buffer;
int status = urb->status;
-@@ -562,7 +562,7 @@ static void visor_read_bulk_callback (st
+@@ -553,7 +553,7 @@ static void visor_read_bulk_callback (st
static void visor_read_int_callback (struct urb *urb)
{
@@ -986,7 +986,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/drivers/usb/serial/whiteheat.c
+++ b/drivers/usb/serial/whiteheat.c
-@@ -971,7 +971,7 @@ static void command_port_write_callback(
+@@ -965,7 +965,7 @@ static void command_port_write_callback(
static void command_port_read_callback(struct urb *urb)
{
@@ -995,7 +995,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
struct whiteheat_command_private *command_info;
int status = urb->status;
unsigned char *data = urb->transfer_buffer;
-@@ -1021,7 +1021,7 @@ static void command_port_read_callback(s
+@@ -1015,7 +1015,7 @@ static void command_port_read_callback(s
static void whiteheat_read_callback(struct urb *urb)
{
@@ -1004,7 +1004,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
struct whiteheat_urb_wrap *wrap;
unsigned char *data = urb->transfer_buffer;
struct whiteheat_private *info = usb_get_serial_port_data(port);
-@@ -1065,7 +1065,7 @@ static void whiteheat_read_callback(stru
+@@ -1059,7 +1059,7 @@ static void whiteheat_read_callback(stru
static void whiteheat_write_callback(struct urb *urb)
{
diff --git a/usb/usb-replace-remaining-__function__-occurrences.patch b/usb/usb-replace-remaining-__function__-occurrences.patch
index f01fac61840ab4..4bff542c752d38 100644
--- a/usb/usb-replace-remaining-__function__-occurrences.patch
+++ b/usb/usb-replace-remaining-__function__-occurrences.patch
@@ -39,7 +39,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/ehci-sched.c | 2
drivers/usb/host/pci-quirks.c | 6
drivers/usb/host/sl811-hcd.c | 4
- drivers/usb/host/uhci-hcd.c | 8
+ drivers/usb/host/uhci-hcd.c | 6
drivers/usb/host/uhci-q.c | 2
drivers/usb/misc/adutux.c | 120 +++++-----
drivers/usb/misc/appledisplay.c | 6
@@ -96,7 +96,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/storage/transport.c | 18 -
drivers/usb/storage/usb.c | 16 -
drivers/usb/usb-skeleton.c | 6
- 83 files changed, 2131 insertions(+), 2131 deletions(-)
+ 83 files changed, 2130 insertions(+), 2130 deletions(-)
--- a/drivers/usb/atm/ueagle-atm.c
+++ b/drivers/usb/atm/ueagle-atm.c
@@ -356,7 +356,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (status == 0)
mark_active(intf);
-@@ -1094,7 +1094,7 @@ static int usb_suspend_both(struct usb_d
+@@ -1093,7 +1093,7 @@ static int usb_suspend_both(struct usb_d
}
done:
@@ -365,7 +365,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return status;
}
-@@ -1188,7 +1188,7 @@ static int usb_resume_both(struct usb_de
+@@ -1187,7 +1187,7 @@ static int usb_resume_both(struct usb_de
}
done:
@@ -374,7 +374,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (!status)
udev->reset_resume = 0;
return status;
-@@ -1258,7 +1258,7 @@ void usb_autosuspend_device(struct usb_d
+@@ -1257,7 +1257,7 @@ void usb_autosuspend_device(struct usb_d
status = usb_autopm_do_device(udev, -1);
dev_vdbg(&udev->dev, "%s: cnt %d\n",
@@ -383,7 +383,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
/**
-@@ -1278,7 +1278,7 @@ void usb_try_autosuspend_device(struct u
+@@ -1277,7 +1277,7 @@ void usb_try_autosuspend_device(struct u
{
usb_autopm_do_device(udev, 0);
dev_vdbg(&udev->dev, "%s: cnt %d\n",
@@ -392,7 +392,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
/**
-@@ -1306,7 +1306,7 @@ int usb_autoresume_device(struct usb_dev
+@@ -1305,7 +1305,7 @@ int usb_autoresume_device(struct usb_dev
status = usb_autopm_do_device(udev, 1);
dev_vdbg(&udev->dev, "%s: status %d cnt %d\n",
@@ -401,7 +401,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return status;
}
-@@ -1378,7 +1378,7 @@ void usb_autopm_put_interface(struct usb
+@@ -1377,7 +1377,7 @@ void usb_autopm_put_interface(struct usb
status = usb_autopm_do_interface(intf, -1);
dev_vdbg(&intf->dev, "%s: status %d cnt %d\n",
@@ -410,7 +410,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
EXPORT_SYMBOL_GPL(usb_autopm_put_interface);
-@@ -1422,7 +1422,7 @@ int usb_autopm_get_interface(struct usb_
+@@ -1421,7 +1421,7 @@ int usb_autopm_get_interface(struct usb_
status = usb_autopm_do_interface(intf, 1);
dev_vdbg(&intf->dev, "%s: status %d cnt %d\n",
@@ -419,7 +419,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return status;
}
EXPORT_SYMBOL_GPL(usb_autopm_get_interface);
-@@ -1444,7 +1444,7 @@ int usb_autopm_set_interface(struct usb_
+@@ -1443,7 +1443,7 @@ int usb_autopm_set_interface(struct usb_
status = usb_autopm_do_interface(intf, 0);
dev_vdbg(&intf->dev, "%s: status %d cnt %d\n",
@@ -448,7 +448,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return;
}
-@@ -2103,7 +2103,7 @@ static int hub_suspend(struct usb_interf
+@@ -2101,7 +2101,7 @@ static int hub_suspend(struct usb_interf
}
}
@@ -457,7 +457,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* stop khubd and related activity */
hub_quiesce(hub);
-@@ -3171,7 +3171,7 @@ int usb_reset_device(struct usb_device *
+@@ -3164,7 +3164,7 @@ int usb_reset_device(struct usb_device *
if (!parent_hdev) {
/* this requires hcd-specific logic; see OHCI hc_restart() */
@@ -2382,16 +2382,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/drivers/usb/host/uhci-hcd.c
+++ b/drivers/usb/host/uhci-hcd.c
-@@ -265,7 +265,7 @@ __acquires(uhci->lock)
-
- auto_stop = (new_state == UHCI_RH_AUTO_STOPPED);
- dev_dbg(&uhci_to_hcd(uhci)->self.root_hub->dev,
-- "%s%s\n", __FUNCTION__,
-+ "%s%s\n", __func__,
- (auto_stop ? " (auto-stop)" : ""));
-
- /* If we get a suspend request when we're already auto-stopped
-@@ -342,7 +342,7 @@ __releases(uhci->lock)
+@@ -335,7 +335,7 @@ __releases(uhci->lock)
__acquires(uhci->lock)
{
dev_dbg(&uhci_to_hcd(uhci)->self.root_hub->dev,
@@ -2400,7 +2391,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
uhci->rh_state == UHCI_RH_AUTO_STOPPED ?
" (auto-start)" : "");
-@@ -742,7 +742,7 @@ static int uhci_pci_suspend(struct usb_h
+@@ -735,7 +735,7 @@ static int uhci_pci_suspend(struct usb_h
struct uhci_hcd *uhci = hcd_to_uhci(hcd);
int rc = 0;
@@ -2409,7 +2400,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irq(&uhci->lock);
if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags) || uhci->dead)
-@@ -778,7 +778,7 @@ static int uhci_pci_resume(struct usb_hc
+@@ -771,7 +771,7 @@ static int uhci_pci_resume(struct usb_hc
{
struct uhci_hcd *uhci = hcd_to_uhci(hcd);
@@ -4084,7 +4075,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
count = status;
kfree (buffer);
} else {
-@@ -331,7 +331,7 @@ static int __init airprime_init(void)
+@@ -328,7 +328,7 @@ static int __init airprime_init(void)
static void __exit airprime_exit(void)
{
@@ -4124,7 +4115,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/drivers/usb/serial/belkin_sa.c
+++ b/drivers/usb/serial/belkin_sa.c
-@@ -198,7 +198,7 @@ static void belkin_sa_shutdown (struct u
+@@ -195,7 +195,7 @@ static void belkin_sa_shutdown (struct u
struct belkin_sa_private *priv;
int i;
@@ -4133,7 +4124,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* stop reads and writes on all ports */
for (i=0; i < serial->num_ports; ++i) {
-@@ -213,7 +213,7 @@ static int belkin_sa_open (struct usb_s
+@@ -210,7 +210,7 @@ static int belkin_sa_open (struct usb_s
{
int retval = 0;
@@ -4142,7 +4133,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/*Start reading from the device*/
/* TODO: Look at possibility of submitting multiple URBs to device to
-@@ -240,7 +240,7 @@ exit:
+@@ -237,7 +237,7 @@ exit:
static void belkin_sa_close (struct usb_serial_port *port, struct file *filp)
{
@@ -4151,7 +4142,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* shutdown our bulk reads and writes */
usb_kill_urb(port->write_urb);
-@@ -267,15 +267,15 @@ static void belkin_sa_read_int_callback
+@@ -264,15 +264,15 @@ static void belkin_sa_read_int_callback
case -ESHUTDOWN:
/* this urb is terminated, clean up */
dbg("%s - urb shutting down with status: %d",
@@ -4170,7 +4161,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* Handle known interrupt data */
/* ignore data[0] and data[1] */
-@@ -334,7 +334,7 @@ exit:
+@@ -331,7 +331,7 @@ exit:
retval = usb_submit_urb (urb, GFP_ATOMIC);
if (retval)
err ("%s - usb_submit_urb failed with result %d",
@@ -4179,7 +4170,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
static void belkin_sa_set_termios (struct usb_serial_port *port, struct ktermios *old_termios)
-@@ -481,7 +481,7 @@ static int belkin_sa_tiocmget (struct us
+@@ -478,7 +478,7 @@ static int belkin_sa_tiocmget (struct us
unsigned long control_state;
unsigned long flags;
@@ -4188,7 +4179,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irqsave(&priv->lock, flags);
control_state = priv->control_state;
-@@ -502,7 +502,7 @@ static int belkin_sa_tiocmset (struct us
+@@ -499,7 +499,7 @@ static int belkin_sa_tiocmset (struct us
int rts = 0;
int dtr = 0;
@@ -4631,7 +4622,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
for (i=0; i < serial->num_ports; ++i) {
--- a/drivers/usb/serial/cyberjack.c
+++ b/drivers/usb/serial/cyberjack.c
-@@ -119,7 +119,7 @@ static int cyberjack_startup (struct usb
+@@ -116,7 +116,7 @@ static int cyberjack_startup (struct usb
struct cyberjack_private *priv;
int i;
@@ -4640,7 +4631,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* allocate the private data structure */
priv = kmalloc(sizeof(struct cyberjack_private), GFP_KERNEL);
-@@ -142,7 +142,7 @@ static int cyberjack_startup (struct usb
+@@ -139,7 +139,7 @@ static int cyberjack_startup (struct usb
GFP_KERNEL);
if (result)
err(" usb_submit_urb(read int) failed");
@@ -4649,7 +4640,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
return( 0 );
-@@ -152,7 +152,7 @@ static void cyberjack_shutdown (struct u
+@@ -149,7 +149,7 @@ static void cyberjack_shutdown (struct u
{
int i;
@@ -4658,7 +4649,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
for (i=0; i < serial->num_ports; ++i) {
usb_kill_urb(serial->port[i]->interrupt_in_urb);
-@@ -168,9 +168,9 @@ static int cyberjack_open (struct usb_s
+@@ -165,9 +165,9 @@ static int cyberjack_open (struct usb_s
unsigned long flags;
int result = 0;
@@ -4670,7 +4661,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
usb_clear_halt(port->serial->dev, port->write_urb->pipe);
/* force low_latency on so that our tty_push actually forces
-@@ -191,7 +191,7 @@ static int cyberjack_open (struct usb_s
+@@ -188,7 +188,7 @@ static int cyberjack_open (struct usb_s
static void cyberjack_close (struct usb_serial_port *port, struct file *filp)
{
@@ -4679,7 +4670,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (port->serial->dev) {
/* shutdown any bulk reads that might be going on */
-@@ -208,17 +208,17 @@ static int cyberjack_write (struct usb_s
+@@ -205,17 +205,17 @@ static int cyberjack_write (struct usb_s
int result;
int wrexpected;
@@ -4700,7 +4691,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return 0;
}
port->write_urb_busy = 1;
-@@ -237,13 +237,13 @@ static int cyberjack_write (struct usb_s
+@@ -234,13 +234,13 @@ static int cyberjack_write (struct usb_s
/* Copy data */
memcpy (priv->wrbuf+priv->wrfilled, buf, count);
@@ -4716,7 +4707,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
} else {
wrexpected = sizeof(priv->wrbuf);
}
-@@ -252,7 +252,7 @@ static int cyberjack_write (struct usb_s
+@@ -249,7 +249,7 @@ static int cyberjack_write (struct usb_s
/* We have enough data to begin transmission */
int length;
@@ -4725,7 +4716,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
length = (wrexpected > port->bulk_out_size) ? port->bulk_out_size : wrexpected;
memcpy (port->write_urb->transfer_buffer, priv->wrbuf, length );
-@@ -270,7 +270,7 @@ static int cyberjack_write (struct usb_s
+@@ -267,7 +267,7 @@ static int cyberjack_write (struct usb_s
/* send the data out the bulk port */
result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
if (result) {
@@ -4734,7 +4725,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* Throw away data. No better idea what to do with it. */
priv->wrfilled=0;
priv->wrsent=0;
-@@ -279,11 +279,11 @@ static int cyberjack_write (struct usb_s
+@@ -276,11 +276,11 @@ static int cyberjack_write (struct usb_s
return 0;
}
@@ -4749,7 +4740,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
memset( priv->wrbuf, 0, sizeof(priv->wrbuf) );
priv->wrfilled=0;
priv->wrsent=0;
-@@ -308,13 +308,13 @@ static void cyberjack_read_int_callback(
+@@ -305,13 +305,13 @@ static void cyberjack_read_int_callback(
int status = urb->status;
int result;
@@ -4765,7 +4756,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* React only to interrupts signaling a bulk_in transfer */
if( (urb->actual_length==4) && (data[0]==0x01) ) {
-@@ -336,7 +336,7 @@ static void cyberjack_read_int_callback(
+@@ -333,7 +333,7 @@ static void cyberjack_read_int_callback(
/* "+=" is probably more fault tollerant than "=" */
priv->rdtodo += size;
@@ -4774,7 +4765,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_unlock(&priv->lock);
-@@ -344,8 +344,8 @@ static void cyberjack_read_int_callback(
+@@ -341,8 +341,8 @@ static void cyberjack_read_int_callback(
port->read_urb->dev = port->serial->dev;
result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if( result )
@@ -4785,7 +4776,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
}
-@@ -354,7 +354,7 @@ resubmit:
+@@ -351,7 +351,7 @@ resubmit:
result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
if (result)
err(" usb_submit_urb(read int) failed");
@@ -4794,7 +4785,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
static void cyberjack_read_bulk_callback (struct urb *urb)
-@@ -367,18 +367,18 @@ static void cyberjack_read_bulk_callback
+@@ -364,18 +364,18 @@ static void cyberjack_read_bulk_callback
int result;
int status = urb->status;
@@ -4817,7 +4808,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return;
}
if (urb->actual_length) {
-@@ -397,15 +397,15 @@ static void cyberjack_read_bulk_callback
+@@ -394,15 +394,15 @@ static void cyberjack_read_bulk_callback
spin_unlock(&priv->lock);
@@ -4836,7 +4827,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
}
-@@ -415,12 +415,12 @@ static void cyberjack_write_bulk_callbac
+@@ -412,12 +412,12 @@ static void cyberjack_write_bulk_callbac
struct cyberjack_private *priv = usb_get_serial_port_data(port);
int status = urb->status;
@@ -4851,7 +4842,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return;
}
-@@ -430,7 +430,7 @@ static void cyberjack_write_bulk_callbac
+@@ -427,7 +427,7 @@ static void cyberjack_write_bulk_callbac
if( priv->wrfilled ) {
int length, blksize, result;
@@ -4860,7 +4851,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
length = ((priv->wrfilled - priv->wrsent) > port->bulk_out_size) ?
port->bulk_out_size : (priv->wrfilled - priv->wrsent);
-@@ -451,20 +451,20 @@ static void cyberjack_write_bulk_callbac
+@@ -448,20 +448,20 @@ static void cyberjack_write_bulk_callbac
/* send the data out the bulk port */
result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
if (result) {
@@ -4887,7 +4878,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
priv->wrsent=0;
--- a/drivers/usb/serial/cypress_m8.c
+++ b/drivers/usb/serial/cypress_m8.c
-@@ -342,7 +342,7 @@ static int cypress_serial_control (struc
+@@ -330,7 +330,7 @@ static int cypress_serial_control (struc
__u8 feature_buffer[5];
unsigned long flags;
@@ -4896,7 +4887,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
priv = usb_get_serial_port_data(port);
-@@ -357,7 +357,7 @@ static int cypress_serial_control (struc
+@@ -345,7 +345,7 @@ static int cypress_serial_control (struc
new_baudrate = priv->baud_rate;
/* Change of speed ? */
else if (baud_rate != priv->baud_rate) {
@@ -4905,7 +4896,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
retval = analyze_baud_rate(port, baud_rate);
if (retval >= 0) {
new_baudrate = retval;
-@@ -365,7 +365,7 @@ static int cypress_serial_control (struc
+@@ -353,7 +353,7 @@ static int cypress_serial_control (struc
__func__, new_baudrate);
}
}
@@ -4914,7 +4905,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
memset(feature_buffer, 0, sizeof(feature_buffer));
/* fill the feature_buffer with new configuration */
-@@ -379,8 +379,8 @@ static int cypress_serial_control (struc
+@@ -367,8 +367,8 @@ static int cypress_serial_control (struc
/* 1 bit gap */
feature_buffer[4] |= (reset << 7); /* assign reset at end of byte, 1 bit space */
@@ -4925,7 +4916,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
feature_buffer[2], feature_buffer[3], feature_buffer[4]);
do {
-@@ -398,7 +398,7 @@ static int cypress_serial_control (struc
+@@ -386,7 +386,7 @@ static int cypress_serial_control (struc
retval != -ENODEV);
if (retval != sizeof(feature_buffer)) {
@@ -4934,7 +4925,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
cypress_set_dead(port);
} else {
spin_lock_irqsave(&priv->lock, flags);
-@@ -418,7 +418,7 @@ static int cypress_serial_control (struc
+@@ -406,7 +406,7 @@ static int cypress_serial_control (struc
to crash the hardware. */
return -ENOTTY;
}
@@ -4943,7 +4934,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* set initial values in feature buffer */
memset(feature_buffer, 0, sizeof(feature_buffer));
-@@ -437,7 +437,7 @@ static int cypress_serial_control (struc
+@@ -425,7 +425,7 @@ static int cypress_serial_control (struc
retval != -ENODEV);
if (retval != sizeof(feature_buffer)) {
@@ -4952,7 +4943,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
cypress_set_dead(port);
return retval;
} else {
-@@ -485,7 +485,7 @@ static int generic_startup (struct usb_s
+@@ -473,7 +473,7 @@ static int generic_startup (struct usb_s
struct cypress_private *priv;
struct usb_serial_port *port = serial->port[0];
@@ -4961,7 +4952,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
priv = kzalloc(sizeof (struct cypress_private), GFP_KERNEL);
if (!priv)
-@@ -521,12 +521,12 @@ static int generic_startup (struct usb_s
+@@ -509,12 +509,12 @@ static int generic_startup (struct usb_s
priv->write_urb_interval = interval;
priv->read_urb_interval = interval;
dbg("%s - port %d read & write intervals forced to %d",
@@ -4976,7 +4967,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
priv->read_urb_interval,priv->write_urb_interval);
}
usb_set_serial_port_data(port, priv);
-@@ -540,10 +540,10 @@ static int cypress_earthmate_startup (st
+@@ -528,10 +528,10 @@ static int cypress_earthmate_startup (st
struct cypress_private *priv;
struct usb_serial_port *port = serial->port[0];
@@ -4989,7 +4980,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
port->number);
return 1;
}
-@@ -571,10 +571,10 @@ static int cypress_hidcom_startup (struc
+@@ -559,10 +559,10 @@ static int cypress_hidcom_startup (struc
{
struct cypress_private *priv;
@@ -5002,7 +4993,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
serial->port[0]->number);
return 1;
}
-@@ -590,10 +590,10 @@ static int cypress_ca42v2_startup (struc
+@@ -578,10 +578,10 @@ static int cypress_ca42v2_startup (struc
{
struct cypress_private *priv;
@@ -5015,7 +5006,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
serial->port[0]->number);
return 1;
}
-@@ -609,7 +609,7 @@ static void cypress_shutdown (struct usb
+@@ -597,7 +597,7 @@ static void cypress_shutdown (struct usb
{
struct cypress_private *priv;
@@ -5024,7 +5015,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* all open ports are closed at this point */
-@@ -630,7 +630,7 @@ static int cypress_open (struct usb_seri
+@@ -618,7 +618,7 @@ static int cypress_open (struct usb_seri
unsigned long flags;
int result = 0;
@@ -5033,7 +5024,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (!priv->comm_is_ok)
return -EIO;
-@@ -658,16 +658,16 @@ static int cypress_open (struct usb_seri
+@@ -646,16 +646,16 @@ static int cypress_open (struct usb_seri
result = cypress_write(port, NULL, 0);
if (result) {
@@ -5053,7 +5044,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return(-1);
}
-@@ -678,7 +678,7 @@ static int cypress_open (struct usb_seri
+@@ -666,7 +666,7 @@ static int cypress_open (struct usb_seri
result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
if (result){
@@ -5062,7 +5053,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
cypress_set_dead(port);
}
-@@ -694,7 +694,7 @@ static void cypress_close(struct usb_ser
+@@ -682,7 +682,7 @@ static void cypress_close(struct usb_ser
long timeout;
wait_queue_t wait;
@@ -5071,7 +5062,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* wait for data to drain from buffer */
spin_lock_irq(&priv->lock);
-@@ -732,7 +732,7 @@ static void cypress_close(struct usb_ser
+@@ -720,7 +720,7 @@ static void cypress_close(struct usb_ser
timeout = 2*HZ;
schedule_timeout_interruptible(timeout);
@@ -5080,7 +5071,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
usb_kill_urb (port->interrupt_in_urb);
usb_kill_urb (port->interrupt_out_urb);
-@@ -761,7 +761,7 @@ static int cypress_write(struct usb_seri
+@@ -749,7 +749,7 @@ static int cypress_write(struct usb_seri
struct cypress_private *priv = usb_get_serial_port_data(port);
unsigned long flags;
@@ -5089,7 +5080,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* line control commands, which need to be executed immediately,
are not put into the buffer for obvious reasons.
-@@ -794,12 +794,12 @@ static void cypress_send(struct usb_seri
+@@ -782,12 +782,12 @@ static void cypress_send(struct usb_seri
if (!priv->comm_is_ok)
return;
@@ -5105,7 +5096,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_unlock_irqrestore(&priv->lock, flags);
return;
}
-@@ -828,7 +828,7 @@ static void cypress_send(struct usb_seri
+@@ -816,7 +816,7 @@ static void cypress_send(struct usb_seri
if (priv->cmd_ctrl) {
priv->cmd_count++;
@@ -5114,7 +5105,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_unlock_irqrestore(&priv->lock, flags);
goto send;
} else
-@@ -850,7 +850,7 @@ static void cypress_send(struct usb_seri
+@@ -838,7 +838,7 @@ static void cypress_send(struct usb_seri
port->interrupt_out_buffer[0] |= count;
}
@@ -5123,7 +5114,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
send:
spin_lock_irqsave(&priv->lock, flags);
-@@ -863,7 +863,7 @@ send:
+@@ -851,7 +851,7 @@ send:
actual_size = count +
(priv->pkt_fmt == packet_format_1 ? 2 : 1);
@@ -5132,7 +5123,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
port->interrupt_out_urb->transfer_buffer);
usb_fill_int_urb(port->interrupt_out_urb, port->serial->dev,
-@@ -872,7 +872,7 @@ send:
+@@ -860,7 +860,7 @@ send:
cypress_write_int_callback, port, priv->write_urb_interval);
result = usb_submit_urb (port->interrupt_out_urb, GFP_ATOMIC);
if (result) {
@@ -5141,7 +5132,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
result);
priv->write_urb_in_use = 0;
cypress_set_dead(port);
-@@ -896,13 +896,13 @@ static int cypress_write_room(struct usb
+@@ -884,13 +884,13 @@ static int cypress_write_room(struct usb
int room = 0;
unsigned long flags;
@@ -5157,7 +5148,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return room;
}
-@@ -914,7 +914,7 @@ static int cypress_tiocmget (struct usb_
+@@ -902,7 +902,7 @@ static int cypress_tiocmget (struct usb_
unsigned int result = 0;
unsigned long flags;
@@ -5166,7 +5157,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irqsave(&priv->lock, flags);
control = priv->line_control;
-@@ -928,7 +928,7 @@ static int cypress_tiocmget (struct usb_
+@@ -916,7 +916,7 @@ static int cypress_tiocmget (struct usb_
| ((status & UART_RI) ? TIOCM_RI : 0)
| ((status & UART_CD) ? TIOCM_CD : 0);
@@ -5175,7 +5166,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return result;
}
-@@ -940,7 +940,7 @@ static int cypress_tiocmset (struct usb_
+@@ -928,7 +928,7 @@ static int cypress_tiocmset (struct usb_
struct cypress_private *priv = usb_get_serial_port_data(port);
unsigned long flags;
@@ -5184,7 +5175,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irqsave(&priv->lock, flags);
if (set & TIOCM_RTS)
-@@ -962,7 +962,7 @@ static int cypress_ioctl (struct usb_ser
+@@ -950,7 +950,7 @@ static int cypress_ioctl (struct usb_ser
{
struct cypress_private *priv = usb_get_serial_port_data(port);
@@ -5193,7 +5184,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
switch (cmd) {
/* This code comes from drivers/char/serial.c and ftdi_sio.c */
-@@ -1000,7 +1000,7 @@ static int cypress_ioctl (struct usb_ser
+@@ -988,7 +988,7 @@ static int cypress_ioctl (struct usb_ser
break;
}
@@ -5202,7 +5193,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return -ENOIOCTLCMD;
} /* cypress_ioctl */
-@@ -1017,7 +1017,7 @@ static void cypress_set_termios (struct
+@@ -1005,7 +1005,7 @@ static void cypress_set_termios (struct
__u8 oldlines;
int linechange = 0;
@@ -5211,7 +5202,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
tty = port->tty;
-@@ -1088,7 +1088,7 @@ static void cypress_set_termios (struct
+@@ -1076,7 +1076,7 @@ static void cypress_set_termios (struct
break;
default:
err("%s - CSIZE was set, but not CS5-CS8",
@@ -5220,7 +5211,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
data_bits = 3;
}
} else
-@@ -1098,14 +1098,14 @@ static void cypress_set_termios (struct
+@@ -1086,14 +1086,14 @@ static void cypress_set_termios (struct
oldlines = priv->line_control;
if ((cflag & CBAUD) == B0) {
/* drop dtr and rts */
@@ -5237,7 +5228,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
parity_enable, parity_type, data_bits);
cypress_serial_control(port, tty_get_baud_rate(tty), data_bits, stop_bits,
-@@ -1166,13 +1166,13 @@ static int cypress_chars_in_buffer(struc
+@@ -1154,13 +1154,13 @@ static int cypress_chars_in_buffer(struc
int chars = 0;
unsigned long flags;
@@ -5253,7 +5244,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return chars;
}
-@@ -1182,7 +1182,7 @@ static void cypress_throttle (struct usb
+@@ -1170,7 +1170,7 @@ static void cypress_throttle (struct usb
struct cypress_private *priv = usb_get_serial_port_data(port);
unsigned long flags;
@@ -5262,7 +5253,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irqsave(&priv->lock, flags);
priv->rx_flags = THROTTLED;
-@@ -1196,7 +1196,7 @@ static void cypress_unthrottle (struct u
+@@ -1184,7 +1184,7 @@ static void cypress_unthrottle (struct u
int actually_throttled, result;
unsigned long flags;
@@ -5271,7 +5262,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irqsave(&priv->lock, flags);
actually_throttled = priv->rx_flags & ACTUALLY_THROTTLED;
-@@ -1212,7 +1212,7 @@ static void cypress_unthrottle (struct u
+@@ -1200,7 +1200,7 @@ static void cypress_unthrottle (struct u
result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
if (result) {
dev_err(&port->dev, "%s - failed submitting read urb, "
@@ -5280,7 +5271,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
cypress_set_dead(port);
}
}
-@@ -1233,7 +1233,7 @@ static void cypress_read_int_callback(st
+@@ -1221,7 +1221,7 @@ static void cypress_read_int_callback(st
int i = 0;
int status = urb->status;
@@ -5289,7 +5280,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
switch (status) {
case 0: /* success */
-@@ -1249,14 +1249,14 @@ static void cypress_read_int_callback(st
+@@ -1237,14 +1237,14 @@ static void cypress_read_int_callback(st
default:
/* something ugly is going on... */
dev_err(&urb->dev->dev,"%s - unexpected nonzero read status received: %d\n",
@@ -5306,7 +5297,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
priv->rx_flags |= ACTUALLY_THROTTLED;
spin_unlock_irqrestore(&priv->lock, flags);
return;
-@@ -1265,7 +1265,7 @@ static void cypress_read_int_callback(st
+@@ -1253,7 +1253,7 @@ static void cypress_read_int_callback(st
tty = port->tty;
if (!tty) {
@@ -5315,7 +5306,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return;
}
-@@ -1297,7 +1297,7 @@ static void cypress_read_int_callback(st
+@@ -1285,7 +1285,7 @@ static void cypress_read_int_callback(st
goto continue_read;
}
@@ -5324,7 +5315,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
urb->actual_length, data);
spin_lock_irqsave(&priv->lock, flags);
-@@ -1314,7 +1314,7 @@ static void cypress_read_int_callback(st
+@@ -1302,7 +1302,7 @@ static void cypress_read_int_callback(st
* though */
if (tty && !(tty->termios->c_cflag & CLOCAL) &&
!(priv->current_status & UART_CD)) {
@@ -5333,7 +5324,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
tty_hangup(tty);
goto continue_read;
}
-@@ -1327,7 +1327,7 @@ static void cypress_read_int_callback(st
+@@ -1315,7 +1315,7 @@ static void cypress_read_int_callback(st
if (priv->current_status & CYP_ERROR) {
spin_unlock_irqrestore(&priv->lock, flags);
tty_flag = TTY_PARITY;
@@ -5342,7 +5333,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
} else
spin_unlock_irqrestore(&priv->lock, flags);
-@@ -1361,7 +1361,7 @@ continue_read:
+@@ -1349,7 +1349,7 @@ continue_read:
result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
if (result) {
dev_err(&urb->dev->dev, "%s - failed resubmitting "
@@ -5351,7 +5342,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
result);
cypress_set_dead(port);
}
-@@ -1378,7 +1378,7 @@ static void cypress_write_int_callback(s
+@@ -1366,7 +1366,7 @@ static void cypress_write_int_callback(s
int result;
int status = urb->status;
@@ -5360,7 +5351,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
switch (status) {
case 0:
-@@ -1389,7 +1389,7 @@ static void cypress_write_int_callback(s
+@@ -1377,7 +1377,7 @@ static void cypress_write_int_callback(s
case -ESHUTDOWN:
/* this urb is terminated, clean up */
dbg("%s - urb shutting down with status: %d",
@@ -5369,7 +5360,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
priv->write_urb_in_use = 0;
return;
case -EPIPE: /* no break needed; clear halt and resubmit */
-@@ -1398,19 +1398,19 @@ static void cypress_write_int_callback(s
+@@ -1386,19 +1386,19 @@ static void cypress_write_int_callback(s
usb_clear_halt(port->serial->dev, 0x02);
/* error in the urb, so we have to resubmit it */
dbg("%s - nonzero write bulk status received: %d",
@@ -5392,7 +5383,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
cypress_set_dead(port);
break;
}
-@@ -1615,7 +1615,7 @@ static int __init cypress_init(void)
+@@ -1603,7 +1603,7 @@ static int __init cypress_init(void)
{
int retval;
@@ -5401,7 +5392,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
retval = usb_serial_register(&cypress_earthmate_device);
if (retval)
-@@ -1646,7 +1646,7 @@ failed_em_register:
+@@ -1634,7 +1634,7 @@ failed_em_register:
static void __exit cypress_exit (void)
{
@@ -5412,7 +5403,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
usb_serial_deregister (&cypress_earthmate_device);
--- a/drivers/usb/serial/digi_acceleport.c
+++ b/drivers/usb/serial/digi_acceleport.c
-@@ -665,7 +665,7 @@ static int digi_write_oob_command(struct
+@@ -659,7 +659,7 @@ static int digi_write_oob_command(struct
}
spin_unlock_irqrestore(&oob_priv->dp_port_lock, flags);
if (ret)
@@ -5421,7 +5412,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return ret;
}
-@@ -746,7 +746,7 @@ static int digi_write_inb_command(struct
+@@ -740,7 +740,7 @@ static int digi_write_inb_command(struct
if (ret)
err("%s: usb_submit_urb failed, ret=%d, port=%d",
@@ -5430,7 +5421,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return ret;
}
-@@ -810,7 +810,7 @@ static int digi_set_modem_signals(struct
+@@ -804,7 +804,7 @@ static int digi_set_modem_signals(struct
spin_unlock(&port_priv->dp_port_lock);
spin_unlock_irqrestore(&oob_priv->dp_port_lock, flags);
if (ret)
@@ -5439,7 +5430,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return ret;
}
-@@ -903,7 +903,7 @@ static void digi_rx_unthrottle(struct us
+@@ -897,7 +897,7 @@ static void digi_rx_unthrottle(struct us
if (ret)
err("%s: usb_submit_urb failed, ret=%d, port=%d",
@@ -5448,7 +5439,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
-@@ -1113,7 +1113,7 @@ static int digi_tiocmget(struct usb_seri
+@@ -1107,7 +1107,7 @@ static int digi_tiocmget(struct usb_seri
unsigned int val;
unsigned long flags;
@@ -5457,7 +5448,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irqsave(&priv->dp_port_lock, flags);
val = priv->dp_modem_signals;
-@@ -1129,7 +1129,7 @@ static int digi_tiocmset(struct usb_seri
+@@ -1123,7 +1123,7 @@ static int digi_tiocmset(struct usb_seri
unsigned int val;
unsigned long flags;
@@ -5466,7 +5457,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irqsave(&priv->dp_port_lock, flags);
val = (priv->dp_modem_signals & ~clear) | set;
-@@ -1224,7 +1224,7 @@ static int digi_write(struct usb_serial_
+@@ -1218,7 +1218,7 @@ static int digi_write(struct usb_serial_
spin_unlock_irqrestore(&priv->dp_port_lock, flags);
if (ret < 0)
err("%s: usb_submit_urb failed, ret=%d, port=%d",
@@ -5475,7 +5466,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
dbg("digi_write: returning %d", ret);
return ret;
-@@ -1245,13 +1245,13 @@ static void digi_write_bulk_callback(str
+@@ -1239,13 +1239,13 @@ static void digi_write_bulk_callback(str
/* port and serial sanity check */
if (port == NULL || (priv=usb_get_serial_port_data(port)) == NULL) {
err("%s: port or port->private is NULL, status=%d",
@@ -5491,7 +5482,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return;
}
-@@ -1292,7 +1292,7 @@ static void digi_write_bulk_callback(str
+@@ -1286,7 +1286,7 @@ static void digi_write_bulk_callback(str
spin_unlock(&priv->dp_port_lock);
if (ret)
err("%s: usb_submit_urb failed, ret=%d, port=%d",
@@ -5500,7 +5491,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
static int digi_write_room(struct usb_serial_port *port)
-@@ -1521,7 +1521,7 @@ static int digi_startup_device(struct us
+@@ -1515,7 +1515,7 @@ static int digi_startup_device(struct us
port->write_urb->dev = port->serial->dev;
if ((ret = usb_submit_urb(port->read_urb, GFP_KERNEL)) != 0) {
err("%s: usb_submit_urb failed, ret=%d, port=%d",
@@ -5509,7 +5500,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
break;
}
}
-@@ -1622,20 +1622,20 @@ static void digi_read_bulk_callback(stru
+@@ -1616,20 +1616,20 @@ static void digi_read_bulk_callback(stru
/* port sanity check, do not resubmit if port is not valid */
if (port == NULL || (priv = usb_get_serial_port_data(port)) == NULL) {
err("%s: port or port->private is NULL, status=%d",
@@ -5533,7 +5524,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return;
}
-@@ -1652,7 +1652,7 @@ static void digi_read_bulk_callback(stru
+@@ -1646,7 +1646,7 @@ static void digi_read_bulk_callback(stru
urb->dev = port->serial->dev;
if ((ret = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
err("%s: failed resubmitting urb, ret=%d, port=%d",
@@ -5542,7 +5533,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
}
-@@ -1690,7 +1690,7 @@ static int digi_read_inb_callback(struct
+@@ -1684,7 +1684,7 @@ static int digi_read_inb_callback(struct
if (urb->actual_length != len + 2) {
err("%s: INCOMPLETE OR MULTIPLE PACKET, urb->status=%d, "
"port=%d, opcode=%d, len=%d, actual_length=%d, "
@@ -5551,7 +5542,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
opcode, len, urb->actual_length, port_status);
return -1;
}
-@@ -1739,9 +1739,9 @@ static int digi_read_inb_callback(struct
+@@ -1733,9 +1733,9 @@ static int digi_read_inb_callback(struct
spin_unlock(&priv->dp_port_lock);
if (opcode == DIGI_CMD_RECEIVE_DISABLE)
@@ -5565,7 +5556,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/drivers/usb/serial/empeg.c
+++ b/drivers/usb/serial/empeg.c
-@@ -153,7 +153,7 @@ static int empeg_open (struct usb_serial
+@@ -150,7 +150,7 @@ static int empeg_open (struct usb_serial
struct usb_serial *serial = port->serial;
int result = 0;
@@ -5574,7 +5565,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* Force default termio settings */
empeg_set_termios (port, NULL) ;
-@@ -175,7 +175,7 @@ static int empeg_open (struct usb_serial
+@@ -172,7 +172,7 @@ static int empeg_open (struct usb_serial
result = usb_submit_urb(port->read_urb, GFP_KERNEL);
if (result)
@@ -5583,7 +5574,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return result;
}
-@@ -183,7 +183,7 @@ static int empeg_open (struct usb_serial
+@@ -180,7 +180,7 @@ static int empeg_open (struct usb_serial
static void empeg_close (struct usb_serial_port *port, struct file * filp)
{
@@ -5592,7 +5583,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* shutdown our bulk read */
usb_kill_urb(port->read_urb);
-@@ -203,7 +203,7 @@ static int empeg_write (struct usb_seria
+@@ -200,7 +200,7 @@ static int empeg_write (struct usb_seria
int bytes_sent = 0;
int transfer_size;
@@ -5601,7 +5592,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
while (count > 0) {
-@@ -222,14 +222,14 @@ static int empeg_write (struct usb_seria
+@@ -219,14 +219,14 @@ static int empeg_write (struct usb_seria
spin_unlock_irqrestore (&write_urb_pool_lock, flags);
if (urb == NULL) {
@@ -5618,7 +5609,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
goto exit;
}
}
-@@ -238,7 +238,7 @@ static int empeg_write (struct usb_seria
+@@ -235,7 +235,7 @@ static int empeg_write (struct usb_seria
memcpy (urb->transfer_buffer, current_position, transfer_size);
@@ -5627,7 +5618,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* build up our urb */
usb_fill_bulk_urb (
-@@ -254,7 +254,7 @@ static int empeg_write (struct usb_seria
+@@ -251,7 +251,7 @@ static int empeg_write (struct usb_seria
/* send it down the pipe */
status = usb_submit_urb(urb, GFP_ATOMIC);
if (status) {
@@ -5636,7 +5627,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
bytes_sent = status;
break;
}
-@@ -278,7 +278,7 @@ static int empeg_write_room (struct usb_
+@@ -275,7 +275,7 @@ static int empeg_write_room (struct usb_
int i;
int room = 0;
@@ -5645,7 +5636,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irqsave (&write_urb_pool_lock, flags);
-@@ -291,7 +291,7 @@ static int empeg_write_room (struct usb_
+@@ -288,7 +288,7 @@ static int empeg_write_room (struct usb_
spin_unlock_irqrestore (&write_urb_pool_lock, flags);
@@ -5654,7 +5645,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return (room);
-@@ -304,7 +304,7 @@ static int empeg_chars_in_buffer (struct
+@@ -301,7 +301,7 @@ static int empeg_chars_in_buffer (struct
int i;
int chars = 0;
@@ -5663,7 +5654,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irqsave (&write_urb_pool_lock, flags);
-@@ -317,7 +317,7 @@ static int empeg_chars_in_buffer (struct
+@@ -314,7 +314,7 @@ static int empeg_chars_in_buffer (struct
spin_unlock_irqrestore (&write_urb_pool_lock, flags);
@@ -5672,7 +5663,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return (chars);
-@@ -329,11 +329,11 @@ static void empeg_write_bulk_callback (s
+@@ -326,11 +326,11 @@ static void empeg_write_bulk_callback (s
struct usb_serial_port *port = urb->context;
int status = urb->status;
@@ -5686,7 +5677,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return;
}
-@@ -349,15 +349,15 @@ static void empeg_read_bulk_callback (st
+@@ -346,15 +346,15 @@ static void empeg_read_bulk_callback (st
int result;
int status = urb->status;
@@ -5705,7 +5696,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
tty = port->tty;
-@@ -382,7 +382,7 @@ static void empeg_read_bulk_callback (st
+@@ -379,7 +379,7 @@ static void empeg_read_bulk_callback (st
result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result)
@@ -5714,7 +5705,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return;
-@@ -391,7 +391,7 @@ static void empeg_read_bulk_callback (st
+@@ -388,7 +388,7 @@ static void empeg_read_bulk_callback (st
static void empeg_throttle (struct usb_serial_port *port)
{
@@ -5723,7 +5714,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
usb_kill_urb(port->read_urb);
}
-@@ -400,14 +400,14 @@ static void empeg_unthrottle (struct usb
+@@ -397,14 +397,14 @@ static void empeg_unthrottle (struct usb
{
int result;
@@ -5740,7 +5731,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return;
}
-@@ -417,14 +417,14 @@ static int empeg_startup (struct usb_se
+@@ -414,14 +414,14 @@ static int empeg_startup (struct usb_se
{
int r;
@@ -5757,7 +5748,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
r = usb_reset_configuration (serial->dev);
/* continue on with initialization */
-@@ -435,13 +435,13 @@ static int empeg_startup (struct usb_se
+@@ -432,13 +432,13 @@ static int empeg_startup (struct usb_se
static void empeg_shutdown (struct usb_serial *serial)
{
@@ -5773,7 +5764,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return -ENOIOCTLCMD;
}
-@@ -450,7 +450,7 @@ static int empeg_ioctl (struct usb_seria
+@@ -447,7 +447,7 @@ static int empeg_ioctl (struct usb_seria
static void empeg_set_termios (struct usb_serial_port *port, struct ktermios *old_termios)
{
struct ktermios *termios = port->tty->termios;
@@ -5782,7 +5773,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/*
* The empeg-car player wants these particular tty settings.
-@@ -517,7 +517,7 @@ static int __init empeg_init (void)
+@@ -514,7 +514,7 @@ static int __init empeg_init (void)
urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
if (!urb->transfer_buffer) {
err("%s - out of memory for urb buffers.",
@@ -5824,7 +5815,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
-@@ -528,7 +528,7 @@ static int update_mctrl(struct usb_seria
+@@ -525,7 +525,7 @@ static int update_mctrl(struct usb_seria
int rv;
if (((set | clear) & (TIOCM_DTR | TIOCM_RTS)) == 0) {
@@ -5833,7 +5824,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return 0; /* no change */
}
-@@ -556,13 +556,13 @@ static int update_mctrl(struct usb_seria
+@@ -553,13 +553,13 @@ static int update_mctrl(struct usb_seria
kfree(buf);
if (rv < 0) {
err("%s Error from MODEM_CTRL urb: DTR %s, RTS %s",
@@ -5849,7 +5840,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
(set & TIOCM_DTR) ? "HIGH" :
(clear & TIOCM_DTR) ? "LOW" : "unchanged",
(set & TIOCM_RTS) ? "HIGH" :
-@@ -642,7 +642,7 @@ static __u32 get_ftdi_divisor(struct usb
+@@ -639,7 +639,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);
@@ -5858,7 +5849,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* 2. Observe async-compatible custom_divisor hack, update baudrate if needed */
-@@ -650,7 +650,7 @@ static __u32 get_ftdi_divisor(struct usb
+@@ -647,7 +647,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;
@@ -5867,7 +5858,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
/* 3. Convert baudrate to device-specific divisor */
-@@ -671,7 +671,7 @@ static __u32 get_ftdi_divisor(struct usb
+@@ -668,7 +668,7 @@ static __u32 get_ftdi_divisor(struct usb
case 115200: div_value = ftdi_sio_b115200; break;
} /* baud */
if (div_value == 0) {
@@ -5876,7 +5867,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
div_value = ftdi_sio_b9600;
baud = 9600;
div_okay = 0;
-@@ -681,7 +681,7 @@ static __u32 get_ftdi_divisor(struct usb
+@@ -678,7 +678,7 @@ static __u32 get_ftdi_divisor(struct usb
if (baud <= 3000000) {
div_value = ftdi_232am_baud_to_divisor(baud);
} else {
@@ -5885,7 +5876,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
baud = 9600;
div_value = ftdi_232am_baud_to_divisor(9600);
div_okay = 0;
-@@ -693,7 +693,7 @@ static __u32 get_ftdi_divisor(struct usb
+@@ -690,7 +690,7 @@ static __u32 get_ftdi_divisor(struct usb
if (baud <= 3000000) {
div_value = ftdi_232bm_baud_to_divisor(baud);
} else {
@@ -5894,7 +5885,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
div_value = ftdi_232bm_baud_to_divisor(9600);
div_okay = 0;
baud = 9600;
-@@ -703,7 +703,7 @@ static __u32 get_ftdi_divisor(struct usb
+@@ -700,7 +700,7 @@ static __u32 get_ftdi_divisor(struct usb
if (div_okay) {
dbg("%s - Baud rate set to %d (divisor 0x%lX) on chip %s",
@@ -5903,7 +5894,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
ftdi_chip_name[priv->chip_type]);
}
-@@ -804,7 +804,7 @@ static void ftdi_determine_type(struct u
+@@ -801,7 +801,7 @@ static void ftdi_determine_type(struct u
version = le16_to_cpu(udev->descriptor.bcdDevice);
interfaces = udev->actconfig->desc.bNumInterfaces;
@@ -5912,7 +5903,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
version, interfaces);
if (interfaces > 1) {
int inter;
-@@ -822,7 +822,7 @@ static void ftdi_determine_type(struct u
+@@ -819,7 +819,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",
@@ -5921,7 +5912,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
} else if (version < 0x200) {
/* Old device. Assume its the original SIO. */
-@@ -860,7 +860,7 @@ static ssize_t show_latency_timer(struct
+@@ -857,7 +857,7 @@ static ssize_t show_latency_timer(struct
int rv = 0;
@@ -5930,7 +5921,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
rv = usb_control_msg(udev,
usb_rcvctrlpipe(udev, 0),
-@@ -887,7 +887,7 @@ static ssize_t store_latency_timer(struc
+@@ -884,7 +884,7 @@ static ssize_t store_latency_timer(struc
int v = simple_strtoul(valbuf, NULL, 10);
int rv = 0;
@@ -5939,7 +5930,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
rv = usb_control_msg(udev,
usb_sndctrlpipe(udev, 0),
-@@ -916,7 +916,7 @@ static ssize_t store_event_char(struct d
+@@ -913,7 +913,7 @@ static ssize_t store_event_char(struct d
int v = simple_strtoul(valbuf, NULL, 10);
int rv = 0;
@@ -5948,7 +5939,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
rv = usb_control_msg(udev,
usb_sndctrlpipe(udev, 0),
-@@ -941,7 +941,7 @@ static int create_sysfs_attrs(struct usb
+@@ -938,7 +938,7 @@ static int create_sysfs_attrs(struct usb
struct ftdi_private *priv = usb_get_serial_port_data(port);
int retval = 0;
@@ -5957,7 +5948,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. */
-@@ -963,7 +963,7 @@ static void remove_sysfs_attrs(struct us
+@@ -960,7 +960,7 @@ static void remove_sysfs_attrs(struct us
{
struct ftdi_private *priv = usb_get_serial_port_data(port);
@@ -5966,7 +5957,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* XXX see create_sysfs_attrs */
if (priv->chip_type != SIO) {
-@@ -1005,11 +1005,11 @@ static int ftdi_sio_port_probe(struct us
+@@ -1002,11 +1002,11 @@ static int ftdi_sio_port_probe(struct us
struct ftdi_sio_quirk *quirk = usb_get_serial_data(port->serial);
@@ -5980,7 +5971,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return -ENOMEM;
}
-@@ -1058,7 +1058,7 @@ static int ftdi_sio_port_probe(struct us
+@@ -1055,7 +1055,7 @@ static int ftdi_sio_port_probe(struct us
/* Called from usbserial:serial_probe */
static void ftdi_USB_UIRT_setup (struct ftdi_private *priv)
{
@@ -5989,7 +5980,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
priv->flags |= ASYNC_SPD_CUST;
priv->custom_divisor = 77;
-@@ -1069,7 +1069,7 @@ static void ftdi_USB_UIRT_setup (struct
+@@ -1066,7 +1066,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)
{
@@ -5998,7 +5989,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
priv->flags |= ASYNC_SPD_CUST;
priv->custom_divisor = 240;
-@@ -1087,7 +1087,7 @@ static int ftdi_jtag_probe(struct usb_se
+@@ -1084,7 +1084,7 @@ static int ftdi_jtag_probe(struct usb_se
struct usb_device *udev = serial->dev;
struct usb_interface *interface = serial->interface;
@@ -6007,7 +5998,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (interface == udev->actconfig->interface[0]) {
info("Ignoring serial port reserved for JTAG");
-@@ -1123,14 +1123,14 @@ static int ftdi_mtxorb_hack_setup(struct
+@@ -1120,14 +1120,14 @@ static int ftdi_mtxorb_hack_setup(struct
*/
static void ftdi_shutdown (struct usb_serial *serial)
{
@@ -6024,7 +6015,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
remove_sysfs_attrs(port);
-@@ -1155,7 +1155,7 @@ static int ftdi_open (struct usb_serial
+@@ -1152,7 +1152,7 @@ static int ftdi_open (struct usb_serial
int result = 0;
char buf[1]; /* Needed for the usb_control_msg I think */
@@ -6033,7 +6024,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irqsave(&priv->tx_lock, flags);
priv->tx_bytes = 0;
-@@ -1200,7 +1200,7 @@ static int ftdi_open (struct usb_serial
+@@ -1197,7 +1197,7 @@ static int ftdi_open (struct usb_serial
ftdi_read_bulk_callback, port);
result = usb_submit_urb(port->read_urb, GFP_KERNEL);
if (result)
@@ -6042,7 +6033,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return result;
-@@ -1222,7 +1222,7 @@ static void ftdi_close (struct usb_seria
+@@ -1219,7 +1219,7 @@ static void ftdi_close (struct usb_seria
struct ftdi_private *priv = usb_get_serial_port_data(port);
char buf[1];
@@ -6051,7 +6042,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
mutex_lock(&port->serial->disc_mutex);
if (c_cflag & HUPCL && !port->serial->disconnected){
-@@ -1269,7 +1269,7 @@ static int ftdi_write (struct usb_serial
+@@ -1266,7 +1266,7 @@ static int ftdi_write (struct usb_serial
int transfer_size;
unsigned long flags;
@@ -6060,7 +6051,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (count == 0) {
dbg("write request of 0 bytes");
-@@ -1278,7 +1278,7 @@ static int ftdi_write (struct usb_serial
+@@ -1275,7 +1275,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);
@@ -6069,7 +6060,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return 0;
}
priv->tx_outstanding_urbs++;
-@@ -1298,14 +1298,14 @@ static int ftdi_write (struct usb_serial
+@@ -1295,14 +1295,14 @@ static int ftdi_write (struct usb_serial
buffer = kmalloc (transfer_size, GFP_ATOMIC);
if (!buffer) {
@@ -6086,7 +6077,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
count = -ENOMEM;
goto error_no_urb;
}
-@@ -1337,7 +1337,7 @@ static int ftdi_write (struct usb_serial
+@@ -1334,7 +1334,7 @@ static int ftdi_write (struct usb_serial
memcpy (buffer, buf, count);
}
@@ -6095,7 +6086,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* fill the buffer and send it */
usb_fill_bulk_urb(urb, port->serial->dev,
-@@ -1347,7 +1347,7 @@ static int ftdi_write (struct usb_serial
+@@ -1344,7 +1344,7 @@ static int ftdi_write (struct usb_serial
status = usb_submit_urb(urb, GFP_ATOMIC);
if (status) {
@@ -6104,7 +6095,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
count = status;
goto error;
} else {
-@@ -1361,7 +1361,7 @@ static int ftdi_write (struct usb_serial
+@@ -1358,7 +1358,7 @@ static int ftdi_write (struct usb_serial
* really free it when it is finished with it */
usb_free_urb(urb);
@@ -6113,7 +6104,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return count;
error:
usb_free_urb(urb);
-@@ -1389,7 +1389,7 @@ static void ftdi_write_bulk_callback (st
+@@ -1386,7 +1386,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);
@@ -6122,7 +6113,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (status) {
dbg("nonzero write bulk status received: %d", status);
-@@ -1398,7 +1398,7 @@ static void ftdi_write_bulk_callback (st
+@@ -1395,7 +1395,7 @@ static void ftdi_write_bulk_callback (st
priv = usb_get_serial_port_data(port);
if (!priv) {
@@ -6131,7 +6122,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return;
}
/* account for transferred data */
-@@ -1423,7 +1423,7 @@ static int ftdi_write_room( struct usb_s
+@@ -1420,7 +1420,7 @@ static int ftdi_write_room( struct usb_s
int room;
unsigned long flags;
@@ -6140,7 +6131,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) {
-@@ -1447,13 +1447,13 @@ static int ftdi_chars_in_buffer (struct
+@@ -1444,13 +1444,13 @@ static int ftdi_chars_in_buffer (struct
int buffered;
unsigned long flags;
@@ -6156,7 +6147,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
buffered = 0;
}
return buffered;
-@@ -1471,30 +1471,30 @@ static void ftdi_read_bulk_callback (str
+@@ -1468,30 +1468,30 @@ static void ftdi_read_bulk_callback (str
int status = urb->status;
if (urb->number_of_packets > 0) {
@@ -6193,7 +6184,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
if (status) {
-@@ -1532,39 +1532,39 @@ static void ftdi_process_read (struct wo
+@@ -1529,39 +1529,39 @@ static void ftdi_process_read (struct wo
int packet_offset;
unsigned long flags;
@@ -6239,7 +6230,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
} else {
dbg("Status only: %03oo %03oo",data[0],data[1]);
}
-@@ -1594,17 +1594,17 @@ static void ftdi_process_read (struct wo
+@@ -1591,17 +1591,17 @@ static void ftdi_process_read (struct wo
length = min(PKTSZ, urb->actual_length-packet_offset)-2;
if (length < 0) {
@@ -6260,7 +6251,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
break;
}
-@@ -1672,7 +1672,7 @@ static void ftdi_process_read (struct wo
+@@ -1669,7 +1669,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",
@@ -6269,7 +6260,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);
-@@ -1680,7 +1680,7 @@ static void ftdi_process_read (struct wo
+@@ -1677,7 +1677,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",
@@ -6278,7 +6269,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return;
}
spin_unlock_irqrestore(&priv->rx_lock, flags);
-@@ -1689,7 +1689,7 @@ static void ftdi_process_read (struct wo
+@@ -1686,7 +1686,7 @@ static void ftdi_process_read (struct wo
/* delay processing of remainder */
schedule_delayed_work(&priv->rx_work, 1);
} else {
@@ -6287,7 +6278,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
return;
}
-@@ -1707,7 +1707,7 @@ static void ftdi_process_read (struct wo
+@@ -1704,7 +1704,7 @@ static void ftdi_process_read (struct wo
result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result)
@@ -6296,7 +6287,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
return;
-@@ -1736,10 +1736,10 @@ static void ftdi_break_ctl( struct usb_s
+@@ -1733,10 +1733,10 @@ static void ftdi_break_ctl( struct usb_s
FTDI_SIO_SET_DATA_REQUEST_TYPE,
urb_value , priv->interface,
buf, 0, WDR_TIMEOUT) < 0) {
@@ -6309,7 +6300,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
-@@ -1763,18 +1763,18 @@ static void ftdi_set_termios (struct usb
+@@ -1760,18 +1760,18 @@ static void ftdi_set_termios (struct usb
unsigned char vstop;
unsigned char vstart;
@@ -6331,7 +6322,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
termios->c_cflag |= CRTSCTS;
}
-@@ -1818,7 +1818,7 @@ static void ftdi_set_termios (struct usb
+@@ -1815,7 +1815,7 @@ static void ftdi_set_termios (struct usb
FTDI_SIO_SET_DATA_REQUEST_TYPE,
urb_value , priv->interface,
buf, 0, WDR_SHORT_TIMEOUT) < 0) {
@@ -6340,7 +6331,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
/* Now do the baudrate */
-@@ -1829,14 +1829,14 @@ static void ftdi_set_termios (struct usb
+@@ -1826,14 +1826,14 @@ static void ftdi_set_termios (struct usb
FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE,
0, priv->interface,
buf, 0, WDR_TIMEOUT) < 0) {
@@ -6357,7 +6348,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) {
-@@ -1847,7 +1847,7 @@ static void ftdi_set_termios (struct usb
+@@ -1844,7 +1844,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) {
@@ -6366,7 +6357,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,
-@@ -1865,7 +1865,7 @@ static void ftdi_set_termios (struct usb
+@@ -1862,7 +1862,7 @@ static void ftdi_set_termios (struct usb
* if IXOFF is not set, the pre-xon/xoff code is executed.
*/
if (iflag & IXOFF) {
@@ -6375,7 +6366,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
-@@ -1886,7 +1886,7 @@ static void ftdi_set_termios (struct usb
+@@ -1883,7 +1883,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 */
@@ -6384,7 +6375,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,
-@@ -1908,7 +1908,7 @@ static int ftdi_tiocmget (struct usb_ser
+@@ -1905,7 +1905,7 @@ static int ftdi_tiocmget (struct usb_ser
unsigned char buf[2];
int ret;
@@ -6393,7 +6384,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
switch (priv->chip_type) {
case SIO:
/* Request the status from the device */
-@@ -1918,7 +1918,7 @@ static int ftdi_tiocmget (struct usb_ser
+@@ -1915,7 +1915,7 @@ static int ftdi_tiocmget (struct usb_ser
FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE,
0, 0,
buf, 1, WDR_TIMEOUT)) < 0 ) {
@@ -6402,7 +6393,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
ret);
return(ret);
}
-@@ -1935,7 +1935,7 @@ static int ftdi_tiocmget (struct usb_ser
+@@ -1932,7 +1932,7 @@ static int ftdi_tiocmget (struct usb_ser
FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE,
0, priv->interface,
buf, 2, WDR_TIMEOUT)) < 0 ) {
@@ -6411,7 +6402,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
ret);
return(ret);
}
-@@ -1954,7 +1954,7 @@ static int ftdi_tiocmget (struct usb_ser
+@@ -1951,7 +1951,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)
{
@@ -6420,7 +6411,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return update_mctrl(port, set, clear);
}
-@@ -1963,7 +1963,7 @@ static int ftdi_ioctl (struct usb_serial
+@@ -1960,7 +1960,7 @@ static int ftdi_ioctl (struct usb_serial
{
struct ftdi_private *priv = usb_get_serial_port_data(port);
@@ -6429,7 +6420,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* Based on code from acm.c and others */
switch (cmd) {
-@@ -2022,7 +2022,7 @@ static int ftdi_ioctl (struct usb_serial
+@@ -2019,7 +2019,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)
*/
@@ -6438,7 +6429,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return(-ENOIOCTLCMD);
} /* ftdi_ioctl */
-@@ -2033,7 +2033,7 @@ static void ftdi_throttle (struct usb_se
+@@ -2030,7 +2030,7 @@ static void ftdi_throttle (struct usb_se
struct ftdi_private *priv = usb_get_serial_port_data(port);
unsigned long flags;
@@ -6447,7 +6438,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irqsave(&priv->rx_lock, flags);
priv->rx_flags |= THROTTLED;
-@@ -2047,7 +2047,7 @@ static void ftdi_unthrottle (struct usb_
+@@ -2044,7 +2044,7 @@ static void ftdi_unthrottle (struct usb_
int actually_throttled;
unsigned long flags;
@@ -6456,7 +6447,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irqsave(&priv->rx_lock, flags);
actually_throttled = priv->rx_flags & ACTUALLY_THROTTLED;
-@@ -2062,7 +2062,7 @@ static int __init ftdi_init (void)
+@@ -2059,7 +2059,7 @@ static int __init ftdi_init (void)
{
int retval;
@@ -6465,7 +6456,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;
-@@ -2091,7 +2091,7 @@ failed_sio_register:
+@@ -2088,7 +2088,7 @@ failed_sio_register:
static void __exit ftdi_exit (void)
{
@@ -6911,7 +6902,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
del_timer_sync(&garmin_data_p->timer);
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
-@@ -121,7 +121,7 @@ int usb_serial_generic_open (struct usb_
+@@ -118,7 +118,7 @@ int usb_serial_generic_open (struct usb_
int result = 0;
unsigned long flags;
@@ -6920,7 +6911,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* force low_latency on so that our tty_push actually forces the data through,
otherwise it is scheduled, and with high data rates (like with OHCI) data
-@@ -148,7 +148,7 @@ int usb_serial_generic_open (struct usb_
+@@ -145,7 +145,7 @@ int usb_serial_generic_open (struct usb_
port);
result = usb_submit_urb(port->read_urb, GFP_KERNEL);
if (result)
@@ -6929,7 +6920,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
return result;
-@@ -159,7 +159,7 @@ static void generic_cleanup (struct usb_
+@@ -156,7 +156,7 @@ static void generic_cleanup (struct usb_
{
struct usb_serial *serial = port->serial;
@@ -6938,7 +6929,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (serial->dev) {
/* shutdown any bulk reads that might be going on */
-@@ -197,7 +197,7 @@ int usb_serial_generic_resume(struct usb
+@@ -194,7 +194,7 @@ int usb_serial_generic_resume(struct usb
void usb_serial_generic_close (struct usb_serial_port *port, struct file * filp)
{
@@ -6947,7 +6938,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
generic_cleanup (port);
}
-@@ -207,10 +207,10 @@ int usb_serial_generic_write(struct usb_
+@@ -204,10 +204,10 @@ int usb_serial_generic_write(struct usb_
int result;
unsigned char *data;
@@ -6960,7 +6951,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return (0);
}
-@@ -220,7 +220,7 @@ int usb_serial_generic_write(struct usb_
+@@ -217,7 +217,7 @@ int usb_serial_generic_write(struct usb_
spin_lock_irqsave(&port->lock, flags);
if (port->write_urb_busy) {
spin_unlock_irqrestore(&port->lock, flags);
@@ -6969,7 +6960,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return 0;
}
port->write_urb_busy = 1;
-@@ -230,7 +230,7 @@ int usb_serial_generic_write(struct usb_
+@@ -227,7 +227,7 @@ int usb_serial_generic_write(struct usb_
memcpy (port->write_urb->transfer_buffer, buf, count);
data = port->write_urb->transfer_buffer;
@@ -6978,7 +6969,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* set up our urb */
usb_fill_bulk_urb (port->write_urb, serial->dev,
-@@ -245,7 +245,7 @@ int usb_serial_generic_write(struct usb_
+@@ -242,7 +242,7 @@ int usb_serial_generic_write(struct usb_
port->write_urb_busy = 1;
result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
if (result) {
@@ -6987,7 +6978,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* don't have to grab the lock here, as we will retry if != 0 */
port->write_urb_busy = 0;
} else
-@@ -263,14 +263,14 @@ int usb_serial_generic_write_room (struc
+@@ -260,14 +260,14 @@ int usb_serial_generic_write_room (struc
struct usb_serial *serial = port->serial;
int room = 0;
@@ -7004,7 +6995,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return (room);
}
-@@ -279,14 +279,14 @@ int usb_serial_generic_chars_in_buffer (
+@@ -276,14 +276,14 @@ int usb_serial_generic_chars_in_buffer (
struct usb_serial *serial = port->serial;
int chars = 0;
@@ -7021,7 +7012,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return (chars);
}
-@@ -308,7 +308,7 @@ static void resubmit_read_urb(struct usb
+@@ -305,7 +305,7 @@ static void resubmit_read_urb(struct usb
usb_serial_generic_read_bulk_callback), port);
result = usb_submit_urb(urb, mem_flags);
if (result)
@@ -7030,7 +7021,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
/* Push data to tty layer and resubmit the bulk read URB */
-@@ -337,15 +337,15 @@ void usb_serial_generic_read_bulk_callba
+@@ -334,15 +334,15 @@ void usb_serial_generic_read_bulk_callba
int status = urb->status;
unsigned long flags;
@@ -7049,7 +7040,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* Throttle the device if requested by tty */
spin_lock_irqsave(&port->lock, flags);
-@@ -363,12 +363,12 @@ void usb_serial_generic_write_bulk_callb
+@@ -360,12 +360,12 @@ void usb_serial_generic_write_bulk_callb
struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
int status = urb->status;
@@ -7064,7 +7055,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return;
}
-@@ -380,7 +380,7 @@ void usb_serial_generic_throttle (struct
+@@ -377,7 +377,7 @@ void usb_serial_generic_throttle (struct
{
unsigned long flags;
@@ -7073,7 +7064,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* Set the throttle request flag. It will be picked up
* by usb_serial_generic_read_bulk_callback(). */
-@@ -394,7 +394,7 @@ void usb_serial_generic_unthrottle (stru
+@@ -391,7 +391,7 @@ void usb_serial_generic_unthrottle (stru
int was_throttled;
unsigned long flags;
@@ -7082,7 +7073,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* Clear the throttle flags */
spin_lock_irqsave(&port->lock, flags);
-@@ -412,7 +412,7 @@ void usb_serial_generic_shutdown (struct
+@@ -409,7 +409,7 @@ void usb_serial_generic_shutdown (struct
{
int i;
@@ -9670,7 +9661,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
--- a/drivers/usb/serial/ipaq.c
+++ b/drivers/usb/serial/ipaq.c
-@@ -597,13 +597,13 @@ static int ipaq_open(struct usb_serial_p
+@@ -594,13 +594,13 @@ static int ipaq_open(struct usb_serial_p
int i, result = 0;
int retries = connect_retries;
@@ -9686,7 +9677,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return -ENOMEM;
}
usb_set_serial_port_data(port, priv);
-@@ -682,7 +682,7 @@ static int ipaq_open(struct usb_serial_p
+@@ -679,7 +679,7 @@ static int ipaq_open(struct usb_serial_p
}
if (!retries && result) {
@@ -9695,7 +9686,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
result);
goto error;
}
-@@ -695,7 +695,7 @@ static int ipaq_open(struct usb_serial_p
+@@ -692,7 +692,7 @@ static int ipaq_open(struct usb_serial_p
result = usb_submit_urb(port->read_urb, GFP_KERNEL);
if (result) {
@@ -9704,7 +9695,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
goto error;
}
-@@ -703,7 +703,7 @@ static int ipaq_open(struct usb_serial_p
+@@ -700,7 +700,7 @@ static int ipaq_open(struct usb_serial_p
enomem:
result = -ENOMEM;
@@ -9713,7 +9704,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
error:
ipaq_destroy_lists(port);
kfree(priv);
-@@ -715,7 +715,7 @@ static void ipaq_close(struct usb_serial
+@@ -712,7 +712,7 @@ static void ipaq_close(struct usb_serial
{
struct ipaq_private *priv = usb_get_serial_port_data(port);
@@ -9722,7 +9713,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/*
* shut down bulk read and write
-@@ -738,15 +738,15 @@ static void ipaq_read_bulk_callback(stru
+@@ -735,15 +735,15 @@ static void ipaq_read_bulk_callback(stru
int result;
int status = urb->status;
@@ -9741,7 +9732,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
tty = port->tty;
if (tty && urb->actual_length) {
-@@ -763,7 +763,7 @@ static void ipaq_read_bulk_callback(stru
+@@ -760,7 +760,7 @@ static void ipaq_read_bulk_callback(stru
ipaq_read_bulk_callback, port);
result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result)
@@ -9750,7 +9741,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return;
}
-@@ -774,7 +774,7 @@ static int ipaq_write(struct usb_serial_
+@@ -771,7 +771,7 @@ static int ipaq_write(struct usb_serial_
int bytes_sent = 0;
int transfer_size;
@@ -9759,7 +9750,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
while (count > 0) {
transfer_size = min(count, PACKET_SIZE);
-@@ -799,7 +799,7 @@ static int ipaq_write_bulk(struct usb_se
+@@ -796,7 +796,7 @@ static int ipaq_write_bulk(struct usb_se
unsigned long flags;
if (priv->free_len <= 0) {
@@ -9768,7 +9759,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return -EAGAIN;
}
-@@ -811,12 +811,12 @@ static int ipaq_write_bulk(struct usb_se
+@@ -808,12 +808,12 @@ static int ipaq_write_bulk(struct usb_se
}
spin_unlock_irqrestore(&write_list_lock, flags);
if (pkt == NULL) {
@@ -9783,7 +9774,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
pkt->len = count;
pkt->written = 0;
-@@ -829,7 +829,7 @@ static int ipaq_write_bulk(struct usb_se
+@@ -826,7 +826,7 @@ static int ipaq_write_bulk(struct usb_se
spin_unlock_irqrestore(&write_list_lock, flags);
result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
if (result) {
@@ -9792,7 +9783,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
} else {
spin_unlock_irqrestore(&write_list_lock, flags);
-@@ -878,11 +878,11 @@ static void ipaq_write_bulk_callback(str
+@@ -875,11 +875,11 @@ static void ipaq_write_bulk_callback(str
int result;
int status = urb->status;
@@ -9806,7 +9797,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return;
}
-@@ -892,7 +892,7 @@ static void ipaq_write_bulk_callback(str
+@@ -889,7 +889,7 @@ static void ipaq_write_bulk_callback(str
spin_unlock_irqrestore(&write_list_lock, flags);
result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
if (result) {
@@ -9815,7 +9806,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
} else {
priv->active = 0;
-@@ -906,7 +906,7 @@ static int ipaq_write_room(struct usb_se
+@@ -903,7 +903,7 @@ static int ipaq_write_room(struct usb_se
{
struct ipaq_private *priv = usb_get_serial_port_data(port);
@@ -9824,7 +9815,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return priv->free_len;
}
-@@ -914,7 +914,7 @@ static int ipaq_chars_in_buffer(struct u
+@@ -911,7 +911,7 @@ static int ipaq_chars_in_buffer(struct u
{
struct ipaq_private *priv = usb_get_serial_port_data(port);
@@ -9833,7 +9824,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return priv->queue_len;
}
-@@ -936,7 +936,7 @@ static void ipaq_destroy_lists(struct us
+@@ -933,7 +933,7 @@ static void ipaq_destroy_lists(struct us
static int ipaq_startup(struct usb_serial *serial)
{
@@ -9842,7 +9833,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (serial->dev->actconfig->desc.bConfigurationValue != 1) {
err("active config #%d != 1 ??",
serial->dev->actconfig->desc.bConfigurationValue);
-@@ -947,7 +947,7 @@ static int ipaq_startup(struct usb_seria
+@@ -944,7 +944,7 @@ static int ipaq_startup(struct usb_seria
static void ipaq_shutdown(struct usb_serial *serial)
{
@@ -10044,7 +10035,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/drivers/usb/serial/ir-usb.c
+++ b/drivers/usb/serial/ir-usb.c
-@@ -198,16 +198,16 @@ static struct irda_class_desc *irda_usb_
+@@ -195,16 +195,16 @@ static struct irda_class_desc *irda_usb_
USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
0, ifnum, desc, sizeof(*desc), 1000);
@@ -10064,7 +10055,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
goto error;
}
-@@ -251,7 +251,7 @@ static int ir_startup (struct usb_serial
+@@ -248,7 +248,7 @@ static int ir_startup (struct usb_serial
}
dbg ("%s - Baud rates supported:%s%s%s%s%s%s%s%s%s",
@@ -10073,7 +10064,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
(irda_desc->wBaudRate & 0x0001) ? " 2400" : "",
(irda_desc->wBaudRate & 0x0002) ? " 9600" : "",
(irda_desc->wBaudRate & 0x0004) ? " 19200" : "",
-@@ -284,13 +284,13 @@ static int ir_open (struct usb_serial_po
+@@ -281,13 +281,13 @@ static int ir_open (struct usb_serial_po
char *buffer;
int result = 0;
@@ -10089,7 +10080,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return -ENOMEM;
}
kfree (port->read_urb->transfer_buffer);
-@@ -299,7 +299,7 @@ static int ir_open (struct usb_serial_po
+@@ -296,7 +296,7 @@ static int ir_open (struct usb_serial_po
buffer = kmalloc (buffer_size, GFP_KERNEL);
if (!buffer) {
@@ -10098,7 +10089,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return -ENOMEM;
}
kfree (port->write_urb->transfer_buffer);
-@@ -319,14 +319,14 @@ static int ir_open (struct usb_serial_po
+@@ -316,14 +316,14 @@ static int ir_open (struct usb_serial_po
port);
result = usb_submit_urb(port->read_urb, GFP_KERNEL);
if (result)
@@ -10115,7 +10106,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* shutdown our bulk read */
usb_kill_urb(port->read_urb);
-@@ -338,10 +338,10 @@ static int ir_write (struct usb_serial_p
+@@ -335,10 +335,10 @@ static int ir_write (struct usb_serial_p
int result;
int transfer_size;
@@ -10128,7 +10119,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return 0;
}
-@@ -351,7 +351,7 @@ static int ir_write (struct usb_serial_p
+@@ -348,7 +348,7 @@ static int ir_write (struct usb_serial_p
spin_lock_bh(&port->lock);
if (port->write_urb_busy) {
spin_unlock_bh(&port->lock);
@@ -10137,7 +10128,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return 0;
}
port->write_urb_busy = 1;
-@@ -387,7 +387,7 @@ static int ir_write (struct usb_serial_p
+@@ -384,7 +384,7 @@ static int ir_write (struct usb_serial_p
result = usb_submit_urb (port->write_urb, GFP_ATOMIC);
if (result) {
port->write_urb_busy = 0;
@@ -10146,7 +10137,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
} else
result = transfer_size;
-@@ -399,19 +399,19 @@ static void ir_write_bulk_callback (stru
+@@ -396,19 +396,19 @@ static void ir_write_bulk_callback (stru
struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
int status = urb->status;
@@ -10169,7 +10160,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
urb->actual_length,
urb->transfer_buffer);
-@@ -426,10 +426,10 @@ static void ir_read_bulk_callback (struc
+@@ -423,10 +423,10 @@ static void ir_read_bulk_callback (struc
int result;
int status = urb->status;
@@ -10182,7 +10173,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return;
}
-@@ -447,7 +447,7 @@ static void ir_read_bulk_callback (struc
+@@ -444,7 +444,7 @@ static void ir_read_bulk_callback (struc
usb_serial_debug_data (
debug,
&port->dev,
@@ -10191,7 +10182,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
urb->actual_length,
data);
-@@ -480,13 +480,13 @@ static void ir_read_bulk_callback (struc
+@@ -477,13 +477,13 @@ static void ir_read_bulk_callback (struc
result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result)
dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n",
@@ -10207,7 +10198,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
status);
break ;
-@@ -502,7 +502,7 @@ static void ir_set_termios (struct usb_s
+@@ -499,7 +499,7 @@ static void ir_set_termios (struct usb_s
speed_t baud;
int ir_baud;
@@ -10216,7 +10207,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
baud = tty_get_baud_rate(port->tty);
-@@ -554,7 +554,7 @@ static void ir_set_termios (struct usb_s
+@@ -551,7 +551,7 @@ static void ir_set_termios (struct usb_s
result = usb_submit_urb (port->write_urb, GFP_KERNEL);
if (result)
@@ -11758,7 +11749,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
--- a/drivers/usb/serial/kl5kusb105.c
+++ b/drivers/usb/serial/kl5kusb105.c
-@@ -194,7 +194,7 @@ static int klsi_105_chg_port_settings(st
+@@ -191,7 +191,7 @@ static int klsi_105_chg_port_settings(st
if (rc < 0)
err("Change port settings failed (error = %d)", rc);
info("%s - %d byte block, baudrate %x, databits %d, u1 %d, u2 %d",
@@ -11767,7 +11758,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
settings->pktlen,
settings->baudrate, settings->databits,
settings->unknown1, settings->unknown2);
-@@ -225,7 +225,7 @@ static int klsi_105_get_line_state(struc
+@@ -222,7 +222,7 @@ static int klsi_105_get_line_state(struc
__u8 status_buf[KLSI_STATUSBUF_LEN] = { -1,-1};
__u16 status;
@@ -11776,7 +11767,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
rc = usb_control_msg(port->serial->dev,
usb_rcvctrlpipe(port->serial->dev, 0),
KL5KUSB105A_SIO_POLL,
-@@ -240,7 +240,7 @@ static int klsi_105_get_line_state(struc
+@@ -237,7 +237,7 @@ static int klsi_105_get_line_state(struc
else {
status = le16_to_cpu(*(u16 *)status_buf);
@@ -11785,7 +11776,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
status_buf[0], status_buf[1]);
*line_state_p = klsi_105_status2linestate(status);
-@@ -268,7 +268,7 @@ static int klsi_105_startup (struct usb_
+@@ -265,7 +265,7 @@ static int klsi_105_startup (struct usb_
priv = kmalloc(sizeof(struct klsi_105_private),
GFP_KERNEL);
if (!priv) {
@@ -11794,7 +11785,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
i--;
goto err_cleanup;
}
-@@ -298,7 +298,7 @@ static int klsi_105_startup (struct usb_
+@@ -295,7 +295,7 @@ static int klsi_105_startup (struct usb_
urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE,
GFP_KERNEL);
if (!urb->transfer_buffer) {
@@ -11803,7 +11794,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
goto err_cleanup;
}
}
-@@ -328,7 +328,7 @@ static void klsi_105_shutdown (struct us
+@@ -325,7 +325,7 @@ static void klsi_105_shutdown (struct us
{
int i;
@@ -11812,7 +11803,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* stop reads and writes on all ports */
for (i=0; i < serial->num_ports; ++i) {
-@@ -373,7 +373,7 @@ static int klsi_105_open (struct usb_se
+@@ -370,7 +370,7 @@ static int klsi_105_open (struct usb_se
struct klsi_105_port_settings cfg;
unsigned long flags;
@@ -11821,7 +11812,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* force low_latency on so that our tty_push actually forces
* the data through
-@@ -419,7 +419,7 @@ static int klsi_105_open (struct usb_se
+@@ -416,7 +416,7 @@ static int klsi_105_open (struct usb_se
rc = usb_submit_urb(port->read_urb, GFP_KERNEL);
if (rc) {
@@ -11830,7 +11821,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
retval = rc;
goto exit;
}
-@@ -437,14 +437,14 @@ static int klsi_105_open (struct usb_se
+@@ -434,14 +434,14 @@ static int klsi_105_open (struct usb_se
err("Enabling read failed (error = %d)", rc);
retval = rc;
} else
@@ -11847,7 +11838,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
retval = 0;
} else
retval = rc;
-@@ -459,7 +459,7 @@ static void klsi_105_close (struct usb_s
+@@ -456,7 +456,7 @@ static void klsi_105_close (struct usb_s
struct klsi_105_private *priv = usb_get_serial_port_data(port);
int rc;
@@ -11856,7 +11847,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
mutex_lock(&port->serial->disc_mutex);
if (!port->serial->disconnected) {
-@@ -502,7 +502,7 @@ static int klsi_105_write (struct usb_se
+@@ -499,7 +499,7 @@ static int klsi_105_write (struct usb_se
int result, size;
int bytes_sent=0;
@@ -11865,7 +11856,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
while (count > 0) {
/* try to find a free urb (write 0 bytes if none) */
-@@ -514,21 +514,21 @@ static int klsi_105_write (struct usb_se
+@@ -511,21 +511,21 @@ static int klsi_105_write (struct usb_se
for (i=0; i<NUM_URBS; i++) {
if (priv->write_urb_pool[i]->status != -EINPROGRESS) {
urb = priv->write_urb_pool[i];
@@ -11890,7 +11881,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
goto exit;
}
}
-@@ -554,7 +554,7 @@ static int klsi_105_write (struct usb_se
+@@ -551,7 +551,7 @@ static int klsi_105_write (struct usb_se
/* send the data out the bulk port */
result = usb_submit_urb(urb, GFP_ATOMIC);
if (result) {
@@ -11899,7 +11890,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
goto exit;
}
buf += size;
-@@ -573,10 +573,10 @@ static void klsi_105_write_bulk_callback
+@@ -570,10 +570,10 @@ static void klsi_105_write_bulk_callback
struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
int status = urb->status;
@@ -11912,7 +11903,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
status);
return;
}
-@@ -603,7 +603,7 @@ static int klsi_105_chars_in_buffer (str
+@@ -600,7 +600,7 @@ static int klsi_105_chars_in_buffer (str
spin_unlock_irqrestore (&priv->lock, flags);
@@ -11921,7 +11912,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return (chars);
}
-@@ -623,7 +623,7 @@ static int klsi_105_write_room (struct u
+@@ -620,7 +620,7 @@ static int klsi_105_write_room (struct u
spin_unlock_irqrestore (&priv->lock, flags);
@@ -11930,7 +11921,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return (room);
}
-@@ -638,11 +638,11 @@ static void klsi_105_read_bulk_callback
+@@ -635,11 +635,11 @@ static void klsi_105_read_bulk_callback
int rc;
int status = urb->status;
@@ -11944,7 +11935,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
status);
return;
}
-@@ -652,12 +652,12 @@ static void klsi_105_read_bulk_callback
+@@ -649,12 +649,12 @@ static void klsi_105_read_bulk_callback
*/
if (urb->actual_length == 0) {
/* empty urbs seem to happen, we ignore them */
@@ -11960,7 +11951,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
urb->actual_length, data);
} else {
int bytes_sent = ((__u8 *) data)[0] +
-@@ -669,12 +669,12 @@ static void klsi_105_read_bulk_callback
+@@ -666,12 +666,12 @@ static void klsi_105_read_bulk_callback
* intermixed tty_flip_buffer_push()s
* FIXME
*/
@@ -11975,7 +11966,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
bytes_sent+2, urb->actual_length);
/* cap at implied limit */
bytes_sent = urb->actual_length - 2;
-@@ -697,7 +697,7 @@ static void klsi_105_read_bulk_callback
+@@ -694,7 +694,7 @@ static void klsi_105_read_bulk_callback
port);
rc = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (rc)
@@ -11984,7 +11975,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
} /* klsi_105_read_bulk_callback */
-@@ -721,7 +721,7 @@ static void klsi_105_set_termios (struct
+@@ -718,7 +718,7 @@ static void klsi_105_set_termios (struct
if( (cflag & CBAUD) != (old_cflag & CBAUD) ) {
/* reassert DTR and (maybe) RTS on transition from B0 */
if( (old_cflag & CBAUD) == B0 ) {
@@ -11993,7 +11984,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
#if 0
priv->control_state |= TIOCM_DTR;
/* don't set RTS if using hardware flow control */
-@@ -767,7 +767,7 @@ static void klsi_105_set_termios (struct
+@@ -764,7 +764,7 @@ static void klsi_105_set_termios (struct
break;
}
if ((cflag & CBAUD) == B0 ) {
@@ -12002,7 +11993,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* Drop RTS and DTR */
/* maybe this should be simulated by sending read
* disable and read enable messages?
-@@ -784,11 +784,11 @@ static void klsi_105_set_termios (struct
+@@ -781,11 +781,11 @@ static void klsi_105_set_termios (struct
/* set the number of data bits */
switch (cflag & CSIZE) {
case CS5:
@@ -12016,7 +12007,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_unlock_irqrestore (&priv->lock, flags);
return ;
case CS7:
-@@ -862,7 +862,7 @@ static void mct_u232_break_ctl( struct u
+@@ -859,7 +859,7 @@ static void mct_u232_break_ctl( struct u
struct mct_u232_private *priv = (struct mct_u232_private *)port->private;
unsigned char lcr = priv->last_lcr;
@@ -12025,7 +12016,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (break_state)
lcr |= MCT_U232_SET_BREAK;
-@@ -877,7 +877,7 @@ static int klsi_105_tiocmget (struct usb
+@@ -874,7 +874,7 @@ static int klsi_105_tiocmget (struct usb
unsigned long flags;
int rc;
unsigned long line_state;
@@ -12034,7 +12025,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
rc = klsi_105_get_line_state(port, &line_state);
if (rc < 0) {
-@@ -889,7 +889,7 @@ static int klsi_105_tiocmget (struct usb
+@@ -886,7 +886,7 @@ static int klsi_105_tiocmget (struct usb
spin_lock_irqsave (&priv->lock, flags);
priv->line_state = line_state;
spin_unlock_irqrestore (&priv->lock, flags);
@@ -12043,7 +12034,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return (int)line_state;
}
-@@ -898,7 +898,7 @@ static int klsi_105_tiocmset (struct usb
+@@ -895,7 +895,7 @@ static int klsi_105_tiocmset (struct usb
{
int retval = -EINVAL;
@@ -12052,7 +12043,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* if this ever gets implemented, it should be done something like this:
struct usb_serial *serial = port->serial;
-@@ -924,7 +924,7 @@ static int klsi_105_tiocmset (struct usb
+@@ -921,7 +921,7 @@ static int klsi_105_tiocmset (struct usb
static void klsi_105_throttle (struct usb_serial_port *port)
{
@@ -12061,7 +12052,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
usb_kill_urb(port->read_urb);
}
-@@ -932,12 +932,12 @@ static void klsi_105_unthrottle (struct
+@@ -929,12 +929,12 @@ static void klsi_105_unthrottle (struct
{
int result;
@@ -12078,7 +12069,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/drivers/usb/serial/kobil_sct.c
+++ b/drivers/usb/serial/kobil_sct.c
-@@ -187,11 +187,11 @@ static int kobil_startup (struct usb_ser
+@@ -183,11 +183,11 @@ static int kobil_startup (struct usb_ser
for (i = 0; i < altsetting->desc.bNumEndpoints; i++) {
endpoint = &altsetting->endpoint[i];
if (usb_endpoint_is_int_out(&endpoint->desc)) {
@@ -12092,7 +12083,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
priv->read_int_endpoint_address = endpoint->desc.bEndpointAddress;
}
}
-@@ -202,7 +202,7 @@ static int kobil_startup (struct usb_ser
+@@ -198,7 +198,7 @@ static int kobil_startup (struct usb_ser
static void kobil_shutdown (struct usb_serial *serial)
{
int i;
@@ -12101,7 +12092,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
for (i=0; i < serial->num_ports; ++i) {
while (serial->port[i]->open_count > 0) {
-@@ -222,7 +222,7 @@ static int kobil_open (struct usb_serial
+@@ -218,7 +218,7 @@ static int kobil_open (struct usb_serial
int transfer_buffer_length = 8;
int write_urb_transfer_buffer_length = 8;
@@ -12110,7 +12101,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
priv = usb_get_serial_port_data(port);
// someone sets the dev to 0 if the close method has been called
-@@ -249,10 +249,10 @@ static int kobil_open (struct usb_serial
+@@ -245,10 +245,10 @@ static int kobil_open (struct usb_serial
// allocate write_urb
if (!port->write_urb) {
@@ -12123,7 +12114,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kfree(transfer_buffer);
return -ENOMEM;
}
-@@ -278,7 +278,7 @@ static int kobil_open (struct usb_serial
+@@ -274,7 +274,7 @@ static int kobil_open (struct usb_serial
transfer_buffer_length,
KOBIL_TIMEOUT
);
@@ -12132,7 +12123,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
dbg("Harware version: %i.%i.%i", transfer_buffer[0], transfer_buffer[1], transfer_buffer[2] );
// get firmware version
-@@ -292,7 +292,7 @@ static int kobil_open (struct usb_serial
+@@ -288,7 +288,7 @@ static int kobil_open (struct usb_serial
transfer_buffer_length,
KOBIL_TIMEOUT
);
@@ -12141,7 +12132,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
dbg("Firmware version: %i.%i.%i", transfer_buffer[0], transfer_buffer[1], transfer_buffer[2] );
if (priv->device_type == KOBIL_ADAPTER_B_PRODUCT_ID || priv->device_type == KOBIL_ADAPTER_K_PRODUCT_ID) {
-@@ -307,7 +307,7 @@ static int kobil_open (struct usb_serial
+@@ -303,7 +303,7 @@ static int kobil_open (struct usb_serial
0,
KOBIL_TIMEOUT
);
@@ -12150,7 +12141,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
// reset all queues
result = usb_control_msg( port->serial->dev,
-@@ -320,13 +320,13 @@ static int kobil_open (struct usb_serial
+@@ -316,13 +316,13 @@ static int kobil_open (struct usb_serial
0,
KOBIL_TIMEOUT
);
@@ -12166,7 +12157,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
kfree(transfer_buffer);
-@@ -336,7 +336,7 @@ static int kobil_open (struct usb_serial
+@@ -332,7 +332,7 @@ static int kobil_open (struct usb_serial
static void kobil_close (struct usb_serial_port *port, struct file *filp)
{
@@ -12175,7 +12166,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (port->write_urb) {
usb_kill_urb(port->write_urb);
-@@ -356,11 +356,11 @@ static void kobil_read_int_callback(stru
+@@ -352,11 +352,11 @@ static void kobil_read_int_callback(stru
int status = urb->status;
// char *dbg_data;
@@ -12189,7 +12180,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return;
}
-@@ -390,7 +390,7 @@ static void kobil_read_int_callback(stru
+@@ -386,7 +386,7 @@ static void kobil_read_int_callback(stru
port->interrupt_in_urb->dev = port->serial->dev;
result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
@@ -12198,7 +12189,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
-@@ -408,21 +408,21 @@ static int kobil_write (struct usb_seria
+@@ -404,21 +404,21 @@ static int kobil_write (struct usb_seria
struct kobil_private * priv;
if (count == 0) {
@@ -12223,7 +12214,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
priv->filled = priv->filled + count;
-@@ -454,7 +454,7 @@ static int kobil_write (struct usb_seria
+@@ -450,7 +450,7 @@ static int kobil_write (struct usb_seria
priv->cur_pos = priv->cur_pos + length;
result = usb_submit_urb( port->write_urb, GFP_NOIO );
@@ -12232,7 +12223,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
todo = priv->filled - priv->cur_pos;
if (todo > 0) {
-@@ -475,7 +475,7 @@ static int kobil_write (struct usb_seria
+@@ -471,7 +471,7 @@ static int kobil_write (struct usb_seria
port->interrupt_in_urb->dev = port->serial->dev;
result = usb_submit_urb( port->interrupt_in_urb, GFP_NOIO );
@@ -12241,7 +12232,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
}
return count;
-@@ -484,7 +484,7 @@ static int kobil_write (struct usb_seria
+@@ -480,7 +480,7 @@ static int kobil_write (struct usb_seria
static int kobil_write_room (struct usb_serial_port *port)
{
@@ -12250,7 +12241,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return 8;
}
-@@ -519,7 +519,7 @@ static int kobil_tiocmget(struct usb_ser
+@@ -515,7 +515,7 @@ static int kobil_tiocmget(struct usb_ser
KOBIL_TIMEOUT);
dbg("%s - port %d Send get_status_line_state URB returns: %i. Statusline: %02x",
@@ -12259,7 +12250,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
result = 0;
if ((transfer_buffer[0] & SUSBCR_GSL_DSR) != 0)
-@@ -562,9 +562,9 @@ static int kobil_tiocmset(struct usb_se
+@@ -558,9 +558,9 @@ static int kobil_tiocmset(struct usb_se
if (priv->device_type == KOBIL_ADAPTER_B_PRODUCT_ID) {
if (dtr != 0)
@@ -12271,7 +12262,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
result = usb_control_msg( port->serial->dev,
usb_rcvctrlpipe(port->serial->dev, 0 ),
SUSBCRequest_SetStatusLinesOrQueues,
-@@ -576,9 +576,9 @@ static int kobil_tiocmset(struct usb_se
+@@ -572,9 +572,9 @@ static int kobil_tiocmset(struct usb_se
KOBIL_TIMEOUT);
} else {
if (rts != 0)
@@ -12283,7 +12274,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
result = usb_control_msg( port->serial->dev,
usb_rcvctrlpipe(port->serial->dev, 0 ),
SUSBCRequest_SetStatusLinesOrQueues,
-@@ -589,7 +589,7 @@ static int kobil_tiocmset(struct usb_se
+@@ -585,7 +585,7 @@ static int kobil_tiocmset(struct usb_se
0,
KOBIL_TIMEOUT);
}
@@ -12292,7 +12283,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kfree(transfer_buffer);
return (result < 0) ? result : 0;
}
-@@ -682,7 +682,7 @@ static int kobil_ioctl(struct usb_serial
+@@ -678,7 +678,7 @@ static int kobil_ioctl(struct usb_serial
KOBIL_TIMEOUT
);
@@ -12303,7 +12294,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
default:
--- a/drivers/usb/serial/mct_u232.c
+++ b/drivers/usb/serial/mct_u232.c
-@@ -402,7 +402,7 @@ static void mct_u232_shutdown (struct us
+@@ -399,7 +399,7 @@ static void mct_u232_shutdown (struct us
struct mct_u232_private *priv;
int i;
@@ -12312,7 +12303,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
for (i=0; i < serial->num_ports; ++i) {
/* My special items, the standard routines free my urbs */
-@@ -424,7 +424,7 @@ static int mct_u232_open (struct usb_se
+@@ -421,7 +421,7 @@ static int mct_u232_open (struct usb_se
unsigned char last_lcr;
unsigned char last_msr;
@@ -12321,7 +12312,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* Compensate for a hardware bug: although the Sitecom U232-P25
* device reports a maximum output packet size of 32 bytes,
-@@ -489,7 +489,7 @@ static void mct_u232_close (struct usb_s
+@@ -486,7 +486,7 @@ static void mct_u232_close (struct usb_s
unsigned int c_cflag;
unsigned int control_state;
struct mct_u232_private *priv = usb_get_serial_port_data(port);
@@ -12330,7 +12321,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (port->tty) {
c_cflag = port->tty->termios->c_cflag;
-@@ -535,21 +535,21 @@ static void mct_u232_read_int_callback (
+@@ -532,21 +532,21 @@ static void mct_u232_read_int_callback (
case -ESHUTDOWN:
/* this urb is terminated, clean up */
dbg("%s - urb shutting down with status: %d",
@@ -12357,7 +12348,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/*
* Work-a-round: handle the 'usual' bulk-in pipe here
-@@ -606,7 +606,7 @@ exit:
+@@ -603,7 +603,7 @@ exit:
retval = usb_submit_urb (urb, GFP_ATOMIC);
if (retval)
err ("%s - usb_submit_urb failed with result %d",
@@ -12366,7 +12357,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
} /* mct_u232_read_int_callback */
static void mct_u232_set_termios (struct usb_serial_port *port,
-@@ -636,7 +636,7 @@ static void mct_u232_set_termios (struct
+@@ -633,7 +633,7 @@ static void mct_u232_set_termios (struct
/* reassert DTR and RTS on transition from B0 */
if ((old_cflag & CBAUD) == B0) {
@@ -12375,7 +12366,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
control_state |= TIOCM_DTR | TIOCM_RTS;
mct_u232_set_modem_ctrl(serial, control_state);
}
-@@ -644,7 +644,7 @@ static void mct_u232_set_termios (struct
+@@ -641,7 +641,7 @@ static void mct_u232_set_termios (struct
mct_u232_set_baud_rate(serial, port, tty_get_baud_rate(port->tty));
if ((cflag & CBAUD) == B0 ) {
@@ -12384,7 +12375,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* Drop RTS and DTR */
control_state &= ~(TIOCM_DTR | TIOCM_RTS);
mct_u232_set_modem_ctrl(serial, control_state);
-@@ -699,7 +699,7 @@ static void mct_u232_break_ctl( struct u
+@@ -696,7 +696,7 @@ static void mct_u232_break_ctl( struct u
unsigned char lcr;
unsigned long flags;
@@ -12393,7 +12384,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irqsave(&priv->lock, flags);
lcr = priv->last_lcr;
-@@ -718,7 +718,7 @@ static int mct_u232_tiocmget (struct usb
+@@ -715,7 +715,7 @@ static int mct_u232_tiocmget (struct usb
unsigned int control_state;
unsigned long flags;
@@ -12402,7 +12393,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irqsave(&priv->lock, flags);
control_state = priv->control_state;
-@@ -735,7 +735,7 @@ static int mct_u232_tiocmset (struct usb
+@@ -732,7 +732,7 @@ static int mct_u232_tiocmset (struct usb
unsigned int control_state;
unsigned long flags;
@@ -12411,7 +12402,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irqsave(&priv->lock, flags);
control_state = priv->control_state;
-@@ -757,7 +757,7 @@ static int mct_u232_tiocmset (struct usb
+@@ -754,7 +754,7 @@ static int mct_u232_tiocmset (struct usb
static int mct_u232_ioctl (struct usb_serial_port *port, struct file * file,
unsigned int cmd, unsigned long arg)
{
@@ -12420,7 +12411,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* Based on code from acm.c and others */
switch (cmd) {
-@@ -772,7 +772,7 @@ static int mct_u232_ioctl (struct usb_se
+@@ -769,7 +769,7 @@ static int mct_u232_ioctl (struct usb_se
return 0;
default:
@@ -12429,7 +12420,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return(-ENOIOCTLCMD);
break;
}
-@@ -787,7 +787,7 @@ static void mct_u232_throttle (struct us
+@@ -784,7 +784,7 @@ static void mct_u232_throttle (struct us
struct tty_struct *tty;
tty = port->tty;
@@ -12438,7 +12429,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irqsave(&priv->lock, flags);
priv->rx_flags |= THROTTLED;
-@@ -809,7 +809,7 @@ static void mct_u232_unthrottle (struct
+@@ -806,7 +806,7 @@ static void mct_u232_unthrottle (struct
unsigned int control_state;
struct tty_struct *tty;
@@ -12891,7 +12882,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
usb_set_serial_data(serial, NULL);
kfree(mos7720_serial);
return -ENOMEM;
-@@ -1620,7 +1620,7 @@ static int __init moschip7720_init(void)
+@@ -1617,7 +1617,7 @@ static int __init moschip7720_init(void)
{
int retval;
@@ -13555,7 +13546,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* This device can't write any data, only read from the device
--- a/drivers/usb/serial/omninet.c
+++ b/drivers/usb/serial/omninet.c
-@@ -153,7 +153,7 @@ static int omninet_attach (struct usb_se
+@@ -150,7 +150,7 @@ static int omninet_attach (struct usb_se
od = kmalloc( sizeof(struct omninet_data), GFP_KERNEL );
if( !od ) {
@@ -13564,7 +13555,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return -ENOMEM;
}
usb_set_serial_port_data(port, od);
-@@ -166,7 +166,7 @@ static int omninet_open (struct usb_seri
+@@ -163,7 +163,7 @@ static int omninet_open (struct usb_seri
struct usb_serial_port *wport;
int result = 0;
@@ -13573,7 +13564,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
wport = serial->port[1];
wport->tty = port->tty;
-@@ -178,7 +178,7 @@ static int omninet_open (struct usb_seri
+@@ -175,7 +175,7 @@ static int omninet_open (struct usb_seri
omninet_read_bulk_callback, port);
result = usb_submit_urb(port->read_urb, GFP_KERNEL);
if (result) {
@@ -13582,7 +13573,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
return result;
-@@ -186,7 +186,7 @@ static int omninet_open (struct usb_seri
+@@ -183,7 +183,7 @@ static int omninet_open (struct usb_seri
static void omninet_close (struct usb_serial_port *port, struct file * filp)
{
@@ -13591,7 +13582,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
usb_kill_urb(port->read_urb);
}
-@@ -204,11 +204,11 @@ static void omninet_read_bulk_callback (
+@@ -201,11 +201,11 @@ static void omninet_read_bulk_callback (
int i;
int result;
@@ -13605,7 +13596,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return;
}
-@@ -236,7 +236,7 @@ static void omninet_read_bulk_callback (
+@@ -233,7 +233,7 @@ static void omninet_read_bulk_callback (
omninet_read_bulk_callback, port);
result = usb_submit_urb(urb, GFP_ATOMIC);
if (result)
@@ -13614,7 +13605,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return;
}
-@@ -251,17 +251,17 @@ static int omninet_write (struct usb_ser
+@@ -248,17 +248,17 @@ static int omninet_write (struct usb_ser
int result;
@@ -13635,7 +13626,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return 0;
}
wport->write_urb_busy = 1;
-@@ -271,7 +271,7 @@ static int omninet_write (struct usb_ser
+@@ -268,7 +268,7 @@ static int omninet_write (struct usb_ser
memcpy (wport->write_urb->transfer_buffer + OMNINET_DATAOFFSET, buf, count);
@@ -13644,7 +13635,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
header->oh_seq = od->od_outseq++;
header->oh_len = count;
-@@ -285,7 +285,7 @@ static int omninet_write (struct usb_ser
+@@ -282,7 +282,7 @@ static int omninet_write (struct usb_ser
result = usb_submit_urb(wport->write_urb, GFP_ATOMIC);
if (result) {
wport->write_urb_busy = 0;
@@ -13653,7 +13644,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
} else
result = count;
-@@ -303,7 +303,7 @@ static int omninet_write_room (struct us
+@@ -300,7 +300,7 @@ static int omninet_write_room (struct us
if (wport->write_urb_busy)
room = wport->bulk_out_size - OMNINET_HEADERLEN;
@@ -13662,7 +13653,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return (room);
}
-@@ -314,12 +314,12 @@ static void omninet_write_bulk_callback
+@@ -311,12 +311,12 @@ static void omninet_write_bulk_callback
struct usb_serial_port *port = (struct usb_serial_port *) urb->context;
int status = urb->status;
@@ -13677,7 +13668,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return;
}
-@@ -331,7 +331,7 @@ static void omninet_shutdown (struct usb
+@@ -328,7 +328,7 @@ static void omninet_shutdown (struct usb
{
struct usb_serial_port *wport = serial->port[1];
struct usb_serial_port *port = serial->port[0];
@@ -13688,7 +13679,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
-@@ -411,24 +411,24 @@ module_exit(option_exit);
+@@ -408,24 +408,24 @@ module_exit(option_exit);
static void option_rx_throttle(struct usb_serial_port *port)
{
@@ -13717,7 +13708,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);
-@@ -489,7 +489,7 @@ static int option_write(struct usb_seria
+@@ -486,7 +486,7 @@ static int option_write(struct usb_seria
portdata = usb_get_serial_port_data(port);
@@ -13726,7 +13717,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
i = 0;
left = count;
-@@ -510,7 +510,7 @@ static int option_write(struct usb_seria
+@@ -507,7 +507,7 @@ static int option_write(struct usb_seria
dbg("usb_write %p failed (err=%d)",
this_urb, this_urb->status);
@@ -13735,7 +13726,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
usb_pipeendpoint(this_urb->pipe), i);
/* send the data */
-@@ -532,7 +532,7 @@ static int option_write(struct usb_seria
+@@ -529,7 +529,7 @@ static int option_write(struct usb_seria
}
count -= left;
@@ -13744,7 +13735,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return count;
}
-@@ -545,14 +545,14 @@ static void option_indat_callback(struct
+@@ -542,14 +542,14 @@ static void option_indat_callback(struct
unsigned char *data = urb->transfer_buffer;
int status = urb->status;
@@ -13761,7 +13752,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
} else {
tty = port->tty;
if (urb->actual_length) {
-@@ -560,7 +560,7 @@ static void option_indat_callback(struct
+@@ -557,7 +557,7 @@ static void option_indat_callback(struct
tty_insert_flip_string(tty, data, urb->actual_length);
tty_flip_buffer_push(tty);
} else {
@@ -13770,7 +13761,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
/* Resubmit urb so we continue receiving */
-@@ -568,7 +568,7 @@ static void option_indat_callback(struct
+@@ -565,7 +565,7 @@ static void option_indat_callback(struct
err = usb_submit_urb(urb, GFP_ATOMIC);
if (err)
printk(KERN_ERR "%s: resubmit read urb failed. "
@@ -13779,7 +13770,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
}
return;
-@@ -580,7 +580,7 @@ static void option_outdat_callback(struc
+@@ -577,7 +577,7 @@ static void option_outdat_callback(struc
struct option_port_private *portdata;
int i;
@@ -13788,7 +13779,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
port = (struct usb_serial_port *) urb->context;
-@@ -604,15 +604,15 @@ static void option_instat_callback(struc
+@@ -601,15 +601,15 @@ static void option_instat_callback(struc
struct option_port_private *portdata = usb_get_serial_port_data(port);
struct usb_serial *serial = port->serial;
@@ -13807,7 +13798,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return;
}
if ((req_pkt->bRequestType == 0xA1) &&
-@@ -622,7 +622,7 @@ static void option_instat_callback(struc
+@@ -619,7 +619,7 @@ static void option_instat_callback(struc
urb->transfer_buffer +
sizeof(struct usb_ctrlrequest));
@@ -13816,7 +13807,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
old_dcd_state = portdata->dcd_state;
portdata->cts_state = 1;
-@@ -634,11 +634,11 @@ static void option_instat_callback(struc
+@@ -631,11 +631,11 @@ static void option_instat_callback(struc
old_dcd_state && !portdata->dcd_state)
tty_hangup(port->tty);
} else {
@@ -13830,7 +13821,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* Resubmit urb so we continue receiving IRQ data */
if (status != -ESHUTDOWN) {
-@@ -646,7 +646,7 @@ static void option_instat_callback(struc
+@@ -643,7 +643,7 @@ static void option_instat_callback(struc
err = usb_submit_urb(urb, GFP_ATOMIC);
if (err)
dbg("%s: resubmit intr urb failed. (%d)",
@@ -13839,7 +13830,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
}
-@@ -665,7 +665,7 @@ static int option_write_room(struct usb_
+@@ -662,7 +662,7 @@ static int option_write_room(struct usb_
data_len += OUT_BUFLEN;
}
@@ -13848,7 +13839,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return data_len;
}
-@@ -683,7 +683,7 @@ static int option_chars_in_buffer(struct
+@@ -680,7 +680,7 @@ static int option_chars_in_buffer(struct
if (this_urb && test_bit(i, &portdata->out_busy))
data_len += this_urb->transfer_buffer_length;
}
@@ -13857,7 +13848,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return data_len;
}
-@@ -696,7 +696,7 @@ static int option_open(struct usb_serial
+@@ -693,7 +693,7 @@ static int option_open(struct usb_serial
portdata = usb_get_serial_port_data(port);
@@ -13866,7 +13857,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* Set some sane defaults */
portdata->rts_state = 1;
-@@ -708,7 +708,7 @@ static int option_open(struct usb_serial
+@@ -705,7 +705,7 @@ static int option_open(struct usb_serial
if (! urb)
continue;
if (urb->dev != serial->dev) {
@@ -13875,7 +13866,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
urb->dev, serial->dev);
continue;
}
-@@ -722,7 +722,7 @@ static int option_open(struct usb_serial
+@@ -719,7 +719,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",
@@ -13884,7 +13875,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
urb->transfer_buffer_length);
}
}
-@@ -750,7 +750,7 @@ static void option_close(struct usb_seri
+@@ -747,7 +747,7 @@ static void option_close(struct usb_seri
struct usb_serial *serial = port->serial;
struct option_port_private *portdata;
@@ -13893,7 +13884,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
portdata = usb_get_serial_port_data(port);
portdata->rts_state = 0;
-@@ -783,7 +783,7 @@ static struct urb *option_setup_urb(stru
+@@ -780,7 +780,7 @@ static struct urb *option_setup_urb(stru
urb = usb_alloc_urb(0, GFP_KERNEL); /* No ISO */
if (urb == NULL) {
@@ -13902,7 +13893,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return NULL;
}
-@@ -802,7 +802,7 @@ static void option_setup_urbs(struct usb
+@@ -799,7 +799,7 @@ static void option_setup_urbs(struct usb
struct usb_serial_port *port;
struct option_port_private *portdata;
@@ -13911,7 +13902,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
for (i = 0; i < serial->num_ports; i++) {
port = serial->port[i];
-@@ -835,7 +835,7 @@ static int option_send_setup(struct usb_
+@@ -832,7 +832,7 @@ static int option_send_setup(struct usb_
struct usb_serial *serial = port->serial;
struct option_port_private *portdata;
int ifNum = serial->interface->cur_altsetting->desc.bInterfaceNumber;
@@ -13920,7 +13911,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
portdata = usb_get_serial_port_data(port);
-@@ -861,7 +861,7 @@ static int option_startup(struct usb_ser
+@@ -858,7 +858,7 @@ static int option_startup(struct usb_ser
struct option_port_private *portdata;
u8 *buffer;
@@ -13929,7 +13920,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* Now setup per port private data */
for (i = 0; i < serial->num_ports; i++) {
-@@ -869,7 +869,7 @@ static int option_startup(struct usb_ser
+@@ -866,7 +866,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!.",
@@ -13938,7 +13929,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return (1);
}
-@@ -894,7 +894,7 @@ static int option_startup(struct usb_ser
+@@ -891,7 +891,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",
@@ -13947,7 +13938,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
option_setup_urbs(serial);
-@@ -918,7 +918,7 @@ static void option_shutdown(struct usb_s
+@@ -915,7 +915,7 @@ static void option_shutdown(struct usb_s
struct usb_serial_port *port;
struct option_port_private *portdata;
@@ -13958,7 +13949,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
for (i = 0; i < serial->num_ports; ++i) {
--- a/drivers/usb/serial/oti6858.c
+++ b/drivers/usb/serial/oti6858.c
-@@ -238,10 +238,10 @@ static void setup_line(struct work_struc
+@@ -235,10 +235,10 @@ static void setup_line(struct work_struc
unsigned long flags;
int result;
@@ -13971,7 +13962,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* we will try again */
schedule_delayed_work(&priv->delayed_setup_work, msecs_to_jiffies(2));
return;
-@@ -256,7 +256,7 @@ static void setup_line(struct work_struc
+@@ -253,7 +253,7 @@ static void setup_line(struct work_struc
100);
if (result != OTI6858_CTRL_PKT_SIZE) {
@@ -13980,7 +13971,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kfree(new_setup);
/* we will try again */
schedule_delayed_work(&priv->delayed_setup_work, msecs_to_jiffies(2));
-@@ -289,12 +289,12 @@ static void setup_line(struct work_struc
+@@ -286,12 +286,12 @@ static void setup_line(struct work_struc
priv->setup_done = 1;
spin_unlock_irqrestore(&priv->lock, flags);
@@ -13995,7 +13986,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
}
-@@ -306,7 +306,7 @@ void send_data(struct work_struct *work)
+@@ -303,7 +303,7 @@ void send_data(struct work_struct *work)
unsigned long flags;
unsigned char allow;
@@ -14004,7 +13995,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irqsave(&priv->lock, flags);
if (priv->flags.write_urb_in_use) {
-@@ -334,12 +334,12 @@ void send_data(struct work_struct *work)
+@@ -331,12 +331,12 @@ void send_data(struct work_struct *work)
if (count == 0) {
priv->flags.write_urb_in_use = 0;
@@ -14019,7 +14010,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
return;
}
-@@ -353,7 +353,7 @@ void send_data(struct work_struct *work)
+@@ -350,7 +350,7 @@ void send_data(struct work_struct *work)
result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
if (result != 0) {
dev_err(&port->dev, "%s(): usb_submit_urb() failed"
@@ -14028,7 +14019,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
priv->flags.write_urb_in_use = 0;
}
-@@ -404,7 +404,7 @@ static int oti6858_write(struct usb_seri
+@@ -401,7 +401,7 @@ static int oti6858_write(struct usb_seri
struct oti6858_private *priv = usb_get_serial_port_data(port);
unsigned long flags;
@@ -14037,7 +14028,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (!count)
return count;
-@@ -422,7 +422,7 @@ static int oti6858_write_room(struct usb
+@@ -419,7 +419,7 @@ static int oti6858_write_room(struct usb
int room = 0;
unsigned long flags;
@@ -14046,7 +14037,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irqsave(&priv->lock, flags);
room = oti6858_buf_space_avail(priv->buf);
-@@ -437,7 +437,7 @@ static int oti6858_chars_in_buffer(struc
+@@ -434,7 +434,7 @@ static int oti6858_chars_in_buffer(struc
int chars = 0;
unsigned long flags;
@@ -14055,7 +14046,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irqsave(&priv->lock, flags);
chars = oti6858_buf_data_avail(priv->buf);
-@@ -456,10 +456,10 @@ static void oti6858_set_termios(struct u
+@@ -453,10 +453,10 @@ static void oti6858_set_termios(struct u
u16 divisor;
int br;
@@ -14068,7 +14059,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return;
}
-@@ -575,7 +575,7 @@ static int oti6858_open(struct usb_seria
+@@ -572,7 +572,7 @@ static int oti6858_open(struct usb_seria
unsigned long flags;
int result;
@@ -14077,7 +14068,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
usb_clear_halt(serial->dev, port->write_urb->pipe);
usb_clear_halt(serial->dev, port->read_urb->pipe);
-@@ -584,7 +584,7 @@ static int oti6858_open(struct usb_seria
+@@ -581,7 +581,7 @@ static int oti6858_open(struct usb_seria
return 0;
if ((buf = kmalloc(OTI6858_CTRL_PKT_SIZE, GFP_KERNEL)) == NULL) {
@@ -14086,7 +14077,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return -ENOMEM;
}
-@@ -613,12 +613,12 @@ static int oti6858_open(struct usb_seria
+@@ -610,12 +610,12 @@ static int oti6858_open(struct usb_seria
spin_unlock_irqrestore(&priv->lock, flags);
kfree(buf);
@@ -14101,7 +14092,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
oti6858_close(port, NULL);
return -EPROTO;
}
-@@ -637,14 +637,14 @@ static void oti6858_close(struct usb_ser
+@@ -634,14 +634,14 @@ static void oti6858_close(struct usb_ser
long timeout;
wait_queue_t wait;
@@ -14118,7 +14109,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
for (;;) {
set_current_state(TASK_INTERRUPTIBLE);
if (oti6858_buf_data_avail(priv->buf) == 0
-@@ -657,7 +657,7 @@ static void oti6858_close(struct usb_ser
+@@ -654,7 +654,7 @@ static void oti6858_close(struct usb_ser
}
set_current_state(TASK_RUNNING);
remove_wait_queue(&port->tty->write_wait, &wait);
@@ -14127,7 +14118,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* clear out any remaining data in the buffer */
oti6858_buf_clear(priv->buf);
-@@ -678,7 +678,7 @@ static void oti6858_close(struct usb_ser
+@@ -675,7 +675,7 @@ static void oti6858_close(struct usb_ser
*/
timeout = 2*HZ;
schedule_timeout_interruptible(timeout);
@@ -14136,7 +14127,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* cancel scheduled setup */
cancel_delayed_work(&priv->delayed_setup_work);
-@@ -686,7 +686,7 @@ static void oti6858_close(struct usb_ser
+@@ -683,7 +683,7 @@ static void oti6858_close(struct usb_ser
flush_scheduled_work();
/* shutdown our urbs */
@@ -14145,7 +14136,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
usb_kill_urb(port->write_urb);
usb_kill_urb(port->read_urb);
usb_kill_urb(port->interrupt_in_urb);
-@@ -709,7 +709,7 @@ static int oti6858_tiocmset(struct usb_s
+@@ -706,7 +706,7 @@ static int oti6858_tiocmset(struct usb_s
u8 control;
dbg("%s(port = %d, set = 0x%08x, clear = 0x%08x)",
@@ -14154,7 +14145,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (!usb_get_intfdata(port->serial->interface))
return -ENODEV;
-@@ -741,7 +741,7 @@ static int oti6858_tiocmget(struct usb_s
+@@ -738,7 +738,7 @@ static int oti6858_tiocmget(struct usb_s
unsigned pin_state;
unsigned result = 0;
@@ -14163,7 +14154,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (!usb_get_intfdata(port->serial->interface))
return -ENODEV;
-@@ -764,7 +764,7 @@ static int oti6858_tiocmget(struct usb_s
+@@ -761,7 +761,7 @@ static int oti6858_tiocmget(struct usb_s
if ((pin_state & PIN_DCD) != 0)
result |= TIOCM_CD;
@@ -14172,7 +14163,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return result;
}
-@@ -811,7 +811,7 @@ static int oti6858_ioctl(struct usb_seri
+@@ -808,7 +808,7 @@ static int oti6858_ioctl(struct usb_seri
unsigned int x;
dbg("%s(port = %d, cmd = 0x%04x, arg = 0x%08lx)",
@@ -14181,7 +14172,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
switch (cmd) {
case TIOCMBIS:
-@@ -825,11 +825,11 @@ static int oti6858_ioctl(struct usb_seri
+@@ -822,11 +822,11 @@ static int oti6858_ioctl(struct usb_seri
return oti6858_tiocmset(port, NULL, 0, x);
case TIOCMIWAIT:
@@ -14195,7 +14186,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
break;
}
-@@ -840,10 +840,10 @@ static void oti6858_break_ctl(struct usb
+@@ -837,10 +837,10 @@ static void oti6858_break_ctl(struct usb
{
int state;
@@ -14208,7 +14199,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* FIXME */
/*
-@@ -851,7 +851,7 @@ static void oti6858_break_ctl(struct usb
+@@ -848,7 +848,7 @@ static void oti6858_break_ctl(struct usb
BREAK_REQUEST, BREAK_REQUEST_TYPE, state,
0, NULL, 0, 100);
if (result != 0)
@@ -14217,7 +14208,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
*/
}
-@@ -860,7 +860,7 @@ static void oti6858_shutdown(struct usb_
+@@ -857,7 +857,7 @@ static void oti6858_shutdown(struct usb_
struct oti6858_private *priv;
int i;
@@ -14226,7 +14217,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
for (i = 0; i < serial->num_ports; ++i) {
priv = usb_get_serial_port_data(serial->port[i]);
-@@ -880,7 +880,7 @@ static void oti6858_read_int_callback(st
+@@ -877,7 +877,7 @@ static void oti6858_read_int_callback(st
int status = urb->status;
dbg("%s(port = %d, status = %d)",
@@ -14235,7 +14226,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
switch (status) {
case 0:
-@@ -891,11 +891,11 @@ static void oti6858_read_int_callback(st
+@@ -888,11 +888,11 @@ static void oti6858_read_int_callback(st
case -ESHUTDOWN:
/* this urb is terminated, clean up */
dbg("%s(): urb shutting down with status: %d",
@@ -14249,7 +14240,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
break;
}
-@@ -912,7 +912,7 @@ static void oti6858_read_int_callback(st
+@@ -909,7 +909,7 @@ static void oti6858_read_int_callback(st
priv->setup_done = 0;
resubmit = 0;
dbg("%s(): scheduling setup_line()",
@@ -14258,7 +14249,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
schedule_delayed_work(&priv->delayed_setup_work, 0);
}
}
-@@ -927,7 +927,7 @@ static void oti6858_read_int_callback(st
+@@ -924,7 +924,7 @@ static void oti6858_read_int_callback(st
priv->setup_done = 0;
resubmit = 0;
dbg("%s(): scheduling setup_line()",
@@ -14267,7 +14258,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
schedule_delayed_work(&priv->delayed_setup_work, 0);
}
}
-@@ -956,7 +956,7 @@ static void oti6858_read_int_callback(st
+@@ -953,7 +953,7 @@ static void oti6858_read_int_callback(st
if (result != 0) {
priv->flags.read_urb_in_use = 0;
dev_err(&port->dev, "%s(): usb_submit_urb() failed,"
@@ -14276,7 +14267,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
} else {
resubmit = 0;
}
-@@ -975,13 +975,13 @@ static void oti6858_read_int_callback(st
+@@ -972,13 +972,13 @@ static void oti6858_read_int_callback(st
if (resubmit) {
int result;
@@ -14292,7 +14283,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
}
}
-@@ -997,7 +997,7 @@ static void oti6858_read_bulk_callback(s
+@@ -994,7 +994,7 @@ static void oti6858_read_bulk_callback(s
int result;
dbg("%s(port = %d, status = %d)",
@@ -14301,7 +14292,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irqsave(&priv->lock, flags);
priv->flags.read_urb_in_use = 0;
-@@ -1005,20 +1005,20 @@ static void oti6858_read_bulk_callback(s
+@@ -1002,20 +1002,20 @@ static void oti6858_read_bulk_callback(s
if (status != 0) {
if (!port->open_count) {
@@ -14326,7 +14317,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return;
}
-@@ -1034,7 +1034,7 @@ static void oti6858_read_bulk_callback(s
+@@ -1031,7 +1031,7 @@ static void oti6858_read_bulk_callback(s
result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
if (result != 0) {
dev_err(&port->dev, "%s(): usb_submit_urb() failed,"
@@ -14335,7 +14326,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
}
}
-@@ -1047,7 +1047,7 @@ static void oti6858_write_bulk_callback(
+@@ -1044,7 +1044,7 @@ static void oti6858_write_bulk_callback(
int result;
dbg("%s(port = %d, status = %d)",
@@ -14344,7 +14335,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
switch (status) {
case 0:
-@@ -1058,21 +1058,21 @@ static void oti6858_write_bulk_callback(
+@@ -1055,21 +1055,21 @@ static void oti6858_write_bulk_callback(
case -ESHUTDOWN:
/* this urb is terminated, clean up */
dbg("%s(): urb shutting down with status: %d",
@@ -14370,7 +14361,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
} else {
return;
}
-@@ -1082,11 +1082,11 @@ static void oti6858_write_bulk_callback(
+@@ -1079,11 +1079,11 @@ static void oti6858_write_bulk_callback(
// schedule the interrupt urb if we are still open */
port->interrupt_in_urb->dev = port->serial->dev;
@@ -15146,7 +15137,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
port = serial->port[i];
--- a/drivers/usb/serial/ti_usb_3410_5052.c
+++ b/drivers/usb/serial/ti_usb_3410_5052.c
-@@ -415,14 +415,14 @@ static int ti_startup(struct usb_serial
+@@ -409,14 +409,14 @@ static int ti_startup(struct usb_serial
dbg("%s - product 0x%4X, num configurations %d, configuration value %d",
@@ -15163,7 +15154,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return -ENOMEM;
}
mutex_init(&tdev->td_open_close_lock);
-@@ -432,7 +432,7 @@ static int ti_startup(struct usb_serial
+@@ -426,7 +426,7 @@ static int ti_startup(struct usb_serial
/* determine device type */
if (usb_match_id(serial->interface, ti_id_table_3410))
tdev->td_is_3410 = 1;
@@ -15172,7 +15163,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* if we have only 1 configuration, download firmware */
if (dev->descriptor.bNumConfigurations == 1) {
-@@ -466,7 +466,7 @@ static int ti_startup(struct usb_serial
+@@ -460,7 +460,7 @@ static int ti_startup(struct usb_serial
for (i = 0; i < serial->num_ports; ++i) {
tport = kzalloc(sizeof(struct ti_port), GFP_KERNEL);
if (tport == NULL) {
@@ -15181,7 +15172,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
status = -ENOMEM;
goto free_tports;
}
-@@ -478,7 +478,7 @@ static int ti_startup(struct usb_serial
+@@ -472,7 +472,7 @@ static int ti_startup(struct usb_serial
init_waitqueue_head(&tport->tp_write_wait);
tport->tp_write_buf = ti_buf_alloc();
if (tport->tp_write_buf == NULL) {
@@ -15190,7 +15181,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kfree(tport);
status = -ENOMEM;
goto free_tports;
-@@ -511,7 +511,7 @@ static void ti_shutdown(struct usb_seria
+@@ -505,7 +505,7 @@ static void ti_shutdown(struct usb_seria
struct ti_device *tdev = usb_get_serial_data(serial);
struct ti_port *tport;
@@ -15199,7 +15190,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
for (i=0; i < serial->num_ports; ++i) {
tport = usb_get_serial_port_data(serial->port[i]);
-@@ -539,7 +539,7 @@ static int ti_open(struct usb_serial_por
+@@ -533,7 +533,7 @@ static int ti_open(struct usb_serial_por
TI_PIPE_TIMEOUT_ENABLE |
(TI_TRANSFER_TIMEOUT << 2));
@@ -15208,7 +15199,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (tport == NULL)
return -ENODEV;
-@@ -564,10 +564,10 @@ static int ti_open(struct usb_serial_por
+@@ -558,10 +558,10 @@ static int ti_open(struct usb_serial_por
/* start interrupt urb the first time a port is opened on this device */
if (tdev->td_open_port_count == 0) {
@@ -15221,7 +15212,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
status = -EINVAL;
goto release_lock;
}
-@@ -576,40 +576,40 @@ static int ti_open(struct usb_serial_por
+@@ -570,40 +570,40 @@ static int ti_open(struct usb_serial_por
urb->dev = dev;
status = usb_submit_urb(urb, GFP_KERNEL);
if (status) {
@@ -15270,7 +15261,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
goto unlink_int_urb;
}
-@@ -620,27 +620,27 @@ static int ti_open(struct usb_serial_por
+@@ -614,27 +614,27 @@ static int ti_open(struct usb_serial_por
ti_set_termios(port, port->tty->termios);
@@ -15304,7 +15295,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
status = -EINVAL;
goto unlink_int_urb;
}
-@@ -650,7 +650,7 @@ static int ti_open(struct usb_serial_por
+@@ -644,7 +644,7 @@ static int ti_open(struct usb_serial_por
urb->dev = dev;
status = usb_submit_urb(urb, GFP_KERNEL);
if (status) {
@@ -15313,7 +15304,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
goto unlink_int_urb;
}
-@@ -664,7 +664,7 @@ unlink_int_urb:
+@@ -658,7 +658,7 @@ unlink_int_urb:
usb_kill_urb(port->serial->port[0]->interrupt_in_urb);
release_lock:
mutex_unlock(&tdev->td_open_close_lock);
@@ -15322,7 +15313,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return status;
}
-@@ -677,7 +677,7 @@ static void ti_close(struct usb_serial_p
+@@ -671,7 +671,7 @@ static void ti_close(struct usb_serial_p
int status;
int do_unlock;
@@ -15331,7 +15322,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
tdev = usb_get_serial_data(port->serial);
tport = usb_get_serial_port_data(port);
-@@ -694,11 +694,11 @@ static void ti_close(struct usb_serial_p
+@@ -688,11 +688,11 @@ static void ti_close(struct usb_serial_p
port_number = port->number - port->serial->minor;
@@ -15345,7 +15336,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* if mutex_lock is interrupted, continue anyway */
do_unlock = !mutex_lock_interruptible(&tdev->td_open_close_lock);
-@@ -711,7 +711,7 @@ static void ti_close(struct usb_serial_p
+@@ -705,7 +705,7 @@ static void ti_close(struct usb_serial_p
if (do_unlock)
mutex_unlock(&tdev->td_open_close_lock);
@@ -15354,7 +15345,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
-@@ -721,10 +721,10 @@ static int ti_write(struct usb_serial_po
+@@ -715,10 +715,10 @@ static int ti_write(struct usb_serial_po
struct ti_port *tport = usb_get_serial_port_data(port);
unsigned long flags;
@@ -15367,7 +15358,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return 0;
}
-@@ -747,7 +747,7 @@ static int ti_write_room(struct usb_seri
+@@ -741,7 +741,7 @@ static int ti_write_room(struct usb_seri
int room = 0;
unsigned long flags;
@@ -15376,7 +15367,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (tport == NULL)
return -ENODEV;
-@@ -756,7 +756,7 @@ static int ti_write_room(struct usb_seri
+@@ -750,7 +750,7 @@ static int ti_write_room(struct usb_seri
room = ti_buf_space_avail(tport->tp_write_buf);
spin_unlock_irqrestore(&tport->tp_lock, flags);
@@ -15385,7 +15376,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return room;
}
-@@ -767,7 +767,7 @@ static int ti_chars_in_buffer(struct usb
+@@ -761,7 +761,7 @@ static int ti_chars_in_buffer(struct usb
int chars = 0;
unsigned long flags;
@@ -15394,7 +15385,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (tport == NULL)
return -ENODEV;
-@@ -776,7 +776,7 @@ static int ti_chars_in_buffer(struct usb
+@@ -770,7 +770,7 @@ static int ti_chars_in_buffer(struct usb
chars = ti_buf_data_avail(tport->tp_write_buf);
spin_unlock_irqrestore(&tport->tp_lock, flags);
@@ -15403,7 +15394,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return chars;
}
-@@ -786,14 +786,14 @@ static void ti_throttle(struct usb_seria
+@@ -780,14 +780,14 @@ static void ti_throttle(struct usb_seria
struct ti_port *tport = usb_get_serial_port_data(port);
struct tty_struct *tty;
@@ -15420,7 +15411,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return;
}
-@@ -809,21 +809,21 @@ static void ti_unthrottle(struct usb_ser
+@@ -803,21 +803,21 @@ static void ti_unthrottle(struct usb_ser
struct tty_struct *tty;
int status;
@@ -15445,7 +15436,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
}
-@@ -835,24 +835,24 @@ static int ti_ioctl(struct usb_serial_po
+@@ -829,24 +829,24 @@ static int ti_ioctl(struct usb_serial_po
struct async_icount cnow;
struct async_icount cprev;
@@ -15474,7 +15465,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
cprev = tport->tp_icount;
while (1) {
interruptible_sleep_on(&tport->tp_msr_wait);
-@@ -873,7 +873,7 @@ static int ti_ioctl(struct usb_serial_po
+@@ -867,7 +867,7 @@ static int ti_ioctl(struct usb_serial_po
break;
case TIOCGICOUNT:
@@ -15483,7 +15474,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (copy_to_user((void __user *)arg, &tport->tp_icount, sizeof(tport->tp_icount)))
return -EFAULT;
return 0;
-@@ -895,20 +895,20 @@ static void ti_set_termios(struct usb_se
+@@ -889,20 +889,20 @@ static void ti_set_termios(struct usb_se
int port_number = port->number - port->serial->minor;
unsigned int mcr;
@@ -15508,7 +15499,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return;
}
-@@ -992,7 +992,7 @@ static void ti_set_termios(struct usb_se
+@@ -986,7 +986,7 @@ static void ti_set_termios(struct usb_se
tty_encode_baud_rate(tty, baud, baud);
dbg("%s - BaudRate=%d, wBaudRate=%d, wFlags=0x%04X, bDataBits=%d, bParity=%d, bStopBits=%d, cXon=%d, cXoff=%d, bUartMode=%d",
@@ -15517,7 +15508,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
cpu_to_be16s(&config->wBaudRate);
cpu_to_be16s(&config->wFlags);
-@@ -1001,7 +1001,7 @@ static void ti_set_termios(struct usb_se
+@@ -995,7 +995,7 @@ static void ti_set_termios(struct usb_se
(__u8)(TI_UART1_PORT + port_number), 0, (__u8 *)config,
sizeof(*config));
if (status)
@@ -15526,7 +15517,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* SET_CONFIG asserts RTS and DTR, reset them correctly */
mcr = tport->tp_shadow_mcr;
-@@ -1010,7 +1010,7 @@ static void ti_set_termios(struct usb_se
+@@ -1004,7 +1004,7 @@ static void ti_set_termios(struct usb_se
mcr &= ~(TI_MCR_DTR | TI_MCR_RTS);
status = ti_set_mcr(tport, mcr);
if (status)
@@ -15535,7 +15526,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kfree(config);
}
-@@ -1024,7 +1024,7 @@ static int ti_tiocmget(struct usb_serial
+@@ -1018,7 +1018,7 @@ static int ti_tiocmget(struct usb_serial
unsigned int mcr;
unsigned long flags;
@@ -15544,7 +15535,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (tport == NULL)
return -ENODEV;
-@@ -1042,7 +1042,7 @@ static int ti_tiocmget(struct usb_serial
+@@ -1036,7 +1036,7 @@ static int ti_tiocmget(struct usb_serial
| ((msr & TI_MSR_RI) ? TIOCM_RI : 0)
| ((msr & TI_MSR_DSR) ? TIOCM_DSR : 0);
@@ -15553,7 +15544,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return result;
}
-@@ -1055,7 +1055,7 @@ static int ti_tiocmset(struct usb_serial
+@@ -1049,7 +1049,7 @@ static int ti_tiocmset(struct usb_serial
unsigned int mcr;
unsigned long flags;
@@ -15562,7 +15553,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (tport == NULL)
return -ENODEV;
-@@ -1087,7 +1087,7 @@ static void ti_break(struct usb_serial_p
+@@ -1081,7 +1081,7 @@ static void ti_break(struct usb_serial_p
struct ti_port *tport = usb_get_serial_port_data(port);
int status;
@@ -15571,7 +15562,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (tport == NULL)
return;
-@@ -1099,7 +1099,7 @@ static void ti_break(struct usb_serial_p
+@@ -1093,7 +1093,7 @@ static void ti_break(struct usb_serial_p
TI_LCR_BREAK, break_state == -1 ? TI_LCR_BREAK : 0);
if (status)
@@ -15580,7 +15571,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
-@@ -1118,7 +1118,7 @@ static void ti_interrupt_callback(struct
+@@ -1112,7 +1112,7 @@ static void ti_interrupt_callback(struct
int retval;
__u8 msr;
@@ -15589,7 +15580,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
switch (status) {
case 0:
-@@ -1126,33 +1126,33 @@ static void ti_interrupt_callback(struct
+@@ -1120,33 +1120,33 @@ static void ti_interrupt_callback(struct
case -ECONNRESET:
case -ENOENT:
case -ESHUTDOWN:
@@ -15629,7 +15620,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
goto exit;
}
-@@ -1164,17 +1164,17 @@ static void ti_interrupt_callback(struct
+@@ -1158,17 +1158,17 @@ static void ti_interrupt_callback(struct
switch (function) {
case TI_CODE_DATA_ERROR:
@@ -15650,7 +15641,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
break;
}
-@@ -1182,7 +1182,7 @@ exit:
+@@ -1176,7 +1176,7 @@ exit:
retval = usb_submit_urb(urb, GFP_ATOMIC);
if (retval)
dev_err(dev, "%s - resubmit interrupt urb failed, %d\n",
@@ -15659,7 +15650,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
-@@ -1194,7 +1194,7 @@ static void ti_bulk_in_callback(struct u
+@@ -1188,7 +1188,7 @@ static void ti_bulk_in_callback(struct u
int status = urb->status;
int retval = 0;
@@ -15668,7 +15659,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
switch (status) {
case 0:
-@@ -1202,13 +1202,13 @@ static void ti_bulk_in_callback(struct u
+@@ -1196,13 +1196,13 @@ static void ti_bulk_in_callback(struct u
case -ECONNRESET:
case -ENOENT:
case -ESHUTDOWN:
@@ -15684,7 +15675,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
tport->tp_tdev->td_urb_error = 1;
wake_up_interruptible(&tport->tp_write_wait);
}
-@@ -1217,16 +1217,16 @@ static void ti_bulk_in_callback(struct u
+@@ -1211,16 +1211,16 @@ static void ti_bulk_in_callback(struct u
goto exit;
if (status) {
@@ -15704,7 +15695,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
else
ti_recv(&urb->dev->dev, port->tty, urb->transfer_buffer,
urb->actual_length);
-@@ -1248,7 +1248,7 @@ exit:
+@@ -1242,7 +1242,7 @@ exit:
spin_unlock(&tport->tp_lock);
if (retval)
dev_err(dev, "%s - resubmit read urb failed, %d\n",
@@ -15713,7 +15704,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
-@@ -1259,7 +1259,7 @@ static void ti_bulk_out_callback(struct
+@@ -1253,7 +1253,7 @@ static void ti_bulk_out_callback(struct
struct device *dev = &urb->dev->dev;
int status = urb->status;
@@ -15722,7 +15713,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
tport->tp_write_urb_in_use = 0;
-@@ -1269,13 +1269,13 @@ static void ti_bulk_out_callback(struct
+@@ -1263,13 +1263,13 @@ static void ti_bulk_out_callback(struct
case -ECONNRESET:
case -ENOENT:
case -ESHUTDOWN:
@@ -15738,7 +15729,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
tport->tp_tdev->td_urb_error = 1;
wake_up_interruptible(&tport->tp_write_wait);
}
-@@ -1293,7 +1293,7 @@ static void ti_recv(struct device *dev,
+@@ -1287,7 +1287,7 @@ static void ti_recv(struct device *dev,
do {
cnt = tty_buffer_request_room(tty, length);
if (cnt < length) {
@@ -15747,7 +15738,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if(cnt == 0)
break;
}
-@@ -1314,7 +1314,7 @@ static void ti_send(struct ti_port *tpor
+@@ -1308,7 +1308,7 @@ static void ti_send(struct ti_port *tpor
unsigned long flags;
@@ -15756,7 +15747,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irqsave(&tport->tp_lock, flags);
-@@ -1336,7 +1336,7 @@ static void ti_send(struct ti_port *tpor
+@@ -1330,7 +1330,7 @@ static void ti_send(struct ti_port *tpor
spin_unlock_irqrestore(&tport->tp_lock, flags);
@@ -15765,7 +15756,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
usb_fill_bulk_urb(port->write_urb, port->serial->dev,
usb_sndbulkpipe(port->serial->dev,
-@@ -1346,7 +1346,7 @@ static void ti_send(struct ti_port *tpor
+@@ -1340,7 +1340,7 @@ static void ti_send(struct ti_port *tpor
result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
if (result) {
@@ -15774,7 +15765,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
tport->tp_write_urb_in_use = 0;
/* TODO: reschedule ti_send */
} else {
-@@ -1388,23 +1388,23 @@ static int ti_get_lsr(struct ti_port *tp
+@@ -1382,23 +1382,23 @@ static int ti_get_lsr(struct ti_port *tp
int port_number = port->number - port->serial->minor;
struct ti_port_status *data;
@@ -15802,7 +15793,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
tport->tp_lsr = data->bLSR;
-@@ -1465,7 +1465,7 @@ static void ti_handle_new_msr(struct ti_
+@@ -1459,7 +1459,7 @@ static void ti_handle_new_msr(struct ti_
struct tty_struct *tty;
unsigned long flags;
@@ -15811,7 +15802,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (msr & TI_MSR_DELTA_MASK) {
spin_lock_irqsave(&tport->tp_lock, flags);
-@@ -1503,7 +1503,7 @@ static void ti_drain(struct ti_port *tpo
+@@ -1497,7 +1497,7 @@ static void ti_drain(struct ti_port *tpo
struct usb_serial_port *port = tport->tp_port;
wait_queue_t wait;
@@ -15820,7 +15811,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irq(&tport->tp_lock);
-@@ -1635,12 +1635,12 @@ static int ti_write_byte(struct ti_devic
+@@ -1629,12 +1629,12 @@ static int ti_write_byte(struct ti_devic
struct ti_write_data_bytes *data;
struct device *dev = &tdev->td_serial->dev->dev;
@@ -15835,7 +15826,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return -ENOMEM;
}
-@@ -1656,7 +1656,7 @@ static int ti_write_byte(struct ti_devic
+@@ -1650,7 +1650,7 @@ static int ti_write_byte(struct ti_devic
(__u8 *)data, size);
if (status < 0)
@@ -15844,7 +15835,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kfree(data);
-@@ -1683,7 +1683,7 @@ static int ti_download_firmware(struct t
+@@ -1677,7 +1677,7 @@ static int ti_download_firmware(struct t
buffer_size = TI_FIRMWARE_BUF_SIZE + sizeof(struct ti_firmware_header);
buffer = kmalloc(buffer_size, GFP_KERNEL);
if (!buffer) {
@@ -15853,7 +15844,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return -ENOMEM;
}
-@@ -1697,7 +1697,7 @@ static int ti_download_firmware(struct t
+@@ -1691,7 +1691,7 @@ static int ti_download_firmware(struct t
header->wLength = cpu_to_le16((__u16)(buffer_size - sizeof(struct ti_firmware_header)));
header->bCheckSum = cs;
@@ -15862,7 +15853,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
for (pos = 0; pos < buffer_size; pos += done) {
len = min(buffer_size - pos, TI_DOWNLOAD_MAX_PACKET_SIZE);
status = usb_bulk_msg(dev, pipe, buffer+pos, len, &done, 1000);
-@@ -1708,11 +1708,11 @@ static int ti_download_firmware(struct t
+@@ -1702,11 +1702,11 @@ static int ti_download_firmware(struct t
kfree(buffer);
if (status) {
@@ -16109,7 +16100,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return -ENOMEM;
}
-@@ -890,7 +890,7 @@ int usb_serial_probe(struct usb_interfac
+@@ -874,7 +874,7 @@ int usb_serial_probe(struct usb_interfac
serial->num_port_pointers = max_endpoints;
unlock_kernel();
@@ -16118,7 +16109,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
for (i = 0; i < max_endpoints; ++i) {
port = kzalloc(sizeof(struct usb_serial_port), GFP_KERNEL);
if (!port)
-@@ -1038,7 +1038,7 @@ int usb_serial_probe(struct usb_interfac
+@@ -1022,7 +1022,7 @@ int usb_serial_probe(struct usb_interfac
port->dev.release = &port_release;
snprintf (&port->dev.bus_id[0], sizeof(port->dev.bus_id), "ttyUSB%d", port->number);
@@ -16127,7 +16118,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
retval = device_register(&port->dev);
if (retval)
dev_err(&port->dev, "Error registering port device, "
-@@ -1097,7 +1097,7 @@ void usb_serial_disconnect(struct usb_in
+@@ -1081,7 +1081,7 @@ void usb_serial_disconnect(struct usb_in
struct usb_serial_port *port;
usb_serial_console_disconnect(serial);
@@ -16136,7 +16127,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
mutex_lock(&serial->disc_mutex);
usb_set_intfdata (interface, NULL);
-@@ -1181,7 +1181,7 @@ static int __init usb_serial_init(void)
+@@ -1165,7 +1165,7 @@ static int __init usb_serial_init(void)
result = bus_register(&usb_serial_bus_type);
if (result) {
@@ -16145,7 +16136,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
goto exit_bus;
}
-@@ -1198,21 +1198,21 @@ static int __init usb_serial_init(void)
+@@ -1182,21 +1182,21 @@ static int __init usb_serial_init(void)
tty_set_operations(usb_serial_tty_driver, &serial_ops);
result = tty_register_driver(usb_serial_tty_driver);
if (result) {
@@ -16170,7 +16161,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
goto exit_generic;
}
-@@ -1230,7 +1230,7 @@ exit_reg_driver:
+@@ -1214,7 +1214,7 @@ exit_reg_driver:
bus_unregister(&usb_serial_bus_type);
exit_bus:
@@ -16181,7 +16172,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
--- a/drivers/usb/serial/visor.c
+++ b/drivers/usb/serial/visor.c
-@@ -290,7 +290,7 @@ static int visor_open (struct usb_serial
+@@ -281,7 +281,7 @@ static int visor_open (struct usb_serial
unsigned long flags;
int result = 0;
@@ -16190,7 +16181,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (!port->read_urb) {
/* this is needed for some brain dead Sony devices */
-@@ -322,16 +322,16 @@ static int visor_open (struct usb_serial
+@@ -313,16 +313,16 @@ static int visor_open (struct usb_serial
result = usb_submit_urb(port->read_urb, GFP_KERNEL);
if (result) {
dev_err(&port->dev, "%s - failed submitting read urb, error %d\n",
@@ -16210,7 +16201,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
exit:
return result;
-@@ -343,7 +343,7 @@ static void visor_close (struct usb_seri
+@@ -334,7 +334,7 @@ static void visor_close (struct usb_seri
struct visor_private *priv = usb_get_serial_port_data(port);
unsigned char *transfer_buffer;
@@ -16219,7 +16210,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* shutdown our urbs */
usb_kill_urb(port->read_urb);
-@@ -379,12 +379,12 @@ static int visor_write (struct usb_seria
+@@ -370,12 +370,12 @@ static int visor_write (struct usb_seria
unsigned long flags;
int status;
@@ -16234,7 +16225,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return 0;
}
priv->outstanding_urbs++;
-@@ -406,7 +406,7 @@ static int visor_write (struct usb_seria
+@@ -397,7 +397,7 @@ static int visor_write (struct usb_seria
memcpy (buffer, buf, count);
@@ -16243,7 +16234,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
usb_fill_bulk_urb (urb, serial->dev,
usb_sndbulkpipe (serial->dev,
-@@ -418,7 +418,7 @@ static int visor_write (struct usb_seria
+@@ -409,7 +409,7 @@ static int visor_write (struct usb_seria
status = usb_submit_urb(urb, GFP_ATOMIC);
if (status) {
dev_err(&port->dev, "%s - usb_submit_urb(write bulk) failed with status = %d\n",
@@ -16252,7 +16243,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
count = status;
goto error;
} else {
-@@ -449,7 +449,7 @@ static int visor_write_room (struct usb_
+@@ -440,7 +440,7 @@ static int visor_write_room (struct usb_
struct visor_private *priv = usb_get_serial_port_data(port);
unsigned long flags;
@@ -16261,7 +16252,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/*
* We really can take anything the user throws at us
-@@ -460,7 +460,7 @@ static int visor_write_room (struct usb_
+@@ -451,7 +451,7 @@ static int visor_write_room (struct usb_
spin_lock_irqsave(&priv->lock, flags);
if (priv->outstanding_urbs > URB_UPPER_LIMIT * 2 / 3) {
spin_unlock_irqrestore(&priv->lock, flags);
@@ -16270,7 +16261,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return 0;
}
spin_unlock_irqrestore(&priv->lock, flags);
-@@ -471,7 +471,7 @@ static int visor_write_room (struct usb_
+@@ -462,7 +462,7 @@ static int visor_write_room (struct usb_
static int visor_chars_in_buffer (struct usb_serial_port *port)
{
@@ -16279,7 +16270,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/*
* We can't really account for how much data we
-@@ -493,11 +493,11 @@ static void visor_write_bulk_callback (s
+@@ -484,11 +484,11 @@ static void visor_write_bulk_callback (s
/* free up the transfer buffer, as usb_free_urb() does not do this */
kfree (urb->transfer_buffer);
@@ -16293,7 +16284,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irqsave(&priv->lock, flags);
--priv->outstanding_urbs;
-@@ -517,15 +517,15 @@ static void visor_read_bulk_callback (st
+@@ -508,15 +508,15 @@ static void visor_read_bulk_callback (st
int result;
int available_room;
@@ -16312,7 +16303,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
tty = port->tty;
if (tty && urb->actual_length) {
-@@ -551,7 +551,7 @@ static void visor_read_bulk_callback (st
+@@ -542,7 +542,7 @@ static void visor_read_bulk_callback (st
visor_read_bulk_callback, port);
result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result)
@@ -16321,7 +16312,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
} else {
priv->actually_throttled = 1;
}
-@@ -573,11 +573,11 @@ static void visor_read_int_callback (str
+@@ -564,11 +564,11 @@ static void visor_read_int_callback (str
case -ESHUTDOWN:
/* this urb is terminated, clean up */
dbg("%s - urb shutting down with status: %d",
@@ -16335,7 +16326,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
goto exit;
}
-@@ -588,14 +588,14 @@ static void visor_read_int_callback (str
+@@ -579,14 +579,14 @@ static void visor_read_int_callback (str
* Rumor has it this endpoint is used to notify when data
* is ready to be read from the bulk ones.
*/
@@ -16352,7 +16343,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
static void visor_throttle (struct usb_serial_port *port)
-@@ -603,7 +603,7 @@ static void visor_throttle (struct usb_s
+@@ -594,7 +594,7 @@ static void visor_throttle (struct usb_s
struct visor_private *priv = usb_get_serial_port_data(port);
unsigned long flags;
@@ -16361,7 +16352,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irqsave(&priv->lock, flags);
priv->throttled = 1;
spin_unlock_irqrestore(&priv->lock, flags);
-@@ -616,7 +616,7 @@ static void visor_unthrottle (struct usb
+@@ -607,7 +607,7 @@ static void visor_unthrottle (struct usb
unsigned long flags;
int result;
@@ -16370,7 +16361,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irqsave(&priv->lock, flags);
priv->throttled = 0;
priv->actually_throttled = 0;
-@@ -625,7 +625,7 @@ static void visor_unthrottle (struct usb
+@@ -616,7 +616,7 @@ static void visor_unthrottle (struct usb
port->read_urb->dev = port->serial->dev;
result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result)
@@ -16379,7 +16370,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
static int palm_os_3_probe (struct usb_serial *serial, const struct usb_device_id *id)
-@@ -638,11 +638,11 @@ static int palm_os_3_probe (struct usb_s
+@@ -629,11 +629,11 @@ static int palm_os_3_probe (struct usb_s
int i;
int num_ports = 0;
@@ -16393,7 +16384,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sizeof(*connection_info));
return -ENOMEM;
}
-@@ -655,7 +655,7 @@ static int palm_os_3_probe (struct usb_s
+@@ -646,7 +646,7 @@ static int palm_os_3_probe (struct usb_s
sizeof(*connection_info), 300);
if (retval < 0) {
dev_err(dev, "%s - error %d getting connection information\n",
@@ -16402,7 +16393,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
goto exit;
}
-@@ -715,7 +715,7 @@ static int palm_os_3_probe (struct usb_s
+@@ -706,7 +706,7 @@ static int palm_os_3_probe (struct usb_s
0x02, 300);
if (retval < 0)
dev_err(dev, "%s - error %d getting bytes available request\n",
@@ -16411,7 +16402,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
retval = 0;
exit:
-@@ -731,11 +731,11 @@ static int palm_os_4_probe (struct usb_s
+@@ -722,11 +722,11 @@ static int palm_os_4_probe (struct usb_s
unsigned char *transfer_buffer;
int retval;
@@ -16425,7 +16416,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sizeof(*connection_info));
return -ENOMEM;
}
-@@ -747,9 +747,9 @@ static int palm_os_4_probe (struct usb_s
+@@ -738,9 +738,9 @@ static int palm_os_4_probe (struct usb_s
sizeof (*connection_info), 300);
if (retval < 0)
dev_err(dev, "%s - error %d getting connection info\n",
@@ -16437,7 +16428,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
retval, transfer_buffer);
kfree (transfer_buffer);
-@@ -762,7 +762,7 @@ static int visor_probe (struct usb_seria
+@@ -753,7 +753,7 @@ static int visor_probe (struct usb_seria
int retval = 0;
int (*startup) (struct usb_serial *serial, const struct usb_device_id *id);
@@ -16446,7 +16437,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (serial->dev->actconfig->desc.bConfigurationValue != 1) {
err("active config #%d != 1 ??",
-@@ -816,7 +816,7 @@ static int clie_3_5_startup (struct usb_
+@@ -807,7 +807,7 @@ static int clie_3_5_startup (struct usb_
int result;
u8 data;
@@ -16455,7 +16446,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/*
* Note that PEG-300 series devices expect the following two calls.
-@@ -827,11 +827,11 @@ static int clie_3_5_startup (struct usb_
+@@ -818,11 +818,11 @@ static int clie_3_5_startup (struct usb_
USB_REQ_GET_CONFIGURATION, USB_DIR_IN,
0, 0, &data, 1, 3000);
if (result < 0) {
@@ -16469,7 +16460,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return -EIO;
}
-@@ -841,11 +841,11 @@ static int clie_3_5_startup (struct usb_
+@@ -832,11 +832,11 @@ static int clie_3_5_startup (struct usb_
USB_DIR_IN | USB_RECIP_INTERFACE,
0, 0, &data, 1, 3000);
if (result < 0) {
@@ -16483,7 +16474,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return -EIO;
}
-@@ -863,7 +863,7 @@ static int treo_attach (struct usb_seria
+@@ -854,7 +854,7 @@ static int treo_attach (struct usb_seria
(serial->num_interrupt_in == 0))
goto generic_startup;
@@ -16492,7 +16483,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/*
* It appears that Treos and Kyoceras want to use the
-@@ -894,7 +894,7 @@ generic_startup:
+@@ -885,7 +885,7 @@ generic_startup:
static int clie_5_attach (struct usb_serial *serial)
{
@@ -16501,7 +16492,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* TH55 registers 2 ports.
Communication in from the UX50/TH55 uses bulk_in_endpointAddress from port 0
-@@ -918,7 +918,7 @@ static void visor_shutdown (struct usb_s
+@@ -909,7 +909,7 @@ static void visor_shutdown (struct usb_s
struct visor_private *priv;
int i;
@@ -16510,7 +16501,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
for (i = 0; i < serial->num_ports; i++) {
priv = usb_get_serial_port_data(serial->port[i]);
-@@ -931,7 +931,7 @@ static void visor_shutdown (struct usb_s
+@@ -922,7 +922,7 @@ static void visor_shutdown (struct usb_s
static int visor_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
{
@@ -16521,7 +16512,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
--- a/drivers/usb/serial/whiteheat.c
+++ b/drivers/usb/serial/whiteheat.c
-@@ -288,7 +288,7 @@ static int whiteheat_firmware_download (
+@@ -282,7 +282,7 @@ static int whiteheat_firmware_download (
int response;
const struct whiteheat_hex_record *record;
@@ -16530,7 +16521,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
response = ezusb_set_reset (serial, 1);
-@@ -298,7 +298,7 @@ static int whiteheat_firmware_download (
+@@ -292,7 +292,7 @@ static int whiteheat_firmware_download (
(unsigned char *)record->data, record->data_size, 0xa0);
if (response < 0) {
err("%s - ezusb_writememory failed for loader (%d %04X %p %d)",
@@ -16539,7 +16530,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
break;
}
++record;
-@@ -315,7 +315,7 @@ static int whiteheat_firmware_download (
+@@ -309,7 +309,7 @@ static int whiteheat_firmware_download (
(unsigned char *)record->data, record->data_size, 0xa3);
if (response < 0) {
err("%s - ezusb_writememory failed for first firmware step (%d %04X %p %d)",
@@ -16548,7 +16539,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
break;
}
++record;
-@@ -329,7 +329,7 @@ static int whiteheat_firmware_download (
+@@ -323,7 +323,7 @@ static int whiteheat_firmware_download (
(unsigned char *)record->data, record->data_size, 0xa0);
if (response < 0) {
err("%s - ezusb_writememory failed for second firmware step (%d %04X %p %d)",
@@ -16557,7 +16548,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
break;
}
++record;
-@@ -567,7 +567,7 @@ static void whiteheat_shutdown (struct u
+@@ -561,7 +561,7 @@ static void whiteheat_shutdown (struct u
struct list_head *tmp2;
int i;
@@ -16566,7 +16557,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* free up our private data for our command port */
command_port = serial->port[COMMAND_PORT];
-@@ -604,7 +604,7 @@ static int whiteheat_open (struct usb_se
+@@ -598,7 +598,7 @@ static int whiteheat_open (struct usb_se
int retval = 0;
struct ktermios old_term;
@@ -16575,7 +16566,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
retval = start_command_port(port->serial);
if (retval)
-@@ -637,14 +637,14 @@ static int whiteheat_open (struct usb_se
+@@ -631,14 +631,14 @@ static int whiteheat_open (struct usb_se
/* Start reading from the device */
retval = start_port_read(port);
if (retval) {
@@ -16592,7 +16583,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return retval;
}
-@@ -657,7 +657,7 @@ static void whiteheat_close(struct usb_s
+@@ -651,7 +651,7 @@ static void whiteheat_close(struct usb_s
struct list_head *tmp;
struct list_head *tmp2;
@@ -16601,7 +16592,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
mutex_lock(&port->serial->disc_mutex);
/* filp is NULL when called from usb_serial_disconnect */
-@@ -732,10 +732,10 @@ static int whiteheat_write(struct usb_se
+@@ -726,10 +726,10 @@ static int whiteheat_write(struct usb_se
unsigned long flags;
struct list_head *tmp;
@@ -16614,7 +16605,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return (0);
}
-@@ -754,13 +754,13 @@ static int whiteheat_write(struct usb_se
+@@ -748,13 +748,13 @@ static int whiteheat_write(struct usb_se
bytes = (count > port->bulk_out_size) ? port->bulk_out_size : count;
memcpy (urb->transfer_buffer, buf + sent, bytes);
@@ -16630,7 +16621,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sent = result;
spin_lock_irqsave(&info->lock, flags);
list_add(tmp, &info->tx_urbs_free);
-@@ -786,7 +786,7 @@ static int whiteheat_write_room(struct u
+@@ -780,7 +780,7 @@ static int whiteheat_write_room(struct u
int room = 0;
unsigned long flags;
@@ -16639,7 +16630,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irqsave(&info->lock, flags);
list_for_each(tmp, &info->tx_urbs_free)
-@@ -794,7 +794,7 @@ static int whiteheat_write_room(struct u
+@@ -788,7 +788,7 @@ static int whiteheat_write_room(struct u
spin_unlock_irqrestore(&info->lock, flags);
room *= port->bulk_out_size;
@@ -16648,7 +16639,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return (room);
}
-@@ -804,7 +804,7 @@ static int whiteheat_tiocmget (struct us
+@@ -798,7 +798,7 @@ static int whiteheat_tiocmget (struct us
struct whiteheat_private *info = usb_get_serial_port_data(port);
unsigned int modem_signals = 0;
@@ -16657,7 +16648,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
firm_get_dtr_rts(port);
if (info->mcr & UART_MCR_DTR)
-@@ -821,7 +821,7 @@ static int whiteheat_tiocmset (struct us
+@@ -815,7 +815,7 @@ static int whiteheat_tiocmset (struct us
{
struct whiteheat_private *info = usb_get_serial_port_data(port);
@@ -16666,7 +16657,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (set & TIOCM_RTS)
info->mcr |= UART_MCR_RTS;
-@@ -844,7 +844,7 @@ static int whiteheat_ioctl (struct usb_s
+@@ -838,7 +838,7 @@ static int whiteheat_ioctl (struct usb_s
struct serial_struct serstruct;
void __user *user_arg = (void __user *)arg;
@@ -16675,7 +16666,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
switch (cmd) {
case TIOCGSERIAL:
-@@ -886,7 +886,7 @@ static int whiteheat_ioctl (struct usb_s
+@@ -880,7 +880,7 @@ static int whiteheat_ioctl (struct usb_s
static void whiteheat_set_termios(struct usb_serial_port *port, struct ktermios *old_termios)
{
@@ -16684,7 +16675,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
firm_setup_port(port);
}
-@@ -904,7 +904,7 @@ static int whiteheat_chars_in_buffer(str
+@@ -898,7 +898,7 @@ static int whiteheat_chars_in_buffer(str
int chars = 0;
unsigned long flags;
@@ -16693,7 +16684,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irqsave(&info->lock, flags);
list_for_each(tmp, &info->tx_urbs_submitted) {
-@@ -913,7 +913,7 @@ static int whiteheat_chars_in_buffer(str
+@@ -907,7 +907,7 @@ static int whiteheat_chars_in_buffer(str
}
spin_unlock_irqrestore(&info->lock, flags);
@@ -16702,7 +16693,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return chars;
}
-@@ -923,7 +923,7 @@ static void whiteheat_throttle (struct u
+@@ -917,7 +917,7 @@ static void whiteheat_throttle (struct u
struct whiteheat_private *info = usb_get_serial_port_data(port);
unsigned long flags;
@@ -16711,7 +16702,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irqsave(&info->lock, flags);
info->flags |= THROTTLED;
-@@ -939,7 +939,7 @@ static void whiteheat_unthrottle (struct
+@@ -933,7 +933,7 @@ static void whiteheat_unthrottle (struct
int actually_throttled;
unsigned long flags;
@@ -16720,7 +16711,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock_irqsave(&info->lock, flags);
actually_throttled = info->flags & ACTUALLY_THROTTLED;
-@@ -960,7 +960,7 @@ static void command_port_write_callback(
+@@ -954,7 +954,7 @@ static void command_port_write_callback(
{
int status = urb->status;
@@ -16729,7 +16720,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (status) {
dbg("nonzero urb status: %d", status);
-@@ -977,22 +977,22 @@ static void command_port_read_callback(s
+@@ -971,22 +971,22 @@ static void command_port_read_callback(s
unsigned char *data = urb->transfer_buffer;
int result;
@@ -16756,7 +16747,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (data[0] == WHITEHEAT_CMD_COMPLETE) {
command_info->command_finished = WHITEHEAT_CMD_COMPLETE;
-@@ -1002,20 +1002,20 @@ static void command_port_read_callback(s
+@@ -996,20 +996,20 @@ static void command_port_read_callback(s
wake_up(&command_info->wait_command);
} else if (data[0] == WHITEHEAT_EVENT) {
/* These are unsolicited reports from the firmware, hence no waiting command to wakeup */
@@ -16780,7 +16771,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
-@@ -1027,13 +1027,13 @@ static void whiteheat_read_callback(stru
+@@ -1021,13 +1021,13 @@ static void whiteheat_read_callback(stru
struct whiteheat_private *info = usb_get_serial_port_data(port);
int status = urb->status;
@@ -16796,7 +16787,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return;
}
list_del(&wrap->list);
-@@ -1041,14 +1041,14 @@ static void whiteheat_read_callback(stru
+@@ -1035,14 +1035,14 @@ static void whiteheat_read_callback(stru
if (status) {
dbg("%s - nonzero read bulk status received: %d",
@@ -16813,7 +16804,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_lock(&info->lock);
list_add_tail(&wrap->list, &info->rx_urb_q);
-@@ -1070,13 +1070,13 @@ static void whiteheat_write_callback(str
+@@ -1064,13 +1064,13 @@ static void whiteheat_write_callback(str
struct whiteheat_urb_wrap *wrap;
int status = urb->status;
@@ -16829,7 +16820,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return;
}
list_move(&wrap->list, &info->tx_urbs_free);
-@@ -1084,7 +1084,7 @@ static void whiteheat_write_callback(str
+@@ -1078,7 +1078,7 @@ static void whiteheat_write_callback(str
if (status) {
dbg("%s - nonzero write bulk status received: %d",
@@ -16838,7 +16829,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return;
}
-@@ -1104,7 +1104,7 @@ static int firm_send_command(struct usb_
+@@ -1098,7 +1098,7 @@ static int firm_send_command(struct usb_
int retval = 0;
int t;
@@ -16847,7 +16838,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
command_port = port->serial->port[COMMAND_PORT];
command_info = usb_get_serial_port_data(command_port);
-@@ -1118,7 +1118,7 @@ static int firm_send_command(struct usb_
+@@ -1112,7 +1112,7 @@ static int firm_send_command(struct usb_
command_port->write_urb->dev = port->serial->dev;
retval = usb_submit_urb (command_port->write_urb, GFP_NOIO);
if (retval) {
@@ -16856,7 +16847,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
goto exit;
}
-@@ -1129,19 +1129,19 @@ static int firm_send_command(struct usb_
+@@ -1123,19 +1123,19 @@ static int firm_send_command(struct usb_
usb_kill_urb(command_port->write_urb);
if (command_info->command_finished == false) {
@@ -16879,7 +16870,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
switch (command) {
case WHITEHEAT_GET_DTR_RTS:
info = usb_get_serial_port_data(port);
-@@ -1186,7 +1186,7 @@ static int firm_setup_port(struct usb_se
+@@ -1180,7 +1180,7 @@ static int firm_setup_port(struct usb_se
default:
case CS8: port_settings.bits = 8; break;
}
@@ -16888,7 +16879,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* determine the parity */
if (cflag & PARENB)
-@@ -1202,21 +1202,21 @@ static int firm_setup_port(struct usb_se
+@@ -1196,21 +1196,21 @@ static int firm_setup_port(struct usb_se
port_settings.parity = WHITEHEAT_PAR_EVEN;
else
port_settings.parity = WHITEHEAT_PAR_NONE;
@@ -16913,7 +16904,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
(port_settings.hflow & WHITEHEAT_HFLOW_CTS) ? "CTS" : "",
(port_settings.hflow & WHITEHEAT_HFLOW_RTS) ? "RTS" : "",
(port_settings.hflow & WHITEHEAT_HFLOW_DSR) ? "DSR" : "",
-@@ -1227,15 +1227,15 @@ static int firm_setup_port(struct usb_se
+@@ -1221,15 +1221,15 @@ static int firm_setup_port(struct usb_se
port_settings.sflow = WHITEHEAT_SFLOW_RXTX;
else
port_settings.sflow = WHITEHEAT_SFLOW_NONE;
@@ -16932,7 +16923,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* fixme: should set validated settings */
tty_encode_baud_rate(port->tty, port_settings.baud, port_settings.baud);
-@@ -1318,7 +1318,7 @@ static int start_command_port(struct usb
+@@ -1312,7 +1312,7 @@ static int start_command_port(struct usb
command_port->read_urb->dev = serial->dev;
retval = usb_submit_urb(command_port->read_urb, GFP_KERNEL);
if (retval) {
@@ -16941,7 +16932,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
goto exit;
}
}
-@@ -1454,7 +1454,7 @@ static void rx_data_softint(struct work_
+@@ -1448,7 +1448,7 @@ static void rx_data_softint(struct work_
urb->dev = port->serial->dev;
result = usb_submit_urb(urb, GFP_ATOMIC);
if (result) {
diff --git a/usb/usb-serial-more-fixes-and-groundwork-for-tty-changes.patch b/usb/usb-serial-more-fixes-and-groundwork-for-tty-changes.patch
index 4aeb605e2bbdf7..53075074ce57e5 100644
--- a/usb/usb-serial-more-fixes-and-groundwork-for-tty-changes.patch
+++ b/usb/usb-serial-more-fixes-and-groundwork-for-tty-changes.patch
@@ -47,7 +47,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/drivers/usb/serial/cyberjack.c
+++ b/drivers/usb/serial/cyberjack.c
-@@ -154,7 +154,7 @@ static void cyberjack_shutdown (struct u
+@@ -151,7 +151,7 @@ static void cyberjack_shutdown (struct u
dbg("%s", __func__);
@@ -56,7 +56,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
usb_kill_urb(serial->port[i]->interrupt_in_urb);
/* My special items, the standard routines free my urbs */
kfree(usb_get_serial_port_data(serial->port[i]));
-@@ -212,7 +212,7 @@ static int cyberjack_write (struct usb_s
+@@ -209,7 +209,7 @@ static int cyberjack_write (struct usb_s
if (count == 0) {
dbg("%s - write request of 0 bytes", __func__);
@@ -65,7 +65,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
spin_lock_bh(&port->lock);
-@@ -226,12 +226,12 @@ static int cyberjack_write (struct usb_s
+@@ -223,12 +223,12 @@ static int cyberjack_write (struct usb_s
spin_lock_irqsave(&priv->lock, flags);
@@ -82,7 +82,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
/* Copy data */
-@@ -272,8 +272,8 @@ static int cyberjack_write (struct usb_s
+@@ -269,8 +269,8 @@ static int cyberjack_write (struct usb_s
if (result) {
err("%s - failed submitting write urb, error %d", __func__, result);
/* Throw away data. No better idea what to do with it. */
@@ -93,7 +93,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
spin_unlock_irqrestore(&priv->lock, flags);
port->write_urb_busy = 0;
return 0;
-@@ -285,8 +285,8 @@ static int cyberjack_write (struct usb_s
+@@ -282,8 +282,8 @@ static int cyberjack_write (struct usb_s
if( priv->wrsent>=priv->wrfilled ) {
dbg("%s - buffer cleaned", __func__);
memset( priv->wrbuf, 0, sizeof(priv->wrbuf) );
@@ -104,7 +104,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
}
-@@ -297,6 +297,7 @@ static int cyberjack_write (struct usb_s
+@@ -294,6 +294,7 @@ static int cyberjack_write (struct usb_s
static int cyberjack_write_room( struct usb_serial_port *port )
{
@@ -112,7 +112,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return CYBERJACK_LOCAL_BUF_SIZE;
}
-@@ -317,7 +318,7 @@ static void cyberjack_read_int_callback(
+@@ -314,7 +315,7 @@ static void cyberjack_read_int_callback(
usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data);
/* React only to interrupts signaling a bulk_in transfer */
@@ -121,7 +121,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
short old_rdtodo;
/* This is a announcement of coming bulk_ins. */
-@@ -453,8 +454,8 @@ static void cyberjack_write_bulk_callbac
+@@ -450,8 +451,8 @@ static void cyberjack_write_bulk_callbac
if (result) {
err("%s - failed submitting write urb, error %d", __func__, result);
/* Throw away data. No better idea what to do with it. */
@@ -132,7 +132,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
goto exit;
}
-@@ -466,8 +467,8 @@ static void cyberjack_write_bulk_callbac
+@@ -463,8 +464,8 @@ static void cyberjack_write_bulk_callbac
if( (priv->wrsent>=priv->wrfilled) || (priv->wrsent>=blksize) ) {
dbg("%s - buffer cleaned", __func__);
memset( priv->wrbuf, 0, sizeof(priv->wrbuf) );
@@ -145,7 +145,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
-@@ -265,13 +265,14 @@ int usb_serial_generic_write_room (struc
+@@ -262,13 +262,14 @@ int usb_serial_generic_write_room (struc
dbg("%s - port %d", __func__, port->number);
@@ -161,7 +161,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
int usb_serial_generic_chars_in_buffer (struct usb_serial_port *port)
-@@ -281,6 +282,7 @@ int usb_serial_generic_chars_in_buffer (
+@@ -278,6 +279,7 @@ int usb_serial_generic_chars_in_buffer (
dbg("%s - port %d", __func__, port->number);
@@ -169,7 +169,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (serial->num_bulk_out) {
if (port->write_urb_busy)
chars = port->write_urb->transfer_buffer_length;
-@@ -371,7 +373,6 @@ void usb_serial_generic_write_bulk_callb
+@@ -368,7 +370,6 @@ void usb_serial_generic_write_bulk_callb
__func__, status);
return;
}
@@ -292,7 +292,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/drivers/usb/serial/kl5kusb105.c
+++ b/drivers/usb/serial/kl5kusb105.c
-@@ -705,12 +705,14 @@ static void klsi_105_set_termios (struct
+@@ -702,12 +702,14 @@ static void klsi_105_set_termios (struct
struct ktermios *old_termios)
{
struct klsi_105_private *priv = usb_get_serial_port_data(port);
@@ -309,7 +309,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* lock while we are modifying the settings */
spin_lock_irqsave (&priv->lock, flags);
-@@ -718,6 +720,8 @@ static void klsi_105_set_termios (struct
+@@ -715,6 +717,8 @@ static void klsi_105_set_termios (struct
/*
* Update baud rate
*/
@@ -318,7 +318,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if( (cflag & CBAUD) != (old_cflag & CBAUD) ) {
/* reassert DTR and (maybe) RTS on transition from B0 */
if( (old_cflag & CBAUD) == B0 ) {
-@@ -731,8 +735,8 @@ static void klsi_105_set_termios (struct
+@@ -728,8 +732,8 @@ static void klsi_105_set_termios (struct
mct_u232_set_modem_ctrl(serial, priv->control_state);
#endif
}
@@ -329,7 +329,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
case 0: /* handled below */
break;
case 1200:
-@@ -760,25 +764,26 @@ static void klsi_105_set_termios (struct
+@@ -757,25 +761,26 @@ static void klsi_105_set_termios (struct
priv->cfg.baudrate = kl5kusb105a_sio_b115200;
break;
default:
@@ -368,7 +368,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if ((cflag & CSIZE) != (old_cflag & CSIZE)) {
/* set the number of data bits */
-@@ -810,6 +815,8 @@ static void klsi_105_set_termios (struct
+@@ -807,6 +812,8 @@ static void klsi_105_set_termios (struct
if ((cflag & (PARENB|PARODD)) != (old_cflag & (PARENB|PARODD))
|| (cflag & CSTOPB) != (old_cflag & CSTOPB) ) {
@@ -377,7 +377,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
#if 0
priv->last_lcr = 0;
-@@ -837,6 +844,8 @@ static void klsi_105_set_termios (struct
+@@ -834,6 +841,8 @@ static void klsi_105_set_termios (struct
|| (iflag & IXON) != (old_iflag & IXON)
|| (cflag & CRTSCTS) != (old_cflag & CRTSCTS) ) {
@@ -425,7 +425,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
static struct usb_serial_driver navman_device = {
--- a/drivers/usb/serial/omninet.c
+++ b/drivers/usb/serial/omninet.c
-@@ -298,8 +298,9 @@ static int omninet_write_room (struct us
+@@ -295,8 +295,9 @@ static int omninet_write_room (struct us
struct usb_serial *serial = port->serial;
struct usb_serial_port *wport = serial->port[1];
@@ -438,7 +438,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
-@@ -659,6 +659,7 @@ static int option_write_room(struct usb_
+@@ -656,6 +656,7 @@ static int option_write_room(struct usb_
portdata = usb_get_serial_port_data(port);
@@ -446,7 +446,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))
-@@ -680,6 +681,8 @@ static int option_chars_in_buffer(struct
+@@ -677,6 +678,8 @@ static int option_chars_in_buffer(struct
for (i=0; i < N_OUT_URB; i++) {
this_urb = portdata->out_urbs[i];
@@ -573,7 +573,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
-@@ -1195,6 +1195,8 @@ static int __init usb_serial_init(void)
+@@ -1179,6 +1179,8 @@ static int __init usb_serial_init(void)
usb_serial_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
usb_serial_tty_driver->init_termios = tty_std_termios;
usb_serial_tty_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
@@ -584,7 +584,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (result) {
--- a/drivers/usb/serial/visor.c
+++ b/drivers/usb/serial/visor.c
-@@ -478,6 +478,8 @@ static int visor_chars_in_buffer (struct
+@@ -469,6 +469,8 @@ static int visor_chars_in_buffer (struct
* have sent out, but hasn't made it through to the
* device, so just tell the tty layer that everything
* is flushed.
@@ -595,7 +595,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
--- a/drivers/usb/serial/whiteheat.c
+++ b/drivers/usb/serial/whiteheat.c
-@@ -225,7 +225,7 @@ struct whiteheat_urb_wrap {
+@@ -219,7 +219,7 @@ struct whiteheat_urb_wrap {
struct whiteheat_private {
spinlock_t lock;
__u8 flags;
diff --git a/usb/usb-serial-remove-endpoints-setting-checks-from-core-and-header.patch b/usb/usb-serial-remove-endpoints-setting-checks-from-core-and-header.patch
new file mode 100644
index 00000000000000..9695ed57d92be5
--- /dev/null
+++ b/usb/usb-serial-remove-endpoints-setting-checks-from-core-and-header.patch
@@ -0,0 +1,83 @@
+From foo@baz Tue Apr 9 12:12:43 2002
+Date: Wed, 16 Apr 2008 09:17:38 -0700
+To: Greg KH <greg@kroah.com>
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Subject: USB: serial: remove endpoints setting checks from core and header
+
+Remove the unused check for num_interrupt and friends as well as remove
+them from the header file because no usb-serial drivers no longer
+reference them.
+
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/usb-serial.c | 16 ----------------
+ include/linux/usb/serial.h | 18 ------------------
+ 2 files changed, 34 deletions(-)
+
+--- a/drivers/usb/serial/usb-serial.c
++++ b/drivers/usb/serial/usb-serial.c
+@@ -861,22 +861,6 @@ int usb_serial_probe(struct usb_interfac
+ serial->num_interrupt_in = num_interrupt_in;
+ serial->num_interrupt_out = num_interrupt_out;
+
+-#if 0
+- /* check that the device meets the driver's requirements */
+- if ((type->num_interrupt_in != NUM_DONT_CARE &&
+- type->num_interrupt_in != num_interrupt_in)
+- || (type->num_interrupt_out != NUM_DONT_CARE &&
+- type->num_interrupt_out != num_interrupt_out)
+- || (type->num_bulk_in != NUM_DONT_CARE &&
+- type->num_bulk_in != num_bulk_in)
+- || (type->num_bulk_out != NUM_DONT_CARE &&
+- type->num_bulk_out != num_bulk_out)) {
+- dbg("wrong number of endpoints");
+- kfree(serial);
+- return -EIO;
+- }
+-#endif
+-
+ /* found all that we need */
+ dev_info(&interface->dev, "%s converter detected\n",
+ type->description);
+--- a/include/linux/usb/serial.h
++++ b/include/linux/usb/serial.h
+@@ -145,8 +145,6 @@ struct usb_serial {
+ };
+ #define to_usb_serial(d) container_of(d, struct usb_serial, kref)
+
+-#define NUM_DONT_CARE 99
+-
+ /* get and set the serial private data pointer helper functions */
+ static inline void *usb_get_serial_data(struct usb_serial *serial)
+ {
+@@ -164,18 +162,6 @@ static inline void usb_set_serial_data(s
+ * used in the syslog messages when a device is inserted or removed.
+ * @id_table: pointer to a list of usb_device_id structures that define all
+ * of the devices this structure can support.
+- * @num_interrupt_in: If a device doesn't have this many interrupt-in
+- * endpoints, it won't be sent to the driver's attach() method.
+- * (But it might still be sent to the probe() method.)
+- * @num_interrupt_out: If a device doesn't have this many interrupt-out
+- * endpoints, it won't be sent to the driver's attach() method.
+- * (But it might still be sent to the probe() method.)
+- * @num_bulk_in: If a device doesn't have this many bulk-in
+- * endpoints, it won't be sent to the driver's attach() method.
+- * (But it might still be sent to the probe() method.)
+- * @num_bulk_out: If a device doesn't have this many bulk-out
+- * endpoints, it won't be sent to the driver's attach() method.
+- * (But it might still be sent to the probe() method.)
+ * @num_ports: the number of different ports this device will have.
+ * @calc_num_ports: pointer to a function to determine how many ports this
+ * device has dynamically. It will be called after the probe()
+@@ -211,10 +197,6 @@ static inline void usb_set_serial_data(s
+ struct usb_serial_driver {
+ const char *description;
+ const struct usb_device_id *id_table;
+- char num_interrupt_in;
+- char num_interrupt_out;
+- char num_bulk_in;
+- char num_bulk_out;
+ char num_ports;
+
+ struct list_head driver_list;
diff --git a/usb/usb-serial-remove-unneeded-number-endpoints-settings.patch b/usb/usb-serial-remove-unneeded-number-endpoints-settings.patch
new file mode 100644
index 00000000000000..c1c2e6a5576c2a
--- /dev/null
+++ b/usb/usb-serial-remove-unneeded-number-endpoints-settings.patch
@@ -0,0 +1,603 @@
+From foo@baz Tue Apr 9 12:12:43 2002
+Date: Wed, 16 Apr 2008 09:17:38 -0700
+To: Greg KH <greg@kroah.com>
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Subject: USB: serial: remove unneeded number endpoints settings
+
+The usb-serial core no longer checks these fields so remove them from
+all of the individual drivers. They will be removed from the usb-serial
+core in a patch later in the series.
+
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/airprime.c | 3 ---
+ drivers/usb/serial/ark3116.c | 3 ---
+ drivers/usb/serial/belkin_sa.c | 3 ---
+ drivers/usb/serial/ch341.c | 3 ---
+ drivers/usb/serial/cp2101.c | 3 ---
+ drivers/usb/serial/cyberjack.c | 3 ---
+ drivers/usb/serial/cypress_m8.c | 12 ------------
+ drivers/usb/serial/digi_acceleport.c | 6 ------
+ drivers/usb/serial/empeg.c | 3 ---
+ drivers/usb/serial/ftdi_sio.c | 3 ---
+ drivers/usb/serial/funsoft.c | 3 ---
+ drivers/usb/serial/garmin_gps.c | 3 ---
+ drivers/usb/serial/generic.c | 3 ---
+ drivers/usb/serial/hp4x.c | 3 ---
+ drivers/usb/serial/io_ti.c | 6 ------
+ drivers/usb/serial/ipaq.c | 3 ---
+ drivers/usb/serial/ipw.c | 3 ---
+ drivers/usb/serial/ir-usb.c | 3 ---
+ drivers/usb/serial/iuu_phoenix.c | 3 ---
+ drivers/usb/serial/keyspan_pda.c | 9 ---------
+ drivers/usb/serial/kl5kusb105.c | 3 ---
+ drivers/usb/serial/kobil_sct.c | 4 ----
+ drivers/usb/serial/mct_u232.c | 3 ---
+ drivers/usb/serial/mos7720.c | 3 ---
+ drivers/usb/serial/mos7840.c | 5 -----
+ drivers/usb/serial/navman.c | 3 ---
+ drivers/usb/serial/omninet.c | 3 ---
+ drivers/usb/serial/option.c | 3 ---
+ drivers/usb/serial/oti6858.c | 3 ---
+ drivers/usb/serial/pl2303.c | 3 ---
+ drivers/usb/serial/safe_serial.c | 3 ---
+ drivers/usb/serial/sierra.c | 3 ---
+ drivers/usb/serial/spcp8x5.c | 3 ---
+ drivers/usb/serial/ti_usb_3410_5052.c | 6 ------
+ drivers/usb/serial/usb_debug.c | 3 ---
+ drivers/usb/serial/visor.c | 9 ---------
+ drivers/usb/serial/whiteheat.c | 6 ------
+ 37 files changed, 147 deletions(-)
+
+--- a/drivers/usb/serial/airprime.c
++++ b/drivers/usb/serial/airprime.c
+@@ -306,9 +306,6 @@ static struct usb_serial_driver airprime
+ },
+ .usb_driver = &airprime_driver,
+ .id_table = id_table,
+- .num_interrupt_in = NUM_DONT_CARE,
+- .num_bulk_in = NUM_DONT_CARE,
+- .num_bulk_out = NUM_DONT_CARE,
+ .open = airprime_open,
+ .close = airprime_close,
+ .write = airprime_write,
+--- a/drivers/usb/serial/ark3116.c
++++ b/drivers/usb/serial/ark3116.c
+@@ -447,9 +447,6 @@ static struct usb_serial_driver ark3116_
+ },
+ .id_table = id_table,
+ .usb_driver = &ark3116_driver,
+- .num_interrupt_in = 1,
+- .num_bulk_in = 1,
+- .num_bulk_out = 1,
+ .num_ports = 1,
+ .attach = ark3116_attach,
+ .set_termios = ark3116_set_termios,
+--- a/drivers/usb/serial/belkin_sa.c
++++ b/drivers/usb/serial/belkin_sa.c
+@@ -128,9 +128,6 @@ static struct usb_serial_driver belkin_d
+ .description = "Belkin / Peracom / GoHubs USB Serial Adapter",
+ .usb_driver = &belkin_driver,
+ .id_table = id_table_combined,
+- .num_interrupt_in = 1,
+- .num_bulk_in = 1,
+- .num_bulk_out = 1,
+ .num_ports = 1,
+ .open = belkin_sa_open,
+ .close = belkin_sa_close,
+--- a/drivers/usb/serial/ch341.c
++++ b/drivers/usb/serial/ch341.c
+@@ -318,9 +318,6 @@ static struct usb_serial_driver ch341_de
+ },
+ .id_table = id_table,
+ .usb_driver = &ch341_driver,
+- .num_interrupt_in = NUM_DONT_CARE,
+- .num_bulk_in = 1,
+- .num_bulk_out = 1,
+ .num_ports = 1,
+ .open = ch341_open,
+ .set_termios = ch341_set_termios,
+--- a/drivers/usb/serial/cp2101.c
++++ b/drivers/usb/serial/cp2101.c
+@@ -109,9 +109,6 @@ static struct usb_serial_driver cp2101_d
+ },
+ .usb_driver = &cp2101_driver,
+ .id_table = id_table,
+- .num_interrupt_in = 0,
+- .num_bulk_in = NUM_DONT_CARE,
+- .num_bulk_out = NUM_DONT_CARE,
+ .num_ports = 1,
+ .open = cp2101_open,
+ .close = cp2101_close,
+--- a/drivers/usb/serial/cyberjack.c
++++ b/drivers/usb/serial/cyberjack.c
+@@ -90,9 +90,6 @@ static struct usb_serial_driver cyberjac
+ .description = "Reiner SCT Cyberjack USB card reader",
+ .usb_driver = &cyberjack_driver,
+ .id_table = id_table,
+- .num_interrupt_in = 1,
+- .num_bulk_in = 1,
+- .num_bulk_out = 1,
+ .num_ports = 1,
+ .attach = cyberjack_startup,
+ .shutdown = cyberjack_shutdown,
+--- a/drivers/usb/serial/cypress_m8.c
++++ b/drivers/usb/serial/cypress_m8.c
+@@ -200,10 +200,6 @@ static struct usb_serial_driver cypress_
+ .description = "DeLorme Earthmate USB",
+ .usb_driver = &cypress_driver,
+ .id_table = id_table_earthmate,
+- .num_interrupt_in = 1,
+- .num_interrupt_out = 1,
+- .num_bulk_in = NUM_DONT_CARE,
+- .num_bulk_out = NUM_DONT_CARE,
+ .num_ports = 1,
+ .attach = cypress_earthmate_startup,
+ .shutdown = cypress_shutdown,
+@@ -230,10 +226,6 @@ static struct usb_serial_driver cypress_
+ .description = "HID->COM RS232 Adapter",
+ .usb_driver = &cypress_driver,
+ .id_table = id_table_cyphidcomrs232,
+- .num_interrupt_in = 1,
+- .num_interrupt_out = 1,
+- .num_bulk_in = NUM_DONT_CARE,
+- .num_bulk_out = NUM_DONT_CARE,
+ .num_ports = 1,
+ .attach = cypress_hidcom_startup,
+ .shutdown = cypress_shutdown,
+@@ -260,10 +252,6 @@ static struct usb_serial_driver cypress_
+ .description = "Nokia CA-42 V2 Adapter",
+ .usb_driver = &cypress_driver,
+ .id_table = id_table_nokiaca42v2,
+- .num_interrupt_in = 1,
+- .num_interrupt_out = 1,
+- .num_bulk_in = NUM_DONT_CARE,
+- .num_bulk_out = NUM_DONT_CARE,
+ .num_ports = 1,
+ .attach = cypress_ca42v2_startup,
+ .shutdown = cypress_shutdown,
+--- a/drivers/usb/serial/digi_acceleport.c
++++ b/drivers/usb/serial/digi_acceleport.c
+@@ -508,9 +508,6 @@ static struct usb_serial_driver digi_acc
+ .description = "Digi 2 port USB adapter",
+ .usb_driver = &digi_driver,
+ .id_table = id_table_2,
+- .num_interrupt_in = 0,
+- .num_bulk_in = 4,
+- .num_bulk_out = 4,
+ .num_ports = 3,
+ .open = digi_open,
+ .close = digi_close,
+@@ -538,9 +535,6 @@ static struct usb_serial_driver digi_acc
+ .description = "Digi 4 port USB adapter",
+ .usb_driver = &digi_driver,
+ .id_table = id_table_4,
+- .num_interrupt_in = 0,
+- .num_bulk_in = 5,
+- .num_bulk_out = 5,
+ .num_ports = 4,
+ .open = digi_open,
+ .close = digi_close,
+--- a/drivers/usb/serial/empeg.c
++++ b/drivers/usb/serial/empeg.c
+@@ -118,9 +118,6 @@ static struct usb_serial_driver empeg_de
+ },
+ .id_table = id_table,
+ .usb_driver = &empeg_driver,
+- .num_interrupt_in = 0,
+- .num_bulk_in = 1,
+- .num_bulk_out = 1,
+ .num_ports = 1,
+ .open = empeg_open,
+ .close = empeg_close,
+--- a/drivers/usb/serial/ftdi_sio.c
++++ b/drivers/usb/serial/ftdi_sio.c
+@@ -439,9 +439,6 @@ static struct usb_serial_driver ftdi_sio
+ .description = "FTDI USB Serial Device",
+ .usb_driver = &ftdi_driver ,
+ .id_table = id_table_combined,
+- .num_interrupt_in = 0,
+- .num_bulk_in = 1,
+- .num_bulk_out = 1,
+ .num_ports = 1,
+ .probe = ftdi_sio_probe,
+ .port_probe = ftdi_sio_port_probe,
+--- a/drivers/usb/serial/funsoft.c
++++ b/drivers/usb/serial/funsoft.c
+@@ -39,9 +39,6 @@ static struct usb_serial_driver funsoft_
+ },
+ .id_table = id_table,
+ .usb_driver = &funsoft_driver,
+- .num_interrupt_in = NUM_DONT_CARE,
+- .num_bulk_in = NUM_DONT_CARE,
+- .num_bulk_out = NUM_DONT_CARE,
+ .num_ports = 1,
+ };
+
+--- a/drivers/usb/serial/garmin_gps.c
++++ b/drivers/usb/serial/garmin_gps.c
+@@ -1579,9 +1579,6 @@ static struct usb_serial_driver garmin_d
+ .description = "Garmin GPS usb/tty",
+ .usb_driver = &garmin_driver,
+ .id_table = id_table,
+- .num_interrupt_in = 1,
+- .num_bulk_in = 1,
+- .num_bulk_out = 1,
+ .num_ports = 1,
+ .open = garmin_open,
+ .close = garmin_close,
+--- a/drivers/usb/serial/generic.c
++++ b/drivers/usb/serial/generic.c
+@@ -62,9 +62,6 @@ struct usb_serial_driver usb_serial_gene
+ },
+ .id_table = generic_device_ids,
+ .usb_driver = &generic_driver,
+- .num_interrupt_in = NUM_DONT_CARE,
+- .num_bulk_in = NUM_DONT_CARE,
+- .num_bulk_out = NUM_DONT_CARE,
+ .num_ports = 1,
+ .shutdown = usb_serial_generic_shutdown,
+ .throttle = usb_serial_generic_throttle,
+--- a/drivers/usb/serial/hp4x.c
++++ b/drivers/usb/serial/hp4x.c
+@@ -50,9 +50,6 @@ static struct usb_serial_driver hp49gp_d
+ },
+ .id_table = id_table,
+ .usb_driver = &hp49gp_driver,
+- .num_interrupt_in = NUM_DONT_CARE,
+- .num_bulk_in = NUM_DONT_CARE,
+- .num_bulk_out = NUM_DONT_CARE,
+ .num_ports = 1,
+ };
+
+--- a/drivers/usb/serial/io_ti.c
++++ b/drivers/usb/serial/io_ti.c
+@@ -3033,9 +3033,6 @@ static struct usb_serial_driver edgeport
+ .description = "Edgeport TI 1 port adapter",
+ .usb_driver = &io_driver,
+ .id_table = edgeport_1port_id_table,
+- .num_interrupt_in = 1,
+- .num_bulk_in = 1,
+- .num_bulk_out = 1,
+ .num_ports = 1,
+ .open = edge_open,
+ .close = edge_close,
+@@ -3065,9 +3062,6 @@ static struct usb_serial_driver edgeport
+ .description = "Edgeport TI 2 port adapter",
+ .usb_driver = &io_driver,
+ .id_table = edgeport_2port_id_table,
+- .num_interrupt_in = 1,
+- .num_bulk_in = 2,
+- .num_bulk_out = 2,
+ .num_ports = 2,
+ .open = edge_open,
+ .close = edge_close,
+--- a/drivers/usb/serial/ipaq.c
++++ b/drivers/usb/serial/ipaq.c
+@@ -570,9 +570,6 @@ static struct usb_serial_driver ipaq_dev
+ .description = "PocketPC PDA",
+ .usb_driver = &ipaq_driver,
+ .id_table = ipaq_id_table,
+- .num_interrupt_in = NUM_DONT_CARE,
+- .num_bulk_in = NUM_DONT_CARE,
+- .num_bulk_out = NUM_DONT_CARE,
+ .num_ports = 2,
+ .open = ipaq_open,
+ .close = ipaq_close,
+--- a/drivers/usb/serial/ipw.c
++++ b/drivers/usb/serial/ipw.c
+@@ -448,9 +448,6 @@ static struct usb_serial_driver ipw_devi
+ .description = "IPWireless converter",
+ .usb_driver = &usb_ipw_driver,
+ .id_table = usb_ipw_ids,
+- .num_interrupt_in = NUM_DONT_CARE,
+- .num_bulk_in = 1,
+- .num_bulk_out = 1,
+ .num_ports = 1,
+ .open = ipw_open,
+ .close = ipw_close,
+--- a/drivers/usb/serial/ir-usb.c
++++ b/drivers/usb/serial/ir-usb.c
+@@ -145,9 +145,6 @@ static struct usb_serial_driver ir_devic
+ .description = "IR Dongle",
+ .usb_driver = &ir_driver,
+ .id_table = id_table,
+- .num_interrupt_in = 1,
+- .num_bulk_in = 1,
+- .num_bulk_out = 1,
+ .num_ports = 1,
+ .set_termios = ir_set_termios,
+ .attach = ir_startup,
+--- a/drivers/usb/serial/iuu_phoenix.c
++++ b/drivers/usb/serial/iuu_phoenix.c
+@@ -1162,9 +1162,6 @@ static struct usb_serial_driver iuu_devi
+ .name = "iuu_phoenix",
+ },
+ .id_table = id_table,
+- .num_interrupt_in = NUM_DONT_CARE,
+- .num_bulk_in = 1,
+- .num_bulk_out = 1,
+ .num_ports = 1,
+ .open = iuu_open,
+ .close = iuu_close,
+--- a/drivers/usb/serial/keyspan_pda.c
++++ b/drivers/usb/serial/keyspan_pda.c
+@@ -793,9 +793,6 @@ static struct usb_serial_driver keyspan_
+ .description = "Keyspan PDA - (prerenumeration)",
+ .usb_driver = &keyspan_pda_driver,
+ .id_table = id_table_fake,
+- .num_interrupt_in = NUM_DONT_CARE,
+- .num_bulk_in = NUM_DONT_CARE,
+- .num_bulk_out = NUM_DONT_CARE,
+ .num_ports = 1,
+ .attach = keyspan_pda_fake_startup,
+ };
+@@ -810,9 +807,6 @@ static struct usb_serial_driver xircom_p
+ .description = "Xircom / Entregra PGS - (prerenumeration)",
+ .usb_driver = &keyspan_pda_driver,
+ .id_table = id_table_fake_xircom,
+- .num_interrupt_in = NUM_DONT_CARE,
+- .num_bulk_in = NUM_DONT_CARE,
+- .num_bulk_out = NUM_DONT_CARE,
+ .num_ports = 1,
+ .attach = keyspan_pda_fake_startup,
+ };
+@@ -826,9 +820,6 @@ static struct usb_serial_driver keyspan_
+ .description = "Keyspan PDA",
+ .usb_driver = &keyspan_pda_driver,
+ .id_table = id_table_std,
+- .num_interrupt_in = 1,
+- .num_bulk_in = 0,
+- .num_bulk_out = 1,
+ .num_ports = 1,
+ .open = keyspan_pda_open,
+ .close = keyspan_pda_close,
+--- a/drivers/usb/serial/kl5kusb105.c
++++ b/drivers/usb/serial/kl5kusb105.c
+@@ -126,9 +126,6 @@ static struct usb_serial_driver kl5kusb1
+ .description = "KL5KUSB105D / PalmConnect",
+ .usb_driver = &kl5kusb105d_driver,
+ .id_table = id_table,
+- .num_interrupt_in = 1,
+- .num_bulk_in = 1,
+- .num_bulk_out = 1,
+ .num_ports = 1,
+ .open = klsi_105_open,
+ .close = klsi_105_close,
+--- a/drivers/usb/serial/kobil_sct.c
++++ b/drivers/usb/serial/kobil_sct.c
+@@ -113,10 +113,6 @@ static struct usb_serial_driver kobil_de
+ .description = "KOBIL USB smart card terminal",
+ .usb_driver = &kobil_driver,
+ .id_table = id_table,
+- .num_interrupt_in = NUM_DONT_CARE,
+- .num_interrupt_out = NUM_DONT_CARE,
+- .num_bulk_in = 0,
+- .num_bulk_out = 0,
+ .num_ports = 1,
+ .attach = kobil_startup,
+ .shutdown = kobil_shutdown,
+--- a/drivers/usb/serial/mct_u232.c
++++ b/drivers/usb/serial/mct_u232.c
+@@ -143,9 +143,6 @@ static struct usb_serial_driver mct_u232
+ .description = "MCT U232",
+ .usb_driver = &mct_u232_driver,
+ .id_table = id_table_combined,
+- .num_interrupt_in = 2,
+- .num_bulk_in = 0,
+- .num_bulk_out = 1,
+ .num_ports = 1,
+ .open = mct_u232_open,
+ .close = mct_u232_close,
+--- a/drivers/usb/serial/mos7720.c
++++ b/drivers/usb/serial/mos7720.c
+@@ -1596,9 +1596,6 @@ static struct usb_serial_driver moschip7
+ .description = "Moschip 2 port adapter",
+ .usb_driver = &usb_driver,
+ .id_table = moschip_port_id_table,
+- .num_interrupt_in = 1,
+- .num_bulk_in = 2,
+- .num_bulk_out = 2,
+ .num_ports = 2,
+ .open = mos7720_open,
+ .close = mos7720_close,
+--- a/drivers/usb/serial/mos7840.c
++++ b/drivers/usb/serial/mos7840.c
+@@ -2800,12 +2800,7 @@ static struct usb_serial_driver moschip7
+ .description = DRIVER_DESC,
+ .usb_driver = &io_driver,
+ .id_table = moschip_port_id_table,
+- .num_interrupt_in = 1, //NUM_DONT_CARE,//1,
+-#ifdef check
+- .num_bulk_in = 4,
+- .num_bulk_out = 4,
+ .num_ports = 4,
+-#endif
+ .open = mos7840_open,
+ .close = mos7840_close,
+ .write = mos7840_write,
+--- a/drivers/usb/serial/navman.c
++++ b/drivers/usb/serial/navman.c
+@@ -121,9 +121,6 @@ static struct usb_serial_driver navman_d
+ },
+ .id_table = id_table,
+ .usb_driver = &navman_driver,
+- .num_interrupt_in = NUM_DONT_CARE,
+- .num_bulk_in = NUM_DONT_CARE,
+- .num_bulk_out = NUM_DONT_CARE,
+ .num_ports = 1,
+ .open = navman_open,
+ .close = navman_close,
+--- a/drivers/usb/serial/omninet.c
++++ b/drivers/usb/serial/omninet.c
+@@ -95,9 +95,6 @@ static struct usb_serial_driver zyxel_om
+ .description = "ZyXEL - omni.net lcd plus usb",
+ .usb_driver = &omninet_driver,
+ .id_table = id_table,
+- .num_interrupt_in = 1,
+- .num_bulk_in = 1,
+- .num_bulk_out = 2,
+ .num_ports = 1,
+ .attach = omninet_attach,
+ .open = omninet_open,
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -325,9 +325,6 @@ static struct usb_serial_driver option_1
+ .description = "GSM modem (1-port)",
+ .usb_driver = &option_driver,
+ .id_table = option_ids,
+- .num_interrupt_in = NUM_DONT_CARE,
+- .num_bulk_in = NUM_DONT_CARE,
+- .num_bulk_out = NUM_DONT_CARE,
+ .num_ports = 1,
+ .open = option_open,
+ .close = option_close,
+--- a/drivers/usb/serial/oti6858.c
++++ b/drivers/usb/serial/oti6858.c
+@@ -179,9 +179,6 @@ static struct usb_serial_driver oti6858_
+ .name = "oti6858",
+ },
+ .id_table = id_table,
+- .num_interrupt_in = 1,
+- .num_bulk_in = 1,
+- .num_bulk_out = 1,
+ .num_ports = 1,
+ .open = oti6858_open,
+ .close = oti6858_close,
+--- a/drivers/usb/serial/pl2303.c
++++ b/drivers/usb/serial/pl2303.c
+@@ -1114,9 +1114,6 @@ static struct usb_serial_driver pl2303_d
+ },
+ .id_table = id_table,
+ .usb_driver = &pl2303_driver,
+- .num_interrupt_in = NUM_DONT_CARE,
+- .num_bulk_in = 1,
+- .num_bulk_out = 1,
+ .num_ports = 1,
+ .open = pl2303_open,
+ .close = pl2303_close,
+--- a/drivers/usb/serial/safe_serial.c
++++ b/drivers/usb/serial/safe_serial.c
+@@ -394,9 +394,6 @@ static struct usb_serial_driver safe_dev
+ },
+ .id_table = id_table,
+ .usb_driver = &safe_driver,
+- .num_interrupt_in = NUM_DONT_CARE,
+- .num_bulk_in = NUM_DONT_CARE,
+- .num_bulk_out = NUM_DONT_CARE,
+ .num_ports = 1,
+ .write = safe_write,
+ .write_room = safe_write_room,
+--- a/drivers/usb/serial/sierra.c
++++ b/drivers/usb/serial/sierra.c
+@@ -745,9 +745,6 @@ static struct usb_serial_driver sierra_d
+ .description = "Sierra USB modem",
+ .id_table = id_table,
+ .usb_driver = &sierra_driver,
+- .num_interrupt_in = NUM_DONT_CARE,
+- .num_bulk_in = NUM_DONT_CARE,
+- .num_bulk_out = NUM_DONT_CARE,
+ .calc_num_ports = sierra_calc_num_ports,
+ .probe = sierra_probe,
+ .open = sierra_open,
+--- a/drivers/usb/serial/spcp8x5.c
++++ b/drivers/usb/serial/spcp8x5.c
+@@ -1022,9 +1022,6 @@ static struct usb_serial_driver spcp8x5_
+ .name = "SPCP8x5",
+ },
+ .id_table = id_table,
+- .num_interrupt_in = NUM_DONT_CARE,
+- .num_bulk_in = 1,
+- .num_bulk_out = 1,
+ .num_ports = 1,
+ .open = spcp8x5_open,
+ .close = spcp8x5_close,
+--- a/drivers/usb/serial/ti_usb_3410_5052.c
++++ b/drivers/usb/serial/ti_usb_3410_5052.c
+@@ -265,9 +265,6 @@ static struct usb_serial_driver ti_1port
+ .description = "TI USB 3410 1 port adapter",
+ .usb_driver = &ti_usb_driver,
+ .id_table = ti_id_table_3410,
+- .num_interrupt_in = NUM_DONT_CARE,
+- .num_bulk_in = NUM_DONT_CARE,
+- .num_bulk_out = 1,
+ .num_ports = 1,
+ .attach = ti_startup,
+ .shutdown = ti_shutdown,
+@@ -296,9 +293,6 @@ static struct usb_serial_driver ti_2port
+ .description = "TI USB 5052 2 port adapter",
+ .usb_driver = &ti_usb_driver,
+ .id_table = ti_id_table_5052,
+- .num_interrupt_in = 1,
+- .num_bulk_in = 2,
+- .num_bulk_out = 2,
+ .num_ports = 2,
+ .attach = ti_startup,
+ .shutdown = ti_shutdown,
+--- a/drivers/usb/serial/usb_debug.c
++++ b/drivers/usb/serial/usb_debug.c
+@@ -35,9 +35,6 @@ static struct usb_serial_driver debug_de
+ .name = "debug",
+ },
+ .id_table = id_table,
+- .num_interrupt_in = NUM_DONT_CARE,
+- .num_bulk_in = NUM_DONT_CARE,
+- .num_bulk_out = NUM_DONT_CARE,
+ .num_ports = 1,
+ };
+
+--- a/drivers/usb/serial/visor.c
++++ b/drivers/usb/serial/visor.c
+@@ -189,9 +189,6 @@ static struct usb_serial_driver handspri
+ .description = "Handspring Visor / Palm OS",
+ .usb_driver = &visor_driver,
+ .id_table = id_table,
+- .num_interrupt_in = NUM_DONT_CARE,
+- .num_bulk_in = 2,
+- .num_bulk_out = NUM_DONT_CARE,
+ .num_ports = 2,
+ .open = visor_open,
+ .close = visor_close,
+@@ -219,9 +216,6 @@ static struct usb_serial_driver clie_5_d
+ .description = "Sony Clie 5.0",
+ .usb_driver = &visor_driver,
+ .id_table = clie_id_5_table,
+- .num_interrupt_in = NUM_DONT_CARE,
+- .num_bulk_in = 2,
+- .num_bulk_out = 2,
+ .num_ports = 2,
+ .open = visor_open,
+ .close = visor_close,
+@@ -249,9 +243,6 @@ static struct usb_serial_driver clie_3_5
+ .description = "Sony Clie 3.5",
+ .usb_driver = &visor_driver,
+ .id_table = clie_id_3_5_table,
+- .num_interrupt_in = 0,
+- .num_bulk_in = 1,
+- .num_bulk_out = 1,
+ .num_ports = 1,
+ .open = visor_open,
+ .close = visor_close,
+--- a/drivers/usb/serial/whiteheat.c
++++ b/drivers/usb/serial/whiteheat.c
+@@ -164,9 +164,6 @@ static struct usb_serial_driver whitehea
+ .description = "Connect Tech - WhiteHEAT - (prerenumeration)",
+ .usb_driver = &whiteheat_driver,
+ .id_table = id_table_prerenumeration,
+- .num_interrupt_in = NUM_DONT_CARE,
+- .num_bulk_in = NUM_DONT_CARE,
+- .num_bulk_out = NUM_DONT_CARE,
+ .num_ports = 1,
+ .probe = whiteheat_firmware_download,
+ .attach = whiteheat_firmware_attach,
+@@ -180,9 +177,6 @@ static struct usb_serial_driver whitehea
+ .description = "Connect Tech - WhiteHEAT",
+ .usb_driver = &whiteheat_driver,
+ .id_table = id_table_std,
+- .num_interrupt_in = NUM_DONT_CARE,
+- .num_bulk_in = NUM_DONT_CARE,
+- .num_bulk_out = NUM_DONT_CARE,
+ .num_ports = 4,
+ .attach = whiteheat_attach,
+ .shutdown = whiteheat_shutdown,
diff --git a/usb/wusb-devices-dont-use-a-set-address.patch b/usb/wusb-devices-dont-use-a-set-address.patch
index 433b57083fba21..74bae9f2fcb85e 100644
--- a/usb/wusb-devices-dont-use-a-set-address.patch
+++ b/usb/wusb-devices-dont-use-a-set-address.patch
@@ -18,7 +18,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
-@@ -2422,26 +2422,33 @@ hub_port_init (struct usb_hub *hub, stru
+@@ -2420,26 +2420,33 @@ hub_port_init (struct usb_hub *hub, stru
#undef GET_DESCRIPTOR_BUFSIZE
}
@@ -71,7 +71,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
retval = usb_get_device_descriptor(udev, 8);
if (retval < 8) {
-@@ -2458,7 +2465,7 @@ hub_port_init (struct usb_hub *hub, stru
+@@ -2456,7 +2463,7 @@ hub_port_init (struct usb_hub *hub, stru
if (retval)
goto fail;
diff --git a/usb/wusb-make-ep0-reinit-available.patch b/usb/wusb-make-ep0-reinit-available.patch
index 4a8945b5331479..32d15b549bac90 100644
--- a/usb/wusb-make-ep0-reinit-available.patch
+++ b/usb/wusb-make-ep0-reinit-available.patch
@@ -20,7 +20,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
-@@ -2214,12 +2214,13 @@ static int hub_port_debounce(struct usb_
+@@ -2212,12 +2212,13 @@ static int hub_port_debounce(struct usb_
return portstatus;
}
@@ -35,7 +35,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
#define usb_sndaddr0pipe() (PIPE_CONTROL << 30)
#define usb_rcvaddr0pipe() ((PIPE_CONTROL << 30) | USB_DIR_IN)
-@@ -2240,7 +2241,7 @@ static int hub_set_address(struct usb_de
+@@ -2238,7 +2239,7 @@ static int hub_set_address(struct usb_de
if (retval == 0) {
udev->devnum = devnum; /* Device now using proper address */
usb_set_device_state(udev, USB_STATE_ADDRESS);
@@ -44,7 +44,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
return retval;
}
-@@ -2476,7 +2477,7 @@ hub_port_init (struct usb_hub *hub, stru
+@@ -2474,7 +2475,7 @@ hub_port_init (struct usb_hub *hub, stru
}
dev_dbg(&udev->dev, "ep0 maxpacket = %d\n", i);
udev->ep0.desc.wMaxPacketSize = cpu_to_le16(i);
@@ -53,7 +53,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
retval = usb_get_device_descriptor(udev, USB_DT_DEVICE_SIZE);
-@@ -2732,7 +2733,7 @@ static void hub_port_connect_change(stru
+@@ -2730,7 +2731,7 @@ static void hub_port_connect_change(stru
loop_disable:
hub_port_disable(hub, port1, 1);
loop:
@@ -62,7 +62,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
release_address(udev);
usb_put_dev(udev);
if ((status == -ENOTCONN) || (status == -ENOTSUPP))
-@@ -3172,7 +3173,7 @@ int usb_reset_device(struct usb_device *
+@@ -3165,7 +3166,7 @@ int usb_reset_device(struct usb_device *
/* ep0 maxpacket size may change; let the HCD know about it.
* Other endpoints will be handled by re-enumeration. */
diff --git a/usb/wusb-teach-choose-address-about-wireless-devices.patch b/usb/wusb-teach-choose-address-about-wireless-devices.patch
index 25f5b84d362c55..95fa8601a16ecf 100644
--- a/usb/wusb-teach-choose-address-about-wireless-devices.patch
+++ b/usb/wusb-teach-choose-address-about-wireless-devices.patch
@@ -67,7 +67,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (devnum < 128) {
set_bit(devnum, bus->devmap.devicemap);
udev->devnum = devnum;
-@@ -2614,6 +2635,7 @@ static void hub_port_connect_change(stru
+@@ -2612,6 +2633,7 @@ static void hub_port_connect_change(stru
udev->speed = USB_SPEED_UNKNOWN;
udev->bus_mA = hub->mA_per_port;
udev->level = hdev->level + 1;
diff --git a/usb/wusb-update-devnum.patch b/usb/wusb-update-devnum.patch
index 3baa521a4453e5..fe22bed042c739 100644
--- a/usb/wusb-update-devnum.patch
+++ b/usb/wusb-update-devnum.patch
@@ -40,7 +40,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* FALL THROUGH */
case -ENOTCONN:
case -ENODEV:
-@@ -2239,7 +2246,8 @@ static int hub_set_address(struct usb_de
+@@ -2237,7 +2244,8 @@ static int hub_set_address(struct usb_de
USB_REQ_SET_ADDRESS, 0, devnum, 0,
NULL, 0, USB_CTRL_SET_TIMEOUT);
if (retval == 0) {
@@ -50,7 +50,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
usb_set_device_state(udev, USB_STATE_ADDRESS);
usb_ep0_reinit(udev);
}
-@@ -2494,7 +2502,7 @@ hub_port_init (struct usb_hub *hub, stru
+@@ -2492,7 +2500,7 @@ hub_port_init (struct usb_hub *hub, stru
fail:
if (retval) {
hub_port_disable(hub, port1, 0);