Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753156AbYKTAfH (ORCPT ); Wed, 19 Nov 2008 19:35:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752046AbYKTAev (ORCPT ); Wed, 19 Nov 2008 19:34:51 -0500 Received: from rv-out-0506.google.com ([209.85.198.227]:55021 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751929AbYKTAet (ORCPT ); Wed, 19 Nov 2008 19:34:49 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; b=P8fGCX6CnqFwhNeXqUKzdCEEVde2tP/Kr2A+ohiuDkbsg3YPjJ3+QjE6h4xb+PT/iv Bf4bAz9QMjIqKxKfjwgXvafCq9tVc2oUB3cp0cLZKq+ejDuZwstoud+3bqxZ3VzcvkDN mWMQlIwmV6ruKraTtU64CMTc631/fBhh+/esw= Date: Wed, 19 Nov 2008 18:34:43 -0600 From: Jay Cliburn To: Alan Jenkins Cc: atl1-devel@lists.sourceforge.net, linux-kernel , netdev@vger.kernel.org, Chris Snook Subject: Re: atl2: don't mess up irq on suspend/resume (probably msi only) Message-ID: <20081119183443.7ca1cf23@osprey.hogchain.net> In-Reply-To: <49231CCB.8010900@tuffmail.co.uk> References: <49201401.1060600@tuffmail.co.uk> <4921E574.3090602@tuffmail.co.uk> <20081117181336.1a270561@osprey.hogchain.net> <4922D195.9010505@tuffmail.co.uk> <4922FD09.2070007@tuffmail.co.uk> <49231CCB.8010900@tuffmail.co.uk> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.12; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3347 Lines: 94 Can someone tell before I submit this patch if the description is sane? atl2: don't request irq on resume if netif running If the device is suspended with the cable disconnected, then resumed with the cable connected, dev->open is called before resume. During resume, we request an IRQ, but the IRQ was already assigned during dev->open, resulting in the warning shown below. Don't request an IRQ if the device is running. 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 Signed-off-by: Alan Jenkins Signed-off-by: Jay Cliburn --- drivers/net/atlx/atl2.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c index f5bdc92..8571e8c 100644 --- a/drivers/net/atlx/atl2.c +++ b/drivers/net/atlx/atl2.c @@ -1690,9 +1690,11 @@ static int atl2_resume(struct pci_dev *pdev) ATL2_WRITE_REG(&adapter->hw, REG_WOL_CTRL, 0); - err = atl2_request_irq(adapter); - if (netif_running(netdev) && err) - return err; + if (netif_running(netdev)) { + err = atl2_request_irq(adapter); + if (err) + return err; + } atl2_reset_hw(&adapter->hw); -- 1.5.6.5 -- 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/