Adjust for recent changes.
[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.9 2008/07/09 16:23:55 thomas 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 sr"
42 .Pp
43 .Cd "pseudo-device sppp"
44 .Sh DESCRIPTION
45 The
46 .Nm
47 driver supports the WANic 400/405 PCI cards
48 that are based on the HD64570 chip.
49 .Pp
50 The standard
51 .Dx
52 sppp code is used for the link level layer.
53 The
54 default protocol used is PPP.
55 The Cisco HDLC protocol can be used by
56 adding
57 .Em link2
58 to
59 .Xr ifconfig 8 .
60 .Pp
61 Alternately, the driver can be compiled to support
62 .Xr netgraph 4
63 (see below).
64 .Pp
65 The
66 .Em flags
67 field is optional.
68 If it isn't specified, the driver will
69 assume the following:
70 .Bl -hang -offset indent
71 .It "The card has 2 ports."
72 .It "The clock for the serial ports is external and the transmitter uses"
73 the same clock as the receiver.
74 .El
75 .Pp
76 The
77 .Em flags
78 are a bit field and can be used to force a different
79 behaviour than the default.
80 .Bl -hang -offset indent
81 .It Em 0x01
82 The card has only one port.
83 .It Em 0x10
84 Use separate external clocks for transmit and receive on port 0.
85 .It Em 0x40
86 Use separate external clocks for transmit and receive on port 1.
87 .El
88 .Sh NUMBERING
89 Only one line for each card is needed in the kernel configuration file.
90 The first card's ports will be installed from sr0. The numbering of the
91 next card will continue where the first stopped, eg. if the first card
92 is a two port card it will use sr0 and sr1. The next card will then
93 start at sr2.
94 .Pp
95 The card only supports IRQ 3, 4, 5, 7, 10, 11, 12 and 15.
96 .Pp
97 The iomem area is a 16Kb block and must start at a 16Kb boundary.
98 .Sh NETGRAPH SUPPORT
99 If the kernel is compiled with
100 .Cd "options NETGRAPH"
101 then the sppp and Cisco HDLC modes are disabled (and the sppp driver
102 is unneeded), and this driver functions as a
103 .Xr netgraph 4
104 node with a single hook named
105 .Dv rawdata .
106 Connecting to this hook enables the transmission of raw HDLC frames.
107 The node will have the same name as the device with ``sync_''
108 prepended, e.g.,
109 .Dv sync_sr0 .
110 .Sh FILES
111 .Bl -tag -width ".Pa /sys/dev/netif/sr/if_sr_pci.c" -compact
112 .It Pa /sys/dev/netif/sr/if_sr.c
113 .It Pa /sys/dev/netif/sr/if_sr.h
114 .It Pa /sys/dev/netif/sr/if_sr_pci.c
115 .It Pa /sys/dev/netif/sr/if_srregs.h
116 .El
117 .Sh DIAGNOSTICS
118 .Bl -diag
119 .It "sr%d: Warning illegal interrupt %d."
120 The card cannot use the specified interrupt.
121 Choose a different one.
122 .El
123 .Sh SEE ALSO
124 .Xr ar 4 ,
125 .Xr netgraph 4 ,
126 .Xr netintro 4 ,
127 .Xr ifconfig 8
128 .Sh AUTHORS
129 .An -nosplit
130 The
131 .Nm
132 device driver was written by
133 .An John Hay Aq jhay@FreeBSD.org .
134 .Pp
135 Netgraph support was added by
136 .An Julian Elischer Aq julian@FreeBSD.org .
137 .Sh BUGS
138 At the moment only the X.21 interface is tested.
139 The others
140 may need tweaks to the clock selection code.
141 .Pp
142 The code can probably stand some optimizing.