Am 16.05.2017 um 16:20 schrieb Alan Stern: > You've got a BIOS developer in the same building? That's a great > resource! Maybe together you can find out what condition is causing > the BIOS to initiate a reboot. We got everything here. We got hardware developers for our mainboards and systems, BIOS developers, QA engineeers, product management and a factory to build servers and PCs. The only site in Europe that is still developing and producing PCs and servers. > For example, exactly what does "Power-On via USB" in the BIOS do? BIOS is waiting for a "resume" in that case. If a resume on USB is there, machine starts. We have special keyboards with a power on button and the trick is that this button issues a "resume" even if the keyboard itself is not programmed to send resumes. > I didn't expect the patch to solve the problem. Nevertheless, I would > like to know exactly what effect it has on both kernels. Can you > provide more details? > >> Next thing I tried was the unbind approach. Since ehci and ohci were >> compiled into the kernel I tried to unbind every USB device I found >> under /sys/bus/usb/drivers/, but even with everything gone there the >> machine doesn't shutdown at the end. > > You should have unbound the controllers, not the devices. That is, you > should have unbound PCI devices 0000:00:12.0 and 0000:00:13.0 from > ohci-pci (in /sys/bus/pci/drivers/ohci_pci), and 0000:00:12.2 and > 0000:00:13.2 from ehci-pci (in /sys/bus/pci/drivers/ehci_pci). > >> Next approach was that I changed the kernel config so that ehci and ohci >> are modules instead of being compiled into the kernel. Then I booted the >> "bad" kernel and did >> >> rmmod ehci-pci >> rmmod ehci-hcd > > That works too. > >> The keyboard/mouse still continued to work on my system (which btw is > > Are they connected over USB? If they are, removing ehci-pci won't make > any difference. But without ohci-pci, they won't work -- unless they > are plugged into a USB-3 port. > >> running Ubuntu 16.04 for this tests). But now its getting strange: >> >> - if I shutdown the system at this point with "init 0" from a root shell >> it performs a shutdown, and it turns off! Yeah. >> >> - if I shutdown the system at this point by using the shutdown menu from >> the Ubuntu menu then the shutdown ends up in a kernel panic. > > Don't you get any information about the panic on your serial console? > I would expect it to have a stack dump, at least. A panic means > there's a bug, and it needs to be fixed. > >> Both results are reproducible. "init 0" shuts the system down and keeps >> it off, shutdown form menu crashes. >> >> Since keyboard/mouse are still functional without the ehci stuff I tried >> to blacklist them by putting a blacklist-ehci.conf file into >> /etc/modprobe.d/ that had 2 lines: >> blacklist ehci_pci >> blacklist ehci_hcd >> >> I also rebuild the initrd image, but I really couldn't get rid of those >> modules, after every new start lsmod still showed the ehci modules >> despite the blacklist entries. > > You probably have to tell the program that creates the initrd image to > blacklist them or leave them out entirely. I don't know how to do this > for Ubuntu. > >> Next step was disabling ehci support in the kernel config. Rebuilding >> everything and now I have a bad kernel without ehci support that boots >> up, is able to handle keyboard and mouse and I shutdown the system (even >> from the menu) its shuts down and keeps off. So now it seems to behave >> like the "good" kernel. > > Therefore it appears that the problem is somehow caused by the > operation of shutting down the EHCI controller. Perhaps it interrupts > the connections to the OHCI controller briefly, in a way that leads the > BIOS to believe that a "Power-On via USB" event has occurred. > >> So at least we would have a workaround, but I would really prefer that I >> can blacklist those modules because then our partner could build his own >> kernel for the thin client system in the usual way and a "workaround" >> could be disabling the ehci stuff from loading. > > Another possibility is to unbind ehci-pci just before shutting down, > for example as part of a shutdown script. > >> Makes me really wonder if something is wrong with the ehci part of the >> hardware on that machine. Well, we also shipped one system to AMD for >> further analysis, maybe they can explain this strange behaviour. >> >> Thanks a lot for your input, it was really helpful. > > Let me know what you find out. > > Alan Stern > -- Dipl.-Inf. (FH) Rainer Koenig Project Manager Linux Clients FJ EMEIA PR PSO PM&D CCD ENG SW OSS&C Fujitsu Technology Solutions Bürgermeister-Ullrich-Str. 100 86199 Augsburg Germany Telephone: +49-821-804-3321 Telefax: +49-821-804-2131 Mail: mailto:Rainer.Koenig@xxxxxxxxxxxxxx Internet ts.fujtsu.com Company Details ts.fujitsu.com/imprint.html -- 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