From patchwork Sat Nov 28 10:13:23 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King - ARM Linux X-Patchwork-Id: 39685 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 0A1361007D4 for ; Sat, 28 Nov 2009 21:13:53 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752093AbZK1KN2 (ORCPT ); Sat, 28 Nov 2009 05:13:28 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752040AbZK1KN2 (ORCPT ); Sat, 28 Nov 2009 05:13:28 -0500 Received: from caramon.arm.linux.org.uk ([78.32.30.218]:60166 "EHLO caramon.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751517AbZK1KN1 (ORCPT ); Sat, 28 Nov 2009 05:13:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.linux.org.uk; s=caramon; h=Date:From:To:Subject:Message-ID: MIME-Version:Content-Type:Sender; bh=OqH1PSoQNtGcycRYu0DWJT1bQzK FywFFn8z0/nLUnew=; b=NxJ73xctaG3X3rgIfUvK9teRdKeH29Z/MnGWTRSpcaB Hm1dFrm1C1/oyEQMQOojTy0RAaEfkRl+/fPXBRR86+qhiY6+ga7x0y3rltgMmYhz ztFbqlvEW9rBnHEsIAThhY5y1Rxicrb/Kw8JQarHEBVq/hOzSX2ElDKfCxsBjBZI = Received: from n2100.arm.linux.org.uk ([2002:4e20:1eda:1:214:fdff:fe10:4f86]) by caramon.arm.linux.org.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NEKIv-0006FW-EX; Sat, 28 Nov 2009 10:13:25 +0000 Received: from linux by n2100.arm.linux.org.uk with local (Exim 4.69) (envelope-from ) id 1NEKIt-0006jS-Ow; Sat, 28 Nov 2009 10:13:23 +0000 Date: Sat, 28 Nov 2009 10:13:23 +0000 From: Russell King - ARM Linux To: Nicolas Pitre , eric miao , netdev@vger.kernel.org Subject: [PATCH] NET: smc91x: Fix irq flags Message-ID: <20091128101323.GA25671@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org smc91x.h defines SMC_IRQ_FLAGS to be -1 when it wants the interrupt flags to be taken from the resource structure. However, d280ead changed this to checking for non-zero resource flags. Unfortunately, this means that on some platforms, we end up passing '-1' to request_irq rather than the desired result. Combine the two conditions into one so that the IRQ flags are taken from the resource if either SMC_IRQ_FLAGS is -1 or the resource flags specify an interrupt trigger. This restores network on at least the Versatile platform. Signed-off-by: Russell King Acked-by: Eric Miao --- drivers/net/smc91x.c | 2 +- 1 file changed, 1 insertion(+), 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/smc91x.c b/drivers/net/smc91x.c index 05c91ee..a7af1f5 100644 --- a/drivers/net/smc91x.c +++ b/drivers/net/smc91x.c @@ -2283,7 +2283,7 @@ static int __devinit smc_drv_probe(struct platform_device *pdev) ndev->irq = ires->start; - if (ires->flags & IRQF_TRIGGER_MASK) + if (irq_flags == -1 || ires->flags & IRQF_TRIGGER_MASK) irq_flags = ires->flags & IRQF_TRIGGER_MASK; ret = smc_request_attrib(pdev, ndev);