From patchwork Wed Feb 11 20:41:48 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Arbuckle X-Patchwork-Id: 22933 X-Patchwork-Delegate: benh@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id BA3FCDDF02 for ; Thu, 12 Feb 2009 07:42:29 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: from mail-ew0-f21.google.com (mail-ew0-f21.google.com [209.85.219.21]) by ozlabs.org (Postfix) with ESMTP id B9CCEDDDAA for ; Thu, 12 Feb 2009 07:41:56 +1100 (EST) Received: by ewy14 with SMTP id 14so506008ewy.9 for ; Wed, 11 Feb 2009 12:41:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:to:subject:from :content-type:mime-version:content-transfer-encoding:message-id :user-agent; bh=PDXWt3MeO9KWVLFIP36YO3ugwL8YvW4+/2WNSFm2WmU=; b=si9YurmCn65taTc5SuFYoKvbk+l7pY9Fgf2myYSgR9kuOf/8nK2waWBeHIURQTWaxs UZogENBOixAuThhnnAJVD9WxOyXuWdzA3hvnvssb0jWlOm0N6WzzSPcjjFNiyj39hu3j zWp/qRwFGWjs30bs7CiaJpwEqd5zM3gXGi0zk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:to:subject:from:content-type:mime-version :content-transfer-encoding:message-id:user-agent; b=xwJkz/pvPev/KAYY6ctrrroPJpB/Rfw7iIhBv46vc4ItMStN1573cJfofWqK6G311E LhUUWHXE0+HwGhmodqYEGGJ2Kk7xBbGyc3yOa7XqQujmcUmyvyYIF90domAUS+6/ZYW0 DLoUXPD4mbx9Z7qGIuOpcYQt21A7+H8Xg+jkE= Received: by 10.210.54.19 with SMTP id c19mr18508eba.168.1234384913757; Wed, 11 Feb 2009 12:41:53 -0800 (PST) Received: from kams (86-41-122-244-dynamic.b-ras2.lmk.limerick.eircom.net [86.41.122.244]) by mx.google.com with ESMTPS id t2sm1858689gve.2.2009.02.11.12.41.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 11 Feb 2009 12:41:52 -0800 (PST) Date: Wed, 11 Feb 2009 20:41:48 -0000 To: linuxppc-dev@ozlabs.org Subject: [PATCH] "multifunc-device": fix IRQ assignment by also scanning dummy nodes From: Tom Arbuckle MIME-Version: 1.0 Message-ID: User-Agent: Opera Mail/9.63 (Linux) X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Hello, Ben. I've regenerated this patch against 2.6.28.4. --- linux-2.6.28.4/arch/powerpc/kernel/pci_32.c.orig 2009-02-06 21:47:45.000000000 +0000 +++ linux-2.6.28.4/arch/powerpc/kernel/pci_32.c 2009-02-07 16:37:04.000000000 +0000 @@ -226,15 +226,21 @@ static struct device_node *scan_OF_for_p unsigned int devfn) { struct device_node *np; + struct device_node *np_sub = NULL; const u32 *reg; unsigned int psize; for_each_child_of_node(parent, np) { reg = of_get_property(np, "reg", &psize); - if (reg == NULL || psize < 4) - continue; - if (((reg[0] >> 8) & 0xff) == devfn) - return np; + if (reg && psize >= 4) { + if (((reg[0] >> 8) & 0xff) == devfn) + return np; + } + if (!strcmp(np->name, "multifunc-device")) { + np_sub = scan_OF_for_pci_dev(np, devfn); + if (np_sub) + return np_sub; + } } return NULL; }