Import 1.3.871.3.87
authorLinus Torvalds<torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:10:48 +0000 (23 15:10 -0500)
committerLinus Torvalds<torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:10:48 +0000 (23 15:10 -0500)
415 files changed:
CHANGES[deleted file]
CREDITS
Documentation/BUG-HUNTING
Documentation/Changes[new file with mode: 0644]
Documentation/Configure.help
Documentation/SMP.txt
Documentation/cdrom/aztcd
Documentation/cdrom/cdu31a
Documentation/cdrom/cm206
Documentation/cdrom/isp16
Documentation/cdrom/sjcd
Documentation/devices.tex
Documentation/devices.txt
Documentation/digiboard.txt
Documentation/filesystems/smbfs.txt
Documentation/filesystems/vfat.txt
Documentation/initrd.txt
Documentation/isdn/INTERFACE
Documentation/isdn/README
Documentation/isdn/README.icn
Documentation/isdn/README.syncppp
Documentation/mandatory.txt
Documentation/networking/3c505.txt[new file with mode: 0644]
Documentation/networking/arcnet-hardware.txt
Documentation/networking/framerelay.txt
Documentation/networking/net-modules.txt
Documentation/networking/tcp.txt
Documentation/networking/z8530drv.txt
Documentation/nfsroot.txt
Documentation/smp.ez
Documentation/smp.tex
Documentation/svga.txt
MAINTAINERS
Makefile
arch/alpha/kernel/bios32.c
arch/alpha/kernel/irq.c
arch/alpha/kernel/ksyms.c
arch/alpha/kernel/osf_sys.c
arch/alpha/kernel/setup.c
arch/alpha/math-emu/fp-emul.c
arch/alpha/math-emu/fp-emul.h
arch/alpha/math-emu/ieee-math.c
arch/i386/boot/video.S
arch/i386/kernel/irq.c
arch/i386/kernel/process.c
arch/i386/kernel/smp.c
arch/i386/kernel/sys_i386.c
arch/i386/kernel/traps.c
arch/i386/mm/init.c
arch/mips/boot/Makefile
arch/mips/config.in
arch/mips/kernel/entry.S
arch/mips/kernel/gdb-stub.c
arch/mips/kernel/head.S
arch/mips/kernel/jazzdma.c
arch/mips/kernel/r4xx0.S
arch/mips/kernel/syscall.c
arch/mips/lib/checksum.c
arch/mips/mm/init.c
arch/ppc/kernel/head.S
arch/ppc/kernel/ppc_machine.h.isin.processor.h
arch/ppc/kernel/raw_printf.c
arch/ppc/kernel/traps.c
arch/ppc/mm/fault.c
arch/ppc/mm/init.c
arch/sparc/boot/README
arch/sparc/boot/bare.S
arch/sparc/boot/empirical.h[moved from arch/sparc/boot/imperical.h with 51% similarity]
arch/sparc/boot/init_me.c
arch/sparc/kernel/auxio.c
arch/sparc/kernel/entry.S
arch/sparc/kernel/etrap.S
arch/sparc/kernel/head.S
arch/sparc/kernel/idprom.c
arch/sparc/kernel/ioport.c
arch/sparc/kernel/probe.c
arch/sparc/kernel/process.c
arch/sparc/kernel/sclow.S
arch/sparc/kernel/setup.c
arch/sparc/kernel/smp.c
arch/sparc/kernel/sparc-stub.c
arch/sparc/kernel/sunos_ioctl.c
arch/sparc/kernel/sys_sparc.c
arch/sparc/kernel/sys_sunos.c
arch/sparc/kernel/systbls.S
arch/sparc/kernel/time.c
arch/sparc/kernel/wuf.S
arch/sparc/mm/init.c
arch/sparc/mm/srmmu.c
arch/sparc/mm/sun4c.c
arch/sparc/prom/memory.c
arch/sparc/prom/palloc.c
drivers/block/Config.in
drivers/block/README.ide
drivers/block/cmd640.c
drivers/block/floppy.c
drivers/block/ht6560b.c
drivers/block/ide-cd.c
drivers/block/ide-tape.c
drivers/block/ide-tape.h
drivers/block/ide.c
drivers/block/ide.h
drivers/block/linear.c
drivers/block/ll_rw_blk.c
drivers/block/md.c
drivers/block/raid0.c
drivers/block/umc8672.c
drivers/cdrom/aztcd.c
drivers/cdrom/cm206.c
drivers/cdrom/gscd.c
drivers/cdrom/mcd.c
drivers/cdrom/mcdx.c
drivers/cdrom/sjcd.c
drivers/char/ChangeLog
drivers/char/consolemap.c
drivers/char/cyclades.c
drivers/char/ftape/Makefile
drivers/char/ftape/RELEASE-NOTES
drivers/char/ftape/fc-10.c
drivers/char/ftape/fdc-io.c
drivers/char/ftape/fdc-isr.c
drivers/char/ftape/ftape-ctl.c
drivers/char/ftape/ftape-io.c
drivers/char/ftape/ftape-rw.c
drivers/char/ftape/ftape-rw.h
drivers/char/ftape/qic117.h
drivers/char/istallion.c
drivers/char/keyboard.c
drivers/char/pcxx.c
drivers/char/random.c
drivers/char/scc.c
drivers/char/stallion.c
drivers/char/tga.c
drivers/char/wdt.c
drivers/isdn/icn/icn.c
drivers/isdn/icn/icn.h
drivers/isdn/isdn_common.h
drivers/isdn/isdn_net.c
drivers/isdn/isdn_net.h
drivers/isdn/isdn_ppp.c
drivers/isdn/isdn_tty.c
drivers/isdn/teles/isdnl3.c
drivers/isdn/teles/l3_1TR6.c
drivers/isdn/teles/q931.c
drivers/net/3c503.c
drivers/net/3c505.c
drivers/net/3c59x.c
drivers/net/Makefile
drivers/net/README.3c505[deleted file]
drivers/net/README.eql
drivers/net/README.pt
drivers/net/arcnet.c
drivers/net/bsd_comp.c
drivers/net/de4x5.c
drivers/net/depca.c
drivers/net/eepro.c
drivers/net/eexpress.c
drivers/net/eql.c
drivers/net/eth16i.c
drivers/net/eth82586.h
drivers/net/ewrk3.h
drivers/net/fmv18x.c
drivers/net/hp100.c
drivers/net/hp100.h
drivers/net/ibmtr.c
drivers/net/ibmtr.h
drivers/net/lance.c
drivers/net/ni52.c
drivers/net/ni52.h
drivers/net/ni65.c
drivers/net/ppp.c
drivers/net/pt.c
drivers/net/sdla.c
drivers/net/seeq8005.c
drivers/net/seeq8005.h
drivers/net/sk_g16.c
drivers/net/slip.c
drivers/net/slip.h
drivers/net/smc9194.c
drivers/net/smc9194.h
drivers/net/strip.c
drivers/net/sunlance.c
drivers/net/tulip.c
drivers/scsi/53c7,8xx.c
drivers/scsi/53c7,8xx.h
drivers/scsi/53c7,8xx.scr
drivers/scsi/53c8xx_d.h
drivers/scsi/AM53C974.c
drivers/scsi/AM53C974.h
drivers/scsi/ChangeLog
drivers/scsi/Config.in
drivers/scsi/NCR5380.c
drivers/scsi/NCR5380.h
drivers/scsi/NCR53c406a.c
drivers/scsi/README.AM53C974
drivers/scsi/README.BusLogic
drivers/scsi/README.dtc3x80
drivers/scsi/README.g_NCR5380
drivers/scsi/advansys.c
drivers/scsi/aic7xxx.c
drivers/scsi/aic7xxx.seq
drivers/scsi/aic7xxx_reg.h
drivers/scsi/eata_dma.c
drivers/scsi/eata_dma_proc.c
drivers/scsi/eata_pio.c
drivers/scsi/eata_pio_proc.c
drivers/scsi/fdomain.c
drivers/scsi/g_NCR5380.c
drivers/scsi/scsi.c
drivers/scsi/sd.c
drivers/scsi/sr.c
drivers/scsi/u14-34f.c
drivers/sound/CHANGELOG
drivers/sound/Config.in
drivers/sound/Config.std
drivers/sound/Readme
drivers/sound/Readme.cards
drivers/sound/Readme.linux
drivers/sound/Readme.modules
drivers/sound/Readme.v30
drivers/sound/ad1848.c
drivers/sound/aedsp16.c
drivers/sound/configure.c
drivers/sound/cs4232.c
drivers/sound/dev_table.h
drivers/sound/dmabuf.c
drivers/sound/gus_wave.c
drivers/sound/mad16.c
drivers/sound/mad16_sb_midi.c
drivers/sound/maui.c
drivers/sound/midi_synth.c
drivers/sound/mpu401.c
drivers/sound/opl3.c
drivers/sound/opl3.h
drivers/sound/pas.h
drivers/sound/pas2_pcm.c
drivers/sound/patmgr.c
drivers/sound/pss.c
drivers/sound/sb_dsp.c
drivers/sound/sb_midi.c
drivers/sound/sequencer.c
drivers/sound/sound_config.h
drivers/sound/soundcard.c
fs/buffer.c
fs/dquot.c
fs/ext2/symlink.c
fs/ncpfs/inode.c
fs/nfs/README
fs/nfs/bio.c
fs/nfs/dir.c
fs/nfs/inode.c
fs/nfs/nfsroot.c
fs/proc/scsi.c
fs/smbfs/dir.c
fs/smbfs/inode.c
fs/smbfs/sock.c
fs/umsdos/dir.c
include/asm-alpha/io.h
include/asm-alpha/lca.h
include/asm-alpha/shmparam.h
include/asm-alpha/stat.h
include/asm-i386/bitops.h
include/asm-i386/locks.h
include/asm-i386/pgtable.h
include/asm-i386/smp.h
include/asm-mips/delay.h
include/asm-mips/dma.h
include/asm-mips/floppy.h
include/asm-mips/jazz.h
include/asm-mips/mc146818rtc.h
include/asm-mips/mipsconfig.h
include/asm-mips/pgtable.h
include/asm-mips/pica.h
include/asm-mips/processor.h
include/asm-mips/segment.h
include/asm-mips/signal.h
include/asm-mips/socket.h
include/asm-mips/stat.h
include/asm-mips/sysmips.h
include/asm-mips/termbits.h
include/asm-mips/vector.h
include/asm-ppc/pgtable.h
include/asm-ppc/processor.h
include/asm-ppc/string.h
include/asm-sparc/asi.h
include/asm-sparc/auxio.h
include/asm-sparc/bsderrno.h
include/asm-sparc/cache.h
include/asm-sparc/cypress.h
include/asm-sparc/dma.h
include/asm-sparc/ecc.h
include/asm-sparc/fbio.h
include/asm-sparc/floppy.h
include/asm-sparc/head.h
include/asm-sparc/mbus.h
include/asm-sparc/memreg.h
include/asm-sparc/mman.h
include/asm-sparc/mostek.h
include/asm-sparc/mpmbox.h
include/asm-sparc/mxcc.h
include/asm-sparc/openprom.h
include/asm-sparc/oplib.h
include/asm-sparc/pconf.h
include/asm-sparc/pgtsrmmu.h
include/asm-sparc/smp.h
include/asm-sparc/solerrno.h
include/asm-sparc/traps.h
include/asm-sparc/unistd.h
include/asm-sparc/vac-ops.h
include/asm-sparc/vaddrs.h
include/linux/cdk.h
include/linux/cdrom.h
include/linux/cm206.h
include/linux/comstats.h
include/linux/elfcore.h
include/linux/fd.h
include/linux/fs.h
include/linux/gscd.h
include/linux/hdreg.h
include/linux/if_eql.h
include/linux/if_ether.h
include/linux/if_frad.h
include/linux/if_ppp.h
include/linux/if_wic.h
include/linux/isdn.h
include/linux/mcdx.h
include/linux/mm.h
include/linux/mman.h
include/linux/netdevice.h
include/linux/nfs_fs.h
include/linux/nfs_fs_i.h
include/linux/pagemap.h
include/linux/pci.h
include/linux/proc_fs.h
include/linux/quota.h
include/linux/rpcsock.h
include/linux/scc.h
include/linux/sdla.h
include/linux/sjcd.h
include/linux/smbno.h
include/linux/socket.h
include/linux/soundcard.h
include/linux/sysctl.h
include/linux/timex.h
include/linux/ultrasound.h
include/linux/wrapper.h
include/net/ax25call.h
include/net/br.h
include/net/netrom.h
include/net/nrcall.h
include/net/route.h
include/net/sock.h
include/net/tcp.h
init/main.c
ipc/msg.c
ipc/shm.c
kernel/ksyms.c
kernel/module.c
kernel/panic.c
kernel/sched.c
kernel/sys.c
kernel/sysctl.c
lib/inflate.c
mm/filemap.c
mm/memory.c
mm/mremap.c
mm/page_alloc.c
mm/page_io.c
mm/swap.c
mm/vmscan.c
net/Changes
net/Makefile
net/TUNABLE
net/appletalk/aarp.c
net/appletalk/ddp.c
net/ax25/af_ax25.c
net/ax25/ax25_in.c
net/ax25/ax25_out.c
net/ax25/ax25_route.c
net/ax25/ax25_subr.c
net/ax25/ax25_timer.c
net/bridge/br.c
net/core/net_alias.c
net/ethernet/eth.c
net/ipv4/af_inet.c
net/ipv4/arp.c
net/ipv4/icmp.c
net/ipv4/igmp.c
net/ipv4/ip_forward.c
net/ipv4/ip_fw.c
net/ipv4/ip_input.c
net/ipv4/ip_masq_app.c
net/ipv4/ip_options.c
net/ipv4/ip_output.c
net/ipv4/ipmr.c
net/ipv4/packet.c
net/ipv4/route.c
net/ipv4/tcp.c
net/ipv4/tcp_input.c
net/ipv4/tcp_output.c
net/ipv4/tcp_timer.c
net/ipv4/udp.c
net/ipx/af_ipx.c
net/netrom/af_netrom.c
net/netrom/nr_timer.c
net/socket.c
net/sysctl_net.c
net/unix/af_unix.c
net/unix/garbage.c
scripts/Menuconfig
scripts/README.Menuconfig
scripts/depend.awk
scripts/lxdialog/dialog.h
scripts/tail.tk
scripts/tkcond.c

diff --git a/CHANGES b/CHANGES
deleted file mode 100644 (file)
index b5c9001..0000000
--- a/CHANGES
+++ /dev/null
@@ -1,143 +0,0 @@
-CHANGES since 0.99 patchlevel 15:
-
- - removed all the bugs, of course.
- - networking fixes.
- - more changes than I really wanted..
-
-CHANGES since 0.99 patchlevel 14:
-
- - too many to count, really.  Besides, I've lost my notes. 
-
-CHANGES since 0.99 patchlevel 13:
-
- - new kernel source layout: drivers separated
- - lots of networking bugs fixed, and new network card drivers (Alan Cox,
-   Donald Becker &co)
- - sound driver added to the default source distribution (Hannu
-   Savolainen)
- - updated SCSI driver code (Eric Youngdale, Drew Eckhardt &co)
- - readonly OS/2 filesystem support (HPFS) added (Chris Smith)
- - NTP support (Philip Gladstone, Torsten Duwe, ??)
- - fixed 16MB swap-area limit
- - lots of minor cleanups, bugfixes etc.
-
-CHANGES since 0.99 patchlevel 12 and earlier:
-
- - the bad memory management one-liner bug in pl12 is naturally fixed.
- - compiled with plain C by default instead of C++
- - ELF binary support (Eric Youngdale)
- - Quickport mouse support (and some changes to the PS/2 mouse driver)
-   by Johan Myreen and co)
- - core file name change ("core" -> "core.xxxx" where xxxx is the name
-   of the program that dumped code).  Idea from ???.  Also, core-files
-   now correctly truncate any existing core file before being written.
- - some mmap() fixes: better error returns, and handling of non-fixed
-   maps for /dev/mem etc.
- - one kludgy way to fix the wrong arp packets that have plagued net-2d
-   (resulting in arp packets that had the first four bytes of the
-   ethernet address as the IP address).
- - I fixed the mount-point handling of 'rename()' and 'unlink()/rmdir()'
-   so that they should now work and/or give appropriate error messages.
-   An early version of this patch was already sent to the KERNEL
-   channel, which fixed the rename problem but not a similar bug with
-   unlink.
- - packet mode fixes by Charles Hedrick.  Sadly, these are likely to
-   break old telnet/rlogin binaries, but it had to be done in order to
-   communicate correctly with the rest of the world.
- - FPU emulator patches from Bill Metzenthen.  The fprem1 insn should be
-   correct now (not that anybody seems to have seen the incorrect
-   behaviour..)
- - a few fixes for SCSI (Drew and Eric)
- - signal.c changes to handle multiple segments (for Wine) correctly.
- - updated drivers from Donald Becker: 3c509 and AT1500 drivers, but
-   also some other drivers have been edited, and some networking fixes.
-
-CHANGES since 0.99 patchlevel 11 and earlier:
-
- - The memory manager cleanup has continued, and seems to be mostly
-   ready, as proven by the ease of adding mmap() over NFS with the new
-   routines.  So yes, the pl12 kernel will demand-load your binaries
-   over NFS, sharing code and clean data, as well as running shared
-   libraries over NFS.  Memory management by Eric and me, while the NFS
-   mmap code was written by Jon Tombs,
-
- - ** IMPORTANT **: The keyboard driver has been enhanced even further,
-   and almost everything is completely re-mappable.  This means that
-   there is a new version of 'loadkeys' and 'dumpkeys' that you must use
-   with this kernel or you'll have problems.  The default keyboard is
-   still the US mapping, but if you want to create your own mappings
-   you'll have to load them with the new binaries.  Get the 'kbd.tar.gz'
-   archive from the same place you get the kernel.
-
-   The new keymappings allow things like function key string changes,
-   remapping of the control keys, and freedom to remap any of the normal
-   keyboard functions: including special features like rebooting,
-   console switching etc.  The keyboard remapping code has been done
-   mostly by Risto Kankkunen (Risto.Kankkunen@Helsinki.FI).
-
- - updated network drivers by Donald Becker
-
- - updated serial drivers - tytso@Athena.mit.edu
-
- - updated 387 emulation (Bill Metzenthen).  The updated emulator code
-   has more exact trigonometric functions and improved exception
-   handling.  It now behaves very much like a real 486, with only small
-   changes (greater accuracy, slightly different denormal NaN handling
-   etc - hard to detect the differences even if you are looking for
-   them).
-
- - network timer fixes by Florian La Roche (much cleaned up net/inet/timer.c
-   and some bad race-conditions fixed).
-
- - Scsi code updates by Eric Youngdale and others
-
- - Sony CDU-31A CDROM driver by Corey Minyard added to the standard
-   kernel distribution.
-
- - The Mitsumi CDROM driver is now part of the standard kernel.  Driver
-   by Martin Harriss with patches by stud11@cc4.kuleuven.ac.be (yes, he
-   probably has a real name, but no, I haven't found it) and Jon Tombs.
-
- - various other minor patches (preliminary ldt support etc)
-
-NOTABLE changes since patchlevel 10 or earlier:
-
- - The memory manager has been cleaned up substantially, and mmap()
-   works for MAP_PRIVATE.  MAP_SHARED is still not supported for
-   anything else than /dev/mem, but even so it actually is usable for a
-   lot of applications.  The shared library routines have been rewritten
-   to use mmap() instead of the old hardcoded behaviour.
-
- - The kernel is now compiled with C++ instead of plain C.  Very few
-   actual C++ features are used, but even so C++ allows for more
-   type-checking and type-safe linkage.
-
- - The filesystem routines have been cleaned up for multiple block
-   sizes.  None of the filesystems use it yet, but people are working on
-   it.
-
- - named pipes and normal pipes should hopefully have the right select()
-   semantics in the presence/absence of writers.
-
- - QIC-02 tape driver by Hennus Bergman
-
- - selection patches in the default kernel
-
- - fixed a bug in the pty code which led to busy waiting in some
-   circumstances instead of sleeping.
-
- - Compressed SLIP support (Charles Hedrick). See net/inet/CONFIG
-
- - the 'clear_bit()' function was changed to return the previous setting
-   of the bit instead of the old "error-code".  This makes use of the
-   bit operations more logical.
-
- - udelay() function for short delays (busy-waiting) added.  Used
-   currently only by the QIC driver.
-
- - fork() and scheduler changes to make task switches happen only from
-   kernel mode to kernel mode.  Cleaner and more portable than the old
-   code which counted on being able to task-switch directly into user
-   mode.
-
- - debugging malloc code.
index 16bf28a..0ea5c7f 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -939,7+939,7 @@ D: Author, Emacs VC and GUD modes
 N: Bernhard Kaindl
 E: bartelt@computerhaus.at
 D: Author of a menu based configuration tool, kmenu, which 
-D: is the precedessor of 'make menuconfig' and 'make xconfig'.
+D: is the predecessor of 'make menuconfig' and 'make xconfig'.
 S: Tallak 95
 S: 8103 Rein
 S: Austria
index 41a315b..fc7e0ab 100644 (file)
@@ -5,7+5,7 @@ It's a brute force approach but it works pretty well.
 
 You need:
 
-        . A reproducable bug - it has to happen predictably (sorry)
+        . A reproducible bug - it has to happen predictably (sorry)
         . All the kernel tar files from a revision that worked to the
           revision that doesn't
 
diff --git a/Documentation/Changes b/Documentation/Changes
new file mode 100644 (file)
index 0000000..132b9bf
--- /dev/null
@@ -0,0 +1,300 @@
+
+LINUX_UPTODATE - "Keep your Linux system up to date".
+
+For comments, fixed, etc write to
+Alessandro Sigala <ssigala@globalnet.it>
+
+Last updated: 11 Apr 1996.
+
+This short document describe what you need and where to get
+most of the new stuff for your Linux box (intended for systems that have
+already upgraded to ELF binaries).
+
+The ftp site mainly used in this document is sunsite.unc.edu.
+
+The current releases of the linux software are:
+Linux Kernel 1.3.xx :-)
+Kernel modules 1.3.57
+PPP daemon 2.2.0e
+Binutils 2.6.0.12
+Dynamic linker (ld.so) 1.7.14
+Linux C Library 5.3.9
+Linux C++ Library 2.7.1.4
+Termcap 2.0.7
+GNU CC 2.7.2
+Procps 0.99a
+
+What do you really need to upgrade for using the latest 1.3.x kernel:
+- Modules 1.3.57 for using the kernel modules
+- Procps 0.99a          for using free, ps, pstree, top and friends
+- PPP 2.2.0e     for using pppd, pppstats, pppon, etc
+
+This document may also be useful to answer the questions like:
+
+* Q: 'free' displays some strange lines
+  A: upgrade the procps package
+
+* Q: 'pppd' displays "the PPP protocol is not available"
+  A: upgrade the PPP package
+
+... and so :)
+
+----------------------------------------------------------------------------
+
+** NOTES
+
+- Take a look at the documentation that come with every package
+  before doing anything!
+
+- All the installation operation must be done as root.
+
+- If you want to use the latest GCC release (2.7.2) you must upgrade
+  your C Library, the C++ Library, the dynamic linker and the binutils.
+
+- After installed any new library, run the program `ldconfig' to update
+  the dynamic linker cache (you may also need to modify the file
+  /etc/ld.so.conf).
+
+----------------------------------------------------------------------------
+
+* The dynamic linker.
+
+Get the file ld.so-1.7.14.tar.gz and unpack into a directory. You should
+have no problem installing this package, simply cd into the package
+directory and type `make install'.
+
+----------------------------------------------------------------------------
+
+* The Linux C Library.
+
+*** NOTE: read the release.libc-5.3.9 file before installing the
+          libraries!
+
+Get the libc-5.3.9.bin.tar.gz file and unpack into the root directory
+
+i.e. into the root directory type:
+
+  tar xvfz libc-5.3.9.bin.tar.gz
+
+you also need to make the symbolic links to the new library into the /lib
+directory
+
+i.e. into the /lib directory type:
+
+  rm -f libc.so.5
+  sln libc.so.5.3.9 libc.so.5
+  rm -f libm.so.5
+  sln libm.so.5.0.5 libm.so.5
+
+*** Note 1:
+
+<cutted from release.libc-5.3.9>
+
+The structure DIR, defined in sysdeps/linux/dirstream.h, was changed in
+release 5.2.0.  If you upgrade from release 5.1.4 or earlier to release
+5.2.0 or later, you must reboot after installing the new libraries.
+
+*** Note 2:
+
+You must patch and recompile your GNU 'make' utility!
+
+<cutted from release.libc-5.3.9>
+
+A dirent bug, which erroneously defined d->reclen to d->namlen if USE_GNU
+was defined, has been fixed.  Unfortunately, some GNU packages depend on
+this bug.  GNU make 3.xx is one of them.  A patch is included here.
+
+here the patch:
+RCS file: /home/cvs/gnu/make/dir.c,v
+retrieving revision 1.1.1.1
+diff -c -r1.1.1.1 dir.c
+*** 1.1.1.1    1995/06/25 03:27:16
+--- dir.c      1995/06/25 03:55:22
+***************
+*** 20,26 ****
+  
+  #if  defined (POSIX) || defined (HAVE_DIRENT_H) || defined (__GNU_LIBRARY__)
+  #include <dirent.h>
+! #ifndef      __GNU_LIBRARY__
+  #define D_NAMLEN(d) strlen((d)->d_name)
+  #else        /* GNU C library.  */
+  #define D_NAMLEN(d) ((d)->d_namlen)
+--- 20,26 ----
+  
+  #if  defined (POSIX) || defined (HAVE_DIRENT_H) || defined (__GNU_LIBRARY__)
+  #include <dirent.h>
+! #ifndef      __BAD_GNU_LIBRARY__
+  #define D_NAMLEN(d) strlen((d)->d_name)
+  #else        /* GNU C library.  */
+  #define D_NAMLEN(d) ((d)->d_namlen)
+===================================================================
+RCS file: /home/cvs/gnu/make/glob/glob.c,v
+retrieving revision 1.1.1.1
+diff -c -r1.1.1.1 glob.c
+*** 1.1.1.1    1995/06/25 03:27:18
+--- glob/glob.c        1995/06/25 03:56:01
+***************
+*** 64,70 ****
+  
+  #if  defined (POSIX) || defined (HAVE_DIRENT_H) || defined (__GNU_LIBRARY__)
+  #include <dirent.h>
+! #ifndef      __GNU_LIBRARY__
+  #define D_NAMLEN(d) strlen((d)->d_name)
+  #else        /* GNU C library.  */
+  #define D_NAMLEN(d) ((d)->d_namlen)
+--- 64,70 ----
+  
+  #if  defined (POSIX) || defined (HAVE_DIRENT_H) || defined (__GNU_LIBRARY__)
+  #include <dirent.h>
+! #ifndef      __BAD_GNU_LIBRARY__
+  #define D_NAMLEN(d) strlen((d)->d_name)
+  #else        /* GNU C library.  */
+  #define D_NAMLEN(d) ((d)->d_namlen)
+
+----------------------------------------------------------------------------
+
+* The Linux C++ Library.
+
+*** NOTE: read the release.libg++-2.7.1.4 file before installing the
+          libraries!
+
+Get the libg++-2.7.1.4.bin.tar.gz file and unpack into the root directory
+
+i.e. into the root directory type:
+
+  tar xvfz libg++-2.7.1.4.bin.tar.gz
+
+*** NOTE:
+
+You may have troubles with the binaries linked with the old 2.6 libraries
+(for example: umssync), dumping core or doing strange stuff.
+To resolve the problems you need to recompile the sources of the binaries.
+
+----------------------------------------------------------------------------
+
+* The binutils.
+
+*** NOTE: read the release.binutils-2.6.0.12 file before installing the
+          libraries!
+
+Get the binutils-2.6.0.12.bin.tar.gz file and unpack it into the root
+directory
+
+i.e. into the root directory type:
+
+  tar xvfz binutils-2.6.0.12.bin.tar.gz
+
+*** NOTE:
+
+<cutted from release.binutils-2.6.0.12>
+
+If you don't need the cross assemblers/linkers for m68k-linux,
+m68k-linuxaout, sparc-sun-solaris2, sparc-sun-sunos4.1 nor alpha-linux,
+please do
+
+1. su root
+2. cd /usr
+3. rm -rf m68k-linux m68k-linuxaout sparc-sun-solaris2 sparc-sun-sunos4.1 alpha-linux
+
+----------------------------------------------------------------------------
+
+* The GNU CC compiler.
+
+** NOTE: read the release.gcc-2.7.2 file before installing the package!
+
+Get the gcc-2.7.2.bin.tar.gz file and unpack it into the root
+directory
+
+i.e. into the root directory type:
+
+  tar xvfz gcc-2.7.2.bin.tar.gz
+
+You may want to remove the old compiler. Simply cd into the
+/usr/lib/gcc-lib/i486-linux and remove the old compiler directory tree.
+
+----------------------------------------------------------------------------
+
+* The termcap library.
+
+*** NOTE: read first the documentation that come with the package!
+
+Get the file termcap-2.0.7.tar.gz and unpack into a directory. You should
+have no problem installing this package, simply cd into the package
+directory and type `make' then `make install'.
+
+*** NOTE:
+
+<cutted from the README of the package>
+
+The linux entry in the new termcap is larger than 1024 chars.
+But your application may only have a 1024 byte buffer. You may see
+
+tgetent: warning: termcap entry too long
+
+message when you run it in the Linux console. You can pass NULL to
+tgetent () to let termcap malloc the buffer. elm and zsh are two
+applications I know which use termcap and have this problem.
+
+----------------------------------------------------------------------------
+
+* The kernel modudes utilities.
+
+*** NOTE: read first the documentation that come with the package!
+
+Get the file modules-1.3.57.tar.gz and unpack into a directory. You should
+have no problem installing this package, simply cd into the package
+directory and type `make' then `make install'.
+
+----------------------------------------------------------------------------
+
+* The PPP daemon utilities.
+
+*** NOTE: read first the documentation that come with the package!
+
+Get the file ppp-2.2.0e.tar.gz and unpack into a directory. You should
+have no problem installing this package, simply cd into the package
+directory and type `make' then `make install'.
+
+----------------------------------------------------------------------------
+
+* The procps utilities.
+
+*** NOTE: read first the documentation that come with the package!
+
+Get the file procps-0.99a.tar.gz and unpack into a directory. You should
+have no problem installing this package, simply cd into the package
+directory and type `make' then `make install'.
+
+----------------------------------------------------------------------------
+
+This is where you can find all that is described in this document.
+
+### sunsite.unc.edu:/pub/Linux/GCC
+
+binutils-2.6.0.12.bin.tar.gz           Binutils 2.6.0.12 (as,ld etc)
+gcc-2.7.2.bin.tar.gz                   GNU CC 2.7.2 (ELF and a.out)
+ld.so-1.7.14.tar.gz                    The dynamic linker
+libc-5.3.9.bin.tar.gz                  The C library
+libg++-2.7.1.4.bin.tar.gz              The C++ library
+termcap-2.0.7.tar.gz                   Termcap 2.0.7
+release.binutils-2.6.0.12
+release.gcc-2.7.2
+release.libc-5.3.9                     info (contains the patch for 'make')
+release.libg++-2.7.1.4
+
+### sunsite.unc.edu:/pub/Linux/kernel
+
+modules-1.3.57.tar.gz                  Utils the kernel modules
+
+### sunsite.unc.edu:/pub/Linux/system/Network/serial
+
+ppp-2.2.0e.tar.gz                      The pppd daemon and utils for PPP
+
+### sunsite.unc.edu:/pub/Linux/system/Status/ps
+
+procps-0.99a.tgz                       ps, pstree, free, etc
+
+----------------------------------------------------------------------------
+
+For comments, fixed, etc write to
+Alessandro Sigala <ssigala@globalnet.it>
index d7abd8f..53e84aa 100644 (file)
@@ -314,7+314,7 @@ CONFIG_MIPS_MAGNUM_4000
   have access to a machine on the Internet that has one of the
   programs lynx, netscape or Mosaic).
 
-Support for Olivetty M700
+Support for Olivetti M700
 CONFIG_OLIVETTI_M700
   This is a machine with a R4000 100 MHz CPU. To compile a Linux
   kernel that runs on these, say Y here. For details about Linux
@@ -504,7+504,7 @@ CONFIG_PCI
 PCI bridge optimization (experimental)
 CONFIG_PCI_OPTIMIZE
   This can improve access times for some hardware devices under
-  certain BIOSes if your computer uses a PCI bussystem. This is
+  certain BIOSes if your computer uses a PCI bus system. This is
   recommended; say Y.
 
 Intel 430FX (Triton) chipset DMA support
@@ -1865,7+1865,7 @@ CONFIG_VORTEX
 Other ISA cards
 CONFIG_NET_ISA
   If your network (ethernet) card hasn't been mentioned yet and its
-  bussystem (that's the way the components of the card talk to each
+  bus system (that's the way the components of the card talk to each
   other) is ISA (as opposed to EISA, VLB or PCI), say Y. Make sure you
   know the name of your card. Read the Ethernet-HOWTO, available via
   ftp (user: anonymous) in sunsite.unc.edu:/pub/Linux/docs/HOWTO. If
@@ -3131,7+3131,7 @@ CONFIG_ISDN_DRV_TELES
 # LocalWords:  unc edu docs emu README kB BLK DEV FD Thinkpad fd MFM RLL IDE gz
 # LocalWords:  cdrom harddisk diskless netboot nfs xzvf ATAPI MB harddrives ide
 # LocalWords:  HD harddisks CDROMs IDECD NEC MITSUMI filesystem XT XD PCI bios
-# LocalWords:  ISA EISA Microchannel VESA BIOSes bussystem IPC SYSVIPC ipc Ctrl
+# LocalWords:  ISA EISA Microchannel VESA BIOSes IPC SYSVIPC ipc Ctrl
 # LocalWords:  BINFMT Linkable http ac uk jo html GCC Sparc AVANTI CABRIOLET EB
 # LocalWords:  netscape gcc LD CC toplevel MODVERSIONS insmod rmmod modprobe IP
 # LocalWords:  genksyms INET loopback gatewaying ethernet internet PPP ARP Arp
@@ -3173,7+3173,7 @@ CONFIG_ISDN_DRV_TELES
 # LocalWords:  bsd comp Sparcstation le SunOS ie Gracilis PackeTwin PT pt LU FX
 # LocalWords:  FX TEAC SoundBlaster CR CreativeLabs LCS mS ramdisk IDETAPE cmd
 # LocalWords:  Vertos Genoa Funai hsfs NCP NetWare tgz APM apm ioctls UltraLite
-# LocalWords:  TravelMate CDT LCD backlight VC RPC Mips Olivetty DECStation AXP
+# LocalWords:  TravelMate CDT LCD backlight VC RPC Mips DECStation AXP
 # LocalWords:  PMAX MILO Alphas Multia Tseng linuxelf endian mipsel mips drv HT
 # LocalWords:  KERNELD kerneld callouts AdvanSys advansys diskquotas Admin WDT
 # LocalWords:  wdt hdb hdc bugfix SiS vlb Acculogic CSA DTC dtc Holtek ht QDI
index 28fb089..783b3ff 100644 (file)
@@ -11,7+11,7 @@ o     Fix sys_idle to exit/enter kernel state and do hlt's.
 o      Fix scheduler decisions to reschedule. Per cpu reschedule ?
 o      Clean up message pass.
 o      Test for B stepping processors.
-o      Clean up processor specific/independant split.
+o      Clean up processor specific/independent split.
 o      Document it all.        [PARTLY DONE]
 o      Halt other CPU's on reset/panic doesn't always work.
 o      Dont waste page at 4K - dont need it now.(watch the GDT code).
index 31764cb..4078884 100644 (file)
@@ -58,7+58,7 @@ butions), which must be a valid block device with major number 29 and reside
 in directory /dev. To mount a CD-ROM, your kernel needs to have the ISO9660-
 filesystem support included.
 
-PLEASE NOTE: aztcd.c has been developped in parallel to the linux kernel,
+PLEASE NOTE: aztcd.c has been developed in parallel to the linux kernel,
 which had and is having many major and minor changes which are not backward
 compatible. Quite definitely aztcd.c version 1.80 and newer will NOT work
 in kernels older than 1.3.33. So please always use the most recent version
@@ -110,7+110,7 @@ filesystem, you have to recompile your kernel:
   Users of other drives should read chapter OTHER DRIVES of this file.
   You also can configure that address by kernel boot parameter aztcd=... 
 - There are some other points, which may be configured, e.g. auto-eject the
-  CD when umounting a drive, tray locking etc., see aztcd.h for details.
+  CD when unmounting a drive, tray locking etc., see aztcd.h for details.
 - Build a new kernel, configure it for 'Aztech/Orchid/Okano/Wearnes support' 
   (if you want aztcd to be part of the kernel). Do not configure it for
   'Aztech... support', if you want to use aztcd as a run time loadable module. 
@@ -176,7+176,7 @@ soundcard and CDROM, then warm boot (or use loadlin) their PC to start
 Linux.
 Support for the CDROM-interface of SoundWave32-soundcards is directly
 implemented in the AZTECH driver. Please edit /usr/src/linux/include/aztdc.h,
-uncomment line '#define AZT_SW32' and set the appropiate value for
+uncomment line '#define AZT_SW32' and set the appropriate value for
 AZT_BASE_ADDR and AZT_SW32_BASE_ADDR. This support was tested with an Orchid
 CDS-3110 connected to a SoundWave32.
 If you want your soundcard to be supported, find out, how it needs to be
index 9c14503..6fa1d4b 100644 (file)
@@ -120,7+120,7 @@ default boot name while booting):
        cdu31a=<base address>,<interrupt>[,PAS]
 
 The base address needs to have "0x" in front of it, since it is in
-hex.  For instanc, to configure a drive at address 320 on interrupt 5,
+hex.  For instance, to configure a drive at address 320 on interrupt 5,
 use the following:
 
        cdu31a=0x320,5
index 9c4f928..f9717df 100644 (file)
@@ -12,11+12,11 @@ Features as of version 0.33
 
 Features as of version 0.28
 ---------------------------
-- Full speed stransfer rate (300 kB/s).
+- Full speed transfer rate (300 kB/s).
 - Minimum kernel memory usage for buffering (less than 3 kB).
 - Multisession support.
 - Tray locking.
-- Statistcics of driver accessible to the user.
+- Statistics of driver accessible to the user.
 - Module support.
 - Auto-probing of adapter card's base port and irq line,
   also configurable at boot time or module load time.
index 96164e2..2f43a42 100644 (file)
@@ -9,7+9,7 @@ The detection and configuration of this interface used to be included
 in both the sjcd and optcd cdrom driver. Drives supported by these
 drivers came packed with Media Magic's multi media kit, which also
 included the ISP16 card. The idea (thanks Leo Spiekman)
-to move it from thes drivers into a separate module and moreover, not to
+to move it from these drivers into a separate module and moreover, not to
 rely on the MAD16 sound driver, are as follows:
 -duplication of code in the kernel is a waste of resources and should
  be avoided;
@@ -24,7+24,7 @@ The ISP16, MAD16 and Mozart sound cards have an OPTi 82C928 or an
 OPTi 82C929 chip.  The interface on these cards should work with
 any cdrom attached to the card, which is 'electrically' compatible
 with Sanyo/Panasonic, Sony or Mitsumi non-ide drives. However, the
-command sets for any propriatary drives may differ
+command sets for any proprietary drives may differ
 (and hence may not be supported in the kernel) from these four types.
 For a fact I know the interface works and the way of configuration
 as described in this documentation works in combination with the
@@ -46,7+46,7 @@ Booting the kernel through the boot manager LILO allows the use
 of some command line options on the 'LILO boot:' prompt. At boot time
 press Alt or Shift while the LILO prompt is written on the screen and enter
 any kernel options. Alternatively these options may be used in
-the apropriate section in /etc/lilo.conf. Adding 'append="<cmd_line_options>"'
+the appropriate section in /etc/lilo.conf. Adding 'append="<cmd_line_options>"'
 will do the trick as well.
 The syntax of 'cmd_line_options' is
 
@@ -68,7+68,7 @@ The values 0 for irq and dma indicate that they are not used, and
 the drive will be used in 'polling' mode. The values 5 and 7 for irq
 should be avoided in order to avoid any conflicts with optional
 sound card configuration.
-The syntax of the command line does not allow the specifiaction of
+The syntax of the command line does not allow the specification of
 irq when there's nothing specified for the base address and no
 specification of dma when there is no specification of irq.
 The value 'nosip16' for drive_type, which may be used as the first
index 842084d..5357b9c 100644 (file)
@@ -10,13+10,13 @@ This is the README for the sjcd cdrom driver, version 1.6.
 
 This file is meant as a tips & tricks edge for the usage of the SANYO CDR-H94A
 cdrom drive. It will grow as the questions arise. ;-)
-For info on configuring the ISP16 sound card look at Documetation/cdrom/isp16.
+For info on configuring the ISP16 sound card look at Documentation/cdrom/isp16.
 
-The driver should work with any of the Panasonic, Sony or Mitsum style
+The driver should work with any of the Panasonic, Sony or Mitsumi style
 CDROM interface.
 The cdrom interface on Media Magic's soft configurable sound card ISP16,
 which used to be included in the driver, is now supported in a separate module.
-This initilisation module will probably also work with other interfaces
+This initialisation module will probably also work with other interfaces
 based on an OPTi 82C928 or 82C929 chip (like MAD16 and Mozart): see the
 documentation Documentation/cdrom/isp16.
 
@@ -31,7+31,7 @@ The default configuration parameters are:
   base address 0x340
   no irq
   no dma
-(Acctulay the CDR-H94A doesn't know how to use irq and dma.)
+(Actually the CDR-H94A doesn't know how to use irq and dma.)
 As of version 1.2, setting base address at boot time is supported
 through the use of command line options: type at the "boot:" prompt:
   linux sjcd=<base_address>
@@ -41,7+41,7 @@ in the appropriate section of /etc/lilo.conf
 If you're building a kernel yourself you can set your default base
 i/o address with SJCD_BASE_ADDR in include/linux/sjcd.h.
 
-The sjcd driver supports beng loaded as a module. The following
+The sjcd driver supports being loaded as a module. The following
 command will set the base i/o address on the fly (assuming you
 have installed the module in an appropriate place).
   insmod sjcd.o sjcd_base=<base_address>
index 1649024..705ab44 100644 (file)
@@ -42,7+42,7 @@ foo \kill}%
 %
 \title{{\bf Linux Allocated Devices}}
 \author{Maintained by H. Peter Anvin $<$hpa@zytor.com$>$}
-\date{Last revised: April 1, 1996}
+\date{Last revised: April 10, 1996}
 \maketitle
 %
 \noindent
@@ -149,7+149,9 @@ an unreasonable effort.
 \major{37}{}{char }{IDE tape}
 \major{  }{}{block}{Zorro II ramdisk}
 \major{38}{}{char }{Myricom PCI Myrinet board}
+\major{  }{}{block}{Reserved for Linux/AP+}
 \major{39}{}{char }{ML-16P experimental I/O board}
+\major{  }{}{block}{Reserved for Linux/AP+}
 \major{40}{}{char }{Matrox Meteor frame grabber}
 \major{41}{}{char }{Yet Another Micro Monitor}
 \major{42}{}{}{Demo/sample use}
@@ -158,13+160,11 @@ an unreasonable effort.
 \major{45}{}{char }{isdn4linux ISDN BRI driver}
 \major{46}{}{char }{Comtrol Rocketport serial card}
 \major{47}{}{char }{Comtrol Rocketport serial card -- alternate devices}
-\major{48}{}{char }{Matter replicator}
-\major{49}{--59}{}{Unallocated}
+\major{48}{--59}{}{Unallocated}
 \major{60}{--63}{}{Local/experimental use}
 \major{64}{--119}{}{Unallocated}
 \major{120}{--127}{}{Local/experimental use}
-\major{128}{--223}{}{Unallocated}
-\major{224}{--239}{}{SEE NOTE}
+\major{128}{--239}{}{Unallocated}
 \major{240}{--254}{}{Local/experimental use}
 \major{255}{}{}{Reserved}
 \end{devicelist}
@@ -193,10+193,12 @@ an unreasonable effort.
        \minor{0}{/dev/ram0}{First RAM disk}
        \minordots
        \minor{7}{/dev/ram7}{Eighth RAM disk}
+       \minor{250}{/dev/initrd}{Initial RAM disk}
 \end{devicelist}
 
 \noindent
-Earlier kernels had /dev/ramdisk (1, 1) here.
+Earlier kernels had {\file /dev/ramdisk} (1, 1) here.  {\file /dev/initrd}
+refers to a RAM disk which was preloaded by the boot loader.
 
 \begin{devicelist}
 \major{2}{}{char}{Pseudo-TTY masters}
@@ -406,19+408,21 @@ physical disks.
        \minor{4}{/dev/amigamouse}{Amiga mouse (68k/Amiga)}
        \minor{5}{/dev/atarimouse}{Atari mouse}
        \minor{6}{/dev/sunmouse}{Sun mouse}
+       \minor{7}{/dev/amigamouse1}{Second Amiga mouse}
        \minor{128}{/dev/beep}{Fancy beep device}
        \minor{129}{/dev/modreq}{Kernel module load request}
        \minor{130}{/dev/watchdog}{Watchdog timer port}
        \minor{131}{/dev/temperature}{Machine internal temperature}
        \minor{132}{/dev/hwtrap}{Hardware fault trap}
        \minor{133}{/dev/exttrp}{External device trap}
-       \minor{134}{/dev/apm_bios}{Advanced Power Management BIOS}
+       \minor{134}{/dev/apm\_bios}{Advanced Power Management BIOS}
+       \minor{135}{/dev/rtc}{Real Time Clock}
 \end{devicelist}
 
 \noindent
 The loopback devices are used to mount filesystems not associated with
 block devices.  The binding to the loopback devices is usually handled
-by mount(8).
+by {\bf mount}(8).
 
 \begin{devicelist}
 \major{11}{}{char }{Raw keyboard device}
@@ -509,8+513,12 @@ number 3).
 
 \begin{devicelist}
 \major{15}{}{char }{Joystick}
-       \minor{0}{/dev/js0}{First joystick}
-       \minor{1}{/dev/js1}{Second joystick}
+       \minor{0}{/dev/js0}{First analog joystick}
+       \minor{1}{/dev/js1}{Second analog joystick}
+       \minordots
+       \minor{128}{/dev/djs0}{First digital joystick}
+       \minor{129}{/dev/djs1}{Second digital joystick}
+       \minordots
 \\
 \major{  }{}{block}{Sony CDU-31A/CDU-33A CD-ROM}
        \minor{0}{/dev/sonycd}{Sony CDU-31A CD-ROM}
@@ -900,6+908,10 @@ packet I/O''.  The board is also accessible as a regular {\file eth}
 networking device.
 
 \begin{devicelist}
+\major{  }{}{block}{Reserved for Linux/AP+}
+\end{devicelist}
+
+\begin{devicelist}
 \major{39}{}{char }{ML-16P experimental I/O board}
        \minor{0}{/dev/ml16pa-a0}{First card, first analog channel}
        \minor{1}{/dev/ml16pa-a1}{First card, second analog channel}
@@ -918,6+930,8 @@ networking device.
        \minor{50}{/dev/ml16pb-c1}{Second card, second counter/timer}
        \minor{51}{/dev/ml16pb-c2}{Second card, third counter/timer}
        \minordots
+\\
+\major{  }{}{block}{Reserved for Linux/AP+}
 \end{devicelist}
 
 \begin{devicelist}
@@ -935,7+949,7 @@ networking device.
 \end{devicelist}
 
 \noindent
-This number is indended for use in sample code, as well as a general
+This number is intended for use in sample code, as well as a general
 ``example'' device number.  It should never be used for a device
 driver that is being distributed; either obtain an official number or
 use the local/experimental range.  The sudden addition or removal of a
@@ -982,15+996,7 @@ driver with this number should not cause ill effects to the system
 \end{devicelist}
 
 \begin{devicelist}
-\major{48}{}{char }{Matter replicator}
-       \minor{0}{/dev/replicator}{Matter replicator}
-\end{devicelist}
-
-\noindent
-See RFC 1437 for the data format accepted by this device.
-
-\begin{devicelist}
-\major{49}{--59}{}{Unallocated}
+\major{48}{--59}{}{Unallocated}
 \end{devicelist}
 
 \begin{devicelist}
@@ -1010,17+1016,9 @@ used, in order to avoid conflict with future assignments.
 \end{devicelist}
 
 \begin{devicelist}
-\major{128}{--223}{}{Unallocated}
-\end{devicelist}
-
-\begin{devicelist}
-\major{224}{--239}{}{SEE NOTE}
+\major{128}{--239}{}{Unallocated}
 \end{devicelist}
 
-\noindent
-This range is no longer a local/experimental range, since the feedback
-I received was all in favour of realignment.
-
 \begin{devicelist}
 \major{240}{--254}{}{Local/experimental use}
 \end{devicelist}
@@ -1060,7+1058,7 @@ It is recommended that these links exist on all systems:
 
 \begin{nodelist}
 \link{/dev/core}{/proc/kcore}{symbolic}{Backward compatibility}
-\link{/dev/ramdisk}{ram1}{symbolic}{Backward compatibility}
+\link{/dev/ramdisk}{ram0}{symbolic}{Backward compatibility}
 \link{/dev/scd?}{sr?}{hard}{Alternate name for CD-ROMs}
 %\link{/dev/fd?H*}{fd?D*}{hard}{Compatible floppy formats}
 %\link{/dev/fd?E*}{fd?D*}{hard}{Compatible floppy formats}
index 6d45ac6..c502836 100644 (file)
 
             Maintained by H. Peter Anvin <hpa@zytor.com>
 
-                    Last revised: April 1, 1996
+                    Last revised: April 10, 1996
 
 This list is the successor to Rick Miller's Linux Device List, which
 he stopped maintaining when he got busy with other things in 1993.  It
 is a registry of allocated major device numbers, as well as the
 recommended /dev directory nodes for these devices.
 
-The lastest version of this list is included with the Linux kernel
+The latest version of this list is included with the Linux kernel
 sources in LaTeX and ASCII form.  In case of discrepancy, the LaTeX
 version is authoritative.
 
@@ -48,14+48,17 @@ an unreasonable effort.
                  0 = /dev/ram0         First RAM disk
                    ...
                  7 = /dev/ram7         Eighth RAM disk
+               250 = /dev/initrd       Initial RAM disk
 
                Older kernels had /dev/ramdisk (1, 1) here.
+               /dev/initrd refers to a RAM disk which was preloaded
+               by the boot loader.
                    
   2 char       Pseudo-TTY masters
                  0 = /dev/ptyp0        First PTY master
                  1 = /dev/ptyp1        Second PTY master
                    ...
-               256 = /dev/ptyef        256th PTY master
+               255 = /dev/ptyef        256th PTY master
 
                Pseudo-tty's are named as follows:
                * Masters are "pty", slaves are "tty";
@@ -109,7+112,7 @@ an unreasonable effort.
                (2) Autodetectable format in a Double Density (720K) drive only
                (3) Autodetectable format in a High Density (1440K) drive only
 
-               NOTE: THe letter in the device name (d, q, h or u)
+               NOTE: The letter in the device name (d, q, h or u)
                signifies the type of drive: 5.25" Double Density (d),
                5.25" Quad Density (q), 5.25" High Density (h) or 3.5"
                (any model, u).  The use of the capital letters D, H
@@ -231,6+234,7 @@ an unreasonable effort.
                  4 = /dev/amigamouse   Amiga mouse (68k/Amiga)
                  5 = /dev/atarimouse   Atari mouse
                  6 = /dev/sunmouse     Sun mouse
+                 7 = /dev/amigamouse1  Second Amiga mouse
                128 = /dev/beep         Fancy beep device
                129 = /dev/modreq       Kernel module load request
                130 = /dev/watchdog     Watchdog timer port
@@ -238,6+242,7 @@ an unreasonable effort.
                132 = /dev/hwtrap       Hardware fault trap
                133 = /dev/exttrp       External device trap
                134 = /dev/apm_bios     Advanced Power Management BIOS
+               135 = /dev/rtc          Real Time Clock
 
  11 char       Raw keyboard device
                  0 = /dev/kbd          Raw keyboard device
@@ -308,8+313,12 @@ an unreasonable effort.
                (see major number 3).
 
  15 char       Joystick
-                 0 = /dev/js0          First joystick
-                 1 = /dev/js1          Second joystick
+                 0 = /dev/js0          First analog joystick
+                 1 = /dev/js1          Second analog joystick
+                   ...
+               128 = /dev/djs0         First digital joystick
+               129 = /dev/djs1         Second digital joystick
+                   ...
     block      Sony CDU-31A/CDU-33A CD-ROM
                  0 = /dev/sonycd       Sony CDU-31a CD-ROM
 
@@ -468,7+477,7 @@ an unreasonable effort.
                      ...
                 63 = /dev/fb1user7
 
-               The universal frame buffer device is currenly only
+               The universal frame buffer device is currently only
                supported on Linux/68k and Linux/SPARC.  The plain
                device accesses the frame buffer at current resolution
                (Linux/68k calls this device "current",
@@ -627,16+636,18 @@ an unreasonable effort.
                 50 = /dev/ml16pb-c1    Second card, second counter/timer
                 51 = /dev/ml16pb-c2    Second card, third counter/timer
                      ...
+    block      Reserved for Linux/AP+
 
- 40            Matrox Meteor frame grabber
+ 40 char       Matrox Meteor frame grabber
                  0 = /dev/mmetfgrab    Matrox Meteor frame grabber
+    block      Reserved for Linux/AP+
 
- 41            Yet Another Micro Monitor
+ 41 char       Yet Another Micro Monitor
                  0 = /dev/yamm         Yet Another Micro Monitor
 
  42            Demo/sample use
 
-               This number is indended for use in sample code, as
+               This number is intended for use in sample code, as
                well as a general "example" device number.  It
                should never be used for a device driver that is being
                distributed; either obtain an official number or use
@@ -673,12+684,7 @@ an unreasonable effort.
                  1 = /dev/cur1         Callout device corresponding to ttyR1
                      ...
 
- 48 char       Matter replicator
-                 0 = /dev/replicator   Matter replicator
-
-               See RFC 1437 for the data format accepted by this device.
-
- 49-59         UNALLOCATED
+ 48-59         UNALLOCATED
 
  60-63         LOCAL/EXPERIMENTAL USE
                Allocated for local/experimental use.  For devices not
@@ -689,12+695,7 @@ an unreasonable effort.
 
 120-127                LOCAL/EXPERIMENTAL USE
 
-128-223                UNALLOCATED
-
-224-239                SEE NOTE
-               This range is no longer allocated to
-               local/experimental use, since the feedback I received
-               was all in favour of realignment.
+128-239                UNALLOCATED
 
 240-254                LOCAL/EXPERIMENTAL USE
 
@@ -730,7+731,7 @@ Note: the last device is letter X-digit 0-letter R.
 It is recommended that these links exist on all systems:
 
 /dev/core      /proc/kcore     symbolic        Backward compatibility
-/dev/ramdisk   ram1            symbolic        Backward compatibility
+/dev/ramdisk   ram0            symbolic        Backward compatibility
 /dev/scd?      sr?             hard            Alternate SCSI CD-ROM name
 
 
@@ -752,7+753,7 @@ exist, they should have the following uses.
 
 /dev/modem should not be used for a modem which supports dialin as
 well as dialout, as it tends to cause lock file problems.  If it
-exists, /dev/modem shold point to the appropriate dialout (alternate)
+exists, /dev/modem should point to the appropriate dialout (alternate)
 device.
 
 For SCSI devices, /dev/tape and /dev/cdrom should point to the
index b1d2348..7fd2cba 100644 (file)
@@ -14,7+14,7 @@ The preconfigured I/O address is 0200h and the default memory address
 
 Use them and you will not have to worry about configuring anything.
 
-You can configure the driver via lilo. HAve  look at the end of this
+You can configure the driver via lilo. Have a look at the end of this
 message. The default settings vanish as soon as you give a digi= commandline.
 You can give multiple digi= commandline parameters to define multiple
 boards.
@@ -87,7+87,7 @@ Christoph Lameter (clameter@fuller.edu) 6. April 1996.
 Changes v1.5.5:
 
 The ability to use the kernel's command line to pass in the configuration for 
-boards.  Using LILO's APPEND command, a string of comma seperated identifiers 
+boards.  Using LILO's APPEND command, a string of comma separated identifiers 
 or integers can be used.  The 6 values in order are:
 
    Enable/Disable this card,
index 2bdd349..ffef2d8 100644 (file)
@@ -4,7+4,7 @@ to each other. smbfs was inspired by samba, the program written by
 Andrew Tridgell that turns any unix host into a file server for DOS or
 Windows clients.  See ftp://nimbus.anu.edu.au/pub/tridge/samba/ for
 this interesting program suite and lots of more information on SMB and
-NetBIOS over TCP/IP. There you also find explanation for conceps like
+NetBIOS over TCP/IP. There you also find explanation for concepts like
 netbios name or share.
 
 To use smbfs, you need a special mount program, which can be found in
index b9e4725..6f03cc7 100644 (file)
@@ -72,7+72,7 @@ get the test suite that comes with the vfat distribution at
 This tests quite a few parts of the vfat filesystem and additional
 tests for new features or untested features would be appreciated.
 
-NOTES ON THE STRUCTURE OF THE VFAT FILESYTEM
+NOTES ON THE STRUCTURE OF THE VFAT FILESYSTEM
 ----------------------------------------------------------------------
 (This documentation was provided by Galen C. Hunt <gchunt@cs.rochester.edu>
  and lightly annotated by Gordon Chaffee).
@@ -196,7+196,7 @@ Finally, note that the extended name is stored in Unicode.  Each Unicode
 character takes two bytes.
 
 
-NOTES ON UNICODE TRANSLATION IN VFAT FILESYTEM
+NOTES ON UNICODE TRANSLATION IN VFAT FILESYSTEM
 ----------------------------------------------------------------------
 (Information provided by Steve Searle <steve@mgu.bath.ac.uk>)
 
index 710d41b..220fcb1 100644 (file)
@@ -259,7+259,7 @@ auto-detection).
 Last not least, CDrom distributors may use it for better installation from CD,
 either using a LILO boot floppy and bootstrapping a bigger ramdisk via
 initrd from CD, or using LOADLIN to directly load the ramdisk from CD
-without need of floppys.
+without need of floppies.
 
 Since initrd is a fairly generic mechanism, it is likely that additional
 uses will be found.
@@ -282,5+282,5 @@ A preliminary version of LILO 18 is available on
 ftp://lrcftp.epfl.ch/pub/people/almesber/lilo/lilo.18dev3.tar.gz
 
 A very simple example for building an image for initrd, also including
-the programm 'freeramdisk', can be found on
+the program 'freeramdisk', can be found on
 ftp://elserv.ffm.fgan.de/pub/linux/loadlin-1.6/initrd-example.tgz
index 44e9b6c..7e67956 100644 (file)
@@ -1,5+1,5 @@
 
-Description of the Interface between Linklevel an Harwarelevel
+Description of the Interface between Linklevel and Hardwarelevel
   of isdn4linux:
 
 
@@ -10,7+10,7 @@ Description of the Interface between Linklevel an Harwarelevel
   register_isdn() with a pointer to that struct. Prior to that, it has
   to preset some of the fields of isdn_if. The LL sets the rest of
   the fields. All further communication is done via callbacks using
-  the funtion-pointers defined in isdn_if.
+  the function-pointers defined in isdn_if.
 
   ATTENTION, CHANGES since version 0.6 are marked with   "***CHANGE0.6"!
   ATTENTION, CHANGES since version 0.7 are marked with   "***CHANGE0.7"!
@@ -114,7+114,7 @@ Description of the Interface between Linklevel an Harwarelevel
 
   int (*writebuf)(int, int, u_char*, int, int);
 
-    This field has to be preset by the HL-driver. The given funtion will
+    This field has to be preset by the HL-driver. The given function will
     be called by the LL for delivering data to be send via B-Channel.
 
     Parameter:
@@ -150,7+150,7 @@ Description of the Interface between Linklevel an Harwarelevel
       oversized packets etc.)
 
 NOTE on writebuf and writebuf_skb:
-    The HL-driver may initialize one of the field's to NULL, in which case
+    The HL-driver may initialize one of the fields to NULL, in which case
     the LL will call the non-NULL function only.
 
   int (*writecmd)(u_char*, int, int);
@@ -160,7+160,7 @@ NOTE on writebuf and writebuf_skb:
     to the card) The data-format is hardware-specific. This function is
     intended for debugging only. It is not necessary for normal operation
     and never will be called by the tty-emulation- or network-code. If
-    this functin is not supported, the driver has to set NULL here.
+    this function is not supported, the driver has to set NULL here.
 
     Parameter:
       u_char* pointer to data.
@@ -176,11+176,11 @@ NOTE on writebuf and writebuf_skb:
   int (*readstat)(u_char*, int, int);
 
     This field has to be preset by the HL-driver. The given function will be
-    called to perform read-requests on /dev/isdnctrl (i.e. reading repies
+    called to perform read-requests on /dev/isdnctrl (i.e. reading replies
     from the card) The data-format is hardware-specific. This function is
     intended for debugging only. It is not necessary for normal operation
     and never will be called by the tty-emulation- or network-code. If
-    this functin is not supported, the driver has to set NULL here.
+    this function is not supported, the driver has to set NULL here.
 
     Parameter:
       u_char* pointer to data.
@@ -201,16+201,16 @@ NOTE on writebuf and writebuf_skb:
    status-info of /dev/isdninfo. Furthermore it is used as Id for binding
    net-interfaces to a specific channel. If a string of length zero is
    given, upon return, isdn4linux will replace it by a generic name. (line0,
-   line1 etc.) It is recommended, to make this string configurabele during
+   line1 etc.) It is recommended to make this string configurable during
    module-load-time. (copy a global variable to this string.) For doing that,
    modules 1.2.8 or newer are necessary.
 
 2. Description of the commands, a HL-driver has to support:
 
-   All commands will be performed by calling the funtion command() described
+   All commands will be performed by calling the function command() described
    above from within the LL. The field command of the struct-parameter will
    contain the desired command, the field driver always is set to the
-   apropriate driver-Id.
+   appropriate driver-Id.
 
    Until now, the following commands are defined:
 
@@ -218,10+218,10 @@ NOTE on writebuf and writebuf_skb:
    ISDN_CMD_IOCTL:
 
      This command is intended for performing ioctl-calls for configuring
-     hardware or similar purposes (setting port-adresses, loading firmware
+     hardware or similar purposes (setting port-addresses, loading firmware
      etc.) For this purpose, in the LL all ioctl-calls with an argument
      >= ISDN_IOCTL_DRVIOCTL (0x100) will be handed transparently to this
-     function after substracting 0x100 and placing the result in arg.
+     function after subtracting 0x100 and placing the result in arg.
      Example:
        If a userlevel-program calls ioctl(0x101,...) the function gets
        called with the field command set to 1.
@@ -313,7+313,7 @@ NOTE on writebuf and writebuf_skb:
       num         = ASCII-String, containing the desired EAZ's/MSN's
                     (comma-separated). If an empty String is given, the
                     HL-driver should respond to ALL incoming calls,
-                    regardless of the destination-adress.
+                    regardless of the destination-address.
       ***CHANGE0.6: New since this version the "empty-string"-feature.
 
   ISDN_CMD_GETEAZ: (currently unused)
@@ -433,7+433,7 @@ NOTE on writebuf and writebuf_skb:
 
   All status-changes are signaled via calling the previously described
   function statcallb(). The field command of the struct isdn_cmd has
-  to be set by the HL-driver with the apropriate Status-Id (event-number).
+  to be set by the HL-driver with the appropriate Status-Id (event-number).
   The field arg has to be set to the channel-number (locally to the driver,
   starting with 0) to which this event applies. (Exception: STAVAIL-event)
 
@@ -487,7+487,7 @@ NOTE on writebuf and writebuf_skb:
 
   ISDN_STAT_DCONN:
 
-   With this call, the HL-driver signals the successful establishement of
+   With this call, the HL-driver signals the successful establishment of
    a D-Channel-connection. (Response to ISDN_CMD_ACCEPTD or ISDN_CMD_DIAL)
 
     Parameter:
@@ -498,9+498,9 @@ NOTE on writebuf and writebuf_skb:
 
   ISDN_STAT_BCONN:
 
-   With this call, the HL-driver signals the successful establishement of
+   With this call, the HL-driver signals the successful establishment of
    a B-Channel-connection. (Response to ISDN_CMD_ACCEPTB or because the
-   remote-station has initiated establishement)
+   remote-station has initiated establishment)
 
     Parameter:
       driver      = driver-Id
index c37b85f..553364c 100644 (file)
@@ -270,7+270,7 @@ README for the ISDN-subsystem
        ATTENTION:
 
        Due to limited hardware-capabilities, there is no way to check the
-       existence of a card. Therefore you need to be shure your card's setup
+       existence of a card. Therefore you need to be sure your card's setup
        is correct. Also there are bugs in the printed manual of some newer
        16.3 cards. The manual tells the port has to be 0x180. THIS IS WRONG!!
        0xd80 is the correct value! Have a look to the kernel-syslog. With
@@ -317,7+317,7 @@ README for the ISDN-subsystem
 
          m0,i0,p0,d0 ... mn,in,pn,dn have the same meanings like the
                                      parameters described for the kernel-
-                                     version above. Watchout: different
+                                     version above. Watch out: different
                                      sequence!
 
      3.2.2 ICN driver.
@@ -369,8+369,8 @@ README for the ISDN-subsystem
      the card must be appended to the command line.
 
      -> The two LEDs at the back cover of the card (ICN-2B: 4 LEDs) must be
-        blinking intermittingly now. If a connection is up, the corresponding
-        led lits continuously.
+        blinking intermittently now. If a connection is up, the corresponding
+        led is lit continuously.
 
    b) If you only intend to use ttys, you are nearly ready now.
 
index a5f744c..66327c3 100644 (file)
@@ -11,7+11,7 @@ WWW   http:/www.think.de
 
 
 The card communicates with the PC by two interfaces:
-  1. A range of 4 successive port-addresses, whos base address can be 
+  1. A range of 4 successive port-addresses, whose base address can be 
      configured with the switches.
   2. A memory window with 16KB-256KB size, which can be setup in 16k steps
      over the whole range of 16MB. Isdn4linux only uses a 16k window.
@@ -27,7+27,7 @@ Setting up the IO-address dipswitches for the ICN-ISDN-card:
 
      (0 = switch closed, 1 = switch open)
 
-     S3 S2 S1  Basie-address
+     S3 S2 S1  Base-address
       0  0  0  0x300
       0  0  1  0x310
       0  1  0  0x320 (Default for isdn4linux)
@@ -41,7+41,7 @@ Setting up the IO-address dipswitches for the ICN-ISDN-card:
 
      (0 = switch closed, 1 = switch open)
 
-     S1 S2 S3 S4  Basis-Adresse
+     S1 S2 S3 S4  Base-Address
       0  0  0  0  0x300
       0  0  0  1  0x310
       0  0  1  0  0x320 (Default for isdn4linux)
index 3e400c2..dc90047 100644 (file)
@@ -9,7+9,7 @@ You need one thing beside the isdn4linux package:
 Compiling isdn4linux with sync PPP:
 -----------------------------------
 To compile isdn4linux with the sync PPP part, you have
-to answer the apropriate question when doing a "make config"
+to answer the appropriate question when doing a "make config"
 Don't forget to load the slhc.o
 module before the isdn.o module, if VJ-compression support
 is not compiled into your kernel. 
@@ -17,7+17,7 @@ is not compiled into your kernel.
 Using isdn4linux with sync PPP:
 -------------------------------
 Sync PPP is just another encapsulation for isdn4linux. The
-name to enable sync PPP encapsualtion is 'syncppp' .. e.g:
+name to enable sync PPP encapsulation is 'syncppp' .. e.g:
 
   isdn/isdnctrl encap ippp0 syncppp
 
@@ -32,7+32,7 @@ communicates with the isdn4linux link-level driver using the
 all devices at once. If you want to use two PPP connections
 at the same time, you have to connect the ipppd to two
 devices .. and so on. 
-I've implemented one additonal option for the ipppd:
+I've implemented one additional option for the ipppd:
  'useifip' will get (if set to not 0.0.0.0) the IP address 
  for the negotiation from the attached network-interface. 
 You must disable BSD-compression, this implementation can't
index 4121eb5..2b28e8f 100644 (file)
@@ -69,7+69,7 @@ by these three reference systems. There are many anomalies.
 Originally I wrote (about SunOS):
  "For one thing, calls to open() for a file fail with EAGAIN if another
   process holds a mandatory lock on the file. However, processes already
-  holding open file descriptors can carry on using them. Wierd!"
+  holding open file descriptors can carry on using them. Weird!"
 
 Well, all my reference systems do it, so I decided to go with the flow.
 My gut feeling is that only calls to open() and creat() with O_TRUNC should be
@@ -147,6+147,6 @@ Warning!
 
 Not even root can override a mandatory lock, so runaway process can wreak
 havoc if they lock crucial files. The way around it is to change the file
-permissions (remove the setgid bit) before trying to read or wite to it.
+permissions (remove the setgid bit) before trying to read or write to it.
 Of course, that might be a bit tricky if the system is hung :-(
 
diff --git a/Documentation/networking/3c505.txt b/Documentation/networking/3c505.txt
new file mode 100644 (file)
index 0000000..bf8bf9f
--- /dev/null
@@ -0,0 +1,33 @@
+The 3Com Etherlink Plus (3c505) driver.
+
+This driver now uses DMA.  There is currently no support for PIO operation.
+The default DMA channel is 6, and is set at compile time.
+
+If no base address is given at boot time, the driver will autoprobe
+ports 0x300, 0x280 and 0x310 (in that order).  If no IRQ is given, the driver
+will try to probe for it.
+
+The driver can be used as a loadable module.  See net-modules.txt for details
+of the parameters it can take.
+
+At the moment, the driver probably won't work with old (revision 2) hardware.
+
+There is one compile-time setting in the CONFIG file:
+ELP_DEBUG
+ The driver debug level.  It's probably best to leave it at 0 most of the time.
+ If you are having trouble, setting it to 1 may give you more information.
+ Any higher setting is too verbose for most purposes.
+
+To do:
+ Support for old boards
+ Make DMA configurable at run time
+ Improve probe/setup code
+ Test multicast and promiscuous operation
+
+Authors:
+ The driver is mainly written by Craig Southeren, email
+ <craigs@ineluki.apana.org.au>.
+ Parts of the driver (adapting the driver to 1.1.4+ kernels,
+ IRQ/address detection, some changes) and this README by
+ Juha Laiho <jlaiho@ichaos.nullnet.fi>.
+ DMA mode, more fixes, etc, by Philip Blundell <pjb27@cam.ac.uk>
index 1be887e..891a8aa 100644 (file)
@@ -167,7+167,7 @@ cable. A typical BUS ARCnet network looks like:
   T - T connector
 
 But that is not all! The two types can be connected together.  According to
-the official documentation the only way of conecting them is using an active
+the official documentation the only way of connecting them is using an active
 hub:
 
          A------T------T------TR
@@ -201,7+201,7 @@ example:
            |   |      S------T----H---S   |
            S   S             B    R       S  
                                                                
-A basicaly different cabling scheme is used with Twisted Pair cabling. Each
+A basically different cabling scheme is used with Twisted Pair cabling. Each
 of the TP cards has two RJ (phone-cord style) connectors.  The cards are
 then daisy-chained together using a cable connecting every two neighboring
 cards.  The ends are terminated with RJ 93 Ohm terminators which plug into
@@ -258,7+258,7 @@ All ARCnet cards should have a total of four or five different settings:
     your card has additional ones, which is possible, please tell me.) This
     should not be the same as any other device on your system.  According to
     a doc I got from Novell, MS Windows prefers values of 0x300 or more,
-    eating netconnections on my system (at least) otherwise.  My guess is
+    eating net connections on my system (at least) otherwise.  My guess is
     this may be because, if your card is at 0x2E0, probing for a serial port
     at 0x2E8 will reset the card and probably mess things up royally.
        - Avery's favourite: 0x300.
@@ -426,7+426,7 @@ Unclassified Stuff
      About the jumpers: On my PC130 there is one more jumper, located near the
      cable-connector and it's for changing to star or bus topology; 
      closed: star - open: bus
-     On the PC500 are some more jumper-pins, one block labled with RX,PDN,TXI
+     On the PC500 are some more jumper-pins, one block labeled with RX,PDN,TXI
      and another with ALE,LA17,LA18,LA19 these are undocumented..
 
      [...more parts deleted...]
@@ -619,7+619,7 @@ Setting the I/O Base Address
 ----------------------------
 
 The first three switches in switch group S1 are used to select one
-of eight possible I/O Base addresses using the followig table
+of eight possible I/O Base addresses using the following table
 
 
    Switch | Hex I/O
@@ -627,7+627,7 @@ of eight possible I/O Base addresses using the followig table
    -------|--------
    0 0 0  |  260
    0 0 1  |  290
-   0 1 0  |  2E0  (Manufactor's default)
+   0 1 0  |  2E0  (Manufacturer's default)
    0 1 1  |  2F0
    1 0 0  |  300
    1 0 1  |  350
@@ -721,7+721,7 @@ board activity:
  -------|-------------------   ---------|-------------------
   on    | normal activity      flash/on | data transfer
   blink | reconfiguration      off      | no data transfer;
-  off   | defectiv board or             | incorect memory or
+  off   | defective board or            | incorrect memory or
         | node ID is zero               | I/O address
 
 
@@ -820,7+820,7 @@ Setting the Node ID
 
 The eight switches in group SW3 are used to set the node ID. Each node
 attached to the network must have an unique node ID which must be 
-diffrent from 0.
+different from 0.
 Switch 1 serves as the least significant bit (LSB).
 
 The node ID is the sum of the values of all switches set to "1"  
@@ -860,7+860,7 @@ Setting the I/O Base Address
 ----------------------------
 
 The first six switches in switch group SW1 are used to select one
-of 32 possible I/O Base addresses using the followig table
+of 32 possible I/O Base addresses using the following table
 
    Switch       | Hex I/O
    6 5  4 3 2 1 | Address
@@ -879,7+879,7 @@ of 32 possible I/O Base addresses using the followig table
    0 1  1 0 1 1 |  2B0
    0 1  1 1 0 0 |  2C0
    0 1  1 1 0 1 |  2D0
-   0 1  1 1 1 0 |  2E0 (Manufactor's default)
+   0 1  1 1 1 0 |  2E0 (Manufacturer's default)
    0 1  1 1 1 1 |  2F0
    1 1  0 0 0 0 |  300
    1 1  0 0 0 1 |  310
@@ -948,7+948,7 @@ board activity:
  -------|-------------------   ---------|-------------------
   on    | normal activity      flash/on | data transfer
   blink | reconfiguration      off      | no data transfer;
-  off   | defectiv board or             | incorect memory or
+  off   | defective board or            | incorrect memory or
         | node ID is zero               | I/O address
 
 
@@ -1036,7+1036,7 @@ SW2: DIP-Switches for Memory Base and I/O Base addresses
 JP0: If closed, internal termination on (default open)
 JP1: IRQ Jumpers
 JP2: Boot-ROM enabled if closed
-JP3: Jumpers for respsonse timeout
+JP3: Jumpers for response timeout
  
 U3: Boot-ROM Socket          
 
@@ -1068,10+1068,10 @@ Switches        Base
 111            3e0-3ef
 
 
-DIP Switches 1-5 of SW2 encode the RAM and ROM Adress Range:
+DIP Switches 1-5 of SW2 encode the RAM and ROM Address Range:
 
 Switches        Ram           Rom
-12345           Adress Range  Address Range
+12345           Address Range  Address Range
 00000          C:0000-C:07ff   C:2000-C:3fff
 10000          C:0800-C:0fff
 01000          C:1000-C:17ff
@@ -1336,7+1336,7 @@ Setting the Node ID
 -------------------
 
 The eight switches in SW2 are used to set the node ID. Each node attached
-to the network must have an unique node ID which must be diffrent from 0.
+to the network must have an unique node ID which must be different from 0.
 Switch 1 (ID0) serves as the least significant bit (LSB).
 
 The node ID is the sum of the values of all switches set to "1"  
@@ -1376,7+1376,7 @@ Setting the I/O Base Address
 ----------------------------
 
 The last three switches in switch block SW1 are used to select one
-of eight possible I/O Base addresses using the followig table
+of eight possible I/O Base addresses using the following table
 
 
    Switch      | Hex I/O
@@ -1384,7+1384,7 @@ of eight possible I/O Base addresses using the followig table
    ------------|--------
    ON  ON  ON  |  260
    OFF ON  ON  |  290
-   ON  OFF ON  |  2E0  (Manufactor's default)
+   ON  OFF ON  |  2E0  (Manufacturer's default)
    OFF OFF ON  |  2F0
    ON  ON  OFF |  300
    OFF ON  OFF |  350
@@ -1406,7+1406,7 @@ Switches 1-5 of switch block SW1 select the Memory Base address.
    ON  ON  ON  ON  ON  |  C0000  |  C2000
    ON  ON  OFF ON  ON  |  C4000  |  C6000
    ON  ON  ON  OFF ON  |  CC000  |  CE000
-   ON  ON  OFF OFF ON  |  D0000  |  D2000  (Manufactor's default)
+   ON  ON  OFF OFF ON  |  D0000  |  D2000  (Manufacturer's default)
    ON  ON  ON  ON  OFF |  D4000  |  D6000
    ON  ON  OFF ON  OFF |  D8000  |  DA000
    ON  ON  ON  OFF OFF |  DC000  |  DE000
@@ -1417,7+1417,7 @@ Switches 1-5 of switch block SW1 select the Memory Base address.
 Note: Since the switches 1 and 2 are always set to ON it may be possible
       that they can be used to add an offset of 2K, 4K or 6K to the base
       address, but this feature is not documented in the manual and I
-      haven't testet it yet.
+      haven't tested it yet.
 
 
 Setting the Interrupt Line
@@ -1546,7+1546,7 @@ Setting the Node ID
 -------------------
 
 The eight switches in SW2 are used to set the node ID. Each node attached
-to the network must have an unique node ID which must be diffrent from 0.
+to the network must have an unique node ID which must be different from 0.
 Switch 1 (ID0) serves as the least significant bit (LSB).
 
 The node ID is the sum of the values of all switches set to "1"  
@@ -1586,14+1586,14 @@ Setting the I/O Base Address
 ----------------------------
 
 The first six switches in switch block SW1 are used to select the I/O Base
-address using the followig table:
+address using the following table:
 
              Switch        | Hex I/O
     1   2   3   4   5   6  | Address
    ------------------------|--------
    OFF ON  ON  OFF OFF ON  |  260
    OFF ON  OFF ON  ON  OFF |  290
-   OFF ON  OFF OFF OFF ON  |  2E0  (Manufactor's default)
+   OFF ON  OFF OFF OFF ON  |  2E0  (Manufacturer's default)
    OFF ON  OFF OFF OFF OFF |  2F0
    OFF OFF ON  ON  ON  ON  |  300
    OFF OFF ON  OFF ON  OFF |  350
@@ -1642,9+1642,9 @@ JP3 through JP13 using the following table:
     13    |   2 (=9) Default!
 
 Note:  - Do not use JP11=IRQ6, it may conflict with your Floppy Disk
-         Controler
+         Controller
        - Use JP3=IRQ14 only, if you don't have an IDE-, MFM-, or RLL-
-         Hard Disk, it may conflict with their controlers
+         Hard Disk, it may conflict with their controllers
 
 
 Setting the Timeout Parameters
@@ -1836,7+1836,7 @@ Setting the I/O Base Address
 ----------------------------
 
 The switches 1 to 6 of switch block SW1 are used to select one
-of 32 possible I/O Base addresses using the followig tables
+of 32 possible I/O Base addresses using the following tables
    
           | Hex
    Switch | Value
@@ -1876,7+1876,7 @@ Jumpers 7-10 of switch block SW1 select the Memory Base address.
 Setting the Interrupt Line
 --------------------------
 
-Jumpers 1-5 of the jumper block J1 controll the IRQ level. ON means 
+Jumpers 1-5 of the jumper block J1 control the IRQ level. ON means 
 shorted, OFF means open.
 
     Jumper              |  IRQ
@@ -1906,7+1906,7 @@ LAN-ARC-8, an 8-bit card
   - from Vojtech Pavlik <Vojtech.Pavlik@st.mff.cuni.cz>
 
 This is another SMC 90C65 based arcnet card. I couldn't identify the
-manufacturer, but it might be DataPoint, becsuse the card has the
+manufacturer, but it might be DataPoint, because the card has the
 original arcNet logo in its upper right corner.
 
           _______________________________________________________
@@ -1975,7+1975,7 @@ Setting the I/O Base Address
 ----------------------------
 
 The last three switches in switch block SW1 are used to select one
-of eight possible I/O Base addresses using the followig table
+of eight possible I/O Base addresses using the following table
 
 
    Switch      | Hex I/O
@@ -2005,7+2005,7 @@ Jumpers 3-5 of switch block SW1 select the Memory Base address.
    ON  ON  ON  ON  ON  |  C0000  |  C2000
    ON  ON  OFF ON  ON  |  C4000  |  C6000
    ON  ON  ON  OFF ON  |  CC000  |  CE000
-   ON  ON  OFF OFF ON  |  D0000  |  D2000  (Manufacturerr's default)
+   ON  ON  OFF OFF ON  |  D0000  |  D2000  (Manufacturer's default)
    ON  ON  ON  ON  OFF |  D4000  |  D6000
    ON  ON  OFF ON  OFF |  D8000  |  DA000
    ON  ON  ON  OFF OFF |  DC000  |  DE000
@@ -2383,7+2383,7 @@ NONAME 8-BIT ARCNET
 ===================
 
 I have named this ARCnet card "NONAME", since there is no name of any
-manufactor on the Installation manual nor on the shipping box. The only
+manufacturer on the Installation manual nor on the shipping box. The only
 hint to the existence of a manufacturer at all is written in copper,
 it is "Made in Taiwan"
 
@@ -2428,7+2428,7 @@ ET1, ET2    Extended Timeout Select
 ROM     ROM Enable Select
 CN              RG62 Coax Connector
 STAR| BUS | T/P Three fields for placing a sign (colored circle)
-                indicating the topologie of the card
+                indicating the topology of the card
 
 Setting one of the switches to Off means "1", On means "0".
 
@@ -2438,7+2438,7 @@ Setting the Node ID
 
 The eight switches in group SW1 are used to set the node ID.
 Each node attached to the network must have an unique node ID which
-must be diffrent from 0.
+must be different from 0.
 Switch 8 serves as the least significant bit (LSB).
 
 The node ID is the sum of the values of all switches set to "1"  
@@ -2478,14+2478,14 @@ Setting the I/O Base Address
 ----------------------------
 
 The first three switches in switch group SW2 are used to select one
-of eight possible I/O Base addresses using the followig table
+of eight possible I/O Base addresses using the following table
 
    Switch      | Hex I/O
     1   2   3  | Address
    ------------|--------
    ON  ON  ON  |  260
    ON  ON  OFF |  290
-   ON  OFF ON  |  2E0  (Manufactor's default)
+   ON  OFF ON  |  2E0  (Manufacturer's default)
    ON  OFF OFF |  2F0
    OFF ON  ON  |  300
    OFF ON  OFF |  350
@@ -2520,7+2520,7 @@ positions, determined by the offset, switches 7 and 8 of group SW2.
    0 1 0  1 0 |  CD000  |  CE000
    0 1 0  1 1 |  CD800  |  CE000
               |         |
-   0 1 1  0 0 |  D0000  |  D2000  (Manufactor's default)
+   0 1 1  0 0 |  D0000  |  D2000  (Manufacturer's default)
    0 1 1  0 1 |  D0800  |  D2000
    0 1 1  1 0 |  D1000  |  D2000
    0 1 1  1 1 |  D1800  |  D2000
@@ -2553,7+2553,7 @@ Setting Interrupt Request Lines (IRQ)
 -------------------------------------
 
 To select a hardware interrupt level set one (only one!) of the jumpers
-IRQ2, IRQ3, IRQ4, IRQ5 or IRQ7. The Manufactor's default is IRQ2.
+IRQ2, IRQ3, IRQ4, IRQ5 or IRQ7. The manufacturer's default is IRQ2.
  
 
 Setting the Timeouts
@@ -2580,7+2580,7 @@ The manual of my 8-Bit NONAME ARCnet Card contains another description
 of a 16-Bit Coax / Twisted Pair Card. This description is incomplete,
 because there are missing two pages in the manual booklet. (The table
 of contents reports pages ... 2-9, 2-11, 2-12, 3-1, ... but inside
-the booklet there is a diffrent way of counting ... 2-9, 2-10, A-1,
+the booklet there is a different way of counting ... 2-9, 2-10, A-1,
 (empty page), 3-1, ..., 3-18, A-1 (again), A-2)
 Also the picture of the board layout is not as good as the picture of
 8-Bit card, because there isn't any letter like "SW1" written to the
@@ -2627,7+2627,7 @@ Setting the Node ID
 
 The eight switches in group SW2 are used to set the node ID.
 Each node attached to the network must have an unique node ID which
-must be diffrent from 0.
+must be different from 0.
 Switch 8 serves as the least significant bit (LSB).
 
 The node ID is the sum of the values of all switches set to "1"  
@@ -2667,14+2667,14 @@ Setting the I/O Base Address
 ----------------------------
 
 The first three switches in switch group SW1 are used to select one
-of eight possible I/O Base addresses using the followig table
+of eight possible I/O Base addresses using the following table
 
    Switch      | Hex I/O
     3   2   1  | Address
    ------------|--------
    ON  ON  ON  |  260
    ON  ON  OFF |  290
-   ON  OFF ON  |  2E0  (Manufactor's default)
+   ON  OFF ON  |  2E0  (Manufacturer's default)
    ON  OFF OFF |  2F0
    OFF ON  ON  |  300
    OFF ON  OFF |  350
@@ -2709,7+2709,7 @@ positions, determined by the offset, switches 4 and 5 of group SW1.
    0 1 0  1 0 |  CD000  |  CE000
    0 1 0  1 1 |  CD800  |  CE000
               |         |
-   0 1 1  0 0 |  D0000  |  D2000  (Manufactor's default)
+   0 1 1  0 0 |  D0000  |  D2000  (Manufacturer's default)
    0 1 1  0 1 |  D0800  |  D2000
    0 1 1  1 0 |  D1000  |  D2000
    0 1 1  1 1 |  D1800  |  D2000
@@ -2847,7+2847,7 @@ Setting the I/O Base Address
 ----------------------------
 
 The last three switches in switch block SW1 are used to select one
-of eight possible I/O Base addresses using the followig table
+of eight possible I/O Base addresses using the following table
 
 
    Switch      | Hex I/O
@@ -2855,7+2855,7 @@ of eight possible I/O Base addresses using the followig table
    ------------|--------
    ON  ON  ON  |  260
    OFF ON  ON  |  290
-   ON  OFF ON  |  2E0  (Manufactor's default)
+   ON  OFF ON  |  2E0  (Manufacturer's default)
    OFF OFF ON  |  2F0
    ON  ON  OFF |  300
    OFF ON  OFF |  350
@@ -2877,7+2877,7 @@ Jumpers 3-5 of jumper block SW1 select the Memory Base address.
    ON  ON  ON  ON  ON  |  C0000  |  C2000
    ON  ON  OFF ON  ON  |  C4000  |  C6000
    ON  ON  ON  OFF ON  |  CC000  |  CE000
-   ON  ON  OFF OFF ON  |  D0000  |  D2000  (Manufactor's default)
+   ON  ON  OFF OFF ON  |  D0000  |  D2000  (Manufacturer's default)
    ON  ON  ON  ON  OFF |  D4000  |  D6000
    ON  ON  OFF ON  OFF |  D8000  |  DA000
    ON  ON  ON  OFF OFF |  DC000  |  DE000
@@ -2885,12+2885,12 @@ Jumpers 3-5 of jumper block SW1 select the Memory Base address.
   
 *) To enable the Boot ROM set the jumper 8 of jumper block SW3 to position ON.
 
-The jumpers 1 and 2 probably add 0x0800, 0x1000 and 0x1800 to RAM addres.
+The jumpers 1 and 2 probably add 0x0800, 0x1000 and 0x1800 to RAM adders.
 
 Setting the Interrupt Line
 --------------------------
 
-Jumpers 1-5 of the jumper block SW3 controll the IRQ level.
+Jumpers 1-5 of the jumper block SW3 control the IRQ level.
 
     Jumper              |  IRQ
     1   2   3   4   5   |
@@ -3023,7+3023,7 @@ Setting the Node ID
 
 The eight switches in group SW3 are used to set the node ID.
 Each node attached to the network must have an unique node ID which
-must be diffrent from 0.
+must be different from 0.
 Switch 1 serves as the least significant bit (LSB).
 switches in the DOWN position are OFF (0) and in the UP position are ON (1)
 
index a623957..628d4d9 100644 (file)
@@ -5,7+5,7 @@ are assigned by your network supplier, they give you the number/numbers of
 the Virtual Connections (VC) assigned to you.
 
 Each DLCI is a point-to-point link between your machine and a remote one.
-As such, a seperate device is needed to accomodate the routing.  Within the
+As such, a separate device is needed to accommodate the routing.  Within the
 net-tools archives is 'dlcicfg'.  This program will communicate with the
 base "DLCI" device, and create new net devices named 'dlci00', 'dlci01'... 
 The configuration script will ask you how many DLCI's you need, as well as
index c050e93..372c22c 100644 (file)
@@ -16,16+16,16 @@ Wed 2-Aug-95  <matti.aarnio@utu.fi>
        driver developer can use, others should not confuse themselves.)
 
        In many cases it is highly preferred that insmod:ing is done
-       ONLY with defining an explicite address for the card, AND BY
+       ONLY with defining an explicit address for the card, AND BY
        NOT USING AUTO-PROBING!
 
-       Now most cards have some explicitely defined base address, they
+       Now most cards have some explicitly defined base address, they
        are compiled with (to avoid auto-probing, among other things).
        If that compiled value does not match your actual configuration,
        do use  "io=0xXXX" -parameter for the  insmod, and give there
        a value matching your environment.
 
-       If you are adventureous, you can ask the driver to autoprobe
+       If you are adventurous, you can ask the driver to autoprobe
        by using "io=0" parameter, however it is potentially dangerous
        thing to do in a live system.  (If you don't know where the
        card is located, you can try autoprobing, and after possible
@@ -50,7+50,7 @@ specifying multiple comma separated values, such as:
        insmod 3c503.o io=0x280,0x300,0x330,0x350  xcvr=0,1,0,1
 
 The above would have the one module controlling four 3c503 cards, with card 2
-and 4 using external transcievers. The "insmod" manual describes the usage
+and 4 using external transceivers. The "insmod" manual describes the usage
 of comma separated value lists.
 
 It is *STRONGLY RECOMMENDED* that you supply "io=" instead of autoprobing.
index f18963f..7174900 100644 (file)
@@ -29,7+29,7 @@ off immediately if possible, but otherwise queue and compute the body
 checksum in the copy. 
 
 When a write is done we try to clear any pending events and piggy back them.
-If the window is full we queue full sized frames. On the firs timeout in
+If the window is full we queue full sized frames. On the first timeout in
 zero window we split this.
 
 On a timer we walk the retransmit list to send any retransmits, update the
index 016521a..f7df36e 100644 (file)
@@ -88,7+88,7 @@ special no                      # address of special function register
 option  0                       # option to set via sfr
 
 
-chip   - this is just a delimiter to make sccinit a bit simplier to
+chip   - this is just a delimiter to make sccinit a bit simpler to
          program. A parameter has no effect.
 
 data_a  - the address of the data port A of this Z8530 (needed)
@@ -256,7+256,7 @@ mode nrzi           # HDLC encoding mode
                        #
 rxbuffers 8            # number of rx buffers allocated
                        #               (option, default is 4)
-txbuffers 16           # number of tx buffers allocatd
+txbuffers 16           # number of tx buffers allocated
                        #               (option, default is 16)
 bufsize        384             # size of buffers. Note that this must include
                        # the AX.25 header, not only the data field!
@@ -281,11+281,11 @@ slip    off
 
 The order WITHIN these sections is unimportant. The order OF these
 sections IS important. The MODEM parameters are set with the first
-recognized KISS paramer...
+recognized KISS parameter...
 
 Please note that you can initialize the board only once after boot. 
-You can change all paramters but "mode" and "clock" later with the
-Sccparam program or through KISS. Just to avoid securety holes... 
+You can change all parameters but "mode" and "clock" later with the
+Sccparam program or through KISS. Just to avoid security holes... 
 
 (1) this divider is usually mounted on the SCC-PBC (PA0HZP) or not
     present at all (BayCom). It feeds back the output of the DPLL 
@@ -512,7+512,7 @@ tail:
      Example: sccparam /dev/scc2 4
 
 full:
-     The full-duplex mode switch. This can be one of the folowing 
+     The full-duplex mode switch. This can be one of the following 
      values:
 
      0:   The interface will operate in CSMA mode (the normal 
@@ -568,7+568,7 @@ idle
 maxdefer
      This is the maximum time (in seconds) to wait for a free channel
      to send. When this timer expires the transmitter will be keyed 
-     IMMEDIATLY. If you love to get trouble with other users you
+     IMMEDIATELY. If you love to get trouble with other users you
      should set this to a very low value ;-)
 
      Example: sccparam /dev/scc0 maxdefer 240  # 2 minutes
@@ -658,14+658,14 @@ Delayed processing of received data: This depends on
 
 - a high interrupt load
 
-- a high load of the maching --- running X, Xmorph, XV and Povray,
+- a high load of the machine --- running X, Xmorph, XV and Povray,
   while compiling the kernel... hmm ... even with 32 MB RAM ...  ;-)
 
 - NET's speed itself.
 
 
 Kernel panics: please read to /linux/README and find out if it
-really occured within the scc driver.
+really occurred within the scc driver.
 
 If you can't solve a problem, send me
 
@@ -784,7+784,7 @@ got it up-and-running?
 
 
 Many thanks to Linus Torvalds and Alan Cox for including the driver
-in the LinuX standard distribution and their support.
+in the Linux standard distribution and their support.
 
 Joerg Reuter   ampr-net: dl1bke@db0pra.ampr.org
                AX-25   : DL1BKE @ DB0ACH.#NRW.DEU.EU
index f404a15..c37b0ee 100644 (file)
@@ -21,7+21,7 @@ diskless system, and 'server' means the NFS server.
 
 In order to use nfsroot you have to select support for NFS during
 kernel configuration. Note that NFS cannot be loaded as a module
-in this case. The configuration script will then ask you wether
+in this case. The configuration script will then ask you whether
 you want to use nfsroot, and if yes what kind of auto configuration
 system you want to use. Selecting both BOOTP and RARP is safe.
 
@@ -61,7+61,7 @@ nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>]
                replaced by the ASCII-representation of the client's IP
                address.
 
-  <nfs-options>        Standard NFS options. All options are seperated by commas.
+  <nfs-options>        Standard NFS options. All options are separated by commas.
                If the options field is not given, the following defaults
                will be used:
                        port            = as given by server portmap daemon
@@ -95,7+95,7 @@ nfsaddrs=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf
                replies from the specified server are accepted. To use
                different RARP and NFS server, specify your RARP server
                here (or leave it blank), and specify your NFS server in
-               the nfsroot paremeter (see above). If this entry is blank
+               the nfsroot parameter (see above). If this entry is blank
                the address of the server is used which answered the RARP
                or BOOTP request.
 
index 69fb690..750ac2e 100644 (file)
@@ -37,7+37,7 @@ hardware rather than the operating system.
        The Intel pentium processors have a wide variety of inbuilt facilities for 
 supporting multiprocessing, including hardware cache coherency, built in 
 interprocessor interrupt handling and a set of atomic test and set, 
-exchange and similar operations. The cache coherency in paticular makes the 
+exchange and similar operations. The cache coherency in particular makes the 
 operating systems job far easier.
 
 
@@ -88,8+88,8 @@ and only the processor holding the lock may handle an interrupt.
 
 
        Such a choice is however poor for performance. In the longer term it is 
-neccessary to move to finer grained parallelism in order to get the best 
-system performance. This can be done heirarchically by gradually refining 
+necessary to move to finer grained parallelism in order to get the best 
+system performance. This can be done hierarchically by gradually refining 
 the locks to cover smaller areas. With the current kernel highly CPU bound 
 process sets perform well but I/O bound task sets can easily degenerate to 
 near single processor performance levels. This refinement will be needed to 
@@ -100,7+100,7 @@ get the best from Linux/SMP.
 
 
 }}     The kernel changes are split into generic SMP support changes and 
-architecture specific changes neccessary to accomodate each different 
+architecture specific changes necessary to accommodate each different 
 processor type Linux is ported to.
 
 
@@ -147,7+147,7 @@ probably need to be modified in existing kernels to cope with this.
 
 }}}which does any final setup and then spins the processor while the boot 
 up processor forks off enough idle threads for each processor. This is 
-neccessary because the scheduler assumes there is always something to run. 
+necessary because the scheduler assumes there is always something to run. 
  Having generated these threads and forked init the architecture specific \
 
 
@@ -191,7+191,7 @@ aware kernel modules to see all of the running processes.
 
        The fork system call is modified to generate multiple processes with a 
 process id of zero until the SMP kernel starts up properly. This is 
-neccessary because process number 1 must be init, and it is desirable that 
+necessary because process number 1 must be init, and it is desirable that 
 all the system threads are process 0. \
 
 
@@ -199,7+199,7 @@ all the system threads are process 0. \
        The final area within the scheduling of processes that does cause problems 
 is the fact the uniprocessor kernel hard codes tests for the idle threads 
 as task[0] and the init process as task[1]. Because there are multiple idle 
-threads it is neccessary to replace these with tests that the process id is 
+threads it is necessary to replace these with tests that the process id is 
 0 and a search for process ID 1, respectively.
 
 \subheading{
@@ -208,7+208,7 @@ threads it is neccessary to replace these with tests that the process id is
 
 }      The memory management core of the existing Linux system functions 
 adequately within the multiprocessor framework providing the locking is 
-used. Certain processor specific areas do need changing, in paticular 
+used. Certain processor specific areas do need changing, in particular 
 invalidate() must invalidate the TLB's of all processors before it returns.
 
 
@@ -275,7+275,7 @@ segment). \
 
        In the initialisation done by the first processor the arch/i386/mm/init 
 code is modified to scan the low page, top page and BIOS for intel MP 
-signature blocks. This is neccessary because the MP signature blocks must 
+signature blocks. This is necessary because the MP signature blocks must 
 be read and processed before the kernel is allowed to allocate and destroy 
 the page at the top of low memory. Having established the number of 
 processors it reserves a set of pages to provide a stack come boot up area 
@@ -315,7+315,7 @@ switching.
 
 
        The architecture specific code implements the smp_processor_id() function 
-by querying the APIC logical identity register. Because the APIC isnt 
+by querying the APIC logical identity register. Because the APIC isn'
 mapped into the kernel address space at boot, the initial value returned is 
 rigged by setting the APIC base pointer to point at a suitable constant. 
 Once the system starts doing the SMP setup (in smp_boot_cpus()), the APIC 
@@ -326,7+326,7 @@ read.
 
        Message passing is accomplished using a pair of IPI's on interrupt 13 
 (unused by the 80486 FPU's in SMP mode) and interrupt 16. Two are used in 
-order to seperate messages that cannot be processed until the receiver 
+order to separate messages that cannot be processed until the receiver 
 obtains the kernel spinlock from messages that can be processed 
 immediately. In effect IRQ 13 is a fast IRQ handler that does not obtain 
 the locks, and cannot cause a reschedule, while IRQ 16 is a slow IRQ that 
@@ -376,9+376,9 @@ processor off the bus.
 as an emulation of the traditional PC interrupt controllers when the 
 machine boots (so that an Intel MP machine boots one CPU and PC 
 compatible). The kernel has all the relevant locks but does not yet 
-reprogram the 82489 to deliver interrupts to arbitary processors as it 
+reprogram the 82489 to deliver interrupts to arbitrary processors as it 
 should. This requires further modification of the standard Linux interrupt 
-handling code, and is paticularly messy as the interrupt handler behaviour 
+handling code, and is particularly messy as the interrupt handler behaviour 
 has to change as soon as the 82489 is switched into SMP mode.
 
 
index d7d7c96..3d15491 100644 (file)
@@ -37,7+37,7 @@ hardware rather than the operating system.
 The Intel pentium processors have a wide variety of inbuilt facilities for 
 supporting multiprocessing, including hardware cache coherency, built in 
 interprocessor interrupt handling and a set of atomic test and set, 
-exchange and similar operations. The cache coherency in paticular makes the 
+exchange and similar operations. The cache coherency in particular makes the 
 operating systems job far easier.
 
 The specification defines a detailed configuration structure in ROM that 
@@ -82,8+82,8 @@ can be in kernel mode, only kernel mode processes can disable interrupts
 and only the processor holding the lock may handle an interrupt.
 
 Such a choice is however poor for performance. In the longer term it is 
-neccessary to move to finer grained parallelisn in order to get the best 
-system performance. This can be done heirarchically by gradually refining 
+necessary to move to finer grained parallelism in order to get the best 
+system performance. This can be done hierarchically by gradually refining 
 the locks to cover smaller areas. With the current kernel highly CPU bound 
 process sets perform well but I/O bound task sets can easily degenerate to 
 near single processor performance levels. This refinement will be needed to 
@@ -91,7+91,7 @@ get the best from Linux/SMP.
 
 \subsection{Changes To The Portable Kernel Components}
 The kernel changes are split into generic SMP support changes and 
-architecture specific changes neccessary to accomodate each different 
+architecture specific changes necessary to accommodate each different 
 processor type Linux is ported to.
 
 
@@ -129,7+129,7 @@ Each additional CPU the calls the architecture specific function
 
 which does any final setup and then spins the processor while the boot 
 up processor forks off enough idle threads for each processor. This is 
-neccessary because the scheduler assumes there is always something to run. 
+necessary because the scheduler assumes there is always something to run. 
 Having generated these threads and forked init the architecture specific 
 
 {\tt \bf void smp\_commence(void)}
@@ -162,19+162,19 @@ aware kernel modules to see all of the running processes.
 
 The fork system call is modified to generate multiple processes with a 
 process id of zero until the SMP kernel starts up properly. This is 
-neccessary because process number 1 must be init, and it is desirable that 
+necessary because process number 1 must be init, and it is desirable that 
 all the system threads are process 0. 
 
 The final area within the scheduling of processes that does cause problems 
 is the fact the uniprocessor kernel hard codes tests for the idle threads 
 as task[0] and the init process as task[1]. Because there are multiple idle 
-threads it is neccessary to replace these with tests that the process id is 
+threads it is necessary to replace these with tests that the process id is 
 0 and a search for process ID 1, respectively.
 
 \subsubsection{Memory Management}
 The memory management core of the existing Linux system functions 
 adequately within the multiprocessor framework providing the locking is 
-used. Certain processor specific areas do need changing, in paticular 
+used. Certain processor specific areas do need changing, in particular 
 invalidate() must invalidate the TLB's of all processors before it returns.
 
 
@@ -224,7+224,7 @@ segment).
 
 In the initialisation done by the first processor the arch/i386/mm/init 
 code is modified to scan the low page, top page and BIOS for intel MP 
-signature blocks. This is neccessary because the MP signature blocks must 
+signature blocks. This is necessary because the MP signature blocks must 
 be read and processed before the kernel is allowed to allocate and destroy 
 the page at the top of low memory. Having established the number of 
 processors it reserves a set of pages to provide a stack come boot up area 
@@ -257,7+257,7 @@ switching.
 
 \subsubsection{Message Handling and Support Code}
 The architecture specific code implements the smp\_processor\_id() function 
-by querying the APIC logical identity register. Because the APIC isnt 
+by querying the APIC logical identity register. Because the APIC isn'
 mapped into the kernel address space at boot, the initial value returned is 
 rigged by setting the APIC base pointer to point at a suitable constant. 
 Once the system starts doing the SMP setup (in smp\_boot\_cpus()), the APIC 
@@ -267,7+267,7 @@ read.
 
 Message passing is accomplished using a pair of IPI's on interrupt 13 
 (unused by the 80486 FPU's in SMP mode) and interrupt 16. Two are used in 
-order to seperate messages that cannot be processed until the receiver 
+order to separate messages that cannot be processed until the receiver 
 obtains the kernel spinlock from messages that can be processed 
 immediately. In effect IRQ 13 is a fast IRQ handler that does not obtain 
 the locks, and cannot cause a reschedule, while IRQ 16 is a slow IRQ that 
@@ -312,9+312,9 @@ Interrupts are distributed by an i82489 APIC. This chip is set up to work
 as an emulation of the traditional PC interrupt controllers when the 
 machine boots (so that an Intel MP machine boots one CPU and PC 
 compatible). The kernel has all the relevant locks but does not yet 
-reprogram the 82489 to deliver interrupts to arbitary processors as it 
+reprogram the 82489 to deliver interrupts to arbitrary processors as it 
 should. This requires further modification of the standard Linux interrupt 
-handling code, and is paticularly messy as the interrupt handler behaviour 
+handling code, and is particularly messy as the interrupt handler behaviour 
 has to change as soon as the 82489 is switched into SMP mode.
 
 
index 16bff28..d533284 100644 (file)
@@ -12,7+12,7 @@ kernel decompression starts and works only on 80X86 machines.
    IF YOU USE THIS FEATURE, I'LL BE MUCH PLEASED IF YOU SEND ME A MAIL
 DESCRIBING YOUR EXPERIENCE WITH IT. BUG REPORTS ARE ALSO WELCOME.
 
-   The video mode to be used is selected by a kernel paramater which can be
+   The video mode to be used is selected by a kernel parameter which can be
 specified in the kernel Makefile (the SVGA_MODE=... line) or by the "vga=..."
 option of LILO or by the "vidmode" utility (present in standard Linux utility
 packages). You can use the following settings of this parameter:
@@ -83,7+83,7 @@ the standard modes (80x25 and 80x50) followed by "special" modes (80x28 and
 finally SVGA modes for the auto-detected adapter.
 
    If you enter "scan" instead of item number / mode ID, the program will try
-to scan your video modes in a slightly aggresive, but much more accurate way.
+to scan your video modes in a slightly aggressive, but much more accurate way.
 This should reveal all video modes supported by your BIOS. During this process,
 the screen will flash wildly and strange things will appear. If you are afraid
 this could damage your monitor, don't use this functions. After scanning, the
index 5a98a46..b5023b3 100644 (file)
@@ -10,7+10,7 @@ preferably many more.
 2.     Try and release a few ALPHA test versions to the net. Announce them
 onto the kernel channel and await results. This is especially important
 for device drivers because often thats the only way you will find things
-like the fact version 3 firmware needs a magic fix you didnt know about, or
+like the fact version 3 firmware needs a magic fix you didn't know about, or
 some clown changed the chips on a board and not its name (Don't laugh look
 at the SMC etherpower for that).
 
@@ -29,7+29,7 @@ become a generalised kernel feature ready for next time.
        PLEASE try and include any credit lines you want added with the
 patch. It avoids people being missed off by mistake and makes it easier to
 know who wants adding and who doesn't.
-       PLEASE Document known bugs. If it doesnt work for everything or
+       PLEASE Document known bugs. If it doesn't work for everything or
 does something very odd once a month document it.
 
 6.     Make sure you have the right to send any changes you make. If you
@@ -72,6+72,12 @@ M:   pjb27@cam.ac.uk
 L:     linux-net@vger.rutgers.edu
 S:     Maintained
 
+3C505 NETWORK DRIVER
+P:     Philip Blundell
+M:     phil@tazenda.demon.co.uk
+L:     linux-net@vger.rutgers.edu
+S:     Maintained
+
 APM DRIVER
 P:      Rik Faith & Stephen Rothwell
 M:      faith@cs.unc.edu, Stephen.Rothwell@canb.auug.org.au
@@ -87,7+93,7 @@ S:    Maintained
 AX.25 NETWORK LAYER
 P:     Jon Naylor
 M:     jsn@cs.nott.ac.uk
-L:     linux-hams@vger.rutges.edu
+L:     linux-hams@vger.rutgers.edu
 S:     Maintained
 
 BUSLOGIC SCSI DRIVER
@@ -160,7+166,7 @@ S:  Maintained
 NETROM NETWORK LAYER
 P:     Jon Naylor
 M:     jsn@cs.nott.ac.uk
-L:     linux-hams@vger.rutges.edu
+L:     linux-hams@vger.rutgers.edu
 S:     Maintained
 
 NETWORKING [GENERAL]:
index 6dab3bd..981ae48 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6+1,6 @@
 VERSION = 1
 PATCHLEVEL = 3
-SUBLEVEL = 86
+SUBLEVEL = 87
 
 ARCH = i386
 
index 3cfe3af..b359b1c 100644 (file)
@@ -457,7+457,7 @@ static inline void enable_ide(long ide_base)
  * adheres to the PCI-PCI bridge specification.   This says that the interrupts on
  * the other side of a bridge are swizzled in the following manner:
  *
- * Dev    Interrupt   Interupt 
+ * Dev    Interrupt   Interrupt 
  *        Pin on      Pin on 
  *        Device      Connector
  *
index d4e6e87..04d4f85 100644 (file)
@@ -387,7+387,7 @@ static inline void isa_device_interrupt(unsigned long vector,
 
        /*
         * It seems to me that the probability of two or more *device*
-        * interrupts occuring at almost exactly the same time is
+        * interrupts occurring at almost exactly the same time is
         * pretty low.  So why pay the price of checking for
         * additional interrupts here if the common case can be
         * handled so much easier?
index b77eb54..41d2bf2 100644 (file)
@@ -64,7+64,7 @@ static struct symbol_table arch_symbol_table = {
        X(__constant_c_memset),
        /*
         * The following are special because they're not called
-        * explictly (the C compiler or assembler generates them in
+        * explicitly (the C compiler or assembler generates them in
         * response to division operations).  Fortunately, their
         * interface isn't gonna change any time soon now, so it's OK
         * to leave it out of version control.
index 37f37f0..906a0b1 100644 (file)
@@ -75,7+75,7 @@ static int osf_filldir(void * __buf, const char * name, int namlen, off_t offset
        struct osf_dirent_callback * buf = (struct osf_dirent_callback *) __buf;
        int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1);
 
-       buf->error = -EINVAL;           /* unly used if we fail */
+       buf->error = -EINVAL;           /* only used if we fail */
        if (reclen > buf->count)
                return -EINVAL;
        if (buf->basep) {
@@ -304,7+304,7 @@ static void putdev(struct inode * inode)
 
 /*
  * We can't actually handle ufs yet, so we translate UFS mounts to
- * ext2fs mounts... I wouldn't mind a USF filesystem, but the UFS
+ * ext2fs mounts... I wouldn't mind a UFS filesystem, but the UFS
  * layout is so braindead it's a major headache doing it..
  */
 static int osf_ufs_mount(char * dirname, struct ufs_args * args, int flags)
index e5f5efe..ee9598f 100644 (file)
@@ -132,7+132,7 @@ void setup_arch(char **cmdline_p,
        /* Hack for Jensen... since we're restricted to 8 or 16 
         * chars for boot flags depending on the boot mode,
         * we need some shorthand.  This should do for 
-        * installation.  Later we'll add other abbreviaitions
+        * installation.  Later we'll add other abbreviations
         * as well...
         */
        if(strcmp(COMMAND_LINE, "INSTALL") == 0) {
index c7125f5..3d1a59a 100644 (file)
@@ -335,7+335,7 @@ alpha_fp_emul_imprecise (struct pt_regs *regs, unsigned long write_mask)
         *
         * Branches, jumps, TRAPBs, EXCBs and calls to PALcode all
         * bound the trap shadow, so we need not look any further than
-        * up to the first occurance of such an instruction.
+        * up to the first occurrence of such an instruction.
         */
        while (write_mask) {
                insn = get_user((__u32*)(trigger_pc));
index a79578e..12965fe 100644 (file)
@@ -4,7+4,7 @@
  * the instruction encodings except that 0x03 signifies dynamic
  * rounding mode in that case.
  */
-#define ROUND_CHOP     0x00    /* chopped (aka round twards zero) */
+#define ROUND_CHOP     0x00    /* chopped (aka round towards zero) */
 #define ROUND_NINF     0x01    /* round towards negative infinity */
 #define ROUND_NEAR     0x02    /* round towards nearest number */
 #define ROUND_PINF     0x03    /* round towards positive infinity */
index 51305b5..d408eec 100644 (file)
  * GNU General Public License.
  */
 /*
- * The orginal code did not have any comments. I have created many
+ * The original code did not have any comments. I have created many
  * comments as I fix the bugs in the code.  My comments are based on
- * my observation and interpretation of the code.  If the orginal
+ * my observation and interpretation of the code.  If the original
  * author would have spend a few minutes to comment the code, we would
  * never had a problem of misinterpretation.  -HA
  *
index 748e235..9aff2c4 100644 (file)
@@ -619,7+619,7 @@ setvde:     call    outidx
 set_80x60:
        call    set_80x30       ! Set 480 scans
        call    set_8pt         ! And 8-pt font
-       mov     ax,#0xdf12      ! VGA vertial display end
+       mov     ax,#0xdf12      ! VGA vertical display end
        mov     [force_size],#0x503c
        jmp     setvde
 
index 5b022fd..2bdd0a8 100644 (file)
@@ -541,7+541,7 @@ void init_IRQ(void)
        for (i = 0; i < 16 ; i++)
                set_intr_gate(0x20+i,bad_interrupt[i]);
        /* This bit is a hack because we don't send timer messages to all processors yet */
-       /* It has to here .. it doesnt work if you put it down the bottom - assembler explodes 8) */
+       /* It has to be here .. it doesn't work if you put it down the bottom - assembler explodes 8) */
 #ifdef __SMP__ 
        set_intr_gate(0x20+i, interrupt[i]);    /* IRQ '16' - IPI for rescheduling */
 #endif 
index 0e8e747..cb4016f 100644 (file)
@@ -65,7+65,7 @@ static void hard_idle(void)
                                 is an error calling the idle routine, we
                                 should hlt if possible.  We need to check
                                 need_resched again because an interrupt
-                                may have occured in apm_do_idle(). */
+                                may have occurred in apm_do_idle(). */
                        start_bh_atomic();
                        if (!apm_do_idle() && !need_resched)
                                __asm__("hlt");
index f97eabf..12055a8 100644 (file)
 #include <asm/smp.h>
 
 /*
- *     Why isnt this somewhere standard ??
+ *     Why isn't this somewhere standard ??
  */
  
 extern __inline int max(int a,int b)
@@ -699,10+699,10 @@ void smp_boot_cpus(void)
                        kernel_stacks[i]=stack;
                        install_trampoline(stack);
 
-                       printk("Booting processor %d stack %p: ",i,stack);                      /* So we set whats up   */
+                       printk("Booting processor %d stack %p: ",i,stack);                      /* So we set what's up   */
 
                        /*                              
-                        *      This gunge runs the startup process for
+                        *      This grunge runs the startup process for
                         *      the targeted processor.
                         */
 
index 29d19bb..0368d81 100644 (file)
 
 /*
  * sys_pipe() is the normal C calling standard for creating
- * a pipe. It's not the way unix tranditionally does this, though.
+ * a pipe. It's not the way unix traditionally does this, though.
  */
 asmlinkage int sys_pipe(unsigned long * fildes)
 {
index c028b1f..ae12463 100644 (file)
@@ -296,7+296,7 @@ asmlinkage void math_state_restore(void)
  *     we simply have to do the restore each context switch and
  *     set the flag. switch_to() will always save the state in
  *     case we swap processors. We also don't use the coprocessor
- *     timer - IRQ 13 mode isnt used with SMP machines (thank god).
+ *     timer - IRQ 13 mode isn't used with SMP machines (thank god).
  *
  *     If this actually works it will be a miracle however
  */
index d156da3..f72230b 100644 (file)
@@ -84,7+84,7 @@ void show_mem(void)
        i = high_memory >> PAGE_SHIFT;
        while (i-- > 0) {
                total++;
-               if (mem_map[i].reserved)
+               if (PageReserved(mem_map+i))
                        reserved++;
                else if (!mem_map[i].count)
                        free++;
@@ -235,18+235,18 @@ void mem_init(unsigned long start_mem, unsigned long end_mem)
         * controller as well..
         */
        while (start_low_mem < 0x9f000) {
-               mem_map[MAP_NR(start_low_mem)].reserved = 0;
+               clear_bit(PG_reserved, &mem_map[MAP_NR(start_low_mem)].flags);
                start_low_mem += PAGE_SIZE;
        }
 
        while (start_mem < high_memory) {
-               mem_map[MAP_NR(start_mem)].reserved = 0;
+               clear_bit(PG_reserved, &mem_map[MAP_NR(start_mem)].flags);
                start_mem += PAGE_SIZE;
        }
        for (tmp = 0 ; tmp < high_memory ; tmp += PAGE_SIZE) {
                if (tmp >= MAX_DMA_ADDRESS)
-                       mem_map[MAP_NR(tmp)].dma = 0;
-               if (mem_map[MAP_NR(tmp)].reserved) {
+                       clear_bit(PG_DMA, &mem_map[MAP_NR(tmp)].flags);
+               if (PageReserved(mem_map+MAP_NR(tmp))) {
                        if (tmp >= 0xA0000 && tmp < 0x100000)
                                reservedpages++;
                        else if (tmp < (unsigned long) &_etext)
@@ -292,7+292,7 @@ void si_meminfo(struct sysinfo *val)
        val->freeram = nr_free_pages << PAGE_SHIFT;
        val->bufferram = buffermem;
        while (i-- > 0)  {
-               if (mem_map[i].reserved)
+               if (PageReserved(mem_map+i))
                        continue;
                val->totalram++;
                if (!mem_map[i].count)
index 3b9891a..825837c 100644 (file)
@@ -22,8+22,8 @@ OBJS  = milo.o a.out.o
 DROP_SECTIONS  = .reginfo .mdebug
 
 #
-# The new options of binutils 2.6 help to shrink object files alot.
-# This is especially usefull for booting from floppy.  Though we
+# The new options of binutils 2.6 help to shrink object files a lot.
+# This is especially useful for booting from floppy.  Though we
 # don't yet require everyone to have binutils 2.6 installed.
 #
 OBJDUMP_VERSION =  $(word 4,$(shell $(OBJDUMP) --version))
index 08208a0..d2acd3d 100644 (file)
@@ -13,7+13,7 @@ bool 'Support for Deskstation RPC44' CONFIG_DESKSTATION_RPC44
 bool 'Support for Deskstation Tyne' CONFIG_DESKSTATION_TYNE
 bool 'Support for Mips Magnum 3000' CONFIG_MIPS_MAGNUM_3000
 bool 'Support for Mips Magnum 4000' CONFIG_MIPS_MAGNUM_4000
-bool 'Support for Olivetty M700' CONFIG_OLIVETTI_M700
+bool 'Support for Olivetti M700' CONFIG_OLIVETTI_M700
 if [ "$CONFIG_ACER_PICA_61" = "y" -o \
      "$CONFIG_MIPS_MAGNUM_4000" = "y" -o \
      "$CONFIG_OLIVETTI_M700" = "y" ]; then
index 4efb65b..c1b2160 100644 (file)
 /*
  * entry.S contains the system-call and fault low-level handling routines.
  * This also contains the timer-interrupt handler, as well as all interrupts
- * and faults that can result in a task-switch. The ISA dependend TLB
+ * and faults that can result in a task-switch. The ISA dependent TLB
  * code is in arch/mips/kernel/<cputype>.S
  */
 #include <linux/sys.h>
@@ -109,7+109,7 @@ EXPORT(return)      RESTORE_ALL
                .set    at
 
 /*
- * Beware: interrupt, fast_interrupt and bad_interrupt have unusal
+ * Beware: interrupt, fast_interrupt and bad_interrupt have unusual
  * calling conventions to speedup the mess.
  *
  * t1 - interrupt number
index 7708fea..e1544bc 100644 (file)
@@ -407,7+407,7 @@ static int hexToInt(char **ptr, int *intValue)
 }
 
 /*
- * This function does all command procesing for interfacing to gdb.  It
+ * This function does all command processing for interfacing to gdb.  It
  * returns 1 if you should skip the instruction at the trap address, 0
  * otherwise.
  */
index d26a41d..6a5d518 100644 (file)
                .set    noreorder
                NESTED(kernel_entry, 16, sp)
                /*
-                * The followin two symbols are used for kernel profiling.
+                * The following two symbols are used for kernel profiling.
                 */
                EXPORT(stext)
                EXPORT(_stext)
 
 #ifdef CONF_DISABLE_KSEG0_CACHING
                /*
-                * Disable all caching for KSEG0.  This option is usefull
+                * Disable all caching for KSEG0.  This option is useful
                 * when cache trouble with drivers is suspected
                 */
                mfc0    t0,CP0_CONFIG
 
                /*
                 * Initialize low level part of memory management
-                * First flush the TLB to make shure that we don't get a
+                * First flush the TLB to make sure that we don't get a
                 * TLB shutdown during wire_mappings.
                 */
                jal     tlbflush
index 2a64831..f640981 100644 (file)
@@ -4,7+4,7 @@
  * Mips Jazz DMA controller support
  * (C) 1995 Andreas Busse
  *
- * NOTE: Some of the argument checkings could be removed when
+ * NOTE: Some of the argument checking could be removed when
  * things have settled down. Also, instead of returning 0xffffffff
  * on failure of vdma_alloc() one could leave page #0 unused
  * and return the more usual NULL pointer as logical address.
index 88304f4..9b26854 100644 (file)
@@ -9,7+9,7 @@
  * now we especially support the R10000 by not invalidating entries out of
  * the TLB before calling the C handlers.
  *
- * This code is evil magic. Read appendix f (coprozessor 0 hazards) of
+ * This code is evil magic. Read appendix f (coprocessor 0 hazards) of
  * all R4xx0 manuals and think about that MIPS means "Microprocessor without
  * Interlocked Pipeline Stages" before you even think about changing this code!
  */
@@ -141,7+141,7 @@ reload_pgd_entries:
                 * There are two possible causes for an invalid (tlbl)
                 * exception:
                 * 1) pages with present bit set but the valid bit clear
-                * 2) nonexistant pages
+                * 2) nonexistent pages
                 * Case one needs fast handling, therefore don't save
                 * registers yet.
                 *
@@ -768,7+768,7 @@ done:               j       ra
  *
  * MIPS doesn't need any external MMU info: the kernel page tables contain
  * all the necessary information.  We use this hook though to load the
- * TLB as early as possible with uptodate information avoiding unecessary
+ * TLB as early as possible with uptodate information avoiding unnecessary
  * exceptions.
  *
  * Parameters: a0 - struct vm_area_struct *vma (ignored)
@@ -778,7+778,7 @@ done:               j       ra
                .set    noreorder
                LEAF(update_mmu_cache)
                /*
-                * Step 1: Wipe out old TLB information.  Not shure if
+                * Step 1: Wipe out old TLB information.  Not sure if
                 * we really need that step; call it paranoia ...
                 * In order to do that we need to disable interrupts.
                 */
index e199a0a..e7dd048 100644 (file)
@@ -165,7+165,7 @@ void do_sys(struct pt_regs *regs)
        if (narg > 4)
        {
                /*
-                * Verify that we can savely get the additional parameters
+                * Verify that we can safely get the additional parameters
                 * from the user stack.  Of course I could read the params
                 * from unaligned addresses ...  Consider this a programming
                 * course caliber .45.
index 1b78f3c..7e4625f 100644 (file)
@@ -28,7+28,7 @@ unsigned int csum_partial(const unsigned char *buff, int len, unsigned int sum)
 
        /*
         * The GCC generated code for handling carry bits makes
-        * it strongly desireable to do this in assembler!
+        * it strongly desirable to do this in assembler!
         */
     __asm__("
        .set    noreorder
index d5a3d03..9da156c 100644 (file)
@@ -169,7+169,7 @@ void __copy_page(unsigned long from, unsigned long to)
                /*
                 * The page copied most is the COW empty_zero_page.  Since we
                 * know it's contents we can avoid the writeback reading of
-                * the page.  Speeds up the standard case alot.
+                * the page.  Speeds up the standard case a lot.
                 */
                __zeropage(to);
        }
index 092db79..dadbec4 100644 (file)
@@ -1289,7+1289,7 @@ _GLOBAL(flush_data_cache)
  * This routine switches between two different tasks.  The process
  * state of one is saved on it's kernel stack.  Then the state
  * of the other is restored from it's kernel stack.  The memory
- * management hardware is updated to the second processes's state.
+ * management hardware is updated to the second process's state.
  * Finally, we can return to the second process, via the 'return'.
  *
  * Note: there are two ways to get to the "going out" portion
index 90181f0..60b1c63 100644 (file)
 #define MSR_TGPR       (1<<17)         /* TLB Update registers in use */
 #define MSR_ILE                (1<<16)         /* Interrupt Little-Endian enable */
 #define MSR_EE         (1<<15)         /* External Interrupt enable */
-#define MSR_PR         (1<<14)         /* Supervisor/User privelege */
+#define MSR_PR         (1<<14)         /* Supervisor/User privilege */
 #define MSR_FP         (1<<13)         /* Floating Point enable */
 #define MSR_ME         (1<<12)         /* Machine Check enable */
 #define MSR_FE0                (1<<11)         /* Floating Exception mode 0 */
index 7a4d08e..64185d5 100644 (file)
@@ -470,7+470,7 @@ struct screen {
                EBRACEQ                 /* saw ESC[= */
        } state;                /* command parser state */
        int     cx;             /* the first escape seq argument */
-       int     cy;             /* the second escap seq argument */
+       int     cy;             /* the second escape seq argument */
        int     *accp;          /* pointer to the current processed argument */
        int     row;            /* current column */
        int     so;             /* standout mode */
index 6364272..82b76fb 100644 (file)
@@ -2,7+2,7 @@
  *  linux/arch/ppc/kernel/traps.c
  *
  *  Copyright (C) 1995  Gary Thomas
- *  Adapted for PowerPC by Gary THomas
+ *  Adapted for PowerPC by Gary Thomas
  */
 
 /*
index 395888e..a76c2f6 100644 (file)
@@ -216,7+216,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long address, unsigned long er
   }
   if (vma->vm_end - address > current->rlim[RLIMIT_STACK].rlim_cur)
   {
-    printk("stack2: vma->vm_end-addres %x rlim %x\n", vma->vm_end - address,
+    printk("stack2: vma->vm_end-address %x rlim %x\n", vma->vm_end - address,
           current->rlim[RLIMIT_STACK].rlim_cur);
     printk("stack2: vm_end %x address = %x\n", vma->vm_end,address);
     printk("stack2: gpr[1]=%x ip = %x; current=%x[%d]; mm=%x; mmap=%x; address = %x error_code = %x\n",regs->gpr[1],regs->nip, current,current->pid,current->mm,current->mm->mmap, address, error_code);
index b399659..cc5e1c6 100644 (file)
 
 /* made this a static array since alpha and intel aren't.
    thomas made it a dynamic array and had to add lots of stuff to other parts
-   of linux to make sure the pages were contigous and such.  the static array
+   of linux to make sure the pages were contiguous and such.  the static array
    seems much easier
    making it 8k for now.  will change later.
       -- Cort
index 77f34da..48c93dd 100644 (file)
@@ -17,5+17,5 @@ our data area either way because we can be dual purpose.
 More will come....
 
 Hopefully I can write this such that it will work on almost all SUN
-machines in existance.  We'll see ;(
+machines in existence.  We'll see ;(
 
index ef0bbfd..046b276 100644 (file)
@@ -144,7+144,7 @@ bzero_bss_loop:
        bl      bzero_bss_loop
        nop
 
-       call    C_LABEL(init_me)        ! Fun with imperical constants and prom
+       call    C_LABEL(init_me)        ! Fun with empirical constants and prom
        nop
 
        /* Dump back into the prom */
similarity index 51%
rename from arch/sparc/boot/imperical.h
rename to arch/sparc/boot/empirical.h
index 8feed75..bd9bc49 100644 (file)
@@ -1,5+1,5 @@
-/* $Id: imperical.h,v 1.2 1995/11/25 00:57:42 davem Exp $
- * imperical.h:  Nasty hacks....
+/* $Id: empirical.h,v 1.2 1995/11/25 00:57:42 davem Exp $
+ * empirical.h:  Nasty hacks....
  *
  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
  */
index 270a955..0e20917 100644 (file)
@@ -1,5+1,5 @@
 /* $Id: init_me.c,v 1.2 1995/11/25 00:57:44 davem Exp $
- * init_me.c:  Initialize imperical constants and gather some info from
+ * init_me.c:  Initialize empirical constants and gather some info from
  *             the boot prom.
  *
  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
@@ -9,9+9,9 @@
 #include <asm/oplib.h>
 #include <asm/vac-ops.h>
 
-#include "imperical.h"   /* Don't ask... */
+#include "empirical.h"   /* Don't ask... */
 
-#define DEBUG_INIT_ME    /* Tell me whats goin on */
+#define DEBUG_INIT_ME    /* Tell me what's goin on */
 
 unsigned int nwindows;   /* Set in bare.S */
 unsigned int nwindowsm1;
index ba37f42..db2509f 100644 (file)
@@ -31,7+31,7 @@ auxio_probe(void)
        /* Map the register both read and write */
        auxio_register = (unsigned char *) sparc_alloc_io(auxregs[0].phys_addr, 0,
                                                          auxregs[0].reg_size,
-                                                         "auxilliaryIO",
+                                                         "auxiliaryIO",
                                                          auxregs[0].which_io, 0x0);
        /* Fix the address on sun4m and sun4c. */
        if((((unsigned long) auxregs[0].phys_addr) & 3) == 3 ||
index 1184a0d..bfd8c26 100644 (file)
@@ -370,7+370,7 @@ rie_checkbh:
 
        RESTORE_ALL
 
-       /* This routine handles illegal isntructions and privileged
+       /* This routine handles illegal instructions and privileged
         * instruction attempts from user code.
         */
        .align  4
@@ -652,7+652,7 @@ linux_trap_nmi_sun4c:
        SAVE_ALL
 
        /* Ugh, we need to clear the IRQ line.  This is now
-        * a very sun4c specific trap hanler...
+        * a very sun4c specific trap handler...
         */
        sethi   %hi(C_LABEL(interrupt_enable)), %l5
        ld      [%l5 + %lo(C_LABEL(interrupt_enable))], %l5
index da59ab1..dc60581 100644 (file)
@@ -65,7+65,7 @@ tsetup_7win_patch6:   and     %g2, 0x7f, %g2
         * T == Window entered when trap occurred
         * S == Window we will need to save if (1<<T) == %wim
         *
-        * Before execution gets here, it must be guarenteed that
+        * Before execution gets here, it must be guaranteed that
         * %l0 contains trap time %psr, %l1 and %l2 contain the
         * trap pc and npc, and %l3 contains the trap time %wim.
         */
@@ -181,7+181,7 @@ tsetup_patch3:      and     %g2, 0xff, %g2                  ! patched on 7win Sparcs
                 mov    %t_kstack, %sp                  ! and onto kernel stack
 
 trap_setup_user_spill:
-               /* A spill occured from either kernel or user mode
+               /* A spill occurred from either kernel or user mode
                 * and there exist some user windows to deal with.
                 * A mask of the currently valid user windows
                 * is in %g1 upon entry to here.
@@ -200,7+200,7 @@ tsetup_patch6:      and     %g2, 0xff, %g2          ! patched on 7win Sparcs
        wr      %g2, 0x0, %wim
        WRITE_PAUSE
 
-       /* Call MMU-architecture dependant stack checking
+       /* Call MMU-architecture dependent stack checking
         * routine.
         */
        .globl  C_LABEL(tsetup_mmu_patchme)
index 0fadc0f..9e64d3a 100644 (file)
@@ -357,7+357,7 @@ srmmu_remap:
 
                /* Calculate to KERNBASE entry.
                 *
-                * XXX Should not use imperical constant, but Gas gets an  XXX
+                * XXX Should not use empirical constant, but Gas gets an  XXX
                 * XXX upset stomach with the bitshift I would have to use XXX
                 */
                add     %o1, 0x3c0, %o3         
@@ -404,7+404,7 @@ srmmu_nviking:
                sll     %g1, 0x8, %g1                   ! make phys addr for l1 tbl
 
                lda     [%g1] ASI_M_BYPASS, %g2         ! get level1 entry for 0x0
-               add     %g1, 0x3c0, %g3                 ! XXX AWAY WITH IMPERICALS
+               add     %g1, 0x3c0, %g3                 ! XXX AWAY WITH EMPIRICALS
                sta     %g2, [%g3] ASI_M_BYPASS         ! place at KERNBASE entry
                b       go_to_highmem
                 nop                                    ! wheee....
@@ -582,7+582,7 @@ sun4m_init:
  * be sitting in the fault status/address registers.  Read them all to
  * clear them so we don't get magic faults later on.
  */
-/* This sucks, aparently this makes Vikings call prom panic, will fix later */
+/* This sucks, apparently this makes Vikings call prom panic, will fix later */
 
                rd      %psr, %o1
                srl     %o1, 28, %o1            ! Get a type of the CPU
index d739393..5c6b63a 100644 (file)
@@ -21,7+21,7 @@ static struct idp_struct idprom_buff;
 
 /* Here is the master table of Sun machines which use some implementation
  * of the Sparc CPU and have a meaningful IDPROM machtype value that we
- * know about.  See asm-sparc/machines.h for imperical constants.
+ * know about.  See asm-sparc/machines.h for empirical constants.
  */
 struct Sun_Machine_Models Sun_Machines[NUM_SUN_MACHINES] = {
 /* First, Sun4's */
index acd2459..b488066 100644 (file)
@@ -61,7+61,7 @@ void *sparc_alloc_io (void *address, void *virtual, int len, char *name,
                
        len += offset;
        if(((unsigned long) virtual + len) > (IOBASE_VADDR + IOBASE_LEN)) {
-               prom_printf("alloc_io: Mapping ouside IOBASE area\n");
+               prom_printf("alloc_io: Mapping outside IOBASE area\n");
                prom_halt();
        }
        if(check_region ((vaddr | offset), len)) {
@@ -84,11+84,11 @@ void *sparc_alloc_io (void *address, void *virtual, int len, char *name,
        return (void *) (base_address | offset);
 }
 
-/* Does DVMA allocations with PAGE_SIZE granulatity.  How this basically
+/* Does DVMA allocations with PAGE_SIZE granularity.  How this basically
  * works is that the ESP chip can do DVMA transfers at ANY address with
- * certain size and boundry restrictions.  But other devices that are
+ * certain size and boundary restrictions.  But other devices that are
  * attached to it and would like to do DVMA have to set things up in
- * a special way, if the DVMA see's a device attached to it transfer data
+ * a special way, if the DVMA sees a device attached to it transfer data
  * at addresses above DVMA_VADDR it will grab them, this way it does not
  * now have to know the peculiarities of where to read the Lance data
  * from. (for example)
index 6abc918..dba40d4 100644 (file)
@@ -380,7+380,7 @@ probe_clock(int fchild)
        }
 }
 
-/* Probe and map in the Auxiliaary I/O register */
+/* Probe and map in the Auxiliary I/O register */
 void
 probe_auxio(void)
 {
@@ -402,7+402,7 @@ probe_auxio(void)
        prom_apply_obio_ranges(auxregs, 0x1);
        /* Map the register both read and write */
        sparc_alloc_io(auxregs[0].phys_addr, (void *) AUXIO_VADDR,
-                      auxregs[0].reg_size, "auxilliaryIO", auxregs[0].which_io, 0x0);
+                      auxregs[0].reg_size, "auxiliaryIO", auxregs[0].which_io, 0x0);
 }
 
 extern unsigned long probe_memory(void);
index 2fc6e1b..8dd5dfe 100644 (file)
@@ -144,7+144,7 @@ void flush_thread(void)
  * Parent -->  %o0 == childs  pid, %o1 == 0
  * Child  -->  %o0 == parents pid, %o1 == 1
  *
- * NOTE: We have a seperate fork kpsr/kwim because
+ * NOTE: We have a separate fork kpsr/kwim because
  *       the parent could change these values between
  *       sys_fork invocation and when we reach here
  *       if the parent should sleep while trying to
index 91e3e11..3cacacc 100644 (file)
@@ -1,5+1,5 @@
 /* sclow.S: Low level special syscall handling.
- *          Basically these are cases where we can completly
+ *          Basically these are cases where we can completely
  *          handle the system call without saving any state
  *          because we know that the process will not sleep.
  *
index 20a261d..42011bc 100644 (file)
@@ -55,7+55,7 @@ unsigned long bios32_init(unsigned long memory_start, unsigned long memory_end)
        return memory_start;
 }
 
-/* Typing sync at the prom promptcalls the function pointed to by
+/* Typing sync at the prom prompt calls the function pointed to by
  * romvec->pv_synchook which I set to the following function.
  * This should sync all filesystems and return, for now it just
  * prints out pretty messages and returns.
index 5960293..62f87c5 100644 (file)
@@ -14,12+14,12 @@ volatile int smp_msg_id;
 
 static volatile int smp_commenced = 0;
 
-/* The only guarenteed locking primitive available on all Sparc
- * processors is 'ldstub [%addr_reg + imm], %dest_reg' which atomicly
+/* The only guaranteed locking primitive available on all Sparc
+ * processors is 'ldstub [%addr_reg + imm], %dest_reg' which atomically
  * places the current byte at the effective address into dest_reg and
  * places 0xff there afterwards.  Pretty lame locking primitive
  * compared to the Alpha and the intel no?  Most Sparcs have 'swap'
- * instruction which is muct better...
+ * instruction which is much better...
  */
 klock_t kernel_lock;
 
index 604b0fc..56875ba 100644 (file)
@@ -4,7+4,7 @@
  * Modifications to run under Linux
  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
  *
- * This file origionally came from the gdb sources, and the
+ * This file originally came from the gdb sources, and the
  * copyright notices have been retained below.
  */
 
@@ -430,7+430,7 @@ hexToInt(char **ptr, int *intValue)
 }
 
 /*
- * This function does all command procesing for interfacing to gdb.  It
+ * This function does all command processing for interfacing to gdb.  It
  * returns 1 if you should skip the instruction at the trap address, 0
  * otherwise.
  */
index a1c64bf..3876efd 100644 (file)
@@ -52,7+52,7 @@ asmlinkage int sunos_ioctl (int fd, unsigned long cmd, unsigned long arg)
                }
        }
 
-       /* Binary compatability is good American knowhow fuckin' up. */
+       /* Binary compatibility is good American knowhow fuckin' up. */
        if(cmd == TIOCNOTTY)
                return sys_setsid();
 
index 975ed80..69ca408 100644 (file)
@@ -27,7+27,7 @@ asmlinkage unsigned long sys_getpagesize(void)
 
 /*
  * sys_pipe() is the normal C calling standard for creating
- * a pipe. It's not the way unix tranditionally does this, though.
+ * a pipe. It's not the way unix traditionally does this, though.
  */
 asmlinkage void sparc_pipe(struct pt_regs *regs)
 {
index 050e473..9e00101 100644 (file)
@@ -1,5+1,5 @@
 /* $Id: sys_sunos.c,v 1.33 1996/03/01 07:16:00 davem Exp $
- * sys_sunos.c: SunOS specific syscall compatability support.
+ * sys_sunos.c: SunOS specific syscall compatibility support.
  *
  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
  * Copyright (C) 1995 Miguel de Icaza (miguel@nuclecu.unam.mx)
@@ -180,7+180,7 @@ asmlinkage unsigned long sunos_sbrk(int increment)
 }
 
 /* XXX Completely undocumented, and completely magic...
- * XXX I belive it is to increase the size of the stack by
+ * XXX I believe it is to increase the size of the stack by
  * XXX argument 'increment' and return the new end of stack
  * XXX area.  Wheee...
  */
@@ -249,7+249,7 @@ asmlinkage void sunos_madvise(unsigned long address, unsigned long len,
  * low-bit is one  == Page is currently residing in core
  * All other bits are undefined within the character so there...
  * Also, if you try to get stats on an area outside of the user vm area
- * *or* the passed base address is not aligned on a page boundry you
+ * *or* the passed base address is not aligned on a page boundary you
  * get an error.
  */
 asmlinkage int sunos_mincore(unsigned long addr, unsigned long len, char *array)
@@ -288,7+288,7 @@ asmlinkage int sunos_mincore(unsigned long addr, unsigned long len, char *array)
 }
 
 /* This just wants the soft limit (ie. rlim_cur element) of the RLIMIT_NOFILE
- * resource limit and is for backwards compatability with older sunos
+ * resource limit and is for backwards compatibility with older sunos
  * revs.
  */
 asmlinkage long sunos_getdtablesize(void)
@@ -400,7+400,7 @@ asmlinkage int sunos_getdents(unsigned int fd, void * dirent, int cnt)
        return cnt - buf.count;
 }
 
-/* Old sunos getdirentries, severely broken compatability stuff here. */
+/* Old sunos getdirentries, severely broken compatibility stuff here. */
 struct sunos_direntry {
     unsigned long  d_ino;
     unsigned short d_reclen;
@@ -688,7+688,7 @@ asmlinkage int sunos_nfs_mount(char *dir_name, int linux_flags, void *data)
                return error;
        /* Ok, here comes the fun part: Linux's nfs mount needs a
         * socket connection to the server, but SunOS mount does not
-        * requiere this, so we use the information on the destination
+        * require this, so we use the information on the destination
         * address to create a socket and bind it to a reserved
         * port on this system
         */
index f88d9b2..1f9b240 100644 (file)
@@ -1,5+1,5 @@
 /* $Id: systbls.S,v 1.29 1996/03/01 07:16:02 davem Exp $
- * systbls.S: System call entry point tables for OS compatability.
+ * systbls.S: System call entry point tables for OS compatibility.
  *            The native Linux system call table lives here also.
  *
  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
index ace139f..98338ad 100644 (file)
@@ -171,7+171,7 @@ static void clock_probe(void)
                master_l10_limit = &(sun4c_timers->timer_limit10);
                master_l10_counter = &(sun4c_timers->cur_count10);
        } else {
-               /* XXX FIx this SHIT... UP and MP sun4m configurations
+               /* XXX Fix this SHIT... UP and MP sun4m configurations
                 * XXX have completely different layouts for the counter
                 * XXX registers. AIEEE!!!
                 */
index 1b9f03e..ab6259a 100644 (file)
@@ -230,7+230,7 @@ fwin_user_finish_up:
         * check routines in wof.S, these routines are free to use
         * any of the local registers they want to as this window
         * does not belong to anyone at this point, however the
-        * outs and ins are still verbotten as they are part of
+        * outs and ins are still verboten as they are part of
         * 'someone elses' window possibly.
         */
 
@@ -341,7+341,7 @@ C_LABEL(srmmu_fwin_stackchk):
        be      fwin_user_finish_up
         nop
 
-       /* Did I ever tell you about my window labotomy?
+       /* Did I ever tell you about my window lobotomy?
         * anyways... fwin_user_stack_is_bolixed expects
         * to be in window 'W' so make it happy or else
         * we watchdog badly.
index e070eac..fcd2dfc 100644 (file)
@@ -131,7+131,7 @@ unsigned long paging_init(unsigned long start_mem, unsigned long end_mem)
        };
 
        /* Initialize the protection map with non-constant values
-        * MMU dependant values.
+        * MMU dependent values.
         */
        protection_map[0] = PAGE_NONE;
        protection_map[1] = PAGE_READONLY;
index b5385e5..0b305d4 100644 (file)
@@ -721,7+721,7 @@ void srmmu_mapioaddr(unsigned long physaddr, unsigned long virt_addr, int bus_ty
        ptep = srmmu_pte_offset(pmdp, virt_addr);
        tmp = (physaddr >> 4) | SRMMU_ET_PTE;
 
-       /* I need to test whether this is consistant over all
+       /* I need to test whether this is consistent over all
         * sun4m's.  The bus_type represents the upper 4 bits of
         * 36-bit physical address on the I/O space lines...
         */
@@ -1278,7+1278,7 @@ void init_swift(void)
        mreg |= (SWIFT_IE | SWIFT_DE); /* I & D caches on */
 
        /* The Swift branch folding logic is completely broken.  At
-        * trap time, if things are just right, if can mistakedly
+        * trap time, if things are just right, if can mistakenly
         * thing that a trap is coming from kernel mode when in fact
         * it is coming from user mode (it misexecutes the branch in
         * the trap code).  So you see things like crashme completely
index 7475c70..6754f90 100644 (file)
@@ -482,7+482,7 @@ static inline void sun4c_demap_one(struct sun4c_mmu_ring *crp, unsigned char ctx
 }
 
 /* Using this method to free up mmu entries eliminates a lot of
- * potention races since we have a kernel that incurs tlb
+ * potential races since we have a kernel that incurs tlb
  * replacement faults.  There may be performance penalties.
  */
 static inline struct sun4c_mmu_entry *sun4c_user_strategy(void)
@@ -567,8+567,8 @@ static void sun4c_update_mmu_cache(struct vm_area_struct *vma, unsigned long add
 /* READ THIS:  If you put any diagnostic printing code in any of the kernel
  *             fault handling code you will lose badly.  This is the most
  *             delicate piece of code in the entire kernel, atomicity of
- *             kernel tlb replacement must be guarenteed.  This is why we
- *             have seperate user and kernel allocation rings to alleviate
+ *             kernel tlb replacement must be guaranteed.  This is why we
+ *             have separate user and kernel allocation rings to alleviate
  *             as many bad interactions as possible.
  *
  * XXX Someday make this into a fast in-window trap handler to avoid
index a69976f..e471898 100644 (file)
 #include <asm/openprom.h>
 #include <asm/oplib.h>
 
-/* This routine, for consistancy, returns the ram parameters in the
- * V0 prom memory descriptor format.  I choose this format becuase I
+/* This routine, for consistency, returns the ram parameters in the
+ * V0 prom memory descriptor format.  I choose this format because I
  * think it was the easiest to work with.  I feel the religious
  * arguments now... ;)  Also, I return the linked lists sorted to
- * prevent paging_init() upset stomache as I have not yet written
- * the pepto-bismal kernel module yet.
+ * prevent paging_init() upset stomach as I have not yet written
+ * the pepto-bismol kernel module yet.
  */
 
 struct linux_prom_registers prom_reg_memlist[64];
index c90b2c5..388f71a 100644 (file)
 
 /* Allocate a chunk of memory of size 'num_bytes' giving a suggestion
  * of virtual_hint as the preferred virtual base address of this chunk.
- * There are no guarentees that you will get the allocation, or that
+ * There are no guarantees that you will get the allocation, or that
  * the prom will abide by your "hint".  So check your return value.
  */
 char *
index 2bffd09..9488f17 100644 (file)
@@ -13,7+13,7 @@ else
   bool '   Use old disk-only driver on primary interface' CONFIG_BLK_DEV_HD_IDE
   bool '   Include IDE/ATAPI CDROM support' CONFIG_BLK_DEV_IDECD
   bool '   Include IDE/ATAPI TAPE support' CONFIG_BLK_DEV_IDETAPE
-  bool '   Support removeable IDE interfaces (PCMCIA)' CONFIG_BLK_DEV_IDE_PCMCIA
+  bool '   Support removable IDE interfaces (PCMCIA)' CONFIG_BLK_DEV_IDE_PCMCIA
   bool '   CMD640 chipset bugfix/support' CONFIG_BLK_DEV_CMD640
   if [ "$CONFIG_PCI" = "y" ]; then
     bool '   RZ1000 chipset bugfix/support' CONFIG_BLK_DEV_RZ1000
index 61d4fa1..9f4ddbe 100644 (file)
@@ -43,7+43,7 @@ NEW!  - support for secondary interface on the FGI/Holtek HT-6560B VLB i/f
 NEW!   - experimental support for various IDE chipsets
                - use appropriate kernel command line option from list below
 NEW!   - support for drives with a stuck WRERR_STAT bit
-NEW!   - support for removeable devices, including door lock/unlock
+NEW!   - support for removable devices, including door lock/unlock
 NEW!   - transparent support for DiskManager 6.0x and "Dynamic Disk Overlay"
        - works with Linux fdisk, LILO, loadlin, bootln, etc..
 NEW!   - mostly transparent support for EZ-Drive disk translation software
@@ -536,7+536,7 @@ Sleepy# hdparm -t /dev/hda
  Estimating raw driver speed: 16 MB in  2.51 seconds = 6.37 MB/sec
 
 > Not sure I was much help to you, but I'm glad to hear you got it
-> working--and pretty impressivly at that. :-)
+> working--and pretty impressively at that. :-)
 
 Mmm, well, about that... I've found that my Connor drive (/dev/hda) is
 pretty fast when I have my system configured like this. I'm still not
index 006f18e..050a92d 100644 (file)
  *                     from ioctl call. New drives added to black list.
  *
  *  Version 0.06       More code cleanup. Readahead is enabled only for
- *                     detected hard drives, not included in readahed
+ *                     detected hard drives, not included in readahead
  *                     black list.
  * 
  *  Version 0.07       Changed to more conservative drive tuning policy.
@@ -498,7+498,7 @@ static void set_readahead_mode(int mode, int if_num, int dr_num)
        if (mode)
                b &= ~mask;     /* Enable readahead for specific drive */
        else
-               b |= mask;      /* Disable readahed for specific drive */
+               b |= mask;      /* Disable readahead for specific drive */
        put_cmd640_reg(port, b);
 }              
 
index 45d894d..599c36c 100644 (file)
  */
 
 /*
- * 1995/10/18 -- Ralf Baechle -- Portability cleanup; move machine dependend
+ * 1995/10/18 -- Ralf Baechle -- Portability cleanup; move machine dependent
  * features to asm/floppy.h.
  */
 
@@ -2793,7+2793,7 @@ static int fd_copyout(void *param, const void *address, int size)
 
        ECALL(verify_area(VERIFY_WRITE,param,size));
        fd_cacheflush(address, size); /* is this necessary ??? */
-       /* Ralf: Yes; only the l2 cache is completly chipset
+       /* Ralf: Yes; only the l2 cache is completely chipset
           controlled */
        memcpy_tofs(param,(void *) address, size);
        return 0;
@@ -3270,7+3270,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
                        LOCK_FDC(drive,1);
 
                        /* do the actual eject. Fails on
-                        * non-Sparc archtitectures */
+                        * non-Sparc architectures */
                        ret=fd_eject(UNIT(drive)); 
 
                        /* switch the motor off, in order to make the
index 4f89120..ad9ef88 100644 (file)
  *
  *  Version 0.03        Some cleanups
  *
- * I reviewed some assembler sourcer listings of htide drivers and found
+ * I reviewed some assembler source listings of htide drivers and found
  * out how they setup those cycle time interfacing values, as they at Holtek
  * call them. IDESETUP.COM that is supplied with the drivers figures out
  * optimal values and fetches those values to drivers. I found out that
index abf23c9..10ab198 100644 (file)
  * 3.02  Sep 16, 1995 -- Stick total disk capacity in partition table as well.
  *                       Make VERBOSE_IDE_CD_ERRORS dump failed command again.
  *                       Dump out more information for ILLEGAL REQUEST errs.
- *                       Fix handling of errors occuring before the
+ *                       Fix handling of errors occurring before the
  *                        packet command is transferred.
  *                       Fix transfers with odd bytelengths.
  * 3.03  Oct 27, 1995 -- Some Creative drives have an id of just `CD'.
  *                       Switch to using MSF addressing for audio commands.
  *                       Reformat to match kernel tabbing style.
  *                       Add CDROM_GET_UPC ioctl.
+ * 3.10  Apr 10, 1996 -- Fix compilation error with STANDARD_ATAPI.
  *
  * NOTE: Direct audio reads will only work on some types of drive.
  * So far, i've received reports of success for Sony and Toshiba drives.
@@ -2110,7+2111,7 @@ int ide_cdrom_ioctl (ide_drive_t *drive, struct inode *inode,
 
        case CDROMSUBCHNL: {
                struct atapi_cdrom_subchnl scbuf;
-               int stat, msf_flag;
+               int stat;
                struct cdrom_subchnl subchnl;
 
                stat = verify_area (VERIFY_WRITE, (void *) arg,
@@ -2548,13+2549,13 @@ void ide_cdrom_setup (ide_drive_t *drive)
        else
                CDROM_CONFIG_FLAGS (drive)->drq_interrupt = 0;
 
+#if ! STANDARD_ATAPI
        CDROM_CONFIG_FLAGS (drive)->old_readcd = 0;
        CDROM_CONFIG_FLAGS (drive)->toctracks_as_bcd = 0;
        CDROM_CONFIG_FLAGS (drive)->tocaddr_as_bcd = 0;
        CDROM_CONFIG_FLAGS (drive)->playmsf_as_bcd = 0;
        CDROM_CONFIG_FLAGS (drive)->subchan_as_bcd = 0;
 
-#if ! STANDARD_ATAPI
        if (drive->id != NULL) {
                if (strcmp (drive->id->model, "V003S0DS") == 0 &&
                    drive->id->fw_rev[4] == '1' &&
index e2c4734..9804371 100644 (file)
  *                       Our data transfer buffer is allocated on startup,
  *                        rather than before each data transfer. This should
  *                        ensure that we will indeed have a data buffer.
- * Ver 1.1   Dec 14 95   Fixed random problems which occured when the tape
+ * Ver 1.1   Dec 14 95   Fixed random problems which occurred when the tape
  *                        shared an interface with another device.
  *                        (poll_for_dsc was a complete mess).
  *                       Removed some old (non-active) code which had
 typedef union {
        unsigned all                    :8;
        struct {
-               unsigned check          :1;     /* Error occured */
+               unsigned check          :1;     /* Error occurred */
                unsigned idx            :1;     /* Reserved */
-               unsigned corr           :1;     /* Correctable error occured */
+               unsigned corr           :1;     /* Correctable error occurred */
                unsigned drq            :1;     /* Data is request by the device */
                unsigned dsc            :1;     /* Set when a media access command is finished */
                                                /* Reads / Writes are NOT media access commands */
@@ -659,7+659,7 @@ typedef struct {
        unsigned bpu            :1;     /* Block Position Unknown */    
        unsigned reserved0_543  :3;     /* Reserved */
        unsigned eop            :1;     /* End Of Partition */
-       unsigned bop            :1;     /* Begining Of Partition */
+       unsigned bop            :1;     /* Beginning Of Partition */
        byte partition_num;             /* Partition Number */
        byte reserved_2;                /* Reserved */
        byte reserved_3;                /* Reserved */
@@ -701,14+701,14 @@ typedef struct {
        byte ascq;                      /* Additional Sense Code Qualifier */
        byte replaceable_unit_code;     /* Field Replaceable Unit Code */
        unsigned sk_specific1   :7;     /* Sense Key Specific */
-       unsigned sksv           :1;     /* Sense Key Specific informatio is valid */
+       unsigned sksv           :1;     /* Sense Key Specific information is valid */
        byte sk_specific2;              /* Sense Key Specific */
        byte sk_specific3;              /* Sense Key Specific */
        byte pad [2];                   /* Padding to 20 bytes */
 } idetape_request_sense_result_t;
 
 /*
- *     Follows structures which are realted to the SELECT SENSE / MODE SENSE
+ *     Follows structures which are related to the SELECT SENSE / MODE SENSE
  *     packet commands. Those packet commands are still not supported
  *     by ide-tape.
  */
@@ -1102,7+1102,7 @@ int idetape_identify_device (ide_drive_t *drive,struct hd_driveid *id)
                else
                        printk ("%d ns\n",id->eide_dma_min);
 
-               printk ("Manafactuer\'s Recommended Multi-word cycle: ");
+               printk ("Manufacturer\'s Recommended Multi-word cycle: ");
                if (id->eide_dma_time == 0)
                        printk ("Not supported\n");
                else
@@ -1143,7+1143,7 @@ int idetape_identify_device (ide_drive_t *drive,struct hd_driveid *id)
 
        if (gcw.drq_type != 2) {
                printk ("ide-tape: Sorry, DRQ types other than Accelerated DRQ\n");
-               printk ("ide-tape: are still not supproted by the driver\n");support=0;
+               printk ("ide-tape: are still not supported by the driver\n");support=0;
        }
 
        if (gcw.packet_size != 0) {
@@ -1288,8+1288,8 @@ void idetape_setup (ide_drive_t *drive)
         *      tape when its internal buffer is about 50% full. This will
         *      dramatically reduce our polling frequency and will also
         *      leave enough time for the ongoing request of the other device
-        *      to complete before the buffer is completly empty. We will
-        *      then completly refill the buffer with requests from our
+        *      to complete before the buffer is completely empty. We will
+        *      then completely refill the buffer with requests from our
         *      internal pipeline.
         *
         *      When operating in the non-pipelined operation mode, we
@@ -1425,7+1425,7 @@ void idetape_get_mode_sense_results (ide_drive_t *drive)
  *             interrupts will be issued.
  *
  *     3.      ATAPI Tape media access commands have immediate status with a
- *             delayed process. In case of a successfull initiation of a
+ *             delayed process. In case of a successful initiation of a
  *             media access packet command, the DSC bit will be set when the
  *             actual execution of the command is finished. 
  *             Since the tape drive will not issue an interrupt, we have to
@@ -2032,7+2032,7 @@ void idetape_put_back_postponed_request (ide_drive_t *drive)
        (void) ide_do_drive_cmd (drive, tape->postponed_rq, ide_next);
 
        /*
-        *      Note that the procedure done here is differnet than the method
+        *      Note that the procedure done here is different than the method
         *      we are using in idetape_queue_pc_head - There we are putting
         *      request(s) before our currently called request.
         *
@@ -3259,7+3259,7 @@ int idetape_add_chrdev_read_request (ide_drive_t *drive,int blocks,char *buffer)
 /*
  *     idetape_add_chrdev_write_request tries to add a character device
  *     originated write request to our pipeline. In case we don't succeed,
- *     we revert to non-piplined operation mode for this request.
+ *     we revert to non-pipelined operation mode for this request.
  *
  *     1.      Try to allocate a new pipeline stage.
  *     2.      If we can't, wait for more and more requests to be serviced
@@ -3626,7+3626,7 @@ void idetape_blkdev_release (struct inode *inode, struct file *filp, ide_drive_t
 /*
  *     Our character device read / write functions.
  *
- *     The tape is optimized to maximize throughput when it is transfering
+ *     The tape is optimized to maximize throughput when it is transferring
  *     an integral number of the "continuous transfer limit", which is
  *     a parameter of the specific tape (26 KB on my particular tape).
  *
@@ -3784,7+3784,7 @@ int idetape_chrdev_write (struct inode *inode, struct file *file, const char *bu
  *     Our character device ioctls.
  *
  *     General mtio.h magnetic io commands are supported here, and not in
- *     the correspoding block interface.
+ *     the corresponding block interface.
  *
  *     The following ioctls are supported:
  *
@@ -3798,7+3798,7 @@ int idetape_chrdev_write (struct inode *inode, struct file *file, const char *bu
  *
  *                     Note that we do not actually return the tape's
  *                     block size. Rather, we provide the recommended
- *                     number of bytes which sould be used as a "user
+ *                     number of bytes which should be used as a "user
  *                     block size" with the character device read/write
  *                     functions to maximize throughput.
  *
@@ -3893,7+3893,7 @@ int idetape_chrdev_ioctl (struct inode *inode, struct file *file, unsigned int c
  *     MTWEOF  -       Writes mt_count filemarks. Tape is positioned after
  *                     the last written filemark.
  *
- *     MTREW   -       Rewindes tape.
+ *     MTREW   -       Rewinds tape.
  *
  *     MTOFFL  -       Puts the tape drive "Offline": Rewinds the tape and
  *                     prevents further access until the media is replaced.
@@ -4221,7+4221,7 @@ int idetape_position_tape (ide_drive_t *drive,unsigned long block)
 }
 
 /*
- *     Rewinds the tape to the Begining Of the current Partition (BOP).
+ *     Rewinds the tape to the Beginning Of the current Partition (BOP).
  *
  *     We currently support only one partition.
  */ 
@@ -4331,7+4331,7 @@ idetape_pipeline_stage_t *idetape_kmalloc_stage (ide_drive_t *drive)
 }
 
 /*
- *     idetape_kfree_stage calls kfree to completly free a stage, along with
+ *     idetape_kfree_stage calls kfree to completely free a stage, along with
  *     its related buffers.
  */
  
index 0c1027f..ee71f66 100644 (file)
 #endif
 
 /*
- *     ide-tape currently uses two continous buffers, each of the size of
+ *     ide-tape currently uses two continuous buffers, each of the size of
  *     one stage. By default, those buffers are allocated at initialization
  *     time and never released, since dynamic allocation of pages bigger
  *     than PAGE_SIZE may fail as memory becomes fragmented.
@@ -344,7+344,7 @@ typedef struct idetape_buffer_head_s {
  */
 
 typedef struct idetape_pipeline_stage_s {
-       struct request rq;                              /* The correspoding request */
+       struct request rq;                              /* The corresponding request */
        idetape_buffer_head_t *bh;                      /* The data buffers */
        struct idetape_pipeline_stage_s *next,*prev;    /* Pointers to the next and previous stages */
 } idetape_pipeline_stage_t;
@@ -479,7+479,7 @@ typedef struct {
         */
        
        struct request *active_data_request;    /* Pointer to the request which is waiting in the device request queue */
-       char *data_buffer;                      /* The correspoding data buffer (for read/write requests) */
+       char *data_buffer;                      /* The corresponding data buffer (for read/write requests) */
        int data_buffer_size;                   /* Data buffer size (chosen based on the tape's recommendation */
 
        char *merge_buffer;                     /* Temporary buffer for user <-> kernel space data transfer */
index 3bd6c2c..63c52d6 100644 (file)
  *                     add flag to ignore WRERR_STAT for some drives
  *                      courtesy of David.H.West@um.cc.umich.edu
  *                     assembly syntax tweak to vlb_sync
- *                     removeable drive support from scuba@cs.tu-berlin.de
+ *                     removable drive support from scuba@cs.tu-berlin.de
  *                     add transparent support for DiskManager-6.0x "Dynamic
  *                      Disk Overlay" (DDO), most of this is in genhd.c
  *                     eliminate "multiple mode turned off" message at boot
  *  Version 4.10       fix bug in ioctl for "hdparm -c3"
  *                     fix DM6:DDO support -- now works with LILO, fdisk, ...
- *                     don't treat some naughty WD drives as removeable
+ *                     don't treat some naughty WD drives as removable
  *  Version 4.11       updated DM6 support using info provided by OnTrack
  *  Version 5.00       major overhaul, multmode setting fixed, vlb_sync fixed
  *                     added support for 3rd/4th/alternative IDE ports
@@ -330,7+330,7 @@ static void init_hwif_data (unsigned int index)
        hwif->ctl_port  = hwif->io_base ? hwif->io_base+0x206 : 0x000;
 #ifdef CONFIG_BLK_DEV_HD
        if (hwif->io_base == HD_DATA)
-               hwif->noprobe = 1; /* may be overriden by ide_setup() */
+               hwif->noprobe = 1; /* may be overridden by ide_setup() */
 #endif /* CONFIG_BLK_DEV_HD */
        hwif->major     = ide_hwif_to_major[index];
        hwif->name[0]   = 'i';
@@ -1783,7+1783,7 @@ static int ide_open(struct inode * inode, struct file * filp)
        if (drive->media == ide_tape)
                return idetape_blkdev_open (inode, filp, drive);
 #endif /* CONFIG_BLK_DEV_IDETAPE */
-       if (drive->removeable) {
+       if (drive->removable) {
                byte door_lock[] = {WIN_DOORLOCK,0,0,0};
                struct request rq;
                check_disk_change(inode->i_rdev);
@@ -1822,7+1822,7 @@ static void ide_release(struct inode * inode, struct file * file)
                        return;
                }
 #endif /* CONFIG_BLK_DEV_IDETAPE */
-               if (drive->removeable) {
+               if (drive->removable) {
                        byte door_unlock[] = {WIN_DOORUNLOCK,0,0,0};
                        struct request rq;
                        invalidate_buffers(inode->i_rdev);
@@ -2107,7+2107,7 @@ static int ide_check_media_change (kdev_t i_rdev)
        if (drive->media == ide_cdrom)
                return ide_cdrom_check_media_change (drive);
 #endif /* CONFIG_BLK_DEV_IDECD */
-       if (drive->removeable) /* for disks */
+       if (drive->removable) /* for disks */
                return 1;       /* always assume it was changed */
        return 0;
 }
@@ -2195,7+2195,7 @@ static inline void do_identify (ide_drive_t *drive, byte cmd)
                                printk ("CDROM drive\n");
                                drive->media = ide_cdrom;
                                drive->present = 1;
-                               drive->removeable = 1;
+                               drive->removable = 1;
                                return;
 #else
                                printk ("CDROM ");
@@ -2207,7+2207,7 @@ static inline void do_identify (ide_drive_t *drive, byte cmd)
                                if (idetape_identify_device (drive,id)) {
                                        drive->media = ide_tape;
                                        drive->present = 1;
-                                       drive->removeable = 1;
+                                       drive->removable = 1;
                                        if (drive->autotune != 2 && HWIF(drive)->dmaproc != NULL) {
                                                if (!HWIF(drive)->dmaproc(ide_dma_check, drive))
                                                        printk(", DMA");
@@ -2234,15+2234,15 @@ static inline void do_identify (ide_drive_t *drive, byte cmd)
        }
 #endif /* CONFIG_BLK_DEV_IDEATAPI */
 
-       /* check for removeable disks (eg. SYQUEST), ignore 'WD' drives */
-       if (id->config & (1<<7)) {      /* removeable disk ? */
+       /* check for removable disks (eg. SYQUEST), ignore 'WD' drives */
+       if (id->config & (1<<7)) {      /* removable disk ? */
                if (id->model[0] != 'W' || id->model[1] != 'D')
-                       drive->removeable = 1;
+                       drive->removable = 1;
        }
 
-       /* SunDisk drives: treat as non-removeable, force one unit */
+       /* SunDisk drives: treat as non-removable, force one unit */
        if (id->model[0] == 'S' && id->model[1] == 'u') {
-               drive->removeable = 0;
+               drive->removable = 0;
                if (drive->select.all & (1<<4)) {
                    drive->present = 0;
                    return;
@@ -2462,7+2462,7 @@ static int do_probe (ide_drive_t *drive, byte cmd)
 }
 
 /*
- * probe_for_drive() tests for existance of a given drive using do_probe().
+ * probe_for_drive() tests for existence of a given drive using do_probe().
  *
  * Returns:    0  no device was found
  *             1  device was found (note: drive->present might still be 0)
index e80dba5..4a664e7 100644 (file)
@@ -309,7+309,7 @@ typedef struct ide_drive_s {
        unsigned noprobe        : 1;    /* from:  hdx=noprobe */
        unsigned keep_settings  : 1;    /* restore settings after drive reset */
        unsigned busy           : 1;    /* currently doing revalidate_disk() */
-       unsigned removeable     : 1;    /* 1 if need to do check_media_change */
+       unsigned removable      : 1;    /* 1 if need to do check_media_change */
        unsigned using_dma      : 1;    /* disk is using dma for read/write */
        unsigned forced_geom    : 1;    /* 1 if hdx=c,h,s was given at boot */
        unsigned unmask         : 1;    /* flag: okay to unmask other irqs */
@@ -420,7+420,7 @@ typedef struct hwif_s {
        unsigned        no_unmask  : 1; /* disallow setting unmask bits */
        unsigned        got_irq    : 1; /* 1 = already alloc'd our irq */
 #ifdef CONFIG_BLK_DEV_PROMISE
-       unsigned        is_promise2: 1; /* 2nd i/f on promose DC4030 */
+       unsigned        is_promise2: 1; /* 2nd i/f on promise DC4030 */
 #endif /* CONFIG_BLK_DEV_PROMISE */
 #if (DISK_RECOVERY_TIME > 0)
        unsigned long   last_time;      /* time when previous rq was done */
@@ -621,7+621,7 @@ void ide_cdrom_setup (ide_drive_t *);
  *     idetape_identify_device is called during device probing stage to
  *     probe for an ide atapi tape drive and to initialize global variables
  *     in ide-tape.c which provide the link between the character device
- *     and the correspoding block device.
+ *     and the corresponding block device.
  *
  *     Returns 1 if an ide tape was detected and is supported.
  *     Returns 0 otherwise.
index a73cc5a..b89a990 100644 (file)
@@ -41,7+41,7 @@ static int linear_run (int minor, struct md_dev *mddev)
 
   /*
      Find out the smallest device. This was previously done
-     at registery time, but since it violates modularity,
+     at registry time, but since it violates modularity,
      I moved it here... Any comment ? ;-)
    */
 
@@ -63,7+63,7 @@ static int linear_run (int minor, struct md_dev *mddev)
   {
     data->hash_table[i].dev0=devices[minor]+cur;
 
-    if (size>=data->smallest->size) /* If we completly fill the slot */
+    if (size>=data->smallest->size) /* If we completely fill the slot */
     {
       data->hash_table[i++].dev1=NULL;
       size-=data->smallest->size;
index 2ee0e12..945f0ef 100644 (file)
@@ -468,9+468,8 @@ void ll_rw_page(int rw, kdev_t dev, unsigned long page, char * buffer)
                default:
                        panic("ll_rw_page: bad block dev cmd, must be R/W");
        }
-       if (mem_map[MAP_NR(buffer)].locked)
+       if (set_bit(PG_locked, &mem_map[MAP_NR(buffer)].flags))
                panic ("ll_rw_page: page already locked");
-       mem_map[MAP_NR(buffer)].locked = 1;
        brw_page(rw, (unsigned long) buffer, dev, &block, PAGE_SIZE, 0);
 }
 
@@ -636,7+635,7 @@ int blk_dev_init(void)
        loop_init();
 #endif
 #ifdef CONFIG_BLK_DEV_IDE
-       ide_init();             /* this MUST preceed hd_init */
+       ide_init();             /* this MUST precede hd_init */
 #endif
 #ifdef CONFIG_BLK_DEV_HD
        hd_init();
index ce9c638..64c5d3f 100644 (file)
@@ -167,7+167,7 @@ static int md_ioctl (struct inode *inode, struct file *file,
     devices[minor][index].dev=dev;
 
     /* Lock the device by inserting a dummy inode. This doesn't
-       smeel very good, but I need to be consistent with the
+       smell very good, but I need to be consistent with the
        mount stuff, specially with fs_may_mount. If someone have
        a better idea, please help ! */
     
@@ -177,7+177,7 @@ static int md_ioctl (struct inode *inode, struct file *file,
     insert_inode_hash (devices[minor][index].inode);
     
     /* Devices sizes are rounded to a multiple of page (needed for
-       paging). This is NOT done by fdisk when partitionning,
+       paging). This is NOT done by fdisk when partitioning,
        but that's a DOS thing anyway... */
     
     devices[minor][index].size=gen_real->sizes[MINOR(dev)] & ~((PAGE_SIZE >> 10)-1);
@@ -347,7+347,7 @@ static int md_open (struct inode *inode, struct file *file)
   int minor=MINOR(inode->i_rdev);
 
   md_dev[minor].busy++;
-  return (0);                  /* Always succed */
+  return (0);                  /* Always succeed */
 }
 
 
@@ -428,13+428,13 @@ static void do_md_request (void)
 
     switch (remap_request (minor, req))
     {
-      case REDIRECTED_BHREQ:   /* Allright, redirection was succesful */
+      case REDIRECTED_BHREQ:   /* All right, redirection was successful */
       req->rq_status=RQ_INACTIVE;
       wake_up (&wait_for_request);
       break;
 
       case REDIRECTED_REQ:
-      break;                   /* Redirected whole request (for swaping) */
+      break;                   /* Redirected whole request (for swapping) */
       
       case REDIRECT_FAILED:    /* Swap redirection failed in RAID-[15] */
       end_request (0, req);
index 94d2dc5..75bca7e 100644 (file)
@@ -130,7+130,7 @@ static int raid0_run (int minor, struct md_dev *mddev)
   {
     data->hash_table[i].zone0=data->strip_zone+cur;
 
-    if (size>=data->smallest->size)/* If we completly fill the slot */
+    if (size>=data->smallest->size)/* If we completely fill the slot */
     {
       data->hash_table[i++].zone1=NULL;
       size-=data->smallest->size;
index 2a8a583..c70f1ac 100644 (file)
  * #define UMC_DRIVE0 11
  * in the beginning of the driver, which sets the speed of drive 0 to 11 (there
  * are some lines present). 0 - 11 are allowed speed values. These values are
- * the results from the DOS speed test programm supplied from UMC. 11 is the 
+ * the results from the DOS speed test program supplied from UMC. 11 is the 
  * highest speed (about PIO mode 3)
  */
 #undef REALLY_SLOW_IO          /* most systems can safely undef this */
index 1a25122..325c85e 100644 (file)
@@ -696,7+696,7 @@ static int aztcd_ioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsi
                              ms.addr.msf.frame, DiskInfo.lastSession.min,
                              DiskInfo.lastSession.sec, DiskInfo.lastSession.frame);
                  else
-                     printk("atzcd multisession %d, lba:0x%08x [%02x:%02x.%02x])\n",
+                     printk("aztcd multisession %d, lba:0x%08x [%02x:%02x.%02x])\n",
                              ms.xa_flag, ms.addr.lba, DiskInfo.lastSession.min,
                              DiskInfo.lastSession.sec, DiskInfo.lastSession.frame);
 #endif
index 2996fdb..09861b9 100644 (file)
@@ -268,7+268,7 @@ static void cm206_interrupt(int sig, void *dev_id, struct pt_regs * regs) /* you
       stats(sync_error);
     }
     else if (cd->intr_ds & ds_toc_ready) {
-                               /* do something appropiate */
+                               /* do something appropriate */
     }
     /* couldn't see why this interrupt, maybe due to init */
     else {                     
index 85f624e..cda5fc5 100644 (file)
@@ -994,7+994,7 @@ int gscd_init (void)
 }
 
 
-/* This is the common initalisation for the GoldStar drive. */
+/* This is the common initialisation for the GoldStar drive. */
 /* It is called at boot time AND for module init.           */
 int my_gscd_init (void)
 {
index 98183d9..e529c07 100644 (file)
        I added code for FX001 D to drop from double speed to single speed 
        when encountering errors... this helps with some "problematic" CD's
        that are supposedly "OUT OF TOLERANCE" (but are really shitty presses!)
-       severly scratched, or possibly slightly warped! I have noticed that
+       severely scratched, or possibly slightly warped! I have noticed that
        the Mitsumi 2x/4x drives are just less tolerant and the firmware is 
        not smart enough to drop speed, so let's just kludge it with software!
        ****** THE 4X SPEED MITSUMI DRIVES HAVE THE SAME PROBLEM!!!!!! ******
        Anyone want to "DONATE" one to me?! ;) I hear sometimes they are
        even WORSE! ;)
-       ** HINT... HINT... TAKE NOTES MITSUMI This could save some hassels with
+       ** HINT... HINT... TAKE NOTES MITSUMI This could save some hassles with
        certain "large" CD's that have data on the outside edge in your 
        DOS DRIVERS .... Accuracy counts... speed is secondary ;)
        17 June 95 Modifications By Andrew J. Kroll <ag784@freenet.buffalo.edu>
@@ -719,7+719,7 @@ mcd_poll(void)
        if (mcdDouble == 1 && McdTries == MCD_RETRY_ATTEMPTS && MCMD_DATA_READ == MCMD_2X_READ) 
                {
                MCMD_DATA_READ = MCMD_PLAY_READ; /* Uhhh, Ummmm, muhuh-huh! */
-               mcd1xhold = SINGLE_HOLD_SECTORS; /* Hey Bevis! */
+               mcd1xhold = SINGLE_HOLD_SECTORS; /* Hey Beavis! */
                printk(" Speed now 1x");         /* Pull my finger! */
                }
        }
index 7908199..68daeba 100644 (file)
  *  Jon Tombs, Bjorn Ekwall (module support)
  *  Daniel v. Mosnenck (he sent me the Technical and Programming Reference)
  *  Gerd Knorr (he lent me his PhotoCD)
- *  Nils Faerber and Roger E. Wolff (extensivly tested the LU portion)
+ *  Nils Faerber and Roger E. Wolff (extensively tested the LU portion)
  *  Andreas Kies (testing the mysterious hang up's)
  *  ... somebody forgotten?
  *  
@@ -130,7+130,7 @@ struct s_version {
 /* Per drive/controller stuff **************************************/
 
 struct s_drive_stuff {
-       /* waitquenes */
+       /* waitqueues */
     struct wait_queue *busyq;
     struct wait_queue *lockq;
     struct wait_queue *sleepq;
@@ -145,7+145,7 @@ struct s_drive_stuff {
        /* cd infos */
        struct s_diskinfo di;
        struct s_multi multi;
-       struct s_subqcode* toc; /* first enty of the toc array */
+       struct s_subqcode* toc; /* first entry of the toc array */
        struct s_subqcode start;
     struct s_subqcode stop;
        int xa;                                 /* 1 if xa disk */
@@ -592,7+592,7 @@ void do_mcdx_request()
                                      CURRENT->sector,
                                      CURRENT->nr_sectors))) {
               /*INFO(("do_request() read error\n"));*/
-                         xwarn("do_requst() read error\n");
+                         xwarn("do_request() read error\n");
               if (stuffp->status & MCDX_ST_EOM) {
                   CURRENT->sector += CURRENT->nr_sectors;
                   CURRENT->nr_sectors = 0;
@@ -636,7+636,7 @@ mcdx_open(struct inode *ip, struct file *fp)
     from the hardware status register). 
     If the last eject is too recent, an autoclose wouldn't probably
     be what we want ..., if we can't read the CD after an autoclose
-    no further autclose's will be tried */
+    no further autocloses will be tried */
        if (inb((unsigned int) stuffp->rreg_status) & MCDX_RBIT_DOOR) {
         if (jiffies - stuffp->ejected < ACLOSE_INHIBIT) return -EIO;
         if (stuffp->autoclose) mcdx_closedoor(stuffp, 1);
@@ -847,7+847,7 @@ void mcdx_setup(char *str, int *pi)
 static void mcdx_delay(struct s_drive_stuff *stuff, long jifs)
 /*     This routine is used for sleeping.
        May be we could use a simple count loop w/ jumps to itself, but 
-       I wanna make this independend of cpu speed. [1 jiffie is 1/HZ] sec */
+       I wanna make this independent of cpu speed. [1 jiffy is 1/HZ] sec */
 {
     unsigned long tout = jiffies + jifs;
     if (jifs < 0) return;
@@ -899,7+899,7 @@ mcdx_intr(int irq, void *dev_id, struct pt_regs* regs)
                        xinfo(  "intr() irq %d    status 0x%02x\n", 
                                        irq, inb((unsigned int) stuffp->rreg_data));
                } else {
-                       xinfo(  "intr() irq %d ambigous hw status\n", irq);
+                       xinfo(  "intr() irq %d ambiguous hw status\n", irq);
                }
        } else {
                TRACE((IRQ, "irq() irq %d ok, status %02x\n", irq, b));
@@ -925,9+925,9 @@ mcdx_talk (
 {
        int st;
     char c;
-    int disgard;
+    int discard;
 
-    if ((disgard = (buffer == NULL))) buffer = &c;
+    if ((discard = (buffer == NULL))) buffer = &c;
 
     while (stuffp->lock) {
                interruptible_sleep_on(&stuffp->lockq); 
@@ -966,7+966,7 @@ mcdx_talk (
         }
         st = *bp;
         sz--;
-        if (!disgard) bp++;
+        if (!discard) bp++;
 
         TRACE((TALK, "talk() got status 0x%02x\n", st));
 
@@ -999,7+999,7 @@ mcdx_talk (
                         cmd[0], tries - 1, tries == 2 ? "y" : "ies"));
                 st = -1; break;
             }
-            if (!disgard) bp++;
+            if (!discard) bp++;
             TRACE((TALK, "talk() got 0x%02x\n", *(bp - 1)));
         }
     }
@@ -1080,7+1080,7 @@ void trace(int level, const char* fmt, ...)
        if (level < 1) return;
        va_start(args, fmt);
        if (sizeof(s) < vsprintf(s, fmt, args))
-               printk(MCDX ":: dprintf exeeds limit!!\n");
+               printk(MCDX ":: dprintf exceeds limit!!\n");
        else printk(MCDX ":: %s", s);
        va_end(args);
 }
@@ -1092,7+1092,7 @@ void warn(const char* fmt, ...)
        va_list args;
        va_start(args, fmt);
        if (sizeof(s) < vsprintf(s, fmt, args))
-               printk(MCDX ":: dprintf exeeds limit!!\n");
+               printk(MCDX ":: dprintf exceeds limit!!\n");
        else printk(MCDX ": %s", s);
        va_end(args);
 }
@@ -1265,7+1265,7 @@ static int
 mcdx_transfer(struct s_drive_stuff *stuffp,
                char *p, int sector, int nr_sectors)
 /*     This seems to do the actually transfer.  But it does more.  It
-       keeps track of errors ocurred and will (if possible) fall back
+       keeps track of errors occurred and will (if possible) fall back
        to single speed on error. 
        Return: -1 on timeout or other error
                        else status byte (as in stuff->st) */
@@ -1279,7+1279,7 @@ mcdx_transfer(struct s_drive_stuff *stuffp,
        else return ans;
 
        if (stuffp->readerrs && stuffp->readcmd == READ1X) {
-               WARN(("XXX Alrady reading 1x -- no chance\n"));
+               WARN(("XXX Already reading 1x -- no chance\n"));
                return -1;
        }
 
@@ -1327,7+1327,7 @@ static int mcdx_xfer(struct s_drive_stuff *stuffp,
 
        do {
                /* wait for the drive become idle, but first
-                  check for possible occured errors --- the drive
+                  check for possible occurred errors --- the drive
                   seems to report them asynchronously */
 
            current->timeout = jiffies + 5 * HZ;
index 22e6943..1241920 100644 (file)
  *  1.5 Module support and bugfixes.
  *      Tray locking.
  *  1.6 Removed ISP16 code from this driver.
- *      Allow only to set io base address on comand line: sjcd=<io_base>
+ *      Allow only to set io base address on command line: sjcd=<io_base>
  *      Changes to Documentation/cdrom/sjcd
  *      Added cleanup after any error in the initialisation.
  *
@@ -329,7+329,7 @@ static int sjcd_check_status( void ){
 }
 
 /*
- * This is just timout counter, and nothing more. Surprized ? :-)
+ * This is just timeout counter, and nothing more. Surprised ? :-)
  */
 static volatile long sjcd_status_timeout;
 
@@ -528,7+528,7 @@ static int sjcd_update_toc( void ){
   }
 
   /*
-   * Get the disk lenght info.
+   * Get the disk length info.
    */
   sjcd_send_1_cmd( SCMD_GET_DISK_INFO, SCMD_GET_D_SIZE );
   sjcd_receive_status();
@@ -1023,7+1023,7 @@ static void sjcd_poll( void ){
   case SJCD_S_READ:{
     if( sjcd_status_valid ? 1 : sjcd_check_status() ){
       /*
-       * Previos command is completed.
+       * Previous command is completed.
        */
       if( !sjcd_status_valid || sjcd_command_failed ){
 #if defined( SJCD_TRACE )
@@ -1146,7+1146,7 @@ static void sjcd_poll( void ){
 
       /*
        * Everything seems to be OK. Just read the frame and recalculate
-       * indecis.
+       * indices.
        */
       sjcd_buf_bn[ sjcd_buf_in ] = -1; /* ??? */
       insb( SJCDPORT( 2 ), sjcd_buf + 2048 * sjcd_buf_in, 2048 );
@@ -1272,7+1272,7 @@ static void do_sjcd_request( void ){
   sjcd_transfer_is_active = 1;
   while( CURRENT_IS_VALID ){
     /*
-     * Who of us are paranoic?
+     * Who of us are paranoiac?
      */
     if( CURRENT->bh && !buffer_locked(CURRENT->bh) )
       panic( DEVICE_NAME ": block not locked" );
index 8fef2e7..08f5749 100644 (file)
@@ -17,7+17,7 @@ Wed Jan 10 10:08:00 1996    <tytso@rsts-11.mit.edu>
                decremented.
 
        * serial.c (startup, rs_open): Remove race condition that could
-               cuase a memory leak of one page.  (Fortunately, both race
+               cause a memory leak of one page.  (Fortunately, both race
                conditions were relatively rare in practice.)
 
 Tue Dec  5 13:21:27 1995    <tytso@rsts-11.mit.edu>
index d56322e..9a78c2f 100644 (file)
@@ -222,7+222,7 @@ unsigned char inverse_translate(int glyph) {
  *
  * The "old" variants are for translation directly to font (using the
  * 0xf000-0xf0ff "transparent" Unicodes) whereas the "new" variants set
- * Unicodes explictly.
+ * Unicodes explicitly.
  */
 int con_set_trans_old(unsigned char * arg)
 {
index 21dfc2e..72196a9 100644 (file)
@@ -326,7+326,7 @@ static unsigned char *cy_isa_addresses[] = {
 /* This is the per-card data structure containing address, irq, number of
    channels, etc. This driver supports a maximum of NR_CARDS cards. If
    you need to install more boards, change this constant in the definition
-   bellow. No other change is necesary to support more boards. */
+   bellow. No other change is necessary to support more boards. */
 
 #define NR_CARDS       4
 
@@ -2836,7+2836,7 @@ cy_init(void)
     /* the code below is responsible to find the boards. Each different
        type of board has its own detection routine. If a board is found,
        the next cy_card structure available is set by the detection
-       routine. These funcions are responsible for checking the availability
+       routine. These functions are responsible for checking the availability
        of cy_card and cy_port data structures and updating the
        cy_next_channel. */
 
index a106091..03393dc 100644 (file)
 #       FDC_BASE        - sets base address (only!) if using non-standard fdc
 #       FDC_IRQ         - sets interrupt if FDC_BASE is defined
 #       FDC_DMA         - sets dma channel if FDC_BASE is defined
-#       MACH2           - Support for Mountain MACH-2 contoller at either 1E0
+#       MACH2           - Support for Mountain MACH-2 controller at either 1E0
 #                         or 3E0, don't forget the FDC_OPT's !
 #      CLK_48MHZ       - Set to 1. If you have a i82078-1 FDC and it does not
 #                        work, try setting it to 0. (only used for i82078-1's)
index 690c61e..b3b98b6 100644 (file)
@@ -62,7+62,7 @@ kernel deadlock (which is worse than a panic).
 - QIC-3020/TR-3: 1Mbps support works.  Neal is capable of reading and
   writing data to a tape.  ftape will automatically detect the type of
   tape (e.g. TR-3 vs QIC-80) and move the fdc in and out of
-  "perpendicular mode" as neccesarry.
+  "perpendicular mode" as necessary.
 - 2Mbps support is disabled by default, since it is not fully
   debugged.  If you are adventurous, remove -DFDC_82078SL in the
   Makefile and see what happens :-)
@@ -273,7+273,7 @@ a segment proves to be unrecoverable and then skips the
 bad segment.
 This causes most applications to continue to work (tar
 and afio) loosing only a small amount (up to 29 Kb) of data.
-Retried read operations will now be done slighly off-track
+Retried read operations will now be done slightly off-track
 to improve the chance of success. Serious head off-track
 errors will be detected.
 
@@ -290,7+290,7 @@ values.
 
 Kernels and compilers
 ---------------------
-Ftape is currently being developped using the 2.5.8 compiler.
+Ftape is currently being developed using the 2.5.8 compiler.
 The older 2.4.5 probably works too (Set option in Makefile!).
 I have no experience with any later compilers nor Elf support.
 Any information on this is welcome.
@@ -372,7+372,7 @@ Bas.
 
 ===== Release notes for ftape-2.02d, 30/04/95 =====
 
-- Improved abortion on signals: Interrupt will make a gracefull
+- Improved abortion on signals: Interrupt will make a graceful
   exit, Kill will be less nice and should be used if everything
   else fails.
 - Included check for tape-head off track.
@@ -541,7+541,7 @@ Major new features:
   The error correction code can handle up to three of these hard
   errors provided there are no other errors in that segment (32 Kb).
   
-- Allows writing to tapes with defects (although the risc of loosing
+- Allows writing to tapes with defects (although the risk of loosing
   data increases !)
   Look for the media-defects entry printed with the statistics when
   the tape is closed. A non-zero value here shows a bad tape.
index c079aa9..d18d650 100644 (file)
 
    Modified to use an array of addresses and generally cleaned up (made
    much shorter) 4 June 94, dosemu isn't that good at writing short code it
-   would seem :-). Made independant of 0x180, but I doubt it will work
+   would seem :-). Made independent of 0x180, but I doubt it will work
    at any other address.
 
    Modified for distribution with ftape source. 21 June 94, SJL.
index 0159f87..2c5ff53 100644 (file)
@@ -61,7+61,7 @@ static int fdc_data_rate = 0; /* default rate = 500 Kbps */
 static int fdc_seek_rate = 14; /* default rate = 2 msec @ 500 Kbps */
 static void (*do_ftape) (void);
 static int fdc_fifo_state;     /* original fifo setting - fifo enabled */
-static int fdc_fifo_thr;       /* original fifo setting - thresshold */
+static int fdc_fifo_thr;       /* original fifo setting - threshold */
 static int fdc_lock_state;     /* original lock setting - locked */
 static int fdc_fifo_locked = 0;        /* has fifo && lock set ? */
 static byte fdc_precomp = 0;   /* sets fdc to default precomp. value */
@@ -854,7+854,7 @@ int setup_fdc_and_dma(buffer_struct * buff, unsigned char operation)
        set_dma_count(fdc.dma, SECTOR_SIZE * buff->sector_count);
 #ifdef GCC_2_4_5_BUG
        /*  This seemingly stupid construction confuses the gcc-2.4.5
-        *  code generater enough to create correct code.
+        *  code generator enough to create correct code.
         */
        if (1) {
                int i;
@@ -920,7+920,7 @@ int fdc_fifo_enable(void)
                        fdc_fifo_state = (reg[8] & 0x20) == 0;
                        fdc_lock_state = reg[7] & 0x80;
                        fdc_fifo_thr = 1 + (reg[8] & 0x0f);
-                       TRACEx3(5, "original fifo state: %sabled, thresshold %d, %slocked",
+                       TRACEx3(5, "original fifo state: %sabled, threshold %d, %slocked",
                                (fdc_fifo_state) ? "en" : "dis",
                           fdc_fifo_thr, (fdc_lock_state) ? "" : "not ");
                        /*  If fdc is already locked, unlock it first !
@@ -933,7+933,7 @@ int fdc_fifo_enable(void)
                                        result = -EIO;
                                }
                        }
-                       /*  Enable fifo and set thresshold at xx bytes to allow a
+                       /*  Enable fifo and set threshold at xx bytes to allow a
                         *  reasonably large latency and reduce number of dma bursts.
                         */
                        fdc_ready_wait(100);
index 7c9056c..75cb8d5 100644 (file)
@@ -291,7+291,7 @@ static void determine_progress(buffer_struct * buff, error_cause cause, int mode
        /*  Sector_offset points to the problem area, except if we got
         *  a data_crc_error. In that case it points one past the failing
         *  sector.
-        *  Now adjust sector_offset so it allways points one past he
+        *  Now adjust sector_offset so it always points one past he
         *  failing sector. I.e. skip the bad sector.
         */
        if (cause != no_error) {
@@ -495,7+495,7 @@ find_resume_point(buffer_struct * buff)
         *  If there are any soft errors before the failing sector,
         *  find the first soft error and return the sector offset.
         *  Otherwise find the last hard error.
-        *  Note: there should allways be at least one hard or soft error !
+        *  Note: there should always be at least one hard or soft error !
         */
        if (buff->sector_offset < 1 || buff->sector_offset > 32) {
                TRACEx1(1, "bug: sector_offset = %d", buff->sector_offset);
@@ -732,7+732,7 @@ fdc_isr(void)
                                                                if (in[1] & 0x02) {
                                                                        TRACE(1, "media not writable");
                                                                } else {
-                                                                       TRACE(-1, "unforseen write error");
+                                                                       TRACE(-1, "unforeseen write error");
                                                                }
                                                                fdc_mode = fdc_idle;
                                                                break;
@@ -757,7+757,7 @@ fdc_isr(void)
                        ++expected_stray_interrupts;
                }
        } else { /* !FDC_BUSY  */
-               /*  clear interrupt, cause should be gotten by issueing
+               /*  clear interrupt, cause should be gotten by issuing
                 *  a Sense Interrupt Status command.
                 */
                if (fdc_mode == fdc_recalibrating || fdc_mode == fdc_seeking) {
index d4e86eb..7f6b9da 100644 (file)
@@ -841,7+841,7 @@ void ftape_init_driver(void)
        drive_type.vendor_id = UNKNOWN_VENDOR;
        drive_type.speed = 0;
        drive_type.wake_up = unknown_wake_up;
-       drive_type.name = "Unkown";
+       drive_type.name = "Unknown";
 
        timeout.seek = 650 * SECOND;
        timeout.reset = 670 * SECOND;
index 822a323..63c1499 100644 (file)
@@ -951,7+951,7 @@ int ftape_wakeup_drive(wake_up_types method)
        default:
                result = -ENODEV;       /* unknown wakeup method */
        }
-       /*  If wakeup succeeded we should't get and error here..
+       /*  If wakeup succeeded we shouldn't get and error here..
         */
        if (result == 0) {
                result = ftape_report_raw_drive_status(&status);
index 2a539a2..f1e0c10 100644 (file)
@@ -529,7+529,7 @@ static int validate(int id)
         *  if off-track the error will be approximately 2 * segments_per_track.
         */
        if (location.track == -1) {
-               return 1;       /* unforseen situation, don't generate error */
+               return 1;       /* unforeseen situation, don't generate error */
        } else {
                /*  Use margin of segments_per_track on both sides because ftape
                 *  needs some margin and the error we're looking for is much larger !
index 1054c62..983a1ed 100644 (file)
@@ -96,7+96,7 @@ typedef struct {
         */
        volatile unsigned remaining;
 
-       /* points to next segment (contigious) to be handled,
+       /* points to next segment (contiguous) to be handled,
         * or is zero if no read-ahead is allowed.
         */
        volatile unsigned next_segment;
index 8c40e27..9eb9bb6 100644 (file)
@@ -261,7+261,7 @@ typedef struct {
   /*27*/ { "Software Reset Occurred", 0, },\
   /*28*/ { "Diagnostic Mode 1 Error", 1, },\
   /*29*/ { "Diagnostic Mode 2 Error", 1, },\
-  /*30*/ { "Command Received During Non-Interruptable Process", 1, },\
+  /*30*/ { "Command Received During Non-Interruptible Process", 1, },\
   /*31*/ { "Rate or Format Selection Error", 1, },\
   /*32*/ { "Illegal Command While in High Speed Mode", 1, },\
   /*33*/ { "Illegal Seek Segment Value", 1, },\
index f4c58d4..db176fa 100644 (file)
@@ -130,8+130,8 @@ static int  stli_nrbrds = sizeof(stli_brdconf) / sizeof(stlconf_t);
  *     catch is that the kernel functions required to do this are not
  *     normally exported symbols, so you will have to do some extra work
  *     for this to be used in the loadable module form of the driver.
- *     Unfortunately this doesn't work either if you linke the driver into
- *     the kernel, sincethe memory management code is not set up early
+ *     Unfortunately this doesn't work either if you linked the driver into
+ *     the kernel, since the memory management code is not set up early
  *     enough (before our initialization routine is run).
  */
 #define        STLI_HIMEMORY   0
@@ -152,7+152,7 @@ static int  stli_nrbrds = sizeof(stli_brdconf) / sizeof(stlconf_t);
 
 /*
  *     Define some important driver characteristics. Device major numbers
- *     allocated as per Linux Device Registery.
+ *     allocated as per Linux Device Registry.
  */
 #ifndef        STL_SIOMEMMAJOR
 #define        STL_SIOMEMMAJOR         28
@@ -329,7+329,7 @@ static int          stli_shared = 0;
 /*
  *     Per board state flags. Used with the state field of the board struct.
  *     Not really much here... All we need to do is keep track of whether
- *     the board has been detected, and whether it is actully running a slave
+ *     the board has been detected, and whether it is actually running a slave
  *     or not.
  */
 #define        BST_FOUND       0x1
@@ -415,7+415,7 @@ int         stli_eisaprobe = STLI_EISAPROBE;
 
 /*
  *     Hardware configuration info for ECP boards. These defines apply
- *     to the directly accessable io ports of the ECP. There is a set of
+ *     to the directly accessible io ports of the ECP. There is a set of
  *     defines for each ECP board type, ISA, EISA and MCA.
  */
 #define        ECP_IOSIZE      4
@@ -472,7+472,7 @@ int         stli_eisaprobe = STLI_EISAPROBE;
 
 /*
  *     Hardware configuration info for ONboard and Brumby boards. These
- *     defines apply to the directly accessable io ports of these boards.
+ *     defines apply to the directly accessible io ports of these boards.
  */
 #define        ONB_IOSIZE      16
 #define        ONB_MEMSIZE     (64 * 1024)
@@ -910,7+910,7 @@ static int stli_open(struct tty_struct *tty, struct file *filp)
 /*
  *     On the first open of the device setup the port hardware, and
  *     initialize the per port data structure. Since initializing the port
- *     requires serval commands to the board we will need to wait for any
+ *     requires several commands to the board we will need to wait for any
  *     other open that is already initializing the port.
  */
        portp->tty = tty;
@@ -1470,9+1470,9 @@ static int stli_write(struct tty_struct *tty, int from_user, const unsigned char
  *     big problem is that we do not want shared memory enabled when we are
  *     sleeping (other boards may be serviced while asleep). Something else
  *     to note here is the reading of the tail twice. Since the boards
- *     shared memory can be on an 8-bit bus then we need to be very carefull
+ *     shared memory can be on an 8-bit bus then we need to be very careful
  *     reading 16 bit quantities - since both the board (slave) and host
- *     cound be writing and reading at the same time.
+ *     could be writing and reading at the same time.
  */
        if (from_user) {
                save_flags(flags);
@@ -2286,9+2286,9 @@ static void stli_flushbuffer(struct tty_struct *tty)
 /*
  *     Generic send command routine. This will send a message to the slave,
  *     of the specified type with the specified argument. Must be very
- *     carefull of data that will be copied out from shared memory -
+ *     careful of data that will be copied out from shared memory -
  *     containing command results. The command completion is all done from
- *     a poll routine that does not have user coontext. Therefore you cannot
+ *     a poll routine that does not have user context. Therefore you cannot
  *     copy back directly into user space, or to the kernel stack of a
  *     process. This routine does not sleep, so can be called from anywhere.
  */
@@ -2338,7+2338,7 @@ static void stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd,
 /*
  *     Read data from shared memory. This assumes that the shared memory
  *     is enabled and that interrupts are off. Basically we just empty out
- *     the shared memory buffer into the tty buffer. Must be carefull to
+ *     the shared memory buffer into the tty buffer. Must be careful to
  *     handle the case where we fill up the tty buffer, but still have
  *     more chars to unload.
  */
@@ -2599,7+2599,7 @@ static inline int stli_hostcmd(stlibrd_t *brdp, int channr)
 
 /*
  *     Driver poll routine. This routine polls the boards in use and passes
- *     messages back up to host when neccesary. This is actually very
+ *     messages back up to host when necessary. This is actually very
  *     CPU efficient, since we will always have the kernel poll clock, it
  *     adds only a few cycles when idle (since board service can be
  *     determined very easily), but when loaded generates no interrupts
@@ -2831,7+2831,7 @@ static void stli_mkasysigs(asysigs_t *sp, int dtr, int rts)
 
 /*
  *     Convert the signals returned from the slave into a local TIOCM type
- *     signals value. We keep them localy in TIOCM format.
+ *     signals value. We keep them locally in TIOCM format.
  */
 
 static long stli_mktiocm(unsigned long sigvalue)
@@ -3431,7+3431,7 @@ static void *stli_mapbrdmem(unsigned long physaddr, unsigned int size)
                return((void *) NULL);
        }
        if ((rc = remap_page_range((TASK_SIZE + ((unsigned long) virtaddr)), physaddr, size, PAGE_IOMEM))) {
-               printk("STALLION: failed to map phyiscal address=%x, errno=%d\n", (int) physaddr, rc);
+               printk("STALLION: failed to map physical address=%x, errno=%d\n", (int) physaddr, rc);
                return((void *) NULL);
        }
        return(virtaddr);
@@ -3908,7+3908,7 @@ static int stli_eisamemprobe(stlibrd_t *brdp)
  *     First up we reset the board, to get it into a known state. There
  *     is only 2 board types here we need to worry about. Don;t use the
  *     standard board init routine here, it programs up the shared
- *     memopry address, and we don't know it yet...
+ *     memory address, and we don't know it yet...
  */
        if (brdp->brdtype == BRD_ECPE) {
                outb(0x1, (brdp->iobase + ECP_EIBRDENAB));
index 90e01c2..66e9a7a 100644 (file)
@@ -1273,9+1273,9 @@ static int kbd_wait_for_input(void)
                data = inb(KBD_DATA_REG);
 
                 /*
-                 * Check to see if a timeout error has occured.  This means
+                 * Check to see if a timeout error has occurred.  This means
                  * that transmission was started but did not complete in the
-                 * normal time cycle.  PERR is set when a parity error occured
+                 * normal time cycle.  PERR is set when a parity error occurred
                  * in the last transmission.
                  */
                 if (status & (KBD_GTO | KBD_PERR)) {
index 2941a63..800b55e 100644 (file)
  *  1.5.3 March 9, 1996 Christoph Lameter: Fixed 115.2K Support. Memory
  *             allocation harmonized with 1.3.X Series.
  *  1.5.4 March 30, 1996 Christoph Lameter: Fixup for 1.3.81. Use init_bh
- *             instead of direct assigment to kernel arrays.
+ *             instead of direct assignment to kernel arrays.
  *  1.5.5 April 5, 1996 Major device numbers corrected.
  *              Mike McLagan<mike.mclagan@linux.org>: Add setup
  *              variable handling, instead of using the old pcxxconfig.h
@@ -946,7+946,7 @@ void pcxx_setup(char *str, int *ints)
                numcards, board_desc[board.type], board_mem[board.type], 
                board.numports, board.port, (unsigned int) board.membase);
 
-       /* keep track of my inital minor number */
+       /* keep track of my initial minor number */
         if (numcards)
                boards[numcards].first_minor = boards[numcards-1].first_minor + boards[numcards-1].numports;
        else
index 6726574..cb7996d 100644 (file)
  * and returns good random numbers, suitable for cryptographic use.
  * Besides the obvious cryptographic uses, these numbers are also good
  * for seeding TCP sequence numbers, and other places where it is
- * desireable to have numbers which are not only random, but hard to
+ * desirable to have numbers which are not only random, but hard to
  * predict by an attacker.
  *
  * Theory of operation
  * ===================
  * 
  * Computers are very predictable devices.  Hence it is extremely hard
- * to produce truely random numbers on a computer --- as opposed to
+ * to produce truly random numbers on a computer --- as opposed to
  * pseudo-random numbers, which can easily generated by using a
  * algorithm.  Unfortunately, it is very easy for attackers to guess
  * the sequence of pseudo-random number generators, and for some
  * random numbers; however, an attacker may (at least in theory) be
  * able to infer the future output of the generator from prior
  * outputs.  This requires successful cryptanalysis of MD5, which is
- * not believed to be feasible, but there is a remote possiblility.
+ * not believed to be feasible, but there is a remote possibility.
  * Nonetheless, these numbers should be useful for the vast majority
  * of purposes.
  * 
@@ -266,7+266,7 @@ void rand_initialize_irq(int irq)
                return;
 
        /*
-        * If kamlloc returns null, we just won't use that entropy
+        * If kmalloc returns null, we just won't use that entropy
         * source.
         */
        state = kmalloc(sizeof(struct timer_rand_state), GFP_KERNEL);
@@ -284,7+284,7 @@ void rand_initialize_blkdev(int major, int mode)
                return;
 
        /*
-        * If kamlloc returns null, we just won't use that entropy
+        * If kmalloc returns null, we just won't use that entropy
         * source.
         */
        state = kmalloc(sizeof(struct timer_rand_state), mode);
index e73603e..486f526 100644 (file)
 
    This program is free software; you can redistribute it and/or modify 
    it under the terms of the (modified) GNU General Public License 
-   delivered with the LinuX kernel source.
+   delivered with the Linux kernel source.
    
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -455,7+455,7 @@ scc_dequeue_buffer(struct mbuf **queue)
 #endif
                *queue = buffer->next;          /* new head of chain */
                
-               buffer->next = NULLBUF;         /* for securety only... */
+               buffer->next = NULLBUF;         /* for security only... */
                buffer->prev = NULLBUF;
                buffer->rw_ptr = buffer->data;
        } 
@@ -707,7+707,7 @@ scc_get_buffer(struct scc_channel *scc, char type)
 
 /* ----> interrupt service routine for the 8530 <---- */
 
-/* it's recommendet to keep this function "inline" ;-) */
+/* it's recommended to keep this function "inline" ;-) */
 
 static inline void
 scc_isr_dispatch(register struct scc_channel *scc, register int vector)
@@ -754,7+754,7 @@ scc_isr(int irq, void *dev_id, struct pt_regs *regs)
                                                /* ...not forever! */
           
                        /* Extract channel number and status from vector. */
-                       /* Isolate channel nummer */
+                       /* Isolate channel number */
                        /* Call handler */
                
                        if (vector & 0x01) break; 
@@ -794,7+794,7 @@ scc_isr(int irq, void *dev_id, struct pt_regs *regs)
                        vector=Inb(q);                  /* Read the vector */
         
                        /* Extract channel number and status from vector. */
-                       /* Isolate channel nummer */
+                       /* Isolate channel number */
                        /* Call handler */
         
 
@@ -1147,7+1147,7 @@ static inline void init_brg(register struct scc_channel *scc)
 }
 
 /*
- * Initalization according to the Z8530 manual (SGS-Thomson's version):
+ * Initialization according to the Z8530 manual (SGS-Thomson's version):
  *
  * 1. Modes and constants
  *
index d27e80a..f5e79ea 100644 (file)
  *     Some examples:
  *             { BRD_EASYIO, 0x2a0, 0, 0, 10, 0 }
  *     This line would configure an EasyIO board (4 or 8, no difference),
- *     at io addres 2a0 and irq 10.
+ *     at io address 2a0 and irq 10.
  *     Another example:
  *             { BRD_ECH, 0x2a8, 0x280, 0, 12, 0 },
  *     This line will configure an EasyConnection 8/32 board at primary io
- *     addres 2a8, secondary io address 280 and irq 12.
+ *     address 2a8, secondary io address 280 and irq 12.
  *     Enter as many lines into this array as you want (only the first 4
  *     will actually be used!). Any combination of EasyIO and EasyConnection
  *     boards can be specified. EasyConnection 8/32 boards can share their
@@ -109,7+109,7 @@ static int  stl_nrbrds = sizeof(stl_brdconf) / sizeof(stlconf_t);
 
 /*
  *     Define some important driver characteristics. Device major numbers
- *     allocated as per Linux Device Registery.
+ *     allocated as per Linux Device Registry.
  */
 #ifndef        STL_SIOMEMMAJOR
 #define        STL_SIOMEMMAJOR         28
@@ -206,7+206,7 @@ static int  stl_numintrs = 0;
  *     Define a ring queue structure for each port. This will hold the
  *     TX data waiting to be output. Characters are fed into this buffer
  *     from the line discipline (or even direct from user space!) and
- *     then fed into the UARTs during interrupts. Will use a clasic ring
+ *     then fed into the UARTs during interrupts. Will use a classic ring
  *     queue here for this. The good thing about this type of ring queue
  *     is that the head and tail pointers can be updated without interrupt
  *     protection - since "write" code only needs to change the head, and
@@ -344,7+344,7 @@ static char *stl_brdnames[] = {
 
 /*
  *     Hardware ID bits for the EasyIO and ECH boards. These defines apply
- *     to the directly accessable io ports of these boards (not the cd1400
+ *     to the directly accessible io ports of these boards (not the cd1400
  *     uarts - they are in cd1400.h).
  */
 #define        EIO_8PORTRS     0x04
@@ -2168,9+2168,9 @@ static void stl_setport(stlport_t *portp, struct termios *tiosp)
 
 /*
  *     Setup cd1400 enhanced modes if we can. In particular we want to
- *     handle as much of the flow control as possbile automatically. As
+ *     handle as much of the flow control as possible automatically. As
  *     well as saving a few CPU cycles it will also greatly improve flow
- *     control reliablilty.
+ *     control reliability.
  */
        if (tiosp->c_iflag & IXON) {
                cor2 |= COR2_TXIBE;
@@ -2309,7+2309,7 @@ static int stl_getsignals(stlport_t *portp)
 /*****************************************************************************/
 
 /*
- *     Enable/Disable the Transmitter and/or Reciever.
+ *     Enable/Disable the Transmitter and/or Receiver.
  */
 
 static void stl_enablerxtx(stlport_t *portp, int rx, int tx)
@@ -2345,7+2345,7 @@ static void stl_enablerxtx(stlport_t *portp, int rx, int tx)
 /*****************************************************************************/
 
 /*
- *     Start/stop the Transmitter and/or Reciever.
+ *     Start/stop the Transmitter and/or Receiver.
  */
 
 static void stl_startrxtx(stlport_t *portp, int rx, int tx)
@@ -2431,7+2431,7 @@ static void stl_sendbreak(stlport_t *portp, long len)
 /*
  *     Map in interrupt vector to this driver. Check that we don't
  *     already have this vector mapped, we might be sharing this
- *     interrupt accross multiple boards.
+ *     interrupt across multiple boards.
  */
 
 static int stl_mapirq(int irq)
@@ -2650,7+2650,7 @@ static int stl_initech(stlbrd_t *brdp)
        status = 0;
 
 /*
- *     Set up the initial board register contents for boards. This varys a
+ *     Set up the initial board register contents for boards. This varies a
  *     bit between the different board types. So we need to handle each
  *     separately. Also do a check that the supplied IRQ is good.
  */
index 9556fb4..dd33356 100644 (file)
@@ -434,7+434,7 @@ void set_vesa_blanking(const unsigned long arg)
 }
 
 /*
- * video init code, called from withing the PCI bus probing code;
+ * video init code, called from within the PCI bus probing code;
  * when TGA console is configured, at the end of the probing code,
  * we call here to look for a TGA device, and proceed...
  */
@@ -566,7+566,7 @@ tga_init_video()
        TGA_WRITE_REG(0x12345678, TGA_BLOCK_COLOR0_REG);
        TGA_WRITE_REG(0x12345678, TGA_BLOCK_COLOR1_REG);
 
-       /* init video timeing regs for 640x480 @ 60 Hz */
+       /* init video timing regs for 640x480 @ 60 Hz */
        TGA_WRITE_REG(0x018608a0, TGA_HORIZ_REG);
        TGA_WRITE_REG(0x084251e0, TGA_VERT_REG);
 
index e03855a..be38999 100644 (file)
@@ -48,7+48,7 @@ int irq=14;
 #define WD_TIMO (100*60)               /* 1 minute */
 
 /*
- *     Programming suppoort
+ *     Programming support
  */
  
 static void wdt_ctr_mode(int ctr, int mode)
@@ -213,7+213,7 @@ static struct file_operations wdt_fops = {
        wdt_release
 };
 
-static struct miscdevice wdt_mouse=
+static struct miscdevice wdt_miscdev=
 {
        WATCHDOG_MINOR,
        "wdt",
@@ -221,7+221,7 @@ static struct miscdevice wdt_mouse=
 };
 
 #ifdef CONFIG_WDT_501
-static struct miscdevice temp_mouse=
+static struct miscdevice temp_miscdev=
 {
        TEMP_MINOR,
        "temperature",
@@ -239,9+239,9 @@ int init_module(void)
                printk("IRQ %d is not free.\n", irq);
                return -EIO;
        }
-       mouse_register(&wdt_mouse);
+       misc_register(&wdt_miscdev);
 #ifdef CONFIG_WDT_501  
-       mouse_register(&temp_mouse);
+       misc_register(&temp_miscdev);
 #endif 
        request_region(io, 8, "wdt501");
        return 0;
@@ -249,9+249,9 @@ int init_module(void)
 
 void cleanup_module(void)
 {
-       mouse_deregister(&wdt_mouse);
+       misc_deregister(&wdt_miscdev);
 #ifdef CONFIG_WDT_501  
-       misc_deregister(&temp_mouse);
+       misc_deregister(&temp_miscdev);
 #endif 
        release_region(io,8);
        free_irq(irq, NULL);
@@ -267,9+267,9 @@ int wdt_init(void)
                printk("IRQ %d is not free.\n", irq);
                return -EIO;
        }
-       mouse_register(&wdt_mouse);
+       misc_register(&wdt_miscdev);
 #ifdef CONFIG_WDT_501  
-       misc_register(&temp_mouse);
+       misc_register(&temp_miscdev);
 #endif 
        request_region(io, 8, "wdt501");
        return 0;
index 0cac1c1..0bb44f5 100644 (file)
  *
  * Revision 1.14  1995/12/18  18:23:37  fritz
  * Support for ICN-2B Cards.
- * Change for supporting user-setable service-octet.
+ * Change for supporting user-settable service-octet.
  *
  * Revision 1.13  1995/10/29  21:41:07  fritz
- * Added support for DriverId's, added Jan's patches for Kernelversions.
+ * Added support for DriverId's, added Jan's patches for Kernel versions.
  *
  * Revision 1.12  1995/04/29  13:07:35  fritz
  * Added support for new Euro-ISDN-firmware
  *
  * Revision 1.8  1995/03/15  12:49:44  fritz
  * Added support for SPV's
- * Splitted pollbchan_work ifor calling send-routine directly
+ * Split pollbchan_work ifor calling send-routine directly
  *
  * Revision 1.7  1995/02/20  03:48:03  fritz
  * Added support of new request_region-function.
@@ -642,7+642,7 @@ static void icn_pollit(icn_dev * dev)
 /*
  * Check Statusqueue-Pointer from isdn-card.
  * If there are new status-replies from the interface, check
- * them against B-Channel-connects/disconnects and set flags arrcordingly.
+ * them against B-Channel-connects/disconnects and set flags accordingly.
  * Wake-Up any processes, who are reading the status-device.
  * If there are B-Channels open, initiate a timer-callback to
  * icn_pollbchan().
@@ -794,7+794,7 @@ static int icn_loadboot(u_char * buffer, icn_dev * dev)
                dev->mvalid = 1;
        }
        restore_flags(flags);
-       OUTB_P(0, ICN_RUN);     /* Reset Controler */
+       OUTB_P(0, ICN_RUN);     /* Reset Controller */
        OUTB_P(0, ICN_MAPRAM);  /* Disable RAM     */
        icn_shiftout(ICN_CFG, 0x0f, 3, 4);      /* Windowsize= 16k */
        icn_shiftout(ICN_CFG, (unsigned long) dev->shmem, 23, 10);      /* Set RAM-Addr.   */
@@ -1484,7+1484,7 @@ void cleanup_module(void)
                dev2->interface.statcallb(&cmd);
        }
        if (dev->rvalid) {
-               OUTB_P(0, ICN_RUN);     /* Reset Controler      */
+               OUTB_P(0, ICN_RUN);     /* Reset Controller     */
                OUTB_P(0, ICN_MAPRAM);  /* Disable RAM          */
                release_region(dev->port, ICN_PORTLEN);
        }
index 69eeacf..a306570 100644 (file)
  *
  * Revision 1.11  1995/12/18  18:25:00  fritz
  * Support for ICN-2B Cards.
- * Change for supporting user-setable service-octet.
+ * Change for supporting user-settable service-octet.
  *
  * Revision 1.10  1995/10/29  21:43:10  fritz
  * Added support for leased lines.
  *
  * Revision 1.9  1995/04/23  13:42:10  fritz
- * Added some constants for distingushing 1TR6 and DSS1
+ * Added some constants for distinguishing 1TR6 and DSS1
  *
  * Revision 1.8  1995/03/25  23:18:55  fritz
  * Changed ICN_PORTLEN to reflect correct number of ports.
@@ -184,7+184,7 @@ typedef struct {
 } pqueue;
 
 typedef struct {
-       unsigned short port;    /* Base-port-adress                 */
+       unsigned short port;    /* Base-port-address                 */
        icn_shmem *shmem;       /* Pointer to memory-mapped-buffers */
        int myid;               /* Driver-Nr. assigned by linklevel */
        int rvalid;             /* IO-portregion has been requested */
@@ -194,7+194,7 @@ typedef struct {
        unsigned short flags;   /* Statusflags                      */
        int doubleS0;           /* Flag: Double-S0-Card             */
        int secondhalf;         /* Flag: Second half of a doubleS0  */
-       int ptype;              /* Protocoltype (1TR6 or Euro)      */
+       int ptype;              /* Protocol type (1TR6 or Euro)      */
        struct timer_list st_timer;     /* Timer for Status-Polls           */
        struct timer_list rb_timer;     /* Timer for B-Channel-Polls        */
        int channel;            /* Currently mapped Channel         */
index bf772d1..9782b02 100644 (file)
@@ -1,6+1,6 @@
 /* $Id: isdn_common.h,v 1.1 1996/01/10 21:37:19 fritz Exp fritz $
  *
- * header for Linux ISDN subsystem, common used funtions and debugging-switches (linklevel).
+ * header for Linux ISDN subsystem, common used functions and debugging-switches (linklevel).
  *
  * Copyright 1994,95,96 by Fritz Elfert (fritz@wuemaus.franken.de)
  * Copyright 1995,96    by Thinking Objects Software GmbH Wuerzburg
index 96b2dfd..bdade37 100644 (file)
@@ -284,7+284,7 @@ isdn_net_stat_callback(int idx, int cmd)
 }
 
 /*
- * Check, if a numer contains wilcard-characters, in which case it
+ * Check, if a number contains wildcard-characters, in which case it
  * is for incoming purposes only.
  */
 static int
@@ -622,7+622,7 @@ isdn_net_log_packet(u_char * buf, isdn_net_local * lp)
 /*
  * Generic routine to send out an skbuf.
  * If lowlevel-device does not support supports skbufs, use
- * standard send-routine, else sind directly.
+ * standard send-routine, else send directly.
  *
  * Return: 0 on success, !0 on failure.
  * Side-effects: ndev->tbusy is cleared on success.
@@ -665,7+665,7 @@ isdn_net_xmit(struct device *ndev, isdn_net_local *lp, struct sk_buff *skb)
 {
         int ret;
 
-       /* For the other encaps the header has allready been built */
+       /* For the other encaps the header has already been built */
 #ifdef CONFIG_ISDN_PPP
        if (lp->p_encap == ISDN_NET_ENCAP_SYNCPPP)
                return (isdn_ppp_xmit(skb, ndev));
@@ -867,9+867,9 @@ static struct enet_statistics *
 }
 
 /*      This is simply a copy from std. eth.c EXCEPT we pull ETH_HLEN
- *      instead of dev->hard_header_len off. This is done, because the
- *      lowlevel-driver has already pulled of it's stuff, when we get
- *      here and this routine only get's called whit p_encap == ETHER.
+ *      instead of dev->hard_header_len off. This is done because the
+ *      lowlevel-driver has already pulled off its stuff when we get
+ *      here and this routine only gets called with p_encap == ETHER.
  *      Determine the packet's protocol ID. The rule here is that we
  *      assume 802.3 if the type field is short enough to be a length.
  *      This is normal practice and works for any 'now in use' protocol.
@@ -908,7+908,7 @@ unsigned short isdn_net_type_trans(struct sk_buff *skb, struct device *dev)
         /*
          *      This is a magic hack to spot IPX packets. Older Novell breaks
          *      the protocol design and runs IPX over 802.3 without an 802.2 LLC
-         *      layer. We look for FFFF which isnt a used 802.2 SSAP/DSAP. This
+         *      layer. We look for FFFF which isn't a used 802.2 SSAP/DSAP. This
          *      won't work for fault tolerant netware but does for the rest.
          */
         if (*(unsigned short *)rawp == 0xFFFF)
@@ -1014,7+1014,7 @@ isdn_net_receive_callback(int idx, u_char * buf, int len)
 }
 
 /*
- *  receive callback for lovlevel drivers, which support skb's
+ *  receive callback for lowlevel drivers, which support skb's
  */
 
 int
@@ -1077,7+1077,7 @@ my_eth_header(struct sk_buff *skb, struct device *dev, unsigned short type,
 
 /*
  *  build an header
- *  depends on encaps that is beeing used.
+ *  depends on encaps that is being used.
  */
  
 static int
@@ -1217,7+1217,7 @@ isdn_net_init(struct device *ndev)
 
        /* 
         *  up till binding we ask the protocol layer to reserve as much
-        *  as we migth need for HL layer
+        *  as we might need for HL layer
          */
        
        for (drvidx = 0; drvidx < ISDN_MAX_DRIVERS; drvidx++)
@@ -1239,7+1239,7 @@ isdn_net_init(struct device *ndev)
 
 /*
  * I picked the pattern-matching-functions from an old GNU-tar version (1.10)
- * It was originaly written and put to PD by rs@mirror.TMC.COM (Rich Salz)
+ * It was originally written and put to PD by rs@mirror.TMC.COM (Rich Salz)
  */
 
 static int
@@ -1256,11+1256,11 @@ isdn_net_Star(char *s, char *p)
  * This function gets a string in s and checks, if it matches the pattern
  * given in p. It returns 1 on success, 0 otherwise.
  *
- * Posible Patterns:
+ * Possible Patterns:
  *
  * '?'     matches one character
  * '*'     matches zero or more characters
- * [xyz]   matches the set of charcters in brackets.
+ * [xyz]   matches the set of characters in brackets.
  * [^xyz]  matches any single character not in the set of characters
  */
 
@@ -1347,7+1347,7 @@ isdn_net_swap_usage(int i1, int i2)
 
 /*
  * An incoming call-request has arrived.
- * Search the interface-chain for an aproppriate interface.
+ * Search the interface-chain for an appropriate interface.
  * If found, connect the interface to the ISDN-channel and initiate
  * D- and B-Channel-setup. If secure-flag is set, accept only
  * configured phone-numbers. If callback-flag is set, initiate
@@ -1420,7+1420,7 @@ isdn_net_find_icall(int di, int ch, int idx, char *num)
 #endif
        swapped = 0;
        while (p) {
-               /* If last check has trigered as binding-swap, revert it */
+               /* If last check has triggered as binding-swap, revert it */
                switch (swapped) {
                case 2:
                        isdn_net_swap_usage(idx, sidx);
@@ -1836,7+1836,7 @@ char *
 
 /*
  * Set interface-parameters.
- * Allways set all parameters, so the user-level application is responsible
+ * Always set all parameters, so the user-level application is responsible
  * for not overwriting existing setups. It has to get the current
  * setup first, if only selected parameters are to be changed.
  */
index 80da035..0f809c5 100644 (file)
@@ -1,6+1,6 @@
 /* $Id: isdn_net.h,v 1.1 1996/02/11 02:35:13 fritz Exp fritz $
  *
- * header for Linux ISDN subsystem, network releted funtions (linklevel).
+ * header for Linux ISDN subsystem, network related functions (linklevel).
  *
  * Copyright 1994,95,96 by Fritz Elfert (fritz@wuemaus.franken.de)
  * Copyright 1995,96    by Thinking Objects Software GmbH Wuerzburg
index c940768..d632c86 100644 (file)
@@ -859,7+859,7 @@ int isdn_ppp_xmit(struct sk_buff *skb, struct device *dev)
                } else {
                        /* skb_push(skb, 5); Done in isdn_net_header () */
                        skb->data[4] = MP_BEGIN_FRAG | MP_END_FRAG;     /* (B)egin & (E)ndbit .. */
-                       skb->data[5] = (mp_seqno >> 16) & 0xff; /* sequence nubmer: 24bit */
+                       skb->data[5] = (mp_seqno >> 16) & 0xff; /* sequence number: 24bit */
                        skb->data[6] = (mp_seqno >> 8) & 0xff;
                        skb->data[7] = (mp_seqno >> 0) & 0xff;
                        skb->data[8] = proto;   /* PID compression */
@@ -868,7+868,7 @@ int isdn_ppp_xmit(struct sk_buff *skb, struct device *dev)
        }
 #endif
        skb->data[0] = 0xff;        /* All Stations */
-       skb->data[1] = 0x03;        /* Unumbered information */
+       skb->data[1] = 0x03;        /* Unnumbered information */
        skb->data[2] = proto >> 8;
        skb->data[3] = proto & 0xff;
 
index 71e5604..88e6362 100644 (file)
@@ -402,7+402,7 @@ static int isdn_tty_write(struct tty_struct *tty, int from_user, const u_char *
                                bufptr = info->xmit_buf;
                                buflen = info->xmit_count;
                                if (dev->mdm.atmodem[i].mdmreg[13] & 2) {
-                                       /* Add T.70 simplyfied header */
+                                       /* Add T.70 simplified header */
 
 #ifdef ISDN_DEBUG_MODEM_DUMP
                                        isdn_dumppkt("T70pack1:", bufptr, buflen, 40);
@@ -1208,7+1208,7 @@ int isdn_tty_modem_init(void)
 
 /*
  * An incoming call-request has arrived.
- * Search the tty-devices for an aproppriate device and bind
+ * Search the tty-devices for an appropriate device and bind
  * it to the ISDN-Channel.
  * Return Index to dev->mdm or -1 if none found.
  */
@@ -2008,7+2008,7 @@ void isdn_tty_modem_xmit(void)
                                                bufptr = info->xmit_buf;
                                                buflen = info->xmit_count;
                                                if (dev->mdm.atmodem[midx].mdmreg[13] & 2) {
-                                                       /* Add T.70 simplyfied header */
+                                                       /* Add T.70 simplified header */
 #ifdef ISDN_DEBUG_MODEM_DUMP
                                                        isdn_dumppkt("T70pack3:", bufptr, buflen, 40);
 #endif
@@ -2041,7+2041,7 @@ void isdn_tty_modem_xmit(void)
 #if FUTURE
 /*
  * A packet has been output successfully.
- * Search the tty-devices for an aproppriate device, decrement it's
+ * Search the tty-devices for an appropriate device, decrement its
  * counter for outstanding packets, and set CTS if this counter reaches 0.
  */
 void isdn_tty_bsent(int drv, int chan)
index 5d303ba..c7d6a67 100644 (file)
@@ -509,7+509,7 @@ l3down(struct PStack *st,
                                  break;
                  if (i == downsl_1tr6t_len) {
                          if (DEBUG_1TR6 > 0) {
-                                 printk(KERN_INFO "isdnl3down unhandled 1tr6 state %d primitiv %x\n", st->l3.state, pr);
+                                 printk(KERN_INFO "isdnl3down unhandled 1tr6 state %d primitive %x\n", st->l3.state, pr);
                          }
                  } else
                          downstatelist_1tr6t[i].rout(st, pr, ibh);
index 71b6df8..98f16f6 100644 (file)
@@ -10,15+10,15 @@ mt_trans(int pd, int mt)
                        if (mt == mtdesc_n0[i].mt)
                                return (mtdesc_n0[i].descr);
                }
-               return ("unkown Message Type PD=N0");
+               return ("unknown Message Type PD=N0");
        } else if (pd == PROTO_DIS_N1) {
                for (i = 0; i < (sizeof(mtdesc_n1) / sizeof(struct MTypeDesc)); i++) {
                        if (mt == mtdesc_n1[i].mt)
                                return (mtdesc_n1[i].descr);
                }
-               return ("unkown Message Type PD=N1");
+               return ("unknown Message Type PD=N1");
        }
-       return ("unkown Protokolldiscriminator");
+       return ("unknown Protokolldiscriminator");
 }
 
 static void
index c460f08..6e8169e 100644 (file)
@@ -266,7+266,7 @@ struct CauseValue {
                0x1d, "Facility rejected", ""
        },
        {
-               0x1e, "Response to Status enuiry", ""
+               0x1e, "Response to Status enquiry", ""
        },
        {
                0x1f, "Normal, unspecified", ""
@@ -314,7+314,7 @@ struct CauseValue {
                0x37, "Incoming calls barred within CUG", ""
        },
        {
-               0x39, "Bearer capability not auhorized", ""
+               0x39, "Bearer capability not authorized", ""
        },
        {
                0x3a, "Bearer capability not presently available", ""
@@ -853,7+853,7 @@ dlogframe(struct IsdnCardState *sp, byte * buf, int size, char *comment)
                        if (*buf == ielist[i].nr)
                                break;
 
-               /* When not found, give apropriate msg */
+               /* When not found, give appropriate msg */
                if (i != IESIZE) {
                        dp += sprintf(dp, "  %s\n", ielist[i].descr);
                        dp += ielist[i].f(dp, buf);
index 5b566b0..7c38191 100644 (file)
@@ -579,7+579,7 @@ el2_block_input(struct device *dev, int count, struct sk_buff *skb, int ring_off
 
 /*
  *  Here I also try to get data as fast as possible. I am betting that I
- *  can read one extra byte without clobering anything in the kernel because
+ *  can read one extra byte without clobbering anything in the kernel because
  *  this would only occur on an odd byte-count and allocation of skb->data
  *  is word-aligned. Variable 'count' is NOT checked. Caller must check
  *  for a valid count. 
index 7c8a224..8305d86 100644 (file)
@@ -1,6+1,6 @@
 /*
  * Linux ethernet device driver for the 3Com Etherlink Plus (3C505)
- *      By Craig Southeren and Juha Laiho
+ *      By Craig Southeren, Juha Laiho and Philip Blundell
  *
  * 3c505.c      This module implements an interface to the 3Com
  *              Etherlink Plus (3c505) ethernet card. Linux device 
  *              be here without 3C505 technical reference provided by
  *              3Com.
  *
- * $Id: 3c505.c,v 0.9.1.1 1996/04/02 13:58:06 root Exp $
+ * $Id: 3c505.c,v 1.7 1996/04/09 19:01:30 phil Exp phil $
  *
  * Authors:     Linux 3c505 device driver by
  *                      Craig Southeren, <craigs@ineluki.apana.org.au>
  *                      Terry Murphy, of 3Com Network Adapter Division
  *              Linux 1.3.0 changes by
  *                      Alan Cox <Alan.Cox@linux.org>
- *              More debugging by Philip Blundell <pjb27@cam.ac.uk>
+ *              More debugging and DMA version by Philip Blundell
+ */
+
+/* Theory of operation:
+
+ * The 3c505 is quite an intelligent board.  All communication with it is done
+ * by means of Primary Command Blocks (PCBs); these are transferred using PIO
+ * through the command register.  The card has 256k of on-board RAM, which is
+ * used to buffer received packets.  It might seem at first that more buffers
+ * are better, but in fact this isn't true.  From my tests, it seems that
+ * more than about 10 buffers are unnecessary, and there is a noticeable
+ * performance hit in having more active on the card.  So the majority of the
+ * card's memory isn't, in fact, used.
  *
+ * We keep up to 4 "receive packet" commands active on the board at a time.
+ * When a packet comes in, so long as there is a receive command active, the
+ * board will send us a "packet received" PCB and then add the data for that
+ * packet to the DMA queue.  If a DMA transfer is not already in progress, we
+ * set one up to start uploading the data.  We have to maintain a list of
+ * backlogged receive packets, because the card may decide to tell us about
+ * a newly-arrived packet at any time, and we may not be able to start a DMA
+ * transfer immediately (ie one may already be going on).  We can't NAK the
+ * PCB, because then it would throw the packet away.
+ *
+ * Trying to send a PCB to the card at the wrong moment seems to have bad
+ * effects.  If we send it a transmit PCB while a receive DMA is happening,
+ * it will just NAK the PCB and so we will have wasted our time.  Worse, it
+ * sometimes seems to interrupt the transfer.  The majority of the low-level
+ * code is protected by one huge semaphore -- "busy" -- which is set whenever
+ * it probably isn't safe to do anything to the card.  The receive routine
+ * must gain a lock on "busy" before it can start a DMA transfer, and the
+ * transmit routine must gain a lock before it sends the first PCB to the card.
+ * The send_pcb() routine also has an internal semaphore to protect it against
+ * being re-entered (which would be disastrous) -- this is needed because
+ * several things can happen asynchronously (re-priming the receiver and
+ * asking the card for statistics, for example).  send_pcb() will also refuse
+ * to talk to the card at all if a DMA upload is happening.  The higher-level
+ * networking code will reschedule a later retry if some part of the driver
+ * is blocked.  In practice, this doesn't seem to happen very often.
+ */
+
+/* This driver will not work with revision 2 hardware, because the host
+ * control register is write-only.  It should be fairly easy to arrange to
+ * keep our own soft-copy of the intended contents of this register, if
+ * somebody has the time.  There may be firmware differences that cause
+ * other problems, though, and I don't have an old card to test.
+ */
+
+/* The driver is a mess.  I took Craig's and Juha's code, and hacked it firstly
+ * to make it more reliable, and secondly to add DMA mode.  Many things could
+ * probably be done better; the concurrency protection is particularly awful.
  */
 
 #include <linux/module.h>
 #include <linux/ioport.h>
 #include <asm/bitops.h>
 #include <asm/io.h>
+#include <asm/dma.h>
 
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
 
 #include "3c505.h"
 
+#define ELP_DMA      6         /* DMA channel to use */
+#define ELP_RX_PCBS  4
+
 /*********************************************************
  *
  *  define debug messages here as common strings to reduce space
  *
  *********************************************************/
 
-static const char * filename = __FILE__;
+static const char *filename = __FILE__;
 
-static const char * timeout_msg = "*** timeout at %s:%s (line %d) ***\n";
+static const char *timeout_msg = "*** timeout at %s:%s (line %d) ***\n";
 #define TIMEOUT_MSG(lineno) \
        printk(timeout_msg, filename,__FUNCTION__,(lineno))
 
-static const char * invalid_pcb_msg =
-       "*** invalid pcb length %d at %s:%s (line %d) ***\n";
+static const char *invalid_pcb_msg =
+"*** invalid pcb length %d at %s:%s (line %d) ***\n";
 #define INVALID_PCB_MSG(len) \
        printk(invalid_pcb_msg, (len),filename,__FUNCTION__,__LINE__)
 
-static const char * search_msg = "%s: Looking for 3c505 adapter at address %#x...";
+static const char *search_msg = "%s: Looking for 3c505 adapter at address %#x...";
 
-static const char * stilllooking_msg = "still looking...";
+static const char *stilllooking_msg = "still looking...";
 
-static const char * found_msg = "found.\n";
+static const char *found_msg = "found.\n";
 
-static const char * notfound_msg = "not found (reason = %d)\n";
+static const char *notfound_msg = "not found (reason = %d)\n";
 
-static const char * couldnot_msg = "%s: 3c505 not found\n";
+static const char *couldnot_msg = "%s: 3c505 not found\n";
 
 /*********************************************************
  *
@@ -88,9+141,9 @@ static const char * couldnot_msg = "%s: 3c505 not found\n";
  *********************************************************/
 
 #ifdef ELP_DEBUG
-static int elp_debug = ELP_DEBUG;
+static const int elp_debug = ELP_DEBUG;
 #else
-static int elp_debug = 0;
+static const int elp_debug = 0;
 #endif
 
 /*
@@ -121,7+174,32 @@ static int elp_debug = 0;
  * Last element MUST BE 0!
  *****************************************************************/
 
-const int addr_list[]={0x300,0x280,0x310,0}; 
+const int addr_list[] =
+{0x300, 0x280, 0x310, 0};
+
+/* Dma Memory related stuff */
+
+/* Pure 2^n version of get_order */
+static inline int __get_order(unsigned long size)
+{
+       int order;
+
+       size = (size - 1) >> (PAGE_SHIFT - 1);
+       order = -1;
+       do {
+               size >>= 1;
+               order++;
+       } while (size);
+       return order;
+}
+
+static unsigned long dma_mem_alloc(int size)
+{
+       int order = __get_order(size);
+
+       return __get_dma_pages(GFP_KERNEL, order);
+}
+
 
 /*****************************************************************
  *
@@ -129,46+207,39 @@ const int addr_list[]={0x300,0x280,0x310,0};
  *
  *****************************************************************/
 
-static inline unsigned char
-inb_status (unsigned int base_addr)
+static inline unsigned char inb_status(unsigned int base_addr)
 {
-       return inb(base_addr+PORT_STATUS);
+       return inb(base_addr + PORT_STATUS);
 }
 
-static inline unsigned char
-inb_control (unsigned int base_addr)
+static inline unsigned char inb_control(unsigned int base_addr)
 {
-       return inb(base_addr+PORT_CONTROL);
+       return inb(base_addr + PORT_CONTROL);
 }
 
-static inline int
-inb_command (unsigned int base_addr)
+static inline int inb_command(unsigned int base_addr)
 {
-       return inb(base_addr+PORT_COMMAND);
+       return inb(base_addr + PORT_COMMAND);
 }
 
-static inline void
-outb_control (unsigned char val, unsigned int base_addr)
+static inline void outb_control(unsigned char val, unsigned int base_addr)
 {
-       outb(val, base_addr+PORT_CONTROL);
+       outb(val, base_addr + PORT_CONTROL);
 }
 
-static inline void
-outb_command (unsigned char val, unsigned int base_addr)
+static inline void outb_command(unsigned char val, unsigned int base_addr)
 {
-       outb(val, base_addr+PORT_COMMAND);
+       outb(val, base_addr + PORT_COMMAND);
 }
 
-static inline unsigned int
-inw_data (unsigned int base_addr)
+static inline unsigned int inw_data(unsigned int base_addr)
 {
-       return inw(base_addr+PORT_DATA);
+       return inw(base_addr + PORT_DATA);
 }
 
-static inline void
-outw_data (unsigned int val, unsigned int base_addr)
+static inline void outw_data(unsigned int val, unsigned int base_addr)
 {
-       outw(val, base_addr+PORT_DATA);
+       outw(val, base_addr + PORT_DATA);
 }
 
 
@@ -178,6+249,13 @@ outw_data (unsigned int val, unsigned int base_addr)
  *
  *****************************************************************/
 
+/* We allocate 8k of DMA buffer for each adapter.  This gives us one buffer for
+ * received data, and four for the transmit backlog.
+ */
+
+#define DMA_BUFFER_SIZE  1600
+#define BACKLOG_SIZE      4
+
 typedef struct {
        volatile short got[NUM_TRANSMIT_CMDS];  /* flags for command completion */
        pcb_struct tx_pcb;      /* PCB for foreground sending */
@@ -185,9+263,35 @@ typedef struct {
        pcb_struct itx_pcb;     /* PCB for background sending */
        pcb_struct irx_pcb;     /* PCB for background receiving */
        struct enet_statistics stats;
+
+       void *dma_buffer;
+
+       struct {
+               unsigned int length[BACKLOG_SIZE];
+               unsigned int in;
+               unsigned int out;
+       } rx_backlog;
+
+       struct {
+               unsigned int direction;
+               unsigned int length;
+               unsigned int copy_flag;
+               struct sk_buff *skb;
+               long int start_time;
+       } current_dma;
+
+       /* flags */
+       unsigned long send_pcb_semaphore;
+       unsigned int dmaing;
+       unsigned long busy;
+
+       unsigned int rx_active;  /* number of receive PCBs */
 } elp_device;
 
-static int reset_count=0;
+static inline unsigned int backlog_next(unsigned int n)
+{
+       return (n + 1) % BACKLOG_SIZE;
+}
 
 /*****************************************************************
  *
@@ -204,8+308,7 @@ static int reset_count=0;
 #define        GET_ASF(addr) \
        (get_status(addr)&ASF_PCB_MASK)
 
-static inline int
-get_status (unsigned int base_addr)
+static inline int get_status(unsigned int base_addr)
 {
        int timeout = jiffies + 10;
        register int stat1;
@@ -217,96+320,103 @@ get_status (unsigned int base_addr)
        return stat1;
 }
 
-static inline void
-set_hsf (unsigned int base_addr, int hsf)
+static inline void set_hsf(unsigned int base_addr, int hsf)
 {
        cli();
-       outb_control((inb_control(base_addr)&~HSF_PCB_MASK)|hsf, base_addr);
-       sti(); 
+       outb_control((inb_control(base_addr) & ~HSF_PCB_MASK) | hsf, base_addr);
+       sti();
 }
 
-static int start_receive (struct device *, pcb_struct *);
-static void adapter_hard_reset (struct device *);
+static int start_receive(struct device *, pcb_struct *);
 
-inline static void
-adapter_reset (struct device * dev)
+inline static void adapter_reset(struct device *dev)
 {
        int timeout;
-       unsigned char orig_hcr=inb_control(dev->base_addr);
+       unsigned char orig_hcr = inb_control(dev->base_addr);
 
-       elp_device * adapter=dev->priv;
+       elp_device *adapter = dev->priv;
 
-       outb_control(0,dev->base_addr);
+       outb_control(0, dev->base_addr);
 
-       if (inb_status(dev->base_addr)&ACRF) {
+       if (inb_status(dev->base_addr) & ACRF) {
                do {
                        inb_command(dev->base_addr);
-                       timeout=jiffies+2;
-                       while ((jiffies<=timeout) && !(inb_status(dev->base_addr)&ACRF))
-                               ;
-               } while (inb_status(dev->base_addr)&ACRF);
-               set_hsf(dev->base_addr,HSF_PCB_NAK);
+                       timeout = jiffies + 2;
+                       while ((jiffies <= timeout) && !(inb_status(dev->base_addr) & ACRF));
+               } while (inb_status(dev->base_addr) & ACRF);
+               set_hsf(dev->base_addr, HSF_PCB_NAK);
        }
-
-       outb_control(inb_control(dev->base_addr)|ATTN|DIR,dev->base_addr);
-       timeout=jiffies+1;
-       while (jiffies<=timeout)
-               ;
-       outb_control(inb_control(dev->base_addr)&~ATTN,dev->base_addr);
-       timeout=jiffies+1;
-       while (jiffies<=timeout)
-               ;
-       outb_control(inb_control(dev->base_addr)|FLSH,dev->base_addr);
-       timeout=jiffies+1;
-       while (jiffies<=timeout)
-               ;
-       outb_control(inb_control(dev->base_addr)&~FLSH,dev->base_addr);
-       timeout=jiffies+1;
-       while (jiffies<=timeout)
-               ;
+       outb_control(inb_control(dev->base_addr) | ATTN | DIR, dev->base_addr);
+       timeout = jiffies + 1;
+       while (jiffies <= timeout);
+       outb_control(inb_control(dev->base_addr) & ~ATTN, dev->base_addr);
+       timeout = jiffies + 1;
+       while (jiffies <= timeout);
+       outb_control(inb_control(dev->base_addr) | FLSH, dev->base_addr);
+       timeout = jiffies + 1;
+       while (jiffies <= timeout);
+       outb_control(inb_control(dev->base_addr) & ~FLSH, dev->base_addr);
+       timeout = jiffies + 1;
+       while (jiffies <= timeout);
 
        outb_control(orig_hcr, dev->base_addr);
        if (!start_receive(dev, &adapter->tx_pcb))
                printk("%s: start receive command failed \n", dev->name);
 }
 
-/* These should be moved to the private data area */
-static int send_pcb_semaphore = 0;
-static int rx_restart_needed = 0;
+static inline void check_dma(struct device *dev)
+{
+       elp_device *adapter = dev->priv;
+       if (adapter->dmaing && (jiffies > (adapter->current_dma.start_time + 10))) {
+               unsigned long flags;
+               printk("%s: DMA %s timed out, %d bytes left\n", dev->name, adapter->current_dma.direction ? "download" : "upload", get_dma_residue(dev->dma));
+               save_flags(flags);
+               cli();
+               adapter->dmaing = 0;
+               adapter->busy = 0;
+               disable_dma(dev->dma);
+               if (adapter->rx_active)
+                       adapter->rx_active--;
+               outb_control(inb_control(dev->base_addr) & ~(DMAE | TCEN | DIR), dev->base_addr);
+               restore_flags(flags);
+       }
+}
 
 /* Primitive functions used by send_pcb() */
-static inline int send_pcb_slow(unsigned int base_addr, unsigned char byte)
+static inline unsigned int send_pcb_slow(unsigned int base_addr, unsigned char byte)
 {
-       int timeout;
+       unsigned int timeout;
        outb_command(byte, base_addr);
-       for (timeout = jiffies + 5; jiffies < timeout; ) {
-               if (inb_status(base_addr) & HCRE) return FALSE;
+       for (timeout = jiffies + 5; jiffies < timeout;) {
+               if (inb_status(base_addr) & HCRE)
+                       return FALSE;
        }
        printk("3c505: send_pcb_slow timed out\n");
        return TRUE;
 }
 
-static inline int send_pcb_fast(unsigned int base_addr, unsigned char byte)
+static inline unsigned int send_pcb_fast(unsigned int base_addr, unsigned char byte)
 {
-       int timeout;
+       unsigned int timeout;
        outb_command(byte, base_addr);
        for (timeout = 0; timeout < 40000; timeout++) {
-               if (inb_status(base_addr) & HCRE) return FALSE;
+               if (inb_status(base_addr) & HCRE)
+                       return FALSE;
        }
        printk("3c505: send_pcb_fast timed out\n");
        return TRUE;
 }
 
 static int
-start_receive (struct device * dev, pcb_struct * tx_pcb);
+ start_receive(struct device *dev, pcb_struct * tx_pcb);
 
 /* Check to see if the receiver needs restarting, and kick it if so */
 static inline void prime_rx(struct device *dev)
 {
-       if (rx_restart_needed) {
-               elp_device *adapter = dev->priv;
-               rx_restart_needed = 0;
-               start_receive(dev, &adapter->itx_pcb);
+       elp_device *adapter = dev->priv;
+       while (adapter->rx_active < ELP_RX_PCBS && dev->start) {
+               if (!start_receive(dev, &adapter->itx_pcb))
+                       break;
        }
 }
 
@@ -334,66+444,71 @@ static inline void prime_rx(struct device *dev)
  * timeout is reduced to 500us).
  */
 
-static int
-send_pcb (struct device * dev, pcb_struct * pcb)
+static int send_pcb(struct device *dev, pcb_struct * pcb)
 {
        int i;
        int timeout;
+       elp_device *adapter = dev->priv;
 
-        /* Avoid contention */
-       if (set_bit(1, &send_pcb_semaphore)) {
+       check_dma(dev);
+
+       if (adapter->dmaing && adapter->current_dma.direction == 0)
+               return FALSE;
+
+       /* Avoid contention */
+       if (set_bit(1, &adapter->send_pcb_semaphore)) {
                if (elp_debug >= 3) {
                        printk("%s: send_pcb entered while threaded\n", dev->name);
                }
                return FALSE;
        }
-
        /*
         * load each byte into the command register and
         * wait for the HCRE bit to indicate the adapter
         * had read the byte
         */
-       set_hsf(dev->base_addr,0);
+       set_hsf(dev->base_addr, 0);
 
-       if (send_pcb_slow(dev->base_addr, pcb->command)) goto abort;
+       if (send_pcb_slow(dev->base_addr, pcb->command))
+               goto abort;
 
        cli();
 
-       if (send_pcb_fast(dev->base_addr, pcb->length)) goto sti_abort;
+       if (send_pcb_fast(dev->base_addr, pcb->length))
+               goto sti_abort;
 
        for (i = 0; i < pcb->length; i++) {
-               if (send_pcb_fast(dev->base_addr, pcb->data.raw[i])) goto sti_abort;
+               if (send_pcb_fast(dev->base_addr, pcb->data.raw[i]))
+                       goto sti_abort;
        }
 
-       outb_control(inb_control(dev->base_addr) | 3, dev->base_addr);  /* signal end of PCB */
-       outb_command(2+pcb->length, dev->base_addr);
+       outb_control(inb_control(dev->base_addr) | 3, dev->base_addr);  /* signal end of PCB */
+       outb_command(2 + pcb->length, dev->base_addr);
 
        /* now wait for the acknowledgement */
        sti();
 
-       for (timeout = jiffies+5; jiffies < timeout; ) {
+       for (timeout = jiffies + 5; jiffies < timeout;) {
                switch (GET_ASF(dev->base_addr)) {
                case ASF_PCB_ACK:
-                       send_pcb_semaphore = 0;
-                       if (pcb->command != CMD_TRANSMIT_PACKET) {
-                               prime_rx(dev);
-                       }
+                       adapter->send_pcb_semaphore = 0;
                        return TRUE;
                        break;
                case ASF_PCB_NAK:
-                       printk(KERN_INFO "%s: send_pcb got NAK\n", dev->name);
+                       cli();
+                       printk("%s: send_pcb got NAK\n", dev->name);
                        goto abort;
                        break;
                }
        }
 
-       printk("%s: timeout waiting for PCB acknowledge (status %02x)\n", dev->name, inb_status(dev->base_addr));
+       if (elp_debug >= 1)
+               printk("%s: timeout waiting for PCB acknowledge (status %02x)\n", dev->name, inb_status(dev->base_addr));
 
-sti_abort:
+      sti_abort:
        sti();
-abort:
-       send_pcb_semaphore = 0;
-       prime_rx(dev);
+      abort:
+       adapter->send_pcb_semaphore = 0;
        return FALSE;
 }
 
@@ -401,7+516,7 @@ abort:
 /*****************************************************************
  *
  * receive_pcb
- *   Read a PCB to the adapter
+ *   Read a PCB from the adapter
  *
  *     wait for ACRF to be non-zero        ---<---+
  *     input a byte                               |
@@ -411,31+526,29 @@ abort:
  *
  *****************************************************************/
 
-static int
-receive_pcb (struct device * dev, pcb_struct * pcb)
+static int receive_pcb(struct device *dev, pcb_struct * pcb)
 {
        int i, j;
        int total_length;
        int stat;
        int timeout;
 
-       set_hsf(dev->base_addr,0);
+       elp_device *adapter = dev->priv;
+
+       set_hsf(dev->base_addr, 0);
 
        /* get the command code */
        timeout = jiffies + 2;
-       while (((stat = get_status(dev->base_addr))&ACRF) == 0 && jiffies < timeout)
-               ;
+       while (((stat = get_status(dev->base_addr)) & ACRF) == 0 && jiffies < timeout);
        if (jiffies >= timeout) {
                TIMEOUT_MSG(__LINE__);
                return FALSE;
        }
-
        pcb->command = inb_command(dev->base_addr);
 
        /* read the data length */
        timeout = jiffies + 3;
-       while (((stat = get_status(dev->base_addr)) & ACRF) == 0 && jiffies < timeout)
-               ;
+       while (((stat = get_status(dev->base_addr)) & ACRF) == 0 && jiffies < timeout);
        if (jiffies >= timeout) {
                TIMEOUT_MSG(__LINE__);
                printk("%s: status %02x\n", dev->name, stat);
@@ -448,14+561,12 @@ receive_pcb (struct device * dev, pcb_struct * pcb)
                adapter_reset(dev);
                return FALSE;
        }
-
        /* read the data */
        cli();
        i = 0;
        do {
                j = 0;
-               while (((stat = get_status(dev->base_addr))&ACRF) == 0 && j++ < 20000)
-                       ;
+               while (((stat = get_status(dev->base_addr)) & ACRF) == 0 && j++ < 20000);
                pcb->data.raw[i++] = inb_command(dev->base_addr);
                if (i > MAX_PCB_DATA)
                        INVALID_PCB_MSG(i);
@@ -465,7+576,6 @@ receive_pcb (struct device * dev, pcb_struct * pcb)
                TIMEOUT_MSG(__LINE__);
                return FALSE;
        }
-
        /* woops, the last "data" byte was really the length! */
        total_length = pcb->data.raw[--i];
 
@@ -473,58+583,26 @@ receive_pcb (struct device * dev, pcb_struct * pcb)
        if (total_length != (pcb->length + 2)) {
                if (elp_debug >= 2)
                        printk("%s: mangled PCB received\n", dev->name);
-               set_hsf(dev->base_addr,HSF_PCB_NAK);
+               set_hsf(dev->base_addr, HSF_PCB_NAK);
                return FALSE;
        }
 
-       set_hsf(dev->base_addr,HSF_PCB_ACK);
-       reset_count=0;
+       if (pcb->command == CMD_RECEIVE_PACKET_COMPLETE) {
+               if (set_bit(0, (void *) &adapter->busy)) {
+                       if (backlog_next(adapter->rx_backlog.in) == adapter->rx_backlog.out) {
+                               set_hsf(dev->base_addr, HSF_PCB_NAK);
+                               printk("%s: PCB rejected, transfer in progress and backlog full\n", dev->name);
+                               pcb->command = 0;
+                               return TRUE;
+                       } else {
+                               pcb->command = 0xff;
+                       }
+               }
+       }
+       set_hsf(dev->base_addr, HSF_PCB_ACK);
        return TRUE;
 }
 
-static void
-adapter_hard_reset (struct device * dev)
-{
-       int timeout;
-       long flags;
-
-       save_flags(flags);
-       sti();
-
-       if (elp_debug > 0)
-               printk("%s: Resetting the adapter, please wait (approx 20 s)\n",
-                       dev->name);
-       /*
-        * take FLSH and ATTN high
-        */
-       outb_control(ATTN|FLSH, dev->base_addr);
-
-       /*
-        * wait for a little bit
-        */
-       for (timeout = jiffies + 20; jiffies <= timeout; )
-               ;
-
-       /*
-        * now take them low
-        */
-       outb_control(0, dev->base_addr);
-
-       /*
-        * wait for a little bit
-        */
-       for (timeout = jiffies + 20; jiffies <= timeout; )
-               ;
-
-       /*
-        * now hang around until the board gets it's act together
-        */
-       for (timeout = jiffies + (100 * 15); jiffies <= timeout; ) 
-               if (GET_ASF(dev->base_addr) != ASF_PCB_END)
-                       break;
-       restore_flags(flags);
-}
-
 /******************************************************
  *
  *  queue a receive command on the adapter so we will get an
@@ -532,18+610,23 @@ adapter_hard_reset (struct device * dev)
  *
  ******************************************************/
 
-static int
-start_receive (struct device * dev, pcb_struct * tx_pcb)
+static int start_receive(struct device *dev, pcb_struct * tx_pcb)
 {
+       int status;
+       elp_device *adapter = dev->priv;
+
        if (elp_debug >= 3)
                printk("%s: restarting receiver\n", dev->name);
        tx_pcb->command = CMD_RECEIVE_PACKET;
        tx_pcb->length = sizeof(struct Rcv_pkt);
        tx_pcb->data.rcv_pkt.buf_seg
-               = tx_pcb->data.rcv_pkt.buf_ofs = 0; /* Unused */
+           = tx_pcb->data.rcv_pkt.buf_ofs = 0;         /* Unused */
        tx_pcb->data.rcv_pkt.buf_len = 1600;
        tx_pcb->data.rcv_pkt.timeout = 0;       /* set timeout to zero */
-       return send_pcb(dev, tx_pcb); 
+       status = send_pcb(dev, tx_pcb);
+       if (status)
+               adapter->rx_active++;
+       return status;
 }
 
 /******************************************************
@@ -555,139+638,146 @@ start_receive (struct device * dev, pcb_struct * tx_pcb)
  *
  ******************************************************/
 
-static void
-receive_packet (struct device * dev, int len)
+static void receive_packet(struct device *dev, int len)
 {
-       register int i;
-       unsigned short * ptr;
-       int timeout;
        int rlen;
+       elp_device *adapter = dev->priv;
+       unsigned long target;
        struct sk_buff *skb;
-       elp_device * adapter;
 
-       adapter=dev->priv;
+       rlen = (len + 1) & ~1;
+       skb = dev_alloc_skb(rlen + 2);
 
-       if (len <= 0 || ((len & ~1) != len))
-               if (elp_debug >= 3) {
-                       sti();
-                       printk("*** bad packet len %d at %s(%d)\n",len,filename,__LINE__);
-                       cli();
-               }
-
-       rlen = (len+1) & ~1;
-
-       skb = dev_alloc_skb(rlen+2);
-
-       /*
-        * make sure the data register is going the right way
-        */
-
-       outb_control(inb_control(dev->base_addr)|DIR, dev->base_addr);
-
-       /*
-        * if buffer could not be allocated, swallow it
-        */
-       if (skb == NULL) {
-               printk(KERN_INFO "%s: memory squeeze, dropping packet\n", dev->name);
-               for (i = 0; i < (rlen/2); i++) {
-                       timeout = 0;
-                       while ((inb_status(dev->base_addr)&HRDY) == 0 && timeout++ < 20000)
-                               ;
-                       if (timeout >= 20000) {
-                               sti();
-                               TIMEOUT_MSG(__LINE__);
-                               break;
-                       }
-
-                       inw_data(dev->base_addr);
-               }
-               adapter->stats.rx_dropped++;
+       adapter->current_dma.copy_flag = 0;
 
+       if (!skb) {
+         printk("%s: memory squeeze, dropping packet\n", dev->name);
+         target = virt_to_bus(adapter->dma_buffer);
        } else {
-               skb_reserve(skb,2);     /* 16 byte alignment */
-               skb->dev = dev;
-
-               /*
-                * now read the data from the adapter
-                */
-               ptr = (unsigned short *)skb_put(skb,len);
-               for (i = 0; i < (rlen/2); i++) { 
-                       timeout = 0;
-                       while ((inb_status(dev->base_addr)&HRDY) == 0 && timeout++ < 20000) 
-                               ;
-                       if (timeout >= 20000) {
-                               sti();
-                               printk("*** timeout at %s(%d) reading word %d of %d ***\n",
-                                       filename,__LINE__, i, rlen/2);  
-                               kfree_skb(skb, FREE_WRITE);
-                               return;
-                       }
-
-                       *ptr = inw_data(dev->base_addr); 
-                       ptr++; 
-               }
-
-               sti();
-               skb->protocol=eth_type_trans(skb,dev);
-               netif_rx(skb);
+         skb_reserve(skb, 2);
+         target = virt_to_bus(skb_put(skb, rlen));
+         if ((target + rlen) >= MAX_DMA_ADDRESS) {
+           target = virt_to_bus(adapter->dma_buffer);
+           adapter->current_dma.copy_flag = 1;
+         }
+       }
+       /* if this happens, we die */
+       if (set_bit(0, (void *) &adapter->dmaing))
+               printk("%s: rx blocked, DMA in progress, dir %d\n", dev->name, adapter->current_dma.direction);
+
+       adapter->current_dma.direction = 0;
+       adapter->current_dma.length = rlen;
+       adapter->current_dma.skb = skb;
+       adapter->current_dma.start_time = jiffies;
+
+       outb_control(inb_control(dev->base_addr) | DIR | TCEN | DMAE, dev->base_addr);
+
+       disable_dma(dev->dma);
+       clear_dma_ff(dev->dma);
+       set_dma_mode(dev->dma, 0x04);   /* dma read */
+       set_dma_addr(dev->dma, target);
+       set_dma_count(dev->dma, rlen);
+       enable_dma(dev->dma);
+
+       if (elp_debug >= 3) {
+               printk("%s: rx DMA transfer started\n", dev->name);
        }
+       if (adapter->rx_active)
+               adapter->rx_active--;
 
-       outb_control(inb_control(dev->base_addr)&~DIR, dev->base_addr);
+       if (!adapter->busy)
+               printk("%s: receive_packet called, busy not set.\n", dev->name);
 }
 
-
 /******************************************************
  *
  * interrupt handler
  *
  ******************************************************/
 
-static void
-elp_interrupt (int irq, void *dev_id, struct pt_regs *reg_ptr)
+static void elp_interrupt(int irq, void *dev_id, struct pt_regs *reg_ptr)
 {
        int len;
        int dlen;
+       int icount = 0;
        struct device *dev;
-       elp_device * adapter;
+       elp_device *adapter;
        int timeout;
 
        if (irq < 0 || irq > 15) {
-               printk ("elp_interrupt(): illegal IRQ number found in interrupt routine (%i)\n", irq);
+               printk("elp_interrupt(): illegal IRQ number found in interrupt routine (%i)\n", irq);
                return;
        }
-
        dev = irq2dev_map[irq];
 
        if (dev == NULL) {
-               printk ("elp_interrupt(): irq %d for unknown device.\n", irq);
+               printk("elp_interrupt(): irq %d for unknown device.\n", irq);
                return;
        }
-
        adapter = (elp_device *) dev->priv;
 
-       if (dev->interrupt)
-               if (elp_debug >= 2)
-                       printk("%s: Re-entering the interrupt handler.\n", dev->name);
+       if (dev->interrupt) {
+               printk("%s: re-entering the interrupt handler!\n", dev->name);
+               return;
+       }
        dev->interrupt = 1;
 
-       /*
-        * allow interrupts (we need timers!)
-        */
-       sti();
-
-       /*
-        * receive a PCB from the adapter
-        */
-       timeout = jiffies + 3;
-       while ((inb_status(dev->base_addr)&ACRF) != 0 && jiffies < timeout) {
+       do {
+               /*
+                * has a DMA transfer finished?
+                */
+               if (inb_status(dev->base_addr) & DONE) {
+                       if (!adapter->dmaing) {
+                               printk("%s: phantom DMA completed\n", dev->name);
+                       }
+                       if (elp_debug >= 3) {
+                               printk("%s: %s DMA complete, status %02x\n", dev->name, adapter->current_dma.direction ? "tx" : "rx", inb_status(dev->base_addr));
+                       }
 
-               if (receive_pcb(dev, &adapter->irx_pcb)) {
+                       outb_control(inb_control(dev->base_addr) & ~(DMAE | TCEN | DIR), dev->base_addr);
+                       if (adapter->current_dma.direction) {
+                               dev_kfree_skb(adapter->current_dma.skb, FREE_WRITE);
+                       } else {
+                               struct sk_buff *skb = adapter->current_dma.skb;
+                               if (skb) {
+                                 skb->dev = dev;
+                                 if (adapter->current_dma.copy_flag) {
+                                   memcpy(skb_put(skb, adapter->current_dma.length), adapter->dma_buffer, adapter->current_dma.length);
+                                 }
+                                 skb->protocol = eth_type_trans(skb,dev);
+                                 netif_rx(skb);
+                               }
+                       }
+                       adapter->dmaing = 0;
+                       if (adapter->rx_backlog.in != adapter->rx_backlog.out) {
+                               int t = adapter->rx_backlog.length[adapter->rx_backlog.out];
+                               adapter->rx_backlog.out = backlog_next(adapter->rx_backlog.out);
+                               if (elp_debug >= 2)
+                                       printk("%s: receiving backlogged packet (%d)\n", dev->name, t);
+                               receive_packet(dev, t);
+                       } else {
+                               adapter->busy = 0;
+                       }
+               } else {
+                       /* has one timed out? */
+                       check_dma(dev);
+               }
 
-                       switch (adapter->irx_pcb.command) {
+               sti();
 
-                               /*
-                                * received a packet - this must be handled fast
-                                */
+               /*
+                * receive a PCB from the adapter
+                */
+               timeout = jiffies + 3;
+               while ((inb_status(dev->base_addr) & ACRF) != 0 && jiffies < timeout) {
+                       if (receive_pcb(dev, &adapter->irx_pcb)) {
+                               switch (adapter->irx_pcb.command) {
+                               case 0:
+                                       break;
+                                       /*
+                                        * received a packet - this must be handled fast
+                                        */
+                               case 0xff:
                                case CMD_RECEIVE_PACKET_COMPLETE:
                                        /* if the device isn't open, don't pass packets up the stack */
                                        if (dev->start == 0)
@@ -704,103+794,116 @@ elp_interrupt (int irq, void *dev_id, struct pt_regs *reg_ptr)
                                                        printk("%s: interrupt - packet received of length %i (%i)\n", dev->name, len, dlen);
                                                        cli();
                                                }
-                                               receive_packet(dev, dlen);
+                                               if (adapter->irx_pcb.command == 0xff) {
+                                                       if (elp_debug >= 2)
+                                                               printk("%s: adding packet to backlog (len = %d)\n", dev->name, dlen);
+                                                       adapter->rx_backlog.length[adapter->rx_backlog.in] = dlen;
+                                                       adapter->rx_backlog.in = backlog_next(adapter->rx_backlog.in);
+                                               } else {
+                                                       receive_packet(dev, dlen);
+                                               }
                                                sti();
                                                if (elp_debug >= 3)
                                                        printk("%s: packet received\n", dev->name);
                                        }
-                                       if (dev->start && !start_receive(dev, &adapter->itx_pcb)) {
-                                               if (elp_debug >= 2)
-                                                       printk("%s: interrupt - receiver start deferred\n", dev->name);
-                                               rx_restart_needed = 1;
-                                       }
-                                       if (elp_debug >= 3)
-                                       printk("%s: receive procedure complete\n", dev->name);
-
                                        break;
 
-                               /*
-                                * 82586 configured correctly
-                                */
+                                       /*
+                                        * 82586 configured correctly
+                                        */
                                case CMD_CONFIGURE_82586_RESPONSE:
                                        adapter->got[CMD_CONFIGURE_82586] = 1;
                                        if (elp_debug >= 3)
                                                printk("%s: interrupt - configure response received\n", dev->name);
                                        break;
 
-                               /*
-                                * Adapter memory configuration
-                                */
+                                       /*
+                                        * Adapter memory configuration
+                                        */
                                case CMD_CONFIGURE_ADAPTER_RESPONSE:
                                        adapter->got[CMD_CONFIGURE_ADAPTER_MEMORY] = 1;
                                        if (elp_debug >= 3)
-                                               printk("%s: Adapter memory configuration %s.\n",dev->name,
-                                                       adapter->irx_pcb.data.failed?"failed":"succeeded");
+                                               printk("%s: Adapter memory configuration %s.\n", dev->name,
+                                                      adapter->irx_pcb.data.failed ? "failed" : "succeeded");
                                        break;
 
-                               /*
-                                * Multicast list loading
-                                */
+                                       /*
+                                        * Multicast list loading
+                                        */
                                case CMD_LOAD_MULTICAST_RESPONSE:
                                        adapter->got[CMD_LOAD_MULTICAST_LIST] = 1;
                                        if (elp_debug >= 3)
-                                               printk("%s: Multicast address list loading %s.\n",dev->name,
-                                                       adapter->irx_pcb.data.failed?"failed":"succeeded");
+                                               printk("%s: Multicast address list loading %s.\n", dev->name,
+                                                      adapter->irx_pcb.data.failed ? "failed" : "succeeded");
                                        break;
 
-                               /*
-                                * Station address setting
-                                */
+                                       /*
+                                        * Station address setting
+                                        */
                                case CMD_SET_ADDRESS_RESPONSE:
                                        adapter->got[CMD_SET_STATION_ADDRESS] = 1;
                                        if (elp_debug >= 3)
-                                               printk("%s: Ethernet address setting %s.\n",dev->name,
-                                                       adapter->irx_pcb.data.failed?"failed":"succeeded");
+                                               printk("%s: Ethernet address setting %s.\n", dev->name,
+                                                      adapter->irx_pcb.data.failed ? "failed" : "succeeded");
                                        break;
 
 
-                               /*
-                                * received board statistics
-                                */
+                                       /*
+                                        * received board statistics
+                                        */
                                case CMD_NETWORK_STATISTICS_RESPONSE:
                                        adapter->stats.rx_packets += adapter->irx_pcb.data.netstat.tot_recv;
                                        adapter->stats.tx_packets += adapter->irx_pcb.data.netstat.tot_xmit;
                                        adapter->stats.rx_crc_errors += adapter->irx_pcb.data.netstat.err_CRC;
                                        adapter->stats.rx_frame_errors += adapter->irx_pcb.data.netstat.err_align;
                                        adapter->stats.rx_fifo_errors += adapter->irx_pcb.data.netstat.err_ovrrun;
+                                       adapter->stats.rx_over_errors += adapter->irx_pcb.data.netstat.err_res;
                                        adapter->got[CMD_NETWORK_STATISTICS] = 1;
                                        if (elp_debug >= 3)
                                                printk("%s: interrupt - statistics response received\n", dev->name);
                                        break;
 
-                               /*
-                                * sent a packet
-                                */
+                                       /*
+                                        * sent a packet
+                                        */
                                case CMD_TRANSMIT_PACKET_COMPLETE:
-                                       if (elp_debug >= 3) 
-                                       printk("%s: interrupt - packet sent\n", dev->name);
+                                       if (elp_debug >= 3)
+                                               printk("%s: interrupt - packet sent\n", dev->name);
                                        if (dev->start == 0)
                                                break;
-                                       if (adapter->irx_pcb.data.xmit_resp.c_stat != 0)
-                                               if (elp_debug >= 2)
+                                       if (adapter->irx_pcb.data.xmit_resp.c_stat != 0) {
+                                               if (elp_debug >= 0)
                                                        printk("%s: interrupt - error sending packet %4.4x\n",
-                                                               dev->name, adapter->irx_pcb.data.xmit_resp.c_stat);
+                                                              dev->name, adapter->irx_pcb.data.xmit_resp.c_stat);
+                                               switch (adapter->irx_pcb.data.xmit_resp.c_stat) {
+                                               case 0xffff:
+                                                       adapter->stats.tx_aborted_errors++;
+                                                       break;
+                                               case 0xfffe:
+                                                       adapter->stats.tx_fifo_errors++;
+                                                       break;
+                                               }
+                                       }
                                        dev->tbusy = 0;
                                        mark_bh(NET_BH);
                                        break;
 
-                               /*
-                                * some unknown PCB
-                                */
+                                       /*
+                                        * some unknown PCB
+                                        */
                                default:
                                        printk("%s: unknown PCB received - %2.2x\n", dev->name, adapter->irx_pcb.command);
                                        break;
+                               }
+                       } else {
+                               printk("%s: failed to read PCB on interrupt\n", dev->name);
+                               adapter_reset(dev);
                        }
-               } else {
-                       printk("%s: failed to read PCB on interrupt\n", dev->name);
-                       adapter_reset(dev);
                }
-       }
+
+       } while (icount++ < 5 && (inb_status(dev->base_addr) & (ACRF | DONE)));
+
+       prime_rx(dev);
 
        /*
         * indicate no longer in interrupt routine
@@ -815,14+918,13 @@ elp_interrupt (int irq, void *dev_id, struct pt_regs *reg_ptr)
  *
  ******************************************************/
 
-static int
-elp_open (struct device *dev)
+static int elp_open(struct device *dev)
 {
-       elp_device * adapter;
+       elp_device *adapter;
 
        adapter = dev->priv;
 
-       if (elp_debug >= 3)  
+       if (elp_debug >= 3)
                printk("%s: request to open device\n", dev->name);
 
        /*
@@ -832,7+934,6 @@ elp_open (struct device *dev)
                printk("%s: Opening a non-existent physical device\n", dev->name);
                return -EAGAIN;
        }
-
        /*
         * disable interrupts on the board
         */
@@ -855,6+956,16 @@ elp_open (struct device *dev)
        dev->tbusy = 0;
 
        /*
+        * no receive PCBs active
+        */
+       adapter->rx_active = 0;
+
+       adapter->busy = 0;
+       adapter->send_pcb_semaphore = 0;
+       adapter->rx_backlog.in = 0;
+       adapter->rx_backlog.out = 0;
+
+       /*
         * make sure we can find the device header given the interrupt number
         */
        irq2dev_map[dev->irq] = dev;
@@ -866,6+977,15 @@ elp_open (struct device *dev)
                irq2dev_map[dev->irq] = NULL;
                return -EAGAIN;
        }
+       if (request_dma(dev->dma, "3c505")) {
+               printk("%s: could not allocate DMA channel\n", dev->name);
+               return -EAGAIN;
+       }
+       adapter->dma_buffer = (void *) dma_mem_alloc(DMA_BUFFER_SIZE);
+       if (!adapter->dma_buffer) {
+               printk("Could not allocate DMA buffer\n");
+       }
+       adapter->dmaing = 0;
 
        /*
         * enable interrupts on the board
@@ -895,8+1015,7 @@ elp_open (struct device *dev)
                printk("%s: couldn't send memory configuration command\n", dev->name);
        else {
                int timeout = jiffies + TIMEOUT;
-               while (adapter->got[CMD_CONFIGURE_ADAPTER_MEMORY] == 0 && jiffies < timeout)
-                       ;
+               while (adapter->got[CMD_CONFIGURE_ADAPTER_MEMORY] == 0 && jiffies < timeout);
                if (jiffies >= timeout)
                        TIMEOUT_MSG(__LINE__);
        }
@@ -909,35+1028,30 @@ elp_open (struct device *dev)
                printk("%s: sending 82586 configure command\n", dev->name);
        adapter->tx_pcb.command = CMD_CONFIGURE_82586;
        adapter->tx_pcb.data.configure = NO_LOOPBACK | RECV_BROAD;
-       adapter->tx_pcb.length  = 2;
+       adapter->tx_pcb.length = 2;
        adapter->got[CMD_CONFIGURE_82586] = 0;
        if (!send_pcb(dev, &adapter->tx_pcb))
                printk("%s: couldn't send 82586 configure command\n", dev->name);
        else {
                int timeout = jiffies + TIMEOUT;
-               while (adapter->got[CMD_CONFIGURE_82586] == 0 && jiffies < timeout)
-                       ;
+               while (adapter->got[CMD_CONFIGURE_82586] == 0 && jiffies < timeout);
                if (jiffies >= timeout)
                        TIMEOUT_MSG(__LINE__);
        }
 
+       /* enable burst-mode DMA */
+       outb(0x1, dev->base_addr + PORT_AUXDMA);
+
        /*
         * queue receive commands to provide buffering
         */
-       if (!start_receive(dev, &adapter->tx_pcb))
-               printk("%s: start receive command failed \n", dev->name);
-       if (!start_receive(dev, &adapter->tx_pcb))
-               printk("%s: start receive command failed \n", dev->name);
-       if (!start_receive(dev, &adapter->tx_pcb))
-               printk("%s: start receive command failed \n", dev->name);
-       if (!start_receive(dev, &adapter->tx_pcb))
-               printk("%s: start receive command failed \n", dev->name);
+       prime_rx(dev);
        if (elp_debug >= 3)
-               printk("%s: start receive command sent\n", dev->name);
+               printk("%s: %d receive PCBs active\n", dev->name, adapter->rx_active);
 
        MOD_INC_USE_COUNT;
 
-       return 0;                       /* Always succeed */
+       return 0;               /* Always succeed */
 }
 
 
@@ -947,23+1061,23 @@ elp_open (struct device *dev)
  *
  ******************************************************/
 
-static int
-send_packet (struct device * dev, unsigned char * ptr, int len)
+static int send_packet(struct device *dev, struct sk_buff *skb)
 {
-       int i;
-       int timeout = 0;
-       elp_device * adapter;
+       elp_device *adapter = dev->priv;
+       unsigned long target;
 
        /*
         * make sure the length is even and no shorter than 60 bytes
         */
-       unsigned int nlen = (((len < 60) ? 60 : len) + 1) & (~1);
+       unsigned int nlen = (((skb->len < 60) ? 60 : skb->len) + 1) & (~1);
 
+       if (set_bit(0, (void *) &adapter->busy)) {
+               if (elp_debug >= 2)
+                       printk("%s: transmit blocked\n", dev->name);
+               return FALSE;
+       }
        adapter = dev->priv;
 
-       if (nlen < len)
-               printk("Warning, bad length nlen=%d len=%d %s(%d)\n",nlen,len,filename,__LINE__);
-
        /*
         * send the adapter a transmit packet command. Ignore segment and offset
         * and make sure the length is even
@@ -971,33+1085,36 @@ send_packet (struct device * dev, unsigned char * ptr, int len)
        adapter->tx_pcb.command = CMD_TRANSMIT_PACKET;
        adapter->tx_pcb.length = sizeof(struct Xmit_pkt);
        adapter->tx_pcb.data.xmit_pkt.buf_ofs
-               = adapter->tx_pcb.data.xmit_pkt.buf_seg = 0; /* Unused */
+           = adapter->tx_pcb.data.xmit_pkt.buf_seg = 0;        /* Unused */
        adapter->tx_pcb.data.xmit_pkt.pkt_len = nlen;
+
        if (!send_pcb(dev, &adapter->tx_pcb)) {
+               adapter->busy = 0;
                return FALSE;
        }
+       /* if this happens, we die */
+       if (set_bit(0, (void *) &adapter->dmaing))
+               printk("%s: tx: DMA %d in progress\n", dev->name, adapter->current_dma.direction);
 
-       /*
-        * write data to the adapter
-        */
-       cli();
-       for (i = 0; i < (nlen/2);i++) {
-               while (((inb_status(dev->base_addr)&HRDY) == 0)
-                      && (timeout++ < 20000))
-                       ;
-               if (timeout >= 20000) {
-                       sti();
-                       printk("%s: timeout at %s(%d) writing word %d of %d ***\n",
-                               dev->name,filename,__LINE__, i, nlen/2);
-                       return FALSE;
-               }
+       adapter->current_dma.direction = 1;
+       adapter->current_dma.start_time = jiffies;
 
-               outw_data(*(short *)ptr, dev->base_addr);
-               ptr +=2;
+       target = virt_to_bus(skb->data);
+       if ((target + nlen) >= MAX_DMA_ADDRESS) {
+               memcpy(adapter->dma_buffer, skb->data, nlen);
+               target = virt_to_bus(adapter->dma_buffer);
        }
-       sti();
-
-       prime_rx(dev);
+       adapter->current_dma.skb = skb;
+       cli();
+       disable_dma(dev->dma);
+       clear_dma_ff(dev->dma);
+       set_dma_mode(dev->dma, 0x08);   /* dma memory -> io */
+       set_dma_addr(dev->dma, target);
+       set_dma_count(dev->dma, nlen);
+       enable_dma(dev->dma);
+       outb_control(inb_control(dev->base_addr) | DMAE | TCEN, dev->base_addr);
+       if (elp_debug >= 3)
+               printk("%s: DMA transfer started\n", dev->name);
 
        return TRUE;
 }
@@ -1009,23+1126,33 @@ send_packet (struct device * dev, unsigned char * ptr, int len)
  *
  ******************************************************/
 
-static int
-elp_start_xmit (struct sk_buff *skb, struct device *dev)
+static int elp_start_xmit(struct sk_buff *skb, struct device *dev)
 {
+       if (dev->interrupt) {
+               printk("%s: start_xmit aborted (in irq)\n", dev->name);
+               return 1;
+       }
+
+       check_dma(dev);
+
        /*
         * if the transmitter is still busy, we have a transmit timeout...
         */
        if (dev->tbusy) {
-               int tickssofar = jiffies - dev->trans_start;
+               elp_device *adapter = dev->priv;
+                       int tickssofar = jiffies - dev->trans_start;
                int stat;
-               if (tickssofar < 40)
+
+               if (tickssofar < 1000)
                        return 1;
+
                stat = inb_status(dev->base_addr);
-               printk("%s: transmit timed out, %s?\n", dev->name, (stat & ACRF)?"IRQ conflict":"network cable problem");
+               printk("%s: transmit timed out, %s?\n", dev->name, (stat & ACRF) ? "IRQ conflict" : "network cable problem");
                if (elp_debug >= 1)
-                 printk("%s: status %#02x\n", dev->name, stat);
+                       printk("%s: status %#02x\n", dev->name, stat);
                dev->trans_start = jiffies;
                dev->tbusy = 0;
+               adapter->stats.tx_dropped++;
        }
 
        /* Some upper layer thinks we've missed a tx-done interrupt */
@@ -1038,34+1165,31 @@ elp_start_xmit (struct sk_buff *skb, struct device *dev)
                return 0;
 
        if (elp_debug >= 3)
-               printk("%s: request to send packet of length %d\n", dev->name, (int)skb->len);
+               printk("%s: request to send packet of length %d\n", dev->name, (int) skb->len);
 
+       if (set_bit(0, (void *) &dev->tbusy)) {
+               printk("%s: transmitter access conflict\n", dev->name);
+               return 1;
+       }
        /*
         * send the packet at skb->data for skb->len
         */
-       if (!send_packet(dev, skb->data, skb->len)) {
-               printk("%s: failed to transmit packet\n", dev->name);
+       if (!send_packet(dev, skb)) {
+               if (elp_debug >= 2) {
+                       printk("%s: failed to transmit packet\n", dev->name);
+               }
+               dev->tbusy = 0;
                return 1;
        }
-
        if (elp_debug >= 3)
-               printk("%s: packet of length %d sent\n", dev->name, (int)skb->len);
-
+               printk("%s: packet of length %d sent\n", dev->name, (int) skb->len);
 
        /*
         * start the transmit timeout
         */
        dev->trans_start = jiffies;
 
-       /*
-        * the transmitter is now busy
-        */
-       dev->tbusy = 1;
-
-       /*
-        * free the buffer
-        */
-       dev_kfree_skb(skb, FREE_WRITE);
+       prime_rx(dev);
 
        return 0;
 }
@@ -1077,7+1201,7 @@ elp_start_xmit (struct sk_buff *skb, struct device *dev)
  ******************************************************/
 
 static struct enet_statistics *
-elp_get_stats (struct device *dev)
+ elp_get_stats(struct device *dev)
 {
        elp_device *adapter = (elp_device *) dev->priv;
 
@@ -1091,14+1215,13 @@ elp_get_stats (struct device *dev)
 
        /* send a get statistics command to the board */
        adapter->tx_pcb.command = CMD_NETWORK_STATISTICS;
-       adapter->tx_pcb.length  = 0;
+       adapter->tx_pcb.length = 0;
        adapter->got[CMD_NETWORK_STATISTICS] = 0;
        if (!send_pcb(dev, &adapter->tx_pcb))
                printk("%s: couldn't send get statistics command\n", dev->name);
        else {
                int timeout = jiffies + TIMEOUT;
-               while (adapter->got[CMD_NETWORK_STATISTICS] == 0 && jiffies < timeout)
-                       ;
+               while (adapter->got[CMD_NETWORK_STATISTICS] == 0 && jiffies < timeout);
                if (jiffies >= timeout) {
                        TIMEOUT_MSG(__LINE__);
                        return &adapter->stats;
@@ -1115,10+1238,9 @@ elp_get_stats (struct device *dev)
  *
  ******************************************************/
 
-static int
-elp_close (struct device *dev)
+static int elp_close(struct device *dev)
 {
-       elp_device * adapter;
+       elp_device *adapter;
 
        adapter = dev->priv;
 
@@ -1156,6+1278,9 @@ elp_close (struct device *dev)
         */
        irq2dev_map[dev->irq] = 0;
 
+       free_dma(dev->dma);
+       free_pages((unsigned long) adapter->dma_buffer, __get_order(DMA_BUFFER_SIZE));
+
        MOD_DEC_USE_COUNT;
 
        return 0;
@@ -1171,44+1296,39 @@ elp_close (struct device *dev)
  *
  ************************************************************/
 
-static void
-elp_set_mc_list (struct device *dev)
+static void elp_set_mc_list(struct device *dev)
 {
        elp_device *adapter = (elp_device *) dev->priv;
-       struct dev_mc_list *dmi=dev->mc_list;
+       struct dev_mc_list *dmi = dev->mc_list;
        int i;
 
        if (elp_debug >= 3)
                printk("%s: request to set multicast list\n", dev->name);
 
-       if (!(dev->flags&(IFF_PROMISC|IFF_ALLMULTI)))
-       {
+       if (!(dev->flags & (IFF_PROMISC | IFF_ALLMULTI))) {
                /* send a "load multicast list" command to the board, max 10 addrs/cmd */
                /* if num_addrs==0 the list will be cleared */
                adapter->tx_pcb.command = CMD_LOAD_MULTICAST_LIST;
-               adapter->tx_pcb.length  = 6*dev->mc_count;
-               for (i=0;i<dev->mc_count;i++)
-               {
-                       memcpy(adapter->tx_pcb.data.multicast[i], dmi->dmi_addr,6);
-                       dmi=dmi->next;
+               adapter->tx_pcb.length = 6 * dev->mc_count;
+               for (i = 0; i < dev->mc_count; i++) {
+                       memcpy(adapter->tx_pcb.data.multicast[i], dmi->dmi_addr, 6);
+                       dmi = dmi->next;
                }
                adapter->got[CMD_LOAD_MULTICAST_LIST] = 0;
                if (!send_pcb(dev, &adapter->tx_pcb))
                        printk("%s: couldn't send set_multicast command\n", dev->name);
                else {
                        int timeout = jiffies + TIMEOUT;
-                       while (adapter->got[CMD_LOAD_MULTICAST_LIST] == 0 && jiffies < timeout)
-                               ;
+                       while (adapter->got[CMD_LOAD_MULTICAST_LIST] == 0 && jiffies < timeout);
                        if (jiffies >= timeout) {
                                TIMEOUT_MSG(__LINE__);
                        }
                }
                if (dev->mc_count)
                        adapter->tx_pcb.data.configure = NO_LOOPBACK | RECV_BROAD | RECV_MULTI;
-               else /* num_addrs == 0 */
+               else            /* num_addrs == 0 */
                        adapter->tx_pcb.data.configure = NO_LOOPBACK | RECV_BROAD;
-       } 
-       else
+       } else
                adapter->tx_pcb.data.configure = NO_LOOPBACK | RECV_PROMISC;
        /*
         * configure adapter to receive messages (as specified above)
@@ -1217,14+1337,13 @@ elp_set_mc_list (struct device *dev)
        if (elp_debug >= 3)
                printk("%s: sending 82586 configure command\n", dev->name);
        adapter->tx_pcb.command = CMD_CONFIGURE_82586;
-       adapter->tx_pcb.length  = 2;
-       adapter->got[CMD_CONFIGURE_82586]  = 0;
+       adapter->tx_pcb.length = 2;
+       adapter->got[CMD_CONFIGURE_82586] = 0;
        if (!send_pcb(dev, &adapter->tx_pcb))
                printk("%s: couldn't send 82586 configure command\n", dev->name);
        else {
                int timeout = jiffies + TIMEOUT;
-               while (adapter->got[CMD_CONFIGURE_82586] == 0 && jiffies < timeout)
-                       ;
+               while (adapter->got[CMD_CONFIGURE_82586] == 0 && jiffies < timeout);
                if (jiffies >= timeout)
                        TIMEOUT_MSG(__LINE__);
        }
@@ -1236,17+1355,16 @@ elp_set_mc_list (struct device *dev)
  *
  ******************************************************/
 
-static void
-elp_init (struct device *dev)
+static void elp_init(struct device *dev)
 {
-       elp_device * adapter;
+       elp_device *adapter = dev->priv;
 
        /*
         * set ptrs to various functions
         */
        dev->open = elp_open;   /* local */
        dev->stop = elp_close;  /* local */
-       dev->get_stats = elp_get_stats; /* local */
+       dev->get_stats = elp_get_stats;         /* local */
        dev->hard_start_xmit = elp_start_xmit;  /* local */
        dev->set_multicast_list = elp_set_mc_list;      /* local */
 
@@ -1256,9+1374,6 @@ elp_init (struct device *dev)
        /*
         * setup ptr to adapter specific information
         */
-       adapter = (elp_device *)(dev->priv = kmalloc(sizeof(elp_device), GFP_KERNEL));
-       if (adapter == NULL)
-               return;
        memset(&(adapter->stats), 0, sizeof(struct enet_statistics));
 
        /*
@@ -1273,31+1388,29 @@ elp_init (struct device *dev)
  * Called only by elp_autodetect
  ************************************************************/
 
-static int
-elp_sense (struct device * dev)
+static int elp_sense(struct device *dev)
 {
        int timeout;
-       int addr=dev->base_addr;
-       const char *name=dev->name;
+       int addr = dev->base_addr;
+       const char *name = dev->name;
        long flags;
        byte orig_HCR, orig_HSR;
 
-       if (check_region(addr, 0xf)) 
-         return -1;  
+       if (check_region(addr, 0xf))
+               return -1;
 
-       orig_HCR=inb_control(addr);
-       orig_HSR=inb_status(addr);
+       orig_HCR = inb_control(addr);
+       orig_HSR = inb_status(addr);
 
        if (elp_debug > 0)
                printk(search_msg, name, addr);
 
-       if (((orig_HCR==0xff) && (orig_HSR==0xff)) ||
+       if (((orig_HCR == 0xff) && (orig_HSR == 0xff)) ||
            ((orig_HCR & DIR) != (orig_HSR & DIR))) {
                if (elp_debug > 0)
                        printk(notfound_msg, 1);
-               return -1; /* It can't be 3c505 if HCR.DIR != HSR.DIR */
+               return -1;      /* It can't be 3c505 if HCR.DIR != HSR.DIR */
        }
-
        /* Enable interrupts - we need timers! */
        save_flags(flags);
        sti();
@@ -1305,32+1418,26 @@ elp_sense (struct device * dev)
        /* Wait for a while; the adapter may still be booting up */
        if (elp_debug > 0)
                printk(stilllooking_msg);
-       for (timeout = jiffies + (100 * 15); jiffies <= timeout; ) 
-               if (GET_ASF(addr) != ASF_PCB_END)
-                       break;
-
        if (orig_HCR & DIR) {
                /* If HCR.DIR is up, we pull it down. HSR.DIR should follow. */
-               outb_control(orig_HCR & ~DIR,addr);
-               timeout = jiffies+30;
-               while (jiffies < timeout)
-                       ;
+               outb_control(orig_HCR & ~DIR, addr);
+               timeout = jiffies + 30;
+               while (jiffies < timeout);
                restore_flags(flags);
                if (inb_status(addr) & DIR) {
-                       outb_control(orig_HCR,addr);
+                       outb_control(orig_HCR, addr);
                        if (elp_debug > 0)
                                printk(notfound_msg, 2);
                        return -1;
                }
        } else {
                /* If HCR.DIR is down, we pull it up. HSR.DIR should follow. */
-               outb_control(orig_HCR | DIR,addr);
-               timeout = jiffies+300;
-               while (jiffies < timeout)
-                       ;
+               outb_control(orig_HCR | DIR, addr);
+               timeout = jiffies + 30;
+               while (jiffies < timeout);
                restore_flags(flags);
                if (!(inb_status(addr) & DIR)) {
-                       outb_control(orig_HCR,addr);
+                       outb_control(orig_HCR, addr);
                        if (elp_debug > 0)
                                printk(notfound_msg, 3);
                        return -1;
@@ -1341,10+1448,8 @@ elp_sense (struct device * dev)
         * a hard reset. Also, do a hard reset if selected at the compile time.
         */
        if (elp_debug > 0)
-                       printk(found_msg);
+               printk(found_msg);
 
-       if (((orig_HCR==0x35) && (orig_HSR==0x5b)) || ELP_NEED_HARD_RESET)
-               adapter_hard_reset(dev);
        return 0;
 }
 
@@ -1354,90+1459,170 @@ elp_sense (struct device * dev)
  * Called only by eplus_probe
  *************************************************************/
 
-static int
-elp_autodetect (struct device * dev)
+static int elp_autodetect(struct device *dev)
 {
-       int idx=0;
+       int idx = 0;
 
        /* if base address set, then only check that address
-       otherwise, run through the table */
-       if (dev->base_addr != 0) { /* dev->base_addr == 0 ==> plain autodetect */
+          otherwise, run through the table */
+       if (dev->base_addr != 0) {      /* dev->base_addr == 0 ==> plain autodetect */
                if (elp_sense(dev) == 0)
                        return dev->base_addr;
-       } else while ( (dev->base_addr=addr_list[idx++]) ) {
-               if (elp_sense(dev) == 0)
-                       return dev->base_addr;
-       }
+       } else
+               while ((dev->base_addr = addr_list[idx++])) {
+                       if (elp_sense(dev) == 0)
+                               return dev->base_addr;
+               }
 
        /* could not find an adapter */
        if (elp_debug > 0)
                printk(couldnot_msg, dev->name);
 
-       return 0; /* Because of this, the layer above will return -ENODEV */
+       return 0;               /* Because of this, the layer above will return -ENODEV */
 }
 
+
 /******************************************************
  *
  * probe for an Etherlink Plus board at the specified address
  *
  ******************************************************/
 
-int
-elplus_probe (struct device *dev)
+/* There are three situations we need to be able to detect here:
+
+ *  a) the card is idle
+ *  b) the card is still booting up
+ *  c) the card is stuck in a strange state (some DOS drivers do this)
+ *
+ * In case (a), all is well.  In case (b), we wait 10 seconds to see if the
+ * card finishes booting, and carry on if so.  In case (c), we do a hard reset,
+ * loop round, and hope for the best.
+ *
+ * This is all very unpleasant, but hopefully avoids the problems with the old
+ * probe code (which had a 15-second delay if the card was idle, and didn't
+ * work at all if it was in a weird state).
+ */
+
+int elplus_probe(struct device *dev)
 {
-       elp_device adapter;
-       int i;
+       elp_device *adapter;
+       int i, tries, tries1, timeout, okay;
 
        /*
         *  setup adapter structure
         */
 
        dev->base_addr = elp_autodetect(dev);
-       if ( !(dev->base_addr) )
+       if (!(dev->base_addr))
                return -ENODEV;
 
        /*
-        *  As we enter here from bootup, the adapter should have IRQs enabled,
-        *  but we can as well enable them anyway.
-        */
-       outb_control(inb_control(dev->base_addr) | CMDE, dev->base_addr);
-       autoirq_setup(0);
-
-       /*
-        * use ethernet address command to probe for board in polled mode
-        * (this also makes us the IRQ that we need for automatic detection)
+        * setup ptr to adapter specific information
         */
-       adapter.tx_pcb.command = CMD_STATION_ADDRESS;
-       adapter.tx_pcb.length  = 0;
-       if (!send_pcb   (dev, &adapter.tx_pcb) ||
-           !receive_pcb(dev, &adapter.rx_pcb) ||
-           (adapter.rx_pcb.command != CMD_ADDRESS_RESPONSE) ||
-           (adapter.rx_pcb.length != 6)) {
-               printk("%s: not responding to first PCB\n", dev->name);
-               autoirq_report(0);
+       adapter = (elp_device *) (dev->priv = kmalloc(sizeof(elp_device), GFP_KERNEL));
+       if (adapter == NULL) {
+               printk("%s: out of memory\n", dev->name);
                return -ENODEV;
-       }
+        }
 
-       if (dev->irq) { /* Is there a preset IRQ? */
-               if (dev->irq != autoirq_report(0)) {
-                       printk("%s: Detected IRQ doesn't match user-defined one.\n",dev->name);
+       for (tries1 = 0; tries1 < 3; tries1++) {
+               outb_control((inb_control(dev->base_addr) | CMDE) & ~DIR, dev->base_addr);
+               /* First try to write just one byte, to see if the card is
+                * responding at all normally.
+                */
+               timeout = jiffies + 5;
+               okay = 0;
+               while (jiffies < timeout && !(inb_status(dev->base_addr) & HCRE));
+               if ((inb_status(dev->base_addr) & HCRE)) {
+                       outb_command(0, dev->base_addr);        /* send a spurious byte */
+                       timeout = jiffies + 5;
+                       while (jiffies < timeout && !(inb_status(dev->base_addr) & HCRE));
+                       if (inb_status(dev->base_addr) & HCRE)
+                               okay = 1;
+               }
+               if (!okay) {
+                       /* Nope, it's ignoring the command register.  This means that
+                        * either it's still booting up, or it's died.
+                        */
+                       printk("%s: command register wouldn't drain, assuming ", dev->name);
+                       if ((inb_status(dev->base_addr) & 7) == 3) {
+                               /* If the adapter status is 3, it *could* still be booting.
+                                * Give it the benefit of the doubt for 10 seconds.
+                                */
+                               printk("3c505 still starting\n");
+                               timeout = jiffies + 10 * HZ;
+                               while (jiffies < timeout && (inb_status(dev->base_addr) & 7));
+                               if (inb_status(dev->base_addr) & 7) {
+                                       printk("%s: 3c505 failed to start\n", dev->name);
+                                       continue;
+                               }
+                       } else {
+                               /* Otherwise, it must just be in a strange state.  We probably
+                                * need to kick it.
+                                */
+                               printk("3c505 dead\n");
+                               continue;
+                       }
+               }
+               for (tries = 0; tries < 5; tries++) {
+
+                       /*
+                        * Try to set the Ethernet address, to make sure that the board
+                        * is working.
+                        */
+                       adapter->tx_pcb.command = CMD_STATION_ADDRESS;
+                       adapter->tx_pcb.length = 0;
+                       autoirq_setup(0);
+                       if (!send_pcb(dev, &adapter->tx_pcb)) {
+                               printk("%s: could not send first PCB\n", dev->name);
+                               autoirq_report(0);
+                               continue;
+                       }
+                       if (!receive_pcb(dev, &adapter->rx_pcb)) {
+                               printk("%s: could not read first PCB\n", dev->name);
+                               autoirq_report(0);
+                               continue;
+                       }
+                       if ((adapter->rx_pcb.command != CMD_ADDRESS_RESPONSE) ||
+                           (adapter->rx_pcb.length != 6)) {
+                               printk("%s: first PCB wrong (%d, %d)\n", dev->name, adapter->rx_pcb.command, adapter->rx_pcb.length);
+                               autoirq_report(0);
+                               continue;
+                       }
+                       goto okay;
+               }
+               /* It's broken.  Do a hard reset to re-initialise the board,
+                * and try again.
+                */
+               printk(KERN_INFO "%s: resetting adapter\n", dev->name);
+               outb_control(inb_control(dev->base_addr) | FLSH | ATTN, dev->base_addr);
+               outb_control(inb_control(dev->base_addr) & ~(FLSH | ATTN), dev->base_addr);
+       }
+       printk("%s: 3c505 is sulking, giving up\n", dev->name);
+       return -ENODEV;
+
+      okay:
+       if (dev->irq) {         /* Is there a preset IRQ? */
+               int rpt = autoirq_report(0);
+               if (dev->irq != rpt) {
+                       printk("%s: warning, irq %d configured but %d detected\n", dev->name, dev->irq, rpt);
                        return -ENODEV;
                }
                /* if dev->irq == autoirq_report(0), all is well */
-       } else /* No preset IRQ; just use what we can detect */
-               dev->irq=autoirq_report(0);
-       switch (dev->irq) { /* Legal, sane? */
-               case 0:
-                       printk("%s: No IRQ reported by autoirq_report().\n",dev->name);
-                       printk("%s: Check the jumpers of your 3c505 board.\n",dev->name);
-                       return -ENODEV;
-               case 1:
-               case 6:
-               case 8:
-               case 13: 
-                       printk("%s: Impossible IRQ %d reported by autoirq_report().\n",
-                              dev->name, dev->irq);
-                       return -ENODEV;
+       } else                  /* No preset IRQ; just use what we can detect */
+               dev->irq = autoirq_report(0);
+       switch (dev->irq) {     /* Legal, sane? */
+       case 0:
+               printk("%s: No IRQ reported by autoirq_report().\n", dev->name);
+               printk("%s: Check the jumpers of your 3c505 board.\n", dev->name);
+               return -ENODEV;
+       case 1:
+       case 6:
+       case 8:
+       case 13:
+               printk("%s: Impossible IRQ %d reported by autoirq_report().\n",
+                      dev->name, dev->irq);
+               return -ENODEV;
        }
        /*
         *  Now we have the IRQ number so we can disable the interrupts from
@@ -1448,19+1633,56 @@ elplus_probe (struct device *dev)
        /*
         * copy ethernet address into structure
         */
-       for (i = 0; i < 6; i++) 
-               dev->dev_addr[i] = adapter.rx_pcb.data.eth_addr[i];
+       for (i = 0; i < 6; i++)
+               dev->dev_addr[i] = adapter->rx_pcb.data.eth_addr[i];
+
+       /* set up the DMA channel */
+       dev->dma = ELP_DMA;
 
        /*
         * print remainder of startup message
         */
-       printk("%s: 3c505 card found at I/O %#lx using IRQ%d"
-              " has address %02x:%02x:%02x:%02x:%02x:%02x\n",
-              dev->name, dev->base_addr, dev->irq,
+       printk("%s: 3c505 at %#lx, irq %d, dma %d, ",
+              dev->name, dev->base_addr, dev->irq, dev->dma);
+       printk("addr %02x:%02x:%02x:%02x:%02x:%02x, ",
               dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2],
               dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
 
        /*
+        * read more information from the adapter
+        */
+
+       adapter->tx_pcb.command = CMD_ADAPTER_INFO;
+       adapter->tx_pcb.length = 0;
+       if (!send_pcb(dev, &adapter->tx_pcb) ||
+           !receive_pcb(dev, &adapter->rx_pcb) ||
+           (adapter->rx_pcb.command != CMD_ADAPTER_INFO_RESPONSE) ||
+           (adapter->rx_pcb.length != 10)) {
+               printk("%s: not responding to second PCB\n", dev->name);
+       }
+       printk("rev %d.%d, %dk\n", adapter->rx_pcb.data.info.major_vers, adapter->rx_pcb.data.info.minor_vers, adapter->rx_pcb.data.info.RAM_sz);
+
+       /*
+        * reconfigure the adapter memory to better suit our purposes
+        */
+       adapter->tx_pcb.command = CMD_CONFIGURE_ADAPTER_MEMORY;
+       adapter->tx_pcb.length = 12;
+       adapter->tx_pcb.data.memconf.cmd_q = 8;
+       adapter->tx_pcb.data.memconf.rcv_q = 8;
+       adapter->tx_pcb.data.memconf.mcast = 10;
+       adapter->tx_pcb.data.memconf.frame = 10;
+       adapter->tx_pcb.data.memconf.rcv_b = 10;
+       adapter->tx_pcb.data.memconf.progs = 0;
+       if (!send_pcb(dev, &adapter->tx_pcb) ||
+           !receive_pcb(dev, &adapter->rx_pcb) ||
+           (adapter->rx_pcb.command != CMD_CONFIGURE_ADAPTER_RESPONSE) ||
+           (adapter->rx_pcb.length != 2)) {
+               printk("%s: could not configure adapter memory\n", dev->name);
+       }
+       if (adapter->rx_pcb.data.configure) {
+               printk("%s: adapter configuration failed\n", dev->name);
+       }
+       /*
         * and reserve the address region
         */
        request_region(dev->base_addr, ELP_IO_EXTENT, "3c505");
@@ -1469,16+1691,19 @@ elplus_probe (struct device *dev)
         * initialise the device
         */
        elp_init(dev);
+
        return 0;
 }
 
 #ifdef MODULE
-static char devicename[9] = { 0, };
-static struct device dev_3c505 = {
-       devicename, /* device name is inserted by linux/drivers/net/net_init.c */
+static char devicename[9] =
+{0,};
+static struct device dev_3c505 =
+{
+       devicename,             /* device name is inserted by linux/drivers/net/net_init.c */
        0, 0, 0, 0,
        0, 0,
-       0, 0, 0, NULL, elplus_probe };
+       0, 0, 0, NULL, elplus_probe};
 
 int io = 0x300;
 int irq = 0;
@@ -1488,7+1713,7 @@ int init_module(void)
        if (io == 0)
                printk("3c505: You should not use auto-probing with insmod!\n");
        dev_3c505.base_addr = io;
-       dev_3c505.irq       = irq;
+       dev_3c505.irq = irq;
        if (register_netdev(&dev_3c505) != 0) {
                printk("3c505: register_netdev() returned non-zero.\n");
                return -EIO;
@@ -1496,8+1721,7 @@ int init_module(void)
        return 0;
 }
 
-void
-cleanup_module(void)
+void cleanup_module(void)
 {
        unregister_netdev(&dev_3c505);
        kfree(dev_3c505.priv);
@@ -1506,4+1730,14 @@ cleanup_module(void)
        /* If we don't do this, we can't re-insmod it later. */
        release_region(dev_3c505.base_addr, ELP_IO_EXTENT);
 }
-#endif /* MODULE */
+
+#endif                         /* MODULE */
+
+
+/*
+ * Local Variables:
+ *  c-file-style: "linux"
+ *  tab-width: 8
+ *  compile-command: "gcc -D__KERNEL__ -I/discs/bibble/src/linux-1.3.69/include  -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strength-reduce -pipe -m486 -DCPU=486 -DMODULE  -c 3c505.c"
+ * End:
+ */
index 486cf22..7d0cc16 100644 (file)
@@ -127,7+127,7 @@ limit of 4K.
 
 #define TCOM_VENDOR_ID 0x10B7          /* 3Com's manufacturer's ID. */
 
-/* Operational defintions.
+/* Operational definitions.
    These are not used by other compilation units and thus are not
    exported in a ".h" file.
 
@@ -141,7+141,7 @@ limit of 4K.
 /* The top five bits written to EL3_CMD are a command, the lower
    11 bits are the parameter, if applicable.
    Note that 11 parameters bits was fine for ethernet, but the new chip
-   can handle FDDI lenght frames (~4500 octets) and now parameters count
+   can handle FDDI length frames (~4500 octets) and now parameters count
    32-bit 'Dwords' rather than octets. */
 
 enum vortex_cmd {
@@ -247,7+247,7 @@ static void set_multicast_list(struct device *dev);
 /* Unlike the other PCI cards the 59x cards don't need a large contiguous
    memory region, so making the driver a loadable module is feasible.
 
-   Unfortuneately maximizing the shared code between the integrated and
+   Unfortunately maximizing the shared code between the integrated and
    module version of the driver results in a complicated set of initialization
    procedures.
    init_module() -- modules /  tc59x_init()  -- built-in
@@ -255,7+255,7 @@ static void set_multicast_list(struct device *dev);
    vortex_scan()                The common routine that scans for PCI and EISA cards
    vortex_found_device() Allocate a device structure when we find a card.
                                        Different versions exist for modules and built-in.
-   vortex_probe1()             Fill in the device structure -- this is seperated
+   vortex_probe1()             Fill in the device structure -- this is separated
                                        so that the modules code can put it in dev->init.
 */
 /* This driver uses 'options' to pass the media type, full-duplex flag, etc. */
@@ -713,7+713,7 @@ vortex_start_xmit(struct sk_buff *skb, struct device *dev)
                int i = 4;
 
                while (--i > 0  &&      (tx_status = inb(ioaddr + TxStatus)) > 0) {
-                       if (tx_status & 0x3C) {         /* A Tx-disabling error occured.  */
+                       if (tx_status & 0x3C) {         /* A Tx-disabling error occurred.  */
                                if (vortex_debug > 2)
                                  printk("%s: Tx error, status %2.2x.\n",
                                                 dev->name, tx_status);
@@ -956,7+956,7 @@ vortex_close(struct device *dev)
        free_shared_irq(dev->irq, dev);
 #else
        free_irq(dev->irq, NULL);
-       /* Mmmm, we should diable all interrupt sources here. */
+       /* Mmmm, we should disable all interrupt sources here. */
        irq2dev_map[dev->irq] = 0;
 #endif
 
@@ -1005,7+1005,7 @@ static void update_stats(int ioaddr, struct device *dev)
        vp->stats.tx_packets                    += (inb(ioaddr + 9)&0x30) << 4;
        /* Rx packets   */                              inb(ioaddr + 7);   /* Must read to clear */
        /* Tx deferrals */                              inb(ioaddr + 8);
-       /* Don't bother with register 9, an extention of registers 6&7.
+       /* Don't bother with register 9, an extension of registers 6&7.
           If we do use the 6&7 values the atomic update assumption above
           is invalid. */
        inw(ioaddr + 10);       /* Total Rx and Tx octets. */
index e2b84d2..989e72d 100644 (file)
@@ -8,7+8,7 @@
 include CONFIG
 
 L_TARGET := net.a
-L_OBJS   := Space.o auto_irq.o net_init.o loopback.o
+L_OBJS   := auto_irq.o
 M_OBJS   :=
 MOD_LIST_NAME := NET_MODULES
 
@@ -31,6+31,10 @@ else
   endif
 endif
 
+ifeq ($(CONFIG_NET),y)
+L_OBJS += Space.o net_init.o loopback.o
+endif
+
 ifeq ($(CONFIG_SEEQ8005),y)
 L_OBJS += seeq8005.o
 endif
diff --git a/drivers/net/README.3c505 b/drivers/net/README.3c505
deleted file mode 100644 (file)
index 914fa47..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-The address and IRQ used by the 3c505 driver can be configured at boot
-time by typing 'ether=eth0,15,0x300' (replace IRQ and base address with
-ones that tell how your adapter is jumpered). The driver does not yet
-use DMA.
-
-If no base address is given at the boot time, the driver will look for
-a 3c505 adapter at addresses 0x300, 0x280 and 0x310 in this order,
-possibly messing up any other hardware residing in these addresses.
-If a base address is given, it will be verified.
-
-The driver has two compile-time settings in the CONFIG file:
-ELP_NEED_HARD_RESET
- Some DOS drivers seem to get the adapter to some irrecoverable state
- if the machine is "warm booted" from DOS to Linux. If you experience
- problems when warm booting, but "cold boot" works, #defining this
- to 1 may help. As of 3c505.c v0.8 the driver should be able to find
- out whether of not this is needed, but I'm not completely sure.
-ELP_DEBUG
- The driver debug level.  It's probably best to leave it at 0 most of the time.
- If you are having trouble, setting it to 1 may give you more information.
- Any higher setting is too verbose for most purposes.
-
-Known problems:
- The 3c505 is a slow card, mostly because of the way it talks to the host.
- Don't expect any great performance from it.
-
- I am seeing periodic "transmit timed out" and "timeout waiting for PCB
- acknowledge" messages under high load.  I'm not sure what's causing these -
- it seems that the 3c505 occasionally just loses a command.  They seem not to
- be fatal, anyway.
-
- There may be some initialisation problems still lurking, particularly when
- warm-booting from DOS (ELP_NEED_HARD_RESET seems not to help).
-
-Authors:
- The driver is mainly written by Craig Southeren, email
- <craigs@ineluki.apana.org.au>.
- Parts of the driver (adapting the driver to 1.1.4+ kernels,
- IRQ/address detection, some changes) and this README by
- Juha Laiho <jlaiho@ichaos.nullnet.fi>.
- Philip Blundell <pjb27@cam.ac.uk> made some more changes.
index db5ceb6..6e49219 100644 (file)
@@ -1,6+1,6 @@
   EQL Driver: Serial IP Load Balancing HOWTO
   Simon "Guru Aleph-Null" Janes, simon@ncm.com
-  v1.1, Feburary 27, 1995
+  v1.1, February 27, 1995
 
   This is the manual for the EQL device driver. EQL is a software device
   that lets you load-balance IP serial links (SLIP or uncompressed PPP)
 
   In rc.inet1, ifconfig the eql device to the IP address you usually use
   for your machine, and the MTU you prefer for your SLIP lines.        One
-  could argue that MTU should be roughly half the usuall size for two
+  could argue that MTU should be roughly half the usual size for two
   modems, one-third for three, one-fourth for four, etc...  But going
   too far below 296 is probably overkill. Here is an example ifconfig
   command that sets up the eql device:
   o  icee from LinuxNET patched 1.1.86 without any rejects and was able
      to boot the kernel and enslave a couple of ISDN PPP links.
 
-  5.1. Randoph Bentson's Test Report
+  5.1. Randolph Bentson's Test Report
 
 
 
index aec6b6e..30e2588 100644 (file)
@@ -24,7+24,7 @@ the diff.  You will have to re-configure the kernel again before you
 recompile it. 
 
 The driver is not real good at the moment for finding the card.  You can
-'help' it by changing the order of the potiential addresses in the structure
+'help' it by changing the order of the potential addresses in the structure
 found in the pt_init() function so the address of where the card is is put
 first.
 
index e7de3f3..2c6e10c 100644 (file)
@@ -211,7+211,7 @@ static const char *version =
 /**************************************************************************/
 
 /* Normally, the ARCnet device needs to be assigned a name (default arc0). 
- * Ethernet devices have a fucntion to automatically try eth0, eth1, etc
+ * Ethernet devices have a function to automatically try eth0, eth1, etc
  * until a free name is found.  To name the ARCnet device using an "eth?"
  * device name, define this option.
  */
index 0ed43d9..4494df6 100644 (file)
  */
 
 /*
- * This version is for use with contigious buffers on Linux-derived systems.
+ * This version is for use with contiguous buffers on Linux-derived systems.
  *
  *  ==FILEVERSION 4==
  *
index 6c25783..6fe2dec 100644 (file)
     achieved by letting the driver autoprobe as if it were compiled into the
     kernel, except that there is no autoprobing of the IRQ lines. This is of
     no great  consequence except do make sure  you're not sharing interrupts
-    with  anything that cannot  accomodate  interrupt sharing!  The existing
+    with  anything that cannot  accommodate  interrupt sharing!  The existing
     register_netdevice() code will only allow one device to be registered at
     a time. 
 
     applies most particularly to the DC21140 based cards).
 
     I've changed the timing routines to  use the kernel timer and scheduling
-    functions  so that the  hangs  and other assorted  problems that occured
+    functions  so that the  hangs  and other assorted  problems that occurred
     while autosensing the  media  should be gone.  A  bonus  for the DC21040
     auto  media sense algorithm is  that it can now  use one that is more in
     line with the  rest (the DC21040  chip doesn't  have a hardware  timer).
                          Made changes suggested by <jeff@router.patch.net>:
                            Change driver to detect all DECchip based cards
                            with DEC_ONLY restriction a special case.
-                           Changed driver to autprobe as a module. No irq
+                           Changed driver to autoprobe as a module. No irq
                            checking is done now - assume BIOS is good!
                          Added SMC9332 detection <manabe@Roy.dsl.tutics.ac.jp>
       0.41    21-Mar-96   Don't check for get_hw_addr checksum unless DEC card
@@ -1156,7+1156,7 @@ de4x5_interrupt(int irq, void *dev_id, struct pt_regs *regs)
            
        if (sts & STS_SE) {              /* Bus Error */
            STOP_DE4X5;
-           printk("%s: Fatal bus error occured, sts=%#8x, device stopped.\n",
+           printk("%s: Fatal bus error occurred, sts=%#8x, device stopped.\n",
                   dev->name, sts);
            return;
        }
index ad58d6d..b5b4384 100644 (file)
                           ALPHA support from <jestabro@amt.tay1.dec.com>
       0.41    26-Jun-95   Added verify_area() calls in depca_ioctl() from
                           suggestion by <heiko@colossus.escape.de>
-      0.42    27-Dec-95   Add 'mem' shared memory assigment for loadable 
+      0.42    27-Dec-95   Add 'mem' shared memory assignment for loadable 
                           modules.
                           Add 'adapter_name' for loadable modules when no PROM.
                          Both above from a suggestion by 
@@ -999,7+999,7 @@ depca_tx(struct device *dev)
 
     if (status < 0) {                          /* Packet not yet sent! */
       break;
-    } else if (status & T_ERR) {               /* An error occured. */
+    } else if (status & T_ERR) {               /* An error occurred. */
       status = readl(&lp->tx_ring[entry].misc);
       lp->stats.tx_errors++;
       if (status & TMD3_RTRY) lp->stats.tx_aborted_errors++;
index 0d6a01d..01afc10 100644 (file)
@@ -841,7+841,7 @@ set_multicast_list(struct device *dev)
                /*
                 *      We must make the kernel realise we had to move
                 *      into promisc mode or we start all out war on
-                *      the cable. If it was a promisc rewquest the
+                *      the cable. If it was a promisc request the
                 *      flag is already set. If not we assert it.
                 */
                dev->flags|=IFF_PROMISC;                
@@ -868,7+868,7 @@ set_multicast_list(struct device *dev)
                unsigned short status, *eaddrs;
                int i, boguscount = 0;
                
-               /* Disable RX and TX interrupts.  Neccessary to avoid
+               /* Disable RX and TX interrupts.  Necessary to avoid
                   corruption of the HOST_ADDRESS_REG by interrupt
                   service routines. */
                outb(ALL_MASK, ioaddr + INT_MASK_REG);
@@ -1007,7+1007,7 @@ hardware_send_packet(struct device *dev, void *buf, short length)
                        tx_available = lp->tx_start - lp->tx_end;
                else tx_available = XMT_RAM;
 
-               /* Disable RX and TX interrupts.  Neccessary to avoid
+               /* Disable RX and TX interrupts.  Necessary to avoid
                   corruption of the HOST_ADDRESS_REG by interrupt
                   service routines. */
                outb(ALL_MASK, ioaddr + INT_MASK_REG);
index 50a46b1..c34ac06 100644 (file)
  */
 
 /*
- * The original EtherExpress driver was just about useable, but
+ * The original EtherExpress driver was just about usable, but
  * suffered from a long startup delay, a hard limit of 16k memory
  * usage on the card (EtherExpress 16s have either 32k or 64k),
  * and random locks under load. The last was particularly annoying
  * never reset the card *after* booting the kernel - once at probe time
  * must be sufficient, and we'll just have to put up with that failing
  * occasionally (or buy a new NIC). By the way, this looks like a 
- * definate card bug, since Intel's own driver for DOS does exactly the
+ * definite card bug, since Intel's own driver for DOS does exactly the
  * same.
  */
 
@@ -183,7+183,7 @@ unsigned short start_code[] = {
        0x0000,0x0000,          /* address of ISCP (lo,hi) */
 
        0x0001,                 /* ISCP: busy - cleared after reset */
-       0x0008,0x0000,0x0000,   /* offsett,address (lo,hi) of SCB */
+       0x0008,0x0000,0x0000,   /* offset,address (lo,hi) of SCB */
 
        0x0000,0x0000,          /* SCB: status, commands */
        0x0000,0x0000,          /* links to first command block, first receive descriptor */
@@ -687,7+687,7 @@ static void eexp_hw_tx(struct device *dev, unsigned short *buf, unsigned short l
  * Sanity check the suspected EtherExpress card
  * Read hardware address, reset card, size memory and
  * initialize buffer memory pointers. These should
- * probably be held in dev->priv, incase someone has 2
+ * probably be held in dev->priv, in case someone has 2
  * differently configured cards in their box (Arghhh!)
  */
 
@@ -953,7+953,7 @@ static void eexp_hw_txrestart(struct device *dev)
 
 /*
  * Writes down the list of transmit buffers into card
- * memory. Initial seperate, repeated transmits link
+ * memory. Initial separate, repeated transmits link
  * them into a circular list, such that the CU can
  * be constantly active, and unlink them as we reap
  * transmitted packet buffers, so the CU doesn't loop
index c5edaab..f2e34df 100644 (file)
@@ -2,7+2,7 @@
  * Equalizer Load-balancer for serial network interfaces.
  *
  * (c) Copyright 1995 Simon "Guru Aleph-Null" Janes
- * NCM: Network and Communications Mangement, Inc.
+ * NCM: Network and Communications Management, Inc.
  *
  *
  *     This software may be used and distributed according to the terms
@@ -73,7+73,7 @@ static const char *version =
  * infinite sleep in a lock somewhere..
  *
  * Revision 3.2  1995/01/15  16:46:06  guru
- * Log trimmed of non-pertinant 1.x branch messages
+ * Log trimmed of non-pertinent 1.x branch messages
  *
  * Revision 3.1  1995/01/15  14:41:45  guru
  * New Scheduler and timer stuff...
@@ -664,7+664,7 @@ static void eql_delete_slave(slave_t *slave)
 
 
 #if 0                          /* not currently used, will be used
-                                  when we realy use a priority queue */
+                                  when we really use a priority queue */
 static long slave_Bps(slave_t *slave)
 {
        return (slave->priority_Bps);
@@ -738,7+738,7 @@ static void eql_delete_slave_queue(slave_queue_t *queue)
        slave_t *zapped;
        /*
         *      This should only be called when there isn't a
-        *      timer running that scans the data periodicaly.. 
+        *      timer running that scans the data periodically.. 
         *      dev_close stops the timer... 
         */
 
index ef054b2..501cc5f 100644 (file)
@@ -378,7+378,7 @@ static int eth16i_probe1(struct device *dev, short ioaddr)
 {
   static unsigned version_printed = 0;
   unsigned int irq = 0;
-  boot = 1;          /* To inform initilization that we are in boot probe */
+  boot = 1;          /* To inform initialization that we are in boot probe */
 
   /*
      The MB86985 chip has on register which holds information in which 
@@ -650,12+650,12 @@ static int eth16i_receive_probe_packet(short ioaddr)
     if( (jiffies - starttime) > TIMEOUT_TICKS) {
       
       if(eth16i_debug > 1)
-       printk("Timeout occured waiting transmit packet received\n");
+       printk("Timeout occurred waiting transmit packet received\n");
       starttime = jiffies;
       while((inb(ioaddr + RX_STATUS_REG) & 0x80) == 0) {
        if( (jiffies - starttime) > TIMEOUT_TICKS) {
        if(eth16i_debug > 1)
-         printk("Timeout occured waiting receive packet\n");
+         printk("Timeout occurred waiting receive packet\n");
         return -1;
         }
       }
@@ -992,7+992,7 @@ static void eth16i_rx(struct device *dev)
             dev->name, inb(ioaddr + RECEIVE_MODE_REG), status);
   
       if( !(status & PKT_GOOD) ) {
-       /* Hmm..something went wrong. Let's check what error occured */
+       /* Hmm..something went wrong. Let's check what error occurred */
        lp->stats.rx_errors++;
        if( status & PKT_SHORT     ) lp->stats.rx_length_errors++;
        if( status & PKT_ALIGN_ERR ) lp->stats.rx_frame_errors++;
@@ -1015,7+1015,7 @@ static void eth16i_rx(struct device *dev)
 
        skb = dev_alloc_skb(pkt_len + 3);
        if( skb == NULL ) {
-         printk("%s: Could'n allocate memory for packet (len %d)\n", 
+         printk("%s: Couldn't allocate memory for packet (len %d)\n", 
                 dev->name, pkt_len);
          outb(RX_BUF_SKIP_PACKET, ioaddr + FILTER_SELF_RX_REG);
          lp->stats.rx_dropped++;
@@ -1118,7+1118,7 @@ static void eth16i_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 
       if(lp->tx_queue) {           /* Is there still packets ? */
          /* There was packet(s) so start transmitting and write also
-          how many packets there is to be sended */
+          how many packets there is to be sent */
        outb(TX_START | lp->tx_queue, ioaddr + TRANSMIT_START_REG);
        lp->tx_queue = 0;
        lp->tx_queue_len = 0;
index 7e1cb2f..c2178ff 100644 (file)
@@ -2,7+2,7 @@
  * eth82586.h: Intel EtherExpress defines
  *
  * Written 1995 by John Sullivan
- * See eexpress.c for furthur details
+ * See eexpress.c for further details
  * documentation and usage to do.
  */
 
  * SCB defines
  */
 
-/* these functions take the SCB status word and test the relavent status bit */
+/* these functions take the SCB status word and test the relevant status bit */
 #define SCB_complete(s) ((s&0x8000)!=0)
 #define SCB_rxdframe(s) ((s&0x4000)!=0)
 #define SCB_CUdead(s) ((s&0x2000)!=0)
index b37abf4..554a18a 100644 (file)
 #define EISA_IOB        0x1f   /* Compare bits for I/O Base Address */
 
 /*
-** I/O Congiguration/Management Register bit definitions (EWRK3_CMR)
+** I/O Configuration/Management Register bit definitions (EWRK3_CMR)
 */
 #define CMR_RA          0x80    /* Read Ahead */
 #define CMR_WB          0x40    /* Write Behind */
index 4ef82e7..a1a71f1 100644 (file)
                Masayoshi UTAKA (utaka@ace.yk.fujitsu.co.jp)
                        for testing this driver.
                H. NEGISHI (agy, negishi@sun45.psd.cs.fujitsu.co.jp)
-                       for sugestion of some program modification.
+                       for suggestion of some program modification.
                Masahiro SEKIGUCHI <seki@sysrap.cs.fujitsu.co.jp>
-                       for sugestion of some program modification.
+                       for suggestion of some program modification.
                Kazutoshi MORIOKA (morioka@aurora.oaks.cs.fujitsu.co.jp)
                        for testing this driver.
 
index 7320665..01717b6 100644 (file)
@@ -148,7+148,7 @@ struct hp100_private {
   u_char *mem_ptr_virt;                    /* virtual memory mapped area, maybe NULL */
   u_char *mem_ptr_phys;                    /* physical memory mapped area */
   short lan_type;                  /* 10Mb/s, 100Mb/s or -1 (error) */
-  int hub_status;                  /* login to hub was successfull? */
+  int hub_status;                  /* login to hub was successful? */
   u_char mac1_mode;
   u_char mac2_mode;
   struct enet_statistics stats;
@@ -382,7+382,7 @@ static int hp100_probe1( struct device *dev, int ioaddr, int bus )
     {
       mem_ptr_phys = (u_char *)( hp100_inw( MEM_MAP_LSW ) | 
                                ( hp100_inw( MEM_MAP_MSW ) << 16 ) );
-      (u_int)mem_ptr_phys &= ~0x1fff;  /* 8k aligment */
+      (u_int)mem_ptr_phys &= ~0x1fff;  /* 8k alignment */
       if ( bus == HP100_BUS_ISA && ( (u_long)mem_ptr_phys & ~0xfffff ) != 0 )
         {
           mem_ptr_phys = NULL;
index 9f14f95..9092280 100644 (file)
 /*
  *  IRQChannelReg bits/masks.
  */
-#define HP100_ZERO_WAIT_EN     0x80    /* 0:No, 1:Yes assers NOWS signal */
+#define HP100_ZERO_WAIT_EN     0x80    /* 0:No, 1:Yes asserts NOWS signal */
 #define HP100_LEVEL_IRQ                0x10    /* 0:Edge, 1:Level type interrupts. */
                                         /*   Only valid on EISA cards. */
 #define HP100_IRQ_MASK         0x0F    /* Isolate the IRQ bits */
 #define HP100_RX_IDLE          0x80    /* 0:Yes, 1:No currently receiving pkts */
 #define HP100_TX_IDLE          0x40    /* 0:Yes, 1:No currently Txing pkts */
 #define HP100_RX_EN            0x20    /* 0:No, 1:Yes allow receiving of pkts */
-#define HP100_TX_EN            0x10    /* 0:No, 1:Yes allow transmiting of pkts */
+#define HP100_TX_EN            0x10    /* 0:No, 1:Yes allow transmitting of pkts */
 #define HP100_ACC_ERRORED      0x08    /* 0:No, 1:Yes allow Rx of errored pkts */
 #define HP100_ACC_MC           0x04    /* 0:No, 1:Yes allow Rx of multicast pkts */
 #define HP100_ACC_BC           0x02    /* 0:No, 1:Yes allow Rx of broadcast pkts */
index 0494c24..5100d8c 100644 (file)
        - modified shared memory and mmio access port the driver to 
           alpha platform (structure access -> readb/writeb)
 
-   Chagnes by Steve Kipisz (bungy@ibm.net or kipisz@vnet.ibm.com)
+   Changes by Steve Kipisz (bungy@ibm.net or kipisz@vnet.ibm.com)
                            (January 18 1996):
         - swapped WWOR and WWCR in ibmtr.h
         - moved some init code from tok_probe into trdev_init.  The
 
    Warnings !!!!!!!!!!!!!!
       This driver is only partially sanitized for support of multiple
-      adapters.  It will almost definately fail if more than one
+      adapters.  It will almost definitely fail if more than one
       active adapter is identified.
 */
        
@@ -246,7+246,7 @@ int tok_probe(struct device *dev)
                   where it is?).  We also have a coded interrupt address. */
                
                segment = inb(PIOaddr);
-               /* out of range values so we'll assume non-existant IO device */
+               /* out of range values so we'll assume non-existent IO device */
                if (segment < 0x40 || segment > 0xe0) { 
                        PIOaddr = 0; 
                        continue; /* clear to flag fail and try next */
@@ -599,7+599,7 @@ static int tok_open(struct device *dev)
        
        if (ti->open_status==IN_PROGRESS) sleep_on(&ti->wait_for_reset);
        
-       if (ti->open_status==SUCCES) {
+       if (ti->open_status==SUCCESS) {
                dev->tbusy=0;
                dev->interrupt=0;
                dev->start=1;
@@ -820,7+820,7 @@ void tok_interrupt (int irq, void *dev_id, struct pt_regs *regs)
                                        } else {
                                                ti->exsap_station_id=
                                                        readw(ti->srb+offsetof(struct dlc_open_sap, station_id));
-                                               ti->open_status=SUCCES; /* TR adapter is now available */
+                                               ti->open_status=SUCCESS; /* TR adapter is now available */
                                                wake_up(&ti->wait_for_reset);
                                        }
                                        break;
index 9c7d02e..02e01e5 100644 (file)
                              encountered a serious problem and has closed
                              itself.  Whoa.  */
 #define SRB_RESP_INT 0x20 /* Bit 5 - SRB response.  The adapter has accepted
-                             an SRB request and set the return code withing
+                             an SRB request and set the return code within
                              the SRB. */
 #define ASB_FREE_INT 0x10 /* Bit 4 - ASB free.  The adapter has read the ASB
                                                                           and this area can be safely reused. This interrupt
 #define RESP_IN_ASB 0x10 /* Bit 4 - Indicates that you have placed a response
                                                                     (an ASB) in the shared RAM which is available for
                                                                          the adapter's use. */
-/* Bit 3 - Indicates that you are ready to ut an SRB in the shared RAM, but that a previous */
+/* Bit 3 - Indicates that you are ready to put an SRB in the shared RAM, but that a previous */
 /*         command is still pending.  The adapter will then interrupt you when the previous */
 /*         command is completed */
 /* Bit 2 - Indicates that you are ready to put an ASB in the shared RAM, but that a previous */
 #define SET_PAGE(x)
 #endif
 
-typedef enum { IN_PROGRESS, SUCCES, FAILURE, CLOSED } open_state;
+typedef enum { IN_PROGRESS, SUCCESS, FAILURE, CLOSED } open_state;
 
 /* do_tok_int possible values */
 #define FIRST_INT 1
index f3017e2..155641d 100644 (file)
@@ -155,7+155,7 @@ tx_full and tbusy flags.
 */
 
 /* Memory accessed from LANCE card must be aligned on 8-byte boundaries.
-   But we can't believe that kmalloc()'ed memory satisfyes it. -- SAW */
+   But we can't believe that kmalloc()'ed memory satisfies it. -- SAW */
 #define LANCE_KMALLOC(x) \
        ((void *) (((unsigned long)kmalloc((x)+7, GFP_DMA | GFP_KERNEL)+7) & ~7))
 
index df4849e..ecd11c1 100644 (file)
  *   The internal sysbus seems to be slow. So we often lose packets because of
  *   overruns while receiving from a fast remote host. 
  *   This can slow down TCP connections. Maybe the newer ni5210 cards are better.
- *   my experinece is, that if a machine sends with more then about 500-600K/s
+ *   my experience is, that if a machine sends with more then about 500-600K/s
  *   the fifo/sysbus overflows.
  * 
  * IMPORTANT NOTE:
@@ -166,7+166,7 @@ sizeof(nop_cmd) = 8;
     if(!p->scb->cmd_cuc) break; \
     DELAY_18(); \
     if(i == 16383) { \
-      printk("%s: scb_cmd timed out: %04x,%04x .. disabeling i82586!!\n",dev->name,p->scb->cmd_cuc,p->scb->cus); \
+      printk("%s: scb_cmd timed out: %04x,%04x .. disabling i82586!!\n",dev->name,p->scb->cmd_cuc,p->scb->cus); \
        if(!p->reseted) { p->reseted = 1; ni_reset586(); } } } }
 
 #define WAIT_4_SCB_CMD_RUC() { int i; \
@@ -174,7+174,7 @@ sizeof(nop_cmd) = 8;
     if(!p->scb->cmd_ruc) break; \
     DELAY_18(); \
     if(i == 16383) { \
-      printk("%s: scb_cmd (ruc) timed out: %04x,%04x .. disabeling i82586!!\n",dev->name,p->scb->cmd_ruc,p->scb->rus); \
+      printk("%s: scb_cmd (ruc) timed out: %04x,%04x .. disabling i82586!!\n",dev->name,p->scb->cmd_ruc,p->scb->rus); \
        if(!p->reseted) { p->reseted = 1; ni_reset586(); } } } }
 
 #define WAIT_4_STAT_COMPL(addr) { int i; \
@@ -1234,7+1234,7 @@ static int ni52_send_packet(struct sk_buff *skb, struct device *dev)
       next_nop = 0;
 
     p->xmit_cmds[p->xmit_count]->cmd_status  = 0;
-       /* linkpointer of xmit-command allready points to next nop cmd */
+       /* linkpointer of xmit-command already points to next nop cmd */
     p->nop_cmds[next_nop]->cmd_link = make16((p->nop_cmds[next_nop]));
     p->nop_cmds[next_nop]->cmd_status = 0;
 
index 2bd9584..b3dfdd2 100644 (file)
@@ -51,7+51,7 @@ struct scp_struct
 struct iscp_struct
 {
   unsigned char  busy;          /* 586 clears after successful init */
-  unsigned char  zero_dummy;    /* hast to be zero */
+  unsigned char  zero_dummy;    /* has to be zero */
   unsigned short scb_offset;    /* pointeroffset to the scb_base */
   char          *scb_base;      /* base-address of all 16-bit offsets */
 };
index 41789b7..725162a 100644 (file)
 #include "ni65.h"
 
 /*
- * the current setting allows max. perforamnce
+ * the current setting allows max. performance
  * for 'RCV_PARANOIA_CHECK' read the 'known problems' part in 
  * the header of this file
  */
@@ -505,7+505,7 @@ static void ni65_interrupt(int irq, void * dev_id, struct pt_regs * regs)
 
   if(i < RMDNUM) {
     p->rmdnum = (p->rmdnum + 8 - i) & (RMDNUM - 1);
-    printk(KERN_ERR "%s: Ooops, receive ring currupted\n",dev->name);
+    printk(KERN_ERR "%s: Ooops, receive ring corrupted\n",dev->name);
 
     ni65_recv_intr(dev,csr0);
   }
index d204271..11f0f60 100644 (file)
@@ -245,7+245,7 @@ static ppp_ctrl_t *ppp_list = NULL;
 #define BUFFER_TYPE_TTY_RD     3  /* tty read buffer       */
 #define BUFFER_TYPE_VJ         4  /* vj compression buffer */
 
-/* Define this string only once for all macro envocations */
+/* Define this string only once for all macro invocations */
 static char ppp_warning[] = KERN_WARNING "PPP: ALERT! not INUSE! %d\n";
 
 static char szVersion[]                = PPP_VERSION;
@@ -344,7+344,7 @@ ppp_first_time (void)
                "PPP: version %s (dynamic channel allocation)"
                "\n", szVersion);
 
-#ifndef MODULE /* slhc module logic has its own copyright announcment */
+#ifndef MODULE /* slhc module logic has its own copyright announcement */
        printk (KERN_INFO
                "TCP compression code copyright 1989 Regents of the "
                "University of California\n");
@@ -354,7+354,7 @@ ppp_first_time (void)
                "PPP Dynamic channel allocation code copyright 1995 "
                "Caldera, Inc.\n");
 /*
- * Register the tty dicipline
+ * Register the tty discipline
  */    
        (void) memset (&ppp_ldisc, 0, sizeof (ppp_ldisc));
        ppp_ldisc.magic         = TTY_LDISC_MAGIC;
@@ -571,7+571,7 @@ ppp_changedmtu (struct ppp *ppp, int new_mtu, int new_mru)
  */
        dev = ppp2dev (ppp);
        mru = new_mru;
-       /* allow for possible escapement of every character */
+       /* allow for possible escaping of every character */
        mtu = (new_mtu * 2) + 20;
 
        /* RFC 1331, section 7.2 says the minimum value is 1500 bytes */
@@ -1854,7+1854,7 @@ ppp_stuff_char (struct ppp *ppp, register struct ppp_buffer *buf,
 }
 
 /*
- * Procedure to encode the data with the proper escapement and send the
+ * Procedure to encode the data with the proper escaping and send the
  * data to the remote system.
  */
 
@@ -3458,7+3458,7 @@ cleanup_module(void)
                return;
        }
 /*
- * Release the tty registration of the line dicipline so that no new entries
+ * Release the tty registration of the line discipline so that no new entries
  * may be created.
  */
        status = tty_register_ldisc (N_PPP, NULL);
index 1388077..65e90d8 100644 (file)
 
 #define DEF_A_SPEED    4800            /* 4800 baud */
 #define DEF_A_TXDELAY  350             /* 350 mS */
-#define DEF_A_PERSIST  64              /* 25% persistance */
+#define DEF_A_PERSIST  64              /* 25% persistence */
 #define DEF_A_SLOTIME  10              /* 10 mS */
 #define DEF_A_SQUELDELAY 30            /* 30 mS */
 #define DEF_A_CLOCKMODE        0               /* Normal clock mode */
@@ -540,7+540,7 @@ int pt_init(void)
     }
 
     /*
-     * Link a couple of device structres into the chain
+     * Link a couple of device structures into the chain
      *
      * For the A port
      * Allocate space for 4 buffers even though we only need 3,
@@ -680,7+680,7 @@ static void pt_rts(struct pt_local *lp, int x)
             {
                 if (lp->speed)         /* internally clocked */
                 {
-                    /* Repogram BRG from 32x clock for Rx DPLL */
+                    /* Reprogram BRG from 32x clock for Rx DPLL */
                     /* BRG off, keep PClk source */
                     wrtscc(lp->cardbase, cmd, R14, BRSRC);
                     br = lp->speed;
@@ -690,7+690,7 @@ static void pt_rts(struct pt_local *lp, int x)
                     
                     /* SEARCH mode, BRG source */
                     wrtscc(lp->cardbase, cmd, R14, BRSRC | SEARCH);
-                    /* Enalbe the BRG */
+                    /* Enable the BRG */
                     wrtscc(lp->cardbase, cmd, R14, BRSRC | BRENABL);
                 }
             }
@@ -801,7+801,7 @@ static int pt_probe(struct device *dev)
     lp->base = dev->base_addr;
     lp->cardbase = dev->base_addr & 0x3f0;
        
-    /* These need to be initialsed before scc_init() is called.
+    /* These need to be initialised before scc_init() is called.
      */
     lp->xtal = XTAL;
     
@@ -916,7+916,7 @@ static int pt_probe(struct device *dev)
  * sometime after booting when the 'ifconfig' program is run.
  *
  * This routine should set everything up anew at each open, even
- * registers that 'should' only be set once at bott, so that there is
+ * registers that 'should' only be set once at boot, so that there is
  * a non-reboot way to recover if something goes wrong.
  * derived from last half of tsync_attach()
  */
@@ -1193,7+1193,7 @@ static void pt_txisr(struct pt_local *lp)
            {
                lp->tstate = DEFER;
                tdelay(lp, 100);
-               /* DEFER until DCD transistion or timeout */
+               /* DEFER until DCD transition or timeout */
                wrtscc(lp->cardbase, cmd, R15, DCDIE);
                restore_flags(flags);
                return;
@@ -1230,7+1230,7 @@ static void pt_txisr(struct pt_local *lp)
                lp->sndbuf = NULL;
                if ((rdscc(lp->cardbase, cmd, R0) & TxEOM))
                {
-                   /* Did we underrum */
+                   /* Did we underrun */
                    lp->stats.tx_errors++;
                    lp->stats.tx_fifo_errors++;
                    wrtscc(lp->cardbase, cmd, R0, SEND_ABORT);
@@ -1253,7+1253,7 @@ static void pt_txisr(struct pt_local *lp)
           restore_flags(flags);
           return;
        default:
-               printk("PT: pt_txisr(): Invlaid tstate (%d) for chan %s.\n", lp->tstate, (cmd & CHANA? "A": "B") );
+               printk("PT: pt_txisr(): Invalid tstate (%d) for chan %s.\n", lp->tstate, (cmd & CHANA? "A": "B") );
                pt_rts(lp, OFF);
                lp->tstate = IDLE;
                break;          
@@ -1392,7+1392,7 @@ static void pt_rxisr(struct device *dev)
                  skb = dev_alloc_skb(sksize);
                  if (skb == NULL)
                  {
-                     printk("PT: %s: Memory squeze, dropping packet.\n", dev->name);
+                     printk("PT: %s: Memory squeeze, dropping packet.\n", dev->name);
                      lp->stats.rx_dropped++;
                      restore_flags(flags);
                      return;
@@ -1701,7+1701,7 @@ static void pt_exisr(struct pt_local *lp)
         /* slotime has timed out */
     case DEFER:
         /* Check DCD - debounce it
-         * see Intel Micrommunications Handbook, p2-308
+         * see Intel Microcommunications Handbook, p2-308
          */
         wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT);
         wrtscc(lp->cardbase, cmd, R0, RES_EXT_INT);
@@ -1709,7+1709,7 @@ static void pt_exisr(struct pt_local *lp)
         {
             lp->tstate = DEFER;
             tdelay(lp, 100);
-            /* DEFER until DCD transistion or timeout */
+            /* DEFER until DCD transition or timeout */
             wrtscc(lp->cardbase, cmd, R15, DCDIE);
             restore_flags(flags);
             return;
@@ -1761,7+1761,7 @@ static void pt_exisr(struct pt_local *lp)
 
     }
     
-    /* Check for DCD transistions */
+    /* Check for DCD transitions */
     if ( (st & DCD) != (lp->saved_RR0 & DCD))
     {
 #ifdef PT_DEBUG    
index 770ebc8..eead04f 100644 (file)
@@ -734,7+734,7 @@ static void sdla_receive(struct device *dev)
 
          if (i == CONFIG_DLCI_MAX)
          {
-            printk(KERN_NOTICE "%s: Recieved packet from invalid DLCI %i, ignoring.", dev->name, dlci);
+            printk(KERN_NOTICE "%s: Received packet from invalid DLCI %i, ignoring.", dev->name, dlci);
             flp->stats.rx_errors++;
             cmd->opp_flag = 0;
             break;
@@ -773,7+773,7 @@ static void sdla_receive(struct device *dev)
 
          if (i == CONFIG_DLCI_MAX)
          {
-            printk(KERN_NOTICE "%s: Recieved packet from invalid DLCI %i, ignoring.", dev->name, dlci);
+            printk(KERN_NOTICE "%s: Received packet from invalid DLCI %i, ignoring.", dev->name, dlci);
             flp->stats.rx_errors++;
             pbuf->opp_flag = 0;
             break;
@@ -838,7+838,7 @@ static void sdla_isr(int irq, void *dev_id, struct pt_regs * regs)
 
    if (!flp->initialized)
    {
-      printk(KERN_WARNING "%s: irq %d for unintialiazed device.\n", dev->name, irq);
+      printk(KERN_WARNING "%s: irq %d for uninitialized device.\n", dev->name, irq);
       return;
    }
 
@@ -1134,7+1134,7 @@ static int sdla_config(struct device *dev, struct frad_conf *conf, int get)
       if (err)
          return(err);
 
-      /* no sense reading if the CPU isnt' started */
+      /* no sense reading if the CPU isn't started */
       if (dev->start)
       {
          size = sizeof(data);
index 26a370d..2ba2e08 100644 (file)
@@ -235,7+235,7 @@ static int seeq8005_probe1(struct device *dev, int ioaddr)
 
 #if 0  
        /* 
-        * testing the packet buffer memory doesnt work yet
+        * testing the packet buffer memory doesn't work yet
         * but all other buffer accesses do 
         *                      - fixing is not a priority
         */
index 7122340..b35d8e4 100644 (file)
 #define SEEQSTAT_FIFO_EMPTY    (0x4000)
 #define SEEQSTAT_FIFO_DIR      (0x8000)        /* 1=read, 0=write */
 
-#define SEEQCFG1_BUFFER_MASK   (0x000f)        /* define what mapps into the BUFFER register */
+#define SEEQCFG1_BUFFER_MASK   (0x000f)        /* define what maps into the BUFFER register */
 #define SEEQCFG1_BUFFER_MAC0   (0x0000)        /* MAC station addresses 0-5 */
 #define SEEQCFG1_BUFFER_MAC1   (0x0001)
 #define SEEQCFG1_BUFFER_MAC2   (0x0002)
index 1ba4f94..1f297c1 100644 (file)
@@ -1722,7+1722,7 @@ static struct enet_statistics *SK_get_stats(struct device *dev)
  * Globals        : None
  * Update History :
  *     YY/MM/DD  uid  Description
- *     95/10/18  ACox  Noew multicast calling scheme
+ *     95/10/18  ACox  New multicast calling scheme
 -*/
 
 
index 3263c31..1b55ce4 100644 (file)
@@ -1339,7+1339,7 @@ cleanup_module(void)
                        {
                                /*
                                 * VSV = if dev->start==0, then device
-                                * unregistred while close proc.
+                                * unregistered while close proc.
                                 */ 
                                if (slip_ctrls[i]->dev.start)
                                        unregister_netdev(&(slip_ctrls[i]->dev));
@@ -1375,7+1375,7 @@ static void sl_outfill(unsigned long sls)
        {
                if( test_bit(SLF_OUTWAIT, &sl->flags) )
                {
-                       /* no packets was transmited, do outfill */
+                       /* no packets were transmitted, do outfill */
 #ifdef CONFIG_SLIP_MODE_SLIP6
                        unsigned char s = (sl->mode & SL_MODE_SLIP6)?0x70:END;
 #else
index 98032c7..4d6a9e2 100644 (file)
@@ -102,7+102,7 @@ struct slip {
 #define SL_MODE_AX25   4
 #define SL_MODE_ADAPTIVE 8
 #ifdef CONFIG_SLIP_SMART  
-  unsigned char                outfill;        /* # of sec betwen outfill packet */
+  unsigned char                outfill;        /* # of sec between outfill packet */
   unsigned char                keepalive;      /* keepalive seconds            */
   struct timer_list    outfill_timer;
   struct timer_list    keepalive_timer;
index 1c6bf2b..e3d648d 100644 (file)
  .    o   ( a LOT of advice from Becker as well )
  .
  . History:
- .     12/07/95  Erik Stahlman  written, got recieve/xmit handled 
- .     01/03/96  Erik Stahlman  worked out some bugs, actually useable!!! :-)
+ .     12/07/95  Erik Stahlman  written, got receive/xmit handled 
+ .     01/03/96  Erik Stahlman  worked out some bugs, actually usable!!! :-)
  .     01/06/96  Erik Stahlman  cleaned up some, better testing, etc 
  .     01/29/96  Erik Stahlman  fixed autoirq, added multicast
  .     02/01/96  Erik Stahlman  1. disabled all interrupts in smc_reset
@@ -99,7+99,7 @@ static const char *version =
 
 /*
  . Do you want to use 32 bit xfers?  This should work on all chips, as
- . the chipset is designed to accomodate them.   
+ . the chipset is designed to accommodate them.   
 */
 #define USE_32_BIT 1
 
@@ -206,7+206,7 @@ struct smc_local {
  . and sets up the appropriate device parameters.   
  . NOTE: Interrupts are *OFF* when this procedure is called.
  .
- . NB:This shouldn't be static since it is refered to externally.
+ . NB:This shouldn't be static since it is referred to externally.
 */
 int smc_init(struct device *dev);
 
@@ -262,7+262,7 @@ static void smc_interrupt(int irq, void *, struct pt_regs *regs);
 static void smc_interrupt(int irq, struct pt_regs *regs);
 #endif 
 /*
- . This is a seperate procedure to handle the receipt of a packet, to
+ . This is a separate procedure to handle the receipt of a packet, to
  . leave the interrupt code looking slightly cleaner 
 */ 
 inline static void smc_rcv( struct device *dev );
@@ -318,7+318,7 @@ static void smc_reset( int ioaddr );
 /* Enable Interrupts, Receive, and Transmit */
 static void smc_enable( int ioaddr );
 
-/* this puts the device in an inactve state */
+/* this puts the device in an inactive state */
 static void smc_shutdown( int ioaddr );
 
 #ifndef NO_AUTOPROBE
@@ -374,8+374,8 @@ static void smc_reset( int ioaddr )
        outw( TCR_CLEAR, ioaddr + TCR );
 
        /* set the control register to automatically
-          release succesfully transmitted packets, to make the best 
-          use out of our limitted memory */
+          release successfully transmitted packets, to make the best 
+          use out of our limited memory */
        SMC_SELECT_BANK( 1 );
        outw( inw( ioaddr + CONTROL ) | CTL_AUTO_RELEASE , ioaddr + CONTROL );  
 
@@ -415,7+415,7 @@ static void smc_enable( int ioaddr )
  . Purpose:  closes down the SMC91xxx chip.
  . Method:   
  .     1. zero the interrupt mask
- .     2. clear the enable recieve flag
+ .     2. clear the enable receive flag
  .     3. clear the enable xmit flags
  .
  . TODO: 
@@ -741,7+741,7 @@ static void smc_hardware_send_packet( struct device * dev )
  |   Input parameters: 
  |     dev->base_addr == 0, try to find all possible locations
  |     dev->base_addr == 1, return failure code
- |     dev->base_addr == 2, always allocate space,  and return sucess
+ |     dev->base_addr == 2, always allocate space,  and return success
  |     dev->base_addr == <anything else>   this is the address to check 
  |
  |   Output: 
@@ -915,7+915,7 @@ static int smc_probe( int ioaddr )
        SMC_SELECT_BANK(3);
        revision_register  = inw( ioaddr + REVISION );
        if ( !chip_ids[ ( revision_register  >> 4 ) & 0xF  ] ) { 
-               /* I don't regonize this chip, so... */
+               /* I don't recognize this chip, so... */
                printk(CARDNAME ": IO %x: Unrecognized revision register:"
                        " %x, Contact author. \n", ioaddr, revision_register );
 
@@ -1009,7+1009,7 @@ static int  smc_initcard(struct device *dev, int ioaddr)
        revision_register  = inw( ioaddr + REVISION );
        version_string = chip_ids[ ( revision_register  >> 4 ) & 0xF  ];
        if ( !version_string ) {
-               /* I shouldnt' get here because this call was done before.... */ 
+               /* I shouldn't get here because this call was done before.... */ 
                return -ENODEV;
        }
 
@@ -1337,7+1337,7 @@ static void smc_interrupt(int irq, struct pt_regs * regs)
                if (status & IM_RCV_INT) {
                        /* Got a packet(s). */
                        PRINTK2((KERN_WARNING CARDNAME
-                               ": Recieve Interrupt\n"));
+                               ": Receive Interrupt\n"));
                        smc_rcv(dev);
                } else if (status & IM_TX_INT ) {
                        PRINTK2((KERN_WARNING CARDNAME
@@ -1590,7+1590,7 @@ static void smc_tx( struct device * dev )
        if ( tx_status & TS_LOSTCAR ) lp->stats.tx_carrier_errors++;
        if ( tx_status & TS_LATCOL  ) {
                printk(KERN_DEBUG CARDNAME 
-                       ": Late collision occured on last xmit.\n");
+                       ": Late collision occurred on last xmit.\n");
                lp->stats.tx_window_errors++;
        }
 #if 0
@@ -1675,7+1675,7 @@ static void smc_set_multicast_list(struct device *dev)
                outw( inw(ioaddr + RCR ) | RCR_PROMISC, ioaddr + RCR );
 
 /* BUG?  I never disable promiscuous mode if multicasting was turned on. 
-   Now, I turn off promiscouos mode, but I don't do anything to multicasting
+   Now, I turn off promiscuous mode, but I don't do anything to multicasting
    when promiscuous mode is turned on. 
 */
 
index 51e1a2b..66f8b8c 100644 (file)
@@ -80,7+80,7 @@ typedef unsigned long int             dword;
 #define        RCR             4
 #define RCR_SOFTRESET  0x8000  /* resets the chip */   
 #define        RCR_STRIP_CRC   0x200   /* strips CRC */
-#define RCR_ENABLE     0x100   /* IFF this is set, we can recieve packets */
+#define RCR_ENABLE     0x100   /* IFF this is set, we can receive packets */
 #define RCR_ALMUL      0x4     /* receive all multicast packets */
 #define        RCR_PROMISC     0x2     /* enable promiscuous mode */
 
@@ -227,12+227,12 @@ static const char * interfaces[ 2 ] = { "TP", "AUI" };
 }
 
 /*----------------------------------------------------------------------
- . Define the interrupts that I want to recieve from the card
+ . Define the interrupts that I want to receive from the card
  . 
  . I want: 
  .  IM_EPH_INT, for nasty errors
- .  IM_RCV_INT, for happy recieved packets
- .  IM_RX_OVRN_INT, because I have to kick the reciever
+ .  IM_RCV_INT, for happy received packets
+ .  IM_RX_OVRN_INT, because I have to kick the receiver
  --------------------------------------------------------------------------*/
 #define SMC_INTERRUPT_MASK   (IM_EPH_INT | IM_RX_OVRN_INT | IM_RCV_INT) 
 
index 304fac8..ea1d9fc 100644 (file)
@@ -124,7+124,7 @@ struct strip
 
        struct tty_struct *tty;                 /* ptr to TTY structure         */
        char               if_name[8];          /* Dynamically generated name   */
-       struct device       dev;                /* Our device stucture          */
+       struct device       dev;                /* Our device structure         */
 };
 /************************************************************************/
 /* Utility routines for disabling and restoring interrupts             */
@@ -385,7+385,7 @@ There are three types of results:
    UnStuffData returns new_src < end to indicate that there are more bytes
    to be read.
 
-Note: The decoding may be dstructive, in that it may alter the source
+Note: The decoding may be destructive, in that it may alter the source
 data in the process of decoding it (this is necessary to allow a follow-on
 call to resume correctly). */
 
@@ -578,7+578,7 @@ static void strip_write_some_more(struct tty_struct *tty)
 
        if (strip_info->tx_left > 0) 
        {       /* If some data left, send it */
-               /* Must disable interrupts because othewise the write_wakeup might
+               /* Must disable interrupts because otherwise the write_wakeup might
                 * happen before we've had a chance to update the tx_left and
                 *  tx_head fields
                 */
@@ -867,7+867,7 @@ static void process_packet(struct strip *strip_info)
     }
     name_end = ptr++;
 
-    /* Check for SRIP key, and skip over it */
+    /* Check for STRIP key, and skip over it */
     if (ptr[0] != ProtocolKey.c[0] ||
         ptr[1] != ProtocolKey.c[1] ||
         ptr[2] != ProtocolKey.c[2] ||
@@ -1150,7+1150,7 @@ static int strip_close_low(struct device *dev)
 
 /* 
  *     This routine is called by DDI when the
- *     (dyamically assigned) device is registered
+ *     (dynamically assigned) device is registered
  */
  
 static int strip_dev_init(struct device *dev)
index 5e463d4..fa3edbf 100644 (file)
@@ -64,7+64,7 @@ static char *lancestr = "LANCE";
 #define        LE_C0_ERR       0x8000  /* Error: set if BAB, SQE, MISS or ME is set */
 #define        LE_C0_BABL      0x4000  /* BAB:  Babble: tx timeout. */
 #define        LE_C0_CERR      0x2000  /* SQE:  Signal quality error */
-#define        LE_C0_MISS      0x1000  /* MISS: Missed a packaed */
+#define        LE_C0_MISS      0x1000  /* MISS: Missed a packet */
 #define        LE_C0_MERR      0x0800  /* ME:   Memory error */
 #define        LE_C0_RINT      0x0400  /* Received interrupt */
 #define        LE_C0_TINT      0x0200  /* Transmitter Interrupt */
@@ -73,7+73,7 @@ static char *lancestr = "LANCE";
 #define        LE_C0_INEA      0x0040  /* Interrupt enable */
 #define        LE_C0_RXON      0x0020  /* Receiver on */
 #define        LE_C0_TXON      0x0010  /* Transmitter on */
-#define        LE_C0_TDMD      0x0008  /* Transmiter demand */
+#define        LE_C0_TDMD      0x0008  /* Transmitter demand */
 #define        LE_C0_STOP      0x0004  /* Stop the card */
 #define        LE_C0_STRT      0x0002  /* Start the card */
 #define        LE_C0_INIT      0x0001  /* Init the card */
@@ -96,12+96,12 @@ static char *lancestr = "LANCE";
 #define LE_T1_OWN       0x80    /* Lance owns the packet */
 #define LE_T1_ERR       0x40    /* Error summary */
 #define LE_T1_EONE      0x08    /* Error: one retry needed */
-#define LE_T1_EDEF      0x04    /* Error: defered */
+#define LE_T1_EDEF      0x04    /* Error: deferred */
 #define LE_T1_SOP       0x02    /* Start of packet */
 #define LE_T1_EOP       0x01    /* End of packet */
 
 #define LE_T3_BUF       0x8000  /* Buffer error */
-#define LE_T3_UFL       0x4000  /* Error undeflow */
+#define LE_T3_UFL       0x4000  /* Error underflow */
 #define LE_T3_LCOL      0x1000  /* Error late collision */
 #define LE_T3_CLOS      0x0800  /* Error carrier loss */
 #define LE_T3_RTY       0x0400  /* Error retry */
@@ -216,7+216,7 @@ lance_init_ring (struct device *dev)
     int leptr;
     int i;
     
-    /* Lock out other processes while setting up harware */
+    /* Lock out other processes while setting up hardware */
     dev->tbusy = 1;
     lp->rx_new = lp->tx_new = 0;
     lp->rx_old = lp->tx_old = 0;
@@ -402,7+402,7 @@ lance_tx (struct device *dev)
            if (status & LE_T3_CLOS) lp->stats.tx_carrier_errors++;
            if (status & LE_T3_LCOL) lp->stats.tx_window_errors++;
 
-           /* buffer errors and underflows turn off the transmiter */
+           /* buffer errors and underflows turn off the transmitter */
            /* Restart the adapter */
            if (status & (LE_T3_BUF|LE_T3_UFL)){
                lp->stats.tx_fifo_errors++;
@@ -590,7+590,7 @@ lance_start_xmit (struct sk_buff *skb, struct device *dev)
            if (tickssofar < 100)
                    status = -1;
            else {
-                   printk ("%s: trasmit timed out, status %04x, resetting\n",
+                   printk ("%s: transmit timed out, status %04x, resetting\n",
                            dev->name, ll->rdp);
                    lance_reset (dev);
            }
index 6f16b96..72a6cb4 100644 (file)
@@ -303,8+303,8 @@ enum tulip_offsets {
 #define        TRING_CLEAR                     0x00000000      /* clear */
 #define        TRING_ERROR                     0x00008000      /* error summary */
 #define        TRING_ETxTO                     0x00004000      /* Tx time out */
-#define        TRING_ELCOLL            0x00000200      /* late collition */
-#define        TRING_EFCOLL            0x00000100      /* fatal collition */
+#define        TRING_ELCOLL            0x00000200      /* late collision */
+#define        TRING_EFCOLL            0x00000100      /* fatal collision */
 #define        TRING_ELCARR            0x00000800      /* carrier lost */
 #define        TRING_ENCARR            0x00000400      /* no carrier */
 #define        TRING_ENOHB                     0x00000080      /* heartbeat fail */
@@ -565,7+565,7 @@ generic21040_select(struct device *dev)
        dev->if_port &= 3;
        printk("%s: enabling %s port.\n",
                   dev->name, dev->if_port ?  "AUI":"10baseT");
-       /* Set the full duplux match frame. */
+       /* Set the full duplex match frame. */
        tio_write(FULL_DUPLEX_MAGIC, CSR11);
        tio_write(TSIAC_RESET, CSR13);
        /* Reset the serial interface */
@@ -1344,7+1344,7 @@ int tulip_probe(struct device *dev)
                                /* Remove I/O space marker in bit 0. */
                                pci_ioaddr &= ~3;
 #ifdef MODULE
-                               /* cmpare requested IRQ/IO address */
+                               /* compare requested IRQ/IO address */
                                if (dev && dev->irq && dev->base_addr &&
                                        (dev->irq != pci_irq
                                         || dev->base_addr != pci_ioaddr)) continue;
index 148423b..c1eeb30 100644 (file)
 #include <linux/config.h>
 
 #ifdef CONFIG_SCSI_NCR53C7xx_sync
+#ifdef CONFIG_SCSI_NCR53C7xx_DISCONNECT
 #define PERM_OPTIONS (OPTION_IO_MAPPED|OPTION_DEBUG_TEST1|OPTION_DISCONNECT|\
        OPTION_SYNCHRONOUS|OPTION_ALWAYS_SYNCHRONOUS)
 #else
+#define PERM_OPTIONS (OPTION_IO_MAPPED|OPTION_DEBUG_TEST1|\
+       OPTION_SYNCHRONOUS|OPTION_ALWAYS_SYNCHRONOUS)
+#endif
+#else
+#ifdef CONFIG_SCSI_NCR53C7xx_DISCONNECT
 #define PERM_OPTIONS (OPTION_IO_MAPPED|OPTION_DEBUG_TEST1|OPTION_DISCONNECT|\
        OPTION_SYNCHRONOUS)
+#else
+#define PERM_OPTIONS (OPTION_IO_MAPPED|OPTION_DEBUG_TEST1|OPTION_SYNCHRONOUS)
+#endif
 #endif
 
 /*
@@ -349,7+358,7 @@ static Scsi_Host_Template *the_template = NULL;
  * next command for a given I/T/L combination after the first has completed;
  * incurring our interrupt latency between SCSI commands.
  *
- * To allow furthur pipelining of the NCR and host CPU operation, we want 
+ * To allow further pipelining of the NCR and host CPU operation, we want 
  * to set things up so that immediately on termination of a command destined 
  * for a given LUN, we get that LUN busy again.  
  * 
@@ -361,7+370,7 @@ static Scsi_Host_Template *the_template = NULL;
  * which starts execution immediately, inserting the command at the head 
  * of the start queue if the NCR chip is selected or reselected.
  *
- * We would chanage so that we keep a list of outstanding commands 
+ * We would change so that we keep a list of outstanding commands 
  * for each unit, rather than a single running_list.  We'd insert 
  * a new command into the right running list; if the NCR didn't 
  * have something running for that yet, we'd put it in the 
@@ -391,13+400,13 @@ static Scsi_Host_Template *the_template = NULL;
  *
  * 3.  Parity checking is currently disabled, and a few things should 
  *     happen here now that we support synchronous SCSI transfers :
- *     1.  On soft-reset, we shuld set the EPC (Enable Parity Checking)
+ *     1.  On soft-reset, we should set the EPC (Enable Parity Checking)
  *        and AAP (Assert SATN/ on parity error) bits in SCNTL0.
  *     
  *     2.  We should enable the parity interrupt in the SIEN0 register.
  * 
  *     3.  intr_phase_mismatch() needs to believe that message out is 
- *        allways an "acceptable" phase to have a mismatch in.  If 
+ *        always an "acceptable" phase to have a mismatch in.  If 
  *        the old phase was MSG_IN, we should send a MESSAGE PARITY 
  *        error.  If the old phase was something else, we should send
  *        a INITIATOR_DETECTED_ERROR message.  Note that this could
@@ -422,7+431,7 @@ static Scsi_Host_Template *the_template = NULL;
  *             command completion signaling.   Need to modify all 
  *             SDID, SCID, etc. registers, and table indirect select code 
  *             since these use bit fielded (ie 1<<target) instead of 
- *             binary encoded target ids.  Need to accomodate
+ *             binary encoded target ids.  Need to accommodate
  *             different register mappings, probably scan through
  *             the SCRIPT code and change the non SFBR register operand
  *             of all MOVE instructions.
@@ -456,7+465,7 @@ static Scsi_Host_Template *the_template = NULL;
  * 
  * So that we only need two SCSI scripts, we need to modify things so
  * that we fixup register accesses in READ/WRITE instructions, and 
- * we'll also have to accomodate the bit vs. binary encoding of IDs
+ * we'll also have to accommodate the bit vs. binary encoding of IDs
  * with the 7xx chips.
  */
 
@@ -692,7+701,7 @@ find_host (int host) {
  * Purpose : KGDB interface which will allow us to negotiate for 
  *     synchronous transfers.  This ill be replaced with a more 
  *     integrated function; perhaps a new entry in the scsi_host 
- *     structure, accessable via an ioctl() or perhaps /proc/scsi.
+ *     structure, accessible via an ioctl() or perhaps /proc/scsi.
  *
  * Inputs : host - number of SCSI host; target - number of target.
  *
@@ -728,7+737,7 @@ request_synchronous (int host, int target) {
     cli();
     if (hostdata->initiate_sdtr & (1 << target)) {
        restore_flags(flags);
-       printk (KERN_ALERT "target %d allready doing SDTR\n", target);
+       printk (KERN_ALERT "target %d already doing SDTR\n", target);
        return -1;
     } 
     hostdata->initiate_sdtr |= (1 << target);
@@ -1352,7+1361,7 @@ normal_init (Scsi_Host_Template *tpnt, int board, int chip,
  * using a 'C' call on the host processor.
  *
  * Therefore, there's no need for the NCR chip to directly manipulate
- * this data, and we should put it wherever is most convienient for 
+ * this data, and we should put it wherever is most convenient for 
  * Linux.
  */
     if (track_events) 
@@ -1858,7+1867,7 @@ NCR53c8xx_run_tests (struct Scsi_Host *host) {
        /* 
         * This is currently a .5 second timeout, since (in theory) no slow 
         * board will take that long.  In practice, we've seen one 
-        * pentium which ocassionally fails with this, but works with 
+        * pentium which occasionally fails with this, but works with 
         * 10 times as much?
         */
 
@@ -2143,7+2152,7 @@ abnormal_finished (struct NCR53c7x0_cmd *cmd, int result) {
            hostdata->dsa_next), ncr_search = *ncr_prev, --left);
 
     if (left < 0) 
-       printk("scsi%d: loop detected in ncr reonncect list\n",
+       printk("scsi%d: loop detected in ncr reconnect list\n",
            host->host_no);
     else if (ncr_search) 
        if (found)
@@ -2517,7+2526,7 @@ NCR53c8x0_dstat_sir_intr (struct Scsi_Host *host, struct
            hostdata->dsp_changed = 1;
            break;
        default:
-           printk ("scsi%d : unsupported message, resjecting\n",
+           printk ("scsi%d : unsupported message, rejecting\n",
                host->host_no);
            hostdata->dsp = hostdata->script + hostdata->E_reject_message /
                sizeof(u32);
@@ -3391,7+3400,7 @@ NCR53c8x0_soft_reset (struct Scsi_Host *host) {
  * 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).
+ *     reused in a LIFO manner to minimize cache thrashing).
  *
  * Side effects : If we haven't yet scheduled allocation of NCR53c7x0_cmd
  *     structures for this device, do so.  Attempt to complete all scheduled
@@ -3419,11+3428,11 @@ allocate_cmd (Scsi_Cmnd *cmd) {
                "         target = %d, lun = %d, %s\n",
            host->host_no, hostdata->num_cmds, host->can_queue,
            cmd->target, cmd->lun, (hostdata->cmd_allocated[cmd->target] &
-               (1 << cmd->lun)) ? "allready allocated" : "not allocated");
+               (1 << cmd->lun)) ? "already allocated" : "not allocated");
 
 /*
  * If we have not yet reserved commands for this I_T_L nexus, and
- * the device exists (as indicated by permanant Scsi_Cmnd structures
+ * the device exists (as indicated by permanent Scsi_Cmnd structures
  * being allocated under 1.3.x, or being outside of scan_scsis in 
  * 1.2.x), do so now.
  */
@@ -3568,7+3577,7 @@ create_cmd (Scsi_Cmnd *cmd) {
     }
 
     /*
-     * New code : so that active pointers work correctly irregardless
+     * New code : so that active pointers work correctly regardless
      *         of where the saved data pointer is at, we want to immediately
      *         enter the dynamic code after selection, and on a non-data
      *         phase perform a CALL to the non-data phase handler, with
@@ -3603,7+3612,7 @@ create_cmd (Scsi_Cmnd *cmd) {
 
     /*
      * The saved data pointer is set up so that a RESTORE POINTERS message 
-     * will start the data transfer over at the beggining.
+     * will start the data transfer over at the beginning.
      */
 
     tmp->saved_data_pointer = virt_to_bus (hostdata->script) + 
@@ -3854,7+3863,7 @@ create_cmd (Scsi_Cmnd *cmd) {
  * Side effects :
  *      cmd is added to the per instance driver issue_queue, with major
  *      twiddling done to the host specific fields of cmd.  If the
- *      process_issue_queue corouting isn't running, it is restarted.
+ *      process_issue_queue coroutine isn't running, it is restarted.
  * 
  * NOTE : we use the host_scribble field of the Scsi_Cmnd structure to 
  *     hold our own data, and pervert the ptr field of the SCp field
@@ -3914,7+3923,7 @@ NCR53c7xx_queue_command (Scsi_Cmnd *cmd, void (* done)(Scsi_Cmnd *)) {
     cli();
     /*
      * REQUEST SENSE commands are inserted at the head of the queue 
-     * so that we do not clear the contingent allegience condition
+     * so that we do not clear the contingent allegiance condition
      * they may be looking at.
      */
 
@@ -3940,7+3949,7 @@ NCR53c7xx_queue_command (Scsi_Cmnd *cmd, void (* done)(Scsi_Cmnd *)) {
  *     free slot in the schedule list or by terminating it immediately.
  *
  * Inputs : 
- *     host - SCSI host adater; hostdata - hostdata structure for 
+ *     host - SCSI host adapter; hostdata - hostdata structure for 
  *     this adapter; cmd - a pointer to the command; should have 
  *     the host_scribble field initialized to point to a valid 
  *     
@@ -3970,7+3979,7 @@ to_schedule_list (struct Scsi_Host *host, struct NCR53c7x0_hostdata *hostdata,
     cli();
     
     /* 
-     * Work arround race condition : if an interrupt fired and we 
+     * Work around race condition : if an interrupt fired and we 
      * got disabled forget about this command.
      */
 
@@ -4043,7+4052,7 @@ to_schedule_list (struct Scsi_Host *host, struct NCR53c7x0_hostdata *hostdata,
 static __inline__ int
 busyp (struct Scsi_Host *host, struct NCR53c7x0_hostdata *hostdata, 
     Scsi_Cmnd *cmd) {
-    /* FIXME : in the future, this needs to accomodate SCSI-II tagged
+    /* FIXME : in the future, this needs to accommodate SCSI-II tagged
        queuing, and we may be able to play with fairness here a bit.
      */
     return hostdata->busy[cmd->target][cmd->lun];
@@ -4057,7+4066,7 @@ busyp (struct Scsi_Host *host, struct NCR53c7x0_hostdata *hostdata,
  *     overflows when the scsi_done() function is invoked recursively.
  * 
  * NOTE : process_issue_queue exits with interrupts *disabled*, so the 
- *     caller must renable them if it desires.
+ *     caller must reenable them if it desires.
  * 
  * NOTE : process_issue_queue should be called from both 
  *     NCR53c7x0_queue_command() and from the interrupt handler 
@@ -4273,7+4282,7 @@ intr_scsi (struct Scsi_Host *host, struct NCR53c7x0_cmd *cmd) {
         *
         * - A synchronous offset which causes the SCSI FIFO to be overwritten.
         *
-        * - A REQ which causes the maxmimum synchronous offset programmed in 
+        * - A REQ which causes the maximum synchronous offset programmed in 
         *      the SXFER register to be exceeded.
         *
         * - A phase change with an outstanding synchronous offset.
@@ -4618,7+4627,7 @@ abort_connected (struct Scsi_Host *host) {
     struct NCR53c7x0_hostdata *hostdata = (struct NCR53c7x0_hostdata *)
        host->hostdata;
 /* FIXME : this probably should change for production kernels; at the 
-   least, counter sould move to a per-host structure. */
+   least, counter should move to a per-host structure. */
     static int counter = 5;
 #ifdef NEW_ABORT
     int sstat, phase, offset;
@@ -4934,7+4943,7 @@ intr_phase_mismatch (struct Scsi_Host *host, struct NCR53c7x0_cmd *cmd) {
     /*
      * Some SCSI devices will interpret a command as they read the bytes
      * off the SCSI bus, and may decide that the command is Bogus before 
-     * they've read the entire commad off the bus.
+     * they've read the entire command off the bus.
      */
     } else if (dsp == hostdata->script + hostdata->E_cmdout_cmdout / sizeof 
        (u32)) {
@@ -5364,7+5373,7 @@ print_insn (struct Scsi_Host *host, const u32 *insn,
            prefix, insn);
     } else {
 /* 
- * FIXME : (void *) cast in virt_to_bus should be unecessary, because
+ * FIXME : (void *) cast in virt_to_bus should be unnecessary, because
  *     it should take const void * as argument.
  */
        sprintf(buf, "%s0x%lx (virt 0x%p) : 0x%08x 0x%08x (virt 0x%p)", 
@@ -5603,7+5612,7 @@ NCR53c7xx_reset (Scsi_Cmnd *cmd) {
      * get new commands.
      *
      * We can't let this happen until after we've re-initialized the driver
-     * structures, and can't reinitilize those structures until after we've 
+     * structures, and can't reinitialize those structures until after we've 
      * dealt with their contents.
      *
      * So, we need to find all of the commands which were running, stick
@@ -5693,7+5702,7 @@ insn_to_offset (Scsi_Cmnd *cmd, u32 *insn) {
 
 /*
  * With the current code implementation, if the insn is inside dynamically 
- * generated code, the data pointer will be the instruction preceeding 
+ * generated code, the data pointer will be the instruction preceding 
  * the next transfer segment.
  */
 
@@ -6083,7+6092,7 @@ hard_reset (struct Scsi_Host *host) {
  *     so we don't perturb hostdata.  We don't use a field of the 
  *     NCR53c7x0_cmd structure since we may not have allocated one 
  *     for the command causing the reset.) of Scsi_Cmnd structures that 
- *     had propogated bellow the Linux issue queue level.  If free is set, 
+ *     had propagated below the Linux issue queue level.  If free is set, 
  *     free the NCR53c7x0_cmd structures which are associated with 
  *     the Scsi_Cmnd structures, and clean up any internal 
  *     NCR lists that the commands were on.  If issue is set,
@@ -6153,7+6162,7 @@ return_outstanding_commands (struct Scsi_Host *host, int free, int issue) {
  * Purpose : disables the given NCR host, causing all commands
  *     to return a driver error.  Call this so we can unload the
  *     module during development and try again.  Eventually, 
- *     we should be able to find clean workarrounds for these
+ *     we should be able to find clean workarounds for these
  *     problems.
  *
  * Inputs : host - hostadapter to twiddle
@@ -6298,7+6307,7 @@ dump_events (struct Scsi_Host *host, int count) {
            i = (i ? i - 1 : hostdata->event_size -1), --count) {
            save_flags(flags);
 /*
- * By copying the event we're currently examinging with interrupts
+ * By copying the event we're currently examining with interrupts
  * disabled, we can do multiple printk(), etc. operations and 
  * still be guaranteed that they're happening on the same 
  * event structure.
index f1dfc4d..44a5049 100644 (file)
@@ -981,7+981,7 @@ extern inline void * phys_to_virt(unsigned long address)
 #define OPTION_DEBUG_CORRUPTION        0x1000000       /* Detect script corruption */
 #define OPTION_DEBUG_SDTR       0x2000000      /* Debug SDTR problem */
 #define OPTION_DEBUG_MISMATCH  0x4000000       /* Debug phase mismatches */
-#define OPTION_DISCONNECT      0x8000000       /* Allow disconect */
+#define OPTION_DISCONNECT      0x8000000       /* Allow disconnect */
 #define OPTION_DEBUG_DISCONNECT 0x10000000     
 #define OPTION_ALWAYS_SYNCHRONOUS 0x20000000   /* Negotiate sync. transfers
                                                   on power up */
@@ -1063,7+1063,7 @@ struct NCR53c7x0_event {
  *
  * 1.  A fixed portion, for things which are not accessed directly by static NCR
  *     code (ie, are referenced only by the Linux side of the driver,
- *     or only by dynamically genreated code).  
+ *     or only by dynamically generated code).  
  *
  * 2.  The DSA portion, for things which are accessed directly by static NCR
  *     code.
@@ -1116,7+1116,7 @@ struct NCR53c7x0_cmd {
     u32 *data_transfer_end;            /* Address after end of data transfer o
                                           routines */
 /* 
- * The following three fields were moved from the DSA propper to here
+ * The following three fields were moved from the DSA proper to here
  * since only dynamically generated NCR code refers to them, meaning
  * we don't need dsa_* absolutes, and it is simpler to let the 
  * host code refer to them directly.
index 646c6f4..76ee946 100644 (file)
@@ -128,7+128,7 @@ ABSOLUTE dsa_temp_addr_dsa_value = 0        ; Address of this DSA value
 ; loaded with the address of the next DSA structure and
 ; reselected_check_next is called if a failure occurs.
 ;
-; Perhaps more conscisely, the net effect of the mess is 
+; Perhaps more concisely, the net effect of the mess is 
 ;
 ; for (dsa = reconnect_dsa_head, dest = &reconnect_dsa_head, 
 ;     src = NULL; dsa; dest = &dsa->next, dsa = dsa->next) {
@@ -224,7+224,7 @@ ABSOLUTE dsa_check_reselect = 0
 ENTRY dsa_code_check_reselect
 dsa_code_check_reselect:
        MOVE SSID TO SFBR               ; SSID contains 3 bit target ID
-; FIXME : we need to accomodate bit fielded and binary here for '7xx/'8xx chips
+; FIXME : we need to accommodate bit fielded and binary here for '7xx/'8xx chips
        JUMP REL (wrong_dsa), IF NOT dsa_temp_target, AND MASK 0xf8
 ;
 ; Hack - move to scratch first, since SFBR is not writeable
@@ -234,7+234,7 @@ dsa_code_check_reselect:
        MOVE MEMORY 1, reselected_identify, addr_scratch
        MOVE dmode_memory_to_memory TO DMODE
        MOVE SCRATCH0 TO SFBR
-; FIXME : we need to accomodate bit fielded and binary here for '7xx/'8xx chips
+; FIXME : we need to accommodate bit fielded and binary here for '7xx/'8xx chips
        JUMP REL (wrong_dsa), IF NOT dsa_temp_lun, AND MASK 0xf8
 ;              Patch the MOVE MEMORY INSTRUCTION such that
 ;              the source address is the address of this dsa's
@@ -281,7+281,7 @@ ABSOLUTE schedule = 0               ; Array of JUMP dsa_begin or JUMP (next),
 
 ; Linked lists of DSA structures
 ABSOLUTE reconnect_dsa_head = 0        ; Link list of DSAs which can reconnect
-ABSOLUTE addr_reconnect_dsa_head = 0 ; Address of variable contataining
+ABSOLUTE addr_reconnect_dsa_head = 0 ; Address of variable containing
                                ; address of reconnect_dsa_head
 
 ; These select the source and destination of a MOVE MEMORY instruction
@@ -571,7+571,7 @@ cmdout_cmdout:
 ;
 ;      After control has passed to one of the user provided 
 ;      DATA_IN or DATA_OUT routines, back calls are made to 
-;      other_tranfer_in or other_transfer_out to handle non-DATA IN
+;      other_transfer_in or other_transfer_out to handle non-DATA IN
 ;      and DATA OUT phases respectively, with the state of the active
 ;      data pointer being preserved in TEMP.
 ;
@@ -648,7+648,7 @@ datain_jump:
 
 
 ; Note that other_out and other_in loop until a non-data phase
-; is discoverred, so we only execute return statements when we
+; is discovered, so we only execute return statements when we
 ; can go on to the next data phase block move statement.
 
 ENTRY other_out
@@ -697,7+697,7 @@ other_transfer:
 ;      caller hasn't read the first byte of the message.  munge_message
 ;      is called when the caller has read the first byte of the message,
 ;      and left it in SFBR.  msg_in_restart is called when the caller 
-;      hasnt read the first byte of the message, and wishes RETURN
+;      hasn't read the first byte of the message, and wishes RETURN
 ;      to transfer control back to the address of the conditional
 ;      CALL instruction rather than to the instruction after it.
 ;
@@ -1110,7+1110,7 @@ selected:
 ;
 ; 2.  The NCR53c810 was selected or reselected by another device.
 ;
-; 3.  The bus was allready busy since we were selected or reselected
+; 3.  The bus was already busy since we were selected or reselected
 ;      before starting the command.
 
 wait_reselect_failed:
@@ -1234,7+1234,7 @@ initiator_abort:
 ; so we need to sink/source one byte of data to allow the transition.
 ;
 ; For the sake of safety, we'll only source one byte of data in all 
-; cases, but to accomodate the SCSI-I dain bramage, we'll sink an  
+; cases, but to accommodate the SCSI-I dain bramage, we'll sink an  
 ; arbitrary number of bytes.
     JUMP spew_cmd, WHEN CMD
     JUMP eat_msgin, WHEN MSG_IN
index dd45bae..b586340 100644 (file)
@@ -130,7+130,7 @@ ABSOLUTE dsa_temp_addr_dsa_value = 0        ; Address of this DSA value
 ; loaded with the address of the next DSA structure and
 ; reselected_check_next is called if a failure occurs.
 ;
-; Perhaps more conscisely, the net effect of the mess is 
+; Perhaps more concisely, the net effect of the mess is 
 ;
 ; for (dsa = reconnect_dsa_head, dest = &reconnect_dsa_head, 
 ;     src = NULL; dsa; dest = &dsa->next, dsa = dsa->next) {
@@ -310,7+310,7 @@ dsa_code_check_reselect:
 
 at 0x0000003e : */     0x720a0000,0x00000000,
 /*
-; FIXME : we need to accomodate bit fielded and binary here for '7xx/'8xx chips
+; FIXME : we need to accommodate bit fielded and binary here for '7xx/'8xx chips
        JUMP REL (wrong_dsa), IF NOT dsa_temp_target, AND MASK 0xf8
 
 at 0x00000040 : */     0x8084f800,0x00ffff48,
@@ -335,7+335,7 @@ at 0x00000047 : */  0x78380000,0x00000000,
 
 at 0x00000049 : */     0x72340000,0x00000000,
 /*
-; FIXME : we need to accomodate bit fielded and binary here for '7xx/'8xx chips
+; FIXME : we need to accommodate bit fielded and binary here for '7xx/'8xx chips
        JUMP REL (wrong_dsa), IF NOT dsa_temp_lun, AND MASK 0xf8
 
 at 0x0000004b : */     0x8084f800,0x00ffff1c,
@@ -403,7+403,7 @@ ABSOLUTE schedule = 0               ; Array of JUMP dsa_begin or JUMP (next),
 
 ; Linked lists of DSA structures
 ABSOLUTE reconnect_dsa_head = 0        ; Link list of DSAs which can reconnect
-ABSOLUTE addr_reconnect_dsa_head = 0 ; Address of variable contataining
+ABSOLUTE addr_reconnect_dsa_head = 0 ; Address of variable containing
                                ; address of reconnect_dsa_head
 
 ; These select the source and destination of a MOVE MEMORY instruction
@@ -748,7+748,7 @@ at 0x00000093 : */  0x1a000000,0x00000048,
 ;
 ;      After control has passed to one of the user provided 
 ;      DATA_IN or DATA_OUT routines, back calls are made to 
-;      other_tranfer_in or other_transfer_out to handle non-DATA IN
+;      other_transfer_in or other_transfer_out to handle non-DATA IN
 ;      and DATA OUT phases respectively, with the state of the active
 ;      data pointer being preserved in TEMP.
 ;
@@ -906,7+906,7 @@ at 0x000000cd : */  0x80080000,0x00000000,
 
 
 ; Note that other_out and other_in loop until a non-data phase
-; is discoverred, so we only execute return statements when we
+; is discovered, so we only execute return statements when we
 ; can go on to the next data phase block move statement.
 
 ENTRY other_out
@@ -1018,7+1018,7 @@ at 0x000000f7 : */        0x80080000,0x000003ac,
 ;      caller hasn't read the first byte of the message.  munge_message
 ;      is called when the caller has read the first byte of the message,
 ;      and left it in SFBR.  msg_in_restart is called when the caller 
-;      hasnt read the first byte of the message, and wishes RETURN
+;      hasn't read the first byte of the message, and wishes RETURN
 ;      to transfer control back to the address of the conditional
 ;      CALL instruction rather than to the instruction after it.
 ;
@@ -1761,7+1761,7 @@ 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
+; 3.  The bus was already busy since we were selected or reselected
 ;      before starting the command.
 
 wait_reselect_failed:
@@ -1990,7+1990,7 @@ at 0x00000220 : */        0x58000008,0x00000000,
 ; so we need to sink/source one byte of data to allow the transition.
 ;
 ; For the sake of safety, we'll only source one byte of data in all 
-; cases, but to accomodate the SCSI-I dain bramage, we'll sink an  
+; cases, but to accommodate the SCSI-I dain bramage, we'll sink an  
 ; arbitrary number of bytes.
     JUMP spew_cmd, WHEN CMD
 
index 415eea1..5e904a5 100644 (file)
  *     drew@colorado.edu
  *     +1 (303) 666-5836
  *
- *  The AM53C974_nobios_detect code was origininally developed by
+ *  The AM53C974_nobios_detect code was originally developed by
  *   Robin Cutshaw (robin@xfree86.org) and is used here in a 
  *   slightly modified form.
  *
@@ -1374,7+1374,7 @@ AM53C974_write_8(SOFREG, (SOFREG_SO & hostdata->sync_off[target]) |
 * Purpose : handle phase changes                                       *
 *                                                                      *
 * Inputs : instance - which AM53C974                                   *
-*          statreg - stus register                                     *
+*          statreg - status register                                     *
 *          isreg - internal state register                             *
 *          instreg - interrupt status register                         *
 *          cfifo - number of bytes in FIFO                             *
index 3160890..67f2ecd 100644 (file)
  *     drew@colorado.edu
  *     +1 (303) 666-5836
  *
- *  The AM53C974_nobios_detect code was origininally developed by
+ *  The AM53C974_nobios_detect code was originally developed by
  *   Robin Cutshaw (robin@xfree86.org) and is used here in a 
  *   modified form.
  *
index 254957d..1f4e9c5 100644 (file)
@@ -71,16+71,16 @@ Wed Jul 19 09:18:28 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
        * Linux 1.3.5 released.
 
        * Native wide, multichannel and /proc/scsi support now in official
-       kernel distibution.
+       kernel distribution.
  
-        * scsi.c/h, hosts.c/h et al reindended to increase readability
+        * scsi.c/h, hosts.c/h et al reindented to increase readability
        (especially on 80 column wide terminals).
 
        * scsi.c, scsi_proc.c, ../../fs/proc/inode.c: Added
        /proc/scsi/scsi which allows root to scan for hotplugged devices.
 
        * scsi.c (scsi_proc_info): Added, to support /proc/scsi/scsi.
-       (scan_scsis): Added some 'spagetti' code to allow scanning for
+       (scan_scsis): Added some 'spaghetti' code to allow scanning for
        single devices.
        
 
@@ -105,9+105,9 @@ Thu May  4 17:58:48 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
        scsi_malloc returned memory for it.     
 
        * eata_dma.c (register_HBA) (eata_queue): Add support for
-       large scatter/gatter tables and set use_clustering accordingly
+       large scatter/gather tables and set use_clustering accordingly
 
-       * hosts.c: Make use_clustering changable in the Scsi_Host structure.
+       * hosts.c: Make use_clustering changeable in the Scsi_Host structure.
 
 Wed Apr 12 15:25:52 1995  Eric Youngdale  (eric@andante)
 
@@ -119,9+119,9 @@ Wed Apr 12 15:25:52 1995  Eric Youngdale  (eric@andante)
        cards.
 
        * eata_dma.c: Update to 2.3.5r. Modularize. Improved error handling
-        thruout and fixed bug interrupt routine which resulted in shifted 
+        throughout and fixed bug interrupt routine which resulted in shifted 
         status bytes. Added blink LED state checks for ISA and EISA HBAs.
-        Memory mamagement bug seems to have disapeared ==> increasing 
+        Memory management bug seems to have disappeared ==> increasing 
         C_P_L_CURRENT_MAX to 16 for now. Decreasing C_P_L_DIV to 3 for 
         performance reasons.  
 
index 6929999..8ff833b 100644 (file)
@@ -39,6+39,7 @@ if [ "$CONFIG_PCI" = "y" ]; then
   if [ "$CONFIG_SCSI_NCR53C7xx" != "n" ]; then
     bool '   always negotiate synchronous transfers' CONFIG_SCSI_NCR53C7xx_sync
     bool '   allow FAST-SCSI [10MHz]' CONFIG_SCSI_NCR53C7xx_FAST
+    bool '   allow DISCONNECT' CONFIG_SCSI_NCR53C7xx_DISCONNECT
   fi
 fi
 dep_tristate 'Always IN2000 SCSI support (test release)' CONFIG_SCSI_IN2000 $CONFIG_SCSI
index 3b988c4..2ebefd2 100644 (file)
@@ -1220,7+1220,7 @@ static void NCR5380_main (void) {
                         * in hostdata->connected, OR has terminated the
                         * command.
                         *
-                        * With successfull commands, we fall through
+                        * With successful commands, we fall through
                         * and see if we can do an information transfer,
                         * with failures we will restart.
                         */
@@ -1947,7+1947,7 @@ static int do_abort (struct Scsi_Host *host) {
      * other phase and will have to source/sink data.
      * 
      * We really don't care what value was on the bus or what value
-     * the target see's, so we just handshake.
+     * the target sees, so we just handshake.
      */
     
     while (!(tmp = NCR5380_read(STATUS_REG)) & SR_REQ);
@@ -2310,7+2310,7 @@ static int NCR5380_transfer_dma (struct Scsi_Host *instance,
 #endif
        if (NCR5380_read(BUS_AND_STATUS_REG) & BASR_IRQ) {
 #if (NDEBUG & NDEBUG_C400_PWRITE)
-           printk("53C400w:    got it, reading reset interupt reg\n");
+           printk("53C400w:    got it, reading reset interrupt reg\n");
 #endif
            NCR5380_read(RESET_PARITY_INTERRUPT_REG);
        } else {
index fd87d23..fd0ccf8 100644 (file)
@@ -270,7+270,7 @@ struct NCR5380_hostdata {
     long time_read[8];                         /* time to do reads */
     long time_write[8];                                /* time to do writes */
     unsigned long bytes_read[8];               /* bytes read */
-    unsigned long bytes_write[8];              /* byytes written */
+    unsigned long bytes_write[8];              /* bytes written */
     unsigned pendingr;
     unsigned pendingw;
 #endif
index ef51411..f37de04 100644 (file)
 
 #define WATCHDOG 5000000
 
-#define SYNC_MODE 0            /* Synchrounous transfer mode */
+#define SYNC_MODE 0            /* Synchronous transfer mode */
 
 #if DEBUG
 #undef NCR53C406A_DEBUG
@@ -379,7+379,7 @@ static __inline__ int NCR53c406a_pio_read(unsigned char *request,
             len=128; break;
         }
         
-        if ((i & 0x40) && len == 0) { /* fifo empty and interrupt occured */
+        if ((i & 0x40) && len == 0) { /* fifo empty and interrupt occurred */
             return 0;
         }
         
@@ -911,7+911,7 @@ NCR53c406a_intr(int unused, void *dev_id, struct pt_regs *regs){
         
     case 0x02:                 /* COMMAND */
         current_SC->SCp.phase = command_ph;
-        printk("NCR53c406a: Warning: Unknown interupt occured in command phase!\n");
+        printk("NCR53c406a: Warning: Unknown interrupt occurred in command phase!\n");
         break;
         
     case 0x03:                 /* STATUS */
index 6bbead9..24f0c07 100644 (file)
@@ -23,7+23,7 @@ Copyright 1993, Drew Eckhardt
   drew@colorado.edu
   +1 (303) 666-5836
  
-The AM53C974_nobios_detect code was origininally developed by
+The AM53C974_nobios_detect code was originally developed by
 Robin Cutshaw (robin@xfree86.org) and is used here in a 
 slightly modified form.
  
@@ -69,7+69,7 @@ Features
 --------
 This driver supports asynchronous and synchronous SCSI-I and SCSI-II devices.
 It is capable of transfer rate and synchronous negotiation (see below).
-The driver supportes scatter-gather. Transfers are DMA based, but do not 
+The driver supports scatter-gather. Transfers are DMA based, but do not 
 (yet) make use of the AM53/79C974 MDL mode.
 Max. transfer rate is 10MHz (whatever this is in real life). The transfer
 rate is negotiated with each device (see dmesg output).
@@ -88,7+88,7 @@ SCSI device on the bus:
   - in case of sync. communication, the sync. offset
 
 The sync. offset specifies the number of bytes that can be sent or 
-reveived from the SCSI bus without ACK resp. REQ signal.
+received from the SCSI bus without ACK resp. REQ signal.
 CAUTION: USING SYNCHRONOUS MODE ON LONG SCSI CABLES MAY CAUSE 
          COMMUNICATION PROBLEMS LEADING TO LOSS OF DATA. 
 
@@ -149,7+149,7 @@ The driver assumes that the controller's SCSI-ID (usually 7) has been
 correctly loaded by the BIOS into the controller's register during
 system boot. If the driver detects that the controller's SCSI ID is not 
 '7' it will print out a warning. If this happens to you please correct
-seeting of the controller's SCSI-ID. If it is wrong, then edit the 
+setting of the controller's SCSI-ID. If it is wrong, then edit the 
 AM53C974_SCSI_ID definition in file AM53C974.h accordingly.
 
 
@@ -202,7+202,7 @@ catch the problem by pressing the 'r' key. The driver will automatically enter
 single-step mode if it has detected something weird.
 
 
-Author's Contact Adress
+Author's Contact Address
 -----------------------
 Email: fri@rsx42sun0.dofn.de
 Phone: x49-7545-2256 (office), x49-7541-42305 (home)
index 5e0d260..841ce92 100644 (file)
@@ -39,9+39,9 @@ hardware configuration.
 
 I have recently had conversations with the Senior Product Marketing Manager at
 BusLogic regarding the needs of free software developers, and he has reaffirmed
-BusLogic's committment to providing the technical information and support we
+BusLogic's commitment to providing the technical information and support we
 need to take full advantage of their products.  BusLogic has also been very
-accomodating in providing technical documentation, as well as access to their
+accommodating in providing technical documentation, as well as access to their
 engineering staff for technical questions and advice.  In addition, they have
 loaned me ISA cards for configuration testing, and even allowed me use of their
 technical support lab to test EISA configurations, since I don't have an EISA
@@ -210,7+210,7 @@ file "BusLogic.c".  The following examples may be useful as a starting point:
 
     This command line selects default probing and a concurrency of 1 which also
     disables tagged queuing.  It may be useful if problems arise during
-    installation on a system with a flakey SCSI configuration.  In cases of a
+    installation on a system with a flaky SCSI configuration.  In cases of a
     marginal SCSI configuration it may also be beneficial to disable fast
     transfers and/or synchronous negotiation using AutoSCSI on "C" series
     boards.  Disconnect/reconnect may also be disabled for fast devices such as
index 6c12b4e..ce50836 100644 (file)
@@ -1,4+1,4 @@
-REAME file for the Linux DTC3180/3280 scsi driver.
+README file for the Linux DTC3180/3280 scsi driver.
 by Ray Van Tassle (rayvt@comm.mot.com)  March 1996
 Based on the generic & core NCR5380 code by Drew Eckhard
 
index 7c19640..66f18a4 100644 (file)
@@ -36,7+36,7 @@ This driver provides some information on what it has detected in
 /proc/scsi/g_NCR5380/x where x is the scsi card number as detected at boot
 time. More info to come in the future.
 
-When NCR53c400 support is compiled in, BIOS paramaters will be returned by
+When NCR53c400 support is compiled in, BIOS parameters will be returned by
 the driver (the raw 5380 driver does not and I don't plan to fiddle with
 it!).
 
@@ -44,7+44,7 @@ This driver works as a module.
 
 Kevin Lentin
 K.Lentin@cs.monash.edu.au
-REAME file for the Linux g_NCR5380 driver.
+README file for the Linux g_NCR5380 driver.
 
 (c) 1993 Drew Eckhard
 NCR53c400 extensions (c) 1994,1995,1996 Kevin Lentin
@@ -82,7+82,7 @@ This driver provides some information on what it has detected in
 /proc/scsi/g_NCR5380/x where x is the scsi card number as detected at boot
 time. More info to come in the future.
 
-When NCR53c400 support is compiled in, BIOS paramaters will be returned by
+When NCR53c400 support is compiled in, BIOS parameters will be returned by
 the driver (the raw 5380 driver does not and I don't plan to fiddle with
 it!).
 
index 56b8be2..2e7d371 100644 (file)
@@ -2472,7+2472,7 @@ struct asc_stats {
        ulong   cont_xfer;              /* contiguous transfer total (512 byte units) */
        ulong   sg_cnt;                 /* # scatter-gather I/O requests received */
        ulong   sg_elem;                /* scatter-gather element total */
-       ulong   sg_xfer;                /* scatter-gather tranfer total (512 byte units) */
+       ulong   sg_xfer;                /* scatter-gather transfer total (512 byte units) */
        ulong   error;                  /* # AscExeScsiQueue() ASC_ERROR returns. */
        /*
         * Number of times interrupts disabled in advansys_queuecommand() and
@@ -2758,7+2758,7 @@ advansys_detect(Scsi_Host_Template *tpnt)
        if (detect_called == ASC_FALSE) {
                detect_called = ASC_TRUE;
        } else {
-               printk("AdvanSys SCSI: advansys_detect() mulitple calls ignored\n");
+               printk("AdvanSys SCSI: advansys_detect() multiple calls ignored\n");
                return 0;
        }
 
@@ -2780,7+2780,7 @@ advansys_detect(Scsi_Host_Template *tpnt)
         */
        if (asc_iopflag == ASC_TRUE) {
                for (ioport = 0; ioport < ASC_NUM_BOARD_SUPPORTED; ioport++) {
-                       ASC_DBG2(1, "asdvansys_detect: asc_ioport[%d] %x\n",
+                       ASC_DBG2(1, "advansys_detect: asc_ioport[%d] %x\n",
                                ioport, asc_ioport[ioport]);
                        if (asc_ioport[ioport] != 0) {
                                for (iop = 0; iop < ASC_IOADR_TABLE_MAX_IX; iop++) {
index c08467f..57e57aa 100644 (file)
@@ -348,8+348,8 @@ struct seeprom_config {
 /*
  * BIOS Control Bits
  */
-#define CFSUPREM       0x0001          /* support all removeable drives */
-#define CFSUPREMB      0x0002          /* support removeable drives for boot only */
+#define CFSUPREM       0x0001          /* support all removable drives */
+#define CFSUPREMB      0x0002          /* support removable drives for boot only */
 #define CFBIOSEN       0x0004          /* BIOS enabled */
 /* UNUSED              0x0008 */
 #define CFSM2DRV       0x0010          /* support more than two drives */
@@ -421,7+421,7 @@ struct seeprom_config {
   UNPAUSE_SEQUENCER(p);
 
 /*
- * If an error occurs during a data transfer phase, run the comand
+ * If an error occurs during a data transfer phase, run the command
  * to completion - it's easier that way - making a note of the error
  * condition in this location. This then will modify a DID_OK status
  * into an appropriate error for the higher-level SCSI code.
@@ -541,7+541,7 @@ static struct {
   const char *errmesg;
 } hard_error[] = {
   { ILLHADDR,  "Illegal Host Access" },
-  { ILLSADDR,  "Illegal Sequencer Address referrenced" },
+  { ILLSADDR,  "Illegal Sequencer Address referenced" },
   { ILLOPCODE, "Illegal Opcode in sequencer program" },
   { PARERR,    "Sequencer Ram Parity Error" }
 };
@@ -633,7+633,7 @@ struct aic7xxx_host_config {
 
 /*
  * Valid SCSIRATE values. (p. 3-17)
- * Provides a mapping of tranfer periods in ns to the proper value to
+ * Provides a mapping of transfer periods in ns to the proper value to
  * stick in the scsiscfr reg to use that transfer rate.
  */
 static struct {
@@ -952,7+952,7 @@ aic7xxx_delay(int seconds)
  *
  * Description:
  *   Return a string containing just the RCS version number from either
- *   an Id or Revison RCS clause.
+ *   an Id or Revision RCS clause.
  *-F*************************************************************************/
 const char *
 rcs_version(const char *version_info)
@@ -1517,7+1517,7 @@ aic7xxx_reset_device(struct aic7xxx_host *p, int target, char channel,
    * Go through the entire SCB array now and look for
    * commands for this target that are active.  These
    * are other (most likely tagged) commands that
-   * were disconnected when the reset occured.
+   * were disconnected when the reset occurred.
    */
   for (i = 0; i < p->numscb; i++)
   {
@@ -2235,7+2235,7 @@ aic7xxx_isr(int irq, void *dev_id, struct pt_regs * regs)
           int found;
 
           /*
-           * Go back to async/narrow transfers and renogiate.
+           * Go back to async/narrow transfers and renegotiate.
            */
           aic7xxx_unbusy_target(scsi_id, channel, base);
           p->needsdtr |= (p->needsdtr_copy & target_mask);
@@ -2641,7+2641,7 @@ aic7xxx_probe(int slot, int base)
  *   The DI_2840 bit of the STATUS_2840 is connected to the data in line
  *   of the serial EEPROM.  The EEPROM_TF bit of STATUS_2840 register is
  *   useful in that it gives us an 800 nsec timer.  After a read from the
- *   SEECTL_2840 register the timing flag is cleard and goes high 800 nsec
+ *   SEECTL_2840 register the timing flag is cleared and goes high 800 nsec
  *   later.
  *
  *-F*************************************************************************/
@@ -2784,7+2784,7 @@ read_2840_seeprom(int base, struct seeprom_config *sc)
  *     -------------------------------------------------------------------
  *     READ        1    10   A5 - A0             Reads data stored in memory,
  *                                               starting at specified address
- *     EWEN        1    00   11XXXX              Write enable must preceed
+ *     EWEN        1    00   11XXXX              Write enable must precede
  *                                               all programming modes
  *     ERASE       1    11   A5 - A0             Erase register A5A4A3A2A1A0
  *     WRITE       1    01   A5 - A0   D15 - D0  Writes register
@@ -3332,7+3332,7 @@ aic7xxx_register(Scsi_Host_Template *template,
 
   /*
    * For the 294x cards, clearing DIAGLEDEN and DIAGLEDON, will
-   * take the card out of diagnostic mode and make the host adatper
+   * take the card out of diagnostic mode and make the host adapter
    * LED follow bus activity (will not always be on).
    */
   outb(sblkctl & ~(DIAGLEDEN | DIAGLEDON), SBLKCTL + base);
@@ -3897,7+3897,7 @@ aic7xxx_detect(Scsi_Host_Template *template)
           }
 
           /*
-           * Read esundry information from PCI BIOS.
+           * Read sundry information from PCI BIOS.
            */
           error = pcibios_read_config_dword(pci_bus, pci_device_fn,
                                             PCI_BASE_ADDRESS_0, &io_port);
@@ -3918,7+3918,7 @@ aic7xxx_detect(Scsi_Host_Template *template)
           if((csize_lattime & LATTIME) == 0)
           {
             /* Default to 64 PCLKS (is this a good value?) */
-            /* This may also be availble in the SEEPROM?? */
+            /* This may also be available in the SEEPROM?? */
             csize_lattime |= (64 << 8);
           }
           pcibios_write_config_dword(pci_bus, pci_device_fn,
index 5561e6f..85d02eb 100644 (file)
@@ -49,10+49,10 @@ A = ACCUM
  * a later time.  This problem cannot be resolved by holding a single entry
  * in scratch ram since a reconnecting target can request sense and this will
  * create yet another SCB waiting for selection.  The solution used here is to 
- * use byte 27 of the SCB as a psuedo-next pointer and to thread a list
+ * use byte 27 of the SCB as a pseudo-next pointer and to thread a list
  * of SCBs that are awaiting selection.  Since 0-0xfe are valid SCB offsets, 
  * SCB_LIST_NULL is 0xff which is out of range.  The kernel driver must
- * add an entry to this list everytime a request sense occurs.  The sequencer
+ * add an entry to this list every time a request sense occurs.  The sequencer
  * will automatically consume the entries.
  */
 
@@ -91,7+91,7 @@ start2:
  * locks out on a per target basis instead of target/lun.  Although this
  * is not ideal for devices that have multiple luns active at the same
  * time, it is faster than looping through all SCB's looking for active
- * commands.  It may be benificial to make findscb a more general procedure
+ * commands.  It may be beneficial to make findscb a more general procedure
  * to see if the added cost of the search is negligible.  This code also 
  * assumes that the kernel driver will clear the active flags on board 
  * initialization, board reset, and a target SELTO.  Tagged commands
@@ -171,10+171,10 @@ start_selection:
        jmp     wait_for_selection
 
 mk_identify:
-       and     A,DISCENB,SCB_CONTROL   /* mask off disconnect privledge */
+       and     A,DISCENB,SCB_CONTROL   /* mask off disconnect privilege */
 
        and     MSG0,0x7,SCB_TCL        /* lun */
-       or      MSG0,A                  /* or in disconnect privledge */
+       or      MSG0,A                  /* or in disconnect privilege */
        or      MSG0,MSG_IDENTIFY
        mvi     MSG_LEN, 1
 
@@ -559,7+559,7 @@ mesgin_complete:
  * instead of always uploading the scb.  If the status is SCSI_CHECK,
  * the driver will download a new scb requesting sense to replace
  * the old one, modify the "waiting for selection" SCB list and set 
- * RETURN_1 to 0x80.  If RETURN_1 is set to 0x80 the sequencer imediately
+ * RETURN_1 to 0x80.  If RETURN_1 is set to 0x80 the sequencer immediately
  * jumps to main loop where it will run down the waiting SCB list.
  * If the kernel driver does not wish to request sense, it need
  * only clear RETURN_1, and the command is allowed to complete.  We don't 
@@ -575,7+575,7 @@ mesgin_complete:
  * alternatives are to pause the sequencer on all command completes (yuck),
  * dma the resid directly to the host (slick, we may have space to do it now)
  * or have the sequencer pause itself when it encounters a non-zero resid 
- * (unecessary pause just to flag the command -yuck-, but takes one instruction
+ * (unnecessary pause just to flag the command -yuck-, but takes one instruction
  * and since it shouldn't happen that often is good enough for our purposes).  
  */
 resid:
@@ -607,7+607,7 @@ test_immediate:
        test    SCB_CMDLEN,0xff jnz complete  /* Immediate message complete */
 /*
  * Pause the sequencer until the driver gets around to handling the command
- * complete.  This is so that any action that might require carefull timing
+ * complete.  This is so that any action that might require careful timing
  * with the completion of this command can occur.
  */
        mvi     INTSTAT,IMMEDDONE
@@ -731,7+731,7 @@ get_tag:
        mvi     ARG_1   call inb_next   /* tag value */
 /*
  * See if the tag is in range.  The tag is < SCBCOUNT if we add
- * the complement of SCBCOUNT to the incomming tag and there is
+ * the complement of SCBCOUNT to the incoming tag and there is
  * no carry.
  */
        mov     A,COMP_SCBCOUNT 
@@ -777,7+777,7 @@ p_busfree:
        mvi     CLRSINT1,CLRATNO
 
 /*
- * if this is an immediate command, perform a psuedo command complete to
+ * if this is an immediate command, perform a pseudo command complete to
  * notify the driver.
  */
        test    SCB_CMDLEN,0xff jz status_ok
@@ -1009,8+1009,8 @@ ndx_dtr_2:
  * If we need to negotiate transfer parameters, build the WDTR or SDTR message
  * starting at the address passed in SINDEX.  DINDEX is modified on return.
  * The SCSI-II spec requires that Wide negotiation occur first and you can
- * only negotiat one or the other at a time otherwise in the event of a message
- * reject, you wouldn't be able to tell which message was the culpret.
+ * only negotiate one or the other at a time otherwise in the event of a message
+ * reject, you wouldn't be able to tell which message was the culprit.
  */
 mk_dtr:
        test    SCB_CONTROL,NEEDWDTR jnz  mk_wdtr_16bit
index d8a7c55..c9c8d29 100644 (file)
 /*
  * This header is shared by the sequencer code and the kernel level driver.
  *
- * All page numbers refer to the Adaptec AIC-7770 Data Book availible from
+ * All page numbers refer to the Adaptec AIC-7770 Data Book available from
  * Adaptec's Technical Documents Department 1-800-934-2766
  */
 
 #define                P_STATUS        0xc0
 #define                P_MESGIN        0xe0
 /*
- * SCSI Contol Signal Write Register (p. 3-16).
+ * SCSI Control Signal Write Register (p. 3-16).
  * Writing to this register modifies the control signals on the bus.  Only
  * those signals that are allowed in the current mode (Initiator/Target) are
  * asserted.
 
 /*
  * SCSI Latched Data (p. 3-19).
- * Read/Write latchs used to transfer data on the SCSI bus during
+ * Read/Write latches used to transfer data on the SCSI bus during
  * Automatic or Manual PIO mode.  SCSIDATH can be used for the
- * upper byte of a 16bit wide asyncronouse data phase transfer.
+ * upper byte of a 16bit wide asynchronous data phase transfer.
  */
 #define SCSIDATL               0x006
 #define SCSIDATH               0x007
  * transfered on the SCSI bus.  They are counted up in the same
  * manner as STCNT is counted down.  SHADDR should always be used
  * to determine the address of the last byte transfered since HADDR
- * can be squewed by write ahead.
+ * can be skewed by write ahead.
  */
 #define        SHADDR                  0x014
 #define        SHADDR0                 0x014
  * Sequencer RAM Data (p. 3-34)
  * Single byte window into the Scratch Ram area starting at the address
  * specified by SEQADDR0 and SEQADDR1.  To write a full word, simply write
- * four bytes in sucessesion.  The SEQADDRs will increment after the most
+ * four bytes in succession.  The SEQADDRs will increment after the most
  * significant byte is written
  */
 #define SEQRAM                 0x061
 
 /*
  * Host Control (p. 3-47) R/W
- * Overal host control of the device.
+ * Overall host control of the device.
  */
 #define HCNTRL                 0x087
 /*    UNUSED                   0x80 */
 #define                        SEND_REJECT     0x11    /* sending a message reject */
 #define                        NO_IDENT        0x21    /* no IDENTIFY after reconnect*/
 #define                        NO_MATCH        0x31    /* no cmd match for reconnect */
-#define                        SDTR_MSG        0x41    /* SDTR message recieved */
-#define                        WDTR_MSG        0x51    /* WDTR message recieved */
-#define                        REJECT_MSG      0x61    /* Reject message recieved */
+#define                        SDTR_MSG        0x41    /* SDTR message received */
+#define                        WDTR_MSG        0x51    /* WDTR message received */
+#define                        REJECT_MSG      0x61    /* Reject message received */
 #define                        BAD_STATUS      0x71    /* Bad status from target */
 #define                        RESIDUAL        0x81    /* Residual byte count != 0 */
 #define                        ABORT_TAG       0x91    /* Sent an ABORT_TAG message */
 
 /*
  * Queue In FIFO (p. 3-60)
- * Input queue for queued SCBs (commands that the seqencer has yet to start)
+ * Input queue for queued SCBs (commands that the sequencer has yet to start)
  */
 #define QINFIFO                        0x09b
 
  * The two reserved bytes at SCBARRAY+1[23] are expected to be set to
  * zero. Bit 3 in SCBARRAY+0 is used as an internal flag to indicate
  * whether or not to DMA an SCB from host ram. This flag prevents the
- * "re-fetching" of transactions that are requed because the target is
+ * "re-fetching" of transactions that are requeued because the target is
  * busy with another command. We also use bits 6 & 7 to indicate whether
- * or not to initiate SDTR or WDTR repectively when starting this command.
+ * or not to initiate SDTR or WDTR respectively when starting this command.
  */
 #define SCBARRAY               0x0a0
 #define        SCB_CONTROL             0x0a0
 #define TARG_SCRATCH           0x020
 
 /*
- * The sequencer will stick the frist byte of any rejected message here so
+ * The sequencer will stick the first byte of any rejected message here so
  * we can see what is getting thrown away.
  */
 #define REJBYTE                        0x031
index 924d172..efb5565 100644 (file)
@@ -1057,7+1057,7 @@ short register_HBA(u32 base, struct get_conf *gc, Scsi_Host_Template * tpnt,
      */
     /*
      * If we are using a ISA board, we can't use extended SG,
-     * because we would need exessive amounts of memory for
+     * because we would need excessive amounts of memory for
      * bounce buffers.
      */
     if (gc->SG_64K == TRUE && ntohs(gc->SGsiz) == 64 && hd->bustype != IS_ISA){
index b4936a6..ce6a226 100644 (file)
@@ -57,7+57,7 @@ int eata_set_info(char *buffer, int length, struct Scsi_Host *HBA_ptr)
  * eata_proc_info
  * inout : decides on the direction of the dataflow and the meaning of the 
  *        variables
- * buffer: If inout==FALSE data is beeing written to it else read from it
+ * buffer: If inout==FALSE data is being written to it else read from it
  * *start: If inout==FALSE start of the valid data in the buffer
  * offset: If inout==FALSE offset from the beginning of the imaginary file 
  *        from which we start writing into the buffer
@@ -99,7+99,7 @@ int eata_proc_info(char *buffer, char **start, off_t offset, int length,
        HBA_ptr = SD(HBA_ptr)->next;
     }       
 
-    if(inout == TRUE) /* Has data been writen to the file ? */ 
+    if(inout == TRUE) /* Has data been written to the file ? */ 
        return(eata_set_info(buffer, length, HBA_ptr));
 
     if (offset == 0)
index 94f429d..e48b3b0 100644 (file)
@@ -511,7+511,7 @@ int eata_pio_reset(Scsi_Cmnd * cmd)
        sp->result = DID_RESET << 16;
        
        /* This mailbox is terminated */
-       printk("eata_pio_reset: resetted ccb %d.\n",x);
+       printk("eata_pio_reset: reset ccb %d.\n",x);
        HD(cmd)->ccb[x].status = FREE;
        
        restore_flags(flags);
index b548009..8a7ed4a 100644 (file)
@@ -30,7+30,7 @@ int eata_pio_set_info(char *buffer, int length, struct Scsi_Host *HBA_ptr)
  * eata_proc_info
  * inout : decides on the direction of the dataflow and the meaning of the 
  *         variables
- * buffer: If inout==FALSE data is beeing written to it else read from it
+ * buffer: If inout==FALSE data is being written to it else read from it
  * *start: If inout==FALSE start of the valid data in the buffer
  * offset: If inout==FALSE offset from the beginning of the imaginary file 
  *         from which we start writing into the buffer
@@ -56,7+56,7 @@ int eata_pio_proc_info(char *buffer, char **start, off_t offset, int length,
        HBA_ptr = SD(HBA_ptr)->next;
     }        
 
-    if(inout == TRUE) /* Has data been writen to the file ? */ 
+    if(inout == TRUE) /* Has data been written to the file ? */ 
        return(eata_pio_set_info(buffer, length, HBA_ptr));
 
     if (offset == 0)
index 4992f4d..b863bf2 100644 (file)
  Thanks to Adam Bowen for the signature to the 1610M/MER/MEX scsi cards, to
  Martin Andrews (andrewm@ccfadm.eeg.ccf.org) for the signature to some
  random TMC-1680 repackaged by IBM; and to Mintak Ng (mintak@panix.com) for
- the version 3.61 BIOS siganture.
+ the version 3.61 BIOS signature.
 
  Thanks for Mark Singer (elf@netcom.com) and Richard Simpson
  (rsimpson@ewrcsdra.demon.co.uk) for more Quantum signatures and detective
@@ -1146,7+1146,7 @@ const char *fdomain_16x0_info( struct Scsi_Host *ignore )
 /*
  * inout : decides on the direction of the dataflow and the meaning of the 
  *         variables
- * buffer: If inout==FALSE data is beeing written to it else read from it
+ * buffer: If inout==FALSE data is being written to it else read from it
  * *start: If inout==FALSE start of the valid data in the buffer
  * offset: If inout==FALSE offset from the beginning of the imaginary file 
  *         from which we start writing into the buffer
index 9fd70d2..414fc70 100644 (file)
@@ -148,7+148,7 @@ static void internal_setup(int board, char *str, int *ints) {
  *
  * Purpose : LILO command line initialization of the overrides array,
  * 
- * Inputs : str - unused, ints - array of integer paramters with ints[0] 
+ * Inputs : str - unused, ints - array of integer parameters with ints[0] 
  *     equal to the number of ints.
  */
 
@@ -161,7+161,7 @@ void generic_NCR5380_setup (char *str, int *ints) {
  *
  * Purpose : LILO command line initialization of the overrides array,
  * 
- * Inputs : str - unused, ints - array of integer paramters with ints[0] 
+ * Inputs : str - unused, ints - array of integer parameters with ints[0] 
  *     equal to the number of ints.
  */
 
@@ -260,13+260,13 @@ int generic_NCR5380_release_resources(struct Scsi_Host * instance)
 /*
  * Function : int generic_NCR5380_biosparam(Disk * disk, kdev_t dev, int *ip)
  *
- * Purpose : Generates a BIOS / DOS compatable H-C-S mapping for 
+ * Purpose : Generates a BIOS / DOS compatible H-C-S mapping for 
  *     the specified device / size.
  * 
  * Inputs : size = size of device in sectors (512 bytes), dev = block device
  *     major / minor, ip[] = {heads, sectors, cylinders}  
  *
- * Returns : allways 0 (success), initializes ip
+ * Returns : always 0 (success), initializes ip
  *     
  */
 
@@ -375,7+375,7 @@ static inline int NCR5380_pread (struct Scsi_Host *instance, unsigned char *dst,
        printk("53C400r: no 53C80 gated irq after transfer");
 #if (NDEBUG & NDEBUG_C400_PREAD)
     else
-       printk("53C400r: Got 53C80 interupt and tried to clear it\n");
+       printk("53C400r: Got 53C80 interrupt and tried to clear it\n");
 #endif
 
 /* DON'T DO THIS - THEY NEVER ARRIVE!
@@ -499,7+499,7 @@ static inline int NCR5380_pwrite (struct Scsi_Host *instance, unsigned char *src
      */
     if (i) {
 #if (NDEBUG & NDEBUG_C400_PWRITE)
-       prink("53C400w: got 53C80 gated irq (last block)\n");
+       printk("53C400w: got 53C80 gated irq (last block)\n");
 #endif
        if (!((i=NCR5380_read(BUS_AND_STATUS_REG)) & BASR_END_DMA_TRANSFER))
            printk("53C400w: No END OF DMA bit - WHOOPS! BASR=%0x\n",i);
index 9100310..0cc8d85 100644 (file)
@@ -2989,7+2989,7 @@ static int scsi_register_device_module(struct Scsi_Device_Template * tpnt)
        if(tpnt->attach)  (*tpnt->attach)(SDpnt);
        /*
         * If this driver attached to the device, and we no longer
-        * have anything attached, release the scso command blocks.
+        * have anything attached, release the scsi command blocks.
         */
        if(SDpnt->attached && SDpnt->has_cmdblocks == 0)
            scsi_build_commandblocks(SDpnt);
index 6ee0352..c9196f5 100644 (file)
@@ -118,7+118,7 @@ static int sd_open(struct inode * inode, struct file * filp)
        }
 
        /*
-        * Similarily, if the device has the write protect tab set,
+        * Similarly, if the device has the write protect tab set,
         * have the open fail if the user expects to be able to write
         * to the thing.
         */
@@ -1168,7+1168,7 @@ static int sd_init_onedisk(int i)
        for (m=i<<4; m<((i+1)<<4); m++){
            sd_hardsizes[m] = hard_sector;
        }
-        mb = (hard_sector * rscsi_disks[i].capacity) / (1024*1024);
+        mb = rscsi_disks[i].capacity / 1024 * hard_sector / 1024;
         /* sz = div(m/100, 10);  this seems to not be in the libr */
         m = (mb + 50) / 100;
         sz_quot = m / 10;
index a8ad222..f7a9ea8 100644 (file)
@@ -294,7+294,7 @@ static void rw_intr (Scsi_Cmnd * SCpnt)
 /*
  * Here I tried to implement support for multisession-CD's
  * 
- * Much of this has do be done with vendor-specific SCSI-commands, becauce
+ * Much of this has do be done with vendor-specific SCSI-commands, because
  * multisession is newer than the SCSI-II standard.
  * So I have to complete it step by step. Useful information is welcome.
  *
index c0e80f8..8362bc6 100644 (file)
@@ -3,7+3,7 @@
  *
  *      13 Jun 1995 rev. 2.01 for linux 1.2.10
  *         HAVE_OLD_UX4F_FIRMWARE should be defined for U34F boards when
- *         the firmware prom is not the lastest one (28008-006).
+ *         the firmware prom is not the latest one (28008-006).
  *
  *      11 Mar 1995 rev. 2.00 for linux 1.2.0
  *          Fixed a bug which prevented media change detection for removable
index 3da55a9..6acd80d 100644 (file)
@@ -4,7+4,7 @@ Changelog for version 3.5.2
 Since 3.5.1
 - TB Maui initialization support
 Since 3.5
-- Improved handling of playback underrunt situations.
+- Improved handling of playback underrun situations.
 
 Since 3.5-beta10
 - Bug fixing
@@ -82,7+82,7 @@ configure to handle this.
 modularized version. They can be enabled by using init_trace=1 in
 the insmod command line (insmod sound init_trace=1).
 - More AIX stuff.
-- Added support for syncronizing dsp/audio devices with /dev/sequencer.
+- Added support for synchronizing dsp/audio devices with /dev/sequencer.
 - mmap() support for dsp/audio devices.
 
 Since 3.5-alpha5
@@ -106,13+106,13 @@ Since 3.5-alpha2
 - Fixed random protection fault in gus_wave.c
 
 Since 3.5-alpha1
-- Modified to work with Linux-1.3.33 and leater
+- Modified to work with Linux-1.3.33 and later
 - Some minor changes
 
 Since 3.0.2
 - Support for CS4232 based PnP cards (AcerMagic S23 etc).
 - Full duplex support for some CS4231, CS4232 and AD1845 based cards
-(GUA MAX, AudioTrix Pro, AcerMagic S23 and many MAD16/Mozart cards
+(GUS MAX, AudioTrix Pro, AcerMagic S23 and many MAD16/Mozart cards
 having a codec mentioned above).
 - Almost fully rewritten loadable modules support.
 - Fixed some bugs.
index 447e82f..105eedf 100644 (file)
@@ -2,7+2,7 @@
 # Sound driver configuration
 #
 #--------
-# There is another confic script which is compatible with rest of
+# There is another config script which is compatible with rest of
 # the kernel. It can be activated by running 'make mkscript' in this
 # directory. Please note that this is an _experimental_ feature which
 # doesn't work with all cards (PSS, SM Wave, AudioTriX Pro).
index 447e82f..105eedf 100644 (file)
@@ -2,7+2,7 @@
 # Sound driver configuration
 #
 #--------
-# There is another confic script which is compatible with rest of
+# There is another config script which is compatible with rest of
 # the kernel. It can be activated by running 'make mkscript' in this
 # directory. Please note that this is an _experimental_ feature which
 # doesn't work with all cards (PSS, SM Wave, AudioTriX Pro).
index a78dbc3..da6691e 100644 (file)
@@ -23,7+23,7 @@ It's very likely that this driver version is incompatible with
 Linux versions later than 2.x.
 
 Packages "snd-util-3.5.tar.gz" and "snd-data-0.1.tar.Z"
-contain usefull utilities to be used with this driver.
+contain useful utilities to be used with this driver.
 
 If you are looking for the installation instructions, please
 look at Readme.linux.
@@ -40,7+40,7 @@ Contributors
 ------------
 
 This driver contains code by several contributors. In addition several other
-persons have given usefull suggestions. The following is a list of major
+persons have given useful suggestions. The following is a list of major
 contributors. (I could have forgotten some names.)
 
        Craig Metz      1/2 of the PAS16 Mixer and PCM support
@@ -72,7+72,7 @@ contributors. (I could have forgotten some names.)
        Riccardo Facchetti Audio Excel DSP 16 (aedsp16) support
        James Hightower Spotting a tiny but important bug in CS423x support.
 
-There are propably many other names missing. If you have sent me some
+There are probably many other names missing. If you have sent me some
 patches and your name is not in the above list, please inform me.
 
 Sponsors etc.
@@ -87,7+87,7 @@ Ensoniq Corp,         a SoundScape card and extensive amount of assistance
 MediaTriX Peripherals Inc, a AudioTriX Pro card + SDK
 Acer, Inc.             a pair of AcerMagic S23 cards.
 
-In addition the following companies have provided me sufficial amount
+In addition the following companies have provided me sufficient amount
 of technical information at least some of their products (free or $$$):
 
 Advanced Gravis Computer Technology Ltd.
@@ -119,7+119,7 @@ If you get an error message when trying to use the driver, please look
 at /var/adm/messages for more verbose error message.
 
 
-In general the easiest way to diagnoze problems is to do "cat /dev/sndstat".
+In general the easiest way to diagnose problems is to do "cat /dev/sndstat".
 
 If you get an error message, there are some problems with the driver setup:
 
@@ -127,7+127,7 @@ If you get an error message, there are some problems with the driver setup:
        the sound driver are missing. Use the script at the end of
        linux/drivers/sound/Readme.linux to create them.
 
-       - "No such device" telss that the sound driver is not in the kernel.
+       - "No such device" shows that the sound driver is not in the kernel.
        You have to reconfigure and recompile the kernel to have the sound
        driver. Compiling the driver doesn't help alone. You have to boot
        with the newly compiled one before the driver becomes active.
@@ -142,7+142,7 @@ The following errors are likely with /dev/dsp and /dev/audio.
        this particular device. For example /dev/audio and /dev/dsp will not
        work if "digitized voice support" was not enabled during "make config".
        
-       - "Device or resource busy". Propably the IRQ (or DMA) channel 
+       - "Device or resource busy". Probably the IRQ (or DMA) channel 
        required by the soundcard is in use by some other device/driver.
 
        - "I/O error". Almost certainly (99%) it's an IRQ or DMA conflict.
index 720a6f4..88317e6 100644 (file)
@@ -17,13+17,13 @@ mail me and ask about these cards. The unsupported cards are:
 
        - All PnP soundcards (SB PnP, GUS PnP, Soundscape PnP etc.)
                (SB PnP in first 3.6-alpha version (Apr 96?), GUS PnP bit later,
-               Soundscape PnP propably much later, others ???). See
+               Soundscape PnP probably much later, others ???). See
                "Configuring PnP soundcards" below for some hints.
        - Mwave soundcards and motherboards
                (Version 3.6 or 3.7. Depends on how fast I get a Mwave
                card and suitable documents for it).
        - Emu8k (SB 32/AWE)
-               (Propably not before Nov/Dec 96. I know the unofficial
+               (Probably not before Nov/Dec 96. I know the unofficial
                AWE programmers guide so don't send me more copies of it).
        - Diamond Edge 3D
                (ASAP. In practice this may take relatively long time).
@@ -52,7+52,7 @@ New versions of most soundcards use so called ISA PnP protocol for
 soft configuring their I/O, IRQ, DMA and shared memory resources.
 Currently at least cards made by Creative Technology (SB32 and SB32AWE
 PnP), Gravis (GUS PnP and GUS PnP Pro), Ensoniq (Soundscape PnP) and
-Aztech (some Sound Galazy models) use PnP technology. The CS4232 audio
+Aztech (some Sound Galaxy models) use PnP technology. The CS4232 audio
 chip by Crystal Semiconductor (Intel Atlantis, HP Pavillon and many other
 motherboards) is also based on PnP technology but there is a "native" driver
 available for it (see information about CS4232 later in this document).
@@ -76,7+76,7 @@ DOS. The hard part is to find which settings were used. See documentation of
 your card for more info.
 
 Windows 95 could work as well as DOS but running loadlin may be somehow 
-difficult. Propably you should "shut down" your machine to MS-DOS mode
+difficult. Probably you should "shut down" your machine to MS-DOS mode
 before running it.
 
 Some machines have BIOS utility for setting PnP resources. This is a good
@@ -253,14+253,14 @@ are software configurable. Sometimes there are few other jumpers too.
 Latest cards are fully software configurable or they are PnP ISA
 compatible. There are no jumpers on the board.
 
-The driver handles software configurable cards automaticly. Just configure
+The driver handles software configurable cards automatically. Just configure
 the driver to use I/O, IRQ and DMA settings which are known to work.
 You could usually use the same values than with DOS and/or Windows.
 Using different settings is possible but not recommended since it may cause
 some trouble (for example when warm booting from an OS to another or
 when installing new hardware to the machine).
 
-Sound driver sets the soft configurable parameters of the card automaticly
+Sound driver sets the soft configurable parameters of the card automatically
 during boot. Usually you don't need to run any extra initialization
 programs when booting Linux but there are some exceptions. See the
 card specific instructions (below) for more info.
@@ -357,8+357,8 @@ questions. The default answer is shown so that (y/n) means 'y' by default and
 since using the default _doesn't_ guarantee anything.
 
 Note also that all questions may not be asked. The configuration program
-may disable some questions dependig on the earlier choices. It may also
-select some options automaticly as well.
+may disable some questions depending on the earlier choices. It may also
+select some options automatically as well.
 
   "ProAudioSpectrum 16 support",
        - Answer 'y'_ONLY_ if you have a Pro Audio Spectrum _16_,
@@ -396,7+396,7 @@ select some options automaticly as well.
        - Be careful with this question. The MPU401 interface is supported
          by almost any soundcard today. However some natively supported cards
          have their own driver for MPU401. Enabling the MPU401 option with
-         these cards wil cause a conflict. Also enabling MPU401 on a system
+         these cards will cause a conflict. Also enabling MPU401 on a system
          that doesn't really have a MPU401 could cause some trouble. If your
          card was in the list of supported cards (above), please look at
          the card specific instructions later in this file.
@@ -422,11+422,11 @@ select some options automaticly as well.
          Also you may answer 'y' in case your card was not listed earlier
          in this file. For cards having native support in the driver, consult
          the card specific instructions later in this file. Some drivers
-         have their own MSS support and enabling this option wil cause a
+         have their own MSS support and enabling this option will cause a
          conflict.
   "Ensoniq Soundscape support",
        - Answer 'y' if you have a soundcard based on the Ensoniq SoundScape
-         chipset. Suach cards are being manufactured at least by Ensoniq,
+         chipset. Such cards are being manufactured at least by Ensoniq,
          Spea and Reveal (note that Reveal makes other cards also).
   "MediaTriX AudioTriX Pro support",
        - Answer 'y' if you have the AudioTriX Pro.
@@ -438,7+438,7 @@ select some options automaticly as well.
          cards made by known manufacturers such as Turtle Beach (Tropez),
          Reveal (some models) and Diamond (some recent models).
   "Support for TB Maui"
-       - This enables TB Maui spesific initialization. Works with TB Maui
+       - This enables TB Maui specific initialization. Works with TB Maui
        and TB Tropez (may not work with Tropez Plus).
 
   "Audio Excel DSP 16 initialization support",
@@ -521,7+521,7 @@ hardware initialization before they become SB compatible. Check if your card
 was listed in the beginning of this file. In this case you should follow
 instructions for your card later in this file.
 
-For other not fully SB clones yoy may try initialization using DOS in
+For other not fully SB clones you may try initialization using DOS in
 the following way:
 
        - Boot DOS so that the card specific driver gets run.
@@ -616,7+616,7 @@ Again. Don't enable these options in case your card is listed
 somewhere else in this file.
 
 Configuring these cards is obvious (or it should be). With MSS
-you should propably enable the OPL3 synth also since
+you should probably enable the OPL3 synth also since
 most MSS compatible cards have it. However check that this is true
 before enabling OPL3.
 
@@ -663,10+663,10 @@ to the native AudioTriX driver. Don't enable MSS or MPU drivers.
 
 Configuring ATP is little bit tricky since it uses so many I/O, IRQ and
 DMA numbers. Using the same values than with DOS/Win is a good idea. Don't
-attemp to use the same IRQ or DMA channels twice.
+attempt to use the same IRQ or DMA channels twice.
 
 The SB mode of ATP is implemented so the the ATP driver just enables SB
-in the proper address. The SB driver handles the rest. Yoy have to configure
+in the proper address. The SB driver handles the rest. You have to configure
 both the SB driver and the SB mode of ATP to use the same IRQ, DMA and I/O
 settings.
 
@@ -738,7+738,7 @@ dangerous as long as you don't try to use a file called sndscape.cod.
 If you have initialized the card using a wrong microcode file (sounds
 are terrible), just modify ssinit.c to use another microcode file and try
 again. It's possible to use an earlier version of sndscape.co[01] but it
-may sound wierd.
+may sound weird.
 
 MAD16 (Pro) and Mozart
 ----------------------
@@ -765,8+765,8 @@ Sound System. Current driver versions set volume of line3 low enough so
 this should not be a problem.
 
 If you have a MAD16 card which have an OPL4 (FM + Wave table) synthesizer
-chip (_not_ an OPL3), you have to apped line containing #define MAD16_OPL4
-to the file linux/dirvers/sound/local.h (after running make config).
+chip (_not_ an OPL3), you have to append line containing #define MAD16_OPL4
+to the file linux/drivers/sound/local.h (after running make config).
 
 MAD16 cards having a CS4231 codec support full duplex mode. This mode
 can be enabled by configuring the card to use two DMA channels. Possible
@@ -785,12+785,12 @@ The Jazz16 driver uses the MPU401 driver in a way which will cause
 problems if you have another MPU401 compatible card. In this case you must
 give address of the Jazz16 based MPU401 interface when the config
 program prompts for the MPU401 information. Then look at the MPU401
-spesific section for instructions about configuring more than one MPU401 cards.
+specific section for instructions about configuring more than one MPU401 cards.
 
 Logitech Soundman Wave
 ----------------------
 
-Read the above MV Jazz spesific instructions first.
+Read the above MV Jazz specific instructions first.
 
 The Logitech SoundMan Wave (don't confuse with the SM16 or SM Games) is
 a MV Jazz based card which has an additional OPL4 based wave table
@@ -810,7+810,7 @@ versions (pre 3.5-alpha8)).
 
 NOTE!  Don't answer 'y' when the driver asks about SM Games support
        (the next question after the MIDI0001.BIN name). However
-       aneswering 'y' doesn't cause damage your computer so don't panic. 
+       answering 'y' doesn't cause damage your computer so don't panic. 
 
 Sound Galaxies
 --------------
@@ -821,7+821,7 @@ with them.
 
 The older 16 bit cards (SG Pro16, SG NX Pro16, Nova and Lyra) have
 an EEPROM chip for storing the configuration data. There is a microcontroller
-which initializes the card to match the EEPROM settigs when the machine
+which initializes the card to match the EEPROM settings when the machine
 is powered on. These cards actually behave just like they have jumpers
 for all of the settings. Configure driver for MSS, MPU, SB/SB Pro  and OPL3 
 supports with these cards. 
@@ -839,7+839,7 @@ ESS ES1688 and ES688 'AudioDrive' based cards
 Support for these two ESS chips is embedded in the SB Pro driver.
 Configure these cards just like SB Pro. Enable the 'SB MPU401 MIDI port'
 if you want to use MIDI features of ES1688. ES688 doesn't have MPU mode
-so you don't need to enable it (the driver uses normal SB MIDI automaticly
+so you don't need to enable it (the driver uses normal SB MIDI automatically
 with ES688).
 
 NOTE! ESS cards are not compatible with MSS/WSS.
@@ -899,13+899,13 @@ in "cat /dev/sndstat" printout and in file linux/drivers/sound/soundvers.h.
 First of all. There is an easy way to make most soundcards to work
 with Linux. Just use the DOS based driver to initialize the card
 to a _known_ state. Then use loadlin.exe to boot Linux. If Linux is configured
-to use the sama I/O, IRQ and DMA numbers than DOS, the card could work.
+to use the same I/O, IRQ and DMA numbers than DOS, the card could work.
 (ctrl-alt-del can be used in place of loadlin.exe but it doesn't work with
 new motherboards). This method works also with all/most PnP soundcards.
 
 Don't get fooled with SB compatibility. Most cards are compatible with
 SB but that may require a TSR which is not possible with Linux. If
-the card is compatible with MSS, it's a better choise. Some cards
+the card is compatible with MSS, it's a better choice. Some cards
 don't work in the SB and MSS modes at the same time.
 
 Then there are cards which are no longer manufactured and/or which
@@ -914,7+914,7 @@ models). It's extremely unlikely that such cards never get supported.
 Adding support for a new card requires much work and increases time
 required in maintaining the driver (some changes need to be done
 to all low level drivers and be tested too, maybe with multiple
-operating systems). For this reason I have made a desicion to not support
+operating systems). For this reason I have made a decision to not support
 obsolete cards. It's possible that someone else makes a separately 
 distributed driver (diffs) for the card. Version v3.6 will be much more
 modular so making separately distributed drivers will be easier with it.
@@ -928,12+928,12 @@ manufacturer of the card and ask if they have (or are willing to)
 released technical details of the card. Do this before contacting me. I
 can only answer 'no' if there are no programming information available.
 
-I have made decicion to not accept code based on reverse engineering
+I have made decision to not accept code based on reverse engineering
 to the driver. There are three main reasons: First I don't want to break
 relationships to sound card manufacturers. The second reason is that
-maintaining and supporting a driver withoun any specs will be a pain.
+maintaining and supporting a driver without any specs will be a pain.
 The third reason is that companies have freedom to refuse selling their
-products to other than Windows useres.
+products to other than Windows users.
 
 Some companies don't give low level technical information about their
 products to public or at least their require signing a NDA. It's not
index c429d19..8e1314b 100644 (file)
@@ -19,7+19,7 @@ IMPORTANT!    Read this if you are installing a separately
   sources). Remove old version of linux/drivers/sound directory before
   installing new files.
 
-- To build the device files you need to run the enclosed shell scrip 
+- To build the device files you need to run the enclosed shell script 
   (see below). You need to do this only when installing sound driver
   first time or when upgrading to much recent version than the earlier
   one.
@@ -27,13+27,13 @@ IMPORTANT!  Read this if you are installing a separately
 - Configure and compile Linux as normally (remember to include the
   sound support during "make config"). Please refer to kernel documentation
   for instructions about configuring and compiling kernel. File Readme.cards
-  contains card spesific instructions for configuring this driver for
+  contains card specific instructions for configuring this driver for
   use with various soundcards.
 
 Boot time configuration (using lilo and insmod) 
 -----------------------------------------------
 
-This information has been removed. Too many users did't believe
+This information has been removed. Too many users didn't believe
 that it's really not necessary to use this method. Please look at
 Readme of sound driver version 3.0.1 if you still want to use this method.
 
@@ -46,7+46,7 @@ command:
 
        cat /dev/sndstat 
 
-and look at the output. It should display some usefull info about the
+and look at the output. It should display some useful info about the
 driver configuration. If there is no /dev/sndstat 
 (/dev/sndstat: No such file or directory), ensure that you have executed the
 soundinstall script (at the end of this file).
@@ -75,7+75,7 @@ hannu@voxware.pp.fi
 ----------------- cut here ------------------------------
 #!/bin/sh
 #
-#      soudinstall             
+#      soundinstall            
 #
 #
 # Create the devices
index 7fa6a27..f448e64 100644 (file)
@@ -45,10+45,10 @@ For example:
 
        insmod sound dma_buffsize=32768
 
-Minimum buffer size is 4096 and the maximum depends on the DMA channe. 
+Minimum buffer size is 4096 and the maximum depends on the DMA channel
 For 8 bit channels (0 to 3) the limit is 64k and for 16 bit ones (5 to 7)
-it's 128k. Driver selects a suitable buffer size automaticly in case
-you try to spesify an invalid size.
+it's 128k. Driver selects a suitable buffer size automatically in case
+you try to specify an invalid size.
 
 Q: What is the right DMA buffer size?
 
@@ -58,17+58,17 @@ audio or when there are other processes running on the same system. Also
 recording to hard disk is likely to require large buffers.
 
 Very small buffers are sufficient when you are just playing 8kHz audio files 
-on an empty P133 system. Using a 128k byffer just wastes 120k (or 250k)
+on an empty P133 system. Using a 128k buffer just wastes 120k (or 250k)
 of valuable physical RAM memory. 
 
-The right buffer sice can be easily found by making some experiments
+The right buffer size can be easily found by making some experiments
 with the dma_buffsize= parameter. I use usually 16k buffers on a DX4/100 system
 and 64k on an old 386 system. 
 
 NOTE!  DMA buffers are used only by /dev/audio# and /dev/dsp# devices.
        Other device files don't use them but there are two exceptions:
        GUS driver uses DMA buffers when loading samples to the card.
-       Ensoniq SoundScape driver uses them when doanloading the microcode
+       Ensoniq SoundScape driver uses them when downloading the microcode
        file (sndscape.co[012]) to the card. Using large buffers doesn't
        increase performance in these cases.
 
@@ -85,7+85,7 @@ Look at Readme.linux for more info.
 
 NOTE!  This method is not normally required. You should use it only when
        you have to use different configuration than normally. The sound=
-       command line parameter is error phrone and not recommended.
+       command line parameter is error prone and not recommended.
 
 Debugging and tracing
 ---------------------
index ee35248..82540d4 100644 (file)
@@ -18,7+18,7 @@ applications like sequencers.
 /dev/midi##
 -----------
 
-This interface should be usefull for applications like MIDI sysex librarians.
+This interface should be useful for applications like MIDI sysex librarians.
 There are (currently) no timing features so making music could be impossible.
 
 There are as many /dev/midi## devices as there are MIDI ports in the system. 
@@ -53,7+53,7 @@ It's not available for the so called MPU UART ports of some soundcards
 If this ioctl is called with mode=1, the interface is put to the intelligent
 (coprocessor) mode. NOTE! The MIDI port will be reset when this ioctl is called.
 It could have some strange effects if not called immediately after open. This
-vall returns EINVAL if the midi port doesn't support the MPU-401 intelligent
+call returns EINVAL if the midi port doesn't support the MPU-401 intelligent
 mode.
 
 ioctl(fd, SNDCTL_MIDI_MPUCMD, &cmdstruct) is valid only if the MIDI port
@@ -81,10+81,10 @@ where:
        data            Buffer for the command arguments and returned
                        data.
 
-Be extremely carefull with the nr_args and nr_returns fields. They
+Be extremely careful with the nr_args and nr_returns fields. They
 must match the command. An incorrect value will put the card and
 the driver out of sync. Refer to the MPU-401/MQX-32M documentation for further
-datails.
+details.
 
 
 
@@ -99,7+99,7 @@ the result is somewhere between the MIDI specification and the synth devices of
 /dev/sequencer. Both kind of devices are accessed using the SEQ_START_NOTE()
 like macros. The voice number parameters of the API macros have been redefined
 to denote MIDI channels. This means that the driver allocates voices for
-the channels automaticly (this is a responsibility/right of an application
+the channels automatically (this is a responsibility/right of an application
 with /dev/sequencer). The result is that a SEQ_START_NOTE() macro has
 similar effects for a synth channel than on a MIDI port. This kind of
 solution provides better device independence than the /dev/sequencer. The
@@ -116,12+116,12 @@ return sum of internal synthesizers (GUS, OPL3) and MIDI ports in the systems.
 
 - The new interface is used much like the ordinary /dev/sequencer. The
 event format is new so you have to use the API macros defined in the 
-sys/soundcard.h. The interface is will propably change before the final 3.0
+sys/soundcard.h. The interface is will probably change before the final 3.0
 release but using the API macros should ensure compatibility in source level.
 The new event format is not recognized by version 2.X so don't try to 
 distribute binaries compiled with soundcard.h of v3.X.
 
-- The basic API useage is similar to the current one. There are some new
+- The basic API usage is similar to the current one. There are some new
 macros but the older ones should work as earlier. The most important
 incompatibility is that the /dev/sequencer2 driver allocates voices itself.
 The other one is that the application must send SEQ_START_TIMER() as it's
index bb5fc70..307f7eb 100644 (file)
@@ -624,7+624,7 @@ static int
 set_speed (ad1848_info * devc, int arg)
 {
   /*
-     * The sampling speed is encoded in the least significant nible of I8. The
+     * The sampling speed is encoded in the least significant nibble of I8. The
      * LSB selects the clock source (0=24.576 MHz, 1=16.9344 Mhz) and other
      * three bits select the divisor (indirectly):
      *
@@ -992,7+992,7 @@ ad1848_prepare_for_IO (int dev, int bsize, int bcount)
 
   ad_write (devc, 8, fs);
   /*
-   * Write to I8 starts resyncronization. Wait until it completes.
+   * Write to I8 starts resynchronization. Wait until it completes.
    */
   timeout = 10000;
   while (timeout > 0 && inb (devc->base) == 0x80)
@@ -1006,7+1006,7 @@ ad1848_prepare_for_IO (int dev, int bsize, int bcount)
       ad_write (devc, 28, fs);
 
       /*
-         * Write to I28 starts resyncronization. Wait until it completes.
+         * Write to I28 starts resynchronization. Wait until it completes.
        */
       timeout = 10000;
       while (timeout > 0 && inb (devc->base) == 0x80)
@@ -1588,7+1588,7 @@ ad1848_unload (int io_base, int irq, int dma_playback, int dma_capture, int shar
        }
     }
   else
-    printk ("ad1848: Can't find device to be undoaded. Base=%x\n",
+    printk ("ad1848: Can't find device to be unloaded. Base=%x\n",
            io_base);
 }
 
@@ -1871,7+1871,7 @@ ad1848_tmr_start (int dev, unsigned int usecs)
 {
   unsigned long   flags;
   ad1848_info    *devc = (ad1848_info *) audio_devs[dev]->devc;
-  unsigned long   xtal_nsecs;  /* nanoseconds per xtal oscillaror tick */
+  unsigned long   xtal_nsecs;  /* nanoseconds per xtal oscillator tick */
   unsigned long   divider;
 
   save_flags (flags);
index c85d22b..d49c138 100644 (file)
    I think the request regions should be done this way:
 
    if (check_region(...))
-   return ERR; // I/O region alredy reserved
+   return ERR; // I/O region already reserved
    device_probe(...);
    device_attach(...);
    request_region(...); // reserve only when we are sure all is okay
    Request the 2x0h region in any case if we are using this card.
 
    NOTE: the "(sbpro)" string with which we are requesting the aedsp16 region
-   (see code) does not mean necessarly that we are emulating sbpro.
+   (see code) does not mean necessarily that we are emulating sbpro.
    It mean that the region is the sbpro I/O ports region. We use this
    region to access the control registers of the card, and if emulating
    sbpro, I/O sbpro registers too. If we are emulating MSS, the sbpro
    registers are not used, in no way, to emulate an sbpro: they are
-   used only for configuration pourposes.
+   used only for configuration purposes.
 
    Someone pointed out that should be possible use both the SBPRO and MSS
    modes because the sound card have all the two chipsets, supposing that
    one sound card of the emulated type (read the NOTES above)
    - Moved the sb init routine from the attach to the very first
    probe in sb_card.c
-   - Rearrangemens and cleanups
+   - Rearrangements and cleanups
    - Wiped out some unnecessary code and variables: this is kernel
    code so it is better save some TEXT and DATA
    - Fixed the request_region code. We must allocate the aedsp16 (sbpro)
 #define CMD6 0x8c              /* Enable Microsoft Sound System mode   */
 
 /*
- * Offsets of AEDSP16 DSP I/O ports. The offest is added to portbase
+ * Offsets of AEDSP16 DSP I/O ports. The offset is added to portbase
  * to have the actual I/O port.
  * Register permissions are:
  * (wo) == Write Only
@@ -516,7+516,7 @@ GetCardVersion (int port)
       if ((ret = ReadData (port)) == -1)
        return -1;
       /*
-         * We alredy know how many int are stored (2), so we know when the
+         * We already know how many int are stored (2), so we know when the
          * string is finished.
        */
       ver[len++] = ret;
@@ -536,7+536,7 @@ GetCardName (int port)
     {
       if ((ret = ReadData (port)) == -1)
        /*
-          * If no more data availabe, return to the caller, no error if len>0.
+          * If no more data available, return to the caller, no error if len>0.
           * We have no other way to know when the string is finished.
         */
        return (len ? 0 : -1);
@@ -666,7+666,7 @@ int
 InitAEDSP16_SBPRO (struct address_info *hw_config)
 {
   /*
-     * If the card is alredy init'ed MSS, we can not init it to SBPRO too
+     * If the card is already init'ed MSS, we can not init it to SBPRO too
      * because the board can not emulate simultaneously MSS and SBPRO.
    */
   if (ae_init & INIT_MSS)
@@ -683,7+683,7 @@ InitAEDSP16_SBPRO (struct address_info *hw_config)
     {
       if (check_region (hw_config->io_base, 0x0f))
        {
-         printk ("AEDSP16/SBPRO I/O port region is alredy in use.\n");
+         printk ("AEDSP16/SBPRO I/O port region is already in use.\n");
          return -1;
        }
     }
@@ -721,7+721,7 @@ int
 InitAEDSP16_MSS (struct address_info *hw_config)
 {
   /*
-     * If the card is alredy init'ed SBPRO, we can not init it to MSS too
+     * If the card is already init'ed SBPRO, we can not init it to MSS too
      * because the board can not emulate simultaneously MSS and SBPRO.
    */
   if (ae_init & INIT_SBPRO)
@@ -736,7+736,7 @@ InitAEDSP16_MSS (struct address_info *hw_config)
    */
   if (check_region (hw_config->io_base, 0x08))
     {
-      printk ("MSS I/O port region is alredy in use.\n");
+      printk ("MSS I/O port region is already in use.\n");
       return -1;
     }
 
@@ -748,7+748,7 @@ InitAEDSP16_MSS (struct address_info *hw_config)
     {
       if (check_region (AEDSP16_BASE, 0x0f))
        {
-         printk ("AEDSP16 I/O port region is alredy in use.\n");
+         printk ("AEDSP16 I/O port region is already in use.\n");
          return -1;
        }
     }
@@ -801,7+801,7 @@ InitAEDSP16_MPU401 (struct address_info *hw_config)
    */
   if (check_region (hw_config->io_base, 0x02))
     {
-      printk ("SB I/O port region is alredy in use.\n");
+      printk ("SB I/O port region is already in use.\n");
       return -1;
     }
 
@@ -813,7+813,7 @@ InitAEDSP16_MPU401 (struct address_info *hw_config)
     {
       if (check_region (AEDSP16_BASE, 0x0f))
        {
-         printk ("AEDSP16 I/O port region is alredy in use.\n");
+         printk ("AEDSP16 I/O port region is already in use.\n");
          return -1;
        }
     }
index bc87976..c673e0b 100644 (file)
@@ -1437,7+1437,7 @@ main (int argc, char *argv[])
        {
          FILE           *sf = fopen ("synth-ld.h", "w");
 
-         fprintf (sf, "/* automaticaly generated by configure */\n");
+         fprintf (sf, "/* automatically generated by configure */\n");
          fprintf (sf, "unsigned char pss_synth[1];\n"
                   "#define pss_synthLen 0\n");
          fclose (sf);
index acba745..0674775 100644 (file)
@@ -5,7+5,7 @@
  * a PnP compatible chip which contains a CS4231A codec, SB emulation,
  * a MPU401 compatible MIDI port, joystick and synthesizer and IDE CD-ROM 
  * interfaces. This is just a temporary driver until full PnP support
- * gets inplemented. Just the WSS codec, FM synth and the MIDI ports are
+ * gets implemented. Just the WSS codec, FM synth and the MIDI ports are
  * supported. Other interfaces are left uninitialized.
  */
 /*
index 317d573..b357ceb 100644 (file)
@@ -43,7+43,7 @@ extern int sound_started;
 
 struct driver_info {
        char *driver_id;
-       int card_subtype;       /* Driver spesific. Usually 0 */
+       int card_subtype;       /* Driver specific. Usually 0 */
        int card_type;          /*      From soundcard.h        */
        char *name;
        long (*attach) (long mem_start, struct address_info *hw_config);
@@ -521,7+521,7 @@ void sound_setup (char *str, int *ints);
 
 int sound_alloc_dmap (int dev, struct dma_buffparms *dmap, int chan);
 void sound_free_dmap (int dev, struct dma_buffparms *dmap);
-extern int soud_map_buffer (int dev, struct dma_buffparms *dmap, buffmem_desc *info);
+extern int sound_map_buffer (int dev, struct dma_buffparms *dmap, buffmem_desc *info);
 void install_pnp_sounddrv(struct pnp_sounddev *drv);
 int sndtable_probe (int unit, struct address_info *hw_config);
 int sndtable_init_card (int unit, struct address_info *hw_config);
index 85d5179..c50500f 100644 (file)
@@ -98,7+98,7 @@ reorganize_buffers (int dev, struct dma_buffparms *dmap, int recording)
       sz /= 8;                 /* #bits -> #bytes */
 
       /*
-         * Compute a buffer size for time not exeeding 1 second.
+         * Compute a buffer size for time not exceeding 1 second.
          * Usually this algorithm gives a buffer size for 0.5 to 1.0 seconds
          * of sound (using the current speed, sample size and #channels).
        */
@@ -135,8+135,8 @@ reorganize_buffers (int dev, struct dma_buffparms *dmap, int recording)
   else
     {
       /*
-         * The process has specified the buffer sice with SNDCTL_DSP_SETFRAGMENT or
-         * the buffer sice computation has already been done.
+         * The process has specified the buffer size with SNDCTL_DSP_SETFRAGMENT or
+         * the buffer size computation has already been done.
        */
       if (dmap->fragment_size > (audio_devs[dev]->buffsize / 2))
        dmap->fragment_size = (audio_devs[dev]->buffsize / 2);
@@ -634,7+634,7 @@ dma_subdivide (int dev, struct dma_buffparms *dmap, caddr_t arg, int fact)
     }
 
   if (dmap->subdivision != 0 ||
-      dmap->fragment_size)     /* Loo late to change */
+      dmap->fragment_size)     /* Too late to change */
     return -EINVAL;
 
   if (fact > MAX_REALTIME_FACTOR)
@@ -656,7+656,7 @@ dma_set_fragment (int dev, struct dma_buffparms *dmap, caddr_t arg, int fact)
     return -EIO;
 
   if (dmap->subdivision != 0 ||
-      dmap->fragment_size)     /* Loo late to change */
+      dmap->fragment_size)     /* Too late to change */
     return -EINVAL;
 
   bytes = fact & 0xffff;
@@ -1173,7+1173,7 @@ DMAbuf_start_output (int dev, int buff_no, int l)
   dmap->cfrag = -1;
 
 /*
- * Bypass buffering if using mmaped access
+ * Bypass buffering if using mmapped access
  */
 
   if (audio_devs[dev]->dmap_out->mapping_flags & DMA_MAP_MAPPED)
index 13e479d..9cee31f 100644 (file)
@@ -1481,7+1481,7 @@ guswave_open (int dev, int mode)
 
   if ((err = DMAbuf_open_dma (gus_devnum)) < 0)
     {
-      printk ("GUS: Loading saples without DMA\n");
+      printk ("GUS: Loading samples without DMA\n");
       gus_no_dma = 1;          /* Upload samples using PIO */
     }
   else
index df977ff..7622113 100644 (file)
  *      OPTi 82C929     MAD16 Pro
  *      OPTi 82C930     (Not supported yet)
  *
- * These audio interface chips don't prduce sound themselves. They just
+ * These audio interface chips don't produce sound themselves. They just
  * connect some other components (OPL-[234] and a WSS compatible codec)
  * to the PC bus and perform I/O, DMA and IRQ address decoding. There is
  * also a UART for the MPU-401 mode (not 82C928/Mozart).
@@ -201,7+201,7 @@ detect_mad16 (void)
       return 0;
     }
 
-  mad_write (MC1_PORT, tmp ^ 0x80);    /* Togge a bit */
+  mad_write (MC1_PORT, tmp ^ 0x80);    /* Toggle a bit */
   if ((tmp2 = mad_read (MC1_PORT)) != (tmp ^ 0x80))    /* Compare the bit */
     {
       mad_write (MC1_PORT, tmp);       /* Restore */
index 3ba6492..66178c3 100644 (file)
@@ -64,7+64,7 @@ mad16_sb_dsp_command (unsigned char val)
   unsigned long   limit;
 
   limit = jiffies + HZ / 10;   /*
-                                  * The timeout is 0.1 secods
+                                  * The timeout is 0.1 seconds
                                 */
 
   /*
index e5ea336..2c4c333 100644 (file)
@@ -193,7+193,7 @@ download_code (void)
 
                if (c != 0x80)
                  {
-                   printk ("Doanload not acknowledged\n");
+                   printk ("Download not acknowledged\n");
                    return 0;
                  }
                else if (!(lines++ % 10))
@@ -463,7+463,7 @@ attach_maui (long mem_start, struct address_info *hw_config)
       struct synth_operations *synth;
 
       /*
-       * Intercept patch loading calls so that they canbe handled
+       * Intercept patch loading calls so that they can be handled
        * by the Maui driver.
        */
 
index 474926f..90e531a 100644 (file)
@@ -744,7+744,7 @@ midi_synth_send_sysex (int dev, unsigned char *bytes, int len)
       if (!midi_devs[orig_dev]->putc (orig_dev, bytes[i]))
        {
 /*
- * Hardware leve buffer is full. Abort the sysex message.
+ * Hardware level buffer is full. Abort the sysex message.
  */
 
          int             timeout = 0;
index a7b7b79..262ea9c 100644 (file)
@@ -522,7+522,7 @@ mpu401_open (int dev, int mode,
      *  Verify that the device is really running.
      *  Some devices (such as Ensoniq SoundScape don't
      *  work before the on board processor (OBP) is initialized
-     *  by downloadin it's microcode.
+     *  by downloading its microcode.
    */
 
   if (!devc->initialized)
@@ -667,7+667,7 @@ retry:
              ok = 1;
          }
        else
-         {                     /* Device is not currently open. Use simplier method */
+         {                     /* Device is not currently open. Use simpler method */
            if (read_data (devc) == MPU_ACK)
              ok = 1;
          }
@@ -894,7+894,7 @@ mpu_synth_open (int dev, int mode)
      *  Verify that the device is really running.
      *  Some devices (such as Ensoniq SoundScape don't
      *  work before the on board processor (OBP) is initialized
-     *  by downloadin it's microcode.
+     *  by downloading its microcode.
    */
 
   if (!devc->initialized)
index 4e1e997..a485b0d 100644 (file)
@@ -266,7+266,7 @@ opl3_detect (int ioaddr, int *osp)
       detected_model = 3;
 
       /*
-       * Detect availability of OPL4 (_experimental_). Works propably
+       * Detect availability of OPL4 (_experimental_). Works probably
        * only after a cold boot. In addition the OPL4 port
        * of the chip may not be connected to the PC bus at all.
        */
index 550756c..47b40d9 100644 (file)
  *
  *     The percussive mode is implemented in the left side only.
  *
- *     With the above exeptions the both sides can be operated independently.
+ *     With the above exceptions the both sides can be operated independently.
  *     
  *     A 4 OP voice can be created by setting the corresponding
  *     bit at offset 4 of the right side.
index 5f82328..6fae98c 100644 (file)
 
 #define OPERATION_MODE_1               0xEF8B          /* R    Control                                                         */
 #      define  O_M_1_CDROM_TYPE        0x03            /* R    CD-ROM          3=SCSI, 2=Sony, 0=no CD-ROM interface           */
-#      define O_M_1_FM_TYPE            0x04            /* R    FM              1=sterero, 0=mono FM chip                       */
+#      define O_M_1_FM_TYPE            0x04            /* R    FM              1=stereo, 0=mono FM chip                        */
 #      define O_M_1_PCM_TYPE           0x08            /* R    PCM             1=16-bit Codec, 0=8-bit DAC                     */
 #define OPERATION_MODE_2               0xFF8B          /* R    Control                                                         */
 #      define O_M_2_PCS_ENABLED        0x02            /* R    PC speaker      PC speaker emulation 1=enabled, 0=disabled      */
index 4f2e5c9..4ebabce 100644 (file)
@@ -86,7+86,7 @@ pcm_set_speed (int arg)
   tmp = pas_read (FILTER_FREQUENCY);
 
   /*
-     * Set anti-aliasing filters according to sample rate. You reall *NEED*
+     * Set anti-aliasing filters according to sample rate. You really *NEED*
      * to enable this feature for all normal recording unless you want to
      * experiment with aliasing effects.
      * These filters apply to the selected "recording" source.
index d872d0a..3cb5574 100644 (file)
@@ -1,7+1,7 @@
 /*
  * sound/patmgr.c
  *
- * The patch maneger interface for the /dev/sequencer
+ * The patch manager interface for the /dev/sequencer
  */
 /*
  * Copyright by Hannu Savolainen 1993-1996
index 74c3d10..6e2a916 100644 (file)
@@ -824,7+824,7 @@ probe_pss_mss (struct address_info *hw_config)
 
   /*
      * For some reason the card returns 0xff in the WSS status register
-     * immediately after boot. Propably MIDI+SB emulation algorithm
+     * immediately after boot. Probably MIDI+SB emulation algorithm
      * downloaded to the ADSP2115 spends some time initializing the card.
      * Let's try to wait until it finishes this task.
    */
index 1ddc82b..3456ece 100644 (file)
@@ -124,7+124,7 @@ sb_dsp_command (unsigned char val)
   unsigned long   limit;
 
   limit = jiffies + HZ / 10;   /*
-                                  * The timeout is 0.1 secods
+                                  * The timeout is 0.1 seconds
                                 */
 
   /*
@@ -202,7+202,7 @@ sbintr (int irq, void *dev_id, struct pt_regs *dummy)
 
       if (!(src & 1))
        return;                 /*
-                                * Not a DSP interupt
+                                * Not a DSP interrupt
                                 */
     }
 
@@ -711,7+711,7 @@ sb_dsp_prepare_for_input (int dev, int bsize, int bcount)
        {                       /* !AudioDrive */
 
          /* Select correct dma channel
-            * for 16/8 bit acccess
+            * for 16/8 bit access
           */
          audio_devs[my_dev]->dmachan1 =
            audio_devs[my_dev]->dmachan2 =
@@ -1332,7+1332,7 @@ ess_init (int ess_minor)  /* ESS1688 Initialization */
  *    Set DMA configuration register
  */
 
-  cfg = 0x50;                  /* Extended mode DMA ebable */
+  cfg = 0x50;                  /* Extended mode DMA enable */
 
   if (sbc_dma > 3 || sbc_dma < 0 || sbc_dma == 2)
     {
index 3f396f9..39a7f17 100644 (file)
  * future version of this driver.
  */
 
-extern int      sb_dsp_ok;     /* Set to 1 atfer successful initialization */
+extern int      sb_dsp_ok;     /* Set to 1 after successful initialization */
 extern int      sbc_base;
 
 extern int      sb_midi_mode;
index 7af949d..ace39c5 100644 (file)
@@ -51,7+51,7 @@ static int      max_synthdev = 0;
 /*
  * The seq_mode gives the operating mode of the sequencer:
  *      1 = level1 (the default)
- *      2 = level2 (extended capabilites)
+ *      2 = level2 (extended capabilities)
  */
 
 #define SEQ_1  1
index 18ea325..aac3612 100644 (file)
 #define SND_DEV_DSP16  5       /* Like /dev/dsp but 16 bits/sample */
 #define SND_DEV_STATUS 6       /* /dev/sndstat */
 /* #7 not in use now. Was in 2.4. Free for use after v3.0. */
-#define SND_DEV_SEQ2   8       /* /dev/sequecer, level 2 interface */
+#define SND_DEV_SEQ2   8       /* /dev/sequencer, level 2 interface */
 #define SND_DEV_SNDPROC 9      /* /dev/sndproc for programmable devices */
 #define SND_DEV_PSS    SND_DEV_SNDPROC
 
@@ -143,8+143,8 @@ struct address_info {
        char *name;
        int driver_use_1;       /* Driver defined field 1 */
        int driver_use_2;       /* Driver defined field 2 */
-       int *osp;       /* OS spesific info */
-       int card_subtype;       /* Driver spesific. Usually 0 */
+       int *osp;       /* OS specific info */
+       int card_subtype;       /* Driver specific. Usually 0 */
 };
 
 #define SYNTH_MAX_VOICES       32
index 8ab6f7c..222f709 100644 (file)
@@ -726,7+726,7 @@ sound_free_dmap (int dev, struct dma_buffparms *dmap)
 }
 
 int
-soud_map_buffer (int dev, struct dma_buffparms *dmap, buffmem_desc * info)
+sound_map_buffer (int dev, struct dma_buffparms *dmap, buffmem_desc * info)
 {
   printk ("Entered sound_map_buffer()\n");
   printk ("Exited sound_map_buffer()\n");
index 4ebebd2..73f1507 100644 (file)
@@ -1095,7+1095,7 @@ int brw_page(int rw, unsigned long address, kdev_t dev, int b[], int size, int b
        struct page *page;
 
        page = mem_map + MAP_NR(address);
-       page->uptodate = 0;
+       clear_bit(PG_uptodate, &page->flags);
        bh = create_buffers(address, size);
        if (!bh)
                return -ENOMEM;
@@ -1152,8+1152,8 @@ int brw_page(int rw, unsigned long address, kdev_t dev, int b[], int size, int b
                ll_rw_block(rw, nr, arr);
        else {
                unsigned long flags;
-               page->locked = 0;
-               page->uptodate = 1;
+               clear_bit(PG_locked, &page->flags);
+               set_bit(PG_uptodate, &page->flags);
                wake_up(&page->wait);
                next = bh;
                save_flags(flags);
@@ -1183,7+1183,7 @@ void mark_buffer_uptodate(struct buffer_head * bh, int on)
                        tmp=tmp->b_this_page;
                } while (tmp && tmp != bh);
                if (page_uptodate)
-                       mem_map[MAP_NR(bh->b_data)].uptodate = 1;
+                       set_bit(PG_uptodate, &mem_map[MAP_NR(bh->b_data)].flags);
        } else
                clear_bit(BH_Uptodate, &bh->b_state);
 }
@@ -1200,7+1200,7 @@ void unlock_buffer(struct buffer_head * bh)
        if (!test_bit(BH_FreeOnIO, &bh->b_state))
                return;
        page = mem_map + MAP_NR(bh->b_data);
-       if (!page->locked) {
+       if (!PageLocked(page)) {
                printk ("Whoops: unlock_buffer: "
                        "async io complete on unlocked page\n");
                return;
@@ -1221,7+1221,7 @@ void unlock_buffer(struct buffer_head * bh)
 
        /* OK, go ahead and complete the async IO on this page. */
        save_flags(flags);
-       page->locked = 0;
+       clear_bit(PG_locked, &page->flags);
        wake_up(&page->wait);
        cli();
        tmp = bh;
@@ -1238,10+1238,9 @@ void unlock_buffer(struct buffer_head * bh)
                tmp = tmp->b_this_page;
        } while (tmp != bh);
        restore_flags(flags);
-       if (page->free_after) {
+       if (clear_bit(PG_freeafter, &page->flags)) {
                extern int nr_async_pages;
                nr_async_pages--;
-               page->free_after = 0;
                free_page(page_address(page));
        }
        wake_up(&buffer_wait);
@@ -1251,7+1250,7 @@ void unlock_buffer(struct buffer_head * bh)
  * Generic "readpage" function for block devices that have the normal
  * bmap functionality. This is most of the block device filesystems.
  * Reads the page asynchronously --- the unlock_buffer() and
- * mark_buffer_uptodate() functions propogate buffer state into the
+ * mark_buffer_uptodate() functions propagate buffer state into the
  * page struct once IO has completed.
  */
 int generic_readpage(struct inode * inode, struct page * page)
@@ -1262,7+1261,7 @@ int generic_readpage(struct inode * inode, struct page * page)
 
        address = page_address(page);
        page->count++;
-       page->locked = 1;
+       set_bit(PG_locked, &page->flags);
        
        i = PAGE_SIZE >> inode->i_sb->s_blocksize_bits;
        block = page->offset >> inode->i_sb->s_blocksize_bits;
index f068dc4..36b1961 100644 (file)
@@ -8,7+8,7 @@
  * block. These routines take care of the administration needed to
  * have a consistent diskquota tracking system. The ideas of both
  * user and group quotas are based on the Melbourne quota system as
- * used on BSD derivated systems. The internal implementation is 
+ * used on BSD derived systems. The internal implementation is 
  * based on the LINUX inode-subsystem with added complexity of the
  * diskquota system. This implementation is not based on any BSD
  * kernel sourcecode.
@@ -757,7+757,7 @@ static u_long isize_to_blocks(size_t isize, size_t blksize)
 }
 
 /*
- * Externaly referenced funtions trough dq_operations.
+ * Externally referenced functions through dquot_operations.
  */
 int dquot_alloc_block(const struct inode *inode, unsigned long number)
 {
@@ -872,7+872,7 @@ int dquot_transfer(struct inode *inode, struct iattr *iattr, char direction)
        }
 
        /*
-        * Finaly perform the needed transfer from transfer_from to transfer_to.
+        * Finally perform the needed transfer from transfer_from to transfer_to.
         * And release any pointer to dquots not needed anymore.
         */
        for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
index 8173dd2..dad7ddb 100644 (file)
@@ -86,6+86,10 @@ static int ext2_follow_link(struct inode * dir, struct inode * inode,
                link = bh->b_data;
        } else
                link = (char *) inode->u.ext2_i.i_data;
+       if (!IS_RDONLY(inode)) {
+               inode->i_atime = CURRENT_TIME;
+               inode->i_dirt = 1;
+       }
        current->link_count++;
        error = open_namei (link, flag, mode, res_inode, dir);
        current->link_count--;
@@ -123,6+127,10 @@ static int ext2_readlink (struct inode * inode, char * buffer, int buflen)
                i++;
                put_user (c, buffer++);
        }
+       if (!IS_RDONLY(inode)) {
+               inode->i_atime = CURRENT_TIME;
+               inode->i_dirt = 1;
+       }
        iput (inode);
        if (bh)
                brelse (bh);
index f70173b..9cfccd0 100644 (file)
@@ -53,7+53,7 @@ static void
 ncp_read_inode(struct inode *inode)
 {
         /* Our task should be extremely simple here. We only have to
-           look up the infomation somebody else (ncp_iget) put into
+           look up the information somebody else (ncp_iget) put into
            the inode tree. The address of this information is the
            inode->i_ino. Just to make sure everything went well, we
            check it's there. */
index f2c1053..553af1f 100644 (file)
 
     This stuff compiles as a loadable module (I developed it on 1.3.77).
     Simply type mkmodule, and insmod nfs.o. This will start for nfsiod's
-    at the same time (which will show up under the pesudonym of insmod in
+    at the same time (which will show up under the pseudonym of insmod in
     ps-style listings).
 
     Alternatively, you can put it right into the kernel: remove everything
      * Async RPC will not be tried when server->rsize < PAGE_SIZE.
 
      * When an error occurs, nfsiod has no way of returning
-       the error code to the user process. Theerefore, it flags
+       the error code to the user process. Therefore, it flags
        page->error and wakes up all processes waiting on that
-       page (they usually do so from withing generic_readpage).
+       page (they usually do so from within generic_readpage).
 
        generic_readpage finds that the page is still not
        uptodate, and calls nfs_readpage again. This time around,
index d46b034..9e96b17 100644 (file)
@@ -51,8+51,8 @@ do_read_nfs_sync(struct inode * inode, struct page * page)
 
        dprintk("NFS: do_read_nfs_sync(%p)\n", page);
 
-       page->locked = 1;
-       page->error = 0;
+       set_bit(PG_locked, &page->flags);
+       clear_bit(PG_error, &page->flags);
 
        do {
                if (count < rsize)
@@ -77,9+77,9 @@ do_read_nfs_sync(struct inode * inode, struct page * page)
        if (refresh) {
                nfs_refresh_inode(inode, &fattr);
                result = 0;
-               page->uptodate = 1;
+               set_bit(PG_uptodate, &page->flags);
        }
-       page->locked = 0;
+       clear_bit(PG_locked, &page->flags);
        wake_up(&page->wait);
        return result;
 }
@@ -100,13+100,13 @@ nfs_read_cb(int result, struct nfsiod_req *req)
        if (result >= 0
         && (result = nfs_proc_read_reply(&req->rq_rpcreq)) >= 0) {
                succ++;
-               page->uptodate = 1;
+               set_bit(PG_uptodate, &page->flags);
        } else {
                fail++;
                printk("BIO: %d successful reads, %d failures\n", succ, fail);
-               page->error = 1;
+               set_bit(PG_error, &page->flags);
        }
-       page->locked = 0;
+       clear_bit(PG_locked, &page->flags);
        wake_up(&page->wait);
        free_page(page_address(page));
 }
@@ -119,8+119,8 @@ do_read_nfs_async(struct inode *inode, struct page *page)
 
        dprintk("NFS: do_read_nfs_async(%p)\n", page);
 
-       page->locked = 1;
-       page->error = 0;
+       set_bit(PG_locked, &page->flags);
+       clear_bit(PG_error, &page->flags);
 
        if (!(req = nfsiod_reserve(NFS_SERVER(inode), nfs_read_cb)))
                goto done;
@@ -138,7+138,7 @@ do_read_nfs_async(struct inode *inode, struct page *page)
        if (result < 0) {
                dprintk("NFS: deferring async READ request.\n");
                nfsiod_release(req);
-               page->locked = 0;
+               clear_bit(PG_locked, &page->flags);
                wake_up(&page->wait);
        }
 
@@ -155,7+155,7 @@ nfs_readpage(struct inode *inode, struct page *page)
        dprintk("NFS: nfs_readpage %08lx\n", page_address(page));
        address = page_address(page);
        page->count++;
-       if (!page->error && NFS_SERVER(inode)->rsize >= PAGE_SIZE)
+       if (!PageError(page) && NFS_SERVER(inode)->rsize >= PAGE_SIZE)
                error = do_read_nfs_async(inode, page);
        if (error < 0)          /* couldn't enqueue */
                error = do_read_nfs_sync(inode, page);
index 4de6225..0772470 100644 (file)
@@ -4,6+4,8 @@
  *  Copyright (C) 1992  Rick Sladkey
  *
  *  nfs directory handling functions
+ *
+ * 10 Apr 1996 Added silly rename for unlink   --okir
  */
 
 #include <linux/sched.h>
@@ -481,6+483,51 @@ static int nfs_rmdir(struct inode *dir, const char *name, int len)
        return error;
 }
 
+static int nfs_sillyrename(struct inode *dir, const char *name, int len)
+{
+       struct inode    *inode;
+       char            silly[14];
+       int             slen, ret;
+
+       dir->i_count++;
+       if (nfs_lookup(dir, name, len, &inode) < 0)
+               return -EIO;            /* arbitrary */
+       if (inode->i_count == 1 || NFS_RENAMED_DIR(inode)) {
+               iput(inode);
+               return -EIO;
+       }
+       slen = sprintf(silly, ".nfs%ld", inode->i_ino);
+
+       if (len == slen && !strncmp(name, silly, len)) {
+               iput(inode);
+               return -EIO;            /* DWIM */
+       }
+       ret = nfs_proc_rename(NFS_SERVER(dir), NFS_FH(dir), name,
+                                              NFS_FH(dir), silly);
+       if (ret >= 0) {
+               nfs_lookup_cache_remove(dir, NULL, name);
+               nfs_lookup_cache_remove(dir, NULL, silly);
+               NFS_RENAMED_DIR(inode) = dir;
+               dir->i_count++;
+       }
+       iput(inode);
+       return ret;
+}
+
+void nfs_sillyrename_cleanup(struct inode *inode)
+{
+       struct inode    *dir = NFS_RENAMED_DIR(inode);
+       char            silly[14];
+       int             error, slen;
+
+       slen = sprintf(silly, ".nfs%ld", inode->i_ino);
+       if ((error = nfs_unlink(dir, silly, slen)) < 0) {
+               printk("NFS silly_rename cleanup failed (err = %d)\n",
+                                       -error);
+       }
+       NFS_RENAMED_DIR(inode) = NULL;
+}
+
 static int nfs_unlink(struct inode *dir, const char *name, int len)
 {
        int error;
@@ -494,9+541,11 @@ static int nfs_unlink(struct inode *dir, const char *name, int len)
                iput(dir);
                return -ENAMETOOLONG;
        }
-       error = nfs_proc_remove(NFS_SERVER(dir), NFS_FH(dir), name);
-       if (!error)
-               nfs_lookup_cache_remove(dir, NULL, name);
+       if ((error = nfs_sillyrename(dir, name, len)) < 0) {
+               error = nfs_proc_remove(NFS_SERVER(dir), NFS_FH(dir), name);
+               if (!error)
+                       nfs_lookup_cache_remove(dir, NULL, name);
+       }
        iput(dir);
        return error;
 }
index f709ffd..c7cce15 100644 (file)
@@ -68,6+68,8 @@ static void nfs_read_inode(struct inode * inode)
 
 static void nfs_put_inode(struct inode * inode)
 {
+       if (NFS_RENAMED_DIR(inode))
+               nfs_sillyrename_cleanup(inode);
        if (inode->i_pipe)
                clear_inode(inode);
 }
index 2e2125c..ea49702 100644 (file)
@@ -154,7+154,7 @@ extern asmlinkage int sys_socket(int family, int type, int protocol);
  ***************************************************************************/
 
 /*
- * Setup and initialize all network devices. If there is a user-prefered
+ * Setup and initialize all network devices. If there is a user-preferred
  * interface, ignore all other interfaces.
  */
 static int root_dev_open(void)
@@ -1541,7+1541,7 @@ static int *root_nfs_call(int *end)
 
        /*
         * First connect the UDP socket to a server port, then send the
-        * packet out, and finally check wether the answer is OK.
+        * packet out, and finally check whether the answer is OK.
         */
        if (nfs_sock_inode->u.socket_i.ops->connect &&
            nfs_sock_inode->u.socket_i.ops->connect(&nfs_sock_inode->u.socket_i,
index 5091e40..8c59fc1 100644 (file)
@@ -195,7+195,7 @@ static int proc_scsilseek(struct inode * inode, struct file * file,
        return(file->f_pos);
     case 2:                 /* This ugly hack allows us to    */
        if (offset)          /* to determine the length of the */
-           return(-EINVAL); /* file and then later savely to  */ 
+           return(-EINVAL); /* file and then later safely to  */ 
        proc_readscsi(inode, file, 0, -1); /* seek in it       */ 
        return(file->f_pos);
     default:
index d8a2c05..2c09443 100644 (file)
@@ -136,7+136,7 @@ smb_dir_read(struct inode *inode, struct file *filp, char *buf, int count)
  *  count   ---  Number of entries to be read. Should indicate the total 
  *               buffer space available for filling with dirents.
  * Return values:
- *     < 0     ---  An error occured (linux/errno.h).
+ *     < 0     ---  An error occurred (linux/errno.h).
  *     = 0     ---
  *     > 0     ---  Success, amount of bytes written to dirent.
  * Notes:
index 4782aaf..7dd2e2a 100644 (file)
@@ -48,7+48,7 @@ static void
 smb_read_inode(struct inode *inode)
 {
         /* Our task should be extremely simple here. We only have to
-           look up the infomation somebody else (smb_iget) put into
+           look up the information somebody else (smb_iget) put into
            the inode tree. The address of this information is the
            inode->i_ino. Just to make sure everything went well, we
            check it's there. */
index f5e6aaf..681b45a 100644 (file)
@@ -483,7+483,7 @@ smb_connect(struct smb_server *server)
         
 /*****************************************************************************/
 /*                                                                           */
-/*  This routine was once taken from nfs, wich is for udp. Here TCP does     */
+/*  This routine was once taken from nfs, which is for udp. Here TCP does     */
 /*  most of the ugly stuff for us (thanks, Alan!)                            */
 /*                                                                           */
 /*****************************************************************************/
index 3198321..55211c8 100644 (file)
@@ -353,7+353,7 @@ void umsdos_lookup_patch (
                                of the data of a file. It can translate
                                silently from MsDOS text file format to Unix
                                one (crlf -> lf) while reading, and the reverse
-                               while writting. This is activated using the mount
+                               while writing. This is activated using the mount
                                option conv=....
 
                                This is not useful for Linux file in promoted
index bcabf7e..2bf3166 100644 (file)
@@ -58,7+58,7 @@ extern inline void * phys_to_virt(unsigned long address)
 
 /*
  * Define actual functions in private name-space so it's easier to
- * accomodate things like XFree or svgalib that like to define their
+ * accommodate things like XFree or svgalib that like to define their
  * own versions of inb etc.
  */
 extern void __sethae (unsigned long addr);     /* syscall */
index 7e997c8..161e89a 100644 (file)
@@ -313,7+313,7 @@ extern unsigned long lca_init (unsigned long mem_start, unsigned long mem_end);
 
 /*
  * Data structure for handling LCA machine checks.  Correctable errors
- * result in a short logout frame, uncorrectably ones in a long one.
+ * result in a short logout frame, uncorrectable ones in a long one.
  */
 struct el_lca_mcheck_short {
        struct el_common        h;              /* common logout header */
index 457487d..22f97fa 100644 (file)
@@ -5,7+5,7 @@
  * Address range for shared memory attaches if no address passed to
  * shmat().  These ought to be changed to something >4GB so 32-bit
  * errors are caught more easily.  However, they don't seem to be used
- * execept for ELF stuff, so it's not really critical until we get ELF
+ * except for ELF stuff, so it's not really critical until we get ELF
  * support for the Alpha.
  */
 #define SHM_RANGE_START        0x50000000
index 30e2d2f..e0b5ead 100644 (file)
@@ -13,7+13,7 @@ struct old_stat {
        unsigned long   st_atime;
        unsigned long   st_mtime;
        unsigned long   st_ctime;
-       unsigned int    st_blkize;
+       unsigned int    st_blksize;
        int             st_blocks;
        unsigned int    st_flags;
        unsigned int    st_gen;
index cc73dab..e3ea8f5 100644 (file)
@@ -66,7+66,7 @@ extern __inline__ int change_bit(int nr, SMPVOL void * addr)
  */
 extern __inline__ int test_bit(int nr, const SMPVOL void * addr)
 {
-       return 1UL & (((const unsigned int *) addr)[nr >> 5] >> (nr & 31));
+       return ((1UL << (nr & 31)) & (((const unsigned int *) addr)[nr >> 5])) != 0;
 }
 
 /*
index 0e004e1..bccac4e 100644 (file)
@@ -83,7+83,7 @@ extern __inline__ int prim_spin_lock_nb(struct spinlock *sp)
 
 
 /*
- *     These wrap the locking primtives up for usage
+ *     These wrap the locking primitives up for usage
  */
  
 extern __inline__ void spinlock(struct spinlock *sp)
@@ -126,7+126,7 @@ extern __inline__ void spintestlock(struct spinlock *sp)
 extern __inline__ void spintestunlock(struct spinlock *sp)
 {
        /*
-        *      A testlock doesnt update the lock chain so we
+        *      A testlock doesn't update the lock chain so we
         *      must not update it on free
         */
        prim_spin_unlock(sp);
index 665f8d5..c72d9ea 100644 (file)
@@ -201,7+201,7 @@ static inline void flush_tlb_range(struct mm_struct *mm,
 
 /*
  * The 4MB page is guessing..  Detailed in the infamous "Chapter H"
- * of the Pentium details, but assuming intel did the straigtforward
+ * of the Pentium details, but assuming intel did the straightforward
  * thing, this bit set in the page directory entry just means that
  * the page directory entry points directly to a 4MB-aligned block of
  * memory. 
@@ -254,7+254,7 @@ static inline void flush_tlb_range(struct mm_struct *mm,
 
 /* page table for 0-4MB for everybody */
 extern unsigned long pg0[1024];
-/* zero page used for unitialized stuff */
+/* zero page used for uninitialized stuff */
 extern unsigned long empty_zero_page[1024];
 
 /*
index f435afe..566b09c 100644 (file)
@@ -244,7+244,7 @@ extern __inline int smp_processor_id(void)
  *     a process across CPUs. Such a transfer incurs misses on the L1
  *     cache, and on a P6 or P5 with multiple L2 caches L2 hits. My
  *     gut feeling is this will vary by board in value. For a board
- *     with seperate L2 cache it probably depends also on the RSS, and
+ *     with separate L2 cache it probably depends also on the RSS, and
  *     for a board with shared L2 cache it ought to decay fast as other
  *     processes are run.
  */
index b35498d..36e3b66 100644 (file)
@@ -36,7+36,7 @@ extern __inline__ void udelay(unsigned long usecs)
 
 /*
  * The different variants for 32/64 bit are pure paranoia. The typical
- * range of numbers that apprears for MIPS machines avoids overflows.
+ * range of numbers that appears for MIPS machines avoids overflows.
  */
 extern __inline__ unsigned long muldiv(unsigned long a, unsigned long b, unsigned long c)
 {
index 826e866..d3070c7 100644 (file)
 
 /*
  * The maximum address that we can perform a DMA transfer to on this platform
- * This discribes only the PC style part of the DMA logic like on Deskstations
+ * This describes only the PC style part of the DMA logic like on Deskstations
  * or Acer PICA but not the much more versatile DMA logic used for the
- * local devices on Acer PICA or Mangnums.
+ * local devices on Acer PICA or Magnums.
  */
 #define MAX_DMA_ADDRESS                0x1000000
 
index 31e7042..134d694 100644 (file)
                           512*2*MAX_BUFFER_SECTORS);
 
 /*
- * And on Mips's the CMOS info failes also ...
+ * And on Mips's the CMOS info fails also ...
  *
  * FIXME: This information should come from the ARC configuration tree
- *        or whereever a parivular machine has stored this ...
+ *        or wherever a particular machine has stored this ...
  */
 #define FLOPPY0_TYPE 4         /* this is wrong for the Olli M700, but who cares... */
 #define FLOPPY1_TYPE 0
index a9934a4..c51ad09 100644 (file)
  * Some characters for the LED control registers
  * The original Mips machines seem to have a LED display
  * with integrated decoder while the Acer machines can
- * control each of the seven segments and the dot independend.
+ * control each of the seven segments and the dot independently.
  * It's only a toy, anyway...
  */
 #define LED_DOT                 0x01
@@ -227,7+227,7 @@ typedef struct {
 
 #define JAZZ_R4030_CACHE_MTNC   0xE0000030     /* Cache Maintenance */
 #define JAZZ_R4030_R_FAIL_ADDR  0xE0000038     /* Remote Failed Address */
-#define JAZZ_R4030_M_FAIL_ADDR  0xE0000040     /* Memory Failed Adresss */
+#define JAZZ_R4030_M_FAIL_ADDR  0xE0000040     /* Memory Failed Address */
 
 #define JAZZ_R4030_CACHE_PTAG   0xE0000048     /* I/O Cache Physical Tag */
 #define JAZZ_R4030_CACHE_LTAG   0xE0000050     /* I/O Cache Logical Tag */
index 2b39a32..f838a52 100644 (file)
@@ -1,5+1,5 @@
 /*
- * Machine dependend access functions for RTC registers.
+ * Machine dependent access functions for RTC registers.
  */
 #ifndef __ASM_MIPS_MC146818RTC_H
 #define __ASM_MIPS_MC146818RTC_H
index 0585d93..1cbf766 100644 (file)
 #undef CONF_PROFILE_TLB
 
 /*
- * Disable all caching.  Usefull to find trouble with caches in drivers.
+ * Disable all caching.  Useful to find trouble with caches in drivers.
  */
 #undef CONF_DISABLE_KSEG0_CACHING
 
index ba28bc1..1b2db54 100644 (file)
@@ -88,7+88,7 @@ extern void __copy_page(unsigned long from, unsigned long to);
  * physical address by a single 'and' operation and gain 6 additional
  * bits for storing information which isn't present in a normal
  * MIPS page table.
- * Since the Mips has choosen some quite missleading names for the
+ * Since the Mips has chosen some quite misleading names for the
  * valid and dirty bits they're defined here but only their synonyms
  * will be used.
  */
@@ -545,7+545,7 @@ extern pgd_t swapper_pg_dir[1024];
 /*
  * MIPS doesn't need any external MMU info: the kernel page tables contain
  * all the necessary information.  We use this hook though to load the
- * TLB as early as possible with uptodate information avoiding unecessary
+ * TLB as early as possible with uptodate information avoiding unnecessary
  * exceptions.
  */
 extern void update_mmu_cache(struct vm_area_struct * vma,
index 799dcf4..a1056f8 100644 (file)
  * Some characters for the LED control registers
  * The original Mips machines seem to have a LED display
  * with integrated decoder while the Acer machines can
- * control each of the seven segments and the dot independend.
+ * control each of the seven segments and the dot independently.
  * It only a toy, anyway...
  */
 #define LED_DOT                 0x01
index 2deedb2..b6ba4c0 100644 (file)
@@ -178,7+178,7 @@ void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp)
        sync_mem();
        regs->cp0_epc = pc;
        /*
-        * New thread looses kernel priviledges.
+        * New thread loses kernel privileges.
         */
        regs->cp0_status = (regs->cp0_status & ~(ST0_CU0|ST0_KSU)) | KSU_USER;
        /*
index cfbe5ac..d666072 100644 (file)
@@ -8,7+8,7 @@
  * Copyright (C) 1994, 1995 by Ralf Baechle
  *
  * Note that the quad functions are only being used for the 64 bit kernel and
- * therefore it isn't really important that they will be misscompiled for
+ * therefore it isn't really important that they will be miscompiled for
  * 32-bit kernels.
  */
 #ifndef __ASM_MIPS_SEGMENT_H
index 8c1b51f..313e36c 100644 (file)
@@ -48,7+48,7 @@ typedef struct {
 #define SIGWINCH       20      /* Window size change (4.3 BSD, Sun).  */
 #define SIGURG         21      /* Urgent condition on socket (4.2 BSD).  */
 #define SIGIO          22      /* I/O now possible (4.2 BSD).  */
-#define SIGPOLL                SIGIO   /* Pollable event occured (System V).  */
+#define SIGPOLL                SIGIO   /* Pollable event occurred (System V).  */
 #define SIGSTOP                23      /* Stop, unblockable (POSIX).  */
 #define SIGTSTP                24      /* Keyboard stop (POSIX).  */
 #define SIGCONT                25      /* Continue (POSIX).  */
index 00779b1..0e69633 100644 (file)
 #define SO_BSDCOMPAT   14
 
 /*
- * Wierd.  There are two ABIs; in the old one SOCK_STREAM and SOCK_DGRAM
+ * Weird.  There are two ABIs; in the old one SOCK_STREAM and SOCK_DGRAM
  * have swapped values.  I choose to be compatible with the new one.
  */
 #define SOCK_DGRAM     1               /* datagram (conn.less) socket  */
index 0281bc1..8d53c8b 100644 (file)
@@ -15,7+15,7 @@ struct old_stat {
        unsigned int    st_atime, st_res1;
        unsigned int    st_mtime, st_res2;
        unsigned int    st_ctime, st_res3;
-       unsigned int    st_blkize;
+       unsigned int    st_blksize;
        int             st_blocks;
        unsigned int    st_flags;
        unsigned int    st_gen;
index 3c29055..8483c54 100644 (file)
  * We only support the following commands.
  */
 #define SETNAME                    1   /* set hostname                  */
-#define FLUSH_CACHE               3    /* writeback and invalide caches */
+#define FLUSH_CACHE               3    /* writeback and invalidate caches */
 #define MIPS_FIXADE                7   /* control address error fixing  */
 #define MIPS_ATOMIC_SET                2001    /* atomically set variable       */
 
index 60858b1..065d1d5 100644 (file)
@@ -26,7+26,7 @@ struct termios {
        tcflag_t c_cflag;               /* control mode flags */
        tcflag_t c_lflag;               /* local mode flags */
        /*
-        * Seems nonexistant in the ABI, but Linux assumes existence ...
+        * Seems nonexistent in the ABI, but Linux assumes existence ...
         */
        cc_t c_line;                    /* line discipline */
        cc_t c_cc[NCCS];                /* control characters */
index a7eed05..e531f23 100644 (file)
@@ -47,7+47,7 @@ struct feature {
 
 /*
  * Similar to the above this is a structure that describes various
- * CPU dependend features.
+ * CPU dependent features.
  *
  * FIXME: This vector isn't being used yet
  */
index 1c32aaf..5a731fa 100644 (file)
  * simplest way to split this was literally in half.  Also, life is so
  * much simpler for the kernel if the machine hardware resources are
  * always mapped in.  Thus, some additional space is given up to the
- * kernel space to accomodate this.
+ * kernel space to accommodate this.
  *
  * CAUTION! Some of the trade-offs make sense for the PreP platform on
  * which this code was originally developed.  When it migrates to other
  * of the logical address.  These 4 bits address a "virtual segment id"
  * which is unique per task/page combination for user addresses and
  * fixed for the kernel addresses.  Thus, the kernel space can be simply
- * shared [indeed at low overhead] amoung all tasks.
+ * shared [indeed at low overhead] among all tasks.
  *
  * The basic virtual address space is thus:
  *
index 7d51bf1..04bf215 100644 (file)
 #define MSR_TGPR       (1<<17)         /* TLB Update registers in use */
 #define MSR_ILE                (1<<16)         /* Interrupt Little-Endian enable */
 #define MSR_EE         (1<<15)         /* External Interrupt enable */
-#define MSR_PR         (1<<14)         /* Supervisor/User privelege */
+#define MSR_PR         (1<<14)         /* Supervisor/User privilege */
 #define MSR_FP         (1<<13)         /* Floating Point enable */
 #define MSR_ME         (1<<12)         /* Machine Check enable */
 #define MSR_FE0                (1<<11)         /* Floating Exception mode 0 */
index 0979350..7d550d1 100644 (file)
@@ -20,7+20,7 @@ extern inline void * memset(void * s,int c,size_t count)
        return s;
 }
 #define __HAVE_ARCH_STRSTR
-/* Return the first ocurrence of NEEDLE in HAYSTACK.  */
+/* Return the first occurrence of NEEDLE in HAYSTACK.  */
 extern inline char *
 strstr(const char *haystack, const char *needle)
 {
index 7083331..d52e0bb 100644 (file)
 #define ASI_M_IC_FLCLEAR   0x36
 #define ASI_M_DC_FLCLEAR   0x37
 
-#define ASI_M_DCDR         0x39   /* Data Cache Diagnostics Registerl rw, ss */
+#define ASI_M_DCDR         0x39   /* Data Cache Diagnostics Register rw, ss */
 
 /* Sparc V9 TI UltraSparc ASI's (V8 ploos ploos) */
 
index 4578cd2..619f3b2 100644 (file)
@@ -1,5+1,5 @@
 /* $Id: auxio.h,v 1.10 1996/01/03 03:52:58 davem Exp $
- * auxio.h:  Definitons and code for the Auxiliary I/O register.
+ * auxio.h:  Definitions and code for the Auxiliary I/O register.
  *
  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
  */
index d5aa64f..663b61d 100644 (file)
@@ -1,5+1,5 @@
 /* $Id: bsderrno.h,v 1.2 1995/11/25 02:31:17 davem Exp $
- * bsderrno.h: Error numbers for NetBSD binary compatability
+ * bsderrno.h: Error numbers for NetBSD binary compatibility
  *
  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
  */
index 1326f87..9ad2ad5 100644 (file)
  * alternate address space.  The IDC bit must be off in the ICCR on
  * HyperSparcs for these accesses to work.  The code below does not do
  * any checking, the caller must do so.  These routines are for
- * diagnostics only, but coule end up being useful.  Use with care.
+ * diagnostics only, but could end up being useful.  Use with care.
  * Also, you are asking for trouble if you execute these in one of the
  * three instructions following a %asr/%psr access or modification.
  */
index f8ebf4a..4ffcab3 100644 (file)
  * BM: Boot Mode -- 0 = not in boot mode, 1 = in boot mode
  * C: Cacheable -- Indicates whether accesses are cacheable while
  *    the MMU is off.  0=no 1=yes
- * MR: MemoryReflection -- Indicates whether the bus attacted to the
+ * MR: MemoryReflection -- Indicates whether the bus attached to the
  *     MBus supports memory reflection. 0=no 1=yes (605 only)
  * CM: CacheMode -- Indicates whether the cache is operating in write
  *     through or copy-back mode. 0=write-through 1=copy-back
index b8c5763..2c50d71 100644 (file)
@@ -96,7+96,7 @@ extern unsigned long dvma_init(struct linux_sbus *, unsigned long);
 #define DMA_RST_ENET     DMA_RST_SCSI      /* Reset the ENET controller */
 #define DMA_ST_WRITE     0x00000100        /* write from device to memory */
 #define DMA_ENABLE       0x00000200        /* Fire up DMA, handle requests */
-#define DMA_PEND_READ    0x00000400        /* DMA_VERS1/0/PLUS Pendind Read */
+#define DMA_PEND_READ    0x00000400        /* DMA_VERS1/0/PLUS Pending Read */
 #define DMA_BCNT_ENAB    0x00002000        /* If on, use the byte counter */
 #define DMA_TERM_CNTR    0x00004000        /* Terminal counter */
 #define DMA_CSR_DISAB    0x00010000        /* No FIFO drains during csr */
index d804231..1bd3e0b 100644 (file)
  *  31-18  17  16    15-8    7-4   3    2    1 0
  *
  * C2E: A C2 graphics error occurred. 0=no 1=yes (SS10 only)
- * MULT: Multiple errors occurres ;-O 0=no 1=prom_panic(yes)
+ * MULT: Multiple errors occurred ;-O 0=no 1=prom_panic(yes)
  * SYNDROME: Controller is mentally unstable.
  * DWORD:
  * UNC: Uncorrectable error.  0=no 1=yes
index 0ab7fbe..b77ed29 100644 (file)
@@ -72,7+72,7 @@ struct fbgattr {
         int     emu_types[FB_ATTR_NEMUTYPES]; /* supported emulations */
 };
 #define FBIOSATTR  _IOW('F', 5, struct fbgattr) /* Unsupported: */
-#define FBIOGATTR  _IOR('F', 6, struct fbgattr)        /* supporoted */
+#define FBIOGATTR  _IOR('F', 6, struct fbgattr)        /* supported */
 
 #define FBIOSVIDEO _IOW('F', 7, int)
 #define FBIOGVIDEO _IOR('F', 8, int)
index 1c6eac3..f07d2c9 100644 (file)
@@ -94,7+94,7 @@ static int FDC2=-1;
 #define N_FDC    1
 #define N_DRIVE  8
 
-/* No 64k boundry crossing problems on the Sparc. */
+/* No 64k boundary crossing problems on the Sparc. */
 #define CROSS_64KB(a,s) (0)
 
 /* Routines unique to each controller type on a Sun. */
@@ -345,7+345,7 @@ static int sun_floppy_init(void)
        fdc_status = &sun_fdc->status_82077;
 
        /* This controller detection technique is from the netbsd
-        * Sun floppy driver, origionally Chris Torek of BSDI came
+        * Sun floppy driver, originally Chris Torek of BSDI came
         * up with this.  It seems to work pretty well.
         */
        if(sun_fdc->dor_82077 == 0x80) {
@@ -359,7+359,7 @@ static int sun_floppy_init(void)
        }
 
        /* P3: The only reliable way which I found for ejection
-        * of boot floppy. AUXIO_FLPY_EJCT is not enougth alone.
+        * of boot floppy. AUXIO_FLPY_EJCT is not enough alone.
         */
        set_auxio(AUXIO_FLPY_EJCT, 0); /* Bring EJECT line to normal. */
        udelay(1000);
index 53a4c63..1dadaa4 100644 (file)
@@ -8,7+8,7 @@
 #define SRMMU_L1_KBASE_OFFSET ((KERNBASE>>24)<<2)  /* Used in boot remapping. */
 #define INTS_ENAB        0x01           /* entry.S uses this. */
 
-#define NCPUS            4              /* Architectual limit of sun4m. */
+#define NCPUS            4              /* Architectural limit of sun4m. */
 
 #define SUN4_PROM_VECTOR 0xFFE81000     /* To safely die on a SUN4 */
 #define SUN4_PRINTF      0x84           /* Offset into SUN4_PROM_VECTOR */
 
 /* NMI's (Non Maskable Interrupts) are special, you can't keep them
  * from coming in, and basically if you get one, the shows over. ;(
- * On the sun4c they are usually asyncronous memory errors, on the
+ * On the sun4c they are usually asynchronous memory errors, on the
  * the sun4m they could be either due to mem errors or a software
  * initiated interrupt from the prom/kern on an SMP box saying "I
  * command you to do CPU tricks, read your mailbox for more info."
index 391592a..0d1860d 100644 (file)
@@ -45,7+45,7 @@ extern unsigned int viking_rev, swift_rev, cypress_rev;
 extern unsigned int hwbug_bitmask;
 
 /* First the module type values. To find out which you have, just load
- * the mmu control register from ASI_M_MMUREG alternate adress space and
+ * the mmu control register from ASI_M_MMUREG alternate address space and
  * shift the value right 28 bits.
  */
 /* IMPL field means the company which produced the chip. */
index 71442dd..6f9adf6 100644 (file)
 #define SUN4C_SYNC_SIZE      0x0002  /* bad access size? whuz this? */
 #define SUN4C_SYNC_PARITY    0x0008  /* bad ram chips caused a parity error */
 #define SUN4C_SYNC_SBUS      0x0010  /* the SBUS had some problems... */
-#define SUN4C_SYNC_NOMEM     0x0020  /* translation to non-existant ram */
+#define SUN4C_SYNC_NOMEM     0x0020  /* translation to non-existent ram */
 #define SUN4C_SYNC_PROT      0x0040  /* access violated pte protections */
 #define SUN4C_SYNC_NPRESENT  0x0080  /* pte said that page was not present */
 #define SUN4C_SYNC_BADWRITE  0x8000  /* while writing something went bogus */
index b4968bd..2198ef5 100644 (file)
 #define MAP_NORESERVE   0x40            /* don't reserve swap pages */
 #define MAP_INHERIT     0x80            /* SunOS doesn't do this, but... */
 #define MAP_LOCKED      0x100           /* lock the mapping */
-#define _MAP_NEW        0x80000000      /* Binary compatability is fun... */
+#define _MAP_NEW        0x80000000      /* Binary compatibility is fun... */
 
 #define MAP_GROWSDOWN  0x0100          /* stack-like segment */
 #define MAP_DENYWRITE  0x0800          /* ETXTBSY */
index 27d792a..e90aa01 100644 (file)
@@ -29,7+29,7 @@ extern struct mostek48t02 *mstk48t02_regs;
 /* Control register values. */
 #define MSTK_CREG_WRITE    0x80   /* Must set this before placing values. */
 #define MSTK_CREG_READ     0x40   /* Stop the clock, I want to fetch values. */
-#define MSTK_CREG_SIGN     0x20   /* Grrr... whats this??? */
+#define MSTK_CREG_SIGN     0x20   /* Grrr... what's this??? */
 
 #define MSTK_YR_ZERO       1968   /* If year reg has zero, it is 1968 */
 #define MSTK_CVT_YEAR(yr)  ((yr) + MSTK_YR_ZERO)
index 9bece9f..a8fa324 100644 (file)
  */
 #define MAILBOX_BPT_SPIN      0xfd
 
-/* Oh geese, some other nitwit got a damn watchdog reset.  The partys
+/* Oh geese, some other nitwit got a damn watchdog reset.  The party's
  * over so go call prom_stopcpu().
  */
 #define MAILBOX_WDOG_STOP     0xfe
index e5cd826..278e245 100644 (file)
  *  31   30 29  28  27  26  25 24-15  14-7   6  5-3   2-0
  *
  * ME: Multiple Errors have occurred
- * CE: Cache consistancy Error
+ * CE: Cache consistency Error
  * PEW: Parity Error during a Write operation
  * PEE: Parity Error involving the External cache
  * ASE: ASynchronous Error
index 3155a4d..8362e02 100644 (file)
@@ -8,7+8,7 @@
  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
  */
 
-/* Imperical constants... */
+/* Empirical constants... */
 #define KADB_DEBUGGER_BEGVM     0xffc00000    /* Where kern debugger is in virt-mem */
 #define        LINUX_OPPROM_BEGVM      0xffd00000
 #define        LINUX_OPPROM_ENDVM      0xfff00000
index 15acacd..e2b9c41 100644 (file)
@@ -15,7+15,7 @@ extern struct linux_romvec *romvec;
 
 /* Enumeration to describe the prom major version we have detected. */
 enum prom_major_version {
-       PROM_V0,      /* Origional sun4c V0 prom */
+       PROM_V0,      /* Original sun4c V0 prom */
        PROM_V2,      /* sun4c and early sun4m V2 prom */
        PROM_V3,      /* sun4m and later, up to sun4d/sun4e machines V3 */
        PROM_P1275,   /* IEEE compliant ISA based Sun PROM, only sun4u */
@@ -83,7+83,7 @@ extern void prom_seek(int device_handle, unsigned int seek_hival,
  * entries.  One for the total amount of physical ram on the machine, one
  * for the amount of physical ram available, and one describing the virtual
  * areas which are allocated by the prom.  So, in a sense the physical
- * available is a calculation of the total physical minus the physcial mapped
+ * available is a calculation of the total physical minus the physical mapped
  * by the prom with virtual mappings.
  *
  * These lists are returned pre-sorted, this should make your life easier
index bbbda73..84cc8dd 100644 (file)
@@ -1,6+1,6 @@
 /* $Id: pconf.h,v 1.2 1995/11/25 02:32:20 davem Exp $
  * pconf.h: pathconf() and fpathconf() defines for SunOS
- *          system call compatability.
+ *          system call compatibility.
  *
  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
  */
 
 #define _PCONF_LINK       1 /* Max number of links to an object        */
 #define _PCONF_CANON      2 /* TTY input buffer line size              */
-#define _PCONF_INPUT      3 /* Biggest packet a tty can inbibe at once */
+#define _PCONF_INPUT      3 /* Biggest packet a tty can imbibe at once */
 #define _PCONF_NAME       4 /* Filename length max                     */
 #define _PCONF_PATH       5 /* Max size of a pathname                  */
 #define _PCONF_PIPE       6 /* Buffer size for a pipe                  */
index a3c86e7..782a3d8 100644 (file)
@@ -160,7+160,7 @@ extern inline unsigned int srmmu_get_faddr(void)
        return retval;
 }
 
-/* This is guarenteed on all SRMMU's. */
+/* This is guaranteed on all SRMMU's. */
 extern inline void srmmu_flush_whole_tlb(void)
 {
        __asm__ __volatile__("sta %%g0, [%0] %1\n\t": :
index a070021..56e4375 100644 (file)
@@ -72,7+72,7 @@ extern _inline_ int smp_processor_id(void)
        return cpuid;
 }
 
-/* Imperical PROM processor mailbox constants.  If the per-cpu mailbox
+/* Empirical PROM processor mailbox constants.  If the per-cpu mailbox
  * contains something other than one of these then the ipi is from
  * Linux's active_kernel_processor.  This facility exists so that
  * the boot monitor can capture all the other cpus when one catches
index 8ce9604..23f3ea1 100644 (file)
@@ -1,5+1,5 @@
 /* $Id: solerrno.h,v 1.3 1995/11/25 02:32:51 davem Exp $
- * solerrno.h: Solaris error return codes for compatability.
+ * solerrno.h: Solaris error return codes for compatibility.
  *
  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
  */
 #define        SOL_EPIPE          32    /* Call a plumber                   */
 #define        SOL_EDOM           33    /* Argument was out of fct domain   */
 #define        SOL_ERANGE         34    /* Could not represent math result  */
-#define        SOL_ENOMSG         35    /* Message of req type doesnt exist */
+#define        SOL_ENOMSG         35    /* Message of req type doesn't exist */
 #define        SOL_EIDRM          36    /* Identifier has been removed      */
 #define        SOL_ECHRNG         37    /* Req channel number out of range  */
 #define        SOL_EL2NSYNC       38    /* Could not sync at run level 2    */
index 5093779..8bdc39f 100644 (file)
@@ -67,7+67,7 @@ extern __inline__ unsigned long get_tbr(void)
 /* First, hardware traps. */
 #define SP_TRAP_TFLT    0x1          /* Text fault */
 #define SP_TRAP_II      0x2          /* Illegal Instruction */
-#define SP_TRAP_PI      0x3          /* Priviledged Instruction */
+#define SP_TRAP_PI      0x3          /* Privileged Instruction */
 #define SP_TRAP_FPD     0x4          /* Floating Point Disabled */
 #define SP_TRAP_WOVF    0x5          /* Window Overflow */
 #define SP_TRAP_WUNF    0x6          /* Window Underflow */
index 9a12399..801f3c0 100644 (file)
  *
  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
  *
- * SunOS compatability based upon preliminary work which is:
+ * SunOS compatibility based upon preliminary work which is:
  *
  * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu)
  */
index 7527790..5c2ce4c 100644 (file)
 /* The indexing of cache lines creates a problem.  Because the line
  * field of a virtual address extends past the page offset within
  * the virtual address it is possible to have what are called
- * 'bad aliases' which will create inconsistancies.  So we must make
+ * 'bad aliases' which will create inconsistencies.  So we must make
  * sure that within a context that if a physical page is mapped
  * more than once, that 'extra' line bits are the same.  If this is
  * not the case, and thus is a 'bad alias' we must turn off the
index 00ac06b..8ce95e8 100644 (file)
 #define  DVMA_LEN       0x00040000  /* Size of the DVMA address space */
 #define  DVMA_END       0xfff40000
 
-/* IOMMU Mapping area, must be on a 16MB boundry!  Note this
+/* IOMMU Mapping area, must be on a 16MB boundary!  Note this
  * doesn't count the DVMA areas, the prom lives between the
  * iommu mapping area (for scsi transfer buffers) and the
  * dvma upper range (for lance packet ring buffers).
index e434869..a3d0167 100644 (file)
  */
 
 /*
- *     Define the set of importrant shared memory addresses. These are
- *     required to intialize the board and get things started. All of these
+ *     Define the set of important shared memory addresses. These are
+ *     required to initialize the board and get things started. All of these
  *     addresses are relative to the start of the shared memory.
  */
 #define        CDK_SIGADDR     0x200
@@ -204,7+204,7 @@ typedef struct cdkmem {
 
 /*
  *     Define the port setting structure, and all those defines that go along
- *     with it. Basically this structure defines the charcateristics of this
+ *     with it. Basically this structure defines the characteristics of this
  *     port: baud rate, chars, parity, input/output char cooking etc.
  */
 typedef struct asyport {
@@ -374,7+374,7 @@ typedef struct {
 /*
  *     Define the stats structure kept for each port. This is a useful set
  *     of data collected for each port on the slave. The A_GETSTATS command
- *     is used to retrive this data from the slave.
+ *     is used to retrieve this data from the slave.
  */
 typedef struct asystats {
        unsigned long   opens;
@@ -430,7+430,7 @@ typedef struct cdkctrl {
  *     Each device on the slave passes data to and from the host via a ring
  *     queue in shared memory. Define a ring queue structure to hold the
  *     vital information about each ring queue. Two ring queues will be
- *     allocated for each port, one for reveice data and one for transmit
+ *     allocated for each port, one for receive data and one for transmit
  *     data.
  */
 typedef struct cdkasyrq {
@@ -443,7+443,7 @@ typedef struct cdkasyrq {
 /*
  *     Each asynchronous port is defined in shared memory by the following
  *     structure. It contains a control block to command a device, and also
- *     the neccessary data channel information as well.
+ *     the necessary data channel information as well.
  */
 typedef struct cdkasy {
        cdkctrl_t       ctrl;
@@ -461,7+461,7 @@ typedef struct cdkasy {
 
 /*
  *     Define the set of ioctls used by the driver to do special things
- *     to the board. These include interrupting it, and initializeing
+ *     to the board. These include interrupting it, and initializing
  *     the driver after board startup and shutdown.
  */
 #include <linux/ioctl.h>
index 5bb4f0b..aba1458 100644 (file)
@@ -179,7+179,7 @@ struct cdrom_read
 };
 
 /*
- * extensions for transfering audio frames
+ * extensions for transferring audio frames
  * currently used by sbpcd.c, cdu31a.c, ide-cd.c
  */
 struct cdrom_read_audio
index 7b21636..5efe3d4 100644 (file)
                   dc_mask_transmit_ready)
 
 /* now some constants related to the cm206 */
-/* another drive status byte, echoed by the cm206 on most commmands */
+/* another drive status byte, echoed by the cm206 on most commands */
 
 #define dsb_error_condition 0x1
 #define dsb_play_in_progress 0x4
index edfd286..65bf7e7 100644 (file)
@@ -68,7+68,7 @@ typedef struct {
 
 
 /*
- *     Board stats structure. Returns usefull info about the board.
+ *     Board stats structure. Returns useful info about the board.
  */
 
 #define        COM_MAXPANELS   8
index f298757..a84f46e 100644 (file)
@@ -24,7+24,7 @@ typedef elf_fpregset_t fpregset_t;
 #endif
 
 /*
- * Definitons to generate Intel SVR4-like core files.
+ * Definitions to generate Intel SVR4-like core files.
  * These mostly have the same names as the SVR4 types with "elf_"
  * tacked on the front to prevent clashes with linux definitions,
  * and the typedef forms have been avoided.  This is mostly like
index c33dcb8..fbc1c5b 100644 (file)
@@ -113,7+113,7 @@ typedef char floppy_drive_name[16];
 
 
 /*
- * Drive parameters (user modifyable)
+ * Drive parameters (user modifiable)
  */
 struct floppy_drive_params {
        char cmos;                      /* cmos type */
@@ -185,7+185,7 @@ enum {
 
 
 /*
- * Current drive state (not directly modifyable by user, readonly)
+ * Current drive state (not directly modifiable by user, readonly)
  */
 struct floppy_drive_struct {
        signed char flags;
@@ -340,7+340,7 @@ struct floppy_raw_cmd {
        void *data;
        char *kernel_data; /* location of data buffer in the kernel */
        struct floppy_raw_cmd *next; /* used for chaining of raw cmd's 
-                                     * withing the kernel */
+                                     * within the kernel */
        long length; /* in: length of dma transfer. out: remaining bytes */
        long phys_length; /* physical length, if different from dma length */
        int buffer_length; /* length of allocated buffer */
index 175ef28..fe8257c 100644 (file)
@@ -320,7+320,7 @@ struct file {
        loff_t f_pos;
        unsigned short f_flags;
        unsigned short f_count;
-       loff_t f_reada;
+       unsigned long f_reada, f_ramax, f_rapos, f_ralen;
        struct file *f_next, *f_prev;
        int f_owner;            /* pid or -pgrp where SIGIO should be sent */
        struct inode * f_inode;
index 8f018fe..fccc742 100644 (file)
@@ -9,7+9,7 @@
  */
 
 
-/* The Interface Card default address is 0x340. This will work fo most
+/* The Interface Card default address is 0x340. This will work for most
    applications. Address selection is accomplished by jumpers PN801-1 to
    PN801-4 on the GoldStar Interface Card.
    Appropriate settings are: 0x300, 0x310, 0x320, 0x330, 0x340, 0x350, 0x360
index 7b6286e..4f49647 100644 (file)
 #define WIN_SETIDLE1           0xE3
 #define WIN_SETIDLE2           0x97
 
-#define WIN_DOORLOCK           0xde    /* lock door on removeable drives */
-#define WIN_DOORUNLOCK         0xdf    /* unlock door on removeable drives */
+#define WIN_DOORLOCK           0xde    /* lock door on removable drives */
+#define WIN_DOORUNLOCK         0xdf    /* unlock door on removable drives */
 
 #define WIN_MULTREAD           0xC4    /* read sectors using multiple mode */
 #define WIN_MULTWRITE          0xC5    /* write sectors using multiple mode */
index 3883c75..320dbeb 100644 (file)
@@ -2,7+2,7 @@
  * Equalizer Load-balancer for serial network interfaces.
  *
  * (c) Copyright 1995 Simon "Guru Aleph-Null" Janes
- * NCM: Network and Communications Mangement, Inc.
+ * NCM: Network and Communications Management, Inc.
  *
  *
  *     This software may be used and distributed according to the terms
index ece365b..dd09d83 100644 (file)
 #define ETH_P_DDCMP     0x0006          /* DEC DDCMP: Internal only     */
 #define ETH_P_WAN_PPP   0x0007          /* Dummy type for WAN PPP frames*/
 #define ETH_P_PPP_MP    0x0008          /* Dummy type for PPP MP frames */
-#define ETH_P_LOCALTALK 0x0009         /* Localtalk pseudeo type       */
+#define ETH_P_LOCALTALK 0x0009         /* Localtalk pseudo type        */
 #define ETH_P_PPPTALK  0x0010          /* Dummy type for Atalk over PPP*/
 #define ETH_P_TR_802_2 0x0011          /* 802.2 frames                 */
 
index d5d8d56..928e8d9 100644 (file)
@@ -1,7+1,7 @@
 /*
  * DLCI/FRAD   Definitions for Frame Relay Access Devices.  DLCI devices are
  *             created for each DLCI associated with a FRAD.  The FRAD driver
- *             is not truely a network device, but the lower level device
+ *             is not truly a network device, but the lower level device
  *             handler.  This allows other FRAD manufacturers to use the DLCI
  *             code, including it's RFC1490 encapsulation along side the current
  *             implementation for the Sangoma cards.
 #ifndef _FRAD_H_
 #define _FRAD_H_
 
-/* Stuctures and constants associated with the DLCI device driver */
+/* Structures and constants associated with the DLCI device driver */
 
 #define DLCI_DEVADD    (SIOCDEVPRIVATE)
 #define DLCI_DEVDEL    (SIOCDEVPRIVATE + 1)
index 7291c59..1d3a750 100644 (file)
  */
 
 struct npioctl {
-    int                protocol;       /* PPP procotol, e.g. PPP_IP */
+    int                protocol;       /* PPP protocol, e.g. PPP_IP */
     enum NPmode        mode;
 };
 
index bb70de3..cca15f8 100644 (file)
@@ -43,11+43,11 @@ struct wic_net {
 #define NET_MODE_MCAST         0x04    /* receive mcasts */
 #define NET_MODE_PROM          0x08    /* promiscuous */
 #define NET_MODE_HC            0x10    /* is a hop coordinator */
-#define NET_MODE_HC_VALID      0x20    /* hc addres is valid */
+#define NET_MODE_HC_VALID      0x20    /* hc address is valid */
 #define NET_MODE_HCAP          0x40    /* hc is also ap */
 #define NET_MODE_HC_KNOWN      0x80    /* hc is known */
-       unsigned char rts_lo;           /* rts threshhold */
-       unsigned char rts_hi;           /* rts threshhold */
+       unsigned char rts_lo;           /* rts threshold */
+       unsigned char rts_hi;           /* rts threshold */
        unsigned char retry;            /* retry limit */
        unsigned char hc_ula[6];        /* ula of hc */
        unsigned char key[4];           /* network key */
@@ -86,12+86,12 @@ struct wic_sys {
        unsigned char cca_mode;         /* cca flags */
 #define CCA_PKT_DET_BSY                0x01    /* busy if packet is detected */
 #define CCA_VIRT_CARR          0x02    /* use virtual carrier */
-#define CCA_RSSI_BSY           0x04    /* busy if rssi > thresshold */
+#define CCA_RSSI_BSY           0x04    /* busy if rssi > threshold */
 #define CCA_DATA_BSY           0x08    /* busy if valid data > XXX usec */
        unsigned char dwell_hi;         /* dwell time */
        unsigned char dwell_lo;         /* dwell time */
        unsigned char hc_timeout;       /* HC timeout */
-       unsigned char rssi;             /* rssi threshhold */
+       unsigned char rssi;             /* rssi threshold */
        unsigned char hc_rssi;          /* rssi of last hc frame */
        unsigned char hc_rssi_chan;     /* channel of hc rssi value */
 };
index 3b0c61b..f764824 100644 (file)
 #define ISDN_USAGE_EXCLUSIVE 64 /* This bit is set, if channel is exclusive */
 #define ISDN_USAGE_OUTGOING 128 /* This bit is set, if channel is outgoing  */
 
-#define ISDN_MODEM_ANZREG    20        /* Number of Medem-Registers        */
+#define ISDN_MODEM_ANZREG    20        /* Number of Modem-Registers        */
 #define ISDN_MSNLEN          20
 
 typedef struct {
@@ -240,7+240,7 @@ typedef struct {
 #define ISDN_NET_CALLBACK   0x04       /* callback incoming phonenumber     */
 #define ISDN_NET_CLONE      0x08       /* clone a tmp interface when called */
 #define ISDN_NET_TMP        0x10       /* tmp interface until getting an IP */
-#define ISDN_NET_DYNAMIC    0x20       /* this link is dynamically allocted */
+#define ISDN_NET_DYNAMIC    0x20       /* this link is dynamically allocated */
 #define ISDN_NET_MAGIC      0x49344C02 /* for paranoia-checking             */
 
 /* Phone-list-element */
@@ -263,7+263,7 @@ typedef struct isdn_net_local_s {
   int                    flags;        /* Connection-flags                 */
   int                    dialstate;    /* State for dialing                */
   int                    dialretry;    /* Counter for Dialout-retries      */
-  int                    dialmax;      /* Max. Nuber of Dial-retries       */
+  int                    dialmax;      /* Max. Number of Dial-retries      */
   char                   msn[ISDN_MSNLEN]; /* MSNs/EAZs for this interface */
   int                    dtimer;       /* Timeout-counter for dialing      */
   u_char                 p_encap;      /* Packet encapsulation             */
@@ -405,7+405,7 @@ typedef struct {
   char                mdmcmd[255];     /* Modem-Commandbuffer              */
 } atemu;
 
-/* Descripion of one ISDN-tty */
+/* Description of one ISDN-tty */
 typedef struct {
   int                msr[ISDN_MAX_CHANNELS];     /* Modem-statusregister   */
   int                mlr[ISDN_MAX_CHANNELS];     /* Line-statusregister    */
index 53c683c..18652e9 100644 (file)
  *  Jon Tombs, Bjorn Ekwall (module support)
  *  Daniel v. Mosnenck (he sent me the Technical and Programming Reference)
  *  Gerd Knorr (he lent me his PhotoCD)
- *  Nils Faerber and Roger E. Wolff (extensivly tested the LU portion)
+ *  Nils Faerber and Roger E. Wolff (extensively tested the LU portion)
  *  Andreas Kies (testing the mysterious hang up's)
  *  ... somebody forgotten?
  *  
index 6ff1e97..c74b1db 100644 (file)
@@ -9,6+9,7 @@
 extern unsigned long high_memory;
 
 #include <asm/page.h>
+#include <asm/atomic.h>
 
 #ifdef __KERNEL__
 
@@ -115,17+116,8 @@ struct vm_operations_struct {
  * page-cache.  -- sct 
  */
 typedef struct page {
-       unsigned int count;
-       unsigned dirty:16,
-                age:8,
-                uptodate:1,
-                error:1,
-                referenced:1,
-                locked:1,
-                free_after:1,
-                dma:1,
-                unused:1,
-                reserved:1;
+       atomic_t count;
+       unsigned flags; /* atomic flags, some possibly updated asynchronously */
        struct wait_queue *wait;
        struct page *next;
 
@@ -137,8+129,29 @@ typedef struct page {
        struct page *prev;
        struct page *prev_hash;
        struct buffer_head * buffers;
+       unsigned dirty:16,
+                age:8;
 } mem_map_t;
 
+/* Page flag bit values */
+#define PG_locked       0
+#define PG_error        1
+#define PG_referenced   2
+#define PG_uptodate     3
+#define PG_freeafter    4
+#define PG_DMA          5
+#define PG_reserved    31
+
+/* Make it prettier to test the above... */
+#define PageLocked(page)       (test_bit(PG_locked, &(page)->flags))
+#define PageError(page)                (test_bit(PG_error, &(page)->flags))
+#define PageReferenced(page)   (test_bit(PG_referenced, &(page)->flags))
+#define PageDirty(page)                (test_bit(PG_dirty, &(page)->flags))
+#define PageUptodate(page)     (test_bit(PG_uptodate, &(page)->flags))
+#define PageFreeafter(page)    (test_bit(PG_freeafter, &(page)->flags))
+#define PageDMA(page)          (test_bit(PG_DMA, &(page)->flags))
+#define PageReserved(page)     (test_bit(PG_reserved, &(page)->flags))
+
 extern mem_map_t * mem_map;
 
 /*
@@ -251,21+264,22 @@ static inline int expand_stack(struct vm_area_struct * vma, unsigned long addres
 static inline struct vm_area_struct * find_vma (struct task_struct * task, unsigned long addr)
 {
        struct vm_area_struct * result = NULL;
-       struct vm_area_struct * tree;
 
-       if (!task->mm)
-               return NULL;
-       for (tree = task->mm->mmap_avl ; ; ) {
-               if (tree == avl_empty)
-                       return result;
-               if (tree->vm_end > addr) {
-                       if (tree->vm_start <= addr)
-                               return tree;
-                       result = tree;
-                       tree = tree->vm_avl_left;
-               } else
-                       tree = tree->vm_avl_right;
+       if (task->mm) {
+               struct vm_area_struct * tree = task->mm->mmap_avl;
+               for (;;) {
+                       if (tree == avl_empty)
+                               break;
+                       if (tree->vm_end > addr) {
+                               result = tree;
+                               if (tree->vm_start <= addr)
+                                       break;
+                               tree = tree->vm_avl_left;
+                       } else
+                               tree = tree->vm_avl_right;
+               }
        }
+       return result;
 }
 
 /* Look up the first VMA which intersects the interval start_addr..end_addr-1,
index 451c03f..3bc0430 100644 (file)
@@ -3,4+3,6 @@
 
 #include <asm/mman.h>
 
+#define MREMAP_MAYMOVE 1
+
 #endif /* _LINUX_MMAN_H */
index c93eb54..ab217e5 100644 (file)
@@ -269,7+269,7 @@ extern __inline__ void  dev_unlock_list(void)
 }
 
 /*
- *     This almost never occurs, isnt in performance critical paths
+ *     This almost never occurs, isn't in performance critical paths
  *     and we can thus be relaxed about it
  */
  
index 9cd0cb7..5c8147e 100644 (file)
 
 #define NFS_SERVER(inode)              (&(inode)->i_sb->u.nfs_sb.s_server)
 #define NFS_FH(inode)                  (&(inode)->u.nfs_i.fhandle)
+#define NFS_RENAMED_DIR(inode)         ((inode)->u.nfs_i.silly_rename_dir)
 #define NFS_READTIME(inode)            ((inode)->u.nfs_i.read_cache_jiffies)
 #define NFS_OLDMTIME(inode)            ((inode)->u.nfs_i.read_cache_mtime)
 #define NFS_CACHEINV(inode) \
@@ -123,6+124,7 @@ extern struct inode_operations nfs_file_inode_operations;
 /* linux/fs/nfs/dir.c */
 
 extern struct inode_operations nfs_dir_inode_operations;
+extern void nfs_sillyrename_cleanup(struct inode *);
 extern void nfs_kfree_cache(void);
 
 /* linux/fs/nfs/symlink.c */
index bd9229f..a49981c 100644 (file)
@@ -22,6+22,12 @@ struct nfs_inode_info {
         */
        unsigned long read_cache_jiffies;
        unsigned long read_cache_mtime;
+       /*
+        * This is to support the clandestine rename on unlink.
+        * Instead of the directory inode, we might as well keep its
+        * NFS FH, but that requires a kmalloc.
+        */
+       struct inode *silly_rename_dir;
 };
 
 #endif
index f1f5a14..1fe0d81 100644 (file)
@@ -47,7+47,6 @@ static inline unsigned long _page_hashfn(struct inode * inode, unsigned long off
 static inline struct page * find_page(struct inode * inode, unsigned long offset)
 {
        struct page *page;
-       unsigned long flags;
 
        for (page = page_hash(inode, offset); page ; page = page->next_hash) {
                if (page->inode != inode)
@@ -55,11+54,8 @@ static inline struct page * find_page(struct inode * inode, unsigned long offset
                if (page->offset != offset)
                        continue;
                /* Found the page. */
-               save_flags(flags);
-               cli();
-               page->referenced = 1;
-               page->count++;
-               restore_flags(flags);
+               atomic_inc(&page->count);
+               set_bit(PG_referenced, &page->flags);
                break;
        }
        return page;
@@ -84,7+80,7 @@ static inline void add_page_to_hash_queue(struct inode * inode, struct page * pa
        struct page **p = &page_hash(inode,page->offset);
 
        page_cache_size++;
-       page->referenced = 1;
+       set_bit(PG_referenced, &page->flags);
        page->age = PAGE_AGE_VALUE;
        page->prev_hash = NULL;
        if ((page->next_hash = *p) != NULL)
@@ -123,7+119,7 @@ static inline void add_page_to_inode_queue(struct inode * inode, struct page * p
 extern void __wait_on_page(struct page *);
 static inline void wait_on_page(struct page * page)
 {
-       if (page->locked)
+       if (PageLocked(page))
                __wait_on_page(page);
 }
 
index 95d1396..020304a 100644 (file)
 
 /*     PROCEDURE TO REPORT NEW PCI DEVICES
  * We are trying to collect informations on new PCI devices, using
- * the standart PCI identification procedure. If some warning is
+ * the standard PCI identification procedure. If some warning is
  * displayed at boot time, please report 
  *     - /proc/pci
  *     - your exact hardware description. Try to find out
index a418dbf..91882ed 100644 (file)
@@ -131,7+131,7 @@ enum scsi_directory_inos {
        PROC_SCSI_PPA,
        PROC_SCSI_SCSI_DEBUG,   
        PROC_SCSI_NOT_PRESENT,
-       PROC_SCSI_FILE,                        /* I'm asuming here that we */
+       PROC_SCSI_FILE,                        /* I'm assuming here that we */
        PROC_SCSI_LAST = (PROC_SCSI_FILE + 16) /* won't ever see more than */
 };                                             /* 16 HBAs in one machine   */
 
index 709c622..b4afe77 100644 (file)
 #define USRQUOTA  0            /* element used for user quotas */
 #define GRPQUOTA  1            /* element used for group quotas */
 
-#include <linux/mount.h>
-
 /*
  * Definitions for the default names of the quotas files.
  */
@@ -150,8+148,10 @@ struct dqstats {
 
 #ifdef __KERNEL__
 
+#include <linux/mount.h>
+
 /*
- * Maximum lenght of a message generated in the quota system,
+ * Maximum length of a message generated in the quota system,
  * that needs to be kicked onto the tty.
  */
 #define MAX_QUOTA_MESSAGE 75
index 36fbf1a..ab159fc 100644 (file)
@@ -1,7+1,7 @@
 /*
  *  rpcsock.h  Declarations for the RPC call interface.
  *
- *  Coypright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de>
+ *  Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de>
  */
 
 
index fa6977d..0ad0945 100644 (file)
@@ -163,7+163,7 @@ struct scc_stat {
         long spints;            /* Special receiver interrupts */
 
         long txframes;          /* Packets sent */
-        long rxframes;          /* Number of Frames Actally Received */
+        long rxframes;          /* Number of Frames Actually Received */
         long rxerrs;            /* CRC Errors */
         long txerrs;           /* KISS errors */
         
@@ -192,7+192,7 @@ struct scc_modem {
 };
 
 struct ioctl_command {
-       int      command;       /* one of the KISS-Commands devined above */
+       int      command;       /* one of the KISS-Commands defined above */
        unsigned param;         /* KISS-Param */
 };
 
index 4469b32..baae87c 100644 (file)
@@ -67,7+67,7 @@ struct sdla_mem {
 #define SDLA_WINDOW_SIZE               0x2000
 #define SDLA_ADDR_MASK                 0x1FFF
 
-/* largest handlable block of data */
+/* largest handleable block of data */
 #define SDLA_MAX_DATA                  4080
 #define SDLA_MAX_MTU                   4072    /* MAX_DATA - sizeof(fradhdr) */
 #define SDLA_MAX_DLCI                  24
index 79bb1aa..0aa5e71 100644 (file)
 #define S_READ_DATA( port, buf, nr )      insb( port, buf, nr )
 
 /*
- * We assume that there are no audio disks with TOC lenght more than this
- * number (I personally have never seen disks with morethan 20 fragments).
+ * We assume that there are no audio disks with TOC length more than this
+ * number (I personally have never seen disks with more than 20 fragments).
  */
 #define SJCD_MAX_TRACKS                100
 
index d670a49..176e88c 100644 (file)
 #define ERRnotconnected 233     /* No process on other end of named pipe */
 #define ERRmoredata 234         /* More data to be returned */
 #define ERROR_EAS_DIDNT_FIT 275 /* Extended attributes didn't fit */
-#define ERROR_EAS_NOT_SUPPORTED 282 /* Extended attributes not suppored */
+#define ERROR_EAS_NOT_SUPPORTED 282 /* Extended attributes not supported */
 
 /* Error codes for the ERRSRV class */
 
index 94ff51f..8ffbeb5 100644 (file)
@@ -78,7+78,7 @@ struct msghdr
 
 #define PF_MAX         AF_MAX
 
-/* Maximum queue length specificable by listen.  */
+/* Maximum queue length specifiable by listen.  */
 #define SOMAXCONN      128
 
 /* Flags we can use with send/ and recv. */
index 18ba26c..0345541 100644 (file)
  *     Sample loading mechanism for internal synthesizers (/dev/sequencer)
  *     The following patch_info structure has been designed to support
  *     Gravis UltraSound. It tries to be universal format for uploading
- *     sample based patches but is propably too limited.
+ *     sample based patches but is probably too limited.
  */
 
 struct patch_info {
@@ -575,7+575,7 @@ typedef struct {
  * Buffer status queries.
  */
 typedef struct audio_buf_info {
-                       int fragments;  /* # of available fragments (partially usend ones not counted) */
+                       int fragments;  /* # of available fragments (partially used ones not counted) */
                        int fragstotal; /* Total # of fragments allocated */
                        int fragsize;   /* Size of a fragment in bytes */
 
@@ -722,7+722,7 @@ typedef struct copr_msg {
 /* 
  * The AD1848 codec and compatibles have three line level inputs
  * (line, aux1 and aux2). Since each card manufacturer have assigned
- * different meanings to these inputs, it's inpractical to assign
+ * different meanings to these inputs, it's impractical to assign
  * specific meanings (line, cd, synth etc.) to them.
  */
 #define SOUND_MIXER_LINE1      14      /* Input source 1  (aux1) */
@@ -1077,7+1077,7 @@ void seqbuf_dump(void);   /* This function must be provided by programs */
 #define SEQ_PANNING(dev, voice, pos) SEQ_CONTROL(dev, voice, CTL_PAN, (pos+128) / 2)
 
 /*
- * Timing and syncronization macros
+ * Timing and synchronization macros
  */
 
 #define _TIMER_EVENT(ev, parm)         {_SEQ_NEEDBUF(8);\
index 3fbaf10..8de1b56 100644 (file)
@@ -62,7+62,7 @@ struct __sysctl_args {
 
 /* CTL_VM names: */
 #define VM_SWAPCTL     1       /* struct: Set vm swapping control */
-#define VM_KSWAPD      2       /* struct: control background pagout */
+#define VM_KSWAPD      2       /* struct: control background pageout */
 #define VM_FREEPG      3       /* struct: Set free page thresholds */
 #define VM_BDFLUSH     4       /* struct: Control buffer cache flushing */
 #define VM_MAXID       5
index 0b1ab37..0de6d4f 100644 (file)
@@ -202,7+202,7 @@ struct timex {
 #define TIME_INS       1       /* insert leap second */
 #define TIME_DEL       2       /* delete leap second */
 #define TIME_OOP       3       /* leap second in progress */
-#define TIME_WAIT      4       /* leap second has occured */
+#define TIME_WAIT      4       /* leap second has occurred */
 #define TIME_ERROR     5       /* clock not synchronized */
 #define TIME_BAD       TIME_ERROR /* bw compat */
 
index 667a2fa..3a54797 100644 (file)
  *             _GUS_VOICEOFF   - Stops voice (no parameters)
  *             _GUS_VOICEFADE  - Stops the voice smoothly.
  *             _GUS_VOICEMODE  - Alters the voice mode, don't start or stop voice (P1=voice mode)
- *             _GUS_VOICEBALA  - Sets voice balence (P1, 0=left, 7=middle and 15=right, default 7)
+ *             _GUS_VOICEBALA  - Sets voice balance (P1, 0=left, 7=middle and 15=right, default 7)
  *             _GUS_VOICEFREQ  - Sets voice (sample) playback frequency (P1=Hz)
  *             _GUS_VOICEVOL   - Sets voice volume (P1=volume, 0xfff=max, 0xeff=half, 0x000=off)
  *             _GUS_VOICEVOL2  - Sets voice volume (P1=volume, 0xfff=max, 0xeff=half, 0x000=off)
index 64ec739..13de8d4 100644 (file)
 #define vma_get_end(v) v->vm_end
 #define vma_get_page_prot(v) v->vm_page_prot
 
-#define mem_map_reserve(p) mem_map[p].reserved = 1
-#define mem_map_unreserve(p) mem_map[p].reserved = 0
+#define mem_map_reserve(p) set_bit(PG_reserved, &mem_map[p].flags)
+#define mem_map_unreserve(p) clear_bit(PG_reserved, &mem_map[p].flags)
 #define mem_map_inc_count(p) mem_map[p].count++
 #define mem_map_dec_count(p) mem_map[p].count--
 #endif
index 8956965..68b8a70 100644 (file)
@@ -1,2+1,2 @@
-/* Seperate to keep compilation of protocols.c simpler */
+/* Separate to keep compilation of protocols.c simpler */
 extern void ax25_proto_init(struct net_proto *pro);
index b6c023c..f1d6678 100644 (file)
 /*
  * the following defines are the initial values used when the 
  * bridge is booted.  These may be overridden when this bridge is
- * not the root bridge.  These are the reccomended default values 
+ * not the root bridge.  These are the recommended default values 
  * from the 802.1d specification.
  */
 #define BRIDGE_MAX_AGE         20
index 5e343bb..7892cc5 100644 (file)
 #define NR_DEFAULT_N2          3                       /* Number of Retries */
 #define        NR_DEFAULT_T4           (180 * PR_SLOWHZ)       /* Transport Busy Delay */
 #define        NR_DEFAULT_WINDOW       4                       /* Default Window Size  */
-#define        NR_DEFAULT_OBS          6                       /* Default Obscolesence Count */
+#define        NR_DEFAULT_OBS          6                       /* Default Obsolescence Count */
 #define        NR_DEFAULT_QUAL         10                      /* Default Neighbour Quality */
 #define        NR_DEFAULT_TTL          16                      /* Default Time To Live */
 #define NR_MODULUS             256
index f58c2d4..09ee699 100644 (file)
@@ -1,2+1,2 @@
-/* Seperate to keep compilation of protocols.c simpler */
+/* Separate to keep compilation of protocols.c simpler */
 extern void nr_proto_init(struct net_proto *pro);
index 70521ed..77c79d5 100644 (file)
  * Prevents LRU trashing, entries considered equivalent,
  * if the difference between last use times is less then this number.
  */
-#define RT_CACHE_BUBBLE_THRESHOULD     (HZ*5)
+#define RT_CACHE_BUBBLE_THRESHOLD      (HZ*5)
 
 #include <linux/route.h>
 
index 6da15d1..25d9208 100644 (file)
@@ -164,6+164,7 @@ struct sock
        __u32                   acked_seq;
        __u32                   copied_seq;
        __u32                   rcv_ack_seq;
+       unsigned short          rcv_ack_cnt;            /* count of same ack */
        __u32                   window_seq;
        __u32                   fin_seq;
        __u32                   urg_seq;
@@ -288,7+289,7 @@ struct sock
        struct tcphdr           dummy_th;
        struct timer_list       keepalive_timer;        /* TCP keepalive hack */
        struct timer_list       retransmit_timer;       /* TCP retransmit timer */
-       struct timer_list       ack_timer;              /* TCP delayed ack timer */
+       struct timer_list       delack_timer;           /* TCP delayed ack timer */
        int                     ip_xmit_timeout;        /* Why the timeout is running */
        struct rtable           *ip_route_cache;        /* Cached output route */
        unsigned char           ip_hdrincl;             /* Include headers ? */
index 2f71c23..dd63d71 100644 (file)
                                           stacks do signed 16bit maths! */
 #define MIN_WINDOW     2048
 #define MAX_ACK_BACKLOG        2
+#define MAX_DUP_ACKS   2
 #define MIN_WRITE_SPACE        2048
 #define TCP_WINDOW_DIFF        2048
 
@@ -150,6+151,7 @@ extern void tcp_send_fin(struct sock *sk);
 extern void tcp_send_synack(struct sock *, struct sock *, struct sk_buff *);
 extern void tcp_send_skb(struct sock *, struct sk_buff *);
 extern void tcp_send_ack(struct sock *sk);
+extern void tcp_send_delayed_ack(struct sock *sk, int timeout);
 extern void tcp_send_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th,
          struct proto *prot, struct options *opt, struct device *dev, int tos, int ttl);
 
@@ -162,6+164,7 @@ extern void tcp_cache_zap(void);
 /* tcp_timer.c */
 #define     tcp_reset_msl_timer(x,y,z) reset_timer(x,y,z)
 extern void tcp_reset_xmit_timer(struct sock *, int, unsigned long);
+extern void tcp_delack_timer(unsigned long);
 extern void tcp_retransmit_timer(unsigned long);
 
 /*
@@ -180,93+183,78 @@ static inline u32 tcp_init_seq(void)
        return tv.tv_usec+tv.tv_sec*1000000;
 }
 
-/*
- *      This function returns the amount that we can raise the
- *      usable window based on the following constraints
- *  
- *     1. The window can never be shrunk once it is offered (RFC 793)
- *     2. We limit memory per socket
- *     3. No reason to raise the window if the other side has
- *        lots of room to play with.
- */
-
-static __inline__ unsigned short tcp_raise_window(struct sock *sk)
+static __inline__ int tcp_old_window(struct sock * sk)
 {
-       long free_space;
-       long window;
-
-
-       /* 
-         * compute the actual window i.e. 
-         * old_window - received_bytes_on_that_win.
-        */
-       window = sk->window - (sk->acked_seq - sk->lastwin_seq);        
-
-       free_space = sock_rspace(sk);
-       if (free_space > 1024)
-               free_space &= ~0x3FF; /* make free space a multiple of 1024 */
-
-       if(sk->window_clamp)
-               free_space = min(sk->window_clamp, free_space);
-
-       if (sk->mss == 0)
-               sk->mss = sk->mtu;
-       if ( window < 0 ) {     
-               window = 0;
-               printk(KERN_DEBUG "TRW: win < 0 w=%d 1=%u 2=%u\n", 
-                      sk->window, sk->acked_seq, sk->lastwin_seq);
-       }
-       
-       if ( (free_space - window) >= min(sk->mss, MAX_WINDOW/2) )
-               return ((free_space - window) / sk->mss) * sk->mss;
-
-       return 0;
+       return sk->window - (sk->acked_seq - sk->lastwin_seq);
 }
 
-static __inline__ unsigned short tcp_select_window(struct sock *sk)
+static __inline__ int tcp_new_window(struct sock * sk)
 {
-       long free_space = sock_rspace(sk);
-       long window;
+       int window = sock_rspace(sk);
+
+       if (window > 1024)
+               window &= ~0x3FF;       /* make free space a multiple of 1024 */
 
-       if (free_space > 1024)
-               free_space &= ~0x3FF;   /* make free space a multiple of 1024 */
+       if (sk->window_clamp && sk->window_clamp < window)
+               window = sk->window_clamp;
 
-       if (sk->window_clamp)
-               free_space = min(sk->window_clamp, free_space);
-       
        /*
-        * compute the actual window i.e.
-        * old_window - received_bytes_on_that_win
+        * RFC 1122 says:
+        *
+        * "the suggested [SWS] avoidance algoritm for the receiver is to keep
+        *  RECV.NEXT + RCV.WIN fixed until:
+        *  RCV.BUFF - RCV.USER - RCV.WINDOW >= min(1/2 RCV.BUFF, MSS)"
+        *
+        * Experiments against BSD and Solaris machines show that following
+        * these rules results in the BSD and Solaris machines making very
+        * bad guesses about how much data they can have in flight.
+        *
+        * Instead we follow the BSD lead and offer a window that gives
+        * the size of the current free space, truncated to a multiple
+        * of 1024 bytes. If the window is smaller than
+        *      min(sk->mss, MAX_WINDOW/2)
+        * then we adversize the window as having size 0, unless this
+        * would shrink the window we offered last time.
+        * This results in as much as double the throughput as the original
+        * implementation.
         */
 
        if (sk->mss == 0)
                sk->mss = sk->mtu;
 
-       window = sk->window - (sk->acked_seq - sk->lastwin_seq);
+       /* BSD style SWS avoidance
+        * Note that RFC1122 only says we must do silly window avoidance,
+        * it does not require that we use the suggested algorithm.
+        */
 
-       if ( window < 0 ) {
+       if (window < min(sk->mss, MAX_WINDOW/2))
                window = 0;
-               printk(KERN_DEBUG "TSW: win < 0 w=%d 1=%u 2=%u\n",
-                       sk->window, sk->acked_seq, sk->lastwin_seq);
-       }
 
-       /*
-        * RFC 1122:
-        * "the suggested [SWS] avoidance algoritm for the receiver is to keep
-        *  RECV.NEXT + RCV.WIN fixed until:
-        *  RCV.BUFF - RCV.USER - RCV.WINDOW >= min(1/2 RCV.BUFF, MSS)"
-        *
-        * i.e. don't raise the right edge of the window until you can't raise
-        * it MSS bytes
-        */
+       return window;
+}
 
-       if ( (free_space - window) >= min(sk->mss, MAX_WINDOW/2) )
-               window += ((free_space - window) / sk->mss) * sk->mss;
+/*
+ * Return true if we should raise the window when we
+ * have cleaned up the receive queue. We don't want to
+ * do this normally, only if it makes sense to avoid
+ * zero window probes..
+ *
+ * We do this only if we can raise the window noticeably.
+ */
+static __inline__ int tcp_raise_window(struct sock * sk)
+{
+       return tcp_new_window(sk) >= 2*tcp_old_window(sk);
+}
 
-       sk->window = window;
-       sk->lastwin_seq = sk->acked_seq;
+static __inline__ unsigned short tcp_select_window(struct sock *sk)
+{
+       int window = tcp_new_window(sk);
 
+       /* Don't allow a shrinking window */
+       if (window > tcp_old_window(sk)) {
+               sk->window = window;
+               sk->lastwin_seq = sk->acked_seq;
+       }
        return sk->window;
 }
 
@@ -328,7+316,7 @@ static __inline__ void tcp_set_state(struct sock *sk, int state)
        case TCP_CLOSE:
                tcp_cache_zap();
                /* Should be about 2 rtt's */
-               reset_timer(sk, TIME_DONE, min(sk->rtt * 2, TCP_DONE_TIME));
+               reset_timer(sk, TIME_DONE, min(sk->rtt * 2, TCP_DONE_TIME));
                /* fall through */
        default:
                if (oldstate==TCP_ESTABLISHED)
index a5b1e7a..80e9321 100644 (file)
@@ -386,7+386,7 @@ static int checksetup(char *line)
 }
 
 /* this should be approx 2 Bo*oMips to start (note initial shift), and will
-   still work even if initally too large, it will just take slightly longer */
+   still work even if initially too large, it will just take slightly longer */
 unsigned long loops_per_sec = (1<<12);
 
 /* This is the number of bits of precision for the loops_per_second.  Each
index b8bc0c3..43a005d 100644 (file)
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -417,7+417,7 @@ asmlinkage int sys_msgget (key_t key, int msgflg)
        
        /*
         * If the IPC_KERNELD flag is set, the key is forced to IPC_PRIVATE,
-        * and a designated kerneld message queue is created/refered to
+        * and a designated kerneld message queue is created/referred to
         */
        if ((msgflg & IPC_KERNELD)) {
                int i;
@@ -599,7+599,7 @@ asmlinkage int sys_msgctl (int msqid, int cmd, struct msqid_ds *buf)
                        return -EPERM;
                /*
                 * There is only one kerneld message queue,
-                * mark it as non-existant
+                * mark it as non-existent
                 */
                if ((kerneld_msqid >= 0) && (msqid == kerneld_msqid))
                        kerneld_msqid = -1;
index 36b12f4..93ca883 100644 (file)
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -712,7+712,7 @@ int shm_swap (int prio, int dma)
        pte_val(page) = shp->shm_pages[idx];
        if (!pte_present(page))
                goto check_table;
-       if (dma && !mem_map[MAP_NR(pte_page(page))].dma)
+       if (dma && !PageDMA(MAP_NR(pte_page(page)) + mem_map))
                goto check_table;
        swap_attempts++;
 
index 04a8abc..f044776 100644 (file)
@@ -354,7+354,7 @@ struct symbol_table symbol_table = {
        X(disk_name),   /* for md.c */
 #endif
        
-       /* bimfm_aout */
+       /* binfmt_aout */
        X(get_write_access),
        X(put_write_access),
 
index e9f6eef..19e5d72 100644 (file)
@@ -175,7+175,7 @@ sys_init_module(char *module_name, char *code, unsigned codesize,
        if (codesize & MOD_AUTOCLEAN) {
                /*
                 * set autoclean marker from codesize...
-                * set useage count to "zero"
+                * set usage count to "zero"
                 */
                codesize &= ~MOD_AUTOCLEAN;
                GET_USE_COUNT(mp) = MOD_AUTOCLEAN;
index e02f7d3..78459e8 100644 (file)
@@ -48,7+48,7 @@ NORET_TYPE void panic(const char * fmt, ...)
        {
                /*
                 * Delay timeout seconds before rebooting the machine. 
-                * We can't use the "normal" timers since we just paniced..
+                * We can't use the "normal" timers since we just panicked..
                 */
                printk(KERN_EMERG "Rebooting in %d seconds..",panic_timeout);
                for(i = 0; i < (panic_timeout*1000); i++)
index 7893032..e7159f8 100644 (file)
@@ -219,7+219,7 @@ static void process_timeout(unsigned long __data)
 }
 
 /*
- * This is the function that decides how desireable a process is..
+ * This is the function that decides how desirable a process is..
  * You can weigh different processes against each other depending
  * on what CPU they've run on lately etc to try to handle cache
  * and TLB miss penalties.
@@ -1099,7+1099,7 @@ asmlinkage int sys_getegid(void)
 
 /*
  * This has been replaced by sys_setpriority.  Maybe it should be
- * moved into the arch depedent tree for those ports that require
+ * moved into the arch dependent tree for those ports that require
  * it for backward compatibility?
  */
 asmlinkage int sys_nice(int increment)
index 3812d45..440cb41 100644 (file)
@@ -778,7+778,7 @@ asmlinkage int sys_newuname(struct new_utsname * name)
 
 /*
  * Move these to arch dependent dir since they are for
- * backward compatiblity only?
+ * backward compatibility only?
  */
 asmlinkage int sys_uname(struct old_utsname * name)
 {
index 8362374..db1787d 100644 (file)
@@ -331,7+331,7 @@ int do_sysctl_strategy (ctl_table *table,
 
 /*
  * This function only checks permission for changing the security level
- * If the tests are successfull, the actual change is done by
+ * If the tests are successful, the actual change is done by
  * do_sysctl_strategy
  */
 static int do_securelevel_strategy (ctl_table *table, 
index 94ce5b3..6d7a637 100644 (file)
    codes are customized to the probabilities in the current block, and so
    can code it much better than the pre-determined fixed codes.
  
-   The Huffman codes themselves are decoded using a mutli-level table
+   The Huffman codes themselves are decoded using a multi-level table
    lookup, in order to maximize the speed of decoding plus the speed of
    building the decoding tables.  See the comments below that precede the
    lbits and dbits tuning parameters.
index 69d4a68..442d0a2 100644 (file)
@@ -53,7+53,7 @@ void invalidate_inode_pages(struct inode * inode)
 
        p = &inode->i_pages;
        while ((page = *p) != NULL) {
-               if (page->locked) {
+               if (PageLocked(page)) {
                        p = &page->next;
                        continue;
                }
@@ -86,7+86,7 @@ repeat:
 
                /* page wholly truncated - free it */
                if (offset >= start) {
-                       if (page->locked) {
+                       if (PageLocked(page)) {
                                wait_on_page(page);
                                goto repeat;
                        }
@@ -118,10+118,11 @@ int shrink_mmap(int priority, int dma)
 
        priority = (limit<<2) >> priority;
        page = mem_map + clock;
-       while (priority-- > 0) {
-               if (page->locked)
+       do {
+               priority--;
+               if (PageLocked(page))
                        goto next;
-               if (dma && !page->dma)
+               if (dma && !PageDMA(page))
                        goto next;
                /* First of all, regenerate the page's referenced bit
                    from any buffers in the page */
@@ -131,7+132,7 @@ int shrink_mmap(int priority, int dma)
                        do {
                                if (buffer_touched(tmp)) {
                                        clear_bit(BH_Touched, &tmp->b_state);
-                                       page->referenced = 1;
+                                       set_bit(PG_referenced, &page->flags);
                                }
                                tmp = tmp->b_this_page;
                        } while (tmp != bh);
@@ -142,21+143,32 @@ int shrink_mmap(int priority, int dma)
                   no page is currently in both the page cache and the
                   buffer cache; we'd have to modify the following
                   test to allow for that case. */
-               if (page->count > 1)
-                       page->referenced = 1;
-               else if (page->referenced)
-                       page->referenced = 0;
-               else if (page->count) {
-                       /* The page is an old, unshared page --- try
-                           to discard it. */
-                       if (page->inode) {
-                               remove_page_from_hash_queue(page);
-                               remove_page_from_inode_queue(page);
-                               free_page(page_address(page));
-                               return 1;
-                       }
-                       if (bh && try_to_free_buffer(bh, &bh, 6))
-                               return 1;
+
+               switch (page->count) {
+                       case 1:
+                               /* If it has been referenced recently, don't free it */
+                               if (clear_bit(PG_referenced, &page->flags))
+                                       break;
+
+                               /* is it a page cache page? */
+                               if (page->inode) {
+                                       remove_page_from_hash_queue(page);
+                                       remove_page_from_inode_queue(page);
+                                       free_page(page_address(page));
+                                       return 1;
+                               }
+
+                               /* is it a buffer cache page? */
+                               if (bh && try_to_free_buffer(bh, &bh, 6))
+                                       return 1;
+                               break;
+
+                       default:
+                               /* more than one users: we can't throw it away */
+                               set_bit(PG_referenced, &page->flags);
+                               /* fall through */
+                       case 0:
+                               /* nothing */
                }
 next:
                page++;
@@ -165,7+177,7 @@ next:
                        clock = 0;
                        page = mem_map;
                }
-       }
+       } while (priority > 0);
        return 0;
 }
 
@@ -223,6+235,16 @@ void update_vm_cache(struct inode * inode, unsigned long pos, const char * buf,
        } while (count);
 }
 
+static inline void add_to_page_cache(struct page * page,
+       struct inode * inode, unsigned long offset)
+{
+       page->count++;
+       page->flags &= ~((1 << PG_uptodate) | (1 << PG_error));
+       page->offset = offset;
+       add_page_to_inode_queue(inode, page);
+       add_page_to_hash_queue(inode, page);
+}
+
 /*
  * Try to read ahead in the file. "page_cache" is a potentially free page
  * that we could use for the cache (if it is 0 we can try to create one,
@@ -250,15+272,8 @@ static unsigned long try_to_read_ahead(struct inode * inode, unsigned long offse
         * Ok, add the new page to the hash-queues...
         */
        page = mem_map + MAP_NR(page_cache);
-       page->count++;
-       page->uptodate = 0;
-       page->error = 0;
-       page->offset = offset;
-       add_page_to_inode_queue(inode, page);
-       add_page_to_hash_queue(inode, page);
-
+       add_to_page_cache(page, inode, offset);
        inode->i_op->readpage(inode, page);
-
        free_page(page_cache);
        return 0;
 #else
@@ -278,7+293,7 @@ void __wait_on_page(struct page *page)
 repeat:
        run_task_queue(&tq_disk);
        current->state = TASK_UNINTERRUPTIBLE;
-       if (page->locked) {
+       if (PageLocked(page)) {
                schedule();
                goto repeat;
        }
@@ -297,11+312,120 @@ repeat:
  * of the logic when it comes to error handling etc.
  */
 #define MAX_READAHEAD (PAGE_SIZE*8)
+#define MIN_READAHEAD (PAGE_SIZE)
+
+static inline unsigned long generic_file_readahead(struct file * filp, struct inode * inode,
+       int try_async, unsigned long pos, struct page * page,
+       unsigned long page_cache)
+{
+       unsigned long max_ahead, ahead;
+       unsigned long rapos, ppos;
+
+       ppos = pos & PAGE_MASK;
+/*
+ * If the current page is locked, try some synchronous read-ahead in order
+ * to avoid too small IO requests.
+ */
+       if (PageLocked(page)) {
+               max_ahead = filp->f_ramax;
+               rapos = ppos;
+/*             try_async = 1  */ /* Seems questionnable */
+       }
+/*
+ * The current page is not locked
+ * It may be the moment to try asynchronous read-ahead.
+ */
+       else {
+/*
+ * Compute the position of the last page we have tried to read
+ */
+               rapos = filp->f_rapos & PAGE_MASK;
+               if (rapos) rapos -= PAGE_SIZE;
+/*
+ * If asynchronous is the good tactics and if the current position is
+ * inside the previous read-ahead window,
+ * check the last red page:
+ * - if locked, previous IO request is probably not complete, and we will
+ *    not try to do another IO request.
+ * - if not locked, previous IO request is probably complete, and it is the
+ *    good moment to try a new asynchronous read-ahead request.
+ * try_async = 2 means that we have to force unplug of the device in
+ * order to force call to the strategy routine of the disk driver and 
+ * start IO asynchronously.
+ */
+               if (try_async == 1 && pos <= filp->f_rapos &&
+                        pos + filp->f_ralen >= filp->f_rapos) {
+                       struct page *a_page;
+/*
+ * Add ONE page to max_ahead in order to try to have the same IO max size as
+ * synchronous read-ahead (MAX_READAHEAD + 1)*PAGE_SIZE.
+ */
+                       max_ahead = filp->f_ramax + PAGE_SIZE;
+
+                       if (rapos < inode->i_size) {
+                               a_page = find_page(inode, rapos);
+                               if (a_page) {
+                                       if (PageLocked(a_page))
+                                               max_ahead = 0;
+                                       a_page->count--;
+                               }
+                       }
+                       else
+                               max_ahead = 0;
+                       try_async = 2;
+               }
+               else {
+                       max_ahead = 0;
+               }
+       }
+
+/*
+ * Try to read pages.
+ * We hope that ll_rw_blk() plug/unplug, coalescence and sort will work fine
+ * enough to avoid too bad actuals IO requests.
+ */
+       ahead = 0;
+       while (ahead < max_ahead) {
+               ahead += PAGE_SIZE;
+               page_cache = try_to_read_ahead(inode, rapos + ahead, page_cache);
+       }
+/*
+ * If we tried to read some pages,
+ * Store the length of the current read-ahead window.
+ * If necessary,
+ *    Try to force unplug of the device in order to start an asynchronous
+ *    read IO.
+ */
+       if (ahead > 0) {
+               filp->f_ralen = ahead;
+               if (try_async == 2) {
+/*
+ * Schedule() should be changed to run_task_queue(...)
+ */
+                       run_task_queue(&tq_disk);
+                       try_async = 1;
+               }
+       }
+/*
+ * Compute the new read-ahead position.
+ * It is the position of the next byte.
+ */
+       filp->f_rapos = rapos + ahead + PAGE_SIZE;
+/*
+ * Wait on the page if necessary
+ */
+       if (PageLocked(page)) {
+               __wait_on_page(page);
+       }
+       return page_cache;
+}
+
+
 int generic_file_read(struct inode * inode, struct file * filp, char * buf, int count)
 {
        int error, read;
        unsigned long pos, page_cache;
-       unsigned long ra_pos, ra_end;   /* read-ahead */
+       int try_async;
        
        if (count <= 0)
                return 0;
@@ -310,13+434,67 @@ int generic_file_read(struct inode * inode, struct file * filp, char * buf, int
        page_cache = 0;
 
        pos = filp->f_pos;
-       ra_pos = filp->f_reada;
-       ra_end = MAX_READAHEAD;
-       if (!ra_pos) {
-               ra_pos = (pos + PAGE_SIZE) & PAGE_MASK;
-               ra_end = 0;
+/*
+ * Dont beleive f_reada
+ * --------------------
+ * f_reada is set to 0 by seek operations.
+ * If we beleive f_reada, small seek ops break asynchronous read-ahead.
+ * That may be quite bad for small seeks or rewrites operations.
+ * I prefer to check if the current position is inside the previous read-ahead
+ * window.
+ * If that's true, I assume that the file accesses are sequential enough to
+ * continue asynchronous read-ahead.
+ */
+       if (pos <= filp->f_rapos && pos + filp->f_ralen >= filp->f_rapos) {
+               filp->f_reada = 1;
+       }
+/*
+ * Do minimum read-ahead at the beginning of the file.
+ * Some tools only read the start of the file only.
+ * Break read-ahead if the file position is after the previous read ahead
+ * position or if read-ahead position is 0.
+ */
+       else if (pos+count < MIN_READAHEAD || !filp->f_rapos ||
+                pos > filp->f_rapos) {
+               filp->f_reada = 0;
+       }
+
+/*
+ * Now f_reada = 1 means that asynchronous read-ahead is the good tactics.
+ * Will try asynchrous read-ahead as soon as possible.
+ * Double the max read ahead size each time.
+ *   That euristic avoid to do some large IO for files that are not really
+ *   accessed sequentialy.
+ */
+       if (filp->f_reada) {
+               try_async = 1;
+               filp->f_ramax += filp->f_ramax;
        }
-       ra_end += pos + count;
+/*
+ * f_reada = 0 means that asynchronous read_ahead is quite bad.
+ * Will not try asynchronous read-ahead first.
+ * Reset to zero, read-ahead context.
+ */
+       else {
+               try_async = 0;
+               filp->f_rapos = 0;
+               filp->f_ralen = 0;
+               filp->f_ramax = 0;
+       }
+
+/*
+ * Compute a good value for read-ahead max
+ * Try first some value near count.
+ * Do at least MIN_READAHEAD and at most MAX_READAHEAD.
+ * (Should be a little reworked)
+ */
+       if (filp->f_ramax < count)
+               filp->f_ramax = count & PAGE_MASK;
+
+       if (filp->f_ramax < MIN_READAHEAD)
+               filp->f_ramax = MIN_READAHEAD;
+       else if (filp->f_ramax > MAX_READAHEAD)
+               filp->f_ramax = MAX_READAHEAD;
 
        for (;;) {
                struct page *page;
@@ -360,24+538,9 @@ found_page:
                if (nr > count)
                        nr = count;
 
-               /*
-                * We may want to do read-ahead.. Do this only
-                * if we're waiting for the current page to be
-                * filled in, and if
-                *  - we're going to read more than this page
-                *  - if "f_reada" is set
-                */
-               if (page->locked) {
-                       while (ra_pos < ra_end) {
-                               page_cache = try_to_read_ahead(inode, ra_pos, page_cache);
-                               ra_pos += PAGE_SIZE;
-                               if (!page->locked)
-                                       goto unlocked_page;
-                       }
-                       __wait_on_page(page);
-               }
-unlocked_page:
-               if (!page->uptodate)
+               page_cache = generic_file_readahead(filp, inode, try_async, pos, page, page_cache);
+
+               if (!PageUptodate(page))
                        goto read_page;
                if (nr > inode->i_size - pos)
                        nr = inode->i_size - pos;
@@ -399,12+562,7 @@ new_page:
                addr = page_cache;
                page = mem_map + MAP_NR(page_cache);
                page_cache = 0;
-               page->count++;
-               page->uptodate = 0;
-               page->error = 0;
-               page->offset = pos & PAGE_MASK;
-               add_page_to_inode_queue(inode, page);
-               add_page_to_hash_queue(inode, page);
+               add_to_page_cache(page, inode, pos & PAGE_MASK);
 
                /*
                 * Error handling is tricky. If we get a read error,
@@ -422,32+580,17 @@ read_page:
                break;
        }
 
-       if (read) {
-               error = read;
-
-#ifdef WE_SHOULD_DO_SOME_EXTRA_CHECKS
-               /*
-                * Start some extra read-ahead if we haven't already
-                * read ahead enough..
-                */
-               while (ra_pos < ra_end) {
-                       page_cache = try_to_read_ahead(inode, ra_pos, page_cache);
-                       ra_pos += PAGE_SIZE;
-               }
-               run_task_queue(&tq_disk);
-#endif
-
-               filp->f_pos = pos;
-               filp->f_reada = ra_pos;
-               if (!IS_RDONLY(inode)) {
-                       inode->i_atime = CURRENT_TIME;
-                       inode->i_dirt = 1;
-               }
-       }
+       filp->f_pos = pos;
+       filp->f_reada = 1;
        if (page_cache)
                free_page(page_cache);
-
-       return error;
+       if (!IS_RDONLY(inode)) {
+               inode->i_atime = CURRENT_TIME;
+               inode->i_dirt = 1;
+       }
+       if (!read)
+               read = error;
+       return read;
 }
 
 /*
@@ -470,14+613,9 @@ static inline unsigned long fill_page(struct inode * inode, unsigned long offset
                return 0;
        page = mem_map + MAP_NR(new_page);
        new_page = 0;
-       page->count++;
-       page->uptodate = 0;
-       page->error = 0;
-       page->offset = offset;
-       add_page_to_inode_queue(inode, page);
-       add_page_to_hash_queue(inode, page);
+       add_to_page_cache(page, inode, offset);
        inode->i_op->readpage(inode, page);
-       if (page->locked)
+       if (PageLocked(page))
                new_page = try_to_read_ahead(inode, offset + PAGE_SIZE, 0);
 found_page:
        if (new_page)
@@ -490,7+628,7 @@ found_page_dont_free:
 /*
  * Semantics for shared and private memory areas are different past the end
  * of the file. A shared mapping past the last page of the file is an error
- * and results in a SIBGUS, while a private mapping just maps in a zero page.
+ * and results in a SIGBUS, while a private mapping just maps in a zero page.
  */
 static unsigned long filemap_nopage(struct vm_area_struct * area, unsigned long address, int no_share)
 {
index 5db5a1d..b82abbe 100644 (file)
@@ -195,7+195,7 @@ static inline void copy_one_pte(pte_t * old_pte, pte_t * new_pte, int cow)
                return;
        }
        page_nr = MAP_NR(pte_page(pte));
-       if (page_nr >= MAP_NR(high_memory) || mem_map[page_nr].reserved) {
+       if (page_nr >= MAP_NR(high_memory) || PageReserved(mem_map+page_nr)) {
                set_pte(new_pte, pte);
                return;
        }
@@ -308,7+308,7 @@ static inline void forget_pte(pte_t page)
                return;
        if (pte_present(page)) {
                unsigned long addr = pte_page(page);
-               if (addr >= high_memory || mem_map[MAP_NR(addr)].reserved)
+               if (addr >= high_memory || PageReserved(mem_map+MAP_NR(addr)))
                        return;
                free_page(addr);
                if (current->mm->rss <= 0)
@@ -467,7+467,7 @@ static inline void remap_pte_range(pte_t * pte, unsigned long address, unsigned
        do {
                pte_t oldpage = *pte;
                pte_clear(pte);
-               if (offset >= high_memory || mem_map[MAP_NR(offset)].reserved)
+               if (offset >= high_memory || PageReserved(mem_map+MAP_NR(offset)))
                        set_pte(pte, mk_pte(offset, prot));
                forget_pte(oldpage);
                address += PAGE_SIZE;
@@ -624,7+624,7 @@ void do_wp_page(struct task_struct * tsk, struct vm_area_struct * vma,
         */
        if (mem_map[MAP_NR(old_page)].count != 1) {
                if (new_page) {
-                       if (mem_map[MAP_NR(old_page)].reserved)
+                       if (PageReserved(mem_map + MAP_NR(old_page)))
                                ++vma->vm_mm->rss;
                        copy_page(old_page,new_page);
                        flush_page_to_ram(old_page);
@@ -677,18+677,14 @@ int verify_area(int type, const void * addr, unsigned long size)
         * case where we use a fake user buffer with get_fs/set_fs()) we
         * don't expect to find the address in the user vm map.
         */
-       if (!size || get_fs() == get_ds())
+       if (!size || get_fs() == KERNEL_DS)
                return 0;
 
        vma = find_vma(current, start);
        if (!vma)
                goto bad_area;
-       if (vma->vm_start <= start)
-               goto good_area;
-       if (!(vma->vm_flags & VM_GROWSDOWN))
-               goto bad_area;
-       if (expand_stack(vma, start))
-               goto bad_area;
+       if (vma->vm_start > start)
+               goto check_stack;
 
 good_area:
        if (type == VERIFY_WRITE)
@@ -743,6+739,12 @@ check_wp_fault_by_hand:
        }
        return 0;
 
+check_stack:
+       if (!(vma->vm_flags & VM_GROWSDOWN))
+               goto bad_area;
+       if (expand_stack(vma, start))
+               goto good_area;
+
 bad_area:
        return -EFAULT;
 }
index 7365232..ae08e18 100644 (file)
@@ -155,11+155,11 @@ static inline unsigned long move_vma(struct vm_area_struct * vma,
 
 /*
  * Expand (or shrink) an existing mapping, potentially moving it at the
- * same time (controlled by the "may_move" flag and available VM space)
+ * same time (controlled by the MREMAP_MAYMOVE flag and available VM space)
  */
 asmlinkage unsigned long sys_mremap(unsigned long addr,
        unsigned long old_len, unsigned long new_len,
-       int may_move)
+       unsigned long flags)
 {
        struct vm_area_struct *vma;
 
@@ -215,7+215,7 @@ asmlinkage unsigned long sys_mremap(unsigned long addr,
         * We weren't able to just expand or shrink the area,
         * we need to create a new one and move it..
         */
-       if (!may_move)
-               return -ENOMEM;
-       return move_vma(vma, addr, old_len, new_len);
+       if (flags & MREMAP_MAYMOVE)
+               return move_vma(vma, addr, old_len, new_len);
+       return -ENOMEM;
 }
index 5dfe9db..af07422 100644 (file)
@@ -89,6+89,10 @@ static inline void free_pages_ok(unsigned long map_nr, unsigned long order)
 {
        unsigned long index = map_nr >> (1 + order);
        unsigned long mask = (~0UL) << order;
+       unsigned long flags;
+
+       save_flags(flags);
+       cli();
 
 #define list(x) (mem_map+(x))
 
@@ -104,23+108,10 @@ static inline void free_pages_ok(unsigned long map_nr, unsigned long order)
                map_nr &= mask;
        }
        add_mem_queue(&free_area[order].list, list(map_nr));
+
 #undef list
-}
 
-static inline void check_free_buffers(mem_map_t * map)
-{
-       struct buffer_head * bh;
-
-       bh = map->buffers;
-       if (bh) {
-               struct buffer_head *tmp = bh;
-               do {
-                       if (tmp->b_list == BUF_SHARED
-                           && tmp->b_dev != B_FREE)
-                               refile_buffer(tmp);
-                       tmp = tmp->b_this_page;
-               } while (tmp != bh);
-       }
+       restore_flags(flags);
 }
 
 void free_pages(unsigned long addr, unsigned long order)
@@ -129,24+120,13 @@ void free_pages(unsigned long addr, unsigned long order)
 
        if (map_nr < MAP_NR(high_memory)) {
                mem_map_t * map = mem_map + map_nr;
-               if (map->reserved)
+               if (PageReserved(map))
                        return;
-               if (map->count) {
-                       unsigned long flag;
-                       save_flags(flag);
-                       cli();
-                       if (!--map->count) {
-                               free_pages_ok(map_nr, order);
-                               delete_from_swap_cache(map_nr);
-                       }
-                       restore_flags(flag);
-                       if (map->count == 1)
-                               check_free_buffers(map);
+               if (atomic_dec_and_test(&map->count)) {
+                       delete_from_swap_cache(map_nr);
+                       free_pages_ok(map_nr, order);
                        return;
                }
-               printk("Trying to free free memory (%08lx): memory probably corrupted\n",addr);
-               printk("PC = %p\n", __builtin_return_address(0));
-               return;
        }
 }
 
@@ -155,7+135,7 @@ void free_pages(unsigned long addr, unsigned long order)
  */
 #define MARK_USED(index, order, area) \
        change_bit((index) >> (1+(order)), (area)->map)
-#define CAN_DMA(x) ((x)->dma)
+#define CAN_DMA(x) (PageDMA(x))
 #define ADDRESS(x) (PAGE_OFFSET + ((x) << PAGE_SHIFT))
 #define RMQUEUE(order, dma) \
 do { struct free_area_struct * area = free_area+order; \
@@ -282,8+262,7 @@ unsigned long free_area_init(unsigned long start_mem, unsigned long end_mem)
        memset(mem_map, 0, start_mem - (unsigned long) mem_map);
        do {
                --p;
-               p->dma = 1;
-               p->reserved = 1;
+               p->flags = (1 << PG_DMA) | (1 << PG_reserved);
        } while (p > mem_map);
 
        for (i = 0 ; i < NR_MEM_LISTS ; i++) {
index 9727e83..cebec62 100644 (file)
@@ -64,7+64,7 @@ void rw_swap_page(int rw, unsigned long entry, char * buf, int wait)
        if (p->swap_device) {
                if (!wait) {
                        page->count++;
-                       page->free_after = 1;
+                       set_bit(PG_freeafter, &page->flags);
                        nr_async_pages++;
                }
                ll_rw_page(rw,p->swap_device,offset,buf);
index c149ff6..ff07946 100644 (file)
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -48,7+48,7 @@ int nr_async_pages = 0;
 
 /*
  * Constants for the page aging mechanism: the maximum age (actually,
- * the maximum "youthfulness"); the quanta by which pages rejuvinate
+ * the maximum "youthfulness"); the quanta by which pages rejuvenate
  * and age; and the initial age for new pages. 
  */
 
index 565796e..67c7e9f 100644 (file)
@@ -83,11+83,12 @@ static inline int try_to_swap_out(struct task_struct * tsk, struct vm_area_struc
                return 0;
 
        page_map = mem_map + MAP_NR(page);
-       if (page_map->reserved || page_map->locked ||
-           (dma && !page_map->dma))
+       if (PageReserved(page_map)
+           || PageLocked(page_map)
+           || (dma && !PageDMA(page_map)))
                return 0;
        /* Deal with page aging.  Pages age from being unused; they
-        * rejuvinate on being accessed.  Only swap old pages (age==0
+        * rejuvenate on being accessed.  Only swap old pages (age==0
         * is oldest). */
        if ((pte_dirty(pte) && delete_from_swap_cache(MAP_NR(page))) 
            || pte_young(pte))  {
index bca755b..4bd4782 100644 (file)
@@ -30,7+30,7 @@ o     Protocol header cache support                   [TESTED]
 o      Fixed ip_build_xmit loopback bugs               [TESTED]
 o      Fixes for SIOCGSTAMP on SOCK_PACKET             [TESTED]
 o      Perfect hash on net_bh().                       [TESTED]
-o      Sonix ISDN driver.                              [SEPERATED/SENT]
+o      Sonix ISDN driver.                              [SEPARATED/SENT]
 o      Use ip_build_xmit for raw sockets               [TESTED]
 o      3c501 fixed for speed                           [TESTED]
 ------->>>>>  ALPHA 002  <<<<<--------
@@ -40,7+40,7 @@ o     Merged in G4KLX AX.25 state machine, with KA9Q
 o      Massive loopback device bug fixed               [TESTED]
 ------->>>>> ALPHA 003 <<<<<----------
 o      Revised code layout                             [TESTED]
-o      More bug fixes (tracroute etc)                  [TESTED]
+o      More bug fixes (traceroute etc)                 [TESTED]
 ------->>>>> ALPHA 004 <<<<<----------
 o      IP build xmit fragment fixes                    [TESTED]
 o      TCP SWS probe fix                               [TESTED]
index cb64dbd..001428e 100644 (file)
@@ -9,9+9,13 @@
 
 MOD_SUB_DIRS := ipv4
 ALL_SUB_DIRS := 802 ax25 bridge core ethernet ipv4 ipx unix appletalk netrom 
-SUB_DIRS     := 802 core ethernet unix
+SUB_DIRS     := core ethernet unix
 MOD_LIST_NAME := NET_MISC_MODULES
 
+ifeq ($(CONFIG_NET),y)
+SUB_DIRS += 802
+endif
+
 ifeq ($(CONFIG_INET),y)
 SUB_DIRS += ipv4
 endif
@@ -46,9+50,11 @@ endif
 
 L_TARGET     := network.a
 L_OBJS      := socket.o protocols.o sysctl_net.o $(join $(SUB_DIRS),$(SUB_DIRS:%=/%.o))
+ifeq ($(CONFIG_NET),y)
 ifeq ($(CONFIG_MODULES),y)
 LX_OBJS = netsyms.o
 endif
+endif
 
 M_OBJS      :=
 
index d3f4b6a..28f98f6 100644 (file)
@@ -51,7+51,7 @@ IP_FRAG_TIME          Time we hold a fragment for. (tunable)
 PORT_MASQ_BEGIN                First port reserved for masquerade (tunable)
 PORT_MASQ_END          Last port used for masquerade   (tunable)
 MASQUERADE_EXPIRE_TCP_FIN      Time we keep a masquerade for after a FIN
-MASUQERADE_EXPIRE_UDP  Time we keep a UDP masquerade for (tunable)
+MASQUERADE_EXPIRE_UDP  Time we keep a UDP masquerade for (tunable)
 MAXVIFS                        Maximum mrouted vifs (1-32)
 MFC_LINES              Lines in the multicast router cache (tunable)
 SK_RMEM_MAX            Max memory a socket owns for receive (tunable)
index bd138e0..17e066e 100644 (file)
  *
  *     FIXME:
  *             We ought to handle the retransmits with a single list and a 
- *     seperate fast timer for when it is needed.
+ *     separate fast timer for when it is needed.
  *
  *             This program is free software; you can redistribute it and/or
  *             modify it under the terms of the GNU General Public License
@@ -449,7+449,7 @@ int aarp_send_ddp(struct device *dev,struct sk_buff *skb, struct at_addr *sa, vo
                {
                        skb_pull(skb,sizeof(struct ddpehdr)-4);
                        /*
-                        *      The uper two remaining bytes are the port 
+                        *      The upper two remaining bytes are the port 
                         *      numbers we just happen to need. Now put the 
                         *      length in the lower two.
                         */
index 7da3991..5c5ee4a 100644 (file)
  *             Alan Cox                :       Added firewall hooks.
  *             Alan Cox                :       Supports new ARPHRD_LOOPBACK
  *             Christer Weinigel       :       Routing and /proc fixes.
- *             Bradford Johnson        :       Locatalk.
+ *             Bradford Johnson        :       Localtalk.
  *             Tom Dyas                :       Module support.
  *             Alan Cox                :       Hooks for PPP (based on the
  *                                             localtalk hook).
@@ -381,7+381,7 @@ static int atif_probe_device(struct atalk_iface *atif)
                        return 0;
                }
                /*
-                *      If it didnt like our faked request then fail:
+                *      If it didn't like our faked request then fail:
                 *      This should check against -ENOIOCTLCMD and fall
                 *      through. That needs us to fix all the devices up
                 *      properly. We can then also dump the localtalk test.
@@ -704,7+704,7 @@ void atrtr_device_down(struct device *dev)
 }
 
 /*
- *     A device event has occured. Watch for devices going down and
+ *     A device event has occurred. Watch for devices going down and
  *     delete our use of them (iface and route).
  */
 
@@ -996,7+996,7 @@ unsigned short atalk_checksum(struct ddpehdr *ddp, int len)
        
 /*
  *     Generic fcntl calls are already dealt with. If we don't need funny ones
- *     this is the all you need. Async I/O is also seperate.
+ *     this is the all you need. Async I/O is also separate.
  */
   
 static int atalk_fcntl(struct socket *sock, unsigned int cmd, unsigned long arg)
@@ -1306,7+1306,7 @@ static int atalk_connect(struct socket *sock, struct sockaddr *uaddr,
        
        if(addr->sat_family!=AF_APPLETALK)
                return -EAFNOSUPPORT;
-#if 0  /* Netatalk doesnt check this */
+#if 0  /* Netatalk doesn't check this */
        if(addr->sat_addr.s_node==ATADDR_BCAST && !sk->broadcast)
                return -EPERM;
 #endif         
@@ -1412,7+1412,7 @@ static int atalk_rcv(struct sk_buff *skb, struct device *dev, struct packet_type
        /*
         *      Fix up the length field [Ok this is horrible but otherwise
         *      I end up with unions of bit fields and messy bit field order
-        *      compiler/endian dependancies..]
+        *      compiler/endian dependencies..]
         */
 
        *((__u16 *)ddp)=ntohs(*((__u16 *)ddp));
@@ -1655,7+1655,7 @@ static int atalk_sendmsg(struct socket *sock, struct msghdr *msg, int len, int n
                        return(-EINVAL);
                if(usat->sat_family != AF_APPLETALK)
                        return -EINVAL;
-#if 0  /* netatalk doesnt implement this check */
+#if 0  /* netatalk doesn't implement this check */
                if(usat->sat_addr.s_node==ATADDR_BCAST && !sk->broadcast)
                        return -EPERM;
 #endif                 
@@ -1723,7+1723,7 @@ static int atalk_sendmsg(struct socket *sock, struct msghdr *msg, int len, int n
        /*
         *      Fix up the length field [Ok this is horrible but otherwise
         *      I end up with unions of bit fields and messy bit field order
-        *      compiler/endian dependancies..
+        *      compiler/endian dependencies..
         */
        *((__u16 *)ddp)=ntohs(*((__u16 *)ddp));
 
index 53043aa..9a55d1c 100644 (file)
  *                                             "Most Buggiest Code You've Ever Seen" (TM)
  *                     HaJo(DD8NE)             Implementation of a T5 (idle) timer
  *                     Joerg(DL1BKE)           Renamed T5 to IDLE and changed behaviour:
- *                                             the timer gets reloaded on every received or transmited
+ *                                             the timer gets reloaded on every received or transmitted
  *                                             I frame for IP or NETROM. The idle timer is not active
  *                                             on "vanilla AX.25" connections. Furthermore added PACLEN
  *                                             to provide AX.25-layer based fragmentation (like WAMPES)
  *     To do:
  *             Restructure the ax25_rcv code to be cleaner/faster and
  *             copy only when needed.
- *             Consider better arbitary protocol support.
+ *             Consider better arbitrary protocol support.
  */
  
 #include <linux/config.h>
@@ -348,7+348,7 @@ static ax25_cb *ax25_find_cb(ax25_address *my_addr, ax25_address *dest_addr, str
 }
 
 /*
- *     Look for any matching address - RAW sockets can bind to arbitary names
+ *     Look for any matching address - RAW sockets can bind to arbitrary names
  */
 static struct sock *ax25_addr_match(ax25_address *addr)
 {
@@ -393,7+393,7 @@ static void ax25_send_to_raw(struct sock *sk, struct sk_buff *skb, int proto)
 /*
  *     Deferred destroy.
  */
-void ax25_destory_socket(ax25_cb *);
+void ax25_destroy_socket(ax25_cb *);
 
 /*
  *     Handler for deferred kills.
@@ -1670,7+1670,7 @@ static int ax25_rcv(struct sk_buff *skb, struct device *dev, ax25_address *dev_a
         */
        skb_pull(skb, size_ax25_addr(&dp));
 
-       /* For our port addreses ? */
+       /* For our port addresses ? */
        if (ax25cmp(&dest, dev_addr) == 0)
                mine = 1;
 
index 90491ba..9757347 100644 (file)
@@ -107,7+107,7 @@ static int ax25_rx_fragment(ax25_cb *ax25, struct sk_buff *skb)
                                        skbn->data = skb_put(skbn, hdrlen);     /* get space for info */
                                        memcpy(skbn->data, skbo->data, hdrlen); /* copy address field */
                                        skb_pull(skbo, hdrlen + 2);             /* start of data */
-                                       skb_pull(skbn, hdrlen + 1);             /* dito */
+                                       skb_pull(skbn, hdrlen + 1);             /* ditto */
 
                                        /* copy data from first fragment */
 
index 6c2119c..823d682 100644 (file)
@@ -400,7+400,7 @@ void dama_enquiry_response(ax25_cb *ax25)
        /* The FLEXNET DAMA master implementation refuses to send us ANY */
        /* I frame for this connection if we send a REJ here, probably   */
        /* due to it's frame collector scheme? A simple RR or  RNR will  */
-       /* invoke the retransmission, and in fact REJs are superflous    */
+       /* invoke the retransmission, and in fact REJs are superfluous   */
        /* in DAMA mode anyway...                                        */
        
 #if 0
index 3c9de22..c4d69d8 100644 (file)
  *
  *     History
  *     AX.25 020       Jonathan(G4KLX) First go.
- *     AX.25 022       Jonathan(G4KLX) Added the actual meat to this - we now have a nice mheard list.
+ *     AX.25 022       Jonathan(G4KLX) Added the actual meat to this - we now have a nice heard list.
  *     AX.25 025       Alan(GW4PTS)    First cut at autobinding by route scan.
  *     AX.25 028b      Jonathan(G4KLX) Extracted AX25 control block from the
  *                                     sock structure. Device removal now
@@ -110,7+110,7 @@ static inline void ax25_route_invert(ax25_digi *in, ax25_digi *out)
  *   - try to alloc a new entry
  *   - overwrite the oldest, not manually added entry if this fails.
  *
- * * updated on receiption of frames directed to us _only_
+ * * updated on reception of frames directed to us _only_
  *
  */
 
index 617f645..55c63e6 100644 (file)
  *                                     Killed a silly bug in the DAMA code.
  *                     Joerg(DL1BKE)   Found the real bug in ax25.h, sri.
  *     AX.25 032       Joerg(DL1BKE)   Added ax25_queue_length to count the number of
- *                                     enqeued buffers of a socket..
+ *                                     enqueued buffers of a socket..
  */
 
 #include <linux/config.h>
@@ -521,7+521,7 @@ int ax25_queue_length(ax25_cb *ax25, struct sk_buff *skb)
  *     need a driver level request to switch duplex mode, that does either
  *     SCC changing, PI config or KISS as required.
  *
- *     Not to mention this request isnt currently reliable.
+ *     Not to mention this request isn't currently reliable.
  */
  
 void ax25_kiss_cmd(ax25_cb *ax25, unsigned char cmd, unsigned char param)
index 8f5afbf..3b5237b 100644 (file)
@@ -97,7+97,7 @@ static void ax25_timer(unsigned long param)
        switch (ax25->state) {
                case AX25_STATE_0:
                        /* Magic here: If we listen() and a new link dies before it
-                          is accepted() it isnt 'dead' so doesnt get removed. */
+                          is accepted() it isn't 'dead' so doesn't get removed. */
                        if (ax25->sk == NULL || ax25->sk->destroy || (ax25->sk->state == TCP_LISTEN && ax25->sk->dead)) {
                                del_timer(&ax25->timer);
                                ax25_destroy_socket(ax25);
index af6adf7..ae19ce2 100644 (file)
@@ -69,7+69,7 @@ static struct timer_list tl; /* for 1 second timer... */
 
 /*
  * the following structure is required so that we receive
- * event notifications when network deviced are enabled and
+ * event notifications when network devices are enabled and
  * disabled (ifconfig up and down).
  */
 static struct notifier_block br_dev_notifier={
@@ -81,7+81,7 @@ static struct notifier_block br_dev_notifier={
 /** Elements of Procedure (4.6) **/
 
 /*
- * this section of code was gratiously borrowed from the IEEE 802.1d
+ * this section of code was graciously borrowed from the IEEE 802.1d
  * specification section 4.9.1 starting on pg 69.  It has been
  * modified somewhat to fit within out framework and structure.  It
  * implements the spanning tree algorithm that is the heart of the
index 1a2c45e..8870346 100644 (file)
@@ -115,7+115,7 @@ nat_addr32(struct net_alias_type *nat, struct sockaddr *sa)
 
 /*
  * hashing code for alias_info->hash_tab entries
- * 4 bytes -> 1/2 byte using xor condimented by af
+ * 4 bytes -> 1/2 byte using xor complemented by af
  */
 
 static __inline__ unsigned
@@ -1106,7+1106,7 @@ net_alias_dev_chk32(struct device *main_dev, int family, __u32 addr32,
 
 /*
  * select closest (main or alias) device to <src,dst> addresses given. if no
- * further info is available, return main_dev (for easier calling arrangment).
+ * further info is available, return main_dev (for easier calling arrangement).
  *
  * Should be called early at xxx_rcv() time for device selection
  */
index 44cb9ab..8f4c003 100644 (file)
@@ -206,7+206,7 @@ unsigned short eth_type_trans(struct sk_buff *skb, struct device *dev)
        /*
         *      This is a magic hack to spot IPX packets. Older Novell breaks
         *      the protocol design and runs IPX over 802.3 without an 802.2 LLC
-        *      layer. We look for FFFF which isnt a used 802.2 SSAP/DSAP. This
+        *      layer. We look for FFFF which isn't a used 802.2 SSAP/DSAP. This
         *      won't work for fault tolerant netware but does for the rest.
         */
        if (*(unsigned short *)rawp == 0xFFFF)
index 58731ea..7f11c19 100644 (file)
@@ -307,6+307,7 @@ void destroy_sock(struct sock *sk)
         */
         
        delete_timer(sk);
+       del_timer(&sk->delack_timer);
        del_timer(&sk->retransmit_timer);
        
        /*
@@ -673,6+674,7 @@ static int inet_create(struct socket *sock, int protocol)
        sk->prot = prot;
        sk->sleep = sock->wait;
        init_timer(&sk->timer);
+       init_timer(&sk->delack_timer);
        init_timer(&sk->retransmit_timer);
        sk->timer.data = (unsigned long)sk;
        sk->timer.function = &net_timer;
index 4846e0f..93fc850 100644 (file)
  *             Alan Cox        :       Missing unlock in device events.
  *             Eckes           :       ARP ioctl control errors.
  *             Alexey Kuznetsov:       Arp free fix.
- *             Manuel Rodriguez:       Gratutious ARP.
+ *             Manuel Rodriguez:       Gratuitous ARP.
  *              Jonathan Layes  :       Added arpd support through kerneld 
  *                                      message queue (960314)
  */
@@ -901,7+901,7 @@ static void arp_send_q(struct arp_table *entry)
                                in_ntoa(entry->ip));
                /* Can't flush the skb, because RFC1122 says to hang on to */
                /* at least one from any unresolved entry.  --MS */
-               /* Whats happened is that someone has 'unresolved' the entry
+               /* What's happened is that someone has 'unresolved' the entry
                   as we got to use it - this 'can't happen' -- AC */
                return;
        }
@@ -1906,7+1906,7 @@ static int arp_req_set(struct arpreq *r, struct device * dev)
                dev = dev1;
        }
 
-       /* this needs to be checked only for dev=dev1 but it doesnt hurt */     
+       /* this needs to be checked only for dev=dev1 but it doesn't hurt */    
        if (r->arp_ha.sa_family != dev->type)   
                return -EINVAL;
                
@@ -2148,7+2148,7 @@ int arp_ioctl(unsigned int cmd, void *arg)
                case SIOCSARP:
                        return arp_req_set(&r, dev);
                case OLD_SIOCDARP:
-                       /* old  SIOCDARP destoyes both
+                       /* old  SIOCDARP destroys both
                         * normal and proxy mappings
                         */
                        r.arp_flags &= ~ATF_PUBL;
index d7d4d0a..953bc40 100644 (file)
 struct icmp_mib icmp_statistics;
 
 /* An array of errno for error messages from dest unreach. */
-/* RFC 1122: 3.2.2.1 States that NET_UNREACH, HOS_UNREACH and SR_FAIELD MUST be considered 'transient errrs'. */
+/* RFC 1122: 3.2.2.1 States that NET_UNREACH, HOS_UNREACH and SR_FAIELD MUST be considered 'transient errs'. */
 
 struct icmp_err icmp_err_convert[] = {
   { ENETUNREACH,       0 },    /*      ICMP_NET_UNREACH        */
@@ -136,7+136,7 @@ struct icmp_err icmp_err_convert[] = {
 };
 
 /*
- *     A spare long used to speed up statistics udpating
+ *     A spare long used to speed up statistics updating
  */
  
 unsigned long dummy;
index 8ee330e..f1dadbc 100644 (file)
@@ -5,7+5,7 @@
  *     been a further revision of this protocol since which is now supported.
  *
  *     If you have trouble with this module be careful what gcc you have used,
- *     the older version didnt come out right using gcc 2.5.8, the newer one
+ *     the older version didn't come out right using gcc 2.5.8, the newer one
  *     seems to fall out with gcc 2.6.2.
  *
  *     Authors:
  *                                     the mrouted version on that device.
  *             Chih-Jen Chang  :       Added the max_resp_time parameter to
  *             Tsu-Sheng Tsao          igmp_heard_query(). Using this parameter
- *                                     to identify the multicast router verion
+ *                                     to identify the multicast router version
  *                                     and do what the IGMP version 2 specified.
  *             Chih-Jen Chang  :       Added a timer to revert to IGMP V2 router
  *             Tsu-Sheng Tsao          if the specified time expired.
index 325bc76..7e08140 100644 (file)
@@ -216,7+216,7 @@ int ip_forward(struct sk_buff *skb, struct device *dev, int is_frag,
 #ifndef CONFIG_IP_NO_ICMP_REDIRECT
                if (dev == dev2 && 
                        !((iph->saddr^dev->pa_addr)&dev->pa_mask) &&
-                       /* The daddr!=raddr test isnt obvious - what its doing
+                       /* The daddr!=raddr test isn't obvious - what its doing
                           is avoiding sending a frame the receiver will not 
                           believe anyway.. */
                        iph->daddr != raddr/*ANK*/ && !opt->srr)
index 1bdf684..b0c780f 100644 (file)
  *
  * Copyright (c) 1994 Pauline Middelink
  *
- * The pieces which added masquerading functionality are totaly
+ * The pieces which added masquerading functionality are totally
  * my responsibility and have nothing to with the original authors
  * copyright or doing.
  *
index 04be37d..c7e99c1 100644 (file)
  *     Arnt Gulbrandsen        :       ip_build_xmit
  *             Alan Cox        :       Per socket routing cache
  *             Alan Cox        :       Fixed routing cache, added header cache.
- *             Alan Cox        :       Loopback didnt work right in original ip_build_xmit - fixed it.
+ *             Alan Cox        :       Loopback didn't work right in original ip_build_xmit - fixed it.
  *             Alan Cox        :       Only send ICMP_REDIRECT if src/dest are the same net.
  *             Alan Cox        :       Incoming IP option handling.
  *             Alan Cox        :       Set saddr on raw output frames as per BSD.
@@ -572,7+572,7 @@ int ip_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt)
 #ifdef CONFIG_IP_MROUTE                 
                /*
                 *      Forward the last copy to the multicast router. If
-                *      there is a pending raw deliery however make a copy
+                *      there is a pending raw delivery however make a copy
                 *      and forward that.
                 */
                 
index 2fc8a4d..ab7f959 100644 (file)
@@ -271,12+271,12 @@ static __inline__ void masq_fix_ack_seq(const struct ip_masq_seq *ms_seq, struct
                 if(after(ack_seq,ms_seq->init_seq)) {
                         th->ack_seq = htonl(ack_seq-ms_seq->delta);
 #if DEBUG_CONFIG_IP_MASQ_APP
-                        printk("masq_fix_ack_seq() : substracted delta (%d) from ack_seq\n",ms_seq->delta);
+                        printk("masq_fix_ack_seq() : subtracted delta (%d) from ack_seq\n",ms_seq->delta);
 #endif
                 } else {
                         th->ack_seq = htonl(ack_seq-ms_seq->previous_delta);
 #if DEBUG_CONFIG_IP_MASQ_APP
-                        printk("masq_fix_ack_seq() : substracted previous_delta (%d) from ack_seq\n",ms_seq->previous_delta);
+                        printk("masq_fix_ack_seq() : subtracted previous_delta (%d) from ack_seq\n",ms_seq->previous_delta);
 #endif
                 }
         }
index 8c066db..d9aa501 100644 (file)
@@ -226,7+226,7 @@ void ip_options_fragment(struct sk_buff * skb)
 }
 
 /*
- * Verify options and fill pointers in struct optinos.
+ * Verify options and fill pointers in struct options.
  * Caller should clear *opt, and set opt->data.
  * If opt == NULL, then skb->data should point to IP header.
  */
index 0fdba9d..28553e9 100644 (file)
@@ -548,7+548,7 @@ void ip_queue_xmit(struct sock *sk, struct device *dev,
  *
  *     The callback has five args, an arbitrary pointer (copy of frag),
  *     the source IP address (may depend on the routing table), the 
- *     destination adddress (char *), the offset to copy from, and the
+ *     destination address (char *), the offset to copy from, and the
  *     length to be copied.
  * 
  */
@@ -1068,7+1068,7 @@ static int ip_rt_event(struct notifier_block *this, unsigned long event, void *p
                ip_rt_flush(dev);
        }
 /*
- *     Join the intial group if multicast.
+ *     Join the initial group if multicast.
  */            
        if(event==NETDEV_UP)
        {
index 0c5170b..f4f2be1 100644 (file)
 #include <net/checksum.h>
 
 /*
- *     Multicast router conrol variables
+ *     Multicast router control variables
  */
 
 static struct vif_device vif_table[MAXVIFS];           /* Devices              */
index aac8c52..9bec91e 100644 (file)
@@ -6,7+6,7 @@
  *             PACKET - implements raw packet sockets.
  *
  *             Doesn't belong in IP but its currently too hooked into ip
- *             to seperate.
+ *             to separate.
  *
  * Version:    @(#)packet.c    1.0.6   05/25/93
  *
index b527f28..9f32196 100644 (file)
  *     Alexey Kuznetsov        :       Massive rework to support tree based routing,
  *                                     routing caches and better behaviour.
  *             
- *             Olaf Erb        :       irtt wasnt being copied right.
+ *             Olaf Erb        :       irtt wasn't being copied right.
  *             Bjorn Ekwall    :       Kerneld route support.
  *             Alan Cox        :       Multicast fixed (I hope)
  *             Pavel Krauz     :       Limited broadcast fixed
@@ -466,7+466,7 @@ static struct fib_info * fib_create_info(__u32 gw, struct device * dev,
                 *      If you want to increase MTU for some net (local subnet)
                 *      use "route add .... mss xxx".
                 *
-                *      The MTU isnt currently always used and computed as it
+                *      The MTU isn't currently always used and computed as it
                 *      should be as far as I can tell. [Still verifying this is right]
                 */
                if ((flags & RTF_GATEWAY) && mss > 576)
@@ -981,7+981,7 @@ static void rt_free(struct rtable * rt)
 }
 
 /*
- * RT "bottom half" handlers. Called with masked inetrrupts.
+ * RT "bottom half" handlers. Called with masked interrupts.
  */
 
 static __inline__ void rt_kick_free_queue(void)
@@ -1087,7+1087,7 @@ void ip_rt_check_expire()
                                 * LRU ordering.
                                 */
 
-                               if (rth->rt_lastuse + RT_CACHE_BUBBLE_THRESHOULD < rth_next->rt_lastuse ||
+                               if (rth->rt_lastuse + RT_CACHE_BUBBLE_THRESHOLD < rth_next->rt_lastuse ||
                                    (rth->rt_lastuse < rth_next->rt_lastuse &&
                                     rth->rt_use < rth_next->rt_use))
                                {
index 68ce23e..3eb3b6d 100644 (file)
  *             Arnt Gulbrandsen, <agulbra@nvg.unit.no>
  *             Jorge Cwik, <jorge@laser.satlink.net>
  *
- * Fixes:      
+ * Fixes:
  *             Alan Cox        :       Numerous verify_area() calls
  *             Alan Cox        :       Set the ACK bit on a reset
  *             Alan Cox        :       Stopped it crashing if it closed while
- *                                     sk->inuse=1 and was trying to connect 
+ *                                     sk->inuse=1 and was trying to connect
  *                                     (tcp_err()).
  *             Alan Cox        :       All icmp error handling was broken
  *                                     pointers passed where wrong and the
  *                                     socket was looked up backwards. Nobody
  *                                     tested any icmp error code obviously.
- *             Alan Cox        :       tcp_err() now handled properly. It 
- *                                     wakes people on errors. select 
+ *             Alan Cox        :       tcp_err() now handled properly. It
+ *                                     wakes people on errors. select
  *                                     behaves and the icmp error race
  *                                     has gone by moving it into sock.c
- *             Alan Cox        :       tcp_send_reset() fixed to work for 
- *                                     everything not just packets for 
+ *             Alan Cox        :       tcp_send_reset() fixed to work for
+ *                                     everything not just packets for
  *                                     unknown sockets.
  *             Alan Cox        :       tcp option processing.
- *             Alan Cox        :       Reset tweaked (still not 100%) [Had 
+ *             Alan Cox        :       Reset tweaked (still not 100%) [Had
  *                                     syn rule wrong]
  *             Herp Rosmanith  :       More reset fixes
- *             Alan Cox        :       No longer acks invalid rst frames. 
+ *             Alan Cox        :       No longer acks invalid rst frames.
  *                                     Acking any kind of RST is right out.
- *             Alan Cox        :       Sets an ignore me flag on an rst 
- *                                     receive otherwise odd bits of prattle 
+ *             Alan Cox        :       Sets an ignore me flag on an rst
+ *                                     receive otherwise odd bits of prattle
  *                                     escape still
- *             Alan Cox        :       Fixed another acking RST frame bug. 
+ *             Alan Cox        :       Fixed another acking RST frame bug.
  *                                     Should stop LAN workplace lockups.
- *             Alan Cox        :       Some tidyups using the new skb list 
+ *             Alan Cox        :       Some tidyups using the new skb list
  *                                     facilities
  *             Alan Cox        :       sk->keepopen now seems to work
  *             Alan Cox        :       Pulls options out correctly on accepts
  *             Alan Cox        :       Fixed assorted sk->rqueue->next errors
  *             Alan Cox        :       PSH doesn't end a TCP read. Switched a
  *                                     bit to skb ops.
- *             Alan Cox        :       Tidied tcp_data to avoid a potential 
+ *             Alan Cox        :       Tidied tcp_data to avoid a potential
  *                                     nasty.
- *             Alan Cox        :       Added some better commenting, as the 
+ *             Alan Cox        :       Added some better commenting, as the
  *                                     tcp is hard to follow
  *             Alan Cox        :       Removed incorrect check for 20 * psh
  *     Michael O'Reilly        :       ack < copied bug fix.
  *     Johannes Stille         :       Misc tcp fixes (not all in yet).
  *             Alan Cox        :       FIN with no memory -> CRASH
- *             Alan Cox        :       Added socket option proto entries. 
+ *             Alan Cox        :       Added socket option proto entries.
  *                                     Also added awareness of them to accept.
  *             Alan Cox        :       Added TCP options (SOL_TCP)
- *             Alan Cox        :       Switched wakeup calls to callbacks, 
- *                                     so the kernel can layer network 
+ *             Alan Cox        :       Switched wakeup calls to callbacks,
+ *                                     so the kernel can layer network
  *                                     sockets.
  *             Alan Cox        :       Use ip_tos/ip_ttl settings.
  *             Alan Cox        :       Handle FIN (more) properly (we hope).
- *             Alan Cox        :       RST frames sent on unsynchronised 
+ *             Alan Cox        :       RST frames sent on unsynchronised
  *                                     state ack error.
  *             Alan Cox        :       Put in missing check for SYN bit.
- *             Alan Cox        :       Added tcp_select_window() aka NET2E 
+ *             Alan Cox        :       Added tcp_select_window() aka NET2E
  *                                     window non shrink trick.
- *             Alan Cox        :       Added a couple of small NET2E timer 
+ *             Alan Cox        :       Added a couple of small NET2E timer
  *                                     fixes
  *             Charles Hedrick :       TCP fixes
  *             Toomas Tamm     :       TCP window fixes
  *             Adam Caldwell   :       Assorted timer/timing errors
  *             Matthew Dillon  :       Fixed another RST bug
  *             Alan Cox        :       Move to kernel side addressing changes.
- *             Alan Cox        :       Beginning work on TCP fastpathing 
+ *             Alan Cox        :       Beginning work on TCP fastpathing
  *                                     (not yet usable)
  *             Arnt Gulbrandsen:       Turbocharged tcp_check() routine.
  *             Alan Cox        :       TCP fast path debugging
  *             Michael Riepe   :       Bug in tcp_check()
  *             Matt Dillon     :       More TCP improvements and RST bug fixes
  *             Matt Dillon     :       Yet more small nasties remove from the
- *                                     TCP code (Be very nice to this man if 
+ *                                     TCP code (Be very nice to this man if
  *                                     tcp finally works 100%) 8)
- *             Alan Cox        :       BSD accept semantics. 
+ *             Alan Cox        :       BSD accept semantics.
  *             Alan Cox        :       Reset on closedown bug.
  *     Peter De Schrijver      :       ENOTCONN check missing in tcp_sendto().
- *             Michael Pall    :       Handle select() after URG properly in 
+ *             Michael Pall    :       Handle select() after URG properly in
  *                                     all cases.
- *             Michael Pall    :       Undo the last fix in tcp_read_urg() 
+ *             Michael Pall    :       Undo the last fix in tcp_read_urg()
  *                                     (multi URG PUSH broke rlogin).
- *             Michael Pall    :       Fix the multi URG PUSH problem in 
- *                                     tcp_readable(), select() after URG 
+ *             Michael Pall    :       Fix the multi URG PUSH problem in
+ *                                     tcp_readable(), select() after URG
  *                                     works now.
- *             Michael Pall    :       recv(...,MSG_OOB) never blocks in the 
+ *             Michael Pall    :       recv(...,MSG_OOB) never blocks in the
  *                                     BSD api.
- *             Alan Cox        :       Changed the semantics of sk->socket to 
+ *             Alan Cox        :       Changed the semantics of sk->socket to
  *                                     fix a race and a signal problem with
  *                                     accept() and async I/O.
  *             Alan Cox        :       Relaxed the rules on tcp_sendto().
  *             Alan Cox        :       Reset tracing code.
  *             Alan Cox        :       Spurious resets on shutdown.
  *             Alan Cox        :       Giant 15 minute/60 second timer error
- *             Alan Cox        :       Small whoops in selecting before an 
+ *             Alan Cox        :       Small whoops in selecting before an
  *                                     accept.
- *             Alan Cox        :       Kept the state trace facility since 
+ *             Alan Cox        :       Kept the state trace facility since
  *                                     it's handy for debugging.
  *             Alan Cox        :       More reset handler fixes.
- *             Alan Cox        :       Started rewriting the code based on 
- *                                     the RFC's for other useful protocol 
- *                                     references see: Comer, KA9Q NOS, and 
- *                                     for a reference on the difference 
+ *             Alan Cox        :       Started rewriting the code based on
+ *                                     the RFC's for other useful protocol
+ *                                     references see: Comer, KA9Q NOS, and
+ *                                     for a reference on the difference
  *                                     between specifications and how BSD
  *                                     works see the 4.4lite source.
- *             A.N.Kuznetsov   :       Don't time wait on completion of tidy 
+ *             A.N.Kuznetsov   :       Don't time wait on completion of tidy
  *                                     close.
  *             Linus Torvalds  :       Fin/Shutdown & copied_seq changes.
  *             Linus Torvalds  :       Fixed BSD port reuse to work first syn
- *             Alan Cox        :       Reimplemented timers as per the RFC 
- *                                     and using multiple timers for sanity. 
+ *             Alan Cox        :       Reimplemented timers as per the RFC
+ *                                     and using multiple timers for sanity.
  *             Alan Cox        :       Small bug fixes, and a lot of new
  *                                     comments.
  *             Alan Cox        :       Fixed dual reader crash by locking
  *             Alan Cox        :       Per route irtt.
  *             Matt Day        :       Select() match BSD precisely on error
  *             Alan Cox        :       New buffers
- *             Marc Tamsky     :       Various sk->prot->retransmits and 
+ *             Marc Tamsky     :       Various sk->prot->retransmits and
  *                                     sk->retransmits misupdating fixed.
  *                                     Fixed tcp_write_timeout: stuck close,
  *                                     and TCP syn retries gets used now.
  *             Alan Cox        :       Small hooks for enSKIP.
  *             Alexey Kuznetsov:       Path MTU discovery.
  *             Alan Cox        :       Support soft errors.
- *             Alan Cox        :       Fix MTU discovery pathalogical case
+ *             Alan Cox        :       Fix MTU discovery pathological case
  *                                     when the remote claims no mtu!
  *             Marc Tamsky     :       TCP_CLOSE fix.
- *             Colin (G3TNE)   :       Send a reset on syn ack replies in 
+ *             Colin (G3TNE)   :       Send a reset on syn ack replies in
  *                                     window but wrong (fixes NT lpd problems)
  *             Pedro Roque     :       Better TCP window handling, delayed ack.
- *             Joerg Reuter    :       No modification of locked buffers in 
+ *             Joerg Reuter    :       No modification of locked buffers in
  *                                     tcp_do_retransmit()
+ *             Eric Schenk     :       Changed receiver side silly window
+ *                                     avoidance algorithm to BSD style
+ *                                     algorithm. This doubles throughput
+ *                                     against machines running Solaris,
+ *                                     and seems to result in general
+ *                                     improvement.
+ *             Eric Schenk     :       Changed receiver side silly window
+ *                                     avoidance algorithm to BSD style
+ *                                     algorithm. This doubles throughput
+ *                                     against machines running Solaris,
+ *                                     and seems to result in general
+ *                                     improvement.
  *
  * To Fix:
  *             Fast path the code. Two things here - fix the window calculation
  *             tcp_data/tcp_read as well as the window shrink crud.
  *             Separate out duplicated code - tcp_alloc_skb, tcp_build_ack
  *             tcp_queue_skb seem obvious routines to extract.
- *     
+ *
  *             This program is free software; you can redistribute it and/or
  *             modify it under the terms of the GNU General Public License
  *             as published by the Free Software Foundation; either version
  *     TCP_LAST_ACK            out side has shutdown after remote has
  *                             shutdown.  There may still be data in our
  *                             buffer that we have to finish sending
- *             
+ *
  *     TCP_CLOSE               socket is finished
  */
 
  * for violations and the like.  tcp.c is just too big... If I say something
  * "does?" or "doesn't?", it means I'm not sure, and will have to hash it out
  * with Alan. -- MS 950903
- * 
+ *
  * Use of PSH (4.2.2.2)
  *   MAY aggregate data sent without the PSH flag. (does)
  *   MAY queue data received without the PSH flag. (does)
  *     MUST set PSH on last segment (does)
  *   MAY pass received PSH to application layer (doesn't)
  *   SHOULD send maximum-sized segment whenever possible. (almost always does)
- * 
+ *
  * Window Size (4.2.2.3, 4.2.2.16)
  *   MUST treat window size as an unsigned number (does)
  *   SHOULD treat window size as a 32-bit number (does not)
  *   MUST NOT shrink window once it is offered (does not normally)
- *   
+ *
  * Urgent Pointer (4.2.2.4)
  * **MUST point urgent pointer to last byte of urgent data (not right
  *     after). (doesn't, to be like BSD)
  * **MUST support urgent data sequence of arbitrary length. (doesn't, but
  *   it's sort of tricky to fix, as urg_ptr is a 16-bit quantity)
  *     [Follows BSD 1 byte of urgent data]
- * 
+ *
  * TCP Options (4.2.2.5)
  *   MUST be able to receive TCP options in any segment. (does)
  *   MUST ignore unsupported options (does)
- *   
+ *
  * Maximum Segment Size Option (4.2.2.6)
  *   MUST implement both sending and receiving MSS. (does)
  *   SHOULD send an MSS with every SYN where receive MSS != 536 (MAY send
  *   MUST calculate "effective send MSS" correctly:
  *     min(physical_MTU, remote_MSS+20) - sizeof(tcphdr) - sizeof(ipopts)
  *     (does - but allows operator override)
- *  
+ *
  * TCP Checksum (4.2.2.7)
  *   MUST generate and check TCP checksum. (does)
- * 
+ *
  * Initial Sequence Number Selection (4.2.2.8)
  *   MUST use the RFC 793 clock selection mechanism.  (doesn't, but it's
  *     OK: RFC 793 specifies a 250KHz clock, while we use 1MHz, which is
  *     necessary for 10Mbps networks - and harder than BSD to spoof!)
- * 
+ *
  * Simultaneous Open Attempts (4.2.2.10)
  *   MUST support simultaneous open attempts (does)
- * 
+ *
  * Recovery from Old Duplicate SYN (4.2.2.11)
  *   MUST keep track of active vs. passive open (does)
- * 
+ *
  * RST segment (4.2.2.12)
  *   SHOULD allow an RST segment to contain data (does, but doesn't do
  *     anything with it, which is standard)
- * 
+ *
  * Closing a Connection (4.2.2.13)
- *   MUST inform application of whether connectin was closed by RST or
+ *   MUST inform application of whether connection was closed by RST or
  *     normal close. (does)
  *   MAY allow "half-duplex" close (treat connection as closed for the
  *     local app, even before handshake is done). (does)
  *   MUST linger in TIME_WAIT for 2 * MSL (does)
- * 
+ *
  * Retransmission Timeout (4.2.2.15)
  *   MUST implement Jacobson's slow start and congestion avoidance
- *     stuff. (does) 
- * 
+ *     stuff. (does)
+ *
  * Probing Zero Windows (4.2.2.17)
  *   MUST support probing of zero windows. (does)
  *   MAY keep offered window closed indefinitely. (does)
  *   MUST allow remote window to stay closed indefinitely. (does)
- * 
+ *
  * Passive Open Calls (4.2.2.18)
  *   MUST NOT let new passive open affect other connections. (doesn't)
  *   MUST support passive opens (LISTENs) concurrently. (does)
- *   
+ *
  * Time to Live (4.2.2.19)
  *   MUST make TCP TTL configurable. (does - IP_TTL option)
- * 
+ *
  * Event Processing (4.2.2.20)
  *   SHOULD queue out-of-order segments. (does)
  *   MUST aggregate ACK segments whenever possible. (does but badly)
- *   
+ *
  * Retransmission Timeout Calculation (4.2.3.1)
  *   MUST implement Karn's algorithm and Jacobson's algorithm for RTO
  *     calculation. (does, or at least explains them in the comments 8*b)
  *  SHOULD initialize RTO to 0 and RTT to 3. (does)
- * 
+ *
  * When to Send an ACK Segment (4.2.3.2)
  *   SHOULD implement delayed ACK. (does)
  *   MUST keep ACK delay < 0.5 sec. (does)
- * 
+ *
  * When to Send a Window Update (4.2.3.3)
  *   MUST implement receiver-side SWS. (does)
- *   
+ *
  * When to Send Data (4.2.3.4)
  *   MUST implement sender-side SWS. (does)
  *   SHOULD implement Nagle algorithm. (does)
- * 
+ *
  * TCP Connection Failures (4.2.3.5)
  *  MUST handle excessive retransmissions "properly" (see the RFC). (does)
  *   SHOULD inform application layer of soft errors. (does)
- *   
+ *
  * TCP Keep-Alives (4.2.3.6)
  *   MAY provide keep-alives. (does)
  *   MUST make keep-alives configurable on a per-connection basis. (does)
  *   MUST NOT interpret failure to ACK keep-alive packet as dead
  *     connection. (doesn't)
  *   SHOULD send keep-alive with no data. (does)
- * 
+ *
  * TCP Multihoming (4.2.3.7)
  *   MUST get source address from IP layer before sending first
  *     SYN. (does)
  *   MUST use same local address for all segments of a connection. (does)
- * 
+ *
  * IP Options (4.2.3.8)
  *   MUST ignore unsupported IP options. (does)
  *   MAY support Time Stamp and Record Route. (does)
  *   MUST allow application to specify a source route. (does)
- *   MUST allow receieved Source Route option to set route for all future
+ *   MUST allow received Source Route option to set route for all future
  *     segments on this connection. (does not (security issues))
- * 
+ *
  * ICMP messages (4.2.3.9)
  *   MUST act on ICMP errors. (does)
  *   MUST slow transmission upon receipt of a Source Quench. (does)
  *     application. (does)
  *   SHOULD abort connection upon receipt of hard Destination Unreachable
  *     messages (2, 3, 4). (does)
- * 
+ *
  * Remote Address Validation (4.2.3.10)
  *   MUST reject as an error OPEN for invalid remote IP address. (does)
  *   MUST ignore SYN with invalid source address. (does)
  *   MUST silently discard incoming SYN for broadcast/multicast
- *     address. (does) 
- * 
+ *     address. (does)
+ *
  * Asynchronous Reports (4.2.4.1)
  * MUST provide mechanism for reporting soft errors to application
  *     layer. (does)
- * 
+ *
  * Type of Service (4.2.4.2)
  *   MUST allow application layer to set Type of Service. (does IP_TOS)
- * 
+ *
  * (Whew. -- MS 950903)
  **/
 
@@ -433,7+445,7 @@ struct wait_queue *master_select_wakeup;
 /*
  *     Find someone to 'accept'. Must be called with
  *     the socket locked or with interrupts disabled
- */ 
+ */
 
 static struct sk_buff *tcp_find_established(struct sock *s)
 {
@@ -460,7+472,7 @@ static struct sk_buff *tcp_dequeue_established(struct sock *s)
        struct sk_buff *skb;
        unsigned long flags;
        save_flags(flags);
-       cli(); 
+       cli();
        skb=tcp_find_established(s);
        if(skb!=NULL)
                skb_unlink(skb);        /* Take it off the queue */
@@ -468,17+480,17 @@ static struct sk_buff *tcp_dequeue_established(struct sock *s)
        return skb;
 }
 
-/* 
+/*
  *     This routine closes sockets which have been at least partially
  *     opened, but not yet accepted. Currently it is only called by
- *     tcp_close, and timeout mirrors the value there. 
+ *     tcp_close, and timeout mirrors the value there.
  */
 
-static void tcp_close_pending (struct sock *sk) 
+static void tcp_close_pending (struct sock *sk)
 {
        struct sk_buff *skb;
 
-       while ((skb = skb_dequeue(&sk->receive_queue)) != NULL) 
+       while ((skb = skb_dequeue(&sk->receive_queue)) != NULL)
        {
                tcp_close(skb->sk, 0);
                kfree_skb(skb, FREE_READ);
@@ -487,7+499,7 @@ static void tcp_close_pending (struct sock *sk)
 }
 
 /*
- *     Enter the time wait state. 
+ *     Enter the time wait state.
  */
 
 void tcp_time_wait(struct sock *sk)
@@ -514,20+526,20 @@ void tcp_err(int type, int code, unsigned char *header, __u32 daddr,
 {
        struct tcphdr *th = (struct tcphdr *)header;
        struct sock *sk;
-       
+
        /*
         *      This one is _WRONG_. FIXME urgently.
         */
-#ifndef CONFIG_NO_PATH_MTU_DISCOVERY    
+#ifndef CONFIG_NO_PATH_MTU_DISCOVERY
        struct iphdr *iph=(struct iphdr *)(header-sizeof(struct iphdr));
-#endif  
+#endif
        th =(struct tcphdr *)header;
        sk = get_sock(&tcp_prot, th->source, daddr, th->dest, saddr);
 
-       if (sk == NULL) 
+       if (sk == NULL)
                return;
-  
-       if (type == ICMP_SOURCE_QUENCH) 
+
+       if (type == ICMP_SOURCE_QUENCH)
        {
                /*
                 * FIXME:
@@ -538,7+550,7 @@ void tcp_err(int type, int code, unsigned char *header, __u32 daddr,
                        sk->cong_window--;
                return;
        }
-       
+
        if (type == ICMP_PARAMETERPROB)
        {
                sk->err=EPROTO;
@@ -573,11+585,11 @@ void tcp_err(int type, int code, unsigned char *header, __u32 daddr,
         */
 
        if (code < 13)
-       {       
+       {
                if(icmp_err_convert[code].fatal || sk->state == TCP_SYN_SENT || sk->state == TCP_SYN_RECV)
                {
                        sk->err = icmp_err_convert[code].errno;
-                       if (sk->state == TCP_SYN_SENT || sk->state == TCP_SYN_RECV) 
+                       if (sk->state == TCP_SYN_SENT || sk->state == TCP_SYN_RECV)
                        {
                                tcp_statistics.TcpAttemptFails++;
                                tcp_set_state(sk,TCP_CLOSE);
@@ -612,29+624,29 @@ static int tcp_readable(struct sock *sk)
        if (sk == NULL || (skb = skb_peek(&sk->receive_queue)) == NULL)
        {
                restore_flags(flags);
-               if(sk && sk->debug) 
+               if(sk && sk->debug)
                        printk("empty\n");
                return(0);
        }
-  
+
        counted = sk->copied_seq;       /* Where we are at the moment */
        amount = 0;
-  
-       /* 
-        *      Do until a push or until we are out of data. 
+
+       /*
+        *      Do until a push or until we are out of data.
         */
-        
-       do 
+
+       do
        {
                if (before(counted, skb->seq))          /* Found a hole so stops here */
                        break;
                sum = skb->len - (counted - skb->seq);  /* Length - header but start from where we are up to (avoid overlaps) */
                if (skb->h.th->syn)
                        sum++;
-               if (sum > 0) 
+               if (sum > 0)
                {                                       /* Add it up, move on */
                        amount += sum;
-                       if (skb->h.th->syn) 
+                       if (skb->h.th->syn)
                                amount--;
                        counted += sum;
                }
@@ -707,7+719,7 @@ static int tcp_select(struct sock *sk, int sel_type, select_table *wait)
 
                if (sk->shutdown & RCV_SHUTDOWN)
                        return 1;
-                       
+
                if (sk->acked_seq == sk->copied_seq)
                        break;
 
@@ -720,7+732,7 @@ static int tcp_select(struct sock *sk, int sel_type, select_table *wait)
        case SEL_OUT:
                if (sk->err)
                        return 1;
-               if (sk->shutdown & SEND_SHUTDOWN) 
+               if (sk->shutdown & SEND_SHUTDOWN)
                        return 0;
                if (sk->state == TCP_SYN_SENT || sk->state == TCP_SYN_RECV)
                        break;
@@ -745,7+757,7 @@ static int tcp_select(struct sock *sk, int sel_type, select_table *wait)
 int tcp_ioctl(struct sock *sk, int cmd, unsigned long arg)
 {
        int err;
-       switch(cmd) 
+       switch(cmd)
        {
 
                case TIOCINQ:
@@ -755,7+767,7 @@ int tcp_ioctl(struct sock *sk, int cmd, unsigned long arg)
                {
                        unsigned long amount;
 
-                       if (sk->state == TCP_LISTEN) 
+                       if (sk->state == TCP_LISTEN)
                                return(-EINVAL);
 
                        lock_sock(sk);
@@ -796,13+808,13 @@ int tcp_ioctl(struct sock *sk, int cmd, unsigned long arg)
 
 
 /*
- *     This routine computes a TCP checksum. 
+ *     This routine computes a TCP checksum.
  *
  *     Modified January 1995 from a go-faster DOS routine by
  *     Jorge Cwik <jorge@laser.satlink.net>
  */
 #undef DEBUG_TCP_CHECK
-void tcp_send_check(struct tcphdr *th, unsigned long saddr, 
+void tcp_send_check(struct tcphdr *th, unsigned long saddr,
                unsigned long daddr, int len, struct sk_buff *skb)
 {
 #ifdef DEBUG_TCP_CHECK
@@ -829,22+841,17 @@ void tcp_send_check(struct tcphdr *th, unsigned long saddr,
 }
 
 
-/* 
- *     This routine builds a generic TCP header. 
+/*
+ *     This routine builds a generic TCP header.
  */
-extern __inline int tcp_build_header(struct tcphdr *th, struct sock *sk, int push)
-{
 
+static inline int tcp_build_header(struct tcphdr *th, struct sock *sk, int push)
+{
        memcpy(th,(void *) &(sk->dummy_th), sizeof(*th));
+       th->psh = (push == 0) ? 1 : 0;
        th->seq = htonl(sk->write_seq);
-       th->psh =(push == 0) ? 1 : 0;
-       sk->ack_backlog = 0;
-       sk->bytes_rcv = 0;
-       sk->ack_timed = 0;
        th->ack_seq = htonl(sk->acked_seq);
-       sk->window = tcp_select_window(sk);
-       th->window = htons(sk->window);
+       th->window = htons(tcp_select_window(sk));
 
        return(sizeof(*th));
 }
@@ -855,10+862,10 @@ extern __inline int tcp_build_header(struct tcphdr *th, struct sock *sk, int pus
 static void wait_for_tcp_connect(struct sock * sk)
 {
        release_sock(sk);
-       cli();                  
-       if (sk->state != TCP_ESTABLISHED && sk->state != TCP_CLOSE_WAIT && sk->err == 0) 
+       cli();
+       if (sk->state != TCP_ESTABLISHED && sk->state != TCP_CLOSE_WAIT && sk->err == 0)
        {
-               interruptible_sleep_on(sk->sleep);      
+               interruptible_sleep_on(sk->sleep);
        }
        sti();
        lock_sock(sk);
@@ -873,7+880,7 @@ static void wait_for_tcp_memory(struct sock * sk)
        cli();
        if (sk->wmem_alloc*2 > sk->sndbuf &&
            (sk->state == TCP_ESTABLISHED||sk->state == TCP_CLOSE_WAIT)
-               && sk->err == 0) 
+               && sk->err == 0)
        {
                sk->socket->flags &= ~SO_NOSPACE;
                interruptible_sleep_on(sk->sleep);
@@ -901,65+908,65 @@ static int do_tcp_sendmsg(struct sock *sk, struct msghdr *msg,
        struct proto *prot;
        struct device *dev = NULL;
        unsigned char *from;
-       
+
        /*
         *      Ok commence sending
         */
-       
+
        while(iovct<msg->msg_iovlen)
        {
                seglen=msg->msg_iov[iovct].iov_len;
                from=msg->msg_iov[iovct++].iov_base;
                prot = sk->prot;
-               while(seglen > 0) 
+               while(seglen > 0)
                {
                        /*
                         * Stop on errors
                         */
-                       if (sk->err) 
+                       if (sk->err)
                        {
-                               if (copied) 
+                               if (copied)
                                        return copied;
                                return sock_error(sk);
                        }
 
                        /*
-                        *      Make sure that we are established. 
+                        *      Make sure that we are established.
                         */
-                       if (sk->shutdown & SEND_SHUTDOWN) 
+                       if (sk->shutdown & SEND_SHUTDOWN)
                        {
                                if (copied)
                                        return copied;
                                return -EPIPE;
                        }
 
-                       /* 
+                       /*
                         *      Wait for a connection to finish.
                         */
-                       while (sk->state != TCP_ESTABLISHED && sk->state != TCP_CLOSE_WAIT) 
+                       while (sk->state != TCP_ESTABLISHED && sk->state != TCP_CLOSE_WAIT)
                        {
                                if (copied)
                                        return copied;
 
-                               if (sk->err) 
+                               if (sk->err)
                                        return sock_error(sk);
-       
+
                                if (sk->state != TCP_SYN_SENT && sk->state != TCP_SYN_RECV)
                                {
                                        if (sk->keepopen)
                                                send_sig(SIGPIPE, current, 0);
                                        return -EPIPE;
                                }
-       
+
                                if (nonblock)
                                        return -EAGAIN;
 
                                if (current->signal & ~current->blocked)
                                        return -ERESTARTSYS;
-       
+
                                wait_for_tcp_connect(sk);
                        }
-       
+
                /*
                 * The following code can result in copy <= if sk->mss is ever
                 * decreased.  It shouldn't be.  sk->mss is min(sk->mtu, sk->max_window).
@@ -971,9+978,9 @@ static int do_tcp_sendmsg(struct sock *sk, struct msghdr *msg,
                 * before the exchange of SYN's.  If the initial ack from the other
                 * end has a window of 0, max_window and thus mss will both be 0.
                 */
-       
-               /* 
-                *      Now we need to check if we have a half built packet. 
+
+               /*
+                *      Now we need to check if we have a half built packet.
                 */
 #ifndef CONFIG_NO_PATH_MTU_DISCOVERY
                /*
@@ -981,7+988,7 @@ static int do_tcp_sendmsg(struct sock *sk, struct msghdr *msg,
                 *              but it works... I do not know why 8) --ANK
                 *
                 *      Really, we should rebuild all the queues...
-                *      It's difficult. Temprorary hack is to send all
+                *      It's difficult. Temporary hack is to send all
                 *      queued segments with allowed fragmentation.
                 */
                {
@@ -993,18+1000,18 @@ static int do_tcp_sendmsg(struct sock *sk, struct msghdr *msg,
                        }
                }
 #endif
-       
-                       if ((skb = tcp_dequeue_partial(sk)) != NULL) 
+
+                       if ((skb = tcp_dequeue_partial(sk)) != NULL)
                        {
                                int tcp_size;
 
                                tcp_size = skb->tail - (unsigned char *)(skb->h.th + 1);
-       
+
                                /* Add more stuff to the end of skb->len */
-                               if (!(flags & MSG_OOB)) 
+                               if (!(flags & MSG_OOB))
                                {
                                        copy = min(sk->mss - tcp_size, seglen);
-                                       if (copy <= 0) 
+                                       if (copy <= 0)
                                        {
                                                printk("TCP: **bug**: \"copy\" <= 0\n");
                                                return -EFAULT;
@@ -1031,7+1038,7 @@ static int do_tcp_sendmsg(struct sock *sk, struct msghdr *msg,
                 *   host, don't use it.  This is sender side
                 *   silly window prevention, as specified in RFC1122.
                 *   (Note that this is different than earlier versions of
-                *   SWS prevention, e.g. RFC813.).  What we actually do is 
+                *   SWS prevention, e.g. RFC813.).  What we actually do is
                 *   use the whole MSS.  Since the results in the right
                 *   edge of the packet being outside the window, it will
                 *   be queued for later rather than sent.
@@ -1042,37+1049,37 @@ static int do_tcp_sendmsg(struct sock *sk, struct msghdr *msg,
                                copy = sk->mss;
                        if (copy > seglen)
                                copy = seglen;
-                       if (copy <= 0) 
+                       if (copy <= 0)
                        {
                                printk("TCP: **bug**: copy=%d, sk->mss=%d\n", copy, sk->mss);
                                return -EFAULT;
                        }
 
                /*
-                *      We should really check the window here also. 
+                *      We should really check the window here also.
                 */
-                
+
                        send_tmp = NULL;
-                       if (copy < sk->mss && !(flags & MSG_OOB) && sk->packets_out) 
+                       if (copy < sk->mss && !(flags & MSG_OOB) && sk->packets_out)
                        {
                                skb = sock_wmalloc(sk, sk->mtu + 128 + prot->max_header + 15, 0, GFP_KERNEL);
                                send_tmp = skb;
-                       } 
-                       else 
+                       }
+                       else
                        {
                                skb = sock_wmalloc(sk, copy + prot->max_header + 15 , 0, GFP_KERNEL);
                        }
-       
+
                        /*
-                        *      If we didn't get any memory, we need to sleep. 
+                        *      If we didn't get any memory, we need to sleep.
                         */
-       
-                       if (skb == NULL) 
+
+                       if (skb == NULL)
                        {
                                sk->socket->flags |= SO_NOSPACE;
-                               if (nonblock) 
+                               if (nonblock)
                                {
-                                       if (copied) 
+                                       if (copied)
                                                return copied;
                                        return -EAGAIN;
                                }
@@ -1091,18+1098,18 @@ static int do_tcp_sendmsg(struct sock *sk, struct msghdr *msg,
                        skb->sk = sk;
                        skb->free = 0;
                        skb->localroute = sk->localroute|(flags&MSG_DONTROUTE);
-       
+
                        /*
                         * FIXME: we need to optimize this.
                         * Perhaps some hints here would be good.
                         */
-               
+
                        tmp = prot->build_header(skb, sk->saddr, sk->daddr, &dev,
                                 IPPROTO_TCP, sk->opt, skb->truesize,sk->ip_tos,sk->ip_ttl,&sk->ip_route_cache);
-                       if (tmp < 0 ) 
+                       if (tmp < 0 )
                        {
                                sock_wfree(sk, skb);
-                               if (copied) 
+                               if (copied)
                                        return(copied);
                                return(tmp);
                        }
@@ -1112,15+1119,15 @@ static int do_tcp_sendmsg(struct sock *sk, struct msghdr *msg,
                        skb->dev = dev;
                        skb->h.th =(struct tcphdr *)skb_put(skb,sizeof(struct tcphdr));
                        tmp = tcp_build_header(skb->h.th, sk, seglen-copy);
-                       if (tmp < 0) 
+                       if (tmp < 0)
                        {
                                sock_wfree(sk, skb);
-                               if (copied) 
+                               if (copied)
                                        return(copied);
                                return(tmp);
                        }
-       
-                       if (flags & MSG_OOB) 
+
+                       if (flags & MSG_OOB)
                        {
                                skb->h.th->urg = 1;
                                skb->h.th->urg_ptr = ntohs(copy);
@@ -1128,15+1135,15 @@ static int do_tcp_sendmsg(struct sock *sk, struct msghdr *msg,
 
                        skb->csum = csum_partial_copy_fromuser(from,
                                skb_put(skb,copy), copy, 0);
-               
+
                        from += copy;
                        copied += copy;
                        len -= copy;
                        seglen -= copy;
                        skb->free = 0;
                        sk->write_seq += copy;
-               
-                       if (send_tmp != NULL) 
+
+                       if (send_tmp != NULL)
                        {
                                tcp_enqueue_partial(send_tmp, sk);
                                continue;
@@ -1158,7+1165,7 @@ static int tcp_sendmsg(struct sock *sk, struct msghdr *msg,
        /*
         *      Do sanity checking for sendmsg/sendto/send
         */
-        
+
        if (flags & ~(MSG_OOB|MSG_DONTROUTE))
                goto out;
        if (msg->msg_name) {
@@ -1166,15+1173,15 @@ static int tcp_sendmsg(struct sock *sk, struct msghdr *msg,
 
                if (msg->msg_namelen < sizeof(*addr))
                        goto out;
-               if (addr->sin_family && addr->sin_family != AF_INET) 
+               if (addr->sin_family && addr->sin_family != AF_INET)
                        goto out;
                retval = -ENOTCONN;
                if(sk->state == TCP_CLOSE)
                        goto out;
                retval = -EISCONN;
-               if (addr->sin_port != sk->dummy_th.dest) 
+               if (addr->sin_port != sk->dummy_th.dest)
                        goto out;
-               if (addr->sin_addr.s_addr != sk->daddr) 
+               if (addr->sin_addr.s_addr != sk->daddr)
                        goto out;
        }
 
@@ -1202,17+1209,17 @@ static int tcp_sendmsg(struct sock *sk, struct msghdr *msg,
 out:
        return retval;
 }
-       
+
 
 /*
- *     Send an ack if one is backlogged at this point. 
+ *     Send an ack if one is backlogged at this point.
  *
- *      This is called for delayed acks also.
+ *     This is called for delayed acks also.
  */
+
 void tcp_read_wakeup(struct sock *sk)
 {
-       if (!sk->ack_backlog) 
+       if (!sk->ack_backlog)
                return;
 
        /*
@@ -1220,7+1227,7 @@ void tcp_read_wakeup(struct sock *sk)
         * from the closed destination.
         */
        if ((sk->state == TCP_CLOSE) || (sk->state == TCP_TIME_WAIT))
-               return; 
+               return;
 
        tcp_send_ack(sk);
 }
@@ -1230,7+1237,7 @@ void tcp_read_wakeup(struct sock *sk)
  *     Handle reading urgent data. BSD has very simple semantics for
  *     this, no blocking and very strange errors 8)
  */
+
 static int tcp_recv_urg(struct sock * sk, int nonblock,
             struct msghdr *msg, int len, int flags, int *addr_len)
 {
@@ -1239,13+1246,13 @@ static int tcp_recv_urg(struct sock * sk, int nonblock,
         */
        if (sk->urginline || !sk->urg_data || sk->urg_data == URG_READ)
                return -EINVAL; /* Yes this is right ! */
-               
-       if (sk->err) 
+
+       if (sk->err)
                return sock_error(sk);
-               
-       if (sk->state == TCP_CLOSE || sk->done) 
+
+       if (sk->state == TCP_CLOSE || sk->done)
        {
-               if (!sk->done) 
+               if (!sk->done)
                {
                        sk->done = 1;
                        return 0;
@@ -1253,13+1260,13 @@ static int tcp_recv_urg(struct sock * sk, int nonblock,
                return -ENOTCONN;
        }
 
-       if (sk->shutdown & RCV_SHUTDOWN) 
+       if (sk->shutdown & RCV_SHUTDOWN)
        {
                sk->done = 1;
                return 0;
        }
        lock_sock(sk);
-       if (sk->urg_data & URG_VALID) 
+       if (sk->urg_data & URG_VALID)
        {
                char c = sk->urg_data;
                if (!(flags & MSG_PEEK))
@@ -1278,7+1285,7 @@ static int tcp_recv_urg(struct sock * sk, int nonblock,
                return 1;
        }
        release_sock(sk);
-       
+
        /*
         * Fixed the recv(..., MSG_OOB) behaviour.  BSD docs and
         * the available implementations agree in this case:
@@ -1294,7+1301,7 @@ static int tcp_recv_urg(struct sock * sk, int nonblock,
  *     must be called with interrupts disabled or with the
  *     socket locked so that the sk_buff queue operation is ok.
  */
+
 static inline void tcp_eat_skb(struct sock *sk, struct sk_buff * skb)
 {
        skb->sk = sk;
@@ -1303,38+1310,37 @@ static inline void tcp_eat_skb(struct sock *sk, struct sk_buff * skb)
 }
 
 /*
- *     FIXME:
- *     This routine frees used buffers.
- *     It should consider sending an ACK to let the
- *     other end know we now have a bigger window.
+ *     FIXME:
+ *     This routine frees used buffers.
+ *     It should consider sending an ACK to let the
+ *     other end know we now have a bigger window.
  */
 
 static void cleanup_rbuf(struct sock *sk)
 {
-       struct sk_buff *skb;
-
        /*
         * NOTE! The socket must be locked, so that we don't get
         * a messed-up receive queue.
         */
-       while ((skb=skb_peek(&sk->receive_queue)) != NULL) {
+       while (!skb_queue_empty(&sk->receive_queue)) {
+               struct sk_buff *skb = sk->receive_queue.next;
                if (!skb->used || skb->users)
                        break;
                tcp_eat_skb(sk, skb);
        }
 
-       /* If we raised the window due to cleaning up, tell the world.. */
-       if (tcp_raise_window(sk)) {
-               sk->ack_backlog++;
-               tcp_read_wakeup(sk);
-       }
-} 
+       /*
+        * Tell the world if we raised the window.
+        */
+       if (tcp_raise_window(sk))
+               tcp_send_ack(sk);
+}
 
 
 /*
- *     This routine copies from a sock struct into the user buffer. 
+ *     This routine copies from a sock struct into the user buffer.
  */
+
 static int tcp_recvmsg(struct sock *sk, struct msghdr *msg,
        int len, int nonblock, int flags, int *addr_len)
 {
@@ -1344,26+1350,26 @@ static int tcp_recvmsg(struct sock *sk, struct msghdr *msg,
        volatile u32 *seq;      /* So gcc doesn't overoptimise */
        unsigned long used;
 
-       /* 
-        *      This error should be checked. 
+       /*
+        *      This error should be checked.
         */
-        
+
        if (sk->state == TCP_LISTEN)
                return -ENOTCONN;
 
        /*
-        *      Urgent data needs to be handled specially. 
+        *      Urgent data needs to be handled specially.
         */
-        
+
        if (flags & MSG_OOB)
                return tcp_recv_urg(sk, nonblock, msg, len, flags, addr_len);
 
        /*
         *      Copying sequence to update. This is volatile to handle
-        *      the multi-reader case neatly (memcpy_to/fromfs might be 
+        *      the multi-reader case neatly (memcpy_to/fromfs might be
         *      inline and thus not flush cached variables otherwise).
         */
-        
+
        peek_seq = sk->copied_seq;
        seq = &sk->copied_seq;
        if (flags & MSG_PEEK)
@@ -1371,15+1377,15 @@ static int tcp_recvmsg(struct sock *sk, struct msghdr *msg,
 
        add_wait_queue(sk->sleep, &wait);
        lock_sock(sk);
-       while (len > 0) 
+       while (len > 0)
        {
                struct sk_buff * skb;
                u32 offset;
-       
+
                /*
                 * Are we at urgent data? Stop if we have read anything.
                 */
-                
+
                if (copied && sk->urg_data && sk->urg_seq == *seq)
                        break;
 
@@ -1397,11+1403,11 @@ static int tcp_recvmsg(struct sock *sk, struct msghdr *msg,
                /*
                 *      Next get a buffer.
                 */
-                
+
                current->state = TASK_INTERRUPTIBLE;
 
                skb = skb_peek(&sk->receive_queue);
-               do 
+               do
                {
                        if (!skb)
                                break;
@@ -1423,15+1429,15 @@ static int tcp_recvmsg(struct sock *sk, struct msghdr *msg,
                if (copied)
                        break;
 
-               if (sk->err) 
+               if (sk->err)
                {
                        copied = sock_error(sk);
                        break;
                }
 
-               if (sk->state == TCP_CLOSE) 
+               if (sk->state == TCP_CLOSE)
                {
-                       if (!sk->done) 
+                       if (!sk->done)
                        {
                                sk->done = 1;
                                break;
@@ -1440,13+1446,13 @@ static int tcp_recvmsg(struct sock *sk, struct msghdr *msg,
                        break;
                }
 
-               if (sk->shutdown & RCV_SHUTDOWN) 
+               if (sk->shutdown & RCV_SHUTDOWN)
                {
                        sk->done = 1;
                        break;
                }
-                       
-               if (nonblock) 
+
+               if (nonblock)
                {
                        copied = -EAGAIN;
                        break;
@@ -1463,32+1469,32 @@ static int tcp_recvmsg(struct sock *sk, struct msghdr *msg,
        found_ok_skb:
                /*
                 *      Lock the buffer. We can be fairly relaxed as
-                *      an interrupt will never steal a buffer we are 
+                *      an interrupt will never steal a buffer we are
                 *      using unless I've missed something serious in
                 *      tcp_data.
                 */
-               
+
                skb->users++;
-               
+
                /*
-                *      Ok so how much can we use ? 
+                *      Ok so how much can we use ?
                 */
-                
+
                used = skb->len - offset;
                if (len < used)
                        used = len;
                /*
-                *      Do we have urgent data here? 
+                *      Do we have urgent data here?
                 */
-               
-               if (sk->urg_data) 
+
+               if (sk->urg_data)
                {
                        u32 urg_offset = sk->urg_seq - *seq;
-                       if (urg_offset < used) 
+                       if (urg_offset < used)
                        {
-                               if (!urg_offset) 
+                               if (!urg_offset)
                                {
-                                       if (!sk->urginline) 
+                                       if (!sk->urginline)
                                        {
                                                ++*seq;
                                                offset++;
@@ -1499,12+1505,12 @@ static int tcp_recvmsg(struct sock *sk, struct msghdr *msg,
                                        used = urg_offset;
                        }
                }
-               
+
                /*
                 *      Copy it - We _MUST_ update *seq first so that we
                 *      don't ever double read when we have dual readers
                 */
-                
+
                *seq += used;
 
                /*
@@ -1512,25+1518,25 @@ static int tcp_recvmsg(struct sock *sk, struct msghdr *msg,
                 *      do a second read it relies on the skb->users to avoid
                 *      a crash when cleanup_rbuf() gets called.
                 */
-                
+
                memcpy_toiovec(msg->msg_iov,((unsigned char *)skb->h.th) +
                        skb->h.th->doff*4 + offset, used);
                copied += used;
                len -= used;
-               
+
                /*
                 *      We now will not sleep again until we are finished
                 *      with skb. Sorry if you are doing the SMP port
                 *      but you'll just have to fix it neatly ;)
                 */
-                
+
                skb->users --;
-               
+
                if (after(sk->copied_seq,sk->urg_seq))
                        sk->urg_data = 0;
                if (used + offset < skb->len)
                        continue;
-               
+
                /*
                 *      Process the FIN.
                 */
@@ -1541,24+1547,24 @@ static int tcp_recvmsg(struct sock *sk, struct msghdr *msg,
                        continue;
                skb->used = 1;
                if (!skb->users)
-                       tcp_eat_skb(sk, skb);           
+                       tcp_eat_skb(sk, skb);
                continue;
 
        found_fin_ok:
                ++*seq;
                if (flags & MSG_PEEK)
                        break;
-                       
+
                /*
                 *      All is done
                 */
-                
+
                skb->used = 1;
                sk->shutdown |= RCV_SHUTDOWN;
                break;
 
        }
-       
+
        if(copied>0 && msg->msg_name)
        {
                struct sockaddr_in *sin=(struct sockaddr_in *)msg->msg_name;
@@ -1568,7+1574,7 @@ static int tcp_recvmsg(struct sock *sk, struct msghdr *msg,
        }
        if(addr_len)
                *addr_len=sizeof(struct sockaddr_in);
-               
+
        remove_wait_queue(sk->sleep, &wait);
        current->state = TASK_RUNNING;
 
@@ -1582,11+1588,11 @@ static int tcp_recvmsg(struct sock *sk, struct msghdr *msg,
 
 /*
  *     State processing on a close. This implements the state shift for
- *     sending our FIN frame. Note that we only send a FIN for some 
+ *     sending our FIN frame. Note that we only send a FIN for some
  *     states. A shutdown() may have already sent the FIN, or we may be
  *     closed.
  */
+
 static int tcp_close_state(struct sock *sk, int dead)
 {
        int ns=TCP_CLOSE;
@@ -1613,9+1619,9 @@ static int tcp_close_state(struct sock *sk, int dead)
                        ns=TCP_LAST_ACK;
                        send_fin=1;
        }
-       
+
        tcp_set_state(sk,ns);
-               
+
        /*
         *      This is a (useful) BSD violating of the RFC. There is a
         *      problem with TCP as specified in that the other end could
@@ -1633,7+1639,7 @@ static int tcp_close_state(struct sock *sk, int dead)
                else
                        tcp_reset_msl_timer(sk, TIME_CLOSE, TCP_FIN_TIMEOUT);
        }
-       
+
        return send_fin;
 }
 
@@ -1650,18+1656,18 @@ void tcp_shutdown(struct sock *sk, int how)
         *              Tim MacKenzie(tym@dibbler.cs.monash.edu.au) 4 Dec '92.
         */
 
-       if (!(how & SEND_SHUTDOWN)) 
+       if (!(how & SEND_SHUTDOWN))
                return;
-        
+
        /*
         *      If we've already sent a FIN, or it's a closed state
         */
-        
+
        if (sk->state == TCP_FIN_WAIT1 ||
            sk->state == TCP_FIN_WAIT2 ||
            sk->state == TCP_CLOSING ||
            sk->state == TCP_LAST_ACK ||
-           sk->state == TCP_TIME_WAIT || 
+           sk->state == TCP_TIME_WAIT ||
            sk->state == TCP_CLOSE ||
            sk->state == TCP_LISTEN
          )
@@ -1677,19+1683,19 @@ void tcp_shutdown(struct sock *sk, int how)
        sk->shutdown |= SEND_SHUTDOWN;
 
        /*
-        *  Clear out any half completed packets. 
+        *  Clear out any half completed packets.
         */
 
        if (sk->partial)
                tcp_send_partial(sk);
-               
+
        /*
         *      FIN if needed
         */
-        
+
        if (tcp_close_state(sk,0))
                tcp_send_fin(sk);
-               
+
        release_sock(sk);
 }
 
@@ -1697,7+1703,7 @@ void tcp_shutdown(struct sock *sk, int how)
 /*
  *     Return 1 if we still have things to send in our buffers.
  */
+
 static inline int closing(struct sock * sk)
 {
        switch (sk->state) {
@@ -1715,12+1721,12 @@ static void tcp_close(struct sock *sk, unsigned long timeout)
        struct sk_buff *skb;
 
        /*
-        * We need to grab some memory, and put together a FIN, 
+        * We need to grab some memory, and put together a FIN,
         * and then put it into the queue to be sent.
         */
-       
+
        lock_sock(sk);
-       
+
        tcp_cache_zap();
        if(sk->state == TCP_LISTEN)
        {
@@ -1731,11+1737,11 @@ static void tcp_close(struct sock *sk, unsigned long timeout)
                sk->dead = 1;
                return;
        }
-       
+
        sk->keepopen = 1;
        sk->shutdown = SHUTDOWN_MASK;
 
-       if (!sk->dead) 
+       if (!sk->dead)
                sk->state_change(sk);
 
        /*
@@ -1743,22+1749,22 @@ static void tcp_close(struct sock *sk, unsigned long timeout)
         *  descriptor close, not protocol-sourced closes, because the
         *  reader process may not have drained the data yet!
         */
-                
+
        while((skb=skb_dequeue(&sk->receive_queue))!=NULL)
                kfree_skb(skb, FREE_READ);
 
        /*
-        *      Get rid off any half-completed packets. 
+        *      Get rid off any half-completed packets.
         */
 
-       if (sk->partial) 
+       if (sk->partial)
                tcp_send_partial(sk);
-               
+
        /*
         *      Timeout is not the same thing - however the code likes
         *      to send both the same way (sigh).
         */
-        
+
        if (tcp_close_state(sk,1)==1)
        {
                tcp_send_fin(sk);
@@ -1771,7+1777,7 @@ static void tcp_close(struct sock *sk, unsigned long timeout)
                while(closing(sk) && current->timeout)
                {
                        interruptible_sleep_on(sk->sleep);
-                       if (current->signal & ~current->blocked) 
+                       if (current->signal & ~current->blocked)
                        {
                                break;
                        }
@@ -1792,32+1798,32 @@ static void tcp_close(struct sock *sk, unsigned long timeout)
 
 
 /*
- *     This will accept the next outstanding connection. 
+ *     This will accept the next outstanding connection.
  */
+
 static struct sock *tcp_accept(struct sock *sk, int flags)
 {
        struct sock *newsk;
        struct sk_buff *skb;
-  
+
   /*
    * We need to make sure that this socket is listening,
    * and that it has something pending.
    */
 
-       if (sk->state != TCP_LISTEN) 
+       if (sk->state != TCP_LISTEN)
        {
                sk->err = EINVAL;
-               return(NULL); 
+               return(NULL);
        }
 
        /* Avoid the race. */
        cli();
        lock_sock(sk);
 
-       while((skb = tcp_dequeue_established(sk)) == NULL) 
+       while((skb = tcp_dequeue_established(sk)) == NULL)
        {
-               if (flags & O_NONBLOCK) 
+               if (flags & O_NONBLOCK)
                {
                        sti();
                        release_sock(sk);
@@ -1827,7+1833,7 @@ static struct sock *tcp_accept(struct sock *sk, int flags)
 
                release_sock(sk);
                interruptible_sleep_on(sk->sleep);
-               if (current->signal & ~current->blocked) 
+               if (current->signal & ~current->blocked)
                {
                        sti();
                        sk->err = ERESTARTSYS;
@@ -1838,7+1844,7 @@ static struct sock *tcp_accept(struct sock *sk, int flags)
        sti();
 
        /*
-        *      Now all we need to do is return skb->sk. 
+        *      Now all we need to do is return skb->sk.
         */
 
        newsk = skb->sk;
@@ -1850,9+1856,9 @@ static struct sock *tcp_accept(struct sock *sk, int flags)
 }
 
 /*
- *     This will initiate an outgoing connection. 
+ *     This will initiate an outgoing connection.
  */
+
 static int tcp_connect(struct sock *sk, struct sockaddr_in *usin, int addr_len)
 {
        struct sk_buff *buff;
@@ -1863,47+1869,48 @@ static int tcp_connect(struct sock *sk, struct sockaddr_in *usin, int addr_len)
        struct tcphdr *t1;
        struct rtable *rt;
 
-       if (sk->state != TCP_CLOSE) 
+       if (sk->state != TCP_CLOSE)
                return(-EISCONN);
 
        /*
         *      Don't allow a double connect.
         */
-               
+
        if(sk->daddr)
                return -EINVAL;
-       
-       if (addr_len < 8) 
+
+       if (addr_len < 8)
                return(-EINVAL);
 
-       if (usin->sin_family && usin->sin_family != AF_INET) 
+       if (usin->sin_family && usin->sin_family != AF_INET)
                return(-EAFNOSUPPORT);
 
        /*
         *      connect() to INADDR_ANY means loopback (BSD'ism).
         */
-       
+
        if(usin->sin_addr.s_addr==INADDR_ANY)
                usin->sin_addr.s_addr=ip_my_addr();
-                 
+
        /*
-        *      Don't want a TCP connection going to a broadcast address 
+        *      Don't want a TCP connection going to a broadcast address
         */
 
-       if ((atype=ip_chk_addr(usin->sin_addr.s_addr)) == IS_BROADCAST || atype==IS_MULTICAST) 
+       if ((atype=ip_chk_addr(usin->sin_addr.s_addr)) == IS_BROADCAST || atype==IS_MULTICAST)
                return -ENETUNREACH;
-  
+
        lock_sock(sk);
        sk->daddr = usin->sin_addr.s_addr;
        sk->write_seq = tcp_init_seq();
        sk->window_seq = sk->write_seq;
        sk->rcv_ack_seq = sk->write_seq -1;
+       sk->rcv_ack_cnt = 1;
        sk->err = 0;
        sk->dummy_th.dest = usin->sin_port;
        release_sock(sk);
 
        buff = sock_wmalloc(sk,MAX_SYN_SIZE,0, GFP_KERNEL);
-       if (buff == NULL) 
+       if (buff == NULL)
        {
                return(-ENOMEM);
        }
@@ -1911,15+1918,15 @@ static int tcp_connect(struct sock *sk, struct sockaddr_in *usin, int addr_len)
        buff->sk = sk;
        buff->free = 0;
        buff->localroute = sk->localroute;
-       
+
 
        /*
         *      Put in the IP header and routing stuff.
         */
-        
+
        tmp = sk->prot->build_header(buff, sk->saddr, sk->daddr, &dev,
                IPPROTO_TCP, NULL, MAX_SYN_SIZE,sk->ip_tos,sk->ip_ttl,&sk->ip_route_cache);
-       if (tmp < 0) 
+       if (tmp < 0)
        {
                sock_wfree(sk, buff);
                release_sock(sk);
@@ -1941,7+1948,7 @@ static int tcp_connect(struct sock *sk, struct sockaddr_in *usin, int addr_len)
        t1->syn = 1;
        t1->doff = 6;
        /* use 512 or whatever user asked for */
-       
+
        if(rt!=NULL && (rt->rt_flags&RTF_WINDOW))
                sk->window_clamp=rt->rt_window;
        else
@@ -1951,20+1958,20 @@ static int tcp_connect(struct sock *sk, struct sockaddr_in *usin, int addr_len)
                sk->mtu = sk->user_mss;
        else if (rt)
                sk->mtu = rt->rt_mtu - sizeof(struct iphdr) - sizeof(struct tcphdr);
-       else 
+       else
                sk->mtu = 576 - sizeof(struct iphdr) - sizeof(struct tcphdr);
 
        /*
-        *      but not bigger than device MTU 
+        *      but not bigger than device MTU
         */
 
        if(sk->mtu <32)
                sk->mtu = 32;   /* Sanity limit */
-               
+
        sk->mtu = min(sk->mtu, dev->mtu - sizeof(struct iphdr) - sizeof(struct tcphdr));
 
 #ifdef CONFIG_SKIP
-       
+
        /*
         *      SKIP devices set their MTU to 65535. This is so they can take packets
         *      unfragmented to security process then fragment. They could lie to the
@@ -1973,13+1980,13 @@ static int tcp_connect(struct sock *sk, struct sockaddr_in *usin, int addr_len)
         *
         *      [IPHDR][IPSP][Security data][Modified TCP data][Security data]
         */
-        
+
        if(skip_pick_mtu!=NULL)         /* If SKIP is loaded.. */
                sk->mtu=skip_pick_mtu(sk->mtu,dev);
 #endif
-       
+
        /*
-        *      Put in the TCP options to say MTU. 
+        *      Put in the TCP options to say MTU.
         */
 
        ptr = skb_put(buff,4);
@@ -1992,7+1999,7 @@ static int tcp_connect(struct sock *sk, struct sockaddr_in *usin, int addr_len)
                  sizeof(struct tcphdr) + 4, buff);
 
        /*
-        *      This must go first otherwise a really quick response will get reset. 
+        *      This must go first otherwise a really quick response will get reset.
         */
 
        tcp_cache_zap();
@@ -2001,25+2008,27 @@ static int tcp_connect(struct sock *sk, struct sockaddr_in *usin, int addr_len)
                sk->rto = rt->rt_irtt;
        else
                sk->rto = TCP_TIMEOUT_INIT;
-       sk->retransmit_timer.function=&tcp_retransmit_timer;
+       sk->delack_timer.function = tcp_delack_timer;
+       sk->delack_timer.data = (unsigned long) sk;
+       sk->retransmit_timer.function = tcp_retransmit_timer;
        sk->retransmit_timer.data = (unsigned long)sk;
        tcp_reset_xmit_timer(sk, TIME_WRITE, sk->rto);  /* Timer for repeating the SYN until an answer  */
-       sk->retransmits = 0;                            /* Now works the right way instead of a hacked 
+       sk->retransmits = 0;                            /* Now works the right way instead of a hacked
                                                                                        initial setting */
 
-       sk->prot->queue_xmit(sk, dev, buff, 0);  
+       sk->prot->queue_xmit(sk, dev, buff, 0);
        tcp_reset_xmit_timer(sk, TIME_WRITE, sk->rto);
        tcp_statistics.TcpActiveOpens++;
        tcp_statistics.TcpOutSegs++;
-  
+
        release_sock(sk);
        return(0);
 }
 
 /*
- *     Socket option code for TCP. 
+ *     Socket option code for TCP.
  */
-  
+
 int tcp_setsockopt(struct sock *sk, int level, int optname, char *optval, int optlen)
 {
        int val,err;
@@ -2027,13+2036,13 @@ int tcp_setsockopt(struct sock *sk, int level, int optname, char *optval, int op
        if(level!=SOL_TCP)
                return ip_setsockopt(sk,level,optname,optval,optlen);
 
-       if (optval == NULL) 
+       if (optval == NULL)
                return(-EINVAL);
 
        err=verify_area(VERIFY_READ, optval, sizeof(int));
        if(err)
                return err;
-       
+
        val = get_user((int *)optval);
 
        switch(optname)
@@ -2062,7+2071,7 @@ int tcp_getsockopt(struct sock *sk, int level, int optname, char *optval, int *o
 
        if(level!=SOL_TCP)
                return ip_getsockopt(sk,level,optname,optval,optlen);
-                       
+
        switch(optname)
        {
                case TCP_MAXSEG:
@@ -2085,7+2094,7 @@ int tcp_getsockopt(struct sock *sk, int level, int optname, char *optval, int *o
        put_user(val,(int *)optval);
 
        return(0);
-}      
+}
 
 
 struct proto tcp_prot = {
index 704afa7..840e10e 100644 (file)
 #include <linux/config.h>
 #include <net/tcp.h>
 
-#include <linux/interrupt.h>
-
 /*
- *     Policy code extracted so its now seperate
+ *     Policy code extracted so its now separate
  */
 
 /*
  *     Called each time to estimate the delayed ack timeout. This is
- *     how it should be done so a fast link isnt impacted by ack delay.
+ *     how it should be done so a fast link isn't impacted by ack delay.
  */
  
 extern __inline__ void tcp_delack_estimator(struct sock *sk)
@@ -156,8+154,8 @@ static inline struct sock * get_tcp_sock(u32 saddr, u16 sport, u32 daddr, u16 dp
  * React to a out-of-window TCP sequence number in an incoming packet
  */
  
-static void bad_tcp_sequence(struct sock *sk, struct tcphdr *th, short len,
-            struct options *opt, unsigned long saddr, struct device *dev)
+static void bad_tcp_sequence(struct sock *sk, struct tcphdr *th, u32 end_seq,
+             struct device *dev)
 {
        if (th->rst)
                return;
@@ -175,16+173,24 @@ static void bad_tcp_sequence(struct sock *sk, struct tcphdr *th, short len,
                return;
        }
        
-       /*
-        *      4.3reno machines look for these kind of acks so they can do fast
-        *      recovery. Three identical 'old' acks lets it know that one frame has
-        *      been lost and should be resent. Because this is before the whole window
-        *      of data has timed out it can take one lost frame per window without
-        *      stalling. [See Jacobson RFC1323, Stevens TCP/IP illus vol2]
-        *
-        *      We also should be spotting triple bad sequences.
+       /* 
+        * We got out of sequence data.
+        * This turns out to be tricky. If the packet ends at the
+        * edge of the window, then we MUST ack the packet,
+        * otherwise a lost ACK packet can stall the TCP.
+        * We deal with this case in tcp_queue().
+        * On the other hand, if the packet is further to the
+        * left of the window, then we are looking a retransmitted
+        * packet. If we ACK it we can get into a situation that
+        * will later induce a fast retransmit of another packet.
+        * This can end up eating up half our bandwidth.
         */
-       tcp_send_ack(sk);
+
+       /* This case is NOT supposed to be able
+        * to happen. Test for it?
+        */
+       if (sk->acked_seq == end_seq)
+               printk("Impossible out of sequence data case.\n");
        return;
 }
 
@@ -438,9+444,12 @@ static void tcp_conn_request(struct sock *sk, struct sk_buff *skb,
        init_timer(&newsk->timer);
        newsk->timer.data = (unsigned long)newsk;
        newsk->timer.function = &net_timer;
+       init_timer(&newsk->delack_timer);
+       newsk->delack_timer.data = (unsigned long)newsk;
+       newsk->delack_timer.function = tcp_delack_timer;
        init_timer(&newsk->retransmit_timer);
        newsk->retransmit_timer.data = (unsigned long)newsk;
-       newsk->retransmit_timer.function=&tcp_retransmit_timer;
+       newsk->retransmit_timer.function = tcp_retransmit_timer;
        newsk->dummy_th.source = skb->h.th->dest;
        newsk->dummy_th.dest = skb->h.th->source;
        
@@ -600,6+609,7 @@ static int tcp_ack(struct sock *sk, struct tcphdr *th, u32 ack, int len)
         *     in shutdown state
         * 2 - data from retransmit queue was acked and removed
         * 4 - window shrunk or data from retransmit queue was acked and removed
+        * 8 - we want to do a fast retransmit. One packet only.
         */
 
        if(sk->zapped)
@@ -654,11+664,6 @@ static int tcp_ack(struct sock *sk, struct tcphdr *th, u32 ack, int len)
        }
 
        /*
-        *      Update the right hand window edge of the host
-        */
-       sk->window_seq = window_seq;
-
-       /*
         *      Pipe has emptied
         */      
        if (sk->send_tail == NULL || sk->send_head == NULL) 
@@ -707,10+712,29 @@ static int tcp_ack(struct sock *sk, struct tcphdr *th, u32 ack, int len)
        }
 
        /*
-        *      Remember the highest ack received.
+        *      Remember the highest ack received and update the
+        *      right hand window edge of the host.
+        *      We do a bit of work here to track number of times we've
+        *      seen this ack without a change in the right edge of the
+        *      window. This will allow us to do fast retransmits.
         */
-        
-       sk->rcv_ack_seq = ack;
+
+       if (sk->rcv_ack_seq == ack && sk->window_seq == window_seq)
+       {
+               /*
+                * We only want to short cut this once, many
+                * ACKs may still come, we'll do a normal transmit
+                * for these ACKs.
+                */
+               if (++sk->rcv_ack_cnt == MAX_DUP_ACKS+1)
+                       flag |= 8;      /* flag for a fast retransmit */
+       }
+       else
+       {
+               sk->window_seq = window_seq;
+               sk->rcv_ack_seq = ack;
+               sk->rcv_ack_cnt = 1;
+       }
        
        /*
         *      We passed data and got it acked, remove any soft error
@@ -891,17+915,9 @@ static int tcp_ack(struct sock *sk, struct tcphdr *th, u32 ack, int len)
                        break;
                default:
                        /*
-                        *      Must check send_head, write_queue, and ack_backlog
-                        *      to determine which timeout to use.
+                        * Reset the xmit timer - state has changed.
                         */
-                       if (sk->send_head || skb_peek(&sk->write_queue) != NULL || sk->ack_backlog) {
-                               tcp_reset_xmit_timer(sk, TIME_WRITE, sk->rto);
-                       } else if (sk->keepopen) {
-                               tcp_reset_xmit_timer(sk, TIME_KEEPOPEN, TCP_TIMEOUT_LEN);
-                       } else {
-                               del_timer(&sk->retransmit_timer);
-                               sk->ip_xmit_timeout = 0;
-                       }
+                       tcp_reset_xmit_timer(sk, 0, 0);
                        break;
                }
        }
@@ -911,8+927,10 @@ static int tcp_ack(struct sock *sk, struct tcphdr *th, u32 ack, int len)
         *      packets immediately (end of Nagle rule application).
         */
         
-       if (sk->packets_out == 0 && sk->partial != NULL &&
-               skb_peek(&sk->write_queue) == NULL && sk->send_head == NULL) 
+       if (sk->packets_out == 0
+           && sk->partial != NULL
+           && skb_queue_empty(&sk->write_queue)
+           && sk->send_head == NULL) 
        {
                flag |= 1;
                tcp_send_partial(sk);
@@ -1030,6+1048,7 @@ static int tcp_ack(struct sock *sk, struct tcphdr *th, u32 ack, int len)
        
        if (((!flag) || (flag&4)) && sk->send_head != NULL &&
               (((flag&2) && sk->retransmits) ||
+               (flag&8) ||
               (sk->send_head->when + sk->rto < jiffies))) 
        {
                if(sk->send_head->when + sk->rto < jiffies)
@@ -1209,61+1228,102 @@ static void tcp_queue(struct sk_buff * skb, struct sock * sk, struct tcphdr *th)
        u32 ack_seq;
 
        tcp_insert_skb(skb, &sk->receive_queue);
+
        /*
         * Did we get anything new to ack?
         */
        ack_seq = sk->acked_seq;
-       if (!after(skb->seq, ack_seq) && after(skb->end_seq, ack_seq)) {
-               struct sk_buff_head * list = &sk->receive_queue;
-               struct sk_buff * next;
-               ack_seq = tcp_queue_ack(skb, sk);
 
-               /*
-                * Do we have any old packets to ack that the above
-                * made visible? (Go forward from skb)
-                */
-               next = skb->next;
-               while (next != (struct sk_buff *) list) {
-                       if (after(next->seq, ack_seq))
-                               break;
-                       if (after(next->end_seq, ack_seq))
-                               ack_seq = tcp_queue_ack(next, sk);
-                       next = next->next;
+
+       if (!after(skb->seq, ack_seq)) {
+               if (after(skb->end_seq, ack_seq)) {
+                       /* the packet stradles our window end */
+                       struct sk_buff_head * list = &sk->receive_queue;
+                       struct sk_buff * next;
+                       ack_seq = tcp_queue_ack(skb, sk);
+
+                       /*
+                        * Do we have any old packets to ack that the above
+                        * made visible? (Go forward from skb)
+                        */
+                       next = skb->next;
+                       while (next != (struct sk_buff *) list) {
+                               if (after(next->seq, ack_seq))
+                                       break;
+                               if (after(next->end_seq, ack_seq))
+                                       ack_seq = tcp_queue_ack(next, sk);
+                               next = next->next;
+                       }
+
+                       /*
+                        * Ok, we found new data, update acked_seq as
+                        * necessary (and possibly send the actual
+                        * ACK packet).
+                        */
+                       sk->acked_seq = ack_seq;
+
+               } else {
+                       if (sk->debug)
+                               printk("Ack duplicate packet.\n");
+                       tcp_send_ack(sk);
+                       return;
                }
 
-               /*
-                * Ok, we found new data, update acked_seq as
-                * necessary (and possibly send the actual
-                * ACK packet).
-                */
-               sk->acked_seq = ack_seq;
 
                /*
-                *      rules for delaying an ack:
-                *      - delay time <= 0.5 HZ
-                *      - must send at least every 2 full sized packets
-                *      - we don't have a window update to send
-                *
-                * We handle the window update in the actual read
-                * side, so we only have to worry about the first two.
+                * Delay the ack if possible.  Send ack's to
+                * fin frames immediately as there shouldn't be
+                * anything more to come.
                 */
                if (!sk->delay_acks || th->fin) {
                        tcp_send_ack(sk);
+               } else {
+                       /*
+                        * If psh is set we assume it's an
+                        * interactive session that wants quick
+                        * acks to avoid nagling too much. 
+                        */
+                       int delay = HZ/2;
+                       if (th->psh)
+                               delay = HZ/10;
+                       tcp_send_delayed_ack(sk, delay);
                }
-               else
-               {
-                       int timeout = sk->ato;
-                       if (timeout > HZ/2)
-                               timeout = HZ/2;
-                       if (sk->bytes_rcv > sk->max_unacked) {
-                               timeout = 0;
-                               mark_bh(TIMER_BH);
-                       }
-                       sk->ack_backlog++;
-                       if(sk->debug)
-                               printk("Ack queued.\n");
-                       tcp_reset_xmit_timer(sk, TIME_WRITE, timeout);
-               }               
+
+               /*
+                *      Tell the user we have some more data.
+                */
+
+               if (!sk->dead)
+                       sk->data_ready(sk,0);
+
+       }
+       else
+       {
+           /*
+            *  If we've missed a packet, send an ack.
+            *  Also start a timer to send another.
+            *
+            *  4.3reno machines look for these kind of acks so
+            *  they can do fast recovery. Three identical 'old'
+            *  acks lets it know that one frame has been lost
+            *      and should be resent. Because this is before the
+            *  whole window of data has timed out it can take
+            *  one lost frame per window without stalling.
+            *  [See Jacobson RFC1323, Stevens TCP/IP illus vol2]
+            *
+            *  We also should be spotting triple bad sequences.
+            *  [We now do this.]
+            *
+            */
+            
+           if (!skb->acked) 
+           {
+                   if(sk->debug)
+                           printk("Ack past end of seq packet.\n");
+                   tcp_send_ack(sk);
+                   sk->ack_backlog++;
+                   tcp_reset_xmit_timer(sk, TIME_WRITE, min(sk->ato, HZ/2));
+           }
        }
 }
 
@@ -1362,28+1422,6 @@ static int tcp_data(struct sk_buff *skb, struct sock *sk,
 
        tcp_queue(skb, sk, th);
 
-       /*
-        *      If we've missed a packet, send an ack.
-        *      Also start a timer to send another.
-        */
-        
-       if (!skb->acked) 
-       {
-               tcp_send_ack(sk);
-               sk->ack_backlog++;
-               tcp_reset_xmit_timer(sk, TIME_WRITE, min(sk->ato, HZ/2));
-       }
-
-       /*
-        *      Now tell the user we may have some data. 
-        */
-        
-       if (!sk->dead) 
-       {
-               if(sk->debug)
-                       printk("Data wakeup.\n");
-               sk->data_ready(sk,0);
-       } 
        return(0);
 }
 
@@ -1809,7+1847,7 @@ int tcp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt,
        
        if (!tcp_sequence(sk, skb->seq, skb->end_seq-th->syn))
        {
-               bad_tcp_sequence(sk, th, len, opt, saddr, dev);
+               bad_tcp_sequence(sk, th, skb->end_seq-th->syn, dev);
                kfree_skb(skb, FREE_READ);
                return 0;
        }
index b195cc0..9fd524c 100644 (file)
 #include <linux/config.h>
 #include <net/tcp.h>
 
+#include <linux/interrupt.h>
+
+/*
+ *     Get rid of any delayed acks, we sent one already..
+ */
+static __inline__ void clear_delayed_acks(struct sock * sk)
+{
+       sk->ack_timed = 0;
+       sk->ack_backlog = 0;
+       sk->bytes_rcv = 0;
+       del_timer(&sk->delack_timer);
+}
+
 /*
  *     This is the main buffer sending routine. We queue the buffer
  *     having checked it is sane seeming.
@@ -106,7+119,7 @@ void tcp_send_skb(struct sock *sk, struct sk_buff *skb)
                /*
                 *      This is going straight out
                 */
-                
+               clear_delayed_acks(sk);          
                th->ack_seq = htonl(sk->acked_seq);
                th->window = htons(tcp_select_window(sk));
 
@@ -122,10+135,6 @@ void tcp_send_skb(struct sock *sk, struct sk_buff *skb)
                 
                sk->prot->queue_xmit(sk, skb->dev, skb, 0);
                
-               
-               sk->ack_backlog = 0;
-               sk->bytes_rcv = 0;
-
                /*
                 *      Set for next retransmit based on expected ACK time.
                 *      FIXME: We set this every time which means our 
@@ -290,10+299,8 @@ void tcp_write_xmit(struct sock *sk)
                         */
                         
                        sk->prot->queue_xmit(sk, skb->dev, skb, skb->free);
-                       
-                       
-                       sk->ack_backlog = 0;
-                       sk->bytes_rcv = 0;
+
+                       clear_delayed_acks(sk);
 
                        /*
                         *      Again we slide the timer wrongly
@@ -339,7+346,7 @@ void tcp_do_retransmit(struct sock *sk, int all)
                /*                 (the skb_pull() changes skb->data while we may   */
                /*                 actually try to send the data. Ouch. A side      */
                /*                 effect is that we'll send some unnecessary data, */
-               /*                 but the alternative is disasterous...            */
+               /*                 but the alternative is disastrous...     */
                
                if (skb_device_locked(skb))
                        break;
@@ -429,8+436,7 @@ void tcp_do_retransmit(struct sock *sk, int all)
                         */
                 
                        th->ack_seq = htonl(sk->acked_seq);
-                       sk->ack_backlog = 0;
-                       sk->bytes_rcv = 0;
+                       clear_delayed_acks(sk);
                        th->window = ntohs(tcp_select_window(sk));
                        tcp_send_check(th, sk->saddr, sk->daddr, size, skb);
                
@@ -631,7+637,7 @@ void tcp_send_fin(struct sock *sk)
        buff->end_seq = sk->write_seq;
        t1->seq = htonl(buff->seq);
        t1->ack_seq = htonl(sk->acked_seq);
-       t1->window = htons(sk->window=tcp_select_window(sk));
+       t1->window = htons(tcp_select_window(sk));
        t1->fin = 1;
        tcp_send_check(t1, sk->saddr, sk->daddr, sizeof(*t1), buff);
 
@@ -747,6+753,39 @@ void tcp_send_synack(struct sock * newsk, struct sock * sk, struct sk_buff * skb
 }
 
 /*
+ *     Set up the timers for sending a delayed ack..
+ *
+ *      rules for delaying an ack:
+ *      - delay time <= 0.5 HZ
+ *      - must send at least every 2 full sized packets
+ *      - we don't have a window update to send
+ */
+void tcp_send_delayed_ack(struct sock * sk, int max_timeout)
+{
+       unsigned long timeout, now;
+
+       /* Calculate new timeout */
+       now = jiffies;
+       timeout = sk->ato;
+       if (timeout > max_timeout)
+               timeout = max_timeout;
+       timeout += now;
+       if (sk->bytes_rcv > sk->max_unacked) {
+               timeout = now;
+               mark_bh(TIMER_BH);
+       }
+
+       /* Use new timeout only if there wasn't a older one earlier  */
+       if (!del_timer(&sk->delack_timer) || timeout < sk->delack_timer.expires)
+               sk->delack_timer.expires = timeout;
+
+       sk->ack_backlog++;
+       add_timer(&sk->delack_timer);
+}
+
+
+
+/*
  *     This routine sends an ack and also updates the window. 
  */
  
@@ -765,10+804,8 @@ void tcp_send_ack(struct sock *sk)
         *      is on we are just doing an ACK timeout and need to switch
         *      to a keepalive.
         */
-        
-       sk->ack_backlog = 0;
-       sk->bytes_rcv = 0;
-       sk->ack_timed = 0;
+
+       clear_delayed_acks(sk);
 
        if (sk->send_head == NULL
            && skb_queue_empty(&sk->write_queue)
@@ -794,12+831,8 @@ void tcp_send_ack(struct sock *sk)
                 *      bandwidth on slow links to send a spare ack than
                 *      resend packets. 
                 */
-                
-               sk->ack_backlog++;
-               if (sk->ip_xmit_timeout != TIME_WRITE && tcp_connected(sk->state)) 
-               {
-                       tcp_reset_xmit_timer(sk, TIME_WRITE, HZ);
-               }
+
+               tcp_send_delayed_ack(sk, HZ/2);
                return;
        }
 
@@ -829,12+862,10 @@ void tcp_send_ack(struct sock *sk)
         *      Fill in the packet and send it
         */
         
-       sk->window = tcp_select_window(sk);
-
        memcpy(t1, &sk->dummy_th, sizeof(*t1));
        t1->seq     = htonl(sk->sent_seq);
        t1->ack_seq = htonl(sk->acked_seq);
-       t1->window  = htons(sk->window);
+       t1->window  = htons(tcp_select_window(sk));
 
        tcp_send_check(t1, sk->saddr, sk->daddr, sizeof(*t1), buff);
        if (sk->debug)
@@ -879,7+910,7 @@ void tcp_write_wakeup(struct sock *sk)
                /*
                 * We are probing the opening of a window
                 * but the window size is != 0
-                * must have been a result SWS advoidance ( sender )
+                * must have been a result SWS avoidance ( sender )
                 */
            
                struct iphdr *iph;
index 99cffa3..dc3fed8 100644 (file)
 
 #include <net/tcp.h>
 
+void tcp_delack_timer(unsigned long data)
+{
+       tcp_send_ack((struct sock *) data);
+}
+
 /*
  *     Reset the retransmission timer
+ *
+ *     We currently ignore the why/when parameters, and decide on
+ *     our own how long we should wait on our own..
  */
  
 void tcp_reset_xmit_timer(struct sock *sk, int why, unsigned long when)
 {
-       del_timer(&sk->retransmit_timer);
-       sk->ip_xmit_timeout = why;
-       if((long)when < 0)
-       {
-               when=3;
-               printk("Error: Negative timer in xmit_timer\n");
+       unsigned long now = jiffies;
+
+       when = ~0UL;
+       why = -1;
+
+       /*
+        * Was an old timer event active?
+        */
+       if (del_timer(&sk->retransmit_timer)) {
+               why = sk->ip_xmit_timeout;
+               when = sk->retransmit_timer.expires;
+       }
+
+       /* 
+        * Keepopen processing?
+        */
+       if (sk->keepopen) {
+               unsigned long new_when = now + TCP_TIMEOUT_LEN;
+               if (new_when < when) {
+                       when = new_when;
+                       why = TIME_KEEPOPEN;
+               }
+       }
+
+       /*
+        * Retransmission?
+        */
+       if (sk->send_head) {
+               struct sk_buff * skb = sk->send_head;
+               unsigned long new_when = skb->when + sk->rto;
+               if (new_when < when) {
+                       when = new_when;
+                       why = TIME_WRITE;
+               }
+       } else if (!skb_queue_empty(&sk->write_queue)) {
+               /*
+                * Zero window probe?
+                */
+               struct sk_buff * skb = sk->write_queue.next;
+               if (before(sk->window_seq, skb->end_seq)) {
+                       unsigned long new_when = now + TIME_PROBE0;
+                       if (new_when < when) {
+                               when = new_when;
+                               why = TIME_PROBE0;
+                       }
+               }
+       }
+
+       if (why >= 0) {
+               sk->ip_xmit_timeout = why;
+               sk->retransmit_timer.expires = when;
+               add_timer(&sk->retransmit_timer);
        }
-       sk->retransmit_timer.expires=jiffies+when;
-       add_timer(&sk->retransmit_timer);
 }
 
 /*
@@ -170,46+222,6 @@ static int tcp_write_timeout(struct sock *sk)
        return 1;
 }
 
-/*
- *     It could be we got here because we needed to send an ack,
- *     so we need to check for that and not just normal retransmit.
- */
-static void tcp_time_write_timeout(struct sock * sk)
-{
-       struct sk_buff *skb;
-       unsigned long flags;
-
-       save_flags(flags);
-       cli();
-       skb = sk->send_head;
-       if (!skb) {
-               if (sk->ack_backlog)
-                       tcp_read_wakeup(sk);
-               restore_flags(flags);
-               return;
-       } 
-
-       /*
-        *      Kicked by a delayed ack. Reset timer
-        *      correctly now
-        */
-       if (jiffies < skb->when + sk->rto) 
-       {
-               if (sk->ack_backlog)
-                       tcp_read_wakeup(sk);
-               tcp_reset_xmit_timer (sk, TIME_WRITE, skb->when + sk->rto - jiffies);
-               restore_flags(flags);
-               return;
-       }
-
-       restore_flags(flags);
-       /*
-        *      Retransmission
-        */
-       sk->prot->retransmit (sk, 0);
-       tcp_write_timeout(sk);
-}
-
 
 /*
  *     The TCP retransmit timer. This lacks a few small details.
@@ -255,27+267,25 @@ void tcp_retransmit_timer(unsigned long data)
        /* Window probing */
        case TIME_PROBE0:
                tcp_send_probe0(sk);
-               tcp_write_timeout(sk);
+               tcp_reset_xmit_timer(sk, 0, 0);         /* get us going again */
                break;
 
        /* Retransmitting */
        case TIME_WRITE:
-               tcp_time_write_timeout(sk);
+               sk->prot->retransmit (sk, 0);
+               tcp_write_timeout(sk);
+               tcp_reset_xmit_timer(sk, 0, 0);         /* get us going again */                
                break;
 
        /* Sending Keepalives */
        case TIME_KEEPOPEN:
-               /* 
-                * this reset_timer() call is a hack, this is not
-                * how KEEPOPEN is supposed to work.
-                */
-               tcp_reset_xmit_timer (sk, TIME_KEEPOPEN, TCP_TIMEOUT_LEN);
                /* Send something to keep the connection open. */
                if (sk->prot->write_wakeup)
                          sk->prot->write_wakeup (sk);
                sk->retransmits++;
                sk->prot->retransmits++;
                tcp_write_timeout(sk);
+               tcp_reset_xmit_timer (sk, 0, 0);
                break;
 
        default:
index 6c7732e..27ec2dd 100644 (file)
  *     Arnt Gulbrandsen        :       New udp_send and stuff
  *             Alan Cox        :       Cache last socket
  *             Alan Cox        :       Route cache
- *             Jon Peatfield   :       Minor efficientcy fix to sendto().
+ *             Jon Peatfield   :       Minor efficiency fix to sendto().
  *             Mike Shaver     :       RFC1122 checks.
  *             Alan Cox        :       Nonblocking error fix.
  *
  
 /* RFC1122 Status:
    4.1.3.1 (Ports):
-     SHOULD send ICMP_PORT_UNREACHABLE in reponse to datagrams to 
+     SHOULD send ICMP_PORT_UNREACHABLE in response to datagrams to 
        an un-listened port. (OK)
    4.1.3.2 (IP Options)
      MUST pass IP options from IP -> application (OK)
    4.1.3.5 (UDP Multihoming)
      MUST allow application to specify source address (OK)
      SHOULD be able to communicate the chosen src addr up to application
-       when application doesn't choose (NOT YET - doesnt seem to be in the BSD API)
+       when application doesn't choose (NOT YET - doesn't seem to be in the BSD API)
        [Does opening a SOCK_PACKET and snooping your output count 8)]
    4.1.3.6 (Invalid Addresses)
      MUST discard invalid source addresses (NOT YET -- will be implemented
@@ -262,7+262,7 @@ static void udp_getfrag(const void *p, __u32 saddr, char * to, unsigned int offs
 }
 
 /*
- *     Uncheckummed UDP is sufficiently criticial to stuff like ATM video conferencing
+ *     Unchecksummed UDP is sufficiently critical to stuff like ATM video conferencing
  *     that we use two routines for this for speed. Probably we ought to have a CONFIG_FAST_NET
  *     set for >10Mb/second boards to activate this sort of coding. Timing needed to verify if
  *     this is a valid decision.
@@ -640,7+640,7 @@ int udp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt,
                   go and stomp on the garbage sender... */
 
          /* RFC1122: OK.  Discards the bad packet silently (as far as */
-         /* the network is concered, anyway) as per 4.1.3.4 (MUST). */
+         /* the network is concerned, anyway) as per 4.1.3.4 (MUST). */
 
                NETDEBUG(printk("UDP: bad checksum. From %08lX:%d to %08lX:%d ulen %d\n",
                       ntohl(saddr),ntohs(uh->source),
index b96fe37..bb02473 100644 (file)
@@ -1226,7+1226,7 @@ static __u16 ipx_set_checksum(ipx_packet *packet,int length)
        sum=(sum&0xffff)+(sum>>16);
 
        /*
-        *      It's a pitty there's no concept of carry in C 
+        *      It's a pity there's no concept of carry in C 
         */
 
        if(sum>=0x10000)
@@ -1505,7+1505,7 @@ static int ipx_get_info(char *buffer, char **start, off_t offset,
                                        s->protinfo.af_ipx.dest_addr.node[5],
                                        htons(s->protinfo.af_ipx.dest_addr.sock));
                        }
-                       len += sprintf (buffer+len,"%08lX  %08lX  ", 
+                       len += sprintf (buffer+len,"%08X  %08X  ", 
                                s->wmem_alloc, s->rmem_alloc);
                        len += sprintf (buffer+len,"%02X     %03d\n", 
                                s->state, SOCK_INODE(s->socket)->i_uid);
index 4e586fd..deb689e 100644 (file)
@@ -219,7+219,7 @@ static struct sock *nr_find_peer(unsigned char index, unsigned char id)
 /*
  *     Deferred destroy.
  */
-void nr_destory_socket(struct sock *);
+void nr_destroy_socket(struct sock *);
 
 /*
  *     Handler for deferred kills.
index 68f3214..8fd9fdd 100644 (file)
@@ -90,7+90,7 @@ static void nr_timer(unsigned long param)
        switch (sk->nr->state) {
                case NR_STATE_0:
                        /* Magic here: If we listen() and a new link dies before it
-                          is accepted() it isnt 'dead' so doesnt get removed. */
+                          is accepted() it isn't 'dead' so doesn't get removed. */
                        if (sk->destroy || (sk->state == TCP_LISTEN && sk->dead)) {
                                del_timer(&sk->timer);
                                nr_destroy_socket(sk);
index 8335758..4e83574 100644 (file)
  *                                     stuff.
  *             Alan Cox        :       sendmsg/recvmsg basics.
  *             Tom Dyas        :       Export net symbols.
+ *             Marcin Dalecki  :       Fixed problems with CONFIG_NET="n".
  *
  *
  *             This program is free software; you can redistribute it and/or
 #include <asm/system.h>
 #include <asm/segment.h>
 
-#ifdef CONFIG_MODULES
+#if defined(CONFIG_MODULES) && defined(CONFIG_NET)
 extern void export_net_symbols(void);
 #endif
 
@@ -1421,7+1422,7 @@ void sock_init(void)
         *      Export networking symbols to the world.
         */
 
-#ifdef CONFIG_MODULES
+#if defined(CONFIG_MODULES) && defined(CONFIG_NET)
        export_net_symbols();
 #endif
 }
index 0b84d09..8d3c39b 100644 (file)
@@ -29,13+29,19 @@ extern ctl_table netrom_table[];
 extern ctl_table ax25_table[];
 #endif
 
-extern ctl_table core_table[], ether_table[], e802_table[], unix_table[];
+extern ctl_table core_table[], unix_table[];
+
+#ifdef CONFIG_NET
+extern ctl_table ether_table[], e802_table[];
+#endif
 
 ctl_table net_table[] = {
-       {NET_CORE,   "core",      NULL, 0, 0555, core_table},
-       {NET_ETHER,  "ethernet",  NULL, 0, 0555, ether_table},
-        {NET_802,    "802",       NULL, 0, 0555, e802_table},
+       {NET_CORE,   "core",      NULL, 0, 0555, core_table},      
         {NET_UNIX,   "unix",      NULL, 0, 0555, unix_table},
+#ifdef CONFIG_NET
+       {NET_802,    "802",       NULL, 0, 0555, e802_table},
+       {NET_ETHER,  "ethernet",  NULL, 0, 0555, ether_table},
+#endif
 #ifdef CONFIG_INET
        {NET_IPV4,   "ipv4",      NULL, 0, 0555, ipv4_table},
 #endif
index 1ea23ad..eec7b17 100644 (file)
  *             in the meantime (BSD loses the path and gives up).
  *     accept() returns 0 length path for an unbound connector. BSD returns 16
  *             and a null first byte in the path (but not for gethost/peername - BSD bug ??)
- *     socketpair(...SOCK_RAW..) doesnt panic the kernel.
- *     BSD af_unix apprently has connect forgetting to block properly.
+ *     socketpair(...SOCK_RAW..) doesn't panic the kernel.
+ *     BSD af_unix apparently has connect forgetting to block properly.
  */
 
 #include <linux/config.h>
@@ -1075,7+1075,7 @@ static int unix_recvmsg(struct socket *sock, struct msghdr *msg, int size, int n
                        msg->msg_accrightslen);
                if(msg->msg_accrightslen<sizeof(struct cmsghdr)
 #if 0 
-/*             investigate this furthur -- Stevens example doen't seem to care */
+/*             investigate this further -- Stevens example doesn't seem to care */
                ||
                   cm->cmsg_type!=SCM_RIGHTS ||
                   cm->cmsg_level!=SOL_SOCKET ||
index 70bf274..f4fb299 100644 (file)
  *     enable it. The bold can add it in themselves.
  *
  * Chopped about by Alan Cox 22/3/96 to make it fit the AF_UNIX socket problem.
- * If it doesnt work blame me, it worked when Barak sent it.
+ * If it doesn't work blame me, it worked when Barak sent it.
  *
  * Assumptions:
  *
index 2109044..dde37be 100644 (file)
@@ -166,7+166,7 @@ function hex () {
 #
 function choice () {
        #
-       # Need to remember params cause the're gonna get reset.
+       # Need to remember params cause they're gonna get reset.
        #
        title=$1
        choices=$2
@@ -393,7+393,7 @@ function l_int () {
 }
 
 #
-# Create a dialog for entering a hexidecimal into a kernel option.
+# Create a dialog for entering a hexadecimal into a kernel option.
 #
 function l_hex () {
        while true
@@ -430,7+430,7 @@ function l_hex () {
 #
 function l_choice () {
        #
-       # Need to remember params cause the're gonna get reset.
+       # Need to remember params cause they're gonna get reset.
        #
        title="$1"
        choices="$2"
@@ -597,7+597,7 @@ function parse_config_files () {
        # environment in order for all of this to work.  Leaving
        # them on the disk as executables screws up the recursion
        # in activate_menu(), among other things.  Once they are
-       # sourced we can disgard them.
+       # sourced we can discard them.
        #
        for i in MCmenu*
        do
@@ -629,7+629,7 @@ function activate_menu () {
 
                case "$ret" in
                0|3|4|5)
-                       defaults="$selection\x12$defaults"  #psuedo stack
+                       defaults="$selection\x12$defaults"  #pseudo stack
                        case "$ret" in
                        0) eval $selection   ;;
                        3) eval $selection y ;;
@@ -1033,7+1033,7 @@ Fractions will not be accepted.  \
 Use the <TAB> key to move from the input field to the buttons below it."
 
 inputbox_instructions_hex="\
-Please enter a hexidecimal value. \
+Please enter a hexadecimal value. \
 Use the <TAB> key to move from the input field to the buttons below it."
 
 backtitle="Linux Kernel Configuration"
index 410e0bd..5481976 100644 (file)
@@ -9,7+9,7 @@ Some kernel features may be built directly into the kernel.
 Some may be made into loadable runtime modules.  Some features
 may be completely removed altogether.  There are also certain
 kernel parameters which are not really features, but must be 
-entered in as decimal or hexidecimal numbers or possibly text.
+entered in as decimal or hexadecimal numbers or possibly text.
 
 Menu items beginning with (*), (M) or ( ) represent features 
 configured to be built in, modularized or removed respectively.
@@ -76,7+76,7 @@ o  To see available help for the item, use the cursor keys to highlight
 Data Entry
 -----------
 o  Enter the requested information and press <ENTER>
-   If you are entering hexidecimal values, it is not necessary to
+   If you are entering hexadecimal values, it is not necessary to
    add the '0x' prefix to the entry.
 
 o  For help, use the <TAB> or cursor keys to highlight the help option
@@ -131,7+131,7 @@ complete rebuild of lxdialog by changing to it's directory and doing
 If you use Menuconfig in an XTERM window make sure you have your 
 $TERM variable set to point to a xterm definition which supports color.
 Otherwise, Menuconfig will look rather bad.  Menuconfig will not 
-display correctly in a RXVT window because rxvt display's only one
+display correctly in a RXVT window because rxvt displays only one
 intensity of color, bright.
 
 Menuconfig will display larger menus on screens or xterms which are
@@ -157,8+157,8 @@ WARNING: It is not recommended that you change any defines in
          are brave, you may tinker with color.h to tune the colors to
          your preference.
 
-COMPATABILITY ISSUE:
-         There have been some compatability problems reported with
+COMPATIBILITY ISSUE:
+         There have been some compatibility problems reported with
          older versions of bash and sed.  I am trying to work these
          out but it is preferable that you upgrade those utilities.
 
index fd7faa4..14e890c 100644 (file)
@@ -1,8+1,8 @@
 # This is an awk script which does dependencies. We do NOT want it to
-# recursivly follow #include directives.
+# recursively follow #include directives.
 #
 # The HPATH environment variable should be set to indicate where to look
-# for include files.  The -I infront of the path is optional.
+# for include files.  The -I in front of the path is optional.
 
 #
 # Surely there is a more elegant way to see if a file exists.  Anyone know
index 63598e8..ce34863 100644 (file)
@@ -145,11+145,11 @@ int dialog_checklist (const char *title, const char *prompt, int height,
 extern unsigned char dialog_input_result[];
 int dialog_inputbox (const char *title, const char *prompt, int height,
                int width, const char *init);
-int dialog_guage (const char *title, const char *prompt, int height, int width,
+int dialog_gauge (const char *title, const char *prompt, int height, int width,
                int percent);
 
 /*
- * This is the base for fictious keys, which activate
+ * This is the base for fictitious keys, which activate
  * the buttons.
  *
  * Mouse-generated keys are the following:
index 258fbe1..ee2edae 100644 (file)
@@ -10,7+10,7 @@ frame .f0_bot.r
 frame .f0_bot.l
 
 #
-# Read the users settings from .config.  These wil override whatever is
+# Read the user's settings from .config.  These will override whatever is
 # in config.in.  Don't do this if the user specified a -D to force
 # the defaults.
 #
index fa58588..d21170b 100644 (file)
  * This file contains the code to further process the conditions from
  * the "ifdef" clauses.
  *
- * The conditions are assumed to be one of the folowing formats
+ * The conditions are assumed to be one of the following formats
  *
  * simple_condition:= "$VARIABLE" == y/n/m
  * simple_condition:= "$VARIABLE != y/n/m
@@ -94,7+94,7 @@ static void free_condition(struct condition * cnd)
 
 /*
  * Walk all of the conditions, and look for choice values.  Convert
- * the tokens into something more digestable.
+ * the tokens into something more digestible.
  */
 void fix_choice_cond()
 {
@@ -120,7+120,7 @@ void fix_choice_cond()
 
          /*
           * Look ahead for what we are comparing this to.  There should
-          * be one operator inbetween.
+          * be one operator in between.
           */
          cond2 = cond->next->next;
          strcpy(tmpbuf, cond->variable.cfg->label);
close