Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1PZuQl-0004Np-HI for mharc-grub-devel@gnu.org; Mon, 03 Jan 2011 19:07:15 -0500 Received: from [140.186.70.92] (port=33198 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZuQi-0004NM-Lv for grub-devel@gnu.org; Mon, 03 Jan 2011 19:07:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PZuQh-00021D-Da for grub-devel@gnu.org; Mon, 03 Jan 2011 19:07:12 -0500 Received: from smarthost03.mail.zen.net.uk ([212.23.3.142]:42417) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PZuQh-00020b-5f for grub-devel@gnu.org; Mon, 03 Jan 2011 19:07:11 -0500 Received: from [82.69.40.219] (helo=riva.pelham.vpn.ucam.org) by smarthost03.mail.zen.net.uk with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1PZuQT-0000uH-06; Tue, 04 Jan 2011 00:06:57 +0000 Received: from cjwatson by riva.pelham.vpn.ucam.org with local (Exim 4.69) (envelope-from ) id 1PZuQR-0002xk-5h; Tue, 04 Jan 2011 00:06:55 +0000 Date: Tue, 4 Jan 2011 00:06:54 +0000 From: Colin Watson To: Steve McIntyre Message-ID: <20110104000653.GA11198@riva.ucam.org> References: <4D1FBA58.7040408@nac.net> <20110101235739.GA15590@riva.ucam.org> <20110102001459.GD9915@einval.com> <20110102181808.GD15590@riva.ucam.org> <20110102224150.GH9915@einval.com> <20110103001300.GF15590@riva.ucam.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110103001300.GF15590@riva.ucam.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-Smarthost03-IP: [82.69.40.219] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: grub-devel@gnu.org, "P. J. McDermott" , Nuutti Kotivuori , 594967@bugs.debian.org, "David A. Greene" , Matt Zagrabelny Subject: Re: Bug#594967: Bug #594967: [poulsbo] grub-pc Hangs After "Welcome to GRUB!" X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jan 2011 00:07:14 -0000 On Mon, Jan 03, 2011 at 12:13:01AM +0000, Colin Watson wrote: > On Sun, Jan 02, 2011 at 10:41:50PM +0000, Steve McIntyre wrote: > > 2.iso: > > > > goes all the way through to bus ff and returns to a grub prompt > > This is interesting and suggests a measure of coincidence. What that > patch did was skip remaining functions on a device that doesn't > implement function 0, taking that as an indication that it doesn't > exist. This was based on: > > http://en.wikipedia.org/wiki/PCI_configuration_space#Bus_enumeration > > Vladimir, are you OK with this change to trunk? > > 2011-01-02 Colin Watson > > * grub-core/bus/pci.c (grub_pci_iterate): Skip remaining functions > on devices that do not implement function 0. I've applied this patch to trunk following an ack from Vladimir on IRC. I'll prepare an updated package for unstable shortly. > Nevertheless, I'm not confident that this will fix the problem on all > machines, so I would like to sort out the bridge handling as well. This may be more complicated than I thought. Seth Goldberg pointed out that my approach fails to deal with peer host bridges correctly (i.e. cases where there are multiple trees, not just a single one rooted at bus 0). Linux deals with this by asking the PCI BIOS for the last bus number, but at this point things get complicated as you have to do things in different ways for different firmware. I am inclined to try the first piece alone and see how this works out, and if we can fix the affected systems by just probing function 0 on every device on every bus then let it stand at that, even if it feels less elegant. Inventing new piles of infrastructure to handle a case I'm unsure about in a subsystem I don't know well isn't my idea of a good time. -- Colin Watson [cjwatson@debian.org]