From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by ozlabs.org (Postfix) with ESMTP id B8572DDF7C for ; Sun, 11 Feb 2007 07:37:16 +1100 (EST) Date: Sat, 10 Feb 2007 21:38:37 +0100 From: Olaf Hering To: linuxppc-dev@ozlabs.org, Paul Mackeras Subject: [PATCH] mark winbond IDE PCI resources with start 0 as unassigned Message-ID: <20070210203837.GA25625@aepfle.de> References: <20070210203512.GA25586@aepfle.de> <20070210203614.GA25602@aepfle.de> <20070210203733.GA25611@aepfle.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 In-Reply-To: <20070210203733.GA25611@aepfle.de> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , libata calls pci_request_regions to claim PCI BAR 0 - 5 pci_request_regions fails if one of the regions cant be claimed. bar 5 has start == 0, __request_resource will fail. Tested on a p630 in SMP mode with pata_sl82c105 00:03.1 IDE interface: Symphony Labs SL82c105 (rev 05) (prog-if 8f [Master SecP SecO PriP PriO]) Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- --- arch/powerpc/platforms/pseries/pci.c | 4 ++++ 1 file changed, 4 insertions(+) Index: linux-2.6/arch/powerpc/platforms/pseries/pci.c =================================================================== --- linux-2.6.orig/arch/powerpc/platforms/pseries/pci.c +++ linux-2.6/arch/powerpc/platforms/pseries/pci.c @@ -98,6 +98,10 @@ static void fixup_winbond_82c105(struct if (dev->resource[i].flags & IORESOURCE_IO && dev->bus->number == 0 && dev->devfn == 0x81) dev->resource[i].flags &= ~IORESOURCE_IO; + if (dev->resource[i].start == 0 && dev->resource[i].end) { + dev->resource[i].flags = 0; + dev->resource[i].end = 0; + } } } DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105,