Commit 0046db09 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by David S. Miller
Browse files

docs: networking: convert z8530drv.txt to ReST



- add SPDX header;
- use copyright symbol;
- adjust titles and chapters, adding proper markups;
- mark tables as such;
- mark code blocks and literals as such;
- adjust identation, whitespaces and blank lines where needed;
- add to networking/index.rst.

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a6c34b47
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -121,6 +121,7 @@ Contents:
   xfrm_proc
   xfrm_sync
   xfrm_sysctl
   z8530drv

.. only::  subproject and html

+329 −300
Original line number Diff line number Diff line
.. SPDX-License-Identifier: GPL-2.0
.. include:: <isonum.txt>

=========================================================
SCC.C - Linux driver for Z8530 based HDLC cards for AX.25
=========================================================


This is a subset of the documentation. To use this driver you MUST have the
full package from:

Internet:
=========

    1. ftp://ftp.ccac.rwth-aachen.de/pub/jr/z8530drv-utils_3.0-3.tar.gz

@@ -13,22 +20,12 @@ A new version of the documentation, along with links to other important
Linux Kernel AX.25 documentation and programs, is available on
http://yaina.de/jreuter

-----------------------------------------------------------------------------

Copyright |copy| 1993,2000 by Joerg Reuter DL1BKE <jreuter@yaina.de>

	 SCC.C - Linux driver for Z8530 based HDLC cards for AX.25      

   ********************************************************************

        (c) 1993,2000 by Joerg Reuter DL1BKE <jreuter@yaina.de>

        portions (c) 1993 Guido ten Dolle PE1NNZ
portions Copyright |copy| 1993 Guido ten Dolle PE1NNZ

for the complete copyright notice see >> Copying.Z8530DRV <<

   ******************************************************************** 


1. Initialization of the driver
===============================

@@ -50,7 +47,7 @@ AX.25-HOWTO on how to emulate a KISS TNC on network device drivers.
(If you're going to compile the driver as a part of the kernel image,
 skip this chapter and continue with 1.2)

Before you can use a module, you'll have to load it with
Before you can use a module, you'll have to load it with::

	insmod scc.o

@@ -75,7 +72,7 @@ The file itself consists of two main sections.
==========================================

The hardware setup section defines the following parameters for each
Z8530:
Z8530::

    chip    1
    data_a  0x300                   # data port A
@@ -91,45 +88,57 @@ special no # address of special function register
    option  0                       # option to set via sfr


chip	- this is just a delimiter to make sccinit a bit simpler to
chip
	- this is just a delimiter to make sccinit a bit simpler to
	  program. A parameter has no effect.

data_a  - the address of the data port A of this Z8530 (needed)
ctrl_a  - the address of the control port A (needed)
data_b  - the address of the data port B (needed)
ctrl_b  - the address of the control port B (needed)

irq     - the used IRQ for this chip. Different chips can use different
data_a
	- the address of the data port A of this Z8530 (needed)
ctrl_a
	- the address of the control port A (needed)
data_b
	- the address of the data port B (needed)
ctrl_b
	- the address of the control port B (needed)

irq
	- the used IRQ for this chip. Different chips can use different
	  IRQs or the same. If they share an interrupt, it needs to be
	  specified within one chip-definition only.

pclock  - the clock at the PCLK pin of the Z8530 (option, 4915200 is
	  default), measured in Hertz

board   - the "type" of the board:
board
	- the "type" of the board:

	   =======================  ========
	   SCC type                 value
	   ---------------------------------
	   =======================  ========
	   PA0HZP SCC card          PA0HZP
	   EAGLE card               EAGLE
	   PC100 card               PC100
	   PRIMUS-PC (DG9BL) card   PRIMUS
	   BayCom (U)SCC card       BAYCOM
	   =======================  ========

escc    - if you want support for ESCC chips (8580, 85180, 85280), set
escc
	- if you want support for ESCC chips (8580, 85180, 85280), set
	  this to "yes" (option, defaults to "no")

vector  - address of the vector latch (aka "intack port") for PA0HZP
vector
	- address of the vector latch (aka "intack port") for PA0HZP
	  cards. There can be only one vector latch for all chips!
	  (option, defaults to 0)

special - address of the special function register on several cards.
special
	- address of the special function register on several cards.
	  (option, defaults to 0)

option  - The value you write into that register (option, default is 0)

You can specify up to four chips (8 channels). If this is not enough,
just change
just change::

	#define MAXSCC 4

