Commit 2e59abdf authored by Linus Torvalds's avatar Linus Torvalds

Linux 2.1.132pre1

There's a new pre-patch out there. I'm back from Finland, and have caught
up with just about half the email that I got during the stay. However,
even the part I caught up with I may have partly missed something in,
because (for obvious reasons) I didn't read them as carefully (*) as I
usually do.

This should fix at least part of the NFS problems people have reported:
there was code to completely incorrectly invalidate quite valid write
requests under some circumstances. The pre-patch also contains the first
batch of patches merged in from Alan, and the "rmdir" problems should be
fixed (mostly thanks to Al Viro).

This pre-patch also gets rid of some imho completely unnecessary
complexity in some of the VM memory freeing routines. There have been
patches floating around that added more heuristics on when to do
something, and this tries to get the same result by just removing old
heuristics that didn't make much sense.

	Linus

(*) Even my usual "careful" is not very careful by other peoples
standards. So when _I_ say that I wasn't very careful, you should just
assume that I was reading my email about as carefully as a hyper-active
hedgehog on some serious uppers. Can you say "ignored email" three times
quickly while chewing on an apple?
parent ec274075
This diff is collapsed.
......@@ -98,10 +98,14 @@ Your cooperation is appreciated.
demand.
block Floppy disks
0 = /dev/fd0 First floppy disk autodetect
1 = /dev/fd1 Second floppy disk autodetect
2 = /dev/fd2 Third floppy disk autodetect
3 = /dev/fd3 Fourth floppy disk autodetect
0 = /dev/fd0 Controller 1, drive 1 autodetect
1 = /dev/fd1 Controller 1, drive 2 autodetect
2 = /dev/fd2 Controller 1, drive 3 autodetect
3 = /dev/fd3 Controller 1, drive 4 autodetect
128 = /dev/fd4 Controller 2, drive 1 autodetect
129 = /dev/fd5 Controller 2, drive 2 autodetect
130 = /dev/fd6 Controller 2, drive 3 autodetect
131 = /dev/fd7 Controller 2, drive 4 autodetect
To specify format, add to the autodetect device number:
0 = /dev/fd? Autodetect format
......
Documentation for the AD1816(A) sound driver
============================================
NOTE: This driver is still EXPERIMENTAL, so don't use it on production
systems!
Installation:
-------------
To get your AD1816(A) based sound card work, you'll have to enable
module support ("Enable loadable module support") and support for
experimental code ("Prompt for development and/or incomplete
code/drivers") during kernel configuration. Enable "Sound card
support", "OSS modules support" and "Support for AD1816(A) based cards
(EXPERIMENTAL)" in the sound configuration menu, too. Be sure, that
you build "Support for AD1816(A) based cards (EXPERIMENTAL)" as a MODULE,
otherwise you may run into problems later.
Now build, install and reboot the new kernel as usual.
Since the AD1816(A) is a P'n'P sound chip you'll usually have to
configure it using the isapnptools. See isapnptools documentation for
details on configuring P'n'P cards.
After you have successfully configured the card using isapnp, you may
load the AD1816 driver using modprobe. A typical modprobe call should
look like this:
modprobe ad1816 io=0x530 irq=5 dma=1 dma2=3 ad1816_clockfreq=33000
if your isapnp.conf file looks like this (relevant lines only):
(INT 0 (IRQ 5 (MODE +E)))
(DMA 0 (CHANNEL 1))
(DMA 1 (CHANNEL 3))
(IO 0 (BASE 0x0220))
(IO 1 (BASE 0x0388))
(IO 2 (BASE 0x0530))
NOTE: Be sure, that you use the address IO 2 (in our example 0x530) when
loading the module!
If your setup was correct, you should see the following messages in
/var/log/messages (numbers may be different):
Nov 6 17:07:26 tek01 kernel: ad1816_detect(530)
Nov 6 17:07:26 tek01 kernel: ad1816_detect() - Detected OK
Nov 6 17:07:26 tek01 kernel: AD1816 Version: 3
Features:
---------
List of features supported by this driver:
- full-duplex support
- supported audio formats: unsigned 8bit, signed 16bit little endian,
signed 16bit big endian, µ-law, A-law
- supported channels: mono and stereo
- supported recording sources: Master, CD, Line, Line1, Line2, Mic
- supports phat 3d stereo circuit (Line 3)
Supported cards:
----------------
The following cards are known to work with this driver:
- Terratec Base 1
- Terratec Base 64
- HP Kayak
- Acer FX-3D
- SY-1816
- Highscreen Sound-Boostar 32 Wave 3D
- ...
Troubleshooting:
----------------
First of all you should check, if the driver has been loaded
properly. If you get the following message in your /var/log/messages:
Nov 6 17:06:31 tek01 kernel: ad1816_detect(530)
Nov 6 17:06:31 tek01 kernel: Chip is not an AD1816 or chip is not active
you either used the wrong address for loading the driver, your chip is
not an AD1816 or you forgot to initialize the card with isapnp.
If loading of the driver succeeds, but playback/capture fails, check
if you used the correct values for irq, dma and dma2 when loading the module.
If one of them is wrong you usually get the following error message:
Nov 6 17:06:13 tek01 kernel: Sound: DMA (output) timed out - IRQ/DRQ config error?
If playback/capture is too fast or to slow, you should have a look at
the clock chip of your sound card. The AD1816 was designed for a 33MHz
oscillator, however most sound card manufacturer use slightly
different oscillators as they are cheaper than 33MHz oscillators. If
you have such a card you have to adjust the ad1816_clockfreq parameter
above. For example: For a card using a 32.875MHz oscillator use
ad1816_clockfreq=32875 instead of ad1816_clockfreq=33000.
Updates, bugfixes and bugreports:
--------------------------------
As the driver is still experimental and under development, you should
watch out for updates. Updates of the driver are available on the
internet from one of my home pages:
http://www.student.informatik.tu-darmstadt.de/~tek/projects/linux.html
or:
http://www.tu-darmstadt.de/~tek01/projects/linux.html
Bugreports, bugfixes and related questions should be sent via E-Mail to:
tek@rbg.informatik.tu-darmstadt.de
Thorsten Knabe <tek@rbg.informatik.tu-darmstadt.de>
Last modified: 1998/11/06
ver.0.4.3p4
- Bug fix for invalid memory detection when initialized twice
- Add sample sharing function - works together with awesfx-0.4.3p3
- Add AWE_PROBE_DATA for probing sample id
ver.0.4.3p3
- Replace memset to MEMSET (for FreeBSD)
- Add PAN_EXCHANGE switch
ver.0.4.3p2
- MIDI emulation device is added
- Controls volume and filter targets
- Include chorus/reverb/equalizer values in MISC_MODE
ver.0.4.3p1
- Change the volume calculation method
- Support for Tom Lees' PnP driver (v0.3)
ver.0.4.2d
- Support for OSS/Free 3.8 on 2.0 kernels.
- Support for Linux PnP driver
- Support for module (for recent 2.1 kernels and RH5.0)
- Support for FreeBSD-3.0 system
ver.0.4.2c
- Add a mode to enable drum channel toggle via bank number
change.
......
1998-12-04 Andrew T. Veliath <andrewtv@usa.net>
* Update version to 0.8.2.2
* Add msndreset program to shell archive.
1998-11-11 Andrew T. Veliath <andrewv@usa.net>
* msnd_pinnacle.c (mixer_ioctl): Add a mixer ioctl for
SOUND_MIXER_PRIVATE1 which does a full reset on the card.
(mixer_set): Move line in recording source to input monitor, aux
input level added, some mixer fixes.
1998-09-10 Andrew Veliath <andrewtv@usa.net>
* Update version to 0.8.2
......
......@@ -40,7 +40,7 @@ the sound modules with the proper I/O information. Here is my setup:
# ESS1868F AudioDrive initialization
/sbin/insmod sound
/sbin/modprobe sound
/sbin/insmod uart401
/sbin/insmod sb io=0x220 irq=5 dma=1 dma16=-1
/sbin/insmod mpu401 io=0x330
......
================================================================
INSTALLATION OF AWE32 SOUND DRIVER FOR LINUX
Takashi Iwai <iwai@ww.uni-erlangen.de>
================================================================
----------------------------------------------------------------
* Attention to SB-PnP Card Users
If you're using PnP cards, the initialization of PnP is required
before loading this driver. You have now three options:
1. Use isapnptools.
2. Install PnP kernel driver patch.
3. Initialize PnP on DOS/Windows, then boot linux by loadlin.
In this document, only the case 1 case is treated.
For the case 2, please refer to the instruction in PnP driver project.
The home page of PnP driver project is the following URL:
http://www-jcr.lmh.ox.ac.uk/~pnp/
----------------------------------------------------------------
* Installation on RedHat 5.0 Sound Driver
Please use install-rh.sh under RedHat5.0 directory.
DO NOT USE install.sh below.
See INSTALL.RH for more details.
----------------------------------------------------------------
* Installation/Update by Shell Script
1. Become root
% su
2. If you have never configured the kernel tree yet, run make config
once (to make depencies and symlinks).
# cd /usr/src/linux
# make xconfig
3. Run install.sh script
# sh ./install.sh
4. Configure your kenrel
(for Linux 2.[01].x user)
# cd /usr/src/linux
# make xconfig (or make menuconfig)
(for Linux 1.2.x user)
# cd /usr/src/linux
# make config
Answer YES to both "lowlevel drivers" and "AWE32 wave synth" items
in Sound menu. ("lowlevel drivers" will appear only in 2.x
kernel.)
5. Make your kernel (and modules), and install them as usual.
5a. make kernel image
# make zImage
5b. make modules and install them
# make modules && make modules_install
5c. If you're using lilo, copy the kernel image and run lilo.
Otherwise, copy the kernel image to suitable directory or
media for your system.
6. Reboot the kernel if necessary.
- If you updated only the modules, you don't have to reboot
the system. Just remove the old sound modules here.
in
# rmmod sound.o (linux-2.0 or OSS/Free)
# rmmod awe_wave.o (linux-2.1)
7. If your AWE card is a PnP and not initialized yet, you'll have to
do it by isapnp tools. Otherwise, skip to 8.
This section described only a brief explanation. For more
detaills, please see AWE64-Mini-HOWTO or isapnp tools FAQ.
7a. If you have no isapnp.conf file, generate it by pnpdump.
Otherwise, skip to 7d.
# pnpdump > /etc/isapnp.conf
7b. Edit isapnp.conf file. Comment out the appropriate
lines containing desirable I/O ports, DMA and IRQs.
Don't forget to enable (ACT Y) line.
7c. Add two i/o ports (0xA20 and 0xE20) in WaveTable part.
ex)
(CONFIGURE CTL0048/58128 (LD 2
# ANSI string -->WaveTable<--
(IO 0 (BASE 0x0620))
(IO 1 (BASE 0x0A20))
(IO 2 (BASE 0x0E20))
(ACT Y)
))
7d. Load the config file.
CAUTION: This will reset all PnP cards!
# isapnp /etc/isapnp.conf
8. Load the sound module (if you configured it as a module):
for 2.0 kernel or OSS/Free monolithic module:
# modprobe sound.o
for 2.1 kernel:
# modprobe sound
# insmod uart401
# insmod sb io=0x220 irq=5 dma=1 dma16=5 mpu_io=0x330
(These values depend on your settings.)
# insmod awe_wave
(Be sure to load awe_wave after sb!)
See /usr/src/linux/Documentation/sound/AWE32 for
more details.
9. (only for obsolete systems) If you don't have /dev/sequencer
device file, make it according to Readme.linux file on
/usr/src/linux/drivers/sound. (Run a shell script included in
that file). <-- This file no longer exists in the recent kernels!
10. OK, load your own soundfont file, and enjoy MIDI!
% sfxload synthgm.sbk
% drvmidi foo.mid
11. For more advanced use (eg. dynamic loading, virtual bank and
etc.), please read the awedrv FAQ or the instructions in awesfx
and awemidi packages.
Good luck!
Soundcore Notes on Modular Sound Drivers and Soundcore
Wade Hampton
11/20/1998
Purpose:
========
This document provides some general notes on the modular
sound drivers and their configuration, along with the
support modules sound.o, soundlow.o and soundcore.o.
Note, some of this probably should be added to the Sound-HOWTO!
Copying:
========
none
History:
========
0.1.0 11/20/1998 First version
Modular Sound Drivers:
======================
Thanks to the GREAT work by Alan Cox (alan@lxorguk.ukuu.org.uk),
[And Oleg Drokin, Thomas Sailer, Andrew Veliath and more than a few
others - not to mention Hannu's original code being designed well
enough to cope with that kind of chopping up](Alan)
the standard Linux kernels support a modular sound driver. From
Alan's comments in linux/drivers/sound/README.FIRST:
The modular sound driver patches were funded by Red Hat Software
(www.redhat.com). The sound driver here is thus a modified version of
Hannu's code. Please bear that in mind when considering the appropriate
forums for bug reporting.
The modular sound drivers may be loaded via insmod or modprobe.
To support all the various sound modules, there are three general
support modules that must be loaded first:
soundcore.o: Top level handler for the sound system, provides
a set of functions for registration of devices
by type.
soundlow.o: Low-level sound drivers which are not part of
OSS/Lite (Open Sound System), including SB32/AWE
synthesizer, etc.
sound.o: Common sound functions required by all modules.
For the specific sound modules (e.g., sb.o for the Soundblaster),
read the documentation on that module to determine what options
are available, for example IRQ, address, DMA.
Warning, the options for different cards sometime use different names
for the same or a similar feature (dma1= versus dma16=). As a last
resort, inspect the code (search for MODULE_PARM).
INSMOD:
=======
If loading via insmod, the common modules must be loaded in the
order below BEFORE loading the other sound modules. The card-specific
modules may then be loaded (most require parameters). For example,
I use the following via a shell script to load my SoundBlaster:
SB_BASE=0x240
SB_IRQ=9
SB_DMA=3
SB_DMA2=5
SB_MPU=0x300
#
echo Starting sound
/sbin/insmod soundcore
/sbin/insmod soundlow
/sbin/insmod sound
#
echo Starting sound blaster....
/sbin/insmod uart401
/sbin/insmod sb io=$SB_BASE irq=$SB_IRQ dma=$SB_DMA dma16=$SB_DMA2 mpu_io=$SB_MP
MODPROBE:
=========
If loading via modprobe, these common files are automatically loaded
when requested by modprobe. For example, my /etc/conf.modules contains:
alias sound sb
options sb io=0x240 irq=9 dma=3 dma16=5 mpu_io=0x300
All you need to do to load the module is:
/sbin/modprobe sb
Sound Status:
=============
The status of sound may be read/checked by:
cat /proc/sound
cat /dev/sndstat
cat (anyfile).au >/dev/audio
The status of the modules and which modules depend on
which other modules may be checked by:
/sbin/lsmod
/sbin/lsmod should show something like the following:
sb 26280 0
uart401 5640 0 [sb]
sound 57112 0 [sb uart401]
soundlow 208 0 [sound]
soundcore 1968 8 [sb sound]
Removing Sound:
===============
Sound may be removed by using /sbin/rmmod in the reverse order
in which you load the modules. Note, if a program has a sound device
open (e.g., xmixer), that module (and the modules on which it
depends) may not be unloaded.
For example, I use the following to remove my Soundblaster (rmmod
in the reverse order in which I loaded the modules):
/sbin/rmmod sb
/sbin/rmmod uart401
/sbin/rmmod sound
/sbin/rmmod soundlow
/sbin/rmmod soundcore
Multiple Sound Cards:
=====================
The sound drivers will support multiple sound cards and there
are some great applications like multitrack that support them.
Typically, you need two sound cards of different types. Note, this
uses more precious interrupts and DMA channels and sometimes
can be a configuration nightmare. I have heard reports of 3-4
sound cards (typically I only use 2).
On my machine I have two sound cards (cs4232 and Soundblaster Vibra
16). By loading sound as modules, I can control which is the first
sound device (/dev/dsp, /dev/audio, /dev/mixer) and which is
the second. Normally, the cs4232 (Dell sound on the motherboard)
would be the first sound device, but I prefer the Soundblaster.
All you have to do is to load the one you want as /dev/dsp
first (in my case "sb") and then load the other one
(in my case "cs4232").
Warning: I have never been able to get two PnP sound cards of the
same type to load at the same time. I have tried this several times
with the Soundblaster Vibra 16 cards. OSS has indicated that this
is a PnP problem.... If anyone has any luck doing this, please
send me an E-MAIL. PCI sound cards should not have this problem.
Sound Problems:
===============
First RTFM (including the troubleshooting section
in the Sound-HOWTO).
1) If you are having problems loading the modules (for
example, if you get device conflict errors) try the
following:
A) If you have Win95 or NT on the same computer,
write down what addresses, IRQ, and DMA channels
those were using for the same hardware. You probably
can use these addresses, IRQs, and DMA channels.
B) Check (cat) /proc/interrupts, /proc/ioports,
and /proc/dma. Are you trying to use an address,
IRQ or DMA port that another device is using?
C) Check (cat) /proc/sys/pnp (if this exists, you
may need a kernel patch to get this device).
D) Inspect your /var/log/messages file. Often that will
indicate what IRQ or IO port could not be obtained
E) Try another port or IRQ. Note this may involve
using the PnP tools to move the sound card to
another location.
2) If you get motorboating (the same sound or part of a
sound clip repeated), you probably have either an IRQ
or DMA conflict. Move the card to another address. This
has happened to me when playing long files when I had
an IRQ conflict.
3) Ask for help on the sound list or send E-MAIL to the
sound driver author/maintainer.
4) Turn on debug in drivers/sound/sound_config.h (DEB, DDB, MDB).
Configuring Sound:
==================
There are several ways of configuring your sound:
1) Hardcoded in the kernel at compile time (not applicable when
using sound modules). This was the OLD way!
2) On the command line when using insmod.
3) In /etc/conf.modules when using modprobe.
4) Via RedHat's /usr/sbin/sndconfig program (text based).
5) Via the OSS soundconf program (with the commercial version
of the OSS driver.
And I am sure, several other ways.
Anyone want to write a linuxconf module for configuring sound?
For More Information (RTFM):
============================
1) Information on kernel modules: linux/Documentation/modules.txt
and manual pages for insmod and modprobe.
2) Information on PnP, RTFM manual pages for isapnp.
3) Sound-HOWTO and Sound-Playing-HOWTO.
4) OSS's WWW site at http://www.opensound.com.
5) All the files in linux/Documentation/sound.
6) The comments and code in linux/drivers/sound.
7) The sndconfig and rhsound documentation from RedHat.
8) The Linux-sound mailing list: sound-list@redhat.com
Contact Information:
====================
Wade Hampton: (whampton@staffnet.com)
......@@ -157,13 +157,13 @@
#
# * MultiSound Classic/Monterey/Tahiti:
#
# insmod soundcore
# modprobe soundcore
# insmod msnd
# insmod msnd_classic io=0x290 irq=7 mem=0xd0000
#
# * MultiSound Pinnacle in PnP mode:
#
# insmod soundcore
# modprobe soundcore
# insmod msnd
# isapnp mypinnacle.conf
# insmod msnd_pinnacle io=0x210 irq=5 mem=0xd8000 <-- match mypinnacle.conf values
......@@ -359,8 +359,8 @@
# attempting to record at a sampling rate other than the DAT rate may
# be problematic (i.e. trying to record at 8000Hz when the DAT signal
# is 44100Hz). If you have a problem with this, set the recording
# input to the line in if you need to record at a rate other than
# that of the DAT rate.
# input to analog if you need to record at a rate other than that of
# the DAT rate.
#
#
# -- Shell archive attached below, just run `sh MultiSound' to extract.
......@@ -373,7 +373,7 @@
# To extract the files from this archive, save it to some FILE, remove
# everything before the `!/bin/sh' line above, then type `sh FILE'.
#
# Made on 1998-09-05 08:26 EDT by <andrewtv@ztransform.velsoft.com>.
# Made on 1998-12-04 10:07 EST by <andrewtv@ztransform.velsoft.com>.
# Source directory was `/home/andrewtv/programming/pinnacle/pinnacle'.
#
# Existing files will *not* be overwritten unless `-c' is specified.
......@@ -381,10 +381,11 @@
# This shar contains:
# length mode name
# ------ ---------- ------------------------------------------
# 2111 -rw-rw-r-- MultiSound.d/setdigital.c
# 10301 -rw-rw-r-- MultiSound.d/pinnaclecfg.c
# 96 -rw-rw-r-- MultiSound.d/Makefile
# 2046 -rw-rw-r-- MultiSound.d/setdigital.c
# 10235 -rw-rw-r-- MultiSound.d/pinnaclecfg.c
# 106 -rw-rw-r-- MultiSound.d/Makefile
# 141 -rw-rw-r-- MultiSound.d/conv.l
# 1472 -rw-rw-r-- MultiSound.d/msndreset.c
#
save_IFS="${IFS}"
IFS="${IFS}:"
......@@ -431,7 +432,7 @@ else
fi
rm -f 1231235999 $$.touch
#
if mkdir _sh21233; then
if mkdir _sh01426; then
$echo 'x -' 'creating lock directory'
else
$echo 'failed to create lock directory'
......@@ -467,8 +468,6 @@ X * You should have received a copy of the GNU General Public License
X * along with this program; if not, write to the Free Software
X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X *
X * $Id: setdigital.c,v 1.1 1998/08/29 03:32:33 andrewtv Exp $
X *
X ********************************************************************/
X
#include <stdio.h>
......@@ -528,19 +527,19 @@ X
X return 0;
}
SHAR_EOF
$shar_touch -am 0828233298 'MultiSound.d/setdigital.c' &&
$shar_touch -am 1204092598 'MultiSound.d/setdigital.c' &&
chmod 0664 'MultiSound.d/setdigital.c' ||
$echo 'restore of' 'MultiSound.d/setdigital.c' 'failed'
if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
&& ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
md5sum -c << SHAR_EOF >/dev/null 2>&1 \
|| $echo 'MultiSound.d/setdigital.c:' 'MD5 check failed'
47720746d4367bae9954787c311c56fd MultiSound.d/setdigital.c
e87217fc3e71288102ba41fd81f71ec4 MultiSound.d/setdigital.c
SHAR_EOF
else
shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'MultiSound.d/setdigital.c'`"
test 2111 -eq "$shar_count" ||
$echo 'MultiSound.d/setdigital.c:' 'original size' '2111,' 'current size' "$shar_count!"
test 2046 -eq "$shar_count" ||
$echo 'MultiSound.d/setdigital.c:' 'original size' '2046,' 'current size' "$shar_count!"
fi
fi
# ============= MultiSound.d/pinnaclecfg.c ==============
......@@ -575,8 +574,6 @@ X * You should have received a copy of the GNU General Public License
X * along with this program; if not, write to the Free Software
X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X *
X * $Id: pinnaclecfg.c,v 1.3 1998/08/29 03:32:32 andrewtv Exp $
X *
X ********************************************************************/
X
#include <stdio.h>
......@@ -984,19 +981,19 @@ X
X return 0;
}
SHAR_EOF
$shar_touch -am 0905082598 'MultiSound.d/pinnaclecfg.c' &&
$shar_touch -am 1204092598 'MultiSound.d/pinnaclecfg.c' &&
chmod 0664 'MultiSound.d/pinnaclecfg.c' ||
$echo 'restore of' 'MultiSound.d/pinnaclecfg.c' 'failed'
if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
&& ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
md5sum -c << SHAR_EOF >/dev/null 2>&1 \
|| $echo 'MultiSound.d/pinnaclecfg.c:' 'MD5 check failed'
71f99b834a2845daae8ae034623e313e MultiSound.d/pinnaclecfg.c
366bdf27f0db767a3c7921d0a6db20fe MultiSound.d/pinnaclecfg.c
SHAR_EOF
else
shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'MultiSound.d/pinnaclecfg.c'`"
test 10301 -eq "$shar_count" ||
$echo 'MultiSound.d/pinnaclecfg.c:' 'original size' '10301,' 'current size' "$shar_count!"
test 10235 -eq "$shar_count" ||
$echo 'MultiSound.d/pinnaclecfg.c:' 'original size' '10235,' 'current size' "$shar_count!"
fi
fi
# ============= MultiSound.d/Makefile ==============
......@@ -1007,26 +1004,26 @@ else
sed 's/^X//' << 'SHAR_EOF' > 'MultiSound.d/Makefile' &&
CC = gcc
CFLAGS = -O
PROGS = setdigital pinnaclecfg conv
PROGS = setdigital msndreset pinnaclecfg conv
X
all: $(PROGS)
X
clean:
X rm -f $(PROGS)
SHAR_EOF
$shar_touch -am 0828231798 'MultiSound.d/Makefile' &&
$shar_touch -am 1204092398 'MultiSound.d/Makefile' &&
chmod 0664 'MultiSound.d/Makefile' ||
$echo 'restore of' 'MultiSound.d/Makefile' 'failed'
if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
&& ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
md5sum -c << SHAR_EOF >/dev/null 2>&1 \
|| $echo 'MultiSound.d/Makefile:' 'MD5 check failed'
ab95a049d10611a5e5d559a56965b33f MultiSound.d/Makefile
76ca8bb44e3882edcf79c97df6c81845 MultiSound.d/Makefile
SHAR_EOF
else
shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'MultiSound.d/Makefile'`"
test 96 -eq "$shar_count" ||
$echo 'MultiSound.d/Makefile:' 'original size' '96,' 'current size' "$shar_count!"
test 106 -eq "$shar_count" ||
$echo 'MultiSound.d/Makefile:' 'original size' '106,' 'current size' "$shar_count!"
fi
fi
# ============= MultiSound.d/conv.l ==============
......@@ -1059,5 +1056,82 @@ SHAR_EOF
$echo 'MultiSound.d/conv.l:' 'original size' '141,' 'current size' "$shar_count!"
fi
fi
rm -fr _sh21233
# ============= MultiSound.d/msndreset.c ==============
if test -f 'MultiSound.d/msndreset.c' && test "$first_param" != -c; then
$echo 'x -' SKIPPING 'MultiSound.d/msndreset.c' '(file already exists)'
else
$echo 'x -' extracting 'MultiSound.d/msndreset.c' '(text)'
sed 's/^X//' << 'SHAR_EOF' > 'MultiSound.d/msndreset.c' &&
/*********************************************************************
X *
X * msndreset.c - resets the MultiSound card
X *
X * Copyright (C) 1998 Andrew Veliath
X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by
X * the Free Software Foundation; either version 2 of the License, or
X * (at your option) any later version.
X *
X * This program is distributed in the hope that it will be useful,
X * but WITHOUT ANY WARRANTY; without even the implied warranty of
X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X * GNU General Public License for more details.
X *
X * You should have received a copy of the GNU General Public License
X * along with this program; if not, write to the Free Software
X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X *
X ********************************************************************/
X
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/soundcard.h>
X
int main(int argc, char *argv[])
{
X int fd;
X
X if (argc != 2) {
X fprintf(stderr, "usage: msndreset <mixer device>\n");
X exit(1);
X }
X
X if ((fd = open(argv[1], O_RDWR)) < 0) {
X perror(argv[1]);
X exit(1);
X }
X
X if (ioctl(fd, SOUND_MIXER_PRIVATE1, 0) < 0) {
X fprintf(stderr, "error: msnd ioctl reset failed\n");
X perror("ioctl");
X close(fd);
X exit(1);
X }
X
X close(fd);
X
X return 0;
}
SHAR_EOF
$shar_touch -am 1204100698 'MultiSound.d/msndreset.c' &&
chmod 0664 'MultiSound.d/msndreset.c' ||
$echo 'restore of' 'MultiSound.d/msndreset.c' 'failed'
if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
&& ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
md5sum -c << SHAR_EOF >/dev/null 2>&1 \
|| $echo 'MultiSound.d/msndreset.c:' 'MD5 check failed'
c52f876521084e8eb25e12e01dcccb8a MultiSound.d/msndreset.c
SHAR_EOF
else
shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'MultiSound.d/msndreset.c'`"
test 1472 -eq "$shar_count" ||
$echo 'MultiSound.d/msndreset.c:' 'original size' '1472,' 'current size' "$shar_count!"
fi
fi
rm -fr _sh01426
exit 0
......@@ -90,15 +90,14 @@ e.g.:
AverMedia
---------
...
ADS Channel Surfer
------------------
...
Maxi TV Video PCI 2 card
------------------------
...
......@@ -155,7 +155,7 @@ ENTRY(lcall7)
ret_from_fork:
GET_CURRENT(%ebx)
#ifdef __SMP__
btrl $0, SYMBOL_NAME(scheduler_lock)
lock ; btrl $0, SYMBOL_NAME(scheduler_lock)
#endif /* __SMP__ */
jmp ret_from_sys_call
......@@ -193,6 +193,7 @@ restore_all:
ALIGN
signal_return:
sti # we can get here from an interrupt handler
testl $(VM_MASK),EFLAGS(%esp)
movl %esp,%eax
jne v86_signal_return
......
......@@ -105,19 +105,24 @@ static void hard_idle(void)
*/
static int cpu_idle(void *unused)
{
unsigned long start_idle = jiffies;
int work = 1;
unsigned long start_idle = 0;
/* endless idle loop with no priority at all */
current->priority = 0;
current->counter = -100;
for (;;) {
if (work)
start_idle = jiffies;
if (jiffies - start_idle > HARD_IDLE_TIMEOUT)
hard_idle();
else {
if (boot_cpu_data.hlt_works_ok && !hlt_counter && !current->need_resched)
__asm__("hlt");
}
if (current->need_resched)
start_idle = jiffies;
current->policy = SCHED_YIELD;
work = current->need_resched;
schedule();
check_pgt_cache();
}
......@@ -131,12 +136,12 @@ static int cpu_idle(void *unused)
int cpu_idle(void *unused)
{
/* endless idle loop with no priority at all */
current->priority = 0;
current->counter = -100;
while(1) {
if (current_cpu_data.hlt_works_ok && !hlt_counter && !current->need_resched)
__asm__("hlt");
current->policy = SCHED_YIELD;
schedule();
check_pgt_cache();
}
......@@ -579,7 +584,6 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
*childregs = *regs;
childregs->eax = 0;
childregs->esp = esp;
childregs->eflags = regs->eflags & 0xffffcfff; /* iopl always 0 for a new process */
p->tss.esp = (unsigned long) childregs;
p->tss.esp0 = (unsigned long) (childregs+1);
......
......@@ -108,108 +108,94 @@ asmlinkage int old_select(struct sel_arg_struct *arg)
*
* This is really horribly ugly.
*/
asmlinkage int sys_ipc (uint call, int first, int second, int third, void *ptr, long fifth)
asmlinkage int sys_ipc (uint call, int first, int second,
int third, void *ptr, long fifth)
{
int version, ret;
lock_kernel();
version = call >> 16; /* hack for backward compatibility */
call &= 0xffff;
if (call <= SEMCTL)
switch (call) {
case SEMOP:
ret = sys_semop (first, (struct sembuf *)ptr, second);
goto out;
return sys_semop (first, (struct sembuf *)ptr, second);
case SEMGET:
ret = sys_semget (first, second, third);
goto out;
return sys_semget (first, second, third);
case SEMCTL: {
union semun fourth;
ret = -EINVAL;
if (!ptr)
goto out;
ret = -EFAULT;
return -EINVAL;
if (get_user(fourth.__pad, (void **) ptr))
goto out;
ret = sys_semctl (first, second, third, fourth);
goto out;
return -EFAULT;
return sys_semctl (first, second, third, fourth);
}
default:
ret = -EINVAL;
goto out;
return -EINVAL;
}
version = call >> 16; /* hack for backward compatibility */
if (call <= MSGCTL)
switch (call) {
case MSGSND:
ret = sys_msgsnd (first, (struct msgbuf *) ptr,
return sys_msgsnd (first, (struct msgbuf *) ptr,
second, third);
goto out;
case MSGRCV:
switch (version) {
case 0: {
struct ipc_kludge tmp;
ret = -EINVAL;
if (!ptr)
goto out;
ret = -EFAULT;
if (copy_from_user(&tmp,(struct ipc_kludge *) ptr,
sizeof (tmp)))
goto out;
ret = sys_msgrcv (first, tmp.msgp, second, tmp.msgtyp, third);
goto out;
return -EINVAL;
if (copy_from_user(&tmp,
(struct ipc_kludge *) ptr,
sizeof (tmp)))
return -EFAULT;
return sys_msgrcv (first, tmp.msgp, second,
tmp.msgtyp, third);
}
case 1: default:
ret = sys_msgrcv (first, (struct msgbuf *) ptr, second, fifth, third);
goto out;
default:
return sys_msgrcv (first,
(struct msgbuf *) ptr,
second, fifth, third);
}
case MSGGET:
ret = sys_msgget ((key_t) first, second);
goto out;
return sys_msgget ((key_t) first, second);
case MSGCTL:
ret = sys_msgctl (first, second, (struct msqid_ds *) ptr);
goto out;
return sys_msgctl (first, second,
(struct msqid_ds *) ptr);
default:
ret = -EINVAL;
goto out;
return -EINVAL;
}
if (call <= SHMCTL)
switch (call) {
case SHMAT:
switch (version) {
case 0: default: {
default: {
ulong raddr;
ret = sys_shmat (first, (char *) ptr, second, &raddr);
ret = sys_shmat (first, (char *) ptr,
second, &raddr);
if (ret)
goto out;
ret = put_user (raddr, (ulong *) third);
goto out;
return ret;
return put_user (raddr, (ulong *) third);
}
case 1: /* iBCS2 emulator entry point */
ret = -EINVAL;
if (!segment_eq(get_fs(), get_ds()))
goto out;
ret = sys_shmat (first, (char *) ptr, second, (ulong *) third);
goto out;
return -EINVAL;
return sys_shmat (first, (char *) ptr,
second, (ulong *) third);
}
case SHMDT:
ret = sys_shmdt ((char *)ptr);
goto out;
return sys_shmdt ((char *)ptr);
case SHMGET:
ret = sys_shmget (first, second, third);
goto out;
return sys_shmget (first, second, third);
case SHMCTL:
ret = sys_shmctl (first, second, (struct shmid_ds *) ptr);
goto out;
return sys_shmctl (first, second,
(struct shmid_ds *) ptr);
default:
ret = -EINVAL;
goto out;
return -EINVAL;
}
else
ret = -EINVAL;
out:
unlock_kernel();
return ret;
return -EINVAL;
}
/*
......
......@@ -44,8 +44,9 @@
#define LO_MAGIC 0x68797548
static int nbd_blksizes[MAX_NBD] = {1024, 1024,};
static int nbd_sizes[MAX_NBD] = {0x7fffffff, 0x7fffffff,};
static int nbd_blksizes[MAX_NBD];
static int nbd_sizes[MAX_NBD];
static int nbd_bytesizes[MAX_NBD];
static struct nbd_device nbd_dev[MAX_NBD];
......@@ -382,9 +383,11 @@ static int nbd_ioctl(struct inode *inode, struct file *file,
if ((arg & 511) || (arg > PAGE_SIZE))
return -EINVAL;
nbd_blksizes[dev] = arg;
nbd_sizes[dev] = arg/nbd_blksizes[dev];
return 0;
case NBD_SET_SIZE:
nbd_sizes[dev] = arg;
nbd_bytesizes[dev] = arg;
nbd_sizes[dev] = arg/nbd_blksizes[dev];
return 0;
case NBD_DO_IT:
if (!lo->file)
......@@ -400,6 +403,8 @@ static int nbd_ioctl(struct inode *inode, struct file *file,
dev, (long) lo->head, (long) lo->tail, requests_in, requests_out);
return 0;
#endif
case BLKGETSIZE:
return put_user(nbd_bytesizes[dev]/512, (long *) arg);
}
return -EINVAL;
}
......@@ -472,6 +477,9 @@ int nbd_init(void)
nbd_dev[i].file = NULL;
nbd_dev[i].magic = LO_MAGIC;
nbd_dev[i].flags = 0;
nbd_blksizes[i] = 1024;
nbd_bytesizes[i] = 0x7fffffff;
nbd_sizes[i] = nbd_bytesizes[i]/nbd_blksizes[i];
}
return 0;
}
......
......@@ -35,10 +35,13 @@ if [ "$CONFIG_SERIAL_NONSTANDARD" = "y" ]; then
fi
tristate 'SDL RISCom/8 card support' CONFIG_RISCOM8
tristate 'Specialix IO8+ card support' CONFIG_SPECIALIX
if [ "$CONFIG_SPECIALIX" = "y" -o "$CONFIG_SPECIALIX" = "m" ]; then
if [ "$CONFIG_SPECIALIX" != "n" ]; then
bool 'Specialix DTR/RTS pin is RTS' CONFIG_SPECIALIX_RTSCTS
fi
tristate 'Hayes ESP serial port support' CONFIG_ESPSERIAL
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
dep_tristate 'Multi-Tech multiport card support' CONFIG_ISI m
fi
fi
bool 'Unix98 PTY support' CONFIG_UNIX98_PTYS
if [ "$CONFIG_UNIX98_PTYS" = "y" ]; then
......@@ -107,10 +110,12 @@ if [ "$CONFIG_VIDEO_DEV" != "n" ]; then
hex ' Aztech/Packard Bell I/O port (0x350 or 0x358)' CONFIG_RADIO_AZTECH_PORT 350
fi
dep_tristate 'Miro PCM20 Radio' CONFIG_RADIO_MIROPCM20 $CONFIG_VIDEO_DEV
dep_tristate 'BT848 Video For Linux' CONFIG_VIDEO_BT848 $CONFIG_VIDEO_DEV
if [ "$CONFIG_PCI" != "n" ]; then
dep_tristate 'BT848 Video For Linux' CONFIG_VIDEO_BT848 $CONFIG_VIDEO_DEV
fi
if [ "$CONFIG_PARPORT" != "n" ]; then
dep_tristate 'Quickcam BW Video For Linux' CONFIG_VIDEO_BWQCAM $CONFIG_VIDEO_DEV
dep_tristate 'Colour QuickCam Video For Linux (EXPERIMENTAL)' CONFIG_VIDEO_CQCAM $CONFIG_VIDEO_DEV
dep_tristate 'Quickcam BW Video For Linux' CONFIG_VIDEO_BWQCAM $CONFIG_VIDEO_DEV $CONFIG_PARPORT
dep_tristate 'Colour QuickCam Video For Linux (EXPERIMENTAL)' CONFIG_VIDEO_CQCAM $CONFIG_VIDEO_DEV $CONFIG_PARPORT
fi
dep_tristate 'Mediavision Pro Movie Studio Video For Linux' CONFIG_VIDEO_PMS $CONFIG_VIDEO_DEV
dep_tristate 'SAA5249 Teletext processor' CONFIG_VIDEO_SAA5249 $CONFIG_VIDEO_DEV
......
......@@ -118,6 +118,14 @@ else
endif
endif
ifeq ($(CONFIG_ISI),y)
L_OBJS += isicom.o
else
ifeq ($(CONFIG_ISI),m)
M_OBJS += isicom.o
endif
endif
ifeq ($(CONFIG_ESPSERIAL),y)
L_OBJS += esp.o
else
......
......@@ -31,7 +31,7 @@
* fix RAW Composite grabbing for NTSC
* fix VBI reading double frames when grabbing is active
* allow for different VDELAYs
* extra modules for tda9850, tda8425, any volunteers???
* handle tda8425 properly
*/
#include <linux/module.h>
......@@ -98,7 +98,8 @@ static int bttv_num; /* number of Bt848s in use */
static struct bttv bttvs[BTTV_MAX];
#define I2C_TIMING (0x7<<4)
#define I2C_DELAY 10
#define I2C_DELAY 50 /* Was 10 - some reports that more is needed
regardless of what the spec says */
#define I2C_SET(CTRL,DATA) \
{ btwrite((CTRL<<1)|(DATA), BT848_I2C); udelay(I2C_DELAY); }
#define I2C_GET() (btread(BT848_I2C)&1)
......@@ -1460,6 +1461,12 @@ static int bttv_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
v.rangelow=0;
v.rangehigh=0xFFFFFFFF;
v.flags=VIDEO_TUNER_PAL|VIDEO_TUNER_NTSC|VIDEO_TUNER_SECAM;
if (btv->audio_chip == TDA9850) {
unsigned char ALR1;
ALR1 = I2CRead(&(btv->i2c), I2C_TDA9850|1);
if (ALR1 & 32)
v.flags |= VIDEO_TUNER_STEREO_ON;
}
v.mode = btv->win.norm;
v.signal = (btread(BT848_DSTATUS)&BT848_DSTATUS_HLOC) ? 0xFFFF : 0;
if(copy_to_user(arg,&v,sizeof(v)))
......@@ -1687,8 +1694,17 @@ static int bttv_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
v.flags&=~(VIDEO_AUDIO_MUTE|VIDEO_AUDIO_MUTABLE);
v.flags|=VIDEO_AUDIO_MUTABLE;
strcpy(v.name,"TV");
if (btv->have_msp3400)
{
if (btv->audio_chip == TDA9850) {
unsigned char ALR1;
v.flags|=VIDEO_AUDIO_VOLUME;
ALR1 = I2CRead(&(btv->i2c), I2C_TDA9850|1);
v.mode = VIDEO_SOUND_MONO;
v.mode |= (ALR1 & 32) ? VIDEO_SOUND_STEREO:0;
v.mode |= (ALR1 & 32) ? VIDEO_SOUND_LANG1:0;
v.volume = 32768; /* fixme */
v.step = 4096;
}
else if (btv->have_msp3400) {
v.flags|=VIDEO_AUDIO_VOLUME |
VIDEO_AUDIO_BASS |
VIDEO_AUDIO_TREBLE;
......@@ -1726,8 +1742,20 @@ static int bttv_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
bt848_muxsel(btv,v.audio);
if(!(v.flags&VIDEO_AUDIO_MUTE))
audio(btv, AUDIO_UNMUTE);
if (btv->have_msp3400)
{
if (btv->audio_chip == TDA9850) {
unsigned char con3 = 0;
if (v.mode & VIDEO_SOUND_LANG1)
con3 = 0x80; /* sap */
if (v.mode & VIDEO_SOUND_STEREO)
con3 = 0x40; /* stereo */
I2CWrite(&(btv->i2c), I2C_TDA9850,
TDA9850_CON3, con3, 1);
if (v.flags & VIDEO_AUDIO_VOLUME)
I2CWrite(&(btv->i2c), I2C_TDA9850,
TDA9850_CON4,
(v.volume>>12) & 15, 1);
}
else if (btv->have_msp3400) {
i2c_control_device(&(btv->i2c),
I2C_DRIVERID_MSP3400,
MSP_SET_VOLUME,&(v.volume));
......@@ -2389,7 +2417,11 @@ static void idcard(int i)
if (I2CRead(&(btv->i2c), I2C_HAUPEE)>=0) {
if(btv->id>849)
{
btv->type=BTTV_HAUPPAUGE878;
btv->pll.pll_ifreq = 28636363;
btv->pll.pll_crystal = BT848_IFORM_XT0;
}
else
btv->type=BTTV_HAUPPAUGE;
}
......@@ -2397,7 +2429,7 @@ static void idcard(int i)
if (I2CRead(&(btv->i2c), I2C_STBEE)>=0)
btv->type=BTTV_STB;
if (btv->type == BTTV_MIRO) {
if (btv->type == BTTV_MIRO || btv->type == BTTV_MIROPRO) {
/* auto detect tuner for MIRO cards */
btv->tuner_type=((btread(BT848_GPIO_DATA)>>10)-1)&7;
}
......@@ -2582,10 +2614,13 @@ static int init_bt848(int i)
btv->grabcount=0;
btv->grab=0;
btv->lastgrab=0;
btv->field=btv->last_field=0;
btv->video_dev.minor = -1;
btv->vbi_dev.minor = -1;
btv->radio_dev.minor = -1;
btv->field=btv->last_field=0;
/* cevans - prevents panic if initialization bails due to memory
* alloc failures!
*/
btv->video_dev.minor = -1;
btv->vbi_dev.minor = -1;
btv->radio_dev.minor = -1;
/* i2c */
memcpy(&(btv->i2c),&bttv_i2c_bus_template,sizeof(struct i2c_bus));
......
......@@ -56,6 +56,10 @@
static struct mouse_status mouse;
static int mouse_irq = MOUSE_IRQ;
#ifdef MODULE
MODULE_PARM(mouse_irq, "i");
#endif
__initfunc(void bmouse_setup(char *str, int *ints))
{
if (ints[0] > 0)
......
This diff is collapsed.
struct qcam_device {
struct video_device vdev;
struct pardevice *pdev;
struct parport *pport;
int width, height;
int bpp;
int contrast, brightness, whitebal;
int transfer_scale;
int top, left;
unsigned int bidirectional;
};
#define QC_1_1 0
#define QC_2_1 2
#define QC_4_1 4
#define QC_16BPP 8
#define QC_32BPP 16
#define QC_24BPP 24
This diff is collapsed.
......@@ -10,9 +10,9 @@ dep_tristate ' Microsoft SideWinder, Genius Digital joysticks and gamepads' CO
dep_tristate ' ThrustMaster DirectConnect joysticks and gamepads' CONFIG_JOY_THRUSTMASTER $CONFIG_JOYSTICK
dep_tristate ' PDPI Lightning 4 gamecards' CONFIG_JOY_LIGHTNING $CONFIG_JOYSTICK
if [ "$CONFIG_PARPORT" != "n" ]; then
dep_tristate ' NES, SNES, PSX, Multisystem joysticks and gamepads' CONFIG_JOY_CONSOLE $CONFIG_JOYSTICK
dep_tristate ' Sega, Multisystem joysticks and gamepads' CONFIG_JOY_DB9 $CONFIG_JOYSTICK
dep_tristate ' TurboGraFX Multisystem joystick interface' CONFIG_JOY_TURBOGRAFX $CONFIG_JOYSTICK
dep_tristate ' NES, SNES, PSX, Multisystem joysticks and gamepads' CONFIG_JOY_CONSOLE $CONFIG_JOYSTICK $CONFIG_PARPORT
dep_tristate ' Sega, Multisystem joysticks and gamepads' CONFIG_JOY_DB9 $CONFIG_JOYSTICK $CONFIG_PARPORT
dep_tristate ' TurboGraFX Multisystem joystick interface' CONFIG_JOY_TURBOGRAFX $CONFIG_JOYSTICK $CONFIG_PARPORT
fi
if [ "$CONFIG_AMIGA" = "y" ]; then
dep_tristate ' Amiga joysticks' CONFIG_JOY_AMIGA $CONFIG_JOYSTICK
......
/*
* Macintosh ADB Mouse driver for Linux
*
* 27 Oct 1997 Michael Schmitz
*
* Apple mouse protocol according to:
*
* Device code shamelessly stolen from:
*/
/*
* Atari Mouse Driver for Linux
* by Robert de Vries (robert@and.nl) 19Jul93
*
* 16 Nov 1994 Andreas Schwab
* Compatibility with busmouse
* Support for three button mouse (shamelessly stolen from MiNT)
* third button wired to one of the joystick directions on joystick 1
*
* 1996/02/11 Andreas Schwab
* Module support
* Allow multiple open's
*/
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/miscdevice.h>
#include <linux/mm.h>
#include <linux/random.h>
#include <linux/poll.h>
#include <linux/init.h>
#include <asm/setup.h>
#include <asm/mac_mouse.h>
#include <asm/segment.h>
#include <asm/uaccess.h>
static struct mouse_status mouse;
static int mac_mouse_x_threshold = 2, mac_mouse_y_threshold = 2;
static int mac_mouse_buttons = 0;
extern void (*mac_mouse_interrupt_hook) (char *, int);
extern int mac_emulate_button2;
extern int mac_emulate_button3;
extern int console_loglevel;
/*
* XXX: need to figure out what ADB mouse packets mean ...
* This is the stuff stolen from the Atari driver ...
*/
static void mac_mouse_interrupt(char *buf, int nb)
{
static int buttons = 7; /* all mouse buttons _up_ !! */
/*
Handler 1 -- 100cpi original Apple mouse protocol.
Handler 2 -- 200cpi original Apple mouse protocol.
For Apple's standard one-button mouse protocol the data array will
contain the following values:
BITS COMMENTS
data[0] = 0000 0000 ADB packet identifer.
data[1] = ???? ???? (?)
data[2] = ???? ??00 Bits 0-1 should be zero for a mouse device.
data[3] = bxxx xxxx First button and x-axis motion.
data[4] = byyy yyyy Second button and y-axis motion.
NOTE: data[0] is confirmed by the parent function and need not be
checked here.
*/
/*
Handler 4 -- Apple Extended mouse protocol.
For Apple's 3-button mouse protocol the data array will contain the
following values:
BITS COMMENTS
data[0] = 0000 0000 ADB packet identifer.
data[1] = 0100 0000 Extended protocol register.
Bits 6-7 are the device id, which should be 1.
Bits 4-5 are resolution which is in "units/inch".
The Logitech MouseMan returns these bits clear but it has
200/300cpi resolution.
Bits 0-3 are unique vendor id.
data[2] = 0011 1100 Bits 0-1 should be zero for a mouse device.
Bits 2-3 should be 8 + 4.
Bits 4-7 should be 3 for a mouse device.
data[3] = bxxx xxxx Left button and x-axis motion.
data[4] = byyy yyyy Second button and y-axis motion.
data[5] = byyy bxxx Third button and fourth button.
Y is additiona. high bits of y-axis motion.
X is additional high bits of x-axis motion.
NOTE: data[0] and data[2] are confirmed by the parent function and
need not be checked here.
*/
/*
* 'buttons' here means 'button down' states!
* Button 1 (left) : bit 2, busmouse button 3
* Button 2 (right) : bit 0, busmouse button 1
* Button 3 (middle): bit 1, busmouse button 2
*/
/* x/y and buttons swapped */
if (buf[0] == 0) { /* real packet : use buttons? */
#ifdef DEBUG_ADBMOUSE
if (console_loglevel >= 8)
printk("mac_mouse: real data; ");
#endif
/* button 1 (left, bit 2) : always significant ! */
buttons = (buttons&3) | (buf[3] & 0x80 ? 4 : 0); /* 1+2 unchanged */
/* button 2 (right, bit 0) present ? */
if ( !mac_emulate_button2 )
buttons = (buttons&6) | (buf[4] & 0x80 ? 1 : 0); /* 2+3 unchanged */
/* button 2 (middle) present? */
/* data valid only if extended mouse format ! (buf[3] = 0 else)*/
if ( !mac_emulate_button3 && buf[1]&0x40 )
buttons = (buttons&5) | (buf[5] & 0x80 ? 2 : 0); /* 1+3 unchanged */
} else { /* fake packet : use 2+3 */
#ifdef DEBUG_ADBMOUSE
if (console_loglevel >= 8)
printk("mac_mouse: fake data; ");
#endif
/* we only see state changes here, but the fake driver takes care
* to preserve state... button 1 state must stay unchanged! */
buttons = (buttons&4) | ((buf[4] & 0x80 ? 1 : 0) | (buf[5] & 0x80 ? 2 : 0));
}
add_mouse_randomness(((~buttons & 7) << 16) + ((buf[2]&0x7f) << 8) + (buf[1]&0x7f));
mouse.buttons = buttons & 7;
mouse.dx += ((buf[4]&0x7f) < 64 ? (buf[4]&0x7f) : (buf[4]&0x7f)-128 );
mouse.dy -= ((buf[3]&0x7f) < 64 ? (buf[3]&0x7f) : (buf[3]&0x7f)-128 );
#ifdef DEBUG_ADBMOUSE
if (console_loglevel >= 8)
printk(" %X %X %X buttons %x dx %d dy %d \n",
buf[3], buf[4], buf[5], mouse.buttons, mouse.dx, mouse.dy);
#endif
mouse.ready = 1;
wake_up_interruptible(&mouse.wait);
if (mouse.fasyncptr)
kill_fasync(mouse.fasyncptr, SIGIO);
}
static int fasync_mouse(int fd, struct file *filp, int on)
{
int retval;
retval = fasync_helper(fd, filp, on, &mouse.fasyncptr);
if (retval < 0)
return retval;
return 0;
}
static int release_mouse(struct inode *inode, struct file *file)
{
fasync_mouse(-1, file, 0);
if (--mouse.active)
return 0;
mac_mouse_interrupt_hook = NULL;
MOD_DEC_USE_COUNT;
return 0;
}
static int open_mouse(struct inode *inode, struct file *file)
{
if (mouse.active++)
return 0;
mouse.ready = 0;
mouse.dx = mouse.dy = 0;
mac_mouse_buttons = 0;
MOD_INC_USE_COUNT;
mac_mouse_interrupt_hook = mac_mouse_interrupt;
return 0;
}
static ssize_t write_mouse(struct file *file, const char *buffer,
size_t count, loff_t *ppos)
{
return -EINVAL;
}
static ssize_t read_mouse(struct file *file, char *buffer, size_t count,
loff_t *ppos)
{
int dx, dy, buttons;
if (count < 3)
return -EINVAL;
if (!mouse.ready)
return -EAGAIN;
dx = mouse.dx;
dy = mouse.dy;
buttons = mouse.buttons;
if (dx > 127)
dx = 127;
else if (dx < -128)
dx = -128;
if (dy > 127)
dy = 127;
else if (dy < -128)
dy = -128;
mouse.dx -= dx;
mouse.dy -= dy;
if (mouse.dx == 0 && mouse.dy == 0)
mouse.ready = 0;
if (put_user(buttons | 0x80, buffer++) ||
put_user((char) dx, buffer++) ||
put_user((char) dy, buffer++))
return -EFAULT;
if (count > 3)
if (clear_user(buffer, count - 3))
return -EFAULT;
return count;
}
static unsigned int mouse_poll(struct file *file, poll_table *wait)
{
poll_wait(file, &mouse.wait, wait);
if (mouse.ready)
return POLLIN | POLLRDNORM;
return 0;
}
struct file_operations mac_mouse_fops = {
NULL, /* mouse_seek */
read_mouse,
write_mouse,
NULL, /* mouse_readdir */
mouse_poll,
NULL, /* mouse_ioctl */
NULL, /* mouse_mmap */
open_mouse,
NULL, /* flush */
release_mouse,
NULL,
fasync_mouse,
};
#define ADB_MOUSE_MINOR 10
static struct miscdevice mac_mouse = {
ADB_MOUSE_MINOR, "adbmouse", &mac_mouse_fops
};
__initfunc(int mac_mouse_init(void))
{
mouse.active = 0;
mouse.ready = 0;
mouse.wait = NULL;
if (!MACH_IS_MAC)
return -ENODEV;
printk(KERN_INFO "Macintosh ADB mouse installed.\n");
misc_register(&mac_mouse);
return 0;
}
#define MIN_THRESHOLD 1
#define MAX_THRESHOLD 20 /* more seems not reasonable... */
__initfunc(void mac_mouse_setup(char *str, int *ints))
{
if (ints[0] < 1) {
printk( "mac_mouse_setup: no arguments!\n" );
return;
}
else if (ints[0] > 2) {
printk( "mac_mouse_setup: too many arguments\n" );
}
if (ints[1] < MIN_THRESHOLD || ints[1] > MAX_THRESHOLD)
printk( "mac_mouse_setup: bad threshold value (ignored)\n" );
else {
mac_mouse_x_threshold = ints[1];
mac_mouse_y_threshold = ints[1];
if (ints[0] > 1) {
if (ints[2] < MIN_THRESHOLD || ints[2] > MAX_THRESHOLD)
printk("mac_mouse_setup: bad threshold value (ignored)\n" );
else
mac_mouse_y_threshold = ints[2];
}
}
}
#ifdef MODULE
#include <asm/setup.h>
int init_module(void)
{
return mac_mouse_init();
}
void cleanup_module(void)
{
misc_deregister(&mac_mouse);
}
#endif
......@@ -21,6 +21,7 @@
#include <linux/random.h>
#include <linux/init.h>
#include <linux/joystick.h>
#include <linux/i2c.h>
#include <asm/uaccess.h>
#include <asm/io.h>
......
......@@ -51,6 +51,10 @@
static struct mouse_status mouse;
static int mouse_irq = MOUSE_IRQ;
#ifdef MODULE
MODULE_PARM(mouse_irq, "i");
#endif
__initfunc(void msmouse_setup(char *str, int *ints))
{
if (ints[0] > 0)
......
......@@ -64,7 +64,7 @@ static volatile unsigned char acknowledge = 0;
static volatile unsigned char resend = 0;
#if defined CONFIG_PSMOUSE
#if defined(CONFIG_PSMOUSE)
/*
* PS/2 Auxiliary Device
*/
......
/* fc.c: Generic Fibre Channel and FC4 SCSI driver.
*
* Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
* Copyright (C) 1997,1998 Jiri Hanika (geo@ff.cuni.cz)
* Copyright (C) 1997,1998 Jirka Hanika (geo@ff.cuni.cz)
*
* Sources:
* Fibre Channel Physical & Signaling Interface (FC-PH), dpANS, 1994
......
/* fcp_scsi.h: Generic SCSI on top of FC4 - interface defines.
*
* Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
* Copyright (C) 1998 Jiri Hanika (geo@ff.cuni.cz)
* Copyright (C) 1998 Jirka Hanika (geo@ff.cuni.cz)
*/
#ifndef _FCP_SCSI_H
......
/* soc.c: Sparc SUNW,soc (Serial Optical Channel) Fibre Channel Sbus adapter support.
*
* Copyright (C) 1996,1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
* Copyright (C) 1997,1998 Jiri Hanika (geo@ff.cuni.cz)
* Copyright (C) 1997,1998 Jirka Hanika (geo@ff.cuni.cz)
*
* Sources:
* Fibre Channel Physical & Signaling Interface (FC-PH), dpANS, 1994
......@@ -20,7 +20,7 @@
*/
static char *version =
"soc.c:v1.2 27/Feb/98 Jakub Jelinek (jj@sunsite.mff.cuni.cz), Jiri Hanika (geo@ff.cuni.cz)\n";
"soc.c:v1.2 27/Feb/98 Jakub Jelinek (jj@sunsite.mff.cuni.cz), Jirka Hanika (geo@ff.cuni.cz)\n";
#include <linux/module.h>
#include <linux/kernel.h>
......
......@@ -684,7 +684,6 @@ cleanup_module(void)
void *priv = dev->priv;
/* NB: el2_close() handles free_irq */
release_region(dev->base_addr, EL2_IO_EXTENT);
dev->priv = NULL;
unregister_netdev(dev);
kfree(priv);
}
......
......@@ -449,7 +449,6 @@ cleanup_module(void)
void *priv = dev->priv;
/* NB: e21_close() handles free_irq */
release_region(dev->base_addr, E21_IO_EXTENT);
dev->priv = NULL;
unregister_netdev(dev);
kfree(priv);
}
......
......@@ -439,7 +439,6 @@ cleanup_module(void)
void *priv = dev->priv;
free_irq(dev->irq, dev);
release_region(dev->base_addr, ES_IO_EXTENT);
dev->priv = NULL;
unregister_netdev(dev);
kfree(priv);
}
......
......@@ -474,7 +474,6 @@ cleanup_module(void)
void *priv = dev->priv;
/* NB: hpp_close() handles free_irq */
release_region(ioaddr, HP_IO_EXTENT);
dev->priv = NULL;
unregister_netdev(dev);
kfree(priv);
}
......
......@@ -445,7 +445,6 @@ cleanup_module(void)
void *priv = dev->priv;
free_irq(dev->irq, dev);
release_region(ioaddr, HP_IO_EXTENT);
dev->priv = NULL;
unregister_netdev(dev);
kfree(priv);
}
......
......@@ -430,7 +430,6 @@ void cleanup_module(void)
release_region(dev->base_addr, LNE390_IO_EXTENT);
if (ei_status.reg0)
iounmap((void *)dev->mem_start);
dev->priv = NULL;
unregister_netdev(dev);
kfree(priv);
}
......
......@@ -1059,14 +1059,14 @@ __initfunc(int ltpc_probe_dma(int base))
inb_p(io+1);
inb_p(io+0);
timeout = jiffies+100;
while(timeout>jiffies) {
timeout = jiffies+100*HZ/100;
while(time_before(jiffies, timeout)) {
if ( 0xfa == inb_p(io+6) ) break;
}
inb_p(io+3);
inb_p(io+2);
while(timeout>jiffies) {
while(time_before(jiffies, timeout)) {
if ( 0xfb == inb_p(io+6) ) break;
}
......@@ -1161,8 +1161,8 @@ __initfunc(int ltpc_probe(struct device *dev))
inb_p(io+1);
inb_p(io+3);
timeout = jiffies+2;
while(timeout>jiffies) ; /* hold it in reset for a coupla jiffies */
timeout = jiffies+2*HZ/100;
while(time_before(jiffies, timeout)) ; /* hold it in reset for a coupla jiffies */
inb_p(io+0);
inb_p(io+2);
inb_p(io+7); /* clear reset */
......@@ -1171,9 +1171,9 @@ __initfunc(int ltpc_probe(struct device *dev))
inb_p(io+5); /* enable dma */
inb_p(io+6); /* tri-state interrupt line */
timeout = jiffies+100;
timeout = jiffies+100*HZ/100;
while(timeout>jiffies) {
while(time_before(jiffies, timeout)) {
/* wait for the card to complete initialization */
}
......@@ -1220,8 +1220,8 @@ __initfunc(int ltpc_probe(struct device *dev))
(void) inb_p(io+3);
(void) inb_p(io+2);
timeout = jiffies+100;
while(timeout>jiffies) {
timeout = jiffies+100*HZ/100;
while(time_before(jiffies, timeout)) {
if( 0xf9 == inb_p(io+6)) break;
}
......
This diff is collapsed.
......@@ -677,10 +677,7 @@ void cleanup_module(void)
mca_mark_as_unused(ei_status.priv);
mca_set_adapter_procfn( ei_status.priv, NULL, NULL);
kfree(dev->priv);
dev->priv = NULL;
free_irq(dev->irq, dev);
/* removed (temporary) fot */
/* irq2dev_map[dev->irq] = NULL; */
release_region(dev->base_addr, NE_IO_EXTENT);
unregister_netdev(dev);
}
......
......@@ -421,7 +421,6 @@ void cleanup_module(void)
release_region(dev->base_addr, NE3210_IO_EXTENT);
if (ei_status.reg0)
iounmap((void *)dev->mem_start);
dev->priv = NULL;
unregister_netdev(dev);
kfree(priv);
}
......
......@@ -375,7 +375,6 @@ void cleanup_module(void)
/* NB: ultra_close_card() does free_irq */
int ioaddr = dev->base_addr - ULTRA_NIC_OFFSET;
release_region(ioaddr, ULTRA_IO_EXTENT);
dev->priv = NULL;
unregister_netdev(dev);
kfree(priv);
}
......
......@@ -483,7 +483,6 @@ cleanup_module(void)
void *priv = dev->priv;
/* NB: ultra_close_card() does free_irq */
release_region(ioaddr, ULTRA_IO_EXTENT);
dev->priv = NULL;
unregister_netdev(dev);
kfree(priv);
}
......
......@@ -413,7 +413,6 @@ void cleanup_module(void)
void *priv = dev->priv;
/* NB: ultra32_close_card() does free_irq */
release_region(ioaddr, ULTRA32_IO_EXTENT);
dev->priv = NULL;
unregister_netdev(dev);
kfree(priv);
}
......
......@@ -605,7 +605,7 @@ static char reg_init[16]=
int z8530_sync_open(struct device *dev, struct z8530_channel *c)
{
c->sync = 1;
c->mtu = dev->mtu;
c->mtu = dev->mtu+64;
c->count = 0;
c->skb = NULL;
c->skb2 = NULL;
......@@ -641,7 +641,7 @@ int z8530_sync_dma_open(struct device *dev, struct z8530_channel *c)
unsigned long flags;
c->sync = 1;
c->mtu = dev->mtu;
c->mtu = dev->mtu+64;
c->count = 0;
c->skb = NULL;
c->skb2 = NULL;
......@@ -822,7 +822,7 @@ int z8530_sync_txdma_open(struct device *dev, struct z8530_channel *c)
{
printk("Opening sync interface for TX-DMA\n");
c->sync = 1;
c->mtu = dev->mtu;
c->mtu = dev->mtu+64;
c->count = 0;
c->skb = NULL;
c->skb2 = NULL;
......
......@@ -9,6 +9,7 @@
#include <linux/config.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <asm/dma.h> /* isa_dma_bridge_buggy */
EXPORT_SYMBOL(pcibios_present);
EXPORT_SYMBOL(pcibios_read_config_byte);
......@@ -38,3 +39,10 @@ EXPORT_SYMBOL(pci_proc_detach_device);
EXPORT_SYMBOL(pcibios_find_class);
EXPORT_SYMBOL(pcibios_find_device);
/* Quirk info */
#ifdef CONFIG_PCI_QUIRKS
EXPORT_SYMBOL(isa_dma_bridge_buggy);
#endif
......@@ -125,6 +125,25 @@ __initfunc(static void quirk_passive_release(struct pci_dev *dev, int arg))
}
}
/* The VIA VP2/VP3/MVP3 seem to have some 'features'. There may be a workaround
but VIA don't answer queries. If you happen to have good contacts at VIA
ask them for me please -- Alan
This appears to be BIOS not version dependant. So presumably there is a
chipset level fix */
int isa_dma_bridge_buggy = 0; /* Exported */
__initfunc(static void quirk_isa_dma_hangs(struct pci_dev *dev, int arg))
{
if(!isa_dma_bridge_buggy)
{
isa_dma_bridge_buggy=1;
printk(KERN_INFO "Activating ISA DMA hang workarounds.\n");
}
}
typedef void (*quirk_handler)(struct pci_dev *, int);
......@@ -141,7 +160,8 @@ static struct quirk_name quirk_names[] __initdata = {
#ifdef CONFIG_PCI_OPTIMIZE
{ quirk_bridge, "Bridge optimization" },
#endif
{ quirk_passive_release, "Passive release enable" },
{ quirk_passive_release,"Passive release enable" },
{ quirk_isa_dma_hangs, "Work around ISA DMA hangs" },
};
......@@ -176,6 +196,12 @@ static struct quirk_info quirk_list[] __initdata = {
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82430, quirk_bridge, 0x00 },
#endif
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82441, quirk_passive_release, 0x00 },
/*
* Its not totally clear which chipsets are the problematic ones
* This is the 82C586 variants. At the moment the 596 is an unknown
* quantity
*/
{ PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_0, quirk_isa_dma_hangs, 0x00 },
};
__initfunc(void pci_quirks_init(void))
......
......@@ -7,6 +7,8 @@
* Subsequent revisions: Eric Youngdale
*
* <drew@colorado.edu>
*
* Jiffies wrap fixes (host->resetting), 3 Dec 1998 Andrea Arcangeli
*/
......@@ -581,6 +583,7 @@ struct Scsi_Host * scsi_register(Scsi_Host_Template * tpnt, int j){
next_scsi_host++;
retval->host_queue = NULL;
retval->host_wait = NULL;
retval->resetting = 0;
retval->last_reset = 0;
retval->irq = 0;
retval->dma_channel = 0xff;
......
......@@ -14,6 +14,8 @@
*
* Further modified by Eric Youngdale to support multiple host adapters
* of the same type.
*
* Jiffies wrap fixes (host->resetting), 3 Dec 1998 Andrea Arcangeli
*/
#ifndef _HOSTS_H
......@@ -320,6 +322,7 @@ struct Scsi_Host
/* public: */
unsigned short extra_bytes;
unsigned short host_no; /* Used for IOCTL_GET_IDLUN, /proc/scsi et al. */
int resetting; /* if set, it means that last_reset is a valid value */
unsigned long last_reset;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -142,7 +142,6 @@ scsi_delete_timer(Scsi_Cmnd * SCset)
SCSI_LOG_ERROR_RECOVERY(5,printk("Clearing timer for command %p\n", SCset));
SCset->eh_timeout.data = (unsigned long) NULL;
SCset->eh_timeout.expires = 0;
SCset->eh_timeout.function = NULL;
return rtn;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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