o Expose ed_stop and call it early to shutdown the hardware.
o When releasing the interrupt, pass the cookie for the irq, not
a pointer to the cookie (this is the base problem).
o Release other resources used, just like the ep driver
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)
yet, but that should be resolved shortly. Non memory mapped ed
devices should work, but I cannot test this since my only ed card is
memory mapped.
Submitted by: Matt Dodd <mdodd@freebsd.org>
bootup. Somehow my backout of an abortaive attempt at shared
memory autoconfiguration included this line:
sc->mem_shared = 1;
Which is fairly important as it turns out.
Since I performed my pre-commit testing on a different box with a generic
NE2000 I didn't catch this. Pointy hat.
now lives in the respective bus front end files.
- Add various function prototypes to if_edvar.h
- Clean up some debugging code that snuck into if_ed_isa.c
- Turn on the right bits in files.i386
resource_list_release. This removes the dependancy on the
layout of ivars.
* Move set_resource, get_resource and delete_resource from
isa_if.m to bus_if.m.
* Simplify driver code by providing wrappers to those methods:
bus_set_resource(dev, type, rid, start, count);
bus_get_resource(dev, type, rid, startp, countp);
bus_get_resource_start(dev, type, rid);
bus_get_resource_count(dev, type, rid);
bus_delete_resource(dev, type, rid);
* Delete isa_get_rsrc and use bus_get_resource_start instead.
* Fix a stupid typo in isa_alloc_resource reported by Takahashi
Yoshihiro <nyan@FreeBSD.org>.
* Print a diagnostic message if we can't assign resources to a PnP
device.
* Change device_print_prettyname() so that it doesn't print
"(no driver assigned)-1" for anonymous devices.
This means that we will not have to have a bpf and a non-bpf version
of our driver modules.
This does not open any security hole, because the bpf core isn't loadable
The drivers left unchanged are the "cross platform" drivers where the respective
maintainers are urged to DTRT, whatever that may be.
Add a couple of missing FreeBSD tags.
Doug Rabson's work, with a few tweaks from Warner Losh and I. There are
still some quirks to resolve, but the old driver is presently breaking
the build.
`ED_P1_MAR + i' and `ED_P1_PAR + i', respectively.
- convert ED_PC_RESET and ED_PC_MISC into relative offset from
ED_PC_ASIC_OFFSET (those macros are not used in current source).
Submitted by: chi@bd.mbn.or.jp (Chiharu Shibata)
the new PnP code. Since the bulk of the driver changes are not being
committed at this time, it will not affect the driver. The code is being
committed early to allow others synchronise changes.
#define COMPAT_PCI_DRIVER(name,data) DATA_SET(pcidevice_set,data)
.. to 2.2.x and 3.x if people think it's worth it. Driver writers can do
this if it's not defined. (The reason for this is that I'm trying to
progressively eliminate use of linker_sets where it hurts modularity and
runtime load capability, and these DATA_SET's keep getting in the way.)
i386 platform boots, it is no longer ISA-centric, and is fully dynamic.
Most old drivers compile and run without modification via 'compatability
shims' to enable a smoother transition. eisa, isapnp and pccard* are
not yet using the new resource manager. Once fully converted, all drivers
will be loadable, including PCI and ISA.
(Some other changes appear to have snuck in, including a port of Soren's
ATA driver to the Alpha. Soren, back this out if you need to.)
This is a checkpoint of work-in-progress, but is quite functional.
The bulk of the work was done over the last few years by Doug Rabson and
Garrett Wollman.
Approved by: core
const char *. Originally I was going to add casts from const char * to
char * in some of the pci device drivers, but the reality is that the
pci device probes return constant quoted strings.
FreeBSD/alpha. The most significant item is to change the command
argument to ioctl functions from int to u_long. This change brings us
inline with various other BSD versions. Driver writers may like to
use (__FreeBSD_version == 300003) to detect this change.
The prototype FreeBSD/alpha machdep will follow in a couple of days
time.