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

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [Documentation/] [networking/] [z8530drv.txt] - Diff between revs 1765 and 1782

Only display areas with differences | Details | Blame | View Log

Rev 1765 Rev 1782
This is a subset of the documentation. To use this driver you MUST have the
This is a subset of the documentation. To use this driver you MUST have the
full package "z8530drv-2.4c.dl1bke.tar.gz" from either ftp.pspt.fi,
full package "z8530drv-2.4c.dl1bke.tar.gz" from either ftp.pspt.fi,
sunsite.unc.edu or db0bm.automation.fh-aachen.de. Do not try to use the
sunsite.unc.edu or db0bm.automation.fh-aachen.de. Do not try to use the
utilities from z8530drv-utils-3.0 as they will not work with the 2.4 series
utilities from z8530drv-utils-3.0 as they will not work with the 2.4 series
of the driver!
of the driver!
---------------------------------------------------------------------------
---------------------------------------------------------------------------
         SCC.C - Linux driver for Z8530 based HDLC cards for AX.25
         SCC.C - Linux driver for Z8530 based HDLC cards for AX.25
   ********************************************************************
   ********************************************************************
        (c) 1993,1997 by Joerg Reuter DL1BKE
        (c) 1993,1997 by Joerg Reuter DL1BKE
        portions (c) 1993 Guido ten Dolle PE1NNZ
        portions (c) 1993 Guido ten Dolle PE1NNZ
        for the complete copyright notice see >> Copying.Z8530DRV <<
        for the complete copyright notice see >> Copying.Z8530DRV <<
   ********************************************************************
   ********************************************************************
1. Initialization of the driver
1. Initialization of the driver
===============================
===============================
To use the driver, 3 steps must be performed:
To use the driver, 3 steps must be performed:
     1. if compiled as module: loading the module
     1. if compiled as module: loading the module
     2. Setup of hardware, MODEM and KISS parameters with sccinit
     2. Setup of hardware, MODEM and KISS parameters with sccinit
     3. Attachment of each channel in the packet software
     3. Attachment of each channel in the packet software
