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

Re: [Xen-devel] xHCI not waking up from D3 after S3 Resume on Ivybridge



On Mar 19, 2012, at 9:32 AM, Tom Goetz wrote:

> 
> On Mar 17, 2012, at 1:50 PM, Konrad Rzeszutek Wilk wrote:
> 
>>>>>> 
>>>>>> Does the xHCI host work fine without Xen?  I.e. running Linux directly
>>>>>> as the host OS, suspending, resuming, and then plugging in a device?
>>>>> 
>>>>> It works in Ubuntu 12.04 Beta 1 with Linux 3.2.0. So it's either broken 
>>>>> between 3.2.0 and 3.2.5 or it's broken in Xen. I haven't made a direct 
>>>>> comparison yet. I'm putting Ubuntu on my SDP now to test that.
>>>> 
>>>> xHCI wakes up from D3 on the SDP with Ubuntu 12.04 Beta 1 and 3.2.11. This 
>>>> fails with the same 3.2.11 kernel and Xen. So the problem is Xen related.
>> 
>> 
>>> 
>>> Another update.
>>> 
>>> On the Ivybridge laptop, xHCI is not waking up because when I plug a device 
>>> into a xHCI port the ACPI wakeup events are going to the e1000e. Pre S3, it 
>>> eventually gets a interrupt from the device that wakes it up. Post S3 it 
>>> never gets an interrupt from the device.
>> 
>> So these are all MSI related issues right.
> 
> Maybe.
> 
>> The e1000e is also MSI?
> 
> Yes. The e1000e getting the xHCI's wake ups is only on one machine. I assume 
> thats a BIOS bug. The broad based issue is that on two manufacturers 
> Ivybridge plus an Intel SDP Ivybridge, xHCI will not wake up from D3 when a 
> USB device is plugged in.


I've just found that if the xHCI is in D3, has a USB device plugged in, and is 
not waking up, it will wake up when another device in D3 wakes up. Here's the 
steps I followed:

1. S3 suspend
2. S3 Resume
3. set xHCI power policy to "auto"
4. xHCI goes into D3
5. Plug USB device into xHCI
6. xHCI does not wake up
7. set e1000e power policy to "auto"
8. Unplug ethernet cable
9. e100e goes into D3
10. Plug in ethernet cable
11. Both e1000e and xHCI wake up.

