From owner-svn-src-head@freebsd.org Mon Dec 16 21:35:03 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B943A1CF50A; Mon, 16 Dec 2019 21:35:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47cF134ZNwz4M4m; Mon, 16 Dec 2019 21:35:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 941583997; Mon, 16 Dec 2019 21:35:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBGLZ3cO096892; Mon, 16 Dec 2019 21:35:03 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBGLZ3TN096890; Mon, 16 Dec 2019 21:35:03 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201912162135.xBGLZ3TN096890@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 16 Dec 2019 21:35:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r355824 - in head/sys/dev: exca pccbb X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/dev: exca pccbb X-SVN-Commit-Revision: 355824 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Dec 2019 21:35:03 -0000 Author: imp Date: Mon Dec 16 21:35:02 2019 New Revision: 355824 URL: https://svnweb.freebsd.org/changeset/base/355824 Log: Move attachment of pccard children into exca library. Attach the cardbus and pccard children before the sysctls are added rather than after. Modified: head/sys/dev/exca/exca.c head/sys/dev/pccbb/pccbb_pci.c Modified: head/sys/dev/exca/exca.c ============================================================================== --- head/sys/dev/exca/exca.c Mon Dec 16 21:34:57 2019 (r355823) +++ head/sys/dev/exca/exca.c Mon Dec 16 21:35:02 2019 (r355824) @@ -646,6 +646,11 @@ exca_init(struct exca_softc *sc, device_t dev, sc->flags = 0; sc->getb = exca_mem_getb; sc->putb = exca_mem_putb; + sc->pccarddev = device_add_child(dev, "pccard", -1); + if (sc->pccarddev == NULL) + DEVPRINTF(brdev, "WARNING: cannot add pccard bus.\n"); + else if (device_probe_and_attach(sc->pccarddev) != 0) + DEVPRINTF(brdev, "WARNING: cannot attach pccard bus.\n"); } /* @@ -742,6 +747,8 @@ exca_valid_slot(struct exca_softc *exca) * Intel i82365sl-DF step or maybe a vlsi 82c146 * we detected the vlsi case earlier, so if the controller * isn't set, we know it is a i82365sl step D. + * XXXX Except we didn't -- this is a regression but VLSI + * controllers are super hard to find these days for testing. */ exca->chipset = EXCA_I82365SL_DF; break; Modified: head/sys/dev/pccbb/pccbb_pci.c ============================================================================== --- head/sys/dev/pccbb/pccbb_pci.c Mon Dec 16 21:34:57 2019 (r355823) +++ head/sys/dev/pccbb/pccbb_pci.c Mon Dec 16 21:35:02 2019 (r355824) @@ -317,6 +317,13 @@ cbb_pci_attach(device_t brdev) rman_get_start(sc->base_res))); } + /* attach children */ + sc->cbdev = device_add_child(brdev, "cardbus", -1); + if (sc->cbdev == NULL) + DEVPRINTF((brdev, "WARNING: cannot add cardbus bus.\n")); + else if (device_probe_and_attach(sc->cbdev) != 0) + DEVPRINTF((brdev, "WARNING: cannot attach cardbus bus!\n")); + sc->bst = rman_get_bustag(sc->base_res); sc->bsh = rman_get_bushandle(sc->base_res); exca_init(&sc->exca, brdev, sc->bst, sc->bsh, CBB_EXCA_OFFSET); @@ -372,19 +379,6 @@ cbb_pci_attach(device_t brdev) pci_write_config(brdev, PCIR_SUBBUS_2, sc->bus.sub, 1); } #endif - - /* attach children */ - sc->cbdev = device_add_child(brdev, "cardbus", -1); - if (sc->cbdev == NULL) - DEVPRINTF((brdev, "WARNING: cannot add cardbus bus.\n")); - else if (device_probe_and_attach(sc->cbdev) != 0) - DEVPRINTF((brdev, "WARNING: cannot attach cardbus bus!\n")); - - sc->exca.pccarddev = device_add_child(brdev, "pccard", -1); - if (sc->exca.pccarddev == NULL) - DEVPRINTF((brdev, "WARNING: cannot add pccard bus.\n")); - else if (device_probe_and_attach(sc->exca.pccarddev) != 0) - DEVPRINTF((brdev, "WARNING: cannot attach pccard bus.\n")); /* Map and establish the interrupt. */ rid = 0;