1.1 Loading the module
1.1 Loading the module
======================
======================
(If you're going to compile the driver as a part of the kernel image,
(If you're going to compile the driver as a part of the kernel image,
 skip this chapter and continue with 1.2)
 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
        insmod scc.o
please read 'man insmod' that comes with modutils.
please read 'man insmod' that comes with modutils.
You should include the insmod in one of the /etc/rc.d/rc.* files,
You should include the insmod in one of the /etc/rc.d/rc.* files,
and don't forget to insert a call of sccinit after that. It
and don't forget to insert a call of sccinit after that. It
will read  your
will read  your
1.2. /etc/z8530drv.rc
1.2. /etc/z8530drv.rc
=====================
=====================
To setup all parameters you must run /sbin/sccinit from one
To setup all parameters you must run /sbin/sccinit from one
of your rc.*-files. This has to be done BEFORE the start of
of your rc.*-files. This has to be done BEFORE the start of
NET or axattach. Sccinit reads the file /etc/z8530drv.rc
NET or axattach. Sccinit reads the file /etc/z8530drv.rc
and sets the hardware, MODEM and KISS parameters. A sample file is
and sets the hardware, MODEM and KISS parameters. A sample file is
delivered with this package. Change it to your needs.
delivered with this package. Change it to your needs.
The file itself consists of two main sections.
The file itself consists of two main sections.
1.2.1 configuration of hardware parameters
1.2.1 configuration of hardware parameters
==========================================
==========================================
The hardware setup section defines the following parameters for each
The hardware setup section defines the following parameters for each
Z8530:
Z8530:
chip    1
chip    1
data_a  0x300                   # data port A
data_a  0x300                   # data port A
ctrl_a  0x304                   # control port A
ctrl_a  0x304                   # control port A
data_b  0x301                   # data port B
data_b  0x301                   # data port B
ctrl_b  0x305                   # control port B
ctrl_b  0x305                   # control port B
irq     5                       # IRQ No. 5
irq     5                       # IRQ No. 5
pclock  4915200                 # clock
pclock  4915200                 # clock
board   BAYCOM                  # hardware type
board   BAYCOM                  # hardware type
escc    no                      # enhanced SCC chip? (8580/85180/85280)
escc    no                      # enhanced SCC chip? (8580/85180/85280)
vector  0                       # latch for interrupt vector
vector  0                       # latch for interrupt vector
special no                      # address of special function register
special no                      # address of special function register
option  0                       # option to set via sfr
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.
          program. A parameter has no effect.
data_a  - the address of the data port A of this Z8530 (needed)
data_a  - the address of the data port A of this Z8530 (needed)
ctrl_a  - the address of the control port A (needed)
ctrl_a  - the address of the control port A (needed)
data_b  - the address of the data port B (needed)
data_b  - the address of the data port B (needed)
ctrl_b  - the address of the control 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
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
          IRQs or the same. If they share an interrupt, it needs to be
          specified within one chip-definition only.
          specified within one chip-definition only.
pclock  - the clock at the PCLK pin of the Z8530 (option, 4915200 is
pclock  - the clock at the PCLK pin of the Z8530 (option, 4915200 is
          default), measured in Hertz
          default), measured in Hertz
board   - the "type" of the board:
board   - the "type" of the board:
           SCC type                 value
           SCC type                 value
           ---------------------------------
           ---------------------------------
           PA0HZP SCC card          PA0HZP
           PA0HZP SCC card          PA0HZP
           EAGLE card               EAGLE
           EAGLE card               EAGLE
           PC100 card               PC100
           PC100 card               PC100
           PRIMUS-PC (DG9BL) card   PRIMUS
           PRIMUS-PC (DG9BL) card   PRIMUS
           BayCom (U)SCC card       BAYCOM
           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")
          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!
          cards. There can be only one vector latch for all chips!
          (option, defaults to 0)
          (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, defaults to 0)
option  - The value you write into that register (option, default is 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,
You can specify up to four chips (8 channels). If this is not enough,
just change
just change
        #define MAXSCC 4
        #define MAXSCC 4
to a higher value.
to a higher value.
Example for the BayCom USCC:
Example for the BayCom USCC:
----------------------------
----------------------------
chip    1
chip    1
data_a  0x300                   # data port A
data_a  0x300                   # data port A
ctrl_a  0x304                   # control port A
ctrl_a  0x304                   # control port A
data_b  0x301                   # data port B
data_b  0x301                   # data port B
ctrl_b  0x305                   # control port B
ctrl_b  0x305                   # control port B
irq     5                       # IRQ No. 5 (#)
irq     5                       # IRQ No. 5 (#)
board   BAYCOM                  # hardware type (*)
board   BAYCOM                  # hardware type (*)
#
#
# SCC chip 2
# SCC chip 2
#
#
chip    2
chip    2
data_a  0x302
data_a  0x302
ctrl_a  0x306
ctrl_a  0x306
data_b  0x303
data_b  0x303
ctrl_b  0x307
ctrl_b  0x307
board   BAYCOM
board   BAYCOM
An example for a PA0HZP card:
An example for a PA0HZP card:
-----------------------------
-----------------------------
chip 1
chip 1
data_a 0x153
data_a 0x153
data_b 0x151
data_b 0x151
ctrl_a 0x152
ctrl_a 0x152
ctrl_b 0x150
ctrl_b 0x150
irq 9
irq 9
pclock 4915200
pclock 4915200
board PA0HZP
board PA0HZP
vector 0x168
vector 0x168
escc no
escc no
#
#
#
#
#
#
chip 2
chip 2
data_a 0x157
data_a 0x157
data_b 0x155
data_b 0x155
ctrl_a 0x156
ctrl_a 0x156
ctrl_b 0x154
ctrl_b 0x154
irq 9
irq 9
pclock 4915200
pclock 4915200
board PA0HZP
board PA0HZP
vector 0x168
vector 0x168
escc no
escc no
A DRSI would should probably work with this:
A DRSI would should probably work with this:
--------------------------------------------
--------------------------------------------
(actually: two DRSI cards...)
(actually: two DRSI cards...)
chip 1
chip 1
data_a 0x303
data_a 0x303
data_b 0x301
data_b 0x301
ctrl_a 0x302
ctrl_a 0x302
ctrl_b 0x300
ctrl_b 0x300
irq 7
irq 7
pclock 4915200
pclock 4915200
board DRSI
board DRSI
escc no
escc no
#
#
#
#
#
#
chip 2
chip 2
data_a 0x313
data_a 0x313
data_b 0x311
data_b 0x311
ctrl_a 0x312
ctrl_a 0x312
ctrl_b 0x310
ctrl_b 0x310
irq 7
irq 7
pclock 4915200
pclock 4915200
board DRSI
board DRSI
escc no
escc no
Note that you cannot use the on-board baudrate generator off DRSI
Note that you cannot use the on-board baudrate generator off DRSI
cards. Use "mode dpll" for clock source (see below).
cards. Use "mode dpll" for clock source (see below).
This is based on information provided by Mike Bilow (and verified
This is based on information provided by Mike Bilow (and verified
by Paul Helay)
by Paul Helay)
The utility "gencfg"
The utility "gencfg"
--------------------
--------------------
If you only know the parameters for the PE1CHL driver for DOS,
If you only know the parameters for the PE1CHL driver for DOS,
run gencfg. It will generate the correct port addresses (I hope).
run gencfg. It will generate the correct port addresses (I hope).
Its parameters are exactly the same as the ones you use with
Its parameters are exactly the same as the ones you use with
the "attach scc" command in net, except that the string "init" must
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
gencfg 2 0x150 4 2 0 1 0x168 9 4915200
will print a skeleton z8530drv.rc for the OptoSCC to stdout.
will print a skeleton z8530drv.rc for the OptoSCC to stdout.
gencfg 2 0x300 2 4 5 -4 0 7 4915200 0x10
gencfg 2 0x300 2 4 5 -4 0 7 4915200 0x10
does the same for the BayCom USCC card. I my opinion it is much easier
does the same for the BayCom USCC card. I my opinion it is much easier
to edit scc_config.h...
to edit scc_config.h...
1.2.2 channel configuration
1.2.2 channel configuration
===========================
===========================
The channel definition is divided into three sub sections for each
The channel definition is divided into three sub sections for each
channel:
channel:
An example for /dev/scc0:
An example for /dev/scc0:
# DEVICE
# DEVICE
device /dev/scc0        # the device for the following params
device /dev/scc0        # the device for the following params
# MODEM / BUFFERS
# MODEM / BUFFERS
speed 1200              # the default baudrate
speed 1200              # the default baudrate
clock dpll              # clock source:
clock dpll              # clock source:
                        #       dpll     = normal halfduplex operation
                        #       dpll     = normal halfduplex operation
                        #       external = MODEM provides own Rx/Tx clock
                        #       external = MODEM provides own Rx/Tx clock
                        #       divider  = use full duplex divider if
                        #       divider  = use full duplex divider if
                        #                  installed (1)
                        #                  installed (1)
mode nrzi               # HDLC encoding mode
mode nrzi               # HDLC encoding mode
                        #       nrzi = 1k2 MODEM, G3RUH 9k6 MODEM
                        #       nrzi = 1k2 MODEM, G3RUH 9k6 MODEM
                        #       nrz  = DF9IC 9k6 MODEM
                        #       nrz  = DF9IC 9k6 MODEM
                        #
                        #
rxbuffers 8             # number of rx buffers allocated
rxbuffers 8             # number of rx buffers allocated
                        #               (option, default is 4)
                        #               (option, default is 4)
txbuffers 16            # number of tx buffers allocated
txbuffers 16            # number of tx buffers allocated
                        #               (option, default is 16)
                        #               (option, default is 16)
bufsize 384             # size of buffers. Note that this must include
bufsize 384             # size of buffers. Note that this must include
                        # the AX.25 header, not only the data field!
                        # the AX.25 header, not only the data field!
                        # (optional, defaults to 384)
                        # (optional, defaults to 384)
# KISS (Layer 1)
# KISS (Layer 1)
txdelay 36              # (see chapter 1.4)
txdelay 36              # (see chapter 1.4)
persist 64
persist 64
slot    8
slot    8
tail    8
tail    8
fulldup 0
fulldup 0
wait    12
wait    12
min     3
min     3
maxkey  7
maxkey  7
idle    3
idle    3
maxdef  120
maxdef  120
group   0
group   0
txoff   off
txoff   off
softdcd on
softdcd on
slip    off
slip    off
The order WITHIN these sections is unimportant. The order OF these
The order WITHIN these sections is unimportant. The order OF these
sections IS important. The MODEM parameters are set with the first
sections IS important. The MODEM parameters are set with the first
recognized KISS parameter...
recognized KISS parameter...
Please note that you can initialize the board only once after boot.
Please note that you can initialize the board only once after boot.
You can change all parameters but "mode" and "clock" later with the
You can change all parameters but "mode" and "clock" later with the
Sccparam program or through KISS. Just to avoid security holes...
Sccparam program or through KISS. Just to avoid security holes...
(1) this divider is usually mounted on the SCC-PBC (PA0HZP) or not
(1) this divider is usually mounted on the SCC-PBC (PA0HZP) or not
    present at all (BayCom). It feeds back the output of the DPLL
    present at all (BayCom). It feeds back the output of the DPLL
    (digital pll) as transmit clock. Using this mode without a divider
    (digital pll) as transmit clock. Using this mode without a divider
    installed will normally result in keying the transceiver until
    installed will normally result in keying the transceiver until
    maxkey expires --- of course without sending anything (useful).
    maxkey expires --- of course without sending anything (useful).
2. Attachment of a channel by your AX.25 software
2. Attachment of a channel by your AX.25 software
=================================================
=================================================
2.1 KA9Q NOS derivates
2.1 KA9Q NOS derivates
======================
======================
When the linux has startup, the SCC driver has been initialized,
When the linux has startup, the SCC driver has been initialized,
you can attach the channels in your packet software. This is done
you can attach the channels in your packet software. This is done
by open the scc devices by using the attach asy command.
by open the scc devices by using the attach asy command.
The SCC-drivers emulates the scc devices as serial asy ports,
The SCC-drivers emulates the scc devices as serial asy ports,
this means e.g. that the baudrate can be set in the attach command.
this means e.g. that the baudrate can be set in the attach command.
Example Wampes:
Example Wampes:
#############################################################################################
#############################################################################################
# Wampes device attach
# Wampes device attach
# NOTE: Interfacename and the device must be the same!!
# NOTE: Interfacename and the device must be the same!!
# Usage: attach asy 0 0 slip|vjslip|ax25ui|ax25i|nrs|kissui 
# Usage: attach asy 0 0 slip|vjslip|ax25ui|ax25i|nrs|kissui 
#
#
attach asy 0 0 kissi  scc0 256 256 1200   # Attach SCC channel 1 in 1200 baud
attach asy 0 0 kissi  scc0 256 256 1200   # Attach SCC channel 1 in 1200 baud
attach asy 0 0 kissi  scc1 256 256 1200   # Attach SCC channel 2 in 1200 baud
attach asy 0 0 kissi  scc1 256 256 1200   # Attach SCC channel 2 in 1200 baud
attach asy 0 0 kissui scc2 256 256 38400  # Attach SCC channel 3 in 38400 baud
attach asy 0 0 kissui scc2 256 256 38400  # Attach SCC channel 3 in 38400 baud
attach asy 0 0 kissui scc3 256 256 9600   # Attach SCC channel 4 in 9600 baud
attach asy 0 0 kissui scc3 256 256 9600   # Attach SCC channel 4 in 9600 baud
#              ^^^^
#              ^^^^
#              for WAMPES 921229 use here: ax25
#              for WAMPES 921229 use here: ax25
#
#
Example JNOS:
Example JNOS:
############################################
############################################
# JNOS device attach
# JNOS device attach
#
#
attach asy scc0 0 ax25 scc0 256 256 1200
attach asy scc0 0 ax25 scc0 256 256 1200
attach asy scc1 0 ax25 scc1 256 256 1200
attach asy scc1 0 ax25 scc1 256 256 1200
attach asy scc2 0 ax25 scc2 256 256 300
attach asy scc2 0 ax25 scc2 256 256 300
attach asy scc3 0 ax25 scc3 256 256 4800
attach asy scc3 0 ax25 scc3 256 256 4800
#
#
#
#
It allows AX.25 communication without a TNC.  Only a MODEM is
It allows AX.25 communication without a TNC.  Only a MODEM is
needed. The parameters have the same meaning as in KISS mode.
needed. The parameters have the same meaning as in KISS mode.
In fact, the AX.25 mode is emulating an extended KISS TNC, so
In fact, the AX.25 mode is emulating an extended KISS TNC, so
the same commands can be used to set the parameters of the
the same commands can be used to set the parameters of the
interface (see below).
interface (see below).
To be able to run fullduplex using an SCC in AX.25 mode, an
To be able to run fullduplex using an SCC in AX.25 mode, an
external divider must be available, that divides the baudrate
external divider must be available, that divides the baudrate
generator clock available on the TRxC pin by 32, and puts the
generator clock available on the TRxC pin by 32, and puts the
resulting signal on the RTxC pint of the same channel of the SCC.
resulting signal on the RTxC pint of the same channel of the SCC.
Such a divider is not necessary for normal CSMA packet radio
Such a divider is not necessary for normal CSMA packet radio
operation, but interrupt overhead is slightly reduced if you
operation, but interrupt overhead is slightly reduced if you
still install it.
still install it.
2.2 Kernel AX.25
2.2 Kernel AX.25
================
================
Well, as said before: The driver emulates a KISS TNC, so you
Well, as said before: The driver emulates a KISS TNC, so you
can simply run
can simply run
        axattach -s 1200 /dev/scc0 DL1BKE
        axattach -s 1200 /dev/scc0 DL1BKE
to establish the link between kernel AX.25 and z8530drv.
to establish the link between kernel AX.25 and z8530drv.
3. Adjustment and Display of parameters
3. Adjustment and Display of parameters
=======================================
=======================================
3.1 Displaying SCC Parameters:
3.1 Displaying SCC Parameters:
==============================
==============================
Once a SCC channel has been attached, the parameter settings and
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 /dev/scc0
dl1bke-u:~$ sccstat /dev/scc0
Parameters:
Parameters:
speed       : 1200 baud
speed       : 1200 baud
txdelay     : 36
txdelay     : 36
persist     : 255
persist     : 255
slottime    : 0
slottime    : 0
txtail      : 8
txtail      : 8
fulldup     : 1
fulldup     : 1
waittime    : 12
waittime    : 12
mintime     : 3 sec
mintime     : 3 sec
maxkeyup    : 7 sec
maxkeyup    : 7 sec
idletime    : 3 sec
idletime    : 3 sec
maxdefer    : 120 sec
maxdefer    : 120 sec
group       : 0x00
group       : 0x00
txoff       : off
txoff       : off
softdcd     : on
softdcd     : on
SLIP        : off
SLIP        : off
Status:
Status:
HDLC                  Z8530           Interrupts         Queues
HDLC                  Z8530           Interrupts         Queues
-----------------------------------------------------------------------
-----------------------------------------------------------------------
Sent       :     273  RxOver :     0  RxInts :   125074  RxQueue :    0
Sent       :     273  RxOver :     0  RxInts :   125074  RxQueue :    0
Received   :    1095  TxUnder:     0  TxInts :     4684  TxQueue :    0
Received   :    1095  TxUnder:     0  TxInts :     4684  TxQueue :    0
RxErrors   :    1591                  ExInts :    11776  NoSpace :    0
RxErrors   :    1591                  ExInts :    11776  NoSpace :    0
KissErrors :       0                  SpInts :     1503
KissErrors :       0                  SpInts :     1503
Tx State   :    idle
Tx State   :    idle
Memory allocated:
Memory allocated:
Buffer size:     384
Buffer size:     384
rx buffers :       4
rx buffers :       4
tx buffers :       8
tx buffers :       8
The status info shown is:
The status info shown is:
Sent            - number of frames transmitted
Sent            - number of frames transmitted
Received        - number of frames received
Received        - number of frames received
RxErrors        - number of receive errors (CRC, ABORT)
RxErrors        - number of receive errors (CRC, ABORT)
KissErrors      - number of KISS errors (should be zero...)
KissErrors      - number of KISS errors (should be zero...)
Tx State        - status of the Tx interrupt handler: idle/busy/active/tail (2)
Tx State        - status of the Tx interrupt handler: idle/busy/active/tail (2)
RxOver          - number of receiver overruns
RxOver          - number of receiver overruns
TxUnder         - number of transmitter underruns
TxUnder         - number of transmitter underruns
RxInts          - number of receiver interrupts
RxInts          - number of receiver interrupts
TxInts          - number of transmitter interrupts
TxInts          - number of transmitter interrupts
EpInts          - number of receiver special condition interrupts
EpInts          - number of receiver special condition interrupts
SpInts          - number of external/status interrupts
SpInts          - number of external/status interrupts
RxQueue         - number of received packets enqueued for this channel
RxQueue         - number of received packets enqueued for this channel
TxQueue         - number of packets enqueued for Tx
TxQueue         - number of packets enqueued for Tx
NoSpace         - number of times the receiver buffer pool was found empty
NoSpace         - number of times the receiver buffer pool was found empty
An overrun is abnormal. If lots of these occur, the product of
An overrun is abnormal. If lots of these occur, the product of
baudrate and number of interfaces is too high for the processing
baudrate and number of interfaces is too high for the processing
power of you computer. If "Space" errors occur, specify a higher
power of you computer. If "Space" errors occur, specify a higher
number of buffers in the "scc.h" file.
number of buffers in the "scc.h" file.
3.2 Setting Parameters
3.2 Setting Parameters
======================
======================
The setting of parameters of the emulated KISS TNC is done in the
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
same way in the SCC driver. You can change parameters by using
the command param in NET or NOS
the command param in NET or NOS
     param   
     param   
or use the program "sccparam":
or use the program "sccparam":
     sccparam   
     sccparam   
You can change the following parameters:
You can change the following parameters:
param       : value
param       : value
------------------------
------------------------
speed       : 1200
speed       : 1200
txdelay     : 36
txdelay     : 36
persist     : 255
persist     : 255
slottime    : 0
slottime    : 0
txtail      : 8
txtail      : 8
fulldup     : 1
fulldup     : 1
waittime    : 12
waittime    : 12
mintime     : 3
mintime     : 3
maxkeyup    : 7
maxkeyup    : 7
idletime    : 3
idletime    : 3
maxdefer    : 120
maxdefer    : 120
group       : 0x00
group       : 0x00
txoff       : off
txoff       : off
softdcd     : on
softdcd     : on
SLIP        : off
SLIP        : off
The parameters have the following meaning:
The parameters have the following meaning:
speed:
speed:
     The baudrate on this channel in bits/sec
     The baudrate on this channel in bits/sec
     Example: sccparam /dev/scc3 speed 9600
     Example: sccparam /dev/scc3 speed 9600
txdelay:
txdelay:
     The delay (in units of 10 ms) after keying of the
     The delay (in units of 10 ms) after keying of the
     transmitter, until the first byte is sent. This is usually
     transmitter, until the first byte is sent. This is usually
     called "TXDELAY" in a TNC.  When 0 is specified, the driver
     called "TXDELAY" in a TNC.  When 0 is specified, the driver
     will just wait until the CTS signal is asserted. This
     will just wait until the CTS signal is asserted. This
     assumes the presence of a timer or other circuitry in the
     assumes the presence of a timer or other circuitry in the
     MODEM and/or transmitter, that asserts CTS when the
     MODEM and/or transmitter, that asserts CTS when the
     transmitter is ready for data.
     transmitter is ready for data.
     A normal value of this parameter is 30-36.
     A normal value of this parameter is 30-36.
     Example: sccparam /dev/scc0 txd 20
     Example: sccparam /dev/scc0 txd 20
persist:
persist:
     This is the probability that the transmitter will be keyed
     This is the probability that the transmitter will be keyed
     when the channel is found to be free.  It is a value from 0
     when the channel is found to be free.  It is a value from 0
     to 255, and the probability is (value+1)/256.  The value
     to 255, and the probability is (value+1)/256.  The value
     should be somewhere near 50-60, and should be lowered when
     should be somewhere near 50-60, and should be lowered when
     the channel is used more heavily.
     the channel is used more heavily.
     Example: sccparam /dev/scc2 persist 20
     Example: sccparam /dev/scc2 persist 20
slottime:
slottime:
     This is the time between samples of the channel. It is
     This is the time between samples of the channel. It is
     expressed in units of 10 ms.  About 200-300 ms (value 20-30)
     expressed in units of 10 ms.  About 200-300 ms (value 20-30)
     seems to be a good value.
     seems to be a good value.
     Example: sccparam /dev/scc0 slot 20
     Example: sccparam /dev/scc0 slot 20
tail:
tail:
     The time the transmitter will remain keyed after the last
     The time the transmitter will remain keyed after the last
     byte of a packet has been transferred to the SCC. This is
     byte of a packet has been transferred to the SCC. This is
     necessary because the CRC and a flag still have to leave the
     necessary because the CRC and a flag still have to leave the
     SCC before the transmitter is keyed down. The value depends
     SCC before the transmitter is keyed down. The value depends
     on the baudrate selected.  A few character times should be
     on the baudrate selected.  A few character times should be
     sufficient, e.g. 40ms at 1200 baud. (value 4)
     sufficient, e.g. 40ms at 1200 baud. (value 4)
     The value of this parameter is in 10 ms units.
     The value of this parameter is in 10 ms units.
     Example: sccparam /dev/scc2 4
     Example: sccparam /dev/scc2 4
full:
full:
     The full-duplex mode switch. This can be one of the following
     The full-duplex mode switch. This can be one of the following
     values:
     values:
     0:   The interface will operate in CSMA mode (the normal
     0:   The interface will operate in CSMA mode (the normal
          half-duplex packet radio operation)
          half-duplex packet radio operation)
     1:   Fullduplex mode, i.e. the transmitter will be keyed at
     1:   Fullduplex mode, i.e. the transmitter will be keyed at
          any time, without checking the received carrier.  It
          any time, without checking the received carrier.  It
          will be unkeyed when there are no packets to be sent.
          will be unkeyed when there are no packets to be sent.
     2:   Like 1, but the transmitter will remain keyed, also
     2:   Like 1, but the transmitter will remain keyed, also
          when there are no packets to be sent.  Flags will be
          when there are no packets to be sent.  Flags will be
          sent in that case, until a timeout (parameter 10)
          sent in that case, until a timeout (parameter 10)
          occurs.
          occurs.
     Example: sccparam /dev/scc0 fulldup off
     Example: sccparam /dev/scc0 fulldup off
wait:
wait:
     The initial waittime before any transmit attempt, after the
     The initial waittime before any transmit attempt, after the
     frame has been queue for transmit.  This is the length of
     frame has been queue for transmit.  This is the length of
     the first slot in CSMA mode.  In full duplex modes it is
     the first slot in CSMA mode.  In full duplex modes it is
     set to 0 for maximum performance.
     set to 0 for maximum performance.
     The value of this parameter is in 10 ms units.
     The value of this parameter is in 10 ms units.
     Example: sccparam /dev/scc1 wait 4
     Example: sccparam /dev/scc1 wait 4
maxkey:
maxkey:
     The maximal time the transmitter will be keyed to send
     The maximal time the transmitter will be keyed to send
     packets, in seconds.  This can be useful on busy CSMA
     packets, in seconds.  This can be useful on busy CSMA
     channels, to avoid "getting a bad reputation" when you are
     channels, to avoid "getting a bad reputation" when you are
     generating a lot of traffic.  After the specified time has
     generating a lot of traffic.  After the specified time has
     elapsed, no new frame will be started. Instead, the trans-
     elapsed, no new frame will be started. Instead, the trans-
     mitter will be switched off for a specified time (parameter
     mitter will be switched off for a specified time (parameter
     min), and then the selected algorithm for keyup will be
     min), and then the selected algorithm for keyup will be
     started again.
     started again.
     The value 0 as well as "off" will disable this feature,
     The value 0 as well as "off" will disable this feature,
     and allow infinite transmission time.
     and allow infinite transmission time.
     Example: sccparam /dev/scc0 maxk 20
     Example: sccparam /dev/scc0 maxk 20
min:
min:
     This is the time the transmitter will be switched off when
     This is the time the transmitter will be switched off when
     the maximum transmission time is exceeded.
     the maximum transmission time is exceeded.
     Example: sccparam /dev/scc3 min 10
     Example: sccparam /dev/scc3 min 10
idle
idle
     This parameter specifies the maximum idle time in full duplex
     This parameter specifies the maximum idle time in full duplex
     2 mode, in seconds.  When no frames have been sent for this
     2 mode, in seconds.  When no frames have been sent for this
     time, the transmitter will be keyed down.  A value of 0 is
     time, the transmitter will be keyed down.  A value of 0 is
     has same result as the fullduplex mode 1. This parameter
     has same result as the fullduplex mode 1. This parameter
     can be disabled.
     can be disabled.
     Example: sccparam /dev/scc2 idle off       # transmit forever
     Example: sccparam /dev/scc2 idle off       # transmit forever
maxdefer
maxdefer
     This is the maximum time (in seconds) to wait for a free channel
     This is the maximum time (in seconds) to wait for a free channel
     to send. When this timer expires the transmitter will be keyed
     to send. When this timer expires the transmitter will be keyed
     IMMEDIATELY. If you love to get trouble with other users you
     IMMEDIATELY. If you love to get trouble with other users you
     should set this to a very low value ;-)
     should set this to a very low value ;-)
     Example: sccparam /dev/scc0 maxdefer 240   # 2 minutes
     Example: sccparam /dev/scc0 maxdefer 240   # 2 minutes
