>>>>> On Fri, 05 Mar 2004 20:55:01 -0800, David Brownell <[EMAIL PROTECTED]> said:

  >> Does this sound plausible?

  David.B> Parts of it.  There's definite recent nastiness.  Of the
  David.B> type that other eyes sometimes see better.

Here is patch #3.  It also Works For Me.  I was wondering whether it
it is really safe to mess with the OHCI control registers the way
ed_deschedule() does at a time the OHCI is running.  To test this
theory, I delayed the ed_deschedule() handling to finish_unlinks(), as
shown in the patch below.  I don't know whether this is really safe as
far as the host's lists are concerned, but it does avoid the crashes.

What's the argument as to why it's safe to update the OHCI control
registers in ed_deschedule() at the time start_ed_unlink() is running?

        --david

===== drivers/usb/host/ohci-q.c 1.48 vs edited =====
--- 1.48/drivers/usb/host/ohci-q.c      Tue Mar  2 05:52:46 2004
+++ edited/drivers/usb/host/ohci-q.c    Sat Mar  6 01:09:16 2004
@@ -274,7 +274,10 @@
  */
 static void ed_deschedule (struct ohci_hcd *ohci, struct ed *ed) 
 {
+#if 0
        ed->hwINFO |= ED_SKIP;
+       wmb();
+#endif
 
        switch (ed->type) {
        case PIPE_CONTROL:
@@ -431,7 +434,12 @@
 {    
        ed->hwINFO |= ED_DEQUEUE;
        ed->state = ED_UNLINK;
+#if 0
        ed_deschedule (ohci, ed);
+#else
+       ed->hwINFO |= ED_SKIP;
+       wmb();
+#endif
 
        /* SF interrupt might get delayed; record the frame counter value that
         * indicates when the HC isn't looking at it, so concurrent unlinks
@@ -896,6 +904,11 @@
                                last = &ed->ed_next;
                                continue;
                        }
+
+#if 0
+#else
+                       ed_deschedule (ohci, ed);
+#endif
 
                        if (!list_empty (&ed->td_list)) {
                                struct td       *td;



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to