freebsd-skq/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 Add "beep" ioctl. (#10 is reserved for PIOCSVIR) 1999-02-13 11:32:00 +00:00
cis.h Minor formatting changes. No functional differences, but makes the 1996-06-05 05:30:09 +00:00
driver.h Add "beep" ioctl. (#10 is reserved for PIOCSVIR) 1999-02-13 11:32:00 +00:00
i82365.h Add probing support for the vadem VG365 and the Vadem VG465 pcic chips. 1998-08-25 22:46:44 +00:00
pccard_beep.c Add "beep" ioctl. (#10 is reserved for PIOCSVIR) 1999-02-13 11:32:00 +00:00
pccard.c Unbreak slot_irq_handler(). The problem here is that slot_irq_handler() 1999-05-04 15:43:02 +00:00
pcic98reg.h Re-sync with the state of PC98 world. This will be the last commit before 1996-08-30 10:43:14 +00:00
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 Initial update pccard code for KLD module support. Module support 1999-01-19 00:18:28 +00:00