summaryrefslogtreecommitdiffstats
path: root/sys/isa/sio.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>1999-12-01 07:38:54 +0000
committerimp <imp@FreeBSD.org>1999-12-01 07:38:54 +0000
commit737361b49b1d4f61109a883539d69e85ed2ccbc3 (patch)
tree9e08c340cddbf5bd0598f71b4907763bb7026d68 /sys/isa/sio.c
parentb8799773608c6c088346b7cb09851b9b556a2cb4 (diff)
downloadFreeBSD-src-737361b49b1d4f61109a883539d69e85ed2ccbc3.zip
FreeBSD-src-737361b49b1d4f61109a883539d69e85ed2ccbc3.tar.gz
Fix the hang on card eject problem and maybe the hang on suspend
problem. o Create new timeout routine so we don't detach the card inside a ISR but instead drop back to spl0 via a timeout of 0. o Actually delete the child of the pccard device rather than just faking it badly. o Fix sio, ed and ep to have pccard detach routines that are int rather than void. o Fix ep and ed pccard detach routines to use if_detach rather than just if_down. if_detach destroys the device, while if_down just marks it down. In this incarnation of the pccard things, we map the disable the slot action to detach the driver, which removes the driver from the device tree. When that is done, a panic would soon follow as the ifconfig tried to down the device. Didn't fix: o Should cache the pccard dev child's pointer in struct slot o remove now unused parts of struct slot o Any driver using softc after detach has been called. sio's softc used to be statically allocated, so you could check sc->gone, but that is now gone. o Didn't remove gone from softc of drivers that use the old pccard method. Didn't test: o ed driver changes o sio driver changes on pccards o suspend (no laptop or apm support on my desktop)
Diffstat (limited to 'sys/isa/sio.c')
-rw-r--r--sys/isa/sio.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/sys/isa/sio.c b/sys/isa/sio.c
index fe8244e..4789c43 100644
--- a/sys/isa/sio.c
+++ b/sys/isa/sio.c
@@ -87,15 +87,6 @@
#endif
#include <isa/ic/ns16550.h>
-#include "card.h"
-#if NCARD > 0
-/* XXX should die XXX */
-#include <sys/select.h>
-#include <sys/module.h>
-#include <pccard/cardinfo.h>
-#include <pccard/slot.h>
-#endif
-
#ifndef __i386__
#define disable_intr()
#define enable_intr()
@@ -487,13 +478,9 @@ static int
sio_pccard_probe(dev)
device_t dev;
{
- const char *name;
-
- name = pccard_get_name(dev);
- if (strcmp(name, "sio"))
- return ENXIO;
-
/* Do not probe IRQ - pccardd has not arranged for it yet */
+ /* XXX Actually it has been asigned to you, but isn't activated */
+ /* XXX until you specifically activate the resource for your use. */
SET_FLAG(dev, COM_C_NOPROBE);
return (sioprobe(dev));
@@ -515,7 +502,7 @@ sio_pccard_attach(dev)
* and ensure that any driver entry points such as
* read and write do not hang.
*/
-static void
+static int
sio_pccard_detach(dev)
device_t dev;
{
@@ -543,6 +530,7 @@ sio_pccard_detach(dev)
free(com, M_DEVBUF);
device_printf(dev, "unload,gone\n");
}
+ return (0);
}
#endif /* NCARD > 0 */
OpenPOWER on IntegriCloud