Re: FTDI-SIO hang on ftdi_close()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 19 Dec 2010 david.schueler@xxxxxxxxxxxxxxxxxxx wrote:

> Ok. Alan, please would you add your patches as attachment? If i copy and
> paste the patches then the patches will not work because the tabulator
> spaces will not match. I have to edit every file manually and if the
> patches get more complex then editing can be more time consuming than
> searching for the error ;-)

Sure.  Provided you, in return, attach your logs instead of putting 
them directly in the email message and causing the lines to wrap.

> Back to topic:
> Here's the output while the program is run and hung.
> 
> [  348.725763] ohci_hcd 0000:00:02.0: Add ed ffff88000581f0a0 (3:1in) tail
> (null)
> [  348.905835] ohci_hcd 0000:00:02.0: Add ed ffff88000581f0f0 (3:2out) tail
> ffff88000581f0a0
> [  348.906743] ohci_hcd 0000:00:02.0: Del ed ffff88000581f0f0 prev
> ffff88000581f0a0 next (null)
...
> [  352.005888] ohci_hcd 0000:00:02.0: Del ed ffff88000581f0a0 prev (null)
> next (null)

Not much useful information there, unfortunately.  Maybe you didn't go
back far enough in the log messages; I can't tell

Attached is a third patch, to be applied along with the other two.  
This time, collect a usbmon trace while running the test.  Maybe 
comparing the usbmon output with the dmesg output will help.

And also, check out the "async" file in the ohci-hcd debugging 
directory after the program hangs.  Perhaps something will be there.

Alan Stern
Index: usb-2.6/drivers/usb/host/ohci-hcd.c
===================================================================
--- usb-2.6.orig/drivers/usb/host/ohci-hcd.c
+++ usb-2.6/drivers/usb/host/ohci-hcd.c
@@ -224,6 +224,9 @@ static int ohci_urb_enqueue (
 	if (retval)
 		goto fail;
 
+	if (ed->type == PIPE_BULK)
+		ohci_info(ohci, "Enq urb %p ed %p\n", urb, ed);
+
 	/* schedule the ed if needed */
 	if (ed->state == ED_IDLE) {
 		retval = ed_schedule (ohci, ed);
@@ -290,6 +293,8 @@ static int ohci_urb_dequeue(struct usb_h
 		 */
 		urb_priv = urb->hcpriv;
 		if (urb_priv) {
+	if (urb_priv->ed->type == PIPE_BULK)
+		ohci_info(ohci, "Deq urb %p ed %p\n", urb, urb_priv->ed);
 			if (urb_priv->ed->state == ED_OPER)
 				start_ed_unlink (ohci, urb_priv->ed);
 		}
Index: usb-2.6/drivers/usb/host/ohci-q.c
===================================================================
--- usb-2.6.orig/drivers/usb/host/ohci-q.c
+++ usb-2.6/drivers/usb/host/ohci-q.c
@@ -42,6 +42,13 @@ __releases(ohci->lock)
 __acquires(ohci->lock)
 {
 	// ASSERT (urb->hcpriv != 0);
+	{
+		urb_priv_t *urb_priv = urb->hcpriv;
+		struct ed *ed  = urb_priv->ed;
+
+		if (ed && ed->type == PIPE_BULK)
+			ohci_info(ohci, "Giv urb %p ed %p\n", urb, ed);
+	}
 
 	urb_free_priv (ohci, urb->hcpriv);
 	if (likely(status == -EINPROGRESS))

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux