Commit 62e3b9df authored by Linus Torvalds's avatar Linus Torvalds

Import 2.1.72

parent 56dafec3
......@@ -1342,6 +1342,14 @@ E: dl1bke@db0pra.ampr.org
D: Generic Z8530 driver, AX.25 DAMA slave implementation
D: Several AX.25 hacks
N: Francois-Rene Rideau
E: rideau@ens.fr
W: http://www.eleves.ens.fr:8080/home/rideau/
D: petty kernel janitor (byteorder, ufs)
S: 6, rue Augustin Thierry
S: 75019 Paris
S: France
N: William E. Roadcap
E: roadcapw@cfw.com
W: http://www.cfw.com/~roadcapw
......
......@@ -1494,9 +1494,9 @@ CONFIG_SKB_LARGE
a second or satellite links this option will make no difference to
performance.
BSD Unix domain sockets
Unix domain sockets
CONFIG_UNIX
Y if you want BSD Unix domain sockets. Unless you are working on an
Y if you want Unix domain sockets. Unless you are working on an
embedded system or somthing, you probably want to say Y. If you try
building this as a module and you are running kerneld, you need to make
sure and add 'alias net-pf-1 unix' to your /etc/conf.module file.
......@@ -2795,6 +2795,28 @@ CONFIG_SCC
running kernel whenever you want), say M here and read
Documentation/modules.txt. The module will be called scc.o.
High-speed (DMA) SCC driver for AX.25
CONFIG_DMASCC
This is a driver for high-speed SCC boards, i.e. those supporting
DMA on one port. Currently, only Ottawa PI/PI2 boards (see
http://hydra.carleton.ca/info/pi2.html) and Gracilis PackeTwin
boards (see http://www.paccomm.com/) are supported and detected
automatically. Multiple boards are operated simultaneously. If
you compile this driver as a module, it will be called dmascc.o.
If you don't give any parameter to the driver, all possible I/O
addresses are probed. This could irritate other devices that are
currently not in use. You may specify the list of addresses to be
probed by "dmascc=addr1,addr2,..." (when compiled into the kernel
image) or "io=addr1,addr2,..." (when loaded as a module).
The network interfaces will be called dmascc0 and dmascc1 for the
board detected first, dmascc2 and dmascc3 for the second one, and
so on. Before you configure each interface with ifconfig, you MUST
set certain parameters, such as channel access timing, clock mode,
and DMA channel. This is accomplished with a small utility program
called dmascc_cfg, which is part of the ax25-utils package.
Alternatively, you may download the utility from
http://www.oevsv.at/~oe1kib/Linux.html.
BAYCOM picpar and par96 driver for AX.25
CONFIG_BAYCOM_PAR
This is a driver for Baycom style simple amateur radio
......@@ -3583,36 +3605,6 @@ CONFIG_NI65
read the Multiple-Ethernet-mini-HOWTO, available from
sunsite.unc.edu:/pub/Linux/docs/HOWTO/mini.
Ottawa PI and PI/2 support
CONFIG_PI
This is a driver for the Ottawa Amateur Radio Club PI and PI2 cards,
which are commonly used to send internet traffic over amateur radio.
More information about these cards is on the WWW at
http://hydra.carleton.ca/info/pi2.html (To browse the WWW, you need
to have access to a machine on the Internet that has a program like
lynx or netscape). If you have one of these cards, you can say Y
here and should read the HAM-HOWTO, available via ftp (user:
anonymous) in sunsite.unc.edu:/pub/Linux/docs/HOWTO. Also, you
should have said Y to "AX.25 support" above, because AX.25 is the
protocol used for digital traffic over radio links. 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. The module will be called pi2.o.
Gracilis PackeTwin support
CONFIG_PT
This is a card used mainly by amateur radio operators for packet
radio. You should have already said Y to "AX.25 support" as this
card uses that protocol. More information about this driver can be
found in the file drivers/net/README.pt. NOTE: The card is capable
of DMA and full duplex but neither of these have been coded in the
driver as yet. 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. The module will be called
pt.o.
AT&T WaveLAN & DEC RoamAbout DS support
CONFIG_WAVELAN
The Lucent Wavelan (formerly NCR and AT&T ; or DEC RoamAbout DS) is
......
......@@ -4,7 +4,7 @@
% pages to print... :-) If you're actually putting this in print, you
% may wish to change these.
%
% $Id: devices.tex,v 1.28 1997/11/12 23:59:41 davem Exp $
% $Id: devices.tex,v 1.4 1997/12/05 01:34:21 hpa Exp $
%
\oddsidemargin=0in
\textwidth=6.5in
......@@ -50,7 +50,7 @@ foo \kill}%
%
\title{{\bf Linux Allocated Devices}}
\author{Maintained by H. Peter Anvin $<$hpa@zytor.com$>$}
\date{Last revised: November 9, 1997}
\date{Last revised: December 4, 1997}
\maketitle
%
\noindent
......@@ -193,8 +193,11 @@ Your cooperation is appreciated.
\major{44}{}{char }{isdn4linux virtual modem -- alternate devices}
\major{ }{}{block}{Flash Translation Layer (FTL) filesystems}
\major{45}{}{char }{isdn4linux ISDN BRI driver}
\major{ }{}{block}{Reserved for parallel port IDE disk}
\major{46}{}{char }{Comtrol Rocketport serial card}
\major{ }{}{block}{Reserved for parallel port ATAPI CD-ROM}
\major{47}{}{char }{Comtrol Rocketport serial card -- alternate devices}
\major{ }{}{block}{Reserved for parallel port ATAPI disk}
\major{48}{}{char }{SDL RISCom serial card}
\major{49}{}{char }{SDL RISCom serial card -- alternate devices}
\major{50}{}{char }{Reserved for GLINT}
......@@ -240,7 +243,8 @@ Your cooperation is appreciated.
\major{93}{}{char }{IBM Smart Capture Card frame grabber}
\major{94}{}{char }{miroVIDEO DC10/30 capture/playback device}
\major{95}{}{char }{IP Filter}
\major{96}{--119}{}{Unallocated}
\major{96}{}{char }{Reserved for parallel port ATAPI tape}
\major{97}{--119}{}{Unallocated}
\major{120}{--127}{}{Local/experimental use}
\major{128}{--239}{}{Unallocated}
\major{240}{--254}{}{Local/experimental use}
......@@ -407,15 +411,15 @@ Linux. To ensure proper operation, do not mix old and new PTY devices.
\begin{devicelist}
\major{ 5}{}{char }{Alternate TTY devices}
\minor{0}{/dev/tty}{Current TTY device}
\minor{1}{}{Reserved for console device}
\minor{1}{/dev/console}{System console}
\minor{64}{/dev/cua0}{Callout device corresponding to {\file ttyS0}}
\minordots
\minor{127}{/dev/cua63}{Callout device corresponding to {\file ttyS63}}
\end{devicelist}
\noindent
Minor number 1 is reserved for a kernel-managed
{\file /dev/console} in a future version of Linux.
(5,1) is {\file /dev/console} starting with Linux 2.1.71. See the
section on terminal devices for more information on {\file /dev/console}.
\begin{devicelist}
\major{ 6}{}{char }{Parallel printer devices}
......@@ -550,6 +554,7 @@ physical disks.
\minor{149}{/dev/input/mouse}{Linux/SGI Irix emulation mouse}
\minor{150}{/dev/input/keyboard}{Linux/SGI Irix emulation keyboard}
\minor{151}{/dev/led}{Front panel LEDs}
\minor{152}{/dev/radio}{Radio card (type?)}
\end{devicelist}
\begin{devicelist}
......@@ -809,18 +814,18 @@ major number 3).
\minor{17}{/dev/zqft1}{Unit 1, rewind-on-close, compression}
\minor{18}{/dev/zqft2}{Unit 2, rewind-on-close, compression}
\minor{19}{/dev/zqft3}{Unit 3, rewind-on-close, compression}
\minor{20}{/dev/nzqft0}{Unit 0, no-rewind-on-close, compression}
\minor{21}{/dev/nzqft1}{Unit 1, no-rewind-on-close, compression}
\minor{22}{/dev/nzqft2}{Unit 2, no-rewind-on-close, compression}
\minor{23}{/dev/nzqft3}{Unit 3, no-rewind-on-close, compression}
\minor{32}{/dev/rawft0}{Unit 0, rewind-on-close, no file marks}
\minor{33}{/dev/rawft1}{Unit 1, rewind-on-close, no file marks}
\minor{34}{/dev/rawft2}{Unit 2, rewind-on-close, no file marks}
\minor{35}{/dev/rawft3}{Unit 3, rewind-on-close, no file marks}
\minor{36}{/dev/zqft0}{Unit 0, no-rewind-on-close, no file marks}
\minor{37}{/dev/zqft1}{Unit 1, no-rewind-on-close, no file marks}
\minor{38}{/dev/zqft2}{Unit 2, no-rewind-on-close, no file marks}
\minor{39}{/dev/zqft3}{Unit 3, no-rewind-on-close, no file marks}
\minor{20}{/dev/nzqft0}{Unit 0, no rewind-on-close, compression}
\minor{21}{/dev/nzqft1}{Unit 1, no rewind-on-close, compression}
\minor{22}{/dev/nzqft2}{Unit 2, no rewind-on-close, compression}
\minor{23}{/dev/nzqft3}{Unit 3, no rewind-on-close, compression}
\minor{32}{/dev/rawqft0}{Unit 0, rewind-on-close, no file marks}
\minor{33}{/dev/rawqft1}{Unit 1, rewind-on-close, no file marks}
\minor{34}{/dev/rawqft2}{Unit 2, rewind-on-close, no file marks}
\minor{35}{/dev/rawqft3}{Unit 3, rewind-on-close, no file marks}
\minor{36}{/dev/nrawqft0}{Unit 0, no rewind-on-close, no file marks}
\minor{37}{/dev/nrawqft1}{Unit 1, no rewind-on-close, no file marks}
\minor{38}{/dev/nrawqft2}{Unit 2, no rewind-on-close, no file marks}
\minor{39}{/dev/nrawqft3}{Unit 3, no rewind-on-close, no file marks}
\\
\major{ }{}{block}{Third Matsushita (Panasonic/SoundBlaster) CD-ROM}
\minor{0}{/dev/sbpcd8}{Panasonic CD-ROM controller 2 unit 0}
......@@ -1629,8 +1634,7 @@ It is recommended that these links exist on all systems:
\begin{nodelist}
\link{/dev/core}{/proc/kcore}{symbolic}{Backward compatibility}
\link{/dev/ramdisk}{ram0}{symbolic}{Backward compatibility}
\link{/dev/rft0}{qft0}{symbolic}{Backward compatibility}
\link{/dev/ftape}{rft0}{symbolic}{Backward compatibility}
\link{/dev/ftape}{qft0}{symbolic}{Backward compatibility}
\link{/dev/scd?}{sr?}{hard}{Alternate name for CD-ROMs}
\link{/dev/fd?D*}{fd?u*}{hard}{Backward compatibility}
\link{/dev/fd?H*}{fd?u*}{hard}{Backward compatibility}
......@@ -1715,10 +1719,11 @@ purpose.
The {\em console device\/}, {\file /dev/console}, is the device to
which system messages should be sent, and on which logins should be
permitted in single-user mode. {\file /dev/console} should be a
symbolic link to either {\file /dev/tty0}, a specific virtual console
such as {\file /dev/tty1}, or to a serial port primary ({\file tty})
device, depending on the configuration of the system.
permitted in single-user mode. Starting with Linux 2.1.71, {\file
/dev/console} is managed by the kernel; for previous versions it
should be a symbolic link to either {\file /dev/tty0}, a specific
virtual console such as {\file /dev/tty1}, or to a serial port primary
({\file tty}) device, depending on the configuration of the system.
\subsection{Serial ports}
......
LINUX ALLOCATED DEVICES
Maintained by H. Peter Anvin <hpa@zytor.com>
Last revised: November 9, 1997
Last revised: December 4, 1997
This list is the Linux Device List, the official registry of allocated
device numbers and /dev directory nodes for the Linux operating
......@@ -191,13 +191,14 @@ Your cooperation is appreciated.
5 char Alternate TTY devices
0 = /dev/tty Current TTY device
1 Reserved for console device
1 = /dev/console System console
64 = /dev/cua0 Callout device corresponding to ttyS0
...
127 = /dev/cua63 Callout device corresponding to ttyS63
Minor number 1 is reserved for a kernel-managed
/dev/console in a future version of Linux.
(5,1) is /dev/console starting with Linux 2.1.71. See
the section on terminal devices for more information
on /dev/console.
6 char Parallel printer devices
0 = /dev/lp0 First parallel printer (0x3bc)
......@@ -315,6 +316,7 @@ Your cooperation is appreciated.
149 = /dev/input/mouse Linux/SGI Irix emulation mouse
150 = /dev/input/keyboard Linux/SGI Irix emulation keyboard
151 = /dev/led Front panel LEDs
152 = /dev/radio Radio card (type?)
11 char Raw keyboard device
0 = /dev/kbd Raw keyboard device
......@@ -518,19 +520,19 @@ Your cooperation is appreciated.
16 = /dev/zqft0 Unit 0, rewind-on-close, compression
17 = /dev/zqft1 Unit 1, rewind-on-close, compression
18 = /dev/zqft2 Unit 2, rewind-on-close, compression
19 = /dev/zqft3 Unit 3, rewind-on-close, compression
20 = /dev/nzqft0 Unit 0, no-rewind, compression
21 = /dev/nzqft1 Unit 1, no-rewind, compression
22 = /dev/nzqft2 Unit 2, no-rewind, compression
23 = /dev/nzqft3 Unit 3, no-rewind, compression
32 = /dev/rawft0 Unit 0, rewind-on-close, no file marks
33 = /dev/rawft1 Unit 1, rewind-on-close, no file marks
34 = /dev/rawft2 Unit 2, rewind-on-close, no file marks
35 = /dev/rawft3 Unit 3, rewind-on-close, no file marks
36 = /dev/zqft0 Unit 0, no-rewind, no file marks
37 = /dev/zqft1 Unit 1, no-rewind, no file marks
38 = /dev/zqft2 Unit 2, no-rewind, no file marks
39 = /dev/zqft3 Unit 3, no-rewind, no file marks
19 = /dev/zqt3 Unit 3, rewind-on-close, compression
20 = /dev/nzqft0 Unit 0, no rewind-on-close, compression
21 = /dev/nzqft1 Unit 1, no rewind-on-close, compression
22 = /dev/nzqft2 Unit 2, no rewind-on-close, compression
23 = /dev/nzqft3 Unit 3, no rewind-on-close, compression
32 = /dev/rawqft0 Unit 0, rewind-on-close, no file marks
33 = /dev/rawqft1 Unit 1, rewind-on-close, no file marks
34 = /dev/rawqft2 Unit 2, rewind-on-close, no file marks
35 = /dev/rawqft3 Unit 3, rewind-on-close, no file marks
32 = /dev/nrawqft0 Unit 0, no rewind-on-close, no file marks
33 = /dev/nrawqft1 Unit 1, no rewind-on-close, no file marks
34 = /dev/nrawqft2 Unit 2, no rewind-on-close, no file marks
35 = /dev/nrawqft3 Unit 3, no rewind-on-close, no file marks
block Third Matsushita (Panasonic/SoundBlaster) CD-ROM
0 = /dev/sbpcd8 Panasonic CD-ROM controller 2 unit 0
1 = /dev/sbpcd9 Panasonic CD-ROM controller 2 unit 1
......@@ -1153,7 +1155,6 @@ It is recommended that these links exist on all systems:
/dev/core /proc/kcore symbolic Backward compatibility
/dev/ramdisk ram0 symbolic Backward compatibility
/dev/rft0 qft0 symbolic Backward compatibility
/dev/ftape qft0 symbolic Backward compatibility
/dev/scd? sr? hard Alternate SCSI CD-ROM name
......@@ -1228,9 +1229,10 @@ for this purpose.
The console device, /dev/console, is the device to which system
messages should be sent, and on which logins should be permitted in
single-user mode. /dev/console should be a symbolic link to either
/dev/tty0, a specific virtual console such as /dev/tty1, or to a
serial port primary (tty*, not cu*) device, depending on the
single-user mode. Starting with Linux 2.1.71, /dev/console is managed
by the kernel; for previous versions it should be a symbolic link to
either /dev/tty0, a specific virtual console such as /dev/tty1, or to
a serial port primary (tty*, not cu*) device, depending on the
configuration of the system.
Serial ports
......
This diff is collapsed.
......@@ -173,6 +173,12 @@ M: jreuter@lykos.oche.de
L: linux-hams@vger.rutgers.edu
S: Maintained
HIGH-SPEED SCC DRIVER FOR AX.25
P: Klaus Kudielka
M: oe1kib@oe1xtu.ampr.org
L: linux-hams@vger.rutgers.edu
S: Maintained
BAYCOM/HDLCDRV/SOUNDMODEM DRIVERS FOR AX.25
P: Thomas Sailer
M: sailer@ife.ee.ethz.ch
......
VERSION = 2
PATCHLEVEL = 1
SUBLEVEL = 71
SUBLEVEL = 72
ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/)
......@@ -157,6 +157,10 @@ ifdef CONFIG_PNP
DRIVERS := $(DRIVERS) drivers/pnp/pnp.a
endif
ifdef CONFIG_HAMRADIO
DRIVERS := $(DRIVERS) drivers/net/hamradio/hamradio.a
endif
include arch/$(ARCH)/Makefile
ifdef SMP
......@@ -363,8 +367,8 @@ distclean: mrproper
rm -f core `find . \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
-o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
-o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -print` TAGS
rm -f drivers/sound/Config.in
cp drivers/sound/Config.std drivers/sound/Config.in
# rm -f drivers/sound/Config.in
# cp drivers/sound/Config.std drivers/sound/Config.in
backup: mrproper
cd .. && tar cf - linux/ | gzip -9 > backup.gz
......
......@@ -727,7 +727,7 @@ sys_call_table:
.quad sys_write
.quad alpha_ni_syscall /* 5 */
.quad sys_close
.quad sys_wait4
.quad osf_wait4
.quad alpha_ni_syscall
.quad sys_link
.quad sys_unlink /* 10 */
......@@ -804,17 +804,17 @@ sys_call_table:
.quad sys_setgroups /* 80 */
.quad alpha_ni_syscall
.quad sys_setpgid
.quad sys_setitimer
.quad osf_setitimer
.quad alpha_ni_syscall
.quad alpha_ni_syscall /* 85 */
.quad sys_getitimer
.quad osf_getitimer
.quad sys_gethostname
.quad sys_sethostname
.quad sys_getdtablesize
.quad sys_dup2 /* 90 */
.quad sys_newfstat
.quad sys_fcntl
.quad sys_select
.quad osf_select
.quad sys_poll
.quad sys_fsync /* 95 */
.quad sys_setpriority
......@@ -837,13 +837,13 @@ sys_call_table:
.quad sys_recvmsg
.quad sys_sendmsg
.quad alpha_ni_syscall /* 115 */
.quad sys_gettimeofday
.quad sys_getrusage
.quad osf_gettimeofday
.quad osf_getrusage
.quad sys_getsockopt
.quad alpha_ni_syscall
.quad sys_readv /* 120 */
.quad sys_writev
.quad sys_settimeofday
.quad osf_settimeofday
.quad sys_fchown
.quad sys_fchmod
.quad sys_recvfrom /* 125 */
......@@ -859,7 +859,7 @@ sys_call_table:
.quad sys_socketpair /* 135 */
.quad sys_mkdir
.quad sys_rmdir
.quad sys_utimes
.quad osf_utimes
.quad alpha_ni_syscall
.quad alpha_ni_syscall /* 140 */
.quad sys_getpeername
......
This diff is collapsed.
......@@ -75,6 +75,7 @@ osf_sigprocmask(int how, unsigned long newmask, long a2, long a3,
if (_NSIG_WORDS > 1 && sign > 0)
sigemptyset(&current->blocked);
current->blocked.sig[0] = newmask;
recalc_sigpending(current);
spin_unlock_irq(&current->sigmask_lock);
(&regs)->r0 = 0; /* special no error return */
......@@ -570,21 +571,23 @@ asmlinkage int
do_signal(sigset_t *oldset, struct pt_regs * regs, struct switch_stack * sw,
unsigned long r0, unsigned long r19)
{
sigset_t _oldset;
siginfo_t info;
unsigned long signr, single_stepping, core = 0;
struct k_sigaction *ka;
unsigned long single_stepping = ptrace_cancel_bpt(current);
if (!oldset)
oldset = &current->blocked;
single_stepping = ptrace_cancel_bpt(current);
while (1) {
unsigned long signr;
struct k_sigaction *ka;
siginfo_t info;
spin_lock_irq(&current->sigmask_lock);
if (!oldset) {
_oldset = current->blocked;
oldset = &_oldset;
}
while ((signr = dequeue_signal(&current->blocked, &info)) != 0) {
signr = dequeue_signal(&current->blocked, &info);
spin_unlock_irq(&current->sigmask_lock);
if (!signr)
break;
if ((current->flags & PF_PTRACED) && signr != SIGKILL) {
/* Let the debugger run. */
current->exit_code = signr;
......@@ -595,12 +598,12 @@ do_signal(sigset_t *oldset, struct pt_regs * regs, struct switch_stack * sw,
/* We're back. Did the debugger cancel the sig? */
if (!(signr = current->exit_code))
goto skip_signal;
continue;
current->exit_code = 0;
/* The debugger continued. Ignore SIGSTOP. */
if (signr == SIGSTOP)
goto skip_signal;
continue;
/* Update the siginfo structure. Is this good? */
if (signr != info.si_signo) {
......@@ -614,23 +617,34 @@ do_signal(sigset_t *oldset, struct pt_regs * regs, struct switch_stack * sw,
/* If the (new) signal is now blocked, requeue it. */
if (sigismember(&current->blocked, signr)) {
send_sig_info(signr, &info, current);
goto skip_signal;
continue;
}
}
ka = &current->sig->action[signr-1];
if (ka->sa.sa_handler == SIG_IGN) {
if (signr != SIGCHLD)
continue;
/* Check for SIGCHLD: it's special. */
while (sys_wait4(-1, NULL, WNOHANG, NULL) > 0)
/* nothing */;
continue;
}
if (ka->sa.sa_handler == SIG_DFL) {
int exit_code = signr & 0x7f;
/* Init gets no signals it doesn't want. */
if (current->pid == 1)
goto skip_signal;
continue;
switch (signr) {
case SIGCONT: case SIGCHLD: case SIGWINCH:
goto skip_signal;
continue;
case SIGTSTP: case SIGTTIN: case SIGTTOU:
if (is_orphaned_pgrp(current->pgrp))
goto skip_signal;
continue;
/* FALLTHRU */
case SIGSTOP:
......@@ -641,15 +655,15 @@ do_signal(sigset_t *oldset, struct pt_regs * regs, struct switch_stack * sw,
notify_parent(current, SIGCHLD);
schedule();
single_stepping |= ptrace_cancel_bpt(current);
break;
continue;
case SIGQUIT: case SIGILL: case SIGTRAP:
case SIGABRT: case SIGFPE: case SIGSEGV:
lock_kernel();
if (current->binfmt
&& current->binfmt->core_dump
&&current->binfmt->core_dump(signr, regs))
core = 0x80;
&& current->binfmt->core_dump(signr, regs))
exit_code |= 0x80;
unlock_kernel();
/* FALLTHRU */
......@@ -657,15 +671,12 @@ do_signal(sigset_t *oldset, struct pt_regs * regs, struct switch_stack * sw,
lock_kernel();
sigaddset(&current->signal, signr);
current->flags |= PF_SIGNALED;
do_exit((signr & 0x7f) | core);
do_exit(exit_code);
/* NOTREACHED */
}
} else if (ka->sa.sa_handler == SIG_IGN) {
if (signr == SIGCHLD) {
/* Check for SIGCHLD: it's special. */
while (sys_wait4(-1, NULL, WNOHANG, NULL) > 0)
/* nothing */;
continue;
}
} else {
/* Whee! Actually deliver the signal. */
if (r0) syscall_restart(r0, r19, regs, ka);
handle_signal(signr, ka, &info, oldset, regs, sw);
......@@ -673,10 +684,6 @@ do_signal(sigset_t *oldset, struct pt_regs * regs, struct switch_stack * sw,
ptrace_set_bpt(current); /* re-set bpt */
return 1;
}
skip_signal:
spin_lock_irq(&current->sigmask_lock);
}
spin_unlock_irq(&current->sigmask_lock);
if (r0 &&
(regs->r0 == ERESTARTNOHAND ||
......
......@@ -281,22 +281,19 @@ void machine_restart(char * __unused)
{
if(!reboot_thru_bios) {
#if 0
sti();
#endif
/* rebooting needs to touch the page at absolute addr 0 */
*((unsigned short *)__va(0x472)) = reboot_mode;
for (;;) {
int i;
for (i=0; i<100; i++) {
int j;
kb_wait();
for(j = 0; j < 100000 ; j++)
/* nothing */;
udelay(10);
outb(0xfe,0x64); /* pulse reset low */
udelay(10);
}
__asm__ __volatile__("\tlidt %0": "=m" (no_idt));
/* That didn't work - force a triple fault.. */
__asm__ __volatile__("lidt %0": :"m" (no_idt));
__asm__ __volatile__("int3");
}
}
......
......@@ -225,15 +225,16 @@ asmlinkage int sys_olduname(struct oldold_utsname * name)
return -EFAULT;
error = __copy_to_user(&name->sysname,&system_utsname.sysname,__OLD_UTS_LEN);
error -= __put_user(0,name->sysname+__OLD_UTS_LEN);
error -= __copy_to_user(&name->nodename,&system_utsname.nodename,__OLD_UTS_LEN);
error -= __put_user(0,name->nodename+__OLD_UTS_LEN);
error -= __copy_to_user(&name->release,&system_utsname.release,__OLD_UTS_LEN);
error -= __put_user(0,name->release+__OLD_UTS_LEN);
error -= __copy_to_user(&name->version,&system_utsname.version,__OLD_UTS_LEN);
error -= __put_user(0,name->version+__OLD_UTS_LEN);
error -= __copy_to_user(&name->machine,&system_utsname.machine,__OLD_UTS_LEN);
error = __put_user(0,name->machine+__OLD_UTS_LEN);
error |= __put_user(0,name->sysname+__OLD_UTS_LEN);
error |= __copy_to_user(&name->nodename,&system_utsname.nodename,__OLD_UTS_LEN);
error |= __put_user(0,name->nodename+__OLD_UTS_LEN);
error |= __copy_to_user(&name->release,&system_utsname.release,__OLD_UTS_LEN);
error |= __put_user(0,name->release+__OLD_UTS_LEN);
error |= __copy_to_user(&name->version,&system_utsname.version,__OLD_UTS_LEN);
error |= __put_user(0,name->version+__OLD_UTS_LEN);
error |= __copy_to_user(&name->machine,&system_utsname.machine,__OLD_UTS_LEN);
error |= __put_user(0,name->machine+__OLD_UTS_LEN);
error = error ? -EFAULT : 0;
return error;
......
......@@ -38,9 +38,9 @@
#include <linux/nfsd/xdr.h>
#include <linux/nfsd/syscall.h>
#include <linux/module.h>
#include <linux/poll.h>
#include <asm/types.h>
#include <asm/poll.h>
#include <asm/ipc.h>
#include <asm/uaccess.h>
#include <asm/fpumacro.h>
......@@ -1075,104 +1075,139 @@ asmlinkage int sys32_getdents(unsigned int fd, u32 dirent, unsigned int count)
/* end of readdir & getdents */
extern asmlinkage int sys_select(int n, fd_set *inp, fd_set *outp,
fd_set *exp, struct timeval *tvp);
/*
* Ooo, nasty. We need here to frob 32-bit unsigned longs to
* 64-bit unsigned longs.
*/
asmlinkage int sys32_select(int n, u32 inp, u32 outp, u32 exp, u32 tvp)
static inline int
get_fd_set32(unsigned long n, unsigned long *fdset, u32 ufdset_x)
{
struct timeval kern_tv, *ktvp;
unsigned long old_fs;
char *p;
u32 *q, *Inp, *Outp, *Exp;
int i, ret = -EINVAL, nn;
u32 *ufdset = (u32 *)A(ufdset_x);
if (n < 0 || n > PAGE_SIZE*2)
return -EINVAL;
if (ufdset) {
unsigned long odd;
lock_kernel ();
p = (char *)__get_free_page (GFP_KERNEL);
if (!p)
goto out_nofree;
if (verify_area(VERIFY_WRITE, ufdset, nn*sizeof(u32)))
return -EFAULT;
q = (u32 *)p;
Inp = (u32 *)A(inp);
Outp = (u32 *)A(outp);
Exp = (u32 *)A(exp);
odd = n & 1UL;
n &= ~1UL;
while (n) {
unsigned long h, l;
__get_user(l, ufdset);
__get_user(h, ufdset+1);
ufdset += 2;
*fdset++ = h << 32 | l;
n -= 2;
}
if (odd)
__get_user(*fdset, ufdset);
} else {
/* Tricky, must clear full unsigned long in the kernel
fdset at the end, this makes sure that actually
happens. */
memset(fdset, 0, ((n + 1) & ~1)*sizeof(u32));
}
ret = -EFAULT;
return 0;
}
nn = (n + (8 * sizeof(long)) - 1) / (8 * sizeof(long));
if (inp && verify_area(VERIFY_WRITE, Inp, nn*sizeof(long)))
goto out;
if (outp && verify_area(VERIFY_WRITE, Outp, nn*sizeof(long)))
goto out;
if (exp && verify_area(VERIFY_WRITE, Exp, nn*sizeof(long)))
goto out;
for (i = 0; i < nn; i++, Inp += 2, Outp += 2, Exp += 2, q += 2) {
if(inp && (__get_user (q[1], Inp) || __get_user (q[0], Inp+1)))
goto out;
if(outp && (__get_user (q[1+(PAGE_SIZE/4/sizeof(u32))], Outp) ||
__get_user (q[(PAGE_SIZE/4/sizeof(u32))], Outp+1)))
goto out;
if(exp && (__get_user (q[1+(PAGE_SIZE/2/sizeof(u32))], Exp) ||
__get_user (q[(PAGE_SIZE/2/sizeof(u32))], Exp+1)))
goto out;
}
static inline void
set_fd_set32(unsigned long n, u32 ufdset_x, unsigned long *fdset)
{
unsigned long odd;
u32 *ufdset = (u32 *)A(ufdset_x);
ktvp = NULL;
if(tvp) {
if (get_tv32(&kern_tv, (struct timeval32 *)A(tvp)))
goto out;
ktvp = &kern_tv;
if (!ufdset)
return;
odd = n & 1UL;
n &= ~1UL;
while (n) {
unsigned long h, l;
l = *fdset++;
h = l >> 32;
__put_user(l, ufdset);
__put_user(h, ufdset+1);
ufdset += 2;
n -= 2;
}
if (odd)
__put_user(*fdset, ufdset);
}
old_fs = get_fs ();
set_fs (KERNEL_DS);
q = (u32 *) p;
ret = sys_select(n,
inp ? (fd_set *)&q[0] : (fd_set *)0,
outp ? (fd_set *)&q[PAGE_SIZE/4/sizeof(u32)] : (fd_set *)0,
exp ? (fd_set *)&q[PAGE_SIZE/2/sizeof(u32)] : (fd_set *)0,
ktvp);
set_fs (old_fs);
asmlinkage int sys32_select(int n, u32 inp, u32 outp, u32 exp, u32 tvp_x)
{
fd_set_buffer *fds;
struct timeval32 *tvp = (struct timeval32 *)A(tvp_x);
unsigned long timeout, nn;
int ret;
if(tvp && !(current->personality & STICKY_TIMEOUTS)) {
if (put_tv32((struct timeval32 *)A(tvp), &kern_tv)) {
ret = -EFAULT;
goto out;
}
}
timeout = ~0UL;
if (tvp) {
time_t sec, usec;
if ((ret = verify_area(VERIFY_READ, tvp, sizeof(*tvp)))
|| (ret = __get_user(sec, &tvp->tv_sec))
|| (ret = __get_user(usec, &tvp->tv_usec)))
goto out_nofds;
q = (u32 *)p;
Inp = (u32 *)A(inp);
Outp = (u32 *)A(outp);
Exp = (u32 *)A(exp);
timeout = (usec + 1000000/HZ - 1) / (1000000/HZ);
timeout += sec * HZ;
if (timeout)
timeout += jiffies + 1;
}
if(ret < 0)
ret = -ENOMEM;
fds = (fd_set_buffer *) __get_free_page(GFP_KERNEL);
if (!fds)
goto out_nofds;
ret = -EINVAL;
if (n < 0)
goto out;
if (n > KFDS_NR)
n = KFDS_NR;
for (i = 0;
i < nn;
i++, Inp += 2, Outp += 2, Exp += 2, q += 2) {
if(inp && (__put_user (q[1], Inp) || __put_user (q[0], Inp+1))) {
ret = -EFAULT;
nn = (n + 8*sizeof(u32) - 1) / (8*sizeof(u32));
if ((ret = get_fd_set32(nn, fds->in, inp)) ||
(ret = get_fd_set32(nn, fds->out, outp)) ||
(ret = get_fd_set32(nn, fds->ex, exp)))
goto out;
zero_fd_set(n, fds->res_in);
zero_fd_set(n, fds->res_out);
zero_fd_set(n, fds->res_ex);
ret = do_select(n, fds, timeout);
if (tvp && !(current->personality & STICKY_TIMEOUTS)) {
unsigned long timeout = current->timeout - jiffies - 1;
time_t sec = 0, usec = 0;
if ((long) timeout > 0) {
sec = timeout / HZ;
usec = timeout % HZ;
usec *= (1000000/HZ);
}
if(outp && (__put_user (q[1+(PAGE_SIZE/4/sizeof(u32))], Outp) ||
__put_user (q[(PAGE_SIZE/4/sizeof(u32))], Outp+1))) {
ret = -EFAULT;
goto out;
put_user(sec, &tvp->tv_sec);
put_user(usec, &tvp->tv_usec);
}
if(exp && (__put_user (q[1+(PAGE_SIZE/2/sizeof(u32))], Exp) ||
__put_user (q[(PAGE_SIZE/2/sizeof(u32))], Exp+1))) {
ret = -EFAULT;
if (ret < 0)
goto out;
if (!ret) {
ret = -ERESTARTNOHAND;
if (current->signal & ~current->blocked)
goto out;
ret = 0;
}
}
set_fd_set32(nn, inp, fds->res_in);
set_fd_set32(nn, outp, fds->res_out);
set_fd_set32(nn, exp, fds->res_ex);
out:
free_page ((unsigned long)p);
out_nofree:
unlock_kernel();
free_page ((unsigned long)fds);
out_nofds:
return ret;
}
......
......@@ -64,6 +64,10 @@ static void acq_ping(void)
static ssize_t acq_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
{
/* Can't seek (pwrite) on this device */
if (ppos != &file->f_pos)
return -ESPIPE;
if(count)
{
acq_ping();
......
......@@ -54,7 +54,7 @@
* unthrottling the TTY driver. These watermarks are used for
* controlling the space in the read buffer.
*/
#define TTY_THRESHOLD_THROTTLE (N_TTY_BUF_SIZE - 128)
#define TTY_THRESHOLD_THROTTLE 128 /* now based on remaining room */
#define TTY_THRESHOLD_UNTHROTTLE 128
static inline void put_tty_queue(unsigned char c, struct tty_struct *tty)
......@@ -67,20 +67,41 @@ static inline void put_tty_queue(unsigned char c, struct tty_struct *tty)
}
/*
* Flush the input buffer
* Check whether to call the driver.unthrottle function.
* We test the TTY_THROTTLED bit first so that it always
* indicates the current state.
*/
void n_tty_flush_buffer(struct tty_struct * tty)
static void check_unthrottle(struct tty_struct * tty)
{
if (test_and_clear_bit(TTY_THROTTLED, &tty->flags) &&
tty->driver.unthrottle)
tty->driver.unthrottle(tty);
}
/*
* Reset the read buffer counters, clear the flags,
* and make sure the driver is unthrottled. Called
* from n_tty_open() and n_tty_flush_buffer().
*/
static void reset_buffer_flags(struct tty_struct *tty)
{
tty->read_head = tty->read_tail = tty->read_cnt = 0;
tty->canon_head = tty->canon_data = tty->erasing = 0;
memset(&tty->read_flags, 0, sizeof tty->read_flags);
check_unthrottle(tty);
}
/*
* Flush the input buffer
*/
void n_tty_flush_buffer(struct tty_struct * tty)
{
/* clear everything and unthrottle the driver */
reset_buffer_flags(tty);
if (!tty->link)
return;
if (tty->driver.unthrottle &&
test_and_clear_bit(TTY_THROTTLED, &tty->flags))
tty->driver.unthrottle(tty);
if (tty->link->packet) {
tty->ctrl_status |= TIOCPKT_FLUSHREAD;
wake_up_interruptible(&tty->link->read_wait);
......@@ -508,7 +529,7 @@ static inline void n_tty_receive_char(struct tty_struct *tty, unsigned char c)
return;
}
}
if (L_ICANON(tty)) {
if (tty->icanon) {
if (c == ERASE_CHAR(tty) || c == KILL_CHAR(tty) ||
(c == WERASE_CHAR(tty) && L_IEXTEN(tty))) {
eraser(c, tty);
......@@ -611,11 +632,29 @@ static inline void n_tty_receive_char(struct tty_struct *tty, unsigned char c)
put_tty_queue(c, tty);
}
static int n_tty_receive_room(struct tty_struct *tty)
{
int left = N_TTY_BUF_SIZE - tty->read_cnt - 1;
/*
* If we are doing input canonicalization, and there are no
* pending newlines, let characters through without limit, so
* that erase characters will be handled. Other excess
* characters will be beeped.
*/
if (tty->icanon && !tty->canon_data)
return N_TTY_BUF_SIZE;
if (left > 0)
return left;
return 0;
}
static void n_tty_receive_buf(struct tty_struct *tty, const unsigned char *cp,
char *fp, int count)
{
const unsigned char *p;
char *f, flags = 0;
char *f, flags = TTY_NORMAL;
int i;
if (!tty->read_buf)
......@@ -670,28 +709,17 @@ static void n_tty_receive_buf(struct tty_struct *tty, const unsigned char *cp,
wake_up_interruptible(&tty->read_wait);
}
if ((tty->read_cnt >= TTY_THRESHOLD_THROTTLE) &&
tty->driver.throttle &&
!test_and_set_bit(TTY_THROTTLED, &tty->flags))
tty->driver.throttle(tty);
}
static int n_tty_receive_room(struct tty_struct *tty)
{
int left = N_TTY_BUF_SIZE - tty->read_cnt - 1;
/*
* If we are doing input canonicalization, and there are no
* pending newlines, let characters through without limit, so
* that erase characters will be handled. Other excess
* characters will be beeped.
* Check the remaining room for the input canonicalization
* mode. We don't want to throttle the driver if we're in
* canonical mode and don't have a newline yet!
*/
if (tty->icanon && !tty->canon_data)
return N_TTY_BUF_SIZE;
if (left > 0)
return left;
return 0;
if (n_tty_receive_room(tty) < TTY_THRESHOLD_THROTTLE) {
/* check TTY_THROTTLED first so it indicates our state */
if (!test_and_set_bit(TTY_THROTTLED, &tty->flags) &&
tty->driver.throttle)
tty->driver.throttle(tty);
}
}
int is_ignored(int sig)
......@@ -786,10 +814,8 @@ static int n_tty_open(struct tty_struct *tty)
return -ENOMEM;
}
memset(tty->read_buf, 0, N_TTY_BUF_SIZE);
tty->read_head = tty->read_tail = tty->read_cnt = 0;
tty->canon_head = tty->canon_data = tty->erasing = 0;
reset_buffer_flags(tty);
tty->column = 0;
memset(tty->read_flags, 0, sizeof(tty->read_flags));
n_tty_set_termios(tty, 0);
tty->minimum_to_wake = 1;
tty->closing = 0;
......@@ -798,7 +824,7 @@ static int n_tty_open(struct tty_struct *tty)
static inline int input_available_p(struct tty_struct *tty, int amt)
{
if (L_ICANON(tty)) {
if (tty->icanon) {
if (tty->canon_data)
return 1;
} else if (tty->read_cnt >= (amt ? amt : 1))
......@@ -825,7 +851,8 @@ static inline void copy_from_read_buf(struct tty_struct *tty,
n = MIN(*nr, MIN(tty->read_cnt, N_TTY_BUF_SIZE - tty->read_tail));
if (!n)
return;
copy_to_user(*b, &tty->read_buf[tty->read_tail], n);
/* N.B. copy_to_user may work only partially */
n -= copy_to_user(*b, &tty->read_buf[tty->read_tail], n);
tty->read_tail = (tty->read_tail + n) & (N_TTY_BUF_SIZE-1);
tty->read_cnt -= n;
*b += n;
......@@ -868,7 +895,7 @@ static ssize_t read_chan(struct tty_struct *tty, struct file *file,
}
}
if (L_ICANON(tty)) {
if (tty->icanon) {
minimum = time = 0;
current->timeout = (unsigned long) -1;
} else {
......@@ -897,9 +924,10 @@ static ssize_t read_chan(struct tty_struct *tty, struct file *file,
while (1) {
/* First test for status change. */
if (tty->packet && tty->link->ctrl_status) {
if (b != buf)
if (b != buf || !nr)
break;
put_user(tty->link->ctrl_status, b++);
nr--;
tty->link->ctrl_status = 0;
break;
}
......@@ -937,50 +965,52 @@ static ssize_t read_chan(struct tty_struct *tty, struct file *file,
current->state = TASK_RUNNING;
/* Deal with packet mode. */
if (tty->packet && b == buf) {
if (tty->packet && b == buf && nr) {
put_user(TIOCPKT_DATA, b++);
nr--;
}
if (L_ICANON(tty)) {
while (1) {
if (tty->icanon) {
/* N.B. avoid overrun if nr == 0 */
while (nr && tty->read_cnt) {
int eol;
if (!tty->read_cnt) {
break;
}
eol = test_and_clear_bit(tty->read_tail,
&tty->read_flags);
c = tty->read_buf[tty->read_tail];
tty->read_tail = ((tty->read_tail+1) &
(N_TTY_BUF_SIZE-1));
tty->read_cnt--;
if (!eol) {
put_user(c, b++);
if (--nr)
continue;
break;
}
if (--tty->canon_data < 0) {
tty->canon_data = 0;
}
if (c != __DISABLED_CHAR) {
if (!eol || (c != __DISABLED_CHAR)) {
put_user(c, b++);
nr--;
}
if (eol) {
/* this test should be redundant:
* we shouldn't be reading data if
* canon_data is 0
*/
if (--tty->canon_data < 0)
tty->canon_data = 0;
break;
}
}
} else {
/* N.B. check for errors writing to user space? */
copy_from_read_buf(tty, &b, &nr);
copy_from_read_buf(tty, &b, &nr);
}
/* If there is enough space in the read buffer now, let the
low-level driver know. */
if (tty->driver.unthrottle &&
(tty->read_cnt <= TTY_THRESHOLD_UNTHROTTLE)
&& test_and_clear_bit(TTY_THROTTLED, &tty->flags))
tty->driver.unthrottle(tty);
* low-level driver know. We use n_tty_chars_in_buffer() to
* check the buffer, as it now knows about canonical mode.
* Otherwise, if the driver is throttled and the line is
* longer than TTY_THRESHOLD_UNTHROTTLE in canonical mode,
* we won't get any more characters.
*/
if (n_tty_chars_in_buffer(tty) <= TTY_THRESHOLD_UNTHROTTLE)
check_unthrottle(tty);
if (b - buf >= minimum || !nr)
break;
......@@ -1048,6 +1078,10 @@ static ssize_t write_chan(struct tty_struct * tty, struct file * file,
tty->driver.flush_chars(tty);
} else {
c = tty->driver.write(tty, 1, b, nr);
if (c < 0) {
retval = c;
break;
}
b += c;
nr -= c;
}
......
......@@ -52,11 +52,11 @@
#include <linux/fcntl.h>
#include <linux/mc146818rtc.h>
#include <linux/init.h>
#include <linux/poll.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <asm/system.h>
#include <asm/poll.h>
/* Adjust starting epoch if ARC console time is being used */
#ifdef CONFIG_RTC_ARC
......
......@@ -3522,8 +3522,9 @@ static kdev_t serial_console_device(struct console *c)
* Setup initial baud/bits/parity. We do two things here:
* - construct a cflag setting for the first rs_open()
* - initialize the serial port
* Return non-zero if we didn't find a serial port.
*/
__initfunc(static void serial_console_setup(struct console *co, char *options))
__initfunc(static int serial_console_setup(struct console *co, char *options))
{
struct serial_state *ser;
unsigned cval;
......@@ -3619,6 +3620,12 @@ __initfunc(static void serial_console_setup(struct console *co, char *options))
outb(quot >> 8, ser->port + UART_DLM); /* MS of divisor */
outb(cval, ser->port + UART_LCR); /* reset DLAB */
/*
* If we read 0xff from the LSR, there is no UART here.
*/
if (inb(ser->port + UART_LSR) == 0xff)
return -1;
return 0;
}
static struct console sercons = {
......
......@@ -115,6 +115,10 @@ static void softdog_ping(void)
static ssize_t softdog_write(struct file *file, const char *data, size_t len, loff_t *ppos)
{
/* Can't seek (pwrite) on this device */
if (ppos != &file->f_pos)
return -ESPIPE;
/*
* Refresh the timer.
*/
......
......@@ -101,11 +101,34 @@ typedef struct {
int irqtype;
} stlconf_t;
/*static stlconf_t stl_brdconf[] = {
{ BRD_EASYIO, 0x2a0, 0, 0, 10, 0 },
};*/
#ifdef MODULE
static char *brdtype[STL_MAXBRDS] = {"\0", };
static int io[STL_MAXBRDS] = { 0, };
static int secio[STL_MAXBRDS] = { 0, };
static int irq[STL_MAXBRDS] = { 0, };
MODULE_PARM(brdtype, "1-" __MODULE_STRING(STL_MAXBRDS) "s");
MODULE_PARM(io, "1-" __MODULE_STRING(STL_MAXBRDS) "i");
MODULE_PARM(secio, "1-" __MODULE_STRING(STL_MAXBRDS) "i");
MODULE_PARM(irq, "1-" __MODULE_STRING(STL_MAXBRDS) "i");
static stlconf_t stl_brdconf[STL_MAXBRDS];
static int stl_nrbrds = 0;
#else
static stlconf_t stl_brdconf[] = {
{ BRD_EASYIO, 0x2a0, 0, 0, 10, 0 },
{ BRD_EASYIO, 0x2a8, 0, 0, 10, 0 },
{ BRD_EASYIO, 0x2b0, 0, 0, 10, 0 },
{ BRD_ECH, 0x2a0, 0x240, 0, 10, 0 },
};
static int stl_nrbrds = sizeof(stl_brdconf) / sizeof(stlconf_t);
#endif
/*****************************************************************************/
......@@ -616,9 +639,22 @@ static struct file_operations stl_fsiomem = {
* Loadable module initialization stuff.
*/
struct board_type_elem
{
int type_id;
char *name;
};
struct board_type_elem board_types[] = {
{ BRD_EASYIO, "easyio" },
{ BRD_ECH, "ech" },
{ BRD_ECHMC, "echmc" },
{ BRD_ECHPCI, "echpci" } };
int init_module()
{
unsigned long flags;
int i, j, num_board_types;
#if DEBUG
printk("init_module()\n");
......@@ -626,6 +662,25 @@ int init_module()
save_flags(flags);
cli();
num_board_types = sizeof(board_types) / sizeof(struct board_type_elem);
for (i = 0; (i < STL_MAXBRDS && io[i]); i++)
{
stl_brdconf[stl_nrbrds].brdtype = 0;
for (j = 0; j < num_board_types; j++)
if(strcmp(board_types[j].name, brdtype[i]) == 0)
stl_brdconf[stl_nrbrds].brdtype = board_types[j].type_id;
if(stl_brdconf[stl_nrbrds].brdtype != 0)
{
stl_brdconf[stl_nrbrds].ioaddr1 = io[i];
stl_brdconf[stl_nrbrds].ioaddr2 = secio[i];
stl_brdconf[stl_nrbrds].memaddr = 0;
stl_brdconf[stl_nrbrds].irq = irq[i];
stl_brdconf[stl_nrbrds].irqtype = 0;
stl_nrbrds++;
}
}
stl_init();
restore_flags(flags);
......@@ -823,8 +878,11 @@ static int stl_open(struct tty_struct *tty, struct file *filp)
return(-EBUSY);
} else {
if ((rc = stl_waitcarrier(portp, filp)) != 0)
{
MOD_INC_USE_COUNT;
return(rc);
}
}
portp->flags |= ASYNC_NORMAL_ACTIVE;
}
......@@ -838,6 +896,7 @@ static int stl_open(struct tty_struct *tty, struct file *filp)
portp->session = current->session;
portp->pgrp = current->pgrp;
MOD_INC_USE_COUNT;
return(0);
}
......@@ -925,6 +984,7 @@ static void stl_close(struct tty_struct *tty, struct file *filp)
restore_flags(flags);
return;
}
MOD_DEC_USE_COUNT;
if (portp->refcount-- > 1) {
restore_flags(flags);
return;
......@@ -2237,10 +2297,12 @@ static inline int stl_initbrds()
printk("stl_initbrds()\n");
#endif
#ifndef MODULE
if (stl_nrbrds > STL_MAXBRDS) {
printk("STALLION: too many boards in configuration table, truncating to %d\n", STL_MAXBRDS);
stl_nrbrds = STL_MAXBRDS;
}
#endif
/*
* Firstly scan the list of static boards configured. Allocate
......
......@@ -162,8 +162,7 @@ __initfunc(int con_is_present(void))
* Find out if there is a graphics card present.
* Are there smarter methods around?
*/
p = (unsigned short *)(((ORIG_VIDEO_MODE == 7) ? 0xb0000 : 0xb8000) +
+ VGA_OFFSET);
p = (unsigned short *) video_mem_base;
saved = scr_readw(p);
scr_writew(0xAA55, p);
if (scr_readw(p) != 0xAA55) {
......
......@@ -53,7 +53,7 @@ static int wdt_is_open=0;
*/
static int io=0x240;
static int irq=14;
static int irq=11;
#define WD_TIMO (100*60) /* 1 minute */
......@@ -171,6 +171,10 @@ static void wdt_ping(void)
static ssize_t wdt_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
{
/* Can't seek (pwrite) on this device */
if (ppos != &file->f_pos)
return -ESPIPE;
if(count)
{
wdt_ping();
......@@ -189,6 +193,10 @@ static ssize_t wdt_read(struct file *file, char *buf, size_t count, loff_t *ptr)
unsigned char cp;
int err;
/* Can't seek (pread) on this device */
if (ptr != &file->f_pos)
return -ESPIPE;
switch(MINOR(file->f_dentry->d_inode->i_rdev))
{
case TEMP_MINOR:
......
......@@ -47,8 +47,7 @@
#include <linux/skbuff.h>
#include <linux/capi.h>
#include <linux/kernelcapi.h>
#include <asm/poll.h>
#include <linux/poll.h>
#include "compat.h"
#include "capiutil.h"
......
......@@ -201,7 +201,7 @@
#include <linux/module.h>
#include <linux/version.h>
#if (LINUX_VERSION_CODE >= 0x020117)
#include <asm/poll.h>
#include <linux/poll.h>
#endif
#include <linux/isdn.h>
#include "isdn_common.h"
......
......@@ -129,7 +129,7 @@
#include <linux/version.h>
#include <linux/isdn.h>
#if (LINUX_VERSION_CODE >= 0x020117)
#include <asm/poll.h>
#include <linux/poll.h>
#endif
#include "isdn_common.h"
#include "isdn_ppp.h"
......
......@@ -171,7 +171,7 @@ ax_release_resources(struct parport *p)
{
if (p->irq != PARPORT_IRQ_NONE) {
ax_disable_irq(p);
free_irq(p->irq, p);
free_irq(p->irq, NULL);
}
release_region(p->base, p->size);
if (p->modes & PARPORT_MODE_PCECR)
......@@ -185,7 +185,7 @@ ax_claim_resources(struct parport *p)
{
/* FIXME check that resources are free */
if (p->irq != PARPORT_IRQ_NONE) {
request_irq(p->irq, ax_null_intr_func, 0, p->name, p);
request_irq(p->irq, ax_null_intr_func, 0, p->name, NULL);
ax_enable_irq(p);
}
request_region(p->base, p->size, p->name);
......
......@@ -141,7 +141,7 @@ static void pc_enable_irq(struct parport *p)
static void pc_release_resources(struct parport *p)
{
if (p->irq != PARPORT_IRQ_NONE)
free_irq(p->irq, p);
free_irq(p->irq, NULL);
release_region(p->base, p->size);
if (p->modes & PARPORT_MODE_PCECR)
release_region(p->base+0x400, 3);
......@@ -151,7 +151,7 @@ static int pc_claim_resources(struct parport *p)
{
/* FIXME check that resources are free */
if (p->irq != PARPORT_IRQ_NONE)
request_irq(p->irq, pc_null_intr_func, 0, p->name, p);
request_irq(p->irq, pc_null_intr_func, 0, p->name, NULL);
request_region(p->base, p->size, p->name);
if (p->modes & PARPORT_MODE_PCECR)
request_region(p->base+0x400, 3, p->name);
......
......@@ -180,6 +180,7 @@ if [ "$CONFIG_WAN_ROUTER" != "n" ]; then
bool ' WANPIPE Frame Relay support' CONFIG_WANPIPE_FR
bool ' WANPIPE PPP support' CONFIG_WANPIPE_PPP
fi
dep_tristate 'High-speed (DMA) SCC driver for AX.25' CONFIG_DMASCC $CONFIG_AX25
fi
fi
#
......
......@@ -31,6 +31,7 @@
#include <linux/netdevice.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/netlink.h>
#define NEXT_DEV NULL
......
This diff is collapsed.
......@@ -44,6 +44,7 @@ static const char *version =
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <asm/io.h>
#include <asm/system.h>
......
......@@ -329,7 +329,7 @@ static int eql_close(struct device *dev)
static int eql_ioctl(struct device *dev, struct ifreq *ifr, int cmd)
{
if(!suser() && cmd!=EQL_GETMASTRCFG && cmd!=EQL_GETSLAVECFG)
if(cmd!=EQL_GETMASTRCFG && cmd!=EQL_GETSLAVECFG && !suser())
return -EPERM;
switch (cmd)
{
......
......@@ -25,8 +25,6 @@ if [ "$CONFIG_HAMRADIO" != "n" ] ; then
tristate 'Serial port KISS driver' CONFIG_MKISS
# tristate 'Serial port 6PACK driver' CONFIG_6PACK
tristate 'BPQ Ethernet driver' CONFIG_BPQETHER
tristate 'Gracilis PackeTwin driver' CONFIG_PT
tristate 'Ottawa PI and PI2 driver' CONFIG_PI
tristate 'Z8530 SCC driver' CONFIG_SCC
if [ "$CONFIG_SCC" != "n" ]; then
......
......@@ -32,6 +32,7 @@
#include <asm/dma.h>
#include <linux/ioport.h>
#include <linux/soundmodem.h>
#include <linux/delay.h>
#include "sm.h"
#include "smdma.h"
......@@ -144,8 +145,7 @@ static int inline reset_dsp(struct device *dev)
int i;
outb(1, DSP_RESET(dev->base_addr));
for (i = 0; i < 0x100; i++)
SLOW_DOWN_IO;
udelay(300);
outb(0, DSP_RESET(dev->base_addr));
for (i = 0; i < 0xffff; i++)
if (inb(DSP_DATA_AVAIL(dev->base_addr)) & 0x80)
......
......@@ -665,9 +665,7 @@ ne_block_output(struct device *dev, int count,
outb_p(0x00, nic_base + EN0_RSARHI);
outb_p(E8390_RREAD+E8390_START, nic_base + NE_CMD);
/* Make certain that the dummy read has occurred. */
SLOW_DOWN_IO;
SLOW_DOWN_IO;
SLOW_DOWN_IO;
udelay(6);
#endif
outb_p(ENISR_RDC, nic_base + EN0_ISR);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -67,10 +67,10 @@ Readme.cards for info about configuring the driver with your card. Also
check for possible boot (insmod) time error messages in /var/adm/messages.
- Other messages or problems
Please check http://www.4front-tech.com/ossfree for more info.
Please check http://www.opensound.com/ossfree for more info.
Hannu Savolainen
hannu@4front-tech.com
hannu@opensound.com
----------------- cut here ------------------------------
SURPRISE SURPRISE!!!
......
......@@ -304,6 +304,9 @@ audio_read(int dev, struct fileinfo *file, char *buf, int count)
if (dev_nblock[dev] && buf_no == -EAGAIN)
return p;
if (p > 0) /* Avoid throwing away data */
return p; /* Return it instead */
return buf_no;
}
if (l > c)
......@@ -958,6 +961,34 @@ dma_ioctl(int dev, unsigned int cmd, caddr_t arg)
}
break;
case SNDCTL_DSP_GETODELAY:
{
int count;
unsigned long flags;
struct dma_buffparms *dmap = dmap_out;
if (!(audio_devs[dev]->open_mode & OPEN_WRITE))
return -EINVAL;
if (!(dmap->flags & DMA_ALLOC_DONE))
return (*(int *) arg = 0);
save_flags (flags);
cli ();
/* Compute number of bytes that have been played */
count = DMAbuf_get_buffer_pointer (dev, dmap, DMODE_OUTPUT);
if (count < dmap->fragment_size && dmap->qhead != 0)
count += dmap->bytes_in_use; /* Pointer wrap not handled yet */
count += dmap->byte_counter;
/* Substract current count from the number of bytes written by app */
count = dmap->user_counter - count;
if (count < 0)
count = 0;
restore_flags (flags);
return (*(int *) arg = count);
}
break;
case SNDCTL_DSP_POST:
;
......
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