Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754529AbYKQVna (ORCPT ); Mon, 17 Nov 2008 16:43:30 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752152AbYKQVnW (ORCPT ); Mon, 17 Nov 2008 16:43:22 -0500 Received: from nf-out-0910.google.com ([64.233.182.186]:16847 "EHLO nf-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752066AbYKQVnV (ORCPT ); Mon, 17 Nov 2008 16:43:21 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :sender; b=xt6hG8cZFR53cBTm5wtoBPe5WGs3N3n+FXsUyDqA1TyQJ2iFJunHqvpZq8buWO6r+H dHsZt5/e9LrlZa1f4HWDNFMIDRDuBD42TMhgD5gYs4D9Fs/cfovjj1jwGeLOGqbHyLJz npLlf7/P5iaJ79GM0zAlWFTcekwy3gbvtPf9A= Message-ID: <4921E574.3090602@tuffmail.co.uk> Date: Mon, 17 Nov 2008 21:43:16 +0000 From: Alan Jenkins User-Agent: Thunderbird 2.0.0.17 (X11/20080925) MIME-Version: 1.0 To: csnook@redhat.com, atl1-devel@lists.sourceforge.net CC: linux-kernel Subject: Re: atl2: don't mess up irq on suspend/resume (probably msi only) References: <49201401.1060600@tuffmail.co.uk> In-Reply-To: <49201401.1060600@tuffmail.co.uk> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4222 Lines: 111 Alan Jenkins wrote: > According to Documentation/power/pci.txt, the correct suspend sequence is: > > A reference implementation > ------------------------- > .suspend() > { > /* driver specific operations */ > > /* Disable IRQ */ > free_irq(); > /* If using MSI */ > pci_disable_msi(); > > pci_save_state(); > pci_enable_wake(); > /* Disable IO/bus master/irq router */ > pci_disable_device(); > pci_set_power_state(pci_choose_state()); > } > > > Whereas atl2 calls pci_save_state() *before* free_irq() and > pci_disable_msi(). Hilarity ensues on resume as pci_restore_state() > restores a state with MSI enabled; the atl2 resume handler then enables > msi for the second time. Looking at /proc/interrupts, it seems to leak > an irq each time this happens. (I had 6 entries for "eth0" by the time > I noticed this). It also triggers a warning. > > I was able to avoid the warning + leak by re-ordering the resume > method. Patch attached - it's just a few lines, I hope that's all > that's necessary. > Don't listen to me. The problem went away because when I was testing my patch, I plugged the ethernet in and actually used it. My patch doesn't seem to fix anything. So I now have the steps to reproduce this warning: remove the ethernet cable and suspend. Also, I was speaking rubbish because the warning isn't on the resume path. It seems to be when network-manager re-opens the device on resume. I'll have another look for possible culprits. Hints appreciated :). > ------------[ cut here ]------------ > WARNING: at drivers/pci/msi.c:570 pci_enable_msi+0x3a/0x1cd() > Modules linked in: cpufreq_stats freq_table nls_iso8859_1 nls_cp437 vfat fat rfkill_input ae > Pid: 2620, comm: NetworkManager Tainted: G W 2.6.28-rc4eeepc #136 > Call Trace: > [] warn_on_slowpath+0x40/0x59 > [] raw_pci_read+0x4d/0x55 > [] pci_read+0x1c/0x21 > [] __pci_find_next_cap_ttl+0x44/0x70 > [] __pci_find_next_cap+0x1a/0x1f > [] pci_find_capability+0x28/0x2c > [] pci_msi_check_device+0x53/0x62 > [] pci_enable_msi+0x3a/0x1cd > [] atl2_write_phy_reg+0x40/0x5f [atl2] > [] dma_generic_alloc_coherent+0x0/0xd7 > [] atl2_request_irq+0x15/0x49 [atl2] > [] atl2_open+0x20b/0x297 [atl2] > [] dev_open+0x62/0x91 > [] dev_change_flags+0x93/0x141 > [] do_setlink+0x238/0x2d5 > [] rtnl_setlink+0xa9/0xbf > [] mutex_lock+0xb/0x19 > [] rtnl_dump_ifinfo+0x0/0x69 > [] rtnl_setlink+0x0/0xbf > [] rtnetlink_rcv_msg+0x185/0x19f > [] sock_rmalloc+0x23/0x57 > [] rtnetlink_rcv_msg+0x0/0x19f > [] netlink_rcv_skb+0x2d/0x71 > [] rtnetlink_rcv+0x14/0x1a > [] netlink_unicast+0x184/0x1e4 > [] netlink_sendmsg+0x233/0x240 > [] sock_sendmsg+0xb7/0xd0 > [] autoremove_wake_function+0x0/0x2b > [] autoremove_wake_function+0x0/0x2b > [] mempool_alloc+0x2d/0x9e > [] scsi_pool_alloc_command+0x35/0x4f > [] mutex_lock+0xb/0x19 > [] unix_stream_recvmsg+0x357/0x3e2 > [] copy_from_user+0x23/0x4f > [] verify_iovec+0x3e/0x6c > [] sys_sendmsg+0x18d/0x1f0 > [] sys_recvmsg+0x146/0x1c8 > [] sys_recvmsg+0x1b4/0x1c8 > [] __wake_up+0xf/0x15 > [] netlink_table_ungrab+0x17/0x19 > [] copy_to_user+0x25/0x3b > [] move_addr_to_user+0x50/0x68 > [] sys_getsockname+0x6f/0x9a > [] sys_getsockname+0x89/0x9a > [] do_wp_page+0x3ae/0x41a > [] handle_mm_fault+0x4c5/0x540 > [] sys_socketcall+0x176/0x1b0 > [] sysenter_do_call+0x12/0x21 > ---[ end trace ad80134e35e20aad ]--- > > > > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/