Tue Jul 7 10:46:27 2020 UTC ()
Pull up following revision(s) (requested by isaki in ticket #983):

	sys/dev/pci/auixp.c: revision 1.50

Fix an argument passes to auixp_intr().

This is rest of rev 1.39 (split device_t/softc) in 2012.
Problem reported and tested by Riccardo Mottola.


(martin)
diff -r1.47.2.1 -r1.47.2.2 src/sys/dev/pci/auixp.c

cvs diff -r1.47.2.1 -r1.47.2.2 src/sys/dev/pci/auixp.c (expand / switch to unified diff)

--- src/sys/dev/pci/auixp.c 2020/03/21 15:31:50 1.47.2.1
+++ src/sys/dev/pci/auixp.c 2020/07/07 10:46:27 1.47.2.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: auixp.c,v 1.47.2.1 2020/03/21 15:31:50 martin Exp $ */ 1/* $NetBSD: auixp.c,v 1.47.2.2 2020/07/07 10:46:27 martin Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2004, 2005 Reinoud Zandijk <reinoud@netbsd.org> 4 * Copyright (c) 2004, 2005 Reinoud Zandijk <reinoud@netbsd.org>
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. The name of the author may not be used to endorse or promote products 12 * 2. The name of the author may not be used to endorse or promote products
13 * derived from this software without specific prior written permission. 13 * derived from this software without specific prior written permission.
14 * 3. All advertising materials mentioning features or use of this software 14 * 3. All advertising materials mentioning features or use of this software
@@ -40,27 +40,27 @@ @@ -40,27 +40,27 @@
40 * encodings. 40 * encodings.
41 * 41 *
42 * Known problems and issues : 42 * Known problems and issues :
43 * - SPDIF is untested and needs some work still (LED stays off) 43 * - SPDIF is untested and needs some work still (LED stays off)
44 * - 32 bit audio playback failed last time i tried but that might an AC'97 44 * - 32 bit audio playback failed last time i tried but that might an AC'97
45 * codec support problem. 45 * codec support problem.
46 * - 32 bit recording works but can't try out playing: see above. 46 * - 32 bit recording works but can't try out playing: see above.
47 * - no suspend/resume support yet. 47 * - no suspend/resume support yet.
48 * - multiple codecs are `supported' but not tested; the implemetation needs 48 * - multiple codecs are `supported' but not tested; the implemetation needs
49 * some cleaning up. 49 * some cleaning up.
50 */ 50 */
51 51
52#include <sys/cdefs.h> 52#include <sys/cdefs.h>
53__KERNEL_RCSID(0, "$NetBSD: auixp.c,v 1.47.2.1 2020/03/21 15:31:50 martin Exp $"); 53__KERNEL_RCSID(0, "$NetBSD: auixp.c,v 1.47.2.2 2020/07/07 10:46:27 martin Exp $");
54 54
55#include <sys/types.h> 55#include <sys/types.h>
56#include <sys/errno.h> 56#include <sys/errno.h>
57#include <sys/null.h> 57#include <sys/null.h>
58#include <sys/param.h> 58#include <sys/param.h>
59#include <sys/systm.h> 59#include <sys/systm.h>
60#include <sys/kmem.h> 60#include <sys/kmem.h>
61#include <sys/device.h> 61#include <sys/device.h>
62#include <sys/conf.h> 62#include <sys/conf.h>
63#include <sys/exec.h> 63#include <sys/exec.h>
64#include <sys/select.h> 64#include <sys/select.h>
65#include <sys/audioio.h> 65#include <sys/audioio.h>
66#include <sys/queue.h> 66#include <sys/queue.h>
@@ -1113,27 +1113,27 @@ auixp_attach(device_t parent, device_t s @@ -1113,27 +1113,27 @@ auixp_attach(device_t parent, device_t s
1113 if (pci_intr_map(pa, &ih)) { 1113 if (pci_intr_map(pa, &ih)) {
1114 aprint_error_dev(sc->sc_dev, "can't map interrupt\n"); 1114 aprint_error_dev(sc->sc_dev, "can't map interrupt\n");
1115 return; 1115 return;
1116 } 1116 }
1117 1117
1118 /* where are we connected at ? */ 1118 /* where are we connected at ? */
1119 intrstr = pci_intr_string(pc, ih, intrbuf, sizeof(intrbuf)); 1119 intrstr = pci_intr_string(pc, ih, intrbuf, sizeof(intrbuf));
1120 1120
1121 mutex_init(&sc->sc_lock, MUTEX_DEFAULT, IPL_NONE); 1121 mutex_init(&sc->sc_lock, MUTEX_DEFAULT, IPL_NONE);
1122 mutex_init(&sc->sc_intr_lock, MUTEX_DEFAULT, IPL_AUDIO); 1122 mutex_init(&sc->sc_intr_lock, MUTEX_DEFAULT, IPL_AUDIO);
1123 1123
1124 /* establish interrupt routine hookup at IPL_AUDIO level */ 1124 /* establish interrupt routine hookup at IPL_AUDIO level */
1125 sc->sc_ih = pci_intr_establish_xname(pc, ih, IPL_AUDIO, auixp_intr, 1125 sc->sc_ih = pci_intr_establish_xname(pc, ih, IPL_AUDIO, auixp_intr,
1126 self, device_xname(self)); 1126 sc, device_xname(self));
1127 if (sc->sc_ih == NULL) { 1127 if (sc->sc_ih == NULL) {
1128 aprint_error_dev(sc->sc_dev, "can't establish interrupt"); 1128 aprint_error_dev(sc->sc_dev, "can't establish interrupt");
1129 if (intrstr != NULL) 1129 if (intrstr != NULL)
1130 aprint_error(" at %s", intrstr); 1130 aprint_error(" at %s", intrstr);
1131 aprint_error("\n"); 1131 aprint_error("\n");
1132 return; 1132 return;
1133 } 1133 }
1134 aprint_normal_dev(sc->sc_dev, "interrupting at %s\n", intrstr); 1134 aprint_normal_dev(sc->sc_dev, "interrupting at %s\n", intrstr);
1135 1135
1136 /* power up chip */ 1136 /* power up chip */
1137 if ((error = pci_activate(pa->pa_pc, pa->pa_tag, self, 1137 if ((error = pci_activate(pa->pa_pc, pa->pa_tag, self,
1138 pci_activate_null)) && error != EOPNOTSUPP) { 1138 pci_activate_null)) && error != EOPNOTSUPP) {
1139 aprint_error_dev(sc->sc_dev, "cannot activate %d\n", 1139 aprint_error_dev(sc->sc_dev, "cannot activate %d\n",