Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
001e3f20
Commit
001e3f20
authored
Nov 23, 2007
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import 1.3.55
parent
81e6c66d
Changes
38
Show whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
1034 additions
and
519 deletions
+1034
-519
CREDITS
CREDITS
+4
-4
Documentation/Configure.help
Documentation/Configure.help
+84
-120
Documentation/cdrom/sbpcd
Documentation/cdrom/sbpcd
+33
-25
Documentation/devices.tex
Documentation/devices.tex
+43
-6
Documentation/devices.txt
Documentation/devices.txt
+32
-6
Makefile
Makefile
+2
-2
README
README
+5
-4
arch/alpha/math-emu/fp-emul.c
arch/alpha/math-emu/fp-emul.c
+1
-1
arch/i386/kernel/entry.S
arch/i386/kernel/entry.S
+10
-2
arch/ppc/kernel/misc.S
arch/ppc/kernel/misc.S
+1
-1
drivers/block/floppy.c
drivers/block/floppy.c
+15
-7
drivers/block/rd.c
drivers/block/rd.c
+1
-1
drivers/cdrom/Config.in
drivers/cdrom/Config.in
+3
-3
drivers/cdrom/sbpcd.c
drivers/cdrom/sbpcd.c
+198
-118
drivers/char/softdog.c
drivers/char/softdog.c
+2
-1
drivers/scsi/53c7,8xx.c
drivers/scsi/53c7,8xx.c
+64
-66
drivers/scsi/53c7,8xx.h
drivers/scsi/53c7,8xx.h
+2
-4
drivers/scsi/53c7,8xx.scr
drivers/scsi/53c7,8xx.scr
+13
-1
drivers/scsi/53c8xx_d.h
drivers/scsi/53c8xx_d.h
+136
-110
drivers/sound/Makefile
drivers/sound/Makefile
+1
-1
fs/buffer.c
fs/buffer.c
+16
-0
fs/ext2/inode.c
fs/ext2/inode.c
+1
-1
fs/minix/file.c
fs/minix/file.c
+2
-0
fs/proc/root.c
fs/proc/root.c
+0
-2
include/asm-alpha/mmu_context.h
include/asm-alpha/mmu_context.h
+58
-0
include/asm-alpha/pgtable.h
include/asm-alpha/pgtable.h
+14
-3
include/asm-i386/mmu_context.h
include/asm-i386/mmu_context.h
+9
-0
include/asm-i386/unistd.h
include/asm-i386/unistd.h
+9
-0
include/linux/fdreg.h
include/linux/fdreg.h
+13
-1
include/linux/pagemap.h
include/linux/pagemap.h
+16
-3
include/linux/sbpcd.h
include/linux/sbpcd.h
+52
-18
include/linux/sched.h
include/linux/sched.h
+6
-2
include/linux/smp.h
include/linux/smp.h
+0
-1
include/linux/smp_lock.h
include/linux/smp_lock.h
+9
-0
include/linux/time.h
include/linux/time.h
+10
-0
kernel/ksyms.c
kernel/ksyms.c
+5
-3
kernel/sched.c
kernel/sched.c
+164
-1
mm/filemap.c
mm/filemap.c
+0
-1
No files found.
CREDITS
View file @
001e3f20
...
...
@@ -543,7 +543,7 @@ D: The Linux Support Team Erlangen
N: Markus Kuhn
E: mskuhn@cip.informatik.uni-erlangen.de
W: http://wwwcip.informatik.uni-erlangen.de/user/mskuhn
D: Unicode, time, standards
D: Unicode,
real-time,
time, standards
S: Schlehenweg 9
S: D-91080 Uttenreuth
S: Germany
...
...
@@ -902,10 +902,10 @@ D: several improvements to system programs
S: Oldenburg, Germany
N: Darren Senn
E: sinster@
scintilla.santa-clara.ca.us
E: sinster@
darkwater.com
D: Whatever I notice needs doing (so far: itimers, /proc)
S:
620 Park View Drive #206
S: S
anta Clara, California 95054
S:
POB 64132
S: S
unnyvale, CA 94088-4132
S: USA
N: Rick Sladkey
...
...
Documentation/Configure.help
View file @
001e3f20
#
LAST EDIT: Thu Nov 30 22:39:07 1995
by Axel Boldt (boldt@math.ucsb.edu)
#
Maintained
by Axel Boldt (boldt@math.ucsb.edu)
#
# This version of the Linux kernel configuration help texts
# corresponds to the kernel versions 1.3.x. Be aware that these
...
...
@@ -1685,151 +1685,115 @@ CONFIG_CD_NO_IDESCSI
will just cause this configure script to skip all the questions
about these CDROM drives. If you are unsure what you have, say Y and
find out whether you have one of the following drives.
For each of these drivers, a file Documentation/cdrom/<driver_name>
exists. Especially in cases where you do not know exactly which kind
of drive you have you should read there.
Most of these drivers use a file include/linux/<driver_name>.h where
you can define your interface parameters and switch some internal
goodies.
All these CDROM drivers are also usable as a module (= code which can
be inserted in and removed from the running kernel whenever you want).
If you want to compile them as module, say M instead of Y and read
Documentation/modules.txt.
If you want to use any of these CDROM drivers, you also have to say
Y to "ISO9660 cdrom filesystem support" below (this answer will get
"defaulted" for you if you enable any of the Linux CDROM drivers).
Sony CDU31A/CDU33A CDROM
driver
support
Sony CDU31A/CDU33A CDROM support
CONFIG_CDU31A
These CDROM drives have a spring-pop-out caddyless drawer, and a
rectangular green LED centered beneath it. If you have one of these,
say Y here and also to "ISO9660 cdrom filesystem support"
below. Read the CDROM-HOWTO, available via ftp (user: anonymous)
from sunsite.unc.edu:/pub/Linux/docs/HOWTO. Also, read
Documentation/cdrom/cdu31a. NOTE: this CDROM drive won't be
auto detected by the kernel at boot time; you have to provide its
specifications as an option to the kernel as described in the above
README. See the documentation of your boot loader (lilo or loadlin)
about how to pass options to the kernel. The lilo procedure is also
explained in the SCSI-HOWTO. This driver is also available as a
module ( = code which can be inserted in and removed from the
running kernel whenever you want). If you want to compile it as a
module, say M here and read Documentation/modules.txt. If unsure,
say N.
rectangular green LED centered beneath it.
NOTE: these CDROM drives will not be auto detected by the kernel at
boot time; you have to provide the interface address as an option to
the kernel as described in Documentation/cdrom/cdu31a or fill in your
parameters into linux/drivers/cdrom/cdu31a.c. See the documentation
of your boot loader (lilo or loadlin) about how to pass options to
the kernel. The lilo procedure is also explained in the SCSI-HOWTO.
Standard Mitsumi [no XA/Multisession] CDROM support
CONFIG_MCD
This is a very common CDROM drive. In some models, the whole drive
chassis slides out for cd insertion. Later models use a motorized
tray type mechanism. If you have one of these CDROM drives, say Y
here and also to "ISO9660 cdrom filesystem support" below. Read the,
available via ftp (user: anonymous) CDROM-HOWTO from
sunsite.unc.edu:/pub/Linux/docs/HOWTO. Note that this driver does
not support XA or MultiSession CDs (PhotoCDs). There's a new
experimental driver in the 1.3 kernels that can do this, but cannot
play your music CDs. If you want that one, say N here. If the driver
doesn't work out of the box, you might want to have a look at
linux/include/linux/mcd.h. If your Mitsumi CDROM drive is of type
IDE/ATAPI, then you have to say N here and should have said Y to
"Support for IDE/ATAPI CDROMs" above. 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. If unsure,
say N now.
Experimental Mitsumi [XA/MultiSession, no Audio] support
This is the older of the two drivers for the older Mitsumi models
LU-005, FX-001 and FX-001D. This is not the right driver for the
FX-001DE and the triple or quad speed models (all these are IDE/ATAPI
models).
With the old LU-005 model, the whole drive chassis slides out for
cd insertion. The FX-xxx models use a motorized tray type mechanism.
Note that this driver does not support XA or MultiSession CDs (PhotoCDs).
There is a new driver (next question) which can do this. If you want
that one, say N here.
If the driver doesn't work out of the box, you might want to have
a look at linux/include/linux/mcd.h.
Mitsumi [XA/MultiSession] support
CONFIG_MCDX
Use this driver if you want to be able to read XA or MultiSession
CDs (PhotoCDs) as well as ordinary CDs with your Mitsumi CDROM
drive. In addition, this driver uses much less kernel memory than
the old one, if that is a concern. However, you won't be able to
play audio CDs. If you have two Mitsumi CDROM drives, you can use
the old driver for one and the new for the other;
Documentation/cdrom/mcdx explains how. 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.
CDs (PhotoCDs) as well as ordinary CDs with your Mitsumi LU-005,
FX-001 or FX-001D CDROM drive. In addition, this driver uses much less
kernel memory than the old one, if that is a concern. This driver is
able to support more than one drive, but each drive needs a separate
interface card.
Matsushita/Panasonic
CDROM driver
support
Matsushita/Panasonic
/Creative, Longshine, TEAC CDROM
support
CONFIG_SBPCD
The Creative Labs Soundblaster CD drives as well as Longshine and
IBM External ISA also fall under this category. It has a uniquely
shaped faceplate, with a caddyless motorized drawer which makes it
recognizable, but has no external brand markings. Some Soundblaster
drives have a caddy and manual loading/eject, but still no external
markings. If you have one of these, say Y here and also to "ISO9660
cdrom filesystem support" below. This driver can support up to four
CDROM controllers, each of which can support up to four CDROM
drives; you will be asked how many controllers you have. Read
Documentation/cdrom/sbpcd and include/linux/sbpcd.h in the kernel
source and the CDROM-HOWTO, available via ftp (user: anonymous) from
sunsite.unc.edu:/pub/Linux/docs/HOWTO. If unsure, say N. 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.
Matsushita/Panasonic second CDROM controller support
This driver supports most of the drives which use the Panasonic or
SoundBlaster interface.
The Matsushita CR-521, CR-522, CR-523, CR-562, CR-563 drives (sometimes
labelled "Creative"), the CreativeLabs CD200, the Longshine LCS-7260,
the "IBM External ISA CDROM" (in fact a CR-56x model), the TEAC CD-55A
fall under this category. Some other "electrically compatible" drives
(Vertos, Genoa, some Funai models) are currently not supported; for the
Sanyo H94A drive currently a separate driver (asked later) is responsible.
Most drives have a uniquely shaped faceplate, with a caddyless motorized
drawer, but without external brand markings. The older CR-52x drives have
a caddy and manual loading/eject, but still no external markings.
The driver is able to do an extended auto-probing for interface addresses
and drive types; this can help to find facts in cases you are not sure,
but can consume some time during the boot process if none of the supported
drives gets found.
Once your drive got found, you should enter the reported parameters into
linux/include/linux/sbpcd.h and set "DISTRIBUTION 0" there.
This driver can support up to four CDROM interface cards, and each card
can support up to four CDROM drives; if you say Y here, you will be asked
how many controllers you have. If compiled as a module, only one interface
card (but with up to four drives) is usable.
Matsushita/Panasonic, ... second CDROM controller support
CONFIG_SBPCD2
If you have two CDROM drives of this type that you want to use
simultaneously under Linux, say Y here, otherwise N.
Say Y here only if you have two CDROM controller boards of this type
(usually only if you have more than four drives). You should enter
the parameters for the second, third and fourth interface card into
linux/include/linux/sbpcd.h before compiling the new kernel.
Aztech/Orchid/Okano/Wearnes (non IDE) CDROM support
Aztech/Orchid/Okano/Wearnes
/TXC
(non IDE) CDROM support
CONFIG_AZTCD
If you have a CDA268-01A, ORCHID CD-3110, OKANO/WEARNES CDD110 or
Conrad TXC CDROM drive, say Y here and also to "ISO9660 cdrom
filesystem support" below. This is NOT for CDROM drives with IDE
interface, such as Aztech CDA269-031SE. (If you have one of those,
you should have said Y to the new IDE driver above.) You want to
read Documentation/cdrom/aztcd and include/linux/aztcd.h in the
kernel source and the CDROM-HOWTO, available via ftp (user:
anonymous) from sunsite.unc.edu:/pub/Linux/docs/HOWTO. If unsure,
say N. 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.
This is your driver if you have an Aztech CDA268-01A, Orchid CD-3110,
Okano or Wearnes CDD110 or a Conrad TXC CDROM drive.
This driver - just like all these CDROM drivers - is NOT for CDROM
drives with IDE/ATAPI interface, such as Aztech CDA269-031SE.
Sony CDU535 CDROM
driver
support
Sony CDU535 CDROM support
CONFIG_CDU535
If you have a CDU-535 or CDU-531 CDROM drive (this is one of the
older Sony drives with its own interface card), say Y here and also
to "ISO9660 cdrom filesystem support" below. You want to read
Documentation/cdrom/sonycd535 in the kernel source and the
CDROM-HOWTO, available via ftp (user: anonymous) from
sunsite.unc.edu:/pub/Linux/docs/HOWTO. If unsure, say N. 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.
This is the driver for the older Sony CDU-535 and CDU-531 CDROM drives.
Goldstar R420 CDROM support
CONFIG_GSCD
If this is your CDROM drive, say Y here and also to "ISO9660 cdrom
filesystem support" below. You want to read Documentation/cdrom/gscd
in the kernel source and the CDROM-HOWTO, available via ftp (user:
anonymous) from sunsite.unc.edu:/pub/Linux/docs/HOWTO. As described
in the file gscd, you might have to change a setting in the file
include/linux/gscd.h before compiling the kernel. If unsure, say N.
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.
If this is your CDROM drive, say Y here.
As described in linux/Documentation/cdrom/gscd, you might have to
change a setting in the file include/linux/gscd.h before compiling
the kernel.
Philips/LMS CM206 CDROM support
CONFIG_CM206
If you have a Philips/LMS CDROM drive cm206 in combination with a
cm260 host adapter card, say Y here and also to "ISO9660 cdrom
filesystem support" below. You want to read
Documentation/cdrom/cm206 in the kernel source and the CDROM-HOWTO,
available via ftp (user: anonymous) from
sunsite.unc.edu:/pub/Linux/docs/HOWTO. If unsure, say N. 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.
cm260 host adapter card, say Y here.
Experimental
Optics Storage DOLPHIN 8000AT CDROM support
Optics Storage DOLPHIN 8000AT CDROM support
CONFIG_OPTCD
If this is your CDROM drive, say Y here and also to "ISO9660 cdrom
filesystem support" below. You want to read
Documentation/cdrom/optcd in the kernel source and the CDROM-HOWTO,
available via ftp (user: anonymous) from
sunsite.unc.edu:/pub/Linux/docs/HOWTO. If unsure, say N. 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.
If this is your CDROM drive, say Y here.
Experimental
Sanyo H94A CDROM support
Sanyo H94A CDROM support
CONFIG_SJCD
If this is your CDROM drive, say Y here and also to "ISO9660 cdrom
filesystem support" below. You want to read
Documentation/cdrom/sjcd in the kernel source (this file includes
information about how to make the driver work together with an ISP16
soundcard) and the CDROM-HOWTO,
available via ftp (user: anonymous) from
sunsite.unc.edu:/pub/Linux/docs/HOWTO. If unsure, say N.
If this is your CDROM drive, say Y here.
Standard (minix) fs support
CONFIG_MINIX_FS
...
...
Documentation/cdrom/sbpcd
View file @
001e3f20
This README belongs to release
3.9
or newer of the SoundBlaster Pro
This README belongs to release
4.1
or newer of the SoundBlaster Pro
(Matsushita, Kotobuki, Panasonic, CreativeLabs, Longshine and TEAC)
CD-ROM driver for Linux.
...
...
@@ -28,6 +28,9 @@ CR-574 is an IDE/ATAPI drive.
The Longshine LCS-7260 is a double-speed drive which uses the "old"
Matsushita command set. It is supported - with help by Serge Robyns.
Vertos ("Elitegroup Computer Systems", ECS) has a similar drive - support
has started; come in contact if you have such a "Vertos 100" or "ECS-AT"
drive.
There exists an "IBM External ISA CD-ROM Drive" which in fact is a CR-563
with a special controller board. This drive is supported (the interface is
...
...
@@ -36,10 +39,12 @@ an internal drive, and you can use it as an internal, too - f.e. plug it into
a soundcard).
CreativeLabs has a new drive "CD200" and a similar drive "CD200F". The latter
is made by Funai and sometimes named "E2550UA". Support is under construction
- CD200F should work, CD200 is still giving problems.
Drive detection and playing audio should work. I need qualified feedback
about the bugs within the data functions or a drive (I never saw a CD200).
is made by Funai and sometimes named "E2550UA", newer models may be named
"MK4015". The CD200F drives should fully work.
CD200 drives without "F" are still giving problems: drive detection and
playing audio should work, data access will result in errors. I need qualified
feedback about the bugs within the data functions or a drive (I never saw a
CD200).
The quad-speed TEAC CD-55A drive is supported, but still does not reach "full
speed". The data rate already reaches 500 kB/sec if you set SBP_BUFFER_FRAMES
...
...
@@ -63,21 +68,21 @@ the IDE/ATAPI user questions disappear).
This driver will work with the soundcard interfaces (SB Pro, SB 16, Galaxy,
SoundFX, Mozart, ...) and with the "no-sound" cards (Panasonic CI-101P,
SoundFX, Mozart,
MAD16
...) and with the "no-sound" cards (Panasonic CI-101P,
LaserMate, WDH-7001C, Longshine LCS-6853, TEAC ...).
It
finally works now with the "configurable" interface "Sequoia S-1000", too,
which is found on the Spea Media FX and Ensonic Soundscape sound cards. You
have to specify the type "SBPRO 2" and the true CDROM port address with it,
not the
"configuration port" address.
It
works with the "configurable" interface "Sequoia S-1000", too, which is
used on the Spea Media FX and Ensonic Soundscape sound cards. You have to
specify the type "SBPRO 2" and the true CDROM port address with it, not the
"configuration port" address.
If you have a sound card which needs a "configuration driver" instead of
jumpers for interface types and addresses (like Mozart cards) - those
drivers get invoked before the DOS CDROM driver in your CONFIG.SYS, typical
names are "cdsetup.sys" and "mztinit.sys" -, let the sound driver do the
CDROM port configuration (the leading comments
within
linux/drivers/sound/mad16.c are just for you!). Hannu Savolainen's mad16.c
code is able to set up my
Mozart card - I simply had to add
CDROM port configuration (the leading comments
in linux/drivers/sound/mad16.c
are just for you!). Hannu Savolainen's mad16.c code is able to set up my
Mozart card - I simply had to add
#define MAD16_CONF 0x06
#define MAD16_CDSEL 0x03
to configure the CDROM interface for type "Panasonic" (LaserMate) and address
...
...
@@ -133,8 +138,11 @@ different address and a second cable.
The driver supports reading of data from the CD and playing of audio tracks.
The audio part should run with WorkMan, xcdplayer, with the "non-X11" products
CDplayer and WorkBone - tell me if it is not compatible with other software.
The only accepted measure for correctness with the audio functions is the
"cdtester" utility (appended) - most audio player programmers seem to be
better musicians than programmers. ;-)
With the CR-56
2 and CR-563
drives, the reading of audio frames is possible.
With the CR-56
x and the CD200
drives, the reading of audio frames is possible.
This is implemented by an IOCTL function which reads READ_AUDIO frames of
2352 bytes at once (configurable with the "READ_AUDIO" define, default is 0).
Reading the same frame a second time gives different data; the frame data
...
...
@@ -163,8 +171,8 @@ XA (PhotoCD) disks with "old" drives give only 50 kB/sec.
This release consists of
- this README file
- the driver file linux/drivers/
block
/sbpcd.c
- the stub files linux/drivers/
block
/sbpcd[234].c
- the driver file linux/drivers/
cdrom
/sbpcd.c
- the stub files linux/drivers/
cdrom
/sbpcd[234].c
- the header file linux/include/linux/sbpcd.h.
...
...
@@ -185,9 +193,9 @@ To install:
Most "compatible" sound cards (almost all "non-CreativeLabs" cards)
need "SBPRO 0".
The "no-sound" board from OmniCd needs the "SBPRO 1" setup.
All other "no-sound" boards need the "SBPRO 0" setup.
Possibly some TEAC "no-sound" boards need the "SBPRO 1" setup.
The Spea Media FX sound card needs "SBPRO 2".
All other "no-sound" boards need the "SBPRO 0" setup.
The Spea Media FX and Ensoniq SoundScape cards need "SBPRO 2".
sbpcd.c holds some examples in its auto-probe list.
If you configure "SBPRO" wrong, the playing of audio CDs will work,
but you will not be able to mount a data CD.
...
...
@@ -200,10 +208,10 @@ To install:
or
sbpcd=0x320,LaserMate
or
sbpcd=0x33
0,SPEA
sbpcd=0x33
8,SoundScape
This is especially useful if you install a fresh distribution.
If the second parameter is a number, it gets taken as the type
setting; 0 is "LaserMate", 1 is "SoundBlaster".
setting; 0 is "LaserMate", 1 is "SoundBlaster"
, 2 is "SoundScape"
.
So, for example
sbpcd=0x230,1
is equivalent to
...
...
@@ -257,7 +265,7 @@ Using sbpcd as a "loadable module":
If you do NOT select "Matsushita/Panasonic CDROM driver support" during the
"make config" of your kernel, you can build the "loadable module" sbpcd.o.
Read /usr/src/linux/
README.modules
on this.
Read /usr/src/linux/
Documentation/modules.txt
on this.
If sbpcd gets used as a module, the support of more than one interface
card (i.e. drives 4...15) is disabled.
...
...
@@ -266,6 +274,8 @@ You can specify interface address and type with the "insmod" command like:
# insmod /usr/src/linux/modules/sbpcd.o sbpcd=0x340,0
or
# insmod /usr/src/linux/modules/sbpcd.o sbpcd=0x230,1
or
# insmod /usr/src/linux/modules/sbpcd.o sbpcd=0x338,2
where the last number represents the SBPRO setting (no strings allowed here).
...
...
@@ -281,7 +291,7 @@ No DMA and no IRQ is used.
To reduce or increase the amount of kernel messages, edit sbpcd.c and play
with the "DBG_xxx" switches (initialization of the variable "sbpcd_debug").
Don't forget to reflect what you do; enabling all DBG_xxx switches at once
may crash your system.
may crash your system
, and each message line is accompanied by a delay
.
The driver uses the "variable BLOCK_SIZE" feature. To use it, you have to
specify "block=2048" as a mount option. Doing this will disable the direct
...
...
@@ -518,9 +528,7 @@ drives are mostly telling there is no UPC/EAN code on disk or there is, but it
is an all-zero number. I guess now almost no CD holds such a number.
Bug reports, comments, wishes, donations (technical information is a donation,
too :-) etc. to
emoenke@gwdg.de
or to my FIDO address: Eberhard Moenkeberg, 2:2437/210.27
too :-) etc. to emoenke@gwdg.de.
SnailMail address, preferable for CD editors if they want to submit a free
"cooperation" copy:
...
...
Documentation/devices.tex
View file @
001e3f20
...
...
@@ -42,7 +42,7 @@ foo \kill}%
%
\title
{{
\bf
Linux Allocated Devices
}}
\author
{
Maintained by H. Peter Anvin
$
<
$
hpa@storm.net
$
>
$}
\date
{
Last revised:
December 17, 1995
}
\date
{
Last revised:
January 5, 1996
}
\maketitle
%
\noindent
...
...
@@ -149,7 +149,10 @@ an unreasonable effort.
\major
{
39
}{}{
char
}{
Reserved for ncpfs
$
<
$
lendecke@namu01.gwdg.de
$
>
$}
\major
{
40
}{
--41
}{}{
Unallocated
}
\major
{
42
}{}{}{
Demo/sample use
}
\major
{
43
}{
--59
}{}{
Unallocated
}
\major
{
43
}{}{
char
}{
isdn4linux virtual modem
}
\major
{
44
}{}{
char
}{
isdn4linux virtual modem -- alternate devices
}
\major
{
45
}{}{
char
}{
isdn4linux ISDN BRI driver
}
\major
{
46
}{
--59
}{}{
Unallocated
}
\major
{
60
}{
--63
}{}{
Local/experimental use
}
\major
{
64
}{
--119
}{}{
Unallocated
}
\major
{
120
}{
--127
}{}{
Local/experimental use
}
...
...
@@ -673,9 +676,14 @@ disk (same as SCSI.)
\major
{
29
}{}{
char
}{
Universal frame buffer
}
\minor
{
0
}{
/dev/fb0current
}{
First frame buffer
}
\minor
{
1
}{
/dev/fb0autodetect
}{}
\minor
{
24
}{
/dev/fb0user0
}{}
\minordots
\minor
{
31
}{
/dev/fb0user7
}{}
\minor
{
32
}{
/dev/fb1current
}{
Second frame buffer
}
\minor
{
33
}{
/dev/fb1autodetect
}{}
\minor
{
56
}{
/dev/fb1user0
}{}
\minordots
\minor
{
63
}{
/dev/fb1user7
}{}
\minordots
\end{devicelist}
...
...
@@ -683,9 +691,11 @@ disk (same as SCSI.)
The universal frame buffer device is currently supported only on
Linux/68k. The
{
\file
current
}
device accesses the frame buffer at
current resolution; the
{
\file
autodetect
}
one at bootup (default)
resolution. Minor numbers 2--
31
within each frame buffer assignment
resolution. Minor numbers 2--
23
within each frame buffer assignment
are used for specific device-dependent resolutions. There appears to
be no standard naming for these devices.
be no standard naming for these devices. Finally, 24--31 within each
device are reserved for user-selected modes, usually entered at boot
time.
\begin{devicelist}
\major
{
}{}{
block
}{
Aztech/Orchid/Okano/Wearnes CD-ROM
}
...
...
@@ -868,7 +878,32 @@ driver with this number should not cause ill effects to the system
(bugs excepted.)
\begin{devicelist}
\major
{
43
}{
--59
}{}{
Unallocated
}
\major
{
43
}{}{
char
}{
isdn4linux virtual modem
}
\minor
{
0
}{
/dev/ttyI0
}{
First virtual modem
}
\minordots
\minor
{
15
}{
/dev/ttyI15
}{
16th virtual modem
}
\end{devicelist}
\begin{devicelist}
\major
{
44
}{}{
char
}{
isdn4linux virtual modem -- alternate devices
}
\minor
{
0
}{
/dev/cui0
}{
Callout device corresponding to
{
\file
ttyI0
}}
\minordots
\minor
{
15
}{
/dev/cui15
}{
Callout device corresponding to
{
\file
ttyI15
}}
\end{devicelist}
\begin{devicelist}
\major
{
45
}{}{
char
}{
isdn4linux ISDN BRI driver
}
\minor
{
0
}{
/dev/isdn0
}{
First virtual B channel raw data
}
\minordots
\minor
{
15
}{
/dev/isdn15
}{
16th virtual B channel raw data
}
\minor
{
16
}{
/dev/isdnctrl0
}{
First channel control/debug
}
\minordots
\minor
{
31
}{
/dev/isdnctrl15
}{
16th channel control/debug
}
\minor
{
128
}{
/dev/isdninfo
}{
ISDN monitor interface
}
\end{devicelist}
\begin{devicelist}
\major
{
46
}{
--59
}{}{
Unallocated
}
\end{devicelist}
\begin{devicelist}
...
...
@@ -972,7 +1007,8 @@ point to the ``cooked'' devices ({\file /dev/st*} and {\file
(
{
\file
/dev/sg*
}
.)
{
\file
/dev/mouse
}
may point to a dialout (alternate) TTY device, a
hardware mouse device, or a socket for a mouse driver program.
hardware mouse device, or a socket for a mouse driver program
(e.g.
{
\file
/dev/gpmdata
}
.)
\subsection
{
Sockets and pipes
}
...
...
@@ -982,6 +1018,7 @@ Common entries are:
\begin{nodelist}
\node
{
/dev/printer
}{
socket
}{{
\file
lpd
}
local socket
}
\node
{
/dev/log
}{
socket
}{{
\file
syslog
}
local socket
}
\node
{
/dev/gpmdata
}{
socket
}{{
\file
gpm
}
mouse multiplexer
}
\end{nodelist}
\end{document}
...
...
Documentation/devices.txt
View file @
001e3f20
LINUX ALLOCATED DEVICES
Maintained by H. Peter Anvin <Peter.Anvin@linux.org
>
Maintained by H. Peter Anvin <hpa@storm.net
>
Last revised: December 17, 1995
Last revised: January 5, 1996
This list is the successor to Rick Miller's Linux Device List, which
he stopped maintaining when he lost network access in 1993. It is a
...
...
@@ -439,10 +439,14 @@ an unreasonable effort.
29 char Universal frame buffer
0 = /dev/fb0current First frame buffer
1 = /dev/fb0autodetect
24 = /dev/fb0user0
...
31 = /dev/fb0user7
32 = /dev/fb1current Second frame buffer
33 = /dev/fb1autodetect
56 = /dev/fb1user0
...
63 = /dev/fb1user7
block Aztech/Orchid/Okano/Wearnes CD-ROM
0 = /dev/aztcd Aztech CD-ROM
...
...
@@ -450,9 +454,11 @@ an unreasonable effort.
supported on Linux/68k. The "current" device accesses
the fame buffer at current resolution; the
"autodetect" one at bootup (default) resolution.
Minor numbers 2-
31
within each frame buffer assignment
Minor numbers 2-
23
within each frame buffer assignment
are used for specific device-dependent resolutions.
There appears to be no standard naming for these devices.
Finally, 2-31 within each device are reserved for
user-selected modes, usually entered at boot time.
30 char iBCS-2 compatibility devices
0 = /dev/socksys Socket access
...
...
@@ -589,7 +595,26 @@ an unreasonable effort.
removal of a driver with this number should not cause
ill effects to the system (bugs excepted.)
43-59 UNALLOCATED
43 char isdn4linux virtual modem
0 = /dev/ttyI0 First virtual modem
...
15 = /dev/ttyI15 16th virtual modem
44 char isdn4linux virtual modem - alternate devices
0 = /dev/cui0 Callout device corresponding to ttyI0
...
15 = /dev/cui15 Callout device corresponding to ttyI15
45 char isdn4linux ISDN BRI driver
0 = /dev/isdn0 First virtual B channel raw data
...
15 = /dev/isdn15 16th virtual B channel raw data
16 = /dev/isdnctrl0 First channel control/debug
...
31 = /dev/isdnctrl15 16th channel control/debug
128 = /dev/isdninfo ISDN monitor interface
46-59 UNALLOCATED
60-63 LOCAL/EXPERIMENTAL USE
Allocated for local/experimental use. For devices not
...
...
@@ -670,7 +695,7 @@ For SCSI devices, /dev/tape and /dev/cdrom should point to the
SCSI devices (/dev/sg*).
/dev/mouse may point to a dialout (alternate) TTY device, a hardware
mouse device, or a socket for a mouse driver program.
mouse device, or a socket for a mouse driver program
(e.g. /dev/gpmdata)
.
Sockets and pipes
...
...
@@ -678,3 +703,4 @@ Non-transient sockets and named pipes may exist in /dev. Common entries are:
/dev/printer socket lpd local socket
/dev/log socket syslog local socket
/dev/gpmdata socket gpm mouse multiplexer
Makefile
View file @
001e3f20
VERSION
=
1
PATCHLEVEL
=
3
SUBLEVEL
=
5
4
SUBLEVEL
=
5
5
ARCH
=
i386
...
...
@@ -309,7 +309,7 @@ mrproper: clean
distclean
:
mrproper
rm
-f
core
`
find
.
\(
-name
'*.orig'
-o
-name
'*~'
-o
-name
'*.bak'
\
-o
-name
'#*#'
-o
-name
'.*.orig'
\)
-print
`
-o
-name
'#*#'
-o
-name
'.*.orig'
\)
-print
`
TAGS
backup
:
mrproper
...
...
README
View file @
001e3f20
...
...
@@ -110,9 +110,8 @@ CONFIGURING the kernel:
under some circumstances lead to problems: probing for a
nonexistent controller card may confuse your other controllers
- compiling the kernel with "-m486" for a number of 486-specific
will result in a kernel that still works on a 386: it may be
slightly larger and possibly slower by an insignificant amount,
but it should not hurt performance.
will result in a kernel that does NOT work on a 386. The
kernel will detect this on bootup, and give up.
- A kernel with math-emulation compiled in will still use the
coprocessor if one is present: the math emulation will just
never get used in that case. The kernel will be slightly larger,
...
...
@@ -137,7 +136,9 @@ COMPILING the kernel:
upgrade your compiler, remember to get the new binutils package too
(for as/ld/nm and company). Do not use gcc-2.6.0; it has a few serious
bugs. Some problems have been reported occasionally with 2.6.3 as well,
so use that version at your own risk.
so use that version at your own risk. Specifying "-fno-strength-reduce"
in the CFLAGS of the main Makefile may help to work around a known
bug in gcc.
- do a "make zImage" to create a compressed kernel image. If you want
to make a bootdisk (without root filesystem or lilo), insert a floppy
...
...
arch/alpha/math-emu/fp-emul.c
View file @
001e3f20
#include <
sys
/types.h>
#include <
linux
/types.h>
#include <linux/kernel.h>
#include <linux/sched.h>
...
...
arch/i386/kernel/entry.S
View file @
001e3f20
...
...
@@ -657,10 +657,18 @@ ENTRY(sys_call_table)
.
long
SYMBOL_NAME
(
sys_readv
)
/*
145
*/
.
long
SYMBOL_NAME
(
sys_writev
)
.
long
SYMBOL_NAME
(
sys_getsid
)
.
long
0
.
long
SYMBOL_NAME
(
sys_fdatasync
)
.
long
0
.
long
SYMBOL_NAME
(
sys_mlock
)
/*
150
*/
.
long
SYMBOL_NAME
(
sys_munlock
)
.
long
SYMBOL_NAME
(
sys_mlockall
)
.
long
SYMBOL_NAME
(
sys_munlockall
)
.
space
(
NR_syscalls
-
154
)*
4
.
long
SYMBOL_NAME
(
sys_sched_setparam
)
.
long
SYMBOL_NAME
(
sys_sched_getparam
)
/*
155
*/
.
long
SYMBOL_NAME
(
sys_sched_setscheduler
)
.
long
SYMBOL_NAME
(
sys_sched_getscheduler
)
.
long
SYMBOL_NAME
(
sys_sched_yield
)
.
long
SYMBOL_NAME
(
sys_sched_get_priority_max
)
.
long
SYMBOL_NAME
(
sys_sched_get_priority_min
)
/*
160
*/
.
long
SYMBOL_NAME
(
sys_sched_rr_get_interval
)
.
space
(
NR_syscalls
-
162
)*
4
arch/ppc/kernel/misc.S
View file @
001e3f20
drivers/block/floppy.c
View file @
001e3f20
...
...
@@ -3633,7 +3633,8 @@ static char get_fdc_version(void)
return
FDC_8272A
;
/* 8272a/765 don't know DUMPREGS */
}
if
(
r
!=
10
)
{
printk
(
"FDC init: DUMPREGS: unexpected return of %d bytes.
\n
"
,
r
);
printk
(
"FDC %d init: DUMPREGS: unexpected return of %d bytes.
\n
"
,
fdc
,
r
);
return
FDC_UNKNOWN
;
}
output_byte
(
FD_VERSION
);
...
...
@@ -3643,7 +3644,8 @@ static char get_fdc_version(void)
return
FDC_82072
;
/* 82072 doesn't know VERSION */
}
if
((
r
!=
1
)
||
(
reply_buffer
[
0
]
!=
0x90
))
{
printk
(
"FDC init: VERSION: unexpected return of %d bytes.
\n
"
,
r
);
printk
(
"FDC %d init: VERSION: unexpected return of %d bytes.
\n
"
,
fdc
,
r
);
return
FDC_UNKNOWN
;
}
output_byte
(
FD_UNLOCK
);
...
...
@@ -3653,13 +3655,15 @@ static char get_fdc_version(void)
return
FDC_82077_ORIG
;
/* Pre-1991 82077 doesn't know LOCK/UNLOCK */
}
if
((
r
!=
1
)
||
(
reply_buffer
[
0
]
!=
0x00
))
{
printk
(
"FDC init: UNLOCK: unexpected return of %d bytes.
\n
"
,
r
);
printk
(
"FDC %d init: UNLOCK: unexpected return of %d bytes.
\n
"
,
fdc
,
r
);
return
FDC_UNKNOWN
;
}
output_byte
(
FD_PARTID
);
r
=
result
();
if
(
r
!=
1
)
{
printk
(
"FDC init: PARTID: unexpected return of %d bytes.
\n
"
,
r
);
printk
(
"FDC %d init: PARTID: unexpected return of %d bytes.
\n
"
,
fdc
,
r
);
return
FDC_UNKNOWN
;
}
if
(
reply_buffer
[
0
]
==
0x80
)
{
...
...
@@ -3671,7 +3675,7 @@ static char get_fdc_version(void)
output_byte
(
FD_SAVE
);
r
=
result
();
if
(
r
!=
17
)
{
printk
(
"FDC
init: SAVE: unexpected return of %d bytes.
\n
"
,
r
);
printk
(
"FDC
%d init: SAVE: unexpected return of %d bytes.
\n
"
,
fdc
,
r
);
return
FDC_UNKNOWN
;
}
if
(
!
(
reply_buffer
[
0
]
&
0x40
))
{
...
...
@@ -3684,9 +3688,13 @@ static char get_fdc_version(void)
case
0x1
:
printk
(
"FDC %d is a 44pin 82078
\n
"
,
fdc
);
return
FDC_82078
;
case
0x3
:
printk
(
"FDC %d is a National Semiconductor PC87306
\n
"
,
fdc
);
return
FDC_87306
;
default:
printk
(
"FDC %d init: PARTID returned an unknown ID: %d.
\n
"
,
fdc
,
reply_buffer
[
0
]
>>
5
);
return
FDC_UNKNOWN
;
printk
(
"FDC %d init: Unknown 82077 variant, PARTID = %d.
\n
"
,
fdc
,
reply_buffer
[
0
]
>>
5
);
return
FDC_82077_UNKN
;
}
}
/* get_fdc_version */
...
...
drivers/block/rd.c
View file @
001e3f20
...
...
@@ -371,7 +371,7 @@ void rd_load()
if
(
rd_prompt
)
{
printk
(
KERN_NOTICE
"VFS: Insert r
amdisk floppy
and press ENTER
\n
"
);
"VFS: Insert r
oot floppy disk to be loaded into ramdisk
and press ENTER
\n
"
);
wait_for_keypress
();
}
...
...
drivers/cdrom/Config.in
View file @
001e3f20
...
...
@@ -3,7 +3,7 @@
#
tristate 'Sony CDU31A/CDU33A CDROM support' CONFIG_CDU31A
tristate 'Standard Mitsumi [no XA/Multisession] CDROM support' CONFIG_MCD
tristate '
Experimental Mitsumi [XA/MultiSession]
support' CONFIG_MCDX
tristate '
Mitsumi [XA/MultiSession] CDROM
support' CONFIG_MCDX
tristate 'Matsushita/Panasonic/Creative, Longshine, TEAC CDROM support' CONFIG_SBPCD
if [ "$CONFIG_SBPCD" = "y" ]; then
bool 'Matsushita/Panasonic, ... second CDROM controller support' CONFIG_SBPCD2
...
...
@@ -18,5 +18,5 @@ tristate 'Aztech/Orchid/Okano/Wearnes/TXC (non IDE) CDROM support' CONFIG_AZTCD
tristate 'Sony CDU535 CDROM support' CONFIG_CDU535
tristate 'Goldstar R420 CDROM support' CONFIG_GSCD
tristate 'Philips/LMS CM206 CDROM support' CONFIG_CM206
tristate '
Experimental
Optics Storage DOLPHIN 8000AT CDROM support' CONFIG_OPTCD
tristate '
Experimental
Sanyo H94A CDROM support' CONFIG_SJCD
tristate 'Optics Storage DOLPHIN 8000AT CDROM support' CONFIG_OPTCD
tristate 'Sanyo H94A CDROM support' CONFIG_SJCD
drivers/cdrom/sbpcd.c
View file @
001e3f20
...
...
@@ -11,18 +11,12 @@
* Also for the TEAC CD-55A drive.
* Not for Sanyo drives (but sjcd is there...).
* Not for any other Funai drives than E2550UA (="CD200" with "F").
*
* NOTE: This is release 4.0
*
* Copyright (C) 1993, 1994, 1995 Eberhard Moenkeberg <emoenke@gwdg.de>
*
* If you change this software, you should mail a .diff
* file with some description lines to emoenke@gwdg.de.
* I want to know about it.
*
* If you are the editor of a Linux CD, you should
* enable sbpcd.c within your boot floppy kernel and
* send me one of your CDs for free.
* Not for Vertos drives yet.
*/
#define VERSION "v4.1 Eberhard Moenkeberg <emoenke@gwdg.de>"
/* Copyright (C) 1993, 1994, 1995 Eberhard Moenkeberg <emoenke@gwdg.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
@@ -33,6 +27,22 @@
* (for example /usr/src/linux/COPYING); if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* If you change this software, you should mail a .diff file with some
* description lines to emoenke@gwdg.de. I want to know about it.
*
* If you are the editor of a Linux CD, you should enable sbpcd.c within
* your boot floppy kernel and send me one of your CDs for free.
*
* If you would like to port the driver to an other operating system (f.e.
* FreeBSD or NetBSD) or use it as an information source, you shall not be
* restricted by the GPL under the following conditions:
* a) the source code of your work is freely available
* b) my part of the work gets mentioned at all places where your
* authorship gets mentioned
* c) I receive a copy of your code together with a full installation
* package of your operating system for free.
*
*
* VERSION HISTORY
*
* 0.1 initial release, April/May 93, after mcd.c (Martin Harriss)
...
...
@@ -249,6 +259,11 @@
* Fulfilled "read audio" for CD200 drives, with help of Pete Heist
* (heistp@rpi.edu).
*
* 4.1 Use loglevel KERN_INFO with printk().
* Added support for "Vertos 100" drive ("ECS-AT") - it is very similar
* to the Longshine LCS-7260. Give feedback if you can - I never saw
* such a drive, and I have no specs.
*
* TODO
*
* disk change detection
...
...
@@ -302,8 +317,6 @@
#include <linux/blk.h>
#define VERSION "v4.0 Eberhard Moenkeberg <emoenke@gwdg.de>"
/*==========================================================================*/
/*
* provisions for more than 1 driver issues
...
...
@@ -465,9 +478,9 @@ static int sbpcd_chk_disk_change(kdev_t);
* (1<<DBG_AUD) "read audio" debugging
* (1<<DBG_SEQ) Sequoia interface configuration trace
* (1<<DBG_LCS) Longshine LCS-7260 debugging trace
* (1<<DBG_CD2) MKE CD200 debugging trace
* (1<<DBG_CD2) MKE
/Funai
CD200 debugging trace
* (1<<DBG_TEA) TEAC CD-55A debugging trace
* (1<<DBG_
TE2) TEAC CD-55A debugging trace, 2nd level
* (1<<DBG_
ECS) ECS-AT (Vertos-100) debugging trace
* (1<<DBG_000) unnecessary information
*/
#if DISTRIBUTION
...
...
@@ -536,6 +549,7 @@ static u_char family1[]="CR-56"; /* MKE CR-562, CR-563 */
static
u_char
family2
[]
=
"CD200"
;
/* MKE CD200, Funai CD200F */
static
u_char
familyL
[]
=
"LCS-7260"
;
/* Longshine LCS-7260 */
static
u_char
familyT
[]
=
"CD-55"
;
/* TEAC CD-55A */
static
u_char
familyV
[]
=
"ECS-AT"
;
/* ECS Vertos 100 */
static
u_int
recursion
=
0
;
/* internal testing only */
static
u_int
fatal_err
=
0
;
/* internal testing only */
...
...
@@ -601,7 +615,7 @@ static struct {
u_char
*
aud_buf
;
/* Pointer to audio data buffer,
space allocated during sbpcd_init() */
u_int
sbp_audsiz
;
/* size of aud_buf (# of raw frames) */
u_
char
drv_type
;
u_
int
drv_type
;
u_char
drv_options
;
int
status_bits
;
u_char
diskstate_flags
;
...
...
@@ -707,9 +721,9 @@ static void msg(int level, const char *fmt, ...)
msgnum
++
;
if
(
msgnum
>
99
)
msgnum
=
0
;
sprintf
(
buf
,
"%s-%d [%02d]: "
,
major_name
,
d
,
msgnum
);
sprintf
(
buf
,
KERN_INFO
"%s-%d [%02d]: "
,
major_name
,
d
,
msgnum
);
va_start
(
args
,
fmt
);
vsprintf
(
&
buf
[
1
5
],
fmt
,
args
);
vsprintf
(
&
buf
[
1
8
],
fmt
,
args
);
va_end
(
args
);
printk
(
buf
);
sbp_sleep
(
55
);
/* else messages get lost */
...
...
@@ -1008,7 +1022,7 @@ static void EvaluateStatus(int st)
if
(
st
&
p_busy_old
)
D_S
[
d
].
status_bits
|=
p_busy_new
;
if
(
st
&
p_disk_ok
)
D_S
[
d
].
status_bits
|=
p_disk_ok
;
}
else
if
(
famL_drive
)
else
if
(
famL
V
_drive
)
{
D_S
[
d
].
status_bits
|=
p_success
;
if
(
st
&
p_caddin_old
)
D_S
[
d
].
status_bits
|=
p_disk_ok
|
p_caddy_in
;
...
...
@@ -1052,7 +1066,6 @@ static int get_state_T(void)
static
int
cmd_out_T
(
void
);
msg
(
DBG_TE2
,
"doing get_state_T...
\n
"
);
clr_cmdbuf
();
D_S
[
d
].
n_bytes
=
1
;
drvcmd
[
0
]
=
CMDT_STATUS
;
...
...
@@ -1087,7 +1100,6 @@ static int get_state_T(void)
D_S
[
d
].
status_bits
=
p1_door_closed
;
D_S
[
d
].
open_count
=
0
;
}
msg
(
DBG_TE2
,
"get_state_T done (%02X)...
\n
"
,
D_S
[
d
].
status_bits
);
return
(
D_S
[
d
].
status_bits
);
}
/*==========================================================================*/
...
...
@@ -1135,10 +1147,10 @@ static void cc_ReadStatus(void)
msg
(
DBG_STA
,
"giving cc_ReadStatus command
\n
"
);
if
(
famT_drive
)
return
;
SBPCD_CLI
;
if
(
fam0L_drive
)
OUT
(
CDo_command
,
CMD0_STATUS
);
if
(
fam0L
V
_drive
)
OUT
(
CDo_command
,
CMD0_STATUS
);
else
if
(
fam1_drive
)
OUT
(
CDo_command
,
CMD1_STATUS
);
else
if
(
fam2_drive
)
OUT
(
CDo_command
,
CMD2_STATUS
);
if
(
!
fam0L_drive
)
for
(
i
=
0
;
i
<
6
;
i
++
)
OUT
(
CDo_command
,
0
);
if
(
!
fam0L
V
_drive
)
for
(
i
=
0
;
i
<
6
;
i
++
)
OUT
(
CDo_command
,
0
);
SBPCD_STI
;
}
/*==========================================================================*/
...
...
@@ -1154,11 +1166,11 @@ static int cc_ReadError(void)
response_count
=
8
;
flags_cmd_out
=
f_putcmd
|
f_ResponseStatus
;
}
else
if
(
fam0L_drive
)
else
if
(
fam0L
V
_drive
)
{
drvcmd
[
0
]
=
CMD0_READ_ERR
;
response_count
=
6
;
if
(
famL_drive
)
if
(
famL
V
_drive
)
flags_cmd_out
=
f_putcmd
;
else
flags_cmd_out
=
f_putcmd
|
f_getsta
|
f_ResponseStatus
;
...
...
@@ -1178,7 +1190,7 @@ static int cc_ReadError(void)
D_S
[
d
].
error_byte
=
0
;
msg
(
DBG_ERR
,
"cc_ReadError: cmd_out(CMDx_READ_ERR) returns %d (%02X)
\n
"
,
i
,
i
);
if
(
i
<
0
)
return
(
i
);
if
(
fam0_drive
)
i
=
1
;
if
(
fam0
V
_drive
)
i
=
1
;
else
i
=
2
;
D_S
[
d
].
error_byte
=
infobuf
[
i
];
msg
(
DBG_ERR
,
"cc_ReadError: infobuf[%d] is %d (%02X)
\n
"
,
i
,
D_S
[
d
].
error_byte
,
D_S
[
d
].
error_byte
);
...
...
@@ -1376,15 +1388,18 @@ static int cc_Seek(u_int pos, char f_blk_msf)
clr_cmdbuf
();
if
(
f_blk_msf
>
1
)
return
(
-
3
);
if
(
fam0_drive
)
if
(
fam0
V
_drive
)
{
drvcmd
[
0
]
=
CMD0_SEEK
;
if
(
f_blk_msf
==
1
)
pos
=
msf2blk
(
pos
);
drvcmd
[
2
]
=
(
pos
>>
16
)
&
0x00FF
;
drvcmd
[
3
]
=
(
pos
>>
8
)
&
0x00FF
;
drvcmd
[
4
]
=
pos
&
0x00FF
;
if
(
fam0_drive
)
flags_cmd_out
=
f_putcmd
|
f_respo2
|
f_lopsta
|
f_getsta
|
f_ResponseStatus
|
f_obey_p_check
|
f_bit1
;
else
flags_cmd_out
=
f_putcmd
;
}
else
if
(
fam1L_drive
)
{
...
...
@@ -1430,11 +1445,14 @@ static int cc_SpinUp(void)
msg
(
DBG_SPI
,
"SpinUp.
\n
"
);
D_S
[
d
].
in_SpinUp
=
1
;
clr_cmdbuf
();
if
(
fam0L_drive
)
if
(
fam0L
V
_drive
)
{
drvcmd
[
0
]
=
CMD0_SPINUP
;
if
(
fam0L_drive
)
flags_cmd_out
=
f_putcmd
|
f_respo2
|
f_lopsta
|
f_getsta
|
f_ResponseStatus
|
f_obey_p_check
|
f_bit1
;
else
flags_cmd_out
=
f_putcmd
;
}
else
if
(
fam1_drive
)
{
...
...
@@ -1482,6 +1500,11 @@ static int cc_SpinDown(void)
drvcmd
[
1
]
=
1
;
flags_cmd_out
=
f_putcmd
|
f_respo2
|
f_lopsta
|
f_getsta
|
f_ResponseStatus
|
f_obey_p_check
|
f_bit1
;
}
else
if
(
famV_drive
)
{
drvcmd
[
0
]
=
CMDV_SPINDOWN
;
flags_cmd_out
=
f_putcmd
;
}
else
if
(
famT_drive
)
{
drvcmd
[
0
]
=
CMDT_TRAY_CTL
;
...
...
@@ -1555,7 +1578,7 @@ static int cc_SetSpeed(u_char speed, u_char x1, u_char x2)
{
int
i
;
if
(
fam0L_drive
)
return
(
-
3
);
if
(
fam0L
V
_drive
)
return
(
-
3
);
clr_cmdbuf
();
response_count
=
0
;
if
(
fam1_drive
)
...
...
@@ -1604,6 +1627,8 @@ static int cc_SetVolume(void)
volume1
=
value1
=
D_S
[
d
].
vol_ctrl1
;
control0
=
value0
=
0
;
if
(
famV_drive
)
return
(
0
);
if
(((
D_S
[
d
].
drv_options
&
audio_mono
)
!=
0
)
&&
(
D_S
[
d
].
drv_type
>=
drv_211
))
{
if
((
volume0
!=
0
)
&&
(
volume1
==
0
))
...
...
@@ -1774,7 +1799,7 @@ static int cc_DriveReset(void)
msg
(
DBG_RES
,
"cc_DriveReset called.
\n
"
);
clr_cmdbuf
();
response_count
=
0
;
if
(
fam0L_drive
)
OUT
(
CDo_reset
,
0x00
);
if
(
fam0L
V
_drive
)
OUT
(
CDo_reset
,
0x00
);
else
if
(
fam1_drive
)
{
drvcmd
[
0
]
=
CMD1_RESET
;
...
...
@@ -1795,7 +1820,7 @@ static int cc_DriveReset(void)
OUT
(
CDo_command
,
CMDT_RESET
);
for
(
i
=
1
;
i
<
10
;
i
++
)
OUT
(
CDo_command
,
0
);
}
if
(
fam0L_drive
)
sbp_sleep
(
5
*
HZ
);
/* wait 5 seconds */
if
(
fam0L
V
_drive
)
sbp_sleep
(
5
*
HZ
);
/* wait 5 seconds */
else
sbp_sleep
(
1
*
HZ
);
/* wait a second */
#if 1
if
(
famT_drive
)
...
...
@@ -1859,7 +1884,7 @@ static int cc_PlayAudio(int pos_audio_start,int pos_audio_end)
if
(
D_S
[
d
].
audio_state
==
audio_playing
)
return
(
-
EINVAL
);
clr_cmdbuf
();
response_count
=
0
;
if
(
famL_drive
)
if
(
famL
V
_drive
)
{
drvcmd
[
0
]
=
CMDL_PLAY
;
i
=
msf2blk
(
pos_audio_start
);
...
...
@@ -1870,8 +1895,11 @@ static int cc_PlayAudio(int pos_audio_start,int pos_audio_end)
drvcmd
[
4
]
=
(
n
>>
16
)
&
0x00FF
;
drvcmd
[
5
]
=
(
n
>>
8
)
&
0x00FF
;
drvcmd
[
6
]
=
n
&
0x00FF
;
if
(
famL_drive
)
flags_cmd_out
=
f_putcmd
|
f_respo2
|
f_lopsta
|
f_getsta
|
f_ResponseStatus
|
f_obey_p_check
|
f_wait_if_busy
;
else
flags_cmd_out
=
f_putcmd
;
}
else
{
...
...
@@ -1928,13 +1956,15 @@ static int cc_Pause_Resume(int pau_res)
if
(
pau_res
!=
1
)
drvcmd
[
2
]
=
0x01
;
flags_cmd_out
=
f_putcmd
|
f_ResponseStatus
;
}
else
if
(
fam0L_drive
)
else
if
(
fam0L
V
_drive
)
{
drvcmd
[
0
]
=
CMD0_PAU_RES
;
if
(
pau_res
!=
1
)
drvcmd
[
1
]
=
0x80
;
if
(
famL_drive
)
flags_cmd_out
=
f_putcmd
|
f_respo2
|
f_lopsta
|
f_getsta
|
f_ResponseStatus
|
f_obey_p_check
|
f_bit1
;
else
if
(
famV_drive
)
flags_cmd_out
=
f_putcmd
;
else
flags_cmd_out
=
f_putcmd
|
f_respo2
|
f_lopsta
|
f_getsta
|
f_ResponseStatus
|
f_obey_p_check
;
...
...
@@ -1970,11 +2000,14 @@ static int cc_LockDoor(char lock)
if
(
lock
==
1
)
drvcmd
[
4
]
=
0x01
;
flags_cmd_out
=
f_putcmd
|
f_ResponseStatus
;
}
else
if
(
famL_drive
)
else
if
(
famL
V
_drive
)
{
drvcmd
[
0
]
=
CMDL_LOCK_CTL
;
if
(
lock
==
1
)
drvcmd
[
1
]
=
0x01
;
if
(
famL_drive
)
flags_cmd_out
=
f_putcmd
|
f_respo2
|
f_lopsta
|
f_getsta
|
f_ResponseStatus
|
f_obey_p_check
|
f_bit1
;
else
flags_cmd_out
=
f_putcmd
;
}
else
if
(
famT_drive
)
{
...
...
@@ -2056,11 +2089,14 @@ static int cc_CloseTray(void)
drvcmd
[
4
]
=
0x03
;
/* "insert" */
flags_cmd_out
=
f_putcmd
|
f_ResponseStatus
;
}
else
if
(
famL_drive
)
else
if
(
famL
V
_drive
)
{
drvcmd
[
0
]
=
CMDL_TRAY_CTL
;
if
(
famLV_drive
)
flags_cmd_out
=
f_putcmd
|
f_respo2
|
f_lopsta
|
f_getsta
|
f_ResponseStatus
|
f_obey_p_check
|
f_bit1
;
else
flags_cmd_out
=
f_putcmd
;
}
else
if
(
famT_drive
)
{
...
...
@@ -2094,11 +2130,11 @@ static int cc_ReadSubQ(void)
flags_cmd_out
=
f_putcmd
;
response_count
=
10
;
}
else
if
(
fam0L_drive
)
else
if
(
fam0L
V
_drive
)
{
drvcmd
[
0
]
=
CMD0_READSUBQ
;
drvcmd
[
1
]
=
0x02
;
if
(
famL_drive
)
if
(
famL
V
_drive
)
flags_cmd_out
=
f_putcmd
;
else
flags_cmd_out
=
f_putcmd
|
f_getsta
|
f_ResponseStatus
|
f_obey_p_check
;
...
...
@@ -2134,12 +2170,12 @@ static int cc_ReadSubQ(void)
else
D_S
[
d
].
SubQ_ctl_adr
=
swap_nibbles
(
infobuf
[
1
]);
D_S
[
d
].
SubQ_trk
=
byt2bcd
(
infobuf
[
2
]);
D_S
[
d
].
SubQ_pnt_idx
=
byt2bcd
(
infobuf
[
3
]);
if
(
fam0L_drive
)
i
=
5
;
if
(
fam0L
V
_drive
)
i
=
5
;
else
if
(
fam12_drive
)
i
=
4
;
else
if
(
famT_drive
)
i
=
8
;
D_S
[
d
].
SubQ_run_tot
=
make32
(
make16
(
0
,
infobuf
[
i
]),
make16
(
infobuf
[
i
+
1
],
infobuf
[
i
+
2
]));
/* msf-bin */
i
=
7
;
if
(
fam0L_drive
)
i
=
9
;
if
(
fam0L
V
_drive
)
i
=
9
;
else
if
(
fam12_drive
)
i
=
7
;
else
if
(
famT_drive
)
i
=
4
;
D_S
[
d
].
SubQ_run_trk
=
make32
(
make16
(
0
,
infobuf
[
i
]),
make16
(
infobuf
[
i
+
1
],
infobuf
[
i
+
2
]));
/* msf-bin */
...
...
@@ -2153,6 +2189,7 @@ static int cc_ModeSense(void)
int
i
;
if
(
fam2_drive
)
return
(
0
);
if
(
famV_drive
)
return
(
0
);
D_S
[
d
].
diskstate_flags
&=
~
frame_size_bit
;
clr_cmdbuf
();
if
(
fam1_drive
)
...
...
@@ -2201,6 +2238,7 @@ static int cc_ModeSelect(int framesize)
int
i
;
if
(
fam2_drive
)
return
(
0
);
if
(
famV_drive
)
return
(
0
);
D_S
[
d
].
diskstate_flags
&=
~
frame_size_bit
;
clr_cmdbuf
();
D_S
[
d
].
frame_size
=
framesize
;
...
...
@@ -2251,6 +2289,7 @@ static int cc_GetVolume(void)
u_char
chan1
=
1
;
u_char
vol1
=
0
;
if
(
famV_drive
)
return
(
0
);
D_S
[
d
].
diskstate_flags
&=
~
volume_bit
;
clr_cmdbuf
();
if
(
fam1_drive
)
...
...
@@ -2381,7 +2420,7 @@ static int cc_ReadCapacity(void)
int
i
,
j
;
if
(
fam2_drive
)
return
(
0
);
/* some firmware lacks this command */
if
(
famL_drive
)
return
(
0
);
/* some firmware lacks this command */
if
(
famL
V
_drive
)
return
(
0
);
/* some firmware lacks this command */
if
(
famT_drive
)
return
(
0
);
/* done with cc_ReadTocDescr() */
D_S
[
d
].
diskstate_flags
&=
~
cd_size_bit
;
for
(
j
=
3
;
j
>
0
;
j
--
)
...
...
@@ -2435,11 +2474,11 @@ static int cc_ReadTocDescr(void)
response_count
=
6
;
flags_cmd_out
=
f_putcmd
|
f_ResponseStatus
|
f_obey_p_check
;
}
else
if
(
fam0L_drive
)
else
if
(
fam0L
V
_drive
)
{
drvcmd
[
0
]
=
CMD0_DISKINFO
;
response_count
=
6
;
if
(
famL_drive
)
if
(
famL
V
_drive
)
flags_cmd_out
=
f_putcmd
;
else
flags_cmd_out
=
f_putcmd
|
f_getsta
|
f_ResponseStatus
|
f_obey_p_check
;
...
...
@@ -2467,7 +2506,7 @@ static int cc_ReadTocDescr(void)
}
i
=
cmd_out
();
if
(
i
<
0
)
return
(
i
);
if
((
fam1_drive
)
||
(
fam2_drive
)
||
(
fam
L_drive
)
||
(
fam0
_drive
))
if
((
fam1_drive
)
||
(
fam2_drive
)
||
(
fam
0LV
_drive
))
D_S
[
d
].
xa_byte
=
infobuf
[
0
];
if
(
fam2_drive
)
{
...
...
@@ -2527,7 +2566,7 @@ static int cc_ReadTocDescr(void)
D_S
[
d
].
n_last_track
=
infobuf
[
2
];
D_S
[
d
].
size_msf
=
make32
(
make16
(
0
,
infobuf
[
3
]),
make16
(
infobuf
[
4
],
infobuf
[
5
]));
D_S
[
d
].
size_blk
=
msf2blk
(
D_S
[
d
].
size_msf
);
if
(
famL_drive
)
D_S
[
d
].
CDsize_frm
=
D_S
[
d
].
size_blk
+
1
;
if
(
famL
V
_drive
)
D_S
[
d
].
CDsize_frm
=
D_S
[
d
].
size_blk
+
1
;
}
D_S
[
d
].
diskstate_flags
|=
toc_bit
;
msg
(
DBG_TOC
,
"TocDesc: %02X %02X %02X %08X
\n
"
,
...
...
@@ -2559,13 +2598,13 @@ static int cc_ReadTocEntry(int num)
response_count
=
5
;
flags_cmd_out
=
f_putcmd
;
}
else
if
(
fam0L_drive
)
else
if
(
fam0L
V
_drive
)
{
drvcmd
[
0
]
=
CMD0_READTOC
;
drvcmd
[
1
]
=
0x02
;
drvcmd
[
2
]
=
num
;
response_count
=
8
;
if
(
famL
_drive
)
if
(
famLV
_drive
)
flags_cmd_out
=
f_putcmd
;
else
flags_cmd_out
=
f_putcmd
|
f_getsta
|
f_ResponseStatus
|
f_obey_p_check
;
...
...
@@ -2581,29 +2620,34 @@ static int cc_ReadTocEntry(int num)
}
i
=
cmd_out
();
if
(
i
<
0
)
return
(
i
);
if
((
fam1_drive
)
||
(
fam
L_drive
)
||
(
fam0
_drive
))
if
((
fam1_drive
)
||
(
fam
0LV
_drive
))
{
D_S
[
d
].
TocEnt_nixbyte
=
infobuf
[
0
];
i
=
1
;
}
else
if
(
fam2_drive
)
i
=
0
;
else
if
(
famT_drive
)
{
i
=
5
;
}
else
if
(
famT_drive
)
i
=
5
;
D_S
[
d
].
TocEnt_ctl_adr
=
swap_nibbles
(
infobuf
[
i
++
]);
if
((
fam1_drive
)
||
(
fam
L_drive
)
||
(
fam0
_drive
))
if
((
fam1_drive
)
||
(
fam
0L
_drive
))
{
D_S
[
d
].
TocEnt_number
=
infobuf
[
i
++
];
D_S
[
d
].
TocEnt_format
=
infobuf
[
i
];
}
else
D_S
[
d
].
TocEnt_number
=
num
;
else
{
D_S
[
d
].
TocEnt_number
=
num
;
D_S
[
d
].
TocEnt_format
=
0
;
}
if
(
fam1_drive
)
i
=
4
;
else
if
(
fam0L_drive
)
i
=
5
;
else
if
(
fam0L
V
_drive
)
i
=
5
;
else
if
(
fam2_drive
)
i
=
2
;
else
if
(
famT_drive
)
i
=
9
;
D_S
[
d
].
TocEnt_address
=
make32
(
make16
(
0
,
infobuf
[
i
]),
make16
(
infobuf
[
i
+
1
],
infobuf
[
i
+
2
]));
for
(
i
=
0
;
i
<
response_count
;
i
++
)
sprintf
(
&
msgbuf
[
i
*
3
],
" %02X"
,
infobuf
[
i
]);
msgbuf
[
i
*
3
]
=
0
;
msg
(
DBG_ECS
,
"TocEntry:%s
\n
"
,
msgbuf
);
msg
(
DBG_TOC
,
"TocEntry: %02X %02X %02X %02X %08X
\n
"
,
D_S
[
d
].
TocEnt_nixbyte
,
D_S
[
d
].
TocEnt_ctl_adr
,
D_S
[
d
].
TocEnt_number
,
D_S
[
d
].
TocEnt_format
,
...
...
@@ -2666,6 +2710,7 @@ static int cc_ReadUPC(void)
if
(
fam2_drive
)
return
(
0
);
/* not implemented yet */
if
(
famT_drive
)
return
(
0
);
/* not implemented yet */
if
(
famV_drive
)
return
(
0
);
/* not implemented yet */
#if 1
if
(
fam0_drive
)
return
(
0
);
/* but it should work */
#endif 1
...
...
@@ -2779,7 +2824,7 @@ static int cc_CheckMultiSession(void)
make16
(
infobuf
[
2
],
infobuf
[
3
])));
}
}
else
if
(
famL_drive
)
else
if
(
famL
V
_drive
)
{
drvcmd
[
0
]
=
CMDL_MULTISESS
;
drvcmd
[
1
]
=
3
;
...
...
@@ -2828,7 +2873,7 @@ static int cc_SubChanInfo(int frame, int count, u_char *buffer)
{
int
i
;
if
(
fam0L_drive
)
return
(
-
ENOSYS
);
/* drive firmware lacks it */
if
(
fam0L
V
_drive
)
return
(
-
ENOSYS
);
/* drive firmware lacks it */
if
(
famT_drive
)
{
return
(
-
1
);
...
...
@@ -2944,11 +2989,10 @@ static int check_version(void)
int
i
,
j
,
l
;
int
teac_possible
=
0
;
msg
(
DBG_INI
,
"check_version entered.
\n
"
);
msg
(
DBG_TE2
,
"check_version: id=%d, d=%d.
\n
"
,
D_S
[
d
].
drv_id
,
d
);
msg
(
DBG_INI
,
"check_version: id=%d, d=%d.
\n
"
,
D_S
[
d
].
drv_id
,
d
);
D_S
[
d
].
drv_type
=
0
;
/* check for CR-52x, CR-56x
and LCS-7260
*/
/* check for CR-52x, CR-56x
, LCS-7260 and ECS-AT
*/
/* clear any pending error state */
clr_cmdbuf
();
drvcmd
[
0
]
=
CMD0_READ_ERR
;
/* same as CMD1_ and CMDL_ */
...
...
@@ -2972,13 +3016,11 @@ static int check_version(void)
for
(
i
=
0
;
i
<
12
;
i
++
)
sprintf
(
&
msgbuf
[
i
*
3
],
" %02X"
,
infobuf
[
i
]);
msgbuf
[
i
*
3
]
=
0
;
msg
(
DBG_IDX
,
"infobuf =%s
\n
"
,
msgbuf
);
msg
(
DBG_000
,
"infobuf =%s
\n
"
,
msgbuf
);
msg
(
DBG_ECS
,
"infobuf =%s
\n
"
,
msgbuf
);
for
(
i
=
0
;
i
<
12
;
i
++
)
sprintf
(
&
msgbuf
[
i
*
3
],
" %c "
,
infobuf
[
i
]);
msgbuf
[
i
*
3
]
=
0
;
msg
(
DBG_IDX
,
"infobuf =%s
\n
"
,
msgbuf
);
msg
(
DBG_000
,
"infobuf =%s
\n
"
,
msgbuf
);
msg
(
DBG_ECS
,
"infobuf =%s
\n
"
,
msgbuf
);
}
for
(
i
=
0
;
i
<
4
;
i
++
)
if
(
infobuf
[
i
]
!=
family1
[
i
])
break
;
if
(
i
==
4
)
...
...
@@ -3019,6 +3061,18 @@ static int check_version(void)
}
}
if
(
!
D_S
[
d
].
drv_type
)
{
for
(
i
=
0
;
i
<
6
;
i
++
)
if
(
infobuf
[
i
]
!=
familyV
[
i
])
break
;
if
(
i
==
6
)
{
for
(
j
=
0
;
j
<
6
;
j
++
)
D_S
[
d
].
drive_model
[
j
]
=
infobuf
[
j
];
D_S
[
d
].
drive_model
[
6
]
=
0
;
D_S
[
d
].
drv_type
=
drv_famV
;
i
+=
2
;
/* 2 blanks before version */
}
}
if
(
!
D_S
[
d
].
drv_type
)
{
/* check for CD200 */
clr_cmdbuf
();
...
...
@@ -3168,7 +3222,7 @@ static int check_version(void)
D_S
[
d
].
firmware_version
[
3
]
=
'0'
+
(
j
&
0x0f
);
}
}
else
/* CR-52x, CR-56x, CD200 */
else
/* CR-52x, CR-56x, CD200
, ECS-AT
*/
{
j
=
(
D_S
[
d
].
firmware_version
[
0
]
&
0x0F
)
*
100
+
(
D_S
[
d
].
firmware_version
[
2
]
&
0x0F
)
*
10
+
...
...
@@ -3195,14 +3249,21 @@ static int check_version(void)
{
if
(
D_S
[
d
].
drive_model
[
5
]
==
'F'
)
{
if
((
j
!=
1
)
&&
(
j
!=
35
)
&&
(
j
!=
200
)
&&
(
j
!=
210
))
ask_mail
();
/* unknown version at time */
if
((
j
!=
1
)
&&
(
j
!=
35
)
&&
(
j
!=
200
)
&&
(
j
!=
210
))
ask_mail
();
/* unknown version at time */
}
else
{
msg
(
DBG_INF
,
"this CD200 drive is not fully supported yet - only audio will work.
\n
"
);
if
((
j
!=
101
)
&&
(
j
!=
35
))
ask_mail
();
/* unknown version at time */
if
((
j
!=
101
)
&&
(
j
!=
35
))
ask_mail
();
/* unknown version at time */
}
}
else
if
(
famV_drive
)
{
if
(
j
==
100
)
D_S
[
d
].
drv_type
=
drv_at
;
ask_mail
();
/* hopefully we get some feedback by this */
}
}
msg
(
DBG_LCS
,
"drive type %02X
\n
"
,
D_S
[
d
].
drv_type
);
msg
(
DBG_INI
,
"check_version done.
\n
"
);
...
...
@@ -4049,6 +4110,7 @@ static int sbpcd_ioctl(struct inode *inode, struct file *file, u_int cmd,
msg
(
DBG_IOC
,
"ioctl: CDROMREADAUDIO entered.
\n
"
);
if
(
fam0_drive
)
return
(
-
EINVAL
);
if
(
famL_drive
)
return
(
-
EINVAL
);
if
(
famV_drive
)
return
(
-
EINVAL
);
if
(
famT_drive
)
return
(
-
EINVAL
);
if
(
D_S
[
d
].
aud_buf
==
NULL
)
return
(
-
EINVAL
);
i
=
verify_area
(
VERIFY_READ
,
(
void
*
)
arg
,
sizeof
(
struct
cdrom_read_audio
));
...
...
@@ -4412,17 +4474,29 @@ static void sbp_read_cmd(void)
flags_cmd_out
=
f_putcmd
|
f_respo2
|
f_ResponseStatus
|
f_obey_p_check
;
clr_cmdbuf
();
if
(
fam0L_drive
)
if
(
famV_drive
)
{
drvcmd
[
0
]
=
CMDV_READ
;
lba2msf
(
block
,
&
drvcmd
[
1
]);
/* msf-bcd format required */
bin2bcdx
(
&
drvcmd
[
1
]);
bin2bcdx
(
&
drvcmd
[
2
]);
bin2bcdx
(
&
drvcmd
[
3
]);
drvcmd
[
4
]
=
D_S
[
d
].
sbp_read_frames
>>
8
;
drvcmd
[
5
]
=
D_S
[
d
].
sbp_read_frames
&
0xff
;
drvcmd
[
6
]
=
0x02
;
/* flag "msf-bcd" */
}
else
if
(
fam0L_drive
)
{
flags_cmd_out
|=
f_lopsta
|
f_getsta
|
f_bit1
;
if
(
D_S
[
d
].
xa_byte
==
0x20
)
{
cmd_type
=
READ_M2
;
drvcmd
[
0
]
=
CMD0_READ_XA
;
/* "read XA frames", old drives */
drvcmd
[
1
]
=
(
block
>>
16
)
&
0x000000ff
;
drvcmd
[
2
]
=
(
block
>>
8
)
&
0x000000ff
;
drvcmd
[
3
]
=
block
&
0x000000ff
;
drvcmd
[
5
]
=
D_S
[
d
].
sbp_read_frames
;
drvcmd
[
1
]
=
(
block
>>
16
)
&
0x0ff
;
drvcmd
[
2
]
=
(
block
>>
8
)
&
0x0ff
;
drvcmd
[
3
]
=
block
&
0x0ff
;
drvcmd
[
4
]
=
(
D_S
[
d
].
sbp_read_frames
>>
8
)
&
0x0ff
;
drvcmd
[
5
]
=
D_S
[
d
].
sbp_read_frames
&
0x0ff
;
}
else
{
...
...
@@ -4436,11 +4510,12 @@ static void sbp_read_cmd(void)
}
else
{
drvcmd
[
1
]
=
(
block
>>
16
)
&
0x0
00000
ff
;
drvcmd
[
2
]
=
(
block
>>
8
)
&
0x0
00000
ff
;
drvcmd
[
3
]
=
block
&
0x0
00000
ff
;
drvcmd
[
1
]
=
(
block
>>
16
)
&
0x0ff
;
drvcmd
[
2
]
=
(
block
>>
8
)
&
0x0ff
;
drvcmd
[
3
]
=
block
&
0x0ff
;
}
drvcmd
[
5
]
=
D_S
[
d
].
sbp_read_frames
;
drvcmd
[
4
]
=
(
D_S
[
d
].
sbp_read_frames
>>
8
)
&
0x0ff
;
drvcmd
[
5
]
=
D_S
[
d
].
sbp_read_frames
&
0x0ff
;
drvcmd
[
6
]
=
(
D_S
[
d
].
drv_type
<
drv_201
)
?
0
:
2
;
/* flag "lba or msf-bcd format" */
}
}
...
...
@@ -4448,13 +4523,15 @@ static void sbp_read_cmd(void)
{
drvcmd
[
0
]
=
CMD1_READ
;
lba2msf
(
block
,
&
drvcmd
[
1
]);
/* msf-bin format required */
drvcmd
[
6
]
=
D_S
[
d
].
sbp_read_frames
;
drvcmd
[
5
]
=
(
D_S
[
d
].
sbp_read_frames
>>
8
)
&
0x0ff
;
drvcmd
[
6
]
=
D_S
[
d
].
sbp_read_frames
&
0x0ff
;
}
else
if
(
fam2_drive
)
{
drvcmd
[
0
]
=
CMD2_READ
;
lba2msf
(
block
,
&
drvcmd
[
1
]);
/* msf-bin format required */
drvcmd
[
5
]
=
D_S
[
d
].
sbp_read_frames
;
drvcmd
[
4
]
=
(
D_S
[
d
].
sbp_read_frames
>>
8
)
&
0x0ff
;
drvcmd
[
5
]
=
D_S
[
d
].
sbp_read_frames
&
0x0ff
;
drvcmd
[
6
]
=
0x02
;
}
else
if
(
famT_drive
)
...
...
@@ -4475,7 +4552,7 @@ static void sbp_read_cmd(void)
#else
flags_cmd_out
=
f_putcmd
;
response_count
=
0
;
i
=
cmd_out
();
/* immediate return here - read data "ourselves" */
i
=
cmd_out
();
if
(
i
<
0
)
msg
(
DBG_INF
,
"error giving READ command: %0d
\n
"
,
i
);
#endif OLD
return
;
...
...
@@ -4509,7 +4586,6 @@ static int sbp_data(void)
if
(
D_S
[
d
].
f_multisession
)
max_latency
=
9
*
HZ
;
else
max_latency
=
3
*
HZ
;
#endif
msg
(
DBG_TE2
,
"beginning to READ
\n
"
);
duration
=
jiffies
;
for
(
frame
=
0
;
frame
<
D_S
[
d
].
sbp_read_frames
&&!
error_flag
;
frame
++
)
{
...
...
@@ -4529,7 +4605,7 @@ static int sbp_data(void)
j
=
inb
(
CDi_status
);
if
(
!
(
j
&
s_not_data_ready
))
break
;;
if
(
!
(
j
&
s_not_result_ready
))
break
;
if
(
fam0L_drive
)
if
(
j
&
s_attention
)
break
;
if
(
fam0L
V
_drive
)
if
(
j
&
s_attention
)
break
;
}
if
(
!
(
j
&
s_not_data_ready
))
goto
data_ready
;
if
(
try
==
0
)
...
...
@@ -4580,7 +4656,6 @@ static int sbp_data(void)
if
(
cmd_type
==
READ_M2
)
insb
(
CDi_data
,
xa_head_buf
,
CD_XA_HEAD
);
insb
(
CDi_data
,
p
,
CD_FRAMESIZE
);
if
(
cmd_type
==
READ_M2
)
insb
(
CDi_data
,
xa_tail_buf
,
CD_XA_TAIL
);
if
(
famT_drive
)
msg
(
DBG_TE2
,
"================frame read=================.
\n
"
);
D_S
[
d
].
sbp_current
++
;
if
(
sbpro_type
==
1
)
OUT
(
CDo_sel_i_d
,
0
);
if
(
cmd_type
==
READ_M2
)
...
...
@@ -4599,7 +4674,7 @@ static int sbp_data(void)
}
}
duration
=
jiffies
-
duration
;
msg
(
DBG_TE
2
,
"time to read %d frames: %d jiffies .
\n
"
,
frame
,
duration
);
msg
(
DBG_TE
A
,
"time to read %d frames: %d jiffies .
\n
"
,
frame
,
duration
);
if
(
famT_drive
)
{
wait
=
8
;
...
...
@@ -4635,7 +4710,7 @@ static int sbp_data(void)
#if 1
for
(
j
=
0
;
j
<
l
;
j
++
)
sprintf
(
&
msgbuf
[
j
*
3
],
" %02X"
,
infobuf
[
j
]);
msgbuf
[
j
*
3
]
=
0
;
msg
(
DBG_TE
2
,
"sbp_data info response:%s
\n
"
,
msgbuf
);
msg
(
DBG_TE
A
,
"sbp_data info response:%s
\n
"
,
msgbuf
);
#endif
if
(
infobuf
[
0
]
==
0x02
)
{
...
...
@@ -4681,7 +4756,7 @@ static int sbp_data(void)
return
(
0
);
}
if
(
fam0L_drive
)
if
(
fam0L
V
_drive
)
{
SBPCD_CLI
;
i
=
maxtim_data
;
...
...
@@ -4714,13 +4789,13 @@ static int sbp_data(void)
#endif 0
do
{
if
(
fam0L_drive
)
cc_ReadStatus
();
if
(
fam0L
V
_drive
)
cc_ReadStatus
();
#if 1
if
(
famT_drive
)
msg
(
DBG_TE
2
,
"================before ResponseStatus=================.
\n
"
,
i
);
if
(
famT_drive
)
msg
(
DBG_TE
A
,
"================before ResponseStatus=================.
\n
"
,
i
);
#endif 1
i
=
ResponseStatus
();
/* builds status_bits, returns orig. status (old) or faked p_success (new) */
#if 1
if
(
famT_drive
)
msg
(
DBG_TE
2
,
"================ResponseStatus: %d=================.
\n
"
,
i
);
if
(
famT_drive
)
msg
(
DBG_TE
A
,
"================ResponseStatus: %d=================.
\n
"
,
i
);
#endif 1
if
(
i
<
0
)
{
...
...
@@ -4728,7 +4803,7 @@ static int sbp_data(void)
return
(
0
);
}
}
while
((
fam0L_drive
)
&&
(
!
st_check
)
&&
(
!
(
i
&
p_success
)));
while
((
fam0L
V
_drive
)
&&
(
!
st_check
)
&&
(
!
(
i
&
p_success
)));
if
(
st_check
)
{
i
=
cc_ReadError
();
...
...
@@ -4747,9 +4822,6 @@ static int sbp_data(void)
D_S
[
d
].
sbp_first_frame
=
CURRENT
->
sector
/
4
;
D_S
[
d
].
sbp_last_frame
=
D_S
[
d
].
sbp_first_frame
+
D_S
[
d
].
sbp_read_frames
-
1
;
sbp_transfer
();
#if 1
if
(
famT_drive
)
msg
(
DBG_TE2
,
"================sbp_transfer() done=================.
\n
"
);
#endif 1
return
(
1
);
}
/*==========================================================================*/
...
...
@@ -4787,10 +4859,10 @@ static int sbpcd_open(struct inode *ip, struct file *fp)
msg
(
DBG_INF
,
"sbpcd_open: ResponseStatus timed out (%d).
\n
"
,
i
);
return
(
-
EIO
);
/* drive doesn't respond */
}
if
(
famT_drive
)
msg
(
DBG_TE
2
,
"sbpcd_open: ResponseStatus=%02X
\n
"
,
i
);
if
(
famT_drive
)
msg
(
DBG_TE
A
,
"sbpcd_open: ResponseStatus=%02X
\n
"
,
i
);
if
(
!
st_door_closed
)
{
if
(
famT_drive
)
msg
(
DBG_TE
2
,
"sbpcd_open: !st_door_closed.
\n
"
);
if
(
famT_drive
)
msg
(
DBG_TE
A
,
"sbpcd_open: !st_door_closed.
\n
"
);
cc_CloseTray
();
flags_cmd_out
|=
f_respo2
;
cc_ReadStatus
();
...
...
@@ -4799,13 +4871,13 @@ static int sbpcd_open(struct inode *ip, struct file *fp)
if
(
!
(
famT_drive
))
if
(
!
st_spinning
)
{
if
(
famT_drive
)
msg
(
DBG_TE
2
,
"sbpcd_open: !st_spinning.
\n
"
);
if
(
famT_drive
)
msg
(
DBG_TE
A
,
"sbpcd_open: !st_spinning.
\n
"
);
cc_SpinUp
();
flags_cmd_out
|=
f_respo2
;
cc_ReadStatus
();
i
=
ResponseStatus
();
}
if
(
famT_drive
)
msg
(
DBG_TE
2
,
"sbpcd_open: status %02X
\n
"
,
D_S
[
d
].
status_bits
);
if
(
famT_drive
)
msg
(
DBG_TE
A
,
"sbpcd_open: status %02X
\n
"
,
D_S
[
d
].
status_bits
);
if
(
!
st_door_closed
||!
st_caddy_in
)
{
msg
(
DBG_INF
,
"sbpcd_open: no disk in drive.
\n
"
);
...
...
@@ -4829,9 +4901,9 @@ static int sbpcd_open(struct inode *ip, struct file *fp)
{
i
=
LockDoor
();
D_S
[
d
].
open_count
=
1
;
if
(
famT_drive
)
msg
(
DBG_TE
2
,
"sbpcd_open: before i=DiskInfo();.
\n
"
);
if
(
famT_drive
)
msg
(
DBG_TE
A
,
"sbpcd_open: before i=DiskInfo();.
\n
"
);
i
=
DiskInfo
();
if
(
famT_drive
)
msg
(
DBG_TE
2
,
"sbpcd_open: after i=DiskInfo();.
\n
"
);
if
(
famT_drive
)
msg
(
DBG_TE
A
,
"sbpcd_open: after i=DiskInfo();.
\n
"
);
if
((
D_S
[
d
].
ored_ctl_adr
&
0x40
)
==
0
)
msg
(
DBG_INF
,
"CD contains no data tracks.
\n
"
);
}
...
...
@@ -4970,9 +5042,17 @@ void sbpcd_setup(const char *s, int *p)
*/
static
int
config_spea
(
void
)
{
int
n_ports
=
0x10
;
/* 2:0x00, 8:0x10, 16:0x20, 32:0x30 */
/* base address offset between configuration port and CDROM port */
int
irq_number
=
0
;
/* off:0x00, 2:0x01, 7:0x03, 12:0x05, 15:0x07 */
/*
* base address offset between configuration port and CDROM port,
* this probably defines the interface type
* 2 (type=??): 0x00
* 8 (type=LaserMate):0x10
* 16 (type=??):0x20
* 32 (type=??):0x30
*/
int
n_ports
=
0x10
;
int
irq_number
=
0
;
/* off:0x00, 2/9:0x01, 7:0x03, 12:0x05, 15:0x07 */
int
dma_channel
=
0
;
/* off: 0x00, 0:0x08, 1:0x18, 3:0x38, 5:0x58, 6:0x68 */
int
dack_polarity
=
0
;
/* L:0x00, H:0x80 */
int
drq_polarity
=
0x40
;
/* L:0x00, H:0x40 */
...
...
@@ -5221,8 +5301,8 @@ int SBPCD_INIT(void)
}
blksize_size
[
MAJOR_NR
]
=
sbpcd_blocksizes
;
init_done:
#ifndef MODULE
init_done:
#if !(SBPCD_ISSUE-1)
#ifdef CONFIG_SBPCD2
sbpcd2_init
();
...
...
drivers/char/softdog.c
View file @
001e3f20
...
...
@@ -59,6 +59,7 @@ static int softdog_open(struct inode *inode, struct file *file)
*/
watchdog_ticktock
.
expires
=
jiffies
+
TIMER_MARGIN
;
add_timer
(
&
watchdog_ticktock
);
timer_alive
++
;
return
0
;
}
...
...
@@ -111,5 +112,5 @@ void watchdog_init(void)
mouse_register
(
&
softdog_mouse
);
init_timer
(
&
watchdog_ticktock
);
watchdog_ticktock
.
function
=
watchdog_fire
;
printk
(
"Software Watchdog Timer: 0.0
2
\n
"
);
printk
(
"Software Watchdog Timer: 0.0
3
\n
"
);
}
drivers/scsi/53c7,8xx.c
View file @
001e3f20
...
...
@@ -1177,6 +1177,7 @@ normal_init (Scsi_Host_Template *tpnt, int board, int chip,
char
chip_str
[
80
];
int
script_len
=
0
,
dsa_len
=
0
,
size
=
0
,
max_cmd_size
=
0
,
schedule_size
=
0
,
ok
=
0
;
void
*
tmp
;
options
|=
perm_options
;
...
...
@@ -1221,14 +1222,7 @@ normal_init (Scsi_Host_Template *tpnt, int board, int chip,
tpnt
->
sg_tablesize
+
3
/* Current startup / termination required per phase */
)
*
8
/* Each instruction is eight bytes */
+
(
sizeof
(
void
*
)
-
sizeof
(
u32
));
/* to ensure proper alignment */
/* Note that alignment will be guaranteed, since we put the command
allocated at probe time after the fixed-up SCSI script, which
consists of 32 bit words, aligned on a 32 bit boundary. But
on a 64bit machine we need 8 byte alignment for hostdata->free, so
we add in another 4 bytes to take care of potential misalignment
*/
8
/* Each instruction is eight bytes */
;
/* Allocate fixed part of hostdata, dynamic part to hold appropriate
SCSI SCRIPT(tm) plus a single, maximum-sized NCR53c7x0_cmd structure.
...
...
@@ -1251,8 +1245,14 @@ normal_init (Scsi_Host_Template *tpnt, int board, int chip,
after all device driver initialization).
*/
size
=
sizeof
(
struct
NCR53c7x0_hostdata
)
+
script_len
+
max_cmd_size
+
schedule_size
;
size
=
sizeof
(
struct
NCR53c7x0_hostdata
)
+
script_len
+
/* Note that alignment will be guaranteed, since we put the command
allocated at probe time after the fixed-up SCSI script, which
consists of 32 bit words, aligned on a 32 bit boundary. But
on a 64bit machine we need 8 byte alignment for hostdata->free, so
we add in another 4 bytes to take care of potential misalignment
*/
(
sizeof
(
void
*
)
-
sizeof
(
u32
))
+
max_cmd_size
+
schedule_size
;
instance
=
scsi_register
(
tpnt
,
size
);
if
(
!
instance
)
...
...
@@ -1321,15 +1321,9 @@ normal_init (Scsi_Host_Template *tpnt, int board, int chip,
hostdata
->
max_cmd_size
=
max_cmd_size
;
hostdata
->
num_cmds
=
1
;
/* Initialize single command */
hostdata
->
free
=
(
struct
NCR53c7x0_cmd
*
)
(
hostdata
->
script
+
hostdata
->
script_count
);
/*
* FIXME: This is wrong. If we add max_cmd_size to hostdata->free
* once it's been rounded up, we end up going past the end of what
* we allocated.
*/
hostdata
->
free
=
ROUNDUP
(
hostdata
->
free
,
void
*
);
hostdata
->
free
->
real
=
(
void
*
)
hostdata
->
free
;
tmp
=
(
hostdata
->
script
+
hostdata
->
script_count
);
hostdata
->
free
=
ROUNDUP
(
tmp
,
void
*
);
hostdata
->
free
->
real
=
tmp
;
hostdata
->
free
->
size
=
max_cmd_size
;
hostdata
->
free
->
free
=
NULL
;
hostdata
->
free
->
next
=
NULL
;
...
...
@@ -2165,8 +2159,10 @@ abnormal_finished (struct NCR53c7x0_cmd *cmd, int result) {
if
(
left
<
0
)
printk
(
"scsi%d: loop detected in host running list for scsi pid %ld
\n
"
,
host
->
host_no
,
c
->
pid
);
else
if
(
linux_search
)
else
if
(
linux_search
)
{
*
linux_prev
=
linux_search
->
next
;
--
hostdata
->
busy
[
c
->
target
][
c
->
lun
];
}
/* Return the NCR command structure to the free list */
cmd
->
next
=
hostdata
->
free
;
...
...
@@ -2863,7 +2859,9 @@ NCR53c8x0_dstat_sir_intr (struct Scsi_Host *host, struct
#endif
#ifdef A_int_debug_panic
case
A_int_debug_panic
:
panic
(
"scsi%d : int_debug_panic received
\n
"
,
host
->
host_no
);
printk
(
"scsi%d : int_debug_panic received
\n
"
,
host
->
host_no
);
print_lots
(
host
);
return
SPECIFIC_INT_PANIC
;
#endif
#ifdef A_int_debug_saved
case
A_int_debug_saved
:
...
...
@@ -3376,15 +3374,16 @@ NCR53c8x0_soft_reset (struct Scsi_Host *host) {
NCR53c7x0_write8
(
STEST3_REG_800
,
STEST3_800_TE
);
}
/*
* Function static struct NCR53c7x0_cmd *allocate_cmd (Scsi_Cmnd *cmd)
*
* Purpose : Return the first free NCR53c7x0_cmd structure (which are
* reused in a LIFO maner to minimize cache thrashing).
*
* Side effects : If we don't have enough NCR53c7x0_cmd structures,
* allocate more. Teach programmers not to drink and hack.
* Side effects : If we haven't yet scheduled allocation of NCR53c7x0_cmd
* structures for this device, do so. Attempt to complete all scheduled
* allocations using kmalloc(), putting NCR53c7x0_cmd structures on
* the free list. Teach programmers not to drink and hack.
*
* Inputs : cmd - SCSI command
*
...
...
@@ -3410,19 +3409,27 @@ allocate_cmd (Scsi_Cmnd *cmd) {
(
1
<<
cmd
->
lun
))
?
"allready allocated"
:
"not allocated"
);
/*
* Under Linux 1.2.x, kmalloc() and friends are unavailable until after
* device driver initialization has happened. Calling kmalloc()
* during scsi device initialization will print a "cannot get free page"
* message. To avoid too many of these, we'll forget about trying
* to allocate command structures until AFTER initialization.
* If we have not yet reserved commands for this I_T_L nexus, and
* the device exists (as indicated by permanant Scsi_Cmnd structures
* being allocated under 1.3.x, or being outside of scan_scsis in
* 1.2.x), do so now.
*/
if
(
!
(
hostdata
->
cmd_allocated
[
cmd
->
target
]
&
(
1
<<
cmd
->
lun
))
&&
#ifdef LINUX_1_2
if
(
!
in_scan_scsis
)
!
in_scan_scsis
#else
cmd
->
device
&&
cmd
->
device
->
has_cmdblocks
#endif
)
{
if
((
hostdata
->
extra_allocate
+
hostdata
->
num_cmds
)
<
host
->
can_queue
)
hostdata
->
extra_allocate
+=
host
->
cmd_per_lun
;
hostdata
->
cmd_allocated
[
cmd
->
target
]
|=
(
1
<<
cmd
->
lun
);
}
for
(;
hostdata
->
extra_allocate
>
0
;
--
hostdata
->
extra_allocate
,
++
hostdata
->
num_cmds
)
{
/*
kmalloc() can allocate any size, but historically has returned
unaligned addresses, so we need to allow for alignment
*/
/*
historically, kmalloc has returned unaligned addresses; pad so we
have enough room to ROUNDUP
*/
size
=
hostdata
->
max_cmd_size
+
sizeof
(
void
*
);
/* FIXME: for ISA bus '7xx chips, we need to or GFP_DMA in here */
real
=
kmalloc
(
size
,
GFP_ATOMIC
);
...
...
@@ -4446,29 +4453,9 @@ NCR53c7x0_intr (int irq, struct pt_regs * regs) {
print_command
(
tmp
->
cmnd
);
}
#if 0
hostdata->options &= ~OPTION_DEBUG_INTR;
#endif
/*
* If we have not yet reserved commands for this I_T_L nexus, and the
* command completed successfully, reserve NCR53c7x0_cmd structures
* which will be allocated the next time we run the allocate
* routine.
*/
if
(
!
(
hostdata
->
cmd_allocated
[
tmp
->
target
]
&
(
1
<<
tmp
->
lun
))
&&
status_byte
(
tmp
->
result
)
==
GOOD
)
{
if
((
hostdata
->
extra_allocate
+
hostdata
->
num_cmds
)
<
host
->
can_queue
)
{
hostdata
->
extra_allocate
+=
host
->
cmd_per_lun
;
}
hostdata
->
cmd_allocated
[
tmp
->
target
]
|=
(
1
<<
tmp
->
lun
);
}
tmp
->
scsi_done
(
tmp
);
goto
restart
;
...
...
@@ -5183,7 +5170,7 @@ intr_dma (struct Scsi_Host *host, struct NCR53c7x0_cmd *cmd) {
printk
(
KERN_ALERT
"scsi%d : unexpected single step interrupt at
\n
"
" "
,
host
->
host_no
);
print_insn
(
host
,
dsp
,
KERN_ALERT
""
,
1
);
printk
(
KERN_ALERT
" mail drew@
colorado.edu
\n
"
);
printk
(
KERN_ALERT
" mail drew@
PoohSticks.ORG
\n
"
);
FATAL
(
host
);
}
}
...
...
@@ -5808,6 +5795,14 @@ print_dsa (struct Scsi_Host *host, u32 *dsa, const char *prefix) {
dsa
[
hostdata
->
dsa_msgout
/
sizeof
(
u32
)
+
1
],
bus_to_virt
(
dsa
[
hostdata
->
dsa_msgout
/
sizeof
(
u32
)
+
1
]));
/*
* Only print messages if they're sane in length so we don't
* blow the kernel printk buffer on something which won't buy us
* anything.
*/
if
(
dsa
[
hostdata
->
dsa_msgout
/
sizeof
(
u32
)]
<
sizeof
(
hostdata
->
free
->
select
))
for
(
i
=
dsa
[
hostdata
->
dsa_msgout
/
sizeof
(
u32
)],
ptr
=
bus_to_virt
(
dsa
[
hostdata
->
dsa_msgout
/
sizeof
(
u32
)
+
1
]);
i
>
0
&&
!
check_address
((
unsigned
long
)
ptr
,
1
);
...
...
@@ -5953,12 +5948,15 @@ print_lots (struct Scsi_Host *host) {
sbcl
=
NCR53c7x0_read8
(
SBCL_REG
);
printk
(
"scsi%d : DCMD|DBC=0x%x, DSA=0x%lx (virt 0x%p)
\n
"
printk
(
"scsi%d : DCMD|DBC=0x%x, DNAD=0x%x (virt 0x%p)
\n
"
" DSA=0x%lx (virt 0x%p)
\n
"
" DSPS=0x%x, TEMP=0x%x (virt 0x%p), DMODE=0x%x
\n
"
" SXFER=0x%x, SCNTL3=0x%x
\n
"
" %s%s%sphase=%s, %d bytes in SCSI FIFO
\n
"
" STEST0=0x%x
\n
"
,
host
->
host_no
,
dbc_dcmd
,
virt_to_bus
(
dsa
),
dsa
,
host
->
host_no
,
dbc_dcmd
,
NCR53c7x0_read32
(
DNAD_REG
),
bus_to_virt
(
NCR53c7x0_read32
(
DNAD_REG
)),
virt_to_bus
(
dsa
),
dsa
,
NCR53c7x0_read32
(
DSPS_REG
),
NCR53c7x0_read32
(
TEMP_REG
),
bus_to_virt
(
NCR53c7x0_read32
(
TEMP_REG
)),
(
int
)
NCR53c7x0_read8
(
hostdata
->
dmode
),
...
...
drivers/scsi/53c7,8xx.h
View file @
001e3f20
...
...
@@ -67,7 +67,7 @@ extern int NCR53c7xx_release(struct Scsi_Host *);
#endif
#ifdef LINUX_1_2
#define NCR53c7xx {NULL, NULL, "NCR53c{7,8}xx (rel 1
4
)", NCR53c7xx_detect,\
#define NCR53c7xx {NULL, NULL, "NCR53c{7,8}xx (rel 1
7
)", NCR53c7xx_detect,\
NULL,
/* info */
NULL,
/* command, deprecated */
NULL, \
NCR53c7xx_queue_command, NCR53c7xx_abort, NCR53c7xx_reset, \
NULL
/* slave attach */
, scsicam_bios_param,
/* can queue */
24, \
...
...
@@ -75,7 +75,7 @@ extern int NCR53c7xx_release(struct Scsi_Host *);
/* present */
0,
/* unchecked isa dma */
0, DISABLE_CLUSTERING}
#else
#define NCR53c7xx {NULL, NULL, NULL, NULL, \
"NCR53c{7,8}xx (rel 1
4
)", NCR53c7xx_detect,\
"NCR53c{7,8}xx (rel 1
7
)", NCR53c7xx_detect,\
NULL,
/* info */
NULL,
/* command, deprecated */
NULL, \
NCR53c7xx_queue_command, NCR53c7xx_abort, NCR53c7xx_reset, \
NULL
/* slave attach */
, scsicam_bios_param,
/* can queue */
24, \
...
...
@@ -1447,8 +1447,6 @@ struct NCR53c7x0_hostdata {
volatile
u16
initiate_wdtr
;
/* Bit fielded list of targets we've talked to. */
volatile
u16
talked_to
;
/* Bit fielded list of targets that answered */
volatile
u16
answered
;
/* Array of bit-fielded lun lists that we need to request_sense */
volatile
unsigned
char
request_sense
[
16
];
...
...
drivers/scsi/53c7,8xx.scr
View file @
001e3f20
...
...
@@ -1110,16 +1110,23 @@ selected:
;
; 2. The NCR53c810 was selected or reselected by another device.
;
; 3. The bus was allready busy since we were selected or reselected
; before starting the command.
wait_reselect_failed:
#ifdef EVENTS
INT int_EVENT_RESELECT_FAILED
#endif
; Check selected bit.
MOVE SIST0 & 0x20 TO SFBR
JUMP selected, IF 0x20
; Reading CTEST2 clears the SIG_P bit in the ISTAT register.
MOVE CTEST2 & 0x40 TO SFBR
JUMP schedule, IF 0x40
; Check connected bit.
; FIXME: this needs to change if we support target mode
MOVE ISTAT & 0x08 TO SFBR
JUMP reselected, IF 0x08
; FIXME : Something bogus happened, and we shouldn't fail silently.
#if 0
JUMP schedule
...
...
@@ -1141,6 +1148,11 @@ select_failed:
; Reading CTEST2 clears the SIG_P bit in the ISTAT register.
MOVE CTEST2 & 0x40 TO SFBR
JUMP select, IF 0x40
; Check connected bit.
; FIXME: this needs to change if we support target mode
; FIXME: is this really necessary?
MOVE ISTAT & 0x08 TO SFBR
JUMP reselected, IF 0x08
; FIXME : Something bogus happened, and we shouldn't fail silently.
#if 0
JUMP schedule
...
...
drivers/scsi/53c8xx_d.h
View file @
001e3f20
...
...
@@ -168,7 +168,7 @@ at 0x00000005 : */ 0x78380000,0x00000000,
/*
CALL scratch_to_dsa
at 0x00000007 : */
0x88080000
,
0x000009
6
0
,
at 0x00000007 : */
0x88080000
,
0x000009
8
0
,
/*
CALL select
...
...
@@ -231,7 +231,7 @@ at 0x0000001c : */ 0x78380000,0x00000000,
/*
CALL scratch_to_dsa
at 0x0000001e : */
0x88080000
,
0x000009
6
0
,
at 0x0000001e : */
0x88080000
,
0x000009
8
0
,
/*
JUMP reselected_check_next
...
...
@@ -506,7 +506,7 @@ ENTRY dsa_schedule
;
CALL dsa_to_scratch
at 0x0000005a : */
0x88080000
,
0x000009
1
8
,
at 0x0000005a : */
0x88080000
,
0x000009
3
8
,
/*
MOVE SCRATCH0 + dsa_next TO SCRATCH0
...
...
@@ -548,7 +548,7 @@ at 0x0000006b : */ 0xc0000004,0x00000000,0x00000000,
; And update the head pointer.
CALL dsa_to_scratch
at 0x0000006e : */
0x88080000
,
0x000009
1
8
,
at 0x0000006e : */
0x88080000
,
0x000009
3
8
,
/*
MOVE dmode_ncr_to_memory TO DMODE
...
...
@@ -645,7 +645,7 @@ at 0x0000007f : */ 0x60000200,0x00000000,
SELECT ATN FROM dsa_select, select_failed
at 0x00000081 : */
0x4300003c
,
0x000007
9
4
,
at 0x00000081 : */
0x4300003c
,
0x000007
a
4
,
/*
JUMP select_msgout, WHEN MSG_OUT
...
...
@@ -813,7 +813,7 @@ ENTRY end_data_transfer
do_dataout:
CALL dsa_to_scratch
at 0x000000a3 : */
0x88080000
,
0x000009
1
8
,
at 0x000000a3 : */
0x88080000
,
0x000009
3
8
,
/*
MOVE SCRATCH0 + dsa_dataout TO SCRATCH0
...
...
@@ -858,7 +858,7 @@ at 0x000000b7 : */ 0x80080000,0x00000000,
do_datain:
CALL dsa_to_scratch
at 0x000000b9 : */
0x88080000
,
0x000009
1
8
,
at 0x000000b9 : */
0x88080000
,
0x000009
3
8
,
/*
MOVE SCRATCH0 + dsa_datain TO SCRATCH0
...
...
@@ -1599,7 +1599,7 @@ at 0x000001a2 : */ 0x78380000,0x00000000,
/*
CALL scratch_to_dsa
at 0x000001a4 : */
0x88080000
,
0x000009
6
0
,
at 0x000001a4 : */
0x88080000
,
0x000009
8
0
,
/*
; Fix the update-next pointer so that the reconnect_dsa_head
...
...
@@ -1761,11 +1761,14 @@ at 0x000001d9 : */ 0x98080000,0x00010000,
;
; 2. The NCR53c810 was selected or reselected by another device.
;
; 3. The bus was allready busy since we were selected or reselected
; before starting the command.
wait_reselect_failed:
; Check selected bit.
MOVE SIST0 & 0x20 TO SFBR
at 0x000001db : */
0x74422000
,
0x00000000
,
...
...
@@ -1783,13 +1786,23 @@ at 0x000001df : */ 0x741a4000,0x00000000,
at 0x000001e1 : */
0x800c0040
,
0x00000000
,
/*
; Check connected bit.
; FIXME: this needs to change if we support target mode
MOVE ISTAT & 0x08 TO SFBR
at 0x000001e3 : */
0x74140800
,
0x00000000
,
/*
JUMP reselected, IF 0x08
at 0x000001e5 : */
0x800c0008
,
0x0000065c
,
/*
; FIXME : Something bogus happened, and we shouldn't fail silently.
INT int_debug_panic
at 0x000001e
3
: */
0x98080000
,
0x030b0000
,
at 0x000001e
7
: */
0x98080000
,
0x030b0000
,
/*
...
...
@@ -1801,26 +1814,37 @@ at 0x000001e3 : */ 0x98080000,0x030b0000,
; Otherwise, mask the selected and reselected bits off SIST0
MOVE SIST0 & 0x30 TO SFBR
at 0x000001e
5
: */
0x74423000
,
0x00000000
,
at 0x000001e
9
: */
0x74423000
,
0x00000000
,
/*
JUMP selected, IF 0x20
at 0x000001e
7
: */
0x800c0020
,
0x00000764
,
at 0x000001e
b
: */
0x800c0020
,
0x00000764
,
/*
JUMP reselected, IF 0x10
at 0x000001e
9
: */
0x800c0010
,
0x0000065c
,
at 0x000001e
d
: */
0x800c0010
,
0x0000065c
,
/*
; If SIGP is set, the user just gave us another command, and
; we should restart or return to the scheduler.
; Reading CTEST2 clears the SIG_P bit in the ISTAT register.
MOVE CTEST2 & 0x40 TO SFBR
at 0x000001e
b
: */
0x741a4000
,
0x00000000
,
at 0x000001e
f
: */
0x741a4000
,
0x00000000
,
/*
JUMP select, IF 0x40
at 0x000001ed : */
0x800c0040
,
0x000001fc
,
at 0x000001f1 : */
0x800c0040
,
0x000001fc
,
/*
; Check connected bit.
; FIXME: this needs to change if we support target mode
; FIXME: is this really necessary?
MOVE ISTAT & 0x08 TO SFBR
at 0x000001f3 : */
0x74140800
,
0x00000000
,
/*
JUMP reselected, IF 0x08
at 0x000001f5 : */
0x800c0008
,
0x0000065c
,
/*
; FIXME : Something bogus happened, and we shouldn't fail silently.
...
...
@@ -1828,7 +1852,7 @@ at 0x000001ed : */ 0x800c0040,0x000001fc,
INT int_debug_panic
at 0x000001
ef
: */
0x98080000
,
0x030b0000
,
at 0x000001
f7
: */
0x98080000
,
0x030b0000
,
/*
...
...
@@ -1853,11 +1877,11 @@ ENTRY test_1
test_1:
MOVE MEMORY 4, test_src, test_dest
at 0x000001f
1
: */
0xc0000004
,
0x00000000
,
0x00000000
,
at 0x000001f
9
: */
0xc0000004
,
0x00000000
,
0x00000000
,
/*
INT int_test_1
at 0x000001f
4
: */
0x98080000
,
0x04000000
,
at 0x000001f
c
: */
0x98080000
,
0x04000000
,
/*
;
...
...
@@ -1868,61 +1892,61 @@ ENTRY test_2
test_2:
CLEAR TARGET
at 0x000001f
6
: */
0x60000200
,
0x00000000
,
at 0x000001f
e
: */
0x60000200
,
0x00000000
,
/*
SELECT ATN FROM 0, test_2_fail
at 0x00000
1f8 : */
0x43000000
,
0x0000083
0
,
at 0x00000
200 : */
0x43000000
,
0x0000085
0
,
/*
JUMP test_2_msgout, WHEN MSG_OUT
at 0x00000
1fa : */
0x860b0000
,
0x000007f
0
,
at 0x00000
202 : */
0x860b0000
,
0x0000081
0
,
/*
ENTRY test_2_msgout
test_2_msgout:
MOVE FROM 8, WHEN MSG_OUT
at 0x00000
1fc
: */
0x1e000000
,
0x00000008
,
at 0x00000
204
: */
0x1e000000
,
0x00000008
,
/*
MOVE FROM 16, WHEN CMD
at 0x00000
1fe
: */
0x1a000000
,
0x00000010
,
at 0x00000
206
: */
0x1a000000
,
0x00000010
,
/*
MOVE FROM 24, WHEN DATA_IN
at 0x0000020
0
: */
0x19000000
,
0x00000018
,
at 0x0000020
8
: */
0x19000000
,
0x00000018
,
/*
MOVE FROM 32, WHEN STATUS
at 0x0000020
2
: */
0x1b000000
,
0x00000020
,
at 0x0000020
a
: */
0x1b000000
,
0x00000020
,
/*
MOVE FROM 40, WHEN MSG_IN
at 0x0000020
4
: */
0x1f000000
,
0x00000028
,
at 0x0000020
c
: */
0x1f000000
,
0x00000028
,
/*
MOVE SCNTL2 & 0x7f TO SCNTL2
at 0x0000020
6
: */
0x7c027f00
,
0x00000000
,
at 0x0000020
e
: */
0x7c027f00
,
0x00000000
,
/*
CLEAR ACK
at 0x000002
08
: */
0x60000040
,
0x00000000
,
at 0x000002
10
: */
0x60000040
,
0x00000000
,
/*
WAIT DISCONNECT
at 0x000002
0a
: */
0x48000000
,
0x00000000
,
at 0x000002
12
: */
0x48000000
,
0x00000000
,
/*
test_2_fail:
INT int_test_2
at 0x000002
0c
: */
0x98080000
,
0x04010000
,
at 0x000002
14
: */
0x98080000
,
0x04010000
,
/*
ENTRY debug_break
debug_break:
INT int_debug_break
at 0x000002
0e
: */
0x98080000
,
0x03000000
,
at 0x000002
16
: */
0x98080000
,
0x03000000
,
/*
;
...
...
@@ -1938,26 +1962,26 @@ ENTRY target_abort
target_abort:
SET TARGET
at 0x0000021
0
: */
0x58000200
,
0x00000000
,
at 0x0000021
8
: */
0x58000200
,
0x00000000
,
/*
DISCONNECT
at 0x0000021
2
: */
0x48000000
,
0x00000000
,
at 0x0000021
a
: */
0x48000000
,
0x00000000
,
/*
CLEAR TARGET
at 0x0000021
4
: */
0x60000200
,
0x00000000
,
at 0x0000021
c
: */
0x60000200
,
0x00000000
,
/*
JUMP schedule
at 0x0000021
6
: */
0x80080000
,
0x00000000
,
at 0x0000021
e
: */
0x80080000
,
0x00000000
,
/*
ENTRY initiator_abort
initiator_abort:
SET ATN
at 0x000002
18
: */
0x58000008
,
0x00000000
,
at 0x000002
20
: */
0x58000008
,
0x00000000
,
/*
;
; The SCSI-I specification says that targets may go into MSG out at
...
...
@@ -1970,97 +1994,97 @@ at 0x00000218 : */ 0x58000008,0x00000000,
; arbitrary number of bytes.
JUMP spew_cmd, WHEN CMD
at 0x000002
1a : */
0x820b0000
,
0x0000089
8
,
at 0x000002
22 : */
0x820b0000
,
0x000008b
8
,
/*
JUMP eat_msgin, WHEN MSG_IN
at 0x000002
1c : */
0x870b0000
,
0x000008a
8
,
at 0x000002
24 : */
0x870b0000
,
0x000008c
8
,
/*
JUMP eat_datain, WHEN DATA_IN
at 0x000002
1e : */
0x810b0000
,
0x000008d
8
,
at 0x000002
26 : */
0x810b0000
,
0x000008f
8
,
/*
JUMP eat_status, WHEN STATUS
at 0x0000022
0 : */
0x830b0000
,
0x000008c
0
,
at 0x0000022
8 : */
0x830b0000
,
0x000008e
0
,
/*
JUMP spew_dataout, WHEN DATA_OUT
at 0x0000022
2 : */
0x800b0000
,
0x000008f
0
,
at 0x0000022
a : */
0x800b0000
,
0x0000091
0
,
/*
JUMP sated
at 0x0000022
4 : */
0x80080000
,
0x000008f
8
,
at 0x0000022
c : */
0x80080000
,
0x0000091
8
,
/*
spew_cmd:
MOVE 1, NCR53c7xx_zero, WHEN CMD
at 0x0000022
6
: */
0x0a000001
,
0x00000000
,
at 0x0000022
e
: */
0x0a000001
,
0x00000000
,
/*
JUMP sated
at 0x000002
28 : */
0x80080000
,
0x000008f
8
,
at 0x000002
30 : */
0x80080000
,
0x0000091
8
,
/*
eat_msgin:
MOVE 1, NCR53c7xx_sink, WHEN MSG_IN
at 0x000002
2a
: */
0x0f000001
,
0x00000000
,
at 0x000002
32
: */
0x0f000001
,
0x00000000
,
/*
JUMP eat_msgin, WHEN MSG_IN
at 0x000002
2c : */
0x870b0000
,
0x000008a
8
,
at 0x000002
34 : */
0x870b0000
,
0x000008c
8
,
/*
JUMP sated
at 0x000002
2e : */
0x80080000
,
0x000008f
8
,
at 0x000002
36 : */
0x80080000
,
0x0000091
8
,
/*
eat_status:
MOVE 1, NCR53c7xx_sink, WHEN STATUS
at 0x0000023
0
: */
0x0b000001
,
0x00000000
,
at 0x0000023
8
: */
0x0b000001
,
0x00000000
,
/*
JUMP eat_status, WHEN STATUS
at 0x0000023
2 : */
0x830b0000
,
0x000008c
0
,
at 0x0000023
a : */
0x830b0000
,
0x000008e
0
,
/*
JUMP sated
at 0x0000023
4 : */
0x80080000
,
0x000008f
8
,
at 0x0000023
c : */
0x80080000
,
0x0000091
8
,
/*
eat_datain:
MOVE 1, NCR53c7xx_sink, WHEN DATA_IN
at 0x0000023
6
: */
0x09000001
,
0x00000000
,
at 0x0000023
e
: */
0x09000001
,
0x00000000
,
/*
JUMP eat_datain, WHEN DATA_IN
at 0x000002
38 : */
0x810b0000
,
0x000008d
8
,
at 0x000002
40 : */
0x810b0000
,
0x000008f
8
,
/*
JUMP sated
at 0x000002
3a : */
0x80080000
,
0x000008f
8
,
at 0x000002
42 : */
0x80080000
,
0x0000091
8
,
/*
spew_dataout:
MOVE 1, NCR53c7xx_zero, WHEN DATA_OUT
at 0x000002
3c
: */
0x08000001
,
0x00000000
,
at 0x000002
44
: */
0x08000001
,
0x00000000
,
/*
sated:
MOVE SCNTL2 & 0x7f TO SCNTL2
at 0x000002
3e
: */
0x7c027f00
,
0x00000000
,
at 0x000002
46
: */
0x7c027f00
,
0x00000000
,
/*
MOVE 1, NCR53c7xx_msg_abort, WHEN MSG_OUT
at 0x0000024
0
: */
0x0e000001
,
0x00000000
,
at 0x0000024
8
: */
0x0e000001
,
0x00000000
,
/*
WAIT DISCONNECT
at 0x0000024
2
: */
0x48000000
,
0x00000000
,
at 0x0000024
a
: */
0x48000000
,
0x00000000
,
/*
INT int_norm_aborted
at 0x0000024
4
: */
0x98080000
,
0x02040000
,
at 0x0000024
c
: */
0x98080000
,
0x02040000
,
/*
;
...
...
@@ -2081,82 +2105,82 @@ at 0x00000244 : */ 0x98080000,0x02040000,
dsa_to_scratch:
MOVE DSA0 TO SFBR
at 0x0000024
6
: */
0x72100000
,
0x00000000
,
at 0x0000024
e
: */
0x72100000
,
0x00000000
,
/*
MOVE SFBR TO SCRATCH0
at 0x000002
48
: */
0x6a340000
,
0x00000000
,
at 0x000002
50
: */
0x6a340000
,
0x00000000
,
/*
MOVE DSA1 TO SFBR
at 0x000002
4a
: */
0x72110000
,
0x00000000
,
at 0x000002
52
: */
0x72110000
,
0x00000000
,
/*
MOVE SFBR TO SCRATCH1
at 0x000002
4c
: */
0x6a350000
,
0x00000000
,
at 0x000002
54
: */
0x6a350000
,
0x00000000
,
/*
MOVE DSA2 TO SFBR
at 0x000002
4e
: */
0x72120000
,
0x00000000
,
at 0x000002
56
: */
0x72120000
,
0x00000000
,
/*
MOVE SFBR TO SCRATCH2
at 0x0000025
0
: */
0x6a360000
,
0x00000000
,
at 0x0000025
8
: */
0x6a360000
,
0x00000000
,
/*
MOVE DSA3 TO SFBR
at 0x0000025
2
: */
0x72130000
,
0x00000000
,
at 0x0000025
a
: */
0x72130000
,
0x00000000
,
/*
MOVE SFBR TO SCRATCH3
at 0x0000025
4
: */
0x6a370000
,
0x00000000
,
at 0x0000025
c
: */
0x6a370000
,
0x00000000
,
/*
RETURN
at 0x0000025
6
: */
0x90080000
,
0x00000000
,
at 0x0000025
e
: */
0x90080000
,
0x00000000
,
/*
scratch_to_dsa:
MOVE SCRATCH0 TO SFBR
at 0x000002
58
: */
0x72340000
,
0x00000000
,
at 0x000002
60
: */
0x72340000
,
0x00000000
,
/*
MOVE SFBR TO DSA0
at 0x000002
5a
: */
0x6a100000
,
0x00000000
,
at 0x000002
62
: */
0x6a100000
,
0x00000000
,
/*
MOVE SCRATCH1 TO SFBR
at 0x000002
5c
: */
0x72350000
,
0x00000000
,
at 0x000002
64
: */
0x72350000
,
0x00000000
,
/*
MOVE SFBR TO DSA1
at 0x000002
5e
: */
0x6a110000
,
0x00000000
,
at 0x000002
66
: */
0x6a110000
,
0x00000000
,
/*
MOVE SCRATCH2 TO SFBR
at 0x0000026
0
: */
0x72360000
,
0x00000000
,
at 0x0000026
8
: */
0x72360000
,
0x00000000
,
/*
MOVE SFBR TO DSA2
at 0x0000026
2
: */
0x6a120000
,
0x00000000
,
at 0x0000026
a
: */
0x6a120000
,
0x00000000
,
/*
MOVE SCRATCH3 TO SFBR
at 0x0000026
4
: */
0x72370000
,
0x00000000
,
at 0x0000026
c
: */
0x72370000
,
0x00000000
,
/*
MOVE SFBR TO DSA3
at 0x0000026
6
: */
0x6a130000
,
0x00000000
,
at 0x0000026
e
: */
0x6a130000
,
0x00000000
,
/*
RETURN
at 0x000002
68
: */
0x90080000
,
0x00000000
,
at 0x000002
70
: */
0x90080000
,
0x00000000
,
};
#define A_NCR53c7xx_msg_abort 0x00000000
u32
A_NCR53c7xx_msg_abort_used
[]
=
{
0x0000024
1
,
0x0000024
9
,
};
#define A_NCR53c7xx_msg_reject 0x00000000
...
...
@@ -2166,15 +2190,15 @@ u32 A_NCR53c7xx_msg_reject_used[] = {
#define A_NCR53c7xx_sink 0x00000000
u32
A_NCR53c7xx_sink_used
[]
=
{
0x000002
2b
,
0x0000023
1
,
0x0000023
7
,
0x000002
33
,
0x0000023
9
,
0x0000023
f
,
};
#define A_NCR53c7xx_zero 0x00000000
u32
A_NCR53c7xx_zero_used
[]
=
{
0x0000022
7
,
0x000002
3d
,
0x0000022
f
,
0x000002
45
,
};
#define A_NOP_insn 0x00000000
...
...
@@ -2378,13 +2402,13 @@ u32 A_dsa_temp_target_used[] = {
#define A_int_debug_break 0x03000000
u32
A_int_debug_break_used
[]
=
{
0x000002
0f
,
0x000002
17
,
};
#define A_int_debug_panic 0x030b0000
u32
A_int_debug_panic_used
[]
=
{
0x000001e
4
,
0x000001f
0
,
0x000001e
8
,
0x000001f
8
,
};
#define A_int_err_check_condition 0x00030000
...
...
@@ -2442,7 +2466,7 @@ u32 A_int_msg_wdtr_used[] = {
#define A_int_norm_aborted 0x02040000
u32
A_int_norm_aborted_used
[]
=
{
0x0000024
5
,
0x0000024
d
,
};
#define A_int_norm_command_complete 0x02020000
...
...
@@ -2467,12 +2491,12 @@ u32 A_int_norm_select_complete_used[] = {
#define A_int_test_1 0x04000000
u32
A_int_test_1_used
[]
=
{
0x000001f
5
,
0x000001f
d
,
};
#define A_int_test_2 0x04010000
u32
A_int_test_2_used
[]
=
{
0x000002
0d
,
0x000002
15
,
};
#define A_int_test_3 0x04020000
...
...
@@ -2511,17 +2535,17 @@ u32 A_schedule_used[] = {
0x0000007e
,
0x00000192
,
0x000001e2
,
0x0000021
7
,
0x0000021
f
,
};
#define A_test_dest 0x00000000
u32
A_test_dest_used
[]
=
{
0x000001f
3
,
0x000001f
b
,
};
#define A_test_src 0x00000000
u32
A_test_src_used
[]
=
{
0x000001f
2
,
0x000001f
a
,
};
#define Ent_accept_message 0x000005d4
...
...
@@ -2530,7 +2554,7 @@ u32 A_test_src_used[] = {
#define Ent_command_complete_msgin 0x0000061c
#define Ent_data_transfer 0x00000254
#define Ent_datain_to_jump 0x00000328
#define Ent_debug_break 0x000008
3
8
#define Ent_debug_break 0x000008
5
8
#define Ent_dsa_code_begin 0x00000000
#define Ent_dsa_code_check_reselect 0x000000f8
#define Ent_dsa_code_fix_jump 0x0000003c
...
...
@@ -2541,7 +2565,7 @@ u32 A_test_src_used[] = {
#define Ent_dsa_schedule 0x00000168
#define Ent_dsa_zero 0x00000168
#define Ent_end_data_transfer 0x0000028c
#define Ent_initiator_abort 0x000008
6
0
#define Ent_initiator_abort 0x000008
8
0
#define Ent_msg_in 0x00000404
#define Ent_msg_in_restart 0x000003e4
#define Ent_other_in 0x00000374
...
...
@@ -2553,10 +2577,10 @@ u32 A_test_src_used[] = {
#define Ent_respond_message 0x000005ec
#define Ent_select 0x000001fc
#define Ent_select_msgout 0x00000214
#define Ent_target_abort 0x000008
4
0
#define Ent_test_1 0x000007
c
4
#define Ent_test_2 0x000007
d
8
#define Ent_test_2_msgout 0x00000
7f
0
#define Ent_target_abort 0x000008
6
0
#define Ent_test_1 0x000007
e
4
#define Ent_test_2 0x000007
f
8
#define Ent_test_2_msgout 0x00000
81
0
#define Ent_wait_reselect 0x00000654
u32
LABELPATCHES
[]
=
{
0x00000008
,
...
...
@@ -2620,24 +2644,26 @@ u32 LABELPATCHES[] = {
0x000001b8
,
0x000001cf
,
0x000001de
,
0x000001e
8
,
0x000001e
a
,
0x000001e
6
,
0x000001e
c
,
0x000001ee
,
0x000001f9
,
0x000001fb
,
0x0000021b
,
0x0000021d
,
0x0000021f
,
0x00000221
,
0x000001f2
,
0x000001f6
,
0x00000201
,
0x00000203
,
0x00000223
,
0x00000225
,
0x00000227
,
0x00000229
,
0x0000022b
,
0x0000022d
,
0x0000022f
,
0x00000233
,
0x00000231
,
0x00000235
,
0x0000023
9
,
0x0000023
7
,
0x0000023b
,
0x0000023d
,
0x00000241
,
0x00000243
,
};
struct
{
...
...
@@ -2646,6 +2672,6 @@ struct {
}
EXTERNAL_PATCHES
[]
=
{
};
u32
INSTRUCTIONS
=
297
;
u32
PATCHES
=
79
;
u32
INSTRUCTIONS
=
301
;
u32
PATCHES
=
81
;
u32
EXTERNAL_PATCHES_LEN
=
0
;
drivers/sound/Makefile
View file @
001e3f20
...
...
@@ -115,7 +115,7 @@ setup-linux:
sound.o
:
local.h $(FIXEDOBJS) sound.a
-
rm
-f
sound.o
$(LD)
-
dc
-
r
-o
sound.o
$(FIXEDOBJS)
sound.a
$(LD)
-r
-o
sound.o
$(FIXEDOBJS)
sound.a
modules
:
local.h sound.o
ln
-fs
`
pwd
`
/sound.o
$(TOPDIR)
/modules/sound.o
fs/buffer.c
View file @
001e3f20
...
...
@@ -28,6 +28,7 @@
#include <linux/pagemap.h>
#include <linux/swapctl.h>
#include <linux/smp.h>
#include <linux/smp_lock.h>
#include <asm/system.h>
#include <asm/segment.h>
...
...
@@ -263,6 +264,21 @@ asmlinkage int sys_fsync(unsigned int fd)
return
0
;
}
asmlinkage
int
sys_fdatasync
(
unsigned
int
fd
)
{
struct
file
*
file
;
struct
inode
*
inode
;
if
(
fd
>=
NR_OPEN
||
!
(
file
=
current
->
files
->
fd
[
fd
])
||
!
(
inode
=
file
->
f_inode
))
return
-
EBADF
;
if
(
!
file
->
f_op
||
!
file
->
f_op
->
fsync
)
return
-
EINVAL
;
/* this needs further work, at the moment it is identical to fsync() */
if
(
file
->
f_op
->
fsync
(
inode
,
file
))
return
-
EIO
;
return
0
;
}
void
invalidate_buffers
(
kdev_t
dev
)
{
int
i
;
...
...
fs/ext2/inode.c
View file @
001e3f20
...
...
@@ -41,7 +41,7 @@ void ext2_put_inode (struct inode * inode)
#define inode_bmap(inode, nr) ((inode)->u.ext2_i.i_data[(nr)])
static
int
block_bmap
(
struct
buffer_head
*
bh
,
int
nr
)
static
in
line
in
t
block_bmap
(
struct
buffer_head
*
bh
,
int
nr
)
{
int
tmp
;
...
...
fs/minix/file.c
View file @
001e3f20
...
...
@@ -13,6 +13,8 @@
#include <linux/fcntl.h>
#include <linux/stat.h>
#include <linux/locks.h>
#include <linux/mm.h>
#include <linux/pagemap.h>
#include <asm/segment.h>
#include <asm/system.h>
...
...
fs/proc/root.c
View file @
001e3f20
...
...
@@ -131,7 +131,6 @@ struct proc_dir_entry proc_net = {
NULL
,
NULL
};
#ifdef CONFIG_SCSI
struct
proc_dir_entry
proc_scsi
=
{
PROC_SCSI
,
4
,
"scsi"
,
S_IFDIR
|
S_IRUGO
|
S_IXUGO
,
2
,
0
,
0
,
...
...
@@ -139,7 +138,6 @@ struct proc_dir_entry proc_scsi = {
NULL
,
NULL
,
NULL
,
&
proc_root
,
NULL
};
#endif
int
proc_register
(
struct
proc_dir_entry
*
dir
,
struct
proc_dir_entry
*
dp
)
{
...
...
include/asm-alpha/mmu_context.h
0 → 100644
View file @
001e3f20
#ifndef __ALPHA_MMU_CONTEXT_H
#define __ALPHA_MMU_CONTEXT_H
/*
* get a new mmu context..
*
* Copyright (C) 1996, Linus Torvalds
*/
#include <asm/pgtable.h>
/*
* The maximum ASN's the processor supports. On the EV4 this doesn't
* matter as the pal-code doesn't use the ASNs anyway, on the EV5
* EV5 this is 127.
*/
#define MAX_ASN 127
#define ASN_VERSION_SHIFT 32
#define ASN_VERSION_MASK ((~0UL) << ASN_VERSION_SHIFT)
#define ASN_FIRST_VERSION (1UL << ASN_VERSION_SHIFT)
/*
* NOTE! The way this is set up, the high bits of the "asn_cache" (and
* the "mm->context") are the ASN _version_ code. A version of 0 is
* always considered invalid, so to invalidate another process you only
* need to do "p->mm->context = 0".
*
* If we need more ASN's than the processor has, we invalidate the old
* user TLB's (tbiap()) and start a new ASN version. That will automatically
* force a new asn for any other processes the next time they want to
* run.
*/
extern
inline
void
get_mmu_context
(
struct
task_struct
*
p
)
{
static
unsigned
long
asn_cache
=
ASN_FIRST_VERSION
;
struct
mm_struct
*
mm
=
p
->
mm
;
unsigned
long
asn
=
mm
->
context
;
/* Check if our ASN is of an older version and thus invalid */
if
((
asn_cache
^
asn
)
&
ASN_VERSION_MASK
)
{
/* get a new asn of the current version */
asn
=
asn_cache
++
;
/* check if it's legal.. */
if
((
asn
&
~
ASN_VERSION_MASK
)
>
MAX_ASN
)
{
/* start a new version, invalidate all old asn's */
tbiap
();
asn_cache
=
(
asn_cache
&
ASN_VERSION_MASK
)
+
ASN_FIRST_VERSION
;
if
(
!
asn_cache
)
asn_cache
=
ASN_FIRST_VERSION
;
asn
=
asn_cache
++
;
}
mm
->
context
=
asn
;
/* full version + asn */
p
->
tss
.
asn
=
asn
&
~
ASN_VERSION_MASK
;
/* just asn */
}
}
#endif
include/asm-alpha/pgtable.h
View file @
001e3f20
...
...
@@ -39,6 +39,9 @@ static inline void invalidate_all(void)
*/
static
inline
void
invalidate_mm
(
struct
mm_struct
*
mm
)
{
if
(
mm
!=
current
->
mm
)
mm
->
context
=
0
;
else
tbiap
();
}
...
...
@@ -53,6 +56,11 @@ static inline void invalidate_mm(struct mm_struct *mm)
static
inline
void
invalidate_page
(
struct
vm_area_struct
*
vma
,
unsigned
long
addr
)
{
struct
mm_struct
*
mm
=
vma
->
vm_mm
;
if
(
mm
!=
current
->
mm
)
mm
->
context
=
0
;
else
tbi
(
2
+
((
vma
->
vm_flags
&
VM_EXEC
)
!=
0
),
addr
);
}
...
...
@@ -63,6 +71,9 @@ static inline void invalidate_page(struct vm_area_struct *vma,
static
inline
void
invalidate_range
(
struct
mm_struct
*
mm
,
unsigned
long
start
,
unsigned
long
end
)
{
if
(
mm
!=
current
->
mm
)
mm
->
context
=
0
;
else
tbiap
();
}
...
...
include/asm-i386/mmu_context.h
0 → 100644
View file @
001e3f20
#ifndef __I386_MMU_CONTEXT_H
#define __I386_MMU_CONTEXT_H
/*
* get a new mmu context.. x86's don't know about contexts.
*/
#define get_mmu_context(x) do { } while (0)
#endif
include/asm-i386/unistd.h
View file @
001e3f20
...
...
@@ -153,11 +153,20 @@
#define __NR_readv 145
#define __NR_writev 146
#define __NR_getsid 147
#define __NR_fdatasync 148
#define __NR_mlock 150
#define __NR_munlock 151
#define __NR_mlockall 152
#define __NR_munlockall 153
#define __NR_sched_setparam 154
#define __NR_sched_getparam 155
#define __NR_sched_setscheduler 156
#define __NR_sched_getscheduler 157
#define __NR_sched_yield 158
#define __NR_sched_get_priority_max 159
#define __NR_sched_get_priority_min 160
#define __NR_sched_rr_get_interval 161
/* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */
#define _syscall0(type,name) \
...
...
include/linux/fdreg.h
View file @
001e3f20
...
...
@@ -100,14 +100,26 @@
/* FDC version return types */
#define FDC_NONE 0x00
#define FDC_UNKNOWN 0x10
#define FDC_UNKNOWN 0x10
/* DO NOT USE THIS TYPE EXCEPT IF IDENTIFICATION
FAILS EARLY */
#define FDC_8272A 0x20
/* Intel 8272a, NEC 765 */
#define FDC_765ED 0x30
/* Non-Intel 1MB-compatible FDC, can't detect */
#define FDC_82072 0x40
/* Intel 82072; 8272a + FIFO + DUMPREGS */
#define FDC_82077_ORIG 0x50
/* Original version of 82077AA, sans LOCK */
#define FDC_82077 0x52
/* 82077AA-1 */
#define FDC_82077_UNKN 0x53
/* Unknown 82077 variant */
#define FDC_82078 0x60
/* 44pin 82078 or 64pin 82078SL */
#define FDC_82078_1 0x61
/* 82078-1 (2Mbps fdc) */
#define FDC_87306 0x63
/* National Semiconductor PC 87306 */
/*
* Beware: the fdc type list is roughly sorted by increasing features.
* Presence of features is tested by comparing the FDC version id with the
* "oldest" version that has the needed feature.
* If during FDC detection, an obscure test fails late in the sequence, don't
* assign FDC_UNKNOWN. Else the FDC will be treated as a dumb 8272a, or worse.
* This is especially true if the tests are unneeded.
*/
#define FD_RESET_DELAY 20
#endif
include/linux/pagemap.h
View file @
001e3f20
...
...
@@ -12,16 +12,29 @@ static inline unsigned long page_address(struct page * page)
return
PAGE_OFFSET
+
PAGE_SIZE
*
(
page
-
mem_map
);
}
#define PAGE_HASH_SIZE 257
#define PAGE_HASH_BITS 10
#define PAGE_HASH_SIZE (1 << PAGE_HASH_BITS)
#define PAGE_AGE_VALUE 16
extern
unsigned
long
page_cache_size
;
extern
struct
page
*
page_hash_table
[
PAGE_HASH_SIZE
];
/*
* We use a power-of-two hash table to avoid a modulus,
* and get a reasonable hash by knowing roughly how the
* inode pointer and offsets are distributed (ie, we
* roughly know which bits are "significant")
*/
static
inline
unsigned
long
_page_hashfn
(
struct
inode
*
inode
,
unsigned
long
offset
)
{
offset
^=
(
unsigned
long
)
inode
;
return
offset
%
PAGE_HASH_SIZE
;
#define i (((unsigned long) inode)/sizeof(unsigned long))
#define o (offset >> PAGE_SHIFT)
#define s(x) ((x)+((x)>>PAGE_HASH_BITS))
return
s
(
i
+
o
)
&
(
PAGE_HASH_SIZE
-
1
);
#undef i
#undef o
#undef s
}
#define page_hash(inode,offset) page_hash_table[_page_hashfn(inode,offset)]
...
...
include/linux/sbpcd.h
View file @
001e3f20
...
...
@@ -181,9 +181,9 @@
#define DBG_AUD 25
/* READ AUDIO debugging */
#define DBG_SEQ 26
/* Sequoia interface configuration trace */
#define DBG_LCS 27
/* Longshine LCS-7260 debugging trace */
#define DBG_CD2 28
/* MKE CD200 debugging trace */
#define DBG_CD2 28
/* MKE
/Funai
CD200 debugging trace */
#define DBG_TEA 29
/* TEAC CD-55A debugging trace */
#define DBG_
TE2 30
/* TEAC CD-55A 2nd debugging level
*/
#define DBG_
ECS 30
/* ECS-AT (Vertos 100) debugging trace
*/
#define DBG_000 31
/* unnecessary information */
/*==========================================================================*/
...
...
@@ -240,7 +240,7 @@
* LCS-7260 special status result bits:
*/
#define p_lcs_door_locked 0x02
#define p_lcs_door_closed 0x01
#define p_lcs_door_closed 0x01
/* probably disk_in */
/*
* CR-52x special status result bits:
...
...
@@ -270,6 +270,14 @@
#define pL_door_locked 0x02
#define pL_door_closed 0x01
#define pV_door_closed 0x40
#define pV_spinning 0x20
#define pV_check 0x10
#define pV_success 0x08
#define pV_busy 0x04
#define pV_door_locked 0x02
#define pV_disk_ok 0x01
#define p1_door_closed 0x80
#define p1_disk_in 0x40
#define p1_spinning 0x20
...
...
@@ -313,9 +321,9 @@
#define RESULT_READY ((inb(CDi_status)&s_not_result_ready)==0)
/*
* drive types (firmware versions):
* drive
families and
types (firmware versions):
*/
#define drv_fam0 0x0
8
/* CR-52x family */
#define drv_fam0 0x0
100
/* CR-52x family */
#define drv_199 (drv_fam0+0x01)
/* <200 */
#define drv_200 (drv_fam0+0x02)
/* <201 */
#define drv_201 (drv_fam0+0x03)
/* <210 */
...
...
@@ -323,25 +331,35 @@
#define drv_211 (drv_fam0+0x05)
/* <300 */
#define drv_300 (drv_fam0+0x06)
/* >=300 */
#define drv_famL 0x10
/* Longshine family */
#define drv_fam1 0x0200
/* CR-56x family */
#define drv_099 (drv_fam1+0x01)
/* <100 */
#define drv_100 (drv_fam1+0x02)
/* >=100, only 1.02 and 5.00 known */
#define drv_fam2 0x0400
/* CD200 family */
#define drv_famT 0x0800
/* TEAC CD-55A */
#define drv_famL 0x1000
/* Longshine family */
#define drv_260 (drv_famL+0x01)
/* LCS-7260 */
#define drv_e1 (drv_famL+0x01)
/* LCS-7260, firmware "A E1" */
#define drv_f4 (drv_famL+0x02)
/* LCS-7260, firmware "A4F4" */
#define drv_fam1 0x20
/* CR-56x family */
#define drv_099 (drv_fam1+0x01)
/* <100 */
#define drv_100 (drv_fam1+0x02)
/* >=100, only 5.00 known here */
#define drv_famT 0x40
/* TEAC CD-55A */
#define drv_fam2 0x80
/* CD200 family */
#define drv_famV 0x2000
/* ECS-AT (vertos-100) family */
#define drv_at (drv_famV+0x01)
/* ECS-AT, firmware "1.00" */
#define fam0_drive (D_S[d].drv_type&drv_fam0)
#define famL_drive (D_S[d].drv_type&drv_famL)
#define famV_drive (D_S[d].drv_type&drv_famV)
#define fam1_drive (D_S[d].drv_type&drv_fam1)
#define fam2_drive (D_S[d].drv_type&drv_fam2)
#define famT_drive (D_S[d].drv_type&drv_famT)
#define fam0L_drive (D_S[d].drv_type&(drv_fam0|drv_famL))
#define fam0V_drive (D_S[d].drv_type&(drv_fam0|drv_famV))
#define famLV_drive (D_S[d].drv_type&(drv_famL|drv_famV))
#define fam0LV_drive (D_S[d].drv_type&(drv_fam0|drv_famL|drv_famV))
#define fam1L_drive (D_S[d].drv_type&(drv_fam1|drv_famL))
#define fam1V_drive (D_S[d].drv_type&(drv_fam1|drv_famV))
#define fam1LV_drive (D_S[d].drv_type&(drv_fam1|drv_famL|drv_famV))
#define fam01_drive (D_S[d].drv_type&(drv_fam0|drv_fam1))
#define fam12_drive (D_S[d].drv_type&(drv_fam1|drv_fam2))
#define fam2T_drive (D_S[d].drv_type&(drv_fam2|drv_famT))
...
...
@@ -385,7 +403,6 @@
#define audx13 0x0d
/* Audio play operation successfully completed */
#define audx14 0x0e
/* Audio play operation stopped due to error */
#define audx15 0x0f
/* No current audio status to return */
/* audio status (bcd) */
#define aud_11 0x11
/* Audio play operation in progress */
#define aud_12 0x12
/* Audio play operation paused */
...
...
@@ -393,7 +410,6 @@
#define aud_14 0x14
/* Audio play operation stopped due to error */
#define aud_15 0x15
/* No current audio status to return */
/*
* highest allowed drive number (MINOR+1)
*/
...
...
@@ -414,10 +430,8 @@
#define MIXER_CD_Volume 0x28
/* internal SB Pro register address */
/*==========================================================================*/
/*
* Creative Labs Programmers did this:
*/
#define MAX_TRACKS 120
/* why more than 99? */
#define MAX_TRACKS 99
/*==========================================================================*/
/*
...
...
@@ -596,6 +610,7 @@ Read XA Parameter:
* CD200: CMD2_
* LCS-7260: CMDL_
* TEAC CD-55A: CMDT_
* ECS-AT: CMDV_
*/
#define CMD1_RESET 0x0a
#define CMD2_RESET 0x01
...
...
@@ -605,14 +620,17 @@ Read XA Parameter:
#define CMD2_LOCK_CTL 0x1e
#define CMDT_LOCK_CTL CMD2_LOCK_CTL
#define CMDL_LOCK_CTL 0x0e
#define CMDV_LOCK_CTL CMDL_LOCK_CTL
#define CMD1_TRAY_CTL 0x07
#define CMD2_TRAY_CTL 0x1b
#define CMDT_TRAY_CTL CMD2_TRAY_CTL
#define CMDL_TRAY_CTL 0x0d
#define CMDV_TRAY_CTL CMDL_TRAY_CTL
#define CMD1_MULTISESS 0x8d
#define CMDL_MULTISESS 0x8c
#define CMDV_MULTISESS CMDL_MULTISESS
#define CMD1_SUBCHANINF 0x11
#define CMD2_SUBCHANINF 0x??
...
...
@@ -630,23 +648,27 @@ Read XA Parameter:
#define CMD2_PATH_CHECK 0x???
#define CMDT_PATH_CHECK 0x???
#define CMDL_PATH_CHECK CMD0_PATH_CHECK
#define CMDV_PATH_CHECK CMD0_PATH_CHECK
#define CMD0_SEEK 0x01
#define CMD1_SEEK CMD0_SEEK
#define CMD2_SEEK 0x2b
#define CMDT_SEEK CMD2_SEEK
#define CMDL_SEEK CMD0_SEEK
#define CMDV_SEEK CMD0_SEEK
#define CMD0_READ 0x02
#define CMD1_READ 0x10
#define CMD2_READ 0x28
#define CMDT_READ CMD2_READ
#define CMDL_READ CMD0_READ
#define CMDV_READ CMD0_READ
#define CMD0_READ_XA 0x03
#define CMD2_READ_XA 0xd4
#define CMD2_READ_XA2 0xd5
#define CMDL_READ_XA CMD0_READ_XA
/* really ?? */
#define CMDV_READ_XA CMD0_READ_XA
#define CMD0_READ_HEAD 0x04
...
...
@@ -654,11 +676,13 @@ Read XA Parameter:
#define CMD1_SPINUP 0x02
#define CMD2_SPINUP CMD2_TRAY_CTL
#define CMDL_SPINUP CMD0_SPINUP
#define CMDV_SPINUP CMD0_SPINUP
#define CMD0_SPINDOWN 0x06
/* really??? */
#define CMD1_SPINDOWN 0x06
#define CMD2_SPINDOWN CMD2_TRAY_CTL
#define CMDL_SPINDOWN 0x0d
#define CMDV_SPINDOWN CMD0_SPINDOWN
#define CMD0_DIAG 0x07
...
...
@@ -666,6 +690,7 @@ Read XA Parameter:
#define CMD1_READ_UPC 0x88
#define CMD2_READ_UPC 0x???
#define CMDL_READ_UPC CMD0_READ_UPC
#define CMDV_READ_UPC 0x8f
#define CMD0_READ_ISRC 0x09
...
...
@@ -673,6 +698,7 @@ Read XA Parameter:
#define CMD1_PLAY 0x???
#define CMD2_PLAY 0x???
#define CMDL_PLAY CMD0_PLAY
#define CMDV_PLAY CMD0_PLAY
#define CMD0_PLAY_MSF 0x0b
#define CMD1_PLAY_MSF 0x0e
...
...
@@ -688,6 +714,7 @@ Read XA Parameter:
#define CMD2_STATUS 0x00
#define CMDT_STATUS CMD2_STATUS
#define CMDL_STATUS CMD0_STATUS
#define CMDV_STATUS CMD0_STATUS
#define CMD2_SEEK_LEADIN 0x00
#define CMD0_READ_ERR 0x82
...
...
@@ -695,12 +722,14 @@ Read XA Parameter:
#define CMD2_READ_ERR 0x03
#define CMDT_READ_ERR CMD2_READ_ERR
/* get audio status */
#define CMDL_READ_ERR CMD0_READ_ERR
#define CMDV_READ_ERR CMD0_READ_ERR
#define CMD0_READ_VER 0x83
#define CMD1_READ_VER CMD0_READ_VER
#define CMD2_READ_VER 0x12
#define CMDT_READ_VER CMD2_READ_VER
/* really ?? */
#define CMDL_READ_VER CMD0_READ_VER
#define CMDV_READ_VER CMD0_READ_VER
#define CMD0_SETMODE 0x84
#define CMD1_SETMODE 0x09
...
...
@@ -728,6 +757,7 @@ Read XA Parameter:
#define CMD2_READSUBQ 0x42
#define CMDT_READSUBQ CMD2_READSUBQ
#define CMDL_READSUBQ CMD0_READSUBQ
#define CMDV_READSUBQ CMD0_READSUBQ
#define CMD0_DISKCODE 0x8a
...
...
@@ -736,22 +766,26 @@ Read XA Parameter:
#define CMD2_DISKINFO 0x43
#define CMDT_DISKINFO CMD2_DISKINFO
#define CMDL_DISKINFO CMD0_DISKINFO
#define CMDV_DISKINFO CMD0_DISKINFO
#define CMD0_READTOC 0x8c
#define CMD1_READTOC CMD0_READTOC
#define CMD2_READTOC 0x???
#define CMDL_READTOC CMD0_READTOC
#define CMDV_READTOC CMD0_READTOC
#define CMD0_PAU_RES 0x8d
#define CMD1_PAU_RES 0x0d
#define CMD2_PAU_RES 0x4b
#define CMDT_PAUSE CMD2_PAU_RES
#define CMDL_PAU_RES CMD0_PAU_RES
#define CMDV_PAUSE CMD0_PAU_RES
#define CMD0_PACKET 0x8e
#define CMD1_PACKET CMD0_PACKET
#define CMD2_PACKET 0x???
#define CMDL_PACKET CMD0_PACKET
#define CMDV_PACKET 0x???
/*==========================================================================*/
/*==========================================================================*/
...
...
include/linux/sched.h
View file @
001e3f20
...
...
@@ -92,6 +92,10 @@ extern int nr_running, nr_tasks;
#define SCHED_FIFO 1
#define SCHED_RR 2
struct
sched_param
{
int
sched_priority
;
};
#ifndef NULL
#define NULL ((void *) 0)
#endif
...
...
@@ -195,7 +199,7 @@ struct task_struct {
struct
wait_queue
*
wait_chldexit
;
/* for wait4() */
unsigned
short
uid
,
euid
,
suid
,
fsuid
;
unsigned
short
gid
,
egid
,
sgid
,
fsgid
;
unsigned
long
timeout
,
policy
;
unsigned
long
timeout
,
policy
,
rt_priority
;
unsigned
long
it_real_value
,
it_prof_value
,
it_virt_value
;
unsigned
long
it_real_incr
,
it_prof_incr
,
it_virt_incr
;
struct
timer_list
real_timer
;
...
...
@@ -273,7 +277,7 @@ struct task_struct {
/* suppl grps*/
{NOGROUP,}, \
/* proc links*/
&init_task,&init_task,NULL,NULL,NULL,NULL, \
/* uid etc */
0,0,0,0,0,0,0,0, \
/* timeout */
0,SCHED_OTHER,0,0,0,0,0,0, \
/* timeout */
0,SCHED_OTHER,0,0,0,0,0,0,
0,
\
/* timer */
{ NULL, NULL, 0, 0, it_real_fn }, \
/* utime */
0,0,0,0,0, \
/* flt */
0,0,0,0,0,0, \
...
...
include/linux/smp.h
View file @
001e3f20
...
...
@@ -8,7 +8,6 @@
#ifdef __SMP__
#include <asm/smp.h>
#include <asm/smp_lock.h>
extern
void
smp_message_pass
(
int
target
,
int
msg
,
unsigned
long
data
,
int
wait
);
extern
void
smp_boot_cpus
(
void
);
/* Boot processor call to load the other CPU's */
...
...
include/linux/smp_lock.h
0 → 100644
View file @
001e3f20
#ifndef __LINUX_SMPLOCK_H
#define __LINUX_SMPLOCK_H
#ifdef __SMP__
#include <asm/pgtable.h>
#include <asm/smp_lock.h>
#endif
#endif
include/linux/time.h
View file @
001e3f20
#ifndef _LINUX_TIME_H
#define _LINUX_TIME_H
struct
timespec
{
long
tv_sec
;
/* seconds */
long
tv_nsec
;
/* nanoseconds */
};
struct
timeval
{
int
tv_sec
;
/* seconds */
int
tv_usec
;
/* microseconds */
...
...
@@ -32,6 +37,11 @@ void do_settimeofday(struct timeval *tv);
#define ITIMER_VIRTUAL 1
#define ITIMER_PROF 2
struct
itimerspec
{
struct
timespec
it_interval
;
/* timer period */
struct
timespec
it_value
;
/* timer expiration */
};
struct
itimerval
{
struct
timeval
it_interval
;
/* timer interval */
struct
timeval
it_value
;
/* current value */
...
...
kernel/ksyms.c
View file @
001e3f20
...
...
@@ -12,6 +12,7 @@
#include <linux/module.h>
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/smp.h>
#include <linux/fs.h>
#include <linux/blkdev.h>
#include <linux/sched.h>
...
...
@@ -38,6 +39,7 @@
#include <linux/ext2_fs.h>
#include <linux/random.h>
#include <linux/mount.h>
#include <linux/pagemap.h>
extern
unsigned
char
aux_device_present
,
kbd_read_mask
;
...
...
@@ -222,6 +224,7 @@ struct symbol_table symbol_table = {
X
(
mem_map
),
X
(
remap_page_range
),
X
(
high_memory
),
X
(
update_vm_cache
),
/* filesystem internal functions */
X
(
getname
),
...
...
@@ -252,6 +255,8 @@ struct symbol_table symbol_table = {
X
(
dcache_add
),
X
(
aout_core_dump
),
X
(
add_blkdev_randomness
),
X
(
generic_file_read
),
X
(
generic_readpage
),
/* device registration */
X
(
register_chrdev
),
...
...
@@ -560,10 +565,7 @@ struct symbol_table symbol_table = {
X
(
proc_unregister
),
X
(
in_group_p
),
X
(
generate_cluster
),
#ifdef CONFIG_SCSI
X
(
proc_scsi
),
X
(
proc_scsi_inode_operations
),
#endif
X
(
proc_net_inode_operations
),
X
(
proc_net
),
#endif
...
...
kernel/sched.c
View file @
001e3f20
...
...
@@ -31,6 +31,7 @@
#include <asm/io.h>
#include <asm/segment.h>
#include <asm/pgtable.h>
#include <asm/mmu_context.h>
#include <linux/timex.h>
...
...
@@ -206,7 +207,7 @@ static inline int goodness(struct task_struct * p, int this_cpu)
* into account).
*/
if
(
p
->
policy
!=
SCHED_OTHER
)
return
1000
+
p
->
priority
;
return
1000
+
p
->
rt_
priority
;
/*
* Give the process a first-approximation goodness value
...
...
@@ -338,6 +339,7 @@ asmlinkage void schedule(void)
timer
.
function
=
process_timeout
;
add_timer
(
&
timer
);
}
get_mmu_context
(
next
);
switch_to
(
next
);
if
(
timeout
)
del_timer
(
&
timer
);
...
...
@@ -936,6 +938,167 @@ asmlinkage int sys_nice(int increment)
return
0
;
}
static
struct
task_struct
*
find_process_by_pid
(
pid_t
pid
)
{
struct
task_struct
*
p
,
*
q
;
if
(
pid
==
0
)
p
=
current
;
else
{
p
=
0
;
for_each_task
(
q
)
{
if
(
q
&&
q
->
pid
==
pid
)
{
p
=
q
;
break
;
}
}
}
return
p
;
}
static
int
setscheduler
(
pid_t
pid
,
int
policy
,
struct
sched_param
*
param
)
{
int
error
;
struct
sched_param
lp
;
struct
task_struct
*
p
;
if
(
!
param
||
pid
<
0
)
return
-
EINVAL
;
error
=
verify_area
(
VERIFY_READ
,
param
,
sizeof
(
struct
sched_param
));
if
(
error
)
return
-
EINVAL
;
memcpy_fromfs
(
&
lp
,
param
,
sizeof
(
struct
sched_param
));
p
=
find_process_by_pid
(
pid
);
if
(
!
p
)
return
-
ESRCH
;
if
(
policy
<
0
)
policy
=
p
->
policy
;
else
if
(
policy
!=
SCHED_FIFO
&&
policy
!=
SCHED_RR
&&
policy
!=
SCHED_OTHER
)
return
-
EINVAL
;
/*
* Valid priorities for SCHED_FIFO and SCHED_RR are 1..99, valid
* priority for SCHED_OTHER is 0.
*/
if
(
lp
.
sched_priority
<
0
||
lp
.
sched_priority
>
99
)
return
-
EINVAL
;
if
((
policy
==
SCHED_OTHER
)
!=
(
lp
.
sched_priority
==
0
))
return
-
EINVAL
;
if
((
policy
==
SCHED_FIFO
||
policy
==
SCHED_RR
)
&&
!
suser
())
return
-
EPERM
;
if
((
current
->
euid
!=
p
->
euid
)
&&
(
current
->
euid
!=
p
->
uid
)
&&
!
suser
())
return
-
EPERM
;
p
->
policy
=
policy
;
p
->
rt_priority
=
lp
.
sched_priority
;
schedule
();
return
0
;
}
asmlinkage
int
sys_sched_setscheduler
(
pid_t
pid
,
int
policy
,
struct
sched_param
*
param
)
{
return
setscheduler
(
pid
,
policy
,
param
);
}
asmlinkage
int
sys_sched_setparam
(
pid_t
pid
,
struct
sched_param
*
param
)
{
return
setscheduler
(
pid
,
-
1
,
param
);
}
asmlinkage
int
sys_sched_getscheduler
(
pid_t
pid
)
{
struct
task_struct
*
p
;
if
(
pid
<
0
)
return
-
EINVAL
;
p
=
find_process_by_pid
(
pid
);
if
(
!
p
)
return
-
ESRCH
;
return
p
->
policy
;
}
asmlinkage
int
sys_sched_getparam
(
pid_t
pid
,
struct
sched_param
*
param
)
{
int
error
;
struct
task_struct
*
p
;
struct
sched_param
lp
;
if
(
!
param
||
pid
<
0
)
return
-
EINVAL
;
error
=
verify_area
(
VERIFY_WRITE
,
param
,
sizeof
(
struct
sched_param
));
if
(
error
)
return
-
EINVAL
;
p
=
find_process_by_pid
(
pid
);
if
(
!
p
)
return
-
ESRCH
;
lp
.
sched_priority
=
p
->
rt_priority
;
memcpy_tofs
(
param
,
&
lp
,
sizeof
(
struct
sched_param
));
return
0
;
}
asmlinkage
int
sys_sched_yield
(
void
)
{
/* ... not yet implemented ... */
return
-
ENOSYS
;
}
asmlinkage
int
sys_sched_get_priority_max
(
int
policy
)
{
switch
(
policy
)
{
case
SCHED_FIFO
:
case
SCHED_RR
:
return
99
;
case
SCHED_OTHER
:
return
0
;
}
return
-
EINVAL
;
}
asmlinkage
int
sys_sched_get_priority_min
(
int
policy
)
{
switch
(
policy
)
{
case
SCHED_FIFO
:
case
SCHED_RR
:
return
1
;
case
SCHED_OTHER
:
return
0
;
}
return
-
EINVAL
;
}
asmlinkage
int
sys_sched_rr_get_interval
(
pid_t
pid
,
struct
timespec
*
interval
)
{
int
error
;
struct
timespec
t
;
error
=
verify_area
(
VERIFY_WRITE
,
interval
,
sizeof
(
struct
timespec
));
if
(
error
)
return
-
EINVAL
;
t
.
tv_sec
=
0
;
t
.
tv_nsec
=
0
;
/* <-- Linus, please fill correct value in here */
return
-
ENOSYS
;
/* and then delete this line. Thanks! */
memcpy_tofs
(
interval
,
&
t
,
sizeof
(
struct
timespec
));
return
0
;
}
static
void
show_task
(
int
nr
,
struct
task_struct
*
p
)
{
unsigned
long
free
;
...
...
mm/filemap.c
View file @
001e3f20
...
...
@@ -138,7 +138,6 @@ void update_vm_cache(struct inode * inode, unsigned long pos, const char * buf,
if
(
page
)
{
unsigned
long
addr
;
page
->
count
++
;
if
(
!
page
->
uptodate
)
sleep_on
(
&
page
->
wait
);
addr
=
page_address
(
page
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment