|
@@ -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++;
|