Re: usb audio breaks ohci-pci

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

 



On Thu, 26 Jun 2014, Dennis New wrote:

> > Here's a revised patch for you to try.  This is meant to apply on top 
> > of 3.15.
> > 
> > As it turns out, when I tested this, it revealed a bug in the USB
> > audio driver.  So I'm including a work-around for that bug at the
> > start of the patch.
> 
> The bug seems to have been largely fixed with this patch!!1
> 
> Although ohci (and/or the usb audio device) does still crash, it does
> so gracefully. mplayer and lsusb, etc continue working, unlike before.
> I am still able to plug the usb device into another port, and it will
> work, using 0000:00:13.1. I no longer seem to get the "timeout: still 2
> active urbs on EP #3" messages.
> 
>   [39209.542786] ohci-pci 0000:00:13.0: HcDoneHead not written back;
> disabled
>   [39209.542796] ohci-pci 0000:00:13.0: HC died; cleaning up
>   [39209.542898] usb 2-4: USB disconnect, device number 5

That sounds like it's doing the right thing.

> /sys/kernel/debug/usb/ohci/...13.0/registers when crashed says:
> 
>   bus pci, device 0000:00:13.0
>   OHCI PCI host controller
>   ohci_hcd
>   OHCI 1.0, NO legacy support registers, rh state halted
>   control 0x283 RWC HCFS=operational CBSR=3
>   cmdstatus 0x00000 SOC=0
>   intrstatus 0x00000064 RHSC FNO SF
>   intrenable 0x00000004 SF
>   hcca frame 0x2e8d
>   fmintvl 0x27782edf FSMPS=0x2778 FI=0x2edf
>   fmremaining 0x000004c5 FR=0x04c5
>   periodicstart 0x0000
>   lsthresh 0x0628
>   hub poll timer off
>   roothub.a 02000204 POTPGT=2 NPS NDP=4(4)
>   roothub.b 00000000 PPCM=0000 DR=0000
>   roothub.status 00008000 DRWE
>   roothub.portstatus [0] 0x00000100 PPS
>   roothub.portstatus [1] 0x00000100 PPS
>   roothub.portstatus [2] 0x00000100 PPS
>   roothub.portstatus [3] 0x00030100 PESC CSC PPS
> 
> (although the hcca frame counter is stopped, the fmremaining/FR values
> are changing.)

Doesn't matter.

> echo 0000:00:13.0 >/sys/bus/pci/drivers/ohci_pci/unbind 
> 
>   [39522.284135] ohci-pci 0000:00:13.0: remove, state 1
>   [39522.284152] usb usb2: USB disconnect, device number 1
>   [39522.285706] ohci-pci 0000:00:13.0: USB bus 2 deregistered
> 
> echo 0000:00:13.0 >/sys/bus/pci/drivers/ohci_pci/bind
> 
>   [39530.642947] ohci-pci 0000:00:13.0: OHCI PCI host controller
>   [39530.643269] ohci-pci 0000:00:13.0: new USB bus registered,
> assigned bus number 2
>   [39530.643323] ohci-pci 0000:00:13.0: irq 19, io
> mem 0xc0000000
>   [other plugged-in ohci devices (i.e. 4port hub) detected]
> 
> I wonder if this unbind'ing and bind'ing should be done automatically,
> when a crash is detected?

That's a separate discussion.  To a large degree it doesn't matter,
because most hardware is designed not to crash during use.

In fact, if you wanted to, you could write a shell script that would
monitor your system, looking for one of these crashes maybe once every
few seconds.  When a crash occurred, the script could then do the 
unbind and rebind.  It doesn't need to be handled automatically in the 
kernel.

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