[ltp] TP760 hardware setting disable irq 3 (needed for PCMCIA-card)

Rob Mayoff linux-thinkpad@www.bm-soft.com
2 Mar 2002 14:15:38 -0600


+---------- On Mar 2, Ekkard Gerlach said:
> BIOS settings of TP 760EL don't allow turn off infrared device
> or something other like in some BIOS of other TP's.
>
> According to /proc/interrupts irq 3 is free!

/proc/interrupts doesn't show all the interrupts. For example, on
my 770Z with kernel 2.4.17 and the serial driver compiled in (not a
module):

    $ cat /proc/interrupts
	       CPU0
      0:   14567111          XT-PIC  timer
      1:      82741          XT-PIC  keyboard
      2:          0          XT-PIC  cascade
      3:     186007          XT-PIC  orinoco_cs
      5:       3091          XT-PIC  Crystal audio controller
     11:          4          XT-PIC  usb-uhci, i82365
     12:     861695          XT-PIC  PS/2 Mouse
     14:     535408          XT-PIC  ide0
     15:          4          XT-PIC  ide1
    NMI:          0
    LOC:          0
    ERR:          0

Note that IRQ 4 is not listed.  But...

    $ sudo setserial /dev/tts/0
    /dev/tts/0, UART: 16550A, Port: 0x03f8, IRQ: 4

IRQ 4 is in use by my serial port.

The best way that I've found for determining all the used interrupts is
to look at both /proc/interrupts and the output of "lspnp -v". Note that
you need to install pcmcia-cs with "PnP BIOS resource checking" included
in order for lspnp to work. (Supposedly you can get the support compiled
into the kernel instead of using pcmcia-cs, but I've never gotten that
to work.)

The output of "lspnp -v" can be rather verbose, if you're just
interested in IRQs. Here's a shell script that I call "lsirq":

#!/bin/sh
lspnp -v | sed -n -e '
/^[01]/h
/irq disabled/d
/^.irq/{
    s/^.//
    s/ \([0-9]\)$/  \1/
    G
    s/\n/ = /
    p
}' | sort

The output of lsirq, on my 770Z, is

irq  0 = 02 PNP0100 AT system timer
irq  1 = 05 PNP0303 IBM enhanced keyboard (101/102-key, PS/2 mouse support)
irq  2 = 00 PNP0000 AT programmable interrupt controller
irq  4 = 0d PNP0501 16550A-compatible COM port
irq  5 = 0e CSC0100 multimedia controller: audio
irq  6 = 08 PNP0700 PC standard floppy disk controller
irq  8 = 03 PNP0b00 AT real-time clock
irq 12 = 06 IBM3780 PS/2 TrackPoint
irq 13 = 07 PNP0c04 Math coprocessor
irq 14 = 17 PNP0680 Standard bus mastering IDE hard disk controller
irq 15 = 19 PNP0680 Standard bus mastering IDE hard disk controller

which lists some IRQs (4, 6, 8, and 13) that /proc/interrupts does
not list, and is missing some IRQs (3 and 11) that /proc/interrupts does
show.

Additionally, if you have lspnp support, then you also have setpnp
support. "lspnp -vv" will show you different possible configurations for
each pnp device, and the setpnp command lets you select those different
configurations. You may be able to use setpnp to disable the infrared
device on your Thinkpad, as I have done on mine. (My infrared device
is "13 IBM0071 IBM Thinkpad infrared port", and it's not in the lsirq
output because it's disabled.)

Also, Thomas Hood has written a package called tpctl, containing some
Thinkpad device drivers and a control program called tpctl. This package
can display and change some of the same things that lspnp/setpnp can
(including the IR port setting on my 770Z), and can display and change
some things that lspnp/setpnp cannot (such as power management). It's
useful to have both packages installed.



----- The Linux ThinkPad mailing list -----
The linux-thinkpad mailing list home page is at:
http://www.bm-soft.com/~bm/tp_mailing.html