diff options
author | 2010-09-01 11:45:42 +0000 | |
---|---|---|
committer | 2010-09-01 11:45:42 +0000 | |
commit | 7285cf05ee4e9a371eb6581d4443ae2aaf66cb1b (patch) | |
tree | 836d12beba35bbb8975825f7055b75f687c3556f | |
parent | - add a few more (diff) | |
download | wireguard-openbsd-7285cf05ee4e9a371eb6581d4443ae2aaf66cb1b.tar.xz wireguard-openbsd-7285cf05ee4e9a371eb6581d4443ae2aaf66cb1b.zip |
Failure to attach a pcmcia driver could leave the function to be disabled
after config_found() returns; check for this and do not invoke pcmcia_ccr_read()
on a disabled function in the following DPRINTF. No change for kernels
without option PCMCIADEBUG.
-rw-r--r-- | sys/dev/pcmcia/pcmcia.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pcmcia/pcmcia.c b/sys/dev/pcmcia/pcmcia.c index 489144d1880..5fe71c39ce3 100644 --- a/sys/dev/pcmcia/pcmcia.c +++ b/sys/dev/pcmcia/pcmcia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcmcia.c,v 1.41 2010/08/31 17:13:47 deraadt Exp $ */ +/* $OpenBSD: pcmcia.c,v 1.42 2010/09/01 11:45:42 miod Exp $ */ /* $NetBSD: pcmcia.c,v 1.9 1998/08/13 02:10:55 eeh Exp $ */ /* @@ -248,7 +248,8 @@ pcmcia_card_attach(dev) if (pf->child) { attached++; - if ((pf->pf_flags & PFF_FAKE) == 0) + if ((pf->pf_flags & (PFF_FAKE | PFF_ENABLED)) == + PFF_ENABLED) DPRINTF(("%s: function %d CCR at %d offset %lx" ": %x %x %x %x, %x %x %x %x, %x\n", sc->dev.dv_xname, pf->number, |