Finally I resolved the problem. Slackware 12.1. doesn't work with IRDA in SIR mode and you need to use it in FIR mode. That problem is apparently limited to some particular hardware -- I use ThinkPad T41 laptop.
Below is a shortened description of the way I found the solution. If you don't want to read the full story about my researches and would like just to know how to configure IRDA in new Slackware, omit *** Preface *** and *** SIR *** sections and jump immediately to *** FIR *** section.
*** Preface ***
IRDA is enabled in my ThinkPad's BIOS:
Infrared Device -- Enabled
Infrared -- Enabled
Base I/O address -- 2F8
Interrupt -- IRQ 3
DMA -- DMA 3
As I said above I had working implementation of IRDA in Slackware 11.0 running kernel 2.4.34...
# irdadump
xid:cmd 47b864f2 > ffffffff S=6 s=0 (14)
xid:cmd 47b864f2 > ffffffff S=6 s=1 (14)
xid:rsp 47b864f2 < 000066ef S=6 s=0 Nokia 6021 hint=b125 [ PnP Modem Fax Telephony IrCOMM IrOBEX ] (27)
xid:cmd 47b864f2 > ffffffff S=6 s=2 (14)
xid:cmd 47b864f2 > ffffffff S=6 s=3 (14)
xid:cmd 47b864f2 > ffffffff S=6 s=4 (14)
xid:cmd 47b864f2 > ffffffff S=6 s=5 (14)
xid:cmd 47b864f2 > ffffffff S=6 s=* machine hint=0400 [ Computer ] (21)
...irdadump recognized my mobile phone...
# head ~/.gammurc
[gammu]
port = /dev/sda1
connection = irdaphonet
# gammu identify
Manufacturer : Nokia
Model : 6021 (RM-94)
Firmware : 04.10 B (07-09-05)
Hardware : 4055
IMEI : <cut>
Original IMEI : <cut>
Manufactured : 02/2006
Product code : 0524874
UEM : 400
...and gammu could to identify it.
Now I try to configure IRDA in Slackware 12.1 running kernel 2.6.24.5-smp (generic) on my ThinkPad T41: first in the SIR mode and then in the FIR one.
At the beginning I compiled irda-utils 0.9.18 and gammu 1.20.0 (both from SlackBuilds --
http://slackbuilds.org/).
*** SIR ***
First I tried SIR...
# cat /etc/modprobe.d/irda
alias tty-ldisc-11 irtty-sir
alias char-major-161 ircomm-tty
# modprobe ircomm_tty
# lsmod | grep ir
ircomm_tty 23944 0
ircomm 14340 1 ircomm_tty
irtty_sir 8960 0
sir_dev 14596 1 irtty_sir
irda 114360 3 ircomm_tty,ircomm,sir_dev
crc_ccitt 5760 2 ppp_async,irda
# tail /var/log/messages
kernel: IrCOMM protocol (Dag Brattli)
# irattach /dev/ttyS1 -s
# ps ax | grep irattach
<null output>
...but irattach didn't load the device...
# tail /var/log/syslog
kernel: ttyS1: LSR safety check engaged!
irattach: tcgetattr: Input/output error
irattach: ioctl(SIOCGIFFLAGS): No such device
...because there was some problem with /dev/ttyS1 device...
# tail /var/log/messages
irattach: Stopping device /dev/ttyS1
irattach: exiting ...
...so it was stopped...
# setserial -g /dev/ttyS[0123]
/dev/ttyS0, UART: undefined, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: undefined, Port: 0x02f8, IRQ: 3
/dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4
/dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3
# setserial -a /dev/ttyS1
/dev/ttyS1, Line 1, UART: undefined, Port: 0x02f8, IRQ: 3
Baud_base: 921600, close_delay: 50, divisor: 0
closing_wait: 3000
Flags: spd_normal skip_test auto_irq
# lspci | grep LPC
00:1f.0 ISA bridge: Intel Corporation 82801DBM (ICH4-M) LPC Interface Bridge (rev 01)
...then I turned on IRDA in my mobile phone...
# irdadump
xid:cmd 851e239f > ffffffff S=6 s=0 (14)
xid:cmd 851e239f > ffffffff S=6 s=1 (14)
xid:cmd 851e239f > ffffffff S=6 s=2 (14)
xid:cmd 851e239f > ffffffff S=6 s=3 (14)
xid:cmd 851e239f > ffffffff S=6 s=4 (14)
xid:cmd 851e239f > ffffffff S=6 s=5 (14)
xid:cmd 851e239f > ffffffff S=6 s=* machine hint=0400 [ Computer ] (21)
...but irdadump didn't recognize my mobile -- no wonder, assuming /dev/ttyS1 was stopped.
*** FIR ***
Then I tried FIR...
# cat /etc/modprobe.d/irda
alias tty-ldisc-11 irtty-sir
alias char-major-161 ircomm-tty
options nsc-ircc dongle_id=0x09
alias irda0 nsc-ircc
# setserial /dev/ttyS1 uart none
# tail /var/log/syslog
kernel: ttyS1: LSR safety check engaged!
# modprobe ircomm_tty
# modprobe nsc-ircc io=0x2f8 irq=3 dma=3
# lsmod | grep ir
nsc_ircc 19344 0
ircomm_tty 23944 0
ircomm 14340 1 ircomm_tty
irtty_sir 8960 0
sir_dev 14596 1 irtty_sir
irda 114360 4 nsc_ircc,ircomm_tty,ircomm,sir_dev
crc_ccitt 5760 2 ppp_async,irda
# tail /var/log/messages
kernel: nsc-ircc 00:0b: activated
kernel: nsc-ircc, chip->init
kernel: nsc-ircc, Found chip at base=0x02e
kernel: nsc-ircc, driver loaded (Dag Brattli)
kernel: IrDA: Registered device irda0
kernel: nsc-ircc, Using dongle: IBM31T1100 or Temic TFDS6000/TFDS6500
# irattach irda0 -s
# ps ax | grep irattach
3375 ? S 0:00 irattach irda0 -s
...irattach was loaded for irda0 device...
# tail /var/log/messages
irattach: executing: '/sbin/modprobe irda0'
irattach: executing: 'echo machine > /proc/sys/net/irda/devname'
irattach: executing: 'echo 1 > /proc/sys/net/irda/discovery'
irattach: Starting device irda0
...then I turned on IRDA in my mobile phone...
# irdadump
xid:cmd 13e228f8 > ffffffff S=6 s=0 (14)
xid:cmd 13e228f8 > ffffffff S=6 s=1 (14)
xid:cmd 13e228f8 > ffffffff S=6 s=2 (14)
xid:cmd 13e228f8 > ffffffff S=6 s=3 (14)
xid:rsp 13e228f8 < 000076bb S=6 s=3 Nokia 6021 hint=b125 [ PnP Modem Fax Telephony IrCOMM IrOBEX ] (27)
xid:cmd 13e228f8 > ffffffff S=6 s=4 (14)
xid:cmd 13e228f8 > ffffffff S=6 s=5 (14)
xid:cmd 13e228f8 > ffffffff S=6 s=* machine hint=0400 [ Computer ]
...and irdadump recognized my mobile phone..
# head ~/.gammurc
[gammu]
port = /dev/ircomm0
connection = irda
# gammu identify
Function not supported by phone.
...but gammu couldn't to communicate with it...
# cat /proc/sys/net/irda/max_baud_rate
16000000
# echo 115200 > /proc/sys/net/irda/max_baud_rate
...so I lowered the transfer speed...
# gammu identify
Manufacturer : Nokia
Model : 6021 (RM-94)
Firmware : 04.10 B (07-09-05)
Hardware : 4055
IMEI : <cut>
Original IMEI : <cut>
Manufactured : 02/2006
Product code : 0524874
UEM : 400
...and finally everything works good.
I hope my experience with Slackware 12.1 and IRDA will be useful for the other users.