Commit 4aa6fb2e authored by Linus Torvalds's avatar Linus Torvalds

Import 1.3.69

parent 8bf26ec8
......@@ -380,10 +380,10 @@ S: The Netherlands
N: Bruno Haible
E: haible@ma2s2.mathematik.uni-karlsruhe.de
D: Unified SysV FS based on Xenix FS (part of standard kernel since 0.99.15)
S: Augartenstrasse 40
S: D - 76137 Karlsruhe
S: Germany
D: SysV FS, shm swapping, memory management fixes
S: 17 rue Danton
S: F - 94270 Le Kremlin-Bictre
S: France
N: Greg Hankins
E: gregh@cc.gatech.edu
......@@ -984,6 +984,13 @@ S: Post Office Box 500
S: Batavia, Illinois 60510
S: USA
N: Leo Spiekman
E: spiekman@et.tudelft.nl
D: Optics Storage 8000AT cdrom driver
W: http://dutettk.et.tudelft.nl/~spiekman
S: Utrecht
S: The Netherlands
N: Drew Sullivan
E: drew@lethe.north.net
D: iBCS2 developer
......
......@@ -1759,9 +1759,14 @@ NI5210 support
CONFIG_NI52
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. 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.
sunsite.unc.edu:/pub/Linux/docs/HOWTO. This driver is also available
as a module ( = code which can be inserted in and removed from the
running kernel whenever you want). If you want to compile it as a
module, 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.
NI6510 support
CONFIG_NI65
......@@ -2447,6 +2452,18 @@ CONFIG_NCP_FS
running kernel whenever you want), say M here and read
Documentation/modules.txt.
Standard/generic serial support
CONFIG_SERIAL
This selects whether you want to include the driver for the
standard (0x3F8, 0x2F8, etc.) serial ports. Most people will
say "y" here, so that they can use serial mice, modems and
similar devices. People who might say "n" here are those that
are setting up dedicated ethernet WWW/ftp servers, or users
that have one of the various bus mice instead of a serial mouse.
Note that the Cyclades and Stallion drivers do not need this
driver built in for them to work. They are completely independent
of each other.
Cyclades async mux support
CONFIG_CYCLADES
This is a card which gives you many serial ports. You would need
......@@ -2743,6 +2760,51 @@ CONFIG_PROFILE_SHIFT
enabled "Kernel profiling support", you must be a kernel hacker and
hence you know what this is about :-)
ISDN subsystem
CONFIG_ISDN
This allows you to use an ISDN-card for networking connections and as
dialin/out device. The isdn-tty's have a builtin AT-compatible modem
emulator. Network devices support autodial, channel-bundling, callback
and caller-authentication without having a daemon running. A reduced T.70
protocol is supported with tty's suitable for german BTX. Currently Cards
by Teles and compatibles and ICN are supported. On D-Channel, the protocols
EDSS1 and 1TR6 are supported. See Documentation/isdn/README for more
information.
Support synchronous PPP
CONFIG_ISDN_PPP
This enables synchronous PPP via ISDN. This protocol is used by Cisco
or Sun for example. You will need a special version of pppd (called ipppd)
for using this feature. See Documentation/isdn/README.syncppp for more
information.
Sypport generic MP (RFC 1717)
CONFIG_ISDN_MPP
With synchronous PPP enabled, it is possible to increase throughput by
bundling several ISDN-connections, using this protocol. See
Documentation/isdn/README.syncppp for more information.
Use VJ-compression with synchronous PPP
CONFIG_ISDN_PPP_VJ
This enables Van Jacobson headercompression for synchronous PPP.
ICN B1 and B2 support
CONFIG_ISDN_DRV_ICN
This enables support for two kinds of ISDN-cards made by a german company
called ICN. 1B is the standard version for a single ISDN line with two
B-channels, 2B supports two ISDN lines. For running this card, additional
firmware is necessary, which has to be downloaded into the card using
a utility which is distributed separately.
See Documentation/isdn/README and README.icn for more information.
Teles, NICCY1016PC, Creatix support
CONFIG_ISDN_DRV_TELES
This enables support for the Teles ISDN-cards S0-16.0, S0-16.3, S0-8 and
many compatibles. By default, the driver is configured to support
a 16.0-type using EDSS1-protocol. See Documentation/isdn/README
on how to configure it using 16.3, a different D-channel protocol, or
non-standard irq/port/shmem settings.
# need an empty line after last entry, for sed script in Configure.
#
......
This is the README file for the Optics Storage 8000 AT CDROM device driver.
The driver contains code to enable an ISP16 interface if it finds one. It
didn't originally (although this README erroneously said so), because I think
this kind of code should go into its own module. But having to use a hack all
the time in order to use a part of the standard kernel started to annoy me, so
I copied the ISP16 code by Eric van der Maarel (maarel@marin.nl) from Vadim
Model's Sanyo sjcd driver. I'll remove it again from this driver when we have
some common way to talk to ISP16 interfaces.
My original configuration code for the ISP-16 card can get found at
This is the driver for the so-called 'DOLPHIN' drive, with the 34-pin
Sony-compatible interface. For the IDE-compatible Optics Storage 8001
drive, you will want the ATAPI CDROM driver. If you have a drive that
works with this driver, and that doesn't report itself as DOLPHIN,
please drop me a mail.
The support for multisession CDs is in ALPHA stage. If you use it,
please mail me your experiences. Multisession support can be disables
at compile time.
You can find some older versions of the driver at
dutette.et.tudelft.nl:/pub/linux/
and at Eberhard's mirror
ftp.gwdg.de:/pub/linux/cdrom/drivers/optics/
Much more elaborate information can be found at ftp:rbrf.msk.su,
where Vadim Model (vadim@rbrf.msk.su) has made available an ISP16
device driver.
Vadim's directory is
rbrf.msk.su:/linux/mediamagic/
and Eberhard is holding a mirror at
ftp.gwdg.de:/pub/linux/cdrom/drivers/sanyo/
Before you can use the driver, you have to create the device file once:
# mknod /dev/optcd0 b 17 0
......@@ -36,15 +29,28 @@ or
# insmod /usr/src/linux/modules/optcd.o optcd=0x340
with the matching address value of your interface card.
I have tried the module with several 1.2.x kernel versions, and it seems to
work, as far as I tested. It also seems to work for several 1.3.x versions.
If you use it, I'd appreciate success/failure reports. If you find a bug,
try recompiling the driver with some strategically chosen #undef DEBUG_...'s
changed into #defines (you'll find them in .../include/linux/optcd.h) and
include the messages generated in your bug report. Good luck.
I have inserted code to support multisession. It works for me, although
it is very slow during disk detection. At this time multisession support
is to be considered experimental. Please mail me your experiences.
The driver employs a number of buffers to do read-ahead and block size
conversion. The number of buffers is configurable in optcd.h, and has
influence on the driver performance. For my machine (a P75), 6 buffers
seems optimal, as can be seen from this table:
#bufs kb/s %cpu
1 97 0.1
2 191 0.3
3 188 0.2
4 246 0.3
5 189 19
6 280 0.4
7 281 7.0
8 246 2.8
16 281 3.4
If you get a throughput significantly below 300 kb/s, try tweaking
N_BUFS, and don't forget to mail me your results!
I'd appreciate success/failure reports. If you find a bug, try
recompiling the driver with some strategically chosen debug options
(these can be found in optcd.h) and include the messages generated in
your bug report. Good luck.
Leo Spiekman (spiekman@dutette.et.tudelft.nl)
......@@ -28,7 +28,7 @@ Bugs in the present implementation:
Please report any bugs and suggestions to
Bruno Haible <haible@ma2s2.mathematik.uni-karlsruhde.de> or
Bruno Haible <haible@ma2s2.mathematik.uni-karlsruhe.de> or
Pascal Haible <haible@izfm.uni-stuttgart.de> .
......
I want to thank all who contributed to this project and especially to:
(in alphabetical order)
Thomas Bogendörfer (tsbogend@bigbug.franken.de)
Tester, lots of bugfixes and hints.
Alan Cox ()
For help getting into standard-kernel.
Volker Götz (volker@oops.franken.de)
For contribution of man-pages, the imontty-tool and a perfect
maintaining of the mailing-list at hub-wue.
Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
For his Sync-PPP-code.
Karsten Keil (isdn4@temic-ech.spacenet.de)
For adding 1TR6-support to the Teles-driver.
Michael Knigge (knick@cove.han.de)
For contributing the imon-tool
Andreas Kool (akool@Kool.f.EUnet.de)
For contribution of the isdnlog/isdnrep-tool
Pedro Roque Marques
For lot of new ideas and writing a new driver coming soon.
Jan den Ouden (denouden@groovin.xs4all.nl)
For contribution of the teles-driver
Max Riegel (riegel@max.franken.de)
For making the ICN hardware-documentation and test-equipment available.
Gerhard 'Fido' Schneider (fido@wuff.franken.de)
For heavy-duty-beta-testing with his BBS ;)
Thomas Uhl (uhl@hn-net.de)
For distributing the cards.
For pushing me to work ;-)
This diff is collapsed.
This diff is collapsed.
You can get the ICN-ISDN-card from:
Thinking Objects Software GmbH
Obere Heerbergstr. 17
97078 Wrzburg
Tel: +49 931 2877950
Fax: +49 931 2877951
email uhl@think.de
WWW http:/www.think.de
The card communicates with the PC by two interfaces:
1. A range of 4 successive port-addresses, whos base address can be
configured with the switches.
2. A memory window with 16KB-256KB size, which can be setup in 16k steps
over the whole range of 16MB. Isdn4linux only uses a 16k window.
The base address of the window can be configured when loading
the lowlevel-module (see README).
Setting up the IO-address dipswitches for the ICN-ISDN-card:
Two types of cards exist, one with dip-switches and one with
hook-switches.
1. Setting for the card with hook-switches:
(0 = switch closed, 1 = switch open)
S3 S2 S1 Basie-address
0 0 0 0x300
0 0 1 0x310
0 1 0 0x320 (Default for isdn4linux)
0 1 1 0x330
1 0 0 0x340
1 0 1 0x350
1 1 0 0x360
1 1 1 NOT ALLOWED!
2. Setting for the card with dip-switches:
(0 = switch closed, 1 = switch open)
S1 S2 S3 S4 Basis-Adresse
0 0 0 0 0x300
0 0 0 1 0x310
0 0 1 0 0x320 (Default for isdn4linux)
0 0 1 1 0x330
0 1 0 0 0x340
0 1 0 1 0x350
0 1 1 0 0x360
0 1 1 1 NOT ALLOWED!
1 0 0 0 0x308
1 0 0 1 0x318
1 0 1 0 0x328
1 0 1 1 0x338
1 1 0 0 0x348
1 1 0 1 0x358
1 1 1 0 0x368
1 1 1 1 NOT ALLOWED!
Some additional information for setting up a syncPPP
connection using network interfaces.
---------------------------------------------------------------
You need one thing beside the isdn4linux package:
a patched pppd .. (I called it ipppd to show the difference)
Compiling isdn4linux with sync PPP:
-----------------------------------
To compile isdn4linux with the sync PPP part, you have
to answer the apropriate question when doing a "make config"
Don't forget to load the slhc.o
module before the isdn.o module, if VJ-compression support
is not compiled into your kernel.
Using isdn4linux with sync PPP:
-------------------------------
Sync PPP is just another encapsulation for isdn4linux. The
name to enable sync PPP encapsualtion is 'syncppp' .. e.g:
isdn/isdnctrl encap ippp0 syncppp
The name of the interface is here 'ippp0'. You need
one interface with the name 'ippp0' to saturate the
ipppd, which checks the ppp version via this interface.
To set up a PPP connection you need the ipppd .. You must start
the ipppd once after installing the modules. The ipppd
communicates with the isdn4linux link-level driver using the
/dev/ippp0 to /dev/ippp15 devices. One ipppd can handle
all devices at once. If you want to use two PPP connections
at the same time, you have to connect the ipppd to two
devices .. and so on.
I've implemented one additonal option for the ipppd:
'useifip' will get (if set to not 0.0.0.0) the IP address
for the negotiation from the attached network-interface.
You must disable BSD-compression, this implementation can't
handle compressed packets.
Check the rc.isdn.syncppp file for an example setup script.
enjoy it,
michael
PS: I also implemented generic MP (RFC 1717). But in the
current isdn4linux link-level driver there is no
(or better say: another) way of doing channel bundling. So,
don't call the ipppd with the `+mp` option to enable
MP negotiation.
This is my Linux hardware level driver for Teles compatible ISDN cards. It is
meant to be used with isdn4isdn4linux, an ISDN Link-level module for Linux written
by Fritz Elfert.
Isdn4linux can be obtained from ftp.franken.de:/pub/isdn4linux. The most recent
Teles driver can be found on my homepage, http://www.xs4all.nl:/~jdo.
Warning
-------
Teles4isdn4linux is a work in progress and may crash your machine. It has not
been certified and therefore operation on your PTT's ISDN network is probably
illegal.
Limitations
-----------
Teles4isdn4linux only works on Euro ISDN lines and german 1TR6-lines.
For the B channel transparent (HDLC) protocol and X.75 have been implemented.
Running
-------
When you insmod isdn.o and teles.o (or with the kernel-version, during boottime)
a few lines should appear in your syslog. Look for something like:
Oct 11 16:53:30 jedi kernel: channels 2
Oct 11 16:53:31 jedi kernel: Teles module installed
Remember, that according to the new strategy for accessing Low-level-drivers
from within isdn4linux you should also define a driver-id while doing
insmod: Simply append id=<SomeString> to the insmod-commandline. This
string MUST NOT start with a digit or a small 'x'!
At this point you can run a 'cat /dev/isdnctrl0' and view debugging
messages. Debugging messages are enabled with the telesctrl tool:
teles/telesctrl <DriverId> 1 <debugging_flags>
where <debugging_flags> is the integer sum of the following debugging
options you wish enabled:
1 Link-level <--> Hardware-level communication
2 Top state machine
4 D channel Q.931 (call control messages)
8 D channel Q.921
16 B channel X.75
For example 'teles/telesctrl MyTeles 1 31' enables full
debugging.
Questions
---------
Check out the FAQ (ftp.franken.de).
Bugs
----
If you find any please let me know.
Thanks
------
Special thanks to:
Erik Bos,Beat Doebeli,Fritz Elfert,
Pauline Middelink,Paula de Nie,
Bernd Oerding,Stephan Seidl,Matthias Urlichs,
Rogier Wolff
Enjoy,
Jan den Ouden denouden@groovin.xs4all.nl
......@@ -72,11 +72,13 @@ Ioctl Include File Comments
0x03 linux/hdreg.h
0x04 linux/umsdos_fs.h
0x06 linux/lp.h
0x09 linux/md.h
0x12 linux/fs.h
0x20 linux/cm206.h
0x22 linux/scc.h
'A' linux/apm_bios.h
'C' linux/soundcard.h
'I' linux/isdn.h
'K' linux/kd.h
'M' linux/soundcard.h
'P' linux/soundcard.h
......
......@@ -102,6 +102,12 @@ M: smp-patches@lxorguk.ukuu.org.uk
L: linux-smp@vger.rutgers.edu
S: Maintained
SPARC:
P: David S. Miller
M: davem@caip.rutgers.edu
L: sparclinux@vger.rutgers.edu
S: Maintained
REST:
P: Linus Torvalds
S: Buried alive in email
VERSION = 1
PATCHLEVEL = 3
SUBLEVEL = 68
SUBLEVEL = 69
ARCH = i386
......@@ -130,6 +130,10 @@ DRIVERS =drivers/block/block.a \
LIBS =$(TOPDIR)/lib/lib.a
SUBDIRS =kernel drivers mm fs net ipc lib
ifeq ($(CONFIG_ISDN),y)
DRIVERS := $(DRIVERS) drivers/isdn/isdn.a
endif
ifdef CONFIG_CD_NO_IDESCSI
DRIVERS := $(DRIVERS) drivers/cdrom/cdrom.a
endif
......@@ -339,7 +343,7 @@ distclean: mrproper
backup: mrproper
cd .. && tar cf - linux | gzip -9 > backup.gz
cd .. && tar cf - linux/ | gzip -9 > backup.gz
sync
dep-files: archdep .hdepend include/linux/version.h
......
......@@ -176,6 +176,7 @@ CONFIG_ISO9660_FS=y
#
# Character devices
#
CONFIG_SERIAL=y
# CONFIG_CYCLADES is not set
# CONFIG_STALDRV is not set
# CONFIG_PRINTER is not set
......
......@@ -63,6 +63,15 @@ if [ "$CONFIG_NET" = "y" ]; then
endmenu
fi
mainmenu_option next_comment
comment 'ISDN subsystem'
tristate 'ISDN support' CONFIG_ISDN
if [ "$CONFIG_ISDN" != "n" ]; then
source drivers/isdn/Config.in
fi
endmenu
mainmenu_option next_comment
comment 'CD-ROM drivers (not for SCSI or IDE/ATAPI drives)'
......
......@@ -45,7 +45,7 @@ CONFIG_BLK_DEV_RZ1000=y
# CONFIG_BLK_DEV_RAM is not set
# CONFIG_BLK_DEV_LOOP is not set
# CONFIG_BLK_DEV_XD is not set
# CONFIG_BLK_DEV_MD is not set
#
# Networking options
#
......@@ -103,6 +103,11 @@ CONFIG_EL3=y
# CONFIG_TR is not set
# CONFIG_ARCNET is not set
#
# ISDN subsystem
#
# CONFIG_ISDN is not set
#
# CD-ROM drivers (not for SCSI or IDE/ATAPI drives)
#
......@@ -131,6 +136,7 @@ CONFIG_ISO9660_FS=y
#
# Character devices
#
CONFIG_SERIAL=y
# CONFIG_CYCLADES is not set
# CONFIG_STALDRV is not set
# CONFIG_PRINTER is not set
......
......@@ -328,16 +328,15 @@ void dump_thread(struct pt_regs * regs, struct user * dump)
dump->magic = CMAGIC;
dump->start_code = 0;
dump->start_stack = regs->esp & ~(PAGE_SIZE - 1);
dump->u_tsize = ((unsigned long) current->mm->end_code) >> 12;
dump->u_dsize = ((unsigned long) (current->mm->brk + (PAGE_SIZE-1))) >> 12;
dump->u_tsize = ((unsigned long) current->mm->end_code) >> PAGE_SHIFT;
dump->u_dsize = ((unsigned long) (current->mm->brk + (PAGE_SIZE-1))) >> PAGE_SHIFT;
dump->u_dsize -= dump->u_tsize;
dump->u_ssize = 0;
for (i = 0; i < 8; i++)
dump->u_debugreg[i] = current->debugreg[i];
if (dump->start_stack < TASK_SIZE) {
dump->u_ssize = ((unsigned long) (TASK_SIZE - dump->start_stack)) >> 12;
}
if (dump->start_stack < TASK_SIZE)
dump->u_ssize = ((unsigned long) (TASK_SIZE - dump->start_stack)) >> PAGE_SHIFT;
dump->regs = *regs;
......
......@@ -27,6 +27,7 @@
#include <linux/mm.h>
#include <linux/kernel_stat.h>
#include <linux/delay.h>
#include <linux/mc146818rtc.h>
#include <asm/i82489.h>
#include <linux/smp.h>
#include <asm/pgtable.h>
......@@ -469,7 +470,7 @@ void smp_callin(void)
/*
* Allow the master to continue.
*/
set_bit(cpuid, &cpu_callin_map[0]);
set_bit(cpuid, (unsigned long *)&cpu_callin_map[0]);
/*
* Until we are ready for SMP scheduling
*/
......@@ -573,21 +574,38 @@ void smp_boot_cpus(void)
* the targeted processor.
*/
#ifdef EEK
SMP_PRINTK(("Setting warm reset code and vector.\n"));
/*
* Needed to boot a 486 board.
*/
CMOS_WRITE(0xa, 0xf);
*((volatile unsigned short *) 0x467) = (unsigned short)(stack>>4);
pg0[0]=7;
*((volatile unsigned short *) 0x467) = ((unsigned long)stack)>>4;
*((volatile unsigned short *) 0x469) = 0;
#endif
pg0[0]= pte_val(mk_pte(0, PAGE_READONLY));
/*
* Clean up the errors
*/
apic_write(APIC_ESR, 0);
accept_status = (apic_read(APIC_ESR) & 0xEF);
/*
* Status is now clean
*/
send_status = 0;
accept_status = 0;
SMP_PRINTK(("Asserting INIT.\n"));
/*
* Turn INIT on
*/
cfg=apic_read(APIC_ICR2);
cfg&=0x00FFFFFF;
apic_write(APIC_ICR2, cfg|SET_APIC_DEST_FIELD(i)); /* Target chip */
......@@ -610,6 +628,10 @@ void smp_boot_cpus(void)
}
#endif
/*
* And off again
*/
if (send_status && !accept_status)
{
SMP_PRINTK(("Deasserting INIT.\n"));
......@@ -706,7 +728,6 @@ void smp_boot_cpus(void)
printk("APIC never delivered???\n");
else if (accept_status) /* Send accept error */
printk("APIC delivery error (%lx).\n", accept_status);
else
{
for(timeout=0;timeout<50000;timeout++)
{
......@@ -1096,9 +1117,9 @@ void smp_message_irq(int cpl, struct pt_regs *regs)
*/
case MSG_INVALIDATE_TLB:
if(clear_bit(i,&smp_invalidate_needed))
if(clear_bit(i,(unsigned long *)&smp_invalidate_needed))
local_invalidate();
set_bit(i, &cpu_callin_map[0]);
set_bit(i, (unsigned long *)&cpu_callin_map[0]);
cpu_callin_map[0]|=1<<smp_processor_id();
break;
......
......@@ -9,7 +9,7 @@
SUB_DIRS := block char net #streams
MOD_SUB_DIRS := $(SUB_DIRS)
ALL_SUB_DIRS := $(SUB_DIRS) pci scsi sound cdrom
ALL_SUB_DIRS := $(SUB_DIRS) pci scsi sound cdrom isdn
ifdef CONFIG_PCI
SUB_DIRS += pci
......@@ -39,4 +39,13 @@ SUB_DIRS += cdrom
MOD_SUB_DIRS += cdrom
endif
ifeq ($(CONFIG_ISDN),y)
SUB_DIRS += isdn
MOD_SUB_DIRS += isdn
else
ifeq ($(CONFIG_ISDN),m)
MOD_SUB_DIRS += isdn
endif
endif
include $(TOPDIR)/Rules.make
......@@ -37,4 +37,9 @@ if [ "$CONFIG_BLK_DEV_HD_IDE" = "y" -o "$CONFIG_BLK_DEV_HD_ONLY" = "y" ]; then
fi
bool 'XT harddisk support' CONFIG_BLK_DEV_XD
bool 'Multiple devices driver support' CONFIG_BLK_DEV_MD
if [ "$CONFIG_BLK_DEV_MD" = "y" ]; then
tristate ' Linear (append) mode' CONFIG_MD_LINEAR
tristate ' RAID-0 (striping) mode' CONFIG_MD_STRIPED
fi
endmenu
......@@ -19,6 +19,7 @@ L_TARGET := block.a
L_OBJS := ll_rw_blk.o genhd.o
M_OBJS :=
MOD_LIST_NAME := BLOCK_MODULES
LX_OBJS :=
ifeq ($(CONFIG_BLK_DEV_FD),y)
L_OBJS += floppy.o
......@@ -96,4 +97,45 @@ ifeq ($(CONFIG_BLK_DEV_XD),y)
L_OBJS += xd.o
endif
ifeq ($(CONFIG_BLK_DEV_MD),y)
LX_OBJS += md.o
ifeq ($(CONFIG_MD_LINEAR),y)
L_OBJS += linear.o
else
ifeq ($(CONFIG_MD_LINEAR),m)
M_OBJS += linear.o
endif
endif
ifeq ($(CONFIG_MD_STRIPED),y)
L_OBJS += raid0.o
else
ifeq ($(CONFIG_MD_STRIPED),m)
M_OBJS += raid0.o
endif
endif
#ifeq ($(CONFIG_MD_RAID1),y)
#L_OBJS += raid1.o
#else
# ifeq ($(CONFIG_MD_SUPPORT_RAID1),y)
# ifeq ($(CONFIG_MD_RAID1),m)
# M_OBJS += raid1.o
# endif
# endif
#endif
#
#ifeq ($(CONFIG_MD_RAID5),y)
#L_OBJS += raid5.o
#else
# ifeq ($(CONFIG_MD_SUPPORT_RAID5),y)
# ifeq ($(CONFIG_MD_RAID5),m)
# M_OBJS += raid5.o
# endif
# endif
#endif
endif
include $(TOPDIR)/Rules.make
Tools that manage md devices can be found at sweet-smoke.ufr-info-p7.ibp.fr
in public/Linux/md034.tar.gz.
Marc ZYNGIER <zyngier@ufr-info-p7.ibp.fr>
/*
linear.c : Multiple Devices driver for Linux
Copyright (C) 1994-96 Marc ZYNGIER
<zyngier@ufr-info-p7.ibp.fr> or
<maz@gloups.fdn.fr>
Linear mode management functions.
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.
You should have received a copy of the GNU General Public License
(for example /usr/src/linux/COPYING); if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <linux/module.h>
#include <linux/md.h>
#include <linux/linear.h>
#include <linux/malloc.h>
#define MAJOR_NR MD_MAJOR
#define MD_DRIVER
#define MD_PERSONALITY
#include <linux/blk.h>
static int linear_run (int minor, struct md_dev *mddev)
{
int cur=0, i, size, dev0_size, nb_zone;
struct linear_data *data;
MOD_INC_USE_COUNT;
mddev->private=kmalloc (sizeof (struct linear_data), GFP_KERNEL);
data=(struct linear_data *) mddev->private;
/*
Find out the smallest device. This was previously done
at registery time, but since it violates modularity,
I moved it here... Any comment ? ;-)
*/
data->smallest=devices[minor];
for (i=1; i<mddev->nb_dev; i++)
if (data->smallest->size > devices[minor][i].size)
data->smallest=devices[minor]+i;
nb_zone=data->nr_zones=
md_size[minor]/data->smallest->size +
(md_size[minor]%data->smallest->size ? 1 : 0);
data->hash_table=kmalloc (sizeof (struct linear_hash)*nb_zone, GFP_KERNEL);
size=devices[minor][cur].size;
i=0;
while (cur<mddev->nb_dev)
{
data->hash_table[i].dev0=devices[minor]+cur;
if (size>=data->smallest->size) /* If we completly fill the slot */
{
data->hash_table[i++].dev1=NULL;
size-=data->smallest->size;
if (!size)
{
if (++cur==mddev->nb_dev) continue;
size=devices[minor][cur].size;
}
continue;
}
if (++cur==mddev->nb_dev) /* Last dev, set dev1 as NULL */
{
data->hash_table[i].dev1=NULL;
continue;
}
dev0_size=size; /* Here, we use a 2nd dev to fill the slot */
size=devices[minor][cur].size;
data->hash_table[i++].dev1=devices[minor]+cur;
size-=(data->smallest->size - dev0_size);
}
return 0;
}
static int linear_stop (int minor, struct md_dev *mddev)
{
struct linear_data *data=(struct linear_data *) mddev->private;
kfree (data->hash_table);
kfree (data);
MOD_DEC_USE_COUNT;
return 0;
}
static int linear_map (int minor, struct md_dev *mddev, struct request *req)
{
struct linear_data *data=(struct linear_data *) mddev->private;
struct linear_hash *hash;
struct real_dev *tmp_dev;
long block, rblock;
struct buffer_head *bh, *bh2;
int queue, nblk;
static struct request pending[MAX_REAL]={{0, }, };
while (req->nr_sectors)
{
block=req->sector >> 1;
hash=data->hash_table+(block/data->smallest->size);
if (block >= (hash->dev0->size + hash->dev0->offset))
{
if (!hash->dev1)
printk ("linear_map : hash->dev1==NULL for block %ld\n", block);
tmp_dev=hash->dev1;
}
else
tmp_dev=hash->dev0;
if (block >= (tmp_dev->size + tmp_dev->offset) || block < tmp_dev->offset)
printk ("Block %ld out of bounds on dev %04x size %d offset %d\n", block, tmp_dev->dev, tmp_dev->size, tmp_dev->offset);
rblock=(block-(tmp_dev->offset));
if (req->sem) /* This is a paging request */
{
req->rq_dev=tmp_dev->dev;
req->sector=rblock << 1;
add_request (blk_dev+MAJOR (tmp_dev->dev), req);
return REDIRECTED_REQ;
}
queue=tmp_dev - devices[minor];
for (nblk=0, bh=bh2=req->bh;
bh && rblock + nblk + (bh->b_size >> 10) <= tmp_dev->size;
nblk+=bh->b_size >> 10, bh2=bh, bh=bh->b_reqnext)
{
if (!buffer_locked(bh))
printk("md%d: block %ld not locked\n", minor, bh->b_blocknr);
bh->b_rdev=tmp_dev->dev;
}
pending[queue].rq_dev=tmp_dev->dev;
pending[queue].cmd=req->cmd;
pending[queue].sector=rblock << 1;
pending[queue].nr_sectors=nblk << 1;
pending[queue].current_nr_sectors=req->bh->b_size >> 9;
pending[queue].bh=req->bh;
pending[queue].bhtail=bh2;
bh2->b_reqnext=NULL;
req->bh=bh;
req->sector+=nblk << 1;
req->nr_sectors-=nblk << 1;
}
req->rq_status=RQ_INACTIVE;
wake_up (&wait_for_request);
make_md_request (pending, mddev->nb_dev);
return REDIRECTED_REQ;
}
static int linear_status (char *page, int minor, struct md_dev *mddev)
{
int sz=0;
#undef MD_DEBUG
#ifdef MD_DEBUG
int j;
struct linear_data *data=(struct linear_data *) mddev->private;
sz+=sprintf (page+sz, " ");
for (j=0; j<data->nr_zones; j++)
{
sz+=sprintf (page+sz, "[%s",
partition_name (data->hash_table[j].dev0->dev));
if (data->hash_table[j].dev1)
sz+=sprintf (page+sz, "/%s] ",
partition_name(data->hash_table[j].dev1->dev));
else
sz+=sprintf (page+sz, "] ");
}
sz+=sprintf (page+sz, "\n");
#endif
return sz;
}
static struct md_personality linear_personality=
{
"linear",
linear_map,
linear_run,
linear_stop,
linear_status,
NULL, /* no ioctls */
0
};
#ifndef MODULE
void linear_init (void)
{
register_md_personality (LINEAR, &linear_personality);
}
#else
int init_module (void)
{
return (register_md_personality (LINEAR, &linear_personality));
}
void cleanup_module (void)
{
if (MOD_IN_USE)
printk ("md linear : module still busy...\n");
else
unregister_md_personality (LINEAR);
}
#endif
......@@ -24,12 +24,7 @@
/*
* The request-struct contains all necessary data
* to load a nr of sectors into memory
*
* NR_REQUEST is the number of entries in the request-queue.
* NOTE that writes may use only the low 2/3 of these: reads
* take precedence.
*/
#define NR_REQUEST 64
static struct request all_requests[NR_REQUEST];
/*
......@@ -232,11 +227,15 @@ static inline void drive_stat_acct(int cmd, unsigned long nr_sectors, short disk
* By this point, req->cmd is always either READ/WRITE, never READA/WRITEA,
* which is important for drive_stat_acct() above.
*/
static void add_request(struct blk_dev_struct * dev, struct request * req)
struct semaphore request_lock = MUTEX;
void add_request(struct blk_dev_struct * dev, struct request * req)
{
struct request * tmp;
short disk_index;
down (&request_lock);
switch (MAJOR(req->rq_dev)) {
case SCSI_DISK_MAJOR:
disk_index = (MINOR(req->rq_dev) & 0x0070) >> 4;
......@@ -257,10 +256,11 @@ static void add_request(struct blk_dev_struct * dev, struct request * req)
req->next = NULL;
cli();
if (req->bh)
if (req->bh && req->bh->b_dev==req->bh->b_rdev)
mark_buffer_clean(req->bh);
if (!(tmp = dev->current_request)) {
dev->current_request = req;
up (&request_lock);
(dev->request_fn)();
sti();
return;
......@@ -274,8 +274,9 @@ static void add_request(struct blk_dev_struct * dev, struct request * req)
req->next = tmp->next;
tmp->next = req;
up (&request_lock);
/* for SCSI devices, call request_fn unconditionally */
if (scsi_major(MAJOR(req->rq_dev)))
if (scsi_major(MAJOR(req->rq_dev)) && MAJOR(req->rq_dev)!=MD_MAJOR)
(dev->request_fn)();
sti();
......@@ -338,6 +339,7 @@ static void make_request(int major,int rw, struct buffer_head * bh)
/* look for a free request. */
cli();
down (&request_lock);
/* The scsi disk and cdrom drivers completely remove the request
* from the queue when they start processing an entry. For this reason
......@@ -345,6 +347,7 @@ static void make_request(int major,int rw, struct buffer_head * bh)
*/
if (( major == IDE0_MAJOR /* same as HD_MAJOR */
|| major == IDE1_MAJOR
|| major == MD_MAJOR
|| major == FLOPPY_MAJOR
|| major == SCSI_DISK_MAJOR
|| major == SCSI_CDROM_MAJOR
......@@ -354,6 +357,7 @@ static void make_request(int major,int rw, struct buffer_head * bh)
{
if (major != SCSI_DISK_MAJOR && major != SCSI_CDROM_MAJOR)
req = req->next;
while (req) {
if (req->rq_dev == bh->b_dev &&
!req->sem &&
......@@ -365,6 +369,7 @@ static void make_request(int major,int rw, struct buffer_head * bh)
req->bhtail = bh;
req->nr_sectors += count;
mark_buffer_clean(bh);
up (&request_lock);
sti();
return;
}
......@@ -382,6 +387,7 @@ static void make_request(int major,int rw, struct buffer_head * bh)
req->sector = sector;
mark_buffer_clean(bh);
req->bh = bh;
up (&request_lock);
sti();
return;
}
......@@ -390,6 +396,8 @@ static void make_request(int major,int rw, struct buffer_head * bh)
}
}
up (&request_lock);
/* find an unused request. */
req = get_request(max_req, bh->b_dev);
sti();
......@@ -417,6 +425,15 @@ static void make_request(int major,int rw, struct buffer_head * bh)
add_request(major+blk_dev,req);
}
#ifdef CONFIG_BLK_DEV_MD
struct request *get_md_request (int max_req, kdev_t dev)
{
return (get_request_wait (max_req, dev));
}
#endif
/*
* Swap partitions are now read via brw_page. ll_rw_page is an
* asynchronous function now --- we must call wait_on_page afterwards
......@@ -515,6 +532,10 @@ void ll_rw_block(int rw, int nr, struct buffer_head * bh[])
for (i = 0; i < nr; i++) {
if (bh[i]) {
set_bit(BH_Req, &bh[i]->b_state);
/* Md needs this for error recovery */
bh[i]->b_rdev = bh[i]->b_dev;
make_request(major, rw, bh[i]);
}
}
......@@ -658,5 +679,8 @@ int blk_dev_init(void)
#ifdef CONFIG_SJCD
sjcd_init();
#endif CONFIG_SJCD
#ifdef CONFIG_BLK_DEV_MD
md_init();
#endif CONFIG_BLK_DEV_MD
return 0;
}
......@@ -29,7 +29,7 @@
#include "des.h"
#endif
#define DEFAULT_MAJOR_NR 28
#define DEFAULT_MAJOR_NR 10
int loop_major = DEFAULT_MAJOR_NR;
#define MAJOR_NR loop_major /* not necessarily constant */
......@@ -225,15 +225,8 @@ static void do_lo_request(void)
brelse(bh);
goto error_out;
}
if (CURRENT->cmd == WRITE) {
set_bit(BH_Dirty, &bh->b_state);
ll_rw_block(WRITE, 1, &bh);
wait_on_buffer(bh);
if (buffer_dirty(bh)) {
brelse(bh);
goto error_out;
}
}
if (CURRENT->cmd == WRITE)
mark_buffer_dirty(bh, 1);
brelse(bh);
dest_addr += size;
len -= size;
......@@ -280,7 +273,7 @@ static int loop_clr_fd(struct loop_device *lo, kdev_t dev)
return -ENXIO;
if (lo->lo_refcnt > 1)
return -EBUSY;
lo->lo_inode->i_count--;
iput(lo->lo_inode);
lo->lo_device = 0;
lo->lo_inode = NULL;
lo->lo_encrypt_type = 0;
......@@ -288,6 +281,7 @@ static int loop_clr_fd(struct loop_device *lo, kdev_t dev)
lo->lo_encrypt_key_size = 0;
memset(lo->lo_encrypt_key, 0, LO_KEY_SIZE);
memset(lo->lo_name, 0, LO_NAME_SIZE);
loop_sizes[lo->lo_number] = 0;
invalidate_buffers(dev);
return 0;
}
......
......@@ -62,7 +62,7 @@ struct loop_info {
#define LO_CRYPT_NONE 0
#define LO_CRYPT_XOR 1
#define LO_CRYPT_DES 2
#define LO_CRYPT_IDEA 5
#define LO_CRYPT_IDEA 3
#define MAX_LO_CRYPT 4
/*
......
This diff is collapsed.
/*
raid0.c : Multiple Devices driver for Linux
Copyright (C) 1994-96 Marc ZYNGIER
<zyngier@ufr-info-p7.ibp.fr> or
<maz@gloups.fdn.fr>
RAID-0 management functions.
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.
You should have received a copy of the GNU General Public License
(for example /usr/src/linux/COPYING); if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/md.h>
#include <linux/raid0.h>
#include <linux/malloc.h>
#define MAJOR_NR MD_MAJOR
#define MD_DRIVER
#define MD_PERSONALITY
#include <linux/blk.h>
static void create_strip_zones (int minor, struct md_dev *mddev)
{
int i, j, c=0;
int current_offset=0;
struct real_dev *smallest_by_zone;
struct raid0_data *data=(struct raid0_data *) mddev->private;
data->nr_strip_zones=1;
for (i=1; i<mddev->nb_dev; i++)
{
for (j=0; j<i; j++)
if (devices[minor][i].size==devices[minor][j].size)
{
c=1;
break;
}
if (!c)
data->nr_strip_zones++;
c=0;
}
data->strip_zone=kmalloc (sizeof(struct strip_zone)*data->nr_strip_zones,
GFP_KERNEL);
data->smallest=NULL;
for (i=0; i<data->nr_strip_zones; i++)
{
data->strip_zone[i].dev_offset=current_offset;
smallest_by_zone=NULL;
c=0;
for (j=0; j<mddev->nb_dev; j++)
if (devices[minor][j].size>current_offset)
{
data->strip_zone[i].dev[c++]=devices[minor]+j;
if (!smallest_by_zone ||
smallest_by_zone->size > devices[minor][j].size)
smallest_by_zone=devices[minor]+j;
}
data->strip_zone[i].nb_dev=c;
data->strip_zone[i].size=(smallest_by_zone->size-current_offset)*c;
if (!data->smallest ||
data->smallest->size > data->strip_zone[i].size)
data->smallest=data->strip_zone+i;
data->strip_zone[i].zone_offset=i ? (data->strip_zone[i-1].zone_offset+
data->strip_zone[i-1].size) : 0;
current_offset=smallest_by_zone->size;
}
}
static int raid0_run (int minor, struct md_dev *mddev)
{
int cur=0, i=0, size, zone0_size, nb_zone, min;
struct raid0_data *data;
min=1 << FACTOR_SHIFT(FACTOR(mddev));
for (i=0; i<mddev->nb_dev; i++)
if (devices[minor][i].size<min)
{
printk ("Cannot use %dk chunks on dev %s\n", min,
partition_name (devices[minor][i].dev));
return -EINVAL;
}
MOD_INC_USE_COUNT;
/* Resize devices according to the factor */
md_size[minor]=0;
for (i=0; i<mddev->nb_dev; i++)
{
devices[minor][i].size &= ~((1 << FACTOR_SHIFT(FACTOR(mddev))) - 1);
md_size[minor] += devices[minor][i].size;
}
mddev->private=kmalloc (sizeof (struct raid0_data), GFP_KERNEL);
data=(struct raid0_data *) mddev->private;
create_strip_zones (minor, mddev);
nb_zone=data->nr_zones=
md_size[minor]/data->smallest->size +
(md_size[minor]%data->smallest->size ? 1 : 0);
data->hash_table=kmalloc (sizeof (struct raid0_hash)*nb_zone, GFP_KERNEL);
size=data->strip_zone[cur].size;
i=0;
while (cur<data->nr_strip_zones)
{
data->hash_table[i].zone0=data->strip_zone+cur;
if (size>=data->smallest->size)/* If we completly fill the slot */
{
data->hash_table[i++].zone1=NULL;
size-=data->smallest->size;
if (!size)
{
if (++cur==data->nr_strip_zones) continue;
size=data->strip_zone[cur].size;
}
continue;
}
if (++cur==data->nr_strip_zones) /* Last dev, set unit1 as NULL */
{
data->hash_table[i].zone1=NULL;
continue;
}
zone0_size=size; /* Here, we use a 2nd dev to fill the slot */
size=data->strip_zone[cur].size;
data->hash_table[i++].zone1=data->strip_zone+cur;
size-=(data->smallest->size - zone0_size);
}
return (0);
}
static int raid0_stop (int minor, struct md_dev *mddev)
{
struct raid0_data *data=(struct raid0_data *) mddev->private;
kfree (data->hash_table);
kfree (data->strip_zone);
kfree (data);
MOD_DEC_USE_COUNT;
return 0;
}
/*
* FIXME - We assume some things here :
* - requested buffers NEVER bigger than chunk size,
* - requested buffers NEVER cross stripes limits.
* Of course, those facts may not be valid anymore (and surely won't...)
* Hey guys, there's some work out there ;-)
*/
static int raid0_map (int minor, struct md_dev *mddev, struct request *req)
{
struct raid0_data *data=(struct raid0_data *) mddev->private;
static struct raid0_hash *hash;
struct strip_zone *zone;
struct real_dev *tmp_dev;
int i, queue, blk_in_chunk, factor, chunk;
long block, rblock;
struct buffer_head *bh;
static struct request pending[MAX_REAL]={{0, }, };
factor=FACTOR(mddev);
while (req->bh || req->sem)
{
block=req->sector >> 1;
hash=data->hash_table+(block/data->smallest->size);
if (block >= (hash->zone0->size +
hash->zone0->zone_offset))
{
if (!hash->zone1)
printk ("raid0_map : hash->zone1==NULL for block %ld\n", block);
zone=hash->zone1;
}
else
zone=hash->zone0;
blk_in_chunk=block & ((1UL << FACTOR_SHIFT(factor)) - 1);
chunk=(block - zone->zone_offset) / (zone->nb_dev<<FACTOR_SHIFT(factor));
tmp_dev=zone->dev[(block >> FACTOR_SHIFT(factor)) % zone->nb_dev];
rblock=(chunk << FACTOR_SHIFT(factor)) + blk_in_chunk + zone->dev_offset;
if (req->sem) /* This is a paging request */
{
req->rq_dev=tmp_dev->dev;
req->sector=rblock << 1;
add_request (blk_dev+MAJOR (tmp_dev->dev), req);
return REDIRECTED_REQ;
}
queue=tmp_dev - devices[minor];
/* This is a buffer request */
for (i=blk_in_chunk;
i<(1UL << FACTOR_SHIFT(factor)) && req->bh;
i+=bh->b_size >> 10)
{
bh=req->bh;
if (!buffer_locked(bh))
printk("md%d: block %ld not locked\n", minor, bh->b_blocknr);
bh->b_rdev=tmp_dev->dev;
#if defined (CONFIG_MD_SUPPORT_RAID1)
bh->b_reqshared=NULL;
bh->b_sister_req=NULL;
#endif
if (!pending[queue].bh)
{
pending[queue].rq_dev=tmp_dev->dev;
pending[queue].bhtail=pending[queue].bh=bh;
pending[queue].sector=rblock << 1;
pending[queue].cmd=req->cmd;
pending[queue].current_nr_sectors=
pending[queue].nr_sectors=bh->b_size >> 9;
}
else
{
pending[queue].bhtail->b_reqnext=bh;
pending[queue].bhtail=bh;
pending[queue].nr_sectors+=bh->b_size >> 9;
}
end_redirect (req); /* Separate bh from the request */
}
}
req->rq_status=RQ_INACTIVE;
wake_up (&wait_for_request);
make_md_request (pending, mddev->nb_dev);
return REDIRECTED_REQ; /* Since we already set the request free */
}
static int raid0_status (char *page, int minor, struct md_dev *mddev)
{
int sz=0;
#undef MD_DEBUG
#ifdef MD_DEBUG
int j, k;
struct raid0_data *data=(struct raid0_data *) mddev->private;
sz+=sprintf (page+sz, " ");
for (j=0; j<data->nr_zones; j++)
{
sz+=sprintf (page+sz, "[z%d",
data->hash_table[j].zone0-data->strip_zone);
if (data->hash_table[j].zone1)
sz+=sprintf (page+sz, "/z%d] ",
data->hash_table[j].zone1-data->strip_zone);
else
sz+=sprintf (page+sz, "] ");
}
sz+=sprintf (page+sz, "\n");
for (j=0; j<data->nr_strip_zones; j++)
{
sz+=sprintf (page+sz, " z%d=[", j);
for (k=0; k<data->strip_zone[j].nb_dev; k++)
sz+=sprintf (page+sz, "%s/",
partition_name(data->strip_zone[j].dev[k]->dev));
sz--;
sz+=sprintf (page+sz, "] zo=%d do=%d s=%d\n",
data->strip_zone[j].zone_offset,
data->strip_zone[j].dev_offset,
data->strip_zone[j].size);
}
#endif
return sz;
}
static struct md_personality raid0_personality=
{
"raid0",
raid0_map,
raid0_run,
raid0_stop,
raid0_status,
NULL, /* no ioctls */
0
};
#ifndef MODULE
void raid0_init (void)
{
register_md_personality (RAID0, &raid0_personality);
}
#else
int init_module (void)
{
return (register_md_personality (RAID0, &raid0_personality));
}
void cleanup_module (void)
{
if (MOD_IN_USE)
printk ("md raid0 : module still busy...\n");
else
unregister_md_personality (RAID0);
}
#endif
This diff is collapsed.
......@@ -4,6 +4,7 @@
mainmenu_option next_comment
comment 'Character devices'
bool 'Standard/generic serial support' CONFIG_SERIAL
tristate 'Cyclades async mux support' CONFIG_CYCLADES
bool 'Stallion multiport serial support' CONFIG_STALDRV
if [ "$CONFIG_STALDRV" = "y" ]; then
......
......@@ -16,10 +16,14 @@ FONTMAPFILE = cp437.uni
L_TARGET := char.a
M_OBJS :=
L_OBJS := tty_io.o n_tty.o console.o keyboard.o serial.o \
L_OBJS := tty_io.o n_tty.o console.o keyboard.o \
tty_ioctl.o pty.o vt.o mem.o vc_screen.o random.o \
defkeymap.o consolemap.o selection.o
ifeq ($(CONFIG_SERIAL),y)
L_OBJS += serial.o
endif
ifeq ($(CONFIG_CYCLADES),y)
L_OBJS += cyclades.o
else
......
......@@ -25,6 +25,9 @@
#ifdef CONFIG_SOUND
void soundcard_init(void);
#endif
#ifdef CONFIG_ISDN
void isdn_init(void);
#endif
static int read_ram(struct inode * inode, struct file * file, char * buf, int count)
{
......@@ -393,6 +396,9 @@ int chr_dev_init(void)
#endif
#if CONFIG_QIC02_TAPE
qic02_tape_init();
#endif
#if CONFIG_ISDN
isdn_init();
#endif
return 0;
}
......@@ -1823,7 +1823,9 @@ int tty_init(void)
if (sizeof(struct tty_struct) > PAGE_SIZE)
panic("size of tty structure > PAGE_SIZE!");
kbd_init();
#ifdef CONFIG_SERIAL
rs_init();
#endif
#ifdef CONFIG_SCC
scc_init();
#endif
......
#
# ISDN device configuration
#
if [ "$CONFIG_INET" != "n" ]; then
bool 'Support synchronous PPP' CONFIG_ISDN_PPP
if [ "$CONFIG_ISDN_PPP" != "n" ]; then
bool 'Use VJ-compression with synchronous PPP' CONFIG_ISDN_PPP_VJ
bool 'Support generic MP (RFC 1717)' CONFIG_ISDN_MPP
fi
fi
dep_tristate 'Teles/NICCY1016PC/Creatix support' CONFIG_ISDN_DRV_TELES $CONFIG_ISDN
dep_tristate 'ICN B1 and B2 support' CONFIG_ISDN_DRV_ICN $CONFIG_ISDN
SUB_DIRS :=
MOD_SUB_DIRS :=
ALL_SUB_DIRS := icn teles
L_OBJS :=
LX_OBJS :=
M_OBJS :=
MX_OBJS :=
O_OBJS :=
OX_OBJS :=
L_TARGET :=
O_TARGET :=
ifeq ($(CONFIG_ISDN),y)
L_TARGET := isdn.a
L_OBJS += isdn_net.o isdn_tty.o isdn_cards.o
LX_OBJS += isdn_common.o
ifdef CONFIG_ISDN_PPP
L_OBJS += isdn_ppp.o
endif
else
ifeq ($(CONFIG_ISDN),m)
M_OBJS += isdn.o
O_TARGET += isdn.o
O_OBJS += isdn_net.o isdn_tty.o
OX_OBJS += isdn_common.o
ifdef CONFIG_ISDN_PPP
O_OBJS += isdn_ppp.o
endif
endif
endif
ifeq ($(CONFIG_ISDN_DRV_TELES),y)
L_OBJS += teles/teles.o
SUB_DIRS += teles
MOD_SUB_DIRS += teles
else
ifeq ($(CONFIG_ISDN_DRV_TELES),m)
MOD_SUB_DIRS += teles
endif
endif
ifeq ($(CONFIG_ISDN_DRV_ICN),y)
L_OBJS += icn/icn.o
SUB_DIRS += icn
MOD_SUB_DIRS += icn
else
ifeq ($(CONFIG_ISDN_DRV_ICN),m)
MOD_SUB_DIRS += icn
endif
endif
include $(TOPDIR)/Rules.make
L_OBJS :=
M_OBJS :=
ifeq ($(CONFIG_ISDN_DRV_ICN),y)
L_OBJS += icn.o
else
M_OBJS += icn.o
endif
include $(TOPDIR)/Rules.make
This diff is collapsed.
This diff is collapsed.
#include <linux/config.h>
#ifdef CONFIG_ISDN_DRV_ICN
extern void icn_init(void);
#endif
#ifdef CONFIG_ISDN_DRV_TELES
extern void teles_init(void);
#endif
void isdn_cards_init(void)
{
#if CONFIG_ISDN_DRV_ICN
icn_init();
#endif
#if CONFIG_ISDN_DRV_TELES
teles_init();
#endif
}
extern void isdn_cards_init(void);
This diff is collapsed.
/* $Id: isdn_common.h,v 1.1 1996/01/10 21:37:19 fritz Exp fritz $
*
* header for Linux ISDN subsystem, common used funtions and debugging-switches (linklevel).
*
* Copyright 1994,95,96 by Fritz Elfert (fritz@wuemaus.franken.de)
* Copyright 1995,96 by Thinking Objects Software GmbH Wuerzburg
* Copyright 1995,96 by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
*
* 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.
*
* $Log: isdn_common.h,v $
* Revision 1.1 1996/01/10 21:37:19 fritz
* Initial revision
*
*/
#undef ISDN_DEBUG_MODEM_OPEN
#undef ISDN_DEBUG_MODEM_IOCTL
#undef ISDN_DEBUG_MODEM_WAITSENT
#undef ISDN_DEBUG_MODEM_HUP
#undef ISDN_DEBUG_MODEM_ICALL
#undef ISDN_DEBUG_MODEM_DUMP
#undef ISDN_DEBUG_AT
#undef ISDN_DEBUG_NET_DUMP
#undef ISDN_DEBUG_NET_DIAL
#undef ISDN_DEBUG_NET_BUILDHDR
#undef ISDN_DEBUG_NET_ICALL
/* Prototypes */
extern void isdn_MOD_INC_USE_COUNT(void);
extern void isdn_MOD_DEC_USE_COUNT(void);
extern void isdn_free_channel(int di, int ch, int usage);
extern void isdn_all_eaz(int di, int ch);
extern int isdn_dc2minor(int di, int ch);
extern void isdn_info_update(void);
extern char* isdn_map_eaz2msn(char *msn, int di);
extern void isdn_timer_ctrl(int tf, int onoff);
extern void isdn_unexclusive_channel(int di, int ch);
extern int isdn_getnum(char **);
extern int isdn_readbchan (int di, int channel, u_char *buf,
u_char *fp, int len, int user);
extern int isdn_get_free_channel(int usage, int l2_proto, int l3_proto,
int pre_dev, int pre_chan);
#if defined(ISDN_DEBUG_NET_DUMP) || defined(ISDN_DEBUG_MODEM_DUMP)
extern void isdn_dumppkt(char *, u_char *, int, int);
#endif
This diff is collapsed.
/* $Id: isdn_net.h,v 1.1 1996/02/11 02:35:13 fritz Exp fritz $
*
* header for Linux ISDN subsystem, network releted funtions (linklevel).
*
* Copyright 1994,95,96 by Fritz Elfert (fritz@wuemaus.franken.de)
* Copyright 1995,96 by Thinking Objects Software GmbH Wuerzburg
* Copyright 1995,96 by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
*
* 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.
*
* $Log: isdn_net.h,v $
* Revision 1.1 1996/02/11 02:35:13 fritz
* Initial revision
*
*/
extern char* isdn_net_new(char *, struct device *);
extern char* isdn_net_newslave(char *);
extern int isdn_net_rm(char *);
extern int isdn_net_rmall(void);
extern int isdn_net_stat_callback(int, int);
extern int isdn_net_receive_callback(int, u_char *, int);
extern int isdn_net_setcfg(isdn_net_ioctl_cfg *);
extern int isdn_net_getcfg(isdn_net_ioctl_cfg *);
extern int isdn_net_addphone(isdn_net_ioctl_phone *);
extern int isdn_net_getphones(isdn_net_ioctl_phone *, char *);
extern int isdn_net_delphone(isdn_net_ioctl_phone *);
extern int isdn_net_find_icall(int, int, int, char *);
extern void isdn_net_hangup(struct device *);
extern void isdn_net_dial(void);
extern void isdn_net_autohup(void);
extern int isdn_net_force_hangup(char *);
extern int isdn_net_force_dial(char *);
extern isdn_net_dev* isdn_net_findif(char *);
extern int isdn_net_send_skb(struct device *, isdn_net_local *,
struct sk_buff *);
extern int isdn_net_rcv_skb(int, struct sk_buff *);
This diff is collapsed.
/* $Id: isdn_ppp.h,v 1.1 1996/01/10 21:39:10 fritz Exp fritz $
*
* header for Linux ISDN subsystem, functions for synchronous PPP (linklevel).
*
* Copyright 1995,96 by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
*
* 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.
*
* $Log: isdn_ppp.h,v $
* Revision 1.1 1996/01/10 21:39:10 fritz
* Initial revision
*
*/
extern void isdn_ppp_timer_timeout(void);
extern int isdn_ppp_read(int , struct file *, char *, int);
extern int isdn_ppp_write(int , struct file *, const char *, int);
extern int isdn_ppp_open(int , struct file *);
extern int isdn_ppp_init(void);
extern void isdn_ppp_cleanup(void);
extern int isdn_ppp_free(isdn_net_local *);
extern int isdn_ppp_bind(isdn_net_local *);
extern int isdn_ppp_xmit(struct sk_buff *, struct device *);
extern void isdn_ppp_receive(isdn_net_dev *, isdn_net_local *, struct sk_buff *);
extern int isdn_ppp_dev_ioctl(struct device *, struct ifreq *, int);
extern void isdn_ppp_free_mpqueue(isdn_net_dev *);
extern int isdn_ppp_select(int, struct file *, int, select_table *);
extern int isdn_ppp_ioctl(int, struct file *, unsigned int, unsigned long);
extern void isdn_ppp_release(int, struct file *);
extern int isdn_ppp_dial_slave(char *);
extern struct ippp_struct *ippp_table;
This diff is collapsed.
/* $Id: isdn_tty.h,v 1.1 1996/01/10 21:39:22 fritz Exp fritz $
*
* header for Linux ISDN subsystem, tty related functions (linklevel).
*
* Copyright 1994,95,96 by Fritz Elfert (fritz@wuemaus.franken.de)
* Copyright 1995,96 by Thinking Objects Software GmbH Wuerzburg
*
* 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.
*
* $Log: isdn_tty.h,v $
* Revision 1.1 1996/01/10 21:39:22 fritz
* Initial revision
*
*/
extern void isdn_tty_modem_result(int, modem_info *);
extern void isdn_tty_modem_escape(void);
extern void isdn_tty_modem_ring(void);
extern void isdn_tty_modem_xmit(void);
extern void isdn_tty_modem_hup(modem_info *);
extern int isdn_tty_modem_init(void);
extern void isdn_tty_readmodem(void);
extern int isdn_tty_try_read(int, u_char *, int);
extern int isdn_tty_find_icall(int, int, char *);
#if FUTURE
extern void isdn_tty_bsent(int, int);
#endif
L_OBJS :=
M_OBJS :=
O_OBJS := mod.o card.o config.o buffers.o tei.o isdnl2.o isdnl3.o \
llglue.o q931.o callc.o fsm.o
O_TARGET :=
ifeq ($(CONFIG_ISDN_DRV_TELES),y)
O_TARGET += teles.o
else
ifeq ($(CONFIG_ISDN_DRV_TELES),m)
O_TARGET += teles.o
M_OBJS += teles.o
endif
endif
include $(TOPDIR)/Rules.make
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#define __NO_VERSION__
#include <linux/types.h>
#include <linux/stddef.h>
#include <linux/timer.h>
#include "teles.h"
/*
* This structure array contains one entry per card. An entry looks
* like this:
*
* { membase,irq,portbase,protocol,NULL }
*
* protocol can be either ISDN_PTYPE_EURO or ISDN_PTYPE_1TR6
*
* Cards which don't have an io port (Teles 8 bit cards for
* example) can be entered with io port 0x0
*
* For the Teles 16.3, membase has to be set to 0.
*
*/
struct IsdnCard cards[] =
{
{(byte *) 0xd0000, 15, 0xd80, ISDN_PTYPE_EURO, NULL}, /* example */
{NULL, 0, 0, 0, NULL},
{NULL, 0, 0, 0, NULL},
{NULL, 0, 0, 0, NULL},
{NULL, 0, 0, 0, NULL},
{NULL, 0, 0, 0, NULL},
{NULL, 0, 0, 0, NULL},
{NULL, 0, 0, 0, NULL},
{NULL, 0, 0, 0, NULL},
{NULL, 0, 0, 0, NULL},
{NULL, 0, 0, 0, NULL},
{NULL, 0, 0, 0, NULL},
{NULL, 0, 0, 0, NULL},
{NULL, 0, 0, 0, NULL},
{NULL, 0, 0, 0, NULL},
{NULL, 0, 0, 0, NULL},
};
#define __NO_VERSION__
#include "teles.h"
void
FsmNew(struct Fsm *fsm,
struct FsmNode *fnlist, int fncount)
{
int i;
fsm->jumpmatrix = (int *) Smalloc(4L * fsm->state_count * fsm->event_count,
GFP_KERNEL, "Fsm jumpmatrix");
memset(fsm->jumpmatrix, 0, 4L * fsm->state_count * fsm->event_count);
for (i = 0; i < fncount; i++)
fsm->jumpmatrix[fsm->state_count * fnlist[i].event +
fnlist[i].state] = (int) fnlist[i].routine;
}
void
FsmFree(struct Fsm *fsm)
{
Sfree((void *) fsm->jumpmatrix);
}
int
FsmEvent(struct FsmInst *fi, int event, void *arg)
{
void (*r) (struct FsmInst *, int, void *);
char str[80];
r = (void (*)) fi->fsm->jumpmatrix[fi->fsm->state_count * event + fi->state];
if (r) {
if (fi->debug) {
sprintf(str, "State %s Event %s",
fi->fsm->strState[fi->state],
fi->fsm->strEvent[event]);
fi->printdebug(fi, str);
}
r(fi, event, arg);
return (0);
} else {
if (fi->debug) {
sprintf(str, "State %s Event %s no routine",
fi->fsm->strState[fi->state],
fi->fsm->strEvent[event]);
fi->printdebug(fi, str);
}
return (!0);
}
}
void
FsmChangeState(struct FsmInst *fi, int newstate)
{
char str[80];
fi->state = newstate;
if (fi->debug) {
sprintf(str, "ChangeState %s",
fi->fsm->strState[newstate]);
fi->printdebug(fi, str);
}
}
static void
FsmExpireTimer(struct FsmTimer *ft)
{
FsmEvent(ft->fi, ft->event, ft->arg);
}
void
FsmInitTimer(struct FsmInst *fi, struct FsmTimer *ft)
{
ft->fi = fi;
ft->tl.function = (void *) FsmExpireTimer;
ft->tl.data = (long) ft;
init_timer(&ft->tl);
}
void
FsmDelTimer(struct FsmTimer *ft, int where)
{
long flags;
#if 0
if (ft->fi->debug) {
sprintf(str, "FsmDelTimer %lx %d", ft, where);
ft->fi->printdebug(ft->fi, str);
}
#endif
save_flags(flags);
cli();
if (ft->tl.next)
del_timer(&ft->tl);
restore_flags(flags);
}
int
FsmAddTimer(struct FsmTimer *ft,
int millisec, int event, void *arg, int where)
{
#if 0
if (ft->fi->debug) {
sprintf(str, "FsmAddTimer %lx %d %d", ft, millisec, where);
ft->fi->printdebug(ft->fi, str);
}
#endif
if (ft->tl.next) {
printk(KERN_WARNING "FsmAddTimer: timer already active!\n");
return -1;
}
init_timer(&ft->tl);
ft->event = event;
ft->arg = arg;
ft->tl.expires = jiffies + (millisec * HZ) / 1000;
add_timer(&ft->tl);
return 0;
}
int
FsmTimerRunning(struct FsmTimer *ft)
{
return (ft->tl.next != NULL);
}
void
jiftime(char *s, long mark)
{
s += 8;
*s-- = '\0';
*s-- = mark % 10 + '0';
mark /= 10;
*s-- = mark % 10 + '0';
mark /= 10;
*s-- = '.';
*s-- = mark % 10 + '0';
mark /= 10;
*s-- = mark % 6 + '0';
mark /= 6;
*s-- = ':';
*s-- = mark % 10 + '0';
mark /= 10;
*s-- = mark % 10 + '0';
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#define __NO_VERSION__
#include "teles.h"
#include <linux/malloc.h>
#include <linux/timer.h>
extern struct Channel *chanlist;
int drid;
char *teles_id = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
isdn_if iif;
#define TELES_STATUS_BUFSIZE 4096
static byte *teles_status_buf = NULL;
static byte *teles_status_read = NULL;
static byte *teles_status_write = NULL;
static byte *teles_status_end = NULL;
int
teles_readstatus(byte * buf, int len, int user)
{
int count;
byte *p;
for (p = buf, count = 0; count < len; p++, count++) {
if (user)
put_fs_byte(*teles_status_read++, p);
else
*p++ = *teles_status_read++;
if (teles_status_read > teles_status_end)
teles_status_read = teles_status_buf;
}
return count;
}
void
teles_putstatus(char *buf)
{
long flags;
int len, count, i;
byte *p;
isdn_ctrl ic;
save_flags(flags);
cli();
count = 0;
len = strlen(buf);
for (p = buf, i = len; i > 0; i--, p++) {
*teles_status_write++ = *p;
if (teles_status_write > teles_status_end)
teles_status_write = teles_status_buf;
count++;
}
restore_flags(flags);
if (count) {
ic.command = ISDN_STAT_STAVAIL;
ic.driver = drid;
ic.arg = count;
iif.statcallb(&ic);
}
}
int
ll_init(void)
{
isdn_ctrl ic;
teles_status_buf = Smalloc(TELES_STATUS_BUFSIZE,
GFP_KERNEL, "teles_status_buf");
if (!teles_status_buf) {
printk(KERN_ERR "teles: Could not allocate status-buffer\n");
return (-EIO);
} else {
teles_status_read = teles_status_buf;
teles_status_write = teles_status_buf;
teles_status_end = teles_status_buf + TELES_STATUS_BUFSIZE - 1;
}
iif.channels = CallcNewChan();
iif.maxbufsize = BUFFER_SIZE(HSCX_SBUF_ORDER, HSCX_SBUF_BPPS);
iif.features =
ISDN_FEATURE_L2_X75I |
ISDN_FEATURE_L2_HDLC |
ISDN_FEATURE_L3_TRANS |
ISDN_FEATURE_P_1TR6 |
ISDN_FEATURE_P_EURO;
iif.command = teles_command;
iif.writebuf = teles_writebuf;
iif.writecmd = NULL;
iif.readstat = teles_readstatus;
strncpy(iif.id, teles_id, sizeof(iif.id) - 1);
register_isdn(&iif);
drid = iif.channels;
ic.driver = drid;
ic.command = ISDN_STAT_RUN;
iif.statcallb(&ic);
return 0;
}
void
ll_stop(void)
{
isdn_ctrl ic;
ic.command = ISDN_STAT_STOP;
ic.driver = drid;
iif.statcallb(&ic);
CallcFreeChan();
}
void
ll_unload(void)
{
isdn_ctrl ic;
ic.command = ISDN_STAT_UNLOAD;
ic.driver = drid;
iif.statcallb(&ic);
}
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