slicecom.txt 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369
  1. SliceCOM adapter user's documentation - for the 0.51 driver version
  2. Written by Bartók István <bartoki@itc.hu>
  3. English translation: Lakatos György <gyuri@itc.hu>
  4. Mon Dec 11 15:28:42 CET 2000
  5. Last modified: Wed Aug 29 17:25:37 CEST 2001
  6. -----------------------------------------------------------------
  7. Usage:
  8. Compiling the kernel:
  9. Code maturity level options
  10. [*] Prompt for development and/or incomplete code/drivers
  11. Network device support
  12. Wan interfaces
  13. <M> MultiGate (COMX) synchronous
  14. <M> Support for MUNICH based boards: SliceCOM, PCICOM (NEW)
  15. <M> Support for HDLC and syncPPP...
  16. Loading the modules:
  17. modprobe comx
  18. modprobe comx-proto-ppp # module for Cisco-HDLC and SyncPPP protocols
  19. modprobe comx-hw-munich # the module logs information by the kernel
  20. # about the detected boards
  21. Configuring the board:
  22. # This interface will use the Cisco-HDLC line protocol,
  23. # the timeslices assigned are 1,2 (128 KiBit line speed)
  24. # (the first data timeslice in the G.703 frame is no. 1)
  25. #
  26. mkdir /proc/comx/comx0.1/
  27. echo slicecom >/proc/comx/comx0.1/boardtype
  28. echo hdlc >/proc/comx/comx0.1/protocol
  29. echo 1 2 >/proc/comx/comx0.1/timeslots
  30. # This interface uses SyncPPP line protocol, the assigned
  31. # is no. 3 (64 KiBit line speed)
  32. #
  33. mkdir /proc/comx/comx0.2/
  34. echo slicecom >/proc/comx/comx0.2/boardtype
  35. echo ppp >/proc/comx/comx0.2/protocol
  36. echo 3 >/proc/comx/comx0.2/timeslots
  37. ...
  38. ifconfig comx0.1 up
  39. ifconfig comx0.2 up
  40. -----------------------------------------------------------------
  41. The COMX interfaces use a 10 packet transmit queue by default, however WAN
  42. networks sometimes use bigger values (20 to 100), to utilize the line better
  43. by large traffic (though the line delay increases because of more packets
  44. join the queue).
  45. # ifconfig comx0 txqueuelen 50
  46. This option is only supported by the ifconfig command of the later
  47. distributions, which came with 2.2 kernels, such as RedHat 6.1 or Debian 2.2.
  48. You can download a newer netbase packet from
  49. http://www.debian.org/~rcw/2.2/netbase/ for Debian 2.1, which has a new
  50. ifconfig. You can get further information about using 2.2 kernel with
  51. Debian 2.1 from http://www.debian.org/releases/stable/running-kernel-2.2
  52. -----------------------------------------------------------------
  53. The SliceCom LEDs:
  54. red - on, if the interface is unconfigured, or it gets Remote Alarm-s
  55. green - on, if the board finds frame-sync in the received signal
  56. A bit more detailed:
  57. red: green: meaning:
  58. - - no frame-sync, no signal received, or signal SNAFU.
  59. - on "Everything is OK"
  60. on on Reception is ok, but the remote end sends Remote Alarm
  61. on - The interface is unconfigured
  62. -----------------------------------------------------------------
  63. A more detailed description of the hardware setting options:
  64. The general and the protocol layer options described in the 'comx.txt' file
  65. apply to the SliceCom as well, I only summarize the SliceCom hardware specific
  66. settings below.
  67. The '/proc/comx' configuring interface:
  68. An interface directory should be created for every timeslot group with
  69. 'mkdir', e,g: 'comx0', 'comx1' etc. The timeslots can be assigned here to the
  70. specific interface. The Cisco-like naming convention (serial3:1 - first
  71. timeslot group of the 3rd. board) can't be used here, because these mean IP
  72. aliasing in Linux.
  73. You can give any meaningful name to keep the configuration clear;
  74. e.g: 'comx0.1', 'comx0.2', 'comx1.1', comx1.2', if you have two boards
  75. with two interfaces each.
  76. Settings, which apply to the board:
  77. Neither 'io' nor 'irq' settings required, the driver uses the resources
  78. given by the PCI BIOS.
  79. comx0/boardnum - board number of the SliceCom in the PC (using the 'natural'
  80. PCI order) as listed in '/proc/pci' or the output of the
  81. 'lspci' command, generally the slots nearer to the motherboard
  82. PCI driver chips have the lower numbers.
  83. Default: 0 (the counting starts with 0)
  84. Though the options below are to be set on a single interface, they apply to the
  85. whole board. The restriction, to use them on 'UP' interfaces, is because the
  86. command sequence below could lead to unpredictable results.
  87. # echo 0 >boardnum
  88. # echo internal >clock_source
  89. # echo 1 >boardnum
  90. The sequence would set the clock source of board 0.
  91. These settings will persist after all the interfaces are cleared, but are
  92. cleared when the driver module is unloaded and loaded again.
  93. comx0/clock_source - source of the transmit clock
  94. Usage:
  95. # echo line >/proc/comx/comx0/clock_source
  96. # echo internal >/proc/comx/comx0/clock_source
  97. line - The Tx clock is being decoded if the input data stream,
  98. if no clock seen on the input, then the board will use it's
  99. own clock generator.
  100. internal - The Tx clock is supplied by the builtin clock generator.
  101. Default: line
  102. Normally, the telecommunication company's end device (the HDSL
  103. modem) provides the Tx clock, that's why 'line' is the default.
  104. comx0/framing - Switching CRC4 off/on
  105. CRC4: 16 PCM frames (The 32 64Kibit channels are multiplexed into a
  106. PCM frame, nothing to do with HDLC frames) are divided into 2x8
  107. groups, each group has a 4 bit CRC.
  108. # echo crc4 >/proc/comx/comx0/framing
  109. # echo no-crc4 >/proc/comx/comx0/framing
  110. Default is 'crc4', the Hungarian MATAV lines behave like this.
  111. The traffic generally passes if this setting on both ends don't match.
  112. comx0/linecode - Setting the line coding
  113. # echo hdb3 >/proc/comx/comx0/linecode
  114. # echo ami >/proc/comx/comx0/linecode
  115. Default a 'hdb3', MATAV lines use this.
  116. (AMI coding is rarely used with E1 lines). Frame sync may occur, if
  117. this setting doesn't match the other end's, but CRC4 and data errors
  118. will come, which will result in CRC errors on HDLC/SyncPPP level.
  119. comx0/reg - direct access to the board's MUNICH (reg) and FALC (lbireg)
  120. comx0/lbireg circuit's registers
  121. # echo >reg 0x04 0x0 - write 0 to register 4
  122. # echo >reg 0x104 - write the contents of register 4 with
  123. printk() to syslog
  124. WARNING! These are only for development purposes, messing with this will
  125. result much trouble!
  126. comx0/loopback - Places a loop to the board's G.703 signals
  127. # echo none >/proc/comx/comx0/loopback
  128. # echo local >/proc/comx/comx0/loopback
  129. # echo remote >/proc/comx/comx0/loopback
  130. none - normal operation, no loop
  131. local - the board receives it's own output
  132. remote - the board sends the received data to the remote side
  133. Default: none
  134. -----------------------------------------------------------------
  135. Interface (channel group in Cisco terms) settings:
  136. comx0/timeslots - which timeslots belong to the given interface
  137. Setting:
  138. # echo '1 5 2 6 7 8' >/proc/comx/comx0/timeslots
  139. # cat /proc/comx/comx0/timeslots
  140. 1 2 5 6 7 8
  141. #
  142. Finding a timeslot:
  143. # grep ' 4' /proc/comx/comx*/timeslots
  144. /proc/comx/comx0/timeslots:1 3 4 5 6
  145. #
  146. The timeslots can be in any order, '1 2 3' is the same as '1 3 2'.
  147. The interface has to be DOWN during the setting ('ifconfig comx0
  148. down'), but the other interfaces could operate normally.
  149. The driver checks if the assigned timeslots are vacant, if not, then
  150. the setting won't be applied.
  151. The timeslot values are treated as decimal numbers, not to misunderstand
  152. values of 08, 09 form.
  153. -----------------------------------------------------------------
  154. Checking the interface and board status:
  155. - Lines beginning with ' ' (space) belong to the original output, the lines
  156. which begin with '//' are the comments.
  157. papaya:~$ cat /proc/comx/comx1/status
  158. Interface administrative status is UP, modem status is UP, protocol is UP
  159. Modem status changes: 0, Transmitter status is IDLE, tbusy: 0
  160. Interface load (input): 978376 / 947808 / 951024 bits/s (5s/5m/15m)
  161. (output): 978376 / 947848 / 951024 bits/s (5s/5m/15m)
  162. Debug flags: none
  163. RX errors: len: 22, overrun: 1, crc: 0, aborts: 0
  164. buffer overrun: 0, pbuffer overrun: 0
  165. TX errors: underrun: 0
  166. Line keepalive (value: 10) status UP [0]
  167. // The hardware specific part starts here:
  168. Controller status:
  169. No alarms
  170. // Alarm:
  171. //
  172. // No alarms - Everything OK
  173. //
  174. // LOS - Loss Of Signal - No signal sensed on the input
  175. // AIS - Alarm Indication Signal - The remote side sends '11111111'-s,
  176. // it tells, that there's an error condition, or it's not
  177. // initialised.
  178. // AUXP - Auxiliary Pattern Indication - 01010101.. received.
  179. // LFA - Loss of Frame Alignment - no frame sync received.
  180. // RRA - Receive Remote Alarm - the remote end's OK, but signals error cond.
  181. // LMFA - Loss of CRC4 Multiframe Alignment - no CRC4 multiframe sync.
  182. // NMF - No Multiframe alignment Found after 400 msec - no such alarm using
  183. // no-crc4 or crc4 framing, see below.
  184. //
  185. // Other possible error messages:
  186. //
  187. // Transmit Line Short - the board felt, that it's output is short-circuited,
  188. // so it switched the transmission off. (The board can't definitely tell,
  189. // that it's output is short-circuited.)
  190. // Chained list of the received packets, for debug purposes:
  191. Rx ring:
  192. rafutott: 0
  193. lastcheck: 50845731, jiffies: 51314281
  194. base: 017b1858
  195. rx_desc_ptr: 0
  196. rx_desc_ptr: 017b1858
  197. hw_curr_ptr: 017b1858
  198. 06040000 017b1868 017b1898 c016ff00
  199. 06040000 017b1878 017b1e9c c016ff00
  200. 46040000 017b1888 017b24a0 c016ff00
  201. 06040000 017b1858 017b2aa4 c016ff00
  202. // All the interfaces using the board: comx1, using the 1,2,...16 timeslots,
  203. // comx2, using timeslot 17, etc.
  204. Interfaces using this board: (channel-group, interface, timeslots)
  205. 0 comx1: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
  206. 1 comx2: 17
  207. 2 comx3: 18
  208. 3 comx4: 19
  209. 4 comx5: 20
  210. 5 comx6: 21
  211. 6 comx7: 22
  212. 7 comx8: 23
  213. 8 comx9: 24
  214. 9 comx10: 25
  215. 10 comx11: 26
  216. 11 comx12: 27
  217. 12 comx13: 28
  218. 13 comx14: 29
  219. 14 comx15: 30
  220. 15 comx16: 31
  221. // The number of events handled by the driver during an interrupt cycle:
  222. Interrupt work histogram:
  223. hist[ 0]: 0 hist[ 1]: 2 hist[ 2]: 18574 hist[ 3]: 79
  224. hist[ 4]: 14 hist[ 5]: 1 hist[ 6]: 0 hist[ 7]: 1
  225. hist[ 8]: 0 hist[ 9]: 7
  226. // The number of packets to send in the Tx ring, when a new one arrived:
  227. Tx ring histogram:
  228. hist[ 0]: 2329 hist[ 1]: 0 hist[ 2]: 0 hist[ 3]: 0
  229. // The error counters of the E1 interface, according to the RFC2495,
  230. // (similar to the Cisco "show controllers e1" command's output:
  231. // http://www.cisco.com/univercd/cc/td/doc/product/software/ios11/rbook/rinterfc.htm#xtocid25669126)
  232. Data in current interval (91 seconds elapsed):
  233. 9516 Line Code Violations, 65 Path Code Violations, 2 E-Bit Errors
  234. 0 Slip Secs, 2 Fr Loss Secs, 2 Line Err Secs, 0 Degraded Mins
  235. 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 11 Unavail Secs
  236. Data in Interval 1 (15 minutes):
  237. 0 Line Code Violations, 0 Path Code Violations, 0 E-Bit Errors
  238. 0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins
  239. 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs
  240. Data in last 4 intervals (1 hour):
  241. 0 Line Code Violations, 0 Path Code Violations, 0 E-Bit Errors
  242. 0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins
  243. 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs
  244. Data in last 96 intervals (24 hours):
  245. 0 Line Code Violations, 0 Path Code Violations, 0 E-Bit Errors
  246. 0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins
  247. 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs
  248. -----------------------------------------------------------------
  249. Some unique options, (may get into the driver later):
  250. Treat them very carefully, these can cause much trouble!
  251. modified CRC-4, for improved interworking of CRC-4 and non-CRC-4
  252. devices: (see page 107 and g706 Annex B)
  253. lbireg[ 0x1b ] |= 0x08
  254. lbireg[ 0x1c ] |= 0xc0
  255. - The NMF - 'No Multiframe alignment Found after 400 msec' alarm
  256. comes into account.
  257. FALC - the line driver chip.
  258. local loop - I hear my transmission back.
  259. remote loop - I echo the remote transmission back.
  260. Something useful for finding errors:
  261. - local loop for timeslot 1 in the FALC chip:
  262. # echo >lbireg 0x1d 0x21
  263. - Switching the loop off:
  264. # echo >lbireg 0x1d 0x00