Tom Goetz
2012-Mar-13 14:54 UTC
Re: Lose XHCI Device on Ivybridge While Resuming on Battery
> I have more information on this. Here''s the sequence of events: > > 1. XHCI driver removed with SUSPEND_MODULES > 2. suspend > 3. resume > 4. XHCI driver loaded by SUSPEND_MODULES > 5. Device is enabled by driver. > 6. Device disabled by runtime PM. > 7. Plugging in a USB device does not result in the device being enabled. > > This works on the same machine in Ubuntu 12.04 Beta 1 (Linux 3.2.0) native > which is very similar to our Ubuntu 12.04 based (Linux 3.2.5 & 3.2.9) build. So > either this was broken between 3.2.0 and 3.2.5 or this is Xen related. I''ve > included some tracing of resume and runtime pm suspend of the device. A USB > flash stick was plugged in at the end of the log where nothing happens: >Another update. This is an issue both on a Ivybridge laptop and a Intel SDP desktop. It does not require running on battery. Setting the device''s runtime power mode to "auto" and letting the device suspend after a S3 resume results in a device that will not wake up on device insertion. I''ve attached a trace from the good case of the path that doesn''t happen in the bad case. I''ve instrumented down to xhci_msi_irq and it is not happening when a USB device is inserted in the bad case. [ 612.701424] usb_hcd_resume_root_hub[2079] xHCI Host Controller [ 612.701431] ------------[ cut here ]------------ [ 612.701444] WARNING: at /home/likewise-open/ORC/tgoetz/sandbox/orc-precise/linux-3.2/drivers/usb/core/hcd.c:2080 usb_hcd_resume_root_hub+0x4f/0xa0() [ 612.701454] Modules linked in: e1000e iwlwifi(O) mac80211(O) cfg80211(O) xhci_hcd tpm_tis tpm_infineon tpm tpm_bios ehci_hcd xt_mac xt_tcpudp ipt_MASQUERADE xt_state xt_multiport iptable_filter iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 ip_tables x_tables iscsi_scst(O) scst_vdisk(O) crc32c libcrc32c scst_cdrom(O) scst(O) bridge stp llc microcode iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi snd_hda_codec_hdmi snd_hda_codec_idt arc4 snd_hda_intel snd_hda_codec snd_hwdep snd_pcm hp_wmi sparse_keymap snd_timer ppdev parport_pc psmouse snd soundcore serio_raw snd_page_alloc parport zram(C) ahci libahci sdhci_pci sdhci i915 drm_kms_helper drm i2c_algo_bit video intel_agp intel_gtt [last unloaded: tpm_bios] [ 612.701557] Pid: 0, comm: swapper/0 Tainted: G WC O 3.2.9-orc #28 [ 612.701559] Call Trace: [ 612.701560] <IRQ> [<ffffffff810633df>] warn_slowpath_common+0x7f/0xc0 [ 612.701566] [<ffffffff8106343a>] warn_slowpath_null+0x1a/0x20 [ 612.701569] [<ffffffff8141933f>]usb_hcd_resume_root_hub+0x4f/0xa0 [ 612.701573] [<ffffffffa049a52a>] xhci_irq+0xb0a/0x11c0 [xhci_hcd] [ 612.701576] [<ffffffff8104b853>] ? __wake_up+0x53/0x70 [ 612.701579] [<ffffffff8100a58d>] ? xen_force_evtchn_callback+0xd/0x10 [ 612.701582] [<ffffffff8100ad42>] ? check_events+0x12/0x20 [ 612.701585] [<ffffffffa049ac11>]xhci_msi_irq+0x31/0x40 [xhci_hcd] [ 612.701589] [<ffffffff810d0b15>] handle_irq_event_percpu+0x55/0x220 [ 612.701592] [<ffffffff812b651b>] ? radix_tree_lookup+0xb/0x10 [ 612.701595] [<ffffffff810d0d2e>] handle_irq_event+0x4e/0x80 [ 612.701598] [<ffffffff810d3d24>] handle_edge_irq+0x84/0x130 [ 612.701602] [<ffffffff813415d9>] __xen_evtchn_do_upcall+0x199/0x250 [ 612.701605] [<ffffffff8134362f>] xen_evtchn_do_upcall+0x2f/0x50 [ 612.701608] [<ffffffff81581efe>] xen_do_hypervisor_callback+0x1e/0x30 [ 612.701609] <EOI> [<ffffffff810013aa>] ? hypercall_page+0x3aa/0x1000 [ 612.701615] [<ffffffff810013aa>] ? hypercall_page+0x3aa/0x1000 [ 612.701618] [<ffffffff8100a4c0>] ? xen_safe_halt+0x10/0x20 [ 612.701621] [<ffffffff8101c653>] ? default_idle+0x53/0x1d0 [ 612.701624] [<ffffffff81013236>] ? cpu_idle+0xd6/0x120 [ 612.701628] [<ffffffff81552f6e>] ? rest_init+0x72/0x74 [ 612.701633] [<ffffffff81accbff>] ? start_kernel+0x3b5/0x3c2 [ 612.701636] [<ffffffff81acc34b>] ? x86_64_start_reservations+0x136/0x13a [ 612.701639] [<ffffffff81acfecc>] ? xen_start_kernel+0x630/0x637 [ 612.701641] ---[ end trace 81e0ca5cff766fb7 ]--- [ 612.701659] hcd_resume_work[2060] xHCI Host Controller [ 612.701662] __pm_runtime_resume[880] usb3 RPM_GET_PUT 1 [ 612.701663] rpm_resume[512] usb3 before