@@ -138,6 +147,8 @@ to a higher value.
Example for the BAYCOM USCC:
----------------------------

::

	chip    1
	data_a  0x300                   # data port A
	ctrl_a  0x304                   # control port A
@@ -158,6 +169,8 @@ board BAYCOM
An example for a PA0HZP card:
-----------------------------

::

	chip 1
	data_a 0x153
	data_b 0x151
@@ -186,6 +199,8 @@ A DRSI would should probably work with this:
--------------------------------------------
(actually: two DRSI cards...)

::

	chip 1
	data_a 0x303
	data_b 0x301
@@ -221,12 +236,14 @@ If you only know the parameters for the PE1CHL driver for DOS,
run gencfg. It will generate the correct port addresses (I hope).
Its parameters are exactly the same as the ones you use with
the "attach scc" command in net, except that the string "init" must
not appear. Example:
not appear. Example::

	gencfg 2 0x150 4 2 0 1 0x168 9 4915200

will print a skeleton z8530drv.conf for the OptoSCC to stdout.

::

	gencfg 2 0x300 2 4 5 -4 0 7 4915200 0x10

does the same for the BAYCOM USCC card. In my opinion it is much easier
@@ -239,7 +256,7 @@ to edit scc_config.h...
The channel definition is divided into three sub sections for each
channel:

An example for scc0:
An example for scc0::

	# DEVICE

@@ -299,7 +316,7 @@ security holes...
2.1 Kernel AX.25
================

To set up an AX.25 device you can simply type:
To set up an AX.25 device you can simply type::

	ifconfig scc0 44.128.1.1 hw ax25 dl0tha-7

@@ -318,16 +335,16 @@ Since the TTY driver (aka KISS TNC emulation) is gone you need
to emulate the old behaviour. The cost of using these programs is
that you probably need to compile the kernel AX.25, regardless of whether
you actually use it or not. First setup your /etc/ax25/axports,
for example:
for example::

	9k6	dl0tha-9  9600  255 4 9600 baud port (scc3)
	axlink	dl0tha-15 38400 255 4 Link to NOS

Now "ifconfig" the scc device:
Now "ifconfig" the scc device::

	ifconfig scc3 44.128.1.1 hw ax25 dl0tha-9

You can now axattach a pseudo-TTY:
You can now axattach a pseudo-TTY::

	axattach /dev/ptys0 axlink

@@ -335,11 +352,11 @@ and start your NOS and attach /dev/ptys0 there. The problem is that
NOS is reachable only via digipeating through the kernel AX.25
(disastrous on a DAMA controlled channel). To solve this problem,
configure "rxecho" to echo the incoming frames from "9k6" to "axlink"
and outgoing frames from "axlink" to "9k6" and start:
and outgoing frames from "axlink" to "9k6" and start::

	rxecho

Or simply use "kissbridge" coming with z8530drv-utils:
Or simply use "kissbridge" coming with z8530drv-utils::

	ifconfig scc3 hw ax25 dl0tha-9
	kissbridge scc3 /dev/ptys0
@@ -352,7 +369,7 @@ Or simply use "kissbridge" coming with z8530drv-utils:
==============================

Once a SCC channel has been attached, the parameter settings and
some statistic information can be shown using the param program:
some statistic information can be shown using the param program::

	dl1bke-u:~$ sccstat scc0

@@ -387,19 +404,21 @@ Tx State : idle

The status info shown is:

Sent		- number of frames transmitted
Received	- number of frames received
RxErrors	- number of receive errors (CRC, ABORT)
TxErrors	- number of discarded Tx frames (due to various reasons) 
Tx State	- status of the Tx interrupt handler: idle/busy/active/tail (2)
RxOver		- number of receiver overruns
TxUnder		- number of transmitter underruns
RxInts		- number of receiver interrupts
TxInts		- number of transmitter interrupts
EpInts		- number of receiver special condition interrupts
SpInts		- number of external/status interrupts
Size		- maximum size of an AX.25 frame (*with* AX.25 headers!)
NoSpace		- number of times a buffer could not get allocated
==============	==============================================================
Sent		number of frames transmitted
Received	number of frames received
RxErrors	number of receive errors (CRC, ABORT)
TxErrors	number of discarded Tx frames (due to various reasons)
Tx State	status of the Tx interrupt handler: idle/busy/active/tail (2)
RxOver		number of receiver overruns
TxUnder		number of transmitter underruns
RxInts		number of receiver interrupts
TxInts		number of transmitter interrupts
EpInts		number of receiver special condition interrupts
SpInts		number of external/status interrupts
Size		maximum size of an AX.25 frame (*with* AX.25 headers!)
NoSpace		number of times a buffer could not get allocated
==============	==============================================================

