diff options
author | imp <imp@FreeBSD.org> | 2001-07-25 15:09:54 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2001-07-25 15:09:54 +0000 |
commit | 16840ac973fc9dba929e59c9311557f3f2c35890 (patch) | |
tree | f332f3254aa51dc87525b83543cc40111a18491d | |
parent | 1caa1807e02906314fb43762c038a2d666d62a47 (diff) | |
download | FreeBSD-src-16840ac973fc9dba929e59c9311557f3f2c35890.zip FreeBSD-src-16840ac973fc9dba929e59c9311557f3f2c35890.tar.gz |
Make the multiple interrupts attachment an error not a panic.
Sometimes, when pccardd is restarted, it fails to realize that the
device is already attached and tries to attach it again. This leads
to bad mojo since the pccard code isn't setup to handle that, so the
panic was put in. Now it appears that it is triggering too easily, so
I'm backing it off to a non-fatal error.
-rw-r--r-- | sys/pccard/pcic_pci.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/pccard/pcic_pci.c b/sys/pccard/pcic_pci.c index 6fa9fd7..f6080fb 100644 --- a/sys/pccard/pcic_pci.c +++ b/sys/pccard/pcic_pci.c @@ -644,8 +644,11 @@ pcic_pci_setup_intr(device_t dev, device_t child, struct resource *irq, struct pcic_softc *sc = (struct pcic_softc *) device_get_softc(dev); struct pcic_slot *sp = &sc->slots[0]; - if (sp->intr) - panic("Interrupt already established"); + if (sp->intr) { + device_printf(dev, +"Interrupt already established, possible multiple attach bug.\n"); + return (EINVAL); + } sp->intr = intr; sp->argp = arg; *cookiep = sc; |