Re: Callback not called on bulk out transfer with usbfs

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

 



On Tue, 26 Jun 2012, Austin Schuh wrote:

> diff --git a/ehci-hcd.c b/ehci-hcd.c
> index 53ab0fb..71bbf2e 100644
> --- a/ehci-hcd.c
> +++ b/ehci-hcd.c
> @@ -483,6 +483,7 @@ static void ehci_port_power (struct ehci_hcd
> *ehci, int is_on)
>  static void ehci_work (struct ehci_hcd *ehci)
>  {
>         timer_action_done (ehci, TIMER_IO_WATCHDOG);
> +       ehci_dbg(ehci, "ehci_work\n");
> 
>         /* another CPU may drop ehci->lock during a schedule scan while
>          * it reports urb completions.  this flag guards against bogus
> @@ -781,7 +782,7 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
>         spin_lock (&ehci->lock);
> 
>         status = ehci_readl(ehci, &ehci->regs->status);
> -       ehci_info(ehci, "IRQ: status %x cmd %x\n", status,
> +       ehci_info(ehci, "ehci_irq: IRQ: status %x cmd %x\n", status,
>                   ehci_readl(ehci, &ehci->regs->command));
> 
> 
> diff --git a/ehci-q.c b/ehci-q.c
> index 11e7e04..c6d5de5 100644
> --- a/ehci-q.c
> +++ b/ehci-q.c
> @@ -1249,6 +1249,7 @@ static void scan_async (struct ehci_hcd *ehci)
>         bool                    stopped;
>         struct ehci_qh          *qh;
>         enum ehci_timer_action  action = TIMER_IO_WATCHDOG;
> +       ehci_dbg(ehci, "scan_async\n");
> 
>         ehci->stamp = ehci_readl(ehci, &ehci->regs->frame_index);
>         timer_action_done (ehci, TIMER_ASYNC_SHRINK);
> @@ -1256,8 +1257,12 @@ rescan:
>         stopped = !HC_IS_RUNNING(ehci_to_hcd(ehci)->state);
>         qh = ehci->async->qh_next.qh;
>         if (likely (qh != NULL)) {
> +               ehci_dbg(ehci, "scan_async: qh!=NULL\n");
>                 do {
>                         /* clean any finished work for this qh */
> +                       ehci_dbg(ehci, "scan_async: !empty=%d
> stopped=%d stamp=%d\n",
> +                                       !list_empty(&qh->qtd_list),
> stopped, qh->stamp != ehci->stamp);
> +
>                         if (!list_empty(&qh->qtd_list) && (stopped ||
>                                         qh->stamp != ehci->stamp)) {
>                                 int temp;
> 
> [  501.743705] usb 1-4: usbdev_do_ioctl: SUBMITURB
> [  501.743712] usb 1-4: userurb 00007f001a2133d0, ep2 bulk-out, length 12
> [  501.743715] data: 0c 00 00 00 01 00 16 91 25 00 00 00
>                                                ........%...
> [  501.743763] ehci_hcd 0000:00:1a.7: ehci_irq: IRQ: status c009 cmd 10021
> [  501.743767] ehci_hcd 0000:00:1a.7: ehci_work
> [  501.743769] ehci_hcd 0000:00:1a.7: scan_async
> [  501.743772] ehci_hcd 0000:00:1a.7: scan_async: qh!=NULL
> [  501.743775] ehci_hcd 0000:00:1a.7: scan_async: !empty=1 stopped=0 stamp=0
> 
> From looking at the rest of the traces, it looks like stamp should be 1.

Aha!  Yes, that whole stamp thing was removed in the 3.1 kernel by 
commit 004c19682884d4f4 (USB: EHCI: go back to using the system clock 
for QH unlinks).

You could upgrade your kernel or back-port that commit to the kernel 
you're using.  It should fix the problem.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

  Powered by Linux