txoff:
txoff:
     When this parameter has the value 0, the transmission of packets
     When this parameter has the value 0, the transmission of packets
     is enable. Otherwise it is disabled.
     is enable. Otherwise it is disabled.
     Example: sccparam /dev/scc2 txoff on
     Example: sccparam /dev/scc2 txoff on
group:
group:
     It is possible to build special radio equipment to use more than
     It is possible to build special radio equipment to use more than
     one frequency on the same bad, e.g. using several receivers and
     one frequency on the same bad, e.g. using several receivers and
     only one transmitter that can be switched between frequencies.
     only one transmitter that can be switched between frequencies.
     Also, you can connect several radios that are active on the same
     Also, you can connect several radios that are active on the same
     band.  In these cases, it is not possible, or not a good idea, to
     band.  In these cases, it is not possible, or not a good idea, to
     transmit on more than one frequency.  The SCC driver provides a
     transmit on more than one frequency.  The SCC driver provides a
     method to lock transmitters on different interfaces, using the
     method to lock transmitters on different interfaces, using the
     "param  group " command.  This will only work when
     "param  group " command.  This will only work when
     you are using CSMA mode (parameter full = 0).
     you are using CSMA mode (parameter full = 0).
     The number  must be 0 if you want no group restrictions, and
     The number  must be 0 if you want no group restrictions, and
     can be computed as follows to create restricted groups:
     can be computed as follows to create restricted groups:
      is the sum of some OCTAL numbers:
      is the sum of some OCTAL numbers:
     200  This transmitter will only be keyed when all other
     200  This transmitter will only be keyed when all other
          transmitters in the group are off.
          transmitters in the group are off.
     100  This transmitter will only be keyed when the carrier
     100  This transmitter will only be keyed when the carrier
          detect of all other interfaces in the group is off.
          detect of all other interfaces in the group is off.
     0xx  A byte that can be used to define different groups.
     0xx  A byte that can be used to define different groups.
          Interfaces are in the same group, when the logical AND
          Interfaces are in the same group, when the logical AND
          between their xx values is nonzero.
          between their xx values is nonzero.
     Examples:
     Examples:
     When 2 interfaces use group 201, their transmitters will never be
     When 2 interfaces use group 201, their transmitters will never be
     keyed at the same time.
     keyed at the same time.
     When 2 interfaces use group 101, the transmitters will only key
     When 2 interfaces use group 101, the transmitters will only key
     when both channels are clear at the same time.  When group 301,
     when both channels are clear at the same time.  When group 301,
     the transmitters will not be keyed at the same time.
     the transmitters will not be keyed at the same time.
     Don't forget to convert the octal numbers into decimal before
     Don't forget to convert the octal numbers into decimal before
     you set the parameter.
     you set the parameter.
     Example: (to be written)
     Example: (to be written)