An overrun is abnormal. If lots of these occur, the product of
baudrate and number of interfaces is too high for the processing
@@ -414,29 +433,31 @@ driver or the kernel AX.25.
The setting of parameters of the emulated KISS TNC is done in the
same way in the SCC driver. You can change parameters by using
the kissparms program from the ax25-utils package or use the program
"sccparam":
"sccparam"::

     sccparam <device> <paramname> <decimal-|hexadecimal value>

You can change the following parameters:

param	    : value
------------------------
speed       : 1200
txdelay     : 36
persist     : 255
slottime    : 0
txtail      : 8
fulldup     : 1
waittime    : 12
mintime     : 3
maxkeyup    : 7
idletime    : 3
maxdefer    : 120
group       : 0x00
txoff       : off
softdcd     : on
SLIP        : off
===========   =====
param	      value
===========   =====
speed         1200
txdelay       36
persist       255
slottime      0
txtail        8
fulldup       1
waittime      12
mintime       3
maxkeyup      7
idletime      3
maxdefer      120
group         0x00
txoff         off
softdcd       on
SLIP          off
===========   =====


The parameters have the following meaning:
@@ -530,7 +551,7 @@ min:

     Example: sccparam /dev/scc3 min 10

idle
idle:
     This parameter specifies the maximum idle time in full duplex
     2 mode, in seconds.  When no frames have been sent for this
     time, the transmitter will be keyed down.  A value of 0 is
@@ -564,10 +585,13 @@ group:
     method to lock transmitters on different interfaces, using the
     "param <interface> group <x>" command.  This will only work when
     you are using CSMA mode (parameter full = 0).

     The number <x> must be 0 if you want no group restrictions, and
     can be computed as follows to create restricted groups:
     <x> is the sum of some OCTAL numbers:


     ===  =======================================================
     200  This transmitter will only be keyed when all other
	  transmitters in the group are off.
     100  This transmitter will only be keyed when the carrier
@@ -575,10 +599,13 @@ group:
     0xx  A byte that can be used to define different groups.
	  Interfaces are in the same group, when the logical AND
	  between their xx values is nonzero.
     ===  =======================================================

     Examples:

     When 2 interfaces use group 201, their transmitters will never be
     keyed at the same time.

     When 2 interfaces use group 101, the transmitters will only key
     when both channels are clear at the same time.  When group 301,
     the transmitters will not be keyed at the same time.
@@ -651,6 +678,8 @@ got it up-and-running?
Many thanks to Linus Torvalds and Alan Cox for including the driver
in the Linux standard distribution and their support.

::

	Joerg Reuter	ampr-net: dl1bke@db0pra.ampr.org
			AX-25   : DL1BKE @ DB0ABH.#BAY.DEU.EU
			Internet: jreuter@yaina.de
+1 −1
Original line number Diff line number Diff line
@@ -18644,7 +18644,7 @@ L: linux-hams@vger.kernel.org
S:	Maintained
W:	http://yaina.de/jreuter/
W:	http://www.qsl.net/dl1bke/
F:	Documentation/networking/z8530drv.txt
F:	Documentation/networking/z8530drv.rst
F:	drivers/net/hamradio/*scc.c
F:	drivers/net/hamradio/z8530.h
+2 −2
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ config SCC
	---help---
	  These cards are used to connect your Linux box to an amateur radio
	  in order to communicate with other computers. If you want to use
	  this, read <file:Documentation/networking/z8530drv.txt> and the
	  this, read <file:Documentation/networking/z8530drv.rst> and the
	  AX25-HOWTO, available from
	  <http://www.tldp.org/docs.html#howto>. Also make sure to say Y
	  to "Amateur Radio AX.25 Level 2" support.
@@ -98,7 +98,7 @@ config SCC_DELAY
	help
	  Say Y here if you experience problems with the SCC driver not
	  working properly; please read
	  <file:Documentation/networking/z8530drv.txt> for details.
	  <file:Documentation/networking/z8530drv.rst> for details.

	  If unsure, say N.

+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
 *            ------------------
 *
 * You can find a subset of the documentation in 
 * Documentation/networking/z8530drv.txt.
 * Documentation/networking/z8530drv.rst.
 */

/*