diff options
| author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-06-19 12:27:43 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-06-19 12:27:43 -0700 |
| commit | 504e935281de1cfb5146afdc099d426637cbe05a (patch) | |
| tree | 2c68dd63a578f38cd3fb4956f98f005556c6ac52 /usb.current | |
| parent | ba9912c485a1886beaddd08feaadcb029e61de79 (diff) | |
| download | patches-504e935281de1cfb5146afdc099d426637cbe05a.tar.gz | |
lots of usb patches added
Diffstat (limited to 'usb.current')
| -rw-r--r-- | usb.current/usb-ehci-fix-timer-regression.patch | 63 | ||||
| -rw-r--r-- | usb.current/usb-fix-cdc-acm-resume.patch | 33 | ||||
| -rw-r--r-- | usb.current/usb-ohci-record-data-toggle-after-unlink.patch | 69 |
3 files changed, 165 insertions, 0 deletions
diff --git a/usb.current/usb-ehci-fix-timer-regression.patch b/usb.current/usb-ehci-fix-timer-regression.patch new file mode 100644 index 00000000000000..eef9b458b02ca0 --- /dev/null +++ b/usb.current/usb-ehci-fix-timer-regression.patch @@ -0,0 +1,63 @@ +From david-b@pacbell.net Thu Jun 19 11:57:42 2008 +From: David Brownell <david-b@pacbell.net> +Date: Fri, 13 Jun 2008 23:56:48 -0700 +Subject: USB: ehci - fix timer regression +To: Greg KH <greg@kroah.com> +Message-ID: <200806132356.48712.david-b@pacbell.net> +Content-Disposition: inline + + +This patch fixes a regression in the EHCI driver's TIMER_IO_WATCHDOG +behavior. The patch "USB: EHCI: add separate IAA watchdog timer" changed +how that timer is handled, so that short timeouts on the remaining +timer (unfortunately, overloaded) would never be used. + +This takes a more direct approach, reorganizing the code slightly to +be explicit about only the I/O watchdog role now being overridable. +It also replaces a now-obsolete comment describing older timer behavior. + +Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> +Cc: Alan Stern <stern@rowland.harvard.edu> +Cc: Leonid <leonidv11@gmail.com> +Cc: stable <stable@kernel.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/host/ehci.h | 19 ++++++++++--------- + 1 file changed, 10 insertions(+), 9 deletions(-) + +--- a/drivers/usb/host/ehci.h ++++ b/drivers/usb/host/ehci.h +@@ -177,6 +177,15 @@ timer_action_done (struct ehci_hcd *ehci + static inline void + timer_action (struct ehci_hcd *ehci, enum ehci_timer_action action) + { ++ /* Don't override timeouts which shrink or (later) disable ++ * the async ring; just the I/O watchdog. Note that if a ++ * SHRINK were pending, OFF would never be requested. ++ */ ++ if (timer_pending(&ehci->watchdog) ++ && ((BIT(TIMER_ASYNC_SHRINK) | BIT(TIMER_ASYNC_OFF)) ++ & ehci->actions)) ++ return; ++ + if (!test_and_set_bit (action, &ehci->actions)) { + unsigned long t; + +@@ -192,15 +201,7 @@ timer_action (struct ehci_hcd *ehci, enu + t = EHCI_SHRINK_JIFFIES; + break; + } +- t += jiffies; +- // all timings except IAA watchdog can be overridden. +- // async queue SHRINK often precedes IAA. while it's ready +- // to go OFF neither can matter, and afterwards the IO +- // watchdog stops unless there's still periodic traffic. +- if (time_before_eq(t, ehci->watchdog.expires) +- && timer_pending (&ehci->watchdog)) +- return; +- mod_timer (&ehci->watchdog, t); ++ mod_timer(&ehci->watchdog, t + jiffies); + } + } + diff --git a/usb.current/usb-fix-cdc-acm-resume.patch b/usb.current/usb-fix-cdc-acm-resume.patch new file mode 100644 index 00000000000000..9bcdddde2969b8 --- /dev/null +++ b/usb.current/usb-fix-cdc-acm-resume.patch @@ -0,0 +1,33 @@ +From oliver@neukum.org Thu Jun 19 12:06:07 2008 +From: Oliver Neukum <oliver@neukum.org> +Date: Tue, 17 Jun 2008 22:30:48 +0200 +Subject: USB: fix cdc-acm resume() +To: greg kh <greg@kroah.com>, Linux USB <linux-usb@vger.kernel.org> +Message-ID: <200806172230.49447.oliver@neukum.org> +Content-Disposition: inline + + +cdc-acm has +- a memory leak in resume() +- will fail to reactivate the read code path if this is needed. +his corrects it by deleting the useless relict code. + +Signed-off-by: Oliver Neukum <oneukum@suse.de> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/class/cdc-acm.c | 3 --- + 1 file changed, 3 deletions(-) + +--- a/drivers/usb/class/cdc-acm.c ++++ b/drivers/usb/class/cdc-acm.c +@@ -1125,9 +1125,6 @@ static void stop_data_traffic(struct acm + for (i = 0; i < acm->rx_buflimit; i++) + usb_kill_urb(acm->ru[i].urb); + +- INIT_LIST_HEAD(&acm->filled_read_bufs); +- INIT_LIST_HEAD(&acm->spare_read_bufs); +- + tasklet_enable(&acm->urb_task); + + cancel_work_sync(&acm->work); diff --git a/usb.current/usb-ohci-record-data-toggle-after-unlink.patch b/usb.current/usb-ohci-record-data-toggle-after-unlink.patch new file mode 100644 index 00000000000000..3c3305c95d8aa9 --- /dev/null +++ b/usb.current/usb-ohci-record-data-toggle-after-unlink.patch @@ -0,0 +1,69 @@ +From david-b@pacbell.net Thu Jun 19 11:58:10 2008 +From: David Brownell <david-b@pacbell.net> +Date: Fri, 13 Jun 2008 23:59:54 -0700 +Subject: USB: ohci - record data toggle after unlink +To: Greg KH <greg@kroah.com> +Message-ID: <200806132359.54466.david-b@pacbell.net> +Content-Disposition: inline + + +From: David Brownell <dbrownell@users.sourceforge.net> + +This patch fixes a problem with OHCI where canceling bulk or +interrupt URBs may lose track of the right data toggle. This +seems to be a longstanding bug, possibly dating back to the +Linux 2.4 kernel, which stayed hidden because + + (a) about half the time the data toggle bit was correct; + (b) canceling such URBs is unusual; and + (c) the few drivers which cancel these URBs either + [1] do it only as part of shutting down, or + [2] have fault recovery logic, which recovers. + +For those transfer types, the toggle is normally written back +into the ED when each TD is retired. But canceling bypasses +the mechanism used to retire TDs ... so on average, half the +time the toggle bit will be invalid after cancelation. + +The fix is simple: the toggle state of any canceled TDs are +propagated back to the ED in the finish_unlinks function. + +(Issue found by leonidv11@gmail.com ...) + +Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> +Cc: Leonid <leonidv11@gmail.com> +Cc: stable <stable@kernel.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/host/ohci-q.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +--- a/drivers/usb/host/ohci-q.c ++++ b/drivers/usb/host/ohci-q.c +@@ -952,6 +952,7 @@ rescan_this: + struct urb *urb; + urb_priv_t *urb_priv; + __hc32 savebits; ++ u32 tdINFO; + + td = list_entry (entry, struct td, td_list); + urb = td->urb; +@@ -966,6 +967,17 @@ rescan_this: + savebits = *prev & ~cpu_to_hc32 (ohci, TD_MASK); + *prev = td->hwNextTD | savebits; + ++ /* If this was unlinked, the TD may not have been ++ * retired ... so manually save the data toggle. ++ * The controller ignores the value we save for ++ * control and ISO endpoints. ++ */ ++ tdINFO = hc32_to_cpup(ohci, &td->hwINFO); ++ if ((tdINFO & TD_T) == TD_T_DATA0) ++ ed->hwHeadP &= ~cpu_to_hc32(ohci, ED_C); ++ else if ((tdINFO & TD_T) == TD_T_DATA1) ++ ed->hwHeadP |= cpu_to_hc32(ohci, ED_C); ++ + /* HC may have partly processed this TD */ + td_done (ohci, urb, td); + urb_priv->td_cnt++; |