softdcd:
softdcd:
     use a software dcd instead of the real one... Useful for a very
     use a software dcd instead of the real one... Useful for a very
     slow squelch.
     slow squelch.
     Example: sccparam /dev/scc0 soft on
     Example: sccparam /dev/scc0 soft on
slip:
slip:
     use slip encoding instead of kiss
     use slip encoding instead of kiss
     Example: sccparam /dev/scc1 slip on
     Example: sccparam /dev/scc1 slip on
4. Problems
4. Problems
===========
===========
If you have tx-problems with your BayCom USCC card please check
If you have tx-problems with your BayCom USCC card please check
the manufacturer of the 8530. SGS chips have a slightly
the manufacturer of the 8530. SGS chips have a slightly
different timing. Try Zilog... I have no information if this
different timing. Try Zilog... I have no information if this
driver works with baudrates higher than 1200 baud. A solution is
driver works with baudrates higher than 1200 baud. A solution is
to write to register 8 instead to the data port, but this won't
to write to register 8 instead to the data port, but this won't
work with the ESCC chips *SIGH!*
work with the ESCC chips *SIGH!*
I got reports that the driver has problems on some 386-based systems.
I got reports that the driver has problems on some 386-based systems.
(i.e. Amstrad) Those systems have a bogus AT bus timing which will
(i.e. Amstrad) Those systems have a bogus AT bus timing which will
lead to delayed answers on interrupts. You can recognize these
lead to delayed answers on interrupts. You can recognize these
problems by looking at the output of Sccstat for the suspected
problems by looking at the output of Sccstat for the suspected
port. See if it shows under- and overruns you own such a system.
port. See if it shows under- and overruns you own such a system.
Perhaps it will help if you simplify the scc_isr() function a bit.
Perhaps it will help if you simplify the scc_isr() function a bit.
You'll find a slightly faster version in the files scc_isr_intack
You'll find a slightly faster version in the files scc_isr_intack
or scc_isr_novec.
or scc_isr_novec.
Delayed processing of received data: This depends on
Delayed processing of received data: This depends on
- the kernel version
- the kernel version
- kernel profiling compiled or not
- kernel profiling compiled or not
- the rather slow receiver in tty_io.c
- the rather slow receiver in tty_io.c
- a high interrupt load
- a high interrupt load
- a high load of the machine --- running X, Xmorph, XV and Povray,
- a high load of the machine --- running X, Xmorph, XV and Povray,
  while compiling the kernel... hmm ... even with 32 MB RAM ...  ;-)
  while compiling the kernel... hmm ... even with 32 MB RAM ...  ;-)
