On Sat, 31 Jan 2004, Guennadi Liakhovetski wrote:

> Yep, babbling was also the error under 2.4, but the behaviour was
> different. The driver didn't hang, although, it was unusable after that.
> But I could at least remove and re-insert the module.

Well, we're on the path to tracking down the reason why that doesn't work 
under 2.6.

> > Here's the next diagnostic for you to try.  Edit the file
> > drivers/usb/host/uhci-hcd.c and near the beginning, where it says
> >
> > static int debug = 1;
> >
> > change the 1 to 3.  Recompile and install as usual.
> 
> Well, looks like I can just provide it as a parameter to the module - I
> didn't say, I have it compiled as a module.

Yes, that's just fine.

> > Then run your test again, and after the hang occurs, in another window
> > capture the contents of the /proc/driver/uhci/... file that corresponds to
> > your controller.
> 
> Here it is:

The output confirms what I thought.  After the camera gets its error and
gphoto2 closes the connection, the USB system tries to reinitialize the 
camera.  (It doesn't do that under 2.4, which is part of the reason for 
the difference in behavior.)  It's that reinitialization step that hangs.

> In principle, I could try the camera also with another PC, where I have a
> EHCI card. But the 1.1 controller is UHCI too, so, probably doesn't make
> much sense. Wouldn't be too easy too: it's a P133...

For the time being it's best to stick to one PC and get it working there.

There's another patch below, with more diagnostics.  Use it together with
the previous patch.  Then as before, have usb debugging configured on,
install the uhci-hcd module with debug=3 and run your test.  Post the
debugging log output and the /proc/driver/uhci/... file after the hang.

Alan Stern


--- 2.6/drivers/usb/host/uhci-debug.c.orig      Tue Jan 20 11:27:40 2004
+++ 2.6/drivers/usb/host/uhci-debug.c   Sat Jan 31 11:54:19 2004
@@ -470,6 +470,8 @@
                        if (qh->element != cpu_to_le32(uhci->term_td->dma_handle))
                                out += sprintf(out, "    skel_term_qh element is not 
set to term_td!\n");
 
+                       if (uhci->term_td->status & cpu_to_le32(TD_CTRL_IOC))
+                               out += sprintf(out, "    next_interrupt is on\n");
                        continue;
                }
 
--- 2.6/drivers/usb/host/uhci-hcd.c.orig        Sun Jan 25 12:26:19 2004
+++ 2.6/drivers/usb/host/uhci-hcd.c     Sat Jan 31 12:04:50 2004
@@ -116,6 +116,7 @@
 
        spin_lock_irqsave(&uhci->frame_list_lock, flags);
        uhci->term_td->status |= cpu_to_le32(TD_CTRL_IOC); 
+       printk(KERN_DEBUG "set_next_interrupt\n");
        spin_unlock_irqrestore(&uhci->frame_list_lock, flags);
 }
 
@@ -1904,6 +1905,7 @@
 
                urbp->status = urb->status = -ECONNRESET;
 
+               printk(KERN_DEBUG "%lx: remove_list del %p\n", uhci->io_addr, urb);
                uhci_add_complete(uhci, urb);
        }
        spin_unlock_irqrestore(&uhci->urb_remove_list_lock, flags);
@@ -1924,6 +1926,7 @@
        if (!status)    /* shared interrupt, not mine */
                return;
        outw(status, io_addr + USBSTS);         /* Clear it */
+       printk(KERN_DEBUG "%x: irq status %x\n", io_addr, status);
 
        if (status & ~(USBSTS_USBINT | USBSTS_ERROR | USBSTS_RD)) {
                if (status & USBSTS_HSE)



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to