Merge from vendor branch LIBARCHIVE:
[dragonfly.git] / share / man / man4 / man4.i386 / sr.4
1 .\"
2 .\" Copyright (c) 1996 John Hay.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"        This product includes software developed by John Hay.
15 .\" 4. Neither the name of the author nor the names of any co-contributors
16 .\"    may be used to endorse or promote products derived from this software
17 .\"    without specific prior written permission.
18 .\"
19 .\" THIS SOFTWARE IS PROVIDED BY John Hay ``AS IS'' AND
20 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 .\" ARE DISCLAIMED.  IN NO EVENT SHALL John Hay BE LIABLE
23 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 .\" SUCH DAMAGE.
30 .\"
31 .\" $FreeBSD: src/share/man/man4/man4.i386/sr.4,v 1.15.2.4 2001/08/17 13:08:46 ru Exp $
32 .\" $DragonFly: src/share/man/man4/man4.i386/sr.4,v 1.7 2006/11/14 22:27:49 swildner Exp $
33 .\"
34 .Dd July 4, 1996
35 .Dt SR 4 i386
36 .Os
37 .Sh NAME
38 .Nm sr
39 .Nd synchronous RISCom/N2 / WANic 400/405 device driver
40 .Sh SYNOPSIS
41 .Cd "device sr0 at isa? port 0x300 irq 10 iomem 0xd0000"
42 .Cd "device sr1 at isa? port 0x310 irq 11 flags 0x1 iomem 0xd0000"
43 .Pp
44 .Cd "pseudo-device sppp"
45 .Sh DESCRIPTION
46 The
47 .Nm
48 driver supports the RISCom/N2 ISA cards and the WANic 400/405 PCI cards
49 that is based on the HD64570 chip.
50 .Pp
51 The standard
52 .Fx
53 sppp code is used for the link level layer.
54 The
55 default protocol used is PPP.
56 The Cisco HDLC protocol can be used by
57 adding
58 .Em link2
59 to
60 .Xr ifconfig 8 .
61 .Pp
62 Alternately, the driver can be compiled to support
63 .Xr netgraph 4
64 (see below).
65 .Pp
66 The
67 .Em flags
68 field is optional.
69 If it isn't specified, the driver will
70 assume the following:
71 .Pp
72 .Bl -hang -offset indent
73 .It "The card has 2 ports."
74 .It "The clock for the serial ports is external and the transmitter uses"
75 the same clock as the receiver.
76 .El
77 .Pp
78 The
79 .Em flags
80 are a bit field and can be used to force a different
81 behaviour than the default.
82 .Pp
83 .Bl -hang -offset indent
84 .It Em 0x01
85 The card has only one port.
86 .It Em 0x10
87 Use separate external clocks for transmit and receive on port 0.
88 .It Em 0x40
89 Use separate external clocks for transmit and receive on port 1.
90 .El
91 .Sh NUMBERING
92 Only one line for each card is needed in the kernel configuration file.
93 The first card's ports will be installed from sr0. The numbering of the
94 next card will continue where the first stopped, eg. if the first card
95 is a two port card it will use sr0 and sr1. The next card will then
96 start at sr2.
97 .Pp
98 The card only supports IRQ 3, 4, 5, 7, 10, 11, 12 and 15.
99 .Pp
100 The iomem area is a 16Kb block and must start at a 16Kb boundary.
101 .Sh NETGRAPH SUPPORT
102 If the kernel is compiled with
103 .Cd "options NETGRAPH"
104 then the sppp and Cisco HDLC modes are disabled (and the sppp driver
105 is unneeded), and this driver functions as a
106 .Xr netgraph 4
107 node with a single hook named
108 .Dv rawdata .
109 Connecting to this hook enables the transmission of raw HDLC frames.
110 The node will have the same name as the device with ``sync_''
111 prepended, e.g.,
112 .Dv sync_sr0 .
113 .Sh FILES
114 .Bl -tag -width /sys/machine/pc32/isa/ic/hd64570.h -compact
115 .It Pa /sys/dev/netif/sr/if_sr.c
116 .It Pa /sys/dev/netif/sr/if_sr.h
117 .It Pa /sys/dev/netif/sr/if_sr_pci.c
118 .It Pa /sys/dev/netif/sr/if_srregs.h
119 .It Pa /sys/machine/pc32/isa/ic/hd64570.h
120 .El
121 .Sh DIAGNOSTICS
122 .Bl -diag
123 .It "sr%d: Warning illegal interrupt %d."
124 The card cannot use the specified interrupt.
125 Choose a different one.
126 .El
127 .Sh SEE ALSO
128 .Xr ar 4 ,
129 .Xr cx 4 ,
130 .Xr netgraph 4 ,
131 .Xr netintro 4 ,
132 .Xr ifconfig 8
133 .Sh AUTHORS
134 .An -nosplit
135 The
136 .Nm
137 device driver was written by
138 .An John Hay Aq jhay@FreeBSD.org .
139 .Pp
140 Netgraph support was added by
141 .An Julian Elischer Aq julian@FreeBSD.org .
142 .Sh BUGS
143 At the moment only the X.21 interface is tested.
144 The others
145 may need tweaks to the clock selection code.
146 .Pp
147 The code can probably stand some optimizing.