abuses its argument, which is supposed to be an integer unit number, as
a pointer to the head of the 'struct slot' list. When this code was
hacked^Wupdated for newbus, a new mechanism for registering slot_irq_handler()
was put in place and the significance of the unit number was overlooked.
When registering an interrupt, we have both device_id and unit. The unit
number is passed as 'unit' but /sys/i386/usa/intr_machdep.c:register_intr()
drops unit on the floor and uses device_id instead. Since pccard_alloc_intr()
always sets device_id to 0, this means the unit number is always zero, and
slot_irq_handler() is always called with 0, which becomes a NULL pointer
which slot_irq_handler() tries to dereference and the kernel explodes.
Result: if you assign a PCMCIA driver in the kernel config file like this:
device wi0 at isa? port? irq?
Then the system will panic the moment a PCMCIA device is attached and
an interrupt is triggered.
The quick fix: make pccard_alloc_intr() pass the unit number as both
the device_id and unit arguments to register_pcic_intr(). The correct fix
would be to rewrite /sys/pccard to be less disgusting.
so that the list of drivers is correct. This is a slightly
simplified version of the patch from the PR.
PR: misc/10544
Submitted by: Christophe Colle <colle@krtkg1.rug.ac.be>
1:
s/suser/suser_xxx/
2:
Add new function: suser(struct proc *), prototyped in <sys/proc.h>.
3:
s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/
The remaining suser_xxx() calls will be scrutinized and dealt with
later.
There may be some unneeded #include <sys/cred.h>, but they are left
as an exercise for Bruce.
More changes to the suser() API will come along with the "jail" code.
in the not APIC_IO case. This should silence the warnings when
building pcic.c as well as the undefined functions when the kernel
links.
Noticed by: several people in -current and me building the kernel
This will trigger inserted()) to be called twice which confuses pccardd.
Add code to not process pcicitr())'s when in the middle of a resume
process. The real insertion of cards and the emulated one in the suspend/resume
code really do not mix up.
however is only marginally useful until the new-style bus (pci and isa)
stuff comes onboard to give us a better shot at actually pci and isa
drivers loadable (or preloadable anyway).
computer 'suspended', although the slot was powered off. There was a
race where the slow could be powered off *after* it was assigned a
new driver when the computer was 'resumed'.
Noticed by: Brian Somers <brian@Awfulhak.org>
We do the same thing we do with all the other Vadem chips and print the
right identification for these chips. Tested with the 365, and inferred
for the 465.
This allows the cheapo PCMCIA card that I got from necx to print the right
chip number on boot.
`void *' arg. Fixed or hid most of the resulting type mismatches.
Handlers can now be updated locally (except for reworking their
global declarations in isa_device.h).
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.
was really removed, or simply 'faked' by a suspend/resume. Keep track
of both current and previous state, and send that information to the
userland programs.
[
XXX - This breaks binary compatability with older pccardd programs, but
they don't work reliably. :(
]
This introduce an xxxFS_BOOT for each of the rootable filesystems.
(Presently not required, but encouraged to allow a smooth move of option *FS
to opt_dontuse.h later.)
LFS is temporarily disabled, and will be re-enabled tomorrow.
and initializes the next two ports in order starting at 03e0. This
also patches pcic_p.h to reduce the I/O ports mapped from 4 to 2.
Submitted by: Ted Faber <faber@ISI.EDU>
option PCIC_NOCLRREGS). This is now the default behavior since it's
apparently required for the CLPD6832, and doesn't negatively affect
any of my test machines.
Requested by: Ted Faber <faber@ISI.EDU>
mode. Currently, the only supported controller is the Cirrus Logic
PD6832, but others can be supported with docs on them.
Submitted by: Ted Faber <faber@ISI.EDU>