Updated for new sio driver
This commit is contained in:
parent
6a53927500
commit
7a9508d2f0
@ -36,7 +36,7 @@
|
||||
.\" from: com.4,v 1.1 1993/08/06 11:19:07 cgd Exp
|
||||
.\" $Id: sio.4,v 1.10 1994/05/07 01:15:10 ache Exp $
|
||||
.\"
|
||||
.Dd February 9, 1994
|
||||
.Dd June 3, 1994
|
||||
.Dt SIO 4 i386
|
||||
.Os FreeBSD
|
||||
.Sh NAME
|
||||
@ -50,14 +50,42 @@ For standard ports:
|
||||
.Cd "device sio2 at isa? port" \&"IO_COM3\&" tty irq 5 vector siointr
|
||||
.Cd "device sio3 at isa? port" \&"IO_COM4\&" tty irq 9 vector siointr
|
||||
.sp
|
||||
For multiport cards:
|
||||
For AST compatible multiport cards with 4 ports:
|
||||
.Cd "options" \&"COM_MULTIPORT\&"
|
||||
.Cd "device sio4 at isa? port 0x2a0 tty irq 12 flags 0x701 vector siointr"
|
||||
.Cd "device sio5 at isa? port 0x2a8 tty flags 0x701 vector siointr"
|
||||
.Cd "device sio6 at isa? port 0x2b0 tty flags 0x701 vector siointr"
|
||||
.Cd "device sio7 at isa? port 0x2b8 tty flags 0x701 vector siointr"
|
||||
.Cd "device sio4 at isa? port 0x2a0 tty flags 0x701"
|
||||
.Cd "device sio5 at isa? port 0x2a8 tty flags 0x701"
|
||||
.Cd "device sio6 at isa? port 0x2b0 tty flags 0x701"
|
||||
.Cd "device sio7 at isa? port 0x2b8 tty flags 0x701 irq 12 vector siointr"
|
||||
.sp
|
||||
Use 0x02 bit in flags field to disable FIFO on specified port.
|
||||
For Boca Board compatible multiport cards with 8 ports:
|
||||
.Cd "options" \&"COM_MULTIPORT\&"
|
||||
.Cd "device sio4 at isa? port 0x100 tty flags 0xb05"
|
||||
.Cd "..."
|
||||
.Cd "device sio11 at isa? port 0x138 tty flags 0xb05 irq 12 vector siointr"
|
||||
.sp
|
||||
Meaning of \fBflags\fR:
|
||||
.br
|
||||
\fB0x0001\fR shared IRQs
|
||||
.br
|
||||
\fB0x0002\fR disable FIFO
|
||||
.br
|
||||
\fB0x0004\fR no AST/4 compatible IRQ control register
|
||||
.br
|
||||
\fB0x0080\fR disable diagnostics in probe
|
||||
.br
|
||||
\fB0x\fI??\fB00\fR minor number of master port
|
||||
.sp
|
||||
Minor numbering:
|
||||
.br
|
||||
0b\fIOLIMMMMM\fR
|
||||
.br
|
||||
call\fBO\fRut
|
||||
.br
|
||||
\fBL\fRock
|
||||
.br
|
||||
\fBI\fRnitial
|
||||
.br
|
||||
\fBMMMMMM\fRinor
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm sio
|
||||
@ -67,108 +95,199 @@ driver provides support for NS8250-, NS16450-, NS16550 and NS16550A-based
|
||||
.Pf ( Tn CCITT
|
||||
.Tn V.24 )
|
||||
communications interfaces. The NS8250 and NS16450 have single character
|
||||
buffers, the NS16550A has a 16 character FIFO buffer.
|
||||
buffers, the NS16550A has 16 character FIFO input and output buffers.
|
||||
.Pp
|
||||
Input and output for each line may set to one of following baud rates;
|
||||
50, 75, 110, 134.5, 150, 300, 600, 1200, 1800, 2400, 4800, 9600,
|
||||
19200, 38400, 57600, or 115200. Your hardware may limit your baud
|
||||
rate choices.
|
||||
.Pp
|
||||
The driver supports `multiport' cards.
|
||||
The driver supports `multiport' cards.
|
||||
Multiport cards are those that have one or more groups of ports
|
||||
that share a common IRQ and Interrupt Request register set per group.
|
||||
Frequently 4 ports share 1 IRQ, some 8 port cards have 2 groups of 4 ports,
|
||||
that share an Interrupt Request (IRQ) line per group.
|
||||
Shared IRQs on different cards are not supported.
|
||||
Frequently 4 ports share 1 IRQ; some 8 port cards have 2 groups of 4 ports,
|
||||
thus using 2 IRQs.
|
||||
Some cards allow the first 2 serial ports to have seperate IRQs per port
|
||||
(as per DOS PC standard).
|
||||
.sp
|
||||
Some cards have an IRQ control register for each group.
|
||||
Some cards require special initialization related to such registers.
|
||||
Only AST/4 compatible IRQ control registers are supported.
|
||||
Some cards have an IRQ status register for each group.
|
||||
The driver does not require or use such registers yet.
|
||||
To work, the control and status registers for a group, if any,
|
||||
must be mapped to the scratch register (register 7)
|
||||
of a port in the group.
|
||||
Such a port is called a
|
||||
.Nm master
|
||||
port.
|
||||
.sp
|
||||
The
|
||||
.Nm flags
|
||||
keyword specifies for each
|
||||
keyword may be used on each
|
||||
.Nm device sio
|
||||
line in the kernel configuration file,
|
||||
whether the port is part of an IRQ sharing group, & if so,
|
||||
which port is the master device for
|
||||
the group (ie which port has the IRQ control registers).
|
||||
The master device is the port which
|
||||
has registers through which all interrupts of the port group are funneled.
|
||||
All ports of a port group report pending interrupts using this
|
||||
single register.
|
||||
line in the kernel configuration file
|
||||
to silence the probe
|
||||
or to disable the FIFO on 16550A UARTs
|
||||
(see the synopsis).
|
||||
Disabling the FIFO should rarely be necessary
|
||||
since the driver automatically adjusts the receiver
|
||||
FIFO trigger level for low latency and high efficiency.
|
||||
.sp
|
||||
The master device is an integer embedded in the high byte of the
|
||||
The
|
||||
.Nm flags
|
||||
bitfield, so all sio entries in the kernel config file that are part of a
|
||||
multiport card must include the correct
|
||||
.Nm flags
|
||||
specification.
|
||||
The bitwise assignment allows multiple port groups to
|
||||
be configured in one system. It does
|
||||
keyword
|
||||
.Nm must
|
||||
be used for all ports that are part of an IRQ sharing group.
|
||||
One bit specifies IRQ sharing; another bit specifies whether the port does
|
||||
.Nm not
|
||||
imply that more than one port group (or card) can share
|
||||
the same physical interrupt line!
|
||||
require AST/4 compatible initialization.
|
||||
The minor number of the device corresponding a master port
|
||||
for the group is encoded as a bitfield in the high byte.
|
||||
The same master port must be specified for all ports in a group.
|
||||
.sp
|
||||
The
|
||||
.Nm irq
|
||||
and
|
||||
.Nm vector
|
||||
specifications must be given for master ports
|
||||
and for ports that are not part of an IRQ sharing group,
|
||||
and not for other ports.
|
||||
.Pp
|
||||
In the synopsis the
|
||||
In the synopsis,
|
||||
.Nm flags 0x701
|
||||
means that the 8th port (sio7) is the master
|
||||
device (so the MSB of the flags), and that the ports are part of a
|
||||
multiport card (the LSB of the flags, actually only the LS
|
||||
.Nm bit
|
||||
).
|
||||
F.e. if you have only two standard ports in addition to multiport
|
||||
card, this
|
||||
.Nm flags
|
||||
will be
|
||||
.Nm 0x501
|
||||
(assuming the control port is
|
||||
.Nm sio5
|
||||
).
|
||||
port, and that the port is on a multiport card with shared IRQs
|
||||
and an AST/4 compatible IRQ control register.
|
||||
.sp
|
||||
.Nm flags 0xb05
|
||||
means that the 12th port (sio11) is the master
|
||||
port, and that the port is on a multiport card with shared IRQs
|
||||
and no special IRQ control register.
|
||||
.Pp
|
||||
Which port is the master device depends on the card type. Consult
|
||||
the hardware documentation of your card.
|
||||
Which port is the master port depends on the card type.
|
||||
Consult the hardware documentation of your card.
|
||||
Since IRQ status registers are never used,
|
||||
and IRQ control registers are only used for AST/4 compatible cards,
|
||||
and some cards map the control/status registers to all ports in a group,
|
||||
any port in a group will sometimes do for the master port.
|
||||
Choose a port containing an IRQ status register for forwards compatibility,
|
||||
and the highest possible port for consistency.
|
||||
.Pp
|
||||
Serial ports controlled by the
|
||||
Serial ports controlled by the
|
||||
.Nm sio
|
||||
driver can be used for both dialin and dialout.
|
||||
The minor number of the dialout
|
||||
port is 128 higher than that of the corresponding dialin port. Use
|
||||
.Xr stty 1
|
||||
to enable or disable modem control as required by your setup.
|
||||
driver can be used for both `callin' and `callout'.
|
||||
For each port there is a callin device and a callout device.
|
||||
The minor number of the callout device is 128 higher
|
||||
than that of the corresponding callin port.
|
||||
The callin device is general purpose.
|
||||
Processes opening it normally wait for carrier
|
||||
and for the callout device to become inactive.
|
||||
The callout device is used to steal the port from
|
||||
processes waiting for carrier on the callin device.
|
||||
Processes opening it do not wait for carrier
|
||||
and put any processes waiting for carrier on the callin device into
|
||||
a deeper sleep so that they do not conflict with the callout session.
|
||||
The callout device is abused for handling programs that are supposed
|
||||
to work on general ports and need to open the port without waiting
|
||||
but are too stupid to do so.
|
||||
.Pp
|
||||
While testing new cards & resolving card config DIP header &
|
||||
.Nm sio flags
|
||||
settings, to avoid coms. failure from lack of full modem DC level
|
||||
settings on ports,
|
||||
you are recommended to temporarily use syntax such as:
|
||||
.Nm stty -f /dev/tty03 clocal
|
||||
The
|
||||
.Nm sio
|
||||
driver also supports an initial-state and a lock-state control
|
||||
device for each of the callin and the callout "data" devices.
|
||||
The minor number of the initial-state device is 32 higher
|
||||
than that of the corresponding data device.
|
||||
The minor number of the lock-state device is 64 higher
|
||||
than that of the corresponding data device.
|
||||
The termios settings of a data device are copied
|
||||
from those of the corresponding initial-state device
|
||||
on first opens and are not inherited from previous opens.
|
||||
Use
|
||||
.Xr stty 1
|
||||
in the normal way on the initial-state devices to program
|
||||
initial termios states suitable for your setup.
|
||||
.sp
|
||||
The lock termios state acts as flags to disable changing
|
||||
the termios state. E.g., to lock a flag variable such as
|
||||
CRTSCTS, use
|
||||
.Nm stty crtscts
|
||||
on the lock-state device. Speeds and special characters
|
||||
may be locked by setting the corresponding value in the lock-state
|
||||
device to any nonzero value.
|
||||
.sp
|
||||
Correct programs talking to correctly wired external devices
|
||||
work with arbitrary initial states and almost no locking,
|
||||
but other setups may benefit from changing some of the default
|
||||
initial state and locking the state.
|
||||
E.g., CRTSCTS should be locked on for devices that support
|
||||
RTS/CTS handshaking at all times and off for devices that don't
|
||||
support it at all. CLOCAL should be locked on for devices
|
||||
that don't support carrier. HUPCL may be locked off if you don't
|
||||
want to hang up for reason. In general, very bad things happen
|
||||
if something is locked to the wrong state, and things should not
|
||||
be locked for devices that support more than one setting. The
|
||||
CLOCAL flag on callin ports should be locked off for logins
|
||||
to avoid certain security holes, but this needs to be done by
|
||||
getty if the callin port is used for anything else.
|
||||
.Sh FILES
|
||||
.Bl -tag -width /dev/tty0? -compact
|
||||
.Bl -tag -width /dev/ttyi0? -compact
|
||||
.It Pa /dev/tty0?
|
||||
for hardwired terminals
|
||||
.It Pa /dev/ttyi0?
|
||||
.It Pa /dev/ttyl0?
|
||||
corresponding initial-state and lock-state devices
|
||||
.El
|
||||
.sp
|
||||
or
|
||||
.Bl -tag -width /dev/tty0? -compact
|
||||
.sp
|
||||
.Bl -tag -width /dev/ttyi0? -compact
|
||||
.It Pa /dev/ttyd?
|
||||
for dialin ports
|
||||
for callin ports
|
||||
.It Pa /dev/ttyid?
|
||||
.It Pa /dev/ttyld?
|
||||
corresponding callin initial-state and lock-state devices
|
||||
.sp
|
||||
.It Pa /dev/cua0?
|
||||
for dialout ports
|
||||
for callout ports
|
||||
.It Pa /dev/cuai0?
|
||||
.It Pa /dev/cual0?
|
||||
corresponding callout initial-state and lock-state devices
|
||||
.El
|
||||
.sp
|
||||
.Bl -tag -width /etc/rc.serial -compact
|
||||
.It Pa /etc/rc.serial
|
||||
examples of setting the initial-state and lock-state devices
|
||||
.El
|
||||
.Pp
|
||||
The devices numbers are made from the set [0-9a-z] so that more than
|
||||
The devices numbers are made from the set [0-9a-v] so that more than
|
||||
10 ports can be supported.
|
||||
/dev/tty0? and /dev/ttyd? are mutually exclusive, if you have
|
||||
/dev/tty0? corresponding /dev/ttyd? must be removed and vice versa.
|
||||
.Sh DIAGNOSTICS
|
||||
.Bl -diag
|
||||
.It sio%d: silo overflow.
|
||||
The single-character input
|
||||
.Dq silo
|
||||
has overflowed and incoming data has been lost.
|
||||
.\".It com%d: weird interrupt: %x.
|
||||
.\"The device has generated an unexpected interrupt
|
||||
.\"with the code listed.
|
||||
Problem in the interrupt handler.
|
||||
.El
|
||||
.Bl -diag
|
||||
.It sio%d: interrupt-level buffer overflow.
|
||||
Problem in the bottom half of the driver.
|
||||
.El
|
||||
.Bl -diag
|
||||
.It sio%d: tty-level buffer overflow.
|
||||
Problem in the application.
|
||||
.sp
|
||||
Input has arrived faster than the given module could process it
|
||||
and some has been lost.
|
||||
.sp
|
||||
.El
|
||||
.Bl -diag
|
||||
.It sio%d: reduced fifo trigger level to %d.
|
||||
Attempting to avoid further silo overflows.
|
||||
.Sh SEE ALSO
|
||||
.Xr tty 4 ,
|
||||
.Xr termios 4 ,
|
||||
.Xr comcontrol 8 ,
|
||||
.Xr stty 1 .
|
||||
.Sh HISTORY
|
||||
@ -180,12 +299,12 @@ driver is derived from the
|
||||
driver and is
|
||||
.Ud
|
||||
.Sh BUGS
|
||||
Data loss is not near as likely on busy systems as they are with the
|
||||
Data loss is not nearly as likely on busy systems as it is with the
|
||||
.Xr com 4
|
||||
driver but they still can occur at very high baud rates on slow systems. The
|
||||
use of NS16550A's helps lot to handle high baud rates.
|
||||
driver but it can still occur at very high baud rates on slow systems.
|
||||
The use of NS16550A's reduces system load and helps to avoid data loss.
|
||||
.Pp
|
||||
Stay away from NS16550 (so without the trailing A). These are early
|
||||
Stay away from plain NS16550's. These are early
|
||||
implementations of the chip with non-functional FIFO hardware.
|
||||
.Pp
|
||||
The constants which define the locations
|
||||
@ -193,12 +312,13 @@ of the various serial ports are holdovers from
|
||||
.Nm DOS .
|
||||
As shown, hex addresses can be and for clarity probably should be used instead.
|
||||
.Pp
|
||||
As usual, you get what you pay for; cheap NS16550 clones generally don't work.
|
||||
.Pp
|
||||
The multiport example is based on an AST/4 card, your
|
||||
mileage may vary however. Note that on the AST/4 the card's dipswitches should
|
||||
Note that on the AST/4 the card's dipswitches should
|
||||
.Nm not
|
||||
be set to use interrupt sharing. AST/4-like interrupt sharing is only used when
|
||||
be set to use interrupt sharing. AST/4-like interrupt sharing is only used when
|
||||
.Nm multiple
|
||||
AST/4 cards are installed in the same system. The sio driver does not
|
||||
AST/4 cards are installed in the same system. The sio driver does not
|
||||
support more than 1 AST/4 on one IRQ.
|
||||
.Pp
|
||||
Hardwired terminals should not have different device names.
|
||||
.Pp
|
||||
The examples in the synopsis are too vendor-specific.
|
||||
|
@ -36,7 +36,7 @@
|
||||
.\" from: com.4,v 1.1 1993/08/06 11:19:07 cgd Exp
|
||||
.\" $Id: sio.4,v 1.10 1994/05/07 01:15:10 ache Exp $
|
||||
.\"
|
||||
.Dd February 9, 1994
|
||||
.Dd June 3, 1994
|
||||
.Dt SIO 4 i386
|
||||
.Os FreeBSD
|
||||
.Sh NAME
|
||||
@ -50,14 +50,42 @@ For standard ports:
|
||||
.Cd "device sio2 at isa? port" \&"IO_COM3\&" tty irq 5 vector siointr
|
||||
.Cd "device sio3 at isa? port" \&"IO_COM4\&" tty irq 9 vector siointr
|
||||
.sp
|
||||
For multiport cards:
|
||||
For AST compatible multiport cards with 4 ports:
|
||||
.Cd "options" \&"COM_MULTIPORT\&"
|
||||
.Cd "device sio4 at isa? port 0x2a0 tty irq 12 flags 0x701 vector siointr"
|
||||
.Cd "device sio5 at isa? port 0x2a8 tty flags 0x701 vector siointr"
|
||||
.Cd "device sio6 at isa? port 0x2b0 tty flags 0x701 vector siointr"
|
||||
.Cd "device sio7 at isa? port 0x2b8 tty flags 0x701 vector siointr"
|
||||
.Cd "device sio4 at isa? port 0x2a0 tty flags 0x701"
|
||||
.Cd "device sio5 at isa? port 0x2a8 tty flags 0x701"
|
||||
.Cd "device sio6 at isa? port 0x2b0 tty flags 0x701"
|
||||
.Cd "device sio7 at isa? port 0x2b8 tty flags 0x701 irq 12 vector siointr"
|
||||
.sp
|
||||
Use 0x02 bit in flags field to disable FIFO on specified port.
|
||||
For Boca Board compatible multiport cards with 8 ports:
|
||||
.Cd "options" \&"COM_MULTIPORT\&"
|
||||
.Cd "device sio4 at isa? port 0x100 tty flags 0xb05"
|
||||
.Cd "..."
|
||||
.Cd "device sio11 at isa? port 0x138 tty flags 0xb05 irq 12 vector siointr"
|
||||
.sp
|
||||
Meaning of \fBflags\fR:
|
||||
.br
|
||||
\fB0x0001\fR shared IRQs
|
||||
.br
|
||||
\fB0x0002\fR disable FIFO
|
||||
.br
|
||||
\fB0x0004\fR no AST/4 compatible IRQ control register
|
||||
.br
|
||||
\fB0x0080\fR disable diagnostics in probe
|
||||
.br
|
||||
\fB0x\fI??\fB00\fR minor number of master port
|
||||
.sp
|
||||
Minor numbering:
|
||||
.br
|
||||
0b\fIOLIMMMMM\fR
|
||||
.br
|
||||
call\fBO\fRut
|
||||
.br
|
||||
\fBL\fRock
|
||||
.br
|
||||
\fBI\fRnitial
|
||||
.br
|
||||
\fBMMMMMM\fRinor
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm sio
|
||||
@ -67,108 +95,199 @@ driver provides support for NS8250-, NS16450-, NS16550 and NS16550A-based
|
||||
.Pf ( Tn CCITT
|
||||
.Tn V.24 )
|
||||
communications interfaces. The NS8250 and NS16450 have single character
|
||||
buffers, the NS16550A has a 16 character FIFO buffer.
|
||||
buffers, the NS16550A has 16 character FIFO input and output buffers.
|
||||
.Pp
|
||||
Input and output for each line may set to one of following baud rates;
|
||||
50, 75, 110, 134.5, 150, 300, 600, 1200, 1800, 2400, 4800, 9600,
|
||||
19200, 38400, 57600, or 115200. Your hardware may limit your baud
|
||||
rate choices.
|
||||
.Pp
|
||||
The driver supports `multiport' cards.
|
||||
The driver supports `multiport' cards.
|
||||
Multiport cards are those that have one or more groups of ports
|
||||
that share a common IRQ and Interrupt Request register set per group.
|
||||
Frequently 4 ports share 1 IRQ, some 8 port cards have 2 groups of 4 ports,
|
||||
that share an Interrupt Request (IRQ) line per group.
|
||||
Shared IRQs on different cards are not supported.
|
||||
Frequently 4 ports share 1 IRQ; some 8 port cards have 2 groups of 4 ports,
|
||||
thus using 2 IRQs.
|
||||
Some cards allow the first 2 serial ports to have seperate IRQs per port
|
||||
(as per DOS PC standard).
|
||||
.sp
|
||||
Some cards have an IRQ control register for each group.
|
||||
Some cards require special initialization related to such registers.
|
||||
Only AST/4 compatible IRQ control registers are supported.
|
||||
Some cards have an IRQ status register for each group.
|
||||
The driver does not require or use such registers yet.
|
||||
To work, the control and status registers for a group, if any,
|
||||
must be mapped to the scratch register (register 7)
|
||||
of a port in the group.
|
||||
Such a port is called a
|
||||
.Nm master
|
||||
port.
|
||||
.sp
|
||||
The
|
||||
.Nm flags
|
||||
keyword specifies for each
|
||||
keyword may be used on each
|
||||
.Nm device sio
|
||||
line in the kernel configuration file,
|
||||
whether the port is part of an IRQ sharing group, & if so,
|
||||
which port is the master device for
|
||||
the group (ie which port has the IRQ control registers).
|
||||
The master device is the port which
|
||||
has registers through which all interrupts of the port group are funneled.
|
||||
All ports of a port group report pending interrupts using this
|
||||
single register.
|
||||
line in the kernel configuration file
|
||||
to silence the probe
|
||||
or to disable the FIFO on 16550A UARTs
|
||||
(see the synopsis).
|
||||
Disabling the FIFO should rarely be necessary
|
||||
since the driver automatically adjusts the receiver
|
||||
FIFO trigger level for low latency and high efficiency.
|
||||
.sp
|
||||
The master device is an integer embedded in the high byte of the
|
||||
The
|
||||
.Nm flags
|
||||
bitfield, so all sio entries in the kernel config file that are part of a
|
||||
multiport card must include the correct
|
||||
.Nm flags
|
||||
specification.
|
||||
The bitwise assignment allows multiple port groups to
|
||||
be configured in one system. It does
|
||||
keyword
|
||||
.Nm must
|
||||
be used for all ports that are part of an IRQ sharing group.
|
||||
One bit specifies IRQ sharing; another bit specifies whether the port does
|
||||
.Nm not
|
||||
imply that more than one port group (or card) can share
|
||||
the same physical interrupt line!
|
||||
require AST/4 compatible initialization.
|
||||
The minor number of the device corresponding a master port
|
||||
for the group is encoded as a bitfield in the high byte.
|
||||
The same master port must be specified for all ports in a group.
|
||||
.sp
|
||||
The
|
||||
.Nm irq
|
||||
and
|
||||
.Nm vector
|
||||
specifications must be given for master ports
|
||||
and for ports that are not part of an IRQ sharing group,
|
||||
and not for other ports.
|
||||
.Pp
|
||||
In the synopsis the
|
||||
In the synopsis,
|
||||
.Nm flags 0x701
|
||||
means that the 8th port (sio7) is the master
|
||||
device (so the MSB of the flags), and that the ports are part of a
|
||||
multiport card (the LSB of the flags, actually only the LS
|
||||
.Nm bit
|
||||
).
|
||||
F.e. if you have only two standard ports in addition to multiport
|
||||
card, this
|
||||
.Nm flags
|
||||
will be
|
||||
.Nm 0x501
|
||||
(assuming the control port is
|
||||
.Nm sio5
|
||||
).
|
||||
port, and that the port is on a multiport card with shared IRQs
|
||||
and an AST/4 compatible IRQ control register.
|
||||
.sp
|
||||
.Nm flags 0xb05
|
||||
means that the 12th port (sio11) is the master
|
||||
port, and that the port is on a multiport card with shared IRQs
|
||||
and no special IRQ control register.
|
||||
.Pp
|
||||
Which port is the master device depends on the card type. Consult
|
||||
the hardware documentation of your card.
|
||||
Which port is the master port depends on the card type.
|
||||
Consult the hardware documentation of your card.
|
||||
Since IRQ status registers are never used,
|
||||
and IRQ control registers are only used for AST/4 compatible cards,
|
||||
and some cards map the control/status registers to all ports in a group,
|
||||
any port in a group will sometimes do for the master port.
|
||||
Choose a port containing an IRQ status register for forwards compatibility,
|
||||
and the highest possible port for consistency.
|
||||
.Pp
|
||||
Serial ports controlled by the
|
||||
Serial ports controlled by the
|
||||
.Nm sio
|
||||
driver can be used for both dialin and dialout.
|
||||
The minor number of the dialout
|
||||
port is 128 higher than that of the corresponding dialin port. Use
|
||||
.Xr stty 1
|
||||
to enable or disable modem control as required by your setup.
|
||||
driver can be used for both `callin' and `callout'.
|
||||
For each port there is a callin device and a callout device.
|
||||
The minor number of the callout device is 128 higher
|
||||
than that of the corresponding callin port.
|
||||
The callin device is general purpose.
|
||||
Processes opening it normally wait for carrier
|
||||
and for the callout device to become inactive.
|
||||
The callout device is used to steal the port from
|
||||
processes waiting for carrier on the callin device.
|
||||
Processes opening it do not wait for carrier
|
||||
and put any processes waiting for carrier on the callin device into
|
||||
a deeper sleep so that they do not conflict with the callout session.
|
||||
The callout device is abused for handling programs that are supposed
|
||||
to work on general ports and need to open the port without waiting
|
||||
but are too stupid to do so.
|
||||
.Pp
|
||||
While testing new cards & resolving card config DIP header &
|
||||
.Nm sio flags
|
||||
settings, to avoid coms. failure from lack of full modem DC level
|
||||
settings on ports,
|
||||
you are recommended to temporarily use syntax such as:
|
||||
.Nm stty -f /dev/tty03 clocal
|
||||
The
|
||||
.Nm sio
|
||||
driver also supports an initial-state and a lock-state control
|
||||
device for each of the callin and the callout "data" devices.
|
||||
The minor number of the initial-state device is 32 higher
|
||||
than that of the corresponding data device.
|
||||
The minor number of the lock-state device is 64 higher
|
||||
than that of the corresponding data device.
|
||||
The termios settings of a data device are copied
|
||||
from those of the corresponding initial-state device
|
||||
on first opens and are not inherited from previous opens.
|
||||
Use
|
||||
.Xr stty 1
|
||||
in the normal way on the initial-state devices to program
|
||||
initial termios states suitable for your setup.
|
||||
.sp
|
||||
The lock termios state acts as flags to disable changing
|
||||
the termios state. E.g., to lock a flag variable such as
|
||||
CRTSCTS, use
|
||||
.Nm stty crtscts
|
||||
on the lock-state device. Speeds and special characters
|
||||
may be locked by setting the corresponding value in the lock-state
|
||||
device to any nonzero value.
|
||||
.sp
|
||||
Correct programs talking to correctly wired external devices
|
||||
work with arbitrary initial states and almost no locking,
|
||||
but other setups may benefit from changing some of the default
|
||||
initial state and locking the state.
|
||||
E.g., CRTSCTS should be locked on for devices that support
|
||||
RTS/CTS handshaking at all times and off for devices that don't
|
||||
support it at all. CLOCAL should be locked on for devices
|
||||
that don't support carrier. HUPCL may be locked off if you don't
|
||||
want to hang up for reason. In general, very bad things happen
|
||||
if something is locked to the wrong state, and things should not
|
||||
be locked for devices that support more than one setting. The
|
||||
CLOCAL flag on callin ports should be locked off for logins
|
||||
to avoid certain security holes, but this needs to be done by
|
||||
getty if the callin port is used for anything else.
|
||||
.Sh FILES
|
||||
.Bl -tag -width /dev/tty0? -compact
|
||||
.Bl -tag -width /dev/ttyi0? -compact
|
||||
.It Pa /dev/tty0?
|
||||
for hardwired terminals
|
||||
.It Pa /dev/ttyi0?
|
||||
.It Pa /dev/ttyl0?
|
||||
corresponding initial-state and lock-state devices
|
||||
.El
|
||||
.sp
|
||||
or
|
||||
.Bl -tag -width /dev/tty0? -compact
|
||||
.sp
|
||||
.Bl -tag -width /dev/ttyi0? -compact
|
||||
.It Pa /dev/ttyd?
|
||||
for dialin ports
|
||||
for callin ports
|
||||
.It Pa /dev/ttyid?
|
||||
.It Pa /dev/ttyld?
|
||||
corresponding callin initial-state and lock-state devices
|
||||
.sp
|
||||
.It Pa /dev/cua0?
|
||||
for dialout ports
|
||||
for callout ports
|
||||
.It Pa /dev/cuai0?
|
||||
.It Pa /dev/cual0?
|
||||
corresponding callout initial-state and lock-state devices
|
||||
.El
|
||||
.sp
|
||||
.Bl -tag -width /etc/rc.serial -compact
|
||||
.It Pa /etc/rc.serial
|
||||
examples of setting the initial-state and lock-state devices
|
||||
.El
|
||||
.Pp
|
||||
The devices numbers are made from the set [0-9a-z] so that more than
|
||||
The devices numbers are made from the set [0-9a-v] so that more than
|
||||
10 ports can be supported.
|
||||
/dev/tty0? and /dev/ttyd? are mutually exclusive, if you have
|
||||
/dev/tty0? corresponding /dev/ttyd? must be removed and vice versa.
|
||||
.Sh DIAGNOSTICS
|
||||
.Bl -diag
|
||||
.It sio%d: silo overflow.
|
||||
The single-character input
|
||||
.Dq silo
|
||||
has overflowed and incoming data has been lost.
|
||||
.\".It com%d: weird interrupt: %x.
|
||||
.\"The device has generated an unexpected interrupt
|
||||
.\"with the code listed.
|
||||
Problem in the interrupt handler.
|
||||
.El
|
||||
.Bl -diag
|
||||
.It sio%d: interrupt-level buffer overflow.
|
||||
Problem in the bottom half of the driver.
|
||||
.El
|
||||
.Bl -diag
|
||||
.It sio%d: tty-level buffer overflow.
|
||||
Problem in the application.
|
||||
.sp
|
||||
Input has arrived faster than the given module could process it
|
||||
and some has been lost.
|
||||
.sp
|
||||
.El
|
||||
.Bl -diag
|
||||
.It sio%d: reduced fifo trigger level to %d.
|
||||
Attempting to avoid further silo overflows.
|
||||
.Sh SEE ALSO
|
||||
.Xr tty 4 ,
|
||||
.Xr termios 4 ,
|
||||
.Xr comcontrol 8 ,
|
||||
.Xr stty 1 .
|
||||
.Sh HISTORY
|
||||
@ -180,12 +299,12 @@ driver is derived from the
|
||||
driver and is
|
||||
.Ud
|
||||
.Sh BUGS
|
||||
Data loss is not near as likely on busy systems as they are with the
|
||||
Data loss is not nearly as likely on busy systems as it is with the
|
||||
.Xr com 4
|
||||
driver but they still can occur at very high baud rates on slow systems. The
|
||||
use of NS16550A's helps lot to handle high baud rates.
|
||||
driver but it can still occur at very high baud rates on slow systems.
|
||||
The use of NS16550A's reduces system load and helps to avoid data loss.
|
||||
.Pp
|
||||
Stay away from NS16550 (so without the trailing A). These are early
|
||||
Stay away from plain NS16550's. These are early
|
||||
implementations of the chip with non-functional FIFO hardware.
|
||||
.Pp
|
||||
The constants which define the locations
|
||||
@ -193,12 +312,13 @@ of the various serial ports are holdovers from
|
||||
.Nm DOS .
|
||||
As shown, hex addresses can be and for clarity probably should be used instead.
|
||||
.Pp
|
||||
As usual, you get what you pay for; cheap NS16550 clones generally don't work.
|
||||
.Pp
|
||||
The multiport example is based on an AST/4 card, your
|
||||
mileage may vary however. Note that on the AST/4 the card's dipswitches should
|
||||
Note that on the AST/4 the card's dipswitches should
|
||||
.Nm not
|
||||
be set to use interrupt sharing. AST/4-like interrupt sharing is only used when
|
||||
be set to use interrupt sharing. AST/4-like interrupt sharing is only used when
|
||||
.Nm multiple
|
||||
AST/4 cards are installed in the same system. The sio driver does not
|
||||
AST/4 cards are installed in the same system. The sio driver does not
|
||||
support more than 1 AST/4 on one IRQ.
|
||||
.Pp
|
||||
Hardwired terminals should not have different device names.
|
||||
.Pp
|
||||
The examples in the synopsis are too vendor-specific.
|
||||
|
Loading…
x
Reference in New Issue
Block a user