In this case, xHCI wakes from a ACPI event. Trace below:

Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.029015] 
pci_acpi_wake_dev[48] 0000:00:1d.0
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.029019] 
pci_acpi_wake_dev[53] 0000:00:1d.0
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.029027] rpm_resume[512] 
0000:00:1d.0 before
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.029031] 
pci_acpi_wake_dev[48] 0000:00:1a.0
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.029033] 
pci_acpi_wake_dev[53] 0000:00:1a.0
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.029039] rpm_resume[512] 
0000:00:1a.0 before
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.029042] 
pci_acpi_wake_dev[48] 0000:00:1b.0
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.029044] 
pci_acpi_wake_dev[53] 0000:00:1b.0
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.029049] rpm_resume[512] 
0000:00:1b.0 before
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.029052] 
pci_acpi_wake_dev[48] 0000:00:19.0
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.029054] 
pci_acpi_wake_dev[53] 0000:00:19.0
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.029063] rpm_resume[512] 
0000:00:19.0 before
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.029066] 
pci_pm_runtime_resume[1047] 0000:00:19.0 before
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.045804] e1000e 
0000:00:19.0: BAR 0: set to [mem 0xb0600000-0xb061ffff] (PCI address 
[0xb0600000-0xb061ffff])
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.045815] e1000e 
0000:00:19.0: BAR 1: set to [mem 0xb0650000-0xb0650fff] (PCI address 
[0xb0650000-0xb0650fff])
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.045824] e1000e 
0000:00:19.0: BAR 2: set to [io  0x3080-0x309f] (PCI address [0x3080-0x309f])
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.045854] e1000e 
0000:00:19.0: restoring config space at offset 0xf (was 0x100, writing 0x105)
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.045899] e1000e 
0000:00:19.0: restoring config space at offset 0x1 (was 0x100000, writing 
0x100007)
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.045931] 
acpi_dev_run_wake[293]
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.045939] 
acpi_pci_run_wake[340] 0000:00:19.0 acpi_dev_run_wake
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.045948] e1000e 
0000:00:19.0: PME# disabled polled 0
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.045951] 
pci_pm_runtime_resume[1055] 0000:00:19.0 after
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.046022] 
pci_enable_msi_block[699] 0000:00:19.0
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.046039] 
pci_enable_msi_block[703] 0000:00:19.0
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.046044] 
pci_enable_msi_block[709] 0000:00:19.0
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.046059] 
pci_enable_msi_block[716] 0000:00:19.0
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.046061] 
pci_enable_msi_block[724] 0000:00:19.0
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.046118] 
xen_bind_pirq_msi_to_irq[737] irq 303
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.046143] 
bind_evtchn_to_cpu[304] evtchn 38 cpu 0
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.046145] __startup_pirq[564] 
irq 303 ec 38
Mar 19 15:42:25 2012-Client-Platform kernel: [ 8648.046149] 
bind_evtchn_to_cpu[304] evtchn 38 cpu 0
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.206492] rpm_idle[206] 
0000:00:19.0 before
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.206496] 
__pm_runtime_idle[812] pci0000:00 RPM_GET_PUT 0
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.206498] rpm_idle[206] 
pci0000:00 before
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.206501] 
rpm_check_suspend_allowed[139] pci0000:00 depth
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.206503] rpm_idle[210] 
pci0000:00 !conditions
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.206506] 
pm_runtime_work[709] 0000:00:19.0 RPM_REQ_IDLE
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.206508] rpm_idle[206] 
0000:00:19.0 before
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.206511] 
pci_pm_runtime_idle[1064] 0000:00:19.0 before
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.206515] 
pci_acpi_wake_dev[48] 0000:00:14.0
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.206517] 
pci_acpi_wake_dev[53] 0000:00:14.0
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.206525] rpm_resume[512] 
0000:00:14.0 before
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.206527] 
pci_pm_runtime_resume[1047] 0000:00:14.0 before
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226027] 
acpi_dev_run_wake[293]
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226041] 
acpi_pci_run_wake[340] 0000:00:14.0 acpi_dev_run_wake
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226050] xhci_hcd 
0000:00:14.0: PME# disabled polled 0
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226052] 
pci_pm_runtime_resume[1055] 0000:00:14.0 after
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226058] 
__pci_enable_device_flags[1129] 0000:00:14.0
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226060] 
__pci_enable_device_flags[1133] 0000:00:14.0
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226066] 
__pci_enable_device_flags[1145] 0000:00:14.0
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226068] 
pci_set_master[2621] 0000:00:14.0
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226070] 
__pci_set_master[2594] 0000:00:14.0
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226076] 
pci_bus_write_config_word[65] a0:4 op ffffffff8149ad20
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226078] pci_write[70] 4 : 2
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226083] 
__pci_set_master[2607] 0000:00:14.0 enabling pci_write_config_word ret 0
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226088] xhci_hcd 
0000:00:14.0: setting latency timer to 64
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226136] 
usb_hcd_resume_root_hub[2079] xHCI Host Controller
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226138] ------------[ cut 
here ]------------
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226145] 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()
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226149] Hardware name: 2012 
Client Platform
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226150] Modules linked in: 
nls_iso8859_1 nls_cp437 vfat fat usb_storage e1000e iwlwifi(O) mac80211(O) 
cfg80211(O) xhci_hcd tpm_tis tpm tpm_bios ehci_hcd xt_mac xt_tcpudp 
ipt_MASQUERADE iscsi_scst(O) xt_state scst_vdisk(O) xt_multiport crc32c 
iptable_filter libcrc32c iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack 
nf_defrag_ipv4 scst_cdrom(O) ip_tables x_tables scst(O) bridge stp llc 
microcode iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi arc4 
snd_hda_codec_realtek snd_hda_intel snd_hda_codec shpchp snd_hwdep snd_pcm 
snd_timer snd soundcore snd_page_alloc zram(C) usbhid hid i915 drm_kms_helper 
drm ahci libahci i2c_algo_bit video intel_agp intel_gtt [last unloaded: 
tpm_bios]
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226220] Pid: 222, comm: 
kworker/0:2 Tainted: G        WC O 3.2.11-orc #12
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226222] Call Trace:
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226228]  
[<ffffffff810643df>] warn_slowpath_common+0x7f/0xc0
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226232]  
[<ffffffff8106443a>] warn_slowpath_null+0x1a/0x20
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226235]  
[<ffffffff8141a7bf>] usb_hcd_resume_root_hub+0x4f/0xa0
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226241]  
[<ffffffffa0458490>] xhci_resume+0x2a0/0x2e0 [xhci_hcd]
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226245]  
[<ffffffffa046544d>] xhci_pci_resume+0x4d/0x60 [xhci_hcd]
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226249]  
[<ffffffff8142a6c5>] resume_common+0xd5/0x170
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226252]  
[<ffffffff8142a773>] hcd_pci_runtime_resume+0x13/0x20
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226257]  
[<ffffffff812d9507>] pci_pm_runtime_resume+0xd7/0xf0
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226260]  
[<ffffffff812d9430>] ? pci_pm_default_resume_early+0x30/0x30
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226264]  
[<ffffffff8139cb93>] __rpm_callback+0x43/0x90
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226267]  
[<ffffffff8139d4ec>] rpm_resume+0x44c/0x6b0
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226271]  
[<ffffffff81305ff4>] ? acpi_os_wait_events_complete+0x23/0x23
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226275]  
[<ffffffff8139e523>] __pm_runtime_resume+0x53/0xc0
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226278]  
[<ffffffff812f0729>] pci_acpi_wake_dev+0xb9/0xe0
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226283]  
[<ffffffff81315717>] acpi_ev_notify_dispatch+0x67/0x7e
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226286]  
[<ffffffff8130601b>] acpi_os_execute_deferred+0x27/0x34
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226290]  
[<ffffffff810805ba>] process_one_work+0x11a/0x480
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226295]  
[<ffffffff8100ad42>] ? check_events+0x12/0x20
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226299]  
[<ffffffff8108125e>] worker_thread+0x15e/0x360
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226303]  
[<ffffffff81081100>] ? manage_workers.isra.29+0x230/0x230
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226306]  
[<ffffffff810860bc>] kthread+0x8c/0xa0
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226311]  
[<ffffffff815832f4>] kernel_thread_helper+0x4/0x10
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226315]  
[<ffffffff815813a3>] ? int_ret_from_sys_call+0x7/0x1b
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226319]  
[<ffffffff8157957c>] ? retint_restore_args+0x5/0x6
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226323]  
[<ffffffff815832f0>] ? gs_change+0x13/0x13
Mar 19 15:42:26 2012-Client-Platform kernel: [ 8648.226325] ---[ end trace 
6eb36a2336c449d5 ]---






_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.