Use {isa,pci}_intr_establish"_xname"() for intrctl(8).

This commit is contained in:
msaitoh 2017-04-27 10:01:53 +00:00
parent 43e3926fc2
commit b8e169d62e
8 changed files with 36 additions and 31 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: tpm_isa.c,v 1.2 2012/02/06 04:29:47 christos Exp $ */
/* $NetBSD: tpm_isa.c,v 1.3 2017/04/27 10:01:53 msaitoh Exp $ */
/*
* Copyright (c) 2008, 2009 Michael Shalayeff
@ -19,7 +19,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tpm_isa.c,v 1.2 2012/02/06 04:29:47 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: tpm_isa.c,v 1.3 2017/04/27 10:01:53 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -129,8 +129,9 @@ tpm_isa_attach(device_t parent, device_t self, void *aux)
*/
if (sc->sc_init == tpm_tis12_init &&
ia->ia_irq[0].ir_irq != ISA_UNKNOWN_IRQ &&
(sc->sc_ih = isa_intr_establish(ia->ia_ic, ia->ia_irq[0].ir_irq,
IST_EDGE, IPL_TTY, tpm_intr, sc)) == NULL) {
(sc->sc_ih = isa_intr_establish_xname(ia->ia_ic,
ia->ia_irq[0].ir_irq, IST_EDGE, IPL_TTY, tpm_intr, sc,
device_xname(sc->sc_dev))) == NULL) {
bus_space_unmap(sc->sc_bt, sc->sc_bh, TPM_SIZE);
aprint_error_dev(sc->sc_dev, "cannot establish interrupt\n");
return;

View File

@ -1,4 +1,4 @@
/* $NetBSD: com_puc.c,v 1.23 2014/05/23 14:16:39 msaitoh Exp $ */
/* $NetBSD: com_puc.c,v 1.24 2017/04/27 10:01:54 msaitoh Exp $ */
/*
* Copyright (c) 1998 Christopher G. Demetriou. All rights reserved.
@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: com_puc.c,v 1.23 2014/05/23 14:16:39 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: com_puc.c,v 1.24 2017/04/27 10:01:54 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -106,9 +106,10 @@ com_puc_attach(device_t parent, device_t self, void *aux)
COM_INIT_REGS(sc->sc_regs, aa->t, aa->h, aa->a);
sc->sc_frequency = aa->flags & PUC_COM_CLOCKMASK;
intrstr = pci_intr_string(aa->pc, aa->intrhandle, intrbuf, sizeof(intrbuf));
psc->sc_ih = pci_intr_establish(aa->pc, aa->intrhandle, IPL_SERIAL,
comintr, sc);
intrstr = pci_intr_string(aa->pc, aa->intrhandle, intrbuf,
sizeof(intrbuf));
psc->sc_ih = pci_intr_establish_xname(aa->pc, aa->intrhandle,
IPL_SERIAL, comintr, sc, device_xname(self));
if (psc->sc_ih == NULL) {
aprint_error("couldn't establish interrupt");
if (intrstr != NULL)

View File

@ -1,4 +1,4 @@
/* $NetBSD: hdaudio_pci.c,v 1.6 2017/01/31 00:58:15 khorben Exp $ */
/* $NetBSD: hdaudio_pci.c,v 1.7 2017/04/27 10:01:54 msaitoh Exp $ */
/*
* Copyright (c) 2009 Precedence Technologies Ltd <support@precedence.co.uk>
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: hdaudio_pci.c,v 1.6 2017/01/31 00:58:15 khorben Exp $");
__KERNEL_RCSID(0, "$NetBSD: hdaudio_pci.c,v 1.7 2017/04/27 10:01:54 msaitoh Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -146,8 +146,8 @@ hdaudio_pci_attach(device_t parent, device_t self, void *opaque)
}
intrstr = pci_intr_string(pa->pa_pc, sc->sc_pihp[0], intrbuf,
sizeof(intrbuf));
sc->sc_ih = pci_intr_establish(pa->pa_pc, sc->sc_pihp[0], IPL_AUDIO,
hdaudio_pci_intr, sc);
sc->sc_ih = pci_intr_establish_xname(pa->pa_pc, sc->sc_pihp[0],
IPL_AUDIO, hdaudio_pci_intr, sc, device_xname(self));
if (sc->sc_ih == NULL) {
aprint_error_dev(self, "couldn't establish interrupt");
if (intrstr)

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_bge.c,v 1.309 2017/04/25 17:11:47 snj Exp $ */
/* $NetBSD: if_bge.c,v 1.310 2017/04/27 10:01:54 msaitoh Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.309 2017/04/25 17:11:47 snj Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.310 2017/04/27 10:01:54 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -3751,8 +3751,8 @@ alloc_retry:
intrstr = pci_intr_string(pc, sc->bge_pihp[0], intrbuf,
sizeof(intrbuf));
DPRINTFN(5, ("pci_intr_establish\n"));
sc->bge_intrhand = pci_intr_establish(pc, sc->bge_pihp[0], IPL_NET,
bge_intr, sc);
sc->bge_intrhand = pci_intr_establish_xname(pc, sc->bge_pihp[0],
IPL_NET, bge_intr, sc, device_xname(sc->bge_dev));
if (sc->bge_intrhand == NULL) {
intr_type = pci_intr_type(pc, sc->bge_pihp[0]);
aprint_error_dev(sc->bge_dev,"unable to establish %s\n",

View File

@ -60,7 +60,7 @@
#if 0
__FBSDID("$FreeBSD: head/sys/dev/ismt/ismt.c 266474 2014-05-20 19:55:06Z jimharris $");
#endif
__KERNEL_RCSID(0, "$NetBSD: ismt.c,v 1.4 2016/07/11 06:14:51 knakahara Exp $");
__KERNEL_RCSID(0, "$NetBSD: ismt.c,v 1.5 2017/04/27 10:01:54 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -761,8 +761,8 @@ ismt_attach(device_t parent, device_t self, void *aux)
}
intrstr = pci_intr_string(pa->pa_pc, sc->sc_pihp[0], intrbuf,
sizeof(intrbuf));
sc->sc_ih = pci_intr_establish(pa->pa_pc, sc->sc_pihp[0], IPL_BIO,
ismt_intr, sc);
sc->sc_ih = pci_intr_establish_xname(pa->pa_pc, sc->sc_pihp[0],
IPL_BIO, ismt_intr, sc, device_xname(self));
if (sc->sc_ih == NULL) {
aprint_error_dev(sc->pcidev, "unable to establish %s\n",
(pci_intr_type(pa->pa_pc, sc->sc_pihp[0])

View File

@ -1,4 +1,4 @@
/* $NetBSD: lpt_puc.c,v 1.17 2014/03/29 19:28:25 christos Exp $ */
/* $NetBSD: lpt_puc.c,v 1.18 2017/04/27 10:01:54 msaitoh Exp $ */
/*
* Copyright (c) 1998 Christopher G. Demetriou. All rights reserved.
@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lpt_puc.c,v 1.17 2014/03/29 19:28:25 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: lpt_puc.c,v 1.18 2017/04/27 10:01:54 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -79,9 +79,10 @@ lpt_puc_attach(device_t parent, device_t self, void *aux)
aprint_naive(": Parallel port");
aprint_normal(": ");
intrstr = pci_intr_string(aa->pc, aa->intrhandle, intrbuf, sizeof(intrbuf));
sc->sc_ih = pci_intr_establish(aa->pc, aa->intrhandle, IPL_TTY,
lptintr, sc);
intrstr = pci_intr_string(aa->pc, aa->intrhandle, intrbuf,
sizeof(intrbuf));
sc->sc_ih = pci_intr_establish_xname(aa->pc, aa->intrhandle, IPL_TTY,
lptintr, sc, device_xname(self));
if (sc->sc_ih == NULL) {
aprint_error("couldn't establish interrupt");
if (intrstr != NULL)

View File

@ -1,4 +1,4 @@
/* $NetBSD: sdhc_pci.c,v 1.13 2017/02/17 10:51:48 nonaka Exp $ */
/* $NetBSD: sdhc_pci.c,v 1.14 2017/04/27 10:01:54 msaitoh Exp $ */
/* $OpenBSD: sdhc_pci.c,v 1.7 2007/10/30 18:13:45 chl Exp $ */
/*
@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sdhc_pci.c,v 1.13 2017/02/17 10:51:48 nonaka Exp $");
__KERNEL_RCSID(0, "$NetBSD: sdhc_pci.c,v 1.14 2017/04/27 10:01:54 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_sdmmc.h"
@ -301,7 +301,8 @@ sdhc_pci_attach(device_t parent, device_t self, void *aux)
}
intrstr = pci_intr_string(pc, ih, intrbuf, sizeof(intrbuf));
sc->sc_ih = pci_intr_establish(pc, ih, IPL_SDMMC, sdhc_intr, &sc->sc);
sc->sc_ih = pci_intr_establish_xname(pc, ih, IPL_SDMMC, sdhc_intr,
&sc->sc, device_xname(self));
if (sc->sc_ih == NULL) {
aprint_error_dev(self, "couldn't establish interrupt\n");
goto err;

View File

@ -1,4 +1,4 @@
/* $NetBSD: uhci_pci.c,v 1.60 2016/04/23 10:15:31 skrll Exp $ */
/* $NetBSD: uhci_pci.c,v 1.61 2017/04/27 10:01:54 msaitoh Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uhci_pci.c,v 1.60 2016/04/23 10:15:31 skrll Exp $");
__KERNEL_RCSID(0, "$NetBSD: uhci_pci.c,v 1.61 2017/04/27 10:01:54 msaitoh Exp $");
#include "ehci.h"
@ -131,7 +131,8 @@ uhci_pci_attach(device_t parent, device_t self, void *aux)
return;
}
intrstr = pci_intr_string(pc, ih, intrbuf, sizeof(intrbuf));
sc->sc_ih = pci_intr_establish(pc, ih, IPL_USB, uhci_intr, sc);
sc->sc_ih = pci_intr_establish_xname(pc, ih, IPL_USB, uhci_intr, sc,
device_xname(self));
if (sc->sc_ih == NULL) {
aprint_error_dev(self, "couldn't establish interrupt");
if (intrstr != NULL)