From owner-p4-projects@FreeBSD.ORG Sun Sep 30 13:43:17 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3351316A421; Sun, 30 Sep 2007 13:43:17 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B552616A41B for ; Sun, 30 Sep 2007 13:43:16 +0000 (UTC) (envelope-from marius@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B012013C478 for ; Sun, 30 Sep 2007 13:43:16 +0000 (UTC) (envelope-from marius@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8UDhGXp096892 for ; Sun, 30 Sep 2007 13:43:16 GMT (envelope-from marius@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8UDhGBc096889 for perforce@freebsd.org; Sun, 30 Sep 2007 13:43:16 GMT (envelope-from marius@freebsd.org) Date: Sun, 30 Sep 2007 13:43:16 GMT Message-Id: <200709301343.l8UDhGBc096889@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marius@freebsd.org using -f From: Marius Strobl To: Perforce Change Reviews Cc: Subject: PERFORCE change 127021 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Sep 2007 13:43:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=127021 Change 127021 by marius@flak on 2007/09/30 13:42:15 - Take advantage of DEFINE_CLASS_0. - Use PCI domains (mandatory for Tomatillos, see comment in schizo_attach()). Affected files ... .. //depot/projects/usiii/sparc64/pci/schizo.c#3 edit Differences ... ==== //depot/projects/usiii/sparc64/pci/schizo.c#3 (text+ko) ==== @@ -156,15 +156,11 @@ { 0, 0 } }; -static driver_t schizo_driver = { - "pcib", - schizo_methods, - sizeof(struct schizo_softc), -}; +static devclass_t schizo_devclass; -static devclass_t pcib_devclass; - -DRIVER_MODULE(schizo, nexus, schizo_driver, pcib_devclass, 0, 0); +DEFINE_CLASS_0(pcib, schizo_driver, schizo_methods, + sizeof(struct schizo_softc)); +DRIVER_MODULE(schizo, nexus, schizo_driver, schizo_devclass, 0, 0); static SLIST_HEAD(, schizo_softc) schizo_softcs = SLIST_HEAD_INITIALIZER(schizo_softcs); @@ -893,6 +889,9 @@ sc = device_get_softc(dev); switch (which) { + case PCIB_IVAR_DOMAIN: + *result = device_get_unit(dev); + return (0); case PCIB_IVAR_BUS: *result = sc->sc_pci_secbus; return (0);