provide intr xnamediff -r1.37 -r1.38 src/sys/dev/pci/ahcisata_pci.c
(jdolecek)
--- src/sys/dev/pci/ahcisata_pci.c 2016/08/23 09:47:50 1.37
+++ src/sys/dev/pci/ahcisata_pci.c 2016/10/13 17:11:09 1.38
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ahcisata_pci.c,v 1.37 2016/08/23 09:47:50 msaitoh Exp $ */ | 1 | /* $NetBSD: ahcisata_pci.c,v 1.38 2016/10/13 17:11:09 jdolecek Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2006 Manuel Bouyer. | 4 | * Copyright (c) 2006 Manuel Bouyer. | |
5 | * | 5 | * | |
6 | * Redistribution and use in source and binary forms, with or without | 6 | * Redistribution and use in source and binary forms, with or without | |
7 | * modification, are permitted provided that the following conditions | 7 | * modification, are permitted provided that the following conditions | |
8 | * are met: | 8 | * are met: | |
9 | * 1. Redistributions of source code must retain the above copyright | 9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice, this list of conditions and the following disclaimer. | 10 | * notice, this list of conditions and the following disclaimer. | |
11 | * 2. Redistributions in binary form must reproduce the above copyright | 11 | * 2. Redistributions in binary form must reproduce the above copyright | |
12 | * notice, this list of conditions and the following disclaimer in the | 12 | * notice, this list of conditions and the following disclaimer in the | |
13 | * documentation and/or other materials provided with the distribution. | 13 | * documentation and/or other materials provided with the distribution. | |
14 | * | 14 | * | |
@@ -16,27 +16,27 @@ | @@ -16,27 +16,27 @@ | |||
16 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 16 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | |
17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
18 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | 18 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | |
19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | |
20 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 20 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
21 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 21 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
22 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 22 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
24 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
25 | * | 25 | * | |
26 | */ | 26 | */ | |
27 | 27 | |||
28 | #include <sys/cdefs.h> | 28 | #include <sys/cdefs.h> | |
29 | __KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.37 2016/08/23 09:47:50 msaitoh Exp $"); | 29 | __KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.38 2016/10/13 17:11:09 jdolecek Exp $"); | |
30 | 30 | |||
31 | #include <sys/types.h> | 31 | #include <sys/types.h> | |
32 | #include <sys/malloc.h> | 32 | #include <sys/malloc.h> | |
33 | #include <sys/param.h> | 33 | #include <sys/param.h> | |
34 | #include <sys/kernel.h> | 34 | #include <sys/kernel.h> | |
35 | #include <sys/systm.h> | 35 | #include <sys/systm.h> | |
36 | #include <sys/disklabel.h> | 36 | #include <sys/disklabel.h> | |
37 | #include <sys/pmf.h> | 37 | #include <sys/pmf.h> | |
38 | 38 | |||
39 | #include <dev/pci/pcivar.h> | 39 | #include <dev/pci/pcivar.h> | |
40 | #include <dev/pci/pcidevs.h> | 40 | #include <dev/pci/pcidevs.h> | |
41 | #include <dev/pci/pciidereg.h> | 41 | #include <dev/pci/pciidereg.h> | |
42 | #include <dev/pci/pciidevar.h> | 42 | #include <dev/pci/pciidevar.h> | |
@@ -282,27 +282,28 @@ ahci_pci_attach(device_t parent, device_ | @@ -282,27 +282,28 @@ ahci_pci_attach(device_t parent, device_ | |||
282 | return; | 282 | return; | |
283 | } | 283 | } | |
284 | psc->sc_pc = pa->pa_pc; | 284 | psc->sc_pc = pa->pa_pc; | |
285 | psc->sc_pcitag = pa->pa_tag; | 285 | psc->sc_pcitag = pa->pa_tag; | |
286 | 286 | |||
287 | pci_aprint_devinfo(pa, "AHCI disk controller"); | 287 | pci_aprint_devinfo(pa, "AHCI disk controller"); | |
288 | 288 | |||
289 | if (pci_intr_map(pa, &intrhandle) != 0) { | 289 | if (pci_intr_map(pa, &intrhandle) != 0) { | |
290 | aprint_error_dev(self, "couldn't map interrupt\n"); | 290 | aprint_error_dev(self, "couldn't map interrupt\n"); | |
291 | return; | 291 | return; | |
292 | } | 292 | } | |
293 | intrstr = pci_intr_string(pa->pa_pc, intrhandle, | 293 | intrstr = pci_intr_string(pa->pa_pc, intrhandle, | |
294 | intrbuf, sizeof(intrbuf)); | 294 | intrbuf, sizeof(intrbuf)); | |
295 | psc->sc_ih = pci_intr_establish(pa->pa_pc, intrhandle, IPL_BIO, ahci_intr, sc); | 295 | psc->sc_ih = pci_intr_establish_xname(pa->pa_pc, intrhandle, IPL_BIO, | |
296 | ahci_intr, sc, device_xname(sc->sc_atac.atac_dev)); | |||
296 | if (psc->sc_ih == NULL) { | 297 | if (psc->sc_ih == NULL) { | |
297 | aprint_error_dev(self, "couldn't establish interrupt\n"); | 298 | aprint_error_dev(self, "couldn't establish interrupt\n"); | |
298 | return; | 299 | return; | |
299 | } | 300 | } | |
300 | aprint_normal_dev(self, "interrupting at %s\n", intrstr); | 301 | aprint_normal_dev(self, "interrupting at %s\n", intrstr); | |
301 | 302 | |||
302 | sc->sc_dmat = pa->pa_dmat; | 303 | sc->sc_dmat = pa->pa_dmat; | |
303 | 304 | |||
304 | sc->sc_ahci_quirks = ahci_pci_has_quirk(PCI_VENDOR(pa->pa_id), | 305 | sc->sc_ahci_quirks = ahci_pci_has_quirk(PCI_VENDOR(pa->pa_id), | |
305 | PCI_PRODUCT(pa->pa_id)); | 306 | PCI_PRODUCT(pa->pa_id)); | |
306 | 307 | |||
307 | ahci_cap_64bit = (AHCI_READ(sc, AHCI_CAP) & AHCI_CAP_64BIT) != 0; | 308 | ahci_cap_64bit = (AHCI_READ(sc, AHCI_CAP) & AHCI_CAP_64BIT) != 0; | |
308 | ahci_bad_64bit = ((sc->sc_ahci_quirks & AHCI_PCI_QUIRK_BAD64) != 0); | 309 | ahci_bad_64bit = ((sc->sc_ahci_quirks & AHCI_PCI_QUIRK_BAD64) != 0); |
--- src/sys/dev/pci/bha_pci.c 2014/10/18 08:33:28 1.40
+++ src/sys/dev/pci/bha_pci.c 2016/10/13 17:11:09 1.41
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: bha_pci.c,v 1.40 2014/10/18 08:33:28 snj Exp $ */ | 1 | /* $NetBSD: bha_pci.c,v 1.41 2016/10/13 17:11:09 jdolecek Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1998 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1998 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Charles M. Hannum. | 8 | * by Charles M. Hannum. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -20,27 +20,27 @@ | @@ -20,27 +20,27 @@ | |||
20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
29 | * POSSIBILITY OF SUCH DAMAGE. | 29 | * POSSIBILITY OF SUCH DAMAGE. | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | #include <sys/cdefs.h> | 32 | #include <sys/cdefs.h> | |
33 | __KERNEL_RCSID(0, "$NetBSD: bha_pci.c,v 1.40 2014/10/18 08:33:28 snj Exp $"); | 33 | __KERNEL_RCSID(0, "$NetBSD: bha_pci.c,v 1.41 2016/10/13 17:11:09 jdolecek Exp $"); | |
34 | 34 | |||
35 | #include <sys/param.h> | 35 | #include <sys/param.h> | |
36 | #include <sys/systm.h> | 36 | #include <sys/systm.h> | |
37 | #include <sys/device.h> | 37 | #include <sys/device.h> | |
38 | 38 | |||
39 | #include <sys/bus.h> | 39 | #include <sys/bus.h> | |
40 | #include <sys/intr.h> | 40 | #include <sys/intr.h> | |
41 | 41 | |||
42 | #include <dev/scsipi/scsipi_all.h> | 42 | #include <dev/scsipi/scsipi_all.h> | |
43 | #include <dev/scsipi/scsiconf.h> | 43 | #include <dev/scsipi/scsiconf.h> | |
44 | 44 | |||
45 | #include <dev/pci/pcivar.h> | 45 | #include <dev/pci/pcivar.h> | |
46 | #include <dev/pci/pcidevs.h> | 46 | #include <dev/pci/pcidevs.h> | |
@@ -123,27 +123,28 @@ bha_pci_attach(device_t parent, device_t | @@ -123,27 +123,28 @@ bha_pci_attach(device_t parent, device_t | |||
123 | panic("bha_pci_attach: bha_find failed"); | 123 | panic("bha_pci_attach: bha_find failed"); | |
124 | 124 | |||
125 | sc->sc_dmaflags = 0; | 125 | sc->sc_dmaflags = 0; | |
126 | 126 | |||
127 | csr = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG); | 127 | csr = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG); | |
128 | pci_conf_write(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, | 128 | pci_conf_write(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, | |
129 | csr | PCI_COMMAND_MASTER_ENABLE | PCI_COMMAND_IO_ENABLE); | 129 | csr | PCI_COMMAND_MASTER_ENABLE | PCI_COMMAND_IO_ENABLE); | |
130 | 130 | |||
131 | if (pci_intr_map(pa, &ih)) { | 131 | if (pci_intr_map(pa, &ih)) { | |
132 | aprint_error_dev(sc->sc_dev, "couldn't map interrupt\n"); | 132 | aprint_error_dev(sc->sc_dev, "couldn't map interrupt\n"); | |
133 | return; | 133 | return; | |
134 | } | 134 | } | |
135 | intrstr = pci_intr_string(pc, ih, intrbuf, sizeof(intrbuf)); | 135 | intrstr = pci_intr_string(pc, ih, intrbuf, sizeof(intrbuf)); | |
136 | sc->sc_ih = pci_intr_establish(pc, ih, IPL_BIO, bha_intr, sc); | 136 | sc->sc_ih = pci_intr_establish_xname(pc, ih, IPL_BIO, bha_intr, sc, | |
137 | device_xname(sc->sc_dev)); | |||
137 | if (sc->sc_ih == NULL) { | 138 | if (sc->sc_ih == NULL) { | |
138 | aprint_error_dev(sc->sc_dev, "couldn't establish interrupt"); | 139 | aprint_error_dev(sc->sc_dev, "couldn't establish interrupt"); | |
139 | if (intrstr != NULL) | 140 | if (intrstr != NULL) | |
140 | aprint_error(" at %s", intrstr); | 141 | aprint_error(" at %s", intrstr); | |
141 | aprint_error("\n"); | 142 | aprint_error("\n"); | |
142 | return; | 143 | return; | |
143 | } | 144 | } | |
144 | aprint_normal_dev(sc->sc_dev, "interrupting at %s\n", intrstr); | 145 | aprint_normal_dev(sc->sc_dev, "interrupting at %s\n", intrstr); | |
145 | 146 | |||
146 | bha_attach(sc); | 147 | bha_attach(sc); | |
147 | 148 | |||
148 | bha_disable_isacompat(sc); | 149 | bha_disable_isacompat(sc); | |
149 | } | 150 | } |
--- src/sys/dev/pci/pciide_common.c 2016/07/07 06:55:41 1.61
+++ src/sys/dev/pci/pciide_common.c 2016/10/13 17:11:09 1.62
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: pciide_common.c,v 1.61 2016/07/07 06:55:41 msaitoh Exp $ */ | 1 | /* $NetBSD: pciide_common.c,v 1.62 2016/10/13 17:11:09 jdolecek Exp $ */ | |
2 | 2 | |||
3 | 3 | |||
4 | /* | 4 | /* | |
5 | * Copyright (c) 1999, 2000, 2001, 2003 Manuel Bouyer. | 5 | * Copyright (c) 1999, 2000, 2001, 2003 Manuel Bouyer. | |
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. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -60,27 +60,27 @@ | @@ -60,27 +60,27 @@ | |||
60 | /* | 60 | /* | |
61 | * PCI IDE controller driver. | 61 | * PCI IDE controller driver. | |
62 | * | 62 | * | |
63 | * Author: Christopher G. Demetriou, March 2, 1998 (derived from NetBSD | 63 | * Author: Christopher G. Demetriou, March 2, 1998 (derived from NetBSD | |
64 | * sys/dev/pci/ppb.c, revision 1.16). | 64 | * sys/dev/pci/ppb.c, revision 1.16). | |
65 | * | 65 | * | |
66 | * See "PCI IDE Controller Specification, Revision 1.0 3/4/94" and | 66 | * See "PCI IDE Controller Specification, Revision 1.0 3/4/94" and | |
67 | * "Programming Interface for Bus Master IDE Controller, Revision 1.0 | 67 | * "Programming Interface for Bus Master IDE Controller, Revision 1.0 | |
68 | * 5/16/94" from the PCI SIG. | 68 | * 5/16/94" from the PCI SIG. | |
69 | * | 69 | * | |
70 | */ | 70 | */ | |
71 | 71 | |||
72 | #include <sys/cdefs.h> | 72 | #include <sys/cdefs.h> | |
73 | __KERNEL_RCSID(0, "$NetBSD: pciide_common.c,v 1.61 2016/07/07 06:55:41 msaitoh Exp $"); | 73 | __KERNEL_RCSID(0, "$NetBSD: pciide_common.c,v 1.62 2016/10/13 17:11:09 jdolecek Exp $"); | |
74 | 74 | |||
75 | #include <sys/param.h> | 75 | #include <sys/param.h> | |
76 | #include <sys/malloc.h> | 76 | #include <sys/malloc.h> | |
77 | 77 | |||
78 | #include <dev/pci/pcireg.h> | 78 | #include <dev/pci/pcireg.h> | |
79 | #include <dev/pci/pcivar.h> | 79 | #include <dev/pci/pcivar.h> | |
80 | #include <dev/pci/pcidevs.h> | 80 | #include <dev/pci/pcidevs.h> | |
81 | #include <dev/pci/pciidereg.h> | 81 | #include <dev/pci/pciidereg.h> | |
82 | #include <dev/pci/pciidevar.h> | 82 | #include <dev/pci/pciidevar.h> | |
83 | 83 | |||
84 | #include <dev/ic/wdcreg.h> | 84 | #include <dev/ic/wdcreg.h> | |
85 | 85 | |||
86 | #ifdef ATADEBUG | 86 | #ifdef ATADEBUG | |
@@ -344,28 +344,29 @@ pciide_mapregs_native(const struct pci_a | @@ -344,28 +344,29 @@ pciide_mapregs_native(const struct pci_a | |||
344 | pci_intr_handle_t intrhandle; | 344 | pci_intr_handle_t intrhandle; | |
345 | int i; | 345 | int i; | |
346 | char intrbuf[PCI_INTRSTR_LEN]; | 346 | char intrbuf[PCI_INTRSTR_LEN]; | |
347 | 347 | |||
348 | cp->compat = 0; | 348 | cp->compat = 0; | |
349 | 349 | |||
350 | if (sc->sc_pci_ih == NULL) { | 350 | if (sc->sc_pci_ih == NULL) { | |
351 | if (pci_intr_map(pa, &intrhandle) != 0) { | 351 | if (pci_intr_map(pa, &intrhandle) != 0) { | |
352 | aprint_error_dev(sc->sc_wdcdev.sc_atac.atac_dev, | 352 | aprint_error_dev(sc->sc_wdcdev.sc_atac.atac_dev, | |
353 | "couldn't map native-PCI interrupt\n"); | 353 | "couldn't map native-PCI interrupt\n"); | |
354 | goto bad; | 354 | goto bad; | |
355 | } | 355 | } | |
356 | intrstr = pci_intr_string(pa->pa_pc, intrhandle, intrbuf, sizeof(intrbuf)); | 356 | intrstr = pci_intr_string(pa->pa_pc, intrhandle, intrbuf, sizeof(intrbuf)); | |
357 | sc->sc_pci_ih = pci_intr_establish(pa->pa_pc, | 357 | sc->sc_pci_ih = pci_intr_establish_xname(pa->pa_pc, | |
358 | intrhandle, IPL_BIO, pci_intr, sc); | 358 | intrhandle, IPL_BIO, pci_intr, sc, | |
359 | device_xname(sc->sc_wdcdev.sc_atac.atac_dev)); | |||
359 | if (sc->sc_pci_ih != NULL) { | 360 | if (sc->sc_pci_ih != NULL) { | |
360 | aprint_normal_dev(sc->sc_wdcdev.sc_atac.atac_dev, | 361 | aprint_normal_dev(sc->sc_wdcdev.sc_atac.atac_dev, | |
361 | "using %s for native-PCI interrupt\n", | 362 | "using %s for native-PCI interrupt\n", | |
362 | intrstr ? intrstr : "unknown interrupt"); | 363 | intrstr ? intrstr : "unknown interrupt"); | |
363 | } else { | 364 | } else { | |
364 | aprint_error_dev(sc->sc_wdcdev.sc_atac.atac_dev, | 365 | aprint_error_dev(sc->sc_wdcdev.sc_atac.atac_dev, | |
365 | "couldn't establish native-PCI interrupt"); | 366 | "couldn't establish native-PCI interrupt"); | |
366 | if (intrstr != NULL) | 367 | if (intrstr != NULL) | |
367 | aprint_error(" at %s", intrstr); | 368 | aprint_error(" at %s", intrstr); | |
368 | aprint_error("\n"); | 369 | aprint_error("\n"); | |
369 | goto bad; | 370 | goto bad; | |
370 | } | 371 | } | |
371 | } | 372 | } |
--- src/sys/dev/pci/piixpm.c 2016/07/18 21:09:05 1.50
+++ src/sys/dev/pci/piixpm.c 2016/10/13 17:11:09 1.51
@@ -1,38 +1,38 @@ | @@ -1,38 +1,38 @@ | |||
1 | /* $NetBSD: piixpm.c,v 1.50 2016/07/18 21:09:05 pgoyette Exp $ */ | 1 | /* $NetBSD: piixpm.c,v 1.51 2016/10/13 17:11:09 jdolecek Exp $ */ | |
2 | /* $OpenBSD: piixpm.c,v 1.20 2006/02/27 08:25:02 grange Exp $ */ | 2 | /* $OpenBSD: piixpm.c,v 1.20 2006/02/27 08:25:02 grange Exp $ */ | |
3 | 3 | |||
4 | /* | 4 | /* | |
5 | * Copyright (c) 2005, 2006 Alexander Yurchenko <grange@openbsd.org> | 5 | * Copyright (c) 2005, 2006 Alexander Yurchenko <grange@openbsd.org> | |
6 | * | 6 | * | |
7 | * Permission to use, copy, modify, and distribute this software for any | 7 | * Permission to use, copy, modify, and distribute this software for any | |
8 | * purpose with or without fee is hereby granted, provided that the above | 8 | * purpose with or without fee is hereby granted, provided that the above | |
9 | * copyright notice and this permission notice appear in all copies. | 9 | * copyright notice and this permission notice appear in all copies. | |
10 | * | 10 | * | |
11 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | 11 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
12 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | 12 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
13 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | 13 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
14 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | 14 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
15 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | 15 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
16 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | 16 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
17 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 17 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
18 | */ | 18 | */ | |
19 | 19 | |||
20 | /* | 20 | /* | |
21 | * Intel PIIX and compatible Power Management controller driver. | 21 | * Intel PIIX and compatible Power Management controller driver. | |
22 | */ | 22 | */ | |
23 | 23 | |||
24 | #include <sys/cdefs.h> | 24 | #include <sys/cdefs.h> | |
25 | __KERNEL_RCSID(0, "$NetBSD: piixpm.c,v 1.50 2016/07/18 21:09:05 pgoyette Exp $"); | 25 | __KERNEL_RCSID(0, "$NetBSD: piixpm.c,v 1.51 2016/10/13 17:11:09 jdolecek Exp $"); | |
26 | 26 | |||
27 | #include <sys/param.h> | 27 | #include <sys/param.h> | |
28 | #include <sys/systm.h> | 28 | #include <sys/systm.h> | |
29 | #include <sys/device.h> | 29 | #include <sys/device.h> | |
30 | #include <sys/kernel.h> | 30 | #include <sys/kernel.h> | |
31 | #include <sys/mutex.h> | 31 | #include <sys/mutex.h> | |
32 | #include <sys/proc.h> | 32 | #include <sys/proc.h> | |
33 | 33 | |||
34 | #include <sys/bus.h> | 34 | #include <sys/bus.h> | |
35 | 35 | |||
36 | #include <dev/pci/pcidevs.h> | 36 | #include <dev/pci/pcidevs.h> | |
37 | #include <dev/pci/pcireg.h> | 37 | #include <dev/pci/pcireg.h> | |
38 | #include <dev/pci/pcivar.h> | 38 | #include <dev/pci/pcivar.h> | |
@@ -246,28 +246,28 @@ nopowermanagement: | @@ -246,28 +246,28 @@ nopowermanagement: | |||
246 | return; | 246 | return; | |
247 | } | 247 | } | |
248 | 248 | |||
249 | sc->sc_poll = 1; | 249 | sc->sc_poll = 1; | |
250 | aprint_normal_dev(self, ""); | 250 | aprint_normal_dev(self, ""); | |
251 | if ((conf & PIIX_SMB_HOSTC_INTMASK) == PIIX_SMB_HOSTC_SMI) { | 251 | if ((conf & PIIX_SMB_HOSTC_INTMASK) == PIIX_SMB_HOSTC_SMI) { | |
252 | /* No PCI IRQ */ | 252 | /* No PCI IRQ */ | |
253 | aprint_normal("interrupting at SMI, "); | 253 | aprint_normal("interrupting at SMI, "); | |
254 | } else if ((conf & PIIX_SMB_HOSTC_INTMASK) == PIIX_SMB_HOSTC_IRQ) { | 254 | } else if ((conf & PIIX_SMB_HOSTC_INTMASK) == PIIX_SMB_HOSTC_IRQ) { | |
255 | /* Install interrupt handler */ | 255 | /* Install interrupt handler */ | |
256 | if (pci_intr_map(pa, &ih) == 0) { | 256 | if (pci_intr_map(pa, &ih) == 0) { | |
257 | intrstr = pci_intr_string(pa->pa_pc, ih, intrbuf, | 257 | intrstr = pci_intr_string(pa->pa_pc, ih, intrbuf, | |
258 | sizeof(intrbuf)); | 258 | sizeof(intrbuf)); | |
259 | sc->sc_smb_ih = pci_intr_establish(pa->pa_pc, ih, | 259 | sc->sc_smb_ih = pci_intr_establish_xname(pa->pa_pc, ih, | |
260 | IPL_BIO, piixpm_intr, sc); | 260 | IPL_BIO, piixpm_intr, sc, device_xname(sc->sc_dev)); | |
261 | if (sc->sc_smb_ih != NULL) { | 261 | if (sc->sc_smb_ih != NULL) { | |
262 | aprint_normal("interrupting at %s", intrstr); | 262 | aprint_normal("interrupting at %s", intrstr); | |
263 | sc->sc_poll = 0; | 263 | sc->sc_poll = 0; | |
264 | } | 264 | } | |
265 | } | 265 | } | |
266 | } | 266 | } | |
267 | if (sc->sc_poll) | 267 | if (sc->sc_poll) | |
268 | aprint_normal("polling"); | 268 | aprint_normal("polling"); | |
269 | 269 | |||
270 | aprint_normal("\n"); | 270 | aprint_normal("\n"); | |
271 | 271 | |||
272 | attach_i2c: | 272 | attach_i2c: | |
273 | for (i = 0; i < sc->sc_numbusses; i++) | 273 | for (i = 0; i < sc->sc_numbusses; i++) |