From patchwork Thu May 30 14:10:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 2636821 Return-Path: X-Original-To: patchwork-linux-parisc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 2D7B7DF2A1 for ; Thu, 30 May 2013 14:10:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757037Ab3E3OKi (ORCPT ); Thu, 30 May 2013 10:10:38 -0400 Received: from mout.gmx.net ([212.227.15.15]:54441 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755087Ab3E3OKi (ORCPT ); Thu, 30 May 2013 10:10:38 -0400 Received: from mailout-de.gmx.net ([10.1.76.17]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0MPsKa-1UltJH034E-004yYp for ; Thu, 30 May 2013 16:10:37 +0200 Received: (qmail invoked by alias); 30 May 2013 14:10:36 -0000 Received: from p54AD0C3F.dip0.t-ipconnect.de (EHLO ls3530.box) [84.173.12.63] by mail.gmx.net (mp017) with SMTP; 30 May 2013 16:10:36 +0200 X-Authenticated: #1045983 X-Provags-ID: V01U2FsdGVkX1+zv0RwaxSzHxcwprN38bSg3pNx5tis0vOYI8tTrJ t9mpOewL5CMNDm Date: Thu, 30 May 2013 16:10:33 +0200 From: Helge Deller To: linux-parisc@vger.kernel.org, James Bottomley Cc: Bjorn Helgaas Subject: [PATCH] parisc/PCI: lba: fix: convert to pci_create_root_bus() for correct root bus resources Message-ID: <20130530141033.GA3665@ls3530.box> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Y-GMX-Trusted: 0 Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org This commit dc7dce280a26d069ad5a58bf3da86e5e83415c65 Author: Bjorn Helgaas Date: Fri Oct 28 16:27:27 2011 -0600 parisc/PCI: lba: convert to pci_create_root_bus() for correct root bus resources Supply root bus resources to pci_create_root_bus() so they're correct immediately. This fixes the problem of "early" and "header" quirks seeing incorrect root bus resources. forgot to set the IORESOURCE_BUS bus flag which led to incorrect resource assignments and a non-working stifb framebuffer on most parisc machines. LBA 10:1: PCI host bridge to bus 0000:01 pci_bus 0000:01: root bus resource [io 0x12000-0x13fff] (bus address [0x2000-0x3fff]) pci_bus 0000:01: root bus resource [mem 0xfffffffffa000000-0xfffffffffbffffff] (bus address [0xfa000000-0xfbffffff]) pci_bus 0000:01: root bus resource [mem 0xfffffffff4800000-0xfffffffff4ffffff] (bus address [0xf4800000-0xf4ffffff]) pci_bus 0000:01: root bus resource [??? 0x00000001 flags 0x0] Signed-off-by: Helge Deller Acked-by: Bjorn Helgaas --- To unsubscribe from this list: send the line "unsubscribe linux-parisc" 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/parisc/lba_pci.c b/drivers/parisc/lba_pci.c index 2ef7103..29f3d7d 100644 --- a/drivers/parisc/lba_pci.c +++ b/drivers/parisc/lba_pci.c @@ -1494,7 +1494,7 @@ lba_driver_probe(struct parisc_device *dev) pci_add_resource_offset(&resources, &lba_dev->hba.io_space, HBA_PORT_BASE(lba_dev->hba.hba_num)); - if (lba_dev->hba.elmmio_space.start) + if (lba_dev->hba.elmmio_space.flags) pci_add_resource_offset(&resources, &lba_dev->hba.elmmio_space, lba_dev->hba.lmmio_space_offset); if (lba_dev->hba.lmmio_space.flags) @@ -1503,6 +1503,7 @@ lba_driver_probe(struct parisc_device *dev) if (lba_dev->hba.gmmio_space.flags) pci_add_resource(&resources, &lba_dev->hba.gmmio_space); + lba_dev->hba.bus_num.flags = IORESOURCE_BUS; pci_add_resource(&resources, &lba_dev->hba.bus_num); dev->dev.platform_data = lba_dev;