can not open /dev/thinkpad WAS: Re: [ltp] Serial port on Thinkpad 600x (Mandrake 9.0)

Rob Walker linux-thinkpad@linux-thinkpad.org
14 Oct 2002 21:46:08 -0700


On Mon, 2002-10-14 at 10:50, Buchan Milne wrote:

> Here is some output from tpctl and setserial after a normal boot and no 
> configuration/playing with tpctl/setserial:
> 
> [root@bgmilne-thinkpad bgmilne]# setserial /dev/tts/0
> /dev/tts/0, UART: 16550A, Port: 0x03f8, IRQ: 4
> [root@bgmilne-thinkpad bgmilne]# setserial /dev/tts/1
> /dev/tts/1, UART: 16550A, Port: 0x02f8, IRQ: 3
> 
> [root@bgmilne-thinkpad bgmilne]# tpctl --rs1 --rs2
> resource state:                        ioaddr irq#   able? mode/power
>     serial port 1:                       0x2f8 IRQ3  enable on
>     serial port 2:                       0x3f8 IRQ4  enable

Well, since someone else was able to get their serial port working on a
600X, and Thomas has been seen lately in these parts.....

root cannot open /dev/thinkpad .  I also would like to use my serial
port under linux.  Here is some of the debugging I did within the last
10 minutes.

tp600x:/proc/driver/thinkpad# lsmod | grep smapi
smapi                   2864   0  (unused)
thinkpad                2548   0  (autoclean) [smapi]

from the end of "strace tcpctl --rsx"

(can provide the entire output upon request)

close(3)                                = 0
munmap(0x40014000, 50439)               = 0
stat64("/dev/.devfsd", 0xbffff8cc)      = -1 ENOENT (No such file or
directory) stat64("/dev/thinkpad", {st_mode=S_IFCHR|0660,
st_rdev=makedev(10, 170), ...}) = 0
open("/dev/thinkpad", O_RDONLY)         = -1 ENOSYS (Function not
implemented)
open("/dev/thinkpad", O_RDONLY)         = -1 ENOSYS (Function not
implemented)
open("/dev/thinkpad", O_RDONLY)         = -1 ENODEV (No such device)
dup(2)                                  = 3
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
brk(0)                                  = 0x80569d8
brk(0x8056b58)                          = 0x8056b58
brk(0x8057000)                          = 0x8057000
fstat64(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 10), ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40014000
_llseek(3, 0, 0xbffff7b4, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
write(3, "tpctl: System error message is: "..., 47tpctl: System error
message is: No such device
) = 47
close(3)                                = 0
munmap(0x40014000, 4096)                = 0
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 10), ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40014000
write(1, "tpctl: Can\'t open device file /d"..., 75tpctl: Can't open
device file /dev/thinkpad with flags O_RDONLY.  Exiting.
) = 75
munmap(0x40014000, 4096)                = 0
_exit(1)                                = ?

tp600x:/proc/driver/thinkpad# ls -alrt /dev/thinkpad /dev/smapi
lrwxrwxrwx    1 root     root            5 Sep 19 11:48 /dev/thinkpad ->
smapi
crw-rw----    1 root     root      10, 170 Sep 19 11:48 /dev/smapi
tp600x:/proc/driver/thinkpad# id
uid=0(root) gid=0(root) groups=0(root)
tp600x:/proc/driver/thinkpad#

tp600x:/proc/driver/thinkpad# pwd
/proc/driver/thinkpad
tp600x:/proc/driver/thinkpad# cat thinkpad
thinkpad version 3.0 enabled to access modules: smapi superio rtcmosram
thinkpadpm.
tp600x:/proc/driver/thinkpad# cat smapi
smapi module ver. 3.1 interfacing to 32-bit protected mode
System-Management-API BIOS ver. 1.7 at address 0xc00fe9c4 through
interface version 0.93
tp600x:/proc/driver/thinkpad#




Any thoughts?

rob