OpenCores
URL https://opencores.org/ocsvn/or1k_soc_on_altera_embedded_dev_kit/or1k_soc_on_altera_embedded_dev_kit/trunk

Subversion Repositories or1k_soc_on_altera_embedded_dev_kit

[/] [or1k_soc_on_altera_embedded_dev_kit/] [trunk/] [linux-2.6/] [linux-2.6.24/] [Documentation/] [networking/] [generic-hdlc.txt] - Blame information for rev 17

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 xianfeng
Generic HDLC layer
2
Krzysztof Halasa 
3
 
4
 
5
Generic HDLC layer currently supports:
6
1. Frame Relay (ANSI, CCITT, Cisco and no LMI).
7
   - Normal (routed) and Ethernet-bridged (Ethernet device emulation)
8
     interfaces can share a single PVC.
9
   - ARP support (no InARP support in the kernel - there is an
10
     experimental InARP user-space daemon available on:
11
     http://www.kernel.org/pub/linux/utils/net/hdlc/).
12
2. raw HDLC - either IP (IPv4) interface or Ethernet device emulation.
13
3. Cisco HDLC.
14
4. PPP (uses syncppp.c).
15
5. X.25 (uses X.25 routines).
16
 
17
Generic HDLC is a protocol driver only - it needs a low-level driver
18
for your particular hardware.
19
 
20
Ethernet device emulation (using HDLC or Frame-Relay PVC) is compatible
21
with IEEE 802.1Q (VLANs) and 802.1D (Ethernet bridging).
22
 
23
 
24
Make sure the hdlc.o and the hardware driver are loaded. It should
25
create a number of "hdlc" (hdlc0 etc) network devices, one for each
26
WAN port. You'll need the "sethdlc" utility, get it from:
27
        http://www.kernel.org/pub/linux/utils/net/hdlc/
28
 
29
Compile sethdlc.c utility:
30
        gcc -O2 -Wall -o sethdlc sethdlc.c
31
Make sure you're using a correct version of sethdlc for your kernel.
32
 
33
Use sethdlc to set physical interface, clock rate, HDLC mode used,
34
and add any required PVCs if using Frame Relay.
35
Usually you want something like:
36
 
37
        sethdlc hdlc0 clock int rate 128000
38
        sethdlc hdlc0 cisco interval 10 timeout 25
39
or
40
        sethdlc hdlc0 rs232 clock ext
41
        sethdlc hdlc0 fr lmi ansi
42
        sethdlc hdlc0 create 99
43
        ifconfig hdlc0 up
44
        ifconfig pvc0 localIP pointopoint remoteIP
45
 
46
In Frame Relay mode, ifconfig master hdlc device up (without assigning
47
any IP address to it) before using pvc devices.
48
 
49
 
50
Setting interface:
51
 
52
* v35 | rs232 | x21 | t1 | e1 - sets physical interface for a given port
53
                                if the card has software-selectable interfaces
54
  loopback - activate hardware loopback (for testing only)
55
* clock ext - both RX clock and TX clock external
56
* clock int - both RX clock and TX clock internal
57
* clock txint - RX clock external, TX clock internal
58
* clock txfromrx - RX clock external, TX clock derived from RX clock
59
* rate - sets clock rate in bps (for "int" or "txint" clock only)
60
 
61
 
62
Setting protocol:
63
 
64
* hdlc - sets raw HDLC (IP-only) mode
65
  nrz / nrzi / fm-mark / fm-space / manchester - sets transmission code
66
  no-parity / crc16 / crc16-pr0 (CRC16 with preset zeros) / crc32-itu
67
  crc16-itu (CRC16 with ITU-T polynomial) / crc16-itu-pr0 - sets parity
68
 
69
* hdlc-eth - Ethernet device emulation using HDLC. Parity and encoding
70
  as above.
71
 
72
* cisco - sets Cisco HDLC mode (IP, IPv6 and IPX supported)
73
  interval - time in seconds between keepalive packets
74
  timeout - time in seconds after last received keepalive packet before
75
            we assume the link is down
76
 
77
* ppp - sets synchronous PPP mode
78
 
79
* x25 - sets X.25 mode
80
 
81
* fr - Frame Relay mode
82
  lmi ansi / ccitt / cisco / none - LMI (link management) type
83
  dce - Frame Relay DCE (network) side LMI instead of default DTE (user).
84
  It has nothing to do with clocks!
85
  t391 - link integrity verification polling timer (in seconds) - user
86
  t392 - polling verification timer (in seconds) - network
87
  n391 - full status polling counter - user
88
  n392 - error threshold - both user and network
89
  n393 - monitored events count - both user and network
90
 
91
Frame-Relay only:
92
* create n | delete n - adds / deletes PVC interface with DLCI #n.
93
  Newly created interface will be named pvc0, pvc1 etc.
94
 
95
* create ether n | delete ether n - adds a device for Ethernet-bridged
96
  frames. The device will be named pvceth0, pvceth1 etc.
97
 
98
 
99
 
100
 
101
Board-specific issues
102
---------------------
103
 
104
n2.o and c101.o need parameters to work:
105
 
106
        insmod n2 hw=io,irq,ram,ports[:io,irq,...]
107
example:
108
        insmod n2 hw=0x300,10,0xD0000,01
109
 
110
or
111
        insmod c101 hw=irq,ram[:irq,...]
112
example:
113
        insmod c101 hw=9,0xdc000
114
 
115
If built into the kernel, these drivers need kernel (command line) parameters:
116
        n2.hw=io,irq,ram,ports:...
117
or
118
        c101.hw=irq,ram:...
119
 
120
 
121
 
122
If you have a problem with N2, C101 or PLX200SYN card, you can issue the
123
"private" command to see port's packet descriptor rings (in kernel logs):
124
 
125
        sethdlc hdlc0 private
126
 
127
The hardware driver has to be build with #define DEBUG_RINGS.
128
Attaching this info to bug reports would be helpful. Anyway, let me know
129
if you have problems using this.
130
 
131
For patches and other info look at:
132
.

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.