From owner-cvs-all@FreeBSD.ORG Mon Jan 8 01:08:24 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CD26316A40F; Mon, 8 Jan 2007 01:08:24 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id BE53013C442; Mon, 8 Jan 2007 01:08:24 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id l0818OvW094703; Mon, 8 Jan 2007 01:08:24 GMT (envelope-from marius@repoman.freebsd.org) Received: (from marius@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l0818OfQ094702; Mon, 8 Jan 2007 01:08:24 GMT (envelope-from marius) Message-Id: <200701080108.l0818OfQ094702@repoman.freebsd.org> From: Marius Strobl Date: Mon, 8 Jan 2007 01:08:24 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/sparc64/pci ofw_pcibus.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jan 2007 01:08:24 -0000 marius 2007-01-08 01:08:24 UTC FreeBSD src repository Modified files: sys/sparc64/pci ofw_pcibus.c Log: In ofw_pcibus_attach() skip dupe PCI devices reported by the firmware (mainly 'pmu' and its 'lomp' dupe found in a couple of later USII{e,i}-based machines) by checking whether a device with the same triple of bus number, slot and function already has been added. This is the simple yet effective approach introduced in OpenBSD some time ago, but which has the flaw that it assumes that the device and its dupe(s) found in the OFW device tree are equal or at least the one encountered first is in some way the more important one (this is the case with 'pmu' and 'lomp'; the 'pmu' node has couple of properties and children while the 'lomp' one misses most of these). If there's ever a device/dupe pair where we don't encounter the more important node first, we'll probably need to introduce a quirk list in order to add the desired device but prevent its dupe(s) from being added. MFC after: 1 week Revision Changes Path 1.12 +2 -0 src/sys/sparc64/pci/ofw_pcibus.c