Commit 0df794ec authored by Linus Torvalds's avatar Linus Torvalds

Import 2.1.47

parent 344c062e
...@@ -29,7 +29,7 @@ English-language HTML version. ...@@ -29,7 +29,7 @@ English-language HTML version.
Also, don't forget http://www.linuxhq.com/ for all your Linux kernel Also, don't forget http://www.linuxhq.com/ for all your Linux kernel
needs. needs.
Last updated: May 31, 1997. Last updated: July 22. 1997
Current Author: Chris Ricker (gt1355b@prism.gatech.edu). Current Author: Chris Ricker (gt1355b@prism.gatech.edu).
Current Minimal Requirements Current Minimal Requirements
...@@ -39,11 +39,11 @@ Current Minimal Requirements ...@@ -39,11 +39,11 @@ Current Minimal Requirements
encountered a bug! If you're unsure what version you're currently encountered a bug! If you're unsure what version you're currently
running, the suggested command should tell you. running, the suggested command should tell you.
- Kernel modules modutils-2.1.34 ; insmod -v - Kernel modules modutils-2.1.42 ; insmod -V
- Gnu C 2.7.2.1 ; gcc --version - Gnu C 2.7.2.1 ; gcc --version
- Binutils 2.8.1.0.1 ; ld -v - Binutils 2.8.1.0.1 ; ld -v
- Linux C Library 5.4.23 ; ls -l /lib/libc.so.* - Linux C Library 5.4.33 ; ls -l /lib/libc.so.*
- Dynamic Linker (ld.so) 1.8.5 ; ldd -v - Dynamic Linker (ld.so) 1.9.2 ; ldd -v
- Linux C++ Library 2.7.2.1 ; ls -l /usr/lib/libg++.so.* - Linux C++ Library 2.7.2.1 ; ls -l /usr/lib/libg++.so.*
- Procps 1.01 ; ps --version - Procps 1.01 ; ps --version
- Procinfo 0.11 ; procinfo -v - Procinfo 0.11 ; procinfo -v
...@@ -51,8 +51,9 @@ running, the suggested command should tell you. ...@@ -51,8 +51,9 @@ running, the suggested command should tell you.
- Net-tools 1.41 ; hostname -V - Net-tools 1.41 ; hostname -V
- Loadlin 1.6a - Loadlin 1.6a
- Sh-utils 1.16 ; expr --v - Sh-utils 1.16 ; expr --v
- Autofs 0.3.3 ; automount --version - Autofs 0.3.7 ; automount --version
- NFS 0.4.21 ; showmount --version - NFS 0.4.21 ; showmount --version
- Bash 1.14.7 ; bash -version
Upgrade notes Upgrade notes
************* *************
...@@ -78,12 +79,12 @@ accordingly. ...@@ -78,12 +79,12 @@ accordingly.
For modules to work, you need to be running libc-5.4.x or greater. For modules to work, you need to be running libc-5.4.x or greater.
Since updates to libc fix other problems as well (security flaws, for Since updates to libc fix other problems as well (security flaws, for
example) and since 5.4.7 is missing a few needed symbols, try to get example) and since 5.4.7 is missing a few needed symbols, try to get
the latest 5.4.x you can. Currently, libc-5.4.23 is the latest public the latest 5.4.x you can. Currently, libc-5.4.33 is the latest public
release. release.
If you upgrade to libc-5.4.x, you also have to upgrade your dynamic If you upgrade to libc-5.4.x, you also have to upgrade your dynamic
linker (ld.so) to at least 1.8.5, or all sorts of weirdness will linker (ld.so) to at least 1.9.2, or all sorts of weirdness will
happen. Actually, ld.so-1.8.2 and later will work, but 1.8.5 is widely happen. Actually, ld.so-1.8.2 and later will work, but 1.9.2 is widely
available, so if you need to upgrade, use it. If you get a release available, so if you need to upgrade, use it. If you get a release
later than 1.8.5, avoid 1.8.10 as it introduces a few bugs that are later than 1.8.5, avoid 1.8.10 as it introduces a few bugs that are
fixed in later releases. fixed in later releases.
...@@ -94,7 +95,8 @@ you're using NIS. ...@@ -94,7 +95,8 @@ you're using NIS.
Modules Modules
======= =======
You need to upgrade to modutils-2.1.34 for kernels 2.1.34 and later. You need to upgrade to modutils-2.1.42 for kernels 2.1.42 and later.
This version will also work with 2.0.x kernels.
Binutils Binutils
======== ========
...@@ -146,7 +148,8 @@ Memory ...@@ -146,7 +148,8 @@ Memory
many memory utils, which have to be upgraded. Get the new procinfo and many memory utils, which have to be upgraded. Get the new procinfo and
procps (which, AFAIK, is not yet available) to fix this. Until you procps (which, AFAIK, is not yet available) to fix this. Until you
upgrade, programs which read /proc/meminfo will seg-fault or give an upgrade, programs which read /proc/meminfo will seg-fault or give an
error. error. There is an unofficial update to 1.12.2 available that fixes
most problems.
Mount and network file systems Mount and network file systems
============================== ==============================
...@@ -167,7 +170,7 @@ DOSEMU ...@@ -167,7 +170,7 @@ DOSEMU
====== ======
A new "stable" version of DOSEMU is available for 2.1.x kernels. A new "stable" version of DOSEMU is available for 2.1.x kernels.
Upgrade to 0.66.1 or later. Upgrade to 0.66.7 or later.
Loadlin Loadlin
======= =======
...@@ -192,6 +195,13 @@ parallel port may no longer be where you expect it; for example, LPT1 ...@@ -192,6 +195,13 @@ parallel port may no longer be where you expect it; for example, LPT1
/dev/lp0 with the new Plug-and-Play driver. If printing breaks with /dev/lp0 with the new Plug-and-Play driver. If printing breaks with
the new driver, try checking your lpd configuration. the new driver, try checking your lpd configuration.
Bash
====
Old versions of Bash fail to properly handle symlinks, which can
cause problems when compiling modules. Upgrade to at least 1.14 to fix
this problem.
Where to get the files Where to get the files
********************** **********************
...@@ -218,12 +228,12 @@ ftp://sunsite.unc.edu/pub/Linux/GCC/release.gcc-2.7.2.1 ...@@ -218,12 +228,12 @@ ftp://sunsite.unc.edu/pub/Linux/GCC/release.gcc-2.7.2.1
Linux C Library Linux C Library
=============== ===============
The 5.4.23 release: The 5.4.33 release:
ftp://tsx-11.mit.edu/pub/linux/packages/GCC/libc-5.4.23.bin.tar.gz ftp://tsx-11.mit.edu/pub/linux/packages/GCC/libc-5.4.33.bin.tar.gz
ftp://sunsite.unc.edu/pub/Linux/GCC/libc-5.4.23.bin.tar.gz ftp://sunsite.unc.edu/pub/Linux/GCC/libc-5.4.33.bin.tar.gz
Installation notes for 5.4.23: Installation notes for 5.4.33:
ftp://tsx-11.mit.edu/pub/linux/packages/GCC/release.libc-5.4.23 ftp://tsx-11.mit.edu/pub/linux/packages/GCC/release.libc-5.4.33
ftp://sunsite.unc.edu/pub/Linux/GCC/release.libc-5.4.23 ftp://sunsite.unc.edu/pub/Linux/GCC/release.libc-5.4.33
Linux C++ Library Linux C++ Library
================= =================
...@@ -238,16 +248,16 @@ ftp://sunsite.unc.edu/pub/Linux/GCC/release.libg++-2.7.2.1 ...@@ -238,16 +248,16 @@ ftp://sunsite.unc.edu/pub/Linux/GCC/release.libg++-2.7.2.1
Dynamic Linker Dynamic Linker
============== ==============
The 1.8.5 release: The 1.9.2 release:
ftp://tsx-11.mit.edu/pub/linux/packages/GCC/ld.so-1.8.5.tar.gz ftp://tsx-11.mit.edu/pub/linux/packages/GCC/ld.so-1.9.2.tar.gz
ftp://sunsite.unc.edu/pub/Linux/GCC/ld.so-1.8.5.tar.gz ftp://sunsite.unc.edu/pub/Linux/GCC/ld.so-1.9.2.tar.gz
Modules utilities Modules utilities
================= =================
The 2.1.34 release: The 2.1.42 release:
ftp://ftp.redhat.com/pub/alphabits/modutils-2.1.34.tar.gz ftp://ftp.redhat.com/pub/alphabits/modutils-2.1.42.tar.gz
ftp://ftp.kernel.org/pub/linux/kernel/v2.1/modutils-2.1.34.tar.gz ftp://ftp.kernel.org/pub/linux/kernel/v2.1/modutils-2.1.42.tar.gz
Procps utilities Procps utilities
================ ================
...@@ -255,6 +265,8 @@ Procps utilities ...@@ -255,6 +265,8 @@ Procps utilities
The 1.01 release: The 1.01 release:
ftp://tsx-11.mit.edu/pub/linux/sources/usr.bin/procps-1.01.tar.gz ftp://tsx-11.mit.edu/pub/linux/sources/usr.bin/procps-1.01.tar.gz
ftp://sunsite.unc.edu/pub/Linux/system/status/ps/procps-1.01.tgz ftp://sunsite.unc.edu/pub/Linux/system/status/ps/procps-1.01.tgz
The unofficial 1.12.2 release:
ftp://ftp.debian.org/pub/debian/hamm/hamm/source/base/procps_1.12.2.tar.gz
Procinfo utilities Procinfo utilities
================== ==================
...@@ -278,9 +290,9 @@ ftp://ftp.redhat.com/pub/redhat/redhat-4.0/updates/i386/rpm-devel-2.2.7-1.sparc. ...@@ -278,9 +290,9 @@ ftp://ftp.redhat.com/pub/redhat/redhat-4.0/updates/i386/rpm-devel-2.2.7-1.sparc.
DOSEMU DOSEMU
====== ======
The 0.66.1 release: The 0.66.7 release:
ftp://tsx-11.mit.edu/pub/linux/ALPHA/dosemu/dosemu0.66.1.tgz ftp://tsx-11.mit.edu/pub/linux/ALPHA/dosemu/dosemu0.66.7.tgz
ftp://sunsite.unc.edu/pub/Linux/system/emulators/dosemu0.66.1.tgz ftp://sunsite.unc.edu/pub/Linux/system/emulators/dosemu0.66.7.tgz
Loadlin Loadlin
======= =======
...@@ -305,8 +317,8 @@ ftp://ftp.win.tue.nl/pub/linux/util/mount-2.6g.tar.gz ...@@ -305,8 +317,8 @@ ftp://ftp.win.tue.nl/pub/linux/util/mount-2.6g.tar.gz
Autofs Autofs
====== ======
The 0.3.3 release: The 0.3.7 release:
ftp://ftp.kernel.org/pub/linux/daemons/autofs/autofs-0.3.3.tar.gz ftp://ftp.kernel.org/pub/linux/daemons/autofs/autofs-0.3.7.tar.gz
NFS NFS
=== ===
...@@ -328,6 +340,12 @@ Ypbind ...@@ -328,6 +340,12 @@ Ypbind
The 3.2 release: The 3.2 release:
ftp://ftp.uni-paderborn.de/pub/linux/local/yp/ypbind-3.2.tar.gz ftp://ftp.uni-paderborn.de/pub/linux/local/yp/ypbind-3.2.tar.gz
Bash
====
The 1.14.7 release:
ftp://prep.ai.mit.edu/pub/gnu/bash-1.14.7.tar.gz
Other Info Other Info
========== ==========
...@@ -335,13 +353,20 @@ Other Info ...@@ -335,13 +353,20 @@ Other Info
favorite local linux mirror. If you can, please get them from a closer favorite local linux mirror. If you can, please get them from a closer
site before checking sunsite. site before checking sunsite.
Also, for those of you running Red Hat (or RPM on a different You may also want to check for updated versions of this software in a
package format for the distribution you use.
For those of you running Red Hat (or RPM on a different
distribution), most of these are available in RPM format. Check around distribution), most of these are available in RPM format. Check around
your favorite Red Hat mirror site before installing the non-RPM your favorite Red Hat mirror site before installing the non-RPM
version. Remember, you might need to use the -force option to get the version. Remember, you might need to use the -force option to get the
upgrade to install. ftp://ftp.redhat.com/pub/contrib/ will have almost upgrade to install. ftp://ftp.redhat.com/pub/contrib/ will have almost
everything you need. everything you need.
Those of you running Debian (or a different distribution that
supports .deb packages) can look in the "unstable" and
"project/experimental" directories of your favorite Debian mirror.
For others, David Bourgin has put together a package of everything For others, David Bourgin has put together a package of everything
necessary to quickly and easily upgrade to 2.1.x. See necessary to quickly and easily upgrade to 2.1.x. See
ftp://ftp.wsc.com/pub/freeware/linux/update.linux/kernel-v2.1.x/ for ftp://ftp.wsc.com/pub/freeware/linux/update.linux/kernel-v2.1.x/ for
......
...@@ -69,20 +69,63 @@ or /proc/sys/fs/binfmt_misc/status. ...@@ -69,20 +69,63 @@ or /proc/sys/fs/binfmt_misc/status.
Emulating binfmt_java: Emulating binfmt_java:
====================== ======================
To emulate binfmt_java the following register-strings are necessary To emulate binfmt_java the following register-strings could be used:
(the first two for byte-compiled Java binaries, the third for applets for compiled Java programs use
contained in a html-file). Register exactly in this order! ":Java:M::\xca\xfe\xba\xbe::/usr/local/java/bin/javawrapper:"
":Java:M::\xca\xfe\xba\xbe::/usr/local/java/bin/java:" for simple applet support use
":JavaC:e::class::/usr/local/java/bin/java:"
":Applet:E::html::/usr/local/java/bin/appletviewer:" ":Applet:E::html::/usr/local/java/bin/appletviewer:"
for more selective applet support (like binfmt_java) use
":Applet:M::\<\!--applet::/usr/local/java/bin/appletviewer:"
Note, that for the more selective applet support you have to modify
existing html-files to contain <!--applet--> in the first line to
let this work!
For the compiled Java programs you need a wrapper script like the
following (this is because Java is broken in case of the filename
handling):
====================== Cut here ===================
#!/bin/bash
# /usr/local/java/bin/javawrapper - the wrapper for binfmt_misc/java
CLASS=$1
# if classname is a link, we follow it (this could be done easier - how?)
if [ -L "$1" ] ; then
CLASS=`ls --color=no -l $1 | tr -s '\t ' ' ' | cut -d ' ' -f 11`
fi
CLASSN=`basename $CLASS | sed s/\.class$//`
CLASSP=`dirname $CLASS`
FOO=$PATH
PATH=$CLASSPATH
if [ -z "`type -p -a $CLASSN.class`" ] ; then
# class is not in CLASSPATH
if [ -e "$CLASSP/$CLASSN.class" ] ; then
# append dir of class to CLASSPATH
if [ -z "${CLASSPATH}" ] ; then
export CLASSPATH=$CLASSP
else
export CLASSPATH=$CLASSP:$CLASSPATH
fi
else
# uh! now we would have to create a symbolic link - really
# ugly, i.e. print a message that one has to change the setup
echo "Hey! This is not a good setup to run $1 !"
exit 1
fi
fi
PATH=$FOO
shift
/usr/local/java/bin/java $CLASSN $@
====================== Cut here ===================
To add a Java program to your path best put a symbolic link to the main
.class file into /usr/bin (or another place you like) omitting the .class
extension. The directory containing the original .class file will be
added to your CLASSPATH during execution.
To add a Java-executable to your path you can either make a symbolic
link to the .class file elsewhere in your path (cut the .class-extension
in the destination name for convenience) or add the directory of your
.class files to your PATH environment. In both cases, ensure that the
.class files are in your CLASSPATH environment!
This is sort of ugly - Javas filename handling is just broken.
HINTS: HINTS:
......
...@@ -8,19 +8,18 @@ similar feature, and even the possibility of a small kernel, with a ...@@ -8,19 +8,18 @@ similar feature, and even the possibility of a small kernel, with a
file system which doesn't take up useful memory from the router file system which doesn't take up useful memory from the router
functions in the basement of your office. functions in the basement of your office.
For comparison, both the older minix and xiafs filesystems (compiled For comparison, both the older minix and xiafs (the latter is now
as module) need more than 20000 bytes, while romfs is less than a defunct) filesystems, compiled as module need more than 20000 bytes,
page, about 4000 bytes (assuming ix86 code). Under the same while romfs is less than a page, about 4000 bytes (assuming i586
conditions, the msdos filesystem would need about 30K (and does not code). Under the same conditions, the msdos filesystem would need
support device nodes or symlinks), while the nfs module with nfsroot about 30K (and does not support device nodes or symlinks), while the
is about 57K. Furthermore, as a bit unfair comparison, an actual nfs module with nfsroot is about 57K. Furthermore, as a bit unfair
rescue disk used up 3202 blocks with ext2, while with romfs, it needed comparison, an actual rescue disk used up 3202 blocks with ext2, while
3079 blocks. with romfs, it needed 3079 blocks.
To create such a file system, you'll need a user program named To create such a file system, you'll need a user program named
genromfs. It is (or will be shortly) available via ftp on genromfs. It is available via anonymous ftp on sunsite.unc.edu and
sunsite.unc.edu and its mirrors, in the /pub/Linux/system/Filesystems/ its mirrors, in the /pub/Linux/system/recovery/ directory.
directory.
As the name suggests, romfs could be also used (space-efficiently) on As the name suggests, romfs could be also used (space-efficiently) on
various read-only medias, like (E)EPROM disks if someone will have the various read-only medias, like (E)EPROM disks if someone will have the
...@@ -61,7 +60,7 @@ offset content ...@@ -61,7 +60,7 @@ offset content
+---+---+---+---+ +---+---+---+---+
0 | - | r | o | m | \ 0 | - | r | o | m | \
+---+---+---+---+ The ASCII representation of those bytes +---+---+---+---+ The ASCII representation of those bytes
4 | 1 | f | s | - | / (i.e. "-rom1fs-" 4 | 1 | f | s | - | / (i.e. "-rom1fs-")
+---+---+---+---+ +---+---+---+---+
8 | full size | The number of accessible bytes in this fs. 8 | full size | The number of accessible bytes in this fs.
+---+---+---+---+ +---+---+---+---+
...@@ -77,7 +76,7 @@ Every multi byte value (32 bit words, I'll use the longwords term from ...@@ -77,7 +76,7 @@ Every multi byte value (32 bit words, I'll use the longwords term from
now on) must be in big endian order. now on) must be in big endian order.
The first eight bytes identify the filesystem, even for the casual The first eight bytes identify the filesystem, even for the casual
reader. After that in the 3rd longword, it contains the number of inspector. After that, in the 3rd longword, it contains the number of
bytes accessible from the start of this filesystem. The 4th longword bytes accessible from the start of this filesystem. The 4th longword
is the checksum of the first 512 bytes (or the number of bytes is the checksum of the first 512 bytes (or the number of bytes
accessible, whichever is smallest). The applied algorithm is the same accessible, whichever is smallest). The applied algorithm is the same
...@@ -101,7 +100,7 @@ offset content ...@@ -101,7 +100,7 @@ offset content
12 | checksum | Covering the meta data, including the file 12 | checksum | Covering the meta data, including the file
+---+---+---+---+ name, and padding +---+---+---+---+ name, and padding
16 | file name | The zero terminated name of the file, 16 | file name | The zero terminated name of the file,
: : padded to 16 byte boundary. : : padded to 16 byte boundary
+---+---+---+---+ +---+---+---+---+
xx | file data | xx | file data |
: : : :
...@@ -112,9 +111,10 @@ bits are used for the mode information. Bits 0..2 specify the type of ...@@ -112,9 +111,10 @@ bits are used for the mode information. Bits 0..2 specify the type of
the file; while bit 4 shows if the file is executable or not. The the file; while bit 4 shows if the file is executable or not. The
permissions are assumed to be world readable, if this bit is not set, permissions are assumed to be world readable, if this bit is not set,
and world executable if it is; except the character and block devices, and world executable if it is; except the character and block devices,
they are readable only for the owner. The owner of every file is user they are never accessible for other than owner. The owner of every
and group 0, this should never be a problem for the intended use. The file is user and group 0, this should never be a problem for the
mapping of the 8 possible values to file types is the following: intended use. The mapping of the 8 possible values to file types is
the following:
mapping spec.info means mapping spec.info means
0 hard link link destination [file header] 0 hard link link destination [file header]
...@@ -128,14 +128,14 @@ mapping of the 8 possible values to file types is the following: ...@@ -128,14 +128,14 @@ mapping of the 8 possible values to file types is the following:
Note that hard links are specifically marked in this filesystem, but Note that hard links are specifically marked in this filesystem, but
they will behave as you can expect (i.e. share the inode number). they will behave as you can expect (i.e. share the inode number).
Note also that your responsibility to not create hard link loops, and Note also that it is your responsibility to not create hard link
creating all the . and .. links for directories. This is normally loops, and creating all the . and .. links for directories. This is
done correctly by the genromfs program. Please refrain from using the normally done correctly by the genromfs program. Please refrain from
executable bits on the socket and fifo special files, they may have using the executable bits for special purposes on the socket and fifo
other uses in the future. Additionally, please remember that only special files, they may have other uses in the future. Additionally,
regular files, and symlinks are supposed to have a nonzero size field; please remember that only regular files, and symlinks are supposed to
they contain the number of bytes available directly after the (padded) have a nonzero size field; they contain the number of bytes available
file name. directly after the (padded) file name.
Another thing to note is that romfs works on file headers and data Another thing to note is that romfs works on file headers and data
aligned to 16 byte boundaries, but most hardware devices and the block aligned to 16 byte boundaries, but most hardware devices and the block
...@@ -145,8 +145,44 @@ padded to an 1024 byte boundary. ...@@ -145,8 +145,44 @@ padded to an 1024 byte boundary.
If you have any problems or suggestions concerning this file system, If you have any problems or suggestions concerning this file system,
please contact me. However, think twice before wanting me to add please contact me. However, think twice before wanting me to add
features and code, because the primary advantage of this file system features and code, because the primary and most important advantage of
is the small code. this file system is the small code. On the other hand, don't be
alarmed, I'm not getting that much romfs related mail. Now I can
understand why Avery wrote poems in the arcnet docs to get some more
feedback. :)
romfs has also a mailing list, and to date, it hasn't received any
traffic, so you are welcome to join it to discuss your ideas. :)
It's run by ezmlm, so you can subscribe to it by sending a message
to romfs-subscribe@shadow.banki.hu, the content is irrelevant.
Pending issues:
- Permissions and owner information are pretty essential features of a
Un*x like system, but romfs does not provide the full possibilities.
I have never found this limiting, but others might.
- The file system is read only, so it can be very small, but in case
one would want to write _anything_ to a file system, he still needs
a writable file system, thus negating the size advantages. Possible
solutions: implement write access as a compile-time option, or a new,
similarly small writable filesystem for ram disks.
- Since the files are only required to have alignment on a 16 byte
boundary, it is currently possibly suboptimal to read or execute files
from the filesystem. It might be resolved by reordering file data to
have most of it (i.e. except the start and the end) laying at "natural"
boundaries, thus it would be possible to directly map a big portion of
the file contents to the mm subsystem.
- Compression might be an useful feature, but memory is quite a
limiting factor in my eyes.
- Where it is used?
- Does it work on other architectures than intel and motorola?
Have fun, Have fun,
Janos Farkas <chexum@shadow.banki.hu> Janos Farkas <chexum@shadow.banki.hu>
...@@ -9,5 +9,5 @@ netbios name or share. ...@@ -9,5 +9,5 @@ netbios name or share.
To use smbfs, you need a special mount program, which can be found in To use smbfs, you need a special mount program, which can be found in
the ksmbfs package, found on the ksmbfs package, found on
sunsite.unc.edu:/pub/Linux/system/Filesystems/smbfs.
sunsite.unc.edu:/pub/Linux/system/filesystems/smbfs
VERSION = 2 VERSION = 2
PATCHLEVEL = 1 PATCHLEVEL = 1
SUBLEVEL = 46 SUBLEVEL = 47
ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/) ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/)
...@@ -119,7 +119,7 @@ FILESYSTEMS =fs/filesystems.a ...@@ -119,7 +119,7 @@ FILESYSTEMS =fs/filesystems.a
NETWORKS =net/network.a NETWORKS =net/network.a
DRIVERS =drivers/block/block.a \ DRIVERS =drivers/block/block.a \
drivers/char/char.a \ drivers/char/char.a \
drivers/pnp/pnp.a drivers/misc/misc.a
LIBS =$(TOPDIR)/lib/lib.a LIBS =$(TOPDIR)/lib/lib.a
SUBDIRS =kernel drivers mm fs net ipc lib SUBDIRS =kernel drivers mm fs net ipc lib
...@@ -149,6 +149,10 @@ ifdef CONFIG_SBUS ...@@ -149,6 +149,10 @@ ifdef CONFIG_SBUS
DRIVERS := $(DRIVERS) drivers/sbus/sbus.a DRIVERS := $(DRIVERS) drivers/sbus/sbus.a
endif endif
ifdef CONFIG_PNP
DRIVERS := $(DRIVERS) drivers/pnp/pnp.a
endif
include arch/$(ARCH)/Makefile include arch/$(ARCH)/Makefile
ifdef SMP ifdef SMP
......
...@@ -99,7 +99,10 @@ if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then ...@@ -99,7 +99,10 @@ if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate 'Kernel support for JAVA binaries' CONFIG_BINFMT_JAVA tristate 'Kernel support for JAVA binaries' CONFIG_BINFMT_JAVA
fi fi
tristate 'Kernel support for Linux/Intel ELF binaries' CONFIG_BINFMT_EM86 tristate 'Kernel support for Linux/Intel ELF binaries' CONFIG_BINFMT_EM86
tristate 'Parallel port support' CONFIG_PNP_PARPORT tristate 'Parallel port support' CONFIG_PARPORT
if [ "$CONFIG_PARPORT" != "n" ]; then
dep_tristate ' PC-style hardware' CONFIG_PARPORT_PC $CONFIG_PARPORT
fi
endmenu endmenu
source drivers/pnp/Config.in source drivers/pnp/Config.in
......
...@@ -26,6 +26,10 @@ ...@@ -26,6 +26,10 @@
! !
! Video handling moved to video.S by Martin Mares, March 1996 ! Video handling moved to video.S by Martin Mares, March 1996
! <mj@k332.feld.cvut.cz> ! <mj@k332.feld.cvut.cz>
!
! Extended memory detection scheme retwiddled by orc@pell.chi.il.us (david
! parsons) to avoid loadlin confusion, July 1997
!
#define __ASSEMBLY__ #define __ASSEMBLY__
#include <linux/config.h> #include <linux/config.h>
...@@ -241,53 +245,39 @@ loader_panic_mess: ...@@ -241,53 +245,39 @@ loader_panic_mess:
loader_ok: loader_ok:
! Get memory size (extended mem, kB) ! Get memory size (extended mem, kB)
#ifdef STANDARD_MEMORY_BIOS_CALL #ifndef STANDARD_MEMORY_BIOS_CALL
mov ah,#0x88 push ebx
int 0x15
mov [2],ax xor ebx,ebx ! preload new memory slot with 0k
#else mov [0x1e0], ebx
push ax
push cx mov ax,#0xe801
push dx int 0x15
! which bootloader ? jc oldstylemem
seg cs
mov al,byte ptr type_of_loader
and al,#0xf0
cmp al,#0x10
jne try_xe801 ! not Loadlin
seg cs
cmp byte ptr type_of_loader,#0x16
jbe oldstylemem ! Loadlin <= 1.6 don't like that
try_xe801:
mov ax,#0xe801
int 0x15
jc oldstylemem
! memory size is (ax+(64*bx)) * 1024; we store bx+(ax/64) ! memory size is in 1k chunksizes, to avoid confusing loadlin.
! we store the 0xe801 memory size in a completely different place,
! because it will most likely be longer than 16 bits.
! (use 1e0 because that's what Larry Augustine uses in his
! alternative new memory detection scheme, and it's sensible
! to write everything into the same place.)
mov [2],bx ! store extended memory size and ebx, #0xffff ! clear sign extend
xor dx,dx shl ebx, 6 ! and go from 64k to 1k chunks
mov cx,#64 ! convert lower memory size from K into mov [0x1e0],ebx ! store extended memory size
div cx ! 64k chunks.
add [2],ax ! add lower memory into total size. and eax, #0xffff ! clear sign extend
jmp gotmem add [0x1e0],eax ! and add lower memory into total size.
! and fall into the old memory detection code to populate the
! compatability slot.
pop ebx
oldstylemem: oldstylemem:
#endif
mov ah,#0x88 mov ah,#0x88
int 0x15 int 0x15
or ax,ax ! some BIOSes report ZERO for 64meg
mov word ptr [2],#0x400
jz gotmem
mov cx,#64 ! got memory size in kbytes, so we need to
xor dx,dx ! adjust to 64k chunks for the system.
div cx
mov [2],ax mov [2],ax
gotmem:
pop dx
pop cx
pop ax
#endif
! Set the keyboard repeat rate to the max ! Set the keyboard repeat rate to the max
......
...@@ -46,7 +46,10 @@ choice 'Processor type' \ ...@@ -46,7 +46,10 @@ choice 'Processor type' \
PPro CONFIG_M686" Pentium PPro CONFIG_M686" Pentium
bool 'Video mode selection support' CONFIG_VIDEO_SELECT bool 'Video mode selection support' CONFIG_VIDEO_SELECT
tristate 'Parallel port support' CONFIG_PNP_PARPORT tristate 'Parallel port support' CONFIG_PARPORT
if [ "$CONFIG_PARPORT" != "n" ]; then
dep_tristate ' PC-style hardware' CONFIG_PARPORT_PC $CONFIG_PARPORT
fi
endmenu endmenu
......
...@@ -31,7 +31,7 @@ CONFIG_BINFMT_MISC=y ...@@ -31,7 +31,7 @@ CONFIG_BINFMT_MISC=y
# CONFIG_M586 is not set # CONFIG_M586 is not set
CONFIG_M686=y CONFIG_M686=y
# CONFIG_VIDEO_SELECT is not set # CONFIG_VIDEO_SELECT is not set
# CONFIG_PNP_PARPORT is not set # CONFIG_PARPORT is not set
# #
# Plug and Play support # Plug and Play support
......
...@@ -92,6 +92,9 @@ extern char empty_zero_page[PAGE_SIZE]; ...@@ -92,6 +92,9 @@ extern char empty_zero_page[PAGE_SIZE];
*/ */
#define PARAM empty_zero_page #define PARAM empty_zero_page
#define EXT_MEM_K (*(unsigned short *) (PARAM+2)) #define EXT_MEM_K (*(unsigned short *) (PARAM+2))
#ifndef STANDARD_MEMORY_BIOS_CALL
#define ALT_MEM_K (*(unsigned long *) (PARAM+0x1e0))
#endif
#ifdef CONFIG_APM #ifdef CONFIG_APM
#define APM_BIOS_INFO (*(struct apm_bios_info *) (PARAM+64)) #define APM_BIOS_INFO (*(struct apm_bios_info *) (PARAM+64))
#endif #endif
...@@ -120,6 +123,7 @@ __initfunc(void setup_arch(char **cmdline_p, ...@@ -120,6 +123,7 @@ __initfunc(void setup_arch(char **cmdline_p,
unsigned long * memory_start_p, unsigned long * memory_end_p)) unsigned long * memory_start_p, unsigned long * memory_end_p))
{ {
unsigned long memory_start, memory_end; unsigned long memory_start, memory_end;
unsigned long memory_alt_end;
char c = ' ', *to = command_line, *from = COMMAND_LINE; char c = ' ', *to = command_line, *from = COMMAND_LINE;
int len = 0; int len = 0;
static unsigned char smptrap=0; static unsigned char smptrap=0;
...@@ -143,10 +147,15 @@ __initfunc(void setup_arch(char **cmdline_p, ...@@ -143,10 +147,15 @@ __initfunc(void setup_arch(char **cmdline_p,
BIOS_revision = SYS_DESC_TABLE.table[2]; BIOS_revision = SYS_DESC_TABLE.table[2];
} }
aux_device_present = AUX_DEVICE_INFO; aux_device_present = AUX_DEVICE_INFO;
#ifdef STANDARD_MEMORY_BIOS_CALL
memory_end = (1<<20) + (EXT_MEM_K<<10); memory_end = (1<<20) + (EXT_MEM_K<<10);
#else #ifndef STANDARD_MEMORY_BIOS_CALL
memory_end = (1<<20) + (EXT_MEM_K*64L*1024L); /* 64kb chunks */ memory_alt_end = (1<<20) + (ALT_MEM_K<<10);
if (memory_alt_end > memory_end) {
printk("Memory: sized by int13 0e801h\n");
memory_end = memory_alt_end;
}
else
printk("Memory: sized by int13 088h\n");
#endif #endif
memory_end &= PAGE_MASK; memory_end &= PAGE_MASK;
#ifdef CONFIG_BLK_DEV_RAM #ifdef CONFIG_BLK_DEV_RAM
......
...@@ -80,7 +80,7 @@ bool 'System V IPC' CONFIG_SYSVIPC ...@@ -80,7 +80,7 @@ bool 'System V IPC' CONFIG_SYSVIPC
bool 'Sysctl support' CONFIG_SYSCTL bool 'Sysctl support' CONFIG_SYSCTL
if [ "$CONFIG_SGI" != "y" ]; then if [ "$CONFIG_SGI" != "y" ]; then
tristate 'Parallel port support' CONFIG_PNP_PARPORT tristate 'Parallel port support' CONFIG_PARPORT
fi fi
endmenu endmenu
......
/* $Id: sys32.S,v 1.1 1997/06/29 03:38:56 davem Exp $ /* $Id: sys32.S,v 1.2 1997/07/20 09:18:47 davem Exp $
* sys32.S: I-cache tricks for 32-bit compatability layer simple * sys32.S: I-cache tricks for 32-bit compatability layer simple
* conversions. * conversions.
* *
...@@ -306,7 +306,7 @@ sys32_settimeofday: ...@@ -306,7 +306,7 @@ sys32_settimeofday:
.globl sys32_sched_setparam, sys32_sched_getparam, sys32_signal .globl sys32_sched_setparam, sys32_sched_getparam, sys32_signal
.globl sys32_reboot, sys32_acct, sys32_newuname, sys32_olduname .globl sys32_reboot, sys32_acct, sys32_newuname, sys32_olduname
.globl sys32_sethostname, sys32_gethostname, sys32_setdomainname .globl sys32_sethostname, sys32_gethostname, sys32_setdomainname
.globl sys32_time, sys32_swapoff, sys32_swapon, sys32_nfsservctl .globl sys32_time, sys32_swapoff, sys32_swapon
.globl sys32_create_module, sys32_init_module, sys32_delete_module .globl sys32_create_module, sys32_init_module, sys32_delete_module
sys32_bdflush: sys32_bdflush:
sra %o1, 0, %o1 sra %o1, 0, %o1
...@@ -419,9 +419,3 @@ sys32_swapon: ...@@ -419,9 +419,3 @@ sys32_swapon:
mov %o7, %g1 mov %o7, %g1
call sys_swapon call sys_swapon
mov %g1, %o7 mov %g1, %o7
sys32_nfsservctl:
srl %o1, 0, %o1
mov %o7, %g1
srl %o2, 0, %o2
call sys_nfsservctl
mov %g1, %o7
/* $Id: sys_sparc32.c,v 1.43 1997/07/17 02:20:45 davem Exp $ /* $Id: sys_sparc32.c,v 1.44 1997/07/20 09:18:47 davem Exp $
* sys_sparc32.c: Conversion between 32bit and 64bit native syscalls. * sys_sparc32.c: Conversion between 32bit and 64bit native syscalls.
* *
* Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
...@@ -32,6 +32,12 @@ ...@@ -32,6 +32,12 @@
#include <linux/quota.h> #include <linux/quota.h>
#include <linux/file.h> #include <linux/file.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/sunrpc/svc.h>
#include <linux/nfsd/nfsd.h>
#include <linux/nfsd/cache.h>
#include <linux/nfsd/xdr.h>
#include <linux/nfsd/syscall.h>
#include <linux/module.h>
#include <asm/types.h> #include <asm/types.h>
#include <asm/poll.h> #include <asm/poll.h>
...@@ -2519,3 +2525,271 @@ sys_get_kernel_syms(struct kernel_sym *table) ...@@ -2519,3 +2525,271 @@ sys_get_kernel_syms(struct kernel_sym *table)
} }
#endif /* CONFIG_MODULES */ #endif /* CONFIG_MODULES */
/* Stuff for NFS server syscalls... */
struct nfsctl_svc32 {
u16 svc32_port;
s32 svc32_nthreads;
};
struct nfsctl_client32 {
s8 cl32_ident[NFSCLNT_IDMAX+1];
s32 cl32_naddr;
struct in_addr cl32_addrlist[NFSCLNT_ADDRMAX];
s32 cl32_fhkeytype;
s32 cl32_fhkeylen;
u8 cl32_fhkey[NFSCLNT_KEYMAX];
};
struct nfsctl_export32 {
s8 ex32_client[NFSCLNT_IDMAX+1];
s8 ex32_path[NFS_MAXPATHLEN+1];
__kernel_dev_t32 ex32_dev;
__kernel_ino_t32 ex32_ino;
s32 ex32_flags;
__kernel_uid_t32 ex32_anon_uid;
__kernel_gid_t32 ex32_anon_gid;
};
struct nfsctl_uidmap32 {
u32 ug32_ident; /* char * */
__kernel_uid_t32 ug32_uidbase;
s32 ug32_uidlen;
u32 ug32_udimap; /* uid_t * */
__kernel_uid_t32 ug32_gidbase;
s32 ug32_gidlen;
u32 ug32_gdimap; /* gid_t * */
};
struct nfsctl_fhparm32 {
struct sockaddr gf32_addr;
__kernel_dev_t32 gf32_dev;
__kernel_ino_t32 gf32_ino;
s32 gf32_version;
};
struct nfsctl_arg32 {
s32 ca32_version; /* safeguard */
union {
struct nfsctl_svc32 u32_svc;
struct nfsctl_client32 u32_client;
struct nfsctl_export32 u32_export;
struct nfsctl_uidmap32 u32_umap;
struct nfsctl_fhparm32 u32_getfh;
u32 u32_debug;
} u;
#define ca32_svc u.u32_svc
#define ca32_client u.u32_client
#define ca32_export u.u32_export
#define ca32_umap u.u32_umap
#define ca32_getfh u.u32_getfh
#define ca32_authd u.u32_authd
#define ca32_debug u.u32_debug
};
union nfsctl_res32 {
struct knfs_fh cr32_getfh;
u32 cr32_debug;
};
static int nfs_svc32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32)
{
if(__get_user(karg->ca_version, &arg32->ca32_version) ||
__get_user(karg->ca_svc.svc_port, &arg32->ca32_svc.svc32_port) ||
__get_user(karg->ca_svc.svc_nthreads, &arg32->ca32_svc.svc32_nthreads))
return -EFAULT;
return 0;
}
static int nfs_clnt32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32)
{
if(__get_user(karg->ca_version, &arg32->ca32_version) ||
copy_from_user(&karg->ca_client.cl_ident[0],
&arg32->ca32_client.cl32_ident[0],
NFSCLNT_IDMAX) ||
__get_user(karg->ca_client.cl_naddr, &arg32->ca32_client.cl32_naddr) ||
copy_from_user(&karg->ca_client.cl_addrlist[0],
&arg32->ca32_client.cl32_addrlist[0],
(sizeof(struct in_addr) * NFSCLNT_ADDRMAX)) ||
__get_user(karg->ca_client.cl_fhkeytype,
&arg32->ca32_client.cl32_fhkeytype) ||
__get_user(karg->ca_client.cl_fhkeylen,
&arg32->ca32_client.cl32_fhkeylen) ||
copy_from_user(&karg->ca_client.cl_fhkey[0],
&arg32->ca32_client.cl32_fhkey[0],
NFSCLNT_KEYMAX))
return -EFAULT;
return 0;
}
static int nfs_exp32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32)
{
if(__get_user(karg->ca_version, &arg32->ca32_version) ||
copy_from_user(&karg->ca_export.ex_client[0],
&arg32->ca32_export.ex32_client[0],
NFSCLNT_IDMAX) ||
copy_from_user(&karg->ca_export.ex_path[0],
&arg32->ca32_export.ex32_path[0],
NFS_MAXPATHLEN) ||
__get_user(karg->ca_export.ex_dev,
&arg32->ca32_export.ex32_dev) ||
__get_user(karg->ca_export.ex_ino,
&arg32->ca32_export.ex32_ino) ||
__get_user(karg->ca_export.ex_flags,
&arg32->ca32_export.ex32_flags) ||
__get_user(karg->ca_export.ex_anon_uid,
&arg32->ca32_export.ex32_anon_uid) ||
__get_user(karg->ca_export.ex_anon_gid,
&arg32->ca32_export.ex32_anon_gid))
return -EFAULT;
return 0;
}
static int nfs_uud32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32)
{
u32 uaddr;
int i;
memset(karg, 0, sizeof(*karg));
if(__get_user(karg->ca_version, &arg32->ca32_version))
return -EFAULT;
karg->ca_umap.ug_ident = (char *)get_free_page(GFP_USER);
if(!karg->ca_umap.ug_ident)
return -ENOMEM;
if(__get_user(uaddr, &arg32->ca32_umap.ug32_ident))
return -EFAULT;
if(strncpy_from_user(karg->ca_umap.ug_ident,
(char *)A(uaddr), PAGE_SIZE) <= 0)
return -EFAULT;
if(__get_user(karg->ca_umap.ug_uidbase,
&arg32->ca32_umap.ug32_uidbase) ||
__get_user(karg->ca_umap.ug_uidlen,
&arg32->ca32_umap.ug32_uidlen) ||
__get_user(uaddr, &arg32->ca32_umap.ug32_udimap))
return -EFAULT;
karg->ca_umap.ug_udimap = kmalloc((sizeof(uid_t) * karg->ca_umap.ug_uidlen),
GFP_USER);
if(!karg->ca_umap.ug_udimap)
return -EFAULT;
for(i = 0; i < karg->ca_umap.ug_uidlen; i++)
if(__get_user(karg->ca_umap.ug_udimap[i],
&(((__kernel_uid_t32 *)A(uaddr))[i])))
return -EFAULT;
if(__get_user(karg->ca_umap.ug_gidbase,
&arg32->ca32_umap.ug32_gidbase) ||
__get_user(karg->ca_umap.ug_uidlen,
&arg32->ca32_umap.ug32_gidlen) ||
__get_user(uaddr, &arg32->ca32_umap.ug32_gdimap))
return -EFAULT;
karg->ca_umap.ug_gdimap = kmalloc((sizeof(gid_t) * karg->ca_umap.ug_uidlen),
GFP_USER);
if(!karg->ca_umap.ug_gdimap)
return -EFAULT;
for(i = 0; i < karg->ca_umap.ug_gidlen; i++)
if(__get_user(karg->ca_umap.ug_gdimap[i],
&(((__kernel_gid_t32 *)A(uaddr))[i])))
return -EFAULT;
/* Success! */
return 0;
}
static int nfs_getfh32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32)
{
if(__get_user(karg->ca_version, &arg32->ca32_version) ||
copy_from_user(&karg->ca_getfh.gf_addr,
&arg32->ca32_getfh.gf32_addr,
(sizeof(struct sockaddr))) ||
__get_user(karg->ca_getfh.gf_dev,
&arg32->ca32_getfh.gf32_dev) ||
__get_user(karg->ca_getfh.gf_ino,
&arg32->ca32_getfh.gf32_ino) ||
__get_user(karg->ca_getfh.gf_version,
&arg32->ca32_getfh.gf32_version))
return -EFAULT;
return 0;
}
static int nfs_getfh32_res_trans(union nfsctl_res *kres, union nfsctl_res32 *res32)
{
if(copy_to_user(&res32->cr32_getfh,
&kres->cr_getfh,
sizeof(res32->cr32_getfh)) ||
__put_user(kres->cr_debug, &res32->cr32_debug))
return -EFAULT;
return 0;
}
extern asmlinkage int sys_nfsservctl(int cmd,
struct nfsctl_arg *arg,
union nfsctl_res *resp);
int asmlinkage sys32_nfsservctl(int cmd, u32 u_argp, u32 u_resp)
{
struct nfsctl_arg32 *arg32 = (struct nfsctl_arg32 *)A(u_argp);
union nfsctl_res32 *res32 = (union nfsctl_res32 *)A(u_resp);
struct nfsctl_arg *karg = NULL;
union nfsctl_res *kres = NULL;
unsigned long oldfs;
int err;
karg = kmalloc(sizeof(*karg), GFP_USER);
if(!karg)
return -ENOMEM;
if(res32) {
kres = kmalloc(sizeof(*kres), GFP_USER);
if(!kres) {
kfree(karg);
return -ENOMEM;
}
}
switch(cmd) {
case NFSCTL_SVC:
err = nfs_svc32_trans(karg, arg32);
break;
case NFSCTL_ADDCLIENT:
err = nfs_clnt32_trans(karg, arg32);
break;
case NFSCTL_DELCLIENT:
err = nfs_clnt32_trans(karg, arg32);
break;
case NFSCTL_EXPORT:
err = nfs_exp32_trans(karg, arg32);
break;
/* This one is unimplemented, be we're ready for it. */
case NFSCTL_UGIDUPDATE:
err = nfs_uud32_trans(karg, arg32);
break;
case NFSCTL_GETFH:
err = nfs_getfh32_trans(karg, arg32);
break;
default:
err = -EINVAL;
break;
}
if(err)
goto done;
oldfs = get_fs();
set_fs(KERNEL_DS);
err = sys_nfsservctl(cmd, karg, kres);
set_fs(oldfs);
if(!err && cmd == NFSCTL_GETFH)
err = nfs_getfh32_res_trans(kres, res32);
done:
if(karg) {
if(cmd == NFSCTL_UGIDUPDATE) {
if(karg->ca_umap.ug_ident)
kfree(karg->ca_umap.ug_ident);
if(karg->ca_umap.ug_udimap)
kfree(karg->ca_umap.ug_udimap);
if(karg->ca_umap.ug_gdimap)
kfree(karg->ca_umap.ug_gdimap);
}
kfree(karg);
}
if(kres)
kfree(kres);
return err;
}
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
# #
# Note 2! The CFLAGS definitions are now in the main makefile... # Note 2! The CFLAGS definitions are now in the main makefile...
SUB_DIRS := block char net pnp #streams SUB_DIRS := block char net misc #streams
MOD_SUB_DIRS := $(SUB_DIRS) sbus MOD_SUB_DIRS := $(SUB_DIRS) sbus
ALL_SUB_DIRS := $(SUB_DIRS) pci scsi sbus sound cdrom isdn pnp ALL_SUB_DIRS := $(SUB_DIRS) pci scsi sbus sound cdrom isdn misc pnp
ifdef CONFIG_PCI ifdef CONFIG_PCI
SUB_DIRS += pci SUB_DIRS += pci
...@@ -38,6 +38,15 @@ else ...@@ -38,6 +38,15 @@ else
endif endif
endif endif
ifeq ($(CONFIG_PNP),y)
SUB_DIRS += pnp
MOD_SUB_DIRS += pnp
else
ifeq ($(CONFIG_PNP),m)
MOD_SUB_DIRS += pnp
endif
endif
ifneq ($(CONFIG_CD_NO_IDESCSI)$(CONFIG_BLK_DEV_IDECD)$(CONFIG_BLK_DEV_SR),) ifneq ($(CONFIG_CD_NO_IDESCSI)$(CONFIG_BLK_DEV_IDECD)$(CONFIG_BLK_DEV_SR),)
SUB_DIRS += cdrom SUB_DIRS += cdrom
MOD_SUB_DIRS += cdrom MOD_SUB_DIRS += cdrom
......
...@@ -19,6 +19,7 @@ if [ "$CONFIG_SERIAL_EXTENDED" = "y" ]; then ...@@ -19,6 +19,7 @@ if [ "$CONFIG_SERIAL_EXTENDED" = "y" ]; then
fi fi
bool 'Non-standard serial port support' CONFIG_SERIAL_NONSTANDARD bool 'Non-standard serial port support' CONFIG_SERIAL_NONSTANDARD
if [ "$CONFIG_SERIAL_NONSTANDARD" = "y" ]; then if [ "$CONFIG_SERIAL_NONSTANDARD" = "y" ]; then
tristate 'Comtrol Rocketport support' CONFIG_ROCKETPORT
tristate 'Digiboard Intelligent Async Support' CONFIG_DIGIEPCA tristate 'Digiboard Intelligent Async Support' CONFIG_DIGIEPCA
if [ "$CONFIG_DIGIEPCA" = "n" ]; then if [ "$CONFIG_DIGIEPCA" = "n" ]; then
tristate 'Digiboard PC/Xx Support' CONFIG_DIGI tristate 'Digiboard PC/Xx Support' CONFIG_DIGI
...@@ -36,8 +37,8 @@ if [ "$CONFIG_SERIAL_NONSTANDARD" = "y" ]; then ...@@ -36,8 +37,8 @@ if [ "$CONFIG_SERIAL_NONSTANDARD" = "y" ]; then
int ' FIFO trigger level' CONFIG_ESPSERIAL_TRIGGER_LEVEL 768 int ' FIFO trigger level' CONFIG_ESPSERIAL_TRIGGER_LEVEL 768
fi fi
fi fi
if [ "$CONFIG_PNP_PARPORT" != "n" ]; then if [ "$CONFIG_PARPORT" != "n" ]; then
dep_tristate 'Parallel printer support' CONFIG_PRINTER $CONFIG_PNP_PARPORT dep_tristate 'Parallel printer support' CONFIG_PRINTER $CONFIG_PARPORT
if [ "$CONFIG_PRINTER" != "n" ]; then if [ "$CONFIG_PRINTER" != "n" ]; then
bool ' Support IEEE1284 status readback' CONFIG_PRINTER_READBACK bool ' Support IEEE1284 status readback' CONFIG_PRINTER_READBACK
fi fi
......
...@@ -59,6 +59,14 @@ else ...@@ -59,6 +59,14 @@ else
endif endif
endif endif
ifeq ($(CONFIG_ROCKETPORT),y)
L_OBJS += rocket.o
else
ifeq ($(CONFIG_ROCKETPORT),m)
M_OBJS += rocket.o
endif
endif
ifeq ($(CONFIG_DIGI),y) ifeq ($(CONFIG_DIGI),y)
L_OBJS += pcxx.o L_OBJS += pcxx.o
else else
......
...@@ -10,8 +10,11 @@ ...@@ -10,8 +10,11 @@
* "lp=" command line parameters added by Grant Guenther, grant@torque.net * "lp=" command line parameters added by Grant Guenther, grant@torque.net
* lp_read (Status readback) support added by Carsten Gross, * lp_read (Status readback) support added by Carsten Gross,
* carsten@sol.wohnheim.uni-ulm.de * carsten@sol.wohnheim.uni-ulm.de
* Support for parport by Philip Blundell <Philip.Blundell@pobox.com>
*/ */
/* This driver is about due for a rewrite. */
#include <linux/module.h> #include <linux/module.h>
#include <linux/config.h> #include <linux/config.h>
...@@ -23,7 +26,6 @@ ...@@ -23,7 +26,6 @@
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/fcntl.h> #include <linux/fcntl.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/init.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
...@@ -31,12 +33,7 @@ ...@@ -31,12 +33,7 @@
#include <linux/parport.h> #include <linux/parport.h>
#include <linux/lp.h> #include <linux/lp.h>
/* the BIOS manuals say there can be up to 4 lpt devices /* if you have more than 3 printers, remember to increase LP_NO */
* but I have not seen a board where the 4th address is listed
* if you have different hardware change the table below
* please let me know if you have different equipment
* if you have more than 3 printers, remember to increase LP_NO
*/
struct lp_struct lp_table[] = struct lp_struct lp_table[] =
{ {
{NULL, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, 0, 0, 0, {NULL, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, 0, 0, 0,
...@@ -164,7 +161,7 @@ static inline int lp_char_interrupt(char lpchar, int minor) ...@@ -164,7 +161,7 @@ static inline int lp_char_interrupt(char lpchar, int minor)
static void lp_interrupt(int irq, void *dev_id, struct pt_regs *regs) static void lp_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{ {
struct parport *pb = (struct parport *) dev_id; struct parport *pb = (struct parport *) dev_id;
struct ppd *pd = pb->cad; struct pardevice *pd = pb->cad;
struct lp_struct *lp_dev = (struct lp_struct *) pd->private; struct lp_struct *lp_dev = (struct lp_struct *) pd->private;
if (lp_dev->lp_wait_q) if (lp_dev->lp_wait_q)
...@@ -501,8 +498,9 @@ static int lp_open(struct inode * inode, struct file * file) ...@@ -501,8 +498,9 @@ static int lp_open(struct inode * inode, struct file * file)
static int lp_release(struct inode * inode, struct file * file) static int lp_release(struct inode * inode, struct file * file)
{ {
unsigned int minor = MINOR(inode->i_rdev); unsigned int minor = MINOR(inode->i_rdev);
unsigned int irq;
if (LP_IRQ(minor) > 0) { if ((irq = LP_IRQ(minor))) {
kfree_s(lp_table[minor].lp_buffer, LP_BUFFER_SIZE); kfree_s(lp_table[minor].lp_buffer, LP_BUFFER_SIZE);
lp_table[minor].lp_buffer = NULL; lp_table[minor].lp_buffer = NULL;
} }
...@@ -630,7 +628,7 @@ MODULE_PARM(parport, "1-" __MODULE_STRING(LP_NO) "i"); ...@@ -630,7 +628,7 @@ MODULE_PARM(parport, "1-" __MODULE_STRING(LP_NO) "i");
static int parport_ptr = 0; static int parport_ptr = 0;
__initfunc(void lp_setup(char *str, int *ints)) void lp_setup(char *str, int *ints)
{ {
/* Ugh. */ /* Ugh. */
if (!strncmp(str, "parport", 7)) { if (!strncmp(str, "parport", 7)) {
...@@ -678,23 +676,18 @@ static int inline lp_searchfor(int list[], int a) ...@@ -678,23 +676,18 @@ static int inline lp_searchfor(int list[], int a)
return 0; return 0;
} }
__initfunc(int lp_init(void)) int lp_init(void)
{ {
int count = 0; int count = 0;
struct parport *pb; struct parport *pb;
if (register_chrdev(LP_MAJOR, "lp", &lp_fops)) {
printk("lp: unable to get major %d\n", LP_MAJOR);
return -EIO;
}
if (parport[0] == -2) return 0; if (parport[0] == -2) return 0;
pb = parport_enumerate(); pb = parport_enumerate();
while (pb) { while (pb) {
/* We only understand PC-style ports. */ /* We only understand PC-style ports. */
if (pb->modes & PARPORT_MODE_SPP) { if (pb->modes & PARPORT_MODE_PCSPP) {
if (parport[0] == -1 || lp_searchfor(parport, count) || if (parport[0] == -1 || lp_searchfor(parport, count) ||
(parport[0] == -3 && (parport[0] == -3 &&
pb->probe_info.class == PARPORT_CLASS_PRINTER)) { pb->probe_info.class == PARPORT_CLASS_PRINTER)) {
...@@ -704,12 +697,8 @@ __initfunc(int lp_init(void)) ...@@ -704,12 +697,8 @@ __initfunc(int lp_init(void))
lp_interrupt, PARPORT_DEV_TRAN, lp_interrupt, PARPORT_DEV_TRAN,
(void *) &lp_table[count]); (void *) &lp_table[count]);
lp_table[count].flags |= LP_EXIST; lp_table[count].flags |= LP_EXIST;
printk(KERN_INFO "lp%d: using %s at 0x%x, ", printk(KERN_INFO "lp%d: using %s (%s).\n",
count, pb->name, pb->base); count, pb->name, (pb->irq == PARPORT_IRQ_NONE)?"polling":"interrupt-driven");
if (pb->irq == PARPORT_IRQ_NONE)
printk("polling.\n");
else
printk("irq %d.\n", pb->irq);
} }
if (++count == LP_NO) if (++count == LP_NO)
break; break;
...@@ -720,9 +709,14 @@ __initfunc(int lp_init(void)) ...@@ -720,9 +709,14 @@ __initfunc(int lp_init(void))
/* Successful specified devices increase count /* Successful specified devices increase count
* Unsuccessful specified devices increase failed * Unsuccessful specified devices increase failed
*/ */
if (count) if (count) {
return 0; if (register_chrdev(LP_MAJOR, "lp", &lp_fops)) {
printk("lp: unable to get major %d\n", LP_MAJOR);
return -EIO;
}
return 0;
}
printk(KERN_INFO "lp: driver loaded but no devices found\n"); printk(KERN_INFO "lp: driver loaded but no devices found\n");
#ifdef MODULE #ifdef MODULE
return 0; return 0;
......
This diff is collapsed.
This diff is collapsed.
...@@ -1829,6 +1829,9 @@ __initfunc(int tty_init(void)) ...@@ -1829,6 +1829,9 @@ __initfunc(int tty_init(void))
#ifdef CONFIG_SERIAL #ifdef CONFIG_SERIAL
rs_init(); rs_init();
#endif #endif
#ifdef CONFIG_ROCKETPORT
rp_init();
#endif
#ifdef CONFIG_CYCLADES #ifdef CONFIG_CYCLADES
cy_init(); cy_init();
#endif #endif
...@@ -1853,4 +1856,3 @@ __initfunc(int tty_init(void)) ...@@ -1853,4 +1856,3 @@ __initfunc(int tty_init(void))
#endif #endif
return 0; return 0;
} }
#
# Makefile for the kernel miscellaneous drivers.
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#
# Note 2! The CFLAGS definitions are now inherited from the
# parent makes..
SUB_DIRS :=
MOD_SUB_DIRS := $(SUB_DIRS)
ALL_SUB_DIRS := $(SUB_DIRS)
L_TARGET := misc.a
MX_OBJS :=
LX_OBJS :=
MI_OBJS :=
MIX_OBJS :=
ifeq ($(CONFIG_PARPORT),y)
L_OBJS += parport_share.o parport_ieee1284.o
ifeq ($(CONFIG_PROC_FS),y)
L_OBJS += parport_procfs.o
endif
ifeq ($(CONFIG_PARPORT_PC),y)
LX_OBJS += parport_pc.o
endif
LX_OBJS += parport_init.o
else
ifeq ($(CONFIG_PARPORT),m)
MI_OBJS += parport_share.o parport_ieee1284.o
ifneq ($(CONFIG_PROC_FS),n)
MI_OBJS += parport_procfs.o
endif
MIX_OBJS += parport_init.o
M_OBJS += parport.o
endif
ifeq ($(CONFIG_PARPORT_PC),m)
MX_OBJS += parport_pc.o
endif
endif
include $(TOPDIR)/Rules.make
# Special rule to build the composite parport.o module
parport.o: $(MI_OBJS) $(MIX_OBJS)
$(LD) $(LD_RFLAG) -r -o $@ $(MI_OBJS) $(MIX_OBJS)
/* $Id$
* Parallel-port routines for ARC onboard hardware.
*
* Author: Phil Blundell <pjb27@cam.ac.uk>
*/
#include <linux/tasks.h>
#include <asm/ptrace.h>
#include <asm/io.h>
#include <asm/dma.h>
#include <linux/config.h>
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/kernel.h>
#include <linux/malloc.h>
#include <linux/parport.h>
#include <linux/arch/oldlatches.h>
#define DATA_LATCH 0x3350010
/* ARC can't read from the data latch, so we must use a soft copy. */
static unsigned int data_copy;
static void arc_write_data(struct parport *p, unsigned int data)
{
data_copy = data;
outb(data, DATA_LATCH);
}
static unsigned int arc_read_data(struct parport *p)
{
return data_copy;
}
static struct parport_operations arc_ops =
{
arc_write_data,
arc_read_data,
arc_write_control,
arc_read_control,
arc_frob_control,
NULL, /* write_econtrol */
NULL, /* read_econtrol */
NULL, /* frob_econtrol */
arc_write_status,
arc_read_status,
NULL, /* write_fifo */
NULL, /* read_fifo */
NULL, /* change_mode */
arc_release_resources,
arc_claim_resources,
NULL, /* epp_write_block */
NULL, /* epp_read_block */
NULL, /* ecp_write_block */
NULL, /* epp_write_block */
arc_save_state,
arc_restore_state,
arc_enable_irq,
arc_disable_irq,
arc_examine_irq
};
/* $Id$
* IEEE-1284 implementation for parport.
*
* Authors: Philip Blundell <pjb27@cam.ac.uk>
* Carsten Gross <carsten@sol.wohnheim.uni-ulm.de>
* Jose Renau <renau@acm.org>
*/
#include <linux/tasks.h>
#include <linux/parport.h>
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/kernel.h>
#include <linux/malloc.h>
/* The following read functions are an implementation of a status readback
* and device id request confirming to IEEE1284-1994.
*
* These probably ought to go in some seperate file, so people like the SPARC
* don't have to pull them in.
*/
/* Wait for Status line(s) to change in 35 ms - see IEEE1284-1994 page 24 to
* 25 for this. After this time we can create a timeout because the
* peripheral doesn't conform to IEEE1284. We want to save CPU time: we are
* waiting a maximum time of 500 us busy (this is for speed). If there is
* not the right answer in this time, we call schedule and other processes
* are able "to eat" the time up to 30ms. So the maximum load avarage can't
* get above 5% for a read even if the peripheral is really slow. (but your
* read gets very slow then - only about 10 characters per second. This
* should be tuneable). Thanks to Andreas who pointed me to this and ordered
* the documentation.
*/
int parport_wait_peripheral(struct parport *port, unsigned char mask,
unsigned char result)
{
int counter=0;
unsigned char status;
do {
status = parport_read_status(port);
udelay(25);
counter++;
if (need_resched)
schedule();
} while ( ((status & mask) != result) && (counter < 20) );
if ( (counter == 20) && ((status & mask) != result) ) {
current->state=TASK_INTERRUPTIBLE;
current->timeout=jiffies+4;
schedule(); /* wait for 4 scheduler runs (40ms) */
status = parport_read_status(port);
if ((status & mask) != result) return 1; /* timeout */
}
return 0; /* okay right response from device */
}
/* Test if nibble mode for status readback is okay. Returns the value false
* if the printer doesn't support readback at all. If it supports readbacks
* and printer data is available the function returns 1, otherwise 2. The
* only valid values for "mode" are 0 and 4. 0 requests normal nibble mode,
* 4 is for "request device id using nibble mode". The request for the
* device id is best done in an ioctl (or at bootup time). There is no
* check for an invalid value, the only function using this call at the
* moment is lp_read and the ioctl LPGETDEVICEID both fixed calls from
* trusted kernel.
*/
int parport_ieee1284_nibble_mode_ok(struct parport *port, unsigned char mode)
{
parport_write_data(port, mode);
udelay(5);
parport_write_control(port, parport_read_control(port) & ~8); /* SelectIN low */
parport_write_control(port, parport_read_control(port) | 2); /* AutoFeed high */
if (parport_wait_peripheral(port, 0x78, 0x38)) { /* timeout? */
parport_write_control(port, (parport_read_control(port) & ~2) | 8);
return 0; /* first stage of negotiation failed,
* no IEEE1284 compliant device on this port
*/
}
parport_write_control(port, parport_read_control(port) | 1); /* Strobe high */
udelay(5); /* Strobe wait */
parport_write_control(port, parport_read_control(port) & ~1); /* Strobe low */
udelay(5);
parport_write_control(port, parport_read_control(port) & ~2); /* AutoFeed low */
return (parport_wait_peripheral(port, 0x20, 0))?2:1;
}
/* $Id: parport_init.c,v 1.1.2.2 1997/04/18 15:00:52 phil Exp $
* Parallel-port initialisation code.
*
* Authors: David Campbell <campbell@tirian.che.curtin.edu.au>
* Tim Waugh <tmw20@cam.ac.uk>
* Jose Renau <renau@acm.org>
*
* based on work by Grant Guenther <grant@torque.net>
* and Philip Blundell <Philip.Blundell@pobox.com>
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/tasks.h>
#include <linux/parport.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/malloc.h>
#include <linux/init.h>
#ifndef MODULE
static int io[PARPORT_MAX+1] __initdata = { 0, };
static int irq[PARPORT_MAX] __initdata = { PARPORT_IRQ_NONE, };
static int dma[PARPORT_MAX] __initdata = { PARPORT_DMA_NONE, };
extern int parport_pc_init(int *io, int *irq, int *dma);
static int parport_setup_ptr __initdata = 0;
__initfunc(void parport_setup(char *str, int *ints))
{
if (ints[0] == 0 || ints[1] == 0) {
/* Disable parport if "parport=" or "parport=0" in cmdline */
io[0] = PARPORT_DISABLE;
return;
}
if (parport_setup_ptr < PARPORT_MAX) {
io[parport_setup_ptr] = ints[1];
if (ints[0]>1) {
irq[parport_setup_ptr] = ints[2];
if (ints[0]>2) dma[parport_setup_ptr] = ints[3];
}
parport_setup_ptr++;
} else {
printk(KERN_ERR "parport=0x%x", ints[1]);
if (ints[0]>1) {
printk(",%d", ints[2]);
if (ints[0]>2) printk(",%d", ints[3]);
}
printk(" ignored, too many ports.\n");
}
}
#endif
#ifdef MODULE
int init_module(void)
{
return 0;
}
void cleanup_module(void)
{
struct parport *port, *next;
for (port = parport_enumerate(); port; port = next) {
next = port->next;
if (!(port->flags & PARPORT_FLAG_COMA))
parport_quiesce(port);
parport_proc_unregister(port);
kfree(port->name);
kfree(port);
}
parport_proc_cleanup();
}
#else
__initfunc(int parport_init(void))
{
struct parport *pb;
if (io[0] == PARPORT_DISABLE) return 1;
#ifdef CONFIG_PARPORT_PC
parport_pc_init(io, irq, dma);
#endif
return 0;
}
#endif
/* Exported symbols for modules. */
EXPORT_SYMBOL(parport_claim);
EXPORT_SYMBOL(parport_release);
EXPORT_SYMBOL(parport_register_port);
EXPORT_SYMBOL(parport_quiesce);
EXPORT_SYMBOL(parport_register_device);
EXPORT_SYMBOL(parport_unregister_device);
EXPORT_SYMBOL(parport_enumerate);
EXPORT_SYMBOL(parport_ieee1284_nibble_mode_ok);
EXPORT_SYMBOL(parport_wait_peripheral);
void inc_parport_count(void)
{
#ifdef MODULE
MOD_INC_USE_COUNT;
#endif
}
void dec_parport_count(void)
{
#ifdef MODULE
MOD_DEC_USE_COUNT;
#endif
}
/* $Id: parport_procfs.c,v 1.3.2.6 1997/04/16 21:30:38 phil Exp $ /* $Id: parport_procfs.c,v 1.1.2.2 1997/04/18 15:00:52 phil Exp $
* Parallel port /proc interface code. * Parallel port /proc interface code.
* *
* Authors: David Campbell <campbell@tirian.che.curtin.edu.au> * Authors: David Campbell <campbell@tirian.che.curtin.edu.au>
...@@ -13,23 +13,23 @@ ...@@ -13,23 +13,23 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/dma.h> #include <asm/dma.h>
#include <linux/config.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/interrupt.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/malloc.h> #include <linux/malloc.h>
#include <linux/interrupt.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/parport.h> #include <linux/parport.h>
#include "parport_ll_io.h"
#undef PARPORT_INCLUDE_BENCH #undef PARPORT_INCLUDE_BENCH
struct proc_dir_entry *base=NULL; struct proc_dir_entry *base=NULL;
void parport_null_intr_func(int irq, void *dev_id, struct pt_regs *regs); extern void parport_null_intr_func(int irq, void *dev_id, struct pt_regs *regs);
static int irq_write_proc(struct file *file, const char *buffer, static int irq_write_proc(struct file *file, const char *buffer,
unsigned long count, void *data) unsigned long count, void *data)
...@@ -59,7 +59,7 @@ static int irq_write_proc(struct file *file, const char *buffer, ...@@ -59,7 +59,7 @@ static int irq_write_proc(struct file *file, const char *buffer,
pp->irq = newirq; pp->irq = newirq;
if (pp->irq != PARPORT_IRQ_NONE && !(pp->flags & PARPORT_FLAG_COMA)) { if (pp->irq != PARPORT_IRQ_NONE && !(pp->flags & PARPORT_FLAG_COMA)) {
struct ppd *pd = pp->cad; struct pardevice *pd = pp->cad;
if (pd == NULL) { if (pd == NULL) {
pd = pp->devices; pd = pp->devices;
...@@ -98,7 +98,7 @@ static int devices_read_proc(char *page, char **start, off_t off, ...@@ -98,7 +98,7 @@ static int devices_read_proc(char *page, char **start, off_t off,
int count, int *eof, void *data) int count, int *eof, void *data)
{ {
struct parport *pp = (struct parport *)data; struct parport *pp = (struct parport *)data;
struct ppd *pd1; struct pardevice *pd1;
int len=0; int len=0;
for (pd1 = pp->devices; pd1 ; pd1 = pd1->next) { for (pd1 = pp->devices; pd1 ; pd1 = pd1->next) {
...@@ -133,6 +133,8 @@ static int hardware_read_proc(char *page, char **start, off_t off, ...@@ -133,6 +133,8 @@ static int hardware_read_proc(char *page, char **start, off_t off,
len += sprintf(page+len, "irq:\t%d\n",pp->irq); len += sprintf(page+len, "irq:\t%d\n",pp->irq);
len += sprintf(page+len, "dma:\t%d\n",pp->dma); len += sprintf(page+len, "dma:\t%d\n",pp->dma);
#if 0
len += sprintf(page+len, "modes:\t"); len += sprintf(page+len, "modes:\t");
{ {
#define printmode(x) {if(pp->modes&PARPORT_MODE_##x){len+=sprintf(page+len,"%s%s",f?",":"",#x);f++;}} #define printmode(x) {if(pp->modes&PARPORT_MODE_##x){len+=sprintf(page+len,"%s%s",f?",":"",#x);f++;}}
...@@ -187,7 +189,7 @@ static int hardware_read_proc(char *page, char **start, off_t off, ...@@ -187,7 +189,7 @@ static int hardware_read_proc(char *page, char **start, off_t off,
len += sprintf(page+len, ",EPP"); len += sprintf(page+len, ",EPP");
} }
len += sprintf(page+len, "\n"); len += sprintf(page+len, "\n");
#endif
#if 0 #if 0
/* Now no detection, please fix with an external function */ /* Now no detection, please fix with an external function */
len += sprintf(page+len, "chipset:\tunknown\n"); len += sprintf(page+len, "chipset:\tunknown\n");
......
...@@ -1493,7 +1493,7 @@ eexp_set_multicast(struct device *dev) ...@@ -1493,7 +1493,7 @@ eexp_set_multicast(struct device *dev)
#endif #endif
oj = jiffies; oj = jiffies;
while ((SCB_CUstat(scb_status(dev)) == 2) && while ((SCB_CUstat(scb_status(dev)) == 2) &&
((jiffies-oj) < 100)); ((jiffies-oj) < 2000));
if (SCB_CUstat(scb_status(dev)) == 2) if (SCB_CUstat(scb_status(dev)) == 2)
printk("%s: warning, CU didn't stop\n", dev->name); printk("%s: warning, CU didn't stop\n", dev->name);
lp->started &= ~(STARTED_CU); lp->started &= ~(STARTED_CU);
......
...@@ -8,8 +8,8 @@ comment 'Plug and Play support' ...@@ -8,8 +8,8 @@ comment 'Plug and Play support'
bool 'Plug and Play support' CONFIG_PNP bool 'Plug and Play support' CONFIG_PNP
if [ "$CONFIG_PNP" = "y" ]; then if [ "$CONFIG_PNP" = "y" ]; then
if [ "$CONFIG_PNP_PARPORT" != "n" ]; then if [ "$CONFIG_PARPORT" != "n" ]; then
bool ' Auto-probe for parallel devices' CONFIG_PNP_PARPORT_AUTOPROBE dep_tristate ' Auto-probe for parallel devices' CONFIG_PNP_PARPORT $CONFIG_PARPORT
fi fi
fi fi
......
...@@ -23,29 +23,11 @@ MI_OBJS := ...@@ -23,29 +23,11 @@ MI_OBJS :=
MIX_OBJS := MIX_OBJS :=
ifeq ($(CONFIG_PNP_PARPORT),y) ifeq ($(CONFIG_PNP_PARPORT),y)
L_OBJS += parport_share.o LX_OBJS += parport_probe.o
ifeq ($(CONFIG_PROC_FS),y)
L_OBJS += parport_procfs.o
endif
ifeq ($(CONFIG_PNP_PARPORT_AUTOPROBE),y)
L_OBJS += parport_probe.o
endif
LX_OBJS += parport_init.o
else else
ifeq ($(CONFIG_PNP_PARPORT),m) ifeq ($(CONFIG_PNP_PARPORT),m)
MI_OBJS += parport_share.o MX_OBJS += parport_probe.o
ifneq ($(CONFIG_PROC_FS),n)
MI_OBJS += parport_procfs.o
endif
ifeq ($(CONFIG_PNP_PARPORT_AUTOPROBE),y)
MI_OBJS += parport_probe.o
endif
MIX_OBJS += parport_init.o
M_OBJS += parport.o
endif endif
endif endif
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
parport.o: $(MI_OBJS) $(MIX_OBJS)
$(LD) $(LD_RFLAG) -r -o $@ $(MI_OBJS) $(MIX_OBJS)
/* $Id: parport_ll_io.h,v 1.1.2.1 1997/03/26 13:01:09 phil Exp $
* David Campbell's "favourite IO routines" for parallel ports
*/
#define r_dtr(x) inb((x)->base)
#define r_str(x) inb((x)->base+1)
#define r_ctr(x) inb((x)->base+2)
#define r_epp(x) inb((x)->base+4)
#define r_fifo(x) inb((x)->base+0x400)
#define r_ecr(x) inb((x)->base+0x402)
#define r_cnfgA(x) inb((x)->base+0x400)
#define r_cnfgB(x) inb((x)->base+0x401)
#define w_dtr(x,y) outb((y), (x)->base)
#define w_str(x,y) outb((y), (x)->base+1)
#define w_ctr(x,y) outb((y), (x)->base+2)
#define w_epp(x,y) outb((y), (x)->base+4)
#define w_fifo(x,y) outb((y), (x)->base+0x400)
#define w_ecr(x,y) outb((y), (x)->base+0x402)
#define w_cnfgA(x,y) outb((y), (x)->base+0x400)
#define w_cnfgB(x,y) outb((y), (x)->base+0x401)
This diff is collapsed.
This diff is collapsed.
...@@ -44,8 +44,18 @@ void fat_put_inode(struct inode *inode) ...@@ -44,8 +44,18 @@ void fat_put_inode(struct inode *inode)
MSDOS_I(inode)->i_linked = NULL; MSDOS_I(inode)->i_linked = NULL;
} }
if (MSDOS_I(inode)->i_busy) fat_cache_inval_inode(inode); if (MSDOS_I(inode)->i_busy) fat_cache_inval_inode(inode);
return;
} }
}
void fat_delete_inode(struct inode *inode)
{
struct inode *depend, *linked;
struct super_block *sb;
depend = MSDOS_I(inode)->i_depend;
linked = MSDOS_I(inode)->i_linked;
sb = inode->i_sb;
inode->i_size = 0; inode->i_size = 0;
fat_truncate(inode); fat_truncate(inode);
if (depend) { if (depend) {
......
...@@ -40,7 +40,7 @@ void fat_fs_panic(struct super_block *s,const char *msg) ...@@ -40,7 +40,7 @@ void fat_fs_panic(struct super_block *s,const char *msg)
not_ro = !(s->s_flags & MS_RDONLY); not_ro = !(s->s_flags & MS_RDONLY);
if (not_ro) s->s_flags |= MS_RDONLY; if (not_ro) s->s_flags |= MS_RDONLY;
printk("Filesystem panic (dev %s).", kdevname(s->s_dev)); printk("Filesystem panic (dev %s).\n %s\n", kdevname(s->s_dev), msg);
if (not_ro) if (not_ro)
printk(" File system has been set read-only\n"); printk(" File system has been set read-only\n");
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -191,7 +191,7 @@ void minix_free_inode(struct inode * inode) ...@@ -191,7 +191,7 @@ void minix_free_inode(struct inode * inode)
printk("free_inode: inode has no device\n"); printk("free_inode: inode has no device\n");
return; return;
} }
if (inode->i_count != 1) { if (inode->i_count > 1) {
printk("free_inode: inode has count=%d\n",inode->i_count); printk("free_inode: inode has count=%d\n",inode->i_count);
return; return;
} }
...@@ -251,7 +251,6 @@ struct inode * minix_new_inode(const struct inode * dir) ...@@ -251,7 +251,6 @@ struct inode * minix_new_inode(const struct inode * dir)
iput(inode); iput(inode);
return NULL; return NULL;
} }
inode->i_count = 1;
inode->i_nlink = 1; inode->i_nlink = 1;
inode->i_dev = sb->s_dev; inode->i_dev = sb->s_dev;
inode->i_uid = current->fsuid; inode->i_uid = current->fsuid;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment