From patchwork Fri Oct 31 15:54:22 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Gospodarek X-Patchwork-Id: 6716 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 90973DDE04 for ; Sat, 1 Nov 2008 02:54:34 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751538AbYJaPyc (ORCPT ); Fri, 31 Oct 2008 11:54:32 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751831AbYJaPyb (ORCPT ); Fri, 31 Oct 2008 11:54:31 -0400 Received: from mx2.redhat.com ([66.187.237.31]:38482 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751538AbYJaPya (ORCPT ); Fri, 31 Oct 2008 11:54:30 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id m9VFsONJ013691; Fri, 31 Oct 2008 11:54:24 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m9VFsNCV001729; Fri, 31 Oct 2008 11:54:23 -0400 Received: from gospo.usersys.redhat.com (gospo.rdu.redhat.com [10.11.228.52]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with SMTP id m9VFsM73023014; Fri, 31 Oct 2008 11:54:22 -0400 Received: by gospo.usersys.redhat.com (sSMTP sendmail emulation); Fri, 31 Oct 2008 11:54:22 -0400 Date: Fri, 31 Oct 2008 11:54:22 -0400 From: Andy Gospodarek To: mcarlson@broadcom.com, netdev@vger.kernel.org Cc: mchan@broadcom.com, davem@davemloft.net Subject: [PATCH net-next] tg3: inconsistent interrupt value reported Message-ID: <20081031155421.GB6181@gospo.rdu.redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Systems that use MSI do not report the correct 'Interrupt' value in ifconfig output. This patch sets dev->irq after initializing the interrupt as the value will change when using MSI. I suspect this is a problem with a lot of drivers, so I'll snoop around and post some more patches if needed. Signed-off-by: Andy Gospodarek --- tg3.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index eb9f8f3..fa95e99 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -7892,6 +7892,7 @@ static int tg3_request_irq(struct tg3 *tp) irq_handler_t fn; unsigned long flags; struct net_device *dev = tp->dev; + int ret; if (tp->tg3_flags2 & TG3_FLG2_USING_MSI) { fn = tg3_msi; @@ -7904,7 +7905,9 @@ static int tg3_request_irq(struct tg3 *tp) fn = tg3_interrupt_tagged; flags = IRQF_SHARED | IRQF_SAMPLE_RANDOM; } - return (request_irq(tp->pdev->irq, fn, flags, dev->name, dev)); + ret = request_irq(tp->pdev->irq, fn, flags, dev->name, dev); + dev->irq = tp->pdev->irq; + return ret; } static int tg3_test_interrupt(struct tg3 *tp)