- NET's speed itself.
- NET's speed itself.
Kernel panics: please read to /linux/README and find out if it
Kernel panics: please read to /linux/README and find out if it
really occurred within the scc driver.
really occurred within the scc driver.
If you can't solve a problem, send me
If you can't solve a problem, send me
- a description of the problem,
- a description of the problem,
- information on your hardware (computer system, scc board, modem)
- information on your hardware (computer system, scc board, modem)
- your kernel version
- your kernel version
- the output of sccstat /dev/scc# ("#" is the No. of the channel)
- the output of sccstat /dev/scc# ("#" is the No. of the channel)
- the settings of "speed", "clock" and "mode" for that channel
- the settings of "speed", "clock" and "mode" for that channel
  in /etc/z8530drv.rc
  in /etc/z8530drv.rc
- your scc_config.h
- your scc_config.h
And always remember:
And always remember:
The 1.1.* kernel series is for alpha tests -- use at your own risk ;-)
The 1.1.* kernel series is for alpha tests -- use at your own risk ;-)
The 1.2.* series should run reliable. This driver perhaps NOT!
The 1.2.* series should run reliable. This driver perhaps NOT!
The 1.3.* kernel series is for alpha tests again... you get the idea!
The 1.3.* kernel series is for alpha tests again... you get the idea!
3. DRSI Boards
3. DRSI Boards
==============
==============
I still can't test the DRSI board, but this configuration derived from
I still can't test the DRSI board, but this configuration derived from
the PE1CHL SCC driver configuration should work:
the PE1CHL SCC driver configuration should work:
An example of scc_config.h for
An example of scc_config.h for
One DRSI board installed:
One DRSI board installed:
=========================
=========================
/* gencfg 1 0x300 0x10 2 0 1 0 7 4915200 */
/* gencfg 1 0x300 0x10 2 0 1 0 7 4915200 */
/* file generated by $Id: z8530drv.txt,v 1.1 2005-12-20 10:06:05 jcastillo Exp $ */
/* file generated by $Id: z8530drv.txt,v 1.1 2005-12-20 10:06:05 jcastillo Exp $ */
#include 
#include 
int     Nchips       = 1;
int     Nchips       = 1;
io_port Vector_Latch = 0x0;
io_port Vector_Latch = 0x0;
int     Ivec         = 7;
int     Ivec         = 7;
long    Clock        = 4915200;
long    Clock        = 4915200;
char    Board        = PA0HZP;
char    Board        = PA0HZP;
int     Option       = 0;
int     Option       = 0;
io_port Special_Port = 0x0;
io_port Special_Port = 0x0;
io_port SCC_ctrl[MAXSCC * 2] =
io_port SCC_ctrl[MAXSCC * 2] =
{0x302, 0x300, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
{0x302, 0x300, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
io_port SCC_data[MAXSCC * 2] =
io_port SCC_data[MAXSCC * 2] =
{0x303, 0x301, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
{0x303, 0x301, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
/* set to '1' if you have and want ESCC chip (8580/85180/85280) support */
/* set to '1' if you have and want ESCC chip (8580/85180/85280) support */
/*                                            Chip      */
/*                                            Chip      */
/*                                          ========    */
/*                                          ========    */
int SCC_Enhanced[MAXSCC] =      {0,     /* ...one...    */
int SCC_Enhanced[MAXSCC] =      {0,     /* ...one...    */
                                 0,     /* ...two...    */
                                 0,     /* ...two...    */
                                 0,     /* ...three...  */
                                 0,     /* ...three...  */
                                 0};    /* ...four...   */
                                 0};    /* ...four...   */
#define VERBOSE_BOOTMSG 1
#define VERBOSE_BOOTMSG 1
#undef  SCC_DELAY               /* perhaps a 486DX2 is a *bit* too fast */
#undef  SCC_DELAY               /* perhaps a 486DX2 is a *bit* too fast */
#undef  SCC_LDELAY              /* slow it even a bit more down */
#undef  SCC_LDELAY              /* slow it even a bit more down */
#undef  DONT_CHECK              /* don't look if the SCCs you specified are available */
#undef  DONT_CHECK              /* don't look if the SCCs you specified are available */
Two boards installed:
Two boards installed:
=====================
=====================
/* file generated by $Id: z8530drv.txt,v 1.1 2005-12-20 10:06:05 jcastillo Exp $ */
/* file generated by $Id: z8530drv.txt,v 1.1 2005-12-20 10:06:05 jcastillo Exp $ */
#include 
#include 
int     Nchips       = 2;
int     Nchips       = 2;
io_port Vector_Latch = 0x0;
io_port Vector_Latch = 0x0;
int     Ivec         = 7;
int     Ivec         = 7;
long    Clock        = 4915200;
long    Clock        = 4915200;
char    Board        = PA0HZP;
char    Board        = PA0HZP;
int     Option       = 0;
int     Option       = 0;
io_port Special_Port = 0x0;
io_port Special_Port = 0x0;
io_port SCC_ctrl[MAXSCC * 2] =
io_port SCC_ctrl[MAXSCC * 2] =
{0x302, 0x300, 0x312, 0x310, 0x0, 0x0, 0x0, 0x0};
{0x302, 0x300, 0x312, 0x310, 0x0, 0x0, 0x0, 0x0};
io_port SCC_data[MAXSCC * 2] =
io_port SCC_data[MAXSCC * 2] =
{0x303, 0x301, 0x313, 0x311, 0x0, 0x0, 0x0, 0x0};
{0x303, 0x301, 0x313, 0x311, 0x0, 0x0, 0x0, 0x0};
/* set to '1' if you have and want ESCC chip (8580/85180/85280) support */
/* set to '1' if you have and want ESCC chip (8580/85180/85280) support */
/*                                            Chip      */
/*                                            Chip      */
/*                                          ========    */
/*                                          ========    */
int SCC_Enhanced[MAXSCC] =      {0,     /* ...one...    */
int SCC_Enhanced[MAXSCC] =      {0,     /* ...one...    */
                                 0,     /* ...two...    */
                                 0,     /* ...two...    */
                                 0,     /* ...three...  */
                                 0,     /* ...three...  */
                                 0};    /* ...four...   */
                                 0};    /* ...four...   */
#define VERBOSE_BOOTMSG 1
#define VERBOSE_BOOTMSG 1
#undef  SCC_DELAY               /* perhaps a 486DX2 is a *bit* too fast */
#undef  SCC_DELAY               /* perhaps a 486DX2 is a *bit* too fast */
#undef  SCC_LDELAY              /* slow it even a bit more down */
#undef  SCC_LDELAY              /* slow it even a bit more down */
#undef  DONT_CHECK              /* don't look if the SCCs you specified are available */
#undef  DONT_CHECK              /* don't look if the SCCs you specified are available */
*****************
*****************
You  m u s t  use "clock dpll" in /etc/z8530drv.rc for operation,
You  m u s t  use "clock dpll" in /etc/z8530drv.rc for operation,
the on-board baudrate generator is not supported.
the on-board baudrate generator is not supported.
*****************
*****************
(mni tnx to Mike Bilow)
(mni tnx to Mike Bilow)
4. Thor RLC100
4. Thor RLC100
==============
==============
Mysteriously this board seems not to work with the driver. Anyone
Mysteriously this board seems not to work with the driver. Anyone
got it up-and-running?
got it up-and-running?
Many thanks to Linus Torvalds and Alan Cox for including the driver
Many thanks to Linus Torvalds and Alan Cox for including the driver
in the Linux standard distribution and their support.
in the Linux standard distribution and their support.
Joerg Reuter    ampr-net: dl1bke@db0pra.ampr.org
Joerg Reuter    ampr-net: dl1bke@db0pra.ampr.org
                WWW     : http://www.rat.de/jr
                WWW     : http://www.rat.de/jr
                Internet: jreuter@poboxes.com
                Internet: jreuter@poboxes.com
 
 

powered by: WebSVN 2.1.0

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