diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 1995-08-25 09:47:06 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 1995-08-25 09:47:06 +0000 |
| commit | f673a8d884957a42186512fb81161530c6b016dc (patch) | |
| tree | 3695653bbee5e8b43af938c57c72a8477afd1028 | |
| parent | f64c9758b0d9a83cb82bea0aa5630515c9f382e3 (diff) | |
Notes
| -rw-r--r-- | sys/pccard/pccard.c | 2 | ||||
| -rw-r--r-- | sys/pccard/pcic.c | 26 |
2 files changed, 4 insertions, 24 deletions
diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c index 34d63390ca9f6..ed7f3240ee846 100644 --- a/sys/pccard/pccard.c +++ b/sys/pccard/pccard.c @@ -567,6 +567,7 @@ struct slot *sp = arg; * Now reset the card. */ sp->cinfo->reset(sp); + selwakeup(&sp->selp); } /* * Card event callback. Called at splhigh to prevent @@ -596,6 +597,7 @@ int s; sp->state = empty; splx(s); printf("Card removed, slot %d\n", sp->slot); + selwakeup(&sp->selp); } break; case card_inserted: diff --git a/sys/pccard/pcic.c b/sys/pccard/pcic.c index dbee979e97dd1..b57e18e627335 100644 --- a/sys/pccard/pcic.c +++ b/sys/pccard/pcic.c @@ -141,14 +141,6 @@ putw (struct pcic_slot *sp, int reg, unsigned short word) /* - * Get a 16 bit value - */ -static unsigned short -getw (struct pcic_slot *sp, int reg) -{ - return (getb(sp, reg) | (getb(sp, reg+1) << 8)); -} -/* * Loadable kernel module interface. */ #ifdef LKM @@ -171,8 +163,6 @@ pcic_handle( lkmtp, cmd) struct lkm_table *lkmtp; int cmd; { - int i; - struct lkm_misc *args = lkmtp->private.lkm_misc; int err = 0; /* default = success*/ switch( cmd) { @@ -255,17 +245,6 @@ struct pcic_slot *cp = pcic_slots; } #endif LKM -static void -pcic_print_regs (struct pcic_slot *sp) -{ - int i, j; - - for (i = 0; i < PCIC_SLOT_SIZE; i += 16) { - for (j = 0; j < 16; ++j) - printf ("%02x ", getb (sp, i + j)); - printf ("\n"); - } -} #if 0 static void pcic_dump_attributes (unsigned char *scratch, int maxlen) @@ -604,7 +583,6 @@ unsigned char c; static int pcic_ioctl(struct slot *sp, int cmd, caddr_t data) { -int s; switch(cmd) { @@ -674,7 +652,7 @@ struct pcic_slot *sp = slotp->cdata; { reg |= PCIC_OUTENA; putb (sp, PCIC_POWER, reg); - DELAY (100*000); + DELAY (100*1000); } return(0); } @@ -745,7 +723,7 @@ struct pcic_slot *cp = pcic_slots; s = splhigh(); for (slot = 0; slot < PCIC_MAX_SLOTS; slot++, cp++) if (cp->sp) - if (chg = getb(cp, PCIC_STAT_CHG)) + if ((chg = getb(cp, PCIC_STAT_CHG)) != 0) if (chg & PCIC_CDTCH) { if ((getb(cp, PCIC_STATUS) & PCIC_CD) == |
