[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: pppd Crashes Serial Port



Quoting aphro (nate@firetrail.com):
> On 17 Nov 1999, John Hasler wrote:
> 
> john >The information is correct at boot, however, the serial ports can be
> john >rearranged in the init scripts.
> 
> i read somewhere that the kernel just assumes what is what, i know for a
> fact that the kernel incorrectly identifies my modem which i hardcode to
> IRQ9 (IRQ2) and it detects the incorrect I/O address as well (forget it
> off hand i dont have access to the machine from here).  during the 5 hour
> process of trying to get 3 com ports working on different irqs and
> different I/o addresses i read that.

Well the comments in the kernel source (2.2.10) imply that it tries to
identify the IRQs but that it can be caught out:

/*
 * This routine detect the IRQ of a serial port by clearing OUT2 when
 * no UART interrupt are requested (IER = 0) (*GPL*). This seems to work at
 * each time, as long as no other device permanently request the IRQ.
 * If no IRQ is detected, or multiple IRQ appear, this function returns 0.
 * The variable "state" and the field "state->port" should not be null.
 */

> as a result of the misdetection i 
> have to use setserial manually to reconfigure the serial port on the modem

Well, I think that's just what it's for:

       setserial  is  a program designed to set and/or report the
       configuration information associated with a  serial  port.
       This information includes what I/O port and IRQ a particu-
       lar serial port is using, and whether or not the break key
       should  be interpreted as the Secure Attention Key, and so
       on.
       ...

       It is important to note that setserial  merely  tells  the
       Linux  kernel  where it should expect to find the I/O port
       and IRQ lines of a particular serial port.  It does  *not*
       configure  the hardware, the actual serial board, to use a
       particular I/O port.  In order to do that, you  will  need
       to physically program the serial board, usually by setting
       some jumpers or by switching some DIP switches.

> 
> found it.. in the setserial manpage, if this is incorrect it should be
> fixed(?)
> 
> [from setserial manpage]
> During the normal bootup process, only COM ports  1-4  are initialized,
> using  the default I/O ports and IRQ values, as listed below.
> (...)
> The "standard MS-DOS" port associations are given below:
> 
> /dev/ttyS0 (COM1), port 0x3f8, irq 4
> /dev/ttyS1 (COM2), port 0x2f8, irq 3
> /dev/ttyS2 (COM3), port 0x3e8, irq 4
> /dev/ttyS3 (COM4), port 0x2e8, irq 3
> 
> [end excerpt]

AIUI if you don't like what setserial emits at boot time (which in
slink comes from 0setserial in the obsolete directory /etc/rc.boot/)
you are expected to edit this file to your liking.

(I don't think we've heard back from the original poster (Sciortino?)
since making our suggestions.)

Cheers,

-- 
Email:  d.wright@open.ac.uk   Tel: +44 1908 653 739  Fax: +44 1908 655 151
Snail:  David Wright, Earth Science Dept., Milton Keynes, England, MK7 6AA
Disclaimer:   These addresses are only for reaching me, and do not signify
official stationery. Views expressed here are either my own or plagiarised.


Reply to: