Skip to contentSkip to conversation

MEI: suspend/IRQ warnings

PATCH In review Lekensteyn 3 participants 4 messages Jun 26, 2012 – Jul 3, 2012

Subsystems (2)
lore
Share & tools
lore

Lekensteyn

author
#0 lore raw

Hi Thomas,

Although I do not use the MEI driver (yet?), I still have it installed. Using kernel 3.5-rc4, I have a weird message on boot up:

[   11.259467] mei 0000:00:16.0: setting latency timer to 64
[   11.259538] mei 0000:00:16.0: irq 48 for MSI/MSI-X
[   11.263132] mei 0000:00:16.0: wd: failed to find the client

In kernel 3.4.4, I'd get:

[    7.014817] mei: module is from the staging directory, the quality is 
unknown, you have been warned.
[    7.015139] mei 0000:00:16.0: setting latency timer to 64
[    7.015233] mei 0000:00:16.0: irq 47 for MSI/MSI-X

After suspend/resume, it get even weirder:

[10771.177941] mei 0000:00:16.0: irq 48 for MSI/MSI-X
[10771.178034] genirq: Threaded irq requested with handler=NULL and !ONESHOT 
for irq 48
[10771.178043] mei 0000:00:16.0: request_threaded_irq failed: irq = 48.
[10771.178050] dpm_run_callback(): pci_pm_resume+0x0/0x140 returns -22
[10771.178051] PM: Device 0000:00:16.0 failed to resume async: error -22

The suspend/resume cycle thereafter gives even more errors:

[33724.928600] ------------[ cut here ]------------
[33724.928607] WARNING: at kernel/irq/manage.c:1214 __free_irq+0xa3/0x1e0()
[33724.928609] Hardware name: B7130                           
[33724.928609] Trying to free already-free IRQ 48
[33724.928652] Modules linked in: acpi_call(O) iptable_mangle xt_mark 

iptable_nat nf_nat mxm_wmi wmi bbswitch(O) nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack ipt_REJECT xt_LOG xt_limit xt_tcpudp xt_owner xt_addrtype iptable_filter ip_tables x_tables arc4 iwlwifi mac80211 snd_hda_codec_hdmi snd_hda_codec_via snd_hda_intel snd_hda_codec cfg80211 hid_logitech_dj snd_hwdep snd_pcm usbhid psmouse coretemp snd_page_alloc hid snd_timer snd jmb38x_ms i2c_i801 jme intel_ips sdhci_pci memstick mei sdhci soundcore binfmt_misc xts gf128mul dm_crypt i915 video i2c_algo_bit drm_kms_helper drm xhci_hcd ahci libahci [last unloaded: wmi]

[33724.928655] Pid: 9731, comm: kworker/u:15 Tainted: G           O 3.5.0-1-
custom #1
[33724.928656] Call Trace:
[33724.928664]  [<ffffffff81038adf>] warn_slowpath_common+0x7f/0xc0
[33724.928666]  [<ffffffff81038bd6>] warn_slowpath_fmt+0x46/0x50
[33724.928668]  [<ffffffff810bb673>] __free_irq+0xa3/0x1e0
[33724.928670]  [<ffffffff810bb807>] free_irq+0x57/0xd0
[33724.928677]  [<ffffffffa0133f53>] mei_pci_suspend+0x83/0xd0 [mei]
[33724.928683]  [<ffffffff812d5ee0>] pci_pm_suspend+0x70/0x1e0
[33724.928689]  [<ffffffff8137f080>] ? device_pm_wait_for_dev+0x30/0x30
[33724.928691]  [<ffffffff812d5e70>] ? pci_pm_suspend_noirq+0x220/0x220
[33724.928693]  [<ffffffff8137f32b>] dpm_run_callback.isra.7+0x3b/0x70
[33724.928695]  [<ffffffff8137fcd1>] __device_suspend+0x101/0x270
[33724.928696]  [<ffffffff8137fe5f>] async_suspend+0x1f/0xa0
[33724.928702]  [<ffffffff8106362e>] async_run_entry_fn+0x7e/0x170
[33724.928707]  [<ffffffff810568a3>] process_one_work+0x123/0x400
[33724.928709]  [<ffffffff810635b0>] ? async_synchronize_full_domain+0x20/0x20
[33724.928711]  [<ffffffff81056ede>] worker_thread+0x12e/0x2d0
[33724.928713]  [<ffffffff81056db0>] ? rescuer_thread+0x1f0/0x1f0
[33724.928715]  [<ffffffff8105c003>] kthread+0x93/0xa0
[33724.928721]  [<ffffffff8153b854>] kernel_thread_helper+0x4/0x10
[33724.928723]  [<ffffffff8105bf70>] ? flush_kthread_worker+0x80/0x80
[33724.928725]  [<ffffffff8153b850>] ? gs_change+0xb/0xb

--

[33726.729315] mei 0000:00:16.0: irq 48 for MSI/MSI-X
[33726.729373] genirq: Threaded irq requested with handler=NULL and !ONESHOT 
for irq 48
[33726.729383] mei 0000:00:16.0: request_threaded_irq failed: irq = 48.
[33726.729390] dpm_run_callback(): pci_pm_resume+0x0/0x140 returns -22
[33726.729391] PM: Device 0000:00:16.0 failed to resume async: error -22

I also noticed that /proc/interrupts does not list irq 48 nor mei anymore.

lspci
00:16.0 Communication controller [0780]: Intel Corporation 5 Series/3400 Series Chipset HECI Controller [8086:3b64] (rev 06)

Hopefully it helps you debugging it. If you need more information, feel free to ask.

Regards,
Peter

#1 lore raw

PATCH 1/1 misc: mei: set IRQF_ONESHOT for MSI request_threaded_irq() in mei_pci_resume()

From: Roland Dreier <[email protected]>

When the default quick IRQ handler is used then IRQF_ONESHOT must be set, or else the request fails and following error is logged on resume:

genirq: Threaded irq requested with handler=NULL and !ONESHOT for irq ...

This is the same fix that commit aa189ecdc0c7 ("misc: mei: set IRQF_ONESHOT for msi request_threaded_irq") did in the probe function.

---
Can you try this? It looks to be needed.

Thomas/Greg, I think this should get into 3.5 if possible.

 drivers/misc/mei/main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/mei/main.c +1 -1
index 7de1389..783fcd7 100644
@@ -1147,7 +1147,7 @@ static int mei_pci_resume(struct device *device)
 		err = request_threaded_irq(pdev->irq,
 			NULL,
 			mei_interrupt_thread_handler,
-			0, mei_driver_name, dev);
+			IRQF_ONESHOT, mei_driver_name, dev);
 	else
 		err = request_threaded_irq(pdev->irq,
 			mei_interrupt_quick_handler,
Signature · 1 line
1.7.10.4
#2 lore raw

RE: [PATCH] misc: mei: set IRQF_ONESHOT for MSI request_threaded_irq() in mei_pci_resume()

Quoted 10 lines

-----Original Message-----
From: Roland Dreier [mailto:[email protected]] On Behalf Of Roland Dreier
Sent: Tuesday, July 03, 2012 12:09 PM
To: Winkler, Tomas; Greg Kroah-Hartman; Lekensteyn
Cc: [email protected]
Subject: [PATCH] misc: mei: set IRQF_ONESHOT for MSI request_threaded_irq() in mei_pci_resume()

Quoted 2 lines

From: Roland Dreier <[email protected]>

Thanks but fix was already posted
Tomas

#3 lore raw

Re: [PATCH] misc: mei: set IRQF_ONESHOT for MSI request_threaded_irq() in mei_pci_resume()

Quoted 1 line · Tomas

Thanks but fix was already posted

OK, sorry for the noise. I guess I missed it because it wasn't in the original thread.

I guess you can add my acked-by to the patch ;)

- R.