Module Name: src Committed By: martin Date: Sun Jan 14 15:24:06 UTC 2024
Modified Files: src/sys/dev/pci [netbsd-10]: cmpci.c fms.c sv.c yds.c Log Message: Pull up following revision(s) (requested by chs in ticket #542): sys/dev/pci/yds.c: revision 1.69 sys/dev/pci/cmpci.c: revision 1.61 sys/dev/pci/sv.c: revision 1.62 sys/dev/pci/fms.c: revision 1.50 mpu / opl: add an interface attribute to config_found() calls for these specify an interface attribute when attaching mpu and opl devices. the PCI devices that are the parents of these midi devices (cmpci, eso, fms, sv, yds) have two interface attributes: "audiobus", and also one named the same as the parent device, eg. "cmpci" has an interface attribute named "cmpci". we must specify the latter one to attach these children. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.60.4.1 src/sys/dev/pci/cmpci.c cvs rdiff -u -r1.49 -r1.49.6.1 src/sys/dev/pci/fms.c cvs rdiff -u -r1.61 -r1.61.6.1 src/sys/dev/pci/sv.c cvs rdiff -u -r1.68 -r1.68.6.1 src/sys/dev/pci/yds.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/cmpci.c diff -u src/sys/dev/pci/cmpci.c:1.60 src/sys/dev/pci/cmpci.c:1.60.4.1 --- src/sys/dev/pci/cmpci.c:1.60 Tue May 31 08:43:15 2022 +++ src/sys/dev/pci/cmpci.c Sun Jan 14 15:24:06 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: cmpci.c,v 1.60 2022/05/31 08:43:15 andvar Exp $ */ +/* $NetBSD: cmpci.c,v 1.60.4.1 2024/01/14 15:24:06 martin Exp $ */ /* * Copyright (c) 2000, 2001, 2008 The NetBSD Foundation, Inc. @@ -43,7 +43,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cmpci.c,v 1.60 2022/05/31 08:43:15 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cmpci.c,v 1.60.4.1 2024/01/14 15:24:06 martin Exp $"); #if defined(AUDIO_DEBUG) || defined(DEBUG) #define DPRINTF(x) if (cmpcidebug) printf x @@ -419,7 +419,7 @@ cmpci_attach(device_t parent, device_t s aa.type = AUDIODEV_TYPE_OPL; aa.hwif = NULL; aa.hdl = NULL; - (void)config_found(sc->sc_dev, &aa, audioprint, CFARGS_NONE); + (void)config_found(sc->sc_dev, &aa, audioprint, CFARGS(.iattr = "cmpci")); /* attach MPU-401 device */ aa.type = AUDIODEV_TYPE_MPU; @@ -428,7 +428,7 @@ cmpci_attach(device_t parent, device_t s if (bus_space_subregion(sc->sc_iot, sc->sc_ioh, CMPCI_REG_MPU_BASE, CMPCI_REG_MPU_SIZE, &sc->sc_mpu_ioh) == 0) sc->sc_mpudev = config_found(sc->sc_dev, &aa, audioprint, - CFARGS_NONE); + CFARGS(.iattr = "cmpci")); /* get initial value (this is 0 and may be omitted but just in case) */ sc->sc_reg_misc = bus_space_read_4(sc->sc_iot, sc->sc_ioh, Index: src/sys/dev/pci/fms.c diff -u src/sys/dev/pci/fms.c:1.49 src/sys/dev/pci/fms.c:1.49.6.1 --- src/sys/dev/pci/fms.c:1.49 Sat Aug 7 16:19:14 2021 +++ src/sys/dev/pci/fms.c Sun Jan 14 15:24:06 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: fms.c,v 1.49 2021/08/07 16:19:14 thorpej Exp $ */ +/* $NetBSD: fms.c,v 1.49.6.1 2024/01/14 15:24:06 martin Exp $ */ /*- * Copyright (c) 1999, 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fms.c,v 1.49 2021/08/07 16:19:14 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fms.c,v 1.49.6.1 2024/01/14 15:24:06 martin Exp $"); #include "mpu.h" @@ -325,12 +325,13 @@ fms_attach(device_t parent, device_t sel aa.type = AUDIODEV_TYPE_OPL; aa.hwif = NULL; aa.hdl = NULL; - config_found(sc->sc_dev, &aa, audioprint, CFARGS_NONE); + config_found(sc->sc_dev, &aa, audioprint, CFARGS(.iattr = "fms")); aa.type = AUDIODEV_TYPE_MPU; aa.hwif = NULL; aa.hdl = NULL; - sc->sc_mpu_dev = config_found(sc->sc_dev, &aa, audioprint, CFARGS_NONE); + sc->sc_mpu_dev = config_found(sc->sc_dev, &aa, audioprint, + CFARGS(.iattr = "fms")); } /* Index: src/sys/dev/pci/sv.c diff -u src/sys/dev/pci/sv.c:1.61 src/sys/dev/pci/sv.c:1.61.6.1 --- src/sys/dev/pci/sv.c:1.61 Sat Aug 7 16:19:14 2021 +++ src/sys/dev/pci/sv.c Sun Jan 14 15:24:06 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: sv.c,v 1.61 2021/08/07 16:19:14 thorpej Exp $ */ +/* $NetBSD: sv.c,v 1.61.6.1 2024/01/14 15:24:06 martin Exp $ */ /* $OpenBSD: sv.c,v 1.2 1998/07/13 01:50:15 csapuntz Exp $ */ /* @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sv.c,v 1.61 2021/08/07 16:19:14 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sv.c,v 1.61.6.1 2024/01/14 15:24:06 martin Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -449,7 +449,7 @@ sv_attach(device_t parent, device_t self arg.type = AUDIODEV_TYPE_OPL; arg.hwif = 0; arg.hdl = 0; - (void)config_found(self, &arg, audioprint, CFARGS_NONE); + (void)config_found(self, &arg, audioprint, CFARGS(.iattr = "sv")); sc->sc_pa = *pa; /* for deferred setup */ config_defer(self, sv_defer); Index: src/sys/dev/pci/yds.c diff -u src/sys/dev/pci/yds.c:1.68 src/sys/dev/pci/yds.c:1.68.6.1 --- src/sys/dev/pci/yds.c:1.68 Sat Aug 7 16:19:14 2021 +++ src/sys/dev/pci/yds.c Sun Jan 14 15:24:06 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: yds.c,v 1.68 2021/08/07 16:19:14 thorpej Exp $ */ +/* $NetBSD: yds.c,v 1.68.6.1 2024/01/14 15:24:06 martin Exp $ */ /* * Copyright (c) 2000, 2001 Kazuki Sakamoto and Minoura Makoto. @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: yds.c,v 1.68 2021/08/07 16:19:14 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: yds.c,v 1.68.6.1 2024/01/14 15:24:06 martin Exp $"); #include "mpu.h" @@ -592,7 +592,8 @@ yds_configure_legacy(device_t self) aa.type = AUDIODEV_TYPE_OPL; aa.hwif = aa.hdl = NULL; - dev = config_found(self, &aa, audioprint, CFARGS_NONE); + dev = config_found(self, &aa, audioprint, + CFARGS(.iattr = "yds")); if (dev == 0) bus_space_unmap(sc->sc_opl_iot, sc->sc_opl_ioh, 4); @@ -628,7 +629,8 @@ yds_configure_legacy(device_t self) aa.type = AUDIODEV_TYPE_MPU; aa.hwif = aa.hdl = NULL; - dev = config_found(self, &aa, audioprint, CFARGS_NONE); + dev = config_found(self, &aa, audioprint, + CFARGS(.iattr = "yds")); if (dev == 0) bus_space_unmap(sc->sc_mpu_iot, sc->sc_mpu_ioh, 2);