Re: serial problems (was Re: serial (PPP) stomping on parport?)

Derrik (dpates@kalifornia.com)
Wed, 10 Jun 1998 07:41:28 -0700 (PDT)


On Wed, 10 Jun 1998, Etienne Lorrain wrote:

> Hi,
>
> What is the output of "ls -l /dev/ttyS*", "ls -l /dev/cua*" ?
> Is the serial port in-use when you try to configure it
> (uugetty or gpm running) ?

This is an ls -l of the first few ttyS and cua devices:

crw-rw---- 1 root uucp 5, 64 Nov 21 1997 /dev/cua0
crw-r----- 1 root uucp 5, 65 Mar 18 19:43 /dev/cua1
crw-r----- 1 root uucp 5, 66 Jul 17 1994 /dev/cua2
crw-r----- 1 root uucp 5, 67 Jul 17 1994 /dev/cua3
crw-rw-rw- 1 root tty 4, 64 Jun 9 21:54 /dev/ttyS0
crw-r----- 1 uucp tty 4, 65 May 26 16:18 /dev/ttyS1
crw-rw-rw- 1 root root 4, 66 Nov 15 1997 /dev/ttyS2
crw-r--r-- 1 root tty 4, 67 Jul 17 1994 /dev/ttyS3

GPM v1.13 is running on my system on /dev/ttyS0.

> Are your serial ports enabled in BIOS ? Is there IRQ or I/O
> conflicts (cat /proc/ioports) ?

No, there are no port conflicts. At the time, I'd tried disabling the
second serial port on my mainboard (Intel Zappa ZP/Advanced) and
reconfiguring my PnP modem to COM3 (ttyS2) with port address 0x3e8, IRQ5.
I edited my isapnp.conf and reran isapnp, and the reconfiguration took
just fine. However, setserial would only give me 'invalid argument'
messages.

> What is the result of "strace setserial <your parameter>" ?
> Are the failing ports software PNP modem ?

I tried strace'ing it, and these are the lines just preceding where it
prints the error message:

open("/dev/ttyS3", O_RDWR|O_NONBLOCK) = 3
ioctl(3, TIOCGSERIAL, 0xbffff8ec) = 0
ioctl(3, TIOCSSERIAL, 0xbffff8b0) = -1 EINVAL (Invalid argument)

I don't know what the TIOCSSERIAL ioctl does exactly (I've been spending a
little time lately learning about the sound driver code instead).

> Is serial compiled as module (".config" serial related lines) ?
> What is your hardware (Intel UP/SMP) ?

My system's a P100, uniprocessor. My serial support is configured as a
module, so that I can run 'isapnp' to configure my PnP modem on a standard
port (presently ttyS1, port 0x2f8, IRQ3). No other special options are
enabled. Everything works fine, except for setserial.

btw: Looks like something is happening here in the serial code:

if ((new_serial.irq >= NR_IRQS) || (new_serial.port > 0xffff) ||
(new_serial.type < PORT_UNKNOWN) ||
(new_serial.type > PORT_MAX) ||
(new_serial.xmit_fifo_size == 0)) {
return -EINVAL;
}

I can try adding some printk() calls, and see what I can figure out, if ya
want. That's from lines 1662-1666 in drivers/char/serial.c.

>
> Thanks,
> Etienne.
>

Derrik Pates
dpates@kalifoornia.com
dpates@acm.org

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu