diff options
| author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-11-30 14:54:20 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-11-30 14:54:20 -0800 |
| commit | 09785355a29fc1316655725a3c4a2638e44330b6 (patch) | |
| tree | c6a8c76e3ef485d63d92c797bdb05f4b9542573d /usb.current | |
| parent | b88a5d79af4ecc5c3f4667548c98dcc059c0edab (diff) | |
| download | patches-09785355a29fc1316655725a3c4a2638e44330b6.tar.gz | |
more bugfixes
Diffstat (limited to 'usb.current')
| -rw-r--r-- | usb.current/usb-add-support-for-mobilcom-debitel-usb-umts-surf-stick-to-option-driver.patch | 45 | ||||
| -rw-r--r-- | usb.current/usb-work-around-for-ehci-with-quirky-periodic-schedules.patch | 101 |
2 files changed, 146 insertions, 0 deletions
diff --git a/usb.current/usb-add-support-for-mobilcom-debitel-usb-umts-surf-stick-to-option-driver.patch b/usb.current/usb-add-support-for-mobilcom-debitel-usb-umts-surf-stick-to-option-driver.patch new file mode 100644 index 00000000000000..2193c1f49663a7 --- /dev/null +++ b/usb.current/usb-add-support-for-mobilcom-debitel-usb-umts-surf-stick-to-option-driver.patch @@ -0,0 +1,45 @@ +From gernot@hillier.de Mon Nov 30 14:39:47 2009 +From: Gernot Hillier <gernot@hillier.de> +Date: Fri, 27 Nov 2009 13:49:23 +0100 +Subject: USB: Add support for Mobilcom Debitel USB UMTS Surf-Stick to option driver +To: Oliver Neukum <oliver@neukum.org> +Cc: Matthias Urlichs <smurf@smurf.noris.de>, Greg Kroah-Hartman <gregkh@suse.de> +Message-ID: <4B0FCAD3.9000801@hillier.de> + +From: Gernot Hillier <gernot@hillier.de> + +This patch adds the vendor and device id for the Mobilcom Debitel UMTS surf +stick (a.k.a. 4G Systems XSStick W14, MobiData MBD-200HU, ...). + +To see these ids, you need to switch the stick to modem operation first +with the help of usb_modeswitch. This makes it switch from 1c9e:f000 to +1c9e:9603 and thus be recognized by the option driver. + +Signed-off-by: Gernot Hillier <gernot@hillier.de> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/option.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -336,6 +336,10 @@ static int option_resume(struct usb_ser + #define AIRPLUS_VENDOR_ID 0x1011 + #define AIRPLUS_PRODUCT_MCD650 0x3198 + ++/* 4G Systems products */ ++#define FOUR_G_SYSTEMS_VENDOR_ID 0x1c9e ++#define FOUR_G_SYSTEMS_PRODUCT_W14 0x9603 ++ + static struct usb_device_id option_ids[] = { + { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, + { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, +@@ -599,6 +603,7 @@ static struct usb_device_id option_ids[] + { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X060S) }, + { USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) }, + { USB_DEVICE(TLAYTECH_VENDOR_ID, TLAYTECH_PRODUCT_TEU800) }, ++ { USB_DEVICE(FOUR_G_SYSTEMS_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14) }, + { } /* Terminating entry */ + }; + MODULE_DEVICE_TABLE(usb, option_ids); diff --git a/usb.current/usb-work-around-for-ehci-with-quirky-periodic-schedules.patch b/usb.current/usb-work-around-for-ehci-with-quirky-periodic-schedules.patch new file mode 100644 index 00000000000000..9be1ebc1849c01 --- /dev/null +++ b/usb.current/usb-work-around-for-ehci-with-quirky-periodic-schedules.patch @@ -0,0 +1,101 @@ +From oliver@neukum.org Mon Nov 30 14:34:55 2009 +From: Oliver Neukum <oliver@neukum.org> +Date: Fri, 27 Nov 2009 15:17:59 +0100 +Subject: USB: work around for EHCI with quirky periodic schedules +To: "Greg Kroah-Hartman" <gregkh@suse.de>, Sarah Sharp <sarah.a.sharp@linux.intel.com>, Stephan Diestelhorst <stephan.diestelhorst@gmail.com>, Alan Stern <stern@rowland.harvard.edu> +Message-ID: <200911271517.59867.oliver@neukum.org> + + +a quirky chipset needs periodic schedules to run for a minimum +time before they can be disabled again. This enforces the requirement +with a time stamp and a calculated delay + +Signed-off-by: Oliver Neukum <oliver@neukum.org> +Cc: stable <stable@kernel.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + + +--- + drivers/usb/host/ehci-hcd.c | 2 ++ + drivers/usb/host/ehci-pci.c | 4 ++++ + drivers/usb/host/ehci-sched.c | 12 ++++++++++++ + drivers/usb/host/ehci.h | 2 ++ + 4 files changed, 20 insertions(+) + +--- a/drivers/usb/host/ehci.h ++++ b/drivers/usb/host/ehci.h +@@ -118,6 +118,7 @@ struct ehci_hcd { /* one per controlle + unsigned stamp; + unsigned random_frame; + unsigned long next_statechange; ++ ktime_t last_periodic_enable; + u32 command; + + /* SILICON QUIRKS */ +@@ -127,6 +128,7 @@ struct ehci_hcd { /* one per controlle + unsigned big_endian_desc:1; + unsigned has_amcc_usb23:1; + unsigned need_io_watchdog:1; ++ unsigned broken_periodic:1; + + /* required for usb32 quirk */ + #define OHCI_CTRL_HCFS (3 << 6) +--- a/drivers/usb/host/ehci-hcd.c ++++ b/drivers/usb/host/ehci-hcd.c +@@ -28,6 +28,7 @@ + #include <linux/errno.h> + #include <linux/init.h> + #include <linux/timer.h> ++#include <linux/ktime.h> + #include <linux/list.h> + #include <linux/interrupt.h> + #include <linux/usb.h> +@@ -676,6 +677,7 @@ static int ehci_run (struct usb_hcd *hcd + ehci_readl(ehci, &ehci->regs->command); /* unblock posted writes */ + msleep(5); + up_write(&ehci_cf_port_reset_rwsem); ++ ehci->last_periodic_enable = ktime_get_real(); + + temp = HC_VERSION(ehci_readl(ehci, &ehci->caps->hc_capbase)); + ehci_info (ehci, +--- a/drivers/usb/host/ehci-pci.c ++++ b/drivers/usb/host/ehci-pci.c +@@ -111,6 +111,10 @@ static int ehci_pci_setup(struct usb_hcd + switch (pdev->vendor) { + case PCI_VENDOR_ID_INTEL: + ehci->need_io_watchdog = 0; ++ if (pdev->device == 0x27cc) { ++ ehci->broken_periodic = 1; ++ ehci_info(ehci, "using broken periodic workaround\n"); ++ } + break; + case PCI_VENDOR_ID_TDI: + if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) { +--- a/drivers/usb/host/ehci-sched.c ++++ b/drivers/usb/host/ehci-sched.c +@@ -475,6 +475,8 @@ static int enable_periodic (struct ehci_ + /* make sure ehci_work scans these */ + ehci->next_uframe = ehci_readl(ehci, &ehci->regs->frame_index) + % (ehci->periodic_size << 3); ++ if (unlikely(ehci->broken_periodic)) ++ ehci->last_periodic_enable = ktime_get_real(); + return 0; + } + +@@ -486,6 +488,16 @@ static int disable_periodic (struct ehci + if (--ehci->periodic_sched) + return 0; + ++ if (unlikely(ehci->broken_periodic)) { ++ /* delay experimentally determined */ ++ ktime_t safe = ktime_add_us(ehci->last_periodic_enable, 1000); ++ ktime_t now = ktime_get_real(); ++ s64 delay = ktime_us_delta(safe, now); ++ ++ if (unlikely(delay > 0)) ++ udelay(delay); ++ } ++ + /* did setting PSE not take effect yet? + * takes effect only at frame boundaries... + */ |
