freebsd-dev/sys/pccard
Bill Paul 134a826b50 Unbreak slot_irq_handler(). The problem here is that slot_irq_handler()
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.
1999-05-04 15:43:02 +00:00
..
cardinfo.h
cis.h
driver.h
i82365.h
pccard_beep.c
pccard.c Unbreak slot_irq_handler(). The problem here is that slot_irq_handler() 1999-05-04 15:43:02 +00:00
pcic98reg.h
pcic_pci.c - Added PCI identification support for the TI1251 PCI/CardBus bridge. 1999-05-02 05:53:50 +00:00
pcic_pci.h - Added PCI identification support for the TI1251 PCI/CardBus bridge. 1999-05-02 05:53:50 +00:00
pcic.c Operator precedence (nit: in #if 0 code) bug. 1999-05-02 21:45:31 +00:00
pcic.h Header file for pcic interrupt register/unregister functions. 1999-03-10 14:56:28 +00:00
skel.c Well folks, this is it - The second stage of the removal for build support 1999-04-17 08:36:07 +00:00
slot.h