Re: ohci-pci controller won't resume and HC died; cleaning up - only on shutdown/reboot

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

 



On Sun, 7 Aug 2016, ican realizeum wrote:

> > This doesn't seem like anything you need to worry about.  If it only
> > happens on shutdown or reboot then it won't affect your use of the
> > computer.
> Cool!
> So, apparently something(?) is turning off something(as in power
> off/suspend?), so that the poweroff functionality from kernel is
> currently unable to flush drive cache or put drive into standby mode
> during the poweroff which it needs to do.

I don't know anything about that.

>  So whatever that is, is
> probably the one that's doing this "HC died" thing too. So I don't
> think I should worry, as you said anyways.

_Something_ is trying to start up your OHCI controllers at shutdown 
time.  I don't know what or why, but it isn't working.  Since you don't 
have any devices connected to those controllers, the failure doesn't 
hurt anything.

> > Furthermore, the lsusb output says you don't have any USB devices
> > plugged into either of the OHCI controllers.  Have you tried seeing
> > what happens if there is something plugged in (say, a keyboard or
> > mouse)?
> I haven't.
> I occasionally plug in a USB stick which seems to work fine, so far.
> >
> > Also, what do you get in the "registers" files under
> > /sys/kernel/debug/usb/ohci/*/ after you change the runtime PM setting
> > to "on"?  (You'll need to mount a debugfs filesystem for this.)
> When 'auto':
> # cat /sys/kernel/debug/usb/ohci/*/registers
> bus pci, device 0000:00:12.0
> OHCI PCI host controller
> ohci_hcd
> SUSPENDED (no register access)
> bus pci, device 0000:00:13.0
> OHCI PCI host controller
> ohci_hcd
> SUSPENDED (no register access)
> ----------
> When 'on':
> # cat /sys/kernel/debug/usb/ohci/*/registers
> bus pci, device 0000:00:12.0
> OHCI PCI host controller
> ohci_hcd
> OHCI 1.0, NO legacy support registers, rh state suspended
> control 0x6c3 RWE RWC HCFS=suspend CBSR=3
> cmdstatus 0x00000 SOC=0
> intrstatus 0x00000004 SF
> intrenable 0x8000005a MIE RHSC UE RD WDH
> hcca frame 0x00ae
> fmintvl 0x27782edf FSMPS=0x2778 FI=0x2edf
> fmremaining 0x00000c5c FR=0x0c5c
> periodicstart 0x2a2f
> lsthresh 0x0628
> hub poll timer off
> roothub.a 02000205 POTPGT=2 NPS NDP=5(5)
> 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] 0x00000100 PPS
> roothub.portstatus [4] 0x00000100 PPS
> bus pci, device 0000:00:13.0
> OHCI PCI host controller
> ohci_hcd
> OHCI 1.0, NO legacy support registers, rh state suspended
> control 0x6c3 RWE RWC HCFS=suspend CBSR=3
> cmdstatus 0x00000 SOC=0
> intrstatus 0x00000004 SF
> intrenable 0x8000005a MIE RHSC UE RD WDH
> hcca frame 0x00bb
> fmintvl 0xa7782edf FIT FSMPS=0xa778 FI=0x2edf
> fmremaining 0x800012ff FRT FR=0x12ff
> periodicstart 0x2a2f
> lsthresh 0x0628
> hub poll timer off
> roothub.a 02000205 POTPGT=2 NPS NDP=5(5)
> 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] 0x00000100 PPS
> roothub.portstatus [4] 0x00000100 PPS

Ah, yes.  The ohci-hcd driver puts its controllers into suspend even if 
runtime PM isn't enabled.  That's a holdover from before Linux's 
runtime PM was written.  I suppose it's not needed any more, but 
keeping it doesn't hurt -- and it explains why those errors continue to 
show up even after you write "on" to power/control.

> Thanks Alan!
> 
> I have worked around the shutdown issue that was preventing my SSD
> from gracefully shutdown and this USB issue seems to not affect me
> anyways.
> (details here btw: https://bugzilla.kernel.org/show_bug.cgi?id=151631 )
> 
> Thanks and sorry for the spam. But if I can do anything to help with
> testing patches or anything regarding usb issue(s) I'd be happy to.

If you're curious to see what is causing the controllers to resume, you
could add a "dump_stack();" line to drivers/usb/host/ohci-hub.c in the
ohci_rh_resume() routine immediately after the line that says:

                ohci_err (ohci, "controller won't resume\n");

You should set power/control to "on" when testing this.

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