Z8530 driver changes

Joerg Reuter (jr196930@lykos.tng.oche.de)
Mon, 17 Jul 1995 10:15:53 +0000 (GMT)


Hello,

I have a bugfix and some additions to the z8530 driver
(linux/drivers/char/scc.c). It has it's own MAJOR number now,
instead of the "borrowed" MINOR numbers from serial.c.

Is character device number 22 okay?

This patch includes one for linux/arch/i386/config.in so that one
does not need to include AX.25 kernel support to use the Z8530 driver,
some people (me too) prefer to use WAMPES or any other KA9Q NOS
derivate for AX.25.

Some few changes in README.scc, too. (esp. my email address)
Well, that's it.

---- Cut Here and unpack ----
#!/bin/sh
# shar: Shell Archiver (v1.22)
#
# Run the following text with /bin/sh to create:
# z8530-patches
#
sed 's/^X//' << 'SHAR_EOF' > z8530-patches &&
X--- linux/include/linux/major.h.old Wed Jul 5 16:04:18 1995
X+++ linux/include/linux/major.h Wed Jul 5 16:04:18 1995
X@@ -39,7 +39,7 @@
X * 19 - cyclades /dev/ttyC*
X * 20 - cyclades /dev/cub*
X * 21 - scsi generic
X- * 22 - (at2disk)
X+ * 22 - z8530drv /dev/sc* (at2disk)
X * 23 - mitsumi cdrom
X * 24 - sony535 cdrom
X * 25 - matsushita cdrom minors 0..3
X@@ -81,6 +81,7 @@
X #define MATSUSHITA_CDROM4_MAJOR 28
X #define QIC117_TAPE_MAJOR 27
X #define AZTECH_CDROM_MAJOR 29
X+#define Z8530_MAJOR 22
X
X /*
X * Tests for SCSI devices.
X--- linux/drivers/char/scc.c.old Wed Jul 5 16:11:06 1995
X+++ linux/drivers/char/scc.c Wed Jul 5 17:54:41 1995
X@@ -1,14 +1,15 @@
X #include <linux/autoconf.h> /* fastest method */
X #ifdef CONFIG_SCC
X
X-#define RCS_ID "$Id: scc.c,v 1.17 1995/03/15 23:28:12 JReuter Exp JReuter $"
X+#define RCS_ID "$Id: scc.c,v 1.21 1995/07/05 17:54:29 jreuter Exp jreuter $"
X
X-#define BANNER "Z8530 SCC driver v1.8.dl1bke (beta) by dl1bke\n"
X+#define BANNER "Z8530 SCC driver v1.9.dl1bke (beta) by dl1bke\n"
X
X /* ******************************************************************** */
X /* * SCC.C - Linux driver for Z8530 based HDLC cards for AX.25 * */
X /* ******************************************************************** */
X
X+
X /* ********************************************************************
X
X (c) 1995 by Joerg Reuter DL1BKE
X@@ -29,7 +30,9 @@
X 950304 - fixed underrun/zcount handling
X 950305 - the driver registers port addresses now
X 950314 - fixed underrun interrupt handling again
X-
X+ 950512 - (hope to have) fixed hidden re-entrance problem
X+ in scc_timer()
X+
X Thanks to:
X
X PE1CHL Rob - for a lot of good ideas from his SCC driver for DOS
X@@ -1178,8 +1181,7 @@
X register int chan;
X unsigned long flags;
X
X- save_flags(flags); cli();
X-
X+
X for (chan = 0; chan < (Nchips * 2); chan++)
X {
X scc = &SCC_Info[chan];
X@@ -1187,6 +1189,9 @@
X if (scc->tty && scc->init)
X {
X kiss_encode(scc);
X+
X+ save_flags(flags); cli();
X+
X check_rcv_queue(scc);
X
X /* KISS-TNC emulation */
X@@ -1201,9 +1206,13 @@
X if (Expired(t_mbusy)) busy_timeout(scc);
X if (Expired(t_maxk)) maxk_idle_timeout(scc);
X if (Expired(t_idle)) maxk_idle_timeout(scc);
X+
X+ restore_flags(flags);
X }
X }
X
X+ save_flags(flags); cli();
X+
X timer_table[SCC_TIMER].fn = scc_timer;
X timer_table[SCC_TIMER].expires = jiffies + HZ/TPS;
X timer_active |= 1 << SCC_TIMER;
X@@ -2196,8 +2205,8 @@
X memset(&scc_driver, 0, sizeof(struct tty_driver));
X scc_driver.magic = TTY_DRIVER_MAGIC;
X scc_driver.name = "sc";
X- scc_driver.major = TTY_MAJOR;
X- scc_driver.minor_start = 96;
X+ scc_driver.major = Z8530_MAJOR;
X+ scc_driver.minor_start = 0;
X scc_driver.num = Nchips*2;
X scc_driver.type = TTY_DRIVER_TYPE_SERIAL;
X scc_driver.subtype = 0; /* not needed */
X--- linux/drivers/char/README.scc.old Wed Jul 5 16:30:00 1995
X+++ linux/drivers/char/README.scc Wed Jul 5 16:30:00 1995
X@@ -1,36 +1,35 @@
X+// 950705: note -- I will upload the new version 1.9 to ftp.ucsd.edu
X+// as soon as possible... -dl1bke-
X+
X This is a subset of the documentation. To use this driver you MUST have the
X full package from:
X
X Internet:
X =========
X
X-ftp.ucsd.edu:/hamradio/packet/tcpip/incoming/z8530drv-1.8.dl1bke.tar.gz
X+ftp.ucsd.edu:/hamradio/packet/tcpip/incoming/z8530drv-1.9.dl1bke.tar.gz
X+
X+[
X+ if you can't find it there, try:
X+ .../tcpip/linux/z8530drv-1.9.dl1bke.tar.gz
X+
X+]
X
X and various mirrors (i.e. nic.switch.ch)
X
X AX.25 BBS
X =========
X
X-UNIX @ DB0ACH.#NRW.DEU.EU, subject: Z8530D18.Pxx/Pyy
X+UNIX @ DB0ACH.#NRW.DEU.EU, subject: Z8530D19.Pxx/Pyy
X
X (AX.25 call: DB0ACH-8)
X
X and various BBS that received the file through AUTO7P or 7PSERV
X-with the filename Z8530D18.TGZ
X+with the filename Z8530D19.TGZ
X
X
X ---------------------------------------------------------------------------
X
X-!! Version 1.8
X-!!
X-!! Deutscher Text siehe scc_ger.doc
X-!!
X-!! perhaps somebody could correct the English documentation (grammar,
X-!! spelling)?
X-!!
X-!! BTW: REAL programmers don't document...
X-!!
X-
X
X SCC.C - Linux driver for Z8530 based HDLC cards for AX.25
X
X@@ -763,6 +762,7 @@
X And always remember:
X The 1.1.* kernel series is for alpha tests -- use at your own risk ;-)
X The 1.2.* series should run reliable. This driver perhaps NOT!
X+The 1.3.* kernel series is for alpha tests again... you get the idea!
X
X ------------
X
X@@ -927,7 +927,12 @@
X the on-board baudrate generator is not supported.
X
X *****************
X-
X-
X (mni tnx to Mike Bilow)
X+
X
X+...an many thanks to Linus Torvalds and Alan Cox for including the driver
X+ in the LinuX standard distribution...
X+
X+Joerg Reuter ampr-net: dl1bke@db0pra.ampr.org
X+ AX-25 : DL1BKE @ DB0LJ.#RPL.DEU.EU
X+ Internet: jreuter@lykos.tng.oche.de
X--- linux/arch/i386/config.in.old Wed Jul 5 16:07:59 1995
X+++ linux/arch/i386/config.in Wed Jul 5 16:10:54 1995
X@@ -136,6 +136,8 @@
X fi
X if [ "$CONFIG_AX25" = "y" ]; then
X bool 'Z8530 SCC kiss emulation driver for AX.25' CONFIG_SCC y
X+else
X+ bool 'Z8530 SCC kiss emulation driver for AX.25' CONFIG_SCC n
X fi
X bool 'PLIP (parallel port) support' CONFIG_PLIP n
X bool 'EQL (serial line load balancing) support' CONFIG_EQUALIZER n
SHAR_EOF
chmod 0644 z8530-patches || echo "restore of z8530-patches fails"
set `wc -c z8530-patches`;Sum=$1
if test "$Sum" != "5386"
then echo original size 5386, current size $Sum;fi
exit 0
---- Cut Here and enjoy ----

Joerg Reuter ampr-net: dl1bke@db0pra.ampr.org
AX-25 : DL1BKE @ DB0LJ.#RPL.DEU.EU
Internet: jreuter@lykos.tng.oche.de