Commit b1c8aa80 authored by Linus Torvalds's avatar Linus Torvalds

Import 2.1.25

parent 00e99d41
......@@ -757,6 +757,16 @@ S: Kruislaan 419
S: 1098 VA Amsterdam
S: The Netherlands
N: Gene Kozin
E: 74604.152@compuserve.com
W: http://www.sangoma.com
D: WAN Router & Sangoma WAN drivers
S: Sangoma Technologies Inc.
S: 7170 Warden Avenue, Unit 2
S: Markham, Ontario
S: L3R 8B2
S: Canada
N: Gero Kuhlmann
E: gero@gkminix.han.de
D: mounting root via NFS
......
......@@ -841,41 +841,6 @@ CONFIG_INET
on sunsite.unc.edu:/pub/Linux/docs/HOWTO). Short answer:
say Y.
IP: forwarding/gatewaying
CONFIG_IP_FORWARD
People who want to use their Linux box as the router for a local
network (i.e. the computer responsible for distributing Internet
traffic to and from the machines in the local network and the
subnetworks) should say Y here (thereby enlarging their kernel by
about 5 kB). Note that in this case, you possibly have two ethernet
devices in your computer: one for the "outside world" and one for
your local net. The kernel is not able to recognize both at boot
time without help; for details read the
Multiple-Ethernet-mini-HOWTO, available via ftp (user: anonymous) in
sunsite.unc.edu:/pub/Linux/docs/HOWTO/mini. If your box is
connected to two networks, it may still make sense to say N here,
namely if you want to turn your box into a firewall protecting a
local network from the internet. The Firewall-HOWTO tells you how to
do this. If your setup is more complex, say you are connected to
three networks and you want to act as a firewall between two of them
and route traffic for the others, you need to say Y here and Y to
"IP firewalling" below. If you intend to use IP masquerading (i.e. IP
traffic from one of the local computers and destined for an outside
host is changed by your box so that it appears to come from you),
you'll have to say Y here and also to IP firewalling and IP
masquerading below. You should also say Y here if you want to
configure your box as a SLIP (the protocol for sending internet
traffic over telephone lines) or PPP (a better SLIP) server for
other people to dial into and your box is connected to a local
network at the same time. You would then most likely use proxy-ARP
(Address Resolution Protocol), explained in the Proxy-Arp mini howto
on sunsite in /pub/Linux/docs/HOWTO/mini. You also need to say Y
here if you want to run mrouted in order to do multicast routing as
used on the MBONE (a high bandwidth network on top of the internet
which carries audio and video broadcasts) for example. In this case,
say Y to "IP: multicasting" and "IP: multicast routing" as well. If
unsure, say N.
IP: multicasting
CONFIG_IP_MULTICAST
This is code for addressing several networked computers at once,
......@@ -1249,6 +1214,23 @@ CONFIG_ATALK
all you will need to do is download and install the localtalk
driver.
IP-over-DDP support
CONFIG_IPDDP
This allows IP networking for users who only have Appletalk
networking available. It doesn't work yet in 2.1.xx, so you
should say N.
LocalTalk PC card support
CONFIG_LTPC
This allows you to use the AppleTalk PC card to connect to LocalTalk
networks. The card is also known as the Farallon PhoneNet PC card.
If you are in doubt, this card is the one with the 65C02 chip on it.
You also need version 1.3.3 or later of the netatalk package.
This driver is experimental, which means that it may not work.
In particular the module support is not yet working for the 2.1.xx
kernels, so choose Y or N, but not M for now.
See README.ltpc in the drivers/net directory.
Amateur Radio AX.25 Level 2
CONFIG_AX25
This is the protocol used for computer communication over amateur
......@@ -2156,14 +2138,6 @@ CONFIG_STRIP
the running kernel whenever you want), say M here and read
Documentation/modules.txt. The module will be called strip.o.
WIC (Radio IP bridge)
CONFIG_WIC
Support for the WIC parallel port radio bridge. You'll probably want
to say N. If you want to compile this driver as a module though ( =
code which can be inserted in and removed from the running kernel
whenever you want), say M here and read Documentation/modules.txt.
The module will be called wic.o.
CONFIG_LAPBETHER
LAPB over Ethernet driver
This is a driver for a pseudo device (usually called /dev/lapb0)
......@@ -2383,6 +2357,75 @@ CONFIG_SDLA
sdla.o. If you want to compile it as a module, say M here and read
Documentation/modules.txt.
WAN Router
CONFIG_WAN_ROUTER
Wide Area Networks (WANs), such as X.25, frame relay and leased
lines, are used to interconnect Local Area Networks (LANs) over vast
distances with data transfer rates significantly higher than those
achievable with commonly used asynchronous modem connections.
Usually, a quite expensive external device called `WAN router' is
needed to connect to WAN.
As an alternative, WAN router can be build into Linux kernel.
With relatively inexpensive WAN interface cards available on the
market, a perfectly usable router can be built for less than half a
price of an external router. If you have one of those cards (with
appropriate WAN Link Driver) and wish to use your Linux box as a WAN
router, you may say 'Y' to this option. You will also need a
wan-tools package available via FTP (user: anonymous) from
ftp.sangoma.com. Read Documentation/networking/wan-router.txt for
more information.
WAN router is always built as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
For general information about modules read Documentation/modules.txt.
WAN Drivers
CONFIG_WAN_DRIVERS
Say 'Y' to this option if you are planning to use your Linux box
as a WAN router ( = device used to interconnect local area networks
over wide area communication links, such as leased lines and public
data networks, e.g. X.25 and frame relay) and you will be offered a
list of WAN drivers currently available. For more information, read
Documentation/networking/wan-router.txt.
Sangoma WANPIPE(tm) multiprotocol cards
CONFIG_VENDOR_SANGOMA
WANPIPE from Sangoma Technologies Inc. (http://www.sangoma.com)
is a family of intelligent multiprotocol WAN adapter with data
transfer rates up to T1 (1.544 Mbps). They are also known as
Synchronous Data Link Adapters (SDLA) and designated S502E(A), S503
or S508. If you have one of these cards, say 'Y' to this option.
WANPIPE driver is always built as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
For general information about modules read Documentation/modules.txt.
Maximum number of cards
CONFIG_WANPIPE_CARDS
Enter number of WANPIPE adapters installed in your machine. The
driver can support up to 8 cards. You may enter more that you
actually have if you plan to add more cards in the future without
re-compiling the driver, but remember that in this case you'll waste
some kernel memory (about 1K per card).
WANPIPE X.25 support
CONFIG_WANPIPE_X25
Say 'Y' to this option, if you are planning to connect WANPIPE
card to an X.25 network. If you say 'N', the X.25 support will not
be included in the driver (saves about 16K of kernel memory).
WANPIPE Frame Relay support
CONFIG_WANPIPE_FR
Say 'Y' to this option, if you are planning to connect WANPIPE
card to a frame relay network. If you say 'N', the frame relay
support will not be included in the driver (saves about 16K of
kernel memory).
WANPIPE PPP support
CONFIG_WANPIPE_PPP
Say 'Y' to this option, if you are planning to connect WANPIPE
card to a leased line using Point-to-Point protocol (PPP). If you
say 'N', the PPP support will not be included in the driver (saves
about 16K of kernel memory).
Sun LANCE Ethernet support
CONFIG_SUN_LANCE
This is support for lance ethernet cards on Sun workstations such as
......@@ -2659,6 +2702,20 @@ CONFIG_E2100
Multiple-Ethernet-mini-HOWTO, available from
sunsite.unc.edu:/pub/Linux/docs/HOWTO/mini.
CS89x0 support
CONFIG_CS89x0
Support for CS89x0 chipset based ethernet cards.
If you have a network (ethernet) card of this type, say Y and read
the Ethernet-HOWTO, available via ftp (user: anonymous) in
sunsite.unc.edu:/pub/Linux/docs/HOWTO as well as
drivers/net/depca.c. If you want to compile this as a module ( =
code which can be inserted in and removed from the running kernel
whenever you want), say M here and read Documentation/modules.txt as
well as Documentation/networking/net-modules.txt. If you plan to use
more than one network card under linux, read the
Multiple-Ethernet-mini-HOWTO, available from
sunsite.unc.edu:/pub/Linux/docs/HOWTO/mini.
DEPCA support
CONFIG_DEPCA
If you have a network (ethernet) card of this type, say Y and read
......
A Brief Overview of the Virtual File System
===========================================
by Benjamin LaHaise (blah@dot.superaje.com)
Noone else seems to be writing this, so here's a quick description of what
I've learned while writing lofs...
The VFS relatively simple, but it is nice not to have to browse through
pages of code to determine what is expected when writing a filesystem.
Hopefully this helps anyone attempting such a feat, as well as clearing up
a few important points/dependancies.
register_filesystem (struct file_system_type *fstype)
=====================================================
All filesystems are created equal... or at least they start out that way.
A filesystem, be it in module form, or linked into the kernel, needs to add
itself to the table of filesystems by calling register_filesystem with an
initialized file_system_type structure. Any further functions of the
filesystem are accessed through the following function tables...
struct file_system_type
=======================
struct super_block *(*read_super) (struct super_block *sb, void *options, int silent);
This is the entry point of all filesystems. If the filesystem succeeds
in mounting itself, sb should be returned, otherwise NULL. options is
a pointer to a maximum of PAGE_SIZE-1 bytes of options, typically a zero
terminated string passed from mount. This page is freed after read_super
returns, so do not use any pointers into it.
This routine _must_ set the s_op member of sb to point to a valid
super_operations structure.
const char *name;
Name points to a string that the system will know the filesystem by.
int requires_dev;
Set this flag to 1 if the filesystem requires a block device to be mounted
on.
struct file_system_type * next;
This field points to the next file_system_type that is present in the system,
and should be initialized to NULL.
struct super_operations
=======================
The super_operations structure is found through the s_op member of the
super_block structure.
void (*read_inode) (struct inode *inode);
[optional - doesn't quite make sense]
read_inode is called by the VFS when iget is called requesting an inode
not already present in the inode table. i_ino is set to the number of the
inode requested.
The i_op member of inode should be set to a valid inode_operations
structure. Typically filesystems have separate inode_operations for
directories, files and symlinks. i_op can be NULL.
int (*notify_change) (struct inode *, struct iattr *);
[optional]
void (*write_inode) (struct inode *);
[optional]
int (*put_inode) (struct inode *inode);
[optional]
put_inode is called by the VFS when the last instance of inode is released
with a call to iput. The only special consideration that should be made
is that iget may reuse inode without calling read_inode unless clear_inode
is called. put_inode MUST return 1 if it called clear_inode on the inode,
otherwise zero.
void (*put_super) (struct super_block *);
[optional]
void (*write_super) (struct super_block *);
[optional]
void (*statfs) (struct super_block *, struct statfs *, int);
[optional]
int (*remount_fs) (struct super_block *, int *, char *);
[optional]
struct inode_operations
=======================
struct file_operations * default_file_ops;
[mandatory]
All inode_operations structures must have default_file_ops pointing to
a valid file_operations structure.
int (*create) (struct inode *,const char *,int,int,struct inode **);
[optional]
int (*lookup) (struct inode *dir, const char *name, int len, struct inode **result);
[optional]
lookup is called when the VFS wishes to have the filesystem resolve a name
into an inode. Dir is a directory on the filesystem that [hopefully] contains
the zero terminated string name (length len). A return value of zero indicates
that there is a valid inode stored in *result.
*** Note: lofs assumes that any filesystem returns an inode within the filesystem
for all directory inodes. Therefore, __iget(sb,ino,0) should be used to fetch
the inode in a filesystem's lookup routine.
int (*link) (struct inode *,struct inode *,const char *,int);
[optional]
int (*unlink) (struct inode *,const char *,int);
[optional]
int (*symlink) (struct inode *,const char *,int,const char *);
[optional]
int (*mkdir) (struct inode *,const char *,int,int);
[optional]
int (*rmdir) (struct inode *,const char *,int);
[optional]
int (*mknod) (struct inode *,const char *,int,int,int);
[optional]
int (*rename) (struct inode *,const char *,int,struct inode *,const char *,int, int);
[optional]
int (*readlink) (struct inode *inode, char *buf, int len);
[optional]
readlink is called by the VFS to read the contents of a symbolic link.
inode is an inode that meets the S_ISLNK test, and buf points to a buffer
of len bytes.
int (*follow_link) (struct inode *,struct inode *,int,int,struct inode **);
[optional]
The follow_link function is only nescessary if a filesystem uses a really
twisted form of symbolic links - namely if the symbolic link comes from a
foriegn filesystem that makes no sense....
I threw this one out - too much redundant code!
int (*readpage) (struct inode *, struct page *); [optional]
int (*writepage) (struct inode *, struct page *); [mandatory with readpage]
In order for files to be mmap'd, readpage and writepage are required.
A filesystem can use generic_readpage/writepage if it supports the bmap
function. Otherwise, a custom version must be written.
int (*bmap) (struct inode *,int);
[optional]
void (*truncate) (struct inode *);
[optional]
int (*permission) (struct inode *, int);
[optional]
int (*smap) (struct inode *,int);
[optional]
struct file_operations
======================
int (*lseek) (struct inode *, struct file *, off_t, int);
int (*read) (struct inode *, struct file *, char *, int);
int (*write) (struct inode *, struct file *, const char *, int);
int (*readdir) (struct inode *, struct file *, void *, filldir_t);
unsigned int (*poll) (struct file *, poll_table *);
int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long);
int (*mmap) (struct inode *, struct file *, struct vm_area_struct *);
int (*open) (struct inode *, struct file *);
void (*release) (struct inode *, struct file *);
int (*fsync) (struct inode *, struct file *);
int (*fasync) (struct inode *, struct file *, int);
int (*check_media_change) (kdev_t dev);
int (*revalidate) (kdev_t dev);
......@@ -81,6 +81,7 @@ Code Seq# Include File Comments
'T' all linux/soundcard.h conflict!
'T' all asm-i386/ioctls.h conflict!
'V' all linux/vt.h
'W' 00-1F linux/router.h conflict [Please reallocate]
'W' 00-1F linux/watchdog.h
'W' 20-27 linux/octal-relay.h in development
'W' 28-2F linux/iso16-relay.h in development
......
......@@ -54,6 +54,7 @@ SCC_MAGIC 0x8530 struct scc_channel include/linux/scc.h
ISDN_ASYNC_MAGIC 0x49344C01 modem_info include/linux/isdn.h
ISDN_NET_MAGIC 0x49344C02 isdn_net_ndev include/linux/isdn.h
STLI_BOARDMAGIC 0x4bc6c825 stlibrd_t include/linux/istallion.h
ROUTER_MAGIC 0x524d4157 wanlink_t include/linux/router.h
STLI_PORTMAGIC 0xe671c7a1 stliport_t include/linux/istallion.h
STL_PANELMAGIC 0x7ef621a1 stlpanel_t include/linux/stallion.h
STL_BOARDMAGIC 0xa2267f52 stlbrd_t include/linux/stallion.h
......
......@@ -30,6 +30,8 @@ tulip.txt
- info on using DEC 21040/21041/21140 based PCI ethernet cards.
vortex.txt
- info on using 3Com Vortex (3c590, 3c592, 3c595, 3c597) e'net cards.
wan-router.txt
- Wan router documentation
x25.txt
- general info on X.25 development.
x25-iface.txt
......
......@@ -12,7 +12,7 @@ No. Name Meaning Default
1 IP Default Mode 0=DG 1=VC 0
2 AX.25 Default Mode 0=Normal 1=Extended 0
3 Allow Vanilla Connects 0=No 1=Yes 1
4 Backoff 0=Linear 1=Exponential 1
4 Backoff 0=None 1=Linear 2=Exponential 1
5 Connected Mode 0=No 1=Yes 1
6 Standard Window 1 <= N <= 7 2
7 Extended Window 1 <= N <= 63 32
......
This diff is collapsed.
------------------------------------------------------------------------------
WAN Router for Linux Operating System
------------------------------------------------------------------------------
Version 1.0.0
December 31, 1996
Author: Gene Kozin <genek@compuserve.com>
Copyright (c) 1995-1996 Sangoma Technologies Inc.
------------------------------------------------------------------------------
INTRODUCTION
Wide Area Networks (WANs) are used to interconnect Local Area Networks (LANs)
and/or stand-alone hosts over vast distances with data transfer rates
significantly higher than those achievable with commonly used dial-up
connections.
Usually an external device called `WAN router' sitting on your local network
or connected to your machine's serial port provides physical connection to
WAN. Although router's job may be as simple as taking your local network
traffic, converting it to WAN format and piping it through the WAN link, these
devices are notoriously expensive, with prices as much as 2 - 5 times higher
then the price of a typical PC box.
Alternatively, considering robustness and multitasking capabilities of Linux,
an internal router can be build (most routers use some sort of stripped down
Unix-like operating system anyway). With number of relatively inexpensive WAN
interface cards available on the market, a perfectly usable router can be
built for less than half a price of an external router. Yet a Linux box
acting as a router can still be used for other purposes, such as firewalling,
running FTP, WWW or DNS server, etc.
This kernel module introduces the notion of a WAN Link Driver (WLD) to Linux
operating system and provides generic hardware-independent services for such
drivers. Why existing Linux network device interface can not be used for
this purpose? Well, it can. However, there are few key differences between
typical network interface (i.e. ethernet) and WAN link.
Many WAN protocols, such as X.25 and frame relay, allow for multiple logical
connections (known as `virtual circuits' in X.25 terminology) over a single
physical link. Each such virtual circuit may (and almost always does) lead
to diffrent geographical location and, therefore, different network. As a
result, it is the virtual circuit, not the physical link, that represents a
route and, therefore, a network interface in Linux terms.
To further complicate things, virtual cuircits are usually volatile in nature
(excluding so called `permanent' virtual circuits or PVCs). With almost no
time required to set up and tear down virtual circuit, it is highly desirable
to implement on-demand connections in order to minimize network charges. So
unlike typical network driver, the WAN driver must be able to handle multiple
network interfaces and cope with multiple virtual circuits come into existance
and go away dynamically.
Last, but not least, WAN configuration is much more complex than that of say
ethernet and may well amount to several dozens of parameters. Some of them
are "link-wide" while others are virtual circuit-specific. The same holds
true for WAN statistics which is by far more extensive and extremely useful
when troubleshooting WAN connections. Extending ifconfig utility to suite
these needs may be possible, but does not seem quite reasonable. Therefore, a
WAN configuration utility and corresponding application programmer's interface
is needed for this purpose.
Most of these problems are taken care of by this module. It's goal is to
provide user with more-or-less standard look and feel for all WAN devices and
assist WAN device driver writer by providing common services, such as:
o User-level interface via /proc filesystem
o Centralized configuration
o Device managenent (setup, shutdown, etc.)
o Network interface management (dynamic creation/destruction)
o Protocol encapsulation/decapsulation
To ba able to use Linux WAN Router you will also need a WAN Tools package
available from
ftp.sangoma.com/pub/linux/wantools-X.Y.Z.tgz
For technical questions and/or comments regarding this product please e-mail
to genek@compuserve.com or dm@sangoma.com.
COPYRIGHT AND LICENSING INFORMATION
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 675 Mass
Ave, Cambridge, MA 02139, USA.
KNOWN BUGS AND LIMITATIONS
/proc user interface is not complete yet.
ACKNOLEGEMENTS
This product is based on the WANPIPE(tm) Multiprotocol WAN Router developed
by Sangoma Technologies Inc. for Linux 1.2.x. Release of Linux 2.0 in summer
1996 commanded adequate changes to the WANPIPE code to take full advantage of
new Linux features. Instead of continuing developing proprietory interface
specific to Sangoma WAN cards, we decided to put all hardware-independent code
into a separate module and define two levels of interfaces - one for user-
level applications and another for kernel-level WAN drivers.
Many usefull ideas concerning hardware-independent interface implementation
were given by Mike McLagan <mike.mclagan@linux.org> and his implementation
of the Frame Relay router and drivers for Sangoma cards (dlci/sdla).
Special thanks to all the WANPIPE users who performed field-testing, reported
bugs and made valuable comments and suggestions that help us to improve this
product.
REVISION HISTORY
1.0.0 December 31, 1996
--------------------------
o Initial version.
>>>>>> END <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Linux Serial Console
These examples are valid if you want to use /dev/ttyS1 (COM2)
as the serial console. Replace as needed.
1. Tell LILO to use the serial port.
In lilo.conf (global section):
serial = 1,9600n8 (ttyS1, 9600 bd, no parity, 8 bits)
2. Adjust to kernel flags for the new kernel,
again in lilo.conf (kernel section)
append = "console=1,9600,n8"
(Note the extra comma needed if you want to supply parity/framing
information.)
3. Link /dev/console to the serial port.
Your probably want to save your old /dev/console (the "master" virtual
console). Check if it is a symbolic link first. If not, `mv' it to
`/dev/tty0':
ls -l /dev/console
mv /dev/console /dev/tty0
Now link the serial port you are going to use as the console to
/dev/console, for example ttyS1:
ln -s /dev/ttyS1 /dev/console
On some systems you might want to edit your bootup scripts to make sure
they don't reset this arrangement on boot. (On Debian, check
/etc/rc.boot/console and /etc/default/console). You probably also want
to put a getty on either /dev/console or /dev/ttyS1.
4. Init and /dev/console.
Sysvinit will open /dev/console on boot. If this does not point
to the serial console device, the startup messages will be printed
to the wrong device. The kernel also passes the environment variable
"CONSOLE" to the init program. sysvinit-2.64 reckognizes this, and
opens that device instead. Boot scripts as mentioned in (3) can
also check this variable to see what device the system console is.
If CONSOLE is not set you can assume the console is /dev/tty0.
Sysvinit remembers its stty settings in a file in /etc, called
`/etc/ioctl.save'. REMOVE THIS FILE before using the serial
console for the first time, because otherwise init will probably
set the baudrate to 38400 (bausdrate of the virtual console).
5. /dev/console and X
Programs that want to do something with the virtual console usually
open /dev/console. XF86 does this, and probably SVGALIB as well.
IMO this is wrong; they should open /dev/tty0.
I have binary patched /usr/bin/X11/XF86_SVGA to use "tty0"
instead of "console".
6. Notes.
If you compile the next little program, you will be able
to really "halt" the system. It will enter a little
monitor :)
main() { reboot(0xfee1dead, 672274793, 0xCDEF0123); }
This is just a call to the new "halt" function that later
kernels have. This is included the "halt" command of
the recent sysvinit versions.
The monitor will also be entered at a kernel panic, or
when you press "break". That last function does not
work at the moment I think, but it would be useful for
kernel debugging. You don't have alt-scrollock on a serial
console to find out the current EIP...
Miquel van Smoorenburg <miquels@cistron.nl>, 21-Jun-1996
Stephen C. Tweedie <sct@dcs.ed.ac.uk>, 23-Dec-1996
To set up SMP
Edit linux/Makefile and uncomment SMP=1, then compile and install
as usual.
If you are using LILO, it is handy to have both SMP and non-SMP
kernel images on hand. Edit /etc/lilo.conf to create an entry
for another kernel image called "linux-smp" or something.
The next time you compile the kernel, when running a SMP kernel,
edit linux/Makefile and change "MAKE=make" "MAKE=make -jN"
(where N = number of CPU + 1, or if you have tons of memory/swap
you can just use "-j" without a number). Feel free to experiment
with this one.
Of course you should time how long each build takes :-)
Example:
make config
time -v sh -c 'make dep ; make clean install modules modules_install'
If you are using some Compaq MP compliant machines you will need to set
the operating system in the BIOS settings to "Unixware" - don't ask me
why Compaq's dont work otherwise.
......@@ -87,6 +87,8 @@ Industrial Computer Source
9950 Barnes Canyon Road
San Diego, CA
http://www.industry.net/indcompsrc
and please mention Linux when enquiring.
For full information about the PCWD cards see the pcwd-watchdog.txt document.
......@@ -277,6 +277,13 @@ M: cheshire@cs.stanford.edu
W: http://mosquitonet.Stanford.EDU/strip.html
S: Maintained
WAN ROUTER AND SANGOMA WANPIPE DRIVERS (X.25, FRAME RELAY, PPP)
P: Gene Kozin
M: genek@compuserve.com
M: dm@sangoma.com
W: http://www.sangoma.com
S: Supported
SMB FILESYSTEM:
P: Volker Lendecke
M: lendecke@namu01.Num.Math.Uni-Goettingen.de
......
VERSION = 2
PATCHLEVEL = 1
SUBLEVEL = 24
SUBLEVEL = 25
ARCH = i386
......
......@@ -24,6 +24,7 @@
* within the United States, $35 abroad.
*/
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/smp.h>
#include <linux/smp_lock.h>
......@@ -50,7 +51,6 @@ asmlinkage int sys_pciconfig_write()
#else /* CONFIG_PCI */
#include <linux/kernel.h>
#include <linux/bios32.h>
#include <linux/pci.h>
#include <linux/malloc.h>
......
......@@ -426,13 +426,13 @@ static inline unsigned long s_mem_to_reg (unsigned long s_mem)
exp = (exp_msb << 10) | exp_low; /* common case */
if (exp_msb) {
if (exp_low == 0x7f) {
exp = 0x3ff;
exp = 0x7ff;
}
} else {
if (exp_low == 0x00) {
exp = 0x000;
} else {
exp |= (0x7 << 8);
exp |= (0x7 << 7);
}
}
return (sign << 63) | (exp << 52) | (frac << 29);
......
......@@ -240,6 +240,16 @@ loader_ok:
push ax
push cx
push dx
! which bootloader ?
seg cs
mov al,byte ptr type_of_loader
and al,#0xf0
cmp al,#0x10
jne try_xe801 ! not Loadlin
seg cs
cmp byte ptr type_of_loader,#0x16
jbe oldstylemem ! Loadlin <= 1.6 don't like that
try_xe801:
mov ax,#0xe801
int 0x15
jc oldstylemem
......@@ -257,6 +267,9 @@ loader_ok:
oldstylemem:
mov ah,#0x88
int 0x15
or ax,ax ! some BIOSes report ZERO for 64meg
mov word ptr [2],#0x400
jz gotmem
mov cx,#64 ! got memory size in kbytes, so we need to
xor dx,dx ! adjust to 64k chunks for the system.
div cx
......
......@@ -235,7 +235,8 @@ static const char * i486model(unsigned int nr)
static const char * i586model(unsigned int nr)
{
static const char *model[] = {
"0", "Pentium 60/66","Pentium 75+","OverDrive PODP5V83"
"0", "Pentium 60/66","Pentium 75+","OverDrive PODP5V83",
"Pentium MMX"
};
if (nr < sizeof(model)/sizeof(char *))
return model[nr];
......
......@@ -22,6 +22,7 @@
* Matthias Sattler : Changes for 2.1 kernel map.
* Michel Lespinasse : Changes for 2.1 kernel map.
* Michael Chastain : Change trampoline.S to gnu as.
* Alan Cox : Dumb bug: 'B' step PPro's are fine
*
*/
......@@ -573,8 +574,11 @@ void smp_store_cpu_info(int id)
c->x86=x86;
c->x86_model=x86_model;
c->x86_mask=x86_mask;
if(x86_mask>=1 && x86_mask<=4)
smp_b_stepping=1; /* Remember we have B step CPUs */
/*
* Mask B, Pentium, but not Pentium MMX
*/
if(x86_mask>=1 && x86_mask<=4 && x86==5 && (x86_model>=0&&x86_model<=3))
smp_b_stepping=1; /* Remember we have B step Pentia with bugs */
c->x86_capability=x86_capability;
c->fdiv_bug=fdiv_bug;
c->wp_works_ok=wp_works_ok; /* Always assumed the same currently */
......
......@@ -427,34 +427,26 @@ static void do_int(struct kernel_vm86_regs *regs, int i, unsigned char * ssp, un
return_to_32bit(regs, VM86_INTx + (i << 8));
}
/* This must be called with the kernel lock held. */
int handle_vm86_trap(struct kernel_vm86_regs * regs, long error_code, int trapno)
{
int ret;
lock_kernel();
if (VMPI.is_vm86pus) {
if ( (trapno==3) || (trapno==1) )
return_to_32bit(regs, VM86_TRAP + (trapno << 8));
do_int(regs, trapno, (unsigned char *) (regs->ss << 4), SP(regs));
ret = 1;
goto out;
return 1;
}
ret = 0;
if (trapno !=1)
goto out; /* we let this handle by the calling routine */
return 0; /* we let this handle by the calling routine */
if (current->flags & PF_PTRACED)
current->blocked &= ~(1 << (SIGTRAP-1));
send_sig(SIGTRAP, current, 1);
current->tss.trap_no = trapno;
current->tss.error_code = error_code;
out:
unlock_kernel();
return ret;
return 0;
}
/* This must be called with the kernel lock held. */
void handle_vm86_fault(struct kernel_vm86_regs * regs, long error_code)
{
unsigned char *csp, *ssp;
......@@ -466,9 +458,8 @@ void handle_vm86_fault(struct kernel_vm86_regs * regs, long error_code)
#define VM86_FAULT_RETURN \
if (VMPI.force_return_for_pic && (VEFLAGS & IF_MASK)) \
return_to_32bit(regs, VM86_PICRETURN); \
goto out;
return;
lock_kernel();
csp = (unsigned char *) (regs->cs << 4);
ssp = (unsigned char *) (regs->ss << 4);
sp = SP(regs);
......@@ -532,7 +523,7 @@ void handle_vm86_fault(struct kernel_vm86_regs * regs, long error_code)
return_to_32bit(regs, VM86_INTx + (intno << 8));
}
do_int(regs, intno, ssp, sp);
goto out;
return;
}
/* iret */
......@@ -565,8 +556,6 @@ void handle_vm86_fault(struct kernel_vm86_regs * regs, long error_code)
default:
return_to_32bit(regs, VM86_UNKNOWN);
}
out:
unlock_kernel();
}
/* ---------------- vm86 special IRQ passing stuff ----------------- */
......
......@@ -11,6 +11,9 @@
* Lots of code moved from tcp.c and ip.c; see those files
* for more names.
*
* Changes: Ingo Molnar, converted csum_partial_copy() to 2.1 exception
* handling.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
......@@ -86,7 +89,7 @@ unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum)
shll $16,%%ecx
5: movb (%%esi),%%cl
6: addl %%ecx,%%eax
adcl $0, %%eax
adcl $0, %%eax
7: "
: "=a"(sum)
: "0"(sum), "c"(len), "S"(buff)
......@@ -94,96 +97,228 @@ unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum)
return(sum);
}
/*
* Copy from ds while checksumming, otherwise like csum_partial
*
* The macros SRC and DST specify wether there should be exception handling
* for the source and/or the destination addresses.
*
* FIXME: could someone double check wether i havent mixed up some SRC and
* DST definitions? It's damn hard to trigger all cases, i hope i got
* them all but theres no guarantee ...
*/
#define csum_partial_copy_type(type) \
unsigned int csum_partial_copy ##type (int * __csum_err, const char *src, char *dst, \
int len, int sum) { \
__asm__( \
" testl $2, %%edi # Check alignment. \n" \
" jz 2f # Jump if alignment is ok. \n" \
" subl $2, %%ecx # Alignment uses up two bytes. \n" \
" jae 1f # Jump if we had at least two bytes. \n" \
" addl $2, %%ecx # ecx was < 2. Deal with it. \n" \
" jmp 4f \n" \
" 1000: \n" \
" 1: movw (%%esi), %%bx \n" \
" addl $2, %%esi \n" \
" 1001: \n" \
" movw %%bx, (%%edi) \n" \
" addl $2, %%edi \n" \
" addw %%bx, %%ax \n" \
" adcl $0, %%eax \n" \
" 2: \n" \
" pushl %%ecx \n" \
" shrl $5, %%ecx \n" \
" jz 2f \n" \
" testl %%esi, %%esi \n" \
" 1002: \n" \
" 1: movl (%%esi), %%ebx \n" \
" 1003: \n" \
" movl 4(%%esi), %%edx \n" \
" adcl %%ebx, %%eax \n" \
" 1004: \n" \
" movl %%ebx, (%%edi) \n" \
" adcl %%edx, %%eax \n" \
" 1005: \n" \
" movl %%edx, 4(%%edi) \n" \
" \n" \
" 1006: \n" \
" movl 8(%%esi), %%ebx \n" \
" 1007: \n" \
" movl 12(%%esi), %%edx \n" \
" adcl %%ebx, %%eax \n" \
" 1008: \n" \
" movl %%ebx, 8(%%edi) \n" \
" adcl %%edx, %%eax \n" \
" 1009: \n" \
" movl %%edx, 12(%%edi) \n" \
" \n" \
" 1010: \n" \
" movl 16(%%esi), %%ebx \n" \
" 1011: \n" \
" movl 20(%%esi), %%edx \n" \
" adcl %%ebx, %%eax \n" \
" 1012: \n" \
" movl %%ebx, 16(%%edi) \n" \
" adcl %%edx, %%eax \n" \
" 1013: \n" \
" movl %%edx, 20(%%edi) \n" \
" \n" \
" 1014: \n" \
" movl 24(%%esi), %%ebx \n" \
" 1015: \n" \
" movl 28(%%esi), %%edx \n" \
" adcl %%ebx, %%eax \n" \
" 1016: \n" \
" movl %%ebx, 24(%%edi) \n" \
" adcl %%edx, %%eax \n" \
" 1017: \n" \
" movl %%edx, 28(%%edi) \n" \
" \n" \
" 1018: \n" \
" lea 32(%%esi), %%esi \n" \
" 1019: \n" \
" lea 32(%%edi), %%edi \n" \
" dec %%ecx \n" \
" jne 1b \n" \
" adcl $0, %%eax \n" \
" 2: popl %%edx \n" \
" movl %%edx, %%ecx \n" \
" andl $0x1c, %%edx \n" \
" je 4f \n" \
" shrl $2, %%edx # This clears CF \n" \
" 1020: \n" \
" 3: movl (%%esi), %%ebx \n" \
" adcl %%ebx, %%eax \n" \
" 1021: \n" \
" movl %%ebx, (%%edi) \n" \
" 1022: \n" \
" lea 4(%%esi), %%esi \n" \
" 1023: \n" \
" lea 4(%%edi), %%edi \n" \
" dec %%edx \n" \
" jne 3b \n" \
" adcl $0, %%eax \n" \
" 4: andl $3, %%ecx \n" \
" jz 7f \n" \
" cmpl $2, %%ecx \n" \
" jb 5f \n" \
" 1024: \n" \
" movw (%%esi), %%cx \n" \
" 1025: \n" \
" leal 2(%%esi), %%esi \n" \
" 1026: \n" \
" movw %%cx, (%%edi) \n" \
" 1027: \n" \
" leal 2(%%edi), %%edi \n" \
" je 6f \n" \
" shll $16,%%ecx \n" \
" 1028: \n" \
" 5: movb (%%esi), %%cl \n" \
" 1029: \n" \
" movb %%cl, (%%edi) \n" \
" 6: addl %%ecx, %%eax \n" \
" adcl $0, %%eax \n" \
" 7: \n" \
" 2000: \n" \
" .section .fixup,\"ax\" \n" \
" 3000: movl %7,%1 \n" \
/* FIXME: zero out the rest of the buffer here !!!!!! */ \
" jmp 2000b \n" \
" .previous \n" \
" .section __ex_table,\"a\" \n" \
" .align 4 \n" \
" \n" \
SRC( " .long 1000b,3000b \n " ) \
DST( " .long 1001b,3000b \n " ) \
SRC( " .long 1002b,3000b \n " ) \
SRC( " .long 1003b,3000b \n " ) \
DST( " .long 1004b,3000b \n " ) \
DST( " .long 1005b,3000b \n " ) \
SRC( " .long 1006b,3000b \n " ) \
SRC( " .long 1007b,3000b \n " ) \
DST( " .long 1008b,3000b \n " ) \
DST( " .long 1009b,3000b \n " ) \
SRC( " .long 1010b,3000b \n " ) \
SRC( " .long 1011b,3000b \n " ) \
DST( " .long 1012b,3000b \n " ) \
DST( " .long 1013b,3000b \n " ) \
SRC( " .long 1014b,3000b \n " ) \
SRC( " .long 1015b,3000b \n " ) \
DST( " .long 1016b,3000b \n " ) \
DST( " .long 1017b,3000b \n " ) \
SRC( " .long 1018b,3000b \n " ) \
DST( " .long 1019b,3000b \n " ) \
SRC( " .long 1020b,3000b \n " ) \
DST( " .long 1021b,3000b \n " ) \
SRC( " .long 1022b,3000b \n " ) \
DST( " .long 1023b,3000b \n " ) \
SRC( " .long 1024b,3000b \n " ) \
SRC( " .long 1025b,3000b \n " ) \
DST( " .long 1026b,3000b \n " ) \
DST( " .long 1027b,3000b \n " ) \
SRC( " .long 1028b,3000b \n " ) \
DST( " .long 1029b,3000b \n " ) \
" .previous \n " \
: "=a" (sum), "=r" (*__csum_err) \
: "0" (sum), "c" (len), "S" (src), "D" (dst), \
"1" (*__csum_err), "i" (-EFAULT) \
: "bx", "cx", "dx", "si", "di" ); \
\
return(sum); \
}
/*
* copy from ds while checksumming, otherwise like csum_partial
* Currently we need only 2 out of the 4 possible type combinations:
*/
unsigned int csum_partial_copy(const char *src, char *dst,
int len, int sum) {
__asm__("
testl $2, %%edi # Check alignment.
jz 2f # Jump if alignment is ok.
subl $2, %%ecx # Alignment uses up two bytes.
jae 1f # Jump if we had at least two bytes.
addl $2, %%ecx # ecx was < 2. Deal with it.
jmp 4f
1: movw (%%esi), %%bx
addl $2, %%esi
movw %%bx, (%%edi)
addl $2, %%edi
addw %%bx, %%ax
adcl $0, %%eax
2:
pushl %%ecx
shrl $5, %%ecx
jz 2f
testl %%esi, %%esi
1: movl (%%esi), %%ebx
movl 4(%%esi), %%edx
adcl %%ebx, %%eax
movl %%ebx, (%%edi)
adcl %%edx, %%eax
movl %%edx, 4(%%edi)
movl 8(%%esi), %%ebx
movl 12(%%esi), %%edx
adcl %%ebx, %%eax
movl %%ebx, 8(%%edi)
adcl %%edx, %%eax
movl %%edx, 12(%%edi)
movl 16(%%esi), %%ebx
movl 20(%%esi), %%edx
adcl %%ebx, %%eax
movl %%ebx, 16(%%edi)
adcl %%edx, %%eax
movl %%edx, 20(%%edi)
movl 24(%%esi), %%ebx
movl 28(%%esi), %%edx
adcl %%ebx, %%eax
movl %%ebx, 24(%%edi)
adcl %%edx, %%eax
movl %%edx, 28(%%edi)
lea 32(%%esi), %%esi
lea 32(%%edi), %%edi
dec %%ecx
jne 1b
adcl $0, %%eax
2: popl %%edx
movl %%edx, %%ecx
andl $0x1c, %%edx
je 4f
shrl $2, %%edx # This clears CF
3: movl (%%esi), %%ebx
adcl %%ebx, %%eax
movl %%ebx, (%%edi)
lea 4(%%esi), %%esi
lea 4(%%edi), %%edi
dec %%edx
jne 3b
adcl $0, %%eax
4: andl $3, %%ecx
jz 7f
cmpl $2, %%ecx
jb 5f
movw (%%esi), %%cx
leal 2(%%esi), %%esi
movw %%cx, (%%edi)
leal 2(%%edi), %%edi
je 6f
shll $16,%%ecx
5: movb (%%esi), %%cl
movb %%cl, (%%edi)
6: addl %%ecx, %%eax
adcl $0, %%eax
7:
"
: "=a" (sum)
: "0"(sum), "c"(len), "S"(src), "D" (dst)
: "bx", "cx", "dx", "si", "di" );
return(sum);
/*
* Generate 'csum_partial_copy_from_user()', we need to do exception
* handling for source addresses.
*/
#define SRC(x) x
#define DST(x)
csum_partial_copy_type(_from_user)
#undef SRC
#undef DST
/*
* Generate 'csum_partial_copy_nocheck()', no need to do exception
* handling.
*/
#define SRC(x)
#define DST(x)
csum_partial_copy_type(_nocheck_generic)
#undef SRC
#undef DST
/*
* Generate 'csum_partial_copy_old()', old and slow compability stuff,
* full checking.
*
* tell us if you see something printk-ing on this. This function will be
* removed soon.
*/
#define SRC(x) x
#define DST(x) x
csum_partial_copy_type(_old)
#undef SRC
#undef DST
unsigned int csum_partial_copy ( const char *src, char *dst,
int len, int sum)
{
int ret;
int error = 0;
ret = csum_partial_copy_old (&error, src, dst, len, sum);
if (error)
printk("csum_partial_copy_old(): tell mingo to convert me!\n");
return ret;
}
......@@ -62,12 +62,12 @@ static int isp16_cdrom_base = ISP16_CDROM_IO_BASE;
static int isp16_cdrom_irq = ISP16_CDROM_IRQ;
static int isp16_cdrom_dma = ISP16_CDROM_DMA;
static char *isp16_cdrom_type = ISP16_CDROM_TYPE;
#ifdef MODULE
MODULE_PARM(isp16_cdrom_base, "i");
MODULE_PARM(isp16_cdrom_irq, "i");
MODULE_PARM(isp16_cdrom_dma, "i");
MODULE_PARM(isp16_cdrom_type, "s");
#ifdef MODULE
int init_module(void);
void cleanup_module(void);
#endif
......
......@@ -106,7 +106,10 @@ static int sjcd_audio_status;
static struct sjcd_play_msf sjcd_playing;
static int sjcd_base = SJCD_BASE_ADDR;
#ifdef MODULE
MODULE_PARM(sjcd_base, "i");
#endif
static struct wait_queue *sjcd_waitq = NULL;
......
......@@ -59,6 +59,7 @@
#include <asm/system.h>
#include <asm/uaccess.h>
#include <asm/poll.h>
#include <linux/types.h>
#include <linux/stddef.h>
......
......@@ -60,6 +60,7 @@
* User-defined bell sound, new setterm control sequences and printk
* redirection by Martin Mares <mj@k332.feld.cvut.cz> 19-Nov-95
*
* APM screenblank bug fixed Takashi Manabe <manabe@roy.dsl.tutics.tut.jp>
*/
#define BLANK 0x0020
......@@ -2194,12 +2195,14 @@ void do_blank_screen(int nopowersave)
hide_cursor();
console_blanked = fg_console + 1;
if(!nopowersave)
{
#ifdef CONFIG_APM
if (apm_display_blank())
return;
if (apm_display_blank())
return;
#endif
if(!nopowersave)
vesa_blank();
vesa_blank();
}
}
void do_unblank_screen(void)
......
......@@ -46,7 +46,6 @@ static int soft_margin = TIMER_MARGIN; /* in seconds */
struct timer_list watchdog_ticktock;
static int timer_alive = 0;
static int in_use = 0;
/*
......@@ -71,9 +70,8 @@ static void watchdog_fire(unsigned long data)
static int softdog_open(struct inode *inode, struct file *file)
{
if(in_use)
if(timer_alive)
return -EBUSY;
in_use = 1;
MOD_INC_USE_COUNT;
/*
* Activate timer
......@@ -81,7 +79,7 @@ static int softdog_open(struct inode *inode, struct file *file)
del_timer(&watchdog_ticktock);
watchdog_ticktock.expires=jiffies + (soft_margin * HZ);
add_timer(&watchdog_ticktock);
timer_alive++;
timer_alive=1;
return 0;
}
......@@ -94,9 +92,8 @@ static void softdog_release(struct inode *inode, struct file *file)
#ifndef CONFIG_WATCHDOG_NOWAYOUT
del_timer(&watchdog_ticktock);
MOD_DEC_USE_COUNT;
timer_alive=0;
#endif
in_use = 0;
timer_alive=0;
}
static void softdog_ping(void)
......
......@@ -123,7 +123,7 @@ static void el_interrupt(int irq, void *dev_id, struct pt_regs *regs);
static void el_receive(struct device *dev);
static void el_reset(struct device *dev);
static int el1_close(struct device *dev);
static struct enet_statistics *el1_get_stats(struct device *dev);
static struct net_device_stats *el1_get_stats(struct device *dev);
static void set_multicast_list(struct device *dev);
#define EL1_IO_EXTENT 16
......@@ -139,7 +139,7 @@ static int el_debug = EL_DEBUG;
struct net_local
{
struct enet_statistics stats;
struct net_device_stats stats;
int tx_pkt_start; /* The length of the current Tx packet. */
int collisions; /* Tx collisions this packet */
int loading; /* Spot buffer load collisions */
......@@ -398,12 +398,6 @@ static int el_start_xmit(struct sk_buff *skb, struct device *dev)
dev->trans_start = jiffies;
}
if (skb == NULL)
{
dev_tint(dev);
return 0;
}
save_flags(flags);
/*
......@@ -432,6 +426,8 @@ static int el_start_xmit(struct sk_buff *skb, struct device *dev)
lp->tx_pkt_start = gp_start;
lp->collisions = 0;
lp->stats.tx_bytes += skb->len;
/*
* Command mode with status cleared should [in theory]
* mean no more interrupts can be pending on the card.
......@@ -769,7 +765,7 @@ static int el1_close(struct device *dev)
return 0;
}
static struct enet_statistics *el1_get_stats(struct device *dev)
static struct net_device_stats *el1_get_stats(struct device *dev)
{
struct net_local *lp = (struct net_local *)dev->priv;
return &lp->stats;
......
......@@ -1034,6 +1034,9 @@ static int send_packet(struct device *dev, struct sk_buff *skb)
}
adapter = dev->priv;
adapter->stats.tx_bytes+=nlen;
/*
* send the adapter a transmit packet command. Ignore segment and offset
* and make sure the length is even
......@@ -1111,15 +1114,6 @@ static int elp_start_xmit(struct sk_buff *skb, struct device *dev)
adapter->stats.tx_dropped++;
}
/* Some upper layer thinks we've missed a tx-done interrupt */
if (skb == NULL) {
dev_tint(dev);
return 0;
}
if (skb->len <= 0)
return 0;
if (elp_debug >= 3)
printk("%s: request to send packet of length %d\n", dev->name, (int) skb->len);
......@@ -1156,7 +1150,7 @@ static int elp_start_xmit(struct sk_buff *skb, struct device *dev)
*
******************************************************/
static struct enet_statistics *elp_get_stats(struct device *dev)
static struct net_device_stats *elp_get_stats(struct device *dev)
{
elp_device *adapter = (elp_device *) dev->priv;
......@@ -1329,7 +1323,7 @@ static void elp_init(struct device *dev)
/*
* setup ptr to adapter specific information
*/
memset(&(adapter->stats), 0, sizeof(struct enet_statistics));
memset(&(adapter->stats), 0, sizeof(struct net_device_stats));
/*
* memory information
......
......@@ -264,7 +264,7 @@ typedef struct {
pcb_struct rx_pcb; /* PCB for foreground receiving */
pcb_struct itx_pcb; /* PCB for background sending */
pcb_struct irx_pcb; /* PCB for background receiving */
struct enet_statistics stats;
struct net_device_stats stats;
void *dma_buffer;
......
......@@ -115,7 +115,7 @@ enum commands {
/* Information that need to be kept for each board. */
struct net_local {
struct enet_statistics stats;
struct net_device_stats stats;
int last_restart;
ushort rx_head;
ushort rx_tail;
......@@ -283,7 +283,7 @@ static int el16_send_packet(struct sk_buff *skb, struct device *dev);
static void el16_interrupt(int irq, void *dev_id, struct pt_regs *regs);
static void el16_rx(struct device *dev);
static int el16_close(struct device *dev);
static struct enet_statistics *el16_get_stats(struct device *dev);
static struct net_device_stats *el16_get_stats(struct device *dev);
static void hardware_send_packet(struct device *dev, void *buf, short length);
void init_82586_mem(struct device *dev);
......@@ -300,8 +300,8 @@ struct netdev_entry netcard_drv =
If dev->base_addr == 2, (detachable devices only) allocate space for the
device and return success.
*/
int
el16_probe(struct device *dev)
int el16_probe(struct device *dev)
{
int base_addr = dev ? dev->base_addr : 0;
int i;
......@@ -428,10 +428,7 @@ int el16_probe1(struct device *dev, int ioaddr)
return 0;
}
static int
el16_open(struct device *dev)
static int el16_open(struct device *dev)
{
irq2dev_map[dev->irq] = dev;
......@@ -447,14 +444,14 @@ el16_open(struct device *dev)
return 0;
}
static int
el16_send_packet(struct sk_buff *skb, struct device *dev)
static int el16_send_packet(struct sk_buff *skb, struct device *dev)
{
struct net_local *lp = (struct net_local *)dev->priv;
int ioaddr = dev->base_addr;
short *shmem = (short*)dev->mem_start;
if (dev->tbusy) {
if (dev->tbusy)
{
/* If we get here, some higher level has decided we are broken.
There should really be a "kick me" function call instead. */
int tickssofar = jiffies - dev->trans_start;
......@@ -480,21 +477,15 @@ el16_send_packet(struct sk_buff *skb, struct device *dev)
dev->trans_start = jiffies;
}
/* If some higher layer thinks we've missed an tx-done interrupt
we are passed NULL. Caution: dev_tint() handles the cli()/sti()
itself. */
if (skb == NULL) {
dev_tint(dev);
return 0;
}
/* Block a timer-based transmit from overlapping. */
if (set_bit(0, (void*)&dev->tbusy) != 0)
printk("%s: Transmitter access conflict.\n", dev->name);
else {
else
{
short length = ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN;
unsigned char *buf = skb->data;
lp->stats.tx_bytes+=length;
/* Disable the 82586's input to the interrupt line. */
outb(0x80, ioaddr + MISC_CTRL);
hardware_send_packet(dev, buf, length);
......@@ -509,11 +500,10 @@ el16_send_packet(struct sk_buff *skb, struct device *dev)
return 0;
}
/* The typical workload of the driver:
Handle the network interface interrupts. */
static void
el16_interrupt(int irq, void *dev_id, struct pt_regs *regs)
static void el16_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
struct device *dev = (struct device *)(irq2dev_map[irq]);
struct net_local *lp;
......@@ -588,8 +578,9 @@ el16_interrupt(int irq, void *dev_id, struct pt_regs *regs)
ack_cmd |= CUC_RESUME;
}
if ((status & 0x0070) != 0x0040 && dev->start) {
static void init_rx_bufs(struct device *);
if ((status & 0x0070) != 0x0040 && dev->start)
{
static void init_rx_bufs(struct device *);
/* The Rx unit is not ready, it must be hung. Restart the receiver by
initializing the rx buffers, and issuing an Rx start command. */
if (net_debug)
......@@ -612,8 +603,7 @@ el16_interrupt(int irq, void *dev_id, struct pt_regs *regs)
return;
}
static int
el16_close(struct device *dev)
static int el16_close(struct device *dev)
{
int ioaddr = dev->base_addr;
ushort *shmem = (short*)dev->mem_start;
......@@ -642,8 +632,7 @@ el16_close(struct device *dev)
/* Get the current statistics. This may be called with the card open or
closed. */
static struct enet_statistics *
el16_get_stats(struct device *dev)
static struct net_device_stats *el16_get_stats(struct device *dev)
{
struct net_local *lp = (struct net_local *)dev->priv;
......@@ -653,8 +642,7 @@ el16_get_stats(struct device *dev)
}
/* Initialize the Rx-block list. */
static void
init_rx_bufs(struct device *dev)
static void init_rx_bufs(struct device *dev)
{
struct net_local *lp = (struct net_local *)dev->priv;
unsigned short *write_ptr;
......@@ -699,8 +687,7 @@ init_rx_bufs(struct device *dev)
}
void
init_82586_mem(struct device *dev)
void init_82586_mem(struct device *dev)
{
struct net_local *lp = (struct net_local *)dev->priv;
short ioaddr = dev->base_addr;
......@@ -758,8 +745,7 @@ init_82586_mem(struct device *dev)
return;
}
static void
hardware_send_packet(struct device *dev, void *buf, short length)
static void hardware_send_packet(struct device *dev, void *buf, short length)
{
struct net_local *lp = (struct net_local *)dev->priv;
short ioaddr = dev->base_addr;
......@@ -804,8 +790,7 @@ hardware_send_packet(struct device *dev, void *buf, short length)
dev->tbusy = 0;
}
static void
el16_rx(struct device *dev)
static void el16_rx(struct device *dev)
{
struct net_local *lp = (struct net_local *)dev->priv;
short *shmem = (short*)dev->mem_start;
......
......@@ -110,7 +110,7 @@ enum RxFilter {
#define SKB_QUEUE_SIZE 64
struct el3_private {
struct enet_statistics stats;
struct net_device_stats stats;
/* skb send-queue */
int head, size;
struct sk_buff *queue[SKB_QUEUE_SIZE];
......@@ -123,7 +123,7 @@ static int el3_open(struct device *dev);
static int el3_start_xmit(struct sk_buff *skb, struct device *dev);
static void el3_interrupt(int irq, void *dev_id, struct pt_regs *regs);
static void update_stats(int addr, struct device *dev);
static struct enet_statistics *el3_get_stats(struct device *dev);
static struct net_device_stats *el3_get_stats(struct device *dev);
static int el3_rx(struct device *dev);
static int el3_close(struct device *dev);
#ifdef HAVE_MULTICAST
......@@ -421,8 +421,7 @@ el3_open(struct device *dev)
return 0; /* Always succeed */
}
static int
el3_start_xmit(struct sk_buff *skb, struct device *dev)
static int el3_start_xmit(struct sk_buff *skb, struct device *dev)
{
struct el3_private *lp = (struct el3_private *)dev->priv;
int ioaddr = dev->base_addr;
......@@ -444,14 +443,6 @@ el3_start_xmit(struct sk_buff *skb, struct device *dev)
dev->tbusy = 0;
}
if (skb == NULL) {
dev_tint(dev);
return 0;
}
if (skb->len <= 0)
return 0;
if (el3_debug > 4) {
printk("%s: el3_start_xmit(length = %u) called, status %4.4x.\n",
dev->name, skb->len, inw(ioaddr + EL3_STATUS));
......@@ -479,6 +470,7 @@ el3_start_xmit(struct sk_buff *skb, struct device *dev)
if (set_bit(0, (void*)&dev->tbusy) != 0)
printk("%s: Transmitter access conflict.\n", dev->name);
else {
lp->stats.tx_bytes+=skb->len;
/* Put out the doubleword header... */
outw(skb->len, ioaddr + TX_FIFO);
outw(0x00, ioaddr + TX_FIFO);
......@@ -589,8 +581,7 @@ el3_interrupt(int irq, void *dev_id, struct pt_regs *regs)
}
static struct enet_statistics *
el3_get_stats(struct device *dev)
static struct net_device_stats *el3_get_stats(struct device *dev)
{
struct el3_private *lp = (struct el3_private *)dev->priv;
unsigned long flags;
......
......@@ -170,7 +170,7 @@ static void elmc_interrupt(int irq,void *dev_id,struct pt_regs *reg_ptr);
static int elmc_open(struct device *dev);
static int elmc_close(struct device *dev);
static int elmc_send_packet(struct sk_buff *,struct device *);
static struct enet_statistics *elmc_get_stats(struct device *dev);
static struct net_device_stats *elmc_get_stats(struct device *dev);
static void set_multicast_list(struct device *dev);
/* helper-functions */
......@@ -183,25 +183,26 @@ static void elmc_rcv_int(struct device *dev);
static void elmc_xmt_int(struct device *dev);
static void elmc_rnr_int(struct device *dev);
struct priv {
struct enet_statistics stats;
unsigned long base;
char *memtop;
volatile struct rfd_struct *rfd_last,*rfd_top,*rfd_first;
volatile struct scp_struct *scp; /* volatile is important */
volatile struct iscp_struct *iscp; /* volatile is important */
volatile struct scb_struct *scb; /* volatile is important */
volatile struct tbd_struct *xmit_buffs[NUM_XMIT_BUFFS];
volatile struct transmit_cmd_struct *xmit_cmds[NUM_XMIT_BUFFS];
struct priv
{
struct net_device_stats stats;
unsigned long base;
char *memtop;
volatile struct rfd_struct *rfd_last,*rfd_top,*rfd_first;
volatile struct scp_struct *scp; /* volatile is important */
volatile struct iscp_struct *iscp; /* volatile is important */
volatile struct scb_struct *scb; /* volatile is important */
volatile struct tbd_struct *xmit_buffs[NUM_XMIT_BUFFS];
volatile struct transmit_cmd_struct *xmit_cmds[NUM_XMIT_BUFFS];
#if (NUM_XMIT_BUFFS == 1)
volatile struct nop_cmd_struct *nop_cmds[2];
volatile struct nop_cmd_struct *nop_cmds[2];
#else
volatile struct nop_cmd_struct *nop_cmds[NUM_XMIT_BUFFS];
volatile struct nop_cmd_struct *nop_cmds[NUM_XMIT_BUFFS];
#endif
volatile int nop_point,num_recv_buffs;
volatile char *xmit_cbuffs[NUM_XMIT_BUFFS];
volatile int xmit_count,xmit_last;
volatile int slot;
volatile int nop_point,num_recv_buffs;
volatile char *xmit_cbuffs[NUM_XMIT_BUFFS];
volatile int xmit_count,xmit_last;
volatile int slot;
};
#define elmc_attn586() {elmc_do_attn586(dev->base_addr,ELMC_CTRL_INTE);}
......@@ -1208,9 +1209,8 @@ elmc_send_packet(struct sk_buff *skb, struct device *dev)
* Someone wanna have the statistics
*/
static
struct enet_statistics*
elmc_get_stats( struct device *dev ) {
static struct net_device_stats *elmc_get_stats( struct device *dev )
{
struct priv *p = (struct priv *) dev->priv;
unsigned short crc,aln,rsc,ovrn;
......
......@@ -233,7 +233,7 @@ struct vortex_private {
char devname[8]; /* "ethN" string, also for kernel debug. */
const char *product_name;
struct device *next_module;
struct enet_statistics stats;
struct net_device_stats stats;
struct sk_buff *tx_skb; /* Packet being eaten by bus master ctrl. */
struct timer_list timer; /* Media selection timer. */
int options; /* User-settable misc. driver options. */
......@@ -276,7 +276,7 @@ static int vortex_rx(struct device *dev);
static void vortex_interrupt IRQ(int irq, void *dev_id, struct pt_regs *regs);
static int vortex_close(struct device *dev);
static void update_stats(int addr, struct device *dev);
static struct enet_statistics *vortex_get_stats(struct device *dev);
static struct net_device_stats *vortex_get_stats(struct device *dev);
static void set_rx_mode(struct device *dev);
......@@ -1067,8 +1067,7 @@ vortex_close(struct device *dev)
return 0;
}
static struct enet_statistics *
vortex_get_stats(struct device *dev)
static struct net_device_stats *vortex_get_stats(struct device *dev)
{
struct vortex_private *vp = (struct vortex_private *)dev->priv;
unsigned long flags;
......
......@@ -179,17 +179,7 @@ static int ei_start_xmit(struct sk_buff *skb, struct device *dev)
dev->trans_start = jiffies;
}
/* Sending a NULL skb means some higher layer thinks we've missed an
tx-done interrupt. Caution: dev_tint() handles the cli()/sti()
itself. */
if (skb == NULL) {
dev_tint(dev);
return 0;
}
length = skb->len;
if (skb->len <= 0)
return 0;
/* Mask interrupts from the ethercard. */
outb_p(0x00, e8390_base + EN0_IMR);
......@@ -202,6 +192,8 @@ static int ei_start_xmit(struct sk_buff *skb, struct device *dev)
send_length = ETH_ZLEN < length ? length : ETH_ZLEN;
ei_local->stat.tx_bytes+=send_length;
#ifdef EI_PINGPONG
/*
......@@ -560,6 +552,7 @@ static void ei_receive(struct device *dev)
skb->dev = dev;
skb_put(skb, pkt_len); /* Make room */
ei_block_input(dev, pkt_len, skb, current_offset + sizeof(rx_frame));
ei_local->stat.rx_bytes+=skb->len;
skb->protocol=eth_type_trans(skb,dev);
netif_rx(skb);
ei_local->stat.rx_packets++;
......@@ -663,7 +656,7 @@ static void ei_rx_overrun(struct device *dev)
}
static struct enet_statistics *get_stats(struct device *dev)
static struct net_device_stats *get_stats(struct device *dev)
{
short ioaddr = dev->base_addr;
struct ei_device *ei_local = (struct ei_device *) dev->priv;
......
......@@ -75,7 +75,7 @@ struct ei_device {
unsigned char reg5; /* Register '5' in a WD8013 */
unsigned char saved_irq; /* Original dev->irq value. */
/* The new statistics table. */
struct enet_statistics stat;
struct net_device_stats stat;
};
/* The maximum number of 8390 interrupt service routines called per IRQ. */
......
......@@ -99,3 +99,4 @@ DE4X5_OPTS = -DDE4X5_AUTOSENSE=AUTO
DEFXX_OPTS =
ELP_OPTS =
TULIP_OPTS =
CS89x0_OPTS =
......@@ -76,7 +76,8 @@ if [ "$CONFIG_NET_ETHERNET" = "y" ]; then
tristate 'Ansel Communications EISA 3200 support (EXPERIMENTAL)' CONFIG_AC3200
fi
tristate 'Apricot Xen-II on board ethernet' CONFIG_APRICOT
tristate 'DE425, DE434, DE435, DE450, DE500 support' CONFIG_DE4X5
tristate 'CS89x0 support' CONFIG_CS89x0
tristate 'Generic DECchip & DIGITAL EtherWORKS PCI/EISA' CONFIG_DE4X5
tristate 'DECchip Tulip (dc21x4x) PCI support' CONFIG_DEC_ELCP
tristate 'Digi Intl. RightSwitch SE-X support' CONFIG_DGRS
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
......@@ -104,6 +105,15 @@ if [ "$CONFIG_DLCI" = "y" -o "$CONFIG_DLCI" = "m" ]; then
dep_tristate ' SDLA (Sangoma S502/S508) support' CONFIG_SDLA $CONFIG_DLCI
fi
#
# LocalTalk
#
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
if [ "$CONFIG_ATALK" != "n" ]; then
tristate 'LocalTalk PC support' CONFIG_LTPC
fi
fi
tristate 'PLIP (parallel port) support' CONFIG_PLIP
tristate 'PPP (point-to-point) support' CONFIG_PPP
......@@ -137,11 +147,6 @@ if [ "$CONFIG_NET_RADIO" != "n" ]; then
fi
tristate 'STRIP (Metricom starmode radio IP)' CONFIG_STRIP
tristate 'AT&T WaveLAN & DEC RoamAbout DS support' CONFIG_WAVELAN
tristate 'WIC Radio IP bridge' CONFIG_WIC
fi
if [ "$CONFIG_X25" != "n" ]; then
tristate 'LAPB over Ethernet driver' CONFIG_LAPBETHER
fi
tristate 'SLIP (serial line) support' CONFIG_SLIP
......@@ -159,4 +164,23 @@ fi
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate 'Traffic Shaper (EXPERIMENTAL)' CONFIG_SHAPER
fi
#
# WAN drivers support
#
if [ "$CONFIG_WAN_ROUTER" = "y" ]; then
bool 'WAN drivers' CONFIG_WAN_DRIVERS
if [ "$CONFIG_WAN_DRIVERS" = "y" ]; then
bool 'Sangoma WANPIPE(tm) multiprotocol cards' CONFIG_VENDOR_SANGOMA
if [ "$CONFIG_VENDOR_SANGOMA" = "y" ]; then
int ' Maximum number of cards' CONFIG_WANPIPE_CARDS 1
bool ' WANPIPE X.25 support' CONFIG_WANPIPE_X25
bool ' WANPIPE Frame Relay support' CONFIG_WANPIPE_FR
bool ' WANPIPE PPP support' CONFIG_WANPIPE_PPP
fi
fi
fi
if [ "$CONFIG_X25" != "n" ]; then
tristate 'LAPB over Ethernet driver' CONFIG_LAPBETHER
fi
......@@ -77,14 +77,6 @@ else
endif
endif
ifeq ($(CONFIG_WIC),y)
L_OBJS += wic.o
else
ifeq ($(CONFIG_WIC),m)
M_OBJS += wic.o
endif
endif
ifeq ($(CONFIG_SMC9194),y)
L_OBJS += smc9194.o
else
......@@ -630,6 +622,22 @@ else
endif
endif
ifeq ($(CONFIG_CS89x0),y)
L_OBJS += cs89x0.o
else
ifeq ($(CONFIG_CS89x0),m)
M_OBJS += cs89x0.o
endif
endif
ifeq ($(CONFIG_LTPC),y)
L_OBJS += ltpc.o
else
ifeq ($(CONFIG_LTPC),m)
M_OBJS += ltpc.o
endif
endif
ifeq ($(CONFIG_BAYCOM),y)
L_OBJS += baycom.o
CONFIG_HDLCDRV_BUILTIN = y
......@@ -661,6 +669,21 @@ else
endif
ifeq ($(CONFIG_VENDOR_SANGOMA),y)
M_OBJS += sdladrv.o
M_OBJS += wanpipe.o
WANPIPE_OBJS = sdlamain.o
ifeq ($(CONFIG_WANPIPE_X25),y)
WANPIPE_OBJS += sdla_x25.o
endif
ifeq ($(CONFIG_WANPIPE_FR),y)
WANPIPE_OBJS += sdla_fr.o
endif
ifeq ($(CONFIG_WANPIPE_PPP),y)
WANPIPE_OBJS += sdla_ppp.o
endif
endif
include $(TOPDIR)/Rules.make
clean:
......@@ -725,7 +748,24 @@ sdla.o: sdla.c CONFIG
dlci.o: dlci.c CONFIG
sdladrv.o: sdladrv.c CONFIG
wanpipe.o: $(WANPIPE_OBJS)
ld -r -o $@ $^
sdlamain.o: sdlamain.c CONFIG
sdla_x25.o: sdla_x25.c CONFIG
sdla_fr.o: sdla_fr.c CONFIG
sdla_ppp.o: sdla_ppp.c CONFIG
dgrs.o: dgrs.c dgrs.h CONFIG
$(CC) $(CPPFLAGS) $(CFLAGS) -c $<
ltpc.o: ltpc.c ltpc.h CONFIG
$(CC) $(CPPFLAGS) $(CFLAGS) -c $<
tulip.o: tulip.c CONFIG
$(CC) $(CPPFLAGS) $(CFLAGS) $(TULIP_OPTS) -c $<
The de425/de434/de435/de500 driver in this distribution is designed to work
with the Digital Equipment Corporation series of PCI/EISA ethernet cards
(DE425, DE434, DE435, DE500) and with all kernels that support PCI.
This driver has been upgraded to include generic DECchip support through the
use of the on-board SROM that is found on all DECchip cards except for the
DC21040. The driver will work with the following set of cards and probably
more:
KINGSTON
Linksys
ZNYX342
SMC8432
SMC9332 (w/new SROM)
ZNYX31[45]
DIGITAL EtherWORKS PCI/EISA (DE425, DE434, DE435, DE450, DE500)
Auto media detection is provided so that the media choice isn't compiled in
and is flexible enough to be able to reconfigure on-the-fly. This feature
hasn't been included for the DE500 unfortunately, due to a potential patent
dispute. When I get around to implementing the autosense algorithm by myself
(which could legally be difficult to prove since I'm part of the group that
has implemented the patented algorithm) you'll have an auto speed selection
for the de500. If you want the auto speed feature yell at Digital. If enough
of you do things might change.
The ability to load this driver as a loadable module has been included,
although I don't recommend its use with PCI, since PCI dynamically allocates
where the card will go at boot time (i.e. the card would have to be present
in the system at boot time for its address/IRQ to be assigned).
and is flexible enough to be able to reconfigure on-the-fly.
The ability to load this driver as a loadable module has been included and
will now load (and unload) as many DECchip cards as it can find and
configure with just one invocation of 'insmod'.
The performance we've achieved so far has been measured through the 'ttcp'
tool at 1.06MB/s for TCP and 1.17MB/s for UDP. This measures the total
......@@ -32,16 +34,8 @@ All values are typical (in kBytes/sec) from a sample of 4 for each
measurement. Their error is approx +/-20k on a quiet (private) network and
also depend on what load the CPU has, CPU speed etc.
ZYNX and SMC cards, which use the PCI DECchip DC21040, are not specifically
supported in this driver because
a) I have no information on them.
b) I cannot test them with the driver.
c) Donald Becker's 'tulip.c' driver works with them....well one person says
they do and another says they do not, so take your pick!
This driver can be made to work with the ZYNX (and may be the SMC) card by
setting a compile time flag (IS_NOT_DEC) in linux/drivers/net/CONFIG
I've had reports that Alphas can get 80+Mb/s when using 100BASE-TX and
similar figures for 133MHz Pentium Pros.
Enjoy!
......
This is the ALPHA version of the ltpc driver.
In order to use it, you will need at least version 1.3.3 of the
netatalk package, and the Apple or Farallon Localtalk PC card.
There are a number of different Localtalk cards for the PC; this
driver applies only to the one with the 65c02 processor chip on it.
To include it in the kernel, select the CONFIG_LTPC switch in the
configuration dialog; at this time (kernel 2.1.23) compiling it as
a module will not work.
Before starting up the netatalk demons (perhaps in rc.local), you
need to add a line such as:
/sbin/ifconfig ltalk0 127.0.0.42
The driver will autoprobe, and you should see a message like:
"LocalTalk card found at 240, IR9, DMA1."
at bootup.
The appropriate netatalk configuration depends on whether you are
attached to a network that includes appletalk routers or not. If,
like me, you are simply connecting to your home Macintoshes and
printers, you need to set up netatalk to "seed". The way I do this
is to have the lines
dummy -seed -phase 2 -net 2000 -addr 2000.26 -zone "1033"
ltalk0 -seed -phase 1 -net 1033 -addr 1033.27 -zone "1033"
in my atalkd.conf. What is going on here is that I need to fool
netatalk into thinking that there are two appletalk interfaces
present -- otherwise it refuses to seed. This is a hack, and a
more permanent solution would be to alter the netatalk code.
Note that the dummy driver needs to accept multicasts also -- earlier
versions of dummy.c may need to be patched.
If you are attached to an extended appletalk network, with routers on
it, then you don't need to fool around with this -- the appropriate
line in atalkd.conf is
ltalk0 -phase 1
--------------------------------------
Card Configuration:
The interrupts and so forth are configured via the dipswitch on the
board. Set the switches so as not to conflict with other hardware.
Interrupts -- set at most one. If none are set, the driver uses
polled mode. Because the card was developed in the XT era, the
original documentation refers to IRQ2. Since you'll be running
this on an AT (or later) class machine, that really means IRQ9.
SW1 IRQ 4
SW2 IRQ 3
SW3 IRQ 9 (2 in original card documentation only applies to XT)
DMA -- choose DMA 1 or 3, and set both corresponding switches.
SW4 DMA 3
SW5 DMA 1
SW6 DMA 3
SW7 DMA 1
I/O address -- choose one.
SW8 220 / 240
--------------------------------------
IP:
Many people are interested in this driver in order to use IP
when Localtalk, but no Ethernet, is available. While the code to do
this is not strictly speaking part of this driver, an experimental
version is available which seems to work under kernel 2.0.xx. It is
not yet functional in the 2.1.xx kernels.
--------------------------------------
BUGS:
2.0.xx:
2.1.xx: The module support doesn't work yet.
______________________________________
THANKS:
Thanks to Alan Cox for helpful discussions early on in this
work, and to Denis Hainsworth for doing the bleeding-edge testing.
-- Bradford Johnson <bradford@math.umn.edu>
......@@ -25,6 +25,7 @@ apricot YES PROMISC YES Hardware
arcnet NO NO NO N/A
at1700 PROMISC PROMISC YES Software
atp PROMISC PROMISC YES Software
cs89x0 YES YES YES Software
de4x5 YES NO YES Hardware
de600 NO NO NO N/A
de620 PROMISC PROMISC YES Software
......
------------------------------------------------------------------------------
WANPIPE(tm) Multiprotocol WAN Driver for Linux WAN Router
------------------------------------------------------------------------------
Release 3.0.0
December 31, 1996
Author: Gene Kozin <genek@compuserve.com>
Copyright (c) 1995-1996 Sangoma Technologies Inc.
------------------------------------------------------------------------------
INTRODUCTION
WANPIPE(tm) is a family of intelligent muliprotocol WAN communication adapters
for personal computers (ISA bus) designed to provide PC connectivity to
various communication links, such as leased lines and public data networks, at
speeds up to T1/E1 using variety of synchronous communications protocols,
including frame relay, PPP, X.25, SDLC, etc.
WANPIPE driver together with Linux WAN Router module allows you to build
relatively inexpensive, yet high-prformance multiprotocol WAN router. For
more information about Linux WAN Router please read file
Documentation/networking/wan-router.txt. You must also obtain WAN Tools
package to be able to use Linux WAN Router and WANPIPE driver. The package
is available via the Internet from Sangoma Technologies' anonymous FTP server:
ftp.sangoma.com/pub/linux/wantools-X.Y.Z.tgz
For technical questions and/or comments please e-mail to genek@compuserve.com.
For general inquiries please contact Sangoma Technologies Inc. by
Hotline: 1-800-388-2475 (USA and Canada, toll free)
Phone: (905) 474-1990
Fax: (905) 474-9223
E-mail: dm@sangoma.com (David Mandelstam)
WWW: http://www.sangoma.com
COPYRIGHT AND LICENSING INFORMATION
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 675 Mass
Ave, Cambridge, MA 02139, USA.
NEW IN THIS RELEASE
o Implemented as WAN Link Driver compliant with Linux WAN Router interface
o Added support for X.25 protocol
o Miscellaneous bug fixes and performance improvements
FILE LIST
drivers/net:
README.wanpipe This file
sdladrv.c SDLA support module source code
wpmain.c WANPIPE driver module main source code
wpx.c WANPIPE driver module X.25 source code
wpf.c WANPIPE driver module frame relay source code
wpp.c WANPIPE driver module PPP source code
sdla_x25.h SDLA X.25 firmware API definitions
sdla_fr.h SDLA frame relay firmware API definitions
sdla_ppp.h SDLA PPP firmware API definitions
include/linux:
wanpipe.h WANPIPE API definitions
sdladrv.h SDLA support module API definitions
sdlasfm.h SDLA firmware module definitions
REVISION HISTORY
3.0.0 December 31, 1996
o Uses Linux WAN Router interface
o Added support for X.25 routing
o Miscellaneous bug fixes and performance improvements
2.4.1 December 18, 1996
o Added support for LMI and Q.933 frame relay link management
2.3.0 October 17, 1996
o All shell scripts use meta-configuration file
o Miscellaneous bug fixes
2.2.0 July 16, 1996
o Compatible with Linux 2.0
o Added uninstall script
o User's Manual is available in HTML format
2.1.0 June 20, 1996
o Added support for synchronous PPP
o Added support for S503 adapter
o Added API for executing adapter commands
o Fixed a re-entrancy problem in frame relaty driver
o Changed interface between SDLA driver and protocol support modules
o Updated frame relay firmware
2.0.0 May 1, 1996
o Added interactive installation and configuration scripts
o Added System V-style start-up script
o Added dynamic memory window address selection in SDLA driver
o Miscellaneous bug fixes in SDLA driver
o Updated S508 frame relay firmware
o Changed SFM file format
1.0.0 February 12, 1996
o Final release
o Added support for Linux 1.3
o Updated S508 frame relay firmware
0.9.0 December 21, 1995
o Added SNAP encapsulation for routed frames
o Added support for the frame relay switch emulation mode
o Added support for S508 adapter
o Added capability to autodetect adapter type
o Miscellaneous bug fixes in SDLA and frame relay drivers
0.1.0 October 12, 1995
o Initial version
>>>>>>> END OF README <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
......@@ -84,14 +84,14 @@ extern int atarilance_probe(struct device *);
extern int a2065_probe(struct device *);
extern int ariadne_probe(struct device *);
extern int hydra_probe(struct device *);
extern int cs89x0_probe(struct device *dev);
/* Detachable devices ("pocket adaptors") */
extern int atp_init(struct device *);
extern int de600_probe(struct device *);
extern int de620_probe(struct device *);
static int
ethif_probe(struct device *dev)
static int ethif_probe(struct device *dev)
{
u_long base_addr = dev->base_addr;
......@@ -150,6 +150,9 @@ ethif_probe(struct device *dev)
#ifdef CONFIG_AT1500
&& at1500_probe(dev)
#endif
#ifdef CONFIG_CS89x0
&& cs89x0_probe(dev)
#endif
#ifdef CONFIG_AT1700
&& at1700_probe(dev)
#endif
......@@ -270,6 +273,17 @@ static struct device atp_dev = {
# define NEXT_DEV (&arcnet_dev)
#endif
#if defined(CONFIG_LTPC)
extern int ltpc_probe(struct device *);
static struct device dev_ltpc = {
"ltalk0\0 ",
0, 0, 0, 0,
0x0, 0,
0, 0, 0, NEXT_DEV, ltpc_probe };
# undef NEXT_DEV
# define NEXT_DEV (&dev_ltpc)
#endif /* LTPC */
/* The first device defaults to I/O base '0', which means autoprobe. */
#ifndef ETH0_ADDR
# define ETH0_ADDR 0
......
......@@ -122,7 +122,7 @@ struct lance_private {
int lance_log_rx_bufs, lance_log_tx_bufs;
int rx_ring_mod_mask, tx_ring_mod_mask;
struct enet_statistics stats;
struct net_device_stats stats;
int tpe; /* cable-selection is TPE */
int auto_select; /* cable-selection by carrier */
unsigned short busmaster_regval;
......@@ -645,7 +645,7 @@ static int lance_start_xmit (struct sk_buff *skb, struct device *dev)
return status;
}
static struct enet_statistics *lance_get_stats (struct device *dev)
static struct net_device_stats *lance_get_stats (struct device *dev)
{
struct lance_private *lp = (struct lance_private *) dev->priv;
......
......@@ -162,7 +162,7 @@ struct i596_private {
struct i596_cmd *cmd_head;
int cmd_backlog;
unsigned long last_cmd;
struct enet_statistics stats;
struct net_device_stats stats;
};
char init_setup[] = {
......@@ -185,7 +185,7 @@ static int i596_open(struct device *dev);
static int i596_start_xmit(struct sk_buff *skb, struct device *dev);
static void i596_interrupt(int irq, void *dev_id, struct pt_regs *regs);
static int i596_close(struct device *dev);
static struct enet_statistics *i596_get_stats(struct device *dev);
static struct net_device_stats *i596_get_stats(struct device *dev);
static void i596_add_cmd(struct device *dev, struct i596_cmd *cmd);
static void print_eth(char *);
static void set_multicast_list(struct device *dev);
......@@ -942,7 +942,7 @@ i596_close(struct device *dev)
return 0;
}
static struct enet_statistics *
static struct net_device_stats *
i596_get_stats(struct device *dev)
{
struct i596_private *lp = (struct i596_private *)dev->priv;
......
......@@ -535,7 +535,7 @@ struct Outgoing
/* Information that needs to be kept for each board. */
struct arcnet_local {
struct enet_statistics stats;
struct net_device_stats stats;
u_short sequence; /* sequence number (incs with each packet) */
u_char stationid, /* our 8-bit station address */
recbuf, /* receive buffer # (0 or 1) */
......@@ -609,7 +609,7 @@ static void arcnet_rx(struct device *dev,int recbuf);
static void arcnetA_rx(struct device *dev,u_char *buf,
int length,u_char saddr, u_char daddr);
static struct enet_statistics *arcnet_get_stats(struct device *dev);
static struct net_device_stats *arcnet_get_stats(struct device *dev);
int arcnetA_header(struct sk_buff *skb,struct device *dev,
unsigned short type,void *daddr,void *saddr,unsigned len);
......@@ -2580,8 +2580,7 @@ arcnetA_rx(struct device *dev,u_char *buf,
* closed.
*/
static struct enet_statistics *
arcnet_get_stats(struct device *dev)
static struct net_device_stats *arcnet_get_stats(struct device *dev)
{
struct arcnet_local *lp = (struct arcnet_local *)dev->priv;
......
......@@ -103,7 +103,7 @@ struct ariadne_private {
u_short *rx_buff[RX_RING_SIZE];
int cur_tx, cur_rx; /* The next free ring entry */
int dirty_tx; /* The ring entries to be free()ed. */
struct enet_statistics stats;
struct net_device_stats stats;
char tx_full;
unsigned long lock;
int key;
......@@ -128,7 +128,7 @@ static int ariadne_start_xmit(struct sk_buff *skb, struct device *dev);
static int ariadne_rx(struct device *dev);
static void ariadne_interrupt(int irq, void *data, struct pt_regs *fp);
static int ariadne_close(struct device *dev);
static struct enet_statistics *ariadne_get_stats(struct device *dev);
static struct net_device_stats *ariadne_get_stats(struct device *dev);
#ifdef HAVE_MULTICAST
static void set_multicast_list(struct device *dev);
#endif
......@@ -782,7 +782,7 @@ static int ariadne_rx(struct device *dev)
}
static struct enet_statistics *ariadne_get_stats(struct device *dev)
static struct net_device_stats *ariadne_get_stats(struct device *dev)
{
struct ariadne_private *priv = (struct ariadne_private *)dev->priv;
struct AriadneBoard *board = priv->board;
......
......@@ -67,7 +67,7 @@ typedef unsigned char uchar;
/* Information that need to be kept for each board. */
struct net_local {
struct enet_statistics stats;
struct net_device_stats stats;
uint tx_started:1; /* Number of packet on the Tx queue. */
uchar tx_queue; /* Number of packet on the Tx queue. */
ushort tx_queue_len; /* Current length of the Tx queue. */
......@@ -120,7 +120,7 @@ static int net_send_packet(struct sk_buff *skb, struct device *dev);
static void net_interrupt(int irq, void *dev_id, struct pt_regs *regs);
static void net_rx(struct device *dev);
static int net_close(struct device *dev);
static struct enet_statistics *net_get_stats(struct device *dev);
static struct net_device_stats *net_get_stats(struct device *dev);
static void set_multicast_list(struct device *dev);
......@@ -592,8 +592,8 @@ static int net_close(struct device *dev)
/* Get the current statistics. This may be called with the card open or
closed. */
static struct enet_statistics *
net_get_stats(struct device *dev)
static struct net_device_stats *net_get_stats(struct device *dev)
{
struct net_local *lp = (struct net_local *)dev->priv;
......
......@@ -136,7 +136,7 @@ static unsigned int bionet_min_poll_time = 2;
/* Information that need to be kept for each board.
*/
struct net_local {
struct enet_statistics stats;
struct net_device_stats stats;
long open_time; /* for debugging */
int poll_time; /* polling time varies with net load */
};
......@@ -157,7 +157,7 @@ static int bionet_open(struct device *dev);
static int bionet_send_packet(struct sk_buff *skb, struct device *dev);
static void bionet_poll_rx(struct device *);
static int bionet_close(struct device *dev);
static struct enet_statistics *net_get_stats(struct device *dev);
static struct net_device_stats *net_get_stats(struct device *dev);
static void bionet_tick(unsigned long);
static struct timer_list bionet_timer = { NULL, NULL, 0, 0, bionet_tick };
......@@ -594,8 +594,8 @@ bionet_close(struct device *dev) {
/* Get the current statistics.
This may be called with the card open or closed.
*/
static struct enet_statistics *
net_get_stats(struct device *dev) {
static struct net_device_stats *net_get_stats(struct device *dev)
{
struct net_local *lp = (struct net_local *)dev->priv;
return &lp->stats;
}
......
......@@ -134,7 +134,7 @@ static unsigned int pamsnet_min_poll_time = 2;
/* Information that need to be kept for each board.
*/
struct net_local {
struct enet_statistics stats;
struct net_device_stats stats;
long open_time; /* for debugging */
int poll_time; /* polling time varies with net load */
};
......@@ -167,7 +167,7 @@ static int pamsnet_open(struct device *dev);
static int pamsnet_send_packet(struct sk_buff *skb, struct device *dev);
static void pamsnet_poll_rx(struct device *);
static int pamsnet_close(struct device *dev);
static struct enet_statistics *net_get_stats(struct device *dev);
static struct net_device_stats *net_get_stats(struct device *dev);
static void pamsnet_tick(unsigned long);
static void pamsnet_intr(int irq, void *data, struct pt_regs *fp);
......@@ -866,8 +866,8 @@ pamsnet_close(struct device *dev) {
/* Get the current statistics.
This may be called with the card open or closed.
*/
static struct enet_statistics *
net_get_stats(struct device *dev) {
static struct net_device_stats *net_get_stats(struct device *dev)
{
struct net_local *lp = (struct net_local *)dev->priv;
return &lp->stats;
}
......
......@@ -223,7 +223,7 @@ struct lance_private {
int dirty_tx; /* Ring entries to be freed. */
/* copy function */
void *(*memcpy_f)( void *, const void *, size_t );
struct enet_statistics stats;
struct net_device_stats stats;
/* These two must be ints for set_bit() */
int tx_full;
int lock;
......@@ -346,7 +346,7 @@ static int lance_start_xmit( struct sk_buff *skb, struct device *dev );
static void lance_interrupt( int irq, void *dev_id, struct pt_regs *fp );
static int lance_rx( struct device *dev );
static int lance_close( struct device *dev );
static struct enet_statistics *lance_get_stats( struct device *dev );
static struct net_device_stats *lance_get_stats( struct device *dev );
static void set_multicast_list( struct device *dev );
static int lance_set_mac_address( struct device *dev, void *addr );
......@@ -1072,7 +1072,7 @@ static int lance_close( struct device *dev )
}
static struct enet_statistics *lance_get_stats( struct device *dev )
static struct net_device_stats *lance_get_stats( struct device *dev )
{ struct lance_private *lp = (struct lance_private *)dev->priv;
......
......@@ -139,7 +139,7 @@ static void net_interrupt(int irq, void *dev_id, struct pt_regs *regs);
static void net_rx(struct device *dev);
static void read_block(short ioaddr, int length, unsigned char *buffer, int data_mode);
static int net_close(struct device *dev);
static struct enet_statistics *net_get_stats(struct device *dev);
static struct net_device_stats *net_get_stats(struct device *dev);
static void set_multicast_list(struct device *dev);
......@@ -747,8 +747,7 @@ net_close(struct device *dev)
/* Get the current statistics. This may be called with the card open or
closed. */
static struct enet_statistics *
net_get_stats(struct device *dev)
static struct net_device_stats *net_get_stats(struct device *dev)
{
struct net_local *lp = (struct net_local *)dev->priv;
return &lp->stats;
......
This diff is collapsed.
......@@ -122,7 +122,7 @@ static struct bpqdev {
char ethname[14]; /* ether device name */
struct device *ethdev; /* link to ethernet device */
struct device axdev; /* bpq device (bpq#) */
struct enet_statistics stats; /* some statistics */
struct net_device_stats stats; /* some statistics */
char dest_addr[6]; /* ether destination address */
char acpt_addr[6]; /* accept ether frames from this address only */
} *bpq_devices = NULL;
......@@ -331,7 +331,7 @@ static int bpq_xmit(struct sk_buff *skb, struct device *dev)
/*
* Statistics
*/
static struct enet_statistics *bpq_get_stats(struct device *dev)
static struct net_device_stats *bpq_get_stats(struct device *dev)
{
struct bpqdev *bpq;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -518,7 +518,7 @@ static int hdlcdrv_set_mac_address(struct device *dev, void *addr)
/* --------------------------------------------------------------------- */
static struct enet_statistics *hdlcdrv_get_stats(struct device *dev)
static struct net_device_stats *hdlcdrv_get_stats(struct device *dev)
{
struct hdlcdrv_state *sm;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment