From fe28750ae5a5a71621fe8a23d188d9f2ea3eae43 Mon Sep 17 00:00:00 2001 From: juhosg Date: Thu, 31 Jan 2008 14:51:16 +0000 Subject: [adm5120] add 2.6.24 specific patchset for the usb driver git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10338 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../913-usb_avoid_donelist_after_an_error.patch | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 target/linux/adm5120/patches-2.6.24/913-usb_avoid_donelist_after_an_error.patch (limited to 'target/linux/adm5120/patches-2.6.24/913-usb_avoid_donelist_after_an_error.patch') diff --git a/target/linux/adm5120/patches-2.6.24/913-usb_avoid_donelist_after_an_error.patch b/target/linux/adm5120/patches-2.6.24/913-usb_avoid_donelist_after_an_error.patch new file mode 100644 index 000000000..c6d7d6008 --- /dev/null +++ b/target/linux/adm5120/patches-2.6.24/913-usb_avoid_donelist_after_an_error.patch @@ -0,0 +1,62 @@ +Index: linux-2.6.24/drivers/usb/host/adm5120-q.c +=================================================================== +--- linux-2.6.24.orig/drivers/usb/host/adm5120-q.c ++++ linux-2.6.24/drivers/usb/host/adm5120-q.c +@@ -641,10 +641,11 @@ static int td_done(struct admhcd *ahcd, + + /*-------------------------------------------------------------------------*/ + +-static inline struct td * ++static inline void + ed_halted(struct admhcd *ahcd, struct td *td, int cc, struct td *rev) + { + struct urb *urb = td->urb; ++ struct urb_priv *urb_priv = urb->hcpriv; + struct ed *ed = td->ed; + struct list_head *tmp = td->td_list.next; + __hc32 toggle = ed->hwHeadP & cpu_to_hc32(ahcd, ED_C); +@@ -657,13 +658,12 @@ ed_halted(struct admhcd *ahcd, struct td + wmb(); + ed->hwHeadP &= ~cpu_to_hc32(ahcd, ED_H); + +- /* put any later tds from this urb onto the donelist, after 'td', +- * order won't matter here: no errors, and nothing was transferred. +- * also patch the ed so it looks as if those tds completed normally. ++ /* Get rid of all later tds from this urb. We don't have ++ * to be careful: no errors and nothing was transferred. ++ * Also patch the ed so it looks as if those tds completed normally. + */ + while (tmp != &ed->td_list) { + struct td *next; +- __hc32 info; + + next = list_entry(tmp, struct td, td_list); + tmp = next->td_list.next; +@@ -678,16 +678,8 @@ ed_halted(struct admhcd *ahcd, struct td + * then we need to leave the control STATUS packet queued + * and clear ED_SKIP. + */ +- info = next->hwINFO; +-#if 0 /* FIXME */ +- info |= cpu_to_hc32(ahcd, TD_DONE); +-#endif +- info &= ~cpu_to_hc32(ahcd, TD_CC); +- next->hwINFO = info; +- +- next->next_dl_td = rev; +- rev = next; +- ++ list_del(&next->td_list); ++ urb_priv->td_cnt++; + ed->hwHeadP = next->hwNextTD | toggle; + } + +@@ -713,8 +705,6 @@ ed_halted(struct admhcd *ahcd, struct td + hc32_to_cpu(ahcd, td->hwINFO), + cc, cc_to_error [cc]); + } +- +- return rev; + } + + /*-------------------------------------------------------------------------*/ -- cgit v1.2.3