From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: What is the correct way to indicate an unassigned PCI resource ? Date: Thu, 4 Jan 2007 18:49:47 +0100 Message-ID: <20070104174947.GA3636@aepfle.de> References: <4574197A.2020204@ru.mvista.com> <4FC2EBCF-C927-435A-9BE3-E4403AFC042D@kernel.crashing.org> <45741DDE.4080509@ru.mvista.com> <20061204132124.4f7c50a9@localhost.localdomain> <45742253.1000807@ru.mvista.com> <20061204142201.68d9621f@localhost.localdomain> <1165293679.29784.39.camel@localhost.localdomain> <20061205081557.GA8483@aepfle.de> <1165349941.5469.1.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1165349941.5469.1.camel@localhost.localdomain> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+glppd-linuxppc64-dev=m.gmane.org@ozlabs.org Errors-To: linuxppc-dev-bounces+glppd-linuxppc64-dev=m.gmane.org@ozlabs.org To: Benjamin Herrenschmidt Cc: linux-ide@vger.kernel.org, greg@kroah.com, linuxppc-dev@ozlabs.org, linux-pci@atrey.karlin.mff.cuni.cz, Alan List-Id: linux-ide@vger.kernel.org On Wed, Dec 06, Benjamin Herrenschmidt wrote: > On Tue, 2006-12-05 at 09:15 +0100, Olaf Hering wrote: > > On Tue, Dec 05, Benjamin Herrenschmidt wrote: > > > > > Olaf, can you give me a dump of /proc/ioports ? What is sitting at 0 on > > > that PCI bus ? > > > > with IDE=y > > > > ==> /proc/ioports <== > > 00000000-0000001f : dma1 > > So it's indeed colliding with the cruft above. > > I reckon it's a bug in the firmware of this machine. > > Add to pseries/pci.c a quirk for that chipset (don't forget to test for > machine_is(pseries) in the quirk as they get called for all platforms in > a combo kernel. The quirk shall check if resource 6 has a 0 base and > clear the size as Alan suggested (possibly setting the UNSET flag as > well). I will test this change tomorrow: +++ 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) { + printk("disable IO resource %d on W82c105 IDE controller\n", i); + dev->resource[i].flags = IORESOURCE_DISABLED; + } } } DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105, Or did you mean 'if (dev->resource[5].start == 0)' ?