]> git.neil.brown.name Git - history.git/commitdiff
v2.5.0.2 -> v2.5.0.3
authorLinus Torvalds <torvalds@athlon.transmeta.com>
Tue, 5 Feb 2002 07:58:11 +0000 (23:58 -0800)
committerLinus Torvalds <torvalds@athlon.transmeta.com>
Tue, 5 Feb 2002 07:58:11 +0000 (23:58 -0800)
- Al Viro: more superblock cleanups
- Jens Axboe: more patches for new block IO layer
- Christoph Hellwig: get rid of the old, long- deprecated SCSI error
handling

212 files changed:
CREDITS
Documentation/Configure.help
Makefile
arch/alpha/kernel/irq.c
arch/arm/kernel/fiq.c
arch/arm/kernel/irq.c
arch/cris/kernel/irq.c
arch/i386/boot/bootsect.S
arch/i386/boot/setup.S
arch/i386/kernel/apm.c
arch/i386/kernel/irq.c
arch/i386/kernel/mtrr.c
arch/i386/kernel/pci-pc.c
arch/ia64/kernel/irq.c
arch/m68k/amiga/amiints.c
arch/m68k/amiga/cia.c
arch/m68k/amiga/config.c
arch/m68k/apollo/config.c
arch/m68k/apollo/dn_ints.c
arch/m68k/atari/ataints.c
arch/m68k/atari/config.c
arch/m68k/atari/joystick.c
arch/m68k/bvme6000/bvmeints.c
arch/m68k/bvme6000/config.c
arch/m68k/hp300/config.c
arch/m68k/hp300/ints.c
arch/m68k/kernel/ints.c
arch/m68k/kernel/setup.c
arch/m68k/mac/config.c
arch/m68k/mac/macints.c
arch/m68k/mvme147/147ints.c
arch/m68k/mvme147/config.c
arch/m68k/mvme16x/16xints.c
arch/m68k/mvme16x/config.c
arch/m68k/mvme16x/rtc.c
arch/m68k/q40/config.c
arch/m68k/q40/q40ints.c
arch/m68k/sun3/config.c
arch/m68k/sun3/sun3ints.c
arch/m68k/sun3x/config.c
arch/mips/baget/irq.c
arch/mips/dec/irq.c
arch/mips/ite-boards/generic/irq.c
arch/mips/kernel/irq.c
arch/mips/kernel/old-irq.c
arch/mips/mips-boards/atlas/atlas_int.c
arch/mips/philips/nino/irq.c
arch/mips64/mips-boards/atlas/atlas_int.c
arch/mips64/mips-boards/malta/malta_int.c
arch/mips64/sgi-ip22/ip22-int.c
arch/mips64/sgi-ip27/ip27-irq.c
arch/mips64/sgi-ip27/ip27-rtc.c
arch/parisc/kernel/irq.c
arch/ppc/amiga/amiints.c
arch/ppc/amiga/cia.c
arch/ppc/amiga/config.c
arch/ppc/amiga/ints.c
arch/ppc/kernel/apus_setup.c
arch/ppc/kernel/irq.c
arch/s390/kernel/irq.c
arch/s390x/kernel/irq.c
arch/sh/kernel/irq.c
arch/sparc/kernel/irq.c
arch/sparc/kernel/sun4d_irq.c
arch/sparc64/kernel/irq.c
arch/sparc64/solaris/socksys.c
drivers/acorn/scsi/arxescsi.h
drivers/acorn/scsi/cumana_2.c
drivers/acorn/scsi/eesox.c
drivers/acorn/scsi/powertec.c
drivers/block/DAC960.c
drivers/block/acsi_slm.c
drivers/block/blkpg.c
drivers/block/cciss.c
drivers/block/cpqarray.c
drivers/block/elevator.c
drivers/block/floppy.c
drivers/block/genhd.c
drivers/block/ll_rw_blk.c
drivers/block/loop.c
drivers/block/nbd.c
drivers/block/paride/pg.c
drivers/block/paride/pt.c
drivers/block/rd.c
drivers/char/acquirewdt.c
drivers/char/advantechwdt.c
drivers/char/agp/agp.h
drivers/char/agp/agpgart_be.c
drivers/char/agp/agpgart_fe.c
drivers/char/busmouse.c
drivers/char/dtlk.c
drivers/char/ftape/zftape/zftape-init.c
drivers/char/lp.c
drivers/char/mixcomwd.c
drivers/char/nvram.c
drivers/char/pc110pad.c
drivers/char/pc_keyb.c
drivers/char/pcwd.c
drivers/char/ppdev.c
drivers/char/qpmouse.c
drivers/char/qtronix.c
drivers/char/sbc60xxwdt.c
drivers/char/softdog.c
drivers/char/tpqic02.c
drivers/char/tty_io.c
drivers/char/w83877f_wdt.c
drivers/char/wdt.c
drivers/char/wdt285.c
drivers/char/wdt977.c
drivers/char/wdt_pci.c
drivers/i2c/i2c-dev.c
drivers/ide/ide-probe.c
drivers/ide/ide-tape.c
drivers/ide/ide.c
drivers/ieee1394/raw1394.c
drivers/input/evdev.c
drivers/input/input.c
drivers/input/joydev.c
drivers/input/mousedev.c
drivers/isdn/avmb1/capi.c
drivers/isdn/divert/divert_procfs.c
drivers/macintosh/adb.c
drivers/macintosh/via-pmu.c
drivers/message/fusion/mptscsih.h
drivers/message/i2o/i2o_block.c
drivers/message/i2o/i2o_config.c
drivers/message/i2o/i2o_scsi.c
drivers/net/fc/iph5526.c
drivers/net/ppp_generic.c
drivers/net/wan/cosa.c
drivers/pcmcia/ds.c
drivers/pnp/isapnp_proc.c
drivers/scsi/3w-xxxx.h
drivers/scsi/53c700.c
drivers/scsi/Makefile
drivers/scsi/advansys.h
drivers/scsi/aha152x.h
drivers/scsi/aha1542.h
drivers/scsi/aic7xxx/aic7xxx_linux_host.h
drivers/scsi/aic7xxx_old/aic7xxx.h
drivers/scsi/atp870u.h
drivers/scsi/cpqfcTS.h
drivers/scsi/dc390.h
drivers/scsi/dpt_i2o.c
drivers/scsi/dpti.h
drivers/scsi/eata.h
drivers/scsi/esp.h
drivers/scsi/fcal.h
drivers/scsi/gdth.h
drivers/scsi/hosts.h
drivers/scsi/ide-scsi.c
drivers/scsi/imm.h
drivers/scsi/in2000.h
drivers/scsi/ini9100u.h
drivers/scsi/inia100.h
drivers/scsi/ips.h
drivers/scsi/mac53c94.h
drivers/scsi/mac_esp.h
drivers/scsi/mesh.h
drivers/scsi/pci2000.h
drivers/scsi/pci2220i.h
drivers/scsi/pcmcia/nsp_cs.c
drivers/scsi/pluto.h
drivers/scsi/ppa.h
drivers/scsi/qla1280.h
drivers/scsi/qlogicfc.c
drivers/scsi/qlogicpti.h
drivers/scsi/scsi.c
drivers/scsi/scsi_debug.h
drivers/scsi/scsi_merge.c
drivers/scsi/scsi_obsolete.c [deleted file]
drivers/scsi/scsi_syms.c
drivers/scsi/sd.c
drivers/scsi/sg.c
drivers/scsi/sim710.h
drivers/scsi/sr.c
drivers/scsi/sym53c8xx_2/sym53c8xx.h
drivers/scsi/u14-34f.h
drivers/scsi/wd7000.h
drivers/sgi/char/graphics.c
drivers/sgi/char/shmiq.c
drivers/sgi/char/streamable.c
drivers/sound/ad1848.c
drivers/sound/ad1848_mixer.h
drivers/usb/dabusb.c
drivers/usb/hiddev.c
drivers/usb/hpusbscsi.h
drivers/usb/microtek.c
drivers/usb/storage/scsiglue.c
drivers/video/modedb.c
fs/autofs4/root.c
fs/bio.c
fs/exec.c
fs/minix/inode.c
fs/proc/proc_misc.c
fs/super.c
include/asm-arm/mach/irq.h
include/asm-i386/checksum.h
include/asm-m68k/machdep.h
include/asm-m68k/macintosh.h
include/asm-m68k/sun3ints.h
include/linux/bio.h
include/linux/blk.h
include/linux/blkdev.h
include/linux/elevator.h
include/linux/fs.h
include/linux/i2c-old.h [deleted file]
include/linux/malloc.h [deleted file]
include/linux/sched.h
include/linux/seq_file.h
init/main.c
mm/highmem.c

diff --git a/CREDITS b/CREDITS
index dc8404d7fa16f020a9842c0b3090aed00d81e833..c92d35c068aa98bf0e161cf4418545b287ec1963 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -2065,7 +2065,7 @@ S: Richardson, Texas 75081
 S: USA
 
 N: Patrick Mochel
-E: pat@osdl.org
+E: mochel@osdl.org
 E: mochelp@infinity.powertie.org
 D: PCI Power Management, ACPI work
 S: 15275 SW Koll Parkway, Suite H
index 319b56cdb4f5f147918006229f40d835265b22d0..d6d9fda3edb57afb2fed0e5a046039fd7853eb44 100644 (file)
@@ -2,10 +2,10 @@
 #      Eric S. Raymond <mailto:esr@thyrsus.com>
 #      Steven Cole <mailto:elenstev@mesatop.com>
 #
-# Merged version 2.49: Current with 2.4.15-pre1 and 2.4.13-ac8.
+# Merged version 2.61: current with 2.4.16/2.5.1-pre1.
 #
 # This version of the Linux kernel configuration help texts
-# corresponds to the kernel versions 2.4.x.
+# corresponds to kernel versions 2.4.x and 2.5.x.
 #
 # Translations of this file available on the WWW:
 #
 #   - Russian, by <mailto:kaf@linux.nevod.perm.su>, at
 #     <http://nevod.perm.su/service/linux/doc/kernel/Configure.help>
 #   - French, by Pierre Tane <mailto:tanep@bigfoot.com>, at
-#     <http://www.traduc.org/kernelfr>
+#     <http://www.traduc.org/kernelfr/>
 #   - Polish, by Dominik Mierzejewski <mailto:dmierzej@elka.pw.edu.pl>, at
 #     <http://home.elka.pw.edu.pl/~dmierzej/linux/kernel/>
-#   - German, by SuSE, at <http://www.suse.de/~ke/kernel>. This patch
+#   - German, by SuSE, at <http://www.suse.de/~ke/kernel/>. This patch
 #     also includes infrastructure to support different languages.
+#   - Catalan, by Antoni Bella <mailto:bella5@teleline.es>, at
+#     <http://www.terra.es/personal7/bella5/traduccions.htm>
 #
 # To access a document on the WWW, you need to have a direct Internet
 # connection and a browser program such as netscape or lynx. If you
@@ -133,8 +135,8 @@ CONFIG_SMP
 
   See also the <file:Documentation/smp.tex>,
   <file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>,
-  <file:Documentation/nmi_watchdog.txt> and the SMP-FAQ on the WWW at
-  <http://www.irisa.fr/prive/mentre/smp-faq/>.
+  <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
+  <http://www.linuxdoc.org/docs.html#howto>.
 
   If you don't know what to do here, say N.
 
@@ -577,7 +579,7 @@ CONFIG_BLK_DEV_IDE
 
   To fine-tune ATA/IDE drive/interface parameters for improved
   performance, look for the hdparm package at
-  <http://www.ibiblio.org/pub/Linux/system/hardware>.
+  <ftp://ibiblio.org/pub/Linux/system/hardware/>.
 
   If you want to compile this driver as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want),
@@ -666,12 +668,9 @@ CONFIG_BLK_DEV_IDECD
   CD-ROM drive, you can say N to all other CD-ROM options, but be sure
   to say Y or M to "ISO 9660 CD-ROM file system support".
 
-  Read the CD-ROM-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto> and
-  <file:Documentation/cdrom/ide-cd>. Note that older versions of lilo
-  (the Linux boot loader) cannot properly deal with IDE/ATAPI CD-ROMs,
-  so install lilo-16 or higher, available from
-  <ftp://metalab.unc.edu/pub/Linux/system/boot/lilo>.
+  Note that older versions of LILO (LInux LOader) cannot properly deal
+  with IDE/ATAPI CD-ROMs, so install LILO 16 or higher, available from
+  <ftp://brun.dyndns.org/pub/linux/lilo/>.
 
   If you want to compile the driver as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want),
@@ -820,7 +819,7 @@ CONFIG_BLK_DEV_IDEDMA_PCI
   for these drives, but you can change that by saying Y to the
   following question "Use DMA by default when available". You can get
   the latest version of the hdparm utility from
-  <ftp://metalab.unc.edu/pub/Linux/system/hardware/>.
+  <ftp://ibiblio.org/pub/Linux/system/hardware/>.
 
   Read the comments at the beginning of <file:drivers/ide/ide-dma.c>
   and the file <file:Documentation/ide.txt> for more information.
@@ -899,7 +898,7 @@ CONFIG_IDEDMA_IVB
 
   It is normally safe to answer Y; however, the default is N.
 
-ATA Work(s) In Progress (EXPERIMENTAL)\8b
+ATA Work(s) In Progress (EXPERIMENTAL)
 CONFIG_IDEDMA_PCI_WIP
   If you enable this you will be able to use and test highly
   developmental projects. If you say N, the configurator will
@@ -914,7 +913,7 @@ CONFIG_BLK_DEV_ADMA
 
 Pacific Digital A-DMA support (EXPERIMENTAL)
 CONFIG_BLK_DEV_PDC_ADMA
-  Please read the comments at the top of <file:drivers/ide/pdcadma.c>.
+  Please read the comments at the top of <file:drivers/ide/ide-pci.c>.
 
 3ware Hardware ATA-RAID support
 CONFIG_BLK_DEV_3W_XXXX_RAID
@@ -1118,11 +1117,13 @@ CONFIG_BLK_DEV_PDC202XX
 
 Special UDMA Feature
 CONFIG_PDC202XX_BURST
-  For PDC20246, PDC20262, PDC20265 and PDC20267 Ultra DMA chipsets.
-  Designed originally for PDC20246/Ultra33 that has BIOS setup
-  failures when using 3 or more cards.
+  This option causes the pdc202xx driver to enable UDMA modes on the
+  PDC202xx even when the PDC202xx BIOS has not done so.
 
-  Unknown for PDC20265/PDC20267 Ultra DMA 100.
+  It was originally designed for the PDC20246/Ultra33, whose BIOS will
+  only setup UDMA on the first two PDC20246 cards.  It has also been
+  used succesfully on a PDC20265/Ultra100, allowing use of UDMA modes
+  when the PDC20265 BIOS has been disabled (for faster boot up).
 
   Please read the comments at the top of
   <file:drivers/ide/pdc202xx.c>.
@@ -1251,15 +1252,6 @@ CONFIG_BLK_DEV_PDC4030
   <file:Documentation/ide.txt> and <file:drivers/ide/pdc4030.c> files
   for more info.
 
-# This is for Linus's tree.
-QDI QD6580 support
-CONFIG_BLK_DEV_QD6580
-  This driver is enabled at runtime using the "ide0=qd6580" kernel
-  boot parameter.  It permits faster I/O speeds to be set.  See the
-  <file:Documentation/ide.txt> and <file:drivers/ide/qd6580.c> for
-  more info.
-
-# This is for Alan's tree.  Note the name difference.
 QDI QD65XX support
 CONFIG_BLK_DEV_QD65XX
   This driver is enabled at runtime using the "ide0=qd65xx" kernel
@@ -1488,7 +1480,7 @@ Parallel port generic ATAPI devices
 CONFIG_PARIDE_PG
   This option enables a special high-level driver for generic ATAPI
   devices connected through a parallel port. The driver allows user
-  programs, such as cdrecord, to send ATAPI commands directly to a
+  programs, such as cdrtools, to send ATAPI commands directly to a
   device.
 
   If you chose to build PARIDE support into your kernel, you may
@@ -1502,7 +1494,7 @@ CONFIG_PARIDE_PG
   This driver implements an API loosely related to the generic SCSI
   driver. See <file:include/linux/pg.h>. for details.
 
-  You can obtain the most recent version of cdrecord from
+  You can obtain the most recent version of cdrtools from
   <ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/>. Versions 1.6.1a3 and
   later fully support this driver.
 
@@ -1716,9 +1708,9 @@ CONFIG_BLK_DEV_MD
   controller, you do not need to say Y here.
 
   More information about Software RAID on Linux is contained in the
-  Software-RAID mini-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>. There you will also
-  learn where to get the supporting user space utilities raidtools.
+  Software RAID mini-HOWTO, available from
+  <http://www.linuxdoc.org/docs.html#howto>. There you will also learn
+  where to get the supporting user space utilities raidtools.
 
   If unsure, say N.
 
@@ -1811,7 +1803,6 @@ CONFIG_MD_MULTIPATH
 
   If unsure, say N.
 
-# AC tree only
 Support for IDE Raid controllers
 CONFIG_BLK_DEV_ATARAID
   Say Y or M if you have an IDE Raid controller and want linux
@@ -1824,7 +1815,6 @@ CONFIG_BLK_DEV_ATARAID
   has its own Raid drivers, which you should use if you need better
   performance.
 
-# AC tree only
 Support Promise software RAID (Fasttrak(tm))
 CONFIG_BLK_DEV_ATARAID_PDC
   Say Y or M if you have a Promise Fasttrak (tm) Raid controller
@@ -1835,7 +1825,6 @@ CONFIG_BLK_DEV_ATARAID_PDC
   If you choose to compile this as a module, the module will be called
   pdcraid.o.
 
-# AC tree only
 Highpoint 370 software RAID
 CONFIG_BLK_DEV_ATARAID_HPT
   Say Y or M if you have a Highpoint HPT 370 Raid controller
@@ -1851,19 +1840,19 @@ CONFIG_ACER_PICA_61
   This is a machine with a R4400 133/150 MHz CPU. To compile a Linux
   kernel that runs on these, say Y here. For details about Linux on
   the MIPS architecture, check out the Linux/MIPS FAQ on the WWW at
-  <http://oss.sgi.com/mips>.
+  <http://oss.sgi.com/mips/>.
 
 Support for Algorithmics P4032 (EXPERIMENTAL)
 CONFIG_ALGOR_P4032
   This is an evaluation board of the British company Algorithmics.
   The board uses the R4300 and a R5230 CPUs.  For more information
-  about this board see <http://www.algor.co.uk>.
+  about this board see <http://www.algor.co.uk/>.
 
 Support for BAGET MIPS series
 CONFIG_BAGET_MIPS
   This enables support for the Baget, a Russian embedded system.  For
   more details about the Baget see the Linux/MIPS FAQ on
-  <http://oss.sgi.com/mips>.
+  <http://oss.sgi.com/mips/>.
 
 Baget AMD LANCE support
 CONFIG_BAGETLANCE
@@ -1874,8 +1863,8 @@ CONFIG_BAGETLANCE
 Support for DECstations
 CONFIG_DECSTATION
   This enables support for DEC's MIPS based workstations.  For details
-  see the Linux/MIPS FAQ on <http://oss.sgi.com/mips> and the
-  DECstation porting pages on <http://decstation.unix-ag.org>.
+  see the Linux/MIPS FAQ on <http://oss.sgi.com/mips/> and the
+  DECstation porting pages on <http://decstation.unix-ag.org/>.
 
   If you have one of the following DECstation Models you definitely
   want to choose R4xx0 for the CPU Type:
@@ -1904,7 +1893,7 @@ CONFIG_COBALT_28
 Support for the Momentum Computer Ocelot SBC
 CONFIG_MOMENCO_OCELOT
   The Ocelot is a MIPS-based Single Board Computer (SBC) made by
-  Momentum Computer <http://www.momenco.com>.
+  Momentum Computer <http://www.momenco.com/>.
 
 Support for NEC DDB Vrc-5074
 CONFIG_DDB5074
@@ -1917,7 +1906,7 @@ CONFIG_DDB5476
   evaluation board.
 
   Features : kernel debugging, serial terminal, NFS root fs, on-board
-  ether port (Need an additional patch at <http://linux.junsun.net>),
+  ether port (Need an additional patch at <http://linux.junsun.net/>),
   USB, AC97, PCI, PCI VGA card & framebuffer console, IDE controller,
   PS2 keyboard, PS2 mouse, etc.
 
@@ -1927,7 +1916,7 @@ CONFIG_DDB5477
   evaluation board.
 
   Features : kernel debugging, serial terminal, NFS root fs, on-board
-  ether port (Need an additional patch at <http://linux.junsun.net>),
+  ether port (Need an additional patch at <http://linux.junsun.net/>),
   USB, AC97, PCI, etc.
 
 Support for MIPS Atlas board
@@ -1953,7 +1942,7 @@ CONFIG_MIPS_MAGNUM_4000
   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 on
   the MIPS architecture, check out the Linux/MIPS FAQ on the WWW at
-  <http://oss.sgi.com/mips>.
+  <http://oss.sgi.com/mips/>.
 
 Enable Qtronix 990P Keyboard Support
 CONFIG_QTRONIX_KEYBOARD
@@ -1965,7 +1954,7 @@ 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 on
   the MIPS architecture, check out the Linux/MIPS FAQ on the WWW at
-  <http://oss.sgi.com/mips>.
+  <http://oss.sgi.com/mips/>.
 
 Support for SNI RM200 PCI
 CONFIG_SNI_RM200_PCI
@@ -2072,7 +2061,7 @@ NinjaSCSI-3 / NinjaSCSI-32Bi (16bit) PCMCIA support
 CONFIG_PCMCIA_NINJA_SCSI
   If you intend to attach this type of PCMCIA SCSI host adapter to
   your computer, say Y here and read
-  <file:Documentation/README.nsp_cs>.
+  <file:Documentation/README.nsp_cs.eng>.
 
   This driver is also available as a module called nsp_cs.o ( =
   code which can be inserted in and removed from the running kernel
@@ -2263,7 +2252,7 @@ CONFIG_NET
   of which are given in <file:Documentation/Changes>.
 
   For a general introduction to Linux networking, it is highly
-  recommended to read the NET-3-HOWTO, available from
+  recommended to read the NET-HOWTO, available from
   <http://www.linuxdoc.org/docs.html#howto>.
 
 Socket filtering
@@ -2658,6 +2647,23 @@ CONFIG_IP6_NF_MATCH_MARK
   If you want to compile it as a module, say M here and read
   <file:Documentation/modules.txt>.  If unsure, say `N'.
 
+Multiple port match support
+CONFIG_IP6_NF_MATCH_MULTIPORT
+  Multiport matching allows you to match TCP or UDP packets based on
+  a series of source or destination ports: normally a rule can only
+  match a single range of ports.
+
+  If you want to compile it as a module, say M here and read
+  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+Owner match support
+CONFIG_IP6_NF_MATCH_OWNER
+  Packet owner matching allows you to match locally-generated packets
+  based on who created them: the user, group, process or session.
+
+  If you want to compile it as a module, say M here and read
+  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
 Packet filtering
 CONFIG_IP6_NF_FILTER
   Packet filtering defines a table `filter', which has a series of
@@ -2724,6 +2730,14 @@ CONFIG_IP6_NF_MATCH_LIMIT
   If you want to compile it as a module, say M here and read
   <file:Documentation/modules.txt>.  If unsure, say `N'.
 
+LOG target support
+CONFIG_IP6_NF_TARGET_LOG
+  This option adds a `LOG' target, which allows you to create rules in
+  any iptables table which records the packet header to the syslog.
+
+  If you want to compile it as a module, say M here and read
+  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
 SYN flood protection
 CONFIG_SYN_COOKIES
   Normal TCP/IP networking is open to an attack known as "SYN
@@ -2776,7 +2790,7 @@ CONFIG_ALPHA_GENERIC
 
   To find out what type of Alpha system you have, you may want to
   check out the Linux/Alpha FAQ, accessible on the WWW from
-  <http://www.alphalinux.org>. In summary:
+  <http://www.alphalinux.org/>. In summary:
 
   Alcor/Alpha-XLT     AS 600
   Alpha-XL            XL-233, XL-266
@@ -2961,7 +2975,7 @@ CONFIG_ALPHA_SRM
   which is command line driven, and ARC, which uses menus and arrow
   keys. Details about the Linux/Alpha booting process are contained in
   the Linux/Alpha FAQ, accessible on the WWW from
-  <http://www.alphalinux.org>.
+  <http://www.alphalinux.org/>.
 
   The usual way to load Linux on an Alpha machine is to use MILO
   (a bootloader that lets you pass command line parameters to the
@@ -3130,7 +3144,7 @@ CONFIG_MWAVE
 
   The user level application needed to use this driver can be found at
   the IBM Linux Technology Center (LTC) web site:
-  http://www.ibm.com/linux/ltc/
+  <http://www.ibm.com/linux/ltc/>.
 
   If you own one of the above IBM Thinkpads which has the Mwave chipset
   in it, say Y.
@@ -3505,7 +3519,7 @@ CONFIG_HOTPLUG
   example, used on modern desktops as well as laptops, is USB.
 
   Enable HOTPLUG and KMOD, and build a modular kernel.  Get agent
-  software (at <http://linux-hotplug.sourceforge.net>) and install it.
+  software (at <http://linux-hotplug.sourceforge.net/>) and install it.
   Then your kernel will automatically call out to a user mode "policy
   agent" (/sbin/hotplug) to load modules and set up software needed
   to use devices as you hotplug them.
@@ -3547,6 +3561,12 @@ CONFIG_CARDBUS
 
   If unsure, say Y.
 
+i82092 compatible bridge support
+CONFIG_I82092
+  This provides support for the Intel I82092AA PCI-to-PCMCIA bridge device,
+  found in some older laptops and more commonly in evaluation boards for the
+  chip.
+
 i82365 compatible host bridge support
 CONFIG_I82365
   Say Y here to include support for ISA-bus PCMCIA host bridges that
@@ -3821,7 +3841,7 @@ CONFIG_VGA_CONSOLE
 
   The program SVGATextMode can be used to utilize SVGA video cards to
   their full potential in text mode. Download it from
-  <ftp://metalab.unc.edu/pub/Linux/utils/console>.
+  <ftp://ibiblio.org/pub/Linux/utils/console/>.
 
   Say Y.
 
@@ -4053,21 +4073,18 @@ CONFIG_FB_ATY128
   module will be called aty128fb.o. If you want to compile it as a
   module, say M here and read <file:Documentation/modules.txt>.
 
-# AC tree only
 Maxine (Personal DECstation) onboard framebuffer support
 CONFIG_FB_MAXINE
   Say Y here to directly support the on-board framebuffer in the
   Maxine (5000/20, /25, /33) version of the DECstation.  There is a
   page dedicated to Linux on DECstations at <http://decstation.unix-ag.org/>.
 
-# AC tree only
 PMAG-BA TURBOchannel framebuffer support
 CONFIG_FB_PMAG_BA
   Say Y here to directly support the on-board PMAG-BA framebuffer in
   the 5000/1xx versions of the DECstation.  There is a page dedicated
   to Linux on DECstations at <http://decstation.unix-ag.org/>.
 
-# AC tree only
 PMAGB-B TURBOchannel framebuffer support
 CONFIG_FB_PMAGB_B
   Say Y here to directly support the on-board PMAGB-B framebuffer in
@@ -4079,10 +4096,32 @@ CONFIG_ARCH_FTVPCI
   Say Y here if you intend to run this kernel on a FutureTV (nee Nexus
   Electronics) StrongARM PCI card.
 
-P720T
-CONFIG_ARCH_P720T
-  Say Y here if you intend to run this kernel on the ARM Prospector
-  720T.
+ANAKIN Vehicle Telematics Platform
+CONFIG_ARCH_ANAKIN
+  The Anakin is a StrongArm based SA110 - 2 DIN Vehicle Telematics Platform.
+  64MB SDRAM - 4 Mb Flash - Compact Flash Interface - 1 MB VRAM
+
+  On board peripherals:
+        * Front display: 400x234 16 bit TFT touchscreen
+        * External independent second screen interface
+        * CAN controller SJA1000
+        * USB host controller
+        * 6 channel video codec with hardware overlay
+        * Smartcard reader
+        * IrDa
+
+  Modules interfaced over the Multi Media Extension slots:
+        * A communication card
+                Wavecom GPRS modem
+                uBlock GPS
+                Bosch DAB module
+        * An audio card ( 4 * 40W, AC97 Codec, I2S)
+
+Altera Excalibur XA10 Dev Board
+ARCH_CAMELOT
+  This enables support for Altera's Excalibur XA10 development board.
+  If you would like to build your kernel to run on one of these boards
+  then you must say 'Y' here. Otherwise say 'N'
 
 Link-Up Systems LCD support
 CONFIG_FB_L7200
@@ -4306,10 +4345,8 @@ CONFIG_FB_MATROX
   a module, say M here and read <file:Documentation/modules.txt>.
 
   You can pass several parameters to the driver at boot time or at
-  module load time. The parameters look like "video=matrox:XXX", where
-  the meaning of XXX can be found at the end of the main source file
-  (<file:drivers/video/matroxfb.c>). Please see
-  <file:Documentation/fb/matroxfb.txt>.
+  module load time. The parameters look like "video=matrox:XXX", and
+  are described in <file:Documentation/fb/matroxfb.txt>.
 
 Matrox Millennium I/II support
 CONFIG_FB_MATROX_MILLENIUM
@@ -4372,7 +4409,7 @@ CONFIG_FB_MATROX_MAVEN
 
   The driver starts in monitor mode and you must use the matroxset
   tool (available at
-  <ftp://platan.vc.cvut.cz/pub/linux/matrox-latest>) to switch it to
+  <ftp://platan.vc.cvut.cz/pub/linux/matrox-latest/>) to switch it to
   PAL or NTSC or to swap primary and secondary head outputs.
   Secondary head driver also always start in 640x480 resolution, you
   must use fbset to change it.
@@ -4394,7 +4431,7 @@ CONFIG_FB_MATROX_G450
 
   The driver starts in monitor mode and currently does not support
   output in TV modes.  You must use the matroxset tool (available
-  at <ftp://platan.vc.cvut.cz/pub/linux/matrox-latest>) to swap
+  at <ftp://platan.vc.cvut.cz/pub/linux/matrox-latest/>) to swap
   primary and secondary head outputs.  Secondary head driver always
   start in 640x480 resolution and you must use fbset to change it.
 
@@ -4509,14 +4546,12 @@ CONFIG_FB_SIS
   This is the frame buffer device driver for the SiS 630 and 640 Super
   Socket 7 UMA cards.  Specs available at <http://www.sis.com.tw/>.
 
-# AC tree only
 SIS 630/540/730 support
 CONFIG_FB_SIS_300
   This is the frame buffer device driver for the SiS 630 and related
   Super Socket 7 UMA cards.  Specs available at
   <http://www.sis.com.tw/>.
 
-# AC tree only
 SIS 315H/315 support
 CONFIG_FB_SIS_315
   This is the frame buffer device driver for the SiS 315 graphics
@@ -4570,7 +4605,6 @@ CONFIG_FB_ATY_GX
   is at
   <http://support.ati.com/products/pc/mach64/graphics_xpression.html>.
 
-# AC tree only
 ATI Radeon display support
 CONFIG_FB_RADEON
   Choose this option if you want to use an ATI Radeon graphics card as
@@ -4697,7 +4731,8 @@ CONFIG_PARPORT
   drive, PLIP link (Parallel Line Internet Protocol is mainly used to
   create a mini network by connecting the parallel ports of two local
   machines) etc., then you need to say Y here; please read
-  <file:Documentation/parport.txt> and drivers/parport/BUGS-parport.
+  <file:Documentation/parport.txt> and
+  <file:drivers/parport/BUGS-parport>.
 
   For extensive information about drivers for many devices attaching
   to the parallel port see <http://www.torque.net/linux-pp.html> on
@@ -5186,7 +5221,7 @@ CONFIG_IPX
   used for local networks of Windows machines.  You need it if you
   want to access Novell NetWare file or print servers using the Linux
   Novell client ncpfs (available from
-  <ftp://metalab.unc.edu/pub/Linux/system/filesystems/>) or from
+  <ftp://platan.vc.cvut.cz/pub/linux/ncpfs/>) or from
   within the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO,
   available from <http://www.linuxdoc.org/docs.html#howto>).  In order
   to do the former, you'll also have to say Y to "NCP file system
@@ -5198,8 +5233,8 @@ CONFIG_IPX
 
   To turn your Linux box into a fully featured NetWare file server and
   IPX router, say Y here and fetch either lwared from
-  <ftp://metalab.unc.edu/pub/Linux/system/network/daemons/> or
-  mars_nwe from <ftp://ftp.gwdg.de/pub/linux/misc/ncpfs>. For more
+  <ftp://ibiblio.org/pub/Linux/system/network/daemons/> or
+  mars_nwe from <ftp://www.compu-art.de/mars_nwe/>. For more
   information, read the IPX-HOWTO available from
   <http://www.linuxdoc.org/docs.html#howto>.
 
@@ -5235,7 +5270,7 @@ CONFIG_IPX_INTERN
   'special' sockets to sockets listening on the primary network is
   disabled. This might break existing applications, especially RIP/SAP
   daemons. A RIP/SAP daemon that works well with the full internal net
-  can be found on <ftp://ftp.gwdg.de/pub/linux/misc/ncpfs>.
+  can be found on <ftp://ftp.gwdg.de/pub/linux/misc/ncpfs/>.
 
   If you don't know what you are doing, say N.
 
@@ -5303,7 +5338,7 @@ CONFIG_DECNET_ROUTER
   network link driver", "Routing messages" and "Network packet
   filtering".  The first two are required to allow configuration via
   rtnetlink (currently you need Alexey Kuznetsov's iproute2 package
-  from <ftp://ftp.inr.ac.ru>). The "Network packet filtering" option
+  from <ftp://ftp.inr.ac.ru/>). The "Network packet filtering" option
   will be required for the forthcoming routing daemon to work.
 
   See <file:Documentation/networking/decnet.txt> for more information.
@@ -5424,9 +5459,8 @@ CONFIG_COPS_TANGENT
 Amateur Radio support
 CONFIG_HAMRADIO
   If you want to connect your Linux box to an amateur radio, answer Y
-  here. You want to read <http://www.tapr.org/tapr/html/pkthome.html>
-  and the HAM-HOWTO and the AX25-HOWTO, both available from
-  <http://www.linuxdoc.org/docs.html#howto>.
+  here. You want to read <http://www.tapr.org/tapr/html/pkthome.html> and
+  the AX25-HOWTO, available from <http://www.linuxdoc.org/docs.html#howto>.
 
   Note that the answer to this question won't directly affect the
   kernel: saying N will just cause the configurator to skip all
@@ -5633,7 +5667,7 @@ CONFIG_BAYCOM_PAR
   connect to a parallel interface. The driver supports the picpar and
   par96 designs. To configure the driver, use the sethdlc utility
   available in the standard ax25 utilities package. For information on
-  the modems, see <http://www.baycom.de> and the file
+  the modems, see <http://www.baycom.de/> and the file
   <file:Documentation/networking/baycom.txt>.
 
   If you want to compile this driver as a module ( = code which can be
@@ -5647,7 +5681,7 @@ CONFIG_BAYCOM_EPP
   connect to a parallel interface. The driver supports the EPP
   designs. To configure the driver, use the sethdlc utility available
   in the standard ax25 utilities package. For information on the
-  modems, see <http://www.baycom.de> and the file
+  modems, see <http://www.baycom.de/> and the file
   <file:Documentation/networking/baycom.txt>.
 
   If you want to compile this driver as a module ( = code which can be
@@ -5666,7 +5700,7 @@ CONFIG_BAYCOM_SER_FDX
   driver and still provided in case this driver does not work with
   your serial interface chip. To configure the driver, use the sethdlc
   utility available in the standard ax25 utilities package. For
-  information on the modems, see <http://www.baycom.de> and
+  information on the modems, see <http://www.baycom.de/> and
   <file:Documentation/networking/baycom.txt>.
 
   If you want to compile this driver as a module ( = code which can be
@@ -5683,7 +5717,7 @@ CONFIG_BAYCOM_SER_HDX
   the full-duplex driver. This driver is depreciated.  To configure
   the driver, use the sethdlc utility available in the standard ax25
   utilities package. For information on the modems, see
-  <http://www.baycom.de> and
+  <http://www.baycom.de/> and
   <file:Documentation/networking/baycom.txt>.
 
   If you want to compile this driver as a module ( = code which can be
@@ -5860,7 +5894,7 @@ CONFIG_NET_DIVERT
    - etc...
 
   For more informations, please refer to:
-    <http://www.freshmeat.net/projects/etherdivert>
+    <http://diverter.sourceforge.net/>
     <http://perso.wanadoo.fr/magpie/EtherDivert.html>
 
   If unsure, say N.
@@ -5921,8 +5955,7 @@ CONFIG_NETLINK
   user processes.  It does so by creating a new socket family,
   PF_NETLINK.  Over this socket, the kernel can send and receive
   datagrams carrying information.  It is documented on many systems in
-  netlink(7), a HOWTO is provided as well, for example on
-  <http://snafu.freedom.org/linux2.2/docs/netlink-HOWTO.html>.
+  netlink(7).
 
   So far, the kernel uses this feature to publish some network related
   information if you say Y to "Routing messages", below. You also need
@@ -5938,7 +5971,7 @@ Routing messages
 CONFIG_RTNETLINK
   If you say Y here, user space programs can receive some network
   related routing information over the netlink. 'rtmon', supplied
-  with the iproute2 package (<ftp://ftp.inr.ac.ru>), can read and
+  with the iproute2 package (<ftp://ftp.inr.ac.ru/>), can read and
   interpret this data.  Information sent to the kernel over this link
   is ignored.
 
@@ -6225,7 +6258,7 @@ CONFIG_ATM_IA
   control memory (128K-1KVC, 512K-4KVC), the size of the packet
   memory (128K, 512K, 1M), and the PHY type (Single/Multi mode OC3,
   UTP155, UTP25, DS3 and E3). Go to:
-       www.iphase.com/products/ClassSheet.cfm?ClassID=ATM
+       <http://www.iphase.com/products/ClassSheet.cfm?ClassID=ATM>
   for more info about the cards. Say Y (or M to compile as a module
   named iphase.o) here if you have one of these cards.
 
@@ -6238,7 +6271,7 @@ CONFIG_ATM_IA_DEBUG
   messages is controlled by a bitmap. This may be specified as a
   module argument (kernel command line argument as well?), changed
   dynamically using an ioctl (Get the debug utility, iadbg, from
-  <ftp://ftp.iphase.com/pub/atm/pci>).
+  <ftp://ftp.iphase.com/pub/atm/pci/>).
 
   See the file <file:drivers/atm/iphase.h> for the meanings of the
   bits in the mask.
@@ -6490,12 +6523,6 @@ CONFIG_SCSI
   You also need to say Y here if you want support for the parallel
   port version of the 100 MB IOMEGA ZIP drive.
 
-  Please read the SCSI-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>. The
-  SCSI-Programming-HOWTO contains information about how to add or
-  remove an SCSI device from a running Linux machine without
-  rebooting.
-
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
   The module will be called scsi_mod.o.  If you want to compile it as
@@ -6573,7 +6600,7 @@ CONFIG_CHR_DEV_OSST
   tape drives (ADR-x0) that supports the standard SCSI-2 commands for
   tapes (QIC-157) and can be driven by the standard driver st.
   For more information, you may have a look at the SCSI-HOWTO
-  <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO>  and
+  <http://www.linuxdoc.org/docs.html#howto>  and
   <file:drivers/scsi/README.osst>  in the kernel source.
   More info on the OnStream driver may be found on
   <http://linux1.onstream.nl/test/>
@@ -6628,12 +6655,12 @@ CONFIG_CHR_DEV_SG
   directly, so you need some additional software which knows how to
   talk to these devices using the SCSI protocol:
 
-  For scanners, look at SANE (<http://www.mostang.com/sane>). For CD
-  writer software look at cdrecord
+  For scanners, look at SANE (<http://www.mostang.com/sane/>). For CD
+  writer software look at Cdrtools
   (<http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html>)
-  and for burning a "disk at once": cdrdao
-  (<http://www.ping.de/sites/daneb/cdrdao.html>). Cdparanoia is a high
-  quality digital reader of audio CDs (<http://www.xiph.org/paranoia>).
+  and for burning a "disk at once": CDRDAO
+  (<http://cdrdao.sourceforge.net/>). Cdparanoia is a high
+  quality digital reader of audio CDs (<http://www.xiph.org/paranoia/>).
   For other devices, it's possible that you'll have to write the
   driver software yourself. Please read the file
   <file:Documentation/scsi-generic.txt> for more information.
@@ -6930,10 +6957,10 @@ CONFIG_SCSI_BUSLOGIC
   This is support for BusLogic MultiMaster and FlashPoint SCSI Host
   Adapters. Consult the SCSI-HOWTO, available from
   <http://www.linuxdoc.org/docs.html#howto>, and the files
-  README.BusLogic and README.FlashPoint in drivers/scsi for more
-  information. If this driver does not work correctly without
-  modification, please contact the author, Leonard N. Zubkoff, by
-  email to lnz@dandelion.com.
+  <file:drivers/scsi/README.BusLogic> and
+  <file:drivers/scsi/README.FlashPoint> for more information. If this
+  driver does not work correctly without modification, please contact
+  the author, Leonard N. Zubkoff, by email to lnz@dandelion.com.
 
   You can also build this driver as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want),
@@ -7175,7 +7202,7 @@ CONFIG_SCSI_SYM53C8XX_2
   If your system has problems using this new major version of the
   SYM53C8XX driver, you may switch back to driver version 1.
 
-  Please read drivers/scsi/sym53c8xx_2/Documentation.txt for more
+  Please read <file:drivers/scsi/sym53c8xx_2/Documentation.txt> for more
   information.
 
 PCI DMA addressing mode
@@ -7716,7 +7743,7 @@ CONFIG_SCSI_EATA_MAX_TAGS
 NCR53c406a SCSI support
 CONFIG_SCSI_NCR53C406A
   This is support for the NCR53c406a SCSI host adapter.  For user
-  configurable parameters, check out <file:drivers/scsi/NCR53c406.c>
+  configurable parameters, check out <file:drivers/scsi/NCR53c406a.c>
   in the kernel source.  Also read the SCSI-HOWTO, available from
   <http://www.linuxdoc.org/docs.html#howto>.
 
@@ -7828,7 +7855,8 @@ CONFIG_SCSI_GDTH
  
   This is a driver for RAID/SCSI Disk Array Controllers (EISA/ISA/PCI) 
   manufactured by Intel/ICP vortex (an Intel Company). It is documented
-  in the kernel source in drivers/scsi/gdth.c and drivers/scsi/gdth.h. 
+  in the kernel source in <file:drivers/scsi/gdth.c> and
+  <file:drivers/scsi/gdth.h.>
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -8241,8 +8269,8 @@ CONFIG_SLIP
 
   Normally, your access provider has to support SLIP in order for you
   to be able to use it, but there is now a SLIP emulator called SLiRP
-  around (available via FTP (user: anonymous) from
-  <ftp://metalab.unc.edu/pub/Linux/system/network/serial/>) which
+  around (available from
+  <ftp://ibiblio.org/pub/Linux/system/network/serial/>) which
   allows you to use SLIP over a regular dial up shell connection. If
   you plan to use SLiRP, make sure to say Y to CSLIP, below. The
   NET-3-HOWTO, available from
@@ -8267,7 +8295,7 @@ CONFIG_SLIP_COMPRESSED
   on both ends. Ask your access provider if you are not sure and
   answer Y, just in case. You will still be able to use plain SLIP. If
   you plan to use SLiRP, the SLIP emulator (available from
-  <ftp://metalab.unc.edu/pub/Linux/system/network/serial/>) which
+  <ftp://ibiblio.org/pub/Linux/system/network/serial/>) which
   allows you to use SLIP over a regular dial up shell connection, you
   definitely want to say Y here. The NET-3-HOWTO, available from
   <http://www.linuxdoc.org/docs.html#howto>, explains how to configure
@@ -8404,7 +8432,7 @@ CONFIG_PPPOE
 
   This driver requires a specially patched pppd daemon.  The patch to
   pppd, along with binaries of a patched pppd package can be found at:
-  <http://www.shoshin.uwaterloo.ca/~mostrows>.
+  <http://www.shoshin.uwaterloo.ca/~mostrows/>.
 
 Wireless LAN (non-hamradio)
 CONFIG_NET_RADIO
@@ -8426,7 +8454,7 @@ CONFIG_NET_RADIO
 
   Some user-level drivers for scarab devices which don't require
   special kernel support are available from
-  <ftp://shadow.cabi.net/pub/Linux>.
+  <ftp://shadow.cabi.net/pub/Linux/>.
 
 STRIP (Metricom Starmode radio IP)
 CONFIG_STRIP
@@ -8772,12 +8800,6 @@ CONFIG_HERMES
   configure your card and that /etc/pcmcia/wireless.opts works :
   <http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html>
 
-Apple Airport support (built-in)
-CONFIG_APPLE_AIRPORT
-  Enable support for the Apple Airport card (which is essentially a
-  Lucent Orinoco card with a non-standard interface) built into some
-  newer Apple Macintosh machines.
-
 Hermes 802.11b in PLX9052 based PCI adaptor support
 CONFIG_PLX_HERMES
   Enable support for PCMCIA cards supported by the "Hermes" (aka
@@ -8859,7 +8881,8 @@ Apple Airport support (built-in)
 CONFIG_APPLE_AIRPORT
   Say Y here to support the Airport 802.11b wireless Ethernet hardware
   built into the Macintosh iBook and other recent PowerPC-based
-  Macintosh machines.
+  Macintosh machines. This is essentially a Lucent Orinoco card with 
+  a non-standard interface
 
 Xircom Netwave AirSurfer wireless support
 CONFIG_PCMCIA_NETWAVE
@@ -9107,7 +9130,7 @@ CONFIG_WAN_ROUTER
   the price of an external router.  If you have one of those cards and
   wish to use your Linux box as a WAN router, say Y here and also to
   the WAN driver for your card, below.  You will then need the
-  wan-tools package which is available from <ftp://ftp.sangoma.com>.
+  wan-tools package which is available from <ftp://ftp.sangoma.com/>.
   Read <file:Documentation/networking/wan-router.txt> for more
   information.
 
@@ -9489,7 +9512,7 @@ CONFIG_COSA
   up. Look at the <http://www.fi.muni.cz/~kas/cosa/> for more
   information about the cards (including the pointer to the user-space
   utilities). You can also read the comment at the top of the
-  <file:drivers/net/cosa.c> for details about the cards and the driver
+  <file:drivers/net/wan/cosa.c> for details about the cards and the driver
   itself.
 
   The driver will be compiled as a module ( = code which can be
@@ -9501,7 +9524,7 @@ Etinc PCISYNC serial board support
 CONFIG_DSCC4
   This is a driver for Etinc PCISYNC boards based on the Infineon
   (ex. Siemens) DSCC4 chipset. It is supposed to work with the four
-  ports card. Take a look at <http://www.cogenit.fr/dscc4>
+  ports card. Take a look at <http://www.cogenit.fr/dscc4/>
   for further informations about the driver and his configuration.
 
   The driver will be compiled as a module ( = code which can be
@@ -9528,7 +9551,7 @@ CONFIG_LANMEDIA
   additional external hardware.
 
   To change setting such as syncPPP vs cisco HDLC or clock source you
-  will need lmcctl.  It is available at <ftp://ftp.lanmedia.com>.
+  will need lmcctl.  It is available at <ftp://ftp.lanmedia.com/>.
 
   This code is also available as a module called lmc.o ( = code
   which can be inserted in and removed from the running kernel
@@ -9573,7 +9596,7 @@ CONFIG_SBNI
   module will be called sbni.o).
 
   You can find more information and last versions of drivers and
-  utilities at <http://www.granch.ru>. If you have any question you
+  utilities at <http://www.granch.ru/>. If you have any question you
   can send email to sbni@granch.ru.
 
   Say N if unsure.
@@ -9596,7 +9619,7 @@ CONFIG_WAN_ROUTER_DRIVERS
   Router".
 
   You will need the wan-tools package which is available from
-  <ftp://ftp.sangoma.com>. Read
+  <ftp://ftp.sangoma.com/>. Read
   <file:Documentation/networking/wan-router.txt> for more information.
 
   Note that the answer to this question won't directly affect the
@@ -9605,7 +9628,7 @@ CONFIG_WAN_ROUTER_DRIVERS
 
 Sangoma WANPIPE(tm) multiprotocol cards
 CONFIG_VENDOR_SANGOMA
-  WANPIPE from Sangoma Technologies Inc. (<http://www.sangoma.com>)
+  WANPIPE from Sangoma Technologies Inc. (<http://www.sangoma.com/>)
   is a family of intelligent multiprotocol WAN adapters with data
   transfer rates up to 4Mbps. They are also known as Synchronous
   Data Link Adapters (SDLA) and are designated as S514-PCI or
@@ -9693,7 +9716,7 @@ CONFIG_COMX
 
   Read <file:Documentation/networking/comx.txt> for help on
   configuring and using COMX interfaces.  Further info on these cards
-  can be found at <http://www.itc.hu> or <info@itc.hu>.
+  can be found at <http://www.itc.hu/> or <info@itc.hu>.
 
   You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
   use this driver.
@@ -9787,8 +9810,8 @@ CONFIG_COMX_PROTO_FR
 
 Cyclom 2X(tm) multiprotocol cards
 CONFIG_CYCLADES_SYNC
-  Cyclom 2X from Cyclades Corporation (<http://www.cyclades.com> and
-  <http://www.cyclades.com.br)> is an intelligent multiprotocol WAN
+  Cyclom 2X from Cyclades Corporation (<http://www.cyclades.com/> and
+  <http://www.cyclades.com.br/>) is an intelligent multiprotocol WAN
   adapter with data transfer rates up to 512 Kbps. These cards support
   the X.25 and SNA related protocols. If you have one or more of these
   cards, say Y to this option. The next questions will ask you about
@@ -9797,10 +9820,10 @@ CONFIG_CYCLADES_SYNC
 
   While no documentation is available at this time please grab the
   wanconfig tarball in
-  <http://www.conectiva.com.br/~acme/cycsyn-devel> (with minor changes
+  <http://www.conectiva.com.br/~acme/cycsyn-devel/> (with minor changes
   to make it compile with the current wanrouter include files; efforts
   are being made to use the original package available at
-  <ftp://ftp.sangoma.com>).
+  <ftp://ftp.sangoma.com/>).
 
   Feel free to contact me or the cycsyn-devel mailing list at
   acme@conectiva.com.br and cycsyn-devel@bazar.conectiva.com.br for
@@ -10277,15 +10300,7 @@ CONFIG_STNIC
   is a 10Mbit/sec Ethernet controller.  Product overview and specs at
   <http://www.national.com/pf/DP/DP83902A.html>.
 
-CompactFlash Connection Area
-CONFIG_CF_AREA5
-  If your board has "Directly Connected" CompactFlash, You should
-  select the area where your CF is connected to.
-
-  - "Area5" if CompactFlash is connected to Area 5 (0x14000000)
-  - "Area6" if it is connected to Area 6 (0x18000000)
-
-  "Area6" will work for most boards. For ADX, select "Area5".
+  If unsure, say N.
 
 3COM cards
 CONFIG_NET_VENDOR_3COM
@@ -10632,7 +10647,7 @@ CONFIG_FMV18X
   module, say M here and read <file:Documentation/modules.txt> as well
   as <file:Documentation/networking/net-modules.txt>.
 
-EtherExpressPro support/EtherExpress 10 (i82595) support
+EtherExpressPro and EtherExpress 10 (i82595) support
 CONFIG_EEXPRESS_PRO
   If you have a network (Ethernet) card of this type, say Y. This
   driver supports intel i82595{FX,TX} based boards. Note however
@@ -10776,10 +10791,7 @@ CONFIG_IBMLANA
   driver and as a module ( = code which can be inserted in and removed
   from the running kernel whenever you want).  If you want to compile
   it as a module, say M here and read <file:Documentation/modules.txt>
-  as well as <file:Documentation/networking/net-modules.txt>.
-  If you plan to use more than one network card under linux, read the
-  Multiple-Ethernet-mini-HOWTO, available from
-  <ftp://sunsite.unc.edu:/pub/Linux/docs/HOWTO/mini>.  The only
+  as well as <file:Documentation/networking/net-modules.txt>. The only
   currently supported card is the IBM LAN Adapter/A for Ethernet.  It
   will both support 16K and 32K memory windows, however a 32K window
   gives a better security against packet losses.  Usage of multiple
@@ -10946,7 +10958,7 @@ Myson MTD-8xx PCI Ethernet support
 CONFIG_FEALNX
   Say Y here to support the Mysom MTD-800 family of PCI-based Ethernet
   cards. Specifications and data at
-  <http:www.myson.com.hk/mtd/datasheet>.
+  <http://www.myson.com.hk/mtd/datasheet/>.
 
 ICL EtherTeam 16i/32 support
 CONFIG_ETH16I
@@ -10993,7 +11005,7 @@ CONFIG_VIA_RHINE
 Davicom DM910x/DM980x support
 CONFIG_DM9102
   This driver is for DM9102(A)/DM9132/DM9801 compatible PCI cards from
-  Davicom (<http://www.davicom.com.tw>).  If you have such a network
+  Davicom (<http://www.davicom.com.tw/>).  If you have such a network
   (Ethernet) card, say Y.  Some information is contained in the file
   <file:Documentation/networking/dmfe.txt>.
 
@@ -11178,8 +11190,7 @@ CONFIG_IBMOL
   Wake On Lan, and PCI 100/16/4 adapters.
 
   If you have such an adapter, say Y and read the Token-Ring
-  mini-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
+  mini-HOWTO, available from <http://www.linuxdoc.org/docs.html#howto>.
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -11188,15 +11199,14 @@ CONFIG_IBMOL
 
   Also read <file:Documentation/networking/olympic.txt> or check the
   Linux Token Ring Project site for the latest information at
-  <http://www.linuxtr.net>.
+  <http://www.linuxtr.net/>.
 
 IBM Lanstreamer chipset PCI adapter support
 CONFIG_IBMLS
   This is support for IBM Lanstreamer PCI Token Ring Cards.
 
   If you have such an adapter, say Y and read the Token-Ring
-  mini-HOWTO available via FTP (user:anonymous) from
-  <ftp://metalab.unc/edu/pub/Linux/docs/HOWTO>.
+  mini-HOWTO, available from <http://www.linuxdoc.org/docs.html#howto>.
 
   This driver is also available as a modules ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -11347,7 +11357,7 @@ CONFIG_SHAPER
   say Y to "QoS and/or fair queueing" above.
 
   To set up and configure shaper devices, you need the shapecfg
-  program, available from <ftp://shadow.cabi.net/pub/Linux> in the
+  program, available from <ftp://shadow.cabi.net/pub/Linux/> in the
   shaper package.
 
   This driver is also available as a module ( = code which can be
@@ -11608,7 +11618,7 @@ CONFIG_SBPCD2
   Say Y here only if you have two CD-ROM controller cards of this type
   (usually only if you have more than four drives).  You should enter
   the parameters for the second, third and fourth interface card into
-  <file:include/linux/sbpcd.h> before compiling the new kernel.  Read
+  <file:drivers/cdrom/sbpcd.h> before compiling the new kernel.  Read
   the file <file:Documentation/cdrom/sbpcd>.
 
 Matsushita/Panasonic, ... third CD-ROM controller support
@@ -12383,6 +12393,100 @@ CONFIG_MTD_OCELOT
   NVRAM on the Momenco Ocelot board.  If you have one of these boards
   and would like access to either of these, say 'Y'.
 
+Support for absent chips in bus mapping
+CONFIG_MTD_ABSENT
+  This option enables support for a dummy probing driver used to
+  allocated placeholder MTD devices on systems that have socketed
+  or removable media.  Use of this driver as a fallback chip probe
+  preserves the expected registration order of MTD device nodes on
+  the system regardless of media presence.  Device nodes created
+  with this driver will return -ENODEV upon access.
+
+MTD Emulation using block device
+CONFIG_MTD_BLKMTD
+  This driver allows a block device to appear as an MTD. It would
+  generally be used in the following cases:
+
+    Using Compact Flash as an MTD, these usually present themselves to
+    the system as an ATA drive.
+    Testing MTD users (eg JFFS2) on large media and media that might
+    be removed during a write (using the floppy drive).
+
+Cirrus CDB89712 evaluation board mappings
+CONFIG_MTD_CDB89712
+  This enables access to the flash or ROM chips on the CDB89712 board.
+  If you have such a board, say 'Y'.
+
+Detect non-CFI AMD/JEDEC-compatible flash chips
+CONFIG_MTD_JEDECPROBE
+  This option enables JEDEC-style probing of flash chips which are not
+  compatible with the Common Flash Interface, but will use the common
+  CFI-targetted flash drivers for any chips which are identified which
+  are in fact compatible in all but the probe method. This actually
+  covers most AMD/Fujitsu-compatible chips, and will shortly cover also
+  non-CFI Intel chips (that code is in MTD CVS and should shortly be sent
+  for inclusion in Linus' tree)
+
+BIOS flash chip on Intel L440GX boards
+CONFIG_MTD_L440GX
+  Support for treating the BIOS flash chip on Intel L440GX motherboards
+  as an MTD device - with this you can reprogram your BIOS.
+
+  BE VERY CAREFUL.
+
+28F160xx flash driver for LART
+CONFIG_MTD_LART
+  This enables the flash driver for LART. Please note that you do
+  not need any mapping/chip driver for LART. This one does it all
+  for you, so go disable all of those if you enabled some of them (:
+
+Older (theoretically obsoleted now) drivers for non-CFI chips
+CONFIG_MTD_OBSOLETE_CHIPS
+  This option does not enable any code directly, but will allow you to
+  select some other chip drivers which are now considered obsolete,
+  because the generic CONFIG_JEDEC_PROBE code above should now detect
+  the chips which are supported by these drivers, and allow the generic
+  CFI-compatible drivers to drive the chips. Say 'N' here unless you have
+  already tried the CONFIG_JEDEC_PROBE method and reported its failure
+  to the MTD mailing list at <linux-mtd@lists.infradead.org>
+
+CFI Flash device mapped on Hitachi SolutionEngine
+CONFIG_MTD_SOLUTIONENGINE
+  This enables access to the flash chips on the Hitachi SolutionEngine and
+  similar boards. Say 'Y' if you are building a kernel for such a board.
+
+Flash chip mapping on TQM8xxL PPC board
+CONFIG_MTD_TQM8XXL
+  The TQM8xxL PowerPC board has up to two banks of CFI-compliant
+  chips, currently uses AMD one. This 'mapping' driver supports
+  that arrangement, allowing the CFI probe and command set driver
+  code to communicate with the chips on the TQM8xxL board. More at
+  <http://www.denx.de/embedded-ppc-en.html>.
+
+Darkness
+CONFIG_MEMORY_SET
+  This is an option about which you will never be asked a question.
+  Therefore, I conclude that you do not exist - go away.
+
+  There is a grue here.
+
+Physical memory size
+CONFIG_MEMORY_SIZE
+  This sets the default memory size assumed by your SH kernel. It can
+  be overridden as normal by the 'mem=' argument on the kernel command
+  line. If unsure, consult your board specifications or just leave it
+  as 0x00400000 which was the default value before this became
+  configurable.
+
+Cache and PCI noncoherent
+CONFIG_SH_PCIDMA_NONCOHERENT
+  Enable this option if your platform does not have a CPU cache which
+  remains coherent with PCI DMA. It is safest to say 'Y', although you
+  will see better performance if you can say 'N', because the PCI DMA
+  code will not have to flush the CPU's caches. If you have a PCI host
+  bridge integrated with your SH CPU, refer carefully to the chip specs
+  to see if you can say 'N' here. Otherwise, leave it as 'Y'.
+
 USB (Universal Serial Bus) support
 CONFIG_USB
   Universal Serial Bus (USB) is a specification for a serial bus
@@ -12568,7 +12672,7 @@ CONFIG_USB_AIPTEK
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
   The module will be called aiptek.o. If you want to compile it as a
-  module, say M here and read Documentation/modules.txt.
+  module, say M here and read <file:Documentation/modules.txt>.
 
 Use input layer for ADB devices
 CONFIG_INPUT_ADBHID
@@ -12729,7 +12833,7 @@ USB Handspring Visor Driver
 CONFIG_USB_SERIAL_VISOR
   Say Y here if you want to connect to your HandSpring Visor, Palm
   m500 or m505 through its USB docking station. See
-  <http://usbvisor.sourceforge.net> for more information on using this
+  <http://usbvisor.sourceforge.net/> for more information on using this
   driver.
 
   This code is also available as a module ( = code which can be
@@ -12748,6 +12852,17 @@ CONFIG_USB_SERIAL_IR
   The module will be called ir-usb.o. If you want to compile it as a
   module, say M here and read <file:Documentation/modules.txt>.
 
+USB IR Dongle Serial Driver
+CONFIG_USB_SERIAL_IR
+  Say Y here if you want to enable simple serial support for USB IrDA
+  devices.  This is useful if you do not want to use the full IrDA
+  stack.
+  
+  This code is also available as a module ( = code which can be
+  inserted in and removed from the running kernel whenever you want).
+  The module will be called ir-usb.o. If you want to compile it as a
+  module, say M here and read <file:Documentation/modules.txt>.
+
 USB Belkin and Paracom Single Port Serial Driver
 CONFIG_USB_SERIAL_BELKIN
   Say Y here if you want to use a Belkin USB Serial single port
@@ -12765,7 +12880,7 @@ CONFIG_USB_SERIAL_FTDI_SIO
   converter device. The implementation I have is called the USC-1000.
   This driver has also be tested with the 245 and 232 devices.
 
-  See  http://ftdi-usb-sio.sourceforge.net for more
+  See <http://ftdi-usb-sio.sourceforge.net/> for more
   information on this driver and the device.
 
   This code is also available as a module ( = code which can be
@@ -13002,7 +13117,7 @@ CONFIG_USB_CDCETHER
   This driver supports devices conforming to the Communication Device
   Class Ethernet Control Model.  This is used in some cable modems.
   For more details on the specification, get the Communication Device
-  Class specification from <http://www.usb.org>.
+  Class specification from <http://www.usb.org/>.
 
   This driver should work with the following devices:
         * Ericsson PipeRider (all variants)
@@ -13129,7 +13244,7 @@ CONFIG_USB_DC2XX
   Say Y here if you want to connect this type of still camera to your
   computer's USB port.  See <file:Documentation/usb/dc2xx.txt> for
   more information; some non-Kodak cameras may also work with this
-  driver, given application support (such as <http://www.gPhoto.org>).
+  driver, given application support (such as <http://www.gphoto.org/>).
 
   This code is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -13140,7 +13255,7 @@ USB Mustek MDC800 Digital Camera support
 CONFIG_USB_MDC800
   Say Y here if you want to connect this type of still camera to
   your computer's USB port. This driver can be used with gphoto 0.4.3
-  and higher (look at <http://www.gphoto.org>).
+  and higher (look at <http://www.gphoto.org/>).
   To use it create a device node with "mknod /dev/mustek c 180 32" and
   configure it in your software.
 
@@ -13244,7 +13359,7 @@ CONFIG_USB_BANDWIDTH
 DABUSB driver
 CONFIG_USB_DABUSB
   A Digital Audio Broadcasting (DAB) Receiver for USB and Linux
-  brought to you by the DAB-Team (<http://dab.in.tum.de>).  This
+  brought to you by the DAB-Team (<http://dab.in.tum.de/>).  This
   driver can be taken as an example for URB-based bulk, control, and
   isochronous transactions. URB's are explained in
   <file:Documentation/usb/URB.txt>.
@@ -13482,7 +13597,7 @@ CONFIG_UML_NET_ETHERTAP
   running UML to exchange packets with its host over one of the
   host's Ethertap devices, such as /dev/tap0.  Additional running
   UMLs can use additional Ethertap devices, one per running UML.
-  While the UML believes its on a (multi-device, broadcast) virtual
+  While the UML believes it's on a (multi-device, broadcast) virtual
   Ethernet network, it's in fact communicating over a point-to-point
   link with the host.
 
@@ -13577,7 +13692,7 @@ USB Bluetooth support
 CONFIG_USB_BLUETOOTH
   Say Y here if you want to connect a USB Bluetooth device to your
   computer's USB port. You will need the Bluetooth stack (available
-  at <http://developer.axis.com/software/index.shtml)> to fully use
+  at <http://developer.axis.com/software/index.shtml>) to fully use
   the device.
 
   This code is also available as a module ( = code which can be
@@ -13613,7 +13728,7 @@ CONFIG_REISERFS_FS
 
   In general, ReiserFS is as fast as ext2, but is very efficient with
   large directories and small files.  Additional patches are needed
-  for NFS and quotas, please see <http://www.reiserfs.org> for links.
+  for NFS and quotas, please see <http://www.reiserfs.org/> for links.
 
   It is more easily extended to have features currently found in
   database and keyword search systems than block allocation based file
@@ -13621,7 +13736,7 @@ CONFIG_REISERFS_FS
   plugins consistent with our motto ``It takes more than a license to
   make source code open.''
 
-  Read <http://www.reiserfs.org> to learn more about reiserfs.
+  Read <http://www.reiserfs.org/> to learn more about reiserfs.
 
   Sponsored by Threshold Networks, Emusic.com, and Bigstorage.com.
 
@@ -13649,15 +13764,6 @@ CONFIG_REISERFS_PROC_INFO
   everyone but ReiserFS developers and people fine-tuning reiserfs or
   tracing problems should say N.
 
-Publish some reiserfs-specific info under /proc/fs/reiserfs
-CONFIG_REISERFS_PROC_INFO
-  Create under /proc/fs/reiserfs hierarchy of files, displaying
-  various ReiserFS statistics and internal data on the expense of
-  making your kernel or module slightly larger (+8K). This also increases 
-  amount of kernel memory required for each mount. Almost everyone
-  but ReiserFS developers and people fine-tuning reiserfs or tracing
-  problems should say NO.
-
 Second extended fs support
 CONFIG_EXT2_FS
   This is the de facto standard Linux file system (method to organize
@@ -13687,10 +13793,10 @@ CONFIG_EXT2_FS
   directories on ext2 file systems, use chattr ("man chattr").
 
   Ext2fs partitions can be read from within DOS using the ext2tool
-  command line tool package (available via FTP (user: anonymous) from
-  <ftp://metalab.unc.edu/pub/Linux/system/filesystems/ext2>) and from
+  command line tool package (available from
+  <ftp://ibiblio.org/pub/Linux/system/filesystems/ext2/>) and from
   within Windows NT using the ext2nt command line tool package from
-  <ftp://metalab.unc.edu/pub/Linux/utils/dos>.  Explore2fs is a
+  <ftp://ibiblio.org/pub/Linux/utils/dos/>.  Explore2fs is a
   graphical explorer for ext2fs partitions which runs on Windows 95
   and Windows NT and includes experimental write support; it is
   available from
@@ -13890,7 +13996,7 @@ CONFIG_JOLIET
   which allows for long filenames in unicode format (unicode is the
   new 16 bit character code, successor to ASCII, which encodes the
   characters of almost all languages of the world; see
-  <http://www.unicode.org> for more information).  Say Y here if you
+  <http://www.unicode.org/> for more information).  Say Y here if you
   want to be able to read Joliet CD-ROMs under Linux.
 
 Transparent decompression extension
@@ -13975,7 +14081,7 @@ CONFIG_MSDOS_FS
   Linux, you can either use the DOS emulator DOSEMU, described in the
   DOSEMU-HOWTO, available from
   <http://www.linuxdoc.org/docs.html#howto>, or try dmsdosfs in
-  <ftp://metalab.unc.edu/pub/Linux/system/filesystems/dosfs>. If you
+  <ftp://ibiblio.org/pub/Linux/system/filesystems/dosfs/>. If you
   intend to use dosemu with a non-compressed MSDOS partition, say Y
   here) and MSDOS floppies. This means that file access becomes
   transparent, i.e. the MSDOS files look and behave just like all
@@ -14150,8 +14256,9 @@ CONFIG_NFS_FS
   level IP autoconfiguration" above and to "Root file system on NFS"
   below. You cannot compile this driver as a module in this case.
   There are two packages designed for booting diskless machines over
-  the net: netboot and etherboot, both available via FTP from
-  <ftp://metalab.unc.edu/pub/Linux/system/boot/Ethernet/>.
+  the net: netboot, available from
+  <http://ftp1.sourceforge.net/netboot/>, and Etherboot,
+  available from <http://ftp1.sourceforge.net/etherboot/>.
 
   If you don't know what all this is about, say N.
 
@@ -14274,7 +14381,7 @@ CONFIG_SYSV_FS
   a set of kernel modules that lets you run SCO, Xenix, Wyse,
   UnixWare, Dell Unix and System V programs under Linux.  It is
   available via FTP (user: ftp) from
-  <ftp://ftp.openlinux.org/pub/people/hch/linux-abi>).
+  <ftp://ftp.openlinux.org/pub/people/hch/linux-abi/>).
   NOTE: that will work only for binaries from Intel-based systems;
   PDP ones will have to wait until somebody ports Linux to -11 ;-)
 
@@ -14403,7 +14510,7 @@ CONFIG_AUTOFS4_FS
   automounter (amd), which is a pure user space daemon.
 
   To use the automounter you need the user-space tools from
-  <ftp://ftp.kernel.org/pub/linux/daemons/autofs/testing-v4>; you also
+  <ftp://ftp.kernel.org/pub/linux/daemons/autofs/testing-v4/>; you also
   want to answer Y to "NFS file system support", below.
 
   If you want to compile this as a module ( = code which can be
@@ -14467,6 +14574,11 @@ CONFIG_JFFS2_FS_DEBUG
   If reporting bugs, please try to have available a full dump of the
   messages at debug level 1 while the misbehaviour was occurring.
 
+JFFS stats available in /proc filesystem
+CONFIG_JFFS_PROC_FS
+  Enabling this option will cause statistics from mounted JFFS file systems
+  to be made available to the user in the /proc/fs/jffs/ directory.
+
 UFS file system support (read-only)
 CONFIG_UFS_FS
   BSD and derivate versions of Unix (such as SunOS, FreeBSD, NetBSD,
@@ -14567,7 +14679,7 @@ CONFIG_LDM_PARTITION
   XP.
 
   Technical documentation to accompany this driver is available from:
-  <http://linux-ntfs.sf.net/ldm>.
+  <http://linux-ntfs.sf.net/ldm/>.
 
   If unsure, say N.
 
@@ -14695,7 +14807,6 @@ CONFIG_DEVPTS_FS
   Note that the experimental "/dev file system support"
   (CONFIG_DEVFS_FS)  is a more general facility.
 
-# This is for Linus's tree
 FreeVxFS file system support (VERITAS VxFS(TM) compatible)
 CONFIG_VXFS_FS
   FreeVxFS is a file system driver that support the VERITAS VxFS(TM)
@@ -14714,25 +14825,6 @@ CONFIG_VXFS_FS
   module, say M here and read <file:Documentation/modules.txt>.  If
   unsure, say N. 
 
-# This is for Alan's tree.  Note the name difference.
-FreeVxFS file system support (VERITAS VxFS(TM) compatible)
-CONFIG_FREEVXFS_FS
-  FreeVxFS is a file system driver that support the VERITAS VxFS(TM)
-  file system format.  VERITAS VxFS(TM) is the standard file system
-  of SCO UnixWare (and possibly others) and optionally available
-  for Sunsoft Solaris, HP-UX and many other operating systems.
-  Currently only readonly access is supported.
-
-  NOTE: the file system type as used by mount(1), mount(2) and
-        fstab(5) is 'vxfs' as it describes the filesystem format, not
-        the actual driver.
-
-  This file system is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module is called freevxfs.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.  If
-  unsure, say N.
-
 UnixWare slices support
 CONFIG_UNIXWARE_DISKLABEL
   Like some systems, UnixWare uses its own slice table inside a
@@ -14766,8 +14858,8 @@ CONFIG_SMB_FS
   Note: if you just want your box to act as an SMB *server* and make
   files and printing services available to Windows clients (which need
   to have a TCP/IP stack), you don't need to say Y here; you can use
-  the program samba (available via FTP (user: anonymous) in
-  <ftp://metalab.unc.edu/pub/Linux/system/network/samba>) for that.
+  the program SAMBA (available from <ftp://ftp.samba.org/pub/samba/>)
+  for that.
 
   General information about how to connect Linux, Windows machines and
   Macs is on the WWW at <http://www.eats.com/linux_mac_win.html>.
@@ -14816,7 +14908,7 @@ CONFIG_CODA_FS
   client and server.  Servers are currently user level, i.e. they need
   no kernel support.  Please read
   <file:Documentation/filesystems/coda.txt> and check out the Coda
-  home page <http://www.coda.cs.cmu.edu>.
+  home page <http://www.coda.cs.cmu.edu/>.
 
   If you want to compile the coda client support as a module ( = code
   which can be inserted in and removed from the running kernel
@@ -14832,7 +14924,7 @@ CONFIG_INTERMEZZO_FS
 
   If you say Y or M your kernel or module will provide InterMezzo
   support.  You will also need a file server daemon, which you can get
-  from <http://www.inter-mezzo.org>.
+  from <http://www.inter-mezzo.org/>.
 
 NCP file system support (to mount NetWare volumes)
 CONFIG_NCP_FS
@@ -15484,7 +15576,7 @@ Include IOP (IIfx/Quadra 9x0) ADB driver
 CONFIG_ADB_IOP
   The I/O Processor (IOP) is an Apple custom IC designed to provide
   intelligent support for I/O controllers.  It is described at
-  <http://www.angelfire.com/ca2/dev68k/iopdesc.html;> to enable direct
+  <http://www.angelfire.com/ca2/dev68k/iopdesc.html> to enable direct
   support for it, say 'Y' here.
 
 Mac II style Apple Desktop Bus support
@@ -16193,9 +16285,7 @@ CONFIG_BUSMOUSE
   Say Y here if your machine has a bus mouse as opposed to a serial
   mouse. Most people have a regular serial MouseSystem or
   Microsoft mouse (made by Logitech) that plugs into a COM port
-  (rectangular with 9 or 25 pins). These people say N here. If you
-  have something else, read the Busmouse-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>, and say Y here.
+  (rectangular with 9 or 25 pins). These people say N here. 
 
   If you have a laptop, you either have to check the documentation or
   experiment a bit to find out whether the trackball is a serial mouse
@@ -16260,8 +16350,8 @@ CONFIG_PSMOUSE
   When using a PS/2 mouse, you can get problems if you want to use the
   mouse both on the Linux console and under X. Using the "-R" option
   of the Linux mouse managing program gpm (available from
-  <ftp://metalab.unc.edu/pub/Linux/system/mouse>) solves this
-  problem, or you can get the "mconv2" utility from the same location.
+  <ftp://gnu.systemy.it/pub/gpm/>) solves this problem, or you can get
+  the "mconv2" utility from <ftp://ibiblio.org/pub/Linux/system/mouse/>.
 
 C&T 82C710 mouse port support (as on TI Travelmate)
 CONFIG_82C710_MOUSE
@@ -16380,7 +16470,7 @@ CONFIG_FTAPE
   Note that the Ftape-HOWTO is out of date (sorry) and documents the
   older version 2.08 of this software but still contains useful
   information.  There is a web page with more recent documentation at
-  <http://www.math1.rwth-aachen.de/~heine/ftape/>.  This page
+  <http://www.instmath.rwth-aachen.de/~heine/ftape/>.  This page
   always contains the latest release of the ftape driver and useful
   information (backup software, ftape related patches and
   documentation, FAQ).  Note that the file system interface has
@@ -16416,7 +16506,7 @@ CONFIG_ZFTAPE
   file <file:Documentation/ftape.txt> contains a short description of
   the most important changes in the file system interface compared to
   previous versions of ftape.  The ftape home page
-  <http://www-math.math.rwth-aachen.de/~LBFM/claus/ftape/> contains
+  <http://www.instmath.rwth-aachen.de/~heine/ftape/> contains
   further information.
 
   IMPORTANT NOTE: zftape can read archives created by previous
@@ -16659,7 +16749,7 @@ CONFIG_DRM
   introduced in XFree86 4.0. If you say Y here, you need to select
   the module that's right for your graphics card from the list below.
   These modules provide support for synchronization, security, and
-  DMA transfers. Please see <http://dri.sourceforge.net> for more
+  DMA transfers. Please see <http://dri.sourceforge.net/> for more
   details.  You should also select and configure AGP
   (/dev/agpgart) support.
 
@@ -17125,9 +17215,9 @@ CONFIG_WATCHDOG
   in the kernel source.
 
   The watchdog is usually used together with the watchdog daemon
-  which is available via FTP (user: anonymous) from
-  <ftp://tsx-11.mit.edu/pub/linux/sources/sbin/>. This daemon can also
-  monitor NFS connections and can reboot the machine when the process
+  which is available from
+  <ftp://ibiblio.org/pub/Linux/system/daemons/watchdog/>. This daemon can
+  also monitor NFS connections and can reboot the machine when the process
   table is full.
 
   If unsure, say N.
@@ -17201,7 +17291,7 @@ CONFIG_PCWATCHDOG
   and if it does, it reboots your computer after a certain amount of
   time. This driver is like the WDT501 driver but for different
   hardware. Please read <file:Documentation/pcwd-watchdog.txt>. The PC
-  watchdog cards can be ordered from <http://www.berkprod.com>.
+  watchdog cards can be ordered from <http://www.berkprod.com/>.
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -17435,7 +17525,6 @@ CONFIG_NVRAM
   The module will be called nvram.o. If you want to compile it as a
   module, say M here and read <file:Documentation/modules.txt>.
 
-# Linus tree only
 Joystick support
 CONFIG_JOYSTICK
   If you have a joystick, 6dof controller, gamepad, steering wheel,
@@ -17443,18 +17532,17 @@ CONFIG_JOYSTICK
   enable generic support for these controllers. You will also need to
   say Y or M to at least one of the hardware specific drivers. This
   will make the controllers available as /dev/input/jsX devices.
-  Please read the file <file:Documentation/joystick.txt> which
+  Please read the file <file:Documentation/input/joystick.txt> which
   contains more information and the location of the joystick package
   that you'll need.
 
-# AC tree only
 Game port support
 CONFIG_INPUT_GAMEPORT
   Gameport support is for the standard 15-pin PC gameport.  If you
   have a joystick, gamepad, gameport card, a soundcard with a gameport
   or anything else that uses the gameport, say Y or M here and also to
   at least one of the hardware specific drivers.
-  Please read the file <file:Documentation/joystick.txt> which
+  Please read the file <file:Documentation/input/joystick.txt> which
   contains more information and the location of the joystick package
   that you'll need if you use the gameport with a joystick.
 
@@ -17467,7 +17555,7 @@ Classic ISA/PnP gameports
 CONFIG_INPUT_NS558
   Say Y here if you have an ISA or PnP gameport.
   For more information on how to use the driver please read
-  <file:Documentation/joystick.txt>.
+  <file:Documentation/input/joystick.txt>.
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -17478,7 +17566,7 @@ PDPI Lightning 4 gamecard
 CONFIG_INPUT_LIGHTNING
   Say Y here if you have a PDPI Lightning 4 gamecard. For more
   information on how to use the driver please read
-  <file:Documentation/joystick.txt>.
+  <file:Documentation/input/joystick.txt>.
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -17500,7 +17588,7 @@ Aureal Vortex and Trident 4DWave gameports
 CONFIG_INPUT_PCIGAME
   Say Y here if you have a Trident 4DWave DX/NX or Aureal Vortex 1/2
   card. For more information on how to use the driver please read
-  <file:Documentation/joystick.txt>.
+  <file:Documentation/input/joystick.txt>.
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -17511,7 +17599,7 @@ SoundBlaster Live! gameports
 CONFIG_INPUT_EMU10K1
   Say Y here if you have a SoundBlaster Live! card and want to use
   its gameport.  For more information on how to use the driver
-  please read <file:Documentation/joystick.txt>.
+  please read <file:Documentation/input/joystick.txt>.
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -17526,7 +17614,7 @@ CONFIG_INPUT_ANALOG
   additional hats and buttons compatible with CH Flightstick Pro,
   ThrustMaster FCS, 6 and 8 button gamepads, or Saitek Cyborg
   joysticks.  For more information on how to use the driver please
-  read <file:Documentation/joystick.txt>.
+  read <file:Documentation/input/joystick.txt>.
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -17537,7 +17625,7 @@ Assassin 3D and MadCatz Panther devices
 CONFIG_INPUT_A3D
   Say Y here if you have an FPGaming or MadCatz controller using the
   A3D protocol over the PC gameport.  For more information on how to
-  use the driver please read <file:Documentation/joystick.txt>.
+  use the driver please read <file:Documentation/input/joystick.txt>.
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -17548,7 +17636,7 @@ Logitech ADI digital joysticks and gamepads
 CONFIG_INPUT_ADI
   Say Y here if you have a Logitech controller using the ADI
   protocol over the PC gameport. For more information on how to use
-  the driver please read <file:Documentation/joystick.txt>.
+  the driver please read <file:Documentation/input/joystick.txt>.
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -17559,7 +17647,7 @@ Creative Labs Blaster Cobra gamepad
 CONFIG_INPUT_COBRA
   Say Y here if you have a Creative Labs Blaster Cobra gamepad.
   For more information on how to use the driver please read
-  <file:Documentation/joystick.txt>.
+  <file:Documentation/input/joystick.txt>.
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -17570,7 +17658,7 @@ Genius Flight2000 Digital joysticks and gamepads
 CONFIG_INPUT_GF2K
   Say Y here if you have a Genius Flight2000 or MaxFighter digitally
   communicating joystick or gamepad.  For more information on how to
-  use the driver please read <file:Documentation/joystick.txt>.
+  use the driver please read <file:Documentation/input/joystick.txt>.
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -17581,7 +17669,7 @@ Gravis GrIP joysticks and gamepads
 CONFIG_INPUT_GRIP
   Say Y here if you have a Gravis controller using the GrIP protocol
   over the PC gameport.  For more information on how to use the driver
-  please read <file:Documentation/joystick.txt>.
+  please read <file:Documentation/input/joystick.txt>.
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -17592,7 +17680,7 @@ InterAct digital joysticks and gamepads
 CONFIG_INPUT_INTERACT
   Say Y hereif you have an InterAct gameport or joystick
   communicating digitally over the gameport.  For more information on
-  how to use the driver please read <file:Documentation/joystick.txt>.
+  how to use the driver please read <file:Documentation/input/joystick.txt>.
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -17604,7 +17692,7 @@ CONFIG_INPUT_TMDC
   Say Y here if you have a ThrustMaster controller using the
   DirectConnect (BSP) protocol over the PC gameport.  For more
   information on how to use the driver please read
-  <file:Documentation/joystick.txt>.
+  <file:Documentation/input/joystick.txt>.
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -17615,7 +17703,7 @@ Microsoft SideWinder digital joysticks and gamepads
 CONFIG_INPUT_SIDEWINDER
   Say Y here if you have a Microsoft controller using the Digital
   Overdrive protocol over PC gameport.  For more information on how to
-  use the driver please read <file:Documentation/joystick.txt>.
+  use the driver please read <file:Documentation/input/joystick.txt>.
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -17627,7 +17715,7 @@ CONFIG_INPUT_SERIO
   Say Y here and to the Serial port input line discipline option if
   you plan to use a joystick that communicates over the serial (COM)
   port.  For more information on how to use the driver please read
-  <file:Documentation/joystick.txt>.
+  <file:Documentation/input/joystick.txt>.
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -17638,7 +17726,7 @@ Serial port input line discipline
 CONFIG_INPUT_SERPORT
   Say Y here if you plan to use a joystick that communicates over the
   serial (COM) port.  For more information on how to use the driver
-  please read <file:Documentation/joystick.txt>.
+  please read <file:Documentation/input/joystick.txt>.
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -17649,7 +17737,7 @@ Logitech WingMan Warrior joystick
 CONFIG_INPUT_WARRIOR
   Say Y here if you have a Logitech WingMan Warrior joystick connected
   to your computer's serial port.  For more information on how to use
-  the driver please read <file:Documentation/joystick.txt>.
+  the driver please read <file:Documentation/input/joystick.txt>.
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -17660,7 +17748,7 @@ LogiCad3d Magellan/SpaceMouse 6dof controller
 CONFIG_INPUT_MAGELLAN
   Say Y here if you have a Magellan or Space Mouse 6DOF controller
   connected to your computer's serial port.  For more information on
-  how to use the driver please read <file:Documentation/joystick.txt>.
+  how to use the driver please read <file:Documentation/input/joystick.txt>.
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -17672,7 +17760,7 @@ CONFIG_INPUT_SPACEORB
   Say Y here if you have a SpaceOrb 360 or SpaceBall Avenger 6DOF
   controller connected to your computer's serial port.  For more
   information on how to use the driver please read
-  <file:Documentation/joystick.txt>.
+  <file:Documentation/input/joystick.txt>.
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -17683,7 +17771,7 @@ SpaceTec SpaceBall 4000 FLX 6dof controller
 CONFIG_INPUT_SPACEBALL
   Say Y here if you have a SpaceTec SpaceBall 4000 FLX controller
   connected to your computer's serial port.  For more information on
-  how to use the driver please read <file:Documentation/joystick.txt>.
+  how to use the driver please read <file:Documentation/input/joystick.txt>.
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -17694,7 +17782,7 @@ Gravis Stinger gamepad
 CONFIG_INPUT_STINGER
   Say Y here if you have a Gravis Stinger connected to one of your
   serial ports.  For more information on how to use the driver please
-  read <file:Documentation/joystick.txt>.
+  read <file:Documentation/input/joystick.txt>.
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -17705,7 +17793,7 @@ I-Force joysticks/wheels
 CONFIG_INPUT_IFORCE_232
   Say Y here if you have an I-Force joystick or steering wheel
   connected to your serial (COM) port.  For more information on how
-  to use the driver please read <file:Documentation/joystick.txt>.
+  to use the driver please read <file:Documentation/input/joystick.txt>.
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -17716,7 +17804,7 @@ I-Force joysticks/wheels
 CONFIG_INPUT_IFORCE_USB
   Say Y here if you have an I-Force joystick or steering wheel
   connected to your USB port.  For more information on how to use the
-  driver please read <file:Documentation/joystick.txt>.
+  driver please read <file:Documentation/input/joystick.txt>.
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -17729,8 +17817,8 @@ CONFIG_INPUT_DB9
   gamepad, Sega Saturn gamepad, or a Multisystem -- Atari, Amiga,
   Commodore, Amstrad CPC joystick connected to your parallel port.
   For more information on how to use the driver please read
-  <file:Documentation/joystick.txt> and
-  <file:Documentation/joystick-parport.txt>.
+  <file:Documentation/input/joystick.txt> and
+  <file:Documentation/input/joystick-parport.txt>.
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -17744,8 +17832,8 @@ CONFIG_INPUT_GAMECON
   Sony PlayStation gamepad or a Multisystem -- Atari, Amiga,
   Commodore, Amstrad CPC joystick connected to your parallel port.
   For more information on how to use the driver please read
-  <file:Documentation/joystick.txt> and
-  <file:Documentation/joystick-parport.txt>.
+  <file:Documentation/input/joystick.txt> and
+  <file:Documentation/input/joystick-parport.txt>.
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -17757,8 +17845,8 @@ CONFIG_INPUT_TURBOGRAFX
   Say Y here if you have the TurboGraFX interface by Steffen Schwenke,
   and want to use it with Multisystem -- Atari, Amiga, Commodore,
   Amstrad CPC joystick.  For more information on how to use the driver
-  please read <file:Documentation/joystick.txt> and
-  <file:Documentation/joystick-parport.txt>.
+  please read <file:Documentation/input/joystick.txt> and
+  <file:Documentation/input/joystick-parport.txt>.
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -17769,7 +17857,7 @@ Amiga joysticks
 CONFIG_INPUT_AMIJOY
   Say Y here if you have an Amiga with a digital joystick connected
   to it.  For more information on how to use the driver please read
-  <file:Documentation/joystick.txt>.
+  <file:Documentation/input/joystick.txt>.
 
   This driver is also available as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want).
@@ -18342,7 +18430,7 @@ CONFIG_SOUND_AEDSP16
   questions.
 
   Read the <file:Documentation/sound/README.OSS> file and the head of
-  <file:drivers/sound/lowlevel/aedsp16.c> as well as
+  <file:drivers/sound/aedsp16.c> as well as
   <file:Documentation/sound/AudioExcelDSP16> to get more information
   about this driver and its configuration.
 
@@ -18401,12 +18489,20 @@ CONFIG_SOUND_CMPCI
   or the CMI8378 chipset.  Data on these chips are available at
   <http://www.cmedia.com.tw/>.
 
+  A userspace utility to control some internal registers of these
+  chips is available at
+  <http://member.nifty.ne.jp/Breeze/softwares/unix/cmictl-e.html>.
+
 Support CMI8738 based audio cards
 CONFIG_SOUND_CMPCI_CM8738
   Say Y or M if you have a PCI sound card using the CMI8338
   or the CMI8378 chipset.  Data on this chip is available at
   <http://www.cmedia.com.tw/doc8738.htm>.
 
+  A userspace utility to control some internal registers of these
+  chips is available at
+  <http://member.nifty.ne.jp/Breeze/softwares/unix/cmictl-e.html>.
+
 Enable joystick
 CONFIG_SOUND_CMPCI_JOYSTICK
   Say here in order to enable the joystick port on a sound crd using
@@ -18424,13 +18520,19 @@ CONFIG_SOUND_CMPCI_SPDIFLOOP
   "The 8738 Audio SPDIF In/Out Technical Data" on the technical
   support page at <http://www.cmedia.com.tw/>.
 
+  A userspace utility to control even more internal registers of these
+  chips is available at
+  <http://member.nifty.ne.jp/Breeze/softwares/unix/cmictl-e.html>.
+  This package will among other things help you enable SPDIF 
+  out/in/loop/monitor.
+
 Creative SBLive! (EMU10K1) based PCI sound cards
 CONFIG_SOUND_EMU10K1
   Say Y or M if you have a PCI sound card using the EMU10K1 chipset,
   such as the Creative SBLive!, SB PCI512 or Emu-APS.
 
   For more information on this driver and the degree of support for the
-  different card models please check <http://opensource.creative.com>.
+  different card models please check <http://opensource.creative.com/>.
 
   It is now possible to load dsp microcode patches into the EMU10K1
   chip.  These patches are used to implement real time sound
@@ -18663,7 +18765,7 @@ CONFIG_MIPS_EV96100
 
 Support for ITE 8172G board
 CONFIG_MIPS_ITE8172
-  Ths is an evaluation board made by ITE (http://www.ite.com.tw/)
+  Ths is an evaluation board made by ITE <http://www.ite.com.tw/>
   with ATX form factor that utilizes a MIPS R5000 to work with its
   ITE8172G companion internet appliance chip. The MIPS core can be
   either a NEC Vr5432 or QED RM5231. Say Y here if you wish to build
@@ -19177,7 +19279,7 @@ CONFIG_ISDN_DRV_SC
   can be inserted in and removed from the running kernel whenever you
   want, details in <file:Documentation/modules.txt>); the module will
   be called sc.o.  See <file:Documentation/isdn/README.sc> and
-  <http://www.spellcast.com> for more information.
+  <http://www.spellcast.com/> for more information.
 
 Eicon active card support
 CONFIG_ISDN_DRV_EICON
@@ -19319,7 +19421,7 @@ CONFIG_ISDN_DRV_TPAM
   This enables support for the Auvertech TurboPAM ISDN-card.
   For running this card, additional firmware is necessary, which has
   to be downloaded into the card using a utility which is distributed
-  separately from the Auvertech's web site: <http://www.auvertech.fr>.
+  separately from the Auvertech's web site: <http://www.auvertech.fr/>.
 
   Please redirect all support questions to support@auvertech.fr.
 
@@ -19514,7 +19616,7 @@ CONFIG_BLUEZ
   It was designed as a replacement for cables and other short-range
   technologies like IrDA.  Bluetooth operates in personal area range
   that typically extends up to 10 meters.  More information about
-  Bluetooth can be found at <http://www.bluetooth.com>.
+  Bluetooth can be found at <http://www.bluetooth.com/>.
 
   Linux Bluetooth subsystem consist of several layers:
                HCI Core (device and connection manager, scheduler)
@@ -19527,7 +19629,7 @@ CONFIG_BLUEZ
   To use Linux Bluetooth subsystem, you will need several user-space
   utilities like hciconfig and hcid.  These utilities and updates to
   Bluetooth kernel modules are provided in the BlueZ package.
-  For more information, see <http://bluez.sf.net>.
+  For more information, see <http://bluez.sourceforge.net/>.
 
   If you want to compile HCI Core as module (hci.o) say M here.
 
@@ -19569,62 +19671,6 @@ CONFIG_BLUEZ_HCIVHCI
 # The following options are for Linux when running on the Hitachi
 # SuperH family of RISC microprocessors.
 
-CPU Selection
-CONFIG_CPU_SUBTYPE_SH7707
-  This is the type of your Hitachi SuperH processor. This information is
-  used for optimizing and configuration purposes.
-
-  - "SH7707" for SH7707
-  - "SH7708" for SH7708, SH7708S, SH7708R
-  - "SH7709" for SH7707, SH7709, SH7709A, and SH7729.
-  - "SH7750" for SH7750, SH7750S
-  - "SH7751" for SH7751
-  - "ST40STB1" for ST40STB1
-
-Target machine selection
-CONFIG_SH_GENERIC
-  This is machine type of your target.
-
-  - "Generic" for Generic kernel which might support all of them
-  - "SolutionEngine" for Hitachi SolutionEngine (7709A, 7750, 7750S)
-  - "SolutionEngine7751" for Hitachi SolutionEngine (7751)
-  - "STB1_Harp" for STMicroelectronics HARP
-  - "STB1_Overdrive" for STMicroelectronics Overdrive
-  - "HP620" for HP 'Jornada' 620
-  - "HP680" for HP 'Jornada' 680
-  - "HP690" for HP 'Jornada' 690
-  - "CqREEK" for CQ Publishing CqREEK SH-4
-  - "DMIDA" for DMIDA, industrial data assistant
-  - "EC3104" for Compaq Aero 8000
-  - "Dreamcast" for SEGA Dreamcast
-  - "CAT68701" for CAT 68701 Evaluation Board (SH7708)
-  - "BigSur" for Big Sur Evaluation Board
-  - "SH2000" for SH2000 Evaluation Board (SH7709A)
-  - "ADX" for A&D ADX
-  - "BareCPU" for Bare CPU board such as CqREEK SH-3
-
-  If unsure, select "BareCPU".
-
-Physical memory start address
-CONFIG_MEMORY_START
-  Computers built with Hitachi SuperH processors always
-  map the ROM starting at address zero.  But the processor
-  does not specify the range that RAM takes.  RAM is usually
-  mapped starting at 0c000000, but it may be elsewhere.
-
-  You should set this value to the address of the lowest
-  RAM location.
-
-  A value of 0c000000 will work for most boards.
-
-Directly Connected Compact Flash support
-CONFIG_CF_ENABLER
-  If your board has "Directly Connected" CompactFlash at area 5 or 6, 
-  you may want to enable this option.  Then, you can use CF as
-  primary IDE drive (only tested for SanDisk).
-
-  If in doubt, press "n".
-
 SuperH RTC support
 CONFIG_SH_RTC
   Selecting this option will allow the Linux kernel to emulate
@@ -19639,38 +19685,7 @@ CONFIG_SH_DMA
 
   If unsure, say N.
 
-SuperH SCI (serial) support
-CONFIG_SH_SCI
-  Selecting this option will allow the Linux kernel to transfer
-  data over SCI (Serial Communication Interface) and/or SCIF
-  which are built into the Hitachi SuperH processor.
-
-  If unsure, say N.
-
-Use LinuxSH standard BIOS
-CONFIG_SH_STANDARD_BIOS
-  Say Y here if your target has the gdb-sh-stub package from
-  www.m17n.org (or any conforming standard LinuxSH BIOS) in FLASH
-  or EPROM.  The kernel will use standard BIOS calls during boot
-  for various housekeeping tasks.  Note this does not work with
-  WindowsCE machines.  If unsure, say N.
-
-Early printk support
-CONFIG_SH_EARLY_PRINTK
-  If you say Y here, the kernel printk routine will begin output to
-  the console much earlier in the boot process, before the serial
-  console is initialised, instead of buffering output.  Standard
-  LinuxSH BIOS calls are used for the output.  This helps when
-  debugging fatal problems early in the boot sequence.  This is only
-  useful for kernel hackers.  If unsure, say N.
-  
-National Semiconductor DP83902AV 'ST-NIC' support
-CONFIG_STNIC
-  If you have a network adaptor with National Semiconductor DP83902AV, 
-  say Y or M (for module).
-
-  If unsure, say N.
-
+# Choice: cf_area
 CompactFlash Connection Area
 CONFIG_CF_AREA5
   If your board has "Directly Connected" CompactFlash, You should
@@ -20472,7 +20487,7 @@ CONFIG_ALL_PPC
   <http://www.synergymicro.com/PressRel/97_10_15.html>.
 
   Select APUS if configuring for a PowerUP Amiga.  More information is
-  available at: <http://linux-apus.sourceforge.net>.
+  available at: <http://linux-apus.sourceforge.net/>.
 
 Synergy-Gemini
 CONFIG_GEMINI
@@ -20484,122 +20499,7 @@ Amiga-Apus
 CONFIG_APUS
   Select APUS if configuring for a PowerUP Amiga.
   More information is available at:
-  <http://linux-apus.sourceforge.net>.
-
-Embedded 8xx Board Type
-CONFIG_RPXLITE
-  RPX-Lite:
-    Embedded Planet RPX Lite
-
-  RPX-Classic:
-    Embedded Planet RPX Classic Low-fat.
-
-  BSE-IP: 
-    Bright Star Engineering ip-Engine.
-
-  TQM823L:
-  TQM850L:
-  TQM855L:
-  TQM860L:
-    MPC8xx based family of mini modules, half credit card size,
-    up to 64 MB of RAM, 8 MB Flash, (Fast) Ethernet, 2 x serial ports,
-    2 x CAN bus interface, ...
-      Manufacturer: TQ Components, www.tq-group.de
-      Date of Release: October (?) 1999
-      End of Life: not yet :-)
-      URL:
-      - module: http://www.denx.de/PDF/TQM8xxLHWM201.pdf
-      - starter kit: http://www.denx.de/PDF/STK8xxLHWM201.pdf
-      - images: http://www.denx.de/embedded-ppc-en.html
-
-  FPS850L:
-    FingerPrint Sensor System (based on TQM850L)
-      Manufacturer: IKENDI AG, http://www.ikendi.com/
-      Date of Release: November 1999
-      End of life: end 2000 ?
-      URL: see TQM850L
-
-  SPD823TS:
-    MPC823 based board used in the "Tele Server" product
-    Manufacturer: Speech Design, http://www.speech-design.de/
-    Date of Release: Mid 2000 (?)
-    End of life: -
-    URL: http://www.speech-design.de/
-         select "English", then "Teleteam Solutions", then "TeleServer"
-
-  IVMS8:
-    MPC860 based board used in the "Integrated Voice Mail System",
-    Small Version (8 voice channels)
-    Manufacturer: Speech Design, http://www.speech-design.de/
-    Date of Release: December 2000 (?)
-    End of life: -
-    URL: http://www.speech-design.de/
-
-  IVML24:
-    MPC860 based board used in the "Integrated Voice Mail System", 
-    Large Version (24 voice channels)
-    Manufacturer: Speech Design, http://www.speech-design.de/
-    Date of Release: March 2001  (?)
-    End of life: -
-    URL: http://www.speech-design.de/
-
-  SM850:
-    Service Module (based on TQM850L)
-    Manufacturer: Dependable Computer Systems, http://www.decomsys.com/
-    Date of Release: end 2000 (?)
-    End of life: mid 2001 (?)
-    URL: http://www.tz-mikroelektronik.de/ServiceModule/index.html
-
-  HERMES:
-    Hermes-Pro ISDN/LAN router with integrated 8 x hub
-    Manufacturer: Multidata Gesellschaft für Datentechnik und Informatik
-      http://www.multidata.de/
-    Date of Release: 2000 (?)
-    End of life: -
-    URL: http://www.multidata.de/english/products/hpro.htm
-
-  IP860:       
-    VMEBus IP (Industry Pack) carrier board with MPC860
-    Manufacturer: MicroSys GmbH, http://www.microsys.de/
-    Date of Release: ?
-    End of life: -
-    URL: http://www.microsys.de/html/ip860.html
-
-  PCU_E:
-    PCU = Peripheral Controller Unit, Extended
-    Manufacturer: Siemens AG, ICN (Information and Communication Networks)
-       http://www.siemens.de/page/1,3771,224315-1-999_2_226207-0,00.html
-    Date of Release: April 2001
-    End of life: August 2001
-    URL: n. a.
-
-Embedded 82xx Board Type
-CONFIG_EST8260
-  EST8260: Wind River System, Inc. EST SBC8260
-
-  TQM8260:
-    MPC8260 based module, little larger than credit card,
-    up to 128 MB global + 64 MB local RAM, 32 MB Flash,
-    32 kB EEPROM, 256 kB L@ Cache, 10baseT + 100baseT Ethernet,
-    2 x serial ports, ...
-      Manufacturer: TQ Components, www.tq-group.de
-      Date of Release: June 2001
-      End of Life: not yet :-)
-      URL: http://www.denx.de/PDF/TQM82xx_SPEC_Rev005.pdf
-
-  PM826:
-    Modular system with MPC8260 CPU
-    Manufacturer: MicroSys GmbH, http://www.microsys.de/
-    Date of Release: mid 2001
-    End of life: -
-    URL: http://www.microsys.de/html/pm826.html
-
-  CU824:
-    VMEBus Board with PCI extension with MPC8240 CPU
-    Manufacturer: MicroSys GmbH, http://www.microsys.de/
-    Date of Release: early 2001 (?)
-    End of life: -
-    URL: http://www.microsys.de/html/cu824.html
+  <http://linux-apus.sourceforge.net/>.
 
 AltiVec Kernel Support
 CONFIG_ALTIVEC
@@ -20673,26 +20573,97 @@ CONFIG_PMAC_BACKLIGHT
   change the screen brightness.
 
 # Choice: ppc8xxtype
-RPX-Lite
+Embedded 8xx Board Type
 CONFIG_RPXLITE
   Single-board computers based around the PowerPC MPC8xx chips and
   intended for embedded applications.  The following types are
   supported:
 
-    RPX-Lite    -- PC104 form-factor SBC based on the MPC823
-    RPX-Classic -- Credit-card-size SBC based on the MPC 860
-    BSE-IP      -- Bright Star Engineering BSE-IP SBC
-    TQM823L     -- TQM823L SBC from TQ Components
-    TQM850L     -- TQM850L SBC from TQ Components
-    TQM855L     -- TQM855L SBC from TQ Components
-    TQM860L     -- TQM860L SBC from TQ Components
-    FPS850L    -- FingerPrint Sensor from TQ Components
-    TQM860      -- TQM860 SBC from IKENDI AG
-    SPD823TS   -- Speech Design TeleServer from Speech Design
-    IVMS8      -- Integrated VoiceMail SBC from Speech Design
-    SM850       -- Service Module 850 from Dependable Computer Systems
-    MBX         -- MBX821 and MBX860 SBCs
-    Wincept     -- Wincept SBCs for thin-client machines
+  RPX-Lite:
+    Embedded Planet RPX Lite. PC104 form-factor SBC based on the MPC823.
+
+  RPX-Classic:
+    Embedded Planet RPX Classic Low-fat. Credit-card-size SBC based on 
+    the MPC 860
+
+  BSE-IP: 
+    Bright Star Engineering ip-Engine.
+
+  TQM823L:
+  TQM850L:
+  TQM855L:
+  TQM860L:
+    MPC8xx based family of mini modules, half credit card size,
+    up to 64 MB of RAM, 8 MB Flash, (Fast) Ethernet, 2 x serial ports,
+    2 x CAN bus interface, ...
+      Manufacturer: TQ Components, www.tq-group.de
+      Date of Release: October (?) 1999
+      End of Life: not yet :-)
+      URL:
+      - module: <http://www.denx.de/PDF/TQM8xxLHWM201.pdf>
+      - starter kit: <http://www.denx.de/PDF/STK8xxLHWM201.pdf>
+      - images: <http://www.denx.de/embedded-ppc-en.html>
+
+  FPS850L:
+    FingerPrint Sensor System (based on TQM850L)
+      Manufacturer: IKENDI AG, <http://www.ikendi.com/>
+      Date of Release: November 1999
+      End of life: end 2000 ?
+      URL: see TQM850L
+
+  SPD823TS:
+    MPC823 based board used in the "Tele Server" product
+    Manufacturer: Speech Design, <http://www.speech-design.de/>
+    Date of Release: Mid 2000 (?)
+    End of life: -
+    URL: <http://www.speech-design.de/>
+         select "English", then "Teleteam Solutions", then "TeleServer"
+
+  IVMS8:
+    MPC860 based board used in the "Integrated Voice Mail System",
+    Small Version (8 voice channels)
+    Manufacturer: Speech Design, <http://www.speech-design.de/>
+    Date of Release: December 2000 (?)
+    End of life: -
+    URL: <http://www.speech-design.de/>
+
+  IVML24:
+    MPC860 based board used in the "Integrated Voice Mail System", 
+    Large Version (24 voice channels)
+    Manufacturer: Speech Design, <http://www.speech-design.de/>
+    Date of Release: March 2001  (?)
+    End of life: -
+    URL: <http://www.speech-design.de/>
+
+  SM850:
+    Service Module (based on TQM850L)
+    Manufacturer: Dependable Computer Systems, <http://www.decomsys.com/>
+    Date of Release: end 2000 (?)
+    End of life: mid 2001 (?)
+    URL: <http://www.tz-mikroelektronik.de/ServiceModule/index.html>
+
+  HERMES:
+    Hermes-Pro ISDN/LAN router with integrated 8 x hub
+    Manufacturer: Multidata Gesellschaft für Datentechnik und Informatik
+      <http://www.multidata.de/>
+    Date of Release: 2000 (?)
+    End of life: -
+    URL: <http://www.multidata.de/english/products/hpro.htm>
+
+  IP860:       
+    VMEBus IP (Industry Pack) carrier board with MPC860
+    Manufacturer: MicroSys GmbH, <http://www.microsys.de/>
+    Date of Release: ?
+    End of life: -
+    URL: <http://www.microsys.de/html/ip860.html>
+
+  PCU_E:
+    PCU = Peripheral Controller Unit, Extended
+    Manufacturer: Siemens AG, ICN (Information and Communication Networks)
+       <http://www.siemens.de/page/1,3771,224315-1-999_2_226207-0,00.html>
+    Date of Release: April 2001
+    End of life: August 2001
+    URL: n. a.
 
 RPX-Classic
 CONFIG_RPXCLASSIC
@@ -20820,7 +20791,7 @@ CONFIG_WINCEPT
 #         Manufacturer: MicroSys GmbH, <http://www.microsys.de/>
 #         Date of Release: early 2001 (?)
 #         End of life: -
-#         URL: <http://www.microsys.de/html/cu824.html
+#         URL: <http://www.microsys.de/html/cu824.html>
 #
 # PM826:
 #         Modular system with MPC8260 CPU
@@ -20839,13 +20810,39 @@ CONFIG_WINCEPT
 #         End of life: -
 #         URL: n. a.o
 
-Support for EST8260
+# Choice: ppc82xxtype
+Embedded 82xx Board Type
 CONFIG_EST8260
-  The EST8260 is a single-board computer manufactured by Wind River
-  Systems, Inc. (formerly Embedded Support Tools Corp.) and based on
-  the MPC8260.  Wind River Systems has a website at
-  <http://www.windriver.com/>, but the EST8260 cannot be found on it
-  and has probably been discontinued or rebadged.
+  EST8260:
+    The EST8260 is a single-board computer manufactured by Wind River
+    Systems, Inc. (formerly Embedded Support Tools Corp.) and based on
+    the MPC8260.  Wind River Systems has a website at
+    <http://www.windriver.com/>, but the EST8260 cannot be found on it
+    and has probably been discontinued or rebadged.
+
+  TQM8260:
+    MPC8260 based module, little larger than credit card,
+    up to 128 MB global + 64 MB local RAM, 32 MB Flash,
+    32 kB EEPROM, 256 kB L@ Cache, 10baseT + 100baseT Ethernet,
+    2 x serial ports, ...
+      Manufacturer: TQ Components, www.tq-group.de
+      Date of Release: June 2001
+      End of Life: not yet :-)
+      URL: <http://www.denx.de/PDF/TQM82xx_SPEC_Rev005.pdf>
+
+  PM826:
+    Modular system with MPC8260 CPU
+    Manufacturer: MicroSys GmbH, <http://www.microsys.de/>
+    Date of Release: mid 2001
+    End of life: -
+    URL: <http://www.microsys.de/html/pm826.html>
+
+  CU824:
+    VMEBus Board with PCI extension with MPC8240 CPU
+    Manufacturer: MicroSys GmbH, http://www.microsys.de/
+    Date of Release: early 2001 (?)
+    End of life: -
+    URL: <http://www.microsys.de/html/cu824.html>
 
 ADB raw keycode support
 CONFIG_MAC_ADBKEYCODES
@@ -20859,6 +20856,13 @@ CONFIG_MAC_ADBKEYCODES
 
   If unsure, say Y here.
 
+I2C/SPI Microcode Patch
+UCODE_PATCH
+  Motorola releases microcode updates for their 8xx CPM modules.  The
+  microcode update file has updates for IIC, SMC and USB.  Currently only
+  the USB update is available by default, if the MPC8xx USB option is
+  enabled.  If in doubt, say 'N' here.
+
 Mouse button 2+3 emulation support
 CONFIG_MAC_EMUMOUSEBTN
   This provides generic support for emulating the 2nd and 3rd mouse
@@ -21002,7 +21006,7 @@ CONFIG_VIDEO_DEV
   Support for audio/video capture and overlay devices and FM radio
   cards. The exact capabilities of each device vary. User tools for
   this are available from
-  <ftp://ftp.uk.linux.org/pub/linux/video4linux>.
+  <ftp://ftp.uk.linux.org/pub/linux/video4linux/>.
 
   If you are interested in writing a driver for such an audio/video
   device or user software interacting with such a driver, please read
@@ -21388,7 +21392,7 @@ CONFIG_VIDEO_ZORAN
   Miro DC10 and DC30 video capture cards).
 
 Include support for Iomega Buz
-CONFIG_VIDEO_BUZ
+CONFIG_VIDEO_ZORAN_BUZ
   Say Y here to include support for the Iomega Buz video card.  There
   is a Buz/Linux homepage at <http://www.lysator.liu.se/~gz/buz/>.
 
@@ -21441,8 +21445,8 @@ CONFIG_VIDEO_W9966
   otherwise say N.
   This driver is also available as a module (w9966.o).
 
-  Check out <file:Documentation/video4linux/w9966.txt> and
-  <file:Documentation/video4linux/w9966.c> for more information.
+  Check out <file:Documentation/video4linux/w9966.txt> for more
+  information.
 
 CPiA Video For Linux
 CONFIG_VIDEO_CPIA
@@ -21566,25 +21570,23 @@ CONFIG_IPLABLE
   CONFIG_IPLABE.
 
 Support for 3215 line mode terminal
-CONFIG_3215
-  Include support for IBM 3215 line-mode terminals.  Can't be used
-  if 3270 console support is chosen.
+CONFIG_TN3215
+  Include support for IBM 3215 line-mode terminals.
 
 Support for console on 3215 line mode terminal
-CONFIG_3215_CONSOLE
-  Include support for using an IBM 3215 line-mode terminal as the
-  Linux system console.  Can't be used if 3270 console support is
-  chosen.
+CONFIG_TN3215_CONSOLE
+  Include support for using an IBM 3215 line-mode terminal as a
+  Linux system console.
 
 Support for 3270 line mode terminal
-CONFIG_3270
+CONFIG_TN3270
   Include support for IBM 3270 line-mode terminals.
 
 Support for console on 3270 line mode terminal
-CONFIG_3270_CONSOLE
-  Include support for using an IBM 3270 line-mode terminal as the
-  Linux system console.  Excludes using 3215s.  Available only if 3270
-  support is compiled in statically.
+CONFIG_TN3270_CONSOLE
+  Include support for using an IBM 3270 line-mode terminal as a Linux
+  system console.  Available only if 3270 support is compiled in
+  statically.
 
 Support for HWC line mode terminal
 CONFIG_HWC
@@ -21835,7 +21837,7 @@ CONFIG_ARCH_PERSONAL_SERVER
   There are no product plans beyond the current research
   prototypes at this time.  Information is available at:
 
-  <http://crl.research.compaq.com/projects/personalserver>
+  <http://crl.research.compaq.com/projects/personalserver/>
 
   If you have any questions or comments about the  Compaq Personal
   Server, send e-mail to skiff@crl.dec.com.
@@ -21886,6 +21888,12 @@ CONFIG_SA1100_CERF
   Say Y if configuring for an Intrinsyc CerfBoard.
   Say N otherwise.
 
+FlexaNet
+CONFIG_SA1100_FLEXANET
+  Say Y here if you intend to run this kernel on the FlexaNet
+  handheld instruments. Information about this machine can be
+  found at: <http://www.flexanet.com/>.
+
 nanoEngine
 CONFIG_SA1100_NANOENGINE
   The nanoEngine is a StrongARM 1110-based single board computer
@@ -23530,7 +23538,7 @@ CONFIG_IA32_SUPPORT
   this.  If in doubt, say Y.
 
 /proc/efi/vars support
-CONFIG_IA64_EFIVARS
+CONFIG_EFI_VARS
   If you say Y here, you are able to get EFI (Extensible Firmware
   Interface) variable information in /proc/efi/vars.  You may read,
   write, create, and destroy EFI variables through this interface.
@@ -23687,7 +23695,7 @@ CONFIG_SH_GENERIC
   each of the machines below is described by a machine vector.
 
   Select SolutionEngine if configuring for a Hitachi SH7709
-  or SH7750 evalutation board.
+  or SH7750/7750S evalutation board.
 
   Select Overdrive if configuring for a ST407750 Overdrive board.
   More information at
@@ -23695,34 +23703,43 @@ CONFIG_SH_GENERIC
 
   Select HP620 if configuring for a HP Jornada HP620.
   More information (hardware only) at
-  <http://www.hp.com/jornada>.
+  <http://www.hp.com/jornada/>.
 
   Select HP680 if configuring for a HP Jornada HP680.
   More information (hardware only) at
-  <http://www.hp.com/jornada/products/680>.
+  <http://www.hp.com/jornada/products/680/>.
 
   Select HP690 if configuring for a HP Jornada HP690.
   More information (hardware only) at
-  <http://www.hp.com/jornada/products/680>.
+  <http://www.hp.com/jornada/products/680/>.
 
   Select CqREEK if configuring for a CqREEK SH7708 or SH7750.
   More information at
   <http://sources.redhat.com/ecos/hardware.html#SuperH>.
 
   Select DMIDA if configuring for a DataMyte 4000 Industrial
-  Digital Assistant. More information at <http://www.dmida.com>.
+  Digital Assistant. More information at <http://www.dmida.com/>.
 
   Select EC3104 if configuring for a system with an Eclipse
-  International EC3104 chip, e.g. the Harris AD2000.
+  International EC3104 chip, e.g. the Harris AD2000 or Compaq Aero 8000.
 
   Select Dreamcast if configuring for a SEGA Dreamcast.
   More information at
-  <http://www.m17n.org/linux-sh/dreamcast>.  There is a
+  <http://www.m17n.org/linux-sh/dreamcast/>.  There is a
   Dreamcast project is at <http://linuxdc.sourceforge.net/>.
 
   Select BareCPU if you know what this means, and it applies
   to your system.
 
+# These may have to be merged in when we go to CML2:
+#  - "SolutionEngine7751" for Hitachi SolutionEngine (7751)
+#  - "STB1_Harp" for STMicroelectronics HARP
+#  - "CqREEK" for CQ Publishing CqREEK SH-4
+#  - "CAT68701" for CAT 68701 Evaluation Board (SH7708)
+#  - "BigSur" for Big Sur Evaluation Board
+#  - "SH2000" for SH2000 Evaluation Board (SH7709A)
+#  - "ADX" for A&D ADX
+
 SolutionEngine
 CONFIG_SH_SOLUTION_ENGINE
   Select SolutionEngine if configuring for a Hitachi SH7709
@@ -23743,19 +23760,19 @@ HP620
 CONFIG_SH_HP620
   Select HP620 if configuring for a HP jornada HP620.
   More information (hardware only) at
-  <http://www.hp.com/jornada>.
+  <http://www.hp.com/jornada/>.
 
 HP680
 CONFIG_SH_HP680
   Select HP680 if configuring for a HP Jornada HP680.
   More information (hardware only) at
-  <http://www.hp.com/jornada/products/680>.
+  <http://www.hp.com/jornada/products/680/>.
 
 HP690
 CONFIG_SH_HP690
   Select HP690 if configuring for a HP Jornada HP690.
   More information (hardware only)
-  at <http://www.hp.com/jornada/products/680>.
+  at <http://www.hp.com/jornada/products/680/>.
 
 CqREEK
 CONFIG_SH_CQREEK
@@ -23766,7 +23783,7 @@ CONFIG_SH_CQREEK
 DMIDA
 CONFIG_SH_DMIDA
   Select DMIDA if configuring for a DataMyte 4000 Industrial
-  Digital Assistant. More information at <http://www.dmida.com>.
+  Digital Assistant. More information at <http://www.dmida.com/>.
 
 EC3104
 CONFIG_SH_EC3104
@@ -23777,7 +23794,7 @@ Dreamcast
 CONFIG_SH_DREAMCAST
   Select Dreamcast if configuring for a SEGA Dreamcast.
   More information at
-  <http://www.m17n.org/linux-sh/dreamcast>.  There is a
+  <http://www.m17n.org/linux-sh/dreamcast/>.  There is a
   Dreamcast project is at <http://linuxdc.sourceforge.net/>.
 
 BareCPU
@@ -23794,7 +23811,8 @@ CONFIG_SH_UNKNOWN
 # Choice: superhtype
 SH7707
 CONFIG_CPU_SUBTYPE_SH7707
-  Select the type of SuperH processor you have.
+  Select the type of SuperH processor you have. This information is
+  used for optimizing and configuration purposes.
 
   Select SH7707 if you have a  60 Mhz SH-3 HD6417707 CPU.
 
@@ -23805,6 +23823,10 @@ CONFIG_CPU_SUBTYPE_SH7707
 
   Select SH7750 if you have a 200 Mhz SH-4 HD6417750 CPU.
 
+  Select SH7751 if you have a SH7751
+
+  Select ST40STB1 if you have a ST40STB1
+
 SH7708
 CONFIG_CPU_SUBTYPE_SH7708
   Select SH7708 if you have a  60 Mhz SH-3 HD6417708S or
@@ -23820,7 +23842,11 @@ CONFIG_CPU_SUBTYPE_SH7750
 
 Physical memory start address
 CONFIG_MEMORY_START
-  The physical memory start address will be automatically
+  Computers built with Hitachi SuperH processors always
+  map the ROM starting at address zero.  But the processor
+  does not specify the range that RAM takes.  
+
+  The physical memory (RAM) start address will be automatically
   set to 08000000, unless you selected one of the following
   processor types: SolutionEngine, Overdrive, HP620, HP680, HP690,
   in which case the start address will be set to 0c000000.
@@ -23878,15 +23904,15 @@ CONFIG_HD64465_IOBASE
   The default setting of the HD64465 IO base address is 0xb0000000.
 
   Do not change this unless you know what you are doing.
-
+  
 Early printk support
 CONFIG_SH_EARLY_PRINTK
-  Say Y here to redirect kernel messages to the serial port
+  Say Y here to redirect kernel printk messages to the serial port
   used by the SH-IPL bootloader, starting very early in the boot
   process and ending when the kernel's serial console is initialised.
   This option is only useful porting the kernel to a new machine,
   when the kernel may crash or hang before the serial console is
-  initialised.
+  initialised. If unsure, say N.
 
 SuperH SCI (serial) support
 CONFIG_SH_SCI
@@ -23940,7 +23966,7 @@ CONFIG_GDB_CONSOLE
 #
 # This is used by Emacs' spell checker ispell.el:
 #
-# LocalWords:  CONFIG coprocessor DX Pentium SX lilo loadlin HOWTO ftp metalab
+# LocalWords:  CONFIG coprocessor DX Pentium SX lilo loadlin HOWTO ftp ibiblio
 # LocalWords:  unc edu docs emu README kB BLK DEV FD Thinkpad fd MFM RLL IDE gz
 # LocalWords:  cdrom diskless netboot nfs xzvf ATAPI MB ide pavia rubini pl pd
 # LocalWords:  HD CD-ROMs IDECD NEC MITSUMI filesystem XT XD PCI BIOS cezar ATEN
@@ -23986,7 +24012,7 @@ CONFIG_GDB_CONSOLE
 # LocalWords:  bsd comp SPARCstation le SunOS ie Gracilis PackeTwin PT pt LU FX
 # LocalWords:  FX TEAC CR LCS mS ramdisk IDETAPE cmd fperllo encis tcfs unisa
 # LocalWords:  Vertos Genoa Funai hsfs NCP NetWare tgz APM apm ioctls UltraLite
-# LocalWords:  TravelMate CDT LCD backlight VC RPC Mips AXP barlow cdrecord pg
+# LocalWords:  TravelMate CDT LCD backlight VC RPC Mips AXP barlow cdrtools pg
 # LocalWords:  PMAX MILO Alphas Multia Tseng linuxelf endian mipsel mips drv HT
 # LocalWords:  kerneld callouts AdvanSys advansys Admin WDT DataStor EP verden
 # LocalWords:  wdt hdb hdc bugfix SiS vlb Acculogic CSA DTC dtc Holtek ht QDI
index 9b394ce5e4757edd1a9f9888117adff17050fb61..a430010069eb32448982cebd5d50df0a3a771d4f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 5
 SUBLEVEL = 1
-EXTRAVERSION =-pre2
+EXTRAVERSION =-pre3
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
index a84e686673d1103e6f4c9140dfff23238fa7c34c..a83d387a4c67c5a9c4265673d6db4129d7c38841 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/init.h>
 #include <linux/irq.h>
 #include <linux/proc_fs.h>
+#include <linux/seq_file.h>
 
 #include <asm/system.h>
 #include <asm/io.h>
@@ -514,64 +515,63 @@ free_irq(unsigned int irq, void *dev_id)
 }
 
 int
-get_irq_list(char *buf)
+show_interrupts(struct seq_file *p, void *v)
 {
 #ifdef CONFIG_SMP
        int j;
 #endif
        int i;
        struct irqaction * action;
-       char *p = buf;
 
 #ifdef CONFIG_SMP
-       p += sprintf(p, "           ");
+       seq_puts(p, "           ");
        for (i = 0; i < smp_num_cpus; i++)
-               p += sprintf(p, "CPU%d       ", i);
+               seq_printf(p, "CPU%d       ", i);
 #ifdef DO_BROADCAST_INTS
        for (i = 0; i < smp_num_cpus; i++)
-               p += sprintf(p, "TRY%d       ", i);
+               seq_printf(p, "TRY%d       ", i);
 #endif
-       *p++ = '\n';
+       seq_putc(p, '\n');
 #endif
 
        for (i = 0; i < NR_IRQS; i++) {
                action = irq_desc[i].action;
                if (!action) 
                        continue;
-               p += sprintf(p, "%3d: ",i);
+               seq_printf(p, "%3d: ",i);
 #ifndef CONFIG_SMP
-               p += sprintf(p, "%10u ", kstat_irqs(i));
+               seq_printf(p, "%10u ", kstat_irqs(i));
 #else
                for (j = 0; j < smp_num_cpus; j++)
-                       p += sprintf(p, "%10u ",
+                       seq_printf(p, "%10u ",
                                     kstat.irqs[cpu_logical_map(j)][i]);
 #ifdef DO_BROADCAST_INTS
                for (j = 0; j < smp_num_cpus; j++)
-                       p += sprintf(p, "%10lu ",
+                       seq_printf(p, "%10lu ",
                                     irq_attempt(cpu_logical_map(j), i));
 #endif
 #endif
-               p += sprintf(p, " %14s", irq_desc[i].handler->typename);
-               p += sprintf(p, "  %c%s",
+               seq_printf(p, " %14s", irq_desc[i].handler->typename);
+               seq_printf(p, "  %c%s",
                             (action->flags & SA_INTERRUPT)?'+':' ',
                             action->name);
 
                for (action=action->next; action; action = action->next) {
-                       p += sprintf(p, ", %c%s",
+                       seq_printf(p, ", %c%s",
                                     (action->flags & SA_INTERRUPT)?'+':' ',
                                     action->name);
                }
-               *p++ = '\n';
+               seq_putc(p, '\n');
        }
 #if CONFIG_SMP
-       p += sprintf(p, "IPI: ");
+       seq_puts(p, "IPI: ");
        for (j = 0; j < smp_num_cpus; j++)
-               p += sprintf(p, "%10lu ",
+               seq_printf(p, "%10lu ",
                             cpu_data[cpu_logical_map(j)].ipi_count);
-       p += sprintf(p, "\n");
+       seq_putc(p, '\n');
 #endif
-       p += sprintf(p, "ERR: %10lu\n", irq_err_count);
-       return p - buf;
+       seq_printf(p, "ERR: %10lu\n", irq_err_count);
+       return 0;
 }
 
 
index e82fafb6a56e9995e5326437710b7a1327161367..e0ce969eac49b612f52029e0276e5b25285ebd43 100644 (file)
@@ -40,6 +40,7 @@
 #include <linux/mm.h>
 #include <linux/mman.h>
 #include <linux/init.h>
+#include <linux/seq_file.h>
 
 #include <asm/fiq.h>
 #include <asm/io.h>
@@ -92,15 +93,12 @@ static struct fiq_handler default_owner = {
 
 static struct fiq_handler *current_fiq = &default_owner;
 
-int get_fiq_list(char *buf)
+int show_fiq_list(struct seq_file *p, void *v)
 {
-       char *p = buf;
-
        if (current_fiq != &default_owner)
-               p += sprintf(p, "FIQ:              %s\n",
-                            current_fiq->name);
+               seq_printf(p, "FIQ:              %s\n", current_fiq->name);
 
-       return p - buf;
+       return 0;
 }
 
 void set_fiq_handler(void *start, unsigned int length)
index 168470eb42c32bde46b2e0e405aff043eb0c3b6b..60049c59d6a875ae2e65d971cc66a3a6b4c9ad6a 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/random.h>
 #include <linux/smp.h>
 #include <linux/init.h>
+#include <linux/seq_file.h>
 
 #include <asm/irq.h>
 #include <asm/system.h>
@@ -95,29 +96,28 @@ void enable_irq(unsigned int irq)
        spin_unlock_irqrestore(&irq_controller_lock, flags);
 }
 
-int get_irq_list(char *buf)
+int show_interrupts(struct seq_file *p, void *v)
 {
        int i;
        struct irqaction * action;
-       char *p = buf;
 
        for (i = 0 ; i < NR_IRQS ; i++) {
                action = irq_desc[i].action;
                if (!action)
                        continue;
-               p += sprintf(p, "%3d: %10u ", i, kstat_irqs(i));
-               p += sprintf(p, "  %s", action->name);
+               seq_printf(p, "%3d: %10u ", i, kstat_irqs(i));
+               seq_printf(p, "  %s", action->name);
                for (action = action->next; action; action = action->next) {
-                       p += sprintf(p, ", %s", action->name);
+                       seq_printf(p, ", %s", action->name);
                }
-               *p++ = '\n';
+               seq_putc(p, '\n');
        }
 
 #ifdef CONFIG_ARCH_ACORN
-       p += get_fiq_list(p);
+       show_fiq_list(p);
 #endif
-       p += sprintf(p, "Err: %10lu\n", irq_err_count);
-       return p - buf;
+       seq_printf(p, "Err: %10lu\n", irq_err_count);
+       return 0;
 }
 
 /*
index a66a11510cd3e8dd45ff1148b80d838d86b4a8ec..9dd53469b7dfb246beeebc2881c6d34134950618 100644 (file)
@@ -33,6 +33,7 @@
 #include <linux/slab.h>
 #include <linux/random.h>
 #include <linux/init.h>
+#include <linux/seq_file.h>
 
 #include <asm/system.h>
 #include <asm/io.h>
@@ -223,27 +224,27 @@ static struct irqaction *irq_action[NR_IRQS] = {
        NULL, NULL, NULL, NULL
 };
 
-int get_irq_list(char *buf)
+int show_interrupts(struct seq_file *p, void *v)
 {
-       int i, len = 0;
+       int i;
        struct irqaction * action;
 
        for (i = 0; i < NR_IRQS; i++) {
                action = irq_action[i];
                if (!action) 
                        continue;
-               len += sprintf(buf+len, "%2d: %10u %c %s",
+               seq_printf(p, "%2d: %10u %c %s",
                        i, kstat.irqs[0][i],
                        (action->flags & SA_INTERRUPT) ? '+' : ' ',
                        action->name);
                for (action = action->next; action; action = action->next) {
-                       len += sprintf(buf+len, ",%s %s",
+                       seq_printf(p, ",%s %s",
                                (action->flags & SA_INTERRUPT) ? " +" : "",
                                action->name);
                }
-               len += sprintf(buf+len, "\n");
+               seq_putc(p, '\n');
        }
-       return len;
+       return 0;
 }
 
 /* called by the assembler IRQ entry functions defined in irq.h
index 909c0b870ac9901c0399cde72f4f2ff055d82f6f..f72d7e55b921c8df3fea072eaaf55f6441e02317 100644 (file)
@@ -236,7 +236,7 @@ die:        jne     die                     # %es must be at 64kB boundary
 rp_read:
 #ifdef __BIG_KERNEL__                  # look in setup.S for bootsect_kludge
        bootsect_kludge = 0x220         # 0x200 + 0x20 which is the size of the
-       lcall   bootsect_kludge         # bootsector + bootsect_kludge offset
+       lcall   *bootsect_kludge        # bootsector + bootsect_kludge offset
 #else
        movw    %es, %ax
        subw    $SYSSEG, %ax
index 0907ea962d902f247bee5e9bd22e4d2bfdc79a5a..dc684159082fb7fea6f6b6db38c0a3a2e18fa8c9 100644 (file)
@@ -539,7 +539,7 @@ done_apm_bios:
        cmpw    $0, %cs:realmode_swtch
        jz      rmodeswtch_normal
 
-       lcall   %cs:realmode_swtch
+       lcall   *%cs:realmode_swtch
 
        jmp     rmodeswtch_end
 
index 3a929965304274dbc2140e2344d56f8dab536de3..72dd9aeda626c1189c90e4a00a9e43b90d5b6d02 100644 (file)
@@ -387,6 +387,7 @@ static int                  broken_psr;
 static DECLARE_WAIT_QUEUE_HEAD(apm_waitqueue);
 static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue);
 static struct apm_user *       user_list;
+static spinlock_t              user_list_lock;
 
 static char                    driver_version[] = "1.15";      /* no spaces */
 
@@ -526,7 +527,7 @@ static u8 apm_bios_call(u32 func, u32 ebx_in, u32 ecx_in,
        __asm__ __volatile__(APM_DO_ZERO_SEGS
                "pushl %%edi\n\t"
                "pushl %%ebp\n\t"
-               "lcall %%cs:" SYMBOL_NAME_STR(apm_bios_entry) "\n\t"
+               "lcall *%%cs:" SYMBOL_NAME_STR(apm_bios_entry) "\n\t"
                "setc %%al\n\t"
                "popl %%ebp\n\t"
                "popl %%edi\n\t"
@@ -573,7 +574,7 @@ static u8 apm_bios_call_simple(u32 func, u32 ebx_in, u32 ecx_in, u32 *eax)
                __asm__ __volatile__(APM_DO_ZERO_SEGS
                        "pushl %%edi\n\t"
                        "pushl %%ebp\n\t"
-                       "lcall %%cs:" SYMBOL_NAME_STR(apm_bios_entry) "\n\t"
+                       "lcall *%%cs:" SYMBOL_NAME_STR(apm_bios_entry) "\n\t"
                        "setc %%bl\n\t"
                        "popl %%ebp\n\t"
                        "popl %%edi\n\t"
@@ -1053,6 +1054,7 @@ static void queue_event(apm_event_t event, struct apm_user *sender)
 {
        struct apm_user *       as;
 
+       spin_lock( &user_list_lock );
        if (user_list == NULL)
                return;
        for (as = user_list; as != NULL; as = as->next) {
@@ -1083,6 +1085,7 @@ static void queue_event(apm_event_t event, struct apm_user *sender)
                        break;
                }
        }
+       spin_unlock( &user_list_lock );
        wake_up_interruptible(&apm_waitqueue);
 }
 
@@ -1179,10 +1182,12 @@ static int suspend(void)
        send_event(APM_NORMAL_RESUME);
        sti();
        queue_event(APM_NORMAL_RESUME, NULL);
+       spin_lock( &user_list_lock );
        for (as = user_list; as != NULL; as = as->next) {
                as->suspend_wait = 0;
                as->suspend_result = ((err == APM_SUCCESS) ? 0 : -EIO);
        }
+       spin_unlock( &user_list_lock );
        ignore_normal_resume = 1;
        wake_up_interruptible(&apm_suspend_waitqueue);
        return err;
@@ -1519,7 +1524,6 @@ static int do_release(struct inode * inode, struct file * filp)
        if (check_apm_user(as, "release"))
                return 0;
        filp->private_data = NULL;
-       lock_kernel();
        if (as->standbys_pending > 0) {
                standbys_pending -= as->standbys_pending;
                if (standbys_pending <= 0)
@@ -1530,6 +1534,7 @@ static int do_release(struct inode * inode, struct file * filp)
                if (suspends_pending <= 0)
                        (void) suspend();
        }
+       spin_lock( &user_list_lock );
        if (user_list == as)
                user_list = as->next;
        else {
@@ -1544,7 +1549,7 @@ static int do_release(struct inode * inode, struct file * filp)
                else
                        as1->next = as->next;
        }
-       unlock_kernel();
+       spin_unlock( &user_list_lock );
        kfree(as);
        return 0;
 }
@@ -1573,8 +1578,10 @@ static int do_open(struct inode * inode, struct file * filp)
        as->suser = capable(CAP_SYS_ADMIN);
        as->writer = (filp->f_mode & FMODE_WRITE) == FMODE_WRITE;
        as->reader = (filp->f_mode & FMODE_READ) == FMODE_READ;
+       spin_lock( &user_list_lock );
        as->next = user_list;
        user_list = as;
+       spin_unlock( &user_list_lock );
        filp->private_data = as;
        return 0;
 }
index fa17d0044d4afcc84532f742eae02404d83345f9..75637e655cbab77ccc0b4905b6af4f6b6a3b724f 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/kernel_stat.h>
 #include <linux/irq.h>
 #include <linux/proc_fs.h>
+#include <linux/seq_file.h>
 
 #include <asm/atomic.h>
 #include <asm/io.h>
@@ -131,58 +132,54 @@ atomic_t irq_mis_count;
  * Generic, controller-independent functions:
  */
 
-int get_irq_list(char *buf)
+int show_interrupts(struct seq_file *p, void *v)
 {
        int i, j;
        struct irqaction * action;
-       char *p = buf;
 
-       p += sprintf(p, "           ");
+       seq_printf(p, "           ");
        for (j=0; j<smp_num_cpus; j++)
-               p += sprintf(p, "CPU%d       ",j);
-       *p++ = '\n';
+               seq_printf(p, "CPU%d       ",j);
+       seq_putc(p, '\n');
 
        for (i = 0 ; i < NR_IRQS ; i++) {
                action = irq_desc[i].action;
                if (!action) 
                        continue;
-               p += sprintf(p, "%3d: ",i);
+               seq_printf(p, "%3d: ",i);
 #ifndef CONFIG_SMP
-               p += sprintf(p, "%10u ", kstat_irqs(i));
+               seq_printf(p, "%10u ", kstat_irqs(i));
 #else
                for (j = 0; j < smp_num_cpus; j++)
-                       p += sprintf(p, "%10u ",
+                       seq_printf(p, "%10u ",
                                kstat.irqs[cpu_logical_map(j)][i]);
 #endif
-               p += sprintf(p, " %14s", irq_desc[i].handler->typename);
-               p += sprintf(p, "  %s", action->name);
+               seq_printf(p, " %14s", irq_desc[i].handler->typename);
+               seq_printf(p, "  %s", action->name);
 
                for (action=action->next; action; action = action->next)
-                       p += sprintf(p, ", %s", action->name);
-               *p++ = '\n';
+                       seq_printf(p, ", %s", action->name);
+               seq_putc(p, '\n');
        }
-       p += sprintf(p, "NMI: ");
+       seq_printf(p, "NMI: ");
        for (j = 0; j < smp_num_cpus; j++)
-               p += sprintf(p, "%10u ",
-                       nmi_count(cpu_logical_map(j)));
-       p += sprintf(p, "\n");
+               seq_printf(p, "%10u ", nmi_count(cpu_logical_map(j)));
+       seq_putc(p, '\n');
 #if CONFIG_X86_LOCAL_APIC
-       p += sprintf(p, "LOC: ");
+       seq_printf(p, "LOC: ");
        for (j = 0; j < smp_num_cpus; j++)
-               p += sprintf(p, "%10u ",
-                       apic_timer_irqs[cpu_logical_map(j)]);
-       p += sprintf(p, "\n");
+               seq_printf(p, "%10u ", apic_timer_irqs[cpu_logical_map(j)]);
+       seq_putc(p, '\n');
 #endif
-       p += sprintf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
+       seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
 #ifdef CONFIG_X86_IO_APIC
 #ifdef APIC_MISMATCH_DEBUG
-       p += sprintf(p, "MIS: %10u\n", atomic_read(&irq_mis_count));
+       seq_printf(p, "MIS: %10u\n", atomic_read(&irq_mis_count));
 #endif
 #endif
-       return p - buf;
+       return 0;
 }
 
-
 /*
  * Global interrupt locks for SMP. Allow interrupts to come in on any
  * CPU, yet make cli/sti act globally to protect critical regions..
index fc62483243211413f941db759b3fe33f778258b3..0a85edcc9d4668f82988b2c77a95d5d2fa8f34c2 100644 (file)
@@ -1788,7 +1788,6 @@ static int mtrr_close (struct inode *ino, struct file *file)
     unsigned int *fcount = file->private_data;
 
     if (fcount == NULL) return 0;
-    lock_kernel();
     max = get_num_var_ranges ();
     for (i = 0; i < max; ++i)
     {
@@ -1798,7 +1797,6 @@ static int mtrr_close (struct inode *ino, struct file *file)
            --fcount[i];
        }
     }
-    unlock_kernel();
     kfree (fcount);
     file->private_data = NULL;
     return 0;
index 364bf52bba39d11978adfbace4eecd4812bd8d8d..d22a0d0f1b8009dcbce8de3ba04a22383dfed207 100644 (file)
@@ -458,7 +458,7 @@ static unsigned long bios32_service(unsigned long service)
        unsigned long flags;
 
        __save_flags(flags); __cli();
-       __asm__("lcall (%%edi); cld"
+       __asm__("lcall *(%%edi); cld"
                : "=a" (return_code),
                  "=b" (address),
                  "=c" (length),
@@ -499,7 +499,7 @@ static int __devinit check_pcibios(void)
 
                __save_flags(flags); __cli();
                __asm__(
-                       "lcall (%%edi); cld\n\t"
+                       "lcall *(%%edi); cld\n\t"
                        "jc 1f\n\t"
                        "xor %%ah, %%ah\n"
                        "1:"
@@ -544,7 +544,7 @@ static int __devinit pci_bios_find_device (unsigned short vendor, unsigned short
        unsigned short bx;
        unsigned short ret;
 
-       __asm__("lcall (%%edi); cld\n\t"
+       __asm__("lcall *(%%edi); cld\n\t"
                "jc 1f\n\t"
                "xor %%ah, %%ah\n"
                "1:"
@@ -573,7 +573,7 @@ static int pci_bios_read (int seg, int bus, int dev, int fn, int reg, int len, u
 
        switch (len) {
        case 1:
-               __asm__("lcall (%%esi); cld\n\t"
+               __asm__("lcall *(%%esi); cld\n\t"
                        "jc 1f\n\t"
                        "xor %%ah, %%ah\n"
                        "1:"
@@ -585,7 +585,7 @@ static int pci_bios_read (int seg, int bus, int dev, int fn, int reg, int len, u
                          "S" (&pci_indirect));
                break;
        case 2:
-               __asm__("lcall (%%esi); cld\n\t"
+               __asm__("lcall *(%%esi); cld\n\t"
                        "jc 1f\n\t"
                        "xor %%ah, %%ah\n"
                        "1:"
@@ -597,7 +597,7 @@ static int pci_bios_read (int seg, int bus, int dev, int fn, int reg, int len, u
                          "S" (&pci_indirect));
                break;
        case 4:
-               __asm__("lcall (%%esi); cld\n\t"
+               __asm__("lcall *(%%esi); cld\n\t"
                        "jc 1f\n\t"
                        "xor %%ah, %%ah\n"
                        "1:"
@@ -628,7 +628,7 @@ static int pci_bios_write (int seg, int bus, int dev, int fn, int reg, int len,
 
        switch (len) {
        case 1:
-               __asm__("lcall (%%esi); cld\n\t"
+               __asm__("lcall *(%%esi); cld\n\t"
                        "jc 1f\n\t"
                        "xor %%ah, %%ah\n"
                        "1:"
@@ -640,7 +640,7 @@ static int pci_bios_write (int seg, int bus, int dev, int fn, int reg, int len,
                          "S" (&pci_indirect));
                break;
        case 2:
-               __asm__("lcall (%%esi); cld\n\t"
+               __asm__("lcall *(%%esi); cld\n\t"
                        "jc 1f\n\t"
                        "xor %%ah, %%ah\n"
                        "1:"
@@ -652,7 +652,7 @@ static int pci_bios_write (int seg, int bus, int dev, int fn, int reg, int len,
                          "S" (&pci_indirect));
                break;
        case 4:
-               __asm__("lcall (%%esi); cld\n\t"
+               __asm__("lcall *(%%esi); cld\n\t"
                        "jc 1f\n\t"
                        "xor %%ah, %%ah\n"
                        "1:"
@@ -875,7 +875,7 @@ struct irq_routing_table * __devinit pcibios_get_irq_routing_table(void)
        __asm__("push %%es\n\t"
                "push %%ds\n\t"
                "pop  %%es\n\t"
-               "lcall (%%esi); cld\n\t"
+               "lcall *(%%esi); cld\n\t"
                "pop %%es\n\t"
                "jc 1f\n\t"
                "xor %%ah, %%ah\n"
@@ -908,7 +908,7 @@ int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq)
 {
        int ret;
 
-       __asm__("lcall (%%esi); cld\n\t"
+       __asm__("lcall *(%%esi); cld\n\t"
                "jc 1f\n\t"
                "xor %%ah, %%ah\n"
                "1:"
index 32f1decef189f4de92158aa3bb7f2d449289cfca..5c8d8013fcd3854d6f6a914c4b48ad4fb7e06879 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/kernel_stat.h>
 #include <linux/irq.h>
 #include <linux/proc_fs.h>
+#include <linux/seq_file.h>
 
 #include <asm/atomic.h>
 #include <asm/io.h>
@@ -131,55 +132,54 @@ atomic_t irq_mis_count;
  * Generic, controller-independent functions:
  */
 
-int get_irq_list(char *buf)
+int show_interrupts(struct seq_file *p, void *v)
 {
        int i, j;
        struct irqaction * action;
        irq_desc_t *idesc;
-       char *p = buf;
 
-       p += sprintf(p, "           ");
+       seq_puts(p, "           ");
        for (j=0; j<smp_num_cpus; j++)
-               p += sprintf(p, "CPU%d       ",j);
-       *p++ = '\n';
+               seq_printf(p, "CPU%d       ",j);
+       seq_putc(p, '\n');
 
        for (i = 0 ; i < NR_IRQS ; i++) {
                idesc = irq_desc(i);
                action = idesc->action;
                if (!action)
                        continue;
-               p += sprintf(p, "%3d: ",i);
+               seq_printf(p, "%3d: ",i);
 #ifndef CONFIG_SMP
-               p += sprintf(p, "%10u ", kstat_irqs(i));
+               seq_printf(p, "%10u ", kstat_irqs(i));
 #else
                for (j = 0; j < smp_num_cpus; j++)
-                       p += sprintf(p, "%10u ",
+                       seq_printf(p, "%10u ",
                                kstat.irqs[cpu_logical_map(j)][i]);
 #endif
-               p += sprintf(p, " %14s", idesc->handler->typename);
-               p += sprintf(p, "  %s", action->name);
+               seq_printf(p, " %14s", idesc->handler->typename);
+               seq_printf(p, "  %s", action->name);
 
                for (action=action->next; action; action = action->next)
-                       p += sprintf(p, ", %s", action->name);
-               *p++ = '\n';
+                       seq_printf(p, ", %s", action->name);
+               seq_putc('\n');
        }
-       p += sprintf(p, "NMI: ");
+       seq_puts(p, "NMI: ");
        for (j = 0; j < smp_num_cpus; j++)
-               p += sprintf(p, "%10u ",
+               seq_printf(p, "%10u ",
                        nmi_count(cpu_logical_map(j)));
-       p += sprintf(p, "\n");
+       seq_putc(p, '\n');
 #if defined(CONFIG_SMP) && defined(CONFIG_X86)
-       p += sprintf(p, "LOC: ");
+       seq_puts(p, "LOC: ");
        for (j = 0; j < smp_num_cpus; j++)
-               p += sprintf(p, "%10u ",
+               seq_printf(p, "%10u ",
                        apic_timer_irqs[cpu_logical_map(j)]);
-       p += sprintf(p, "\n");
+       seq_putc(p, '\n');
 #endif
-       p += sprintf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
+       seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
 #if defined(CONFIG_X86) && defined(CONFIG_X86_IO_APIC) && defined(APIC_MISMATCH_DEBUG)
-       p += sprintf(p, "MIS: %10u\n", atomic_read(&irq_mis_count));
+       seq_printf(p, "MIS: %10u\n", atomic_read(&irq_mis_count));
 #endif
-       return p - buf;
+       return 0;
 }
 
 
index 0902518f9bad9014eacbeb384f4e0658155be050..1a33eef68d8fc04e0d8e0e35f9a2c70eee27b08f 100644 (file)
@@ -40,6 +40,7 @@
 #include <linux/sched.h>
 #include <linux/kernel_stat.h>
 #include <linux/init.h>
+#include <linux/seq_file.h>
 
 #include <asm/system.h>
 #include <asm/irq.h>
@@ -53,7 +54,7 @@ extern int cia_request_irq(struct ciabase *base,int irq,
                            unsigned long flags, const char *devname, void *dev_id);
 extern void cia_free_irq(struct ciabase *base, unsigned int irq, void *dev_id);
 extern void cia_init_IRQ(struct ciabase *base);
-extern int cia_get_irq_list(struct ciabase *base, char *buf);
+extern int cia_get_irq_list(struct ciabase *base, struct seq_file *p);
 
 /* irq node variables for amiga interrupt sources */
 static irq_node_t *ami_irq_list[AMI_STD_IRQS];
@@ -468,28 +469,28 @@ void (*amiga_default_handler[SYS_IRQS])(int, void *, struct pt_regs *) = {
        ami_int4, ami_int5, ami_badint, ami_int7
 };
 
-int amiga_get_irq_list(char *buf)
+int show_amiga_interrupts(struct seq_file *p, void *v)
 {
-       int i, len = 0;
+       int i;
        irq_node_t *node;
 
        for (i = 0; i < AMI_STD_IRQS; i++) {
                if (!(node = ami_irq_list[i]))
                        continue;
-               len += sprintf(buf+len, "ami  %2d: %10u ", i,
+               seq_printf(p, "ami  %2d: %10u ", i,
                               kstat.irqs[0][SYS_IRQS + i]);
                do {
                        if (node->flags & SA_INTERRUPT)
-                               len += sprintf(buf+len, "F ");
+                               seq_puts(p, "F ");
                        else
-                               len += sprintf(buf+len, "  ");
-                       len += sprintf(buf+len, "%s\n", node->devname);
+                               seq_puts(p, "  ");
+                       seq_printf(p, "%s\n", node->devname);
                        if ((node = node->next))
-                               len += sprintf(buf+len, "                    ");
+                               seq_puts(p, "                    ");
                } while (node);
        }
 
-       len += cia_get_irq_list(&ciaa_base, buf+len);
-       len += cia_get_irq_list(&ciab_base, buf+len);
-       return len;
+       cia_get_irq_list(&ciaa_base, p);
+       cia_get_irq_list(&ciab_base, p);
+       return 0;
 }
index bf80ddb8aae6d85f333eed7a11161b291ca3b3db..68abf62871187c6af752357d4b75635a9fd91b83 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/errno.h>
 #include <linux/kernel_stat.h>
 #include <linux/init.h>
+#include <linux/seq_file.h>
 
 #include <asm/irq.h>
 #include <asm/amigahw.h>
@@ -158,16 +159,16 @@ void __init cia_init_IRQ(struct ciabase *base)
        custom.intena = IF_SETCLR | base->int_mask;
 }
 
-int cia_get_irq_list(struct ciabase *base, char *buf)
+int cia_get_irq_list(struct ciabase *base, struct seq_file *p)
 {
-       int i, j, len = 0;
+       int i, j;
 
        j = base->cia_irq;
        for (i = 0; i < CIA_IRQS; i++) {
-               len += sprintf(buf+len, "cia  %2d: %10d ", j + i,
+               seq_printf(p, "cia  %2d: %10d ", j + i,
                               kstat.irqs[0][SYS_IRQS + j + i]);
-                       len += sprintf(buf+len, "  ");
-               len += sprintf(buf+len, "%s\n", base->irq_list[i].devname);
+               seq_puts(p, "  ");
+               seq_printf(p, "%s\n", base->irq_list[i].devname);
        }
-       return len;
+       return 0;
 }
index 5d8c8eb100760b065684f562ce49d6581f3ac6e6..5dc8ca17bcc05d77d27a07202e87421be64dc30d 100644 (file)
@@ -86,7 +86,7 @@ extern void amiga_enable_irq (unsigned int);
 extern void amiga_disable_irq (unsigned int);
 static void amiga_get_model(char *model);
 static int amiga_get_hardware_list(char *buffer);
-extern int amiga_get_irq_list (char *);
+extern int show_amiga_interrupts (struct seq_file *, void *);
 /* amiga specific timer functions */
 static unsigned long amiga_gettimeoffset (void);
 static void a3000_gettod (int *, int *, int *, int *, int *, int *);
@@ -403,7 +403,7 @@ void __init config_amiga(void)
   disable_irq          = amiga_disable_irq;
   mach_get_model       = amiga_get_model;
   mach_get_hardware_list = amiga_get_hardware_list;
-  mach_get_irq_list    = amiga_get_irq_list;
+  mach_get_irq_list    = show_amiga_interrupts;
   mach_gettimeoffset   = amiga_gettimeoffset;
   if (AMIGAHW_PRESENT(A3000_CLK)){
     mach_gettod  = a3000_gettod;
index 5f3d7ef7cdf1a0db626f477fce475d6b64a9f837..189bea1e335f3a8887f9e9f8019302fed88e30a9 100644 (file)
@@ -31,7 +31,7 @@ extern int dn_request_irq(unsigned int irq, void (*handler)(int, void *, struct
 extern void dn_free_irq(unsigned int irq, void *dev_id);
 extern void dn_enable_irq(unsigned int);
 extern void dn_disable_irq(unsigned int);
-extern int dn_get_irq_list(char *);
+extern int show_dn_interrupts(struct seq_file *, void *);
 extern unsigned long dn_gettimeoffset(void);
 extern void dn_gettod(int *, int *, int *, int *, int *, int *);
 extern int dn_dummy_hwclk(int, struct hwclk_time *);
@@ -173,7 +173,7 @@ void config_apollo(void) {
        mach_free_irq        = dn_free_irq;
        enable_irq      = dn_enable_irq;
        disable_irq     = dn_disable_irq;
-       mach_get_irq_list    = dn_get_irq_list;
+       mach_get_irq_list    = show_dn_interrupts;
        mach_gettimeoffset   = dn_gettimeoffset;
        mach_gettod          = dn_gettod; /* */
        mach_max_dma_address = 0xffffffff;
index 0f5c012c31f704421436b13267f075bb2ca5385a..95097695d6ef683103c9d83f6dd8a0fe1155ab1a 100644 (file)
@@ -104,7 +104,7 @@ void dn_disable_irq(unsigned int irq) {
 
 }
 
-int dn_get_irq_list(char *buf) {
+int show_dn_interrupts(struct seq_file *p, void *v) {
 
   printk("dn get irq list\n");
 
index f92c45f60d2d66a19d2e9ecd2a9e13027bd4842e..4574d7de23f30a1f57a7896c024a350d1f531c2c 100644 (file)
@@ -40,6 +40,7 @@
 #include <linux/ptrace.h>
 #include <linux/kernel_stat.h>
 #include <linux/init.h>
+#include <linux/seq_file.h>
 
 #include <asm/system.h>
 #include <asm/traps.h>
@@ -609,37 +610,37 @@ void atari_unregister_vme_int(unsigned long irq)
 }
 
 
-int atari_get_irq_list(char *buf)
+int show_atari_interrupts(struct seq_file *p, void *v)
 {
-       int i, len = 0;
+       int i;
 
        for (i = 0; i < NUM_INT_SOURCES; ++i) {
                if (vectors[IRQ_SOURCE_TO_VECTOR(i)] == bad_interrupt)
                        continue;
                if (i < STMFP_SOURCE_BASE)
-                       len += sprintf(buf+len, "auto %2d: %10u ",
+                       seq_printf(p,, "auto %2d: %10u ",
                                       i, kstat.irqs[0][i]);
                else
-                       len += sprintf(buf+len, "vec $%02x: %10u ",
+                       seq_printf(p,, "vec $%02x: %10u ",
                                       IRQ_SOURCE_TO_VECTOR(i),
                                       kstat.irqs[0][i]);
 
                if (irq_handler[i].handler != atari_call_irq_list) {
-                       len += sprintf(buf+len, "%s\n", irq_param[i].devname);
+                       seq_printf(p,, "%s\n", irq_param[i].devname);
                }
                else {
                        irq_node_t *p;
                        for( p = (irq_node_t *)irq_handler[i].dev_id; p; p = p->next ) {
-                               len += sprintf(buf+len, "%s\n", p->devname);
+                               seq_printf(p,, "%s\n", p->devname);
                                if (p->next)
-                                       len += sprintf( buf+len, "                    " );
+                                       seq_puts(p,, "                    " );
                        }
                }
        }
        if (num_spurious)
-               len += sprintf(buf+len, "spurio.: %10u\n", num_spurious);
+               seq_printf(p, "spurio.: %10u\n", num_spurious);
        
-       return len;
+       return 0;
 }
 
 
index 70a32fb65108766291db9adf97cfee116865fdc6..b96532afc891f7289ef0b35486d72d3e465f03eb 100644 (file)
@@ -70,7 +70,7 @@ extern int atari_request_irq (unsigned int irq, void (*handler)(int, void *, str
 extern void atari_free_irq (unsigned int irq, void *dev_id);
 extern void atari_enable_irq (unsigned int);
 extern void atari_disable_irq (unsigned int);
-extern int atari_get_irq_list (char *buf);
+extern int show_atari_interrupts (struct seq_file *, void *);
 extern void atari_mksound( unsigned int count, unsigned int ticks );
 #ifdef CONFIG_HEARTBEAT
 static void atari_heartbeat( int on );
@@ -265,7 +265,7 @@ void __init config_atari(void)
     disable_irq          = atari_disable_irq;
     mach_get_model      = atari_get_model;
     mach_get_hardware_list = atari_get_hardware_list;
-    mach_get_irq_list   = atari_get_irq_list;
+    mach_get_irq_list   = show_atari_interrupts;
     mach_gettimeoffset   = atari_gettimeoffset;
     mach_reset           = atari_reset;
 #ifdef CONFIG_ATARI_FLOPPY
index df41b38d8b1317960112b055672a7cb00a4bc8c4..440114eb93792bd908c41120fd28ac49b52717d0 100644 (file)
@@ -61,13 +61,11 @@ static int release_joystick(struct inode *inode, struct file *file)
 {
     int minor = DEVICE_NR(inode->i_rdev);
 
-    lock_kernel();
     joystick[minor].active = 0;
     joystick[minor].ready = 0;
 
     if ((joystick[0].active == 0) && (joystick[1].active == 0))
        ikbd_joystick_disable();
-    unlock_kernel();
     return 0;
 }
 
index 04633375f144a4f8dd03768f3ef429b29d652a95..4f2038c3d8b4ee135488f9c1d8392dfc86132198 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
+#include <linux/seq_file.h>
 
 #include <asm/ptrace.h>
 #include <asm/system.h>
@@ -127,17 +128,17 @@ void bvme6000_process_int (unsigned long vec, struct pt_regs *fp)
        }
 }
 
-int bvme6000_get_irq_list (char *buf)
+int show_bvme6000_interrupts(struct seq_file *p, void *v)
 {
-       int i, len = 0;
+       int i;
 
        for (i = 0; i < 256; i++) {
                if (irq_tab[i].count)
-                       len += sprintf (buf+len, "Vec 0x%02x: %8d  %s\n",
+                       seq_printf(p, "Vec 0x%02x: %8d  %s\n",
                            i, irq_tab[i].count,
                            irq_tab[i].devname ? irq_tab[i].devname : "free");
        }
-       return len;
+       return 0;
 }
 
 
index 43b01370f0643d12e68cf8fbd8579dcc44007343..002c9a68458aee7595392f7879806d8be240cd55 100644 (file)
@@ -36,7 +36,7 @@
 extern void bvme6000_process_int (int level, struct pt_regs *regs);
 extern void bvme6000_init_IRQ (void);
 extern void bvme6000_free_irq (unsigned int, void *);
-extern int  bvme6000_get_irq_list (char *);
+extern int  show_bvme6000_interrupts(struct seq_file *, void *);
 extern void bvme6000_enable_irq (unsigned int);
 extern void bvme6000_disable_irq (unsigned int);
 static void bvme6000_get_model(char *model);
@@ -145,7 +145,7 @@ void __init config_bvme6000(void)
     mach_reset          = bvme6000_reset;
     mach_free_irq       = bvme6000_free_irq;
     mach_process_int    = bvme6000_process_int;
-    mach_get_irq_list   = bvme6000_get_irq_list;
+    mach_get_irq_list   = show_bvme6000_interrupts;
     mach_request_irq    = bvme6000_request_irq;
     enable_irq          = bvme6000_enable_irq;
     disable_irq          = bvme6000_disable_irq;
index d998d6ff9463d000a9f51fce4569330fe8adac58..6694c253ff82fc60b26a100e4afca9726466fdef 100644 (file)
@@ -25,7 +25,7 @@
 
 extern void hp300_reset(void);
 extern void (*hp300_default_handler[])(int, void *, struct pt_regs *);
-extern int hp300_get_irq_list(char *buf);
+extern int show_hp300_interrupts(struct seq_file *, void *);
 
 #ifdef CONFIG_VT
 extern int hp300_keyb_init(void);
@@ -70,7 +70,7 @@ void __init config_hp300(void)
   mach_request_irq     = hp300_request_irq;
   mach_free_irq        = hp300_free_irq;
   mach_get_model       = hp300_get_model;
-  mach_get_irq_list    = hp300_get_irq_list;
+  mach_get_irq_list    = show_hp300_interrupts;
   mach_gettimeoffset   = hp300_gettimeoffset;
   mach_default_handler = &hp300_default_handler;
 #if 0
index 497400575e06ad176b2adae7ff35f22fcf3e73d9..bc459adcbd997fe63110682854f4e001026bb45c 100644 (file)
@@ -148,7 +148,7 @@ void hp300_free_irq(unsigned int irq, void *dev_id)
        spin_unlock_irqrestore(&irqlist_lock, flags);
 }
 
-int hp300_get_irq_list(char *buf)
+int show_hp300_interrupts(struct seq_file *p, void *v)
 {
        return 0;
 }
index 240bb3c7cadcf37414a5dad43af3d70c52d8a7a7..b69407501038d29ddb371d0af1f9cc254728ccea 100644 (file)
@@ -242,22 +242,22 @@ asmlinkage void process_int(unsigned long vec, struct pt_regs *fp)
        }
 }
 
-int get_irq_list(char *buf)
+int show_interrupts(struct seq_file *p, void *v)
 {
-       int i, len = 0;
+       int i;
 
        /* autovector interrupts */
        if (mach_default_handler) {
                for (i = 0; i < SYS_IRQS; i++) {
-                       len += sprintf(buf+len, "auto %2d: %10u ", i,
+                       seq_printf(p, "auto %2d: %10u ", i,
                                       i ? kstat.irqs[0][i] : num_spurious);
-                               len += sprintf(buf+len, "  ");
-                       len += sprintf(buf+len, "%s\n", irq_list[i].devname);
+                       seq_puts(p, "  ");
+                       seq_printf(p, "%s\n", irq_list[i].devname);
                }
        }
 
-       len += mach_get_irq_list(buf+len);
-       return len;
+       mach_get_irq_list(p, v);
+       return 0;
 }
 
 void init_irq_proc(void)
index 9291702fc7d0a37d2d2d5c2e0945f303864964a6..86007efb1d2883d2464e35f24c5f568b65949dfe 100644 (file)
@@ -80,7 +80,7 @@ void (*mach_init_IRQ) (void) __initdata = NULL;
 void (*(*mach_default_handler)[]) (int, void *, struct pt_regs *) = NULL;
 void (*mach_get_model) (char *model) = NULL;
 int (*mach_get_hardware_list) (char *buffer) = NULL;
-int (*mach_get_irq_list) (char *) = NULL;
+int (*mach_get_irq_list) (struct seq_file *, void *) = NULL;
 void (*mach_process_int) (int, struct pt_regs *) = NULL;
 /* machine dependent timer functions */
 unsigned long (*mach_gettimeoffset) (void);
index 94fdb4d3415169057d68f1e0f7f1f98e2025f025..02b391dbb6537e325f602a57e37006f6e791fe81 100644 (file)
@@ -66,7 +66,7 @@ extern void mac_gettod (int *, int *, int *, int *, int *, int *);
 extern unsigned long mac_gettimeoffset (void);
 extern int mac_hwclk (int, struct hwclk_time *);
 extern int mac_set_clock_mmss (unsigned long);
-extern int mac_get_irq_list(char *);
+extern int show_mac_interrupts(struct seq_file *, void *);
 extern void iop_preinit(void);
 extern void iop_init(void);
 extern void via_init(void);
@@ -241,7 +241,7 @@ void __init config_mac(void)
        disable_irq          = mac_disable_irq;
        mach_get_model   = mac_get_model;
        mach_default_handler = &mac_handlers;
-       mach_get_irq_list    = mac_get_irq_list;
+       mach_get_irq_list    = show_mac_interrupts;
        mach_gettimeoffset   = mac_gettimeoffset;
        mach_gettod          = mac_gettod;
        mach_hwclk           = mac_hwclk;
index a5ca36475efee6623d4c32710793241a7a9fc159..630c0aaa561da2722c551580b51785290ff0bd9c 100644 (file)
 #include <linux/kernel_stat.h>
 #include <linux/interrupt.h> /* for intr_count */
 #include <linux/delay.h>
+#include <linux/seq_file.h>
 
 #include <asm/system.h>
 #include <asm/irq.h>
@@ -576,9 +577,9 @@ void mac_free_irq(unsigned int irq, void *dev_id)
  *               displayed for us as autovector irq 0.
  */
 
-int mac_get_irq_list (char *buf)
+int show_mac_interrupts(struct seq_file *p, void *v)
 {
-       int i, len = 0;
+       int i;
        irq_node_t *node;
        char *base;
 
@@ -618,25 +619,24 @@ int mac_get_irq_list (char *buf)
                        case 8: base = "bbn";
                                break;
                }
-               len += sprintf(buf+len, "%4s %2d: %10u ",
-                               base, i, kstat.irqs[0][i]);
+               seq_printf(p, "%4s %2d: %10u ", base, i, kstat.irqs[0][i]);
 
                do {
                        if (node->flags & IRQ_FLG_FAST) {
-                               len += sprintf(buf+len, "F ");
+                               seq_puts(p, "F ");
                        } else if (node->flags & IRQ_FLG_SLOW) {
-                               len += sprintf(buf+len, "S ");
+                               seq_puts(p, "S ");
                        } else {
-                               len += sprintf(buf+len, "  ");
+                               seq_puts(p, "  ");
                        }
-                       len += sprintf(buf+len, "%s\n", node->devname);
+                       seq_printf(p, "%s\n", node->devname);
                        if ((node = node->next)) {
-                               len += sprintf(buf+len, "                    ");
+                               seq_puts(p, "                    ");
                        }
                } while(node);
 
        }
-       return len;
+       return 0;
 }
 
 void mac_default_handler(int irq, void *dev_id, struct pt_regs *regs)
index 3121ad94fd5f7e1c4fb1b303347545a8b41f13d4..d58edccba3cd2bda614c433f2d182a863c596662 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
+#include <linux/seq_file.h>
 
 #include <asm/ptrace.h>
 #include <asm/system.h>
@@ -112,17 +113,17 @@ void mvme147_process_int (unsigned long vec, struct pt_regs *fp)
        }
 }
 
-int mvme147_get_irq_list (char *buf)
+int show_mvme147_interrupts (struct seq_file *p, void *v)
 {
-       int i, len = 0;
+       int i;
 
        for (i = 0; i < 256; i++) {
                if (irq_tab[i].count)
-                       len += sprintf (buf+len, "Vec 0x%02x: %8d  %s\n",
+                       seq_printf(p, "Vec 0x%02x: %8d  %s\n",
                            i, irq_tab[i].count,
                            irq_tab[i].devname ? irq_tab[i].devname : "free");
        }
-       return len;
+       return 0;
 }
 
 
index 7da8eeb6c3e08a429c7b45640c37cfba0177e3ad..4a85a6e1cd70f7fbab855779368e01ad234caf3b 100644 (file)
@@ -36,7 +36,7 @@
 extern void mvme147_process_int (int level, struct pt_regs *regs);
 extern void mvme147_init_IRQ (void);
 extern void mvme147_free_irq (unsigned int, void *);
-extern int  mvme147_get_irq_list (char *);
+extern int  show_mvme147_interrupts (struct seq_file *, void *);
 extern void mvme147_enable_irq (unsigned int);
 extern void mvme147_disable_irq (unsigned int);
 static void mvme147_get_model(char *model);
@@ -113,7 +113,7 @@ void __init config_mvme147(void)
        mach_reset              = mvme147_reset;
        mach_free_irq           = mvme147_free_irq;
        mach_process_int        = mvme147_process_int;
-       mach_get_irq_list       = mvme147_get_irq_list;
+       mach_get_irq_list       = show_mvme147_interrupts;
        mach_request_irq        = mvme147_request_irq;
        enable_irq              = mvme147_enable_irq;
        disable_irq             = mvme147_disable_irq;
index 9cc0d39d1f11448a4913ce6f513a35f50f69167b..198d01a684e43d1a086adaaf814151facd84a3aa 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
+#include <linux/seq_file.h>
 
 #include <asm/system.h>
 #include <asm/ptrace.h>
@@ -114,17 +115,17 @@ void mvme16x_process_int (unsigned long vec, struct pt_regs *fp)
        }
 }
 
-int mvme16x_get_irq_list (char *buf)
+int show_mvme16x_interrupts (struct seq_file *p, void *v)
 {
-       int i, len = 0;
+       int i;
 
        for (i = 0; i < 192; i++) {
                if (irq_tab[i].count)
-                       len += sprintf (buf+len, "Vec 0x%02x: %8d  %s\n",
+                       seq_printf(p, "Vec 0x%02x: %8d  %s\n",
                            i+64, irq_tab[i].count,
                            irq_tab[i].devname ? irq_tab[i].devname : "free");
        }
-       return len;
+       return 0;
 }
 
 
index 83190d62f7106d4e4ca51df36284205a480475be..70fa43ac8702c9a3299f147c46285df8e781b8b5 100644 (file)
@@ -40,7 +40,7 @@ static MK48T08ptr_t volatile rtc = (MK48T08ptr_t)MVME_RTC_BASE;
 extern void mvme16x_process_int (int level, struct pt_regs *regs);
 extern void mvme16x_init_IRQ (void);
 extern void mvme16x_free_irq (unsigned int, void *);
-extern int  mvme16x_get_irq_list (char *);
+extern int show_mvme16x_interrupts (struct seq_file *, void *);
 extern void mvme16x_enable_irq (unsigned int);
 extern void mvme16x_disable_irq (unsigned int);
 static void mvme16x_get_model(char *model);
@@ -156,7 +156,7 @@ void __init config_mvme16x(void)
     mach_reset          = mvme16x_reset;
     mach_free_irq       = mvme16x_free_irq;
     mach_process_int    = mvme16x_process_int;
-    mach_get_irq_list   = mvme16x_get_irq_list;
+    mach_get_irq_list   = show_mvme16x_interrupts;
     mach_request_irq    = mvme16x_request_irq;
     enable_irq           = mvme16x_enable_irq;
     disable_irq          = mvme16x_disable_irq;
index fd683ff1ed6bfd522262b688977a7049f10e85aa..c80b402e7cc965294600e1aeb9b2096d124c4267 100644 (file)
@@ -36,7 +36,7 @@
 static unsigned char days_in_mo[] =
 {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
 
-static char rtc_status = 0;
+static atomic_t rtc_ready = ATOMIC_INIT(1);
 
 static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
                     unsigned long arg)
@@ -130,18 +130,18 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
 
 static int rtc_open(struct inode *inode, struct file *file)
 {
-       if(rtc_status)
+       if( !atomic_dec_and_test(&rtc_ready) )
+       {
+               atomic_inc( &rtc_ready );
                return -EBUSY;
+       }
 
-       rtc_status = 1;
        return 0;
 }
 
 static int rtc_release(struct inode *inode, struct file *file)
 {
-       lock_kernel();
-       rtc_status = 0;
-       unlock_kernel();
+       atomic_inc( &rtc_ready );
        return 0;
 }
 
index e35bcf62e80f4f08b92323b2ce48923b66a7b310..23690901ce9b4866d27ac2f144085d8f7704b409 100644 (file)
@@ -45,7 +45,7 @@ extern void q40_process_int (int level, struct pt_regs *regs);
 extern void (*q40_sys_default_handler[]) (int, void *, struct pt_regs *);  /* added just for debugging */
 extern void q40_init_IRQ (void);
 extern void q40_free_irq (unsigned int, void *);
-extern int  q40_get_irq_list (char *);
+extern int  show_q40_interrupts (struct seq_file *, void *);
 extern void q40_enable_irq (unsigned int);
 extern void q40_disable_irq (unsigned int);
 static void q40_get_model(char *model);
@@ -236,7 +236,7 @@ void __init config_q40(void)
     mach_reset          = q40_reset;
     mach_free_irq       = q40_free_irq; 
     mach_process_int    = q40_process_int;
-    mach_get_irq_list   = q40_get_irq_list;
+    mach_get_irq_list   = show_q40_interrupts;
     mach_request_irq    = q40_request_irq;
     enable_irq          = q40_enable_irq;
     disable_irq          = q40_disable_irq;
index 70d61c73cbf38f6e1d67dd31afbff78f3ebf9c7d..1fe6de7ddd9d43c9ef7abc37586e1f684f445d7d 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/sched.h>
+#include <linux/seq_file.h>
 
 #include <asm/rtc.h>
 #include <asm/ptrace.h>
@@ -431,21 +432,20 @@ void q40_irq2_handler (int vec, void *devname, struct pt_regs *fp)
          }
 }
 
-int q40_get_irq_list (char *buf)
+int show_q40_interrupts (struct seq_file *p, void *v)
 {
-       int i, len = 0;
+       int i;
 
-       for (i = 0; i <= Q40_IRQ_MAX; i++) 
-         {
+       for (i = 0; i <= Q40_IRQ_MAX; i++) {
                if (irq_tab[i].count)
-             len += sprintf (buf+len, "%sIRQ %02d: %8d  %s%s\n",
+                     seq_printf(p, "%sIRQ %02d: %8d  %s%s\n",
                              (i<=15) ? "ISA-" : "    " ,               
                            i, irq_tab[i].count,
                            irq_tab[i].devname[0] ? irq_tab[i].devname : "?",
                            irq_tab[i].handler == q40_defhand ? 
                                        " (now unassigned)" : "");
        }
-       return len;
+       return 0;
 }
 
 
index d57719a1b0f1848063116e4e871e37d1f439831b..7835991e0a11b834707a0c8ada30dd0931a732a8 100644 (file)
@@ -36,7 +36,7 @@ extern char _text, _end;
 char sun3_reserved_pmeg[SUN3_PMEGS_NUM];
 
 extern unsigned long sun3_gettimeoffset(void);
-extern int sun3_get_irq_list (char *);
+extern int show_sun3_interrupts (char *);
 extern void sun3_sched_init(void (*handler)(int, void *, struct pt_regs *));
 extern void sun3_get_model (char* model);
 extern void idprom_init (void);
@@ -145,7 +145,7 @@ void __init config_sun3(void)
        enable_irq           =  sun3_enable_irq;
         disable_irq         =  sun3_disable_irq;
        mach_process_int     =  sun3_process_int;
-        mach_get_irq_list    =  sun3_get_irq_list;
+        mach_get_irq_list    =  show_sun3_interrupts;
         mach_gettod          =  sun3_gettod;   
         mach_reset           =  sun3_reboot;
        mach_gettimeoffset   =  sun3_gettimeoffset;
index 5a41e6174a5e30b361e5d30c19f7108f333dfa61..f4270ca8589ec51ece542dd805bfc01bc6fb085d 100644 (file)
@@ -15,6 +15,7 @@
 #include <asm/intersil.h>
 #include <asm/oplib.h>
 #include <asm/sun3ints.h>
+#include <linux/seq_file.h>
 
 extern void sun3_leds (unsigned char);
 
@@ -62,7 +63,7 @@ inline void sun3_do_irq(int irq, struct pt_regs *fp)
        *sun3_intreg |=  (1<<irq);
 }
 
-int sun3_get_irq_list(char *buf)
+int show_sun3_interrupts(struct seq_file *p, void *v)
 {
        return 0;
 }
index fcdf794292d1542365c8d1811fd6ac7dade9ceda..0e5fc55f9621838032cb0e47e764a2a8109f6892 100644 (file)
@@ -58,7 +58,7 @@ void __init config_sun3x(void)
 
        sun3x_prom_init();
 
-       mach_get_irq_list        = sun3_get_irq_list;
+       mach_get_irq_list        = show_sun3_interrupts;
        mach_max_dma_address = 0xffffffff; /* we can DMA anywhere, whee */
 
        mach_keyb_init       = sun3x_keyb_init;
index 3cac916471ef23bc8b4a46d926a7b12b21384c86..d346ec8714efb7bcbaff21398d2b2a553dab897d 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/slab.h>
 #include <linux/random.h>
 #include <linux/delay.h>
+#include <linux/seq_file.h>
 
 #include <asm/bitops.h>
 #include <asm/bootinfo.h>
@@ -141,27 +142,27 @@ void enable_irq(unsigned int irq_nr)
  */
 static struct irqaction *irq_action[BAGET_IRQ_NR] = { NULL, };
 
-int get_irq_list(char *buf)
+int show_interrupts(struct seq_file *p, void *v)
 {
-       int i, len = 0;
+       int i;
        struct irqaction * action;
 
        for (i = 0 ; i < BAGET_IRQ_NR ; i++) {
                action = irq_action[i];
                if (!action) 
                        continue;
-               len += sprintf(buf+len, "%2d: %8d %c %s",
+               seq_printf(p, "%2d: %8d %c %s",
                        i, kstat.irqs[0][i],
                        (action->flags & SA_INTERRUPT) ? '+' : ' ',
                        action->name);
                for (action=action->next; action; action = action->next) {
-                       len += sprintf(buf+len, ",%s %s",
+                       seq_printf(p, ",%s %s",
                                (action->flags & SA_INTERRUPT) ? " +" : "",
                                action->name);
                }
-               len += sprintf(buf+len, "\n");
+               seq_putc(p, '\n');
        }
-       return len;
+       return 0;
 }
 
 
index ce1ccb994651d2a9599c06085597b9615c140534..d460583f3cc4c25c109b1f310665735cf1a088de 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/timex.h>
 #include <linux/slab.h>
 #include <linux/random.h>
+#include <linux/seq_file.h>
 
 #include <asm/bitops.h>
 #include <asm/bootinfo.h>
@@ -92,27 +93,27 @@ static struct irqaction *irq_action[32] =
     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
 };
 
-int get_irq_list(char *buf)
+int show_interrupts(struct seq_file *p, void *v)
 {
-    int i, len = 0;
-    struct irqaction *action;
-
-    for (i = 0; i < 32; i++) {
-       action = irq_action[i];
-       if (!action)
-           continue;
-       len += sprintf(buf + len, "%2d: %8d %c %s",
-                      i, kstat.irqs[0][i],
-                      (action->flags & SA_INTERRUPT) ? '+' : ' ',
-                      action->name);
-       for (action = action->next; action; action = action->next) {
-           len += sprintf(buf + len, ",%s %s",
-                          (action->flags & SA_INTERRUPT) ? " +" : "",
-                          action->name);
+       int i;
+       struct irqaction *action;
+
+       for (i = 0; i < 32; i++) {
+               action = irq_action[i];
+               if (!action)
+                       continue;
+               seq_printf(p, "%2d: %8d %c %s",
+                               i, kstat.irqs[0][i],
+                               (action->flags & SA_INTERRUPT) ? '+' : ' ',
+                               action->name);
+               for (action = action->next; action; action = action->next) {
+                       seq_printf(p, ",%s %s",
+                               (action->flags & SA_INTERRUPT) ? " +" : "",
+                               action->name);
+               }
+               seq_putc(p, '\n');
        }
-       len += sprintf(buf + len, "\n");
-    }
-    return len;
+       return 0;
 }
 
 /*
index 28ad5d35b5ad4ffe98b5aba1e5c3e4df832b8016..53585e39f793a90d06d435968dc98e8a98f7de16 100644 (file)
@@ -46,6 +46,7 @@
 #include <linux/slab.h>
 #include <linux/random.h>
 #include <linux/serial_reg.h>
+#include <linux/seq_file.h>
 
 #include <asm/bitops.h>
 #include <asm/bootinfo.h>
@@ -217,34 +218,34 @@ static struct hw_interrupt_type it8172_irq_type = {
 };
 
 
-int get_irq_list(char *buf)
+int show_interrupts(struct seq_file *p, void *v)
 {
-        int i, len = 0, j;
+        int i, j;
         struct irqaction * action;
 
-        len += sprintf(buf+len, "           ");
+        seq_printf(p, "           ");
         for (j=0; j<smp_num_cpus; j++)
-                len += sprintf(buf+len, "CPU%d       ",j);
-        *(char *)(buf+len++) = '\n';
+               seq_printf(p, "CPU%d       ",j);
+       seq_putc(p, '\n');
 
         for (i = 0 ; i < NR_IRQS ; i++) {
                 action = irq_desc[i].action;
                 if ( !action || !action->handler )
                         continue;
-                len += sprintf(buf+len, "%3d: ", i);           
-                len += sprintf(buf+len, "%10u ", kstat_irqs(i));
+                seq_printf(p, "%3d: ", i);             
+                seq_printf(p, "%10u ", kstat_irqs(i));
                 if ( irq_desc[i].handler )             
-                        len += sprintf(buf+len, " %s ", irq_desc[i].handler->typename );
+                        seq_printf(p, " %s ", irq_desc[i].handler->typename );
                 else
-                        len += sprintf(buf+len, "  None      ");
-                len += sprintf(buf+len, "    %s",action->name);
+                        seq_puts(p, "  None      ");
+                seq_printf(p, "    %s",action->name);
                 for (action=action->next; action; action = action->next) {
-                        len += sprintf(buf+len, ", %s", action->name);
+                        seq_printf(p, ", %s", action->name);
                 }
-                len += sprintf(buf+len, "\n");
+                seq_putc(p, '\n');
         }
-        len += sprintf(buf+len, "BAD: %10lu\n", spurious_count);
-        return len;
+        seq_printf(p, "BAD: %10lu\n", spurious_count);
+        return 0;
 }
 
 asmlinkage void do_IRQ(int irq, struct pt_regs *regs)
index 8cde3950b072b145b3b4d67a82258e678cf34738..77e00450a800da65190a12cbf469737d42ed6821 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/mm.h>
 #include <linux/random.h>
 #include <linux/sched.h>
+#include <linux/seq_file.h>
 
 #include <asm/system.h>
 
@@ -69,32 +70,31 @@ volatile unsigned long irq_err_count, spurious_count;
  * Generic, controller-independent functions:
  */
 
-int get_irq_list(char *buf)
+int show_interrupts(struct seq_file *p, void *v)
 {
        struct irqaction * action;
-       char *p = buf;
        int i;
 
-       p += sprintf(p, "           ");
+       seq_puts(p, "           ");
        for (i=0; i < 1 /*smp_num_cpus*/; i++)
-               p += sprintf(p, "CPU%d       ", i);
-       *p++ = '\n';
+               seq_printf(p, "CPU%d       ", i);
+       seq_putc(p, '\n');
 
        for (i = 0 ; i < NR_IRQS ; i++) {
                action = irq_desc[i].action;
                if (!action) 
                        continue;
-               p += sprintf(p, "%3d: ",i);
-               p += sprintf(p, "%10u ", kstat_irqs(i));
-               p += sprintf(p, " %14s", irq_desc[i].handler->typename);
-               p += sprintf(p, "  %s", action->name);
+               seq_printf(p, "%3d: ",i);
+               seq_printf(p, "%10u ", kstat_irqs(i));
+               seq_printf(p, " %14s", irq_desc[i].handler->typename);
+               seq_printf(p, "  %s", action->name);
 
                for (action=action->next; action; action = action->next)
-                       p += sprintf(p, ", %s", action->name);
-               *p++ = '\n';
+                       seq_printf(p, ", %s", action->name);
+               seq_putc(p, '\n');
        }
-       p += sprintf(p, "ERR: %10lu\n", irq_err_count);
-       return p - buf;
+       seq_printf(p, "ERR: %10lu\n", irq_err_count);
+       return 0;
 }
 
 /*
index ddc83d18adf648fc9d600a781773121ece9d198e..50f0807a77e13827da40d47d78dfad301b801279 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/timex.h>
 #include <linux/slab.h>
 #include <linux/random.h>
+#include <linux/seq_file.h>
 
 #include <asm/bitops.h>
 #include <asm/bootinfo.h>
@@ -123,27 +124,27 @@ static struct irqaction *irq_action[NR_IRQS] = {
        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
 };
 
-int get_irq_list(char *buf)
+int show_interrupts(struct seq_file *p, void *v)
 {
-       int i, len = 0;
+       int i;
        struct irqaction * action;
 
        for (i = 0 ; i < 32 ; i++) {
                action = irq_action[i];
                if (!action) 
                        continue;
-               len += sprintf(buf+len, "%2d: %8d %c %s",
+               seq_printf(p, "%2d: %8d %c %s",
                        i, kstat.irqs[0][i],
                        (action->flags & SA_INTERRUPT) ? '+' : ' ',
                        action->name);
                for (action=action->next; action; action = action->next) {
-                       len += sprintf(buf+len, ",%s %s",
+                       seq_printf(p, ",%s %s",
                                (action->flags & SA_INTERRUPT) ? " +" : "",
                                action->name);
                }
-               len += sprintf(buf+len, "\n");
+               seq_putc(p, '\n');
        }
-       return len;
+       return 0;
 }
 
 static inline void i8259_mask_and_ack_irq(int irq)
index c5035ad0bd7ee997fe3e403bdbd2724012461bef..c13cf568d7ee70535d2ecfc6dd9e9b1e4c662cf0 100644 (file)
@@ -29,6 +29,7 @@
 #include <linux/slab.h>
 #include <linux/interrupt.h>
 #include <linux/kernel_stat.h>
+#include <linux/seq_file.h>
 
 #include <asm/irq.h>
 #include <asm/mips-boards/atlas.h>
@@ -93,9 +94,9 @@ static struct hw_interrupt_type atlas_irq_type = {
        NULL
 };
 
-int get_irq_list(char *buf)
+int show_interrupts(struct seq_file *p, void *v)
 {
-       int i, len = 0;
+       int i;
        int num = 0;
        struct irqaction *action;
 
@@ -103,18 +104,18 @@ int get_irq_list(char *buf)
                action = irq_desc[i].action;
                if (!action) 
                        continue;
-               len += sprintf(buf+len, "%2d: %8d %c %s",
+               seq_printf(p, "%2d: %8d %c %s",
                        num, kstat.irqs[0][num],
                        (action->flags & SA_INTERRUPT) ? '+' : ' ',
                        action->name);
                for (action=action->next; action; action = action->next) {
-                       len += sprintf(buf+len, ",%s %s",
+                       seq_printf(p, ",%s %s",
                                (action->flags & SA_INTERRUPT) ? " +" : "",
                                action->name);
                }
-               len += sprintf(buf+len, " [hw0]\n");
+               seq_printf(p, " [hw0]\n");
        }
-       return len;
+       return 0;
 }
 
 int request_irq(unsigned int irq, 
index 6772b8f22e8f9a45304819d7bc3b1f9b836b07c4..40ad3adc0c94910f0e62fc9990e4b940b63cda63 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/timex.h>
 #include <linux/slab.h>
 #include <linux/random.h>
+#include <linux/seq_file.h>
 
 #include <asm/bitops.h>
 #include <asm/bootinfo.h>
@@ -114,27 +115,27 @@ static struct irqaction *irq_action[NR_IRQS] =
     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
 };
 
-int get_irq_list(char *buf)
+int show_interrupts(struct seq_file *p, void *v)
 {
-    int i, len = 0;
+    int i;
     struct irqaction *action;
 
     for (i = 0; i < NR_IRQS; i++) {
        action = irq_action[i];
        if (!action)
            continue;
-       len += sprintf(buf + len, "%2d: %8d %c %s",
+       seq_printf(p, "%2d: %8d %c %s",
                       i, kstat.irqs[0][i],
                       (action->flags & SA_INTERRUPT) ? '+' : ' ',
                       action->name);
        for (action = action->next; action; action = action->next) {
-           len += sprintf(buf + len, ",%s %s",
+           seq_printf(p, ",%s %s",
                           (action->flags & SA_INTERRUPT) ? " +" : "",
                           action->name);
        }
-       len += sprintf(buf + len, "\n");
+       seq_putc(p, '\n');
     }
-    return len;
+    return 0;
 }
 
 atomic_t __mips_bh_counter;
index b25ea834c690330be38480fa1318a0ee5acdac92..667c2bdd4c245ae77ee724bf18d20b2c14345fd7 100644 (file)
@@ -29,6 +29,7 @@
 #include <linux/slab.h>
 #include <linux/interrupt.h>
 #include <linux/kernel_stat.h>
+#include <linux/seq_file.h>
 
 #include <asm/irq.h>
 #include <asm/mips-boards/atlas.h>
@@ -89,9 +90,9 @@ static struct hw_interrupt_type atlas_irq_type = {
        NULL
 };
 
-int get_irq_list(char *buf)
+int show_interrupts(struct seq_file *p, void *v)
 {
-       int i, len = 0;
+       int i;
        int num = 0;
        struct irqaction *action;
 
@@ -99,18 +100,18 @@ int get_irq_list(char *buf)
                action = irq_desc[i].action;
                if (!action) 
                        continue;
-               len += sprintf(buf+len, "%2d: %8d %c %s",
+               seq_printf(p, "%2d: %8d %c %s",
                        num, kstat.irqs[0][num],
                        (action->flags & SA_INTERRUPT) ? '+' : ' ',
                        action->name);
                for (action=action->next; action; action = action->next) {
-                       len += sprintf(buf+len, ",%s %s",
+                       seq_printf(p, ",%s %s",
                                (action->flags & SA_INTERRUPT) ? " +" : "",
                                action->name);
                }
-               len += sprintf(buf+len, " [hw0]\n");
+               seq_puts(p, " [hw0]\n");
        }
-       return len;
+       return 0;
 }
 
 int request_irq(unsigned int irq, 
index 9db1254a1f823c680a32b24f547d822339bcfe5d..d58af8391a5345577b147981585f8da3d12f9a65 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/interrupt.h>
 #include <linux/kernel_stat.h>
 #include <linux/random.h>
+#include <linux/seq_file.h>
 
 #include <asm/irq.h>
 #include <asm/io.h>
@@ -119,9 +120,9 @@ void enable_irq(unsigned int irq_nr)
 }
 
 
-int get_irq_list(char *buf)
+int show_interrupts(struct seq_file *p, void *v)
 {
-       int i, len = 0;
+       int i;
        int num = 0;
        struct irqaction *action;
 
@@ -129,33 +130,33 @@ int get_irq_list(char *buf)
                action = irq_action[i];
                if (!action) 
                        continue;
-               len += sprintf(buf+len, "%2d: %8d %c %s",
+               seq_printf(p, "%2d: %8d %c %s",
                        num, kstat.irqs[0][num],
                        (action->flags & SA_INTERRUPT) ? '+' : ' ',
                        action->name);
                for (action=action->next; action; action = action->next) {
-                       len += sprintf(buf+len, ",%s %s",
+                       seq_printf(p, ",%s %s",
                                (action->flags & SA_INTERRUPT) ? " +" : "",
                                action->name);
                }
-               len += sprintf(buf+len, " [on-chip]\n");
+               seq_puts(p, " [on-chip]\n");
        }
        for (i = 0; i < MALTAINT_END; i++, num++) {
                action = hw0_irq_action[i];
                if (!action) 
                        continue;
-               len += sprintf(buf+len, "%2d: %8d %c %s",
+               seq_printf(p, "%2d: %8d %c %s",
                        num, kstat.irqs[0][num],
                        (action->flags & SA_INTERRUPT) ? '+' : ' ',
                        action->name);
                for (action=action->next; action; action = action->next) {
-                       len += sprintf(buf+len, ",%s %s",
+                       seq_printf(p, ",%s %s",
                                (action->flags & SA_INTERRUPT) ? " +" : "",
                                action->name);
                }
-               len += sprintf(buf+len, " [hw0]\n");
+               seq_puts(p, " [hw0]\n");
        }
-       return len;
+       return 0;
 }
 
 int request_irq(unsigned int irq, 
index d849422cd45b5a98c7ae5af93122860fbcf66f88..e87fd162f4d596057423dee9782727af2be8e33b 100644 (file)
@@ -8,6 +8,7 @@
  */
 #include <linux/config.h>
 #include <linux/init.h>
+#include <linux/seq_file.h>
 
 #include <linux/errno.h>
 #include <linux/kernel_stat.h>
@@ -231,9 +232,9 @@ static struct irqaction *irq_action[16] = {
        NULL, NULL, NULL, NULL
 };
 
-int get_irq_list(char *buf)
+int show_interrupts(struct seq_file *p, void *v)
 {
-       int i, len = 0;
+       int i;
        int num = 0;
        struct irqaction * action;
 
@@ -241,33 +242,33 @@ int get_irq_list(char *buf)
                action = irq_action[i];
                if (!action) 
                        continue;
-               len += sprintf(buf+len, "%2d: %8d %c %s",
+               seq_printf(p, "%2d: %8d %c %s",
                        num, kstat.irqs[0][num],
                        (action->flags & SA_INTERRUPT) ? '+' : ' ',
                        action->name);
                for (action=action->next; action; action = action->next) {
-                       len += sprintf(buf+len, ",%s %s",
+                       seq_printf(p, ",%s %s",
                                (action->flags & SA_INTERRUPT) ? " +" : "",
                                action->name);
                }
-               len += sprintf(buf+len, " [on-chip]\n");
+               seq_puts(p, " [on-chip]\n");
        }
        for (i = 0 ; i < 24 ; i++, num++) {
                action = local_irq_action[i];
                if (!action) 
                        continue;
-               len += sprintf(buf+len, "%2d: %8d %c %s",
+               seq_printf(p, "%2d: %8d %c %s",
                        num, kstat.irqs[0][num],
                        (action->flags & SA_INTERRUPT) ? '+' : ' ',
                        action->name);
                for (action=action->next; action; action = action->next) {
-                       len += sprintf(buf+len, ",%s %s",
+                       seq_printf(p, ",%s %s",
                                (action->flags & SA_INTERRUPT) ? " +" : "",
                                action->name);
                }
-               len += sprintf(buf+len, " [local]\n");
+               seq_puts(p, " [local]\n");
        }
-       return len;
+       return 0;
 }
 
 /*
index 0e6369c2b1194d496e8b8f818e64b7693cc59c6d..b25c98ddb9e38814f0371be7b88aee814f4baad5 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/kernel_stat.h>
 #include <linux/delay.h>
 #include <linux/irq.h>
+#include <linux/seq_file.h>
 
 #include <asm/bitops.h>
 #include <asm/bootinfo.h>
@@ -136,27 +137,27 @@ void enable_irq(unsigned int irq_nr)
 /* This is stupid for an Origin which can have thousands of IRQs ...  */
 static struct irqaction *irq_action[NR_IRQS];
 
-int get_irq_list(char *buf)
+int show_interrupts(struct seq_file *p, void *v)
 {
-       int i, len = 0;
+       int i;
        struct irqaction * action;
 
        for (i = 0 ; i < NR_IRQS ; i++) {
                action = irq_action[i];
                if (!action) 
                        continue;
-               len += sprintf(buf+len, "%2d: %8d %c %s", i, kstat.irqs[0][i],
+               seq_printf(p, "%2d: %8d %c %s", i, kstat.irqs[0][i],
                               (action->flags & SA_INTERRUPT) ? '+' : ' ',
                               action->name);
                for (action=action->next; action; action = action->next) {
-                       len += sprintf(buf+len, ",%s %s",
+                       seq_printf(p, ",%s %s",
                                       (action->flags & SA_INTERRUPT)
                                        ? " +" : "",
                                        action->name);
                }
-               len += sprintf(buf+len, "\n");
+               seq_putc(p, '\n');
        }
-       return len;
+       return 0;
 }
 
 /*
index b29af3d73d18f18d25cc4acad740072604b13a62..c893d10cfe677b84e9c175d42c0f3d2ad70c198a 100644 (file)
@@ -53,14 +53,7 @@ static int rtc_read_proc(char *page, char **start, off_t off,
 
 static void get_rtc_time(struct rtc_time *rtc_tm);
 
-/*
- *     Bits in rtc_status. (6 bits of room for future expansion)
- */
-
-#define RTC_IS_OPEN            0x01    /* means /dev/rtc is in use     */
-#define RTC_TIMER_ON           0x02    /* missed irq timer active      */
-
-static unsigned char rtc_status;       /* bitmapped status byte.       */
+static atomic_t rtc_ready = ATOMIC_INIT(1);
 static unsigned long rtc_freq; /* Current periodic IRQ rate    */
 static struct m48t35_rtc *rtc;
 
@@ -166,23 +159,17 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
 
 static int rtc_open(struct inode *inode, struct file *file)
 {
-       if(rtc_status & RTC_IS_OPEN)
+       if( atomic_dec_and_test( &rtc_ready ) ) 
+       {
+               atomic_inc( &rtc_ready );
                return -EBUSY;
-
-       rtc_status |= RTC_IS_OPEN;
+       }
        return 0;
 }
 
 static int rtc_release(struct inode *inode, struct file *file)
 {
-       /*
-        * Turn off all interrupts once the device is no longer
-        * in use, and clear the data.
-        */
-
-       lock_kernel();
-       rtc_status &= ~RTC_IS_OPEN;
-       unlock_kernel();
+       atomic_inc( &rtc_ready );
        return 0;
 }
 
index b3914a1b19dcbbf5cd5aa23f8d5d4bd7afd0de8d..45411f217b8a9e67df5f88f638b73a6a2c1e3bd0 100644 (file)
@@ -39,6 +39,7 @@
 #include <linux/random.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
+#include <linux/seq_file.h>
 
 #include <asm/cache.h>
 
@@ -160,19 +161,18 @@ void enable_irq(int irq)
                BUG();
 }
 
-int get_irq_list(char *buf)
+int show_interrupts(struct seq_file *p, void *v)
 {
 #ifdef CONFIG_PROC_FS
-       char *p = buf;
        int i, j;
        int regnr, irq_no;
        struct irq_region *region;
        struct irqaction *action, *mainaction;
 
-       p += sprintf(p, "           ");
+       seq_puts(p, "           ");
        for (j=0; j<smp_num_cpus; j++)
-               p += sprintf(p, "CPU%d       ",j);
-       *p++ = '\n';
+               seq_printf(p, "CPU%d       ",j);
+       seq_putc(p, '\n');
 
        for (regnr = 0; regnr < NR_IRQ_REGS; regnr++) {
            region = irq_region[regnr];
@@ -188,40 +188,34 @@ int get_irq_list(char *buf)
                
                irq_no = IRQ_FROM_REGION(regnr) + i;
                
-               p += sprintf(p, "%3d: ", irq_no);
+               seq_printf(p, "%3d: ", irq_no);
 #ifndef CONFIG_SMP
-               p += sprintf(p, "%10u ", kstat_irqs(irq_no));
+               seq_printf(p, "%10u ", kstat_irqs(irq_no));
 #else
                for (j = 0; j < smp_num_cpus; j++)
-                   p += sprintf(p, "%10u ",
+                   seq_printf(p, "%10u ",
                            kstat.irqs[cpu_logical_map(j)][irq_no]);
 #endif
-               p += sprintf(p, " %14s", 
+               seq_printf(p, " %14s", 
                            region->data.name ? region->data.name : "N/A");
-               p += sprintf(p, "  %s", action->name);
+               seq_printf(p, "  %s", action->name);
 
                for (action=action->next; action; action = action->next)
-                   p += sprintf(p, ", %s", action->name);
-               *p++ = '\n';
+                   seq_printf(p, ", %s", action->name);
+               seq_putc(p, '\n');
            }                
        }  
 
-       p += sprintf(p, "\n");
+       seq_putc(p, '\n');
 #if CONFIG_SMP
-       p += sprintf(p, "LOC: ");
+       seq_puts(p, "LOC: ");
        for (j = 0; j < smp_num_cpus; j++)
-               p += sprintf(p, "%10u ",
+               seq_printf(p, "%10u ",
                        apic_timer_irqs[cpu_logical_map(j)]);
-       p += sprintf(p, "\n");
+       seq_putc(p, '\n');
 #endif
-
-       return p - buf;
-
-#else  /* CONFIG_PROC_FS */
-
-       return 0;       
-
 #endif /* CONFIG_PROC_FS */
+       return 0;
 }
 
 
index 1b6879b9c2980eed4fa938b67bb3314e9dabf54b..dd6ea8bac54eb49886a0bb9d2ec3b5061e083cca 100644 (file)
@@ -44,6 +44,7 @@
 #include <linux/sched.h>
 #include <linux/kernel_stat.h>
 #include <linux/init.h>
+#include <linux/seq_file.h>
 
 #include <asm/system.h>
 #include <asm/irq.h>
@@ -61,7 +62,7 @@ extern int cia_request_irq(int irq,
                            unsigned long flags, const char *devname, void *dev_id);
 extern void cia_free_irq(unsigned int irq, void *dev_id);
 extern void cia_init_IRQ(struct ciabase *base);
-extern int cia_get_irq_list(struct ciabase *base, char *buf);
+extern int cia_get_irq_list(struct ciabase *base, struct seq_file *p);
 
 /* irq node variables for amiga interrupt sources */
 static irq_node_t *ami_irq_list[AMI_STD_IRQS];
@@ -480,28 +481,28 @@ void (*amiga_default_handler[SYS_IRQS])(int, void *, struct pt_regs *) = {
 };
 #endif
 
-int amiga_get_irq_list(char *buf)
+int show_amiga_intreeupts(struct seq_file *p, void *v)
 {
-       int i, len = 0;
+       int i;
        irq_node_t *node;
 
        for (i = 0; i < AMI_STD_IRQS; i++) {
                if (!(node = ami_irq_list[i]))
                        continue;
-               len += sprintf(buf+len, "ami  %2d: %10u ", i,
+               seq_printf(p, "ami  %2d: %10u ", i,
                               kstat.irqs[0][SYS_IRQS + i]);
                do {
                        if (node->flags & SA_INTERRUPT)
-                               len += sprintf(buf+len, "F ");
+                               seq_puts(p, "F ");
                        else
-                               len += sprintf(buf+len, "  ");
-                       len += sprintf(buf+len, "%s\n", node->devname);
+                               seq_puts(p, "  ");
+                       seq_printf(p, "%s\n", node->devname);
                        if ((node = node->next))
-                               len += sprintf(buf+len, "                    ");
+                               seq_puts(p, "                    ");
                } while (node);
        }
 
-       len += cia_get_irq_list(&ciaa_base, buf+len);
-       len += cia_get_irq_list(&ciab_base, buf+len);
+       cia_get_irq_list(&ciaa_base, p);
+       cia_get_irq_list(&ciab_base, p);
        return len;
 }
index 37ebba24d240666e55bc6286cd52efb8c0949e5a..21f03c0a54a36d74d67732ad3961e257cd10e9c7 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/errno.h>
 #include <linux/kernel_stat.h>
 #include <linux/init.h>
+#include <linux/seq_file.h>
 
 #include <asm/irq.h>
 #include <asm/amigahw.h>
@@ -222,16 +223,16 @@ void __init cia_init_IRQ(struct ciabase *base)
        custom.intena = IF_SETCLR | base->int_mask;
 }
 
-int cia_get_irq_list(struct ciabase *base, char *buf)
+int cia_get_irq_list(struct ciabase *base, struct seq_file *p)
 {
-       int i, j, len = 0;
+       int i, j;
 
        j = base->cia_irq;
        for (i = 0; i < CIA_IRQS; i++) {
-               len += sprintf(buf+len, "cia  %2d: %10d ", j + i,
+               seq_printf(p, "cia  %2d: %10d ", j + i,
                               kstat.irqs[0][SYS_IRQS + j + i]);
-                       len += sprintf(buf+len, "  ");
-               len += sprintf(buf+len, "%s\n", base->irq_list[i].devname);
+               seq_puts(p, "  ");
+               seq_printf(p, "%s\n", base->irq_list[i].devname);
        }
-       return len;
+       return 0;
 }
index 34ac4047af826c4f15350ea8b30b5ef5bf986eb2..c26b6fdd394cc26ad10f9d85106e3d1a3c01e87c 100644 (file)
@@ -28,6 +28,7 @@
 #ifdef CONFIG_ZORRO
 #include <linux/zorro.h>
 #endif
+#include <linux/seq_file.h>
 
 #include <asm/bootinfo.h>
 #include <asm/setup.h>
@@ -91,7 +92,7 @@ extern void amiga_enable_irq (unsigned int);
 extern void amiga_disable_irq (unsigned int);
 static void amiga_get_model(char *model);
 static int amiga_get_hardware_list(char *buffer);
-extern int amiga_get_irq_list (char *);
+extern int show_amiga_interrupts (struct seq_file *, void *);
 /* amiga specific timer functions */
 static unsigned long amiga_gettimeoffset (void);
 static void a3000_gettod (int *, int *, int *, int *, int *, int *);
@@ -422,7 +423,7 @@ void __init config_amiga(void)
 #endif
   mach_get_model       = amiga_get_model;
   mach_get_hardware_list = amiga_get_hardware_list;
-  mach_get_irq_list    = amiga_get_irq_list;
+  mach_get_irq_list    = show_amiga_interrupts;
   mach_gettimeoffset   = amiga_gettimeoffset;
   if (AMIGAHW_PRESENT(A3000_CLK)){
     mach_gettod  = a3000_gettod;
index 3ca420bdf3b7fefc43ae879cc573daab37f3aab8..9bec7e2cc1309aaec44e6c0ff6e7c24187bb9d08 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/kernel_stat.h>
 #include <linux/errno.h>
 #include <linux/init.h>
+#include <linux/seq_file.h>
 
 #include <asm/setup.h>
 #include <asm/system.h>
@@ -143,20 +144,20 @@ asmlinkage void process_int(unsigned long vec, struct pt_regs *fp)
        }
 }
 
-int m68k_get_irq_list(char *buf)
+int m68k_get_irq_list(struct seq_file *p, void *v)
 {
-       int i, len = 0;
+       int i;
 
        /* autovector interrupts */
        if (mach_default_handler) {
                for (i = 0; i < SYS_IRQS; i++) {
-                       len += sprintf(buf+len, "auto %2d: %10u ", i,
+                       seq_printf(p, "auto %2d: %10u ", i,
                                       i ? kstat.irqs[0][i] : num_spurious);
-                               len += sprintf(buf+len, "  ");
-                       len += sprintf(buf+len, "%s\n", irq_list[i].devname);
+                       seq_puts(p, "  ");
+                       seq_printf(p, "%s\n", irq_list[i].devname);
                }
        }
 
-       len += mach_get_irq_list(buf+len);
-       return len;
+       mach_get_irq_list(p, v);
+       return 0;
 }
index e1f8cf807212c26ef19c45116433128bd58ea465..bdbc452bc0e383a80d8181cb6303657fcf89fe74 100644 (file)
@@ -95,7 +95,7 @@ void (*mach_init_IRQ) (void) __initdata = NULL;
 void (*(*mach_default_handler)[]) (int, void *, struct pt_regs *) = NULL;
 void (*mach_get_model) (char *model) = NULL;
 int (*mach_get_hardware_list) (char *buffer) = NULL;
-int (*mach_get_irq_list) (char *) = NULL;
+int (*mach_get_irq_list) (struct seq_file *, void *) = NULL;
 void (*mach_process_int) (int, struct pt_regs *) = NULL;
 /* machine dependent timer functions */
 unsigned long (*mach_gettimeoffset) (void);
@@ -671,12 +671,12 @@ static unsigned int apus_irq_cannonicalize(unsigned int irq)
        return irq;
 }
 
-int apus_get_irq_list(char *buf)
+int show_apus_interrupts(struct seq_file *p, void *v)
 {
 #ifdef CONFIG_APUS
-       extern int amiga_get_irq_list(char *buf);
+       extern int show_amiga_interrupts(struct seq_file *p, void *v)
        
-       return amiga_get_irq_list (buf);
+       return show_amiga_interrupts(p, v);
 #else
        return 0;
 #endif
index a4734093f5b0b91948ebc3a50ec2b5cea9aef938..c5f422016adfdfc8ee5304389320a539fa4cc1c4 100644 (file)
@@ -47,6 +47,7 @@
 #include <linux/irq.h>
 #include <linux/proc_fs.h>
 #include <linux/random.h>
+#include <linux/seq_file.h>
 
 #include <asm/uaccess.h>
 #include <asm/bitops.h>
@@ -371,58 +372,58 @@ void enable_irq(unsigned int irq)
        spin_unlock_irqrestore(&desc->lock, flags);
 }
 
-int get_irq_list(char *buf)
+int show_interrupts(struct seq_file *p, void *v)
 {
 #ifdef CONFIG_APUS
-       return apus_get_irq_list (buf);
+       return show_apus_interrupts(p, v);
 #else
-       int i, len = 0, j;
+       int i, j;
        struct irqaction * action;
 
-       len += sprintf(buf+len, "           ");
+       seq_puts(p, "           ");
        for (j=0; j<smp_num_cpus; j++)
-               len += sprintf(buf+len, "CPU%d       ",j);
-       *(char *)(buf+len++) = '\n';
+               seq_printf(p, "CPU%d       ",j);
+       seq_putc(p, '\n');
 
        for (i = 0 ; i < NR_IRQS ; i++) {
                action = irq_desc[i].action;
                if ( !action || !action->handler )
                        continue;
-               len += sprintf(buf+len, "%3d: ", i);            
+               seq_printf(p, "%3d: ", i);              
 #ifdef CONFIG_SMP
                for (j = 0; j < smp_num_cpus; j++)
-                       len += sprintf(buf+len, "%10u ",
+                       seq_printf(p, "%10u ",
                                kstat.irqs[cpu_logical_map(j)][i]);
 #else          
-               len += sprintf(buf+len, "%10u ", kstat_irqs(i));
+               seq_printf(p, "%10u ", kstat_irqs(i));
 #endif /* CONFIG_SMP */
                if ( irq_desc[i].handler )              
-                       len += sprintf(buf+len, " %s ", irq_desc[i].handler->typename );
+                       seq_printf(p, " %s ", irq_desc[i].handler->typename );
                else
-                       len += sprintf(buf+len, "  None      ");
-               len += sprintf(buf+len, "%s", (irq_desc[i].status & IRQ_LEVEL) ? "Level " : "Edge  ");
-               len += sprintf(buf+len, "    %s",action->name);
+                       seq_puts(p, "  None      ");
+               seq_printf(p, "%s", (irq_desc[i].status & IRQ_LEVEL) ? "Level " : "Edge  ");
+               seq_printf(p, "    %s",action->name);
                for (action=action->next; action; action = action->next) {
-                       len += sprintf(buf+len, ", %s", action->name);
+                       seq_printf(p, ", %s", action->name);
                }
-               len += sprintf(buf+len, "\n");
+               seq_putc(p, '\n');
        }
 #ifdef CONFIG_TAU_INT
        if (tau_initialized){
-               len += sprintf(buf+len, "TAU: ");
+               seq_puts(p, "TAU: ");
                for (j = 0; j < smp_num_cpus; j++)
-                       len += sprintf(buf+len, "%10u ",
+                       seq_printf(p, "%10u ",
                                        tau_interrupts(j));
-               len += sprintf(buf+len, "  PowerPC             Thermal Assist (cpu temp)\n");
+               seq_puts(p, "  PowerPC             Thermal Assist (cpu temp)\n");
        }
 #endif
 #ifdef CONFIG_SMP
        /* should this be per processor send/receive? */
-       len += sprintf(buf+len, "IPI (recv/sent): %10u/%u\n",
+       seq_printf(p, "IPI (recv/sent): %10u/%u\n",
                       atomic_read(&ipi_recv), atomic_read(&ipi_sent));
 #endif         
-       len += sprintf(buf+len, "BAD: %10u\n", ppc_spurious_interrupts);
-       return len;
+       seq_printf(p, "BAD: %10u\n", ppc_spurious_interrupts);
+       return 0;
 #endif /* CONFIG_APUS */
 }
 
index ff02b77b68dabe32fcfd85c332578c33d5773d94..864fe1a78f5813b456d89851c77477474dbc00a1 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/threads.h>
 #include <linux/smp_lock.h>
 #include <linux/init.h>
+#include <linux/seq_file.h>
 
 #include <asm/system.h>
 #include <asm/io.h>
@@ -59,22 +60,19 @@ BUILD_SMP_INTERRUPT(mtrr_interrupt)
 BUILD_SMP_INTERRUPT(spurious_interrupt)
 #endif
 
-#if 0
-int get_irq_list(char *buf)
+int show_interrupts(struct seq_file *p, void *v)
 {
        int i, j;
        struct irqaction * action;
-       char *p = buf;
 
-       p += sprintf(p, "           ");
+       seq_puts(p, "           ");
 
        for (j=0; j<smp_num_cpus; j++)
-               p += sprintf(p, "CPU%d       ",j);
+               seq_printf(p, "CPU%d       ",j);
 
-       *p++ = '\n';
+       seq_putc(p, '\n');
 
-       for (i = 0 ; i < NR_IRQS ; i++)
-       {
+       for (i = 0 ; i < NR_IRQS ; i++) {
                if (ioinfo[i] == INVALID_STORAGE_AREA)
                        continue;
 
@@ -83,35 +81,33 @@ int get_irq_list(char *buf)
                if (!action)
                        continue;
 
-               p += sprintf(p, "%3d: ",i);
+               seq_printf(p, "%3d: ",i);
 #ifndef CONFIG_SMP
-               p += sprintf(p, "%10u ", kstat_irqs(i));
+               seq_printf(p, "%10u ", kstat_irqs(i));
 #else
                for (j=0; j<smp_num_cpus; j++)
-                       p += sprintf( p, "%10u ",
+                       seq_printf( p, "%10u ",
                                      kstat.irqs[cpu_logical_map(j)][i]);
 #endif
-               p += sprintf(p, " %14s", ioinfo[i]->irq_desc.handler->typename);
-               p += sprintf(p, "  %s", action->name);
+               seq_printf(p, " %14s", ioinfo[i]->irq_desc.handler->typename);
+               seq_printf(p, "  %s", action->name);
 
                for (action=action->next; action; action = action->next)
                {
-                       p += sprintf(p, ", %s", action->name);
+                       seq_printf(p, ", %s", action->name);
 
                } /* endfor */
 
-               *p++ = '\n';
+               seq_putc(p, '\n');
        
        } /* endfor */
 
-       p += sprintf(p, "NMI: %10u\n", nmi_counter);
+       seq_printf(p, "NMI: %10u\n", nmi_counter);
 #ifdef CONFIG_SMP
-       p += sprintf(p, "IPI: %10u\n", atomic_read(&ipi_count));
+       seq_printf(p, "IPI: %10u\n", atomic_read(&ipi_count));
 #endif
-
-       return p - buf;
+       return 0;
 }
-#endif
 
 /*
  * Global interrupt locks for SMP. Allow interrupts to come in on any
index 92023c04b63665f0d9b79ee953e2f6d4dc483578..25dcf173c8a9768ec94260944a8654dcf138d937 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/threads.h>
 #include <linux/smp_lock.h>
 #include <linux/init.h>
+#include <linux/seq_file.h>
 
 #include <asm/system.h>
 #include <asm/io.h>
@@ -59,19 +60,17 @@ BUILD_SMP_INTERRUPT(mtrr_interrupt)
 BUILD_SMP_INTERRUPT(spurious_interrupt)
 #endif
 
-#if 0
-int get_irq_list(char *buf)
+int show_interrupts(struct seq_file *p, void *v)
 {
        int i, j;
        struct irqaction * action;
-       char *p = buf;
 
-       p += sprintf(p, "           ");
+       seq_puts(p, "           ");
 
        for (j=0; j<smp_num_cpus; j++)
-               p += sprintf(p, "CPU%d       ",j);
+               seq_printf(p, "CPU%d       ",j);
 
-       *p++ = '\n';
+       seq_putc(p, '\n');
 
        for (i = 0 ; i < NR_IRQS ; i++)
        {
@@ -83,35 +82,34 @@ int get_irq_list(char *buf)
                if (!action)
                        continue;
 
-               p += sprintf(p, "%3d: ",i);
+               seq_printf(p, "%3d: ",i);
 #ifndef CONFIG_SMP
-               p += sprintf(p, "%10u ", kstat_irqs(i));
+               seq_printf(p, "%10u ", kstat_irqs(i));
 #else
                for (j=0; j<smp_num_cpus; j++)
-                       p += sprintf( p, "%10u ",
+                       seq_printf( p, "%10u ",
                                      kstat.irqs[cpu_logical_map(j)][i]);
 #endif
-               p += sprintf(p, " %14s", ioinfo[i]->irq_desc.handler->typename);
-               p += sprintf(p, "  %s", action->name);
+               seq_printf(p, " %14s", ioinfo[i]->irq_desc.handler->typename);
+               seq_printf(p, "  %s", action->name);
 
                for (action=action->next; action; action = action->next)
                {
-                       p += sprintf(p, ", %s", action->name);
+                       seq_printf(p, ", %s", action->name);
 
                } /* endfor */
 
-               *p++ = '\n';
+               seq_putc(p, '\n');
        
        } /* endfor */
 
-       p += sprintf(p, "NMI: %10u\n", nmi_counter);
+       seq_printf(p, "NMI: %10u\n", nmi_counter);
 #ifdef CONFIG_SMP
-       p += sprintf(p, "IPI: %10u\n", atomic_read(&ipi_count));
+       seq_printf(p, "IPI: %10u\n", atomic_read(&ipi_count));
 #endif
 
-       return p - buf;
+       return 0;
 }
-#endif
 
 /*
  * Global interrupt locks for SMP. Allow interrupts to come in on any
index 7f793dc4e2d9864172365a40eb0b8e5ebf9830d0..0986f51d3397e5a054e1d77e9f69464e67a2bbc9 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
 #include <linux/init.h>
+#include <linux/seq_file.h>
 
 #include <asm/system.h>
 #include <asm/io.h>
@@ -84,31 +85,30 @@ struct hw_interrupt_type no_irq_type = {
  */
 
 #if defined(CONFIG_PROC_FS)
-int get_irq_list(char *buf)
+int show_interrupts(struct seq_file *p, void *v)
 {
        int i, j;
        struct irqaction * action;
-       char *p = buf;
 
-       p += sprintf(p, "           ");
+       seq_puts(p, "           ");
        for (j=0; j<smp_num_cpus; j++)
-               p += sprintf(p, "CPU%d       ",j);
-       *p++ = '\n';
+               seq_printf(p, "CPU%d       ",j);
+       seq_putc(p, '\n');
 
        for (i = 0 ; i < ACTUAL_NR_IRQS ; i++) {
                action = irq_desc[i].action;
                if (!action) 
                        continue;
-               p += sprintf(p, "%3d: ",i);
-               p += sprintf(p, "%10u ", kstat_irqs(i));
-               p += sprintf(p, " %14s", irq_desc[i].handler->typename);
-               p += sprintf(p, "  %s", action->name);
+               seq_printf(p, "%3d: ",i);
+               seq_printf(p, "%10u ", kstat_irqs(i));
+               seq_printf(p, " %14s", irq_desc[i].handler->typename);
+               seq_printf(p, "  %s", action->name);
 
                for (action=action->next; action; action = action->next)
-                       p += sprintf(p, ", %s", action->name);
-               *p++ = '\n';
+                       seq_printf(p, ", %s", action->name);
+               seq_putc(p, '\n');
        }
-       return p - buf;
+       return 0;
 }
 #endif
 
index 01eeeb789ee5fcc72b4f3c818d6482654ebd0cd8..49e6f1a4c6db5f94569a33ac327e61a4bc89704b 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/delay.h>
 #include <linux/threads.h>
 #include <linux/spinlock.h>
+#include <linux/seq_file.h>
 
 #include <asm/ptrace.h>
 #include <asm/processor.h>
@@ -97,42 +98,42 @@ struct irqaction *irq_action[NR_IRQS+1] = {
          NULL, NULL, NULL, NULL, NULL, NULL , NULL, NULL
 };
 
-int get_irq_list(char *buf)
+int show_interrupts(struct seq_file *p, void *v)
 {
-       int i, len = 0;
+       int i;
        struct irqaction * action;
 #ifdef CONFIG_SMP
        int j;
 #endif
 
        if (sparc_cpu_model == sun4d) {
-               extern int sun4d_get_irq_list(char *);
+               extern int show_sun4d_interrupts(struct seq_file *, void *);
                
-               return sun4d_get_irq_list(buf);
+               return show_sun4d_interrupts(p, v);
        }
        for (i = 0 ; i < (NR_IRQS+1) ; i++) {
                action = *(i + irq_action);
                if (!action) 
                        continue;
-               len += sprintf(buf+len, "%3d: ", i);
+               seq_printf(p, "%3d: ", i);
 #ifndef CONFIG_SMP
-               len += sprintf(buf+len, "%10u ", kstat_irqs(i));
+               seq_printf(p, "%10u ", kstat_irqs(i));
 #else
                for (j = 0; j < smp_num_cpus; j++)
-                       len += sprintf(buf+len, "%10u ",
+                       seq_printf(p, "%10u ",
                                kstat.irqs[cpu_logical_map(j)][i]);
 #endif
-               len += sprintf(buf+len, " %c %s",
+               seq_printf(p, " %c %s",
                        (action->flags & SA_INTERRUPT) ? '+' : ' ',
                        action->name);
                for (action=action->next; action; action = action->next) {
-                       len += sprintf(buf+len, ",%s %s",
+                       seq_printf(p, ",%s %s",
                                (action->flags & SA_INTERRUPT) ? " +" : "",
                                action->name);
                }
-               len += sprintf(buf+len, "\n");
+               seq_putc(p, '\n');
        }
-       return len;
+       return 0;
 }
 
 void free_irq(unsigned int irq, void *dev_id)
index 98c8fc0528069c79491f29d80112955888930256..2a47968bbfc4a76a25a1f1fb3e1cd8e988fb72f0 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
 #include <linux/spinlock.h>
+#include <linux/seq_file.h>
 
 #include <asm/ptrace.h>
 #include <asm/processor.h>
@@ -72,9 +73,9 @@ static int nsbi;
 spinlock_t sun4d_imsk_lock = SPIN_LOCK_UNLOCKED;
 #endif
 
-int sun4d_get_irq_list(char *buf)
+int show_sun4d_interrupts(struct seq_file *p, void *v)
 {
-       int i, j = 0, k = 0, len = 0, sbusl;
+       int i, j = 0, k = 0, sbusl;
        struct irqaction * action;
 #ifdef CONFIG_SMP
        int x;
@@ -94,21 +95,21 @@ int sun4d_get_irq_list(char *buf)
                        }
                        continue;
                }
-found_it:      len += sprintf(buf+len, "%3d: ", i);
+found_it:      seq_printf(p, "%3d: ", i);
 #ifndef CONFIG_SMP
-               len += sprintf(buf+len, "%10u ", kstat_irqs(i));
+               seq_printf(p, "%10u ", kstat_irqs(i));
 #else
                for (x = 0; x < smp_num_cpus; x++)
-                       len += sprintf(buf+len, "%10u ",
+                       seq_printf(p, "%10u ",
                                       kstat.irqs[cpu_logical_map(x)][i]);
 #endif
-               len += sprintf(buf+len, "%c %s",
+               seq_printf(p, "%c %s",
                        (action->flags & SA_INTERRUPT) ? '+' : ' ',
                        action->name);
                action = action->next;
                for (;;) {
                        for (; action; action = action->next) {
-                               len += sprintf(buf+len, ",%s %s",
+                               seq_printf(p, ",%s %s",
                                        (action->flags & SA_INTERRUPT) ? " +" : "",
                                        action->name);
                        }
@@ -123,9 +124,9 @@ found_it:   len += sprintf(buf+len, "%3d: ", i);
                                action = sbus_actions [(j << 5) + (sbusl << 2)].action;
                        }
                }
-               len += sprintf(buf+len, "\n");
+               seq_putc(p, '\n');
        }
-       return len;
+       return 0;
 }
 
 void sun4d_free_irq(unsigned int irq, void *dev_id)
index 6343cc6e28e61b201e17363968108266012341b0..dedf08d2614c8f2e757493a0ab5565cf5bfbd451 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/proc_fs.h>
+#include <linux/seq_file.h>
 
 #include <asm/ptrace.h>
 #include <asm/processor.h>
@@ -104,9 +105,9 @@ static void register_irq_proc (unsigned int irq);
 #define put_smpaff_in_irqaction(action, smpaff)        (action)->mask = (smpaff)
 #define get_smpaff_in_irqaction(action)        ((action)->mask)
 
-int get_irq_list(char *buf)
+int show_interrupts(struct seq_file *p, void *v)
 {
-       int i, len = 0;
+       int i;
        struct irqaction *action;
 #ifdef CONFIG_SMP
        int j;
@@ -115,23 +116,23 @@ int get_irq_list(char *buf)
        for(i = 0; i < (NR_IRQS + 1); i++) {
                if(!(action = *(i + irq_action)))
                        continue;
-               len += sprintf(buf + len, "%3d: ", i);
+               seq_print(p, "%3d: ", i);
 #ifndef CONFIG_SMP
-               len += sprintf(buf + len, "%10u ", kstat_irqs(i));
+               seq_print(p, "%10u ", kstat_irqs(i));
 #else
                for (j = 0; j < smp_num_cpus; j++)
-                       len += sprintf(buf + len, "%10u ",
+                       seq_print(p, "%10u ",
                                       kstat.irqs[cpu_logical_map(j)][i]);
 #endif
-               len += sprintf(buf + len, " %s:%lx", action->name, \
+               seq_print(p, " %s:%lx", action->name,
                                                get_ino_in_irqaction(action));
                for(action = action->next; action; action = action->next) {
-                       len += sprintf(buf+len, ", %s:%lx", action->name, \
+                       seq_print(p, ", %s:%lx", action->name,
                                                get_ino_in_irqaction(action));
                }
-               len += sprintf(buf + len, "\n");
+               seq_putc(p, '\n');
        }
-       return len;
+       return 0;
 }
 
 /* Now these are always passed a true fully specified sun4u INO. */
index a8e695c044b9292e6f1eb5c357de498da6051e86..320f85c612d6284b1813b53418a87ea72a9913fb 100644 (file)
@@ -118,7 +118,6 @@ static int socksys_release(struct inode * inode, struct file * filp)
         struct T_primsg *it;
 
        /* XXX: check this */
-       lock_kernel();
        sock = (struct sol_socket_struct *)filp->private_data;
        SOLDD(("sock release %016lx(%016lx)\n", sock, filp));
        it = sock->pfirst;
@@ -132,7 +131,6 @@ static int socksys_release(struct inode * inode, struct file * filp)
        filp->private_data = NULL;
        SOLDD(("socksys_release %016lx\n", sock));
        mykfree((char*)sock);
-       unlock_kernel();
        return 0;
 }
 
index b95c9340a1f28fa37e509f5732051d0d919d0e99..bf083484a09b533cec8cf37329cc34f832a1f345 100644 (file)
@@ -61,7 +61,6 @@ eh_host_reset_handler:                fas216_eh_host_reset,   \
 eh_bus_reset_handler:          fas216_eh_bus_reset,    \
 eh_device_reset_handler:       fas216_eh_device_reset, \
 eh_abort_handler:              fas216_eh_abort,        \
-use_new_eh_code:               1                       \
        }
 
 #ifndef HOSTS_C
index 1a049d345c6d2e63aaa5dcdbe97f296759fc8041..c5a9ce6cc604ac79053d62c8d236991b3a5a6079 100644 (file)
@@ -575,7 +575,6 @@ static Scsi_Host_Template cumanascsi2_template = {
        eh_bus_reset_handler:           fas216_eh_bus_reset,
        eh_device_reset_handler:        fas216_eh_device_reset,
        eh_abort_handler:               fas216_eh_abort,
-       use_new_eh_code:                1
 };
 
 static int __init cumanascsi2_init(void)
index f2c0c9fc0f765a440d22c28c303fb5ea0dcba157..bb19890edd5046c84e64a38fddc25e3db4fadb28 100644 (file)
@@ -577,7 +577,6 @@ static Scsi_Host_Template eesox_template = {
        eh_bus_reset_handler:           fas216_eh_bus_reset,
        eh_device_reset_handler:        fas216_eh_device_reset,
        eh_abort_handler:               fas216_eh_abort,
-       use_new_eh_code:                1
 };
 
 static int __init eesox_init(void)
index 97b1d07ce4301f2bfe5370031607a50bcd228283..06a3c30430fa15e3e5cc244e126317c5e6c74a20 100644 (file)
@@ -477,7 +477,6 @@ static Scsi_Host_Template powertecscsi_template = {
        eh_bus_reset_handler:           fas216_eh_bus_reset,
        eh_device_reset_handler:        fas216_eh_device_reset,
        eh_abort_handler:               fas216_eh_abort,
-       use_new_eh_code:                1
 };
 
 static int __init powertecscsi_init(void)
index 9be1e65f206957645b090d7da4bdc40b23c6a50b..20dde72f2288fcf84a0450424b504f48b3f7a1aa 100644 (file)
@@ -1946,7 +1946,7 @@ static boolean DAC960_RegisterBlockDevice(DAC960_Controller_T *Controller)
     Initialize the I/O Request Queue.
   */
   RequestQueue = BLK_DEFAULT_QUEUE(MajorNumber);
-  blk_init_queue(RequestQueue, DAC960_RequestFunction, "dac960");
+  blk_init_queue(RequestQueue, DAC960_RequestFunction);
   blk_queue_headactive(RequestQueue, 0);
   RequestQueue->queuedata = Controller;
   RequestQueue->max_segments = Controller->DriverScatterGatherLimit;
index 3788073c6c87b735ef18b65b42e322b92844ba9c..59ceb6203db8922b2247cee6677902d991da41af 100644 (file)
@@ -121,8 +121,8 @@ static char slmmselect_cmd[6]  = { 0x15, 0, 0, 0, 0, 0 };
 static struct slm {
        unsigned        target;                 /* target number */
        unsigned        lun;                    /* LUN in target controller */
-       unsigned        wbusy : 1;              /* output part busy */
-       unsigned        rbusy : 1;              /* status part busy */
+       atomic_t        wr_ok;                  /* set to 0 if output part busy */
+       atomic_t        rd_ok;                  /* set to 0 if status part busy */
 } slm_info[MAX_SLM];
 
 int N_SLM_Printers = 0;
@@ -778,15 +778,17 @@ static int slm_open( struct inode *inode, struct file *file )
 
        if (file->f_mode & 2) {
                /* open for writing is exclusive */
-               if (sip->wbusy)
+               if ( !atomic_dec_and_test(&sip->wr_ok) ) {
+                       atomic_inc(&sip->wr_ok);        
                        return( -EBUSY );
-               sip->wbusy = 1;
+               }
        }
        if (file->f_mode & 1) {
-               /* open for writing is exclusive */
-               if (sip->rbusy)
-                       return( -EBUSY );
-               sip->rbusy = 1;
+               /* open for reading is exclusive */
+                if ( !atomic_dec_and_test(&sip->rd_ok) ) {
+                        atomic_inc(&sip->rd_ok);
+                        return( -EBUSY );
+                }
        }
 
        return( 0 );
@@ -801,12 +803,10 @@ static int slm_release( struct inode *inode, struct file *file )
        device = MINOR(inode->i_rdev);
        sip = &slm_info[device];
 
-       lock_kernel();
        if (file->f_mode & 2)
-               sip->wbusy = 0;
+               atomic_inc( &sip->wr_ok );
        if (file->f_mode & 1)
-               sip->rbusy = 0;
-       unlock_kernel();
+               atomic_inc( &sip->rd_ok );
        
        return( 0 );
 }
@@ -983,8 +983,8 @@ int attach_slm( int target, int lun )
 
        slm_info[N_SLM_Printers].target = target;
        slm_info[N_SLM_Printers].lun    = lun;
-       slm_info[N_SLM_Printers].wbusy  = 0;
-       slm_info[N_SLM_Printers].rbusy  = 0;
+       atomic_set(&slm_info[N_SLM_Printers].wr_ok, 1 ); 
+       atomic_set(&slm_info[N_SLM_Printers].rd_ok, 1 );
        
        printk( KERN_INFO "  Printer: %s\n", SLMBuffer );
        printk( KERN_INFO "Detected slm%d at id %d lun %d\n",
index ae8d0c7c99d8b63bd043eb439c6bd31386b14181..8051819af63f3b36a040b5f972fce1e1e7946a20 100644 (file)
@@ -285,10 +285,6 @@ int blk_ioctl(kdev_t dev, unsigned int cmd, unsigned long arg)
                case BLKELVSET:
                        return -ENOTTY;
 
-               case BLKHASHPROF:
-               case BLKHASHCLEAR:
-                       return bio_ioctl(dev, cmd, arg);
-
                case BLKBSZGET:
                        /* get the logical block size (cf. BLKSSZGET) */
                        intval = BLOCK_SIZE;
index ceba5a95c6215d8906a5f444652dbcba93a87f30..1e92fb02a2af472dc0dab4e0b99ef36478c51c16 100644 (file)
@@ -1866,7 +1866,7 @@ static int __init cciss_init_one(struct pci_dev *pdev,
 
        q = BLK_DEFAULT_QUEUE(MAJOR_NR + i);
         q->queuedata = hba[i];
-        blk_init_queue(q, do_cciss_request, hba[i]->devname);
+        blk_init_queue(q, do_cciss_request);
         blk_queue_headactive(q, 0);            
        blk_queue_bounce_limit(q, hba[i]->pdev->dma_mask);
        q->max_segments = MAXSGENTRIES;
index bb1feff277bca6e737f5906b3385e9d008072b88..a36a0b0557917cd82eccbfc8b29df97f6a0f85ca 100644 (file)
@@ -467,7 +467,7 @@ int __init cpqarray_init(void)
 
                q = BLK_DEFAULT_QUEUE(MAJOR_NR + i);
                q->queuedata = hba[i];
-               blk_init_queue(q, do_ida_request, hba[i]->devname);
+               blk_init_queue(q, do_ida_request);
                blk_queue_headactive(q, 0);
                blk_queue_bounce_limit(q, hba[i]->pci_dev->dma_mask);
                q->max_segments = SG_MAX;
index 4c886d74b9a12faa64517994aeaa9034423c63a3..b0f4639ea8951b50d6c15d94c9b84581c93fbfcb 100644 (file)
@@ -20,7 +20,6 @@
  *
  * Jens:
  * - Rework again to work with bio instead of buffer_heads
- * - added merge by hash-lookup
  * - loose bi_dev comparisons, partition handling is right now
  * - completely modularize elevator setup and teardown
  *
@@ -106,102 +105,54 @@ inline int elv_rq_merge_ok(request_queue_t *q, struct request *rq,
        return 0;
 }
 
-/*
- * find a struct request that has a bio linked that we can merge with
- */
-inline struct request *bio_get_hash_rq(kdev_t dev, sector_t sector, int vc)
-{
-       struct bio *bio = bio_hash_find(dev, sector, vc);
-       struct request *rq = NULL;
-
-       /*
-        * bio is pinned until we bio_put it
-        */
-       if (bio) {
-               rq = bio->bi_hash_desc;
-
-               BUG_ON(!rq);
-
-               bio_put(bio);
-       }
-
-       return rq;
-}
-
 int elevator_linus_merge(request_queue_t *q, struct request **req,
                         struct list_head *head, struct bio *bio)
 {
        unsigned int count = bio_sectors(bio);
-       struct elv_linus_data *edat = q->elevator.elevator_data;
-       unsigned int vc = q->hash_valid_counter;
-       struct list_head *entry;
+       struct list_head *entry = &q->queue_head;
+       int ret = ELEVATOR_NO_MERGE;
        struct request *__rq;
 
-       /*
-        * first try a back merge, then front, then give up and scan. this
-        * will of course fail for different size bios on the same queue,
-        * however that isn't really an issue
-        */
-       if (likely(edat->flags & ELV_LINUS_BACK_MERGE)) {
-               __rq = bio_get_hash_rq(bio->bi_dev, bio->bi_sector - count, vc);
-               if (__rq) {
-                       if (!elv_rq_merge_ok(q, __rq, bio))
-                               goto front;
-
-                       /*
-                        * looks ok to merge
-                        */
-                       if (__rq->sector + __rq->nr_sectors == bio->bi_sector) {
-                               *req = __rq;
-                               return ELEVATOR_BACK_MERGE;
-                       }
-               }
-       }
-
-front:
-       if (likely(edat->flags & ELV_LINUS_FRONT_MERGE)) {
-               __rq = bio_get_hash_rq(bio->bi_dev, bio->bi_sector + count, vc);
-               if (__rq) {
-                       if (!elv_rq_merge_ok(q, __rq, bio))
-                               goto scan;
-
-                       /*
-                        * looks ok to merge
-                        */
-                       if (__rq->sector - count == bio->bi_sector) {
-                               *req = __rq;
-                               return ELEVATOR_FRONT_MERGE;
-                       }
-               }
-       }
-
-       /*
-        * no merge possible, scan for insertion
-        */
-scan:
        entry = &q->queue_head;
        while ((entry = entry->prev) != head) {
                __rq = list_entry_rq(entry);
 
                prefetch(list_entry_rq(entry->prev));
 
+               /*
+                * simply "aging" of requests in queue
+                */
+               if (__rq->elevator_sequence-- <= 0)
+                       break;
+
                if (unlikely(__rq->waiting || __rq->special))
                        continue;
                if (unlikely(!__rq->inactive))
                        break;
                if (!*req && bio_rq_in_between(bio, __rq, &q->queue_head))
                        *req = __rq;
+               if (!elv_rq_merge_ok(q, __rq, bio))
+                       continue;
+
+               if (__rq->elevator_sequence < count)
+                       break;
 
                /*
-                * simple "aging" of requests in queue
+                * we can merge and sequence is ok, check if it's possible
                 */
-               if (__rq->elevator_sequence-- <= 0)
+               if (__rq->sector + __rq->nr_sectors == bio->bi_sector) {
+                       ret = ELEVATOR_BACK_MERGE;
+                       *req = __rq;
                        break;
-               else if (__rq->elevator_sequence < count)
+               } else if (__rq->sector - count == bio->bi_sector) {
+                       ret = ELEVATOR_FRONT_MERGE;
+                       __rq->elevator_sequence -= count;
+                       *req = __rq;
                        break;
+               }
        }
 
-       return ELEVATOR_NO_MERGE;
+       return ret;
 }
 
 void elevator_linus_merge_cleanup(request_queue_t *q, struct request *req, int count)
@@ -231,10 +182,6 @@ void elevator_linus_merge_req(struct request *req, struct request *next)
 void elv_add_request_fn(request_queue_t *q, struct request *rq,
                               struct list_head *insert_here)
 {
-       /*
-        * insert into queue pending list, merge hash, and possible latency
-        * list
-        */
        list_add(&rq->queuelist, insert_here);
 }
 
@@ -248,78 +195,60 @@ struct request *elv_next_request_fn(request_queue_t *q)
 
 int elv_linus_init(request_queue_t *q, elevator_t *e)
 {
-       struct elv_linus_data *edata;
-
-       edata = kmalloc(sizeof(struct elv_linus_data), GFP_ATOMIC);
-       if (!edata)
-               return -ENOMEM;
-
-       /*
-        * default to doing both front and back merges
-        */
-       edata->flags = ELV_LINUS_BACK_MERGE | ELV_LINUS_FRONT_MERGE;
-       e->elevator_data = edata;
        return 0;
 }
 
 void elv_linus_exit(request_queue_t *q, elevator_t *e)
 {
-       kfree(e->elevator_data);
 }
 
 /*
  * See if we can find a request that this buffer can be coalesced with.
  */
 int elevator_noop_merge(request_queue_t *q, struct request **req,
-                       struct list_head * head, struct bio *bio)
+                       struct list_head *head, struct bio *bio)
 {
+       unsigned int count = bio_sectors(bio);
+       struct list_head *entry = &q->queue_head;
        struct request *__rq;
-       int count, ret;
-       unsigned int vc;
 
-       count = bio_sectors(bio);
-       ret = ELEVATOR_NO_MERGE;
-       vc = q->hash_valid_counter;
+       entry = &q->queue_head;
+       while ((entry = entry->prev) != head) {
+               __rq = list_entry_rq(entry);
+
+               prefetch(list_entry_rq(entry->prev));
 
-       __rq = bio_get_hash_rq(bio->bi_dev, bio->bi_sector - count, vc);
-       if (__rq) {
+               if (unlikely(__rq->waiting || __rq->special))
+                       continue;
+               if (unlikely(!__rq->inactive))
+                       break;
                if (!elv_rq_merge_ok(q, __rq, bio))
-                       goto front;
+                       continue;
 
+               /*
+                * we can merge and sequence is ok, check if it's possible
+                */
                if (__rq->sector + __rq->nr_sectors == bio->bi_sector) {
-                       ret = ELEVATOR_BACK_MERGE;
                        *req = __rq;
-                       goto out;
-               }
-       }
-
-front:
-       __rq = bio_get_hash_rq(bio->bi_dev, bio->bi_sector + count, vc);
-       if (__rq) {
-               if (!elv_rq_merge_ok(q, __rq, bio))
-                       goto out;
-
-               if (__rq->sector - count == bio->bi_sector) {
-                       ret = ELEVATOR_FRONT_MERGE;
+                       return ELEVATOR_BACK_MERGE;
+               } else if (__rq->sector - count == bio->bi_sector) {
                        *req = __rq;
-                       goto out;
+                       return ELEVATOR_FRONT_MERGE;
                }
        }
 
-out:
-       return ret;
+       return ELEVATOR_NO_MERGE;
 }
 
 void elevator_noop_merge_cleanup(request_queue_t *q, struct request *req, int count) {}
 
 void elevator_noop_merge_req(struct request *req, struct request *next) {}
 
-int elevator_init(request_queue_t *q, elevator_t *e, elevator_t type,char *name)
+int elevator_init(request_queue_t *q, elevator_t *e, elevator_t type)
 {
        *e = type;
 
        INIT_LIST_HEAD(&q->queue_head);
-       strncpy(e->queue_name, name, 15);
 
        if (e->elevator_init_fn)
                return e->elevator_init_fn(q, e);
index c92c33e80efa810878e18506c0c2c646866bf5ed..c8f223150e7e1fea0a9df27e002293ec1902bb8d 100644 (file)
@@ -4170,7 +4170,7 @@ int __init floppy_init(void)
 
        blk_size[MAJOR_NR] = floppy_sizes;
        blksize_size[MAJOR_NR] = floppy_blocksizes;
-       blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST, "floppy");
+       blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
        reschedule_timeout(MAXTIMEOUT, "floppy init", MAXTIMEOUT);
        config_types();
 
index 1c8d8f37d85752c74993da23b07f3f99d619c8ba..2ecc7c6d3f01209bc7b85cd8b5c36f3c7e177fb6 100644 (file)
@@ -183,7 +183,6 @@ extern int blk_dev_init(void);
 extern int fusion_init(void);
 #endif
 extern int net_dev_init(void);
-extern void console_map_init(void);
 extern int soc_probe(void);
 extern int atmdev_init(void);
 extern int i2o_init(void);
@@ -212,9 +211,6 @@ int __init device_init(void)
 #endif
 #ifdef CONFIG_ATM
        (void) atmdev_init();
-#endif
-#ifdef CONFIG_VT
-       console_map_init();
 #endif
        return 0;
 }
index fc763b5ad7476d7c3e01f6efdc907f473ed5a73a..0a63b5cf261d97a0dfe02b34bd41de034e83dab9 100644 (file)
@@ -243,6 +243,16 @@ void blk_queue_hardsect_size(request_queue_t *q, unsigned short size)
        q->hardsect_size = size;
 }
 
+/**
+ * blk_queue_segment_boundary - set boundary rules for segment merging
+ * @q:  the request queue for the device
+ * @mask:  the memory boundary mask
+ **/
+void blk_queue_segment_boundary(request_queue_t *q, unsigned long mask)
+{
+       q->seg_boundary_mask = mask;
+}
+
 /*
  * can we merge the two segments, or do we need to start a new one?
  */
@@ -256,10 +266,10 @@ inline int blk_same_segment(request_queue_t *q, struct bio *bio,
                return 0;
 
        /*
-        * bio and nxt are contigous, if they don't span a 4GB mem boundary
-        * return ok
+        * bio and nxt are contigous in memory, check if the queue allows
+        * these two to be merged into one
         */
-       if (BIO_PHYS_4G(bio, nxt))
+       if (BIO_SEG_BOUNDARY(q, bio, nxt))
                return 1;
 
        return 0;
@@ -274,11 +284,12 @@ int blk_rq_map_sg(request_queue_t *q, struct request *rq, struct scatterlist *sg
        unsigned long long lastend;
        struct bio_vec *bvec;
        struct bio *bio;
-       int nsegs, i;
+       int nsegs, i, cluster;
 
        nsegs = 0;
        bio = rq->bio;
        lastend = ~0ULL;
+       cluster = q->queue_flags & (1 << QUEUE_FLAG_CLUSTER);
 
        /*
         * for each bio in rq
@@ -290,22 +301,22 @@ int blk_rq_map_sg(request_queue_t *q, struct request *rq, struct scatterlist *sg
                bio_for_each_segment(bvec, bio, i) {
                        int nbytes = bvec->bv_len;
 
-                       BIO_BUG_ON(i > bio->bi_io_vec->bvl_cnt);
+                       BIO_BUG_ON(i > bio->bi_vcnt);
+
+                       if (!cluster)
+                               goto new_segment;
 
                        if (bvec_to_phys(bvec) == lastend) {
-                               if (sg[nsegs - 1].length + nbytes > q->max_segment_size) {
-                                       printk("blk_rq_map_sg: %d segment size exceeded\n", q->max_segment_size);
+                               if (sg[nsegs - 1].length + nbytes > q->max_segment_size)
                                        goto new_segment;
-                               }
 
                                /*
-                                * make sure to not map a 4GB boundary into
-                                * same sg entry
+                                * make sure to not map a segment across a
+                                * boundary that the queue doesn't want
                                 */
-                               if (!__BIO_PHYS_4G(lastend, lastend + nbytes)) {
-                                       printk("blk_rq_map_sg: 4GB cross\n");
+                               if (!__BIO_SEG_BOUNDARY(lastend, lastend + nbytes, q->seg_boundary_mask))
                                        lastend = ~0ULL;
-                               else
+                               else
                                        lastend += nbytes;
 
                                sg[nsegs - 1].length += nbytes;
@@ -549,14 +560,14 @@ static int __make_request(request_queue_t *, struct bio *);
  *    blk_init_queue() must be paired with a blk_cleanup_queue() call
  *    when the block device is deactivated (such as at module unload).
  **/
-int blk_init_queue(request_queue_t *q, request_fn_proc *rfn, char *name)
+int blk_init_queue(request_queue_t *q, request_fn_proc *rfn)
 {
        int ret;
 
        if (blk_init_free_list(q))
                return -ENOMEM;
 
-       if ((ret = elevator_init(q, &q->elevator, ELEVATOR_LINUS, name))) {
+       if ((ret = elevator_init(q, &q->elevator, ELEVATOR_LINUS))) {
                blk_cleanup_queue(q);
                return ret;
        }
@@ -568,13 +579,15 @@ int blk_init_queue(request_queue_t *q, request_fn_proc *rfn, char *name)
        q->plug_tq.sync         = 0;
        q->plug_tq.routine      = &generic_unplug_device;
        q->plug_tq.data         = q;
-       q->queue_flags          = 0;
-
+       q->queue_flags          = (1 << QUEUE_FLAG_CLUSTER);
+       
        /*
         * by default assume old behaviour and bounce for any highmem page
         */
        blk_queue_bounce_limit(q, BLK_BOUNCE_HIGH);
 
+       blk_queue_segment_boundary(q, 0xffffffff);
+
        blk_queue_make_request(q, __make_request);
        blk_queue_max_segment_size(q, MAX_SEGMENT_SIZE);
        return 0;
@@ -708,17 +721,6 @@ void blkdev_release_request(struct request *req)
        req->rq_status = RQ_INACTIVE;
        req->q = NULL;
 
-       /*
-        * should only happen on freereq logic in __make_request, in which
-        * case we don't want to prune these entries from the hash
-        */
-#if 1
-       if (req->bio)
-               bio_hash_remove(req->bio);
-       if (req->biotail)
-               bio_hash_remove(req->biotail);
-#endif
-
        /*
         * Request may not have originated from ll_rw_blk. if not,
         * assume it has free buffers and check waiters
@@ -756,11 +758,6 @@ static void attempt_merge(request_queue_t *q, struct request *req)
        if (q->merge_requests_fn(q, req, next)) {
                q->elevator.elevator_merge_req_fn(req, next);
 
-               bio_hash_remove(req->biotail);
-
-               /*
-                * will handle dangling hash too
-                */
                blkdev_dequeue_request(next);
 
                req->biotail->bi_next = next->bio;
@@ -768,8 +765,6 @@ static void attempt_merge(request_queue_t *q, struct request *req)
 
                next->bio = next->biotail = NULL;
 
-               bio_hash_add_unique(req->biotail, req, q->hash_valid_counter);
-
                req->nr_sectors = req->hard_nr_sectors += next->hard_nr_sectors;
 
                blkdev_release_request(next);
@@ -857,10 +852,8 @@ again:
         * the back of the queue and invalidate the entire existing merge hash
         * for this device
         */
-       if (barrier && !freereq) {
+       if (barrier && !freereq)
                latency = 0;
-               bio_hash_invalidate(q, bio->bi_dev);
-       }
 
        insert_here = head->prev;
        if (blk_queue_empty(q) || barrier) {
@@ -887,8 +880,6 @@ again:
                                break;
                        elevator->elevator_merge_cleanup_fn(q, req, nr_sectors);
 
-                       bio_hash_remove(req->biotail);
-
                        req->biotail->bi_next = bio;
                        req->biotail = bio;
                        req->nr_sectors = req->hard_nr_sectors += nr_sectors;
@@ -903,8 +894,6 @@ again:
                                break;
                        elevator->elevator_merge_cleanup_fn(q, req, nr_sectors);
 
-                       bio_hash_remove(req->bio);
-
                        bio->bi_next = req->bio;
                        req->bio = bio;
                        /*
@@ -973,7 +962,7 @@ get_rq:
        req->hard_sector = req->sector = sector;
        req->hard_nr_sectors = req->nr_sectors = nr_sectors;
        req->current_nr_sectors = req->hard_cur_sectors = cur_nr_sectors;
-       req->nr_segments = bio->bi_io_vec->bvl_cnt;
+       req->nr_segments = bio->bi_vcnt;
        req->nr_hw_segments = req->nr_segments;
        req->buffer = bio_data(bio);    /* see ->buffer comment above */
        req->waiting = NULL;
@@ -987,7 +976,6 @@ out:
        }
 
        spin_unlock_irq(&q->queue_lock);
-       bio_hash_add_unique(bio, req, q->hash_valid_counter);
        return 0;
 
 end_io:
@@ -1035,13 +1023,13 @@ static inline void blk_partition_remap(struct bio *bio)
  *
  * The caller of generic_make_request must make sure that bi_io_vec
  * are set to describe the memory buffer, and that bi_dev and bi_sector are
& set to describe the device address, and the
* set to describe the device address, and the
  * bi_end_io and optionally bi_private are set to describe how
  * completion notification should be signaled.
  *
  * generic_make_request and the drivers it calls may use bi_next if this
  * bio happens to be merged with someone else, and may change bi_dev and
- * bi_rsector for remaps as it sees fit.  So the values of these fields
+ * bi_sector for remaps as it sees fit.  So the values of these fields
  * should NOT be depended on after the call to generic_make_request.
  *
  * */
@@ -1121,11 +1109,6 @@ static int end_bio_bh_io_sync(struct bio *bio, int nr_sectors)
 
        BIO_BUG_ON(nr_sectors != (bh->b_size >> 9));
 
-       /*
-        * I/O is complete -- remove from hash, end buffer_head, put bio
-        */
-       bio_hash_remove(bio);
-
        bh->b_end_io(bh, test_bit(BIO_UPTODATE, &bio->bi_flags));
        bio_put(bio);
 
@@ -1194,13 +1177,13 @@ int submit_bh(int rw, struct buffer_head * bh)
        bio->bi_private = bh;
        bio->bi_end_io = end_bio_bh_io_sync;
 
-       bio->bi_io_vec->bvl_vec[0].bv_page = bh->b_page;
-       bio->bi_io_vec->bvl_vec[0].bv_len = bh->b_size;
-       bio->bi_io_vec->bvl_vec[0].bv_offset = bh_offset(bh);
+       bio->bi_io_vec[0].bv_page = bh->b_page;
+       bio->bi_io_vec[0].bv_len = bh->b_size;
+       bio->bi_io_vec[0].bv_offset = bh_offset(bh);
 
-       bio->bi_io_vec->bvl_cnt = 1;
-       bio->bi_io_vec->bvl_idx = 0;
-       bio->bi_io_vec->bvl_size = bh->b_size;
+       bio->bi_vcnt = 1;
+       bio->bi_idx = 0;
+       bio->bi_size = bh->b_size;
 
        return submit_bio(rw, bio);
 }
@@ -1317,9 +1300,9 @@ extern int stram_device_init (void);
 
 /**
  * end_that_request_first - end I/O on one buffer.
- * &q:        queue that finished request
  * @req:      the request being processed
  * @uptodate: 0 for I/O error
+ * @nr_sectors: number of sectors to end I/O on
  *
  * Description:
  *     Ends I/O on the first buffer attached to @req, and sets it up
@@ -1354,7 +1337,6 @@ next_chunk:
                        bio->bi_next = nxt;
 
                if ((bio = req->bio) != NULL) {
-                       bio_hash_add_unique(bio,req,req->q->hash_valid_counter);
                        req->hard_sector += nsect;
                        req->hard_nr_sectors -= nsect;
                        req->sector = req->hard_sector;
index 6645741359439ebecee2db41ccf930d8c36b945f..4f1bbe9134231d7c25909b610055a2e1b6420b3c 100644 (file)
@@ -330,7 +330,10 @@ static void loop_put_buffer(struct bio *bio)
         * check bi_end_io, may just be a remapped bio
         */
        if (bio && bio->bi_end_io == loop_end_io_transfer) {
-               __free_page(bio_page(bio));
+               int i;
+               for (i = 0; i < bio->bi_vcnt; i++)
+                       __free_page(bio->bi_io_vec[i].bv_page);
+
                bio_put(bio);
        }
 }
@@ -398,7 +401,6 @@ static int loop_end_io_transfer(struct bio *bio, int nr_sectors)
 
 static struct bio *loop_get_buffer(struct loop_device *lo, struct bio *rbh)
 {
-       struct page *page;
        struct bio *bio;
 
        /*
@@ -409,29 +411,7 @@ static struct bio *loop_get_buffer(struct loop_device *lo, struct bio *rbh)
                goto out_bh;
        }
 
-       bio = bio_alloc(GFP_NOIO, 1);
-
-       /*
-        * easy way out, although it does waste some memory for < PAGE_SIZE
-        * blocks... if highmem bounce buffering can get away with it,
-        * so can we :-)
-        */
-       do {
-               page = alloc_page(GFP_NOIO);
-               if (page)
-                       break;
-
-               run_task_queue(&tq_disk);
-               schedule_timeout(HZ);
-       } while (1);
-
-       bio->bi_io_vec->bvl_vec[0].bv_page = page;
-       bio->bi_io_vec->bvl_vec[0].bv_len = bio_size(rbh);
-       bio->bi_io_vec->bvl_vec[0].bv_offset = bio_offset(rbh);
-
-       bio->bi_io_vec->bvl_cnt = 1;
-       bio->bi_io_vec->bvl_idx = 1;
-       bio->bi_io_vec->bvl_size = bio_size(rbh);
+       bio = bio_copy(rbh, GFP_NOIO, rbh->bi_rw & WRITE);
 
        bio->bi_end_io = loop_end_io_transfer;
        bio->bi_private = rbh;
index a52b4a94d0ebecdcf6a6317e1625f23e08dd7e47..a3c9a8696627b316b1193b131220d835039df747 100644 (file)
@@ -501,7 +501,7 @@ static int __init nbd_init(void)
 #endif
        blksize_size[MAJOR_NR] = nbd_blksizes;
        blk_size[MAJOR_NR] = nbd_sizes;
-       blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), do_nbd_request, "nbd");
+       blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), do_nbd_request);
        blk_queue_headactive(BLK_DEFAULT_QUEUE(MAJOR_NR), 0);
        for (i = 0; i < MAX_NBD; i++) {
                nbd_dev[i].refcnt = 0;
index 96ef0c3a111527f7278b5b15a51310e7197a6b59..bf680c0229e29feca729625f951034abff07d1a8 100644 (file)
@@ -276,7 +276,7 @@ void pg_init_units( void )
        pg_drive_count = 0;
        for (unit=0;unit<PG_UNITS;unit++) {
                PG.pi = & PG.pia;
-               PG.access = 0;
+               set_bit( 0, &PG.access );
                PG.busy = 0;
                PG.present = 0;
                PG.bufptr = NULL;
@@ -573,10 +573,7 @@ static int pg_open (struct inode *inode, struct file *file)
 
        if ((unit >= PG_UNITS) || (!PG.present)) return -ENODEV;
 
-       PG.access++;
-
-       if (PG.access > 1) {
-               PG.access--;
+       if ( test_and_set_bit(0, &PG.access) ) {
                return -EBUSY;
        }
 
@@ -590,7 +587,7 @@ static int pg_open (struct inode *inode, struct file *file)
 
        PG.bufptr = kmalloc(PG_MAX_DATA,GFP_KERNEL);
        if (PG.bufptr == NULL) {
-               PG.access--;
+               clear_bit( 0, &PG.access ) ;
                printk("%s: buffer allocation failed\n",PG.name);
                return -ENOMEM;
        }
@@ -602,15 +599,13 @@ static int pg_release (struct inode *inode, struct file *file)
 {
        int     unit = DEVICE_NR(inode->i_rdev);
 
-       if ((unit >= PG_UNITS) || (PG.access <= 0)) 
+       if ( unit >= PG_UNITS || !test_bit(0,&PG.access) )
                return -EINVAL;
 
-       lock_kernel();
-       PG.access--;
+       clear_bit( 0, &PG.access);
 
        kfree(PG.bufptr);
        PG.bufptr = NULL;
-       unlock_kernel();
 
        return 0;
 
index e5bdcd73a3679687f414a1e4001afc3a40da43fc..725960050544413aa32ce5d2d1f77f2cbcfcf247 100644 (file)
@@ -244,7 +244,7 @@ struct pt_unit {
        int flags;                /* various state flags */
        int last_sense;           /* result of last request sense */
        int drive;                /* drive */
-       int access;               /* count of active opens ... */
+       atomic_t available;       /* 1 if access is available 0 otherwise */
        int bs;                   /* block size */
        int capacity;             /* Size of tape in KB */
        int present;              /* device present ? */
@@ -279,7 +279,7 @@ void pt_init_units( void )
         pt_drive_count = 0;
         for (unit=0;unit<PT_UNITS;unit++) {
                 PT.pi = & PT.pia;
-                PT.access = 0;
+                atomic_set( &PT.available, 1 );
                 PT.flags = 0;
                PT.last_sense = 0;
                 PT.present = 0;
@@ -696,22 +696,20 @@ static int pt_open (struct inode *inode, struct file *file)
 
         if ((unit >= PT_UNITS) || (!PT.present)) return -ENODEV;
 
-        PT.access++;
-
-       if (PT.access > 1) {
-               PT.access--;
+       if ( !atomic_dec_and_test(&PT.available) ) {
+               atomic_inc( &PT.available );
                return -EBUSY;
        }
 
        pt_identify(unit);
 
        if (!PT.flags & PT_MEDIA) {
-               PT.access--;
+               atomic_inc( &PT.available );
                return -ENODEV;
                }
 
        if ((!PT.flags & PT_WRITE_OK) && (file ->f_mode & 2)) {
-               PT.access--;
+               atomic_inc( &PT.available );
                return -EROFS;
                }
 
@@ -720,7 +718,7 @@ static int pt_open (struct inode *inode, struct file *file)
 
        PT.bufptr = kmalloc(PT_BUFSIZE,GFP_KERNEL);
        if (PT.bufptr == NULL) {
-               PT.access--;
+               atomic_inc( &PT.available );
                printk("%s: buffer allocation failed\n",PT.name);
                return -ENOMEM;
        }
@@ -775,20 +773,18 @@ static int pt_release (struct inode *inode, struct file *file)
 {
         int    unit = DEVICE_NR(inode->i_rdev);
 
-        if ((unit >= PT_UNITS) || (PT.access <= 0)) 
+        if ((unit >= PT_UNITS) || (atomic_read(&PT.available) > 1)) 
                 return -EINVAL;
 
-       lock_kernel();
        if (PT.flags & PT_WRITING) pt_write_fm(unit);
 
        if (PT.flags & PT_REWIND) pt_rewind(unit);      
 
-       PT.access--;
-
        kfree(PT.bufptr);
        PT.bufptr = NULL;
-       unlock_kernel();
 
+       atomic_inc( &PT.available );
+       
        return 0;
 
 }
index aa848151200c89b57b4649a460312ead4cc9f547..df26dcfecd8500c8aeffe285d3716a90d8067f40 100644 (file)
@@ -89,6 +89,7 @@ static int crd_load(struct file *fp, struct file *outfp);
 
 #ifdef CONFIG_BLK_DEV_INITRD
 static int initrd_users;
+static spinlock_t initrd_users_lock = SPIN_LOCK_UNLOCKED;
 #endif
 #endif
 
@@ -408,12 +409,15 @@ static int initrd_release(struct inode *inode,struct file *file)
 {
        extern void free_initrd_mem(unsigned long, unsigned long);
 
-       lock_kernel();
+       spin_lock( &initrd_users_lock );
        if (!--initrd_users) {
+               spin_unlock( &initrd_users_lock );
                free_initrd_mem(initrd_start, initrd_end);
                initrd_start = 0;
+       } else {
+               spin_unlock( &initrd_users_lock );
        }
-       unlock_kernel();
+               
        blkdev_put(inode->i_bdev, BDEV_FILE);
        return 0;
 }
@@ -433,8 +437,10 @@ static int rd_open(struct inode * inode, struct file * filp)
 
 #ifdef CONFIG_BLK_DEV_INITRD
        if (unit == INITRD_MINOR) {
-               if (!initrd_start) return -ENODEV;
+               spin_lock( &initrd_users_lock );
                initrd_users++;
+               if (!initrd_start) return -ENODEV;
+               spin_unlock( &initrd_users_lock );
                filp->f_op = &initrd_fops;
                return 0;
        }
index c03133abc5bfc48ef69b2d38f15fedf8808673c8..0712b3322574a7d18e650ef29531f549331676f2 100644 (file)
@@ -141,7 +141,6 @@ static int acq_open(struct inode *inode, struct file *file)
 
 static int acq_close(struct inode *inode, struct file *file)
 {
-       lock_kernel();
        if(MINOR(inode->i_rdev)==WATCHDOG_MINOR)
        {
                spin_lock(&acq_lock);
@@ -151,7 +150,6 @@ static int acq_close(struct inode *inode, struct file *file)
                acq_is_open=0;
                spin_unlock(&acq_lock);
        }
-       unlock_kernel();
        return 0;
 }
 
index a63ca830786296364f99846792f4ca428474fcd2..dfb2663ecf18cb321ae510836d058642f1adec07 100644 (file)
@@ -151,7 +151,6 @@ advwdt_open(struct inode *inode, struct file *file)
 static int
 advwdt_close(struct inode *inode, struct file *file)
 {
-       lock_kernel();
        if (MINOR(inode->i_rdev) == WATCHDOG_MINOR) {
                spin_lock(&advwdt_lock);
 #ifndef CONFIG_WATCHDOG_NOWAYOUT       
@@ -160,7 +159,6 @@ advwdt_close(struct inode *inode, struct file *file)
                advwdt_is_open = 0;
                spin_unlock(&advwdt_lock);
        }
-       unlock_kernel();
        return 0;
 }
 
index 1b70fabaa46f7041044f0990e78d988e017541eb..b6b2355e9053f825470fdb21dde5f4224c0b64bc 100644 (file)
@@ -276,6 +276,8 @@ struct agp_bridge_data {
 #define I830_RDRAM_ND(x)           (((x) & 0x20) >> 5)
 #define I830_RDRAM_DDT(x)          (((x) & 0x18) >> 3)
 
+#define INTEL_I830_ERRSTS          0x92
+
 /* intel i820 registers */
 #define INTEL_I820_RDCR     0x51
 #define INTEL_I820_ERRSTS   0xc8
index 8e507bcd48a76c1b67f75cc68fa8b2783aa4f877..85d115fa09ff1a3580ab744b1f75d08ab1963026 100644 (file)
@@ -1705,6 +1705,38 @@ static int intel_860_configure(void)
        return 0;
 }
 
+static int intel_830mp_configure(void)
+{
+       u32 temp;
+       u16 temp2;
+       aper_size_info_8 *current_size;
+
+       current_size = A_SIZE_8(agp_bridge.current_size);
+
+       /* aperture size */
+       pci_write_config_byte(agp_bridge.dev, INTEL_APSIZE,
+                             current_size->size_value);
+
+       /* address to map to */
+       pci_read_config_dword(agp_bridge.dev, INTEL_APBASE, &temp);
+       agp_bridge.gart_bus_addr = (temp & PCI_BASE_ADDRESS_MEM_MASK);
+
+       /* attbase - aperture base */
+       pci_write_config_dword(agp_bridge.dev, INTEL_ATTBASE,
+                              agp_bridge.gatt_bus_addr);
+
+       /* agpctrl */
+       pci_write_config_dword(agp_bridge.dev, INTEL_AGPCTRL, 0x0000);
+
+       /* gmch */
+       pci_read_config_word(agp_bridge.dev, INTEL_NBXCFG, &temp2);
+       pci_write_config_word(agp_bridge.dev, INTEL_NBXCFG,
+                             temp2 | (1 << 9));
+       /* clear any possible AGP-related error conditions */
+       pci_write_config_word(agp_bridge.dev, INTEL_I830_ERRSTS, 0x1c);
+       return 0;
+}
+
 static unsigned long intel_mask_memory(unsigned long addr, int type)
 {
        /* Memory type is ignored */
@@ -1745,6 +1777,14 @@ static aper_size_info_16 intel_generic_sizes[7] =
        {4, 1024, 0, 63}
 };
 
+static aper_size_info_8 intel_830mp_sizes[4] = 
+{
+  {256, 65536, 6, 0},
+  {128, 32768, 5, 32},
+  {64, 16384, 4, 48},
+  {32, 8192, 3, 56}
+};
+
 static int __init intel_generic_setup (struct pci_dev *pdev)
 {
        agp_bridge.masks = intel_generic_masks;
@@ -1809,6 +1849,35 @@ static int __init intel_820_setup (struct pci_dev *pdev)
        (void) pdev; /* unused */
 }
 
+static int __init intel_830mp_setup (struct pci_dev *pdev)
+{
+       agp_bridge.masks = intel_generic_masks;
+       agp_bridge.num_of_masks = 1;
+       agp_bridge.aperture_sizes = (void *) intel_830mp_sizes;
+       agp_bridge.size_type = U8_APER_SIZE;
+       agp_bridge.num_aperture_sizes = 4;
+       agp_bridge.dev_private_data = NULL;
+       agp_bridge.needs_scratch_page = FALSE;
+       agp_bridge.configure = intel_830mp_configure;
+       agp_bridge.fetch_size = intel_8xx_fetch_size;
+       agp_bridge.cleanup = intel_8xx_cleanup;
+       agp_bridge.tlb_flush = intel_8xx_tlbflush;
+       agp_bridge.mask_memory = intel_mask_memory;
+       agp_bridge.agp_enable = agp_generic_agp_enable;
+       agp_bridge.cache_flush = global_cache_flush;
+       agp_bridge.create_gatt_table = agp_generic_create_gatt_table;
+       agp_bridge.free_gatt_table = agp_generic_free_gatt_table;
+       agp_bridge.insert_memory = agp_generic_insert_memory;
+       agp_bridge.remove_memory = agp_generic_remove_memory;
+       agp_bridge.alloc_by_type = agp_generic_alloc_by_type;
+       agp_bridge.free_by_type = agp_generic_free_by_type;
+       agp_bridge.agp_alloc_page = agp_generic_alloc_page;
+       agp_bridge.agp_destroy_page = agp_generic_destroy_page;
+
+       return 0;
+
+       (void) pdev; /* unused */
+}
 
 static int __init intel_840_setup (struct pci_dev *pdev)
 {
@@ -3557,7 +3626,7 @@ static struct {
                INTEL_I830_M,
                "Intel",
                "i830M",
-               intel_generic_setup },
+               intel_830mp_setup },
        { PCI_DEVICE_ID_INTEL_840_0,
                PCI_VENDOR_ID_INTEL,
                INTEL_I840,
@@ -3879,18 +3948,17 @@ static int __init agp_find_supported_device(void)
                        i810_dev = pci_find_device(PCI_VENDOR_ID_INTEL,
                                                                           PCI_DEVICE_ID_INTEL_830_M_1,
                                                                           NULL);
-                       if(PCI_FUNC(i810_dev->devfn) != 0) {
+                       if(i810_dev && PCI_FUNC(i810_dev->devfn) != 0) {
                                i810_dev = pci_find_device(PCI_VENDOR_ID_INTEL,
                                                                                   PCI_DEVICE_ID_INTEL_830_M_1,
                                                                                   i810_dev);
                        }
 
                        if (i810_dev == NULL) {
-                               printk(KERN_ERR PFX "Detected an "
-                                          "Intel 830M, but could not find the"
-                                          " secondary device.\n");
-                               agp_bridge.type = NOT_SUPPORTED;
-                               return -ENODEV;
+                               /* Intel 830MP with external graphic card */
+                               /* It will be initialized later */
+                               agp_bridge.type = INTEL_I830_M;
+                               break;
                        }
                        printk(KERN_INFO PFX "Detected an Intel "
                                   "830M Chipset.\n");
index fab2e5a5bb65956d1418fa63c02752bee09f7285..2e6a7f63ee0c408d6d480315b570d67e6b81415b 100644 (file)
@@ -606,17 +606,14 @@ static int agp_mmap(struct file *file, struct vm_area_struct *vma)
        agp_file_private *priv = (agp_file_private *) file->private_data;
        agp_kern_info kerninfo;
 
-       lock_kernel();
        AGP_LOCK();
 
        if (agp_fe.backend_acquired != TRUE) {
                AGP_UNLOCK();
-               unlock_kernel();
                return -EPERM;
        }
        if (!(test_bit(AGP_FF_IS_VALID, &priv->access_flags))) {
                AGP_UNLOCK();
-               unlock_kernel();
                return -EPERM;
        }
        agp_copy_info(&kerninfo);
@@ -628,51 +625,42 @@ static int agp_mmap(struct file *file, struct vm_area_struct *vma)
        if (test_bit(AGP_FF_IS_CLIENT, &priv->access_flags)) {
                if ((size + offset) > current_size) {
                        AGP_UNLOCK();
-                       unlock_kernel();
                        return -EINVAL;
                }
                client = agp_find_client_by_pid(current->pid);
 
                if (client == NULL) {
                        AGP_UNLOCK();
-                       unlock_kernel();
                        return -EPERM;
                }
                if (!agp_find_seg_in_client(client, offset,
                                            size, vma->vm_page_prot)) {
                        AGP_UNLOCK();
-                       unlock_kernel();
                        return -EINVAL;
                }
                if (remap_page_range(vma->vm_start,
                                     (kerninfo.aper_base + offset),
                                     size, vma->vm_page_prot)) {
                        AGP_UNLOCK();
-                       unlock_kernel();
                        return -EAGAIN;
                }
                AGP_UNLOCK();
-               unlock_kernel();
                return 0;
        }
        if (test_bit(AGP_FF_IS_CONTROLLER, &priv->access_flags)) {
                if (size != current_size) {
                        AGP_UNLOCK();
-                       unlock_kernel();
                        return -EINVAL;
                }
                if (remap_page_range(vma->vm_start, kerninfo.aper_base,
                                     size, vma->vm_page_prot)) {
                        AGP_UNLOCK();
-                       unlock_kernel();
                        return -EAGAIN;
                }
                AGP_UNLOCK();
-               unlock_kernel();
                return 0;
        }
        AGP_UNLOCK();
-       unlock_kernel();
        return -EPERM;
 }
 
@@ -680,7 +668,6 @@ static int agp_release(struct inode *inode, struct file *file)
 {
        agp_file_private *priv = (agp_file_private *) file->private_data;
 
-       lock_kernel();
        AGP_LOCK();
 
        if (test_bit(AGP_FF_IS_CONTROLLER, &priv->access_flags)) {
@@ -702,7 +689,6 @@ static int agp_release(struct inode *inode, struct file *file)
        agp_remove_file_private(priv);
        kfree(priv);
        AGP_UNLOCK();
-       unlock_kernel();
        return 0;
 }
 
index 42bdc16a0dd15464aebe38fbc83dea187f234216..95a66df49796bc67f4cdb523447f6820a1c5ea39 100644 (file)
@@ -171,6 +171,7 @@ static int busmouse_release(struct inode *inode, struct file *file)
        lock_kernel();
        busmouse_fasync(-1, file, 0);
 
+       down(&mouse_sem); /* to protect mse->active */
        if (--mse->active == 0) {
                if (mse->ops->release)
                        ret = mse->ops->release(inode, file);
@@ -179,7 +180,8 @@ static int busmouse_release(struct inode *inode, struct file *file)
                mse->ready = 0;
        }
        unlock_kernel();
-
+       up( &mouse_sem);
+       
        return ret;
 }
 
index 44c06f458606be021094f0b5f1ae1d375b496e80..86299fbdc0823f935fcb7ea1890716cb92f382dd 100644 (file)
@@ -328,10 +328,8 @@ static int dtlk_release(struct inode *inode, struct file *file)
                break;
        }
        TRACE_RET;
-
-       lock_kernel();
+       
        del_timer(&dtlk_timer);
-       unlock_kernel();
 
        return 0;
 }
index e64425dc2c0c27890efa064b66958af1300f0400..3c81b65f923e7699d1f7f565bb4b9b138e796aa5 100644 (file)
@@ -68,7 +68,8 @@ const ftape_info *zft_status;
 
 /*      Local vars.
  */
-static int busy_flag = 0;
+static int busy_flag;
+
 static sigset_t orig_sigmask;
 
 /*  the interface to the kernel vfs layer
@@ -113,14 +114,13 @@ static int zft_open(struct inode *ino, struct file *filep)
        TRACE_FUN(ft_t_flow);
 
        TRACE(ft_t_flow, "called for minor %d", MINOR(ino->i_rdev));
-       if (busy_flag) {
+       if ( test_and_set_bit(0,&busy_flag) )) {
                TRACE_ABORT(-EBUSY, ft_t_warn, "failed: already busy");
        }
-       busy_flag = 1;
        if ((MINOR(ino->i_rdev) & ~(ZFT_MINOR_OP_MASK | FTAPE_NO_REWIND))
             > 
            FTAPE_SEL_D) {
-               busy_flag = 0;
+               clear_bit(0,&busy_flag);
                TRACE_ABORT(-ENXIO, ft_t_err, "failed: illegal unit nr");
        }
        orig_sigmask = current->blocked;
@@ -128,7 +128,7 @@ static int zft_open(struct inode *ino, struct file *filep)
        result = _zft_open(MINOR(ino->i_rdev), filep->f_flags & O_ACCMODE);
        if (result < 0) {
                current->blocked = orig_sigmask; /* restore mask */
-               busy_flag = 0;
+               clear_bit(0,&busy_flag);
                TRACE_ABORT(result, ft_t_err, "_ftape_open failed");
        } else {
                /* Mask signals that will disturb proper operation of the
@@ -147,10 +147,8 @@ static int zft_close(struct inode *ino, struct file *filep)
        int result;
        TRACE_FUN(ft_t_flow);
 
-       lock_kernel();
-       if (!busy_flag || MINOR(ino->i_rdev) != zft_unit) {
+       if ( !test_bit(0,&busy_flag) || MINOR(ino->i_rdev) != zft_unit) {
                TRACE(ft_t_err, "failed: not busy or wrong unit");
-               unlock_kernel();
                TRACE_EXIT 0;
        }
        sigfillset(&current->blocked);
@@ -159,8 +157,7 @@ static int zft_close(struct inode *ino, struct file *filep)
                TRACE(ft_t_err, "_zft_close failed");
        }
        current->blocked = orig_sigmask; /* restore before open state */
-       busy_flag = 0;
-       unlock_kernel();
+       clear_bit(0,&busy_flag);
        TRACE_EXIT 0;
 }
 
@@ -173,7 +170,7 @@ static int zft_ioctl(struct inode *ino, struct file *filep,
        sigset_t old_sigmask;
        TRACE_FUN(ft_t_flow);
 
-       if (!busy_flag || MINOR(ino->i_rdev) != zft_unit || ft_failure) {
+       if ( !test_bit(0,&busy_flag) || MINOR(ino->i_rdev) != zft_unit || ft_failure) {
                TRACE_ABORT(-EIO, ft_t_err,
                            "failed: not busy, failure or wrong unit");
        }
@@ -193,7 +190,7 @@ static int  zft_mmap(struct file *filep, struct vm_area_struct *vma)
        sigset_t old_sigmask;
        TRACE_FUN(ft_t_flow);
 
-       if (!busy_flag || 
+       if ( !test_bit(0,&busy_flag) || 
            MINOR(filep->f_dentry->d_inode->i_rdev) != zft_unit || 
            ft_failure)
        {
@@ -202,14 +199,12 @@ static int  zft_mmap(struct file *filep, struct vm_area_struct *vma)
        }
        old_sigmask = current->blocked; /* save mask */
        sigfillset(&current->blocked);
-       lock_kernel();
        if ((result = ftape_mmap(vma)) >= 0) {
 #ifndef MSYNC_BUG_WAS_FIXED
                static struct vm_operations_struct dummy = { NULL, };
                vma->vm_ops = &dummy;
 #endif
        }
-       unlock_kernel();
        current->blocked = old_sigmask; /* restore mask */
        TRACE_EXIT result;
 }
@@ -225,7 +220,7 @@ static ssize_t zft_read(struct file *fp, char *buff,
        TRACE_FUN(ft_t_flow);
 
        TRACE(ft_t_data_flow, "called with count: %ld", (unsigned long)req_len);
-       if (!busy_flag || MINOR(ino->i_rdev) != zft_unit || ft_failure) {
+       if (!test_bit(0,&busy_flag)  || MINOR(ino->i_rdev) != zft_unit || ft_failure) {
                TRACE_ABORT(-EIO, ft_t_err,
                            "failed: not busy, failure or wrong unit");
        }
@@ -248,7 +243,7 @@ static ssize_t zft_write(struct file *fp, const char *buff,
        TRACE_FUN(ft_t_flow);
 
        TRACE(ft_t_flow, "called with count: %ld", (unsigned long)req_len);
-       if (!busy_flag || MINOR(ino->i_rdev) != zft_unit || ft_failure) {
+       if (!test_bit(0,&busy_flag) || MINOR(ino->i_rdev) != zft_unit || ft_failure) {
                TRACE_ABORT(-EIO, ft_t_err,
                            "failed: not busy, failure or wrong unit");
        }
@@ -403,7 +398,7 @@ KERN_INFO
  */
 static int can_unload(void)
 {
-       return (GET_USE_COUNT(THIS_MODULE)||zft_dirty()||busy_flag)?-EBUSY:0;
+       return (GET_USE_COUNT(THIS_MODULE)||zft_dirty()||test_bit(0,&busy_flag))?-EBUSY:0;
 }
 /* Called by modules package when installing the driver
  */
index 670d5d871876358470eb6ffdc54dee1827384a29..e4c0130c7c545d5cb4fdff5954926fcac8ffffb7 100644 (file)
@@ -494,11 +494,9 @@ static int lp_release(struct inode * inode, struct file * file)
        parport_negotiate (lp_table[minor].dev->port, IEEE1284_MODE_COMPAT);
        lp_table[minor].current_mode = IEEE1284_MODE_COMPAT;
        lp_release_parport (&lp_table[minor]);
-       lock_kernel();
        kfree(lp_table[minor].lp_buffer);
        lp_table[minor].lp_buffer = NULL;
        LP_F(minor) &= ~LP_BUSY;
-       unlock_kernel();
        return 0;
 }
 
index 2a07641a38ad38798f2525a4470fb2386a539a41..3f6e87a7c0d2d7b53f8da438e4df02e760112cae 100644 (file)
@@ -101,11 +101,9 @@ static int mixcomwd_open(struct inode *inode, struct file *file)
 static int mixcomwd_release(struct inode *inode, struct file *file)
 {
 
-       lock_kernel();
 #ifndef CONFIG_WATCHDOG_NOWAYOUT
        if(mixcomwd_timer_alive) {
                printk(KERN_ERR "mixcomwd: release called while internal timer alive");
-               unlock_kernel();
                return -EBUSY;
        }
        init_timer(&mixcomwd_timer);
@@ -117,7 +115,6 @@ static int mixcomwd_release(struct inode *inode, struct file *file)
 #endif
 
        clear_bit(0,&mixcomwd_opened);
-       unlock_kernel();
        return 0;
 }
 
index 1959e9ed31d2ce9a6045588032ceea1700d3c507..fae1d0e9490effdc269c670e795eac46ba1f78db 100644 (file)
 #include <asm/system.h>
 
 static int nvram_open_cnt;     /* #times opened */
-static int nvram_open_mode;            /* special open modes */
+static int nvram_open_mode;    /* special open modes */
+static spinlock_t nvram_open_lock = SPIN_LOCK_UNLOCKED;
+                               /* guards nvram_open_cnt and
+                                         nvram_open_mode */
 #define        NVRAM_WRITE             1               /* opened for writing (exclusive) */
 #define        NVRAM_EXCL              2               /* opened with O_EXCL */
 
@@ -326,29 +329,33 @@ static int nvram_ioctl( struct inode *inode, struct file *file,
 
 static int nvram_open( struct inode *inode, struct file *file )
 {
+       spin_lock( &nvram_open_lock );
        if ((nvram_open_cnt && (file->f_flags & O_EXCL)) ||
                (nvram_open_mode & NVRAM_EXCL) ||
                ((file->f_mode & 2) && (nvram_open_mode & NVRAM_WRITE)))
+       {       
+               spin_unlock( &nvram_open_lock );
                return( -EBUSY );
+       }
 
        if (file->f_flags & O_EXCL)
                nvram_open_mode |= NVRAM_EXCL;
        if (file->f_mode & 2)
                nvram_open_mode |= NVRAM_WRITE;
        nvram_open_cnt++;
+       spin_unlock( &nvram_open_lock );
        return( 0 );
 }
 
 static int nvram_release( struct inode *inode, struct file *file )
 {
-       lock_kernel();
+       spin_lock( &nvram_open_lock );
        nvram_open_cnt--;
        if (file->f_flags & O_EXCL)
                nvram_open_mode &= ~NVRAM_EXCL;
        if (file->f_mode & 2)
                nvram_open_mode &= ~NVRAM_WRITE;
-       unlock_kernel();
-
+       spin_unlock( &nvram_open_lock );
        return( 0 );
 }
 
index 36534874246227271e719a85df4fa5713240c349..e734c8dbefe3df5c54292ecd871dae5aea27f10b 100644 (file)
@@ -68,7 +68,9 @@ static struct pc110pad_params current_params;
 /* driver/filesystem interface management */
 static wait_queue_head_t queue;
 static struct fasync_struct *asyncptr;
-static int active;     /* number of concurrent open()s */
+static active_count = 0;       /* number of concurrent open()s */
+static spinlock_t active_lock = SPIN_LOCK_UNLOCKED;
+/* this lock should be held when referencing active_count */
 static struct semaphore reader_lock;
 
 /**
@@ -584,11 +586,11 @@ static int fasync_pad(int fd, struct file *filp, int on)
  
 static int close_pad(struct inode * inode, struct file * file)
 {
-       lock_kernel();
        fasync_pad(-1, file, 0);
-       if (!--active)
+       spin_lock( &active_lock );
+       if (!--active_count)
                outb(0x30, current_params.io+2);  /* switch off digitiser */
-       unlock_kernel();
+       spin_unlock( &active_lock );    
        return 0;
 }
 
@@ -608,8 +610,13 @@ static int open_pad(struct inode * inode, struct file * file)
 {
        unsigned long flags;
        
-       if (active++)
+       spin_lock( &active_lock );
+       if (active_count++)
+        {
+               spin_unlock( &active_lock );
                return 0;
+       }
+       spin_unlock( &active_lock );
 
        save_flags(flags);
        cli();
index 45aa4efc3a07009acc7da98593b43c46e5197be7..52bf80f9c8490300b763b33bbed02dec26392dee 100644 (file)
@@ -90,6 +90,7 @@ static int __init psaux_init(void);
  
 static struct aux_queue *queue;        /* Mouse data buffer. */
 static int aux_count;
+static spinlock_t aux_count_lock = SPIN_LOCK_UNLOCKED;
 /* used when we send commands to the mouse that expect an ACK. */
 static unsigned char mouse_reply_expected;
 
@@ -405,8 +406,9 @@ int pckbd_pm_resume(struct pm_dev *dev, pm_request_t rqst, void *data)
 
        if (rqst == PM_RESUME) {
                if (queue) {                    /* Aux port detected */
-                       if (aux_count == 0) {   /* Mouse not in use */ 
-                               spin_lock_irqsave(&kbd_controller_lock, flags);
+                      spin_lock_irqsave( &aux_count_lock, flags);
+                      if ( aux_count == 0) {   /* Mouse not in use */ 
+                               spin_lock(&kbd_controller_lock);
                               /*
                                * Dell Lat. C600 A06 enables mouse after resume.
                                * When user touches the pad, it posts IRQ 12
@@ -418,8 +420,9 @@ int pckbd_pm_resume(struct pm_dev *dev, pm_request_t rqst, void *data)
                               kbd_write_command(KBD_CCMD_WRITE_MODE);
                               kb_wait();
                               kbd_write_output(AUX_INTS_OFF);
-                              spin_unlock_irqrestore(&kbd_controller_lock, flags);
+                              spin_unlock(&kbd_controller_lock, flags);
                       }
+                      spin_unlock_irqrestore( &aux_count_lock,flags );
               }
        }
 #endif
@@ -430,6 +433,7 @@ int pckbd_pm_resume(struct pm_dev *dev, pm_request_t rqst, void *data)
 static inline void handle_mouse_event(unsigned char scancode)
 {
 #ifdef CONFIG_PSMOUSE
+       int flags;
        static unsigned char prev_code;
        if (mouse_reply_expected) {
                if (scancode == AUX_ACK) {
@@ -448,7 +452,8 @@ static inline void handle_mouse_event(unsigned char scancode)
 
        prev_code = scancode;
        add_mouse_randomness(scancode);
-       if (aux_count) {
+       spin_lock_irqsave( &aux_count_lock, flags);
+       if ( aux_count ) {
                int head = queue->head;
 
                queue->buf[head] = scancode;
@@ -459,6 +464,7 @@ static inline void handle_mouse_event(unsigned char scancode)
                        wake_up_interruptible(&queue->proc_list);
                }
        }
+       spin_unlock_irqrestore( &aux_count_lock, flags);
 #endif
 }
 
@@ -1046,16 +1052,17 @@ static int fasync_aux(int fd, struct file *filp, int on)
 
 static int release_aux(struct inode * inode, struct file * file)
 {
-       lock_kernel();
+       int flags;
        fasync_aux(-1, file, 0);
-       if (--aux_count) {
-               unlock_kernel();
+       spin_lock_irqsave( &aux_count, flags );
+       if ( --aux_count ) {
+               spin_unlock_irqrestore( &aux_count_lock );
                return 0;
        }
+       spin_unlock_irqrestore( &aux_count_lock, flags );
        kbd_write_cmd(AUX_INTS_OFF);                        /* Disable controller ints */
        kbd_write_command_w(KBD_CCMD_MOUSE_DISABLE);
        aux_free_irq(AUX_DEV);
-       unlock_kernel();
        return 0;
 }
 
@@ -1066,12 +1073,16 @@ static int release_aux(struct inode * inode, struct file * file)
 
 static int open_aux(struct inode * inode, struct file * file)
 {
-       if (aux_count++) {
+       int flags;
+       spin_lock_irqsave( &aux_count_lock, flags );
+       if ( aux_count++ ) {
+               spin_unlock_irqrestore( &aux_count_lock );
                return 0;
        }
        queue->head = queue->tail = 0;          /* Flush input queue */
        if (aux_request_irq(keyboard_interrupt, AUX_DEV)) {
                aux_count--;
+               spin_unlock_irqrestore( &aux_count_lock, flags );
                return -EBUSY;
        }
        kbd_write_command_w(KBD_CCMD_MOUSE_ENABLE);     /* Enable the
@@ -1083,7 +1094,7 @@ static int open_aux(struct inode * inode, struct file * file)
        mdelay(2);                      /* Ensure we follow the kbc access delay rules.. */
 
        send_data(KBD_CMD_ENABLE);      /* try to workaround toshiba4030cdt problem */
-
+       spin_unlock_irqrestore( &aux_count_lock, flags );
        return 0;
 }
 
index c6631159ed89f0dee63f18ec9958430dc71d8b81..c85da8a9477cc78783bf2f75fd9d6efc35600c84 100644 (file)
@@ -100,7 +100,8 @@ static int pcwd_ioports[] = { 0x270, 0x350, 0x370, 0x000 };
 #define WD_SRLY2                0x80   /* Software external relay triggered */
 
 static int current_readport, revision, temp_panic;
-static int is_open, initial_status, supports_temp, mode_debug;
+static atomic_t open_allowed = ATOMIC_INIT(1);
+static int initial_status, supports_temp, mode_debug;
 static spinlock_t io_lock;
 
 /*
@@ -402,9 +403,12 @@ static int pcwd_open(struct inode *ino, struct file *filep)
         switch (MINOR(ino->i_rdev))
         {
                 case WATCHDOG_MINOR:
-                    if (is_open)
+                    if ( !atomic_dec_and_test(&open_allowed) )
+                   {
+                       atomic_inc( &open_allowed );
                         return -EBUSY;
-                    MOD_INC_USE_COUNT;
+                    }
+                   MOD_INC_USE_COUNT;
                     /*  Enable the port  */
                     if (revision == PCWD_REVISION_C)
                     {
@@ -412,7 +416,6 @@ static int pcwd_open(struct inode *ino, struct file *filep)
                        outb_p(0x00, current_readport + 3);
                        spin_unlock(&io_lock);
                     }
-                    is_open = 1;
                     return(0);
                 case TEMP_MINOR:
                     return(0);
@@ -452,8 +455,6 @@ static int pcwd_close(struct inode *ino, struct file *filep)
 {
        if (MINOR(ino->i_rdev)==WATCHDOG_MINOR)
        {
-               lock_kernel();
-               is_open = 0;
 #ifndef CONFIG_WATCHDOG_NOWAYOUT
                /*  Disable the board  */
                if (revision == PCWD_REVISION_C) {
@@ -462,8 +463,8 @@ static int pcwd_close(struct inode *ino, struct file *filep)
                        outb_p(0xA5, current_readport + 3);
                        spin_unlock(&io_lock);
                }
+               atomic_inc( &open_allowed );
 #endif
-               unlock_kernel();
        }
        return 0;
 }
@@ -574,7 +575,7 @@ static int __init pcwatchdog_init(void)
        printk("pcwd: v%s Ken Hollis (kenji@bitgate.com)\n", WD_VER);
 
        /* Initial variables */
-       is_open = 0;
+       set_bit( 0, &open_allowed );
        supports_temp = 0;
        mode_debug = 0;
        temp_panic = 0;
index 2e9e326b034c88a3c564a7d55d0d20ffa49857ed..2a2dea8fa9a548dc26c0daef0d961d7659c3d59e 100644 (file)
@@ -646,7 +646,6 @@ static int pp_release (struct inode * inode, struct file * file)
        struct pp_struct *pp = file->private_data;
        int compat_negot;
 
-       lock_kernel();
        compat_negot = 0;
        if (!(pp->flags & PP_CLAIMED) && pp->pdev &&
            (pp->state.mode != IEEE1284_MODE_COMPAT)) {
@@ -695,7 +694,6 @@ static int pp_release (struct inode * inode, struct file * file)
                printk (KERN_DEBUG CHRDEV "%x: unregistered pardevice\n",
                        minor);
        }
-       unlock_kernel();
 
        kfree (pp);
 
index e8228cc9e993dde870505033f533b003e6e247ef..a83dabff39b462363b4e3b1ae607b457cf8c6be5 100644 (file)
@@ -111,6 +111,7 @@ static int fasync_qp(int fd, struct file *filp, int on)
 
 static int qp_present;
 static int qp_count;
+static spinlock_t qp_count_lock = SPIN_LOCK_UNLOCKED;
 static int qp_data = QP_DATA;
 static int qp_status = QP_STATUS;
 
@@ -141,8 +142,8 @@ static int release_qp(struct inode * inode, struct file * file)
 {
        unsigned char status;
 
-       lock_kernel();
        fasync_qp(-1, file, 0);
+       spin_lock( &qp_count_lock );    
        if (!--qp_count) {
                if (!poll_qp_status())
                        printk(KERN_WARNING "Warning: Mouse device busy in release_qp()\n");
@@ -152,7 +153,7 @@ static int release_qp(struct inode * inode, struct file * file)
                        printk(KERN_WARNING "Warning: Mouse device busy in release_qp()\n");
                free_irq(QP_IRQ, NULL);
        }
-       unlock_kernel();
+       spin_unlock( &qp_count_lock );
        return 0;
 }
 
@@ -168,8 +169,13 @@ static int open_qp(struct inode * inode, struct file * file)
        if (!qp_present)
                return -EINVAL;
 
+       spin_lock( &qp_count_lock );
        if (qp_count++)
+       {
+               spin_unlock( &qp_count_lock );
                return 0;
+       }
+       spin_unlock( &qp_count_lock );
 
        if (request_irq(QP_IRQ, qp_interrupt, 0, "PS/2 Mouse", NULL)) {
                qp_count--;
index 28e7668ce2df522d54664e3af6c955de9d2f3a06..50089019ffd72a30259cf39a187791e7a7211ec6 100644 (file)
@@ -492,10 +492,8 @@ static int fasync_aux(int fd, struct file *filp, int on)
 
 static int release_aux(struct inode * inode, struct file * file)
 {
-       lock_kernel();
        fasync_aux(-1, file, 0);
        aux_count--;
-       unlock_kernel();
        return 0;
 }
 
index aae5ad190ee8f4ec64287f28115d52f3a3a935bc..e38516fc33539389e2c277f80dff52a0b8bc66e1 100644 (file)
@@ -214,7 +214,6 @@ static int fop_open(struct inode * inode, struct file * file)
 
 static int fop_close(struct inode * inode, struct file * file)
 {
-       lock_kernel();
        if(MINOR(inode->i_rdev) == WATCHDOG_MINOR) 
        {
                if(wdt_expect_close)
@@ -225,7 +224,6 @@ static int fop_close(struct inode * inode, struct file * file)
                }
        }
        wdt_is_open = 0;
-       unlock_kernel();
        return 0;
 }
 
index 8342877b3a8bbcd1b085bf0b1cd0383dc451e28c..7635904d932c5c174085313552dbddbbfd1f8f60 100644 (file)
@@ -100,12 +100,10 @@ static int softdog_release(struct inode *inode, struct file *file)
         *      Shut off the timer.
         *      Lock it in if it's a module and we defined ...NOWAYOUT
         */
-        lock_kernel();
 #ifndef CONFIG_WATCHDOG_NOWAYOUT        
        del_timer(&watchdog_ticktock);
 #endif 
        timer_alive=0;
-       unlock_kernel();
        return 0;
 }
 
index c4c41773dc1c2b214222330f8a1b17c42a1ecf71..1bdc186d970a1027143dc09442b922cd9ebe041d 100644 (file)
@@ -2395,7 +2395,6 @@ static int qic02_tape_release(struct inode *inode, struct file *filp)
 {
        kdev_t dev = inode->i_rdev;
 
-       lock_kernel();
        if (TP_DIAGS(dev)) {
                printk("qic02_tape_release: dev=%s\n", kdevname(dev));
        }
@@ -2419,7 +2418,6 @@ static int qic02_tape_release(struct inode *inode, struct file *filp)
                        (void) do_qic_cmd(QCMD_REWIND, TIM_R);
                }
        }
-       unlock_kernel();
        return 0;
 }                              /* qic02_tape_release */
 
index 4c0a0b73af3387c25d3d86da7e84576e826a396d..c26518bbd8824807afdebf02ba2aca34c6d65557 100644 (file)
@@ -2317,7 +2317,9 @@ void __init tty_init(void)
        if (tty_register_driver(&dev_console_driver))
                panic("Couldn't register /dev/tty0 driver\n");
 
+       vcs_init();
        kbd_init();
+       console_map_init();
 #endif
 
 #ifdef CONFIG_ESPSERIAL  /* init ESP before rs, so rs doesn't see the port */
@@ -2363,9 +2365,6 @@ void __init tty_init(void)
 #ifdef CONFIG_MOXA_INTELLIO
        moxa_init();
 #endif 
-#ifdef CONFIG_VT
-       vcs_init();
-#endif
 #ifdef CONFIG_TN3270
        tub3270_init();
 #endif
index 1ea6abb2bf99ede3b1181299fb7e5823eab322a2..f621c158f547a91b677112e5db68e2180b0deea1 100644 (file)
@@ -214,7 +214,6 @@ static int fop_open(struct inode * inode, struct file * file)
 
 static int fop_close(struct inode * inode, struct file * file)
 {
-       lock_kernel();
        if(MINOR(inode->i_rdev) == WATCHDOG_MINOR) 
        {
                if(wdt_expect_close)
@@ -225,7 +224,6 @@ static int fop_close(struct inode * inode, struct file * file)
                }
        }
        wdt_is_open = 0;
-       unlock_kernel();
        return 0;
 }
 
index 7ff3e7d3dcedb4eb5fe822806aece5413ff0ec27..1f08416590b6297b2f20733fe60d107357ae639a 100644 (file)
@@ -374,7 +374,6 @@ static int wdt_open(struct inode *inode, struct file *file)
  
 static int wdt_release(struct inode *inode, struct file *file)
 {
-       lock_kernel();
        if(MINOR(inode->i_rdev)==WATCHDOG_MINOR)
        {
 #ifndef CONFIG_WATCHDOG_NOWAYOUT       
@@ -383,7 +382,6 @@ static int wdt_release(struct inode *inode, struct file *file)
 #endif         
                wdt_is_open=0;
        }
-       unlock_kernel();
        return 0;
 }
 
index ca1b7632876999c4d8f9892f13e8cdd98d9eed58..ee59d8f94ad8755f9720c2a021976e6a04a16e56 100644 (file)
@@ -94,10 +94,8 @@ static int watchdog_open(struct inode *inode, struct file *file)
 static int watchdog_release(struct inode *inode, struct file *file)
 {
 #ifdef ONLY_TESTING
-       lock_kernel();
        free_irq(IRQ_TIMER4, NULL);
        timer_alive = 0;
-       unlock_kernel();
 #else
        /*
         *      It's irreversible!
index 74f1fcdbbce75c3ce09b80b6241c7293556f8759..7f9dde05cf2694868bf0c3a13f4665204bf4a600 100644 (file)
@@ -92,7 +92,6 @@ static int wdt977_release(struct inode *inode, struct file *file)
         *      Lock it in if it's a module and we defined ...NOWAYOUT
         */
 #ifndef CONFIG_WATCHDOG_NOWAYOUT
-       lock_kernel();
 
        // unlock the SuperIO chip
        outb(0x87,0x370); 
@@ -124,7 +123,6 @@ static int wdt977_release(struct inode *inode, struct file *file)
        outb(0xAA,0x370);
 
        timer_alive=0;
-       unlock_kernel();
 
        printk(KERN_INFO "Watchdog: shutdown.\n");
 #endif
index e4c8e99509b31ef25705dbda0f009f89ff5efcf8..bf9265377863eefdfced22fb4991c95c49d47138 100644 (file)
@@ -353,16 +353,16 @@ static int wdtpci_open(struct inode *inode, struct file *file)
        switch(MINOR(inode->i_rdev))
        {
                case WATCHDOG_MINOR:
-                       if(wdt_is_open)
+                       if( test_and_set_bit(0,&wdt_is_open) ) 
+                       {
                                return -EBUSY;
+                       }
 #ifdef CONFIG_WATCHDOG_NOWAYOUT        
                        MOD_INC_USE_COUNT;
 #endif
                        /*
                         *      Activate 
                         */
-        
-                       wdt_is_open=1;
 
                        inb_p(WDT_DC);          /* Disable */
 
@@ -412,13 +412,11 @@ static int wdtpci_release(struct inode *inode, struct file *file)
 {
        if(MINOR(inode->i_rdev)==WATCHDOG_MINOR)
        {
-               lock_kernel();
 #ifndef CONFIG_WATCHDOG_NOWAYOUT       
                inb_p(WDT_DC);          /* Disable counters */
                wdtpci_ctr_load(2,0);   /* 0 length reset pulses now */
 #endif         
-               wdt_is_open=0;
-               unlock_kernel();
+               clear_bit(0, &wdt_is_open );
        }
        return 0;
 }
index a7b80f932f63dc5a667cf909db5235ee58f84d7a..6d3ab38256aaa7b2634aa9a58716ba73cd069890 100644 (file)
@@ -423,14 +423,9 @@ static int i2cdev_release (struct inode *inode, struct file *file)
 #endif
 #if LINUX_KERNEL_VERSION < KERNEL_VERSION(2,4,0)
        MOD_DEC_USE_COUNT;
-#else /* LINUX_KERNEL_VERSION >= KERNEL_VERSION(2,4,0) */
-       lock_kernel();
 #endif /* LINUX_KERNEL_VERSION < KERNEL_VERSION(2,4,0) */
        if (i2cdev_adaps[minor]->dec_use)
                i2cdev_adaps[minor]->dec_use(i2cdev_adaps[minor]);
-#if LINUX_KERNEL_VERSION >= KERNEL_VERSION(2,4,0)
-       unlock_kernel();
-#endif /* LINUX_KERNEL_VERSION >= KERNEL_VERSION(2,4,0) */
        return 0;
 }
 
index 007099395a3e077e5a8f22d85468424de65d892d..82123b2e05731e23fc30ce32e81e53439aa170ed 100644 (file)
@@ -597,7 +597,8 @@ static void ide_init_queue(ide_drive_t *drive)
        int max_sectors;
 
        q->queuedata = HWGROUP(drive);
-       blk_init_queue(q, do_ide_request, drive->name);
+       blk_init_queue(q, do_ide_request);
+       blk_queue_segment_boundary(q, 0xffff);
 
        /* IDE can do up to 128K per request, pdc4030 needs smaller limit */
 #ifdef CONFIG_BLK_DEV_PDC4030
index 85061bb0a99bc3580151649de76459f7aecf263a..2faa1bab9d41d16b6f69c602d6ae9f894a511e45 100644 (file)
@@ -5486,7 +5486,6 @@ static int idetape_chrdev_release (struct inode *inode, struct file *filp)
        idetape_pc_t pc;
        unsigned int minor=MINOR (inode->i_rdev);
 
-       lock_kernel();
        tape = drive->driver_data;
 #if IDETAPE_DEBUG_LOG
        if (tape->debug_level >= 3)
@@ -5517,7 +5516,6 @@ static int idetape_chrdev_release (struct inode *inode, struct file *filp)
                MOD_DEC_USE_COUNT;
        }
        clear_bit (IDETAPE_BUSY, &tape->flags);
-       unlock_kernel();
        return 0;
 }
 
@@ -6180,6 +6178,7 @@ static struct file_operations idetape_fops = {
 };
 
 MODULE_DESCRIPTION("ATAPI Streaming TAPE Driver");
+MODULE_LICENSE("GPL");
 
 static void __exit idetape_exit (void)
 {
index cb993c406896298055fb53b5ac80f0afcc0a338d..ec37c069c635e1c080e220ce00cfbd97db45b084 100644 (file)
@@ -2834,8 +2834,6 @@ static int ide_ioctl (struct inode *inode, struct file *file,
                case BLKELVSET:
                case BLKBSZGET:
                case BLKBSZSET:
-               case BLKHASHPROF:
-               case BLKHASHCLEAR:
                        return blk_ioctl(inode->i_rdev, cmd, arg);
 
                case HDIO_GET_BUSSTATE:
index 903ddbcb775598f8ecf04434652bfb3d32fe46a4..670e3ea6e9a71316e6e53f8a35ec0debf4f6d557 100644 (file)
@@ -949,7 +949,6 @@ static int raw1394_release(struct inode *inode, struct file *file)
         struct pending_request *req;
         int done = 0, i;
 
-        lock_kernel();
         for (i = 0; i < 64; i++) {
                 if (fi->listen_channels & (1ULL << i)) {
                         hpsb_unlisten_channel(hl_handle, fi->host, i);
@@ -990,7 +989,6 @@ static int raw1394_release(struct inode *inode, struct file *file)
         kfree(fi);
 
         V22_COMPAT_MOD_DEC_USE_COUNT;
-        unlock_kernel();
         return 0;
 }
 
index ec72e8895816f5aaadcfb3903d795b4b01b3b622..531b07eddac888640cbad7f6171cfad1892179b3 100644 (file)
@@ -94,7 +94,6 @@ static int evdev_release(struct inode * inode, struct file * file)
        struct evdev_list *list = file->private_data;
        struct evdev_list **listptr;
 
-       lock_kernel();
        listptr = &list->evdev->list;
        evdev_fasync(-1, file, 0);
 
@@ -113,7 +112,6 @@ static int evdev_release(struct inode * inode, struct file * file)
        }
 
        kfree(list);
-       unlock_kernel();
 
        return 0;
 }
index b6e8f5756b272a30d8dd135d8f7a573b04cefd1a..8c1775d606737e433ab0587600a47e3d4e2280ad 100644 (file)
@@ -387,9 +387,7 @@ static int input_open_file(struct inode *inode, struct file *file)
        old_fops = file->f_op;
        file->f_op = new_fops;
 
-       lock_kernel();
        err = new_fops->open(inode, file);
-       unlock_kernel();
 
        if (err) {
                fops_put(file->f_op);
index 260f5d206a6eea2032fc1f27f0cee50b86e4e6b3..bf90692ebadd009988ec373ff5c260292b6829d7 100644 (file)
@@ -164,8 +164,7 @@ static int joydev_release(struct inode * inode, struct file * file)
 {
        struct joydev_list *list = file->private_data;
        struct joydev_list **listptr;
-
-       lock_kernel();
+       
        listptr = &list->joydev->list;
        joydev_fasync(-1, file, 0);
 
@@ -184,7 +183,6 @@ static int joydev_release(struct inode * inode, struct file * file)
        }
 
        kfree(list);
-       unlock_kernel();
 
        return 0;
 }
index 9b8ad23910a0e0318aed3631c9494ef7a40d5758..f9993eded5438bd695076abff40a35af9b22e018 100644 (file)
@@ -169,8 +169,7 @@ static int mousedev_release(struct inode * inode, struct file * file)
 {
        struct mousedev_list *list = file->private_data;
        struct mousedev_list **listptr;
-
-       lock_kernel();
+       
        listptr = &list->mousedev->list;
        mousedev_fasync(-1, file, 0);
 
@@ -208,7 +207,6 @@ static int mousedev_release(struct inode * inode, struct file * file)
        }
        
        kfree(list);
-       unlock_kernel();
 
        return 0;
 }
index b453e3b9fa02fc919afdb84d0cddc1327fdea214..963f4f37f93d98996bf76191eda2e6d2b43d4f13 100644 (file)
@@ -1055,7 +1055,6 @@ capi_release(struct inode *inode, struct file *file)
 {
        struct capidev *cdev = (struct capidev *)file->private_data;
 
-       lock_kernel();
        capincci_free(cdev, 0xffffffff);
        capidev_free(cdev);
        file->private_data = NULL;
@@ -1064,7 +1063,6 @@ capi_release(struct inode *inode, struct file *file)
 #ifdef _DEBUG_REFCOUNT
        printk(KERN_DEBUG "capi_release %d\n", GET_USE_COUNT(THIS_MODULE));
 #endif
-       unlock_kernel();
        return 0;
 }
 
@@ -1243,13 +1241,11 @@ capinc_raw_release(struct inode *inode, struct file *file)
        struct capiminor *mp = (struct capiminor *)file->private_data;
 
        if (mp) {
-               lock_kernel();
                mp->file = 0;
                if (mp->nccip == 0) {
                        capiminor_free(mp);
                        file->private_data = NULL;
                }
-               unlock_kernel();
        }
 
 #ifdef _DEBUG_REFCOUNT
index ce1a5cb85d96b1d3ab3e881b0d343e893d9b4010..1bf95284ea3e35f50a02bb630e8181937d07ff60 100644 (file)
@@ -29,6 +29,7 @@
 ulong if_used = 0;             /* number of interface users */
 static struct divert_info *divert_info_head = NULL;    /* head of queue */
 static struct divert_info *divert_info_tail = NULL;    /* pointer to last entry */
+static spinlock_t divert_info_lock = SPIN_LOCK_UNLOCKED;/* lock for queue */
 static wait_queue_head_t rd_queue;
 
 /*********************************/
@@ -50,8 +51,7 @@ put_info_buffer(char *cp)
                 return;        /* no memory */
        strcpy(ib->info_start, cp);     /* set output string */
        ib->next = NULL;
-       save_flags(flags);
-       cli();
+       spin_lock_irqsave( &divert_info_lock, flags );
        ib->usage_cnt = if_used;
        if (!divert_info_head)
                divert_info_head = ib;  /* new head */
@@ -70,6 +70,7 @@ put_info_buffer(char *cp)
                } else
                        break;
        }                       /* divert_info_head->next */
+       spin_lock_irqrestore( &divert_info_lock, flags );
        wake_up_interruptible(&(rd_queue));
 }                              /* put_info_buffer */
 
@@ -135,17 +136,14 @@ isdn_divert_open(struct inode *ino, struct file *filep)
 {
        unsigned long flags;
 
-       lock_kernel();
-       save_flags(flags);
-       cli();
-       if_used++;
+       spin_lock_irqsave( &divert_info_lock, flags );
+       if_used++;
        if (divert_info_head)
                (struct divert_info **) filep->private_data = &(divert_info_tail->next);
        else
                (struct divert_info **) filep->private_data = &divert_info_head;
-       restore_flags(flags);
+       spin_unlock_irqrestore( &divert_info_lock, flags );
        /*  start_divert(); */
-       unlock_kernel();
        return (0);
 }                              /* isdn_divert_open */
 
@@ -158,9 +156,7 @@ isdn_divert_close(struct inode *ino, struct file *filep)
        struct divert_info *inf;
        unsigned long flags;
 
-       lock_kernel();
-       save_flags(flags);
-       cli();
+       spin_lock_irqsave( &divert_info_lock, flags );
        if_used--;
        inf = *((struct divert_info **) filep->private_data);
        while (inf) {
@@ -174,7 +170,7 @@ isdn_divert_close(struct inode *ino, struct file *filep)
                        divert_info_head = divert_info_head->next;
                        kfree(inf);
                }
-       unlock_kernel();
+       spin_unlock_irq( &divert_info_lock, flags );
        return (0);
 }                              /* isdn_divert_close */
 
index c6a0e48f22cd9f9d276ef2f13c966eebb3fab7f1..4a479ffbc8379ebc9544c49a325f968bf15274bb 100644 (file)
@@ -672,7 +672,6 @@ static int adb_release(struct inode *inode, struct file *file)
        struct adbdev_state *state = file->private_data;
        unsigned long flags;
 
-       lock_kernel();
        if (state) {
                file->private_data = NULL;
                spin_lock_irqsave(&state->lock, flags);
@@ -685,7 +684,6 @@ static int adb_release(struct inode *inode, struct file *file)
                        spin_unlock_irqrestore(&state->lock, flags);
                }
        }
-       unlock_kernel();
        return 0;
 }
 
index 78b2dbb6de1e9fde8144fa886b70c4eb6bbcc428..ae2644f6adfd0a3aa7437e658275120dcd9e2383 100644 (file)
@@ -1983,7 +1983,6 @@ static int pmu_release(struct inode *inode, struct file *file)
        struct pmu_private *pp = file->private_data;
        unsigned long flags;
 
-       lock_kernel();
        if (pp != 0) {
                file->private_data = 0;
                spin_lock_irqsave(&all_pvt_lock, flags);
@@ -1991,7 +1990,6 @@ static int pmu_release(struct inode *inode, struct file *file)
                spin_unlock_irqrestore(&all_pvt_lock, flags);
                kfree(pp);
        }
-       unlock_kernel();
        return 0;
 }
 
index ba144600dcc32f59fa7fc0958f0c9ae38b5494cf..ec2fbc81dd376e9ea4ec179c90b94cfcd4fc29b9 100644 (file)
@@ -198,7 +198,6 @@ extern      void             x_scsi_taskmgmt_bh(void *);
        cmd_per_lun:                    MPT_SCSI_CMD_PER_LUN,   \
        unchecked_isa_dma:              0,                      \
        use_clustering:                 ENABLE_CLUSTERING,      \
-       use_new_eh_code:                1                       \
 }
 
 #else
index d5f093c7464b9c3d9d7f40055408724672ce7471..0c079711e36a52315b7a6390cdbe8cd8631f1f3d 100644 (file)
@@ -410,7 +410,7 @@ static inline void i2ob_end_request(struct request *req)
         * unlocked.
         */
 
-       while (end_that_request_first(req, !req->errors))
+       while (end_that_request_first(req, !req->errors, req->hard_cur_sectors))
                ;
 
        /*
@@ -458,12 +458,6 @@ static void i2o_block_reply(struct i2o_handler *h, struct i2o_controller *c, str
        u8 unit = (m[2]>>8)&0xF0;       /* low 4 bits are partition */
        struct i2ob_device *dev = &i2ob_dev[(unit&0xF0)];
 
-       /*
-        *      Pull the lock over ready
-        */     
-        
-       spin_lock_prefetch(&io_request_lock);
-               
        /*
         * FAILed message
         */
@@ -1405,7 +1399,6 @@ static int i2ob_install_device(struct i2o_controller *c, struct i2o_device *d, i
  */
 static int i2ob_init_iop(unsigned int unit)
 {
-       char name[16];
        int i;
 
        i2ob_queues[unit] = (struct i2ob_iop_queue*)
@@ -1429,8 +1422,7 @@ static int i2ob_init_iop(unsigned int unit)
        i2ob_queues[unit]->i2ob_qhead = &i2ob_queues[unit]->request_queue[0];
        atomic_set(&i2ob_queues[unit]->queue_depth, 0);
 
-       sprintf(name, "i2o%d", unit);
-       blk_init_queue(&i2ob_queues[unit]->req_queue, i2ob_request, name);
+       blk_init_queue(&i2ob_queues[unit]->req_queue, i2ob_request);
        blk_queue_headactive(&i2ob_queues[unit]->req_queue, 0);
        i2ob_queues[unit]->req_queue.queuedata = &i2ob_queues[unit];
 
@@ -1829,7 +1821,7 @@ int i2o_block_init(void)
        blk_size[MAJOR_NR] = i2ob_sizes;
        blk_dev[MAJOR_NR].queue = i2ob_get_queue;
        
-       blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), i2ob_request, "i2o");
+       blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), i2ob_request);
        blk_queue_headactive(BLK_DEFAULT_QUEUE(MAJOR_NR), 0);
 
        for (i = 0; i < MAX_I2OB << 4; i++) {
index db81acf15dd84c9d6acdf4edc7a99ec93d365b4e..2d6d6b539f9289da99c21f0fbff5c43ecab045cc 100644 (file)
@@ -847,7 +847,6 @@ static int cfg_release(struct inode *inode, struct file *file)
        struct i2o_cfg_info *p1, *p2;
        unsigned long flags;
 
-       lock_kernel();
        p1 = p2 = NULL;
 
        spin_lock_irqsave(&i2o_config_lock, flags);
@@ -870,7 +869,6 @@ static int cfg_release(struct inode *inode, struct file *file)
                p1 = p1->next;
        }
        spin_unlock_irqrestore(&i2o_config_lock, flags);
-       unlock_kernel();
 
        return 0;
 }
index cb59ae8f871f8c1c4d91a9ae0317dfd9cb1d2c4e..49d80260a285719ed9ac3eeef025036198cc28e6 100644 (file)
@@ -151,11 +151,10 @@ static void flush_pending(void)
 static void i2o_scsi_reply(struct i2o_handler *h, struct i2o_controller *c, struct i2o_message *msg)
 {
        Scsi_Cmnd *current_command;
+       spinlock_t *lock;
        u32 *m = (u32 *)msg;
        u8 as,ds,st;
 
-       spin_lock_prefetch(&io_request_lock);           
-
        if(m[0] & (1<<13))
        {
                printk("IOP fail.\n");
@@ -190,12 +189,13 @@ static void i2o_scsi_reply(struct i2o_handler *h, struct i2o_controller *c, stru
                {
                        /* Create a scsi error for this */
                        current_command = (Scsi_Cmnd *)m[3];
+                       lock = &current_command->host->host_lock;
                        printk("Aborted %ld\n", current_command->serial_number);
 
-                       spin_lock_irq(&io_request_lock);                        
+                       spin_lock_irq(lock);
                        current_command->result = DID_ERROR << 16;
                        current_command->scsi_done(current_command);
-                       spin_unlock_irq(&io_request_lock);                      
+                       spin_unlock_irq(lock);
                        
                        /* Now flush the message by making it a NOP */
                        m[0]&=0x00FFFFFF;
@@ -284,9 +284,10 @@ static void i2o_scsi_reply(struct i2o_handler *h, struct i2o_controller *c, stru
                 *      It worked maybe ?
                 */             
                current_command->result = DID_OK << 16 | ds;
-       spin_lock(&io_request_lock);
+       lock = &current_command->host->host_lock;
+       spin_lock(lock);
        current_command->scsi_done(current_command);
-       spin_unlock(&io_request_lock);
+       spin_unlock(lock);
        return;
 }
 
index 4b7f58f9afcbde2039009736b0ce8df8d2bd8939..410ca69378c0afe7ab03e828517f3ed722eea04e 100644 (file)
@@ -3802,7 +3802,6 @@ struct pci_dev *pdev = NULL;
                fi->host = host;
                //host->max_id = MAX_SCSI_TARGETS;
                host->max_id = 5;
-               host->hostt->use_new_eh_code = 1;
                host->this_id = tmpt->this_id;
 
                pci_maddr = pci_resource_start(pdev, 0);
index c1bbdd30b1308d726e614c81c83429945ce47f44..cb75c868acfd7cd251c287260727c7e0440568b6 100644 (file)
@@ -325,7 +325,6 @@ static int ppp_release(struct inode *inode, struct file *file)
 {
        struct ppp_file *pf = (struct ppp_file *) file->private_data;
 
-       lock_kernel();
        if (pf != 0) {
                file->private_data = 0;
                if (atomic_dec_and_test(&pf->refcnt)) {
@@ -339,7 +338,6 @@ static int ppp_release(struct inode *inode, struct file *file)
                        }
                }
        }
-       unlock_kernel();
        return 0;
 }
 
index bd77b4b7ab0158cc3f8294b78516c896c41c85e2..2b1a79a9100fca8d05c7cc50aed5731af2987262 100644 (file)
@@ -974,13 +974,11 @@ static int cosa_release(struct inode *inode, struct file *file)
        struct cosa_data *cosa;
        unsigned long flags;
 
-       lock_kernel();
        cosa = channel->cosa;
        spin_lock_irqsave(&cosa->lock, flags);
        cosa->usage--;
        channel->usage--;
        spin_unlock_irqrestore(&cosa->lock, flags);
-       unlock_kernel();
        return 0;
 }
 
index 29ca88040ecf576efb23f74fa89d571a70432124..03c48321a4e2b82a7475dade0c00d9d2fbb7c62e 100644 (file)
@@ -597,7 +597,6 @@ static int ds_release(struct inode *inode, struct file *file)
     DEBUG(0, "ds_release(socket %d)\n", i);
     if ((i >= sockets) || (sockets == 0))
        return 0;
-    lock_kernel();
     s = &socket_table[i];
     user = file->private_data;
     if (CHECK_USER(user))
@@ -615,7 +614,6 @@ static int ds_release(struct inode *inode, struct file *file)
     user->user_magic = 0;
     kfree(user);
 out:
-    unlock_kernel();
     return 0;
 } /* ds_release */
 
index 9f3cc0fc3b13e0911e66badb21ca29e01a07666e..08085e106b1389a903fe52b95881933d1c458b65 100644 (file)
@@ -170,12 +170,10 @@ static int isapnp_info_entry_open(struct inode *inode, struct file *file)
                kfree(buffer);
                return -ENOMEM;
        }
-       lock_kernel();
        buffer->curr = buffer->buffer;
        file->private_data = buffer;
        if (mode == O_RDONLY)
                isapnp_info_read(buffer);
-       unlock_kernel();
        return 0;
 }
 
@@ -187,12 +185,10 @@ static int isapnp_info_entry_release(struct inode *inode, struct file *file)
        if ((buffer = (isapnp_info_buffer_t *) file->private_data) == NULL)
                return -EINVAL;
        mode = file->f_flags & O_ACCMODE;
-       lock_kernel();
        if (mode == O_WRONLY)
                isapnp_info_write(buffer);
        vfree(buffer->buffer);
        kfree(buffer);
-       unlock_kernel();
        return 0;
 }
 
index 44e5a499d58196ad308036a5705a707562af6000..0302b83ae6c32ff09fd0bfadb3fa9e3f300c5ed4 100644 (file)
@@ -461,7 +461,6 @@ void tw_unmask_command_interrupt(TW_Device_Extension *tw_dev);
        present : 0,                                    \
        unchecked_isa_dma : 0,                          \
        use_clustering : ENABLE_CLUSTERING,             \
-       use_new_eh_code : 1,                            \
        emulated : 1                                    \
 }
 #endif /* _3W_XXXX_H */
index 375a42d2b83d3e40268c4e8fb171abdf83078088..6cebda8f4dc8de31561e1e83afb0b92e99eee072 100644 (file)
@@ -267,7 +267,6 @@ NCR_700_detect(Scsi_Host_Template *tpnt,
        tpnt->sg_tablesize = NCR_700_SG_SEGMENTS;
        tpnt->cmd_per_lun = NCR_700_MAX_TAGS;
        tpnt->use_clustering = DISABLE_CLUSTERING;
-       tpnt->use_new_eh_code = 1;
        tpnt->proc_info = NCR_700_proc_directory_info;
        
        if(tpnt->name == NULL)
index e78f2978d9e80ba7413fe5a21d3113dd68135f85..f3528a29e44cd9e47829502774578cd9991efe9a 100644 (file)
@@ -133,11 +133,9 @@ obj-$(CONFIG_BLK_DEV_SR)   += sr_mod.o
 obj-$(CONFIG_CHR_DEV_SG)       += sg.o
 
 list-multi     := scsi_mod.o sd_mod.o sr_mod.o initio.o a100u2w.o cpqfc.o
-scsi_mod-objs  := scsi.o hosts.o scsi_ioctl.o constants.o \
-                       scsicam.o scsi_proc.o scsi_error.o \
-                       scsi_obsolete.o scsi_queue.o scsi_lib.o \
-                       scsi_merge.o scsi_dma.o scsi_scan.o \
-                       scsi_syms.o
+scsi_mod-objs  := scsi.o hosts.o scsi_ioctl.o constants.o scsicam.o \
+                       scsi_proc.o scsi_error.o scsi_queue.o scsi_lib.o \
+                       scsi_merge.o scsi_dma.o scsi_scan.o scsi_syms.o
 sd_mod-objs    := sd.o
 sr_mod-objs    := sr.o sr_ioctl.o sr_vendor.o
 initio-objs    := ini9100u.o i91uscsi.o
index 94643970ff71a8f87be8f1ada72b6435732b4239..22cdadd55f2f7043a46bdc1da2b794cdf10d6ce1 100644 (file)
@@ -77,7 +77,6 @@ void advansys_setup(char *, int *);
     release:                    advansys_release, \
     info:                       advansys_info, \
     queuecommand:               advansys_queuecommand, \
-    use_new_eh_code:           1, \
     eh_bus_reset_handler:      advansys_reset, \
     bios_param:                 advansys_biosparam, \
     /* \
index 324effd0eb723b30fa585d061091a7679f1511de..279cbf2b3d08a193132ddcc69600ffe6d5623df3 100644 (file)
@@ -50,7 +50,6 @@ int aha152x_proc_info(char *buffer, char **start, off_t offset, int length, int
                   present:                     0,                      \
                   unchecked_isa_dma:           0,                      \
                   use_clustering:              DISABLE_CLUSTERING,     \
-                 use_new_eh_code:              1 }
 #endif
 
 
index 7863ce193f68d71bedf06bda72ec132ee8096d42..030590b9dc91cca7c4b8c48071c19f67ec0fb291 100644 (file)
@@ -166,7 +166,6 @@ static int aha1542_biosparam(Disk *, kdev_t, int*);
                     sg_tablesize:              AHA1542_SCATTER,        \
                     cmd_per_lun:               AHA1542_CMDLUN,         \
                     unchecked_isa_dma:         1,                      \
-                    use_clustering:            ENABLE_CLUSTERING,      \
-                    use_new_eh_code:           1}
-
+                    use_clustering:            ENABLE_CLUSTERING       \
+}
 #endif
index 61b734d743ef436c5e58c1e7698e94c659763a70..491b0eb4987267d7d06ae5ba01ac1ef614594fc2 100644 (file)
@@ -89,7 +89,6 @@ int            ahc_linux_abort(Scsi_Cmnd *);
        present: 0,             /* number of 7xxx's present   */\
        unchecked_isa_dma: 0,   /* no memory DMA restrictions */\
        use_clustering: ENABLE_CLUSTERING,                      \
-       use_new_eh_code: 1,                                     \
        highmem_io: 1                                           \
 }
 
index de438cac78fc9540caa92de5dbe02d731892e57e..ce397e38d5e82ac8526524c35b443119cb440ef4 100644 (file)
@@ -55,7 +55,6 @@
        present: 0,             /* number of 7xxx's present   */\
        unchecked_isa_dma: 0,   /* no memory DMA restrictions */\
        use_clustering: ENABLE_CLUSTERING,                      \
-       use_new_eh_code: 0                                      \
 }
 
 extern int aic7xxx_queue(Scsi_Cmnd *, void (*)(Scsi_Cmnd *));
index 39644040a5688673847493ebb9ffda31891d1b15..cda1a387ca67653d7beffb0816e108d728da3dcc 100644 (file)
@@ -65,7 +65,6 @@ extern int atp870u_proc_info(char *, char **, off_t, int, int, int);
        present: 0,             /* number of 7xxx's present   */\
        unchecked_isa_dma: 0,   /* no memory DMA restrictions */\
        use_clustering: ENABLE_CLUSTERING,                      \
-       use_new_eh_code: 0                                      \
 }
 
 #endif
index b65eca0ceb4f4a2cedca3ed16f2e9f39b6f8b76b..529171e82b9a5076ff8ae4e8c22ec4fe339abd8c 100644 (file)
@@ -38,7 +38,6 @@ extern int cpqfcTS_ioctl( Scsi_Device *ScsiDev, int Cmnd, void *arg);
  present:                0,                      \
  unchecked_isa_dma:      0,                      \
  use_clustering:         ENABLE_CLUSTERING,      \
- use_new_eh_code:        1                      \
 }
 
 #endif /* CPQFCTS_H */ 
index 8e3a5c836f294de6eea6c55faf3e556b4185edcf..02fe82eaf1db867a6c6854339fd3257085234777 100644 (file)
@@ -64,7 +64,6 @@ extern int DC390_proc_info(char *buffer, char **start, off_t offset, int length,
    this_id:        7,                                  \
    sg_tablesize:   SG_ALL,                             \
    cmd_per_lun:    16,                                 \
-   NEW_EH                                              \
    unchecked_isa_dma: 0,                               \
    use_clustering: DISABLE_CLUSTERING                  \
    }
index ccf9b9b36ee2683658bd02d8108581c287190e9f..db4e6c8a10434ac36d6cea1633de114149ca349c 100644 (file)
@@ -178,7 +178,6 @@ static int adpt_detect(Scsi_Host_Template* sht)
        adpt_hba* pHba;
 
        adpt_init();
-       sht->use_new_eh_code = 1;
 
        PINFO("Detecting Adaptec I2O RAID controllers...\n");
 
index bf3e89b851cc75d9b08e97c43b4c97bc85a4eaca..670afcc2c07012361cbbb69b1c269156bf09157e 100644 (file)
@@ -95,7 +95,6 @@ static int adpt_device_reset(Scsi_Cmnd* cmd);
        sg_tablesize: 0,                /* max scatter-gather cmds    */\
        cmd_per_lun: 256,               /* cmds per lun (linked cmds) */\
        use_clustering: ENABLE_CLUSTERING,                              \
-       use_new_eh_code: 1,                                             \
        proc_name: "dpt_i2o"    /* this is the name of our proc node*/  \
 }
 #endif
index e75fc5f11a61ec67da359473d827065ae97e7382..afa5e27870f98c36f7c37a4b06ed139ac030d618 100644 (file)
@@ -30,7 +30,6 @@ int eata2x_biosparam(Disk *, kdev_t, int *);
                 this_id:                 7,                                  \
                 unchecked_isa_dma:       1,                                  \
                 use_clustering:          ENABLE_CLUSTERING,                  \
-                use_new_eh_code:         1    /* Enable new error code */    \
              }
 
 #endif
index 9bebad41bad5d1fad7e9bd21efb65bd7ee8e1940..0cc5e37532dbe4e678f770553740cdf932919544 100644 (file)
@@ -416,7 +416,6 @@ extern int esp_revoke(Scsi_Device* SDptr);
                sg_tablesize:   SG_ALL,                         \
                cmd_per_lun:    1,                              \
                use_clustering: ENABLE_CLUSTERING,              \
-               use_new_eh_code: 0                              \
 }
 
 /* For our interrupt engine. */
index 2c8938953bbb32e97f292225118b86aa5795009d..8246571b9cb87ebab0257a7e8156106a0eaece69 100644 (file)
@@ -35,7 +35,6 @@ int fcal_proc_info (char *, char **, off_t, int, int, int);
        sg_tablesize:           1,                              \
        cmd_per_lun:            1,                              \
        use_clustering:         ENABLE_CLUSTERING,              \
-       use_new_eh_code:        FCP_SCSI_USE_NEW_EH_CODE,       \
        abort:                  fcp_old_abort,                  \
        eh_abort_handler:       fcp_scsi_abort,                 \
        eh_device_reset_handler:fcp_scsi_dev_reset,             \
index d97d88382c7bda75b797e81f60be31480d07e50d..26b86f1ffc919e6894d46cd377e944f2ab266b48 100644 (file)
@@ -1060,7 +1060,6 @@ int gdth_eh_host_reset(Scsi_Cmnd *scp);
                present:         0,                               \
                unchecked_isa_dma: 1,                             \
                use_clustering:  ENABLE_CLUSTERING,               \
-               use_new_eh_code: 1       /* use new error code */ }    
 
 #elif LINUX_VERSION_CODE >= 0x02015F
 int gdth_bios_param(Disk *,kdev_t,int *);
@@ -1092,7 +1091,6 @@ int gdth_eh_host_reset(Scsi_Cmnd *scp);
                present:         0,                               \
                unchecked_isa_dma: 1,                             \
                use_clustering:  ENABLE_CLUSTERING,               \
-               use_new_eh_code: 1       /* use new error code */ }    
 
 #elif LINUX_VERSION_CODE >= 0x010300
 int gdth_bios_param(Disk *,kdev_t,int *);
index 5c7843cceafd979ed0e39251449a3773fb135778..08f3ea2805b8e5cee380d2caa4d97c2afbdac2fb 100644 (file)
@@ -279,13 +279,6 @@ typedef struct     SHT
      */
     unsigned use_clustering:1;
 
-    /*
-     * True if this driver uses the new error handling code.  This flag is
-     * really only temporary until all of the other drivers get converted
-     * to use the new error handling code.
-     */
-    unsigned use_new_eh_code:1;
-
     /*
      * True for emulated SCSI host adapters (e.g. ATAPI)
      */
index 2560896a16de6aef62d82fdf4263094d258b2053..fee933c8a729e9a3b27f7495361e7e0e9c7f08ac 100644 (file)
@@ -661,11 +661,12 @@ static inline struct bio *idescsi_kmalloc_bio (int count)
 
        if ((first_bh = bhp = bh = bio_alloc(GFP_ATOMIC, 1)) == NULL)
                goto abort;
-       memset (bh, 0, sizeof (struct bio));
+       bio_init(bh);
        while (--count) {
                if ((bh = bio_alloc(GFP_ATOMIC, 1)) == NULL)
                        goto abort;
-               memset (bh, 0, sizeof (struct bio));
+               bio_init(bh);
+               bh->bi_vcnt = 1;
                bhp->bi_next = bh;
                bhp = bh;
                bh->bi_next = NULL;
@@ -707,10 +708,16 @@ static inline struct bio *idescsi_dma_bio(ide_drive_t *drive, idescsi_pc_t *pc)
                printk ("ide-scsi: %s: building DMA table, %d segments, %dkB total\n", drive->name, segments, pc->request_transfer >> 10);
 #endif /* IDESCSI_DEBUG_LOG */
                while (segments--) {
-                       bh->bi_io_vec.bv_page = sg->page;
-                       bh->bi_io_vec.bv_len = sg->length;
-                       bh->bi_io_vec.bv_offset = sg->offset;
+                       bh->bi_io_vec[0].bv_page = sg->page;
+                       bh->bi_io_vec[0].bv_len = sg->length;
+                       bh->bi_io_vec[0].bv_offset = sg->offset;
+                       bh->bi_size = sg->length;
                        bh = bh->bi_next;
+                       /*
+                        * just until scsi_merge is fixed up...
+                        */
+                       BUG_ON(PageHighMem(sg->page));
+                       sg->address = page_address(sg->page) + sg->offset;
                        sg++;
                }
        } else {
@@ -719,9 +726,10 @@ static inline struct bio *idescsi_dma_bio(ide_drive_t *drive, idescsi_pc_t *pc)
 #if IDESCSI_DEBUG_LOG
                printk ("ide-scsi: %s: building DMA table for a single buffer (%dkB)\n", drive->name, pc->request_transfer >> 10);
 #endif /* IDESCSI_DEBUG_LOG */
-               bh->bi_io_vec.bv_page = virt_to_page(pc->scsi_cmd->request_buffer);
-               bh->bi_io_vec.bv_len = pc->request_transfer;
-               bh->bi_io_vec.bv_offset = (unsigned long) pc->scsi_cmd->request_buffer & ~PAGE_MASK;
+               bh->bi_io_vec[0].bv_page = virt_to_page(pc->scsi_cmd->request_buffer);
+               bh->bi_io_vec[0].bv_len = pc->request_transfer;
+               bh->bi_io_vec[0].bv_offset = (unsigned long) pc->scsi_cmd->request_buffer & ~PAGE_MASK;
+               bh->bi_size = pc->request_transfer;
        }
        return first_bh;
 }
index 9fff312a0c9d41b07207c8d921e16ff5f717d154..ab3c8a71c3697cc3ddfef4ac31851e63a83811e5 100644 (file)
@@ -175,7 +175,6 @@ int imm_biosparam(Disk *, kdev_t, int *);
                 eh_device_reset_handler:        NULL,                   \
                 eh_bus_reset_handler:           imm_reset,              \
                 eh_host_reset_handler:          imm_reset,              \
-               use_new_eh_code:                1,                      \
                bios_param:                     imm_biosparam,          \
                this_id:                        7,                      \
                sg_tablesize:                   SG_ALL,                 \
index 2b7121a9b329faad913d5c63c67bc843ae34c4b2..7fe39c451332aafb2a7aa127dd7c06fbb6212ff2 100644 (file)
@@ -423,7 +423,6 @@ int in2000_reset(Scsi_Cmnd *, unsigned int);
                   sg_tablesize:    IN2000_SG,           /* scatter-gather table size */ \
                   cmd_per_lun:     IN2000_CPL,          /* commands per lun */ \
                   use_clustering:  DISABLE_CLUSTERING,  /* ENABLE_CLUSTERING may speed things up */ \
-                  use_new_eh_code: 0                    /* new error code - not using it yet */ \
                 }
 
 #endif /* IN2000_H */
index 910ea9aaff66da5602c70e931209dd118ea32c2b..557518771e400e418c624992dddb53be7993bf4d 100644 (file)
@@ -115,7 +115,6 @@ extern int i91u_biosparam(Scsi_Disk *, kdev_t, int *);      /*for linux v2.0 */
        present:        0, \
        unchecked_isa_dma: 0, \
        use_clustering: ENABLE_CLUSTERING, \
- use_new_eh_code: 0 \
 }
 
 #define VIRT_TO_BUS(i)  (unsigned int) virt_to_bus((void *)(i))
index b965af0373b6f3672a72f4802b9e1cd2ffb76b72..9c2ade8832050b6126f637f8b54f714b44349817 100644 (file)
@@ -110,7 +110,6 @@ extern int inia100_biosparam(Scsi_Disk *, kdev_t, int *);   /*for linux v2.0 */
        present:        0, \
        unchecked_isa_dma: 0, \
        use_clustering: ENABLE_CLUSTERING, \
- use_new_eh_code: 0 \
 }
 
 #define VIRT_TO_BUS(i)  (unsigned int) virt_to_bus((void *)(i))
index 514055e16909507989f5f1b03a19aa3c4635bf91..b0431ced95686dc1154709c2090a1b937628ae7f 100644 (file)
     present : 0,                          \
     unchecked_isa_dma : 0,                \
     use_clustering : ENABLE_CLUSTERING,   \
-    use_new_eh_code : 1                   \
 }
 #endif
 
index 171eeb148dd15d785ebf584696b1dc53355db561..ee57f4bc6deec11f001910a7fe34eb8a2acf0418 100644 (file)
@@ -28,7 +28,6 @@ int mac53c94_reset(Scsi_Cmnd *, unsigned int);
        sg_tablesize:   SG_ALL,                         \
        cmd_per_lun:    1,                              \
        use_clustering: DISABLE_CLUSTERING,             \
-       use_new_eh_code: 1,                             \
 }
 
 /*
index 4d17f665c79e5321aae8724eaa49976e79484eb8..7fc49680a9c8b74778ea3557ba09596e8d2e30ad 100644 (file)
@@ -35,7 +35,6 @@ extern int esp_reset(Scsi_Cmnd *, unsigned int);
                            sg_tablesize:       SG_ALL, \
                            cmd_per_lun:        1, \
                            use_clustering:     DISABLE_CLUSTERING, \
-                           use_new_eh_code:    0 }
 
 #endif /* MAC_ESP_H */
 
index 19b2c9fc987d1e4e8c7cb43c11ca36863533bdbe..c2bb18100a03ac73af09dea8c625c0f22b3a385b 100644 (file)
@@ -28,7 +28,6 @@ int mesh_reset(Scsi_Cmnd *, unsigned int);
        sg_tablesize:   SG_ALL,                         \
        cmd_per_lun:    2,                              \
        use_clustering: DISABLE_CLUSTERING,             \
-       use_new_eh_code: 1,                             \
 }
 
 /*
index 15652ca9f590a8b57dc376e46a5b712a808ae7cc..fe990d4e93d01679c244d92f5a6006255c8f29e3 100644 (file)
@@ -218,7 +218,6 @@ int Pci2000_BiosParam               (Disk *disk, kdev_t dev, int geom[]);
        present:        0,                                              \
        unchecked_isa_dma:0,                                            \
        use_clustering: DISABLE_CLUSTERING,                             \
-       use_new_eh_code:0                                               \
 }
 
 #endif
index 689e625733f28cb676237532a55f82d4f42e8adb..e7aad4d958e6cae15476d6899846d1b0c63f4bae 100644 (file)
@@ -56,6 +56,5 @@ int Pci2220i_BiosParam                (Disk *disk, kdev_t dev, int geom[]);
        present:                0,                      \
        unchecked_isa_dma:      0,                      \
        use_clustering:         DISABLE_CLUSTERING,     \
-       use_new_eh_code:        0                       \
 }
 #endif
index dcfaabfcc13080bea76ca65164324e066aed4b1d..becd0ac8c327d3d90ce2a2c23340c65b070c1989 100644 (file)
@@ -149,7 +149,6 @@ static Scsi_Host_Template driver_template = {
 /*     present:                0,*/
 /*     unchecked_isa_dma:      0,*/
        use_clustering:         DISABLE_CLUSTERING,
-       use_new_eh_code:        0,
 /*     emulated:               0,*/
 };
 
index d965f5cd89fb60328e40ab9074b841747201ece8..01d34564f1b825a741ae780b277837f28eea745e 100644 (file)
@@ -53,7 +53,6 @@ const char * pluto_info(struct Scsi_Host *);
        sg_tablesize:           1,                              \
        cmd_per_lun:            1,                              \
        use_clustering:         ENABLE_CLUSTERING,              \
-       use_new_eh_code:        FCP_SCSI_USE_NEW_EH_CODE,       \
        abort:                  fcp_old_abort,                  \
        eh_abort_handler:       fcp_scsi_abort,                 \
        eh_device_reset_handler:fcp_scsi_dev_reset,             \
index 9932cf3dc06f3f784509eb96583ba7b249e1ab0b..7479092b906e467ab7f4a557b8ded9b422cd06e1 100644 (file)
@@ -183,7 +183,6 @@ int ppa_biosparam(Disk *, kdev_t, int *);
                eh_device_reset_handler:        NULL,                   \
                eh_bus_reset_handler:           ppa_reset,              \
                eh_host_reset_handler:          ppa_reset,              \
-               use_new_eh_code:                1,                      \
                bios_param:                     ppa_biosparam,          \
                this_id:                        -1,                     \
                sg_tablesize:                   SG_ALL,                 \
index 9dc200174bd57bffa2d54623bb7bb404adbd2da8..4fd71135e6c6e9e38705ed28039b98e4e3ef2a6b 100644 (file)
@@ -1726,7 +1726,6 @@ void qla1280_setup(char *s, int *dummy);
        present: 0,             /* number of 7xxx's present   */\
        unchecked_isa_dma: 0,   /* no memory DMA restrictions */\
        use_clustering: ENABLE_CLUSTERING,                      \
-       use_new_eh_code: 0,                                     \
        emulated: 0                                             \
 }
 #endif
index 0d351476076b928956c2ff333e785eb4756057be..c8f98f56809dcc364e549af9a58a1f85b408e23e 100644 (file)
@@ -734,7 +734,6 @@ int isp2x00_detect(Scsi_Host_Template * tmpt)
                        scsi_set_pci_device(host, pdev);
                        host->max_id = QLOGICFC_MAX_ID + 1;
                        host->max_lun = QLOGICFC_MAX_LUN;
-                       host->hostt->use_new_eh_code = 1;
                        hostdata = (struct isp2x00_hostdata *) host->hostdata;
 
                        memset(hostdata, 0, sizeof(struct isp2x00_hostdata));
index 5f9cf31db3425e409606fb077de3dfc50d81edce..aad93471c7af4f48b3ea318d6cad03c219ea96a1 100644 (file)
@@ -524,7 +524,6 @@ struct qlogicpti {
        sg_tablesize:   QLOGICPTI_MAX_SG(QLOGICPTI_REQ_QUEUE_LEN), \
        cmd_per_lun:    1,                                         \
        use_clustering: ENABLE_CLUSTERING,                         \
-       use_new_eh_code: 0                                         \
 }
 
 /* For our interrupt engine. */
index 9b696218983adfbb7810a122e915c3b493754f13..0758401ddd1f6b5cc09fac0dcf58f4b9ca5abfa3 100644 (file)
@@ -150,14 +150,6 @@ const char *const scsi_device_types[MAX_SCSI_DEVICE_CODE] =
 extern void scsi_times_out(Scsi_Cmnd * SCpnt);
 void scsi_build_commandblocks(Scsi_Device * SDpnt);
 
-/*
- * These are the interface to the old error handling code.  It should go away
- * someday soon.
- */
-extern void scsi_old_done(Scsi_Cmnd * SCpnt);
-extern void scsi_old_times_out(Scsi_Cmnd * SCpnt);
-
-
 /*
  * Function:    scsi_initialize_queue()
  *
@@ -188,12 +180,9 @@ extern void scsi_old_times_out(Scsi_Cmnd * SCpnt);
  */
 void  scsi_initialize_queue(Scsi_Device * SDpnt, struct Scsi_Host * SHpnt)
 {
-       char name[16];
-
        request_queue_t *q = &SDpnt->request_queue;
 
-       sprintf(name, "scsi%d%d%d", SDpnt->id, SDpnt->lun, SDpnt->channel);
-       blk_init_queue(q, scsi_request_fn, name);
+       blk_init_queue(q, scsi_request_fn);
        blk_queue_headactive(q, 0);
        q->queuedata = (void *) SDpnt;
 #ifdef DMA_CHUNK_SIZE
@@ -202,6 +191,9 @@ void  scsi_initialize_queue(Scsi_Device * SDpnt, struct Scsi_Host * SHpnt)
        blk_queue_max_segments(q, SHpnt->sg_tablesize);
 #endif
        blk_queue_max_sectors(q, SHpnt->max_sectors);
+
+       if (!SHpnt->use_clustering)
+               clear_bit(QUEUE_FLAG_CLUSTER, &q->queue_flags);
 }
 
 #ifdef MODULE
@@ -670,12 +662,8 @@ int scsi_dispatch_cmd(Scsi_Cmnd * SCpnt)
                        mdelay(1 + 999 / HZ);
                host->resetting = 0;
        }
-       if (host->hostt->use_new_eh_code) {
-               scsi_add_timer(SCpnt, SCpnt->timeout_per_command, scsi_times_out);
-       } else {
-               scsi_add_timer(SCpnt, SCpnt->timeout_per_command,
-                              scsi_old_times_out);
-       }
+
+       scsi_add_timer(SCpnt, SCpnt->timeout_per_command, scsi_times_out);
 
        /*
         * We will use a queued command if possible, otherwise we will emulate the
@@ -692,50 +680,27 @@ int scsi_dispatch_cmd(Scsi_Cmnd * SCpnt)
                SCSI_LOG_MLQUEUE(3, printk("queuecommand : routine at %p\n",
                                           host->hostt->queuecommand));
                /*
-                * Use the old error handling code if we haven't converted the driver
-                * to use the new one yet.  Note - only the new queuecommand variant
-                * passes a meaningful return value.
+                * Before we queue this command, check if the command
+                * length exceeds what the host adapter can handle.
                 */
-               if (host->hostt->use_new_eh_code) {
-                       /*
-                        * Before we queue this command, check if the command
-                        * length exceeds what the host adapter can handle.
-                        */
-                       if (CDB_SIZE(SCpnt) <= SCpnt->host->max_cmd_len) {
-                               spin_lock_irqsave(&host->host_lock, flags);
-                               rtn = host->hostt->queuecommand(SCpnt, scsi_done);
-                               spin_unlock_irqrestore(&host->host_lock, flags);
-                               if (rtn != 0) {
-                                       scsi_delete_timer(SCpnt);
-                                       scsi_mlqueue_insert(SCpnt, SCSI_MLQUEUE_HOST_BUSY);
-                                       SCSI_LOG_MLQUEUE(3, printk("queuecommand : request rejected\n"));                                
-                               }
-                       } else {
-                               SCSI_LOG_MLQUEUE(3, printk("queuecommand : command too long.\n"));
-                               SCpnt->result = (DID_ABORT << 16);
-                               spin_lock_irqsave(&host->host_lock, flags);
-                               scsi_done(SCpnt);
-                               spin_unlock_irqrestore(&host->host_lock, flags);
-                               rtn = 1;
-
+               if (CDB_SIZE(SCpnt) <= SCpnt->host->max_cmd_len) {
+                       spin_lock_irqsave(&host->host_lock, flags);
+                       rtn = host->hostt->queuecommand(SCpnt, scsi_done);
+                       spin_unlock_irqrestore(&host->host_lock, flags);
+                       if (rtn != 0) {
+                               scsi_delete_timer(SCpnt);
+                               scsi_mlqueue_insert(SCpnt, SCSI_MLQUEUE_HOST_BUSY);
+                               SCSI_LOG_MLQUEUE(3,
+                                  printk("queuecommand : request rejected\n"));                                
                        }
                } else {
-                       /*
-                        * Before we queue this command, check if the command
-                        * length exceeds what the host adapter can handle.
-                        */
-                       if (CDB_SIZE(SCpnt) <= SCpnt->host->max_cmd_len) {
-                               spin_lock_irqsave(&host->host_lock, flags);
-                               host->hostt->queuecommand(SCpnt, scsi_old_done);
-                               spin_unlock_irqrestore(&host->host_lock, flags);
-                       } else {
-                               SCSI_LOG_MLQUEUE(3, printk("queuecommand : command too long.\n"));
-                               SCpnt->result = (DID_ABORT << 16);
-                               spin_lock_irqsave(&host->host_lock, flags);
-                               scsi_old_done(SCpnt);
-                               spin_unlock_irqrestore(&host->host_lock, flags);
-                               rtn = 1;
-                       }
+                       SCSI_LOG_MLQUEUE(3,
+                               printk("queuecommand : command too long.\n"));
+                       SCpnt->result = (DID_ABORT << 16);
+                       spin_lock_irqsave(&host->host_lock, flags);
+                       scsi_done(SCpnt);
+                       spin_unlock_irqrestore(&host->host_lock, flags);
+                       rtn = 1;
                }
        } else {
                int temp;
@@ -755,11 +720,7 @@ int scsi_dispatch_cmd(Scsi_Cmnd * SCpnt)
                       host->host_no, temp, host->hostt->command);
                 spin_lock_irqsave(&host->host_lock, flags);
 #endif
-               if (host->hostt->use_new_eh_code) {
-                       scsi_done(SCpnt);
-               } else {
-                       scsi_old_done(SCpnt);
-               }
+               scsi_done(SCpnt);
                 spin_unlock_irqrestore(&host->host_lock, flags);
        }
        SCSI_LOG_MLQUEUE(3, printk("leaving scsi_dispatch_cmnd()\n"));
@@ -1886,19 +1847,12 @@ static int scsi_register_host(Scsi_Host_Template * tpnt)
 
        /* The detect routine must carefully spinunlock/spinlock if 
           it enables interrupts, since all interrupt handlers do 
-          spinlock as well.
-          All lame drivers are going to fail due to the following 
-          spinlock. For the time beeing let's use it only for drivers 
-          using the new scsi code. NOTE: the detect routine could
-          redefine the value tpnt->use_new_eh_code. (DB, 13 May 1998) */
+          spinlock as well.  */
 
        /*
         * detect should do its own locking
         */
-       if (tpnt->use_new_eh_code) {
-               tpnt->present = tpnt->detect(tpnt);
-       } else
-               tpnt->present = tpnt->detect(tpnt);
+       tpnt->present = tpnt->detect(tpnt);
 
        if (tpnt->present) {
                if (pcount == next_scsi_host) {
@@ -1932,7 +1886,7 @@ static int scsi_register_host(Scsi_Host_Template * tpnt)
                 * handle error correction.
                 */
                for (shpnt = scsi_hostlist; shpnt; shpnt = shpnt->next) {
-                       if (shpnt->hostt == tpnt && shpnt->hostt->use_new_eh_code) {
+                       if (shpnt->hostt == tpnt) {
                                DECLARE_MUTEX_LOCKED(sem);
 
                                shpnt->eh_notify = &sem;
@@ -2140,7 +2094,6 @@ static int scsi_unregister_host(Scsi_Host_Template * tpnt)
         */
        for (shpnt = scsi_hostlist; shpnt; shpnt = shpnt->next) {
                if (shpnt->hostt == tpnt
-                   && shpnt->hostt->use_new_eh_code
                    && shpnt->ehandler != NULL) {
                        DECLARE_MUTEX_LOCKED(sem);
 
index 357b3f5fc22cc07c12259d49e9b16ec393ed35d7..b0135317a739ab5bfa81a7c46d7a2e2d4f3613e6 100644 (file)
@@ -37,6 +37,5 @@ int scsi_debug_proc_info(char *, char **, off_t, int, int, int);
                    cmd_per_lun:       3,                       \
                    unchecked_isa_dma: 0,                       \
                    use_clustering:    ENABLE_CLUSTERING,       \
-                   use_new_eh_code:   1,                       \
 }
 #endif
index 72349bcb7a30805fa1277f21015b1dd501416f5d..d1419b0d6ca513a9f90471b40a7a254bba83aada 100644 (file)
@@ -106,15 +106,6 @@ static void dma_exhausted(Scsi_Cmnd * SCpnt, int i)
        panic("DMA pool exhausted");
 }
 
-/*
- * FIXME(eric) - the original disk code disabled clustering for MOD
- * devices.  I have no idea why we thought this was a good idea - my
- * guess is that it was an attempt to limit the size of requests to MOD
- * devices.
- */
-#define CLUSTERABLE_DEVICE(SH,SD) (SH->use_clustering && \
-                                  SD->type != TYPE_MOD)
-
 /*
  * This entire source file deals with the new queueing code.
  */
@@ -126,7 +117,6 @@ static void dma_exhausted(Scsi_Cmnd * SCpnt, int i)
  *
  * Arguments:   q       - Queue for which we are merging request.
  *              req     - request into which we wish to merge.
- *              use_clustering - 1 if this host wishes to use clustering
  *              dma_host - 1 if this host has ISA DMA issues (bus doesn't
  *                      expose all of the address lines, so that DMA cannot
  *                      be done from an arbitrary address).
@@ -141,13 +131,14 @@ static void dma_exhausted(Scsi_Cmnd * SCpnt, int i)
  * Notes:       This is only used for diagnostic purposes.
  */
 __inline static int __count_segments(struct request *req,
-                                    int use_clustering,
                                     int dma_host,
                                     int * remainder)
 {
        int ret = 1;
        int reqsize = 0;
-       struct bio *bio, *bionext;
+       int i;
+       struct bio *bio;
+       struct bio_vec *bvec;
 
        if (remainder)
                reqsize = *remainder;
@@ -161,54 +152,16 @@ __inline static int __count_segments(struct request *req,
                ret++;
 #endif
 
-       for (bio = req->bio, bionext = bio->bi_next; 
-            bionext != NULL; 
-            bio = bionext, bionext = bio->bi_next) {
-               if (use_clustering) {
-                       /* 
-                        * See if we can do this without creating another
-                        * scatter-gather segment.  In the event that this is a
-                        * DMA capable host, make sure that a segment doesn't span
-                        * the DMA threshold boundary.  
-                        */
-                       if (dma_host && bio_to_phys(bionext) - 1 == ISA_DMA_THRESHOLD) {
-                               ret++;
-                               reqsize = bio_size(bionext);
-                       } else if (BIO_CONTIG(bio, bionext)) {
-                               /*
-                                * This one is OK.  Let it go.
-                                */ 
-#ifdef DMA_SEGMENT_SIZE_LIMITED
-                               /* Note scsi_malloc is only able to hand out
-                                * chunks of memory in sizes of PAGE_SIZE or
-                                * less.  Thus we need to keep track of
-                                * the size of the piece that we have
-                                * seen so far, and if we have hit
-                                * the limit of PAGE_SIZE, then we are
-                                * kind of screwed and we need to start
-                                * another segment.
-                                */
-                               if(dma_host && bio_to_phys(bionext) - 1 >= ISA_DMA_THRESHOLD
-                                   && reqsize + bio_size(bionext) > PAGE_SIZE )
-                               {
-                                       ret++;
-                                       reqsize = bio_size(bionext);
-                                       continue;
-                               }
-#endif
-                               reqsize += bio_size(bionext);
-                               continue;
-                       }
-                       ret++;
-                       reqsize = bio_size(bionext);
-               } else {
+       rq_for_each_bio(bio, req) {
+               bio_for_each_segment(bvec, bio, i)
                        ret++;
-                       reqsize = bio_size(bionext);
-               }
+
+               reqsize += bio_size(bio);
        }
-       if( remainder != NULL ) {
+
+       if (remainder)
                *remainder = reqsize;
-       }
+
        return ret;
 }
 
@@ -244,9 +197,7 @@ recount_segments(Scsi_Cmnd * SCpnt)
        SHpnt = SCpnt->host;
        SDpnt = SCpnt->device;
 
-       req->nr_segments = __count_segments(req, 
-                                           CLUSTERABLE_DEVICE(SHpnt, SDpnt),
-                                           SHpnt->unchecked_isa_dma, NULL);
+       req->nr_segments = __count_segments(req, SHpnt->unchecked_isa_dma,NULL);
 }
 
 #define MERGEABLE_BUFFERS(X,Y) \
@@ -317,7 +268,6 @@ static inline int scsi_new_segment(request_queue_t * q,
  * Arguments:   q       - Queue for which we are merging request.
  *              req     - request into which we wish to merge.
  *              bio     - Block which we may wish to merge into request
- *              use_clustering - 1 if this host wishes to use clustering
  *              dma_host - 1 if this host has ISA DMA issues (bus doesn't
  *                      expose all of the address lines, so that DMA cannot
  *                      be done from an arbitrary address).
@@ -335,9 +285,9 @@ static inline int scsi_new_segment(request_queue_t * q,
  *
  *              This function is not designed to be directly called.  Instead
  *              it should be referenced from other functions where the
- *              use_clustering and dma_host parameters should be integer
- *              constants.  The compiler should thus be able to properly
- *              optimize the code, eliminating stuff that is irrelevant.
+ *              dma_host parameter should be an integer constant. The
+ *              compiler should thus be able to properly optimize the code,
+ *              eliminating stuff that is irrelevant.
  *              It is more maintainable to do this way with a single function
  *              than to have 4 separate functions all doing roughly the
  *              same thing.
@@ -345,45 +295,15 @@ static inline int scsi_new_segment(request_queue_t * q,
 __inline static int __scsi_back_merge_fn(request_queue_t * q,
                                         struct request *req,
                                         struct bio *bio,
-                                        int use_clustering,
                                         int dma_host)
 {
-       unsigned int count;
-       unsigned int segment_size = 0;
        Scsi_Device *SDpnt = q->queuedata;
 
        if (req->nr_sectors + bio_sectors(bio) > q->max_sectors)
                return 0;
-       else if (!BIO_PHYS_4G(req->biotail, bio))
+       else if (!BIO_SEG_BOUNDARY(q, req->biotail, bio))
                return 0;
 
-       if (use_clustering) {
-               /* 
-                * See if we can do this without creating another
-                * scatter-gather segment.  In the event that this is a
-                * DMA capable host, make sure that a segment doesn't span
-                * the DMA threshold boundary.  
-                */
-               if (dma_host && bio_to_phys(req->biotail) - 1 == ISA_DMA_THRESHOLD) {
-                       goto new_end_segment;
-               }
-               if (BIO_CONTIG(req->biotail, bio)) {
-#ifdef DMA_SEGMENT_SIZE_LIMITED
-                       if( dma_host && bio_to_phys(bio) - 1 >= ISA_DMA_THRESHOLD ) {
-                               segment_size = 0;
-                               count = __count_segments(req, use_clustering, dma_host, &segment_size);
-                               if( segment_size + bio_size(bio) > PAGE_SIZE ) {
-                                       goto new_end_segment;
-                               }
-                       }
-#endif
-                       /*
-                        * This one is OK.  Let it go.
-                        */
-                       return 1;
-               }
-       }
- new_end_segment:
 #ifdef DMA_CHUNK_SIZE
        if (MERGEABLE_BUFFERS(req->biotail, bio))
                return scsi_new_mergeable(q, req, SDpnt->host);
@@ -394,45 +314,15 @@ __inline static int __scsi_back_merge_fn(request_queue_t * q,
 __inline static int __scsi_front_merge_fn(request_queue_t * q,
                                          struct request *req,
                                          struct bio *bio,
-                                         int use_clustering,
                                          int dma_host)
 {
-       unsigned int count;
-       unsigned int segment_size = 0;
        Scsi_Device *SDpnt = q->queuedata;
 
        if (req->nr_sectors + bio_sectors(bio) > q->max_sectors)
                return 0;
-       else if (!BIO_PHYS_4G(bio, req->bio))
+       else if (!BIO_SEG_BOUNDARY(q, bio, req->bio))
                return 0;
 
-       if (use_clustering) {
-               /* 
-                * See if we can do this without creating another
-                * scatter-gather segment.  In the event that this is a
-                * DMA capable host, make sure that a segment doesn't span
-                * the DMA threshold boundary. 
-                */
-               if (dma_host && bio_to_phys(bio) - 1 == ISA_DMA_THRESHOLD) {
-                       goto new_start_segment;
-               }
-               if (BIO_CONTIG(bio, req->bio)) {
-#ifdef DMA_SEGMENT_SIZE_LIMITED
-                       if( dma_host && bio_to_phys(bio) - 1 >= ISA_DMA_THRESHOLD ) {
-                               segment_size = bio_size(bio);
-                               count = __count_segments(req, use_clustering, dma_host, &segment_size);
-                               if( count != req->nr_segments ) {
-                                       goto new_start_segment;
-                               }
-                       }
-#endif
-                       /*
-                        * This one is OK.  Let it go.
-                        */
-                       return 1;
-               }
-       }
- new_start_segment:
 #ifdef DMA_CHUNK_SIZE
        if (MERGEABLE_BUFFERS(bio, req->bio))
                return scsi_new_mergeable(q, req, SDpnt->host);
@@ -457,7 +347,7 @@ __inline static int __scsi_front_merge_fn(request_queue_t * q,
  * Notes:       Optimized for different cases depending upon whether
  *              ISA DMA is in use and whether clustering should be used.
  */
-#define MERGEFCT(_FUNCTION, _BACK_FRONT, _CLUSTER, _DMA)               \
+#define MERGEFCT(_FUNCTION, _BACK_FRONT, _DMA)                         \
 static int _FUNCTION(request_queue_t * q,                              \
                     struct request * req,                              \
                     struct bio *bio)                                   \
@@ -466,21 +356,15 @@ static int _FUNCTION(request_queue_t * q,                         \
     ret =  __scsi_ ## _BACK_FRONT ## _merge_fn(q,                      \
                                               req,                     \
                                               bio,                     \
-                                              _CLUSTER,                \
                                               _DMA);                   \
     return ret;                                                                \
 }
 
-/* Version with use_clustering 0 and dma_host 1 is not necessary,
- * since the only use of dma_host above is protected by use_clustering.
- */
-MERGEFCT(scsi_back_merge_fn_, back, 0, 0)
-MERGEFCT(scsi_back_merge_fn_c, back, 1, 0)
-MERGEFCT(scsi_back_merge_fn_dc, back, 1, 1)
+MERGEFCT(scsi_back_merge_fn_, back, 0)
+MERGEFCT(scsi_back_merge_fn_d, back, 1)
 
-MERGEFCT(scsi_front_merge_fn_, front, 0, 0)
-MERGEFCT(scsi_front_merge_fn_c, front, 1, 0)
-MERGEFCT(scsi_front_merge_fn_dc, front, 1, 1)
+MERGEFCT(scsi_front_merge_fn_, front, 0)
+MERGEFCT(scsi_front_merge_fn_d, front, 1)
 
 /*
  * Function:    __scsi_merge_requests_fn()
@@ -490,7 +374,6 @@ MERGEFCT(scsi_front_merge_fn_dc, front, 1, 1)
  * Arguments:   q       - Queue for which we are merging request.
  *              req     - request into which we wish to merge.
  *              next    - 2nd request that we might want to combine with req
- *              use_clustering - 1 if this host wishes to use clustering
  *              dma_host - 1 if this host has ISA DMA issues (bus doesn't
  *                      expose all of the address lines, so that DMA cannot
  *                      be done from an arbitrary address).
@@ -505,20 +388,10 @@ MERGEFCT(scsi_front_merge_fn_dc, front, 1, 1)
  *              function is called from ll_rw_blk before it attempts to merge
  *              a new block into a request to make sure that the request will
  *              not become too large.
- *
- *              This function is not designed to be directly called.  Instead
- *              it should be referenced from other functions where the
- *              use_clustering and dma_host parameters should be integer
- *              constants.  The compiler should thus be able to properly
- *              optimize the code, eliminating stuff that is irrelevant.
- *              It is more maintainable to do this way with a single function
- *              than to have 4 separate functions all doing roughly the
- *              same thing.
  */
 __inline static int __scsi_merge_requests_fn(request_queue_t * q,
                                             struct request *req,
                                             struct request *next,
-                                            int use_clustering,
                                             int dma_host)
 {
        Scsi_Device *SDpnt;
@@ -530,7 +403,7 @@ __inline static int __scsi_merge_requests_fn(request_queue_t * q,
         */
        if (req->special || next->special)
                return 0;
-       else if (!BIO_PHYS_4G(req->biotail, next->bio))
+       else if (!BIO_SEG_BOUNDARY(q, req->biotail, next->bio))
                return 0;
 
        SDpnt = (Scsi_Device *) q->queuedata;
@@ -559,51 +432,6 @@ __inline static int __scsi_merge_requests_fn(request_queue_t * q,
        if ((req->nr_sectors + next->nr_sectors) > SHpnt->max_sectors)
                return 0;
 
-       /*
-        * The main question is whether the two segments at the boundaries
-        * would be considered one or two.
-        */
-       if (use_clustering) {
-               /* 
-                * See if we can do this without creating another
-                * scatter-gather segment.  In the event that this is a
-                * DMA capable host, make sure that a segment doesn't span
-                * the DMA threshold boundary.  
-                */
-               if (dma_host && bio_to_phys(req->biotail) - 1 == ISA_DMA_THRESHOLD) {
-                       goto dont_combine;
-               }
-#ifdef DMA_SEGMENT_SIZE_LIMITED
-               /*
-                * We currently can only allocate scatter-gather bounce
-                * buffers in chunks of PAGE_SIZE or less.
-                */
-               if (dma_host
-                   && BIO_CONTIG(req->biotail, next->bio)
-                   && bio_to_phys(req->biotail) - 1 >= ISA_DMA_THRESHOLD )
-               {
-                       int segment_size = 0;
-                       int count = 0;
-
-                       count = __count_segments(req, use_clustering, dma_host, &segment_size);
-                       count += __count_segments(next, use_clustering, dma_host, &segment_size);
-                       if( count != req->nr_segments + next->nr_segments ) {
-                               goto dont_combine;
-                       }
-               }
-#endif
-               if (BIO_CONTIG(req->biotail, next->bio)) {
-                       /*
-                        * This one is OK.  Let it go.
-                        */
-                       req->nr_segments += next->nr_segments - 1;
-#ifdef DMA_CHUNK_SIZE
-                       req->nr_hw_segments += next->nr_hw_segments - 1;
-#endif
-                       return 1;
-               }
-       }
-      dont_combine:
 #ifdef DMA_CHUNK_SIZE
        if (req->nr_segments + next->nr_segments > q->max_segments)
                return 0;
@@ -657,22 +485,18 @@ __inline static int __scsi_merge_requests_fn(request_queue_t * q,
  * Notes:       Optimized for different cases depending upon whether
  *              ISA DMA is in use and whether clustering should be used.
  */
-#define MERGEREQFCT(_FUNCTION, _CLUSTER, _DMA)         \
+#define MERGEREQFCT(_FUNCTION, _DMA)                   \
 static int _FUNCTION(request_queue_t * q,              \
                     struct request * req,              \
                     struct request * next)             \
 {                                                      \
     int ret;                                           \
-    ret =  __scsi_merge_requests_fn(q, req, next, _CLUSTER, _DMA); \
+    ret =  __scsi_merge_requests_fn(q, req, next, _DMA); \
     return ret;                                                \
 }
 
-/* Version with use_clustering 0 and dma_host 1 is not necessary,
- * since the only use of dma_host above is protected by use_clustering.
- */
-MERGEREQFCT(scsi_merge_requests_fn_, 0, 0)
-MERGEREQFCT(scsi_merge_requests_fn_c, 1, 0)
-MERGEREQFCT(scsi_merge_requests_fn_dc, 1, 1)
+MERGEREQFCT(scsi_merge_requests_fn_, 0)
+MERGEREQFCT(scsi_merge_requests_fn_d, 1)
 /*
  * Function:    __init_io()
  *
@@ -680,7 +504,6 @@ MERGEREQFCT(scsi_merge_requests_fn_dc, 1, 1)
  *
  * Arguments:   SCpnt   - Command descriptor we wish to initialize
  *              sg_count_valid  - 1 if the sg count in the req is valid.
- *              use_clustering - 1 if this host wishes to use clustering
  *              dma_host - 1 if this host has ISA DMA issues (bus doesn't
  *                      expose all of the address lines, so that DMA cannot
  *                      be done from an arbitrary address).
@@ -708,7 +531,6 @@ MERGEREQFCT(scsi_merge_requests_fn_dc, 1, 1)
  */
 __inline static int __init_io(Scsi_Cmnd * SCpnt,
                              int sg_count_valid,
-                             int use_clustering,
                              int dma_host)
 {
        struct bio         * bio;
@@ -722,18 +544,13 @@ __inline static int __init_io(Scsi_Cmnd * SCpnt,
        int                  this_count;
        void               ** bbpnt;
 
-       /*
-        * now working right now
-        */
-       BUG_ON(dma_host);
-
        req = &SCpnt->request;
 
        /*
         * First we need to know how many scatter gather segments are needed.
         */
        if (!sg_count_valid) {
-               count = __count_segments(req, use_clustering, dma_host, NULL);
+               count = __count_segments(req, dma_host, NULL);
        } else {
                count = req->nr_segments;
        }
@@ -975,10 +792,10 @@ __inline static int __init_io(Scsi_Cmnd * SCpnt,
        return 1;
 }
 
-#define INITIO(_FUNCTION, _VALID, _CLUSTER, _DMA)      \
-static int _FUNCTION(Scsi_Cmnd * SCpnt)                        \
-{                                                      \
-    return __init_io(SCpnt, _VALID, _CLUSTER, _DMA);   \
+#define INITIO(_FUNCTION, _VALID, _DMA)                \
+static int _FUNCTION(Scsi_Cmnd * SCpnt)                \
+{                                              \
+    return __init_io(SCpnt, _VALID, _DMA);     \
 }
 
 /*
@@ -987,10 +804,8 @@ static int _FUNCTION(Scsi_Cmnd * SCpnt)                    \
  * We always force "_VALID" to 1.  Eventually clean this up
  * and get rid of the extra argument.
  */
-INITIO(scsi_init_io_v, 1, 0, 0)
-INITIO(scsi_init_io_vd, 1, 0, 1)
-INITIO(scsi_init_io_vc, 1, 1, 0)
-INITIO(scsi_init_io_vdc, 1, 1, 1)
+INITIO(scsi_init_io_v, 1, 0)
+INITIO(scsi_init_io_vd, 1, 1)
 
 /*
  * Function:    initialize_merge_fn()
@@ -1022,26 +837,16 @@ void initialize_merge_fn(Scsi_Device * SDpnt)
         * is simply easier to do it ourselves with our own functions
         * rather than rely upon the default behavior of ll_rw_blk.
         */
-       if (!CLUSTERABLE_DEVICE(SHpnt, SDpnt) && SHpnt->unchecked_isa_dma == 0) {
+       if (SHpnt->unchecked_isa_dma == 0) {
                q->back_merge_fn = scsi_back_merge_fn_;
                q->front_merge_fn = scsi_front_merge_fn_;
                q->merge_requests_fn = scsi_merge_requests_fn_;
                SDpnt->scsi_init_io_fn = scsi_init_io_v;
-       } else if (!CLUSTERABLE_DEVICE(SHpnt, SDpnt) && SHpnt->unchecked_isa_dma != 0) {
-               q->back_merge_fn = scsi_back_merge_fn_;
-               q->front_merge_fn = scsi_front_merge_fn_;
-               q->merge_requests_fn = scsi_merge_requests_fn_;
+       } else {
+               q->back_merge_fn = scsi_back_merge_fn_d;
+               q->front_merge_fn = scsi_front_merge_fn_d;
+               q->merge_requests_fn = scsi_merge_requests_fn_d;
                SDpnt->scsi_init_io_fn = scsi_init_io_vd;
-       } else if (CLUSTERABLE_DEVICE(SHpnt, SDpnt) && SHpnt->unchecked_isa_dma == 0) {
-               q->back_merge_fn = scsi_back_merge_fn_c;
-               q->front_merge_fn = scsi_front_merge_fn_c;
-               q->merge_requests_fn = scsi_merge_requests_fn_c;
-               SDpnt->scsi_init_io_fn = scsi_init_io_vc;
-       } else if (CLUSTERABLE_DEVICE(SHpnt, SDpnt) && SHpnt->unchecked_isa_dma != 0) {
-               q->back_merge_fn = scsi_back_merge_fn_dc;
-               q->front_merge_fn = scsi_front_merge_fn_dc;
-               q->merge_requests_fn = scsi_merge_requests_fn_dc;
-               SDpnt->scsi_init_io_fn = scsi_init_io_vdc;
        }
 
        /*
diff --git a/drivers/scsi/scsi_obsolete.c b/drivers/scsi/scsi_obsolete.c
deleted file mode 100644 (file)
index 5286e24..0000000
+++ /dev/null
@@ -1,1119 +0,0 @@
-/*
- *  scsi_obsolete.c Copyright (C) 1992 Drew Eckhardt
- *         Copyright (C) 1993, 1994, 1995 Eric Youngdale
- *
- *  generic mid-level SCSI driver
- *      Initial versions: Drew Eckhardt
- *      Subsequent revisions: Eric Youngdale
- *
- *  <drew@colorado.edu>
- *
- *  Bug correction thanks go to :
- *      Rik Faith <faith@cs.unc.edu>
- *      Tommy Thorn <tthorn>
- *      Thomas Wuensche <tw@fgb1.fgb.mw.tu-muenchen.de>
- *
- *  Modified by Eric Youngdale eric@andante.org to
- *  add scatter-gather, multiple outstanding request, and other
- *  enhancements.
- *
- *  Native multichannel, wide scsi, /proc/scsi and hot plugging
- *  support added by Michael Neuffer <mike@i-connect.net>
- *
- *  Major improvements to the timeout, abort, and reset processing,
- *  as well as performance modifications for large queue depths by
- *  Leonard N. Zubkoff <lnz@dandelion.com>
- *
- *  Improved compatibility with 2.0 behaviour by Manfred Spraul
- *  <masp0008@stud.uni-sb.de>
- */
-
-/*
- *#########################################################################
- *#########################################################################
- *#########################################################################
- *#########################################################################
- *              NOTE - NOTE - NOTE - NOTE - NOTE - NOTE - NOTE
- *
- *#########################################################################
- *#########################################################################
- *#########################################################################
- *#########################################################################
- *
- * This file contains the 'old' scsi error handling.  It is only present
- * while the new error handling code is being debugged, and while the low
- * level drivers are being converted to use the new code.  Once the last
- * driver uses the new code this *ENTIRE* file will be nuked.
- */
-
-#define __NO_VERSION__
-#include <linux/module.h>
-
-#include <linux/sched.h>
-#include <linux/timer.h>
-#include <linux/string.h>
-#include <linux/slab.h>
-#include <linux/ioport.h>
-#include <linux/kernel.h>
-#include <linux/stat.h>
-#include <linux/blk.h>
-#include <linux/interrupt.h>
-#include <linux/delay.h>
-
-#include <asm/system.h>
-#include <asm/irq.h>
-#include <asm/dma.h>
-
-#include "scsi.h"
-#include "hosts.h"
-#include "constants.h"
-
-#undef USE_STATIC_SCSI_MEMORY
-
-/*
-   static const char RCSid[] = "$Header: /mnt/ide/home/eric/CVSROOT/linux/drivers/scsi/scsi_obsolete.c,v 1.1 1997/05/18 23:27:21 eric Exp $";
- */
-
-
-#define INTERNAL_ERROR (panic ("Internal error in file %s, line %d.\n", __FILE__, __LINE__))
-
-
-static int scsi_abort(Scsi_Cmnd *, int code);
-static int scsi_reset(Scsi_Cmnd *, unsigned int);
-
-extern void scsi_old_done(Scsi_Cmnd * SCpnt);
-int update_timeout(Scsi_Cmnd *, int);
-extern void scsi_old_times_out(Scsi_Cmnd * SCpnt);
-
-extern int scsi_dispatch_cmd(Scsi_Cmnd * SCpnt);
-
-#define SCSI_BLOCK(HOST) (HOST->can_queue && HOST->host_busy >= HOST->can_queue)
-
-static unsigned char generic_sense[6] =
-{REQUEST_SENSE, 0, 0, 0, 255, 0};
-
-/*
- *  This is the number  of clock ticks we should wait before we time out
- *  and abort the command.  This is for  where the scsi.c module generates
- *  the command, not where it originates from a higher level, in which
- *  case the timeout is specified there.
- *
- *  ABORT_TIMEOUT and RESET_TIMEOUT are the timeouts for RESET and ABORT
- *  respectively.
- */
-
-#ifdef DEBUG_TIMEOUT
-static void scsi_dump_status(void);
-#endif
-
-
-#ifdef DEBUG
-#define SCSI_TIMEOUT (5*HZ)
-#else
-#define SCSI_TIMEOUT (2*HZ)
-#endif
-
-#ifdef DEBUG
-#define SENSE_TIMEOUT SCSI_TIMEOUT
-#define ABORT_TIMEOUT SCSI_TIMEOUT
-#define RESET_TIMEOUT SCSI_TIMEOUT
-#else
-#define SENSE_TIMEOUT (5*HZ/10)
-#define RESET_TIMEOUT (5*HZ/10)
-#define ABORT_TIMEOUT (5*HZ/10)
-#endif
-
-
-/* Do not call reset on error if we just did a reset within 15 sec. */
-#define MIN_RESET_PERIOD (15*HZ)
-
-
-
-/*
- *  Flag bits for the internal_timeout array
- */
-#define IN_ABORT  1
-#define IN_RESET  2
-#define IN_RESET2 4
-#define IN_RESET3 8
-
-/*
- * This is our time out function, called when the timer expires for a
- * given host adapter.  It will attempt to abort the currently executing
- * command, that failing perform a kernel panic.
- */
-
-void scsi_old_times_out(Scsi_Cmnd * SCpnt)
-{
-       struct Scsi_Host *host = SCpnt->host;
-       unsigned long flags;
-
-       spin_lock_irqsave(&host->host_lock, flags);
-
-       /* Set the serial_number_at_timeout to the current serial_number */
-       SCpnt->serial_number_at_timeout = SCpnt->serial_number;
-
-       switch (SCpnt->internal_timeout & (IN_ABORT | IN_RESET | IN_RESET2 | IN_RESET3)) {
-       case NORMAL_TIMEOUT:
-               {
-#ifdef DEBUG_TIMEOUT
-                       scsi_dump_status();
-#endif
-               }
-
-               if (!scsi_abort(SCpnt, DID_TIME_OUT))
-                       break;
-       case IN_ABORT:
-               printk("SCSI host %d abort (pid %ld) timed out - resetting\n",
-                      host->host_no, SCpnt->pid);
-               if (!scsi_reset(SCpnt, SCSI_RESET_ASYNCHRONOUS))
-                       break;
-       case IN_RESET:
-       case (IN_ABORT | IN_RESET):
-               /* This might be controversial, but if there is a bus hang,
-                * you might conceivably want the machine up and running
-                * esp if you have an ide disk.
-                */
-               printk("SCSI host %d channel %d reset (pid %ld) timed out - "
-                      "trying harder\n",
-                      host->host_no, SCpnt->channel, SCpnt->pid);
-               SCpnt->internal_timeout &= ~IN_RESET;
-               SCpnt->internal_timeout |= IN_RESET2;
-               scsi_reset(SCpnt,
-                SCSI_RESET_ASYNCHRONOUS | SCSI_RESET_SUGGEST_BUS_RESET);
-               break;
-       case IN_RESET2:
-       case (IN_ABORT | IN_RESET2):
-               /* Obviously the bus reset didn't work.
-                * Let's try even harder and call for an HBA reset.
-                * Maybe the HBA itself crashed and this will shake it loose.
-                */
-               printk("SCSI host %d reset (pid %ld) timed out - trying to shake it loose\n",
-                      host->host_no, SCpnt->pid);
-               SCpnt->internal_timeout &= ~(IN_RESET | IN_RESET2);
-               SCpnt->internal_timeout |= IN_RESET3;
-               scsi_reset(SCpnt,
-               SCSI_RESET_ASYNCHRONOUS | SCSI_RESET_SUGGEST_HOST_RESET);
-               break;
-
-       default:
-               printk("SCSI host %d reset (pid %ld) timed out again -\n",
-                      host->host_no, SCpnt->pid);
-               printk("probably an unrecoverable SCSI bus or device hang.\n");
-               break;
-
-       }
-       spin_unlock_irqrestore(&host->host_lock, flags);
-
-}
-
-/*
- *  From what I can find in scsi_obsolete.c, this function is only called
- *  by scsi_old_done and scsi_reset.  Both of these functions run with the
- *  host_lock already held, so we need do nothing here about grabbing
- *  any locks.
- */
-static void scsi_request_sense(Scsi_Cmnd * SCpnt)
-{
-       SCpnt->flags |= WAS_SENSE | ASKED_FOR_SENSE;
-       update_timeout(SCpnt, SENSE_TIMEOUT);
-
-       memcpy((void *) SCpnt->cmnd, (void *) generic_sense,
-              sizeof(generic_sense));
-       memset((void *) SCpnt->sense_buffer, 0,
-              sizeof(SCpnt->sense_buffer));
-
-       if (SCpnt->device->scsi_level <= SCSI_2)
-               SCpnt->cmnd[1] = SCpnt->lun << 5;
-       SCpnt->cmnd[4] = sizeof(SCpnt->sense_buffer);
-
-       SCpnt->request_buffer = &SCpnt->sense_buffer;
-       SCpnt->request_bufflen = sizeof(SCpnt->sense_buffer);
-       SCpnt->use_sg = 0;
-       SCpnt->cmd_len = COMMAND_SIZE(SCpnt->cmnd[0]);
-       SCpnt->result = 0;
-       SCpnt->sc_data_direction = SCSI_DATA_READ;
-
-        /*
-         * Ugly, ugly.  The newer interfaces all assume that the lock
-         * isn't held.  Mustn't disappoint, or we deadlock the system.
-         */
-        spin_unlock_irq(&SCpnt->host->host_lock);
-       scsi_dispatch_cmd(SCpnt);
-        spin_lock_irq(&SCpnt->host->host_lock);
-}
-
-
-
-
-static int check_sense(Scsi_Cmnd * SCpnt)
-{
-       /* If there is no sense information, request it.  If we have already
-        * requested it, there is no point in asking again - the firmware must
-        * be confused.
-        */
-       if (((SCpnt->sense_buffer[0] & 0x70) >> 4) != 7) {
-               if (!(SCpnt->flags & ASKED_FOR_SENSE))
-                       return SUGGEST_SENSE;
-               else
-                       return SUGGEST_RETRY;
-       }
-       SCpnt->flags &= ~ASKED_FOR_SENSE;
-
-#ifdef DEBUG_INIT
-       printk("scsi%d, channel%d : ", SCpnt->host->host_no, SCpnt->channel);
-       print_sense("", SCpnt);
-       printk("\n");
-#endif
-       if (SCpnt->sense_buffer[2] & 0xe0)
-               return SUGGEST_ABORT;
-
-       switch (SCpnt->sense_buffer[2] & 0xf) {
-       case NO_SENSE:
-               return 0;
-       case RECOVERED_ERROR:
-               return SUGGEST_IS_OK;
-
-       case ABORTED_COMMAND:
-               return SUGGEST_RETRY;
-       case NOT_READY:
-       case UNIT_ATTENTION:
-               /*
-                * If we are expecting a CC/UA because of a bus reset that we
-                * performed, treat this just as a retry.  Otherwise this is
-                * information that we should pass up to the upper-level driver
-                * so that we can deal with it there.
-                */
-               if (SCpnt->device->expecting_cc_ua) {
-                       SCpnt->device->expecting_cc_ua = 0;
-                       return SUGGEST_RETRY;
-               }
-               return SUGGEST_ABORT;
-
-               /* these three are not supported */
-       case COPY_ABORTED:
-       case VOLUME_OVERFLOW:
-       case MISCOMPARE:
-
-       case MEDIUM_ERROR:
-               return SUGGEST_REMAP;
-       case BLANK_CHECK:
-       case DATA_PROTECT:
-       case HARDWARE_ERROR:
-       case ILLEGAL_REQUEST:
-       default:
-               return SUGGEST_ABORT;
-       }
-}
-
-/* This function is the mid-level interrupt routine, which decides how
- *  to handle error conditions.  Each invocation of this function must
- *  do one and *only* one of the following:
- *
- *  (1) Call last_cmnd[host].done.  This is done for fatal errors and
- *      normal completion, and indicates that the handling for this
- *      request is complete.
- *  (2) Call internal_cmnd to requeue the command.  This will result in
- *      scsi_done being called again when the retry is complete.
- *  (3) Call scsi_request_sense.  This asks the host adapter/drive for
- *      more information about the error condition.  When the information
- *      is available, scsi_done will be called again.
- *  (4) Call reset().  This is sort of a last resort, and the idea is that
- *      this may kick things loose and get the drive working again.  reset()
- *      automatically calls scsi_request_sense, and thus scsi_done will be
- *      called again once the reset is complete.
- *
- *      If none of the above actions are taken, the drive in question
- *      will hang. If more than one of the above actions are taken by
- *      scsi_done, then unpredictable behavior will result.
- */
-void scsi_old_done(Scsi_Cmnd * SCpnt)
-{
-       int status = 0;
-       int exit = 0;
-       int checked;
-       int oldto;
-       struct Scsi_Host *host = SCpnt->host;
-        Scsi_Device * device = SCpnt->device;
-       int result = SCpnt->result;
-       SCpnt->serial_number = 0;
-       SCpnt->serial_number_at_timeout = 0;
-       oldto = update_timeout(SCpnt, 0);
-
-#ifdef DEBUG_TIMEOUT
-       if (result)
-               printk("Non-zero result in scsi_done %x %d:%d\n",
-                      result, SCpnt->target, SCpnt->lun);
-#endif
-
-       /* If we requested an abort, (and we got it) then fix up the return
-        *  status to say why
-        */
-       if (host_byte(result) == DID_ABORT && SCpnt->abort_reason)
-               SCpnt->result = result = (result & 0xff00ffff) |
-                   (SCpnt->abort_reason << 16);
-
-
-#define CMD_FINISHED 0
-#define MAYREDO  1
-#define REDO     3
-#define PENDING  4
-
-#ifdef DEBUG
-       printk("In scsi_done(host = %d, result = %06x)\n", host->host_no, result);
-#endif
-
-       if (SCpnt->flags & SYNC_RESET) {
-               /*
-                  * The behaviou of scsi_reset(SYNC) was changed in 2.1.? .
-                  * The scsi mid-layer does a REDO after every sync reset, the driver
-                  * must not do that any more. In order to prevent old drivers from
-                  * crashing, all scsi_done() calls during sync resets are ignored.
-                */
-               printk("scsi%d: device driver called scsi_done() "
-                      "for a synchronous reset.\n", SCpnt->host->host_no);
-               return;
-       }
-       if (SCpnt->flags & WAS_SENSE) {
-               SCpnt->use_sg = SCpnt->old_use_sg;
-               SCpnt->cmd_len = SCpnt->old_cmd_len;
-               SCpnt->sc_data_direction = SCpnt->sc_old_data_direction;
-               SCpnt->underflow = SCpnt->old_underflow;
-       }
-       switch (host_byte(result)) {
-       case DID_OK:
-               if (status_byte(result) && (SCpnt->flags & WAS_SENSE))
-                       /* Failed to obtain sense information */
-               {
-                       SCpnt->flags &= ~WAS_SENSE;
-#if 0                          /* This cannot possibly be correct. */
-                       SCpnt->internal_timeout &= ~SENSE_TIMEOUT;
-#endif
-
-                       if (!(SCpnt->flags & WAS_RESET)) {
-                               printk("scsi%d : channel %d target %d lun %d request sense"
-                                      " failed, performing reset.\n",
-                                      SCpnt->host->host_no, SCpnt->channel, SCpnt->target,
-                                      SCpnt->lun);
-                               scsi_reset(SCpnt, SCSI_RESET_SYNCHRONOUS);
-                               status = REDO;
-                               break;
-                       } else {
-                               exit = (DRIVER_HARD | SUGGEST_ABORT);
-                               status = CMD_FINISHED;
-                       }
-               } else
-                       switch (msg_byte(result)) {
-                       case COMMAND_COMPLETE:
-                               switch (status_byte(result)) {
-                               case GOOD:
-                                       if (SCpnt->flags & WAS_SENSE) {
-#ifdef DEBUG
-                                               printk("In scsi_done, GOOD status, COMMAND COMPLETE, "
-                                                      "parsing sense information.\n");
-#endif
-                                               SCpnt->flags &= ~WAS_SENSE;
-#if 0                          /* This cannot possibly be correct. */
-                                               SCpnt->internal_timeout &= ~SENSE_TIMEOUT;
-#endif
-
-                                               switch (checked = check_sense(SCpnt)) {
-                                               case SUGGEST_SENSE:
-                                               case 0:
-#ifdef DEBUG
-                                                       printk("NO SENSE.  status = REDO\n");
-#endif
-                                                       update_timeout(SCpnt, oldto);
-                                                       status = REDO;
-                                                       break;
-                                               case SUGGEST_IS_OK:
-                                                       break;
-                                               case SUGGEST_REMAP:
-#ifdef DEBUG
-                                                       printk("SENSE SUGGEST REMAP - status = CMD_FINISHED\n");
-#endif
-                                                       status = CMD_FINISHED;
-                                                       exit = DRIVER_SENSE | SUGGEST_ABORT;
-                                                       break;
-                                               case SUGGEST_RETRY:
-#ifdef DEBUG
-                                                       printk("SENSE SUGGEST RETRY - status = MAYREDO\n");
-#endif
-                                                       status = MAYREDO;
-                                                       exit = DRIVER_SENSE | SUGGEST_RETRY;
-                                                       break;
-                                               case SUGGEST_ABORT:
-#ifdef DEBUG
-                                                       printk("SENSE SUGGEST ABORT - status = CMD_FINISHED");
-#endif
-                                                       status = CMD_FINISHED;
-                                                       exit = DRIVER_SENSE | SUGGEST_ABORT;
-                                                       break;
-                                               default:
-                                                       printk("Internal error %s %d \n", __FILE__,
-                                                              __LINE__);
-                                               }
-                                       }
-                                       /* end WAS_SENSE */
-                                       else {
-#ifdef DEBUG
-                                               printk("COMMAND COMPLETE message returned, "
-                                                      "status = CMD_FINISHED. \n");
-#endif
-                                               exit = DRIVER_OK;
-                                               status = CMD_FINISHED;
-                                       }
-                                       break;
-
-                               case CHECK_CONDITION:
-                               case COMMAND_TERMINATED:
-                                       switch (check_sense(SCpnt)) {
-                                       case 0:
-                                               update_timeout(SCpnt, oldto);
-                                               status = REDO;
-                                               break;
-                                       case SUGGEST_REMAP:
-                                               status = CMD_FINISHED;
-                                               exit = DRIVER_SENSE | SUGGEST_ABORT;
-                                               break;
-                                       case SUGGEST_RETRY:
-                                               status = MAYREDO;
-                                               exit = DRIVER_SENSE | SUGGEST_RETRY;
-                                               break;
-                                       case SUGGEST_ABORT:
-                                               status = CMD_FINISHED;
-                                               exit = DRIVER_SENSE | SUGGEST_ABORT;
-                                               break;
-                                       case SUGGEST_SENSE:
-                                               scsi_request_sense(SCpnt);
-                                               status = PENDING;
-                                               break;
-                                       }
-                                       break;
-
-                               case CONDITION_GOOD:
-                               case INTERMEDIATE_GOOD:
-                               case INTERMEDIATE_C_GOOD:
-                                       break;
-
-                               case BUSY:
-                               case QUEUE_FULL:
-                                       update_timeout(SCpnt, oldto);
-                                       status = REDO;
-                                       break;
-
-                               case RESERVATION_CONFLICT:
-                                       printk("scsi%d, channel %d : RESERVATION CONFLICT performing"
-                                              " reset.\n", SCpnt->host->host_no, SCpnt->channel);
-                                       scsi_reset(SCpnt, SCSI_RESET_SYNCHRONOUS);
-                                       status = REDO;
-                                       break;
-                               default:
-                                       printk("Internal error %s %d \n"
-                                        "status byte = %d \n", __FILE__,
-                                         __LINE__, status_byte(result));
-
-                               }
-                               break;
-                       default:
-                               panic("scsi: unsupported message byte %d received\n",
-                                     msg_byte(result));
-                       }
-               break;
-       case DID_TIME_OUT:
-#ifdef DEBUG
-               printk("Host returned DID_TIME_OUT - ");
-#endif
-
-               if (SCpnt->flags & WAS_TIMEDOUT) {
-#ifdef DEBUG
-                       printk("Aborting\n");
-#endif
-                       /*
-                          Allow TEST_UNIT_READY and INQUIRY commands to timeout early
-                          without causing resets.  All other commands should be retried.
-                        */
-                       if (SCpnt->cmnd[0] != TEST_UNIT_READY &&
-                           SCpnt->cmnd[0] != INQUIRY)
-                               status = MAYREDO;
-                       exit = (DRIVER_TIMEOUT | SUGGEST_ABORT);
-               } else {
-#ifdef DEBUG
-                       printk("Retrying.\n");
-#endif
-                       SCpnt->flags |= WAS_TIMEDOUT;
-                       SCpnt->internal_timeout &= ~IN_ABORT;
-                       status = REDO;
-               }
-               break;
-       case DID_BUS_BUSY:
-       case DID_PARITY:
-               status = REDO;
-               break;
-       case DID_NO_CONNECT:
-#ifdef DEBUG
-               printk("Couldn't connect.\n");
-#endif
-               exit = (DRIVER_HARD | SUGGEST_ABORT);
-               break;
-       case DID_ERROR:
-               status = MAYREDO;
-               exit = (DRIVER_HARD | SUGGEST_ABORT);
-               break;
-       case DID_BAD_TARGET:
-       case DID_ABORT:
-               exit = (DRIVER_INVALID | SUGGEST_ABORT);
-               break;
-       case DID_RESET:
-               if (SCpnt->flags & IS_RESETTING) {
-                       SCpnt->flags &= ~IS_RESETTING;
-                       status = REDO;
-                       break;
-               }
-               if (msg_byte(result) == GOOD &&
-                   status_byte(result) == CHECK_CONDITION) {
-                       switch (check_sense(SCpnt)) {
-                       case 0:
-                               update_timeout(SCpnt, oldto);
-                               status = REDO;
-                               break;
-                       case SUGGEST_REMAP:
-                       case SUGGEST_RETRY:
-                               status = MAYREDO;
-                               exit = DRIVER_SENSE | SUGGEST_RETRY;
-                               break;
-                       case SUGGEST_ABORT:
-                               status = CMD_FINISHED;
-                               exit = DRIVER_SENSE | SUGGEST_ABORT;
-                               break;
-                       case SUGGEST_SENSE:
-                               scsi_request_sense(SCpnt);
-                               status = PENDING;
-                               break;
-                       }
-               } else {
-                       status = REDO;
-                       exit = SUGGEST_RETRY;
-               }
-               break;
-       default:
-               exit = (DRIVER_ERROR | SUGGEST_DIE);
-       }
-
-       switch (status) {
-       case CMD_FINISHED:
-       case PENDING:
-               break;
-       case MAYREDO:
-#ifdef DEBUG
-               printk("In MAYREDO, allowing %d retries, have %d\n",
-                      SCpnt->allowed, SCpnt->retries);
-#endif
-               if ((++SCpnt->retries) < SCpnt->allowed) {
-                       if ((SCpnt->retries >= (SCpnt->allowed >> 1))
-                           && !(SCpnt->host->resetting && time_before(jiffies, SCpnt->host->last_reset + MIN_RESET_PERIOD))
-                           && !(SCpnt->flags & WAS_RESET)) {
-                               printk("scsi%d channel %d : resetting for second half of retries.\n",
-                                  SCpnt->host->host_no, SCpnt->channel);
-                               scsi_reset(SCpnt, SCSI_RESET_SYNCHRONOUS);
-                               /* fall through to REDO */
-                       }
-               } else {
-                       status = CMD_FINISHED;
-                       break;
-               }
-               /* fall through to REDO */
-
-       case REDO:
-
-               if (SCpnt->flags & WAS_SENSE)
-                       scsi_request_sense(SCpnt);
-               else {
-                       memcpy((void *) SCpnt->cmnd,
-                              (void *) SCpnt->data_cmnd,
-                              sizeof(SCpnt->data_cmnd));
-                       memset((void *) SCpnt->sense_buffer, 0,
-                              sizeof(SCpnt->sense_buffer));
-                       SCpnt->request_buffer = SCpnt->buffer;
-                       SCpnt->request_bufflen = SCpnt->bufflen;
-                       SCpnt->use_sg = SCpnt->old_use_sg;
-                       SCpnt->cmd_len = SCpnt->old_cmd_len;
-                       SCpnt->sc_data_direction = SCpnt->sc_old_data_direction;
-                       SCpnt->underflow = SCpnt->old_underflow;
-                       SCpnt->result = 0;
-                        /*
-                         * Ugly, ugly.  The newer interfaces all
-                         * assume that the lock isn't held.  Mustn't
-                         * disappoint, or we deadlock the system.  
-                         */
-                       spin_unlock_irq(&host->host_lock);
-                       scsi_dispatch_cmd(SCpnt);
-                       spin_lock_irq(&host->host_lock);
-               }
-               break;
-       default:
-               INTERNAL_ERROR;
-       }
-
-       if (status == CMD_FINISHED) {
-               Scsi_Request *SRpnt;
-#ifdef DEBUG
-               printk("Calling done function - at address %p\n", SCpnt->done);
-#endif
-               host->host_busy--;      /* Indicate that we are free */
-                device->device_busy--; /* Decrement device usage counter. */
-
-               SCpnt->result = result | ((exit & 0xff) << 24);
-               SCpnt->use_sg = SCpnt->old_use_sg;
-               SCpnt->cmd_len = SCpnt->old_cmd_len;
-               SCpnt->sc_data_direction = SCpnt->sc_old_data_direction;
-               SCpnt->underflow = SCpnt->old_underflow;
-                /*
-                 * The upper layers assume the lock isn't held.  We mustn't
-                 * disappoint them.  When the new error handling code is in
-                 * use, the upper code is run from a bottom half handler, so
-                 * it isn't an issue.
-                 */
-                spin_unlock_irq(&host->host_lock);
-               SRpnt = SCpnt->sc_request;
-               if( SRpnt != NULL ) {
-                       SRpnt->sr_result = SRpnt->sr_command->result;
-                       if( SRpnt->sr_result != 0 ) {
-                               memcpy(SRpnt->sr_sense_buffer,
-                                      SRpnt->sr_command->sense_buffer,
-                                      sizeof(SRpnt->sr_sense_buffer));
-                       }
-               }
-
-               SCpnt->done(SCpnt);
-                spin_lock_irq(&host->host_lock);
-       }
-#undef CMD_FINISHED
-#undef REDO
-#undef MAYREDO
-#undef PENDING
-}
-
-/*
- * The scsi_abort function interfaces with the abort() function of the host
- * we are aborting, and causes the current command to not complete.  The
- * caller should deal with any error messages or status returned on the
- * next call.
- *
- * This will not be called reentrantly for a given host.
- */
-
-/*
- * Since we're nice guys and specified that abort() and reset()
- * can be non-reentrant.  The internal_timeout flags are used for
- * this.
- */
-
-
-static int scsi_abort(Scsi_Cmnd * SCpnt, int why)
-{
-       int oldto;
-       struct Scsi_Host *host = SCpnt->host;
-
-       while (1) {
-
-               /*
-                * Protect against races here.  If the command is done, or we are
-                * on a different command forget it.
-                */
-               if (SCpnt->serial_number != SCpnt->serial_number_at_timeout) {
-                       return 0;
-               }
-               if (SCpnt->internal_timeout & IN_ABORT) {
-                       spin_unlock_irq(&host->host_lock);
-                       while (SCpnt->internal_timeout & IN_ABORT)
-                               barrier();
-                       spin_lock_irq(&host->host_lock);
-               } else {
-                       SCpnt->internal_timeout |= IN_ABORT;
-                       oldto = update_timeout(SCpnt, ABORT_TIMEOUT);
-
-                       if ((SCpnt->flags & IS_RESETTING) && SCpnt->device->soft_reset) {
-                               /* OK, this command must have died when we did the
-                                *  reset.  The device itself must have lied.
-                                */
-                               printk("Stale command on %d %d:%d appears to have died when"
-                                      " the bus was reset\n",
-                                      SCpnt->channel, SCpnt->target, SCpnt->lun);
-                       }
-                       if (!host->host_busy) {
-                               SCpnt->internal_timeout &= ~IN_ABORT;
-                               update_timeout(SCpnt, oldto);
-                               return 0;
-                       }
-                       printk("scsi : aborting command due to timeout : pid %lu, scsi%d,"
-                              " channel %d, id %d, lun %d ",
-                              SCpnt->pid, SCpnt->host->host_no, (int) SCpnt->channel,
-                              (int) SCpnt->target, (int) SCpnt->lun);
-                       print_command(SCpnt->cmnd);
-                       if (SCpnt->serial_number != SCpnt->serial_number_at_timeout)
-                               return 0;
-                       SCpnt->abort_reason = why;
-                       switch (host->hostt->abort(SCpnt)) {
-                               /* We do not know how to abort.  Try waiting another
-                                * time increment and see if this helps. Set the
-                                * WAS_TIMEDOUT flag set so we do not try this twice
-                                */
-                       case SCSI_ABORT_BUSY:   /* Tough call - returning 1 from
-                                                * this is too severe
-                                                */
-                       case SCSI_ABORT_SNOOZE:
-                               if (why == DID_TIME_OUT) {
-                                       SCpnt->internal_timeout &= ~IN_ABORT;
-                                       if (SCpnt->flags & WAS_TIMEDOUT) {
-                                               return 1;       /* Indicate we cannot handle this.
-                                                                * We drop down into the reset handler
-                                                                * and try again
-                                                                */
-                                       } else {
-                                               SCpnt->flags |= WAS_TIMEDOUT;
-                                               oldto = SCpnt->timeout_per_command;
-                                               update_timeout(SCpnt, oldto);
-                                       }
-                               }
-                               return 0;
-                       case SCSI_ABORT_PENDING:
-                               if (why != DID_TIME_OUT) {
-                                       update_timeout(SCpnt, oldto);
-                               }
-                               return 0;
-                       case SCSI_ABORT_SUCCESS:
-                               /* We should have already aborted this one.  No
-                                * need to adjust timeout
-                                */
-                               SCpnt->internal_timeout &= ~IN_ABORT;
-                               return 0;
-                       case SCSI_ABORT_NOT_RUNNING:
-                               SCpnt->internal_timeout &= ~IN_ABORT;
-                               update_timeout(SCpnt, 0);
-                               return 0;
-                       case SCSI_ABORT_ERROR:
-                       default:
-                               SCpnt->internal_timeout &= ~IN_ABORT;
-                               return 1;
-                       }
-               }
-       }
-}
-
-
-/* Mark a single SCSI Device as having been reset. */
-
-static inline void scsi_mark_device_reset(Scsi_Device * Device)
-{
-       Device->was_reset = 1;
-       Device->expecting_cc_ua = 1;
-}
-
-
-/* Mark all SCSI Devices on a specific Host as having been reset. */
-
-void scsi_mark_host_reset(struct Scsi_Host *Host)
-{
-       Scsi_Cmnd *SCpnt;
-       Scsi_Device *SDpnt;
-
-       for (SDpnt = Host->host_queue; SDpnt; SDpnt = SDpnt->next) {
-               for (SCpnt = SDpnt->device_queue; SCpnt; SCpnt = SCpnt->next)
-                       scsi_mark_device_reset(SCpnt->device);
-       }
-}
-
-
-/* Mark all SCSI Devices on a specific Host Bus as having been reset. */
-
-static void scsi_mark_bus_reset(struct Scsi_Host *Host, int channel)
-{
-       Scsi_Cmnd *SCpnt;
-       Scsi_Device *SDpnt;
-
-       for (SDpnt = Host->host_queue; SDpnt; SDpnt = SDpnt->next) {
-               for (SCpnt = SDpnt->device_queue; SCpnt; SCpnt = SCpnt->next)
-                       if (SCpnt->channel == channel)
-                               scsi_mark_device_reset(SCpnt->device);
-       }
-}
-
-
-static int scsi_reset(Scsi_Cmnd * SCpnt, unsigned int reset_flags)
-{
-       int temp;
-       Scsi_Cmnd *SCpnt1;
-       Scsi_Device *SDpnt;
-       struct Scsi_Host *host = SCpnt->host;
-
-       printk("SCSI bus is being reset for host %d channel %d.\n",
-              host->host_no, SCpnt->channel);
-
-#if 0
-       /*
-        * First of all, we need to make a recommendation to the low-level
-        * driver as to whether a BUS_DEVICE_RESET should be performed,
-        * or whether we should do a full BUS_RESET.  There is no simple
-        * algorithm here - we basically use a series of heuristics
-        * to determine what we should do.
-        */
-       SCpnt->host->suggest_bus_reset = FALSE;
-
-       /*
-        * First see if all of the active devices on the bus have
-        * been jammed up so that we are attempting resets.  If so,
-        * then suggest a bus reset.  Forcing a bus reset could
-        * result in some race conditions, but no more than
-        * you would usually get with timeouts.  We will cross
-        * that bridge when we come to it.
-        *
-        * This is actually a pretty bad idea, since a sequence of
-        * commands will often timeout together and this will cause a
-        * Bus Device Reset followed immediately by a SCSI Bus Reset.
-        * If all of the active devices really are jammed up, the
-        * Bus Device Reset will quickly timeout and scsi_times_out
-        * will follow up with a SCSI Bus Reset anyway.
-        */
-       SCpnt1 = host->host_queue;
-       while (SCpnt1) {
-               if (SCpnt1->request.rq_status != RQ_INACTIVE
-                   && (SCpnt1->flags & (WAS_RESET | IS_RESETTING)) == 0)
-                       break;
-               SCpnt1 = SCpnt1->next;
-       }
-       if (SCpnt1 == NULL) {
-               reset_flags |= SCSI_RESET_SUGGEST_BUS_RESET;
-       }
-       /*
-        * If the code that called us is suggesting a hard reset, then
-        * definitely request it.  This usually occurs because a
-        * BUS_DEVICE_RESET times out.
-        *
-        * Passing reset_flags along takes care of this automatically.
-        */
-       if (reset_flags & SCSI_RESET_SUGGEST_BUS_RESET) {
-               SCpnt->host->suggest_bus_reset = TRUE;
-       }
-#endif
-
-       while (1) {
-
-               /*
-                * Protect against races here.  If the command is done, or we are
-                * on a different command forget it.
-                */
-               if (reset_flags & SCSI_RESET_ASYNCHRONOUS)
-                       if (SCpnt->serial_number != SCpnt->serial_number_at_timeout) {
-                               return 0;
-                       }
-               if (SCpnt->internal_timeout & IN_RESET) {
-                       spin_unlock_irq(&host->host_lock);
-                       while (SCpnt->internal_timeout & IN_RESET)
-                               barrier();
-                       spin_lock_irq(&host->host_lock);
-               } else {
-                       SCpnt->internal_timeout |= IN_RESET;
-                       update_timeout(SCpnt, RESET_TIMEOUT);
-
-                       if (reset_flags & SCSI_RESET_SYNCHRONOUS)
-                               SCpnt->flags |= SYNC_RESET;
-                       if (host->host_busy) {
-                               for (SDpnt = host->host_queue; SDpnt; SDpnt = SDpnt->next) {
-                                       SCpnt1 = SDpnt->device_queue;
-                                       while (SCpnt1) {
-                                               if (SCpnt1->request.rq_status != RQ_INACTIVE) {
-#if 0
-                                                       if (!(SCpnt1->flags & IS_RESETTING) &&
-                                                           !(SCpnt1->internal_timeout & IN_ABORT))
-                                                               scsi_abort(SCpnt1, DID_RESET);
-#endif
-                                                       SCpnt1->flags |= (WAS_RESET | IS_RESETTING);
-                                               }
-                                               SCpnt1 = SCpnt1->next;
-                                       }
-                               }
-
-                               host->last_reset = jiffies;
-                               host->resetting = 1;
-                               /*
-                                * I suppose that the host reset callback will not play
-                                * with the resetting field. We have just set the resetting
-                                * flag here. -arca
-                                */
-                               temp = host->hostt->reset(SCpnt, reset_flags);
-                               /*
-                                  This test allows the driver to introduce an additional bus
-                                  settle time delay by setting last_reset up to 20 seconds in
-                                  the future.  In the normal case where the driver does not
-                                  modify last_reset, it must be assumed that the actual bus
-                                  reset occurred immediately prior to the return to this code,
-                                  and so last_reset must be updated to the current time, so
-                                  that the delay in internal_cmnd will guarantee at least a
-                                  MIN_RESET_DELAY bus settle time.
-                                */
-                               if (host->last_reset - jiffies > 20UL * HZ)
-                                       host->last_reset = jiffies;
-                       } else {
-                               host->host_busy++;
-                               host->last_reset = jiffies;
-                               host->resetting = 1;
-                               SCpnt->flags |= (WAS_RESET | IS_RESETTING);
-                               /*
-                                * I suppose that the host reset callback will not play
-                                * with the resetting field. We have just set the resetting
-                                * flag here. -arca
-                                */
-                               temp = host->hostt->reset(SCpnt, reset_flags);
-                               if (time_before(host->last_reset, jiffies) ||
-                                   (time_after(host->last_reset, jiffies + 20 * HZ)))
-                                       host->last_reset = jiffies;
-                               host->host_busy--;
-                       }
-                       if (reset_flags & SCSI_RESET_SYNCHRONOUS)
-                               SCpnt->flags &= ~SYNC_RESET;
-
-#ifdef DEBUG
-                       printk("scsi reset function returned %d\n", temp);
-#endif
-
-                       /*
-                        * Now figure out what we need to do, based upon
-                        * what the low level driver said that it did.
-                        * If the result is SCSI_RESET_SUCCESS, SCSI_RESET_PENDING,
-                        * or SCSI_RESET_WAKEUP, then the low level driver did a
-                        * bus device reset or bus reset, so we should go through
-                        * and mark one or all of the devices on that bus
-                        * as having been reset.
-                        */
-                       switch (temp & SCSI_RESET_ACTION) {
-                       case SCSI_RESET_SUCCESS:
-                               if (temp & SCSI_RESET_HOST_RESET)
-                                       scsi_mark_host_reset(host);
-                               else if (temp & SCSI_RESET_BUS_RESET)
-                                       scsi_mark_bus_reset(host, SCpnt->channel);
-                               else
-                                       scsi_mark_device_reset(SCpnt->device);
-                               SCpnt->internal_timeout &= ~(IN_RESET | IN_RESET2 | IN_RESET3);
-                               return 0;
-                       case SCSI_RESET_PENDING:
-                               if (temp & SCSI_RESET_HOST_RESET)
-                                       scsi_mark_host_reset(host);
-                               else if (temp & SCSI_RESET_BUS_RESET)
-                                       scsi_mark_bus_reset(host, SCpnt->channel);
-                               else
-                                       scsi_mark_device_reset(SCpnt->device);
-                       case SCSI_RESET_NOT_RUNNING:
-                               return 0;
-                       case SCSI_RESET_PUNT:
-                               SCpnt->internal_timeout &= ~(IN_RESET | IN_RESET2 | IN_RESET3);
-                               scsi_request_sense(SCpnt);
-                               return 0;
-                       case SCSI_RESET_WAKEUP:
-                               if (temp & SCSI_RESET_HOST_RESET)
-                                       scsi_mark_host_reset(host);
-                               else if (temp & SCSI_RESET_BUS_RESET)
-                                       scsi_mark_bus_reset(host, SCpnt->channel);
-                               else
-                                       scsi_mark_device_reset(SCpnt->device);
-                               SCpnt->internal_timeout &= ~(IN_RESET | IN_RESET2 | IN_RESET3);
-                               scsi_request_sense(SCpnt);
-                               /*
-                                * If a bus reset was performed, we
-                                * need to wake up each and every command
-                                * that was active on the bus or if it was a HBA
-                                * reset all active commands on all channels
-                                */
-                               if (temp & SCSI_RESET_HOST_RESET) {
-                                       for (SDpnt = host->host_queue; SDpnt; SDpnt = SDpnt->next) {
-                                               SCpnt1 = SDpnt->device_queue;
-                                               while (SCpnt1) {
-                                                       if (SCpnt1->request.rq_status != RQ_INACTIVE
-                                                           && SCpnt1 != SCpnt)
-                                                               scsi_request_sense(SCpnt1);
-                                                       SCpnt1 = SCpnt1->next;
-                                               }
-                                       }
-                               } else if (temp & SCSI_RESET_BUS_RESET) {
-                                       for (SDpnt = host->host_queue; SDpnt; SDpnt = SDpnt->next) {
-                                               SCpnt1 = SDpnt->device_queue;
-                                               while (SCpnt1) {
-                                                       if (SCpnt1->request.rq_status != RQ_INACTIVE
-                                                       && SCpnt1 != SCpnt
-                                                           && SCpnt1->channel == SCpnt->channel)
-                                                               scsi_request_sense(SCpnt);
-                                                       SCpnt1 = SCpnt1->next;
-                                               }
-                                       }
-                               }
-                               return 0;
-                       case SCSI_RESET_SNOOZE:
-                               /* In this case, we set the timeout field to 0
-                                * so that this command does not time out any more,
-                                * and we return 1 so that we get a message on the
-                                * screen.
-                                */
-                               SCpnt->internal_timeout &= ~(IN_RESET | IN_RESET2 | IN_RESET3);
-                               update_timeout(SCpnt, 0);
-                               /* If you snooze, you lose... */
-                       case SCSI_RESET_ERROR:
-                       default:
-                               return 1;
-                       }
-
-                       return temp;
-               }
-       }
-}
-
-/*
- * The strategy is to cause the timer code to call scsi_times_out()
- * when the soonest timeout is pending.
- * The arguments are used when we are queueing a new command, because
- * we do not want to subtract the time used from this time, but when we
- * set the timer, we want to take this value into account.
- */
-
-int update_timeout(Scsi_Cmnd * SCset, int timeout)
-{
-       int rtn;
-
-       /*
-        * We are using the new error handling code to actually register/deregister
-        * timers for timeout.
-        */
-
-       if (!timer_pending(&SCset->eh_timeout)) {
-               rtn = 0;
-       } else {
-               rtn = SCset->eh_timeout.expires - jiffies;
-       }
-
-       if (timeout == 0) {
-               scsi_delete_timer(SCset);
-       } else {
-               scsi_add_timer(SCset, timeout, scsi_old_times_out);
-       }
-
-       return rtn;
-}
-
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-indent-level: 4
- * c-brace-imaginary-offset: 0
- * c-brace-offset: -4
- * c-argdecl-indent: 4
- * c-label-offset: -4
- * c-continued-statement-offset: 4
- * c-continued-brace-offset: 0
- * indent-tabs-mode: nil
- * tab-width: 8
- * End:
- */
index bdf2142b851ccd21a64d564d4b76412b8123d9e4..7fb246998bffcd81d6df816f01a4199ac3635f8c 100644 (file)
@@ -54,7 +54,6 @@ EXPORT_SYMBOL(scsi_need_isa_buffer);
 EXPORT_SYMBOL(scsi_release_command);
 EXPORT_SYMBOL(print_Scsi_Cmnd);
 EXPORT_SYMBOL(scsi_block_when_processing_errors);
-EXPORT_SYMBOL(scsi_mark_host_reset);
 EXPORT_SYMBOL(scsi_ioctl_send_command);
 #if defined(CONFIG_SCSI_LOGGING)       /* { */
 EXPORT_SYMBOL(scsi_logging_level);
index 77e98e0b3b07df3cbc2963d04a3c1fce75c5c466..585b4b55081b5f40c33c6d9b8404658df9b29133 100644 (file)
@@ -236,8 +236,6 @@ static int sd_ioctl(struct inode * inode, struct file * file, unsigned int cmd,
                 case BLKELVSET:
                case BLKBSZGET:
                case BLKBSZSET:
-               case BLKHASHPROF:
-               case BLKHASHCLEAR:
                        return blk_ioctl(inode->i_rdev, cmd, arg);
 
                case BLKRRPART: /* Re-read partition tables */
index 71fb97133d19bf52888c6729d6e45eaa73961626..8c637639dbc64513cd52c00e08f44b0e83848f48 100644 (file)
@@ -336,9 +336,7 @@ static int sg_release(struct inode * inode, struct file * filp)
     Sg_device * sdp;
     Sg_fd * sfp;
 
-    lock_kernel();
     if ((! (sfp = (Sg_fd *)filp->private_data)) || (! (sdp = sfp->parentdp))) {
-       unlock_kernel();
         return -ENXIO;
     }
     SCSI_LOG_TIMEOUT(3, printk("sg_release: dev=%d\n", MINOR(sdp->i_rdev)));
@@ -352,7 +350,6 @@ static int sg_release(struct inode * inode, struct file * filp)
        sdp->exclude = 0;
        wake_up_interruptible(&sdp->o_excl_wait);
     }
-    unlock_kernel();
     return 0;
 }
 
index 5fed80efb0aa95293b02d27ed4b1ecf92d93072a..110e913981358c8a7d69311f2be1730c01e82648 100644 (file)
@@ -38,7 +38,6 @@ int sim710_release(struct Scsi_Host *);
                      sg_tablesize:             128,                    \
                      cmd_per_lun:              1,                      \
                      use_clustering:           DISABLE_CLUSTERING,     \
-                     use_new_eh_code:          1}
 
 #ifndef HOSTS_C
 
index f47d1a0bb68a14fb12d59235b4d0b796eda33411..30a8a23d3991e4c9b5f13694071775f1bdc918c0 100644 (file)
@@ -326,11 +326,14 @@ static int sr_scatter_pad(Scsi_Cmnd *SCpnt, int s_size)
        }
        if (old_sg) {
                memcpy(sg + i, old_sg, SCpnt->use_sg * sizeof(struct scatterlist));
-               memcpy(bbpnt + i, old_bbpnt, SCpnt->use_sg * sizeof(void *));
+               if (old_bbpnt)
+                       memcpy(bbpnt + i, old_bbpnt, SCpnt->use_sg * sizeof(void *));
                scsi_free(old_sg, (((SCpnt->use_sg * sizeof(struct scatterlist)) +
                                    (SCpnt->use_sg * sizeof(void *))) + 511) & ~511);
        } else {
-               sg[i].address = SCpnt->request_buffer;
+               sg[i].address = NULL;
+               sg[i].page = virt_to_page(SCpnt->request_buffer);
+               sg[i].offset = (unsigned long) SCpnt->request_buffer&~PAGE_MASK;
                sg[i].length = SCpnt->request_bufflen;
        }
 
@@ -340,7 +343,9 @@ static int sr_scatter_pad(Scsi_Cmnd *SCpnt, int s_size)
        SCpnt->use_sg += i;
 
        if (bsize) {
-               sg[SCpnt->use_sg].address = back;
+               sg[SCpnt->use_sg].address = NULL;
+               sg[SCpnt->use_sg].page = virt_to_page(back);
+               sg[SCpnt->use_sg].offset = (unsigned long) back & ~PAGE_MASK;
                bbpnt[SCpnt->use_sg] = back;
                sg[SCpnt->use_sg].length = bsize;
                SCpnt->use_sg++;
index 1240cbfb2bda0acd5132e90acb0ebca831485e38..9c7ef0284753b14148eabecd06ff10567b03aaaa 100644 (file)
@@ -109,7 +109,6 @@ int sym53c8xx_release(struct Scsi_Host *);
        release:                sym53c8xx_release,                      \
        info:                   sym53c8xx_info,                         \
        queuecommand:           sym53c8xx_queue_command,                \
-       use_new_eh_code:        1,                                      \
        eh_abort_handler:       sym53c8xx_eh_abort_handler,             \
        eh_device_reset_handler:sym53c8xx_eh_device_reset_handler,      \
        eh_bus_reset_handler:   sym53c8xx_eh_bus_reset_handler,         \
index f832f96e45100dbf1d65d314100a84752544e4fa..1d2988d739b52b4872beba5ab9ab43c4c0bc8328 100644 (file)
@@ -30,7 +30,6 @@ int u14_34f_biosparam(Disk *, kdev_t, int *);
                 this_id:                 7,                                  \
                 unchecked_isa_dma:       1,                                  \
                 use_clustering:          ENABLE_CLUSTERING,                  \
-                use_new_eh_code:         1    /* Enable new error code */    \
                 }
 
 #endif
index d941fdf2ce28797329a9aa5127a453f3bf6d31a8..c90e07f787f0f1ee2966ec93f08251248037460b 100644 (file)
@@ -57,6 +57,5 @@ int wd7000_biosparam (Disk *, kdev_t, int *);
        cmd_per_lun:            1,                              \
        unchecked_isa_dma:      1,                              \
        use_clustering:         ENABLE_CLUSTERING,              \
-       use_new_eh_code:        0                               \
 }
 #endif
index 97b247fa30f31991b8aacb5a10ca7b258e36a949..9a413f217a943f4c3df34d0aa48e837d97d67bef 100644 (file)
@@ -196,7 +196,6 @@ sgi_graphics_close (struct inode *inode, struct file *file)
        int board = GRAPHICS_CARD (inode->i_rdev);
 
        /* Tell the rendering manager that one client is going away */
-       lock_kernel();
        rrm_close (inode, file);
 
        /* Was this file handle from the board owner?, clear it */
@@ -206,7 +205,6 @@ sgi_graphics_close (struct inode *inode, struct file *file)
                        (*cards [board].g_reset_console)();
                enable_gconsole ();
        }
-       unlock_kernel();
        return 0;
 }
 
index 8162e0eeaaafc9bf218ace4f9ee13952acc43876..8aeee78e04a53d8dd09aa477d331ad5fd09d15ed 100644 (file)
@@ -79,11 +79,13 @@ static struct {
 
 /* /dev/qcntlN attached memory regions, location and size of the event queue */
 static struct {
-       int    opened;          /* if this device has been opened */
-       void   *shmiq_vaddr;    /* mapping in kernel-land */
-       int    tail;            /* our copy of the shmiq->tail */
-       int    events;
-       int    mapped;
+       int             opened;
+       void            *shmiq_vaddr;           /* mapping in kernel-land */
+       spinlock_t      shmiq_lock:SPIN_LOCK_UNLOCKED;
+                                               /* protects vaddr and opened */
+       int             tail;                   /* our copy of the shmiq->tail */
+       int             events;
+       int             mapped;
        
        wait_queue_head_t    proc_list;
        struct fasync_struct *fasync;
@@ -328,10 +330,10 @@ shmiq_qcntl_mmap (struct file *file, struct vm_area_struct *vma)
 
        size  = vma->vm_end - vma->vm_start;
        start = vma->vm_start; 
-       lock_kernel();
+       spin_lock( &shmiqs [minor].shmiq_lock );
        mem = (unsigned long) shmiqs [minor].shmiq_vaddr =  vmalloc_uncached (size);
        if (!mem) {
-               unlock_kernel();
+               spin_unlock( &shmiqs [minor].shmiq_lock );
                return -EINVAL;
        }
 
@@ -347,8 +349,7 @@ shmiq_qcntl_mmap (struct file *file, struct vm_area_struct *vma)
        shmiqs [minor].tail = 0;
        /* Init the shared memory input queue */
        memset (shmiqs [minor].shmiq_vaddr, 0, size);
-       unlock_kernel();
-       
+       spin_unlock( &shmiqs [minor].shmiq_lock );
        return error;
 }
 
@@ -393,13 +394,16 @@ shmiq_qcntl_open (struct inode *inode, struct file *filp)
        minor--;
        if (minor > MAX_SHMI_QUEUES)
                return -EINVAL;
+       spin_lock( &shmiqs [minor].shmiq_lock );
        if (shmiqs [minor].opened)
+       {
+               spin_unlock( &shmiqs [minor].shmiq_lock );
                return -EBUSY;
+       }
 
-       lock_kernel ();
        shmiqs [minor].opened      = 1;
        shmiqs [minor].shmiq_vaddr = 0;
-       unlock_kernel ();
+       spin_unlock( &shmiqs [minor].shmiq_lock );
 
        return 0;
 }
@@ -429,18 +433,19 @@ shmiq_qcntl_close (struct inode *inode, struct file *filp)
 
        if (minor > MAX_SHMI_QUEUES)
                return -EINVAL;
+
+       spin_lock( &shmiqs [minor].shmiq_lock );
        if (shmiqs [minor].opened == 0)
                return -EINVAL;
 
-       lock_kernel ();
        shmiq_qcntl_fasync (-1, filp, 0);
-       shmiqs [minor].opened      = 0;
+       shmiqs [minor].opened      = 0;
        shmiqs [minor].mapped      = 0;
        shmiqs [minor].events      = 0;
        shmiqs [minor].fasync      = 0;
        vfree (shmiqs [minor].shmiq_vaddr);
        shmiqs [minor].shmiq_vaddr = 0;
-       unlock_kernel ();
+       spin_unlock( &shmiqs [minor].shmiq_lock );
 
        return 0;
 }
index 1d2a65c2a2923baa55e8acdbd8d7a44612a05a60..6e4f0e34f551330f0f389841181b0211890ee547 100644 (file)
@@ -221,9 +221,7 @@ sgi_mouse_open (struct inode *inode, struct file *file)
 static int
 sgi_mouse_close (struct inode *inode, struct file *filp)
 {
-       lock_kernel();
        mouse_opened = 0;
-       unlock_kernel();
        return 0;
 }
 
index 6b7ce77899b83b65fe567d704a6046ee02d4a749..32655e4c16621d77fcbac855f9cffc067425c095 100644 (file)
  * Aki Laukkanen       : added power management support
  * Arnaldo C. de Melo  : added missing restore_flags in ad1848_resume
  * Miguel Freitas       : added ISA PnP support
+ * Alan Cox            : Added CS4236->4239 identification
+ * Daniel T. Cobra     : Alernate config/mixer for later chips
+ * Alan Cox            : Merged chip idents and config code
+ *
+ * TODO
+ *             APM save restore assist code on IBM thinkpad
  *
  * Status:
  *             Tested. Believed fully functional.
@@ -57,7 +63,7 @@ typedef struct
        int             dual_dma;       /* 1, when two DMA channels allocated */
        int             subtype;
        unsigned char   MCE_bit;
-       unsigned char   saved_regs[32];
+       unsigned char   saved_regs[64]; /* Includes extended register space */
        int             debug_flag;
 
        int             audio_flags;
@@ -78,6 +84,9 @@ typedef struct
 #define MD_IWAVE       7
 #define MD_4235         8 /* Crystal Audio CS4235  */
 #define MD_1845_SSCAPE  9 /* Ensoniq Soundscape PNP*/
+#define MD_4236                10 /* 4236 and higher */
+#define MD_42xB                11 /* CS 42xB */
+#define MD_4239                12 /* CS4239 */
 
        /* Mixer parameters */
        int             recmask;
@@ -202,9 +211,22 @@ static int ad_read(ad1848_info * devc, int reg)
 
        save_flags(flags);
        cli();
-       outb(((unsigned char) (reg & 0xff) | devc->MCE_bit), io_Index_Addr(devc));
-       x = inb(io_Indexed_Data(devc));
-/* printk("(%02x<-%02x) ", reg|devc->MCE_bit, x); */
+       
+       if(reg < 32)
+       {
+               outb(((unsigned char) (reg & 0xff) | devc->MCE_bit), io_Index_Addr(devc));
+               x = inb(io_Indexed_Data(devc));
+       }
+       else
+       {
+               int xreg, xra;
+
+               xreg = (reg & 0xff) - 32;
+               xra = (((xreg & 0x0f) << 4) & 0xf0) | 0x08 | ((xreg & 0x10) >> 2);
+               outb(((unsigned char) (23 & 0xff) | devc->MCE_bit), io_Index_Addr(devc));
+               outb(((unsigned char) (xra & 0xff)), io_Indexed_Data(devc));
+               x = inb(io_Indexed_Data(devc));
+       }
        restore_flags(flags);
 
        return x;
@@ -220,9 +242,22 @@ static void ad_write(ad1848_info * devc, int reg, int data)
 
        save_flags(flags);
        cli();
-       outb(((unsigned char) (reg & 0xff) | devc->MCE_bit), io_Index_Addr(devc));
-       outb(((unsigned char) (data & 0xff)), io_Indexed_Data(devc));
-       /* printk("(%02x->%02x) ", reg|devc->MCE_bit, data); */
+       
+       if(reg < 32)
+       {
+               outb(((unsigned char) (reg & 0xff) | devc->MCE_bit), io_Index_Addr(devc));
+               outb(((unsigned char) (data & 0xff)), io_Indexed_Data(devc));
+       }
+       else
+       {
+               int xreg, xra;
+               
+               xreg = (reg & 0xff) - 32;
+               xra = (((xreg & 0x0f) << 4) & 0xf0) | 0x08 | ((xreg & 0x10) >> 2);
+               outb(((unsigned char) (23 & 0xff) | devc->MCE_bit), io_Index_Addr(devc));
+               outb(((unsigned char) (xra & 0xff)), io_Indexed_Data(devc));
+               outb((unsigned char) (data & 0xff), io_Indexed_Data(devc));
+       }
        restore_flags(flags);
 }
 
@@ -591,7 +626,13 @@ static void ad1848_mixer_reset(ad1848_info * devc)
                        devc->mix_devices = &(iwave_mix_devices[0]);
                        break;
 
+               case MD_42xB:
+               case MD_4239:
+                       devc->mix_devices = &(cs42xb_mix_devices[0]);
+                       devc->supported_devices = MODE3_MIXER_DEVICES;
+                       break;
                case MD_4232:
+               case MD_4236:
                        devc->supported_devices = MODE3_MIXER_DEVICES;
                        break;
 
@@ -1118,7 +1159,7 @@ static int ad1848_prepare_for_output(int dev, int bsize, int bcount)
        }
        old_fs = ad_read(devc, 8);
 
-       if (devc->model == MD_4232)
+       if (devc->model == MD_4232 || devc->model >= MD_4236)
        {
                tmp = ad_read(devc, 16);
                ad_write(devc, 16, tmp | 0x30);
@@ -1139,7 +1180,7 @@ static int ad1848_prepare_for_output(int dev, int bsize, int bcount)
        while (timeout < 10000 && inb(devc->base) == 0x80)
                timeout++;
 
-       if (devc->model == MD_4232)
+       if (devc->model >= MD_4232)
                ad_write(devc, 16, tmp & ~0x30);
 
        ad_leave_MCE(devc);     /*
@@ -1403,11 +1444,12 @@ static void ad1848_trigger(int dev, int state)
 static void ad1848_init_hw(ad1848_info * devc)
 {
        int i;
+       int *init_values;
 
        /*
         * Initial values for the indirect registers of CS4248/AD1848.
         */
-       static int      init_values[] =
+       static int      init_values_a[] =
        {
                0xa8, 0xa8, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00,
                0x00, 0x0c, 0x02, 0x00, 0x8a, 0x01, 0x00, 0x00,
@@ -1417,6 +1459,31 @@ static void ad1848_init_hw(ad1848_info * devc)
                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
        };
 
+       static int      init_values_b[] =
+       {
+               /* 
+                  Values for the newer chips
+                  Some of the register initialization values were changed. In
+                  order to get rid of the click that preceded PCM playback,
+                  calibration was disabled on the 10th byte. On that same byte,
+                  dual DMA was enabled; on the 11th byte, ADC dithering was
+                  enabled, since that is theoretically desirable; on the 13th
+                  byte, Mode 3 was selected, to enable access to extended
+                  registers.
+                */
+               0xa8, 0xa8, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00,
+               0x00, 0x00, 0x06, 0x00, 0xe0, 0x01, 0x00, 0x00,
+               0x80, 0x00, 0x10, 0x10, 0x00, 0x00, 0x1f, 0x40,
+               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+       };
+
+       /*
+        *      Select initialisation data
+        */
+        
+       init_values = init_values_a;
+       if(devc->model >= MD_4236)
+               init_values = init_values_b;
 
        for (i = 0; i < 16; i++)
                ad_write(devc, i, init_values[i]);
@@ -1768,19 +1835,49 @@ int ad1848_detect(int io_base, int *ad_flags, int *osp)
                                else
                                {
                                        switch (id & 0x1f) {
-                                       case 3: /* CS4236/CS4235 */
+                                       case 3: /* CS4236/CS4235/CS42xB/CS4239 */
                                                {
                                                        int xid;
                                                        ad_write(devc, 12, ad_read(devc, 12) | 0x60); /* switch to mode 3 */
                                                        ad_write(devc, 23, 0x9c); /* select extended register 25 */
                                                        xid = inb(io_Indexed_Data(devc));
                                                        ad_write(devc, 12, ad_read(devc, 12) & ~0x60); /* back to mode 0 */
-                                                       if ((xid & 0x1f) == 0x1d) {
-                                                               devc->chip_name = "CS4235";
-                                                               devc->model = MD_4235;
-                                                       } else {
-                                                               devc->chip_name = "CS4236";
-                                                               devc->model = MD_4232;
+                                                       switch (xid & 0x1f)
+                                                       {
+                                                               case 0x00:
+                                                                       devc->chip_name = "CS4237B(B)";
+                                                                       devc->model = MD_42xB;
+                                                                       break;
+                                                               case 0x08:
+                                                                       /* Seems to be a 4238 ?? */
+                                                                       devc->chip_name = "CS4238";
+                                                                       devc->model = MD_42xB;
+                                                                       break;
+                                                               case 0x09:
+                                                                       devc->chip_name = "CS4238B";
+                                                                       devc->model = MD_42xB;
+                                                                       break;
+                                                               case 0x0b:
+                                                                       devc->chip_name = "CS4236B";
+                                                                       devc->model = MD_4236;
+                                                                       break;
+                                                               case 0x10:
+                                                                       devc->chip_name = "CS4237B";
+                                                                       devc->model = MD_42xB;
+                                                                       break;
+                                                               case 0x1d:
+                                                                       devc->chip_name = "CS4235";
+                                                                       devc->model = MD_4235;
+                                                                       break;
+                                                               case 0x1e:
+                                                                       devc->chip_name = "CS4239";
+                                                                       devc->model = MD_4239;
+                                                                       break;
+                                                               default:
+                                                                       printk("Chip ident is %X.\n", xid&0x1F);
+                                                                       devc->chip_name = "CS42xx";
+                                                                       devc->model = MD_4232;
+                                                                       break;
                                                        }
                                                }
                                                break;
@@ -2747,6 +2844,10 @@ static int ad1848_resume(ad1848_info *devc)
 
        save_flags(flags);
        cli();
+       
+       /* Thinkpad is a bit more of PITA than normal. The BIOS tends to
+          restore it in a different config to the one we use.  Need to
+          fix this somehow */
 
        /* store old mixer levels */
        memcpy(mixer_levels, devc->levels, sizeof (mixer_levels));  
index fdd06e49978cc8c4299bcf32cfe81c15fc5b39a4..f9231c6cd4e1da24ce94a3d93eea315668fb6fde 100644 (file)
                                 SOUND_MASK_OGAIN)
 
 struct mixer_def {
-       unsigned int regno:5;           /* register number for volume */
+       unsigned int regno:6;           /* register number for volume */
        unsigned int polarity:1;        /* volume polarity: 0=normal, 1=reversed */
        unsigned int bitpos:3;          /* position of bits in register for volume */
        unsigned int nbits:3;           /* number of bits in register for volume */
-       unsigned int mutereg:5;         /* register number for mute bit */
+       unsigned int mutereg:6;         /* register number for mute bit */
        unsigned int mutepol:1;         /* mute polarity: 0=normal, 1=reversed */
        unsigned int mutepos:4;         /* position of mute bit in register */
-       unsigned int recreg:5;          /* register number for recording bit */
+       unsigned int recreg:6;          /* register number for recording bit */
        unsigned int recpol:1;          /* recording polarity: 0=normal, 1=reversed */
        unsigned int recpos:4;          /* position of recording bit in register */
 };
@@ -104,43 +104,69 @@ typedef mixer_ent mixer_ents[2];
                    rec_reg_r, rec_pola_r, rec_pos_r}}
 
 static mixer_ents ad1848_mix_devices[32] = {
-MIX_ENT(SOUND_MIXER_VOLUME,    27, 1, 0, 4,    29, 1, 0, 4,  8),
-MIX_ENT(SOUND_MIXER_BASS,       0, 0, 0, 0,     0, 0, 0, 0,  8),
-MIX_ENT(SOUND_MIXER_TREBLE,     0, 0, 0, 0,     0, 0, 0, 0,  8),
-MIX_ENT(SOUND_MIXER_SYNTH,      4, 1, 0, 5,     5, 1, 0, 5,  7),
-MIX_ENT(SOUND_MIXER_PCM,        6, 1, 0, 6,     7, 1, 0, 6,  7),
-MIX_ENT(SOUND_MIXER_SPEAKER,   26, 1, 0, 4,     0, 0, 0, 0,  8),
-MIX_ENT(SOUND_MIXER_LINE,      18, 1, 0, 5,    19, 1, 0, 5,  7),
-MIX_ENT(SOUND_MIXER_MIC,        0, 0, 5, 1,     1, 0, 5, 1,  8),
-MIX_ENT(SOUND_MIXER_CD,                 2, 1, 0, 5,     3, 1, 0, 5,  7),
-MIX_ENT(SOUND_MIXER_IMIX,      13, 1, 2, 6,     0, 0, 0, 0,  8),
-MIX_ENT(SOUND_MIXER_ALTPCM,     0, 0, 0, 0,     0, 0, 0, 0,  8),
-MIX_ENT(SOUND_MIXER_RECLEV,     0, 0, 0, 0,     0, 0, 0, 0,  8),
-MIX_ENT(SOUND_MIXER_IGAIN,      0, 0, 0, 4,     1, 0, 0, 4,  8),
-MIX_ENT(SOUND_MIXER_OGAIN,      0, 0, 0, 0,     0, 0, 0, 0,  8),
-MIX_ENT(SOUND_MIXER_LINE1,      2, 1, 0, 5,     3, 1, 0, 5,  7),
-MIX_ENT(SOUND_MIXER_LINE2,      4, 1, 0, 5,     5, 1, 0, 5,  7),
-MIX_ENT(SOUND_MIXER_LINE3,     18, 1, 0, 5,    19, 1, 0, 5,  7)
+       MIX_ENT(SOUND_MIXER_VOLUME,     27, 1, 0, 4,    29, 1, 0, 4,  8),
+       MIX_ENT(SOUND_MIXER_BASS,        0, 0, 0, 0,     0, 0, 0, 0,  8),
+       MIX_ENT(SOUND_MIXER_TREBLE,      0, 0, 0, 0,     0, 0, 0, 0,  8),
+       MIX_ENT(SOUND_MIXER_SYNTH,       4, 1, 0, 5,     5, 1, 0, 5,  7),
+       MIX_ENT(SOUND_MIXER_PCM,         6, 1, 0, 6,     7, 1, 0, 6,  7),
+       MIX_ENT(SOUND_MIXER_SPEAKER,    26, 1, 0, 4,     0, 0, 0, 0,  8),
+       MIX_ENT(SOUND_MIXER_LINE,       18, 1, 0, 5,    19, 1, 0, 5,  7),
+       MIX_ENT(SOUND_MIXER_MIC,         0, 0, 5, 1,     1, 0, 5, 1,  8),
+       MIX_ENT(SOUND_MIXER_CD,          2, 1, 0, 5,     3, 1, 0, 5,  7),
+       MIX_ENT(SOUND_MIXER_IMIX,       13, 1, 2, 6,     0, 0, 0, 0,  8),
+       MIX_ENT(SOUND_MIXER_ALTPCM,      0, 0, 0, 0,     0, 0, 0, 0,  8),
+       MIX_ENT(SOUND_MIXER_RECLEV,      0, 0, 0, 0,     0, 0, 0, 0,  8),
+       MIX_ENT(SOUND_MIXER_IGAIN,       0, 0, 0, 4,     1, 0, 0, 4,  8),
+       MIX_ENT(SOUND_MIXER_OGAIN,       0, 0, 0, 0,     0, 0, 0, 0,  8),
+       MIX_ENT(SOUND_MIXER_LINE1,       2, 1, 0, 5,     3, 1, 0, 5,  7),
+       MIX_ENT(SOUND_MIXER_LINE2,       4, 1, 0, 5,     5, 1, 0, 5,  7),
+       MIX_ENT(SOUND_MIXER_LINE3,      18, 1, 0, 5,    19, 1, 0, 5,  7)
 };
 
 static mixer_ents iwave_mix_devices[32] = {
-MIX_ENT(SOUND_MIXER_VOLUME,    25, 1, 0, 5,    27, 1, 0, 5,  8),
-MIX_ENT(SOUND_MIXER_BASS,       0, 0, 0, 0,     0, 0, 0, 0,  8),
-MIX_ENT(SOUND_MIXER_TREBLE,     0, 0, 0, 0,     0, 0, 0, 0,  8),
-MIX_ENT(SOUND_MIXER_SYNTH,      4, 1, 0, 5,     5, 1, 0, 5,  7),
-MIX_ENT(SOUND_MIXER_PCM,        6, 1, 0, 6,     7, 1, 0, 6,  7),
-MIX_ENT(SOUND_MIXER_SPEAKER,   26, 1, 0, 4,     0, 0, 0, 0,  8),
-MIX_ENT(SOUND_MIXER_LINE,      18, 1, 0, 5,    19, 1, 0, 5,  7),
-MIX_ENT(SOUND_MIXER_MIC,        0, 0, 5, 1,     1, 0, 5, 1,  8),
-MIX_ENT(SOUND_MIXER_CD,                 2, 1, 0, 5,     3, 1, 0, 5,  7),
-MIX_ENT(SOUND_MIXER_IMIX,      16, 1, 0, 5,    17, 1, 0, 5,  8),
-MIX_ENT(SOUND_MIXER_ALTPCM,     0, 0, 0, 0,     0, 0, 0, 0,  8),
-MIX_ENT(SOUND_MIXER_RECLEV,     0, 0, 0, 0,     0, 0, 0, 0,  8),
-MIX_ENT(SOUND_MIXER_IGAIN,      0, 0, 0, 4,     1, 0, 0, 4,  8),
-MIX_ENT(SOUND_MIXER_OGAIN,      0, 0, 0, 0,     0, 0, 0, 0,  8),
-MIX_ENT(SOUND_MIXER_LINE1,      2, 1, 0, 5,     3, 1, 0, 5,  7),
-MIX_ENT(SOUND_MIXER_LINE2,      4, 1, 0, 5,     5, 1, 0, 5,  7),
-MIX_ENT(SOUND_MIXER_LINE3,     18, 1, 0, 5,    19, 1, 0, 5,  7)
+       MIX_ENT(SOUND_MIXER_VOLUME,     25, 1, 0, 5,    27, 1, 0, 5,  8),
+       MIX_ENT(SOUND_MIXER_BASS,        0, 0, 0, 0,     0, 0, 0, 0,  8),
+       MIX_ENT(SOUND_MIXER_TREBLE,      0, 0, 0, 0,     0, 0, 0, 0,  8),
+       MIX_ENT(SOUND_MIXER_SYNTH,       4, 1, 0, 5,     5, 1, 0, 5,  7),
+       MIX_ENT(SOUND_MIXER_PCM,         6, 1, 0, 6,     7, 1, 0, 6,  7),
+       MIX_ENT(SOUND_MIXER_SPEAKER,    26, 1, 0, 4,     0, 0, 0, 0,  8),
+       MIX_ENT(SOUND_MIXER_LINE,       18, 1, 0, 5,    19, 1, 0, 5,  7),
+       MIX_ENT(SOUND_MIXER_MIC,         0, 0, 5, 1,     1, 0, 5, 1,  8),
+       MIX_ENT(SOUND_MIXER_CD,          2, 1, 0, 5,     3, 1, 0, 5,  7),
+       MIX_ENT(SOUND_MIXER_IMIX,       16, 1, 0, 5,    17, 1, 0, 5,  8),
+       MIX_ENT(SOUND_MIXER_ALTPCM,      0, 0, 0, 0,     0, 0, 0, 0,  8),
+       MIX_ENT(SOUND_MIXER_RECLEV,      0, 0, 0, 0,     0, 0, 0, 0,  8),
+       MIX_ENT(SOUND_MIXER_IGAIN,       0, 0, 0, 4,     1, 0, 0, 4,  8),
+       MIX_ENT(SOUND_MIXER_OGAIN,       0, 0, 0, 0,     0, 0, 0, 0,  8),
+       MIX_ENT(SOUND_MIXER_LINE1,       2, 1, 0, 5,     3, 1, 0, 5,  7),
+       MIX_ENT(SOUND_MIXER_LINE2,       4, 1, 0, 5,     5, 1, 0, 5,  7),
+       MIX_ENT(SOUND_MIXER_LINE3,      18, 1, 0, 5,    19, 1, 0, 5,  7)
+};
+
+static mixer_ents cs42xb_mix_devices[32] = {
+       /* Digital master volume actually has seven bits, but we only use
+          six to avoid the discontinuity when the analog gain kicks in. */
+       MIX_ENT(SOUND_MIXER_VOLUME,     46, 1, 0, 6,    47, 1, 0, 6,  7),
+       MIX_ENT(SOUND_MIXER_BASS,        0, 0, 0, 0,     0, 0, 0, 0,  8),
+       MIX_ENT(SOUND_MIXER_TREBLE,      0, 0, 0, 0,     0, 0, 0, 0,  8),
+       MIX_ENT(SOUND_MIXER_SYNTH,       4, 1, 0, 5,     5, 1, 0, 5,  7),
+       MIX_ENT(SOUND_MIXER_PCM,         6, 1, 0, 6,     7, 1, 0, 6,  7),
+       MIX_ENT(SOUND_MIXER_SPEAKER,    26, 1, 0, 4,     0, 0, 0, 0,  8),
+       MIX_ENT(SOUND_MIXER_LINE,       18, 1, 0, 5,    19, 1, 0, 5,  7),
+       MIX_ENT(SOUND_MIXER_MIC,        34, 1, 0, 5,    35, 1, 0, 5,  7),
+       MIX_ENT(SOUND_MIXER_CD,          2, 1, 0, 5,     3, 1, 0, 5,  7),
+       /* For the IMIX entry, it was not possible to use the MIX_ENT macro
+          because the mute bit is in different positions for the two
+          channels and requires reverse polarity. */
+       [SOUND_MIXER_IMIX] = {{13, 1, 2, 6, 13, 1, 0, 0, 0, 8},
+                     {42, 1, 0, 6, 42, 1, 7, 0, 0, 8}},
+       MIX_ENT(SOUND_MIXER_ALTPCM,      0, 0, 0, 0,     0, 0, 0, 0,  8),
+       MIX_ENT(SOUND_MIXER_RECLEV,      0, 0, 0, 0,     0, 0, 0, 0,  8),
+       MIX_ENT(SOUND_MIXER_IGAIN,       0, 0, 0, 4,     1, 0, 0, 4,  8),
+       MIX_ENT(SOUND_MIXER_OGAIN,       0, 0, 0, 0,     0, 0, 0, 0,  8),
+       MIX_ENT(SOUND_MIXER_LINE1,       2, 1, 0, 5,     3, 1, 0, 5,  7),
+       MIX_ENT(SOUND_MIXER_LINE2,       4, 1, 0, 5,     5, 1, 0, 5,  7),
+       MIX_ENT(SOUND_MIXER_LINE3,      38, 1, 0, 6,    39, 1, 0, 6,  7)
 };
 
 /* OPTi 82C930 has somewhat different port addresses.
@@ -149,68 +175,68 @@ MIX_ENT(SOUND_MIXER_LINE3,        18, 1, 0, 5,    19, 1, 0, 5,  7)
  * MIC is level of mic monitoring direct to output. Same for CD, LINE, etc.
  */
 static mixer_ents c930_mix_devices[32] = {
-MIX_ENT(SOUND_MIXER_VOLUME,    22, 1, 1, 5,    23, 1, 1, 5,  7),
-MIX_ENT(SOUND_MIXER_BASS,       0, 0, 0, 0,     0, 0, 0, 0,  8),
-MIX_ENT(SOUND_MIXER_TREBLE,     0, 0, 0, 0,     0, 0, 0, 0,  8),
-MIX_ENT(SOUND_MIXER_SYNTH,      4, 1, 1, 4,     5, 1, 1, 4,  7),
-MIX_ENT(SOUND_MIXER_PCM,        6, 1, 0, 5,     7, 1, 0, 5,  7),
-MIX_ENT(SOUND_MIXER_SPEAKER,   22, 1, 1, 5,    23, 1, 1, 5,  7),
-MIX_ENT(SOUND_MIXER_LINE,      18, 1, 1, 4,    19, 1, 1, 4,  7),
-MIX_ENT(SOUND_MIXER_MIC,       20, 1, 1, 4,    21, 1, 1, 4,  7),
-MIX_ENT(SOUND_MIXER_CD,                 2, 1, 1, 4,     3, 1, 1, 4,  7),
-MIX_ENT(SOUND_MIXER_IMIX,       0, 0, 0, 0,     0, 0, 0, 0,  8),
-MIX_ENT(SOUND_MIXER_ALTPCM,     0, 0, 0, 0,     0, 0, 0, 0,  8),
-MIX_ENT(SOUND_MIXER_RECLEV,     0, 0, 0, 0,     0, 0, 0, 0,  8),
-MIX_ENT(SOUND_MIXER_IGAIN,      0, 0, 0, 4,     1, 0, 0, 4,  8),
-MIX_ENT(SOUND_MIXER_OGAIN,      0, 0, 0, 0,     0, 0, 0, 0,  8),
-MIX_ENT(SOUND_MIXER_LINE1,      2, 1, 1, 4,     3, 1, 1, 4,  7),
-MIX_ENT(SOUND_MIXER_LINE2,      4, 1, 1, 4,     5, 1, 1, 4,  7),
-MIX_ENT(SOUND_MIXER_LINE3,     18, 1, 1, 4,    19, 1, 1, 4,  7)
+       MIX_ENT(SOUND_MIXER_VOLUME,     22, 1, 1, 5,    23, 1, 1, 5,  7),
+       MIX_ENT(SOUND_MIXER_BASS,        0, 0, 0, 0,     0, 0, 0, 0,  8),
+       MIX_ENT(SOUND_MIXER_TREBLE,      0, 0, 0, 0,     0, 0, 0, 0,  8),
+       MIX_ENT(SOUND_MIXER_SYNTH,       4, 1, 1, 4,     5, 1, 1, 4,  7),
+       MIX_ENT(SOUND_MIXER_PCM,         6, 1, 0, 5,     7, 1, 0, 5,  7),
+       MIX_ENT(SOUND_MIXER_SPEAKER,    22, 1, 1, 5,    23, 1, 1, 5,  7),
+       MIX_ENT(SOUND_MIXER_LINE,       18, 1, 1, 4,    19, 1, 1, 4,  7),
+       MIX_ENT(SOUND_MIXER_MIC,        20, 1, 1, 4,    21, 1, 1, 4,  7),
+       MIX_ENT(SOUND_MIXER_CD,          2, 1, 1, 4,     3, 1, 1, 4,  7),
+       MIX_ENT(SOUND_MIXER_IMIX,        0, 0, 0, 0,     0, 0, 0, 0,  8),
+       MIX_ENT(SOUND_MIXER_ALTPCM,      0, 0, 0, 0,     0, 0, 0, 0,  8),
+       MIX_ENT(SOUND_MIXER_RECLEV,      0, 0, 0, 0,     0, 0, 0, 0,  8),
+       MIX_ENT(SOUND_MIXER_IGAIN,       0, 0, 0, 4,     1, 0, 0, 4,  8),
+       MIX_ENT(SOUND_MIXER_OGAIN,       0, 0, 0, 0,     0, 0, 0, 0,  8),
+       MIX_ENT(SOUND_MIXER_LINE1,       2, 1, 1, 4,     3, 1, 1, 4,  7),
+       MIX_ENT(SOUND_MIXER_LINE2,       4, 1, 1, 4,     5, 1, 1, 4,  7),
+       MIX_ENT(SOUND_MIXER_LINE3,      18, 1, 1, 4,    19, 1, 1, 4,  7)
 };
 
 static mixer_ents spro_mix_devices[32] = {
-MIX_ENT (SOUND_MIXER_VOLUME,   19, 0, 4, 4,                     19, 0, 0, 4,  8),
-MIX_ENT (SOUND_MIXER_BASS,      0, 0, 0, 0,                      0, 0, 0, 0,  8),
-MIX_ENT (SOUND_MIXER_TREBLE,    0, 0, 0, 0,                      0, 0, 0, 0,  8),
-MIX_ENT2(SOUND_MIXER_SYNTH,     4, 1, 1, 4, 23, 0, 3,  0, 0, 8,
-                                5, 1, 1, 4, 23, 0, 3, 0, 0, 8),
-MIX_ENT (SOUND_MIXER_PCM,       6, 1, 1, 4,                      7, 1, 1, 4,  8),
-MIX_ENT (SOUND_MIXER_SPEAKER,  18, 0, 3, 2,                      0, 0, 0, 0,  8),
-MIX_ENT2(SOUND_MIXER_LINE,     20, 0, 4, 4, 17, 1, 4, 16, 0, 2,
-                               20, 0, 0, 4, 17, 1, 3, 16, 0, 1),
-MIX_ENT2(SOUND_MIXER_MIC,      18, 0, 0, 3, 17, 1, 0, 16, 0, 0,
-                                0, 0, 0, 0,  0, 0, 0,  0, 0, 0),
-MIX_ENT2(SOUND_MIXER_CD,       21, 0, 4, 4, 17, 1, 2, 16, 0, 4,
-                               21, 0, 0, 4, 17, 1, 1, 16, 0, 3),
-MIX_ENT (SOUND_MIXER_IMIX,      0, 0, 0, 0,                      0, 0, 0, 0,  8),
-MIX_ENT (SOUND_MIXER_ALTPCM,    0, 0, 0, 0,                      0, 0, 0, 0,  8),
-MIX_ENT (SOUND_MIXER_RECLEV,    0, 0, 0, 0,                      0, 0, 0, 0,  8),
-MIX_ENT (SOUND_MIXER_IGAIN,     0, 0, 0, 0,                      0, 0, 0, 0,  8),
-MIX_ENT (SOUND_MIXER_OGAIN,    17, 1, 6, 1,                      0, 0, 0, 0,  8),
-/* This is external wavetable */
-MIX_ENT2(SOUND_MIXER_LINE1,    22, 0, 4, 4, 23, 1, 1, 23, 0, 4,
-                               22, 0, 0, 4, 23, 1, 0, 23, 0, 5),
+       MIX_ENT (SOUND_MIXER_VOLUME,    19, 0, 4, 4,                     19, 0, 0, 4,  8),
+       MIX_ENT (SOUND_MIXER_BASS,       0, 0, 0, 0,                      0, 0, 0, 0,  8),
+       MIX_ENT (SOUND_MIXER_TREBLE,     0, 0, 0, 0,                      0, 0, 0, 0,  8),
+       MIX_ENT2(SOUND_MIXER_SYNTH,      4, 1, 1, 4, 23, 0, 3,  0, 0, 8,
+                                        5, 1, 1, 4, 23, 0, 3, 0, 0, 8),
+       MIX_ENT (SOUND_MIXER_PCM,        6, 1, 1, 4,                      7, 1, 1, 4,  8),
+       MIX_ENT (SOUND_MIXER_SPEAKER,   18, 0, 3, 2,                      0, 0, 0, 0,  8),
+       MIX_ENT2(SOUND_MIXER_LINE,      20, 0, 4, 4, 17, 1, 4, 16, 0, 2,
+                                       20, 0, 0, 4, 17, 1, 3, 16, 0, 1),
+       MIX_ENT2(SOUND_MIXER_MIC,       18, 0, 0, 3, 17, 1, 0, 16, 0, 0,
+                                        0, 0, 0, 0,  0, 0, 0,  0, 0, 0),
+       MIX_ENT2(SOUND_MIXER_CD,        21, 0, 4, 4, 17, 1, 2, 16, 0, 4,
+                                       21, 0, 0, 4, 17, 1, 1, 16, 0, 3),
+       MIX_ENT (SOUND_MIXER_IMIX,       0, 0, 0, 0,                      0, 0, 0, 0,  8),
+       MIX_ENT (SOUND_MIXER_ALTPCM,     0, 0, 0, 0,                      0, 0, 0, 0,  8),
+       MIX_ENT (SOUND_MIXER_RECLEV,     0, 0, 0, 0,                      0, 0, 0, 0,  8),
+       MIX_ENT (SOUND_MIXER_IGAIN,      0, 0, 0, 0,                      0, 0, 0, 0,  8),
+       MIX_ENT (SOUND_MIXER_OGAIN,     17, 1, 6, 1,                      0, 0, 0, 0,  8),
+       /* This is external wavetable */
+       MIX_ENT2(SOUND_MIXER_LINE1,     22, 0, 4, 4, 23, 1, 1, 23, 0, 4,
+                                       22, 0, 0, 4, 23, 1, 0, 23, 0, 5),
 };
 
 static int default_mixer_levels[32] =
 {
-  0x3232,                      /* Master Volume */
-  0x3232,                      /* Bass */
-  0x3232,                      /* Treble */
-  0x4b4b,                      /* FM */
-  0x3232,                      /* PCM */
-  0x1515,                      /* PC Speaker */
-  0x2020,                      /* Ext Line */
-  0x1010,                      /* Mic */
-  0x4b4b,                      /* CD */
-  0x0000,                      /* Recording monitor */
-  0x4b4b,                      /* Second PCM */
-  0x4b4b,                      /* Recording level */
-  0x4b4b,                      /* Input gain */
-  0x4b4b,                      /* Output gain */
-  0x2020,                      /* Line1 */
-  0x2020,                      /* Line2 */
-  0x1515                       /* Line3 (usually line in)*/
+       0x3232,                 /* Master Volume */
+       0x3232,                 /* Bass */
+       0x3232,                 /* Treble */
+       0x4b4b,                 /* FM */
+       0x3232,                 /* PCM */
+       0x1515,                 /* PC Speaker */
+       0x2020,                 /* Ext Line */
+       0x1010,                 /* Mic */
+       0x4b4b,                 /* CD */
+       0x0000,                 /* Recording monitor */
+       0x4b4b,                 /* Second PCM */
+       0x4b4b,                 /* Recording level */
+       0x4b4b,                 /* Input gain */
+       0x4b4b,                 /* Output gain */
+       0x2020,                 /* Line1 */
+       0x2020,                 /* Line2 */
+       0x1515                  /* Line3 (usually line in)*/
 };
 
 #define LEFT_CHN       0
index b552bf6c3f621861f5ad0d147e5d8287d71e862c..6228fbe6acc95295d85e5fb81db856cc74ba2043 100644 (file)
@@ -622,7 +622,6 @@ static int dabusb_release (struct inode *inode, struct file *file)
 
        dbg("dabusb_release");
 
-       lock_kernel();
        down (&s->mutex);
        dabusb_stop (s);
        dabusb_free_buffers (s);
@@ -636,7 +635,6 @@ static int dabusb_release (struct inode *inode, struct file *file)
                wake_up (&s->remove_ok);
 
        s->opened = 0;
-       unlock_kernel();
        return 0;
 }
 
index 982f366fe41a26dabc69ab58ea63043defe701ec..b9b3f1daa8930fd63553bbcfa91cfaedafe16590 100644 (file)
@@ -193,7 +193,6 @@ static int hiddev_release(struct inode * inode, struct file * file)
        struct hiddev_list *list = file->private_data;
        struct hiddev_list **listptr;
 
-       lock_kernel();
        listptr = &list->hiddev->list;
        hiddev_fasync(-1, file, 0);
 
@@ -209,7 +208,6 @@ static int hiddev_release(struct inode * inode, struct file * file)
        }
 
        kfree(list);
-       unlock_kernel();
 
        return 0;
 }
index 877e69891d7bc51123d35bb5aed68d6636a7accb..0daa39708437c5aa4565b6f91a5c8102ece5f72f 100644 (file)
@@ -73,7 +73,6 @@ static Scsi_Host_Template hpusbscsi_scsi_host_template = {
        present:                0,
        unchecked_isa_dma:      FALSE,
        use_clustering:         TRUE,
-       use_new_eh_code:        TRUE,
        emulated:               TRUE
 };
 
index 249de20e4fb18611ee2c09cb7e2be321af6d01eb..2e5d06a9225c29a2c8a3a77fab74cba85d87a36c 100644 (file)
@@ -760,7 +760,6 @@ static Scsi_Host_Template mts_scsi_host_template = {
        present:                0,
        unchecked_isa_dma:      FALSE,
        use_clustering:         TRUE,
-       use_new_eh_code:        TRUE,
        emulated:               TRUE
 };
 
index 88e654ec7df4424161a482ab31b4682c8077c365..44e6cf0a9b7e6c1c71035e23450f30b441613e6a 100644 (file)
@@ -388,7 +388,6 @@ Scsi_Host_Template usb_stor_host_template = {
        present:                0,
        unchecked_isa_dma:      FALSE,
        use_clustering:         TRUE,
-       use_new_eh_code:        TRUE,
        emulated:               TRUE
 };
 
index c0a00a113d95b383d1acdf314173b747f5751126..a96746f853e10e67eced782fe9667d82b2f545a9 100644 (file)
@@ -14,9 +14,9 @@
 #include <linux/module.h>
 #include <linux/tty.h>
 #include <linux/fb.h>
-#include <linux/console_struct.h>
 #include <linux/sched.h>
 
+#include <video/fbcon.h>
 
 #undef DEBUG
 
@@ -257,29 +257,6 @@ static int __init my_atoi(const char *name)
     }
 }
 
-static int PROC_CONSOLE(const struct fb_info *info)
-{
-       int fgc;
-       
-       if (info->display_fg != NULL)
-               fgc = info->display_fg->vc_num;
-       else
-               return -1;
-               
-       if (!current->tty)
-               return fgc;
-
-       if (current->tty->driver.type != TTY_DRIVER_TYPE_CONSOLE)
-               /* XXX Should report error here? */
-               return fgc;
-
-       if (MINOR(current->tty->device) < 1)
-               return fgc;
-
-       return MINOR(current->tty->device) - 1;
-}
-
-
 /**
  *     __fb_try_mode - test a video mode
  *     @var: frame buffer user defined part of display
index 6bdc3d3586736ece42b816dfe65851ee2a9e64f2..2a1a29b93d7aae4f08ce4e86cba7e722cf6c3216 100644 (file)
@@ -202,8 +202,6 @@ static void autofs4_dentry_release(struct dentry *de)
 {
        struct autofs_info *inf;
 
-       lock_kernel();
-
        DPRINTK(("autofs4_dentry_release: releasing %p\n", de));
 
        inf = autofs4_dentry_ino(de);
@@ -215,8 +213,6 @@ static void autofs4_dentry_release(struct dentry *de)
 
                autofs4_free_ino(inf);
        }
-
-       unlock_kernel();
 }
 
 /* For dentries of directories in the root dir */
index 18fdad73e8b511a5819b8671a5f032887e6f1a6d..49620706e211dffe13c3f7c8a2d04f9e380b0d8a 100644 (file)
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -40,9 +40,6 @@ static struct bio *bio_pool;
 static DECLARE_WAIT_QUEUE_HEAD(bio_pool_wait);
 static DECLARE_WAIT_QUEUE_HEAD(biovec_pool_wait);
 
-struct bio_hash_bucket *bio_hash_table;
-unsigned int bio_hash_bits, bio_hash_mask;
-
 static unsigned int bio_pool_free;
 
 #define BIOVEC_NR_POOLS 6
@@ -63,269 +60,12 @@ static const int bvec_pool_sizes[BIOVEC_NR_POOLS] = { 1, 4, 16, 64, 128, 256 };
 
 #define BIO_MAX_PAGES  (bvec_pool_sizes[BIOVEC_NR_POOLS - 1])
 
-#ifdef BIO_HASH_PROFILING
-static struct bio_hash_stats bio_stats;
-#endif
-
-/*
- * optimized for 2^BIO_HASH_SCALE kB block size
- */
-#define BIO_HASH_SCALE 3
-#define BIO_HASH_BLOCK(sector) ((sector) >> BIO_HASH_SCALE)
-
-/*
- * pending further testing, grabbed from fs/buffer.c hash so far...
- */
-#define __bio_hash(dev,block)  \
-       (((((dev)<<(bio_hash_bits - 6)) ^ ((dev)<<(bio_hash_bits - 9))) ^ \
-        (((block)<<(bio_hash_bits - 6)) ^ ((block) >> 13) ^ \
-         ((block) << (bio_hash_bits - 12)))) & bio_hash_mask)
-
-#define bio_hash(dev, sector) &((bio_hash_table + __bio_hash(dev, BIO_HASH_BLOCK((sector))))->hash)
-
-#define bio_hash_bucket(dev, sector) (bio_hash_table + __bio_hash(dev, BIO_HASH_BLOCK((sector))))
-
-#define __BIO_HASH_RWLOCK(dev, sector) \
-       &((bio_hash_table + __bio_hash((dev), BIO_HASH_BLOCK((sector))))->lock)
-#define BIO_HASH_RWLOCK(bio)           \
-       __BIO_HASH_RWLOCK((bio)->bi_dev, (bio)->bi_sector)
-
 /*
  * TODO: change this to use slab reservation scheme once that infrastructure
  * is in place...
  */
 #define BIO_POOL_SIZE          (256)
 
-void __init bio_hash_init(unsigned long mempages)
-{
-       unsigned long htable_size, order;
-       int i;
-
-       /*
-        * need to experiment on size of hash
-        */
-       mempages >>= 2;
-
-       htable_size = mempages * sizeof(struct bio_hash_bucket *);
-       for (order = 0; (PAGE_SIZE << order) < htable_size; order++)
-               ;
-
-       do {
-               unsigned long tmp = (PAGE_SIZE << order) / sizeof(struct bio_hash_bucket);
-
-               bio_hash_bits = 0;
-               while ((tmp >>= 1UL) != 0UL)
-                       bio_hash_bits++;
-
-               bio_hash_table = (struct bio_hash_bucket *) __get_free_pages(GFP_ATOMIC, order);
-       } while (bio_hash_table == NULL && --order > 0);
-
-       if (!bio_hash_table)
-               panic("Failed to allocate page hash table\n");
-
-       printk("Bio-cache hash table entries: %ld (order: %ld, %ld bytes)\n",
-              BIO_HASH_SIZE, order, (PAGE_SIZE << order));
-
-       for (i = 0; i < BIO_HASH_SIZE; i++) {
-               struct bio_hash_bucket *hb = &bio_hash_table[i];
-
-               rwlock_init(&hb->lock);
-               hb->hash = NULL;
-       }
-
-       bio_hash_mask = BIO_HASH_SIZE - 1;
-}
-
-inline void __bio_hash_remove(struct bio *bio)
-{
-       bio_hash_t *entry = &bio->bi_hash;
-       bio_hash_t **pprev = entry->pprev_hash;
-
-       if (pprev) {
-               bio_hash_t *nxt = entry->next_hash;
-
-               if (nxt)
-                       nxt->pprev_hash = pprev;
-
-               *pprev = nxt;
-#if 1
-               entry->next_hash = NULL;
-#endif
-               entry->pprev_hash = NULL;
-               entry->valid_counter = 0;
-               bio->bi_hash_desc = NULL;
-#ifdef BIO_HASH_PROFILING
-               atomic_dec(&bio_stats.nr_entries);
-#endif
-       }
-}
-
-inline void bio_hash_remove(struct bio *bio)
-{
-       rwlock_t *hash_lock = BIO_HASH_RWLOCK(bio);
-       unsigned long flags;
-
-       write_lock_irqsave(hash_lock, flags);
-       __bio_hash_remove(bio);
-       write_unlock_irqrestore(hash_lock, flags);
-}
-
-inline void __bio_hash_add(struct bio *bio, bio_hash_t **hash,
-                          void *hash_desc, unsigned int vc)
-{
-       bio_hash_t *entry = &bio->bi_hash;
-       bio_hash_t *nxt = *hash;
-
-       BUG_ON(entry->pprev_hash);
-
-       *hash = entry;
-       entry->next_hash = nxt;
-       entry->pprev_hash = hash;
-       entry->valid_counter = vc;
-
-       if (nxt)
-               nxt->pprev_hash = &entry->next_hash;
-
-       bio->bi_hash_desc = hash_desc;
-
-#ifdef BIO_HASH_PROFILING
-       atomic_inc(&bio_stats.nr_inserts);
-       atomic_inc(&bio_stats.nr_entries);
-       {
-               int entries = atomic_read(&bio_stats.nr_entries);
-               if (entries > atomic_read(&bio_stats.max_entries))
-                       atomic_set(&bio_stats.max_entries, entries);
-       }
-#endif
-}
-
-inline void bio_hash_add(struct bio *bio, void *hash_desc, unsigned int vc)
-{
-       struct bio_hash_bucket *hb =bio_hash_bucket(bio->bi_dev,bio->bi_sector);
-       unsigned long flags;
-
-       write_lock_irqsave(&hb->lock, flags);
-       __bio_hash_add(bio, &hb->hash, hash_desc, vc);
-       write_unlock_irqrestore(&hb->lock, flags);
-}
-
-inline struct bio *__bio_hash_find(kdev_t dev, sector_t sector,
-                                  bio_hash_t **hash, unsigned int vc)
-{
-       bio_hash_t *next = *hash, *entry;
-       struct bio *bio;
-       int nr = 0;
-
-#ifdef BIO_HASH_PROFILING
-       atomic_inc(&bio_stats.nr_lookups);
-#endif
-       while ((entry = next)) {
-               next = entry->next_hash;
-               prefetch(next);
-               bio = bio_hash_entry(entry);
-
-               if (entry->valid_counter == vc) {
-                       if (bio->bi_sector == sector && bio->bi_dev == dev) {
-#ifdef BIO_HASH_PROFILING
-                               if (nr > atomic_read(&bio_stats.max_bucket_size))
-                                       atomic_set(&bio_stats.max_bucket_size, nr);
-                               if (nr <= MAX_PROFILE_BUCKETS)
-                                       atomic_inc(&bio_stats.bucket_size[nr]);
-                               atomic_inc(&bio_stats.nr_hits);
-#endif
-                               bio_get(bio);
-                               return bio;
-                       }
-               }
-               nr++;
-       }
-
-       return NULL;
-}
-
-inline struct bio *bio_hash_find(kdev_t dev, sector_t sector, unsigned int vc)
-{
-       struct bio_hash_bucket *hb = bio_hash_bucket(dev, sector);
-       unsigned long flags;
-       struct bio *bio;
-
-       read_lock_irqsave(&hb->lock, flags);
-       bio = __bio_hash_find(dev, sector, &hb->hash, vc);
-       read_unlock_irqrestore(&hb->lock, flags);
-
-       return bio;
-}
-
-inline int __bio_hash_add_unique(struct bio *bio, bio_hash_t **hash,
-                                void *hash_desc, unsigned int vc)
-{
-       struct bio *alias = __bio_hash_find(bio->bi_dev, bio->bi_sector, hash, vc);
-
-       if (!alias) {
-               __bio_hash_add(bio, hash, hash_desc, vc);
-               return 0;
-       }
-
-       /*
-        * release reference to alias
-        */
-       bio_put(alias);
-       return 1;
-}
-
-inline int bio_hash_add_unique(struct bio *bio, void *hash_desc, unsigned int vc)
-{
-       struct bio_hash_bucket *hb =bio_hash_bucket(bio->bi_dev,bio->bi_sector);
-       unsigned long flags;
-       int ret = 1;
-
-       if (!bio->bi_hash.pprev_hash) {
-               write_lock_irqsave(&hb->lock, flags);
-               ret = __bio_hash_add_unique(bio, &hb->hash, hash_desc, vc);
-               write_unlock_irqrestore(&hb->lock, flags);
-       }
-
-       return ret;
-}
-
-/*
- * increment validity counter on barrier inserts. if it wraps, we must
- * prune all existing entries for this device to be completely safe
- *
- * q->queue_lock must be held by caller
- */
-void bio_hash_invalidate(request_queue_t *q, kdev_t dev)
-{
-       bio_hash_t *hash;
-       struct bio *bio;
-       int i;
-
-       if (++q->hash_valid_counter)
-               return;
-
-       /*
-        * it wrapped...
-        */
-       for (i = 0; i < (1 << bio_hash_bits); i++) {
-               struct bio_hash_bucket *hb = &bio_hash_table[i];
-               unsigned long flags;
-
-               write_lock_irqsave(&hb->lock, flags);
-               while ((hash = hb->hash) != NULL) {
-                       bio = bio_hash_entry(hash);
-                       if (bio->bi_dev != dev)
-                               __bio_hash_remove(bio);
-               }
-               write_unlock_irqrestore(&hb->lock, flags);
-       }
-
-       /*
-        * entries pruned, reset validity counter
-        */
-       q->hash_valid_counter = 1;
-}
-
-
 /*
  * if need be, add bio_pool_get_irq() to match...
  */
@@ -384,38 +124,37 @@ static inline void bio_pool_put(struct bio *bio)
 #define BIO_CAN_WAIT(gfp_mask) \
        (((gfp_mask) & (__GFP_WAIT | __GFP_IO)) == (__GFP_WAIT | __GFP_IO))
 
-static inline struct bio_vec_list *bvec_alloc(int gfp_mask, int nr)
+static inline struct bio_vec *bvec_alloc(int gfp_mask, int nr, int *idx)
 {
-       struct bio_vec_list *bvl = NULL;
+       struct bio_vec *bvl = NULL;
        struct biovec_pool *bp;
-       int idx;
 
        /*
         * see comment near bvec_pool_sizes define!
         */
        switch (nr) {
                case 1:
-                       idx = 0;
+                       *idx = 0;
                        break;
                case 2 ... 4:
-                       idx = 1;
+                       *idx = 1;
                        break;
                case 5 ... 16:
-                       idx = 2;
+                       *idx = 2;
                        break;
                case 17 ... 64:
-                       idx = 3;
+                       *idx = 3;
                        break;
                case 65 ... 128:
-                       idx = 4;
+                       *idx = 4;
                        break;
                case 129 ... 256:
-                       idx = 5;
+                       *idx = 5;
                        break;
                default:
                        return NULL;
        }
-       bp = &bvec_list[idx];
+       bp = &bvec_list[*idx];
 
        /*
         * ok, so idx now points to the slab we want to allocate from
@@ -444,15 +183,9 @@ static inline struct bio_vec_list *bvec_alloc(int gfp_mask, int nr)
                __set_current_state(TASK_RUNNING);
        }
 
-       /*
-        * we use bvl_max as index into bvec_pool_sizes, non-slab originated
-        * bvecs may use it for something else if they use their own
-        * destructor
-        */
        if (bvl) {
 out_gotit:
                memset(bvl, 0, bp->bp_size);
-               bvl->bvl_max = idx;
        }
 
        return bvl;
@@ -463,9 +196,9 @@ out_gotit:
  */
 void bio_destructor(struct bio *bio)
 {
-       struct biovec_pool *bp = &bvec_list[bio->bi_io_vec->bvl_max];
+       struct biovec_pool *bp = &bvec_list[bio->bi_max];
 
-       BUG_ON(bio->bi_io_vec->bvl_max >= BIOVEC_NR_POOLS);
+       BUG_ON(bio->bi_max >= BIOVEC_NR_POOLS);
 
        /*
         * cloned bio doesn't own the veclist
@@ -476,6 +209,15 @@ void bio_destructor(struct bio *bio)
        bio_pool_put(bio);
 }
 
+inline void bio_init(struct bio *bio)
+{
+       bio->bi_next = NULL;
+       atomic_set(&bio->bi_cnt, 1);
+       bio->bi_flags = 0;
+       bio->bi_rw = 0;
+       bio->bi_end_io = NULL;
+}
+
 static inline struct bio *__bio_alloc(int gfp_mask, bio_destructor_t *dest)
 {
        struct bio *bio;
@@ -514,14 +256,8 @@ static inline struct bio *__bio_alloc(int gfp_mask, bio_destructor_t *dest)
 
        if (bio) {
 gotit:
-               bio->bi_next = NULL;
-               bio->bi_hash.pprev_hash = NULL;
-               atomic_set(&bio->bi_cnt, 1);
+               bio_init(bio);
                bio->bi_io_vec = NULL;
-               bio->bi_flags = 0;
-               bio->bi_rw = 0;
-               bio->bi_end_io = NULL;
-               bio->bi_hash_desc = NULL;
                bio->bi_destructor = dest;
        }
 
@@ -543,12 +279,12 @@ gotit:
 struct bio *bio_alloc(int gfp_mask, int nr_iovecs)
 {
        struct bio *bio = __bio_alloc(gfp_mask, bio_destructor);
-       struct bio_vec_list *bvl = NULL;
+       struct bio_vec *bvl = NULL;
 
        if (unlikely(!bio))
                return NULL;
 
-       if (!nr_iovecs || (bvl = bvec_alloc(gfp_mask, nr_iovecs))) {
+       if (!nr_iovecs || (bvl = bvec_alloc(gfp_mask,nr_iovecs,&bio->bi_max))) {
                bio->bi_io_vec = bvl;
                return bio;
        }
@@ -562,8 +298,6 @@ struct bio *bio_alloc(int gfp_mask, int nr_iovecs)
  */
 static inline void bio_free(struct bio *bio)
 {
-       BUG_ON(bio_is_hashed(bio));
-
        bio->bi_destructor(bio);
 }
 
@@ -609,6 +343,11 @@ struct bio *bio_clone(struct bio *bio, int gfp_mask)
                b->bi_dev = bio->bi_dev;
                b->bi_flags |= 1 << BIO_CLONED;
                b->bi_rw = bio->bi_rw;
+
+               b->bi_vcnt = bio->bi_vcnt;
+               b->bi_idx = bio->bi_idx;
+               b->bi_size = bio->bi_size;
+               b->bi_max = bio->bi_max;
        }
 
        return b;
@@ -618,14 +357,15 @@ struct bio *bio_clone(struct bio *bio, int gfp_mask)
  *     bio_copy        -       create copy of a bio
  *     @bio: bio to copy
  *     @gfp_mask: allocation priority
+ *     @copy: copy data to allocated bio
  *
  *     Create a copy of a &bio. Caller will own the returned bio and
  *     the actual data it points to. Reference count of returned
  *     bio will be one.
  */
-struct bio *bio_copy(struct bio *bio, int gfp_mask)
+struct bio *bio_copy(struct bio *bio, int gfp_mask, int copy)
 {
-       struct bio *b = bio_alloc(gfp_mask, bio->bi_io_vec->bvl_cnt);
+       struct bio *b = bio_alloc(gfp_mask, bio->bi_vcnt);
        unsigned long flags = 0; /* gcc silly */
        int i;
 
@@ -636,33 +376,37 @@ struct bio *bio_copy(struct bio *bio, int gfp_mask)
                 * iterate iovec list and alloc pages + copy data
                 */
                bio_for_each_segment(bv, bio, i) {
-                       struct bio_vec *bbv = &b->bi_io_vec->bvl_vec[i];
+                       struct bio_vec *bbv = &b->bi_io_vec[i];
                        char *vfrom, *vto;
 
                        bbv->bv_page = alloc_page(gfp_mask);
                        if (bbv->bv_page == NULL)
                                goto oom;
 
+                       if (!copy)
+                               goto fill_in;
+
                        if (gfp_mask & __GFP_WAIT) {
                                vfrom = kmap(bv->bv_page);
-                               vto = kmap(bv->bv_page);
+                               vto = kmap(bbv->bv_page);
                        } else {
                                __save_flags(flags);
                                __cli();
                                vfrom = kmap_atomic(bv->bv_page, KM_BIO_IRQ);
-                               vto = kmap_atomic(bv->bv_page, KM_BIO_IRQ);
+                               vto = kmap_atomic(bbv->bv_page, KM_BIO_IRQ);
                        }
 
-                       memcpy(vto + bv->bv_offset, vfrom + bv->bv_offset, bv->bv_len);
+                       memcpy(vto + bbv->bv_offset, vfrom + bv->bv_offset, bv->bv_len);
                        if (gfp_mask & __GFP_WAIT) {
-                               kunmap(vto);
-                               kunmap(vfrom);
+                               kunmap(bbv->bv_page);
+                               kunmap(bv->bv_page);
                        } else {
                                kunmap_atomic(vto, KM_BIO_IRQ);
                                kunmap_atomic(vfrom, KM_BIO_IRQ);
                                __restore_flags(flags);
                        }
 
+fill_in:
                        bbv->bv_len = bv->bv_len;
                        bbv->bv_offset = bv->bv_offset;
                }
@@ -671,15 +415,15 @@ struct bio *bio_copy(struct bio *bio, int gfp_mask)
                b->bi_dev = bio->bi_dev;
                b->bi_rw = bio->bi_rw;
 
-               b->bi_io_vec->bvl_cnt = bio->bi_io_vec->bvl_cnt;
-               b->bi_io_vec->bvl_size = bio->bi_io_vec->bvl_size;
+               b->bi_vcnt = bio->bi_vcnt;
+               b->bi_size = bio->bi_size;
        }
 
        return b;
 
 oom:
        while (i >= 0) {
-               __free_page(b->bi_io_vec->bvl_vec[i].bv_page);
+               __free_page(b->bi_io_vec[i].bv_page);
                i--;
        }
 
@@ -712,23 +456,20 @@ static int bio_end_io_page(struct bio *bio)
 static int bio_end_io_kio(struct bio *bio, int nr_sectors)
 {
        struct kiobuf *kio = (struct kiobuf *) bio->bi_private;
-       struct bio_vec_list *bv = bio->bi_io_vec;
        int uptodate, done;
 
-       BUG_ON(!bv);
-
        done = 0;
        uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags);
        do {
-               int sectors = bv->bvl_vec[bv->bvl_idx].bv_len >> 9;
+               int sectors = bio->bi_io_vec[bio->bi_idx].bv_len >> 9;
 
                nr_sectors -= sectors;
 
-               bv->bvl_idx++;
+               bio->bi_idx++;
 
                done = !end_kio_request(kio, uptodate);
 
-               if (bv->bvl_idx == bv->bvl_cnt)
+               if (bio->bi_idx == bio->bi_vcnt)
                        done = 1;
 
        } while (!done && nr_sectors > 0);
@@ -737,7 +478,6 @@ static int bio_end_io_kio(struct bio *bio, int nr_sectors)
         * all done
         */
        if (done) {
-               bio_hash_remove(bio);
                bio_put(bio);
                return 0;
        }
@@ -844,12 +584,12 @@ next_chunk:
 
        bio->bi_sector = sector;
        bio->bi_dev = dev;
-       bio->bi_io_vec->bvl_idx = 0;
+       bio->bi_idx = 0;
        bio->bi_flags |= 1 << BIO_PREBUILT;
        bio->bi_end_io = bio_end_io_kio;
        bio->bi_private = kio;
 
-       bvec = &bio->bi_io_vec->bvl_vec[0];
+       bvec = bio->bi_io_vec;
        for (i = 0; i < nr_pages; i++, bvec++, map_i++) {
                int nbytes = PAGE_SIZE - offset;
 
@@ -858,11 +598,11 @@ next_chunk:
 
                BUG_ON(kio->maplist[map_i] == NULL);
 
-               if (bio->bi_io_vec->bvl_size + nbytes > max_bytes)
+               if (bio->bi_size + nbytes > max_bytes)
                        goto queue_io;
 
-               bio->bi_io_vec->bvl_cnt++;
-               bio->bi_io_vec->bvl_size += nbytes;
+               bio->bi_vcnt++;
+               bio->bi_size += nbytes;
 
                bvec->bv_page = kio->maplist[map_i];
                bvec->bv_len = nbytes;
@@ -931,7 +671,6 @@ static void __init biovec_init_pool(void)
                struct biovec_pool *bp = &bvec_list[i];
 
                size = bvec_pool_sizes[i] * sizeof(struct bio_vec);
-               size += sizeof(struct bio_vec_list);
 
                printk("biovec: init pool %d, %d entries, %d bytes\n", i,
                                                bvec_pool_sizes[i], size);
@@ -962,29 +701,6 @@ static int __init init_bio(void)
 
        biovec_init_pool();
 
-#ifdef BIO_HASH_PROFILING
-       memset(&bio_stats, 0, sizeof(bio_stats));
-#endif
-
-       return 0;
-}
-
-int bio_ioctl(kdev_t dev, unsigned int cmd, unsigned long arg)
-{
-#ifdef BIO_HASH_PROFILING
-       switch (cmd) {
-               case BLKHASHPROF:
-                       if (copy_to_user((struct bio_hash_stats *) arg, &bio_stats, sizeof(bio_stats)))
-                               return -EFAULT;
-                       break;
-               case BLKHASHCLEAR:
-                       memset(&bio_stats, 0, sizeof(bio_stats));
-                       break;
-               default:
-                       return -ENOTTY;
-       }
-
-#endif
        return 0;
 }
 
@@ -993,7 +709,7 @@ module_init(init_bio);
 EXPORT_SYMBOL(bio_alloc);
 EXPORT_SYMBOL(bio_put);
 EXPORT_SYMBOL(ll_rw_kio);
-EXPORT_SYMBOL(bio_hash_remove);
-EXPORT_SYMBOL(bio_hash_add);
-EXPORT_SYMBOL(bio_hash_add_unique);
 EXPORT_SYMBOL(bio_endio);
+EXPORT_SYMBOL(bio_init);
+EXPORT_SYMBOL(bio_copy);
+EXPORT_SYMBOL(bio_clone);
index 6c36e768a1dd986bd649a581023936818467904f..afd7577abf9920b3aaf8f15ceeb7211f553a9d82 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -586,7 +586,7 @@ mmap_failed:
 flush_failed:
        spin_lock_irq(&current->sigmask_lock);
        if (current->sig != oldsig) {
-               kfree(current->sig);
+               kmem_cache_free(sigact_cachep, current->sig);
                current->sig = oldsig;
        }
        spin_unlock_irq(&current->sigmask_lock);
index 05d7b93c65c7581251d26bb2ee23a6194f9d21ce..fe53b49917ba04ef60a3442099011a28fbd0fee7 100644 (file)
@@ -292,7 +292,7 @@ static int minix_statfs(struct super_block *sb, struct statfs *buf)
        return 0;
 }
 
-static int minix_get_block(struct inode *inode, long block,
+static int minix_get_block(struct inode *inode, sector_t block,
                    struct buffer_head *bh_result, int create)
 {
        if (INODE_VERSION(inode) == MINIX_V1)
index aeca5ec31880af14807e070a181d57e0542ac9e0..b89af1b1332ed6e0675e27cbdcf9822e993d7283 100644 (file)
@@ -57,7 +57,6 @@ extern int get_device_list(char *);
 extern int get_partition_list(char *, char **, off_t, int);
 extern int get_filesystem_list(char *);
 extern int get_exec_domain_list(char *);
-extern int get_irq_list(char *);
 extern int get_dma_list(char *);
 extern int get_locks_status (char *, char **, off_t, int);
 extern int get_swaparea_info (char *);
@@ -139,24 +138,14 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
  * display in kilobytes.
  */
 #define K(x) ((x) << (PAGE_SHIFT - 10))
-#define B(x) ((unsigned long long)(x) << PAGE_SHIFT)
        si_meminfo(&i);
        si_swapinfo(&i);
        pg_size = atomic_read(&page_cache_size) - i.bufferram ;
 
-       len = sprintf(page, "        total:    used:    free:  shared: buffers:  cached:\n"
-               "Mem:  %8Lu %8Lu %8Lu %8Lu %8Lu %8Lu\n"
-               "Swap: %8Lu %8Lu %8Lu\n",
-               B(i.totalram), B(i.totalram-i.freeram), B(i.freeram),
-               B(i.sharedram), B(i.bufferram),
-               B(pg_size), B(i.totalswap),
-               B(i.totalswap-i.freeswap), B(i.freeswap));
        /*
         * Tagged format, for easy grepping and expansion.
-        * The above will go away eventually, once the tools
-        * have been updated.
         */
-       len += sprintf(page+len,
+       len = sprintf(page,
                "MemTotal:     %8lu kB\n"
                "MemFree:      %8lu kB\n"
                "MemShared:    %8lu kB\n"
@@ -187,7 +176,6 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
                K(i.freeswap));
 
        return proc_calc_metrics(page, start, off, count, eof, len);
-#undef B
 #undef K
 }
 
@@ -328,14 +316,53 @@ static int partitions_read_proc(char *page, char **start, off_t off,
        return len;
 }
 
-#if !defined(CONFIG_ARCH_S390)
-static int interrupts_read_proc(char *page, char **start, off_t off,
-                                int count, int *eof, void *data)
+static void *single_start(struct seq_file *p, loff_t *pos)
 {
-       int len = get_irq_list(page);
-       return proc_calc_metrics(page, start, off, count, eof, len);
+       return (void *)(*pos == 0);
 }
-#endif
+static void *single_next(struct seq_file *p, void *v, loff_t *pos)
+{
+       ++*pos;
+       return NULL;
+}
+static void single_stop(struct seq_file *p, void *v)
+{
+}
+extern int show_interrupts(struct seq_file *p, void *v);
+static struct seq_operations proc_interrupts_op = {
+       start:  single_start,
+       next:   single_next,
+       stop:   single_stop,
+       show:   show_interrupts,
+};
+static int interrupts_open(struct inode *inode, struct file *file)
+{
+       unsigned size = PAGE_SIZE;
+       /*
+        * probably should depend on NR_CPUS, but that's only rough estimate;
+        * if we'll need more it will be given,
+        */
+       char *buf = kmalloc(size, GFP_KERNEL);
+       struct seq_file *m;
+       int res;
+
+       if (!buf)
+               return -ENOMEM;
+       res = seq_open(file, &proc_interrupts_op);
+       if (!res) {
+               m = file->private_data;
+               m->buf = buf;
+               m->size = size;
+       } else
+               kfree(buf);
+       return res;
+}
+static struct file_operations proc_interrupts_operations = {
+       open:           interrupts_open,
+       read:           seq_read,
+       llseek:         seq_lseek,
+       release:        seq_release,
+};
 
 static int filesystems_read_proc(char *page, char **start, off_t off,
                                 int count, int *eof, void *data)
@@ -512,9 +539,6 @@ void __init proc_misc_init(void)
                {"stat",        kstat_read_proc},
                {"devices",     devices_read_proc},
                {"partitions",  partitions_read_proc},
-#if !defined(CONFIG_ARCH_S390)
-               {"interrupts",  interrupts_read_proc},
-#endif
                {"filesystems", filesystems_read_proc},
                {"dma",         dma_read_proc},
                {"ioports",     ioports_read_proc},
@@ -537,6 +561,9 @@ void __init proc_misc_init(void)
                entry->proc_fops = &proc_kmsg_operations;
        create_seq_entry("mounts", 0, &proc_mounts_operations);
        create_seq_entry("cpuinfo", 0, &proc_cpuinfo_operations);
+#if defined(CONFIG_ARCH_S390) || defined(CONFIG_X86) || defined(CONFIG_ARCH_MIPS)
+       create_seq_entry("interrupts", 0, &proc_interrupts_operations);
+#endif
 #ifdef CONFIG_MODULES
        create_seq_entry("ksyms", 0, &proc_ksyms_operations);
 #endif
index a777a4fdef5331f8a256d5a9cf7e63d8bbc121bb..d8eb65f172066a3a36cd8be64ed54cc69f153f81 100644 (file)
@@ -271,6 +271,110 @@ struct file_system_type *get_fs_type(const char *name)
        return fs;
 }
 
+/**
+ *     alloc_super     -       create new superblock
+ *
+ *     Allocates and initializes a new &struct super_block.  alloc_super()
+ *     returns a pointer new superblock or %NULL if allocation had failed.
+ */
+static struct super_block *alloc_super(void)
+{
+       struct super_block *s = kmalloc(sizeof(struct super_block),  GFP_USER);
+       if (s) {
+               memset(s, 0, sizeof(struct super_block));
+               INIT_LIST_HEAD(&s->s_dirty);
+               INIT_LIST_HEAD(&s->s_locked_inodes);
+               INIT_LIST_HEAD(&s->s_files);
+               INIT_LIST_HEAD(&s->s_instances);
+               init_rwsem(&s->s_umount);
+               sema_init(&s->s_lock, 1);
+               down_write(&s->s_umount);
+               s->s_count = S_BIAS;
+               atomic_set(&s->s_active, 1);
+               sema_init(&s->s_vfs_rename_sem,1);
+               sema_init(&s->s_nfsd_free_path_sem,1);
+               sema_init(&s->s_dquot.dqio_sem, 1);
+               sema_init(&s->s_dquot.dqoff_sem, 1);
+               s->s_maxbytes = MAX_NON_LFS;
+       }
+       return s;
+}
+
+/**
+ *     destroy_super   -       frees a superblock
+ *     @s: superblock to free
+ *
+ *     Frees a superblock.
+ */
+static inline void destroy_super(struct super_block *s)
+{
+       kfree(s);
+}
+
+/* Superblock refcounting  */
+
+/**
+ *     deactivate_super        -       turn an active reference into temporary
+ *     @s: superblock to deactivate
+ *
+ *     Turns an active reference into temporary one.  Returns 0 if there are
+ *     other active references, 1 if we had deactivated the last one.
+ */
+static inline int deactivate_super(struct super_block *s)
+{
+       if (!atomic_dec_and_lock(&s->s_active, &sb_lock))
+               return 0;
+       s->s_count -= S_BIAS-1;
+       spin_unlock(&sb_lock);
+       return 1;
+}
+
+/**
+ *     put_super       -       drop a temporary reference to superblock
+ *     @s: superblock in question
+ *
+ *     Drops a temporary reference, frees superblock if there's no
+ *     references left.
+ */
+static inline void put_super(struct super_block *s)
+{
+       spin_lock(&sb_lock);
+       if (!--s->s_count)
+               destroy_super(s);
+       spin_unlock(&sb_lock);
+}
+
+/**
+ *     grab_super      - acquire an active reference
+ *     @s      - reference we are trying to make active
+ *
+ *     Tries to acquire an active reference.  grab_super() is used when we
+ *     had just found a superblock in super_blocks or fs_type->fs_supers
+ *     and want to turn it into a full-blown active reference.  grab_super()
+ *     is called with sb_lock held and drops it.  Returns 1 in case of
+ *     success, 0 if we had failed (superblock contents was already dead or
+ *     dying when grab_super() had been called).
+ */
+static int grab_super(struct super_block *s)
+{
+       s->s_count++;
+       spin_unlock(&sb_lock);
+       down_write(&s->s_umount);
+       if (s->s_root) {
+               spin_lock(&sb_lock);
+               if (s->s_count > S_BIAS) {
+                       atomic_inc(&s->s_active);
+                       s->s_count--;
+                       spin_unlock(&sb_lock);
+                       return 1;
+               }
+               spin_unlock(&sb_lock);
+       }
+       up_write(&s->s_umount);
+       put_super(s);
+       return 0;
+}
+
 struct vfsmount *alloc_vfsmnt(void);
 void free_vfsmnt(struct vfsmount *mnt);
 void set_devname(struct vfsmount *mnt, const char *name);
@@ -279,14 +383,6 @@ void set_devname(struct vfsmount *mnt, const char *name);
 extern struct vfsmount *root_vfsmnt;
 extern int graft_tree(struct vfsmount *mnt, struct nameidata *nd);
 
-static inline void __put_super(struct super_block *sb)
-{
-       spin_lock(&sb_lock);
-       if (!--sb->s_count)
-               kfree(sb);
-       spin_unlock(&sb_lock);
-}
-
 static inline struct super_block * find_super(kdev_t dev)
 {
        struct list_head *p;
@@ -304,14 +400,7 @@ static inline struct super_block * find_super(kdev_t dev)
 void drop_super(struct super_block *sb)
 {
        up_read(&sb->s_umount);
-       __put_super(sb);
-}
-
-static void put_super(struct super_block *sb)
-{
-       atomic_dec(&sb->s_active);
-       up_write(&sb->s_umount);
-       __put_super(sb);
+       put_super(sb);
 }
 
 static inline void write_super(struct super_block *sb)
@@ -322,7 +411,7 @@ static inline void write_super(struct super_block *sb)
                        sb->s_op->write_super(sb);
        unlock_super(sb);
 }
+
 /*
  * Note: check the dirty flag before waiting, so we don't
  * hold up the sync while mounting a device. (The newly
@@ -371,19 +460,19 @@ struct super_block * get_super(kdev_t dev)
 
        if (!dev)
                return NULL;
-restart:
-       spin_lock(&sb_lock);
-       s = find_super(dev);
-       if (s) {
+
+       while (1) {
+               spin_lock(&sb_lock);
+               s = find_super(dev);
                spin_unlock(&sb_lock);
+               if (!s)
+                       break;
                down_read(&s->s_umount);
                if (s->s_root)
-                       return s;
+                       break;
                drop_super(s);
-               goto restart;
        }
-       spin_unlock(&sb_lock);
-       return NULL;
+       return s;
 }
 
 asmlinkage long sys_ustat(dev_t dev, struct ustat * ubuf)
@@ -410,37 +499,6 @@ out:
        return err;
 }
 
-/**
- *     get_empty_super -       find empty superblocks
- *
- *     Find a superblock with no device assigned. A free superblock is 
- *     found and returned. If neccessary new superblocks are allocated.
- *     %NULL is returned if there are insufficient resources to complete
- *     the request.
- */
-static struct super_block *alloc_super(void)
-{
-       struct super_block *s = kmalloc(sizeof(struct super_block),  GFP_USER);
-       if (s) {
-               memset(s, 0, sizeof(struct super_block));
-               INIT_LIST_HEAD(&s->s_dirty);
-               INIT_LIST_HEAD(&s->s_locked_inodes);
-               INIT_LIST_HEAD(&s->s_files);
-               INIT_LIST_HEAD(&s->s_instances);
-               init_rwsem(&s->s_umount);
-               sema_init(&s->s_lock, 1);
-               s->s_count = 1;
-               atomic_set(&s->s_active, 1);
-               sema_init(&s->s_vfs_rename_sem,1);
-               sema_init(&s->s_nfsd_free_path_sem,1);
-               sema_init(&s->s_dquot.dqio_sem, 1);
-               sema_init(&s->s_dquot.dqoff_sem, 1);
-               s->s_maxbytes = MAX_NON_LFS;
-       }
-       return s;
-}
-
 static struct super_block * read_super(kdev_t dev, struct block_device *bdev,
                                       struct file_system_type *type, int flags,
                                       void *data)
@@ -456,9 +514,7 @@ static struct super_block * read_super(kdev_t dev, struct block_device *bdev,
        spin_lock(&sb_lock);
        list_add (&s->s_list, super_blocks.prev);
        list_add (&s->s_instances, &type->fs_supers);
-       s->s_count += S_BIAS;
        spin_unlock(&sb_lock);
-       down_write(&s->s_umount);
        lock_super(s);
        if (!type->read_super(s, data, flags & MS_VERBOSE ? 1 : 0))
                goto out_fail;
@@ -475,11 +531,12 @@ out_fail:
        s->s_bdev = 0;
        s->s_type = NULL;
        unlock_super(s);
+       deactivate_super(s);
        spin_lock(&sb_lock);
        list_del(&s->s_list);
        list_del(&s->s_instances);
-       s->s_count -= S_BIAS;
        spin_unlock(&sb_lock);
+       up_write(&s->s_umount);
        put_super(s);
        return NULL;
 }
@@ -512,25 +569,6 @@ void put_unnamed_dev(kdev_t dev)
                        kdevname(dev));
 }
 
-static int grab_super(struct super_block *sb)
-{
-       sb->s_count++;
-       atomic_inc(&sb->s_active);
-       spin_unlock(&sb_lock);
-       down_write(&sb->s_umount);
-       if (sb->s_root) {
-               spin_lock(&sb_lock);
-               if (sb->s_count > S_BIAS) {
-                       sb->s_count--;
-                       spin_unlock(&sb_lock);
-                       return 1;
-               }
-               spin_unlock(&sb_lock);
-       }
-       put_super(sb);
-       return 0;
-}
-
 static struct super_block *get_sb_bdev(struct file_system_type *fs_type,
        char *dev_name, int flags, void * data)
 {
@@ -578,7 +616,6 @@ static struct super_block *get_sb_bdev(struct file_system_type *fs_type,
        s = alloc_super();
        if (!s)
                goto out1;
-       down_write(&s->s_umount);
 
        error = -EBUSY;
 restart:
@@ -591,12 +628,12 @@ restart:
                if (old->s_type != fs_type ||
                    ((flags ^ old->s_flags) & MS_RDONLY)) {
                        spin_unlock(&sb_lock);
-                       put_super(s);
+                       destroy_super(s);
                        goto out1;
                }
                if (!grab_super(old))
                        goto restart;
-               put_super(s);
+               destroy_super(s);
                blkdev_put(bdev, BDEV_FS);
                path_release(&nd);
                return old;
@@ -607,8 +644,6 @@ restart:
        s->s_type = fs_type;
        list_add (&s->s_list, super_blocks.prev);
        list_add (&s->s_instances, &fs_type->fs_supers);
-       s->s_count += S_BIAS;
-
        spin_unlock(&sb_lock);
 
        error = -EINVAL;
@@ -626,11 +661,12 @@ out_fail:
        s->s_bdev = 0;
        s->s_type = NULL;
        unlock_super(s);
+       deactivate_super(s);
        spin_lock(&sb_lock);
        list_del(&s->s_list);
        list_del(&s->s_instances);
-       s->s_count -= S_BIAS;
        spin_unlock(&sb_lock);
+       up_write(&s->s_umount);
        put_super(s);
 out1:
        blkdev_put(bdev, BDEV_FS);
@@ -664,7 +700,6 @@ static struct super_block *get_sb_single(struct file_system_type *fs_type,
        struct super_block * s = alloc_super();
        if (!s)
                return ERR_PTR(-ENOMEM);
-       down_write(&s->s_umount);
        /*
         * Get the superblock of kernel-wide instance, but
         * keep the reference to fs_type.
@@ -677,14 +712,14 @@ retry:
                                s_instances);
                if (!grab_super(old))
                        goto retry;
-               put_super(s);
+               destroy_super(s);
                do_remount_sb(old, flags, data);
                return old;
        } else {
                kdev_t dev = get_unnamed_dev();
                if (!dev) {
                        spin_unlock(&sb_lock);
-                       put_super(s);
+                       destroy_super(s);
                        return ERR_PTR(-EMFILE);
                }
                s->s_dev = dev;
@@ -692,7 +727,6 @@ retry:
                s->s_type = fs_type;
                list_add (&s->s_list, super_blocks.prev);
                list_add (&s->s_instances, &fs_type->fs_supers);
-               s->s_count += S_BIAS;
                spin_unlock(&sb_lock);
                lock_super(s);
                if (!fs_type->read_super(s, data, flags & MS_VERBOSE ? 1 : 0))
@@ -707,11 +741,12 @@ retry:
                s->s_bdev = 0;
                s->s_type = NULL;
                unlock_super(s);
+               deactivate_super(s);
                spin_lock(&sb_lock);
                list_del(&s->s_list);
                list_del(&s->s_instances);
-               s->s_count -= S_BIAS;
                spin_unlock(&sb_lock);
+               up_write(&s->s_umount);
                put_super(s);
                put_unnamed_dev(dev);
                return ERR_PTR(-EINVAL);
@@ -726,12 +761,9 @@ void kill_super(struct super_block *sb)
        struct file_system_type *fs = sb->s_type;
        struct super_operations *sop = sb->s_op;
 
-       if (!atomic_dec_and_lock(&sb->s_active, &sb_lock))
+       if (!deactivate_super(sb))
                return;
 
-       sb->s_count -= S_BIAS;
-       spin_unlock(&sb_lock);
-
        down_write(&sb->s_umount);
        lock_kernel();
        sb->s_root = NULL;
@@ -773,7 +805,7 @@ void kill_super(struct super_block *sb)
        list_del(&sb->s_list);
        list_del(&sb->s_instances);
        spin_unlock(&sb_lock);
-       atomic_inc(&sb->s_active);
+       up_write(&sb->s_umount);
        put_super(sb);
 }
 
index 1270097b21d58b6e07cea3ed9218726ac527b5a3..4ec067c930e14c9cea51c1e715c4f3f2dccb34ad 100644 (file)
@@ -35,7 +35,7 @@ extern struct irqdesc irq_desc[];
 
 extern void (*init_arch_irq)(void);
 extern int setup_arm_irq(int, struct irqaction *);
-extern int get_fiq_list(char *);
+extern int show_fiq_list(struct seq_file *, void *);
 extern void init_FIQ(void);
 
 #endif
index df942cf288978dd51d76b89032b71bf94b7cb123..6b9761aa8f3721dcb7bebf219bb53f54798aad35 100644 (file)
@@ -29,9 +29,9 @@ asmlinkage unsigned int csum_partial_copy_generic( const char *src, char *dst, i
 
 /*
  *     Note: when you get a NULL pointer exception here this means someone
- *     passed in an incorrect kernel address to one of these functions. 
- *     
- *     If you use these functions directly please don't forget the 
+ *     passed in an incorrect kernel address to one of these functions.
+ *
+ *     If you use these functions directly please don't forget the
  *     verify_area().
  */
 static __inline__
@@ -66,7 +66,8 @@ unsigned int csum_partial_copy( const char *src, char *dst, int len, int sum);
  *     Arnt Gulbrandsen.
  */
 static inline unsigned short ip_fast_csum(unsigned char * iph,
-                                         unsigned int ihl) {
+                                         unsigned int ihl)
+{
        unsigned int sum;
 
        __asm__ __volatile__(
@@ -109,12 +110,12 @@ static inline unsigned int csum_fold(unsigned int sum)
        );
        return (~sum) >> 16;
 }
+
 static inline unsigned long csum_tcpudp_nofold(unsigned long saddr,
                                                   unsigned long daddr,
                                                   unsigned short len,
                                                   unsigned short proto,
-                                                  unsigned int sum) 
+                                                  unsigned int sum)
 {
     __asm__(
        "addl %1, %0    ;\n"
@@ -134,7 +135,7 @@ static inline unsigned short int csum_tcpudp_magic(unsigned long saddr,
                                                   unsigned long daddr,
                                                   unsigned short len,
                                                   unsigned short proto,
-                                                  unsigned int sum) 
+                                                  unsigned int sum)
 {
        return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));
 }
@@ -144,7 +145,8 @@ static inline unsigned short int csum_tcpudp_magic(unsigned long saddr,
  * in icmp.c
  */
 
-static inline unsigned short ip_compute_csum(unsigned char * buff, int len) {
+static inline unsigned short ip_compute_csum(unsigned char * buff, int len)
+{
     return csum_fold (csum_partial(buff, len, 0));
 }
 
@@ -153,32 +155,32 @@ static __inline__ unsigned short int csum_ipv6_magic(struct in6_addr *saddr,
                                                     struct in6_addr *daddr,
                                                     __u32 len,
                                                     unsigned short proto,
-                                                    unsigned int sum) 
+                                                    unsigned int sum)
 {
        __asm__(
-               "addl 0(%1), %0"
-               "adcl 4(%1), %0"
-               "adcl 8(%1), %0"
-               "adcl 12(%1), %0"
-               "adcl 0(%2), %0"
-               "adcl 4(%2), %0"
-               "adcl 8(%2), %0"
-               "adcl 12(%2), %0"
-               "adcl %3, %0"
-               "adcl %4, %0"
-               "adcl $0, %0"
+               "addl 0(%1), %0         ;\n"
+               "adcl 4(%1), %0         ;\n"
+               "adcl 8(%1), %0         ;\n"
+               "adcl 12(%1), %0        ;\n"
+               "adcl 0(%2), %0         ;\n"
+               "adcl 4(%2), %0         ;\n"
+               "adcl 8(%2), %0         ;\n"
+               "adcl 12(%2), %0        ;\n"
+               "adcl %3, %0            ;\n"
+               "adcl %4, %0            ;\n"
+               "adcl $0, %0            ;\n"
                : "=&r" (sum)
-               : "r" (saddr), "r" (daddr), 
+               : "r" (saddr), "r" (daddr),
                  "r"(htonl(len)), "r"(htonl(proto)), "0"(sum));
 
        return csum_fold(sum);
 }
 
-/* 
+/*
  *     Copy and checksum to user
  */
 #define HAVE_CSUM_COPY_USER
-static __inline__ unsigned int csum_and_copy_to_user (const char *src, char *dst,
+static __inline__ unsigned int csum_and_copy_to_user(const char *src, char *dst,
                                    int len, int sum, int *err_ptr)
 {
        if (access_ok(VERIFY_WRITE, dst, len))
index 8b324a001608789e44e5b866b62ffefb3fa51800..82badf63fdfd0c808f84a9beb2ee1fef5230f73a 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef _M68K_MACHDEP_H
 #define _M68K_MACHDEP_H
 
+#include <linux/seq_file.h>
+
 struct pt_regs;
 struct kbd_repeat;
 struct mktime;
@@ -21,7 +23,7 @@ extern int (*mach_request_irq) (unsigned int irq, void (*handler)(int, void *, s
 extern void (*mach_free_irq) (unsigned int irq, void *dev_id);
 extern void (*mach_get_model) (char *model);
 extern int (*mach_get_hardware_list) (char *buffer);
-extern int (*mach_get_irq_list) (char *buf);
+extern int (*mach_get_irq_list) (struct seq_file *p, void *v);
 extern void (*mach_process_int) (int irq, struct pt_regs *fp);
 /* machine dependent timer functions */
 extern unsigned long (*mach_gettimeoffset)(void);
index e71462a8b838dc2ad313c5d8b0f9a06123791b54..68d1249d3ceae04f8327a6d8bc3960b967e072fe 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef __ASM_MACINTOSH_H
 #define __ASM_MACINTOSH_H
 
+#include <linux/seq_file.h>
+
 /*
  *     Apple Macintoshisms
  */
@@ -15,7 +17,7 @@ extern void mac_free_irq(unsigned int, void *);
 extern void mac_enable_irq(unsigned int);
 extern void mac_disable_irq(unsigned int);
 extern int mac_irq_pending(unsigned int);
-extern int mac_get_irq_list(char *);
+extern int show_mac_interrupts(struct seq_file *, void *);
 #if 0
 extern void mac_default_handler(int irq);
 #endif
index ee082b5a2a71f24dc59c7dc7115f8f23b82f649b..408f33f9b440ed6538313028ab012b042969aa6b 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/sched.h>
 #include <linux/kernel_stat.h>
 #include <linux/interrupt.h>
+#include <linux/seq_file.h>
 #include <asm/segment.h>
 #include <asm/intersil.h>
 #include <asm/oplib.h>
@@ -32,7 +33,7 @@ extern void (*sun3_inthandler[]) (int, void *, struct pt_regs *);
 extern void sun3_free_irq (unsigned int irq, void *dev_id);
 extern void sun3_enable_interrupts (void);
 extern void sun3_disable_interrupts (void);
-extern int sun3_get_irq_list(char *buf);
+extern int show_sun3_interrupts(struct seq_file *, void *);
 extern void sun3_process_int(int, struct pt_regs *);
 extern volatile unsigned char* sun3_intreg;
 
index 7e58544540ba789424def1880c6238859b7f9aa0..07d2823880bcf6ae459fc628341a2823cbc32e5f 100644 (file)
 #define BIO_BUG_ON
 #endif
 
-/*
- * hash profiling stuff..
- */
-#define BIO_HASH_PROFILING
-
-#define BLKHASHPROF    _IOR(0x12,108,sizeof(struct bio_hash_stats))
-#define BLKHASHCLEAR   _IO(0x12,109)
-
-#define MAX_PROFILE_BUCKETS    64
-
-struct bio_hash_stats {
-       atomic_t nr_lookups;
-       atomic_t nr_hits;
-       atomic_t nr_inserts;
-       atomic_t nr_entries;
-       atomic_t max_entries;
-       atomic_t max_bucket_size;
-       atomic_t bucket_size[MAX_PROFILE_BUCKETS + 1];
-};
-
 /*
  * was unsigned short, but we might as well be ready for > 64kB I/O pages
  */
@@ -58,37 +38,6 @@ struct bio_vec {
        unsigned int    bv_offset;
 };
 
-struct bio_vec_list {
-       unsigned int    bvl_cnt;        /* how may bio_vec's */
-       unsigned int    bvl_idx;        /* current index into bvl_vec */
-       unsigned int    bvl_size;       /* total size in bytes */
-       unsigned int    bvl_max;        /* max bvl_vecs we can hold, used
-                                          as index into pool */
-       struct bio_vec  bvl_vec[0];     /* the iovec array */
-};
-
-typedef struct bio_hash_s {
-       struct bio_hash_s *next_hash;
-       struct bio_hash_s **pprev_hash;
-       unsigned long valid_counter;
-} bio_hash_t;
-
-struct bio_hash_bucket {
-       rwlock_t lock;
-       bio_hash_t *hash;
-} __attribute__((__aligned__(16)));
-
-#define BIO_HASH_BITS  (bio_hash_bits)
-#define BIO_HASH_SIZE  (1UL << BIO_HASH_BITS)
-
-/*
- * shamelessly stolen from the list.h implementation
- */
-#define hash_entry(ptr, type, member)  \
-       ((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member)))
-#define bio_hash_entry(ptr)            \
-       hash_entry((ptr), struct bio, bi_hash)
-
 /*
  * main unit of I/O for the block layer and lower layers (ie drivers and
  * stacking drivers)
@@ -96,26 +45,27 @@ struct bio_hash_bucket {
 struct bio {
        sector_t                bi_sector;
        struct bio              *bi_next;       /* request queue link */
-       bio_hash_t              bi_hash;
        atomic_t                bi_cnt;         /* pin count */
        kdev_t                  bi_dev;         /* will be block device */
-       struct bio_vec_list     *bi_io_vec;
        unsigned long           bi_flags;       /* status, command, etc */
        unsigned long           bi_rw;          /* bottom bits READ/WRITE,
                                                 * top bits priority
                                                 */
+
+       unsigned int            bi_vcnt;        /* how may bio_vec's */
+       unsigned int            bi_idx;         /* current index into bvl_vec */
+       unsigned int            bi_size;        /* total size in bytes */
+       unsigned int            bi_max;         /* max bvl_vecs we can hold,
+                                                  used as index into pool */
+
+       struct bio_vec          *bi_io_vec;     /* the actual vec list */
+
        int (*bi_end_io)(struct bio *bio, int nr_sectors);
        void                    *bi_private;
 
-       void                    *bi_hash_desc;  /* cookie for hash */
-
        void (*bi_destructor)(struct bio *);    /* destructor */
 };
 
-#define BIO_SECTOR_BITS        9
-#define BIO_OFFSET_MASK        ((1UL << (PAGE_CACHE_SHIFT - BIO_SECTOR_BITS)) - 1)
-#define BIO_PAGE_MASK  (PAGE_CACHE_SIZE - 1)
-
 /*
  * bio flags
  */
@@ -125,8 +75,6 @@ struct bio {
 #define BIO_PREBUILT   3       /* not merged big */
 #define BIO_CLONED     4       /* doesn't own data */
 
-#define bio_is_hashed(bio)     ((bio)->bi_hash.pprev_hash)
-
 /*
  * bio bi_rw flags
  *
@@ -142,12 +90,13 @@ struct bio {
  * various member access, note that bio_data should of course not be used
  * on highmem page vectors
  */
-#define bio_iovec_idx(bio, idx)        (&((bio)->bi_io_vec->bvl_vec[(idx)]))
-#define bio_iovec(bio)         bio_iovec_idx((bio), (bio)->bi_io_vec->bvl_idx)
+#define bio_iovec_idx(bio, idx)        (&((bio)->bi_io_vec[(bio)->bi_idx]))
+#define bio_iovec(bio)         bio_iovec_idx((bio), (bio)->bi_idx)
 #define bio_page(bio)          bio_iovec((bio))->bv_page
-#define bio_size(bio)          ((bio)->bi_io_vec->bvl_size)
+#define bio_size(bio)          ((bio)->bi_size)
+#define __bio_offset(bio, idx) bio_iovec_idx((bio), (idx))->bv_offset
 #define bio_offset(bio)                bio_iovec((bio))->bv_offset
-#define bio_sectors(bio)       (bio_size((bio)) >> BIO_SECTOR_BITS)
+#define bio_sectors(bio)       (bio_size((bio)) >> 9)
 #define bio_data(bio)          (page_address(bio_page((bio))) + bio_offset((bio)))
 #define bio_barrier(bio)       ((bio)->bi_rw & (1 << BIO_BARRIER))
 
@@ -170,15 +119,17 @@ struct bio {
  * permanent PIO fall back, user is probably better off disabling highmem
  * I/O completely on that queue (see ide-dma for example)
  */
-#define bio_kmap(bio)  kmap(bio_page((bio))) + bio_offset((bio))
-#define bio_kunmap(bio)        kunmap(bio_page((bio)))
+#define __bio_kmap(bio, idx) (kmap(bio_iovec_idx((bio), (idx))->bv_page) + bio_iovec_idx((bio), (idx))->bv_offset)
+#define bio_kmap(bio)  __bio_kmap((bio), (bio)->bi_idx)
+#define __bio_kunmap(bio, idx) kunmap(bio_iovec_idx((bio), (idx))->bv_page)
+#define bio_kunmap(bio)                __bio_kunmap((bio), (bio)->bi_idx)
 
 #define BIO_CONTIG(bio, nxt) \
        (bio_to_phys((bio)) + bio_size((bio)) == bio_to_phys((nxt)))
-#define __BIO_PHYS_4G(addr1, addr2) \
-       (((addr1) | 0xffffffff) == (((addr2) -1 ) | 0xffffffff))
-#define BIO_PHYS_4G(b1, b2) \
-       __BIO_PHYS_4G(bio_to_phys((b1)), bio_to_phys((b2)) + bio_size((b2)))
+#define __BIO_SEG_BOUNDARY(addr1, addr2, mask) \
+       (((addr1) | (mask)) == (((addr2) - 1) | (mask)))
+#define BIO_SEG_BOUNDARY(q, b1, b2) \
+       __BIO_SEG_BOUNDARY(bvec_to_phys(bio_iovec_idx((b1), (b1)->bi_cnt - 1)), bio_to_phys((b2)) + bio_size((b2)), (q)->seg_boundary_mask)
 
 typedef int (bio_end_io_t) (struct bio *, int);
 typedef void (bio_destructor_t) (struct bio *);
@@ -186,8 +137,8 @@ typedef void (bio_destructor_t) (struct bio *);
 #define bio_io_error(bio) bio_endio((bio), 0, bio_sectors((bio)))
 
 #define bio_for_each_segment(bvl, bio, i)                              \
-       for (bvl = bio_iovec((bio)), i = (bio)->bi_io_vec->bvl_idx;     \
-            i < (bio)->bi_io_vec->bvl_cnt;                             \
+       for (bvl = bio_iovec((bio)), i = (bio)->bi_idx;                 \
+            i < (bio)->bi_vcnt;                                        \
             bvl++, i++)
 
 /*
@@ -209,21 +160,12 @@ typedef void (bio_destructor_t) (struct bio *);
 extern struct bio *bio_alloc(int, int);
 extern void bio_put(struct bio *);
 
-/*
- * the hash stuff is pretty closely tied to the request queue (needed for
- * locking etc anyway, and it's in no way an attempt at a generic hash)
- */
-struct request_queue;
-
-extern inline void bio_hash_remove(struct bio *);
-extern inline void bio_hash_add(struct bio *, void *, unsigned int);
-extern inline struct bio *bio_hash_find(kdev_t, sector_t, unsigned int);
-extern inline int bio_hash_add_unique(struct bio *, void *, unsigned int);
-extern void bio_hash_invalidate(struct request_queue *, kdev_t);
 extern int bio_endio(struct bio *, int, int);
 
 extern struct bio *bio_clone(struct bio *, int);
-extern struct bio *bio_copy(struct bio *, int);
+extern struct bio *bio_copy(struct bio *, int, int);
+
+extern inline void bio_init(struct bio *);
 
 extern int bio_ioctl(kdev_t, unsigned int, unsigned long);
 
index 863ace44fde8f7bf8b3995730b5f2db15b70642b..71712cbc66199bf2ba1c23e6432f190163159a76 100644 (file)
@@ -83,11 +83,6 @@ void initrd_init(void);
 
 static inline void blkdev_dequeue_request(struct request *req)
 {
-       if (req->bio)
-               bio_hash_remove(req->bio);
-       if (req->biotail)
-               bio_hash_remove(req->biotail);
-
        list_del(&req->queuelist);
 }
 
index f3e54a537508e4b30f271f7d32983c8dabb31e82..6c5bd21cf609015019d5e8c7ad52f8e17b982dff 100644 (file)
@@ -127,9 +127,9 @@ struct request_queue
        unsigned short          hardsect_size;
        unsigned int            max_segment_size;
 
-       wait_queue_head_t       queue_wait;
+       unsigned long           seg_boundary_mask;
 
-       unsigned int            hash_valid_counter;
+       wait_queue_head_t       queue_wait;
 };
 
 #define RQ_INACTIVE            (-1)
@@ -140,6 +140,7 @@ struct request_queue
 
 #define QUEUE_FLAG_PLUGGED     0       /* queue is plugged */
 #define QUEUE_FLAG_NOSPLIT     1       /* can process bio over several goes */
+#define QUEUE_FLAG_CLUSTER     2       /* cluster several segments into 1 */
 
 #define blk_queue_plugged(q)   test_bit(QUEUE_FLAG_PLUGGED, &(q)->queue_flags)
 
@@ -166,11 +167,6 @@ extern inline struct request *elv_next_request(request_queue_t *q)
        if (rq) {
                rq->inactive = 0;
                wmb();
-
-               if (rq->bio)
-                       bio_hash_remove(rq->bio);
-               if (rq->biotail)
-                       bio_hash_remove(rq->biotail);
        }
 
        return rq;
@@ -187,7 +183,7 @@ extern inline void blk_queue_bounce(request_queue_t *q, struct bio **bio)
 {
        struct page *page = bio_page(*bio);
 
-       if (page - page->zone->zone_mem_map > q->bounce_pfn)
+       if ((page - page->zone->zone_mem_map) + (page->zone->zone_start_paddr >> PAGE_SHIFT) < q->bounce_pfn)
                create_bounce(bio, q->bounce_gfp);
 }
 
@@ -235,7 +231,7 @@ extern void blk_attempt_remerge(request_queue_t *, struct request *);
 /*
  * Access functions for manipulating queue properties
  */
-extern int blk_init_queue(request_queue_t *, request_fn_proc *, char *);
+extern int blk_init_queue(request_queue_t *, request_fn_proc *);
 extern void blk_cleanup_queue(request_queue_t *);
 extern void blk_queue_make_request(request_queue_t *, make_request_fn *);
 extern void blk_queue_bounce_limit(request_queue_t *, unsigned long long);
@@ -243,6 +239,7 @@ extern void blk_queue_max_sectors(request_queue_t *q, unsigned short);
 extern void blk_queue_max_segments(request_queue_t *q, unsigned short);
 extern void blk_queue_max_segment_size(request_queue_t *q, unsigned int);
 extern void blk_queue_hardsect_size(request_queue_t *q, unsigned short);
+extern void blk_queue_segment_boundary(request_queue_t *q, unsigned long);
 extern int blk_rq_map_sg(request_queue_t *, struct request *, struct scatterlist *);
 extern void generic_unplug_device(void *);
 
index 9d5d644c3b88c9656e28388b02df4ee8026fd2f0..df4c50a956ec7ba59451ec6218907b98b166ef0d 100644 (file)
@@ -33,13 +33,6 @@ struct elevator_s
 
        elevator_init_fn *elevator_init_fn;
        elevator_exit_fn *elevator_exit_fn;
-
-       /*
-        * per-elevator private data
-        */
-       void *elevator_data;
-
-       char queue_name[16];
 };
 
 int elevator_noop_merge(request_queue_t *, struct request **, struct list_head *, struct bio *);
@@ -66,7 +59,7 @@ typedef struct blkelv_ioctl_arg_s {
 #define BLKELVGET   _IOR(0x12,106,sizeof(blkelv_ioctl_arg_t))
 #define BLKELVSET   _IOW(0x12,107,sizeof(blkelv_ioctl_arg_t))
 
-extern int elevator_init(request_queue_t *, elevator_t *, elevator_t, char *);
+extern int elevator_init(request_queue_t *, elevator_t *, elevator_t);
 extern void elevator_exit(request_queue_t *, elevator_t *);
 
 /*
index 95bfc30de8c90327e922398d11e645ad0151ac8e..b18bf238c2679e7c112866f7b438d413f8538a88 100644 (file)
@@ -205,7 +205,6 @@ extern int leases_enable, dir_notify_enable, lease_break_time;
 extern void update_atime (struct inode *);
 #define UPDATE_ATIME(inode) update_atime (inode)
 
-extern void bio_hash_init(unsigned long);
 extern void buffer_init(unsigned long);
 extern void inode_init(unsigned long);
 extern void mnt_init(unsigned long);
diff --git a/include/linux/i2c-old.h b/include/linux/i2c-old.h
deleted file mode 100644 (file)
index cc9d9c1..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-#ifndef I2C_H
-#define I2C_H
-
-/*
- * linux i2c interface.  Works a little bit like the scsi subsystem.
- * There are:
- *
- *     i2c          the basic control module        (like scsi_mod)
- *     bus driver   a driver with a i2c bus         (hostadapter driver)
- *     chip driver  a driver for a chip connected
- *                  to a i2c bus                    (cdrom/hd driver)
- *
- * A device will be attached to one bus and one chip driver.  Every chip
- * driver gets a unique ID.
- *
- * A chip driver can provide a ioctl-like callback for the
- * communication with other parts of the kernel (not every i2c chip is
- * useful without other devices, a TV card tuner for example). 
- *
- * "i2c internal" parts of the structs: only the i2c module is allowed to
- * write to them, for others they are read-only.
- *
- */
-
-#include <linux/version.h>
-
-#define I2C_BUS_MAX       4    /* max # of bus drivers  */
-#define I2C_DRIVER_MAX    8    /* max # of chip drivers */
-#define I2C_DEVICE_MAX    8    /* max # if devices per bus/driver */
-
-struct i2c_bus;
-struct i2c_driver;
-struct i2c_device;
-
-#define I2C_DRIVERID_MSP3400            1
-#define I2C_DRIVERID_TUNER              2
-#define I2C_DRIVERID_VIDEOTEXT          3
-#define I2C_DRIVERID_VIDEODECODER       4
-#define I2C_DRIVERID_VIDEOENCODER       5
-
-#define I2C_BUSID_BT848                1       /* I2C bus on a BT848 */
-#define I2C_BUSID_PARPORT      2       /* Bit banging on a parallel port */
-#define I2C_BUSID_BUZ          3
-#define I2C_BUSID_ZORAN                4
-#define I2C_BUSID_CYBER2000    5
-
-/*
- * struct for a driver for a i2c chip (tuner, soundprocessor,
- * videotext, ... ).
- *
- * a driver will register within the i2c module.  The i2c module will
- * callback the driver (i2c_attach) for every device it finds on a i2c
- * bus at the specified address.  If the driver decides to "accept"
- * the, device, it must return a struct i2c_device, and NULL
- * otherwise.
- *
- * i2c_detach = i2c_attach ** -1
- * 
- * i2c_command will be used to pass commands to the driver in a
- * ioctl-line manner.
- *
- */
-
-struct i2c_driver 
-{
-    char           name[32];         /* some useful label         */
-    int            id;               /* device type ID            */
-    unsigned char  addr_l, addr_h;   /* address range of the chip */
-
-    int (*attach)(struct i2c_device *device);
-    int (*detach)(struct i2c_device *device);
-    int (*command)(struct i2c_device *device,unsigned int cmd, void *arg);
-
-    /* i2c internal */
-    struct i2c_device   *devices[I2C_DEVICE_MAX];
-    int                 devcount;
-};
-
-
-/*
- * this holds the informations about a i2c bus available in the system.
- * 
- * a chip with a i2c bus interface (like bt848) registers the bus within
- * the i2c module. This struct provides functions to access the i2c bus.
- * 
- * One must hold the spinlock to access the i2c bus (XXX: is the irqsave
- * required? Maybe better use a semaphore?). 
- * [-AC-] having a spinlock_irqsave is only needed if we have drivers wishing
- *       to bang their i2c bus from an interrupt.
- * 
- * attach/detach_inform is a callback to inform the bus driver about
- * attached chip drivers.
- *
- */
-
-/* needed: unsigned long flags */
-
-#if LINUX_VERSION_CODE >= 0x020100
-# if 0
-#  define LOCK_FLAGS unsigned long flags;
-#  define LOCK_I2C_BUS(bus)    spin_lock_irqsave(&(bus->bus_lock),flags);
-#  define UNLOCK_I2C_BUS(bus)  spin_unlock_irqrestore(&(bus->bus_lock),flags);
-# else
-#  define LOCK_FLAGS
-#  define LOCK_I2C_BUS(bus)    spin_lock(&(bus->bus_lock));
-#  define UNLOCK_I2C_BUS(bus)  spin_unlock(&(bus->bus_lock));
-# endif
-#else
-# define LOCK_FLAGS unsigned long flags;
-# define LOCK_I2C_BUS(bus)    { save_flags(flags); cli(); }
-# define UNLOCK_I2C_BUS(bus)  { restore_flags(flags);     }
-#endif
-
-struct i2c_bus 
-{
-       char  name[32];         /* some useful label */
-       int   id;
-       void  *data;            /* free for use by the bus driver */
-
-#if LINUX_VERSION_CODE >= 0x020100
-       spinlock_t bus_lock;
-#endif
-
-       /* attach/detach inform callbacks */
-       void    (*attach_inform)(struct i2c_bus *bus, int id);
-       void    (*detach_inform)(struct i2c_bus *bus, int id);
-
-       /* Software I2C */
-       void    (*i2c_setlines)(struct i2c_bus *bus, int ctrl, int data);
-       int     (*i2c_getdataline)(struct i2c_bus *bus);
-
-       /* Hardware I2C */
-       int     (*i2c_read)(struct i2c_bus *bus, unsigned char addr);
-       int     (*i2c_write)(struct i2c_bus *bus, unsigned char addr,
-                        unsigned char b1, unsigned char b2, int both);
-
-       /* internal data for i2c module */
-       struct i2c_device   *devices[I2C_DEVICE_MAX];
-       int                 devcount;
-};
-
-
-/*
- *     This holds per-device data for a i2c device
- */
-
-struct i2c_device 
-{
-       char           name[32];         /* some useful label */
-       void           *data;            /* free for use by the chip driver */
-       unsigned char  addr;             /* chip addr */
-
-       /* i2c internal */
-       struct i2c_bus     *bus;
-       struct i2c_driver  *driver;
-};
-
-
-/* ------------------------------------------------------------------- */
-/* i2c module functions                                                */
-
-/* register/unregister a i2c bus */
-int i2c_register_bus(struct i2c_bus *bus);
-int i2c_unregister_bus(struct i2c_bus *bus);
-
-/* register/unregister a chip driver */
-int i2c_register_driver(struct i2c_driver *driver);
-int i2c_unregister_driver(struct i2c_driver *driver);
-
-/* send a command to a chip using the ioctl-like callback interface */
-int i2c_control_device(struct i2c_bus *bus, int id,
-                      unsigned int cmd, void *arg);
-
-/* i2c bus access functions */
-void    i2c_start(struct i2c_bus *bus);
-void    i2c_stop(struct i2c_bus *bus);
-void    i2c_one(struct i2c_bus *bus);
-void    i2c_zero(struct i2c_bus *bus);
-int     i2c_ack(struct i2c_bus *bus);
-
-int     i2c_sendbyte(struct i2c_bus *bus,unsigned char data,int wait_for_ack);
-unsigned char i2c_readbyte(struct i2c_bus *bus,int last);
-
-/* i2c (maybe) hardware functions */
-int     i2c_read(struct i2c_bus *bus, unsigned char addr);
-int     i2c_write(struct i2c_bus *bus, unsigned char addr,
-                 unsigned char b1, unsigned char b2, int both);
-
-int    i2c_init(void);
-#endif /* I2C_H */
diff --git a/include/linux/malloc.h b/include/linux/malloc.h
deleted file mode 100644 (file)
index fc5e144..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _LINUX_MALLOC_H
-#define _LINUX_MALLOC_H
-
-#warning linux/malloc.h is deprecated, use linux/slab.h instead.
-
-#include <linux/slab.h>
-#endif /* _LINUX_MALLOC_H */
index 97c574fe85d2177bb92507633cd0a173ce8c5ab2..3a16560f1c2f1ae2885d0d0d3037e4842b2c4e1e 100644 (file)
@@ -21,7 +21,6 @@ extern unsigned long event;
 #include <asm/mmu.h>
 
 #include <linux/smp.h>
-#include <linux/tty.h>
 #include <linux/sem.h>
 #include <linux/signal.h>
 #include <linux/securebits.h>
index 1cf66cd69e6c0614ba7c8e9a258455b5c13e1294..b16ee73b37a2613402e343f0973279b1def3f30b 100644 (file)
@@ -2,7 +2,11 @@
 #define _LINUX_SEQ_FILE_H
 #ifdef __KERNEL__
 
+#include <linux/types.h>
+
 struct seq_operations;
+struct file;
+struct inode;
 
 struct seq_file {
        char *buf;
@@ -12,6 +16,7 @@ struct seq_file {
        loff_t index;
        struct semaphore sem;
        struct seq_operations *op;
+       void *private;
 };
 
 struct seq_operations {
index 5be00b10a65d52ccf30ddbee0d8d85af89d1f254..8a1e43209bfba577ef78768e112a010dfd481355 100644 (file)
@@ -600,7 +600,6 @@ asmlinkage void __init start_kernel(void)
        vfs_caches_init(mempages);
        buffer_init(mempages);
        page_cache_init(mempages);
-       bio_hash_init(mempages);
 #if defined(CONFIG_ARCH_S390)
        ccwcache_init();
 #endif
index 5a575dd1c380f1ab94350ccfcc2b06bbf9562ff7..d760b08e8fda2d5197f28d978d1aeff2f4d194fa 100644 (file)
@@ -264,16 +264,17 @@ static __init int init_emergency_pool(void)
 
 __initcall(init_emergency_pool);
 
-static inline void bounce_end_io (struct bio *bio, int nr_sectors)
+static inline int bounce_end_io (struct bio *bio, int nr_sectors)
 {
        struct bio *bio_orig = bio->bi_private;
        struct page *page = bio_page(bio);
        unsigned long flags;
+       int ret;
 
        if (test_bit(BIO_UPTODATE, &bio->bi_flags))
-               set_bit(BIO_UPTODATE, bio_orig->bi_flags);
+               set_bit(BIO_UPTODATE, &bio_orig->bi_flags);
 
-       bio_orig->bi_end_io(bio_orig, nr_sectors);
+       ret = bio_orig->bi_end_io(bio_orig, nr_sectors);
 
        spin_lock_irqsave(&emergency_lock, flags);
        if (nr_emergency_pages >= POOL_SIZE) {
@@ -289,23 +290,23 @@ static inline void bounce_end_io (struct bio *bio, int nr_sectors)
                spin_unlock_irqrestore(&emergency_lock, flags);
        }
 
-       bio_hash_remove(bio);
        bio_put(bio);
+       return ret;
 }
 
-static void bounce_end_io_write (struct bio *bio, int nr_sectors)
+static int bounce_end_io_write(struct bio *bio, int nr_sectors)
 {
-       bounce_end_io(bio, nr_sectors);
+       return bounce_end_io(bio, nr_sectors);
 }
 
-static void bounce_end_io_read (struct bio *bio, int nr_sectors)
+static int bounce_end_io_read (struct bio *bio, int nr_sectors)
 {
        struct bio *bio_orig = bio->bi_private;
 
        if (test_bit(BIO_UPTODATE, &bio->bi_flags))
                copy_to_high_bio_irq(bio_orig, bio);
 
-       bounce_end_io(bio, nr_sectors);
+       return bounce_end_io(bio, nr_sectors);
 }
 
 struct page *alloc_bounce_page(int gfp_mask)
@@ -350,31 +351,42 @@ void create_bounce(struct bio **bio_orig, int gfp_mask)
 {
        struct page *page;
        struct bio *bio;
+       int i, rw = bio_data_dir(*bio_orig);
 
-       bio = bio_alloc(GFP_NOHIGHIO, 1);
+       BUG_ON((*bio_orig)->bi_idx);
 
-       /*
-        * wasteful for 1kB fs, but machines with lots of ram are less likely
-        * to have 1kB fs for anything that needs to go fast. so all things
-        * considered, it should be ok.
-        */
-       page = alloc_bounce_page(gfp_mask);
+       bio = bio_alloc(GFP_NOHIGHIO, (*bio_orig)->bi_vcnt);
 
        bio->bi_dev = (*bio_orig)->bi_dev;
        bio->bi_sector = (*bio_orig)->bi_sector;
        bio->bi_rw = (*bio_orig)->bi_rw;
 
-       bio->bi_io_vec->bvl_vec[0].bv_page = page;
-       bio->bi_io_vec->bvl_vec[0].bv_len = bio_size(*bio_orig);
-       bio->bi_io_vec->bvl_vec[0].bv_offset = 0;
-
-       bio->bi_private = *bio_orig;
+       bio->bi_vcnt = (*bio_orig)->bi_vcnt;
+       bio->bi_idx = 0;
+       bio->bi_size = (*bio_orig)->bi_size;
 
-       if (bio_rw(bio) == WRITE) {
+       if (rw & WRITE)
                bio->bi_end_io = bounce_end_io_write;
-               copy_from_high_bio(bio, *bio_orig);
-       } else
+       else
                bio->bi_end_io = bounce_end_io_read;
 
+       for (i = 0; i < bio->bi_vcnt; i++) {
+               char *vto, *vfrom;
+
+               page = alloc_bounce_page(gfp_mask);
+
+               bio->bi_io_vec[i].bv_page = page;
+               bio->bi_io_vec[i].bv_len = (*bio_orig)->bi_io_vec[i].bv_len;
+               bio->bi_io_vec[i].bv_offset = 0;
+
+               if (rw & WRITE) {
+                       vto = page_address(page);
+                       vfrom = __bio_kmap(*bio_orig, i);
+                       memcpy(vto, vfrom + __bio_offset(*bio_orig, i), bio->bi_io_vec[i].bv_len);
+                       __bio_kunmap(bio, i);
+               }
+       }
+
+       bio->bi_private = *bio_orig;
        *bio_orig = bio;
 }