[ltp] PnP BIOS bugs
Thomas Hood
linux-thinkpad@www.bm-soft.com
Sat, 22 Sep 2001 12:32:38 -0400
I have been looking into the cause of my PnP BIOS woes recently
and FYI here is what I've found out.
1) setpnp contains a bug such that arguments of 0 given to the
irq or dma command cause setpnp to disable the irq or dma.
setpnp ought to (try to) set the irq or dma to zero. The
way to disable an irq or dma is to do this:
setpnp -- 0b irq -1
(The '--' is required so that the '-1' isn't mistaken for an
option.)
A patch has been submitted to the pcmcia-cs bug tracking
system.
2) parport_pc.c contains a bit of mysterious code that rejects
the assignment of DMA0. parport_pc treats this as if it
meant "disabled". This was discussed in another thread.
I suspect that the rejection of DMA0 is unnecessary, but
I may well be wrong.
3) pnp_bios.c contained a bug (fixed in -ac13) such that the
driver would report disabled irqs as IRQ0. (It ought to
report a disabled irq as irq -1.)
4) pnp_bios.c swaps the "boot" and "current" configurations.
The result is that on my ThinkPad "setpnp -b 0b irq 7" changes
the current configuration while "setpnp 0b irq 7" changes
the boot configuration. Also, "setpnp on" copies the current
to the boot config instead of vice versa. There may be
other strange side-effects of this. I have just submitted
a patch to fix this.
5) The pnpbios driver queries the BIOS for all PnP devices at
init time, then it acts as if the configurations of these
devices never change, whereas setpnp does change the
configurations. Code is needed that will fix this, but
only for machines whose BIOSes won't crash the machine if
they are called later than init time. Once the preceding
issues have been addressed (in a couple of weeks) I'll try
to implement this fix ... unless someone more competent than
myself wants to volunteer. :)
6) There remains a problem that I haven't yet figured out:
On my ThinkPad 600, running the recent -ac kernels (at
least since 2.4.7) does something to the PnP BIOS such
that on a subsequent reboot, the current configuration
of all configurable devices is set to "disable". I am
currently working around this problem by running setpnp
during my boot sequence (which is why I have been so
interested in the pnpbios driver of late). The bug
should be fixed properly, but I have no idea where the
bug might be. Anyone have any ideas?
Thomas Hood
----- The Linux ThinkPad mailing list -----
The linux-thinkpad mailing list home page is at:
http://www.bm-soft.com/~bm/tp_mailing.html