diff options
author | nate <nate@FreeBSD.org> | 1997-10-26 04:54:16 +0000 |
---|---|---|
committer | nate <nate@FreeBSD.org> | 1997-10-26 04:54:16 +0000 |
commit | 2f55d3018bb2f9d1790a2085125effcbad72ad2e (patch) | |
tree | 5bde5383c575d64c76fda2c3aa76c95a74f212e8 /sys/dev/ep | |
parent | c68183d0b8cb8cb595c0fac05b6d989132543595 (diff) | |
download | FreeBSD-src-2f55d3018bb2f9d1790a2085125effcbad72ad2e.zip FreeBSD-src-2f55d3018bb2f9d1790a2085125effcbad72ad2e.tar.gz |
- Functional changes to PCCARD support.
* Kill individual drivers 'suspend' routines, since there's no simple/safe
way to suspend/resume a card w/out going through the complete probe
at initialization time.
* Default to using the apm_pccard_resume sysctl code, which basically
pretends the card was removed, and then re-inserted. Suspend/resume
is now 'emulated' with a fake insert/removal. (Hence we no longer
need the driver-specific suspend routines.)
Diffstat (limited to 'sys/dev/ep')
-rw-r--r-- | sys/dev/ep/if_ep.c | 36 |
1 files changed, 7 insertions, 29 deletions
diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c index 84d578e..d840c53 100644 --- a/sys/dev/ep/if_ep.c +++ b/sys/dev/ep/if_ep.c @@ -153,18 +153,16 @@ struct isa_driver epdriver = { /* * PC-Card (PCMCIA) specific code. */ -static int ep_pccard_init __P((struct pccard_devinfo *, int)); +static int ep_pccard_init __P((struct pccard_devinfo *)); static int ep_pccard_attach __P((struct pccard_devinfo *)); static void ep_unload __P((struct pccard_devinfo *)); static int card_intr __P((struct pccard_devinfo *)); -static void ep_suspend __P((struct pccard_devinfo *)); static struct pccard_device ep_info = { "ep", ep_pccard_init, ep_unload, card_intr, - ep_suspend, 0, /* Attributes - presently unused */ &net_imask }; @@ -173,9 +171,8 @@ static struct pccard_device ep_info = { * Initialize the device - called from Slot manager. */ static int -ep_pccard_init(devi, first) +ep_pccard_init(devi) struct pccard_devinfo *devi; - int first; { struct isa_device *is = &devi->isahd; struct ep_softc *sc = ep_softc[is->id_unit]; @@ -201,10 +198,7 @@ ep_pccard_init(devi, first) /* 3C589's product id? */ if (epb->prod_id != 0x9058) { - if (first) - printf("ep%d: failed to come ready.\n", is->id_unit); - else - printf("ep%d: failed to resume.\n", is->id_unit); + printf("ep%d: failed to come ready.\n", is->id_unit); return (ENXIO); } @@ -212,15 +206,10 @@ ep_pccard_init(devi, first) for (i = 0; i < 3; i++) sc->epb->eth_addr[i] = get_e(sc, EEPROM_NODE_ADDR_0 + i); - if (first) { - if (ep_pccard_attach(devi) == 0) - return (ENXIO); - sc->arpcom.ac_if.if_snd.ifq_maxlen = ifqmaxlen; - } else { - sc->gone = 0; - printf("ep%d: resumed.\n", is->id_unit); - epinit(sc); - } + if (ep_pccard_attach(devi) == 0) + return (ENXIO); + + sc->arpcom.ac_if.if_snd.ifq_maxlen = ifqmaxlen; return (0); } @@ -284,17 +273,6 @@ card_intr(devi) epintr(devi->isahd.id_unit); return(1); } - -/* Resume is done by executing ep_pccard_init(devi, 0). */ -static void -ep_suspend(devi) - struct pccard_devinfo *devi; -{ - struct ep_softc *sc = ep_softc[devi->isahd.id_unit]; - - printf("ep%d: suspending\n", devi->isahd.id_unit); - sc->gone = 1; -} #endif /* NCARD > 0 */ static int |