]> git.neil.brown.name Git - history.git/commitdiff
Linux 2.4.0-test10pre4 2.4.0-test10pre4
authorLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:39:32 +0000 (15:39 -0500)
committerLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:39:32 +0000 (15:39 -0500)
    - disable writing to /proc/xxx/mem. Sure, it works now, but it's still
      a security risk.
    - IDE driver update (Victroy66 SouthBridge support)
    - i810 rng driver cleanup
    - fix sbus Makefile
    - named initializers in module..
    - ppoe: remove explicit initializer - it's done with initcalls.
    - x86 WP bit detection: do it cleanly with exception handling
    - Arnaldo Carvalho de Melo: memory leaks in drivers/media/video
    - Bartlomiej Zolnierkiewicz: video init functions get __init
    - David Miller: get rid of net/protocols.c - they get to initialize themselves
    - David Miller: get rid of dev_mc_lock - we hold dev->xmit_lock anyway.
    - Geert Uytterhoeven: Zorro (Amiga) bus support update
    - David Miller: work around gcc-2.7.2 bug
    - Geert Uytterhoeven: mark struct consw's "const".
    - Jeff Garzik: network driver cleanups, ns558 joystick driver oops fix
    - Tigran Aivazian: clean up __alloc_pages(), kill_super() and
      notify_change()
    - Tigran Aivazian: move stuff from .data to .bss
    - Jeff Garzik: divert.h typename cleanups
    - James Simmons: mdacon using spinlocks
    - Tigran Aivazian: fix BFS free block calculation
    - David Miller: sparc32 works again
    - Bernd Schmidt: fix undefined C code (set/use without a sequence point)
    - Mikael Pettersson: nicer Pentium IV setup handling.
    - Georg Acher: usb-uhci cpia oops fix
    - Kanoj Sarcar: more node_data cleanups for [non]NUMA.
    - Richard Henderson: alpha update to new vmalloc setup
    - Ben LaHaise: atomic pte updates (don't lose dirty bit)
    - David Brownell: ohci memory debugging (== use separate slabs for allocation)

370 files changed:
Documentation/Changes
Documentation/Configure.help
Documentation/exception.txt
Documentation/zorro.txt
Makefile
arch/alpha/config.in
arch/alpha/defconfig
arch/alpha/lib/Makefile
arch/alpha/lib/callback_init.c [deleted file]
arch/alpha/mm/fault.c
arch/alpha/mm/init.c
arch/arm/mm/init.c
arch/arm/mm/mm-armv.c
arch/i386/config.in
arch/i386/defconfig
arch/i386/kernel/bluesmoke.c
arch/i386/kernel/entry.S
arch/i386/kernel/i8259.c
arch/i386/kernel/mtrr.c
arch/i386/kernel/setup.c
arch/i386/kernel/smp.c
arch/i386/kernel/time.c
arch/i386/mm/fault.c
arch/i386/mm/init.c
arch/m68k/amiga/amiga_ksyms.c
arch/m68k/amiga/chipram.c
arch/m68k/amiga/config.c
arch/m68k/config.in
arch/m68k/kernel/setup.c
arch/m68k/mac/config.c
arch/m68k/mm/init.c
arch/mips/dec/time.c
arch/mips/kernel/time.c
arch/mips/mm/init.c
arch/mips/sgi/kernel/indy_timer.c
arch/mips64/kernel/smp.c
arch/mips64/mm/init.c
arch/mips64/sgi-ip22/ip22-timer.c
arch/mips64/sgi-ip27/ip27-memory.c
arch/mips64/sgi-ip27/ip27-rtc.c
arch/mips64/sgi-ip27/ip27-timer.c
arch/ppc/config.in
arch/ppc/kernel/smp.c
arch/ppc/mm/init.c
arch/s390/mm/init.c
arch/sh/kernel/setup.c
arch/sh/kernel/time.c
arch/sh/mm/init.c
arch/sparc/kernel/semaphore.c
arch/sparc/kernel/setup.c
arch/sparc/mm/fault.c
arch/sparc/mm/init.c
arch/sparc/mm/srmmu.c
arch/sparc/mm/sun4c.c
arch/sparc64/kernel/semaphore.c
arch/sparc64/kernel/setup.c
arch/sparc64/mm/init.c
arch/sparc64/solaris/socksys.c
drivers/acorn/char/defkeymap-acorn.c
drivers/atm/fore200e.c
drivers/atm/nicstar.c
drivers/block/DAC960.c
drivers/block/acsi_slm.c
drivers/block/cciss.c
drivers/block/cpqarray.c
drivers/block/loop.c
drivers/block/nbd.c
drivers/block/paride/pg.c
drivers/block/paride/pt.c
drivers/block/rd.c
drivers/cdrom/cdrom.c
drivers/cdrom/sbpcd.c
drivers/char/acquirewdt.c
drivers/char/console.c
drivers/char/cyclades.c
drivers/char/dsp56k.c
drivers/char/epca.c
drivers/char/esp.c
drivers/char/ftape/lowlevel/fdc-io.c
drivers/char/ftape/lowlevel/fdc-isr.c
drivers/char/ftape/lowlevel/ftape-bsm.c
drivers/char/ftape/lowlevel/ftape-format.c
drivers/char/ftape/lowlevel/ftape-io.c
drivers/char/ftape/lowlevel/ftape-rw.c
drivers/char/ftape/lowlevel/ftape-tracing.c
drivers/char/ftape/lowlevel/ftape-write.c
drivers/char/ftape/zftape/zftape-buffers.c
drivers/char/ftape/zftape/zftape-ctl.c
drivers/char/ftape/zftape/zftape-read.c
drivers/char/ftape/zftape/zftape-rw.c
drivers/char/ftape/zftape/zftape-vtbl.c
drivers/char/ftape/zftape/zftape-write.c
drivers/char/generic_serial.c
drivers/char/i810_rng.c
drivers/char/ip2/i2ellis.c
drivers/char/ip2main.c
drivers/char/istallion.c
drivers/char/joystick/gameport.c
drivers/char/joystick/ns558.c
drivers/char/joystick/serio.c
drivers/char/keyboard.c
drivers/char/misc.c
drivers/char/mxser.c
drivers/char/pc110pad.c
drivers/char/pc_keyb.c
drivers/char/ppdev.c
drivers/char/qpmouse.c
drivers/char/random.c
drivers/char/rio/rio_linux.c
drivers/char/riscom8.c
drivers/char/rocket.c
drivers/char/sbc60xxwdt.c
drivers/char/selection.c
drivers/char/serial.c
drivers/char/softdog.c
drivers/char/specialix.c
drivers/char/stallion.c
drivers/char/sx.c
drivers/char/sysrq.c
drivers/char/tpqic02.c
drivers/char/tty_io.c
drivers/char/vc_screen.c
drivers/char/vt.c
drivers/char/wdt285.c
drivers/char/wdt977.c
drivers/i2o/i2o_core.c
drivers/ide/Config.in
drivers/ide/Makefile
drivers/ide/alim15x3.c
drivers/ide/buddha.c
drivers/ide/ide-disk.c
drivers/ide/ide-features.c
drivers/ide/ide-pci.c
drivers/ide/ide-proc.c
drivers/ide/ide.c
drivers/ide/slc90e66.c [new file with mode: 0644]
drivers/ieee1394/raw1394.c
drivers/input/input.c
drivers/isdn/isdn_common.c
drivers/isdn/sc/debug.c
drivers/md/md.c
drivers/media/video/tda7432.c
drivers/media/video/tda8425.c
drivers/media/video/tda985x.c
drivers/media/video/tda9875.c
drivers/media/video/tea6300.c
drivers/net/3c515.c
drivers/net/3c59x.c
drivers/net/Config.in
drivers/net/a2065.c
drivers/net/aironet4500_card.c
drivers/net/aironet4500_core.c
drivers/net/ariadne.c
drivers/net/ariadne2.c
drivers/net/arlan.c
drivers/net/daynaport.c
drivers/net/depca.c
drivers/net/e2100.c
drivers/net/eepro100.c
drivers/net/es3210.c
drivers/net/hydra.c
drivers/net/irda/nsc-ircc.c
drivers/net/lne390.c
drivers/net/ne3210.c
drivers/net/pcmcia/3c574_cs.c
drivers/net/pcmcia/xircom_tulip_cb.c
drivers/net/pcnet32.c
drivers/net/ppp_generic.c
drivers/net/pppox.c
drivers/net/rclanmtl.c
drivers/net/rclanmtl.h
drivers/net/rcpci45.c
drivers/net/skeleton.c
drivers/net/tokenring/ibmtr.c
drivers/net/tokenring/smctr.c
drivers/net/tulip/tulip_core.c
drivers/net/wan/cosa.c
drivers/net/wan/sdlamain.c
drivers/net/wd.c
drivers/parport/parport_mfc3.c
drivers/pci/gen-devlist.c
drivers/pci/pci.ids
drivers/sbus/audio/audio.c
drivers/sbus/char/Makefile
drivers/sbus/char/bpp.c
drivers/sbus/char/sab82532.c
drivers/sbus/char/su.c
drivers/sbus/char/sunkbd.c
drivers/sbus/char/vfc_dev.c
drivers/sbus/char/zs.c
drivers/scsi/a2091.c
drivers/scsi/aha152x.c
drivers/scsi/amiga7xx.c
drivers/scsi/blz1230.c
drivers/scsi/blz2060.c
drivers/scsi/cyberstorm.c
drivers/scsi/cyberstormII.c
drivers/scsi/eata.c
drivers/scsi/fastlane.c
drivers/scsi/gvp11.c
drivers/scsi/ide-scsi.c
drivers/scsi/oktagon_esp.c
drivers/scsi/scsi.c
drivers/scsi/sym53c8xx_comm.h
drivers/scsi/wd7000.c
drivers/sound/sound_core.c
drivers/sound/trident.c
drivers/telephony/ixj.c
drivers/usb/usb-ohci.c
drivers/usb/usb-ohci.h
drivers/usb/usb-uhci.c
drivers/video/clgenfb.c
drivers/video/controlfb.c
drivers/video/cyberfb.c
drivers/video/dnfb.c
drivers/video/dummycon.c
drivers/video/fbcon.c
drivers/video/fbmem.c
drivers/video/macfb.c
drivers/video/mdacon.c
drivers/video/newport_con.c
drivers/video/offb.c
drivers/video/promcon.c
drivers/video/q40fb.c
drivers/video/retz3fb.c
drivers/video/sisfb.c
drivers/video/vesafb.c
drivers/video/vgacon.c
drivers/video/virgefb.c
drivers/zorro/Config.in [new file with mode: 0644]
drivers/zorro/Makefile
drivers/zorro/gen-devlist.c [new file with mode: 0644]
drivers/zorro/names.c
drivers/zorro/zorro.c
drivers/zorro/zorro.ids [new file with mode: 0644]
fs/attr.c
fs/bfs/dir.c
fs/bfs/file.c
fs/bfs/inode.c
fs/coda/dir.c
fs/coda/psdev.c
fs/cramfs/inode.c
fs/devfs/base.c
fs/devfs/util.c
fs/ext2/namei.c
fs/fat/cvf.c
fs/hfs/trans.c
fs/inode.c
fs/lockd/clntlock.c
fs/lockd/mon.c
fs/lockd/svclock.c
fs/nfs/dir.c
fs/nfs/nfs2xdr.c
fs/nfs/nfs3xdr.c
fs/nfs/read.c
fs/nfs/write.c
fs/nfsd/nfscache.c
fs/nfsd/nfsfh.c
fs/nfsd/vfs.c
fs/nls/nls_base.c
fs/nls/nls_big5.c
fs/nls/nls_euc-jp.c
fs/nls/nls_euc-kr.c
fs/nls/nls_gb2312.c
fs/nls/nls_sjis.c
fs/ntfs/fs.c
fs/partitions/check.c
fs/proc/base.c
fs/super.c
fs/umsdos/inode.c
include/asm-alpha/pgalloc.h
include/asm-alpha/pgtable.h
include/asm-arm/pgtable.h
include/asm-generic/pgtable.h [new file with mode: 0644]
include/asm-i386/bugs.h
include/asm-i386/cache.h
include/asm-i386/floppy.h
include/asm-i386/page.h
include/asm-i386/pgtable-2level.h
include/asm-i386/pgtable-3level.h
include/asm-i386/pgtable.h
include/asm-ia64/pgtable.h
include/asm-m68k/pgtable.h
include/asm-mips/pgtable.h
include/asm-mips64/pgtable.h
include/asm-ppc/pgtable.h
include/asm-s390/pgtable.h
include/asm-sh/pgtable.h
include/asm-sparc/pgalloc.h
include/asm-sparc/pgtable.h
include/asm-sparc64/pgtable.h
include/linux/bootmem.h
include/linux/byteorder/big_endian.h
include/linux/byteorder/little_endian.h
include/linux/byteorder/pdp_endian.h
include/linux/byteorder/swab.h
include/linux/byteorder/swabb.h
include/linux/console.h
include/linux/console_struct.h
include/linux/ide.h
include/linux/netlink.h
include/linux/pci_ids.h
include/linux/vt_kern.h
include/linux/zorro.h
include/linux/zorro_ids.h [new file with mode: 0644]
include/net/atalkcall.h [deleted file]
include/net/ax25.h
include/net/ax25call.h [deleted file]
include/net/decnet_call.h [deleted file]
include/net/divert.h
include/net/ipx.h
include/net/ipxcall.h [deleted file]
include/net/lapbcall.h [deleted file]
include/net/llccall.h [deleted file]
include/net/netbeuicall.h [deleted file]
include/net/netrom.h
include/net/nrcall.h [deleted file]
include/net/p8022call.h [deleted file]
include/net/psnapcall.h [deleted file]
include/net/rose.h
include/net/rosecall.h [deleted file]
include/net/spxcall.h [deleted file]
include/net/x25.h
include/net/x25call.h [deleted file]
kernel/module.c
kernel/panic.c
kernel/printk.c
kernel/sys.c
kernel/time.c
kernel/timer.c
mm/bootmem.c
mm/filemap.c
mm/highmem.c
mm/memory.c
mm/mprotect.c
mm/mremap.c
mm/numa.c
mm/page_alloc.c
mm/swapfile.c
mm/vmalloc.c
mm/vmscan.c
net/802/llc_macinit.c
net/802/p8022.c
net/802/psnap.c
net/802/tr.c
net/Makefile
net/appletalk/ddp.c
net/atm/pvc.c
net/atm/svc.c
net/ax25/af_ax25.c
net/core/dev_mcast.c
net/decnet/af_decnet.c
net/econet/af_econet.c
net/ipv4/af_inet.c
net/ipv4/tcp_ipv4.c
net/ipv6/af_inet6.c
net/ipx/af_ipx.c
net/irda/af_irda.c
net/irda/irmod.c
net/lapb/lapb_iface.c
net/netlink/af_netlink.c
net/netlink/netlink_dev.c
net/netrom/af_netrom.c
net/packet/af_packet.c
net/protocols.c [deleted file]
net/rose/af_rose.c
net/socket.c
net/unix/af_unix.c
net/unix/sysctl_net_unix.c
net/x25/af_x25.c

index c12ed2e6d73989bb8d13f4e97a6d19f22a2de220..27794adb0f1d50de1807d48ed4ec0f1e13119fcb 100644 (file)
@@ -28,7 +28,10 @@ russkim perevodom dannogo documenta.
 Visite <http://www2.adi.uam.es/~ender/tecnico/> para obtener la traducción
 al español de este documento en varios formatos.
 
-Last updated: August 28, 2000
+Eine deutsche Version dieser Datei finden Sie unter
+<http://www.stefan-winter.de/Changes-2.4.0.txt>.
+
+Last updated: October 13, 2000
 
 Chris Ricker (kaboom@gatech.edu or chris.ricker@genetics.utah.edu).
 
@@ -49,9 +52,9 @@ o  Gnu C                  2.7.2.3                 # gcc --version
 o  Gnu make               3.77                    # make --version
 o  binutils               2.9.1.0.25              # ld -v
 o  util-linux             2.10o                   # kbdrate -v
-o  modutils               2.3.15                  # insmod -V
-o  e2fsprogs              1.18                    # tune2fs --version
-o  pcmcia-cs              3.1.19                  # cardmgr -V
+o  modutils               2.3.18                  # insmod -V
+o  e2fsprogs              1.19                    # tune2fs --version
+o  pcmcia-cs              3.1.21                  # cardmgr -V
 o  PPP                    2.4.0                   # pppd --version
 o  isdn4k-utils           3.1beta7                # isdnctrl 2>&1|grep version
                          
@@ -277,7 +280,7 @@ o  <ftp://ftp.kernel.org/pub/linux/utils/kernel/ksymoops/v2.3>
 
 Modutils
 --------
-o  <ftp://ftp.kernel.org/pub/linux/utils/kernel/modutils/v2.3/modutils-2.3.15.tar.gz>
+o  <ftp://ftp.kernel.org/pub/linux/utils/kernel/modutils/v2.3/modutils-2.3.18.tar.bz2>
 
 Mkinitrd
 --------
@@ -285,8 +288,8 @@ o  <ftp://rawhide.redhat.com/pub/rawhide/SRPMS/SRPMS/mkinitrd-2.5-1.src.rpm>
 
 E2fsprogs
 ---------
-o  <http://web.mit.edu/tytso/www/linux/dist/e2fsprogs-1.18.tar.gz>
-o  <http://web.mit.edu/tytso/www/linux/dist/e2fsprogs-1.18.src.rpm>
+o  <ftp://download.sourceforge.net/pub/sourceforge/e2fsprogs/e2fsprogs-1.19.tar.gz>
+o  <ftp://download.sourceforge.net/pub/sourceforge/e2fsprogs/e2fsprogs-1.19.src.rpm>
 
 LVM toolset
 -----------
@@ -294,7 +297,7 @@ o  <http://linux.msede.com/lvm/>
 
 Pcmcia-cs
 ---------
-o  <ftp://pcmcia-cs.sourceforge.org/pub/pcmcia-cs/pcmcia-cs-3.1.19.tar.gz>
+o  <ftp://pcmcia-cs.sourceforge.net/pub/pcmcia-cs/pcmcia-cs-3.1.21.tar.gz>
 
 Jade
 ----
index 081827df76aee9639784b110ac49c8de36f0ac2e..b32d5508cbd73262e4d1f141b190cbafc0f93b4a 100644 (file)
@@ -938,7 +938,20 @@ CONFIG_BLK_DEV_SIS5513
   available" as well.
 
   Please read the comments at the top of drivers/ide/sis5513.c
+
+SLC90E66 chipset support
+CONFIG_BLK_DEV_SLC90E66
+  This driver ensures (U)DMA support for Victroy66 SouthBridges for
+  SMsC with Intel NorthBridges.  This is an Ultra66 based chipset.
+  The nice thing about it is that you can mix Ultra/DMA/PIO devices
+  and it will handle timing cycles.  Since this is an improved look-a-like
+  to the PIIX4 it should be a nice addition.
+
+  If you say Y here, you need to say Y to "Use DMA by default when
+  available" as well.
+
+  Please read the comments at the top of drivers/ide/slc90e66.c
+
 Winbond SL82c105 support
 CONFIG_BLK_DEV_SL82C105
   If you have a Winbond SL82c105 IDE controller, say Y here to enable
@@ -2146,13 +2159,26 @@ CONFIG_ALPHA_LEGACY_START_ADDRESS
 
   If you're using aboot 0.7 or later, the bootloader will examine
   the ELF headers to determine where to transfer control.  Unfortunately,
-  most older bootloaders -- APB, or MILO -- hardcoded the kernel
+  most older bootloaders -- APB or MILO -- hardcoded the kernel
   start address rather than examining the ELF headers, and the result
   is a hard lockup.
 
   Say Y if you have a broken bootloader.  Say N if you do not, or
   if you wish to run on Wildfire.
 
+Large VMALLOC support
+CONFIG_ALPHA_LARGE_VMALLOC
+  Process creation and other aspects of virtual memory management
+  can be streamlined if we restrict the kernel to one PGD for all
+  vmalloc allocations.  This equates to about 8GB.
+
+  Under normal circumstances, this is so far and above what is needed
+  as to be laughable.  However, there are certain applications (such
+  as benchmark-grade in-kernel web serving) that can make use of as
+  much vmalloc space as is available.
+
+  Say N unless you know you need gobs and gobs of vmalloc space.
+
 Non-standard serial port support
 CONFIG_SERIAL_NONSTANDARD
   Say Y here if you have any non-standard serial boards -- boards
@@ -15131,18 +15157,27 @@ CONFIG_RMW_INSNS
   really know what you are doing, say N. Try Y only if you're quite
   adventurous.
 
-Amiga AutoConfig Identification
+Zorro support
 CONFIG_ZORRO
-  This enables support for automatic identification of Amiga expansion
-  cards that obey the AutoConfig(tm) specification.
-  Say Y if you want your expansion cards to be identified on bootup;
-  it will enlarge your kernel by about 10 KB. The identification
-  information is then also available through /proc/zorro (say Y to
-  "/proc file system support"!). Read Documentation/zorro.txt for more
-  information. 
+  This enables support for the Zorro bus in the Amiga. If you have
+  expansion cards in your Amiga that conform to the Amiga
+  AutoConfig(tm) specification, say Y, otherwise N. Note that even
+  expansion cards that do not fit in the Zorro slots but fit in e.g.
+  the CPU slot may fall in this category, so you have to say Y to let
+  Linux use these.
+
+Zorro device name database
+CONFIG_ZORRO_NAMES
+  By default, the kernel contains a database of all known Zorro device
+  names to make the information in /proc/iomem comprehensible to the
+  user. This database increases the size of the kernel image by about
+  15KB, but it gets freed after the system boots up, so it doesn't
+  take up kernel memory. Anyway, if you are building an installation
+  floppy or kernel for an embedded system where kernel image size
+  really matters, you can disable this feature and you'll get device
+  ID numbers instead of names.
 
-  Note that even if you say N here, you can still use your expansion
-  cards. If in doubt, say Y.
+  When in doubt, say Y.
 
 Amiga 1200/600 PCMCIA support (EXPERIMENTAL)
 CONFIG_AMIGA_PCMCIA
index 6adc97ba14ca5e403a08583a4cedc2f4dc151cdd..f1d436993eb156831f50a4ab32619f79929dbc02 100644 (file)
@@ -284,3 +284,9 @@ get_user macro actually returns a value: 0, if the user access was
 successful, -EFAULT on failure. Our original code did not test this
 return value, however the inline assembly code in get_user tries to
 return -EFAULT. GCC selected EAX to return this value.
+
+NOTE:
+Due to the way that the exception table is built and needs to be ordered,
+only use exceptions for code in the .text section.  Any other section
+will cause the exception table to not be sorted correctly, and the
+exceptions will fail.
index ed77a047c2cff6d0b5090b3329477963ab66e98e..a56e2c485b499c9512c1de6369fb66fa78b2ab19 100644 (file)
@@ -9,7 +9,7 @@ Last revised: February 27, 2000
 ---------------
 
 The Zorro bus is the bus used in the Amiga family of computers. Thanks to
-AutoConfig(tm), it's is 100% Plug-and-Play.
+AutoConfig(tm), it's 100% Plug-and-Play.
 
 There are two types of Zorro busses, Zorro II and Zorro III:
 
@@ -32,7 +32,6 @@ for the board with Zorro ID `ZORRO_PROD_xxx' looks like:
     while ((z = zorro_find_device(ZORRO_PROD_xxx, z))) {
        if (!zorro_request_region(z->resource.start+MY_START, MY_SIZE,
                                  "My explanation"))
-       strcpy(z->name, "My board name");
        ...
     }
 
@@ -94,16 +93,7 @@ The treatment of these regions depends on the type of Zorro space:
        iounmap(virt_addr);
 
 
-5. Zorro Device Naming
-----------------------
-
-Since we think generic device naming is something for userspace (zorroutils),
-we don't keep a Zorro device name database in the kernel.
-However, device drivers are allowed to store the expansion board name in struct
-zorro_dev.
-
-
-6. References
+5. References
 -------------
 
 linux/include/linux/zorro.h
@@ -111,6 +101,6 @@ linux/include/linux/ioport.h
 linux/include/asm-m68k/io.h
 linux/include/asm-m68k/amigahw.h
 linux/include/asm-ppc/io.h
-linux/driver/zorro
+linux/drivers/zorro
 /proc/bus/zorro
 
index b6a9118148b6fb77db1679befd472fcbde7cfa0c..035332122fbd7054ac62a3704c026e82a50620e1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -367,6 +367,7 @@ clean:      archclean
        rm -f drivers/char/consolemap_deftbl.c drivers/video/promcon_tbl.c
        rm -f drivers/char/conmakehash
        rm -f drivers/pci/devlist.h drivers/pci/classlist.h drivers/pci/gen-devlist
+       rm -f drivers/zorro/devlist.h drivers/zorro/gen-devlist
        rm -f drivers/sound/bin2hex drivers/sound/hex2hex
        rm -f drivers/atm/fore200e_mkfirm drivers/atm/{pca,sba}*{.bin,.bin1,.bin2}
        rm -f net/khttpd/make_times_h
index 3b0126e7d15ed2742bdc17cfda4a9f4d6adf3a3e..18fdcde8abe66e597a5465f1bb266aecaa049180 100644 (file)
@@ -63,6 +63,7 @@ unset CONFIG_ALPHA_T2 CONFIG_ALPHA_PYXIS CONFIG_ALPHA_POLARIS
 unset CONFIG_ALPHA_TSUNAMI CONFIG_ALPHA_MCPCIA
 unset CONFIG_ALPHA_IRONGATE
 unset CONFIG_ALPHA_BROKEN_IRQ_MASK
+unset CONFIG_ALPHA_LARGE_VMALLOC
 
 # Most of these machines have ISA slots; not exactly sure which don't,
 # and this doesn't activate hordes of code, so do it always.
@@ -207,6 +208,14 @@ then
        bool 'Symmetric multi-processing support' CONFIG_SMP
 fi
 
+# The machine must be able to support more than 8GB physical memory
+# before large vmalloc might even pretend to be an issue.
+if [ "$CONFIG_ALPHA_GENERIC" = "y" -o "$CONFIG_ALPHA_DP264" = "y" \
+       -o "$CONFIG_ALPHA_WILDFIRE" = "y" -o "$CONFIG_ALPHA_TITAN" = "y" ]
+then
+       bool 'Large VMALLOC support' CONFIG_ALPHA_LARGE_VMALLOC
+fi
+
 source drivers/pci/Config.in
 
 bool 'Support for hot-pluggable devices' CONFIG_HOTPLUG
index f7bf7b2a087579813fd5c130149d08c729bee661..7027780916375343a105665ea0dc37ce023cf073 100644 (file)
@@ -6,14 +6,14 @@
 #
 # Code maturity level options
 #
-# CONFIG_EXPERIMENTAL is not set
+CONFIG_EXPERIMENTAL=y
 
 #
 # Loadable module support
 #
 CONFIG_MODULES=y
 # CONFIG_MODVERSIONS is not set
-# CONFIG_KMOD is not set
+CONFIG_KMOD=y
 
 #
 # General setup
@@ -52,6 +52,7 @@ CONFIG_ISA=y
 CONFIG_PCI=y
 CONFIG_ALPHA_BROKEN_IRQ_MASK=y
 # CONFIG_SMP is not set
+# CONFIG_ALPHA_LARGE_VMALLOC is not set
 CONFIG_PCI_NAMES=y
 # CONFIG_HOTPLUG is not set
 # CONFIG_PCMCIA is not set
@@ -61,21 +62,26 @@ CONFIG_SYSVIPC=y
 CONFIG_SYSCTL=y
 CONFIG_KCORE_ELF=y
 # CONFIG_KCORE_AOUT is not set
-CONFIG_BINFMT_AOUT=y
+# CONFIG_BINFMT_AOUT is not set
 CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_MISC is not set
-CONFIG_BINFMT_EM86=y
+# CONFIG_BINFMT_EM86 is not set
 
 #
 # Parallel port support
 #
 # CONFIG_PARPORT is not set
 
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
 #
 # Plug and Play configuration
 #
-# CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
+CONFIG_PNP=y
+CONFIG_ISAPNP=y
 
 #
 # Block devices
@@ -84,11 +90,24 @@ CONFIG_BLK_DEV_FD=y
 # CONFIG_BLK_DEV_XD is not set
 # CONFIG_PARIDE is not set
 # CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
 # CONFIG_BLK_DEV_DAC960 is not set
-# CONFIG_BLK_DEV_LOOP is not set
+CONFIG_BLK_DEV_LOOP=m
 # CONFIG_BLK_DEV_NBD is not set
-# CONFIG_BLK_DEV_MD is not set
 # CONFIG_BLK_DEV_RAM is not set
+# CONFIG_BLK_DEV_INITRD is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+# CONFIG_BLK_DEV_MD is not set
+# CONFIG_MD_LINEAR is not set
+# CONFIG_MD_RAID0 is not set
+# CONFIG_MD_RAID1 is not set
+# CONFIG_MD_RAID5 is not set
+# CONFIG_BLK_DEV_LVM is not set
+# CONFIG_LVM_PROC_FS is not set
 
 #
 # Networking options
@@ -96,23 +115,48 @@ CONFIG_BLK_DEV_FD=y
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
 # CONFIG_NETLINK is not set
-# CONFIG_NETFILTER is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
 # CONFIG_FILTER is not set
 CONFIG_UNIX=y
 CONFIG_INET=y
-# CONFIG_IP_MULTICAST is not set
+CONFIG_IP_MULTICAST=y
 # CONFIG_IP_ADVANCED_ROUTER is not set
 # CONFIG_IP_PNP is not set
-# CONFIG_IP_ROUTER is not set
 # CONFIG_NET_IPIP is not set
 # CONFIG_NET_IPGRE is not set
-# CONFIG_IP_ALIAS is not set
+# CONFIG_IP_MROUTE is not set
+CONFIG_INET_ECN=y
 # CONFIG_SYN_COOKIES is not set
 
 #
-# (it is safe to leave these untouched)
-#
-CONFIG_SKB_LARGE=y
+#   IP: Netfilter Configuration
+#
+CONFIG_IP_NF_CONNTRACK=m
+CONFIG_IP_NF_FTP=m
+CONFIG_IP_NF_IPTABLES=m
+# CONFIG_IP_NF_MATCH_LIMIT is not set
+# CONFIG_IP_NF_MATCH_MAC is not set
+# CONFIG_IP_NF_MATCH_MARK is not set
+# CONFIG_IP_NF_MATCH_MULTIPORT is not set
+# CONFIG_IP_NF_MATCH_TOS is not set
+# CONFIG_IP_NF_MATCH_STATE is not set
+# CONFIG_IP_NF_MATCH_UNCLEAN is not set
+# CONFIG_IP_NF_MATCH_OWNER is not set
+CONFIG_IP_NF_FILTER=m
+# CONFIG_IP_NF_TARGET_REJECT is not set
+# CONFIG_IP_NF_TARGET_MIRROR is not set
+CONFIG_IP_NF_NAT=m
+CONFIG_IP_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+# CONFIG_IP_NF_TARGET_REDIRECT is not set
+# CONFIG_IP_NF_MANGLE is not set
+# CONFIG_IP_NF_TARGET_LOG is not set
+CONFIG_IP_NF_COMPAT_IPCHAINS=y
+CONFIG_IP_NF_NAT_NEEDED=y
+# CONFIG_IPV6 is not set
+# CONFIG_KHTTPD is not set
+# CONFIG_ATM is not set
 
 #
 #  
@@ -120,13 +164,92 @@ CONFIG_SKB_LARGE=y
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
 # CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_LLC is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
 
 #
 # ATA/IDE/MFM/RLL support
 #
-# CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
+CONFIG_IDE=y
+
+#
+# IDE, ATA and ATAPI Block devices
+#
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_HD_IDE is not set
 # CONFIG_BLK_DEV_HD is not set
+CONFIG_BLK_DEV_IDEDISK=y
+CONFIG_IDEDISK_MULTI_MODE=y
+# CONFIG_BLK_DEV_IDEDISK_VENDOR is not set
+# CONFIG_BLK_DEV_IDEDISK_FUJITSU is not set
+# CONFIG_BLK_DEV_IDEDISK_IBM is not set
+# CONFIG_BLK_DEV_IDEDISK_MAXTOR is not set
+# CONFIG_BLK_DEV_IDEDISK_QUANTUM is not set
+# CONFIG_BLK_DEV_IDEDISK_SEAGATE is not set
+# CONFIG_BLK_DEV_IDEDISK_WD is not set
+# CONFIG_BLK_DEV_COMMERIAL is not set
+# CONFIG_BLK_DEV_TIVO is not set
+# CONFIG_BLK_DEV_IDECS is not set
+CONFIG_BLK_DEV_IDECD=y
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+
+#
+# IDE chipset support/bugfixes
+#
+# CONFIG_BLK_DEV_CMD640 is not set
+# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
+# CONFIG_BLK_DEV_ISAPNP is not set
+# CONFIG_BLK_DEV_RZ1000 is not set
+CONFIG_BLK_DEV_IDEPCI=y
+# CONFIG_IDEPCI_SHARE_IRQ is not set
+CONFIG_BLK_DEV_IDEDMA_PCI=y
+# CONFIG_BLK_DEV_OFFBOARD is not set
+CONFIG_IDEDMA_PCI_AUTO=y
+CONFIG_BLK_DEV_IDEDMA=y
+# CONFIG_IDEDMA_PCI_WIP is not set
+# CONFIG_IDEDMA_NEW_DRIVE_LISTINGS is not set
+# CONFIG_BLK_DEV_AEC62XX is not set
+# CONFIG_AEC62XX_TUNING is not set
+CONFIG_BLK_DEV_ALI15X3=y
+# CONFIG_WDC_ALI15X3 is not set
+# CONFIG_BLK_DEV_AMD7409 is not set
+# CONFIG_AMD7409_OVERRIDE is not set
+CONFIG_BLK_DEV_CMD64X=y
+CONFIG_BLK_DEV_CY82C693=y
+# CONFIG_BLK_DEV_CS5530 is not set
+# CONFIG_BLK_DEV_HPT34X is not set
+# CONFIG_HPT34X_AUTODMA is not set
+# CONFIG_BLK_DEV_HPT366 is not set
+# CONFIG_BLK_DEV_NS87415 is not set
+# CONFIG_BLK_DEV_OPTI621 is not set
+# CONFIG_BLK_DEV_PDC202XX is not set
+# CONFIG_PDC202XX_BURST is not set
+# CONFIG_BLK_DEV_SIS5513 is not set
+# CONFIG_BLK_DEV_TRM290 is not set
+# CONFIG_BLK_DEV_VIA82CXXX is not set
+# CONFIG_IDE_CHIPSETS is not set
+CONFIG_IDEDMA_AUTO=y
+# CONFIG_IDEDMA_IVB is not set
+# CONFIG_DMA_NONPCI is not set
+CONFIG_BLK_DEV_IDE_MODES=y
 
 #
 # SCSI support
@@ -140,7 +263,7 @@ CONFIG_BLK_DEV_SD=y
 CONFIG_SD_EXTRA_DEVS=40
 # CONFIG_CHR_DEV_ST is not set
 CONFIG_BLK_DEV_SR=y
-# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_BLK_DEV_SR_VENDOR=y
 CONFIG_SR_EXTRA_DEVS=2
 # CONFIG_CHR_DEV_SG is not set
 
@@ -149,7 +272,7 @@ CONFIG_SR_EXTRA_DEVS=2
 #
 # CONFIG_SCSI_DEBUG_QUEUES is not set
 # CONFIG_SCSI_MULTI_LUN is not set
-CONFIG_SCSI_CONSTANTS=y
+# CONFIG_SCSI_CONSTANTS is not set
 # CONFIG_SCSI_LOGGING is not set
 
 #
@@ -161,13 +284,18 @@ CONFIG_SCSI_CONSTANTS=y
 # CONFIG_SCSI_AHA152X is not set
 # CONFIG_SCSI_AHA1542 is not set
 # CONFIG_SCSI_AHA1740 is not set
-# CONFIG_SCSI_AIC7XXX is not set
-# CONFIG_SCSI_IPS is not set
+CONFIG_SCSI_AIC7XXX=y
+CONFIG_AIC7XXX_TCQ_ON_BY_DEFAULT=y
+CONFIG_AIC7XXX_CMDS_PER_DEVICE=8
+CONFIG_AIC7XXX_PROC_STATS=y
+CONFIG_AIC7XXX_RESET_DELAY=5
 # CONFIG_SCSI_ADVANSYS is not set
 # CONFIG_SCSI_IN2000 is not set
 # CONFIG_SCSI_AM53C974 is not set
 # CONFIG_SCSI_MEGARAID is not set
 # CONFIG_SCSI_BUSLOGIC is not set
+# CONFIG_SCSI_CPQFCTS is not set
+# CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_DTC3280 is not set
 # CONFIG_SCSI_EATA is not set
 # CONFIG_SCSI_EATA_DMA is not set
@@ -178,24 +306,30 @@ CONFIG_SCSI_CONSTANTS=y
 # CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
 # CONFIG_SCSI_NCR53C406A is not set
-# CONFIG_SCSI_SYM53C416 is not set
-# CONFIG_SCSI_SIM710 is not set
 # CONFIG_SCSI_NCR53C7xx is not set
-# CONFIG_SCSI_NCR53C8XX is not set
-# CONFIG_SCSI_SYM53C8XX is not set
+CONFIG_SCSI_NCR53C8XX=y
+CONFIG_SCSI_SYM53C8XX=y
+CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8
+CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32
+CONFIG_SCSI_NCR53C8XX_SYNC=20
+# CONFIG_SCSI_NCR53C8XX_PROFILE is not set
+# CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set
+# CONFIG_SCSI_NCR53C8XX_PQS_PDS is not set
+# CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT is not set
 # CONFIG_SCSI_PAS16 is not set
 # CONFIG_SCSI_PCI2000 is not set
 # CONFIG_SCSI_PCI2220I is not set
 # CONFIG_SCSI_PSI240I is not set
 # CONFIG_SCSI_QLOGIC_FAS is not set
-CONFIG_SCSI_QLOGIC_ISP=y
+# CONFIG_SCSI_QLOGIC_ISP is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
-# CONFIG_SCSI_SEAGATE is not set
+# CONFIG_SCSI_SIM710 is not set
+# CONFIG_SCSI_SYM53C416 is not set
 # CONFIG_SCSI_DC390T is not set
 # CONFIG_SCSI_T128 is not set
 # CONFIG_SCSI_U14_34F is not set
-# CONFIG_SCSI_ULTRASTOR is not set
+# CONFIG_SCSI_DEBUG is not set
 
 #
 # Network device support
@@ -209,40 +343,62 @@ CONFIG_NETDEVICES=y
 CONFIG_DUMMY=m
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
 # CONFIG_NET_SB1000 is not set
 
 #
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_NET_VENDOR_3COM is not set
+CONFIG_NET_VENDOR_3COM=y
+# CONFIG_EL1 is not set
+# CONFIG_EL2 is not set
+# CONFIG_ELPLUS is not set
+# CONFIG_EL16 is not set
+# CONFIG_EL3 is not set
+# CONFIG_3C515 is not set
+CONFIG_VORTEX=y
 # CONFIG_LANCE is not set
 # CONFIG_NET_VENDOR_SMC is not set
 # CONFIG_NET_VENDOR_RACAL is not set
+# CONFIG_AT1700 is not set
 # CONFIG_DEPCA is not set
 # CONFIG_NET_ISA is not set
 CONFIG_NET_PCI=y
 # CONFIG_PCNET32 is not set
 # CONFIG_ADAPTEC_STARFIRE is not set
+# CONFIG_AC3200 is not set
 # CONFIG_APRICOT is not set
 # CONFIG_CS89x0 is not set
-CONFIG_DE4X5=y
-# CONFIG_TULIP is not set
+# CONFIG_DE4X5 is not set
+CONFIG_TULIP=y
 # CONFIG_DGRS is not set
+# CONFIG_DM9102 is not set
 # CONFIG_EEPRO100 is not set
+# CONFIG_LNE390 is not set
+# CONFIG_NATSEMI is not set
 # CONFIG_NE2K_PCI is not set
+# CONFIG_NE3210 is not set
+# CONFIG_ES3210 is not set
+# CONFIG_RTL8129 is not set
 # CONFIG_8139TOO is not set
 # CONFIG_SIS900 is not set
+# CONFIG_EPIC100 is not set
+# CONFIG_SUNDANCE is not set
 # CONFIG_TLAN is not set
 # CONFIG_VIA_RHINE is not set
+# CONFIG_WINBOND_840 is not set
 # CONFIG_NET_POCKET is not set
 
 #
 # Ethernet (1000 Mbit)
 #
 # CONFIG_ACENIC is not set
+# CONFIG_HAMACHI is not set
+CONFIG_YELLOWFIN=y
 # CONFIG_SK98LIN is not set
 # CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 
@@ -256,6 +412,8 @@ CONFIG_DE4X5=y
 #
 # CONFIG_TR is not set
 # CONFIG_NET_FC is not set
+# CONFIG_RCPCI is not set
+# CONFIG_SHAPER is not set
 
 #
 # Wan interfaces
@@ -307,19 +465,19 @@ CONFIG_PSMOUSE=y
 # Joysticks
 #
 # CONFIG_JOYSTICK is not set
+
+#
+# Input core support is needed for joysticks
+#
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
-# CONFIG_RTC is not set
-
-#
-# Video For Linux
-#
-# CONFIG_VIDEO_DEV is not set
+CONFIG_RTC=y
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
@@ -328,34 +486,38 @@ CONFIG_PSMOUSE=y
 # Ftape, the floppy tape device driver
 #
 # CONFIG_FTAPE is not set
+# CONFIG_AGP is not set
 # CONFIG_DRM is not set
-# CONFIG_DRM_TDFX is not set
 
 #
-# USB support
+# Multimedia devices
 #
-# CONFIG_USB is not set
+# CONFIG_VIDEO_DEV is not set
 
 #
 # File systems
 #
 # CONFIG_QUOTA is not set
-# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS_FS=m
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_ADFS_FS is not set
+# CONFIG_ADFS_FS_RW is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
 # CONFIG_BFS_FS is not set
-# CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
 # CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
+CONFIG_VFAT_FS=y
 # CONFIG_EFS_FS is not set
+# CONFIG_JFFS_FS is not set
 # CONFIG_CRAMFS is not set
+# CONFIG_RAMFS is not set
 CONFIG_ISO9660_FS=y
 # CONFIG_JOLIET is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_NTFS_FS is not set
+# CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
 # CONFIG_DEVFS_FS is not set
@@ -363,23 +525,40 @@ CONFIG_PROC_FS=y
 # CONFIG_DEVFS_DEBUG is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
+# CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_EXT2_FS=y
 # CONFIG_SYSV_FS is not set
+# CONFIG_SYSV_FS_WRITE is not set
 # CONFIG_UDF_FS is not set
+# CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
+# CONFIG_UFS_FS_WRITE is not set
 
 #
 # Network File Systems
 #
 # CONFIG_CODA_FS is not set
-CONFIG_NFS_FS=y
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
 # CONFIG_ROOT_NFS is not set
-# CONFIG_NFSD is not set
-CONFIG_SUNRPC=y
-CONFIG_LOCKD=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+CONFIG_SUNRPC=m
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
+# CONFIG_NCPFS_PACKET_SIGNING is not set
+# CONFIG_NCPFS_IOCTL_LOCKING is not set
+# CONFIG_NCPFS_STRONG is not set
+# CONFIG_NCPFS_NFS_NS is not set
+# CONFIG_NCPFS_OS2_NS is not set
+# CONFIG_NCPFS_SMALLDOS is not set
+# CONFIG_NCPFS_MOUNT_SUBDIR is not set
+# CONFIG_NCPFS_NDS_DOMAINS is not set
+# CONFIG_NCPFS_NLS is not set
+# CONFIG_NCPFS_EXTRAS is not set
 
 #
 # Partition Types
@@ -387,7 +566,45 @@ CONFIG_LOCKD=y
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_OSF_PARTITION=y
 CONFIG_MSDOS_PARTITION=y
-# CONFIG_NLS is not set
+CONFIG_NLS=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_UTF8 is not set
 
 #
 # Console drivers
@@ -404,8 +621,19 @@ CONFIG_VGA_CONSOLE=y
 #
 # CONFIG_SOUND is not set
 
+#
+# USB support
+#
+# CONFIG_USB is not set
+
+#
+# Input core support
+#
+# CONFIG_INPUT is not set
+
 #
 # Kernel hacking
 #
 CONFIG_MATHEMU=y
-# CONFIG_MAGIC_SYSRQ is not set
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_ALPHA_LEGACY_START_ADDRESS=y
index b6cf88e3d4f73dcdd5628dc07c73fd82b7657272..d22a6f522915491f216fc2cf9a04a9b452bfc7d4 100644 (file)
@@ -13,7 +13,7 @@ OBJS  = __divqu.o __remqu.o __divlu.o __remlu.o memset.o memcpy.o io.o \
        strchr.o strrchr.o memchr.o \
        copy_user.o clear_user.o strncpy_from_user.o strlen_user.o \
        csum_ipv6_magic.o strcasecmp.o semaphore.o fpreg.o \
-       callback_srm.o callback_init.o srm_puts.o srm_printk.o
+       callback_srm.o srm_puts.o srm_printk.o
 
 lib.a: $(OBJS)
        $(AR) rcs lib.a $(OBJS)
diff --git a/arch/alpha/lib/callback_init.c b/arch/alpha/lib/callback_init.c
deleted file mode 100644 (file)
index fe643cc..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-#include <linux/init.h>
-#include <linux/sched.h>
-
-#include <asm/page.h>
-#include <asm/hwrpb.h>
-#include <asm/console.h>
-#include <asm/pgtable.h>
-
-#include "../kernel/proto.h"
-
-extern struct hwrpb_struct *hwrpb;
-
-/* This is the SRM version.  Maybe there will be a DBM version. */
-
-int callback_init_done = 0;
-
-void *  __init callback_init(void * kernel_end)
-{
-       int i, j;
-       unsigned long vaddr = CONSOLE_REMAP_START;
-       struct crb_struct * crb;
-       pgd_t * pgd = pgd_offset_k(vaddr);
-       pmd_t * pmd;
-       unsigned long two_pte_pages;
-
-       if (!alpha_using_srm) {
-               switch_to_system_map();
-               return kernel_end;
-       }
-
-       /* Allocate some memory for the pages. */
-       two_pte_pages = ((unsigned long)kernel_end + ~PAGE_MASK) & PAGE_MASK;
-       kernel_end = (void *)(two_pte_pages + 2*PAGE_SIZE);
-       memset((void *)two_pte_pages, 0, 2*PAGE_SIZE);
-
-       /* Starting at the HWRPB, locate the CRB. */
-       crb = (struct crb_struct *)((char *)hwrpb + hwrpb->crb_offset);
-
-       /* Tell the console whither the console is to be remapped. */
-       if (srm_fixup(vaddr, (unsigned long)hwrpb))
-               __halt();               /* "We're boned."  --Bender */
-
-       /* Edit the procedure descriptors for DISPATCH and FIXUP. */
-       crb->dispatch_va = (struct procdesc_struct *)
-               (vaddr + (unsigned long)crb->dispatch_va - crb->map[0].va);
-       crb->fixup_va = (struct procdesc_struct *)
-               (vaddr + (unsigned long)crb->fixup_va - crb->map[0].va);
-
-       switch_to_system_map();
-
-       /*
-        * Set up the first and second level PTEs for console callbacks.
-        * There is an assumption here that only one of each is needed,
-        * and this allows for 8MB.  Currently (late 1999), big consoles
-        * are still under 4MB.
-        */
-       pgd_set(pgd, (pmd_t *)two_pte_pages);
-       pmd = pmd_offset(pgd, vaddr);
-       pmd_set(pmd, (pte_t *)(two_pte_pages + PAGE_SIZE));
-
-       /*
-        * Set up the third level PTEs and update the virtual addresses
-        * of the CRB entries.
-        */
-       for (i = 0; i < crb->map_entries; ++i) {
-               unsigned long paddr = crb->map[i].pa;
-               crb->map[i].va = vaddr;
-               for (j = 0; j < crb->map[i].count; ++j) {
-                       set_pte(pte_offset(pmd, vaddr),
-                               mk_pte_phys(paddr, PAGE_KERNEL));
-                       paddr += PAGE_SIZE;
-                       vaddr += PAGE_SIZE;
-               }
-       }
-
-       callback_init_done = 1;
-       return kernel_end;
-}
-
index c81a12d1821713e5713e8fc4ae617efb05406c7e..a5140ce1cb78a1715f909dc7679ecc751209e0d6 100644 (file)
@@ -108,6 +108,11 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
        if (!mm || in_interrupt())
                goto no_context;
 
+#ifdef CONFIG_ALPHA_LARGE_VMALLOC
+       if (address >= TASK_SIZE)
+               goto vmalloc_fault;
+#endif
+
        down(&mm->mmap_sem);
        vma = find_vma(mm, address);
        if (!vma)
@@ -204,4 +209,25 @@ do_sigbus:
        if (!user_mode(regs))
                goto no_context;
        return;
+
+#ifdef CONFIG_ALPHA_LARGE_VMALLOC
+vmalloc_fault:
+       if (user_mode(regs)) {
+               force_sig(SIGSEGV, current);
+               return;
+       } else {
+               /* Synchronize this task's top level page-table
+                  with the "reference" page table from init.  */
+               long offset = __pgd_offset(address);
+               pgd_t *pgd, *pgd_k;
+
+               pgd = current->active_mm->pgd + offset;
+               pgd_k = swapper_pg_dir + offset;
+               if (!pgd_present(*pgd) && pgd_present(*pgd_k)) {
+                       pgd_val(*pgd) = pgd_val(*pgd_k);
+                       return;
+               }
+               goto no_context;
+       }
+#endif
 }
index 2ab7941b29b4bdaaf93f27435d235d88b2600b3a..52e2b36f715defd3fd6568d39c55bd8ce7de8b01 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/swap.h>
 #include <linux/init.h>
 #include <linux/bootmem.h> /* max_low_pfn */
+#include <linux/vmalloc.h>
 #ifdef CONFIG_BLK_DEV_INITRD
 #include <linux/blk.h>
 #endif
@@ -30,6 +31,7 @@
 #include <asm/hwrpb.h>
 #include <asm/dma.h>
 #include <asm/mmu_context.h>
+#include <asm/console.h>
 
 static unsigned long totalram_pages;
 
@@ -55,6 +57,29 @@ __bad_pte(pmd_t *pmd)
        pmd_set(pmd, (pte_t *) BAD_PAGETABLE);
 }
 
+pgd_t *
+get_pgd_slow(void)
+{
+       pgd_t *ret, *init;
+
+       ret = (pgd_t *)__get_free_page(GFP_KERNEL);
+       init = pgd_offset(&init_mm, 0UL);
+       if (ret) {
+               clear_page(ret);
+#ifdef CONFIG_ALPHA_LARGE_VMALLOC
+               memcpy (ret + USER_PTRS_PER_PGD, init + USER_PTRS_PER_PGD,
+                       (PTRS_PER_PGD - USER_PTRS_PER_PGD - 1)*sizeof(pgd_t));
+#else
+               pgd_val(ret[PTRS_PER_PGD-2]) = pgd_val(init[PTRS_PER_PGD-2]);
+#endif
+
+               /* The last PGD entry is the VPTB self-map.  */
+               pgd_val(ret[PTRS_PER_PGD-1])
+                 = pte_val(mk_pte(virt_to_page(ret), PAGE_KERNEL));
+       }
+       return ret;
+}
+
 pmd_t *
 get_pmd_slow(pgd_t *pgd, unsigned long offset)
 {
@@ -182,8 +207,9 @@ load_PCB(struct thread_struct * pcb)
        return __reload_thread(pcb);
 }
 
-/* switch_to_system_map() sets up some necessary page tables. */
-void
+/* Set up initial PCB, VPTB, and other such nicities.  */
+
+static inline void
 switch_to_system_map(void)
 {
        unsigned long newptbr;
@@ -225,6 +251,84 @@ switch_to_system_map(void)
        original_pcb = *(struct thread_struct *) original_pcb_ptr;
 }
 
+int callback_init_done;
+
+void * __init
+callback_init(void * kernel_end)
+{
+       struct crb_struct * crb;
+       pgd_t *pgd;
+       pmd_t *pmd;
+       void *two_pages;
+
+       /* Starting at the HWRPB, locate the CRB. */
+       crb = (struct crb_struct *)((char *)hwrpb + hwrpb->crb_offset);
+
+       if (alpha_using_srm) {
+               /* Tell the console whither it is to be remapped. */
+               if (srm_fixup(VMALLOC_START, (unsigned long)hwrpb))
+                       __halt();               /* "We're boned."  --Bender */
+
+               /* Edit the procedure descriptors for DISPATCH and FIXUP. */
+               crb->dispatch_va = (struct procdesc_struct *)
+                       (VMALLOC_START + (unsigned long)crb->dispatch_va
+                        - crb->map[0].va);
+               crb->fixup_va = (struct procdesc_struct *)
+                       (VMALLOC_START + (unsigned long)crb->fixup_va
+                        - crb->map[0].va);
+       }
+
+       switch_to_system_map();
+
+       /* Allocate one PGD and one PMD.  In the case of SRM, we'll need
+          these to actually remap the console.  There is an assumption
+          here that only one of each is needed, and this allows for 8MB.
+          Currently (late 1999), big consoles are still under 4MB.
+
+          In the case of not SRM, but not CONFIG_ALPHA_LARGE_VMALLOC,
+          we need to allocate the PGD we use for vmalloc before we start
+          forking other tasks.  */
+
+       two_pages = (void *)
+         (((unsigned long)kernel_end + ~PAGE_MASK) & PAGE_MASK);
+       kernel_end = two_pages + 2*PAGE_SIZE;
+       memset(two_pages, 0, 2*PAGE_SIZE);
+
+       pgd = pgd_offset_k(VMALLOC_START);
+       pgd_set(pgd, (pmd_t *)two_pages);
+       pmd = pmd_offset(pgd, VMALLOC_START);
+       pmd_set(pmd, (pte_t *)(two_pages + PAGE_SIZE));
+
+       if (alpha_using_srm) {
+               static struct vm_struct console_remap_vm;
+               unsigned long vaddr = VMALLOC_START;
+               long i, j;
+
+               /* Set up the third level PTEs and update the virtual
+                  addresses of the CRB entries.  */
+               for (i = 0; i < crb->map_entries; ++i) {
+                       unsigned long paddr = crb->map[i].pa;
+                       crb->map[i].va = vaddr;
+                       for (j = 0; j < crb->map[i].count; ++j) {
+                               set_pte(pte_offset(pmd, vaddr),
+                                       mk_pte_phys(paddr, PAGE_KERNEL));
+                               paddr += PAGE_SIZE;
+                               vaddr += PAGE_SIZE;
+                       }
+               }
+
+               /* Let vmalloc know that we've allocated some space.  */
+               console_remap_vm.flags = VM_ALLOC;
+               console_remap_vm.addr = VMALLOC_START;
+               console_remap_vm.size = vaddr - VMALLOC_START;
+               vmlist = &console_remap_vm;
+       }
+
+       callback_init_done = 1;
+       return kernel_end;
+}
+
+
 /*
  * paging_init() sets up the memory map.
  */
index 8dc0eaf19f25a638a6f65d7421272c4c099224e4..ea833c58d18d5cf144f57a0e597e2280c2717d1b 100644 (file)
@@ -383,27 +383,27 @@ static inline void reserve_node_zero(unsigned int bootmap_pfn, unsigned int boot
         * Register the kernel text and data with bootmem.
         * Note that this can only be in node 0.
         */
-       reserve_bootmem_node(0, __pa(&_stext), &_end - &_stext);
+       reserve_bootmem_node(NODE_DATA(0), __pa(&_stext), &_end - &_stext);
 
 #ifdef CONFIG_CPU_32
        /*
         * Reserve the page tables.  These are already in use,
         * and can only be in node 0.
         */
-       reserve_bootmem_node(0, __pa(swapper_pg_dir),
+       reserve_bootmem_node(NODE_DATA(0), __pa(swapper_pg_dir),
                             PTRS_PER_PGD * sizeof(void *));
 #else
        /*
         * Stop this memory from being grabbed - its special DMA
         * memory that is required for the screen.
         */
-       reserve_bootmem_node(0, 0x02000000, 0x00080000);
+       reserve_bootmem_node(NODE_DATA(0), 0x02000000, 0x00080000);
 #endif
        /*
         * And don't forget to reserve the allocator bitmap,
         * which will be freed later.
         */
-       reserve_bootmem_node(0, bootmap_pfn << PAGE_SHIFT,
+       reserve_bootmem_node(NODE_DATA(0), bootmap_pfn << PAGE_SHIFT,
                             bootmap_pages << PAGE_SHIFT);
 }
 
@@ -416,7 +416,7 @@ static inline void free_bootmem_node_bank(int node, struct meminfo *mi)
 
        for (bank = 0; bank < mi->nr_banks; bank++)
                if (mi->bank[bank].node == node)
-                       free_bootmem_node(node, mi->bank[bank].start,
+                       free_bootmem_node(NODE_DATA(node), mi->bank[bank].start,
                                          mi->bank[bank].size);
 }
 
@@ -450,7 +450,7 @@ void __init bootmem_init(struct meminfo *mi)
                /*
                 * Initialise the bootmem allocator.
                 */
-               init_bootmem_node(node, map_pg, np->start, np->end);
+               init_bootmem_node(NODE_DATA(node), map_pg, np->start, np->end);
                free_bootmem_node_bank(node, mi);
                map_pg += np->bootmap_pages;
 
@@ -465,7 +465,7 @@ void __init bootmem_init(struct meminfo *mi)
 
 #ifdef CONFIG_BLK_DEV_INITRD
        if (initrd_node >= 0)
-               reserve_bootmem_node(initrd_node, __pa(initrd_start),
+               reserve_bootmem_node(NODE_DATA(initrd_node), __pa(initrd_start),
                                     initrd_end - initrd_start);
 #endif
 
@@ -583,7 +583,7 @@ void __init mem_init(void)
 
        /* this will put all unused low memory onto the freelists */
        for (node = 0; node < numnodes; node++)
-               totalram_pages += free_all_bootmem_node(node);
+               totalram_pages += free_all_bootmem_node(NODE_DATA(node));
 
        /*
         * Since our memory may not be contiguous, calculate the
index 9ddcc84bcb6baafde6bce8da201393e8dfc54e20..2ace55d47795767349137cd8ac90c18ac312f04c 100644 (file)
@@ -438,7 +438,7 @@ static inline void free_memmap(int node, unsigned long start, unsigned long end)
        start = __virt_to_phys(pg);
        end   = __virt_to_phys(pgend);
 
-       free_bootmem_node(node, start, end - start);
+       free_bootmem_node(NODE_DATA(node), start, end - start);
 }
 
 static inline void free_unused_memmap_node(int node, struct meminfo *mi)
index 6d1279ed7139adcab61d27f8dda28b0ece7c3e8b..327aa736db134d66294aed94bced7d623cfcb397 100644 (file)
@@ -45,7 +45,7 @@ choice 'Processor family' \
 #
 if [ "$CONFIG_M386" = "y" ]; then
    define_bool CONFIG_X86_CMPXCHG n
-   define_int  CONFIG_X86_L1_CACHE_BYTES 16
+   define_int  CONFIG_X86_L1_CACHE_SHIFT 4
 else
    define_bool CONFIG_X86_WP_WORKS_OK y
    define_bool CONFIG_X86_INVLPG y
@@ -54,37 +54,37 @@ else
    define_bool CONFIG_X86_POPAD_OK y
 fi
 if [ "$CONFIG_M486" = "y" ]; then
-   define_int  CONFIG_X86_L1_CACHE_BYTES 16
+   define_int  CONFIG_X86_L1_CACHE_SHIFT 4
    define_bool CONFIG_X86_USE_STRING_486 y
    define_bool CONFIG_X86_ALIGNMENT_16 y
 fi
 if [ "$CONFIG_M586" = "y" ]; then
-   define_int  CONFIG_X86_L1_CACHE_BYTES 32
+   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
    define_bool CONFIG_X86_USE_STRING_486 y
    define_bool CONFIG_X86_ALIGNMENT_16 y
 fi
 if [ "$CONFIG_M586TSC" = "y" ]; then
-   define_int  CONFIG_X86_L1_CACHE_BYTES 32
+   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
    define_bool CONFIG_X86_USE_STRING_486 y
    define_bool CONFIG_X86_ALIGNMENT_16 y
    define_bool CONFIG_X86_TSC y
 fi
 if [ "$CONFIG_M586MMX" = "y" ]; then
-   define_int  CONFIG_X86_L1_CACHE_BYTES 32
+   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
    define_bool CONFIG_X86_USE_STRING_486 y
    define_bool CONFIG_X86_ALIGNMENT_16 y
    define_bool CONFIG_X86_TSC y
    define_bool CONFIG_X86_GOOD_APIC y
 fi
 if [ "$CONFIG_M686" = "y" ]; then
-   define_int  CONFIG_X86_L1_CACHE_BYTES 32
+   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
    define_bool CONFIG_X86_TSC y
    define_bool CONFIG_X86_GOOD_APIC y
    define_bool CONFIG_X86_PGE y
    define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
 fi
 if [ "$CONFIG_M686FXSR" = "y" ]; then
-   define_int  CONFIG_X86_L1_CACHE_BYTES 32
+   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
    define_bool CONFIG_X86_TSC y
    define_bool CONFIG_X86_GOOD_APIC y
    define_bool CONFIG_X86_PGE y
@@ -93,13 +93,13 @@ if [ "$CONFIG_M686FXSR" = "y" ]; then
    define_bool CONFIG_X86_XMM y
 fi
 if [ "$CONFIG_MK6" = "y" ]; then
-   define_int  CONFIG_X86_L1_CACHE_BYTES 32
+   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
    define_bool CONFIG_X86_ALIGNMENT_16 y
    define_bool CONFIG_X86_TSC y
    define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
 fi
 if [ "$CONFIG_MK7" = "y" ]; then
-   define_int  CONFIG_X86_L1_CACHE_BYTES 64
+   define_int  CONFIG_X86_L1_CACHE_SHIFT 6
    define_bool CONFIG_X86_TSC y
    define_bool CONFIG_X86_GOOD_APIC y
    define_bool CONFIG_X86_USE_3DNOW y
@@ -107,22 +107,22 @@ if [ "$CONFIG_MK7" = "y" ]; then
    define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
 fi
 if [ "$CONFIG_MCRUSOE" = "y" ]; then
-   define_int  CONFIG_X86_L1_CACHE_BYTES 32
+   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
    define_bool CONFIG_X86_TSC y
 fi
 if [ "$CONFIG_MWINCHIPC6" = "y" ]; then
-   define_int  CONFIG_X86_L1_CACHE_BYTES 32
+   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
    define_bool CONFIG_X86_ALIGNMENT_16 y
    define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
 fi
 if [ "$CONFIG_MWINCHIP2" = "y" ]; then
-   define_int  CONFIG_X86_L1_CACHE_BYTES 32
+   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
    define_bool CONFIG_X86_ALIGNMENT_16 y
    define_bool CONFIG_X86_TSC y
    define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
 fi
 if [ "$CONFIG_MWINCHIP3D" = "y" ]; then
-   define_int  CONFIG_X86_L1_CACHE_BYTES 32
+   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
    define_bool CONFIG_X86_ALIGNMENT_16 y
    define_bool CONFIG_X86_TSC y
    define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
index 7dddf30572ab86366b5d9475854ba550cd02796a..3bba4b372a97dd0ae46f74356824b059bd9cbb41 100644 (file)
@@ -39,7 +39,7 @@ CONFIG_X86_INVLPG=y
 CONFIG_X86_CMPXCHG=y
 CONFIG_X86_BSWAP=y
 CONFIG_X86_POPAD_OK=y
-CONFIG_X86_L1_CACHE_BYTES=32
+CONFIG_X86_L1_CACHE_SHIFT=5
 CONFIG_X86_TSC=y
 CONFIG_X86_GOOD_APIC=y
 CONFIG_X86_PGE=y
@@ -231,6 +231,7 @@ CONFIG_IDEPCI_SHARE_IRQ=y
 # CONFIG_BLK_DEV_PDC202XX is not set
 # CONFIG_PDC202XX_BURST is not set
 # CONFIG_BLK_DEV_SIS5513 is not set
+# CONFIG_BLK_DEV_SLC90E66 is not set
 # CONFIG_BLK_DEV_TRM290 is not set
 # CONFIG_BLK_DEV_VIA82CXXX is not set
 # CONFIG_IDE_CHIPSETS is not set
index 0fecf5851eae28610c23d445467ee5fabb9acc15..ee6966d5f599fd7b5740057e0d6f83bdbe00c8b9 100644 (file)
@@ -8,7 +8,7 @@
 #include <asm/processor.h> 
 #include <asm/msr.h>
 
-static int banks = 0;
+static int banks;
 
 void mcheck_fault(void)
 {
@@ -71,7 +71,7 @@ void mcheck_init(void)
        u32 l, h;
        int i;
        struct cpuinfo_x86 *c;
-       static int done=0;
+       static int done;
 
        c=cpu_data+smp_processor_id();
        
index 67f1f244598be7900eb20f775f06119e76ccb7e7..4ae0ed2ee4bb9670a978bbb772fb416b3d1e404b 100644 (file)
@@ -205,7 +205,7 @@ ENTRY(system_call)
 ENTRY(ret_from_sys_call)
 #ifdef CONFIG_SMP
        movl processor(%ebx),%eax
-       shll $5,%eax
+       shll $CONFIG_X86_L1_CACHE_SHIFT,%eax
        movl SYMBOL_NAME(irq_stat)(,%eax),%ecx          # softirq_active
        testl SYMBOL_NAME(irq_stat)+4(,%eax),%ecx       # softirq_mask
 #else
@@ -261,7 +261,7 @@ ret_from_exception:
 #ifdef CONFIG_SMP
        GET_CURRENT(%ebx)
        movl processor(%ebx),%eax
-       shll $5,%eax
+       shll $CONFIG_X86_L1_CACHE_SHIFT,%eax
        movl SYMBOL_NAME(irq_stat)(,%eax),%ecx          # softirq_active
        testl SYMBOL_NAME(irq_stat)+4(,%eax),%ecx       # softirq_mask
 #else
index 46e270774fe4d16a56bf48a3aa7155c3d859f99b..df377c5b4f55157bc9dd93c4dc41fc6a3ed0f641 100644 (file)
@@ -178,7 +178,7 @@ static unsigned int cached_irq_mask = 0xffff;
  * this 'mixed mode' IRQ handling costs nothing because it's only used
  * at IRQ setup time.
  */
-unsigned long io_apic_irqs = 0;
+unsigned long io_apic_irqs;
 
 void disable_8259A_irq(unsigned int irq)
 {
@@ -312,7 +312,7 @@ spurious_8259A_irq:
                goto handle_real_irq;
 
        {
-               static int spurious_irq_mask = 0;
+               static int spurious_irq_mask;
                /*
                 * At this point we can be sure the IRQ is spurious,
                 * lets ACK and report it. [once per IRQ]
index abe198315796b8ea09dec9a4ac3caeba8c22ee67..045374d503db6b1bb6e204ef3811596a819bf21c 100644 (file)
@@ -1581,7 +1581,7 @@ static struct proc_dir_entry *proc_root_mtrr;
 
 #  endif  /*  CONFIG_PROC_FS  */
 
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
 
 static void compute_ascii (void)
 {
index bd4adf92c4ca1c9dc55b44a093c076257d97d7c1..9059adcbcb4a12f5f80295d571066c761d1e1936 100644 (file)
@@ -1548,7 +1548,6 @@ void __init identify_cpu(struct cpuinfo_x86 *c)
 
                        /* Pentium IV. */
                        if (c->x86 == 15) {
-                               c->x86 = 6;
                                get_model_name(c);
                                goto name_decoded;
                        }
index 6ce9eb61e818f4dfdede74927d5fec54f31b1814..f39e42522fd6739f1f55cfc251c48971c813495f 100644 (file)
@@ -422,7 +422,7 @@ struct call_data_struct {
        int wait;
 };
 
-static struct call_data_struct * call_data = NULL;
+static struct call_data_struct * call_data;
 
 /*
  * this function sends a 'generic call function' IPI to all other CPUs
index 3a9df08e7564fd4e0212470d0603b7b65f6b945b..12ba21b926a7cd4373e107b669dee46431448c76 100644 (file)
@@ -76,7 +76,7 @@ static unsigned long last_tsc_low; /* lsb 32 bits of Time Stamp Counter */
  * Equal to 2^32 * (1 / (clocks per usec) ).
  * Initialized in time_init.
  */
-unsigned long fast_gettimeoffset_quotient=0;
+unsigned long fast_gettimeoffset_quotient;
 
 extern rwlock_t xtime_lock;
 extern unsigned long wall_jiffies;
@@ -373,9 +373,9 @@ static int set_rtc_mmss(unsigned long nowtime)
 }
 
 /* last time the cmos clock got updated */
-static long last_rtc_update = 0;
+static long last_rtc_update;
 
-int timer_ack = 0;
+int timer_ack;
 
 /*
  * timer_interrupt() needs to keep up the real-time clock,
@@ -449,7 +449,7 @@ static inline void do_timer_interrupt(int irq, void *dev_id, struct pt_regs *reg
 #endif
 }
 
-static int use_tsc = 0;
+static int use_tsc;
 
 /*
  * This is the same as the above, except we _also_ save the current
index 918849c8cfeba958b79abbf5ec92f6dbf1587040..946d1f40ae1aa75d265a2cfbc77a32e64cdeb566 100644 (file)
@@ -77,31 +77,6 @@ bad_area:
        return 0;
 }
 
-static void __init handle_wp_test (void)
-{
-       const unsigned long vaddr = PAGE_OFFSET;
-       pgd_t *pgd;
-       pmd_t *pmd;
-       pte_t *pte;
-
-       /*
-        * make it read/writable temporarily, so that the fault
-        * can be handled.
-        */
-       pgd = swapper_pg_dir + __pgd_offset(vaddr);
-       pmd = pmd_offset(pgd, vaddr);
-       pte = pte_offset(pmd, vaddr);
-       *pte = mk_pte_phys(0, PAGE_KERNEL);
-       __flush_tlb_all();
-
-       boot_cpu_data.wp_works_ok = 1;
-       /*
-        * Beware: Black magic here. The printk is needed here to flush
-        * CPU state on certain buggy processors.
-        */
-       printk("Ok");
-}
-
 asmlinkage void do_invalid_op(struct pt_regs *, unsigned long);
 extern unsigned long idt;
 
@@ -274,14 +249,7 @@ no_context:
 /*
  * Oops. The kernel tried to access some bad page. We'll have to
  * terminate things with extreme prejudice.
- *
- * First we check if it was the bootup rw-test, though..
  */
-       if (boot_cpu_data.wp_works_ok < 0 &&
-                       address == PAGE_OFFSET && (error_code & 1)) {
-               handle_wp_test();
-               return;
-       }
 
        if (address < PAGE_SIZE)
                printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference");
index 9ba2baa3178728e2650d2c9d26025d47b3b8c4b0..4b3cc4dfc3b621d33762b30083406e47248cabaa 100644 (file)
@@ -37,8 +37,8 @@
 #include <asm/apic.h>
 
 unsigned long highstart_pfn, highend_pfn;
-static unsigned long totalram_pages = 0;
-static unsigned long totalhigh_pages = 0;
+static unsigned long totalram_pages;
+static unsigned long totalhigh_pages;
 
 /*
  * BAD_PAGE is the page that is used for page faults when linux
@@ -491,16 +491,42 @@ void __init paging_init(void)
  * before and after the test are here to work-around some nasty CPU bugs.
  */
 
+/*
+ * This function cannot be __init, since exceptions don't work in that
+ * section.
+ */
+static int do_test_wp_bit(unsigned long vaddr)
+{
+       char tmp_reg;
+       int flag;
+
+       __asm__ __volatile__(
+               "       movb %0,%1      \n"
+               "1:     movb %1,%0      \n"
+               "       xorl %2,%2      \n"
+               "2:                     \n"
+               ".section __ex_table,\"a\"\n"
+               "       .align 4        \n"
+               "       .long 1b,2b     \n"
+               ".previous              \n"
+               :"=m" (*(char *) vaddr),
+                "=q" (tmp_reg),
+                "=r" (flag)
+               :"2" (1)
+               :"memory");
+       
+       return flag;
+}
+
 void __init test_wp_bit(void)
 {
 /*
- * Ok, all PAE-capable CPUs are definitely handling the WP bit right.
+ * Ok, all PSE-capable CPUs are definitely handling the WP bit right.
  */
        const unsigned long vaddr = PAGE_OFFSET;
        pgd_t *pgd;
        pmd_t *pmd;
        pte_t *pte, old_pte;
-       char tmp_reg;
 
        printk("Checking if this processor honours the WP bit even in supervisor mode... ");
 
@@ -511,27 +537,19 @@ void __init test_wp_bit(void)
        *pte = mk_pte_phys(0, PAGE_READONLY);
        local_flush_tlb();
 
-       __asm__ __volatile__(
-               "jmp 1f; 1:\n"
-               "movb %0,%1\n"
-               "movb %1,%0\n"
-               "jmp 1f; 1:\n"
-               :"=m" (*(char *) vaddr),
-                "=q" (tmp_reg)
-               :/* no inputs */
-               :"memory");
+       boot_cpu_data.wp_works_ok = do_test_wp_bit(vaddr);
 
        *pte = old_pte;
        local_flush_tlb();
 
-       if (boot_cpu_data.wp_works_ok < 0) {
-               boot_cpu_data.wp_works_ok = 0;
+       if (!boot_cpu_data.wp_works_ok) {
                printk("No.\n");
 #ifdef CONFIG_X86_WP_WORKS_OK
                panic("This kernel doesn't support CPU's with broken WP. Recompile it for a 386!");
 #endif
-       } else
-               printk(".\n");
+       } else {
+               printk("Ok.\n");
+       }
 }
 
 static inline int page_is_ram (unsigned long pagenr)
index 9b686100a4ead21240b4e02d2c24b1ba9181b1ee..e9fee546e080818bfa27282807721b9a4f0b78aa 100644 (file)
@@ -1,7 +1,6 @@
 #include <linux/config.h>
 #include <linux/module.h>
 #include <linux/types.h>
-#include <linux/zorro.h>
 #include <asm/ptrace.h>
 #include <asm/amigahw.h>
 #include <asm/amigaints.h>
index 43df3f6c2278e9fa93187a3e99c334f2af9f187f..b7f9f0508c7f6608e3d39d56dd5aea8c8c332bd4 100644 (file)
@@ -8,7 +8,7 @@
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
-#include <linux/zorro.h>
+#include <linux/ioport.h>
 #include <asm/amigahw.h>
 
 struct chip_desc {
index d7cc137a9482e491466be1518746a071dcda047f..528f206ff27558118af8ddbdc5214065316de113 100644 (file)
@@ -20,7 +20,9 @@
 #include <linux/tty.h>
 #include <linux/console.h>
 #include <linux/init.h>
+#ifdef CONFIG_ZORRO
 #include <linux/zorro.h>
+#endif
 
 #include <asm/bootinfo.h>
 #include <asm/setup.h>
@@ -161,6 +163,7 @@ int amiga_parse_bootinfo(const struct bi_record *record)
            break;
 
        case BI_AMIGA_AUTOCON:
+#ifdef CONFIG_ZORRO
            if (zorro_num_autocon < ZORRO_NUM_AUTO) {
                const struct ConfigDev *cd = (struct ConfigDev *)data;
                struct zorro_dev *dev = &zorro_autocon[zorro_num_autocon++];
@@ -171,6 +174,7 @@ int amiga_parse_bootinfo(const struct bi_record *record)
                dev->resource.end = dev->resource.start+cd->cd_BoardSize-1;
            } else
                printk("amiga_parse_bootinfo: too many AutoConfig devices\n");
+#endif
            break;
 
        case BI_AMIGA_SERPER:
@@ -997,11 +1001,13 @@ static int amiga_get_hardware_list(char *buffer)
     AMIGAHW_ANNOUNCE(ALICE_NTSC, "NTSC Alice 8374");
     AMIGAHW_ANNOUNCE(MAGIC_REKICK, "Magic Hard Rekick");
     AMIGAHW_ANNOUNCE(PCMCIA, "PCMCIA Slot");
+#ifdef CONFIG_ZORRO
     if (AMIGAHW_PRESENT(ZORRO))
        len += sprintf(buffer+len, "\tZorro II%s AutoConfig: %d Expansion "
                                   "Device%s\n",
                       AMIGAHW_PRESENT(ZORRO3) ? "I" : "",
                       zorro_num_autocon, zorro_num_autocon == 1 ? "" : "s");
+#endif
 
 #undef AMIGAHW_ANNOUNCE
 
index 83381857faa141a669d8bd5635bc800d85fc2cf1..b06fdb516d019c156a8b08f2707715575c828d31 100644 (file)
@@ -139,9 +139,8 @@ if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
    fi
 fi
 
-if [ "$CONFIG_PCI" = "y" ]; then
-  source drivers/pci/Config.in
-fi
+source drivers/pci/Config.in
+source drivers/zorro/Config.in
 
 endmenu
 
index 015aabfe188bb4f63df40346b4dd3b4739fd2f29..a2e3f47f1a3ec91215d38cf2b9e0107f1977096a 100644 (file)
@@ -365,7 +365,7 @@ void __init setup_arch(char **cmdline_p)
                high_memory += m68k_memory[i].size;
        }
 
-       availmem += init_bootmem_node(0, availmem >> PAGE_SHIFT,
+       availmem += init_bootmem_node(NODE_DATA(0), availmem >> PAGE_SHIFT,
                                      startmem >> PAGE_SHIFT, endmem >> PAGE_SHIFT);
 
        for (i = 0; i < m68k_num_memory; i++)
index c1154b6aa1c121a6b79f33dadb84991719126f73..a0486cf953248c6e9656f2c008758bf4046a494e 100644 (file)
@@ -127,7 +127,6 @@ void mac_waitbut (void)
 }
 #endif
 
-extern struct consw fb_con;
 extern struct fb_info *mac_fb_init(long *);
 
 extern void mac_default_handler(int, void *, struct pt_regs *);
index 612d51edaef5067857e7b530e6064935f552fd49..dbb3d81e2e30e1a924b8dd26de364b39bc4ca53e 100644 (file)
@@ -32,7 +32,7 @@
 #include <asm/atari_stram.h>
 #endif
 
-static unsigned long totalram_pages = 0;
+static unsigned long totalram_pages;
 
 #ifdef CONFIG_SUN3
 void mmu_emu_reserve_pages(unsigned long max_page);
index 84ef4ce9a25ea2b04d010da9036ba9c9dddd05d2..38f598d70c1562ee89924a1d4f848d0b62ed6ada 100644 (file)
@@ -39,7 +39,7 @@ extern rwlock_t xtime_lock;
 
 /* Cycle counter value at the previous timer interrupt.. */
 
-static unsigned int timerhi = 0, timerlo = 0;
+static unsigned int timerhi, timerlo;
 
 /*
  * On MIPS only R4000 and better have a cycle counter.
@@ -269,7 +269,7 @@ static int set_rtc_mmss(unsigned long nowtime)
 }
 
 /* last time the cmos clock got updated */
-static long last_rtc_update = 0;
+static long last_rtc_update;
 
 /*
  * timer_interrupt() needs to keep up the real-time clock,
index 4f80173f8d252e8bfdaf92d0de02e06654694b67..af4af4fc392962a4993daf4d49578a7223c32ad5 100644 (file)
@@ -26,7 +26,7 @@
 #include <linux/timex.h>
 
 extern volatile unsigned long wall_jiffies;
-unsigned long r4k_interval = 0;
+unsigned long r4k_interval;
 extern rwlock_t xtime_lock;
 
 /*
@@ -40,7 +40,7 @@ extern rwlock_t xtime_lock;
 
 /* Cycle counter value at the previous timer interrupt.. */
 
-static unsigned int timerhi = 0, timerlo = 0;
+static unsigned int timerhi, timerlo;
 
 /*
  * On MIPS only R4000 and better have a cycle counter.
@@ -53,14 +53,14 @@ static unsigned long do_fast_gettimeoffset(void)
        unsigned long res, tmp;
 
        /* Last jiffy when do_fast_gettimeoffset() was called. */
-       static unsigned long last_jiffies=0;
+       static unsigned long last_jiffies;
        unsigned long quotient;
 
        /*
         * Cached "1/(clocks per usec)*2^32" value.
         * It has to be recalculated once each jiffy.
         */
-       static unsigned long cached_quotient=0;
+       static unsigned long cached_quotient;
 
        tmp = jiffies;
 
@@ -154,7 +154,7 @@ static unsigned long do_slow_gettimeoffset(void)
        int count;
 
        static int count_p = LATCH;    /* for the first call after boot */
-       static unsigned long jiffies_p = 0;
+       static unsigned long jiffies_p;
 
        /*
         * cache volatile jiffies temporarily; we have IRQs turned off. 
@@ -330,7 +330,7 @@ static int set_rtc_mmss(unsigned long nowtime)
 }
 
 /* last time the cmos clock got updated */
-static long last_rtc_update = 0;
+static long last_rtc_update;
 
 /*
  * timer_interrupt() needs to keep up the real-time clock,
@@ -340,7 +340,7 @@ static void inline
 timer_interrupt(int irq, void *dev_id, struct pt_regs * regs)
 {
 #ifdef CONFIG_DDB5074
-       static unsigned cnt = 0, period = 0, dist = 0;
+       static unsigned cnt, period, dist;
 
        if (cnt == 0 || cnt == dist)
            ddb5074_led_d2(1);
index a6f448e05c881eb49cdedd2c17de9534935fd5eb..289dcd041075500d0f3dc8b67bcef405142bca95 100644 (file)
@@ -39,7 +39,7 @@
 #endif
 #include <asm/mmu_context.h>
 
-static unsigned long totalram_pages = 0;
+static unsigned long totalram_pages;
 
 extern void prom_fixup_mem_map(unsigned long start, unsigned long end);
 extern void prom_free_prom_memory(void);
index ba3204c598421d5c92d744c4e3be7cd5595ff61f..46a4d027015a5519256a6b8ddfd3ebc51b724ca0 100644 (file)
@@ -79,8 +79,8 @@ static int set_rtc_mmss(unsigned long nowtime)
        return retval;
 }
 
-static long last_rtc_update = 0;
-unsigned long missed_heart_beats = 0;
+static long last_rtc_update;
+unsigned long missed_heart_beats;
 
 void indy_timer_interrupt(struct pt_regs *regs)
 {
index c36337564df0679a3c78f34631b4b477e03b788a..2e09096945d4b3cdbbcda5c86400db15780b6710 100644 (file)
@@ -54,7 +54,7 @@ static void sendintr(int destid, unsigned char status)
 
 /* The 'big kernel lock' */
 spinlock_t kernel_flag = SPIN_LOCK_UNLOCKED;
-int smp_threads_ready = 0;     /* Not used */
+int smp_threads_ready; /* Not used */
 atomic_t smp_commenced = ATOMIC_INIT(0);
 struct cpuinfo_mips cpu_data[NR_CPUS];
 int smp_num_cpus;              /* Number that came online.  */
@@ -130,7 +130,7 @@ static volatile struct call_data_struct {
        atomic_t started;
        atomic_t finished;
        int wait;
-} *call_data = NULL;
+} *call_data;
 
 int smp_call_function (void (*func) (void *info), void *info, int retry, 
                                                                int wait)
index f1d95c702e181a0481448623cb6e586667de508a..a594c69a056adfc4d45ac525e559087e5434fd18 100644 (file)
@@ -38,7 +38,7 @@
 #endif
 #include <asm/mmu_context.h>
 
-unsigned long totalram_pages = 0;
+unsigned long totalram_pages;
 
 void __bad_pte_kernel(pmd_t *pmd)
 {
index e4bf2b201049913aa7771967a58cf4c9339afeb9..18f80682594a884f6ec468a56727bf10230e3ede 100644 (file)
@@ -79,8 +79,8 @@ static int set_rtc_mmss(unsigned long nowtime)
        return retval;
 }
 
-static long last_rtc_update = 0;
-unsigned long missed_heart_beats = 0;
+static long last_rtc_update;
+unsigned long missed_heart_beats;
 
 void indy_timer_interrupt(struct pt_regs *regs)
 {
index 50e03413bed6f69dbb8628a465a6de019571beb9..7fd009b096a4e57d3e7eb915e26bbba0df0213df 100644 (file)
@@ -200,11 +200,11 @@ void __init prom_meminit(void)
                                                        << PAGE_SHIFT));
                NODE_DATA(node)->bdata = plat_node_bdata + node;
                slot_freepfn += node_datasz;
-               bootmap_size = init_bootmem_node(node, slot_freepfn, 
+               bootmap_size = init_bootmem_node(NODE_DATA(node), slot_freepfn, 
                                                slot_firstpfn, slot_lastpfn);
-               free_bootmem_node(node, slot_firstpfn << PAGE_SHIFT, 
+               free_bootmem_node(NODE_DATA(node), slot_firstpfn << PAGE_SHIFT, 
                                (slot_lastpfn - slot_firstpfn) << PAGE_SHIFT);
-               reserve_bootmem_node(node, slot_firstpfn << PAGE_SHIFT,
+               reserve_bootmem_node(NODE_DATA(node), slot_firstpfn << PAGE_SHIFT,
                  ((slot_freepfn - slot_firstpfn) << PAGE_SHIFT) + bootmap_size);
        }
        printk("Total memory probed : 0x%lx pages\n", numpages);
@@ -278,7 +278,7 @@ void __init mem_init(void)
                /*
                 * This will free up the bootmem, ie, slot 0 memory.
                 */
-               totalram_pages += free_all_bootmem_node(nid);
+               totalram_pages += free_all_bootmem_node(NODE_DATA(nid));
 
                /*
                 * We need to manually do the other slots.
index 61fd5421bc1ad174fbb36e670c4c59e0292fd2ee..cf953dd6645fcee7f0bef994e4031695340469a8 100644 (file)
@@ -60,8 +60,8 @@ static void get_rtc_time(struct rtc_time *rtc_tm);
 #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 = 0;   /* bitmapped status byte.       */
-static unsigned long rtc_freq = 0;     /* Current periodic IRQ rate    */
+static unsigned char rtc_status;       /* bitmapped status byte.       */
+static unsigned long rtc_freq; /* Current periodic IRQ rate    */
 static struct m48t35_rtc *rtc;
 
 /*
index b8449b256dbe4f34fbb933b37d89b57030bfae56..73f4a7c94eada45f43489c93faace266610975e1 100644 (file)
@@ -36,7 +36,7 @@
 #define CYCLES_PER_JIFFY       (CYCLES_PER_SEC/HZ)
 
 static unsigned long ct_cur[NR_CPUS];  /* What counter should be at next timer irq */
-static long last_rtc_update = 0;       /* Last time the rtc clock got updated */
+static long last_rtc_update;           /* Last time the rtc clock got updated */
 
 extern rwlock_t xtime_lock;
 extern volatile unsigned long wall_jiffies;
index 4322aabc5049d7c71b1975b553cd852498248b0e..ef17e63341d195d93fa54e10e07eba5e35038586 100644 (file)
@@ -126,6 +126,7 @@ define_bool CONFIG_KERNEL_ELF y
 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
 
 source drivers/pci/Config.in
+source drivers/zorro/Config.in
 
 bool 'Support for hot-pluggable devices' CONFIG_HOTPLUG
 
index 0a66d6c6b40669c3bc3ddfd83149d630528d6c05..fb7f384440c815772d8fd4dd0c53f0d26e2ea26d 100644 (file)
@@ -41,8 +41,8 @@
 
 #include <asm/time.h>
 #include "open_pic.h"
-int smp_threads_ready = 0;
-volatile int smp_commenced = 0;
+int smp_threads_ready;
+volatile int smp_commenced;
 int smp_num_cpus = 1;
 struct cpuinfo_PPC cpu_data[NR_CPUS];
 struct klock_info_struct klock_info = { KLOCK_CLEAR, 0 };
@@ -54,10 +54,10 @@ unsigned int prof_counter[NR_CPUS];
 cycles_t cacheflush_time;
 
 /* this has to go in the data section because it is accessed from prom_init */
-int smp_hw_index[NR_CPUS] = {0};
+int smp_hw_index[NR_CPUS];
 
 /* all cpu mappings are 1-1 -- Cort */
-volatile unsigned long cpu_callin_map[NR_CPUS] = {0,};
+volatile unsigned long cpu_callin_map[NR_CPUS];
 
 int start_secondary(void *);
 extern int cpu_idle(void *unused);
@@ -226,7 +226,7 @@ static volatile struct call_data_struct {
        atomic_t started;
        atomic_t finished;
        int wait;
-} *call_data = NULL;
+} *call_data;
 
 /*
  * this function sends a 'generic call function' IPI to all other CPUs
index be7d1f06340abf4d29f4e26a908a692981cf5f41..cc8d2290af33f415be5f2fa0734c0edb2d717218 100644 (file)
@@ -82,8 +82,8 @@ unsigned long total_lowmem;
 int mem_init_done;
 int init_bootmem_done;
 int boot_mapsize;
-unsigned long totalram_pages = 0;
-unsigned long totalhigh_pages = 0;
+unsigned long totalram_pages;
+unsigned long totalhigh_pages;
 extern pgd_t swapper_pg_dir[];
 extern char _start[], _end[];
 extern char etext[], _stext[];
@@ -138,10 +138,10 @@ struct mem_pieces phys_mem;
 char *klimit = _end;
 struct mem_pieces phys_avail;
 
-PTE *Hash=0, *Hash_end;
-unsigned long Hash_size=0, Hash_mask;
+PTE *Hash, *Hash_end;
+unsigned long Hash_size, Hash_mask;
 #if !defined(CONFIG_4xx) && !defined(CONFIG_8xx)
-unsigned long _SDR1=0;
+unsigned long _SDR1;
 static void hash_init(void);
 
 union ubat {                   /* BAT register values to be loaded */
@@ -195,7 +195,7 @@ static inline unsigned long p_mapped_by_bats(unsigned long pa)
  * (i.e. page tables) instead of the bats.
  * -- Cort
  */
-int __map_without_bats = 0;
+int __map_without_bats;
 
 /* max amount of RAM to use */
 unsigned long __max_memory;
index a45d02ed8c332d853451182b48d91c36882be86d..1a22e429bc8b99acf4c8b743cb80fbae4a9eca9d 100644 (file)
@@ -36,7 +36,7 @@
 #include <asm/dma.h>
 #include <asm/lowcore.h>
 
-static unsigned long totalram_pages = 0;
+static unsigned long totalram_pages;
 
 /*
  * BAD_PAGE is the page that is used for page faults when linux
index 66f7460f9c5eceb3a67b73686efe4426840c0e10..2f9e722fe541885b815da01546cb2f9e8415ccb7 100644 (file)
@@ -367,7 +367,7 @@ void __init setup_arch(char **cmdline_p)
         * bootstrap step all allocations (until the page allocator
         * is intact) must be done via bootmem_alloc().
         */
-       bootmap_size = init_bootmem_node(0, start_pfn,
+       bootmap_size = init_bootmem_node(NODE_DATA(0), start_pfn,
                                         __MEMORY_START>>PAGE_SHIFT, 
                                         max_low_pfn);
 
index 5af1e6de8cc2f3f7cf38c2a6a482ca1614805ef5..552cbb3d3e0ffb485b579f15c5c747f2d4553746 100644 (file)
@@ -213,7 +213,7 @@ static int set_rtc_time(unsigned long nowtime)
 }
 
 /* last time the RTC clock got updated */
-static long last_rtc_update = 0;
+static long last_rtc_update;
 
 /*
  * timer_interrupt() needs to keep up the real-time clock,
index 8568afb31c11d8322d162401a47913f6d645cd5d..5a0ac1f10e336833ecb7b941a5200ed77b891f64 100644 (file)
@@ -40,8 +40,8 @@
  */
 unsigned long mmu_context_cache;
 
-static unsigned long totalram_pages = 0;
-static unsigned long totalhigh_pages = 0;
+static unsigned long totalram_pages;
+static unsigned long totalhigh_pages;
 
 extern unsigned long init_smp_mappings(unsigned long);
 
index 9b45d18bd785728595851e70625a370a513579d8..4359ec2327c42a2e543079a242f8ba84e97af55a 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: semaphore.c,v 1.2 1999/12/28 11:50:37 jj Exp $
+/* $Id: semaphore.c,v 1.3 2000/10/14 10:09:00 davem Exp $
  * Generic semaphore code. Buyer beware. Do your own
  * specific changes in <asm/semaphore-helper.h>
  */
index 2c64c9ba193a71d1690b149a5e6931f7c002b5db..2a0fe9a2769f972b8aff98660d88bd23469b89e8 100644 (file)
@@ -1,4 +1,4 @@
-/*  $Id: setup.c,v 1.119 2000/08/31 10:24:17 anton Exp $
+/*  $Id: setup.c,v 1.120 2000/10/14 10:09:00 davem Exp $
  *  linux/arch/sparc/kernel/setup.c
  *
  *  Copyright (C) 1995  David S. Miller (davem@caip.rutgers.edu)
index 4c86d76587ca456743f76bfdb39787a0a56b091c..0deef8989d18f6f7663a0648f419ca44366c665a 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: fault.c,v 1.116 2000/05/03 06:37:03 davem Exp $
+/* $Id: fault.c,v 1.117 2000/10/16 14:32:50 anton Exp $
  * fault.c:  Page fault handlers for the Sparc.
  *
  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
@@ -200,10 +200,23 @@ asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write,
        siginfo_t info;
        int from_user = !(regs->psr & PSR_PS);
 
-       info.si_code = SEGV_MAPERR;
        if(text_fault)
                address = regs->pc;
 
+       /*
+        * We fault-in kernel-space virtual memory on-demand. The
+        * 'reference' page table is init_mm.pgd.
+        *
+        * NOTE! We MUST NOT take any locks for this case. We may
+        * be in an interrupt or a critical region, and should
+        * only copy the information from the master page table,
+        * nothing more.
+        */
+       if (!ARCH_SUN4C_SUN4 && address >= TASK_SIZE)
+               goto vmalloc_fault;
+
+       info.si_code = SEGV_MAPERR;
+
        /*
         * If we're in an interrupt or have no user
         * context, we must not take the fault..
@@ -271,6 +284,7 @@ good_area:
 bad_area:
        up(&mm->mmap_sem);
 
+bad_area_nosemaphore:
        /* User mode accesses just cause a SIGSEGV */
        if(from_user) {
 #if 0
@@ -340,6 +354,35 @@ do_sigbus:
        force_sig_info (SIGBUS, &info, tsk);
        if (!from_user)
                goto no_context;
+
+vmalloc_fault:
+       {
+               /*
+                * Synchronize this task's top level page-table
+                * with the 'reference' page table.
+                */
+               int offset = pgd_index(address);
+               pgd_t *pgd, *pgd_k;
+               pmd_t *pmd, *pmd_k;
+
+               pgd = tsk->active_mm->pgd + offset;
+               pgd_k = init_mm.pgd + offset;
+
+               if (!pgd_present(*pgd)) {
+                       if (!pgd_present(*pgd_k))
+                               goto bad_area_nosemaphore;
+                       pgd_set(pgd, *pgd_k);
+                       return;
+               }
+
+               pmd = pmd_offset(pgd, address);
+               pmd_k = pmd_offset(pgd_k, address);
+
+               if (pmd_present(*pmd) || !pmd_present(*pmd_k))
+                       goto bad_area_nosemaphore;
+               pmd_set(pmd, *pmd_k);
+               return;
+       }
 }
 
 asmlinkage void do_sun4c_fault(struct pt_regs *regs, int text_fault, int write,
index 642c986bd3776e2c664e47f1aa5eb550eef9679f..457d4fed03b1d284bffbdb0bae61aecf0e05140a 100644 (file)
@@ -42,7 +42,7 @@ unsigned long page_kernel;
 struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS];
 unsigned long sparc_unmapped_base;
 
-struct pgtable_cache_struct pgt_quicklists = { 0, 0, 0, 0 };
+struct pgtable_cache_struct pgt_quicklists;
 
 /* References to section boundaries */
 extern char __init_begin, __init_end, _start, _end, etext , edata;
index 408d59cbf9810a5aaf89c7eb2d3caf3eceb0a569..a91809d03bc542e80077648a26bf581b05ded51b 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: srmmu.c,v 1.222 2000/08/29 08:59:23 davem Exp $
+/* $Id: srmmu.c,v 1.223 2000/10/16 14:32:49 anton Exp $
  * srmmu.c:  SRMMU specific routines for memory management.
  *
  * Copyright (C) 1995 David S. Miller  (davem@caip.rutgers.edu)
@@ -69,9 +69,6 @@ pgd_t *srmmu_swapper_pg_dir;
 #define FLUSH_END      }
 #endif
 
-BTFIXUPDEF_CALL(void, pmd_set, pmd_t *, pte_t *)
-#define pmd_set(pmdp,ptep) BTFIXUP_CALL(pmd_set)(pmdp,ptep)
-
 BTFIXUPDEF_CALL(void, flush_page_for_dma, unsigned long)
 #define flush_page_for_dma(page) BTFIXUP_CALL(flush_page_for_dma)(page)
 
@@ -482,19 +479,6 @@ static void srmmu_pmd_free(pmd_t * pmd)
        srmmu_free_nocache((unsigned long)pmd, SRMMU_PMD_TABLE_SIZE);
 }
 
-static void srmmu_set_pgdir(unsigned long address, pgd_t entry)
-{
-       struct task_struct * p;
-
-       read_lock(&tasklist_lock);
-       for_each_task(p) {
-               if (!p->mm)
-                       continue;
-               *srmmu_pgd_offset(p->mm,address) = entry;
-       }
-       read_unlock(&tasklist_lock);
-}
-
 static inline void alloc_context(struct mm_struct *old_mm, struct mm_struct *mm)
 {
        struct ctx_list *ctxp;
@@ -2148,8 +2132,6 @@ void __init ld_mmu_srmmu(void)
 #endif
        BTFIXUPSET_CALL(do_check_pgt_cache, srmmu_check_pgt_cache, BTFIXUPCALL_NORM);
 
-       BTFIXUPSET_CALL(set_pgdir, srmmu_set_pgdir, BTFIXUPCALL_NORM);
-
        BTFIXUPSET_CALL(set_pte, srmmu_set_pte, BTFIXUPCALL_SWAPO0O1);
        BTFIXUPSET_CALL(switch_mm, srmmu_switch_mm, BTFIXUPCALL_NORM);
 
@@ -2175,6 +2157,7 @@ void __init ld_mmu_srmmu(void)
        BTFIXUPSET_CALL(mk_pte_phys, srmmu_mk_pte_phys, BTFIXUPCALL_NORM);
        BTFIXUPSET_CALL(mk_pte_io, srmmu_mk_pte_io, BTFIXUPCALL_NORM);
        BTFIXUPSET_CALL(pgd_set, srmmu_pgd_set, BTFIXUPCALL_NORM);
+       BTFIXUPSET_CALL(pmd_set, srmmu_pmd_set, BTFIXUPCALL_NORM);
        
        BTFIXUPSET_INT(pte_modify_mask, SRMMU_CHG_MASK);
        BTFIXUPSET_CALL(pmd_offset, srmmu_pmd_offset, BTFIXUPCALL_NORM);
@@ -2209,9 +2192,6 @@ void __init ld_mmu_srmmu(void)
        BTFIXUPSET_CALL(free_task_struct, srmmu_free_task_struct, BTFIXUPCALL_NORM);
        BTFIXUPSET_CALL(get_task_struct, srmmu_get_task_struct, BTFIXUPCALL_NORM);
 
-       /* SRMMU specific. */
-       BTFIXUPSET_CALL(pmd_set, srmmu_pmd_set, BTFIXUPCALL_NORM);
-
        get_srmmu_type();
        patch_window_trap_handlers();
 
index a99ce736e55cb86b486cd274c41706814865465d..a416ecf19f56982164e2e52f07d2ff287c49ec6b 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: sun4c.c,v 1.199 2000/08/29 08:59:23 davem Exp $
+/* $Id: sun4c.c,v 1.200 2000/10/16 14:32:49 anton Exp $
  * sun4c.c: Doing in software what should be done in hardware.
  *
  * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
@@ -1904,6 +1904,10 @@ static void sun4c_pgd_set(pgd_t * pgdp, pmd_t * pmdp)
 {
 }
 
+static void sun4c_pmd_set(pmd_t * pmdp, pte_t * ptep)
+{
+}
+
 void sun4c_mapioaddr(unsigned long physaddr, unsigned long virt_addr,
                     int bus_type, int rdonly)
 {
@@ -2267,11 +2271,6 @@ extern __inline__ pgd_t *sun4c_get_pgd_fast(void)
        return (pgd_t *)ret;
 }
 
-static void sun4c_set_pgdir(unsigned long address, pgd_t entry)
-{
-       /* Nothing to do */
-}
-
 extern __inline__ void sun4c_free_pgd_fast(pgd_t *pgd)
 {
        *(unsigned long *)pgd = (unsigned long) pgd_quicklist;
@@ -2616,8 +2615,6 @@ void __init ld_mmu_sun4c(void)
 #endif
        BTFIXUPSET_CALL(do_check_pgt_cache, sun4c_check_pgt_cache, BTFIXUPCALL_NORM);
        
-       BTFIXUPSET_CALL(set_pgdir, sun4c_set_pgdir, BTFIXUPCALL_NOP);
-
        BTFIXUPSET_CALL(flush_cache_all, sun4c_flush_cache_all, BTFIXUPCALL_NORM);
 
        if (sun4c_vacinfo.do_hwflushes) {
@@ -2719,4 +2716,5 @@ void __init ld_mmu_sun4c(void)
        /* These should _never_ get called with two level tables. */
        BTFIXUPSET_CALL(pgd_set, sun4c_pgd_set, BTFIXUPCALL_NOP);
        BTFIXUPSET_CALL(pgd_page, sun4c_pgd_page, BTFIXUPCALL_RETO0);
+       BTFIXUPSET_CALL(pmd_set, sun4c_pmd_set, BTFIXUPCALL_NOP);
 }
index 5eac1939217e57291b74ee1a2e67be7a723cb6e5..8cb6e72115072912b6bc222adfd22c06cdf1f0fe 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: semaphore.c,v 1.3 2000/03/27 10:38:46 davem Exp $
+/* $Id: semaphore.c,v 1.4 2000/10/14 10:09:00 davem Exp $
  *  Generic semaphore code. Buyer beware. Do your own
  * specific changes in <asm/semaphore-helper.h>
  */
index 6f0d34c4a13c06f232532a0e5226f3bbfb731897..fa46489c1e2a5ad9aabcb96b802b74fa8c775615 100644 (file)
@@ -1,4 +1,4 @@
-/*  $Id: setup.c,v 1.56 2000/09/21 06:29:01 anton Exp $
+/*  $Id: setup.c,v 1.57 2000/10/14 10:09:00 davem Exp $
  *  linux/arch/sparc64/kernel/setup.c
  *
  *  Copyright (C) 1995,1996  David S. Miller (davem@caip.rutgers.edu)
index d694e40f9c3fdb2c0b12c9014e65cf59cebda3e8..eafbe27cae471b6045d7c0b85a2450bdb8d26959 100644 (file)
@@ -873,7 +873,7 @@ unsigned long __init bootmem_init(unsigned long *pages_avail)
        }
 #endif 
        /* Initialize the boot-time allocator. */
-       bootmap_size = init_bootmem_node(0, bootmap_pfn, phys_base>>PAGE_SHIFT, end_pfn);
+       bootmap_size = init_bootmem_node(NODE_DATA(0), bootmap_pfn, phys_base>>PAGE_SHIFT, end_pfn);
 
        /* Now register the available physical memory with the
         * allocator.
index c4022558402c9bed2a3e6f6d5b5cf8a27af87991..2ad56ad9d052fa64f28d5a1440a29fb8c3d99975 100644 (file)
@@ -161,7 +161,7 @@ static struct file_operations socksys_fops = {
        release:        socksys_release,
 };
 
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
 
 int __init
 init_socksys(void)
index 44bca7093e66447a0d50efd0768fe6327ebdcdf1..1d2d8a6404022ee549a63895a5ab0af1c5b35f5f 100644 (file)
@@ -285,7 +285,7 @@ char func_buf[] = {
 
 char *funcbufptr = func_buf;
 int funcbufsize = sizeof(func_buf);
-int funcbufleft = 0;          /* space left */
+int funcbufleft;          /* space left */
 
 char *func_table[MAX_NR_FUNC] = {
        func_buf + 0,
index a8bda592735feebbc300dd128c0516b8b9bf3880..5d4fdd543930e452fdca99ec3604b3d61791cb4e 100644 (file)
@@ -2920,7 +2920,7 @@ fore200e_proc_read(struct atm_dev *dev,loff_t* pos,char* page)
 
 
 #ifdef MODULE
-static unsigned int __init
+static int __init
 fore200e_module_init(void)
 {
     DPRINTK(1, "module loaded\n");
index 3550acd410cebf0fbcc491a44a22e00c07e377c0..e4d709cb02ed6d519dd45722786464068efb672c 100644 (file)
@@ -259,7 +259,7 @@ static unsigned char ns_phy_get(struct atm_dev *dev, unsigned long addr);
 /* Global variables ***********************************************************/
 
 static struct ns_dev *cards[NS_MAX_CARDS];
-static unsigned num_cards = 0;
+static unsigned num_cards;
 static struct atmdev_ops atm_ops =
 {
    open:       ns_open,
index 318e14f86d992aa6249ca286b6bf4e1de50aa204..dba6b5adfdb4567fb9674d63112bed93a1ee4321 100644 (file)
@@ -51,7 +51,7 @@
 */
 
 static int
-  DAC960_ControllerCount =                     0;
+  DAC960_ControllerCount;
 
 
 /*
@@ -60,7 +60,7 @@ static int
 */
 
 static int
-  DAC960_ActiveControllerCount =               0;
+  DAC960_ActiveControllerCount;
 
 
 /*
@@ -69,7 +69,7 @@ static int
 */
 
 static DAC960_Controller_T
-  *DAC960_Controllers[DAC960_MaxControllers] = { NULL };
+  *DAC960_Controllers[DAC960_MaxControllers];
 
 
 /*
@@ -5679,7 +5679,7 @@ static void DAC960_Message(DAC960_MessageLevel_T MessageLevel,
            }
          if (MessageLevel == DAC960_AnnounceLevel)
            {
-             static int AnnouncementLines = 0;
+             static int AnnouncementLines;
              if (++AnnouncementLines <= 2)
                printk("%sDAC960: %s", DAC960_MessageLevelMap[MessageLevel],
                       Buffer);
index b8f1c693e17bce08f7832e25f8a337bd5b928bcd..35bab96feb184df38910959e3541656f60cb06b4 100644 (file)
@@ -942,7 +942,7 @@ static int slm_get_pagesize( int device, int *w, int *h )
 
 int attach_slm( int target, int lun )
 
-{      static int      did_register = 0;
+{      static int      did_register;
        int                     len;
 
        if (N_SLM_Printers >= MAX_SLM) {
@@ -992,7 +992,7 @@ int attach_slm( int target, int lun )
        return( 1 );
 }
 
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
 
 int slm_init( void )
 
index f88762bb18422b37fb94734ff7d70349ac63e135..75f59e77aa5399d54028c4ba0fc6a708bc0013a5 100644 (file)
@@ -71,10 +71,10 @@ static struct board_type products[] = {
 #define READ_AHEAD      128
 #define NR_CMDS                 128 /* #commands that can be outstanding */
 #define MAX_CTLR 8
-static int nr_ctlr =0
-static ctlr_info_t *hba[MAX_CTLR] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+static int nr_ctlr; 
+static ctlr_info_t *hba[MAX_CTLR];
 
-static struct proc_dir_entry *proc_cciss = NULL;
+static struct proc_dir_entry *proc_cciss;
 
 static void do_cciss_request(int i);
 /*
index f26611bc378e8a0fa3139028d75f81baeb2bd780..0bfa895b70e91187aee8194d4f7631da3f028920 100644 (file)
@@ -68,10 +68,10 @@ MODULE_DESCRIPTION("Driver for Compaq Smart2 Array Controllers");
 #define MAX_CTLR       8
 #define CTLR_SHIFT     8
 
-static int nr_ctlr = 0;
-static ctlr_info_t *hba[MAX_CTLR] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+static int nr_ctlr;
+static ctlr_info_t *hba[MAX_CTLR];
 
-static int eisa[8] = { 0, 0 ,0 ,0, 0, 0 ,0 ,0 };
+static int eisa[8];
 
 #define NR_PRODUCTS (sizeof(products)/sizeof(struct board_type))
 
@@ -103,7 +103,7 @@ static int * ida_blocksizes;
 static int * ida_hardsizes;
 static struct gendisk ida_gendisk[MAX_CTLR];
 
-static struct proc_dir_entry *proc_array = NULL;
+static struct proc_dir_entry *proc_array;
 
 /* Debug... */
 #define DBG(s) do { s } while(0)
index da1d6629d1f0f92ba9d021ef0a8cbd8e6684050c..329d10c9cd0148f0d7aebecb9a3c54c91bc291fc 100644 (file)
@@ -80,7 +80,7 @@ static int max_loop = 8;
 static struct loop_device *loop_dev;
 static int *loop_sizes;
 static int *loop_blksizes;
-static devfs_handle_t devfs_handle = NULL;      /*  For the directory        */
+static devfs_handle_t devfs_handle;      /*  For the directory */
 
 #define FALSE 0
 #define TRUE (!FALSE)
index 436969bb47f439ea9559af4b04973b1ea8b91d92..955014bf188438b256710eb2d98defd936325b16 100644 (file)
@@ -55,7 +55,7 @@ static int nbd_sizes[MAX_NBD];
 static u64 nbd_bytesizes[MAX_NBD];
 
 static struct nbd_device nbd_dev[MAX_NBD];
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
 
 #define DEBUG( s )
 /* #define DEBUG( s ) printk( s ) 
index e2709ce9726bd2309983322bf2f1f3b27c5cdc9b..65ab11859fcb26520516a55fb4daa7f29ab305c0 100644 (file)
@@ -289,7 +289,7 @@ void pg_init_units( void )
        }
 } 
 
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
 
 int pg_init (void)      /* preliminary initialisation */
 
index 5cb91ae0a908de7a3273e7aad5bdc70a52a67f44..51f67b903180be704b1defef50722fc7b167bd7d 100644 (file)
@@ -293,7 +293,7 @@ void pt_init_units( void )
         }
 } 
 
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
 
 int pt_init (void)      /* preliminary initialisation */
 
index 2db08531ab695ad0ae036c78027a75af674971e3..6f583c3de480191e54f6b86a7005f1807955ba84 100644 (file)
@@ -99,7 +99,7 @@ static unsigned long rd_length[NUM_RAMDISKS]; /* Size of RAM disks in bytes   */
 static int rd_hardsec[NUM_RAMDISKS];           /* Size of real blocks in bytes */
 static int rd_blocksizes[NUM_RAMDISKS];                /* Size of 1024 byte blocks :)  */
 static int rd_kbsize[NUM_RAMDISKS];            /* Size in blocks of 1024 bytes */
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
 static struct inode *rd_inode[NUM_RAMDISKS];           /* Protected device inodes */
 
 /*
@@ -778,11 +778,11 @@ typedef unsigned long  ulg;
 static uch *inbuf;
 static uch *window;
 
-static unsigned insize = 0;  /* valid bytes in inbuf */
-static unsigned inptr = 0;   /* index of next byte to be processed in inbuf */
-static unsigned outcnt = 0;  /* bytes in output buffer */
-static int exit_code = 0;
-static long bytes_out = 0;
+static unsigned insize;  /* valid bytes in inbuf */
+static unsigned inptr;   /* index of next byte to be processed in inbuf */
+static unsigned outcnt;  /* bytes in output buffer */
+static int exit_code;
+static long bytes_out;
 static struct file *crd_infp, *crd_outfp;
 
 #define get_byte()  (inptr < insize ? inbuf[inptr++] : fill_inbuf())
index 9124026784cf1d801f7d9735fa4f8fe5424645cf..23fe035847cce6164784e83e089dc69b8ccd1d6d 100644 (file)
 #include <asm/uaccess.h>
 
 /* used to tell the module to turn on full debugging messages */
-static int debug = 0;
+static int debug;
 /* used to keep tray locked at all times */
-static int keeplocked = 0;
+static int keeplocked;
 /* default compatibility mode */
 static int autoclose=1;
-static int autoeject=0;
+static int autoeject;
 static int lockdoor = 1;
 /* will we ever get to use this... sigh. */
-static int check_media_type = 0;
+static int check_media_type;
 MODULE_PARM(debug, "i");
 MODULE_PARM(autoclose, "i");
 MODULE_PARM(autoeject, "i");
@@ -326,8 +326,8 @@ int cdrom_get_next_writable(kdev_t dev, long *next_writable);
 #ifdef CONFIG_SYSCTL
 static void cdrom_sysctl_register(void);
 #endif /* CONFIG_SYSCTL */ 
-static struct cdrom_device_info *topCdromPtr = NULL;
-static devfs_handle_t devfs_handle = NULL;
+static struct cdrom_device_info *topCdromPtr;
+static devfs_handle_t devfs_handle;
 
 struct block_device_operations cdrom_fops =
 {
@@ -346,12 +346,12 @@ struct block_device_operations cdrom_fops =
 
 int register_cdrom(struct cdrom_device_info *cdi)
 {
-       static char banner_printed = 0;
+       static char banner_printed;
        int major = MAJOR(cdi->dev);
         struct cdrom_device_ops *cdo = cdi->ops;
         int *change_capability = (int *)&cdo->capability; /* hack */
        char vname[16];
-       static unsigned int cdrom_counter = 0;
+       static unsigned int cdrom_counter;
 
        cdinfo(CD_OPEN, "entering register_cdrom\n"); 
 
@@ -2566,7 +2566,7 @@ static struct ctl_table_header *cdrom_sysctl_header;
 
 static void cdrom_sysctl_register(void)
 {
-       static int initialized = 0;
+       static int initialized;
 
        if (initialized == 1)
                return;
index 07e97a1d73ef92451e3b9cf931cff81726d88df5..4cec5680dbf3440872d6c0e20748521dac97e881 100644 (file)
@@ -561,9 +561,9 @@ static int sbpcd_debug = 0 & ((1<<DBG_INF) |
 
 static int sbpcd_ioaddr = CDROM_PORT;  /* default I/O base address */
 static int sbpro_type = SBPRO;
-static unsigned char setup_done = 0;
-static unsigned char f_16bit = 0;
-static unsigned char do_16bit = 0;
+static unsigned char setup_done;
+static unsigned char f_16bit;
+static unsigned char do_16bit;
 static int CDo_command, CDo_reset;
 static int CDo_sel_i_d, CDo_enable;
 static int CDi_info, CDi_status, CDi_data;
@@ -575,7 +575,7 @@ static struct cdrom_subchnl SC;
 static struct cdrom_volctrl volctrl;
 static struct cdrom_read_audio read_audio;
 
-static unsigned char msgnum=0;
+static unsigned char msgnum;
 static char msgbuf[80];
 
 static const char *str_sb = "SoundBlaster";
@@ -618,26 +618,26 @@ static u_char familyL[]="LCS-7260"; /* Longshine LCS-7260 */
 static u_char familyT[]="CD-55";    /* TEAC CD-55A */
 static u_char familyV[]="ECS-AT";   /* ECS Vertos 100 */
 
-static u_int recursion=0; /* internal testing only */
-static u_int fatal_err=0; /* internal testing only */
-static u_int response_count=0;
+static u_int recursion; /* internal testing only */
+static u_int fatal_err; /* internal testing only */
+static u_int response_count;
 static u_int flags_cmd_out;
-static u_char cmd_type=0;
+static u_char cmd_type;
 static u_char drvcmd[10];
 static u_char infobuf[20];
 static u_char xa_head_buf[CD_XA_HEAD];
 static u_char xa_tail_buf[CD_XA_TAIL];
 
 #if OLD_BUSY
-static volatile u_char busy_data=0;
-static volatile u_char busy_audio=0; /* true semaphores would be safer */
+static volatile u_char busy_data;
+static volatile u_char busy_audio; /* true semaphores would be safer */
 #endif OLD_BUSY
 static DECLARE_MUTEX(ioctl_read_sem);
 static u_long timeout;
-static volatile u_char timed_out_delay=0;
-static volatile u_char timed_out_data=0;
+static volatile u_char timed_out_delay;
+static volatile u_char timed_out_data;
 #if 0
-static volatile u_char timed_out_audio=0;
+static volatile u_char timed_out_audio;
 #endif
 static u_int datarate= 1000000;
 static u_int maxtim16=16000000;
@@ -656,15 +656,15 @@ static int n_retries=6;
 #endif
 /*==========================================================================*/
 
-static int ndrives=0;
+static int ndrives;
 static u_char drv_pattern[NR_SBPCD]={speed_auto,speed_auto,speed_auto,speed_auto};
-static int sbpcd_blocksizes[NR_SBPCD] = {0, };
+static int sbpcd_blocksizes[NR_SBPCD];
 
 /*==========================================================================*/
 /*
  * drive space begins here (needed separate for each unit) 
  */
-static int d=0; /* DriveStruct index: drive number */
+static int d; /* DriveStruct index: drive number */
 
 static struct {
        char drv_id;           /* "jumpered" drive ID or -1 */
@@ -5654,7 +5654,7 @@ static int __init config_spea(void)
  *  Called once at boot or load time.
  */
 
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
 
 #ifdef MODULE
 int __init __SBPCD_INIT(void)
index b685c4b85fc86998515595c15673e1e54de93256..272296b6947936057a88038e32b3c00842dfddea 100644 (file)
@@ -40,7 +40,7 @@
 #include <linux/spinlock.h>
 #include <linux/smp_lock.h>
 
-static int acq_is_open=0;
+static int acq_is_open;
 static spinlock_t acq_lock;
 
 /*
index 8c9a8ba4a8920d63bf3db7cba46a1c0ba463851c..ea44cace4462f9c53fe116210e41a3c320766558 100644 (file)
 #include "console_macros.h"
 
 
-struct consw *conswitchp = NULL;
+const struct consw *conswitchp;
 
 /* A bitmap for codes <32. A bit of 1 indicates that the code
  * corresponding to that bit number invokes some special action
@@ -136,7 +136,7 @@ static struct termios *console_termios_locked[MAX_NR_CONSOLES];
 struct vc vc_cons [MAX_NR_CONSOLES];
 
 #ifndef VT_SINGLE_DRIVER
-static struct consw *con_driver_map[MAX_NR_CONSOLES];
+static const struct consw *con_driver_map[MAX_NR_CONSOLES];
 #endif
 
 static int con_open(struct tty_struct *, struct file *);
@@ -152,14 +152,14 @@ static void set_cursor(int currcons);
 static void hide_cursor(int currcons);
 static void unblank_screen_t(unsigned long dummy);
 
-static int printable = 0;              /* Is console ready for printing? */
+static int printable;          /* Is console ready for printing? */
 
-int do_poke_blanked_console = 0;
-int console_blanked = 0;
+int do_poke_blanked_console;
+int console_blanked;
 
-static int vesa_blank_mode = 0; /* 0:none 1:suspendV 2:suspendH 3:powerdown */
+static int vesa_blank_mode; /* 0:none 1:suspendV 2:suspendH 3:powerdown */
 static int blankinterval = 10*60*HZ;
-static int vesa_off_interval = 0;
+static int vesa_off_interval;
 
 /*
  * fg_console is the current virtual console,
@@ -167,10 +167,10 @@ static int vesa_off_interval = 0;
  * want_console is the console we want to switch to,
  * kmsg_redirect is the console for kernel messages,
  */
-int fg_console = 0;
-int last_console = 0;
+int fg_console;
+int last_console;
 int want_console = -1;
-int kmsg_redirect = 0;
+int kmsg_redirect;
 
 /*
  * For each existing display, we have a pointer to console currently visible
@@ -178,7 +178,7 @@ int kmsg_redirect = 0;
  * appropriately. Unless the low-level driver supplies its own display_fg
  * variable, we use this one for the "master display".
  */
-static struct vc_data *master_display_fg = NULL;
+static struct vc_data *master_display_fg;
 
 /*
  * Unfortunately, we need to delay tty echo when we're currently writing to the
@@ -192,13 +192,13 @@ DECLARE_TASK_QUEUE(con_task_queue);
 /*
  * For the same reason, we defer scrollback to the console tasklet.
  */
-static int scrollback_delta = 0;
+static int scrollback_delta;
 
 /*
  * Hook so that the power management routines can (un)blank
  * the console on our behalf.
  */
-int (*console_blank_hook)(int) = NULL;
+int (*console_blank_hook)(int);
 
 static struct timer_list console_timer;
 
@@ -216,7 +216,7 @@ static struct timer_list console_timer;
 #endif
 
 static int pm_con_request(struct pm_dev *dev, pm_request_t rqst, void *data);
-static struct pm_dev *pm_con = NULL;
+static struct pm_dev *pm_con;
 
 static inline unsigned short *screenpos(int currcons, int offset, int viewed)
 {
@@ -415,9 +415,9 @@ void invert_screen(int currcons, int offset, int count, int viewed)
 /* used by selection: complement pointer position */
 void complement_pos(int currcons, int offset)
 {
-       static unsigned short *p = NULL;
-       static unsigned short old = 0;
-       static unsigned short oldx = 0, oldy = 0;
+       static unsigned short *p;
+       static unsigned short old;
+       static unsigned short oldx, oldy;
 
        if (p) {
                scr_writew(old, p);
@@ -2056,7 +2056,7 @@ void vt_console_print(struct console *co, const char * b, unsigned count)
 {
        int currcons = fg_console;
        unsigned char c;
-       static unsigned long printing = 0;
+       static unsigned long printing;
        const ushort *start;
        ushort cnt = 0;
        ushort myx;
@@ -2480,7 +2480,7 @@ static void clear_buffer_attributes(int currcons)
  *     and become default driver for newly opened ones.
  */
 
-void take_over_console(struct consw *csw, int first, int last, int deflt)
+void take_over_console(const struct consw *csw, int first, int last, int deflt)
 {
        int i, j = -1;
        const char *desc;
@@ -2528,7 +2528,7 @@ void take_over_console(struct consw *csw, int first, int last, int deflt)
                printk("to %s\n", desc);
 }
 
-void give_up_console(struct consw *csw)
+void give_up_console(const struct consw *csw)
 {
        int i;
 
index d0e8011807b8b6624634af79dab05ebb63e755cd..e5bdb6ccff8366d436fe96efa18415e0ba01cd8d 100644 (file)
@@ -770,7 +770,7 @@ static struct cyclades_card cy_card[NR_CARDS];
 */
 static struct cyclades_port cy_port[NR_PORTS];
 
-static int cy_next_channel = 0; /* next minor available */
+static int cy_next_channel; /* next minor available */
 
 static struct tty_struct *serial_table[NR_PORTS];
 static struct termios *serial_termios[NR_PORTS];
@@ -862,9 +862,9 @@ static int cy_chip_offset [] =
 
 /* PCI related definitions */
 
-static unsigned short  cy_pci_nboard = 0;
-static unsigned short  cy_isa_nboard = 0;
-static unsigned short  cy_nboard = 0;
+static unsigned short  cy_pci_nboard;
+static unsigned short  cy_isa_nboard;
+static unsigned short  cy_nboard;
 #ifdef CONFIG_PCI
 static unsigned short  cy_pci_dev_id[] = {
                            PCI_DEVICE_ID_CYCLOM_Y_Lo,  /* PCI < 1Mb */
index 0ada290ac8a8e21d518cffa6548babbe5c7c67b3..535566b6352de14beb5d54e0bcbca9a1bdafa4fe 100644 (file)
@@ -509,7 +509,7 @@ static struct file_operations dsp56k_fops = {
 
 /****** Init and module functions ******/
 
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
 
 int __init dsp56k_init(void)
 {
index 1e122acba2e96450414162133e422f8f3b870cd5..8991f65bb6e621ab23ecf4ea0c5ef545af9a6960 100644 (file)
 /* ----------------- Begin global definitions ------------------- */
 
 static char mesg[100];
-static int pc_refcount, nbdevs = 0, num_cards = 0, liloconfig = 0;
+static int pc_refcount, nbdevs, num_cards, liloconfig;
 static int digi_poller_inhibited = 1 ;
 
-static int setup_error_code = 0;
-static int invalid_lilo_config = 0;
+static int setup_error_code;
+static int invalid_lilo_config;
 
 /* -----------------------------------------------------------------------
        MAXBOARDS is typically 12, but ISA and EISA cards are restricted to 
index e3cea9e5d4beb6de8a4ba02c072d472df4d564e1..478b05aa55873ed00c0ad7c9fef4056722555da2 100644 (file)
@@ -70,9 +70,8 @@
 #define NR_PRIMARY 8   /* maximum number of primary ports */
 
 /* The following variables can be set by giving module options */
-static int irq[NR_PRIMARY] = {0,0,0,0,0,0,0,0};        /* IRQ for each base port */
-static unsigned int divisor[NR_PRIMARY] = {0,0,0,0,0,0,0,0};
-       /* custom divisor for each port */
+static int irq[NR_PRIMARY];    /* IRQ for each base port */
+static unsigned int divisor[NR_PRIMARY]; /* custom divisor for each port */
 static unsigned int dma = ESP_DMA_CHANNEL; /* DMA channel */
 static unsigned int rx_trigger = ESP_RX_TRIGGER;
 static unsigned int tx_trigger = ESP_TX_TRIGGER;
@@ -168,7 +167,7 @@ static struct termios *serial_termios_locked[NR_PORTS];
  * buffer across all the serial ports, since it significantly saves
  * memory if large numbers of serial ports are open.
  */
-static unsigned char *tmp_buf = 0;
+static unsigned char *tmp_buf;
 static DECLARE_MUTEX(tmp_buf_sem);
 
 static inline int serial_paranoia_check(struct esp_struct *info,
index 12d1e1a6e2f918dc3ffd61f656508dd66ccc09f1..ea67cd9f4aacc6817d8d5650d874440207bca962 100644 (file)
 
 /*      Global vars.
  */
-int ftape_motor = 0;
+int ftape_motor;
 volatile int ftape_current_cylinder = -1;
 volatile fdc_mode_enum fdc_mode = fdc_idle;
-fdc_config_info fdc = {0};
+fdc_config_info fdc;
 DECLARE_WAIT_QUEUE_HEAD(ftape_wait_intr);
 
 unsigned int ft_fdc_base       = CONFIG_FT_FDC_BASE;
@@ -73,15 +73,15 @@ volatile __u8 fdc_head;             /* FDC head from sector id */
 volatile __u8 fdc_cyl;         /* FDC track from sector id */
 volatile __u8 fdc_sect;                /* FDC sector from sector id */
 static int fdc_data_rate = 500;        /* data rate (Kbps) */
-static int fdc_rate_code = 0;  /* data rate code (0 == 500 Kbps) */
+static int fdc_rate_code;      /* data rate code (0 == 500 Kbps) */
 static int fdc_seek_rate = 2;  /* step rate (msec) */
 static void (*do_ftape) (void);
 static int fdc_fifo_state;     /* original fifo setting - fifo enabled */
 static int fdc_fifo_thr;       /* original fifo setting - threshold */
 static int fdc_lock_state;     /* original lock setting - locked */
-static int fdc_fifo_locked = 0;        /* has fifo && lock set ? */
-static __u8 fdc_precomp = 0;   /* default precomp. value (nsec) */
-static __u8 fdc_prec_code = 0; /* fdc precomp. select code */
+static int fdc_fifo_locked;    /* has fifo && lock set ? */
+static __u8 fdc_precomp;       /* default precomp. value (nsec) */
+static __u8 fdc_prec_code;     /* fdc precomp. select code */
 
 static char ftape_id[] = "ftape";  /* used by request irq and free irq */
 
@@ -188,7 +188,7 @@ int fdc_command(const __u8 * cmd_data, int cmd_len)
        int count = cmd_len;
        int retry = 0;
 #ifdef TESTING
-       static unsigned int last_time = 0;
+       static unsigned int last_time;
        unsigned int time;
 #endif
        TRACE_FUN(ft_t_any);
@@ -387,7 +387,7 @@ int fdc_interrupt_wait(unsigned int time)
 {
        DECLARE_WAITQUEUE(wait,current);
        sigset_t old_sigmask;   
-       static int resetting = 0;
+       static int resetting;
        long timeout;
 
        TRACE_FUN(ft_t_fdc_dma);
@@ -868,7 +868,7 @@ int fdc_recalibrate(void)
        TRACE_EXIT 0;
 }
 
-static int perpend_mode = 0; /* set if fdc is in perpendicular mode */
+static int perpend_mode; /* set if fdc is in perpendicular mode */
 
 static int perpend_off(void)
 {
@@ -1113,7 +1113,7 @@ static int fdc_fifo_enable(void)
 
 /*   Determine fd controller type 
  */
-static __u8 fdc_save_state[2] = {0, 0};
+static __u8 fdc_save_state[2];
 
 int fdc_probe(void)
 {
@@ -1283,7 +1283,7 @@ static int fdc_config_regs(unsigned int fdc_base,
 
 static int fdc_config(void)
 {
-       static int already_done = 0;
+       static int already_done;
        TRACE_FUN(ft_t_any);
 
        if (already_done) {
index 4c3975addbd76bb79e8ddb1117d4eb7537e54bfe..3fdae227ea5b201eb0486a0432d5962cee8fd4e5 100644 (file)
 
 /*      Global vars.
  */
-volatile int ft_expected_stray_interrupts = 0;
-volatile int ft_interrupt_seen = 0;
-volatile int ft_seek_completed = 0;
-volatile int ft_hide_interrupt = 0;
+volatile int ft_expected_stray_interrupts;
+volatile int ft_interrupt_seen;
+volatile int ft_seek_completed;
+volatile int ft_hide_interrupt;
 /*      Local vars.
  */
 typedef enum {
@@ -55,7 +55,7 @@ typedef enum {
        data_am_error = 0x04, data_crc_error = 0x08,
        no_data_error = 0x10, overrun_error = 0x20,
 } error_cause;
-static int stop_read_ahead = 0;
+static int stop_read_ahead;
 
 
 static void print_error_cause(int cause)
@@ -730,7 +730,7 @@ static void continue_formatting(buffer_struct *buff)
  */
 static void handle_fdc_busy(buffer_struct *buff)
 {
-       static int no_data_error_count = 0;
+       static int no_data_error_count;
        int retry = 0;
        error_cause cause;
        __u8 in[7];
@@ -1077,7 +1077,7 @@ static void handle_fdc_busy(buffer_struct *buff)
  */
 void fdc_isr(void)
 {
-       static int isr_active = 0;
+       static int isr_active;
 #ifdef TESTING
        unsigned int t0 = ftape_timestamp();
 #endif
index 2fcc85e501a910e11d560c96a2312bc43599468b..ad157a1c7ec2783c0d9021632d1c2b94a34e58ac 100644 (file)
@@ -39,8 +39,8 @@
 
 /*      Local vars.
  */
-static __u8 *bad_sector_map = NULL;
-static SectorCount *bsm_hash_ptr = NULL
+static __u8 *bad_sector_map;
+static SectorCount *bsm_hash_ptr; 
 
 typedef enum {
        forward, backward
@@ -454,7 +454,7 @@ SectorMap ftape_get_bad_sector_entry(int segment_id)
                 *  For true random access it may have to be redesigned.
                 */
                static int last_reference = -1;
-               static SectorMap map = 0;
+               static SectorMap map;
 
                if (segment_id > last_reference) {
                        /*  Skip all sectors before segment_id
index 015911918d573249fba0bac34bf30f546a3df9c4..41f43dffb0972c7c1886443a24ccf0a76ee70452 100644 (file)
@@ -47,7 +47,7 @@
 /*
  *  first segment of the new buffer
  */
-static int switch_segment = 0;
+static int switch_segment;
 
 /*
  *  at most 256 segments fit into one 32 kb buffer.  Even TR-1 cartridges have
index 464b792d30225d7d0ac07d56694cf89bfb15a853..c13b8e3c8de44334a6d3b4e6d089ce4bad660718 100644 (file)
  */
 /* NOTE: sectors start numbering at 1, all others at 0 ! */
 ft_timeout_table ftape_timeout;
-unsigned int ftape_tape_len = 0;
+unsigned int ftape_tape_len;
 volatile qic117_cmd_t ftape_current_command;
 const struct qic117_command_table qic117_cmds[] = QIC117_COMMANDS;
 int ftape_might_be_off_track;
 
 /*      Local vars.
  */
-static int diagnostic_mode   = 0;
+static int diagnostic_mode;
 static unsigned int ftape_udelay_count;
 static unsigned int ftape_udelay_time;
 
@@ -232,7 +232,7 @@ static int ft_check_cmd_restrictions(qic117_cmd_t command)
 int ftape_command(qic117_cmd_t command)
 {
        int result = 0;
-       static int level = 0;
+       static int level;
        TRACE_FUN(ft_t_any);
 
        if ((unsigned int)command > NR_ITEMS(qic117_cmds)) {
@@ -778,7 +778,7 @@ int ftape_set_data_rate(unsigned int new_rate /* Kbps */, unsigned int qic_std)
        int status;
        int result = 0;
        unsigned int data_rate = new_rate;
-       static int supported = 0;
+       static int supported;
        int rate_changed = 0;
        qic_model dummy_model;
        unsigned int dummy_qic_std, dummy_tape_len;
index 2c14f468e8926d43d93b08b100561c27ff8d346e..e6ac3b62536bbb0aa80c7fa3067c13d8fc96da42 100644 (file)
 
 /*      Global vars.
  */
-int ft_nr_buffers = 0;
-buffer_struct *ft_buffer[FT_MAX_NR_BUFFERS] = {NULL, };
+int ft_nr_buffers;
+buffer_struct *ft_buffer[FT_MAX_NR_BUFFERS];
 static volatile int ft_head;
 static volatile int ft_tail;   /* not volatile but need same type as head */
 int fdc_setup_error;
 location_record ft_location = {-1, 0};
-volatile int ftape_tape_running = 0;
+volatile int ftape_tape_running;
 
 /*      Local vars.
  */
-static int overrun_count_offset = 0;
-static int inhibit_correction = 0;
+static int overrun_count_offset;
+static int inhibit_correction;
 
 /*  maxmimal allowed overshoot when fast seeking
  */
index 95e3df8e8e101764252b27dd92eec8eb3af1f9cd..7fdc6567440b3f7c2296b8745faa3c08eb3f9b58 100644 (file)
  *       8              + everything else
  */
 ft_trace_t ftape_tracing = ft_t_info; /* Default level: information and up */
-int  ftape_function_nest_level = 0;
+int  ftape_function_nest_level;
 
 /*      Local vars.
  */
-static __u8 trace_id = 0;
+static __u8 trace_id;
 static char spacing[] = "*                              ";
 
 void ftape_trace_call(const char *file, const char *name)
index a0f095b9a59e25b5cb9d722574c06c7d0207a0cb..c4cb187796e5f48f4a978ec8d9e1dfb460068656 100644 (file)
@@ -47,7 +47,7 @@
 
 /*      Local vars.
  */
-static int last_write_failed = 0;
+static int last_write_failed;
 
 void ftape_zap_write_buffers(void)
 {
index bafc7e1a9c52976b9bd6c4c473e82f1b470c2c9b..f3dace343a9e4d3bf0252ca14a06d61a1da80625 100644 (file)
@@ -48,8 +48,8 @@
 
 /*  local varibales
  */
-static unsigned int used_memory = 0;
-static unsigned int peak_memory = 0;
+static unsigned int used_memory;
+static unsigned int peak_memory;
 
 void zft_memory_stats(void)
 {
index da2010ceba40603c9bd1a36de635b1c3b7fee9c8..6441ca9298f25bd60d73afe37d1919cb41316c4e 100644 (file)
 
 /*      Global vars.
  */
-int zft_write_protected = 0; /* this is when cartridge rdonly or O_RDONLY */
-int zft_header_read     = 0;
-int zft_offline         = 0;
-unsigned int zft_unit   = 0;
-int zft_resid           = 0;
-int zft_mt_compression  = 0;
+int zft_write_protected; /* this is when cartridge rdonly or O_RDONLY */
+int zft_header_read;
+int zft_offline;
+unsigned int zft_unit;
+int zft_resid;
+int zft_mt_compression;
 
 /*      Local vars.
  */
-static int going_offline   = 0;
+static int going_offline;
 
 typedef int (mt_fun)(int *argptr);
 typedef int (*mt_funp)(int *argptr);
index 91ed51423b3ab1ea72e33826c110d2692a6a5c7d..756ee32391d3ca472a53244a9191d1eb43f730ff 100644 (file)
 
 /*      Global vars.
  */
-int zft_just_before_eof = 0;
+int zft_just_before_eof;
 
 /*      Local vars.
  */
-static int buf_len_rd = 0;
+static int buf_len_rd;
 
 void zft_zap_read_buffers(void)
 {
@@ -194,7 +194,7 @@ static int check_read_access(int *req_len,
                             int *req_clipped, 
                             const zft_position *pos)
 {
-       static __s64 remaining = 0;
+       static __s64 remaining;
        static int eod;
        TRACE_FUN(ft_t_flow);
        
index 7840680966607acf3ace225e3b9a55b5498629c5..9e599530cd4b5fd0b0e0132fc9b05d9eb638be75 100644 (file)
 /*      Global vars.
  */
 
-__u8 *zft_deblock_buf = NULL;
-__u8 *zft_hseg_buf    = NULL;
+__u8 *zft_deblock_buf;
+__u8 *zft_hseg_buf;
 int zft_deblock_segment = -1;
 zft_status_enum zft_io_state = zft_idle;
-int zft_header_changed         = 0;
-int zft_bad_sector_map_changed = 0;
-int zft_qic113 = 0; /* conform to old specs. and old zftape */
-int zft_use_compression        = 0;
+int zft_header_changed;
+int zft_bad_sector_map_changed;
+int zft_qic113; /* conform to old specs. and old zftape */
+int zft_use_compression;
 zft_position zft_pos = {
        -1, /* seg_pos */
        0,  /* seg_byte_pos */
@@ -56,10 +56,10 @@ zft_position zft_pos = {
        0   /* volume_pos */
 };
 unsigned int zft_blk_sz = CONFIG_ZFT_DFLT_BLK_SZ;
-__s64 zft_capacity      = 0;
+__s64 zft_capacity;
 
-unsigned int zft_written_segments = 0;
-int zft_label_changed = 0;
+unsigned int zft_written_segments;
+int zft_label_changed;
 
 /*      Local vars.
  */
@@ -165,8 +165,8 @@ int zft_calc_seg_byte_coord(int *seg_byte_pos, __s64 tape_pos)
  * Also, it might be in the future that the bad sector map gets
  * changed.  -> reset the cache
  */
-static int seg_pos    = 0;
-static __s64 tape_pos = 0;
+static int seg_pos;
+static __s64 tape_pos;
 
 __s64 zft_get_capacity(void)
 {
index cf0ef232521731368384f1832d08cef5551d75e3..e4804ea2edc5bfc1d084d3ba5b99a131d7f0ddea 100644 (file)
@@ -48,8 +48,8 @@
  *  global variables 
  */
 int zft_qic_mode   = 1; /* use the vtbl */
-int zft_old_ftape  = 0; /* prevents old ftaped tapes to be overwritten */
-int zft_volume_table_changed = 0; /* for write_header_segments() */
+int zft_old_ftape; /* prevents old ftaped tapes to be overwritten */
+int zft_volume_table_changed; /* for write_header_segments() */
 
 /*
  *  private variables (only exported for inline functions)
@@ -59,9 +59,9 @@ LIST_HEAD(zft_vtbl);
 /*  We could also allocate these dynamically when extracting the volume table
  *  sizeof(zft_volinfo) is about 32 or something close to that
  */
-static zft_volinfo  tape_vtbl = { {NULL, NULL}, 0, };
-static zft_volinfo  eot_vtbl  = { {NULL, NULL}, 0, };
-static zft_volinfo *cur_vtbl = NULL;
+static zft_volinfo  tape_vtbl;
+static zft_volinfo  eot_vtbl;
+static zft_volinfo *cur_vtbl;
 
 inline void zft_new_vtbl_entry(void)
 {
index 03b126f49b631c45339256d9bfda4f82b29fe1de..8608c4dcc9d89d6f2b60db0c17fdabd812478604 100644 (file)
@@ -48,8 +48,8 @@
 
 /*      Local vars.
  */
-static int last_write_failed = 0;
-static int need_flush = 0;
+static int last_write_failed;
+static int need_flush;
 
 void zft_prevent_flush(void)
 {
index 6ceb5a1526374b6eea61d51f162f476fab9aacec..78617055e12b8880ae04997a589d33e257348d64 100644 (file)
@@ -33,7 +33,7 @@
 static char *                  tmp_buf; 
 static DECLARE_MUTEX(tmp_buf_sem);
 
-int gs_debug = 0;
+int gs_debug;
 
 
 #ifdef DEBUG
index f3a6f6bdfa51f894ba6734fad908d4c9830df073..422054ece933e6fb3315b23195f5eaaf1a078d9d 100644 (file)
        * Small miscellaneous bug fixes (prumpf)
        * Use pci table for PCI id list
 
+       Version 0.9.2:
+       * Simplify open blocking logic
+
  */
 
 
 /*
  * core module and version information
  */
-#define RNG_VERSION "0.9.1"
+#define RNG_VERSION "0.9.2"
 #define RNG_MODULE_NAME "i810_rng"
 #define RNG_DRIVER_NAME   RNG_MODULE_NAME " hardware driver " RNG_VERSION
 #define PFX RNG_MODULE_NAME ": "
@@ -288,8 +291,6 @@ static spinlock_t rng_lock = SPIN_LOCK_UNLOCKED; /* hardware lock */
 static struct timer_list rng_timer;    /* kernel timer for RNG hardware reads and tests */
 static struct pci_dev *rng_pdev;       /* Firmware Hub PCI device found during PCI probe */
 static struct semaphore rng_open_sem;  /* Semaphore for serializing rng_open/release */
-static wait_queue_head_t rng_open_wait;        /* Wait queue for serializing open/release */
-static int rng_open_mode;              /* Open mode (we only allow reads) */
 
 
 /*
@@ -624,22 +625,17 @@ static int rng_dev_open (struct inode *inode, struct file *filp)
        int rc = -EINVAL;
 
        if ((filp->f_mode & FMODE_READ) == 0)
-               goto err_out_ret;
+               return rc;
        if (filp->f_mode & FMODE_WRITE)
-               goto err_out_ret;
+               return rc;
 
        /* wait for device to become free */
-       down (&rng_open_sem);
-       while (rng_open_mode & filp->f_mode) {
-               if (filp->f_flags & O_NONBLOCK) {
-                       up (&rng_open_sem);
-                       return -EWOULDBLOCK;
-               }
-               up (&rng_open_sem);
-               interruptible_sleep_on (&rng_open_wait);
-               if (signal_pending (current))
+       if (filp->f_flags & O_NONBLOCK) {
+               if (down_trylock (&rng_open_sem))
+                       return -EAGAIN;
+       } else {
+               if (down_interruptible (&rng_open_sem))
                        return -ERESTARTSYS;
-               down (&rng_open_sem);
        }
 
        if (rng_enable (1)) {
@@ -647,26 +643,18 @@ static int rng_dev_open (struct inode *inode, struct file *filp)
                goto err_out;
        }
 
-       rng_open_mode |= filp->f_mode & (FMODE_READ | FMODE_WRITE);
-       up (&rng_open_sem);
        return 0;
 
 err_out:
        up (&rng_open_sem);
-err_out_ret:
        return rc;
 }
 
 
 static int rng_dev_release (struct inode *inode, struct file *filp)
 {
-       down(&rng_open_sem);
-
        rng_enable(0);
-       rng_open_mode &= (~filp->f_mode) & (FMODE_READ|FMODE_WRITE);
-
        up (&rng_open_sem);
-       wake_up (&rng_open_wait);
        return 0;
 }
 
@@ -824,7 +812,6 @@ static int __init rng_init (void)
        DPRINTK ("ENTER\n");
 
        init_MUTEX (&rng_open_sem);
-       init_waitqueue_head (&rng_open_wait);
 
        pci_for_each_dev(pdev) {
                if (pci_match_device (rng_pci_tbl, pdev) != NULL)
index 95af0a0f1bfbd7b12446a3c86d20a3fe28b0f24f..896396bad557a78dae22faf213f2c9a46b64be3b 100644 (file)
@@ -51,9 +51,9 @@ static void ii2Nop(void);
 //* Static Data *
 //***************
 
-static int ii2Safe = 0;         // Safe I/O address for delay routine
+static int ii2Safe;         // Safe I/O address for delay routine
 
-static int iiDelayed = 0;      // Set when the iiResetDelay function is
+static int iiDelayed;  // Set when the iiResetDelay function is
                                                        // called. Cleared when ANY board is reset.
 static struct timer_list * pDelayTimer;   // Used by iiDelayTimer
 static wait_queue_head_t pDelayWait;    // Used by iiDelayTimer
index 6fbfe22dfa641a7f33cdaed78404d298d949f97a..a5e3adca6f0666a7bd9f48b8c5ceee9358f3815b 100644 (file)
@@ -295,13 +295,13 @@ static int ref_count;
 /* Here, then is a table of board pointers which the interrupt routine should
  * scan through to determine who it must service.
  */
-static unsigned short i2nBoards = 0; // Number of boards here
+static unsigned short i2nBoards; // Number of boards here
 
 static i2eBordStrPtr i2BoardPtrTable[IP2_MAX_BOARDS];
 
 static i2ChanStrPtr  DevTable[IP2_MAX_PORTS];
 //DevTableMem just used to save addresses for kfree
-static void  *DevTableMem[IP2_MAX_BOARDS] = {NULL,NULL,NULL,NULL};
+static void  *DevTableMem[IP2_MAX_BOARDS];
 
 static struct tty_struct * TtyTable[IP2_MAX_PORTS];
 static struct termios    * Termios[IP2_MAX_PORTS];
@@ -318,8 +318,8 @@ static struct file_operations ip2_ipl = {
        open:           ip2_ipl_open,
 }; 
 
-static long irq_counter = 0;
-static long bh_counter = 0;
+static long irq_counter;
+static long bh_counter;
 
 // Use immediate queue to service interrupts
 //#define USE_IQI      // PCI&2.2 needs work
@@ -330,15 +330,15 @@ static long bh_counter = 0;
  */
 #define  POLL_TIMEOUT   (jiffies + 1)
 static struct timer_list PollTimer = { function: ip2_poll };
-static char  TimerOn = 0;
+static char  TimerOn;
 
 #ifdef IP2DEBUG_TRACE
 /* Trace (debug) buffer data */
 #define TRACEMAX  1000
 static unsigned long tracebuf[TRACEMAX];
-static int tracestuff = 0;
-static int tracestrip = 0;
-static int tracewrap  = 0;
+static int tracestuff;
+static int tracestrip;
+static int tracewrap;
 #endif
 
 /**********/
@@ -372,13 +372,13 @@ static int tracewrap  = 0;
 #      endif   /* LINUX_VERSION */
 #endif /* MODULE */
 
-static int poll_only = 0;
+static int poll_only;
 
-static int Eisa_irq = 0;
-static int Eisa_slot = 0;
+static int Eisa_irq;
+static int Eisa_slot;
 
-static int iindx = 0;
-static char rirqs[IP2_MAX_BOARDS] = {0,};
+static int iindx;
+static char rirqs[IP2_MAX_BOARDS];
 static int Valid_Irqs[] = { 3, 4, 5, 7, 10, 11, 12, 15, 0};
 
 /******************************************************************************/
@@ -584,13 +584,13 @@ int __init
 old_ip2_init(void)
 {
 #ifdef CONFIG_DEVFS_FS
-       static devfs_handle_t devfs_handle = NULL;
+       static devfs_handle_t devfs_handle;
        int j, box;
 #endif
        int i;
        int err;
        int status = 0;
-       static int loaded = 0;
+       static int loaded;
        i2eBordStrPtr pB = NULL;
        int rc = -1;
 
index 71dd53691c597f5e626ca2e4c3656f588a5f8fda..0bcc63a436af241851a9ae6844f834c64459a40a 100644 (file)
@@ -142,7 +142,7 @@ static int  stli_nrbrds = sizeof(stli_brdconf) / sizeof(stlconf_t);
  */
 #define        STLI_EISAPROBE  0
 
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
 
 /*****************************************************************************/
 
@@ -189,7 +189,7 @@ static int                  stli_refcount;
  *     swapping!). All ports will share one buffer - since if the system
  *     is already swapping a shared buffer won't make things any worse.
  */
-static char                    *stli_tmpwritebuf = (char *) NULL;
+static char                    *stli_tmpwritebuf;
 static DECLARE_MUTEX(stli_tmpwritesem);
 
 #define        STLI_TXBUFSIZE          4096
@@ -201,10 +201,10 @@ static DECLARE_MUTEX(stli_tmpwritesem);
  *     with a large memcpy. Just use 1 buffer for all ports, since its
  *     use it is only need for short periods of time by each port.
  */
-static char                    *stli_txcookbuf = (char *) NULL;
-static int                     stli_txcooksize = 0;
-static int                     stli_txcookrealsize = 0;
-static struct tty_struct       *stli_txcooktty = (struct tty_struct *) NULL;
+static char                    *stli_txcookbuf;
+static int                     stli_txcooksize;
+static int                     stli_txcookrealsize;
+static struct tty_struct       *stli_txcooktty;
 
 /*
  *     Define a local default termios struct. All ports will be created
@@ -234,7 +234,7 @@ static stliport_t   stli_dummyport;
 
 static stlibrd_t       *stli_brds[STL_MAXBRDS];
 
-static int             stli_shared = 0;
+static int             stli_shared;
 
 /*
  *     Per board state flags. Used with the state field of the board struct.
@@ -796,7 +796,7 @@ static struct timer_list    stli_timerlist = {
        function: stli_poll
 };
 
-static int     stli_timeron = 0;
+static int     stli_timeron;
 
 /*
  *     Define the calculation for the timeout routine.
index 5a5e1219b3a29eb9610b3a4ae347c87c3cee4288..15ef908a67273398a6df4de44913355dfb2fbde7 100644 (file)
@@ -51,9 +51,9 @@ EXPORT_SYMBOL(gameport_close);
 EXPORT_SYMBOL(gameport_rescan);
 EXPORT_SYMBOL(gameport_cooked_read);
 
-static struct gameport *gameport_list = NULL;
-static struct gameport_dev *gameport_dev = NULL;
-static int gameport_number = 0;
+static struct gameport *gameport_list;
+static struct gameport_dev *gameport_dev;
+static int gameport_number;
 
 /*
  * gameport_measure_speed() measures the gameport i/o speed.
index 9ea8331133aa8403608075bcc5c3047224a3b349..573eac51b2368d5af74e85bedd7cf8593ad75281 100644 (file)
@@ -57,7 +57,8 @@ struct ns558 {
        struct gameport gameport;
 };
        
-static struct ns558 *ns558 = NULL;
+static struct ns558 *ns558;
+static int have_pci_devices;
 
 /*
  * ns558_isa_probe() tries to find an isa gameport at the
@@ -310,6 +311,15 @@ int __init ns558_init(void)
        struct pnp_devid *devid;
 #endif
 
+/*
+ * Probe for PCI ports.  Always probe for PCI first,
+ * it is the least-invasive probe.
+ */
+
+       i = pci_module_init(&ns558_pci_driver);
+       if (i == 0)
+               have_pci_devices = 1;
+
 /*
  * Probe for ISA ports.
  */
@@ -329,14 +339,7 @@ int __init ns558_init(void)
        }
 #endif
 
-/*
- * Probe for PCI ports.
- */
-
-       if (!ns558 && pci_module_init(&ns558_pci_driver))
-               return -ENODEV;
-
-       return 0;
+       return ns558 ? 0 : -ENODEV;
 }
 
 void __exit ns558_exit(void)
@@ -365,7 +368,8 @@ void __exit ns558_exit(void)
                port = port->next;
        }
 
-       pci_unregister_driver(&ns558_pci_driver);
+       if (have_pci_devices)
+               pci_unregister_driver(&ns558_pci_driver);
 }
 
 module_init(ns558_init);
index 9595f0a6cac2420eb21f59499944df8761c8740d..7dc5cd5a1416d0967b36ac0e9081e7c8610827b8 100644 (file)
@@ -44,9 +44,9 @@ EXPORT_SYMBOL(serio_open);
 EXPORT_SYMBOL(serio_close);
 EXPORT_SYMBOL(serio_rescan);
 
-static struct serio *serio_list = NULL;
-static struct serio_dev *serio_dev = NULL;
-static int serio_number = 0;
+static struct serio *serio_list;
+static struct serio_dev *serio_dev;
+static int serio_number;
 
 static void serio_find_dev(struct serio *serio)
 {
index edb5caadf316c51ef2d236964a9bf1f094b6a946..996045c0259c939b73a4f05aa71072c86aa7bfed 100644 (file)
@@ -61,7 +61,7 @@
 #define KBD_DEFLOCK 0
 #endif
 
-void (*kbd_ledfunc)(unsigned int led) = NULL;
+void (*kbd_ledfunc)(unsigned int led);
 EXPORT_SYMBOL(handle_scancode);
 EXPORT_SYMBOL(kbd_ledfunc);
 
@@ -83,24 +83,24 @@ int keyboard_wait_for_keypress(struct console *co)
  */
 
 /* shift state counters.. */
-static unsigned char k_down[NR_SHIFT] = {0, };
+static unsigned char k_down[NR_SHIFT];
 /* keyboard key bitmap */
-static unsigned long key_down[256/BITS_PER_LONG] = { 0, };
+static unsigned long key_down[256/BITS_PER_LONG];
 
-static int dead_key_next = 0;
+static int dead_key_next;
 /* 
  * In order to retrieve the shift_state (for the mouse server), either
  * the variable must be global, or a new procedure must be created to 
  * return the value. I chose the former way.
  */
-int shift_state = 0;
+int shift_state;
 static int npadch = -1;                        /* -1 or number assembled on pad */
-static unsigned char diacr = 0;
-static char rep = 0;                   /* flag telling character repeat */
+static unsigned char diacr;
+static char rep;                       /* flag telling character repeat */
 struct kbd_struct kbd_table[MAX_NR_CONSOLES];
 static struct tty_struct **ttytab;
 static struct kbd_struct * kbd = kbd_table;
-static struct tty_struct * tty = NULL;
+static struct tty_struct * tty;
 
 void compute_shiftstate(void);
 
@@ -160,7 +160,7 @@ struct pt_regs * kbd_pt_regs;
 static int sysrq_pressed;
 #endif
 
-static struct pm_dev *pm_kbd = NULL;
+static struct pm_dev *pm_kbd;
 
 /*
  * Many other routines do put_queue, but I think either
index 95dbdaab23fb6626c239b45ee6a62736b9690f49..5a869954b3cde659e6f6331b3ea4f57f5d3b601d 100644 (file)
@@ -174,7 +174,7 @@ static struct file_operations misc_fops = {
  
 int misc_register(struct miscdevice * misc)
 {
-       static devfs_handle_t devfs_handle = NULL;
+       static devfs_handle_t devfs_handle;
 
        if (misc->next || misc->prev)
                return -EBUSY;
index fbbec0fb18505e2ad19199ad43ef6cb6d623b14d..1681ac603339b0052e00cf4fcc371e5879150525 100644 (file)
@@ -170,10 +170,10 @@ static mxser_pciinfo mxser_pcibrds[] =
        {PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_C104, MXSER_BOARD_C104_PCI},
 };
 
-static int ioaddr[MXSER_BOARDS] = {0, 0, 0, 0};
+static int ioaddr[MXSER_BOARDS];
 static int ttymajor = MXSERMAJOR;
 static int calloutmajor = MXSERCUMAJOR;
-static int verbose = 0;
+static int verbose;
 
 /* Variables for insmod */
 
@@ -274,7 +274,7 @@ static int mxvar_diagflag;
  * buffer across all the serial ports, since it significantly saves
  * memory if large numbers of serial ports are open.
  */
-static unsigned char *mxvar_tmp_buf = 0;
+static unsigned char *mxvar_tmp_buf;
 static struct semaphore mxvar_tmp_buf_sem;
 
 /*
index 556d8630e206d5e2426b077a6cbc40421c4fa61c..862994025ba76d77e33ecd4eff8d2aa06f4d90a7 100644 (file)
@@ -68,7 +68,7 @@ static struct pc110pad_params current_params;
 /* driver/filesystem interface management */
 static wait_queue_head_t queue;
 static struct fasync_struct *asyncptr;
-static int active=0;   /* number of concurrent open()s */
+static int active;     /* number of concurrent open()s */
 static struct semaphore reader_lock;
 
 /**
@@ -111,10 +111,10 @@ static void wake_readers(void)
  * up/down mouse events to be created by incrementing synthesize_tap.
  */
  
-static int button_pending=0;
-static int recent_transition=0;
-static int transition_count=0;
-static int synthesize_tap=0;
+static int button_pending;
+static int recent_transition;
+static int transition_count;
+static int synthesize_tap;
 static void tap_timeout(unsigned long data);
 static struct timer_list tap_timer = { function: tap_timeout };
 
@@ -218,13 +218,13 @@ static void read_button(int *b)
  */
 
 static int raw_data[3];
-static int raw_data_count=0;
-static int raw_x=0, raw_y=0;   /* most recent absolute co-ords read */
-static int raw_down=0;         /* raw up/down state */
-static int debounced_down=0;   /* up/down state after debounce processing */
+static int raw_data_count;
+static int raw_x, raw_y;       /* most recent absolute co-ords read */
+static int raw_down;           /* raw up/down state */
+static int debounced_down;     /* up/down state after debounce processing */
 static enum { NO_BOUNCE, JUST_GONE_UP, JUST_GONE_DOWN } bounce=NO_BOUNCE;
                                /* set just after an up/down transition */
-static int xy_pending=0;       /* set if new data have not yet been read */
+static int xy_pending; /* set if new data have not yet been read */
 
 /* 
  * Timer goes off a short while after an up/down transition and copies
@@ -425,7 +425,7 @@ static void read_raw_pad(int *down, int *debounced, int *x, int *y)
  * will make much sense in that case.
  */
 static int read_bytes[3];
-static int read_byte_count=0;
+static int read_byte_count;
 
 /**
  *     sample_raw:
index d9276b7534f5dea1b98ceb5de6fd5606e1506c4c..117ae4ec1100cc1b55f045acff7d2b3f8e38d68e 100644 (file)
@@ -69,9 +69,9 @@ spinlock_t kbd_controller_lock = SPIN_LOCK_UNLOCKED;
 static unsigned char handle_kbd_event(void);
 
 /* used only by send_data - set by keyboard_interrupt */
-static volatile unsigned char reply_expected = 0;
-static volatile unsigned char acknowledge = 0;
-static volatile unsigned char resend = 0;
+static volatile unsigned char reply_expected;
+static volatile unsigned char acknowledge;
+static volatile unsigned char resend;
 
 
 #if defined CONFIG_PSMOUSE
@@ -84,9 +84,9 @@ static int __init psaux_init(void);
 #define AUX_RECONNECT 170 /* scancode when ps2 device is plugged (back) in */
  
 static struct aux_queue *queue;        /* Mouse data buffer. */
-static int aux_count = 0;
+static int aux_count;
 /* used when we send commands to the mouse that expect an ACK. */
-static unsigned char mouse_reply_expected = 0;
+static unsigned char mouse_reply_expected;
 
 #define AUX_INTS_OFF (KBD_MODE_KCC | KBD_MODE_DISABLE_MOUSE | KBD_MODE_SYS | KBD_MODE_KBD_INT)
 #define AUX_INTS_ON  (KBD_MODE_KCC | KBD_MODE_SYS | KBD_MODE_MOUSE_INT | KBD_MODE_KBD_INT)
@@ -291,7 +291,7 @@ static int do_acknowledge(unsigned char scancode)
 int pckbd_translate(unsigned char scancode, unsigned char *keycode,
                    char raw_mode)
 {
-       static int prev_scancode = 0;
+       static int prev_scancode;
 
        /* special prefix scancodes.. */
        if (scancode == 0xe0 || scancode == 0xe1) {
index 9b85db1d652517004ffbef6d12f5a8940efaced1..544d79e73d3191beb75aa6b8d44c4ee6189fd6c6 100644 (file)
@@ -595,7 +595,7 @@ static struct file_operations pp_fops = {
        release:        pp_release,
 };
 
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
 
 static int __init ppdev_init (void)
 {
index bba9ddd31542abf40a4971c091fa689243b30205..922f56a0c4d022f7fbb3593cfbe3f7b887095971 100644 (file)
@@ -110,8 +110,8 @@ static int fasync_qp(int fd, struct file *filp, int on)
 
 #define QP_IRQ          12
 
-static int qp_present = 0;
-static int qp_count = 0;
+static int qp_present;
+static int qp_count;
 static int qp_data = QP_DATA;
 static int qp_status = QP_STATUS;
 
index 228c609da59c4ab088350a1eecb736ea9ea30f5e..bf1242e3514de57730e42344aaa36c2150140479 100644 (file)
@@ -763,7 +763,7 @@ static void add_timer_randomness(struct timer_rand_state *state, unsigned num)
 
 void add_keyboard_randomness(unsigned char scancode)
 {
-       static unsigned char last_scancode = 0;
+       static unsigned char last_scancode;
        /* ignore autorepeat (multiple key down w/o key up) */
        if (scancode != last_scancode) {
                last_scancode = scancode;
@@ -1998,8 +1998,8 @@ static __u32 twothirdsMD4Transform (__u32 const buf[4], __u32 const in[12])
 __u32 secure_tcpv6_sequence_number(__u32 *saddr, __u32 *daddr,
                                   __u16 sport, __u16 dport)
 {
-       static __u32    rekey_time = 0;
-       static __u32    count = 0;
+       static __u32    rekey_time;
+       static __u32    count;
        static __u32    secret[12];
        struct timeval  tv;
        __u32           seq;
@@ -2027,7 +2027,7 @@ __u32 secure_tcpv6_sequence_number(__u32 *saddr, __u32 *daddr,
 
 __u32 secure_ipv6_id(__u32 *daddr)
 {
-       static time_t   rekey_time = 0;
+       static time_t   rekey_time;
        static __u32    secret[12];
        time_t          t;
 
@@ -2050,8 +2050,8 @@ __u32 secure_ipv6_id(__u32 *daddr)
 __u32 secure_tcp_sequence_number(__u32 saddr, __u32 daddr,
                                 __u16 sport, __u16 dport)
 {
-       static __u32    rekey_time = 0;
-       static __u32    count = 0;
+       static __u32    rekey_time;
+       static __u32    count;
        static __u32    secret[12];
        struct timeval  tv;
        __u32           seq;
@@ -2105,7 +2105,7 @@ __u32 secure_tcp_sequence_number(__u32 saddr, __u32 daddr,
  */
 __u32 secure_ip_id(__u32 daddr)
 {
-       static time_t   rekey_time = 0;
+       static time_t   rekey_time;
        static __u32    secret[12];
        time_t          t;
 
@@ -2144,7 +2144,7 @@ __u32 secure_ip_id(__u32 daddr)
 #define COOKIEBITS 24  /* Upper bits store count */
 #define COOKIEMASK (((__u32)1 << COOKIEBITS) - 1)
 
-static int     syncookie_init = 0;
+static int     syncookie_init;
 static __u32   syncookie_secret[2][16-3+HASH_BUFFER_SIZE];
 
 __u32 secure_tcp_syn_cookie(__u32 saddr, __u32 daddr, __u16 sport,
index 93d1e1c46a40af678f0c6f8b047787e546a18a92..7ff56f84f15ee0d19490aba06c21ab9693c5fb11 100644 (file)
@@ -211,7 +211,7 @@ void my_hd (void *addr, int len);
 static struct tty_driver rio_driver, rio_callout_driver;
 static struct tty_driver rio_driver2, rio_callout_driver2;
 
-static struct tty_struct * rio_table[RIO_NPORTS] = { NULL, };
+static struct tty_struct * rio_table[RIO_NPORTS];
 static struct termios ** rio_termios;
 static struct termios ** rio_termios_locked;
 
@@ -223,9 +223,9 @@ struct rio_info *p;
 struct rio_port *rio_ports;
 
 int rio_refcount;
-int rio_initialized = 0;
-int rio_nports = 0;
-int rio_debug = 0;
+int rio_initialized;
+int rio_nports;
+int rio_debug;
 
 
 /* You can have the driver poll your card. 
index 34e1dd51ce069adbfa5554edb5a74d30c64af9f2..d00e3c4fe38291c14e17bc9c14cca804d1a41abf 100644 (file)
@@ -82,13 +82,13 @@ DECLARE_TASK_QUEUE(tq_riscom);
 #define RISCOM_TYPE_NORMAL     1
 #define RISCOM_TYPE_CALLOUT    2
 
-static struct riscom_board * IRQ_to_board[16] = { NULL, } ;
+static struct riscom_board * IRQ_to_board[16];
 static struct tty_driver riscom_driver, riscom_callout_driver;
-static int    riscom_refcount = 0;
-static struct tty_struct * riscom_table[RC_NBOARD * RC_NPORT] = { NULL, };
-static struct termios * riscom_termios[RC_NBOARD * RC_NPORT] = { NULL, };
-static struct termios * riscom_termios_locked[RC_NBOARD * RC_NPORT] = { NULL, };
-static unsigned char * tmp_buf = NULL;
+static int    riscom_refcount;
+static struct tty_struct * riscom_table[RC_NBOARD * RC_NPORT];
+static struct termios * riscom_termios[RC_NBOARD * RC_NPORT];
+static struct termios * riscom_termios_locked[RC_NBOARD * RC_NPORT];
+static unsigned char * tmp_buf;
 static DECLARE_MUTEX(tmp_buf_sem);
 
 static unsigned long baud_table[] =  {
@@ -103,9 +103,7 @@ static struct riscom_board rc_board[RC_NBOARD] =  {
        { 0, RC_IOBASE4, 0, },
 };
 
-static struct riscom_port rc_port[RC_NBOARD * RC_NPORT] =  {
-       { 0, },
-};
+static struct riscom_port rc_port[RC_NBOARD * RC_NPORT];
                
 /* RISCom/8 I/O ports addresses (without address translation) */
 static unsigned short rc_ioport[] =  {
index 3d754212e04b66a2920d49647ffd4a4773f5ad40..5cecdde405a69d765f270b4048a2187d215afa25 100644 (file)
@@ -154,26 +154,26 @@ static void rp_wait_until_sent(struct tty_struct *tty, int timeout);
 static void rp_flush_buffer(struct tty_struct *tty);
 
 static struct tty_driver rocket_driver, callout_driver;
-static int rocket_refcount = 0;
+static int rocket_refcount;
 
-static int rp_num_ports_open = 0;
+static int rp_num_ports_open;
 
 static struct timer_list rocket_timer;
 
-unsigned long board1 = 0;
-unsigned long board2 = 0;
-unsigned long board3 = 0;
-unsigned long board4 = 0;
-unsigned long controller = 0;
-unsigned long support_low_speed = 0;
+unsigned long board1;
+unsigned long board2;
+unsigned long board3;
+unsigned long board4;
+unsigned long controller;
+unsigned long support_low_speed;
 int rp_baud_base = 460800;
 static unsigned long rcktpt_io_addr[NUM_BOARDS];
 static int max_board;
 #ifdef TIME_STAT
-static unsigned long long time_stat = 0;
-static unsigned long time_stat_short = 0;
-static unsigned long time_stat_long = 0;
-static unsigned long time_counter = 0;
+static unsigned long long time_stat;
+static unsigned long time_stat_short;
+static unsigned long time_stat_long;
+static unsigned long time_counter;
 #endif
 
 #if ((LINUX_VERSION_CODE > 0x020111) && defined(MODULE))
index 9eb56403e5b2906976d7b82db2a69d2da02eed5d..0c3deed841652fce2eb9989ae1fee72d1e8687c9 100644 (file)
 
 static void wdt_timer_ping(unsigned long);
 static struct timer_list timer;
-static unsigned long next_heartbeat = 0;
-static int wdt_is_open = 0;
-static int wdt_expect_close = 0;
+static unsigned long next_heartbeat;
+static int wdt_is_open;
+static int wdt_expect_close;
 
 /*
  *     Whack the dog
index f0f67c0cf0704cd2e8c419729634c591ddda8fb6..b804a61e1f093fac3a1f01ecd56340b3b86fcf6d 100644 (file)
@@ -36,11 +36,11 @@ extern void poke_blanked_console(void);
 
 /* Variables for selection control. */
 /* Use a dynamic buffer, instead of static (Dec 1994) */
-       int sel_cons = 0;               /* must not be disallocated */
+       int sel_cons;           /* must not be disallocated */
 static volatile int sel_start = -1;    /* cleared by clear_selection */
 static int sel_end;
-static int sel_buffer_lth = 0;
-static char *sel_buffer = NULL;
+static int sel_buffer_lth;
+static char *sel_buffer;
 
 /* clear_selection, highlight and highlight_pointer can be called
    from interrupt (via scrollback/front) */
index 7ee9b021174100bf14dbc41d5173e4aeee6818ef..85da92470d621fb449b93c1e4b47d6a77911fe99 100644 (file)
@@ -267,7 +267,7 @@ static struct rs_multiport_struct rs_multiport[NR_IRQS];
 static int IRQ_timeout[NR_IRQS];
 #ifdef CONFIG_SERIAL_CONSOLE
 static struct console sercons;
-static int lsr_break_flag = 0;
+static int lsr_break_flag;
 #endif
 #if defined(CONFIG_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
 static unsigned long break_pressed; /* break, really ... */
@@ -325,7 +325,7 @@ static struct serial_state rs_table[RS_TABLE_SIZE] = {
 #define NR_PCI_BOARDS  8
 
 static struct pci_board_inst   serial_pci_board[NR_PCI_BOARDS];
-static int serial_pci_board_idx = 0;
+static int serial_pci_board_idx;
 
 #ifndef IS_PCI_REGION_IOPORT
 #define IS_PCI_REGION_IOPORT(dev, r) (pci_resource_flags((dev), (r)) & \
@@ -1060,7 +1060,7 @@ static void do_softint(void *private_)
  */
 static void rs_timer(unsigned long dummy)
 {
-       static unsigned long last_strobe = 0;
+       static unsigned long last_strobe;
        struct async_struct *info;
        unsigned int    i;
        unsigned long flags;
index cb508cbe2217cd5f49a3d8fe49ba180be721ee6b..e3f68ba30631f80eed41fa50ba35e888bc89ede8 100644 (file)
@@ -58,7 +58,7 @@ static void watchdog_fire(unsigned long);
 static struct timer_list watchdog_ticktock = {
        function:       watchdog_fire,
 };
-static int timer_alive = 0;
+static int timer_alive;
 
 
 /*
index eab300d5f31b51085a6429a852bc135b0bd4658d..6e3c6a99c3773355f85db23d708f7a13f82595f3 100644 (file)
@@ -181,11 +181,11 @@ DECLARE_TASK_QUEUE(tq_specialix);
 #define SPECIALIX_TYPE_CALLOUT 2
 
 static struct tty_driver specialix_driver, specialix_callout_driver;
-static int    specialix_refcount = 0;
-static struct tty_struct * specialix_table[SX_NBOARD * SX_NPORT] = { NULL, };
-static struct termios * specialix_termios[SX_NBOARD * SX_NPORT] = { NULL, };
-static struct termios * specialix_termios_locked[SX_NBOARD * SX_NPORT] = { NULL, };
-static unsigned char * tmp_buf = NULL;
+static int    specialix_refcount;
+static struct tty_struct * specialix_table[SX_NBOARD * SX_NPORT];
+static struct termios * specialix_termios[SX_NBOARD * SX_NPORT];
+static struct termios * specialix_termios_locked[SX_NBOARD * SX_NPORT];
+static unsigned char * tmp_buf;
 static DECLARE_MUTEX(tmp_buf_sem);
 
 static unsigned long baud_table[] =  {
@@ -200,9 +200,7 @@ static struct specialix_board sx_board[SX_NBOARD] =  {
        { 0, SX_IOBASE4, 15, },
 };
 
-static struct specialix_port sx_port[SX_NBOARD * SX_NPORT] =  {
-       { 0, },
-};
+static struct specialix_port sx_port[SX_NBOARD * SX_NPORT];
                
 
 #ifdef SPECIALIX_TIMER
@@ -1013,7 +1011,7 @@ static void sx_change_speed(struct specialix_board *bp, struct specialix_port *p
        long tmp;
        unsigned char cor1 = 0, cor3 = 0;
        unsigned char mcor1 = 0, mcor2 = 0;
-       static int again=0;
+       static int again;
        
        if (!(tty = port->tty) || !tty->termios)
                return;
index a0faeada4526f4f8bd565a66aec843f4abae6c0c..8907fdeab9a6fc3aa2cf56c02b36a13e2c1b7d0e 100644 (file)
@@ -146,7 +146,7 @@ static struct tty_driver    stl_callout;
 static struct tty_struct       *stl_ttys[STL_MAXDEVS];
 static struct termios          *stl_termios[STL_MAXDEVS];
 static struct termios          *stl_termioslocked[STL_MAXDEVS];
-static int                     stl_refcount = 0;
+static int                     stl_refcount;
 
 /*
  *     We will need to allocate a temporary write buffer for chars that
@@ -192,7 +192,7 @@ static char         stl_unwanted[SC26198_RXFIFOSIZE];
  *     shared with another Stallion board.
  */
 static int     stl_gotintrs[STL_MAXBRDS];
-static int     stl_numintrs = 0;
+static int     stl_numintrs;
 
 /*****************************************************************************/
 
@@ -748,7 +748,7 @@ static struct file_operations       stl_fsiomem = {
 
 /*****************************************************************************/
 
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
 
 #ifdef MODULE
 
index e6336fc03e7132fd8088c4328d1487670a23dc58..3dd5811d96b044eb1bee49cdb68e6cac4987366a 100644 (file)
@@ -309,16 +309,16 @@ static int sx_init_drivers(void);
 
 static struct tty_driver sx_driver, sx_callout_driver;
 
-static struct tty_struct * sx_table[SX_NPORTS] = { NULL, };
+static struct tty_struct * sx_table[SX_NPORTS];
 static struct termios ** sx_termios;
 static struct termios ** sx_termios_locked;
 
 struct sx_board boards[SX_NBOARDS];
 struct sx_port *sx_ports;
 int sx_refcount;
-int sx_initialized = 0;
-int sx_nports = 0;
-int sx_debug = 0;
+int sx_initialized;
+int sx_nports;
+int sx_debug;
 
 
 /* You can have the driver poll your card. 
@@ -330,7 +330,7 @@ int sx_debug = 0;
       everything will continue to work.... 
  */
 int sx_poll = 1;
-int sx_slowpoll = 0;
+int sx_slowpoll;
 
 /* The card limits the number of interrupts per second. 
    At 115k2 "100" should be sufficient. 
@@ -2077,7 +2077,7 @@ static int sx_init_board (struct sx_board *board)
 
 void printheader(void)
 {
-       static int header_printed = 0;
+       static int header_printed;
 
        if (!header_printed) {
                printk (KERN_INFO "Specialix SX driver "
index 9650457c0cf3334475387271ef4300ac60013fce..3c05aa042306f33d38f0be420ece2852673207ff 100644 (file)
@@ -34,7 +34,7 @@ extern struct list_head super_blocks;
 int sysrq_enabled = 1;
 
 /* Machine specific power off function */
-void (*sysrq_power_off)(void) = NULL;
+void (*sysrq_power_off)(void);
 
 EXPORT_SYMBOL(sysrq_power_off);
 
index 14a42682d85d2dff72215e13054550f334fd096b..cf521edfe418d9a0887e0831f9fef3c5ac7d71b2 100644 (file)
 
 static struct mtconfiginfo qic02_tape_dynconf =        /* user settable */
     { 0, 0, BOGUS_IRQ, 0, 0, TPQD_DEFAULT_FLAGS, };
-static struct qic02_ccb qic02_tape_ccb = { 0, };       /* private stuff */
+static struct qic02_ccb qic02_tape_ccb       /* private stuff */
 
 #else
 
@@ -127,7 +127,7 @@ unsigned long qic02_tape_debug = TPQD_DEFAULT_FLAGS;
 # endif
 #endif /* CONFIG_QIC02_DYNCONF */
 
-static volatile int ctlbits = 0;     /* control reg bits for tape interface */
+static volatile int ctlbits;     /* control reg bits for tape interface */
 
 static wait_queue_head_t qic02_tape_transfer; /* sync rw with interrupts */
 
@@ -149,10 +149,10 @@ static            flag status_zombie = YES; /* it's `zombie' until irq/dma allocated */
 static volatile flag status_bytes_wr = NO;     /* write FM at close or not */
 static volatile flag status_bytes_rd = NO;     /* (rd|wr) used for rewinding */
 
-static volatile unsigned long status_cmd_pending = 0; /* cmd in progress */
+static volatile unsigned long status_cmd_pending; /* cmd in progress */
 static volatile flag status_expect_int = NO;   /* ready for interrupts */
 static volatile flag status_timer_on = NO;     /* using time-out */
-static volatile int  status_error = 0;         /* int handler may detect error */
+static volatile int  status_error;             /* int handler may detect error */
 static volatile flag status_eof_detected = NO; /* end of file */
 static volatile flag status_eom_detected = NO; /* end of recorded media */
 static volatile flag status_eot_detected = NO; /* end of tape */
@@ -161,7 +161,7 @@ static volatile flag doing_write = NO;
 
 static volatile unsigned long dma_bytes_todo;
 static volatile unsigned long dma_bytes_done;
-static volatile unsigned dma_mode = 0;         /* !=0 also means DMA in use */
+static volatile unsigned dma_mode;             /* !=0 also means DMA in use */
 static                 flag need_rewind = YES;
 
 static kdev_t current_tape_dev;
@@ -208,7 +208,7 @@ static void qic02_release_resources(void);
  * must ensure that a large enough buffer is passed to the kernel, in order
  * to reduce tape repositioning wear and tear.
  */
-static unsigned long buffaddr = 0;     /* physical address of buffer */
+static unsigned long buffaddr; /* physical address of buffer */
 
 /* This translates minor numbers to the corresponding recording format: */
 static const char *format_names[] = {
index 6b75609e058425eb860140cff52617d64913456c..30de22081c81e2aaf09d5826d9b08ce20209de98 100644 (file)
@@ -1414,7 +1414,7 @@ init_dev_done:
        if ((tty->driver.type == TTY_DRIVER_TYPE_SERIAL) &&
            (tty->driver.subtype == SERIAL_TYPE_CALLOUT) &&
            (tty->count == 1)) {
-               static int nr_warns = 0;
+               static int nr_warns;
                if (nr_warns < 5) {
                        printk(KERN_WARNING "tty_io.c: "
                                "process %d (%s) used obsolete /dev/%s - "
index 920873d9ef11eae49e1ee72720d83aa921edb0f6..e6032c24d980b26a929ee1672f919af73612ce15 100644 (file)
@@ -459,7 +459,7 @@ static struct file_operations vcs_fops = {
        open:           vcs_open,
 };
 
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
 
 void vcs_make_devfs (unsigned int index, int unregister)
 {
index 0e4872098057f7849c7e61a7c833dcb4a01ce09f..1bc175d16a2fcba8b3c76f694ea9d73784760fd7 100644 (file)
@@ -36,7 +36,7 @@
 #include <asm/vc_ioctl.h>
 #endif /* CONFIG_FB_COMPAT_XPMAC */
 
-char vt_dont_switch = 0;
+char vt_dont_switch;
 extern struct tty_driver console_driver;
 
 #define VT_IS_IN_USE(i)        (console_driver.table[i] && console_driver.table[i]->count)
index bbfb5d992df45bdadf9ba74f08aa7bb7f4b2cf61..4993e6cbeaea360cf93d733004654725e93400b0 100644 (file)
@@ -43,7 +43,7 @@
 #define FCLK   (50*1000*1000)          /* 50MHz */
 
 static int soft_margin = TIMER_MARGIN; /* in seconds */
-static int timer_alive = 0;
+static int timer_alive;
 
 #ifdef ONLY_TESTING
 /*
index d9ea545a766034eacbc1dcbce2ec2da5ea3d5454..1767fbf3baa0af2e32481fa41cdccd366082a815 100644 (file)
@@ -29,8 +29,8 @@
 #define WATCHDOG_MINOR 130
 
 static int timeout = 3;
-static int timer_alive = 0;
-static int testmode = 0;
+static int timer_alive;
+static int testmode;
 
 /*
  *     Allow only one person to hold it open
index d39e32529fed46646258a3030cd9c80e44de7586..87871fa1503d5272f19cd27131a93ee7f1c86415 100644 (file)
@@ -183,7 +183,7 @@ static struct reply_info events[I2O_EVT_Q_LEN];
 static int evt_in = 0;
 static int evt_out = 0;
 static int evt_q_len = 0;
-#define MODINC(x,y) (x = x++ % y)
+#define MODINC(x,y) ((x) = ((x) + 1) % (y))
 
 /*
  * I2O configuration spinlock. This isnt a big deal for contention
index d4687f7031f0a2105c07f38916b5aabbaab2c251..2c71d637f6f7488a4644787e97dcc273ae877fa5 100644 (file)
@@ -69,6 +69,7 @@ if [ "$CONFIG_BLK_DEV_IDE" != "n" ]; then
            dep_bool '    PROMISE PDC20246/PDC20262/PDC20267 support' CONFIG_BLK_DEV_PDC202XX $CONFIG_BLK_DEV_IDEDMA_PCI
            dep_bool '      Special UDMA Feature' CONFIG_PDC202XX_BURST $CONFIG_BLK_DEV_PDC202XX
            dep_bool '    SiS5513 chipset support' CONFIG_BLK_DEV_SIS5513 $CONFIG_BLK_DEV_IDEDMA_PCI $CONFIG_X86
+           dep_bool '    SLC90E66 chipset support' CONFIG_BLK_DEV_SLC90E66 $CONFIG_BLK_DEV_IDEDMA_PCI $CONFIG_X86
            dep_bool '    Tekram TRM290 chipset support (EXPERIMENTAL)' CONFIG_BLK_DEV_TRM290 $CONFIG_BLK_DEV_IDEDMA_PCI
            dep_bool '    VIA82CXXX chipset support' CONFIG_BLK_DEV_VIA82CXXX $CONFIG_BLK_DEV_IDEDMA_PCI
          fi
@@ -157,6 +158,7 @@ if [ "$CONFIG_IDE_CHIPSETS" = "y" -o \
      "$CONFIG_BLK_DEV_PDC202XX" = "y" -o \
      "$CONFIG_BLK_DEV_PIIX" = "y" -o \
      "$CONFIG_BLK_DEV_SIS5513" = "y" -o \
+     "$CONFIG_BLK_DEV_SLC90E66" = "y" -o \
      "$CONFIG_BLK_DEV_SL82C105" = "y" -o \
      "$CONFIG_BLK_DEV_VIA82CXXX" = "y" ]; then
    define_bool CONFIG_BLK_DEV_IDE_MODES y
index 43fd39a8dbffb3a148a5d269ec489816e2d34852..c4603e734e2193f5030461d0bcdd6cf4883df2b3 100644 (file)
@@ -50,6 +50,7 @@ ide-obj-$(CONFIG_BLK_DEV_QD6580)      += qd6580.o
 ide-obj-$(CONFIG_BLK_DEV_IDE_RAPIDE)   += rapide.o
 ide-obj-$(CONFIG_BLK_DEV_RZ1000)       += rz1000.o
 ide-obj-$(CONFIG_BLK_DEV_SIS5513)      += sis5513.o
+ide-obj-$(CONFIG_BLK_DEV_SLC90E66)     += slc90e66.o
 ide-obj-$(CONFIG_BLK_DEV_SL82C105)     += sl82c105.o
 ide-obj-$(CONFIG_BLK_DEV_TRM290)       += trm290.o
 ide-obj-$(CONFIG_BLK_DEV_UMC8672)      += umc8672.o
index 41768bb908863fa1f133c5371b7387bad5c0eca1..813aecd3b46efbb7bacf6111e123a2a4f3600b73 100644 (file)
@@ -171,11 +171,11 @@ static int ali_get_info (char *buffer, char **addr, off_t offset, int count)
                                ((reg5yh & 0x30)>>4) + 12 );
                }
        } else {
-               p += sprintf(p, q,
-                       (tmp = (reg5xh & 0x03)) ? (tmp << 3) : 4,
-                       (tmp = ((reg5xh & 0x30)>>4)) ? (tmp << 3) : 4,
-                       (tmp = (reg5yh & 0x03)) ? (tmp << 3) : 4,
-                       (tmp = ((reg5yh & 0x30)>>4)) ? (tmp << 3) : 4 );
+               int t1 = (tmp = (reg5xh & 0x03)) ? (tmp << 3) : 4;
+               int t2 = (tmp = ((reg5xh & 0x30)>>4)) ? (tmp << 3) : 4;
+               int t3 = (tmp = (reg5yh & 0x03)) ? (tmp << 3) : 4;
+               int t4 = (tmp = ((reg5yh & 0x30)>>4)) ? (tmp << 3) : 4;
+               p += sprintf(p, q, t1, t2, t3, t4);
        }
 
 #if 0
index 710b6654d97d76717c3f2a5f4294de5699ca59c9..7ef6f645a2286e27c6cc16b08c5a28267f345492 100644 (file)
@@ -117,19 +117,15 @@ static int __init find_buddha(void)
     buddha_num_hwifs = 0;
     while ((z = zorro_find_device(ZORRO_WILDCARD, z))) {
        unsigned long board;
-       const char *name;
-       if (z->id == ZORRO_PROD_INDIVIDUAL_COMPUTERS_BUDDHA) {
+       if (z->id == ZORRO_PROD_INDIVIDUAL_COMPUTERS_BUDDHA)
            buddha_num_hwifs = BUDDHA_NUM_HWIFS;
-           name = "Buddha IDE Interface";
-       } else if (z->id == ZORRO_PROD_INDIVIDUAL_COMPUTERS_CATWEASEL) {
+       else if (z->id == ZORRO_PROD_INDIVIDUAL_COMPUTERS_CATWEASEL)
            buddha_num_hwifs = CATWEASEL_NUM_HWIFS;
-           name = "Catweasel IDE Interface and Floppy Controller";
-       } else
+       else
            continue;
        board = z->resource.start;
        if (!request_mem_region(board+BUDDHA_BASE1, 0x800, "IDE"))
            continue;
-       strcpy(z->name, name);
        buddha_board = ZTWO_VADDR(board);
        /* write to BUDDHA_IRQ_MR to enable the board IRQ */
        *(char *)(buddha_board+BUDDHA_IRQ_MR) = 0;
index ae9f62768c559372b60731a473d783e448aa5dec..9d0fc8e740878ac59939cc405ee95445f466eaf0 100644 (file)
@@ -64,8 +64,8 @@ static void idedisk_bswap_data (void *buffer, int wcount)
        u16 *p = buffer;
 
        while (wcount--) {
-               *p++ = *p << 8 | *p >> 8;
-               *p++ = *p << 8 | *p >> 8;
+               *p = *p << 8 | *p >> 8; p++;
+               *p = *p << 8 | *p >> 8; p++;
        }
 }
 
index fa765d76f21f4095fcbab3ddc5fd20e1a3fa0629..2dfef8bee0d5bace67a6c942a88c3920ae332174 100644 (file)
@@ -224,7 +224,8 @@ int ide_ata66_check (ide_drive_t *drive, byte cmd, byte nsect, byte feature)
 #ifndef CONFIG_IDEDMA_IVB
                if ((drive->id->hw_config & 0x6000) == 0) {
 #else /* !CONFIG_IDEDMA_IVB */
-               if ((drive->id->hw_config & 0x2000) == 0) {
+               if (((drive->id->hw_config & 0x2000) == 0) ||
+                   ((drive->id->hw_config & 0x4000) == 0)) {
 #endif /* CONFIG_IDEDMA_IVB */
                        printk("%s: Speed warnings UDMA 3/4/5 is not functional.\n", drive->name);
                        return 1;
@@ -260,7 +261,7 @@ byte eighty_ninty_three (ide_drive_t *drive)
 #ifndef CONFIG_IDEDMA_IVB
                        (drive->id->hw_config & 0x4000) &&
 #endif /* CONFIG_IDEDMA_IVB */
-                       (drive->id->hw_config & 0x2000)) ? 1 : 0);
+                       (drive->id->hw_config & 0x6000)) ? 1 : 0);
 }
 
 /*
index 561b1c3cf898d1d88bc1b9bd91b23a34ac9f6681..3367d5c1fc0db6dc53fd1dd6f16f05908bcdd952 100644 (file)
@@ -72,6 +72,7 @@
 #define DEVID_CS5530   ((ide_pci_devid_t){PCI_VENDOR_ID_CYRIX,   PCI_DEVICE_ID_CYRIX_5530_IDE})
 #define DEVID_AMD7403  ((ide_pci_devid_t){PCI_VENDOR_ID_AMD,     PCI_DEVICE_ID_AMD_COBRA_7403})
 #define DEVID_AMD7409  ((ide_pci_devid_t){PCI_VENDOR_ID_AMD,     PCI_DEVICE_ID_AMD_VIPER_7409})
+#define DEVID_SLC90E66 ((ide_pci_devid_t){PCI_VENDOR_ID_EFAR,    PCI_DEVICE_ID_EFAR_SLC90E66_1})
 
 #define        IDE_IGNORE      ((void *)-1)
 
@@ -253,6 +254,19 @@ extern void ide_init_sis5513(ide_hwif_t *);
 #define INIT_SIS5513   NULL
 #endif
 
+#ifdef CONFIG_BLK_DEV_SLC90E66
+extern unsigned int pci_init_slc90e66(struct pci_dev *, const char *);
+extern unsigned int ata66_slc90e66(ide_hwif_t *);
+extern void ide_init_slc90e66(ide_hwif_t *);
+#define PCI_SLC90E66   &pci_init_slc90e66
+#define ATA66_SLC90E66 &ata66_slc90e66
+#define INIT_SLC90E66  &ide_init_slc90e66
+#else
+#define PCI_SLC90E66   NULL
+#define ATA66_SLC90E66 NULL
+#define INIT_SLC90E66  NULL
+#endif
+
 #ifdef CONFIG_BLK_DEV_SL82C105
 extern void ide_init_sl82c105(ide_hwif_t *);
 extern void ide_dmacapable_sl82c105(ide_hwif_t *, unsigned long);
@@ -351,6 +365,7 @@ static ide_pci_device_t ide_pci_chipsets[] __initdata = {
        {DEVID_CS5530,  "CS5530",       PCI_CS5530,     NULL,           INIT_CS5530,    NULL,           {{0x00,0x00,0x00}, {0x00,0x00,0x00}},   ON_BOARD,       0 },
        {DEVID_AMD7403, "AMD7403",      NULL,           NULL,           NULL,           NULL,           {{0x00,0x00,0x00}, {0x00,0x00,0x00}},   ON_BOARD,       0 },
        {DEVID_AMD7409, "AMD7409",      PCI_AMD7409,    ATA66_AMD7409,  INIT_AMD7409,   DMA_AMD7409,    {{0x40,0x01,0x01}, {0x40,0x02,0x02}},   ON_BOARD,       0 },
+       {DEVID_SLC90E66,"SLC90E66",     PCI_SLC90E66,   ATA66_SLC90E66, INIT_SLC90E66,  NULL,           {{0x41,0x80,0x80}, {0x43,0x80,0x80}},   ON_BOARD,       0 },
        {IDE_PCI_DEVID_NULL, "PCI_IDE", NULL,           NULL,           NULL,           NULL,           {{0x00,0x00,0x00}, {0x00,0x00,0x00}},   ON_BOARD,       0 }};
 
 /*
@@ -466,7 +481,7 @@ static int __init ide_setup_pci_baseregs (struct pci_dev *dev, const char *name)
         */
        for (reg = 0; reg < 4; reg++) {
                struct resource *res = dev->resource + reg;
-               if (!(res->flags & PCI_BASE_ADDRESS_SPACE_IO))
+               if ((res->flags & IORESOURCE_IO) == 0)
                        continue;
                if (!res->start) {
                        printk("%s: Missing I/O address #%d\n", name, reg);
@@ -493,11 +508,16 @@ static void __init ide_setup_pci_device (struct pci_dev *dev, ide_pci_device_t *
        byte tmp = 0;
        ide_hwif_t *hwif, *mate = NULL;
        unsigned int class_rev;
-       int pci_class_ide;
 
 #ifdef CONFIG_IDEDMA_AUTO
        autodma = 1;
 #endif
+
+#if 1  /* what do do with this useful tool ??? */
+       if (pci_enable_device(dev))
+               return;
+#endif
+
 check_if_enabled:
        if (pci_read_config_word(dev, PCI_COMMAND, &pcicmd)) {
                printk("%s: error accessing PCI regs\n", d->name);
@@ -539,8 +559,7 @@ check_if_enabled:
         * Can we trust the reported IRQ?
         */
        pciirq = dev->irq;
-       pci_class_ide = ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE);
-       if (!pci_class_ide) {
+       if ((dev->class & ~(0xfa)) != ((PCI_CLASS_STORAGE_IDE << 8) | 5)) {
                printk("%s: not 100%% native mode: will probe irqs later\n", d->name);
                /*
                 * This allows offboard ide-pci cards the enable a BIOS,
@@ -550,17 +569,11 @@ check_if_enabled:
                 */
                pciirq = (d->init_chipset) ? d->init_chipset(dev, d->name) : ide_special_settings(dev, d->name);
        } else if (tried_config) {
-               printk(KERN_INFO "%s: will probe irqs later\n", d->name);
+               printk("%s: will probe irqs later\n", d->name);
                pciirq = 0;
        } else if (!pciirq) {
-               if (pci_class_ide) {
-                       /* this is the normal path for most IDE devices */
-                       if (d->init_chipset)
-                               pciirq = d->init_chipset(dev, d->name);
-                       else
-                               printk(KERN_INFO "%s standard IDE storage device detected\n", d->name);
-               } else
-                       printk(KERN_WARNING "%s: bad irq (0): will probe later\n", d->name);
+               printk("%s: bad irq (%d): will probe later\n", d->name, pciirq);
+               pciirq = 0;
        } else {
                if (d->init_chipset)
                        (void) d->init_chipset(dev, d->name);
index 4bb1812412d128069c22e311e25c684cc491706a..f0bf8b3b22bba2b7671078a5d93a4b859d8d6801 100644 (file)
@@ -113,6 +113,10 @@ int (*piix_display_info)(char *, char **, off_t, int) = NULL;
 extern byte sis_proc;
 int (*sis_display_info)(char *, char **, off_t, int) = NULL;
 #endif /* CONFIG_BLK_DEV_SIS5513 */
+#ifdef CONFIG_BLK_DEV_SLC90E66
+extern byte slc90e66_proc;
+int (*slc90e66_display_info)(char *, char **, off_t, int) = NULL;
+#endif /* CONFIG_BLK_DEV_SLC90E66 */
 #ifdef CONFIG_BLK_DEV_VIA82CXXX
 extern byte via_proc;
 int (*via_display_info)(char *, char **, off_t, int) = NULL;
@@ -841,6 +845,10 @@ void proc_ide_create(void)
        if ((sis_display_info) && (sis_proc))
                create_proc_info_entry("sis", 0, proc_ide_root, sis_display_info);
 #endif /* CONFIG_BLK_DEV_SIS5513 */
+#ifdef CONFIG_BLK_DEV_SLC90E66
+       if ((slc90e66_display_info) && (slc90e66_proc))
+               create_proc_info_entry("slc90e66", 0, proc_ide_root, slc90e66_display_info);
+#endif /* CONFIG_BLK_DEV_SLC90E66 */
 #ifdef CONFIG_BLK_DEV_VIA82CXXX
        if ((via_display_info) && (via_proc))
                create_proc_info_entry("via", 0, proc_ide_root, via_display_info);
@@ -893,6 +901,10 @@ void proc_ide_destroy(void)
        if ((sis_display_info) && (sis_proc))
                remove_proc_entry("ide/sis", 0);
 #endif /* CONFIG_BLK_DEV_SIS5513 */
+#ifdef CONFIG_BLK_DEV_SLC90E66
+       if ((slc90e66_display_info) && (slc90e66_proc))
+               remove_proc_entry("ide/slc90e66",0);
+#endif /* CONFIG_BLK_DEV_SLC90E66 */
 #ifdef CONFIG_BLK_DEV_VIA82CXXX
        if ((via_display_info) && (via_proc))
                remove_proc_entry("ide/via",0);
index 5d00083c3b295fb2c4666938adcf93d5bdd0410e..32205ccccf3fa31b044220f646a426edc7d4ad57 100644 (file)
 
 static const byte ide_hwif_to_major[] = { IDE0_MAJOR, IDE1_MAJOR, IDE2_MAJOR, IDE3_MAJOR, IDE4_MAJOR, IDE5_MAJOR, IDE6_MAJOR, IDE7_MAJOR, IDE8_MAJOR, IDE9_MAJOR };
 
-static int     idebus_parameter = 0; /* holds the "idebus=" parameter */
-static int     system_bus_speed = 0; /* holds what we think is VESA/PCI bus speed */
+static int     idebus_parameter; /* holds the "idebus=" parameter */
+static int     system_bus_speed; /* holds what we think is VESA/PCI bus speed */
 static int     initializing;     /* set while initializing built-in drivers */
 
 #ifdef CONFIG_BLK_DEV_IDEPCI
-static int     ide_scan_direction = 0; /* THIS was formerly 2.2.x pci=reverse */
+static int     ide_scan_direction;     /* THIS was formerly 2.2.x pci=reverse */
 #endif /* CONFIG_BLK_DEV_IDEPCI */
 
 #if defined(__mc68000__) || defined(CONFIG_APUS)
@@ -176,14 +176,14 @@ static int        ide_scan_direction = 0; /* THIS was formerly 2.2.x pci=reverse */
  * ide_lock is used by the Atari code to obtain access to the IDE interrupt,
  * which is shared between several drivers.
  */
-static int     ide_lock = 0;
+static int     ide_lock;
 #endif /* __mc68000__ || CONFIG_APUS */
 
 /*
  * ide_modules keeps track of the available IDE chipset/probe/driver modules.
  */
-ide_module_t *ide_modules      = NULL;
-ide_module_t *ide_probe                = NULL;
+ide_module_t *ide_modules;
+ide_module_t *ide_probe;
 
 /*
  * This is declared extern in ide.h, for access by other IDE modules:
@@ -1509,7 +1509,7 @@ static void unexpected_intr (int irq, ide_hwgroup_t *hwgroup)
                        stat = IN_BYTE(hwif->io_ports[IDE_STATUS_OFFSET]);
                        if (!OK_STAT(stat, READY_STAT, BAD_STAT)) {
                                /* Try to not flood the console with msgs */
-                               static unsigned long last_msgtime = 0, count = 0;
+                               static unsigned long last_msgtime, count;
                                ++count;
                                if (0 < (signed long)(jiffies - (last_msgtime + HZ))) {
                                        last_msgtime = jiffies;
@@ -3499,7 +3499,7 @@ EXPORT_SYMBOL(ide_spin_wait_hwgroup);
 /*
  * Probe module
  */
-devfs_handle_t ide_devfs_handle = NULL;
+devfs_handle_t ide_devfs_handle;
 
 EXPORT_SYMBOL(ide_probe);
 EXPORT_SYMBOL(drive_is_flashcard);
@@ -3561,7 +3561,7 @@ EXPORT_SYMBOL(system_bus_clock);
  */
 int __init ide_init (void)
 {
-       static char banner_printed = 0;
+       static char banner_printed;
        int i;
 
        if (!banner_printed) {
diff --git a/drivers/ide/slc90e66.c b/drivers/ide/slc90e66.c
new file mode 100644 (file)
index 0000000..f8e6be4
--- /dev/null
@@ -0,0 +1,382 @@
+/*
+ *  linux/drivers/ide/slc90e66.c       Version 0.10    October 4, 2000
+ *
+ *  Copyright (C) 2000 Andre Hedrick <andre@linux-ide.org>
+ *  May be copied or modified under the terms of the GNU General Public License
+ *
+ * 00:07.1 IDE interface: EFAR Microsystems:
+ *             Unknown device 9130 (prog-if 8a [Master SecP PriP])
+ * Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV-
+ *             VGASnoop- ParErr- Stepping- SERR- FastB2B-
+ * Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium
+ *             >TAbort- <TAbort- <MAbort- >SERR- <PERR-
+ * Latency: 64
+ * Interrupt: pin A routed to IRQ 255
+ * Region 4: I/O ports at 1050
+ *
+ * 00: 55 10 30 91 05 00 00 02 00 8a 01 01 00 40 00 00
+ * 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ * 20: 51 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ * 30: 00 00 00 00 00 00 00 00 00 00 00 00 ff 01 00 00
+ * 40: 37 e3 33 e3 b9 55 01 00 0d 00 04 22 00 00 00 00
+ * 50: 00 00 ff a0 00 00 00 08 40 00 00 00 00 00 00 00
+ * 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ * 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ * 80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ * 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ * a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ * b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ * c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ * d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ * e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ * f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ *
+ * This a look-a-like variation of the ICH0 PIIX4 Ultra-66,
+ * but this keeps the ISA-Bridge and slots alive.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/ioport.h>
+#include <linux/pci.h>
+#include <linux/hdreg.h>
+#include <linux/ide.h>
+#include <linux/delay.h>
+#include <linux/init.h>
+
+#include <asm/io.h>
+
+#include "ide_modes.h"
+
+#define SLC90E66_DEBUG_DRIVE_INFO              0
+
+#define DISPLAY_SLC90E66_TIMINGS
+
+#if defined(DISPLAY_SLC90E66_TIMINGS) && defined(CONFIG_PROC_FS)
+#include <linux/stat.h>
+#include <linux/proc_fs.h>
+
+static int slc90e66_get_info(char *, char **, off_t, int);
+extern int (*slc90e66_display_info)(char *, char **, off_t, int); /* ide-proc.c */
+extern char *ide_media_verbose(ide_drive_t *);
+static struct pci_dev *bmide_dev;
+
+static int slc90e66_get_info (char *buffer, char **addr, off_t offset, int count)
+{
+       char *p = buffer;
+       u32 bibma = pci_resource_start(bmide_dev, 4);
+        u16 reg40 = 0, psitre = 0, reg42 = 0, ssitre = 0;
+       u8  c0 = 0, c1 = 0;
+       u8  reg44 = 0, reg47 = 0, reg48 = 0, reg4a = 0, reg4b = 0;
+
+       pci_read_config_word(bmide_dev, 0x40, &reg40);
+       pci_read_config_word(bmide_dev, 0x42, &reg42);
+       pci_read_config_byte(bmide_dev, 0x44, &reg44);
+       pci_read_config_byte(bmide_dev, 0x47, &reg47);
+       pci_read_config_byte(bmide_dev, 0x48, &reg48);
+       pci_read_config_byte(bmide_dev, 0x4a, &reg4a);
+       pci_read_config_byte(bmide_dev, 0x4b, &reg4b);
+
+       psitre = (reg40 & 0x4000) ? 1 : 0;
+       ssitre = (reg42 & 0x4000) ? 1 : 0;
+
+        /*
+         * at that point bibma+0x2 et bibma+0xa are byte registers
+         * to investigate:
+         */
+       c0 = inb_p((unsigned short)bibma + 0x02);
+       c1 = inb_p((unsigned short)bibma + 0x0a);
+
+       p += sprintf(p, "                                SLC90E66 Chipset.\n");
+       p += sprintf(p, "--------------- Primary Channel ---------------- Secondary Channel -------------\n");
+       p += sprintf(p, "                %sabled                         %sabled\n",
+                       (c0&0x80) ? "dis" : " en",
+                       (c1&0x80) ? "dis" : " en");
+       p += sprintf(p, "--------------- drive0 --------- drive1 -------- drive0 ---------- drive1 ------\n");
+       p += sprintf(p, "DMA enabled:    %s              %s             %s               %s\n",
+                       (c0&0x20) ? "yes" : "no ",
+                       (c0&0x40) ? "yes" : "no ",
+                       (c1&0x20) ? "yes" : "no ",
+                       (c1&0x40) ? "yes" : "no " );
+       p += sprintf(p, "UDMA enabled:   %s              %s             %s               %s\n",
+                       (reg48&0x01) ? "yes" : "no ",
+                       (reg48&0x02) ? "yes" : "no ",
+                       (reg48&0x04) ? "yes" : "no ",
+                       (reg48&0x08) ? "yes" : "no " );
+       p += sprintf(p, "UDMA enabled:   %s                %s               %s                 %s\n",
+                       ((reg4a&0x04)==0x04) ? "4" :
+                       ((reg4a&0x03)==0x03) ? "3" :
+                       (reg4a&0x02) ? "2" :
+                       (reg4a&0x01) ? "1" :
+                       (reg4a&0x00) ? "0" : "X",
+                       ((reg4a&0x40)==0x40) ? "4" :
+                       ((reg4a&0x30)==0x30) ? "3" :
+                       (reg4a&0x20) ? "2" :
+                       (reg4a&0x10) ? "1" :
+                       (reg4a&0x00) ? "0" : "X",
+                       ((reg4b&0x04)==0x04) ? "4" :
+                       ((reg4b&0x03)==0x03) ? "3" :
+                       (reg4b&0x02) ? "2" :
+                       (reg4b&0x01) ? "1" :
+                       (reg4b&0x00) ? "0" : "X",
+                       ((reg4b&0x40)==0x40) ? "4" :
+                       ((reg4b&0x30)==0x30) ? "3" :
+                       (reg4b&0x20) ? "2" :
+                       (reg4b&0x10) ? "1" :
+                       (reg4b&0x00) ? "0" : "X");
+
+       p += sprintf(p, "UDMA\n");
+       p += sprintf(p, "DMA\n");
+       p += sprintf(p, "PIO\n");
+
+/*
+ *     FIXME.... Add configuration junk data....blah blah......
+ */
+
+       return p-buffer;         /* => must be less than 4k! */
+}
+#endif  /* defined(DISPLAY_SLC90E66_TIMINGS) && defined(CONFIG_PROC_FS) */
+
+/*
+ *  Used to set Fifo configuration via kernel command line:
+ */
+
+byte slc90e66_proc = 0;
+
+extern char *ide_xfer_verbose (byte xfer_rate);
+
+#ifdef CONFIG_BLK_DEV_IDEDMA
+/*
+ *
+ */
+static byte slc90e66_dma_2_pio (byte xfer_rate) {
+       switch(xfer_rate) {
+               case XFER_UDMA_4:
+               case XFER_UDMA_3:
+               case XFER_UDMA_2:
+               case XFER_UDMA_1:
+               case XFER_UDMA_0:
+               case XFER_MW_DMA_2:
+               case XFER_PIO_4:
+                       return 4;
+               case XFER_MW_DMA_1:
+               case XFER_PIO_3:
+                       return 3;
+               case XFER_SW_DMA_2:
+               case XFER_PIO_2:
+                       return 2;
+               case XFER_MW_DMA_0:
+               case XFER_SW_DMA_1:
+               case XFER_SW_DMA_0:
+               case XFER_PIO_1:
+               case XFER_PIO_0:
+               case XFER_PIO_SLOW:
+               default:
+                       return 0;
+       }
+}
+#endif /* CONFIG_BLK_DEV_IDEDMA */
+
+/*
+ *  Based on settings done by AMI BIOS
+ *  (might be usefull if drive is not registered in CMOS for any reason).
+ */
+static void slc90e66_tune_drive (ide_drive_t *drive, byte pio)
+{
+       unsigned long flags;
+       u16 master_data;
+       byte slave_data;
+       int is_slave            = (&HWIF(drive)->drives[1] == drive);
+       int master_port         = HWIF(drive)->index ? 0x42 : 0x40;
+       int slave_port          = 0x44;
+                                /* ISP  RTC */
+       byte timings[][2]       = { { 0, 0 },
+                                   { 0, 0 },
+                                   { 1, 0 },
+                                   { 2, 1 },
+                                   { 2, 3 }, };
+
+       pio = ide_get_best_pio_mode(drive, pio, 5, NULL);
+       pci_read_config_word(HWIF(drive)->pci_dev, master_port, &master_data);
+       if (is_slave) {
+               master_data = master_data | 0x4000;
+               if (pio > 1)
+                       /* enable PPE, IE and TIME */
+                       master_data = master_data | 0x0070;
+               pci_read_config_byte(HWIF(drive)->pci_dev, slave_port, &slave_data);
+               slave_data = slave_data & (HWIF(drive)->index ? 0x0f : 0xf0);
+               slave_data = slave_data | ((timings[pio][0] << 2) | (timings[pio][1]
+                                          << (HWIF(drive)->index ? 4 : 0)));
+       } else {
+               master_data = master_data & 0xccf8;
+               if (pio > 1)
+                       /* enable PPE, IE and TIME */
+                       master_data = master_data | 0x0007;
+               master_data = master_data | (timings[pio][0] << 12) |
+                             (timings[pio][1] << 8);
+       }
+       save_flags(flags);
+       cli();
+       pci_write_config_word(HWIF(drive)->pci_dev, master_port, master_data);
+       if (is_slave)
+               pci_write_config_byte(HWIF(drive)->pci_dev, slave_port, slave_data);
+       restore_flags(flags);
+}
+
+#ifdef CONFIG_BLK_DEV_IDEDMA
+static int slc90e66_tune_chipset (ide_drive_t *drive, byte speed)
+{
+       ide_hwif_t *hwif        = HWIF(drive);
+       struct pci_dev *dev     = hwif->pci_dev;
+       byte maslave            = hwif->channel ? 0x42 : 0x40;
+       int a_speed             = 7 << (drive->dn * 4);
+       int u_flag              = 1 << drive->dn;
+       int u_speed             = 0;
+       int err                 = 0;
+       int                     sitre;
+       short                   reg4042, reg44, reg48, reg4a;
+
+       pci_read_config_word(dev, maslave, &reg4042);
+       sitre = (reg4042 & 0x4000) ? 1 : 0;
+       pci_read_config_word(dev, 0x44, &reg44);
+       pci_read_config_word(dev, 0x48, &reg48);
+       pci_read_config_word(dev, 0x4a, &reg4a);
+
+       switch(speed) {
+               case XFER_UDMA_4:       u_speed = 4 << (drive->dn * 4); break;
+               case XFER_UDMA_3:       u_speed = 3 << (drive->dn * 4); break;
+               case XFER_UDMA_2:       u_speed = 2 << (drive->dn * 4); break;
+               case XFER_UDMA_1:       u_speed = 1 << (drive->dn * 4); break;
+               case XFER_UDMA_0:       u_speed = 0 << (drive->dn * 4); break;
+               case XFER_MW_DMA_2:
+               case XFER_MW_DMA_1:
+               case XFER_SW_DMA_2:     break;
+               default:                return -1;
+       }
+
+       if (speed >= XFER_UDMA_0) {
+               if (!(reg48 & u_flag))
+                       pci_write_config_word(dev, 0x48, reg48|u_flag);
+               if ((reg4a & u_speed) != u_speed) {
+                       pci_write_config_word(dev, 0x4a, reg4a & ~a_speed);
+                       pci_read_config_word(dev, 0x4a, &reg4a);
+                       pci_write_config_word(dev, 0x4a, reg4a|u_speed);
+               }
+       }
+       if (speed < XFER_UDMA_0) {
+               if (reg48 & u_flag)
+                       pci_write_config_word(dev, 0x48, reg48 & ~u_flag);
+               if (reg4a & a_speed)
+                       pci_write_config_word(dev, 0x4a, reg4a & ~a_speed);
+       }
+
+       slc90e66_tune_drive(drive, slc90e66_dma_2_pio(speed));
+
+#if SLC90E66_DEBUG_DRIVE_INFO
+       printk("%s: %s drive%d\n", drive->name, ide_xfer_verbose(speed), drive->dn);
+#endif /* SLC90E66_DEBUG_DRIVE_INFO */
+       if (!drive->init_speed)
+               drive->init_speed = speed;
+       err = ide_config_drive_speed(drive, speed);
+       drive->current_speed = speed;
+       return err;
+}
+
+static int slc90e66_config_drive_for_dma (ide_drive_t *drive)
+{
+       struct hd_driveid *id   = drive->id;
+       int ultra               = 1;
+       byte speed              = 0;
+       byte udma_66            = eighty_ninty_three(drive);
+
+       if ((id->dma_ultra & 0x0010) && (ultra)) {
+               speed = (udma_66) ? XFER_UDMA_4 : XFER_UDMA_2;
+       } else if ((id->dma_ultra & 0x0008) && (ultra)) {
+               speed = (udma_66) ? XFER_UDMA_3 : XFER_UDMA_1;
+       } else if ((id->dma_ultra & 0x0004) && (ultra)) {
+               speed = XFER_UDMA_2;
+       } else if ((id->dma_ultra & 0x0002) && (ultra)) {
+               speed = XFER_UDMA_1;
+       } else if ((id->dma_ultra & 0x0001) && (ultra)) {
+               speed = XFER_UDMA_0;
+       } else if (id->dma_mword & 0x0004) {
+               speed = XFER_MW_DMA_2;
+       } else if (id->dma_mword & 0x0002) {
+               speed = XFER_MW_DMA_1;
+       } else if (id->dma_1word & 0x0004) {
+               speed = XFER_SW_DMA_2;
+        } else {
+               speed = XFER_PIO_0 + ide_get_best_pio_mode(drive, 255, 5, NULL);
+       }
+
+       (void) slc90e66_tune_chipset(drive, speed);
+
+       return ((int)   ((id->dma_ultra >> 11) & 7) ? ide_dma_on :
+                       ((id->dma_ultra >> 8) & 7) ? ide_dma_on :
+                       ((id->dma_mword >> 8) & 7) ? ide_dma_on :
+                       ((id->dma_1word >> 8) & 7) ? ide_dma_on :
+                                                    ide_dma_off_quietly);
+}
+
+static int slc90e66_dmaproc(ide_dma_action_t func, ide_drive_t *drive)
+{
+       switch (func) {
+               case ide_dma_check:
+                        return ide_dmaproc((ide_dma_action_t) slc90e66_config_drive_for_dma(drive), drive);
+               default :
+                       break;
+       }
+       /* Other cases are done by generic IDE-DMA code. */
+       return ide_dmaproc(func, drive);
+}
+#endif /* CONFIG_BLK_DEV_IDEDMA */
+
+unsigned int __init pci_init_slc90e66 (struct pci_dev *dev, const char *name)
+{
+#if defined(DISPLAY_SLC90E66_TIMINGS) && defined(CONFIG_PROC_FS)
+       if (!slc90e66_proc) {
+               slc90e66_proc = 1;
+               bmide_dev = dev;
+               slc90e66_display_info = &slc90e66_get_info;
+       }
+#endif /* DISPLAY_SLC90E66_TIMINGS && CONFIG_PROC_FS */
+       return 0;
+}
+
+unsigned int __init ata66_slc90e66 (ide_hwif_t *hwif)
+{
+#if 1
+       byte reg47 = 0, ata66 = 0;
+       byte mask = hwif->channel ? 0x02 : 0x01;
+
+       pci_read_config_byte(hwif->pci_dev, 0x47, &reg47);
+
+       ata66 = (reg47 & mask) ? 1 : 0;
+#else
+       byte ata66 = 0;
+#endif
+       return ata66;
+}
+
+void __init ide_init_slc90e66 (ide_hwif_t *hwif)
+{
+       if (!hwif->irq)
+               hwif->irq = hwif->channel ? 15 : 14;
+
+       hwif->tuneproc = &slc90e66_tune_drive;
+       hwif->drives[0].autotune = 1;
+       hwif->drives[1].autotune = 1;
+
+       if (!hwif->dma_base)
+               return;
+
+#ifndef CONFIG_BLK_DEV_IDEDMA
+       hwif->autodma = 0;
+#else /* CONFIG_BLK_DEV_IDEDMA */
+       hwif->autodma = 1;
+       hwif->dmaproc = &slc90e66_dmaproc;
+       hwif->speedproc = &slc90e66_tune_chipset;
+#endif /* !CONFIG_BLK_DEV_IDEDMA */
+}
index d103538556aa0ecc2bd723ce6bbabbc7173bdab3..8b4aa7244358fd42e9932e000e37dd9787817334 100644 (file)
 #endif
 
 
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
 
 LIST_HEAD(host_info_list);
-static int host_count = 0;
+static int host_count;
 spinlock_t host_info_lock = SPIN_LOCK_UNLOCKED;
 
-static struct hpsb_highlevel *hl_handle = NULL;
+static struct hpsb_highlevel *hl_handle;
 
 static atomic_t iso_buffer_size;
 static const int iso_buffer_max = 4 * 1024 * 1024; /* 4 MB */
index f3701965eac3ad5be9889c6cc555676662e4b003..e121192a6d8a19f01c1c373a3185d752ac46fabd 100644 (file)
@@ -49,12 +49,12 @@ EXPORT_SYMBOL(input_event);
 #define INPUT_MAJOR    13
 #define INPUT_DEVICES  256
 
-static struct input_dev *input_dev = NULL;
-static struct input_handler *input_handler = NULL;
-static struct input_handler *input_table[8] = { NULL, /* ... */ };
-static devfs_handle_t input_devfs_handle = NULL;
-static int input_number = 0;
-static long input_devices[NBITS(INPUT_DEVICES)] = { 0, /* ... */ };
+static struct input_dev *input_dev;
+static struct input_handler *input_handler;
+static struct input_handler *input_table[8];
+static devfs_handle_t input_devfs_handle;
+static int input_number;
+static long input_devices[NBITS(INPUT_DEVICES)];
 
 void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value)
 {
index 5dffb2770f77448397eb5ad8759378fb186046dc..ba2c41eb5fe1ff3e7f21c45485a7c42339994270 100644 (file)
@@ -46,7 +46,7 @@
 /* Debugflags */
 #undef ISDN_DEBUG_STATCALLB
 
-isdn_dev *dev = (isdn_dev *) 0;
+isdn_dev *dev;
 
 static char *isdn_revision = "$Revision: 1.111 $";
 
@@ -65,7 +65,7 @@ static char *isdn_audio_revision = ": none $";
 extern char *isdn_v110_revision;
 
 #ifdef CONFIG_ISDN_DIVERSION
-isdn_divert_if *divert_if = NULL; /* interface to diversion module */
+isdn_divert_if *divert_if; /* interface to diversion module */
 #endif CONFIG_ISDN_DIVERSION
 
 
@@ -2260,7 +2260,7 @@ isdn_getrev(const char *revision)
 
 #ifdef CONFIG_DEVFS_FS
 
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
 
 static void isdn_register_devfs(int k)
 {
index c5312cd83e63e0532d760256fc797e62dac4999f..b1bdf57affb0b4ea7281e4fa958550dec1cf9823 100644 (file)
@@ -70,6 +70,6 @@ inline void pullphone(char *dn, char *str)
        int i = 0;
 
        while(dn[i] != ',')
-               str[i] = dn[i++];
+               str[i] = dn[i], i++;
        str[i] = 0x0;
 }
index 430532e93a01af9f33729e5cea5a0f5c3bf23ba3..c89314c788efbf59cdaa34c08cd8221b8039f874 100644 (file)
@@ -60,7 +60,7 @@ extern asmlinkage long sys_setsid(void);
 # define dprintk(x...) do { } while(0)
 #endif
 
-static mdk_personality_t *pers[MAX_PERSONALITY] = {NULL, };
+static mdk_personality_t *pers[MAX_PERSONALITY];
 
 /*
  * Current RAID-1,4,5 parallel reconstruction 'guaranteed speed limit'
@@ -105,12 +105,12 @@ struct hd_struct md_hd_struct[MAX_MD_DEVS];
 static int md_blocksizes[MAX_MD_DEVS];
 static int md_hardsect_sizes[MAX_MD_DEVS];
 static int md_maxreadahead[MAX_MD_DEVS];
-static mdk_thread_t *md_recovery_thread = NULL;
+static mdk_thread_t *md_recovery_thread;
 
-int md_size[MAX_MD_DEVS] = {0, };
+int md_size[MAX_MD_DEVS];
 
 extern struct block_device_operations md_fops;
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
 
 static struct gendisk md_gendisk=
 {
@@ -136,7 +136,7 @@ static MD_LIST_HEAD(all_mddevs);
  * one! Eg. HSM uses several sub-devices to implement Logical
  * Volumes. All these sub-devices map to the same mddev.
  */
-dev_mapping_t mddev_map [MAX_MD_DEVS] = { {NULL, 0}, };
+dev_mapping_t mddev_map[MAX_MD_DEVS];
 
 void add_mddev_mapping (mddev_t * mddev, kdev_t dev, void *data)
 {
index 4880913106d2e0a39c2fc9a5a23f8fe3d8715c51..6b8c9063fb3622cec79123b18625471912d68e25 100644 (file)
  *                  Added I2C_DRIVERID_TDA7432
  *                     added loudness insmod control
  *  Revision: 0.1 - initial version
+ *
+ *  Changes:
+ *  Arnaldo Carvalho de Melo <acme@conectiva.com.br> - 08/14/2000
+ *  - resource allocation fixes in tda7432_attach
  */
 
 #include <linux/module.h>
@@ -320,8 +324,10 @@ static int tda7432_attach(struct i2c_adapter *adap, int addr,
         client->addr = addr;
        
        client->data = t = kmalloc(sizeof *t,GFP_KERNEL);
-       if (!t)
+       if (!t) {
+               kfree(client);
                return -ENOMEM;
+       }
        memset(t,0,sizeof *t);
        do_tda7432_init(client);
        MOD_INC_USE_COUNT;
index a1dec22ebc5b67a3525d9e5f92ddaf83786a7f8b..54f1935b64a40fe7b84a16bbd28396a0e5452d5b 100644 (file)
  * two stereo inputs, so if someone has this card, could they tell me if the
  * second one can be used for anything (i.e., does it have an external input
  * that you can't hear even if you set input to composite?)
+ *
+ * Changes:
+ * Arnaldo Carvalho de Melo <acme@conectiva.com.br> - 08/14/2000
+ * - resource allocation fixes in tda8425_attach
  */
 
 #include <linux/module.h>
@@ -148,8 +152,10 @@ static int tda8425_attach(struct i2c_adapter *adap, int addr,
         client->addr = addr;
 
        client->data = tda = kmalloc(sizeof *tda,GFP_KERNEL);
-       if (!tda)
+       if (!tda) {
+               kfree(client);
                return -ENOMEM;
+       }
        memset(tda,0,sizeof *tda);
        do_tda8425_init(client);
        MOD_INC_USE_COUNT;
index 73fb9bd522011eca5e22e117cd97bf0698e4e280..2bf161827fa1477a9264661b49178962937bee44 100644 (file)
@@ -11,6 +11,9 @@
  * Based on tda9855.c by Steve VanDeBogart (vandebo@uclink.berkeley.edu)
  * Which was based on tda8425.c by Greg Alexander (c) 1998
  *
+ * Contributors:
+ * Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+ *
  * OPTIONS:
  * debug   - set to 1 if you'd like to see debug messages
  *         - set to 2 if you'd like to be flooded with debug messages
@@ -22,6 +25,7 @@
  *   Fine tune sound
  *   Get rest of capabilities into video_audio struct...
  *
+ *  Revision  0.6 - resource allocation fixes in tda985x_attach (08/14/2000)
  *  Revision  0.5 - cleaned up debugging messages, added debug level=2 
  *  Revision: 0.4 - check for correct chip= insmod value
  *                  also cleaned up comments a bit
@@ -350,8 +354,10 @@ static int tda985x_attach(struct i2c_adapter *adap, int addr,
         client->addr = addr;
        
        client->data = t = kmalloc(sizeof *t,GFP_KERNEL);
-       if (!t)
+       if (!t) {
+               kfree(client);
                return -ENOMEM;
+       }
        memset(t,0,sizeof *t);
        do_tda985x_init(client);
        MOD_INC_USE_COUNT;
index 9f6ecd332dc6ceca9bca00a6027dcf33f7b36008..7bfc319a6f34654eaf4836e21426687ba3d7743a 100644 (file)
  * Based on tda9855.c by Steve VanDeBogart (vandebo@uclink.berkeley.edu)
  * Which was based on tda8425.c by Greg Alexander (c) 1998
  *
+ * Contributors:
+ * Arnaldo Carvalho de Melo <acme@conectiva.com.br> (0.2)
+ *
  * OPTIONS:
  * debug   - set to 1 if you'd like to see debug messages
  * 
+ *  Revision  0.2 - resource allocation fixes in tda9875_attach (08/14/2000)
  *  Revision: 0.1 - original version
  */
 
@@ -232,8 +236,10 @@ static int tda9875_attach(struct i2c_adapter *adap, int addr,
         client->addr = addr;
        
        client->data = t = kmalloc(sizeof *t,GFP_KERNEL);
-       if (!t)
+       if (!t) {
+               kfree(client);
                return -ENOMEM;
+       }
        memset(t,0,sizeof *t);
        do_tda9875_init(client);
        MOD_INC_USE_COUNT;
index f5949c94f4104e9f44990bef539ced31c2ae0077..9dc13e610e39343918aa152bee9383644adfa817 100644 (file)
  * balance (different left,right values) and, if someone ever finds a card
  * with the support (or if you're careful with a soldering iron), fade
  * (front/back).
+ *
+ * Changes:
+ * Arnaldo Carvalho de Melo <acme@conectiva.com.br> - 08/14/2000
+ * - resource allocation fixes in tea6300_attach
  */
 
 #include <linux/module.h>
@@ -170,8 +174,10 @@ static int tea6300_attach(struct i2c_adapter *adap, int addr,
         client->addr = addr;
 
        client->data = tea = kmalloc(sizeof *tea,GFP_KERNEL);
-       if (!tea)
+       if (!tea) {
+               kfree(client);
                return -ENOMEM;
+       }
        memset(tea,0,sizeof *tea);
        do_tea6300_init(client);
 
index 32e15dd44cc5551ad2984bd836283c31acb78c3a..da7d27ac517406e917e1cb477ae831b4390bebca 100644 (file)
@@ -90,7 +90,7 @@ MODULE_PARM(max_interrupt_work, "i");
 #define DRIVER_DEBUG 1
 /* Some values here only for performance evaluation and path-coverage
    debugging. */
-static int rx_nocopy = 0, rx_copy = 0, queued_packet = 0;
+static int rx_nocopy, rx_copy, queued_packet;
 
 /* Number of times to check to see if the Tx FIFO has space, used in some
    limited cases. */
@@ -364,7 +364,7 @@ int corkscrew_isapnp_phys_addr[3] = {
        0, 0, 0
 };
 
-static int nopnp = 0;
+static int nopnp;
 #endif
 
 static int corkscrew_scan(struct net_device *dev);
index c62617f55a3512b5bd63b0ccb458c2145c0386e4..1eefdfb7116df8bac51bc0c21592c00d5e8bdb04 100644 (file)
@@ -222,7 +222,7 @@ MODULE_PARM(watchdog, "i");
 /* Set iff a MII transceiver on any interface requires mdio preamble.
    This only set with the original DP83840 on older 3c905 boards, so the extra
    code size of a per-interface flag is not worthwhile. */
-static char mii_preamble_required = 0;
+static char mii_preamble_required;
 
 #define PFX "3c59x: "
 
@@ -740,12 +740,12 @@ static int flow_ctrl[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};
 /* #define dev_alloc_skb dev_alloc_skb_debug */
 
 /* A list of all installed Vortex EISA devices, for removing the driver module. */
-static struct net_device *root_vortex_eisa_dev = NULL;
+static struct net_device *root_vortex_eisa_dev;
 
 /* Variables to work-around the Compaq PCI BIOS32 problem. */
-static int compaq_ioaddr = 0, compaq_irq = 0, compaq_device_id = 0x5900;
+static int compaq_ioaddr, compaq_irq, compaq_device_id = 0x5900;
 
-static int vortex_cards_found = 0;
+static int vortex_cards_found;
 
 static void vortex_suspend (struct pci_dev *pdev)
 {
@@ -853,7 +853,7 @@ static int __devinit vortex_probe1(struct pci_dev *pdev,
        unsigned int eeprom[0x40], checksum = 0;                /* EEPROM contents */
        int i;
        struct net_device *dev;
-       static int printed_version = 0;
+       static int printed_version;
        int retval;
        struct vortex_chip_info * const vci = &vortex_info_tbl[chip_idx];
 
@@ -1616,7 +1616,7 @@ vortex_error(struct net_device *dev, int status)
                outw(AckIntr | RxEarly, ioaddr + EL3_CMD);
        }
        if (status & StatsFull) {                       /* Empty statistics. */
-               static int DoneDidThat = 0;
+               static int DoneDidThat;
                if (vortex_debug > 4)
                        printk(KERN_DEBUG "%s: Updating stats.\n", dev->name);
                update_stats(ioaddr, dev);
@@ -2573,8 +2573,8 @@ static struct pci_driver vortex_driver = {
 };
 
 
-static int vortex_have_pci = 0;
-static int vortex_have_eisa = 0;
+static int vortex_have_pci;
+static int vortex_have_eisa;
 
 
 static int __init vortex_init (void)
index 54f641447d31e34594af0c4f152d46f2cb7c9476..43c838d0aa5916dfcced7fdad260d33befe1da0b 100644 (file)
@@ -52,6 +52,9 @@ if [ "$CONFIG_NET_ETHERNET" = "y" ]; then
    if [ "$CONFIG_SGI_IP27" = "y" ]; then
       bool '  SGI IOC3 Ethernet' CONFIG_SGI_IOC3_ETH
    fi
+   if [ "CONFIG_IA64_SGI_SN1" = "y" ]; then
+      bool '  SGI IOC3 Ethernet' CONFIG_SGI_IOC3_ETH
+   fi
    if [ "$CONFIG_SUPERH" = "y" ]; then
       tristate '  National DP83902AV  support' CONFIG_STNIC
    fi
index a89bff2b8704bbeb7947f3cfe6a8f08d26ed1df7..498bd523f9e86640bf08b45492eeeec957e4c7de 100644 (file)
@@ -749,7 +749,6 @@ static int __init a2065_probe(void)
                                           sizeof(struct lance_regs));
                        continue;
                }
-               strcpy(z->name, "A2065 Ethernet Card");
 
                dev = init_etherdev(NULL, sizeof(struct lance_private));
 
index d6a9c505d9e7be5d896cc52fe7939090529d88d6..11b6e2773c8e792a243372521bc4483e15dd30a5 100644 (file)
@@ -60,7 +60,7 @@ static const char *awc_version =
 #include <linux/pci.h>
 
 
-static int reverse_probe =0 ;
+static int reverse_probe;
 
 
 static int awc_pci_init(struct net_device * dev, struct pci_dev *pdev,
@@ -70,7 +70,7 @@ static int awc_pci_init(struct net_device * dev, struct pci_dev *pdev,
 int awc4500_pci_probe(struct net_device *dev)
 {
        int cards_found = 0;
-       static int pci_index = 0;       /* Static, for multiple probe calls. */
+       static int pci_index;   /* Static, for multiple probe calls. */
        u8 pci_irq_line = 0;
 //     int p;
 
@@ -491,7 +491,7 @@ MODULE_PARM_DESC(io,"Aironet 4x00 ISA non-PNP ioports,required");
 int awc4500_isa_probe(struct net_device *dev)
 {
 //     int cards_found = 0;
-//     static int isa_index = 0;       /* Static, for multiple probe calls. */
+//     static int isa_index;   /* Static, for multiple probe calls. */
        int isa_irq_line = 0;
        int isa_ioaddr = 0;
 //     int p;
index b937af2b3f28910dcc75ddc01d50a122d409e1de..c5def9e399ff2e18a8be1464db658e56a77486e0 100644 (file)
@@ -45,8 +45,8 @@ int bap_sleep_after_setup = 1;
 int sleep_before_command  = 1;
 int bap_sleep_before_write= 1;
 int sleep_in_command     = 1;
-int both_bap_lock       =0;    /* activated at awc_init in this */
-int bap_setup_spinlock   =0;   /* file if numcpu >1 */
+int both_bap_lock;             /* activated at awc_init in this */
+int bap_setup_spinlock;                /* file if numcpu >1 */
 
 EXPORT_SYMBOL(bap_sleep);
 EXPORT_SYMBOL(bap_sleep_after_setup);
@@ -1386,7 +1386,7 @@ awc_802_11_find_copy_path(struct net_device * dev, struct awc_fid * rx_buff){
 */ 
 
 
-int parse_not_8023= 0;
+int parse_not_8023;
        
 void
 awc_802_11_router_rx(struct net_device * dev,struct awc_fid * rx_buff){
@@ -2539,25 +2539,25 @@ bad_end:
 static const char *aironet4500_core_version =
 "aironet4500.c v0.1 1/1/99 Elmer Joandi, elmer@ylenurme.ee.\n";
 
-struct net_device * aironet4500_devices[MAX_AWCS]  = {NULL,NULL,NULL,NULL};
+struct net_device * aironet4500_devices[MAX_AWCS];
 
-int awc_debug = 0; //  0xffffff;
-static int p802_11_send  =  0; // 1
+int awc_debug; //  0xffffff;
+static int p802_11_send; // 1
 
-static int awc_process_tx_results = 0;
+static int awc_process_tx_results;
 int tx_queue_len = 10;
-int tx_rate = 0;
+int tx_rate;
 int channel = 5;
-//static int tx_full_rate = 0;
+//static int tx_full_rate;
 int max_mtu = 2312;
-int adhoc = 0;
+int adhoc;
 int large_buff_mem = 1700 * 10;
 int small_buff_no      = 20;
-int awc_full_stats = 0;
-char SSID[33] = {0};
-int master= 0;
-int slave = 0;
-int awc_simple_bridge = 0;
+int awc_full_stats;
+char SSID[33];
+int master;
+int slave;
+int awc_simple_bridge;
 // int debug =0;
 
 #if LINUX_VERSION_CODE >= 0x20100
@@ -3029,7 +3029,7 @@ void awc_tx_timeout (struct net_device *dev)
 }
 
 
-long long last_tx_q_hack = 0;
+long long last_tx_q_hack;
 int direction = 1;
 
 int awc_start_xmit(struct sk_buff *skb, struct net_device *dev) {
@@ -3213,8 +3213,8 @@ awc_set_multicast_list(struct net_device *dev) {
 
 
 
-int (* awc_proc_set_fun) (int) = NULL;
-int (* awc_proc_unset_fun) (int) = NULL;
+int (* awc_proc_set_fun) (int);
+int (* awc_proc_unset_fun) (int);
 
 
 int awc_register_proc(int (*awc_proc_set_device)(int),int (*awc_proc_unset_device)(int)){
index f4a3835be98e0b3a72b758440d39fa68bb7c80c1..af06e74f642b5b702dac96d750e59d43e9e06906 100644 (file)
@@ -168,7 +168,6 @@ static int __init ariadne_probe(void)
            release_mem_region(base_addr, sizeof(struct Am79C960));
            continue;
        }
-       strcpy(z->name, "Ariadne Ethernet Card and Parallel Ports");
 
        dev = init_etherdev(NULL, sizeof(struct ariadne_private));
 
index c736c04107950d5d40aaeb409e450fb5bdb1a667..1ddb28c9e7682af75aef6cf4d562ba1d346aeffd 100644 (file)
@@ -95,7 +95,6 @@ int __init ariadne2_probe(struct net_device *dev)
            release_mem_region(ioaddr, NE_IO_EXTENT*2);
            return err;
        }
-       strcpy(z->name, "AriadNE2 Ethernet");
        return 0;
     }
     return -ENODEV;
index b1a4549de883d035e1dd394825b4449680462573..dfa7c218b38a829ef0b66160cd3efbc344e8de25 100644 (file)
@@ -11,7 +11,7 @@
 static const char *arlan_version = "C.Jennigs 97 & Elmer.Joandi@ut.ee  Oct'98, http://www.ylenurme.ee/~elmer/655/";
 
 struct net_device *arlan_device[MAX_ARLANS];
-int last_arlan = 0;
+int last_arlan;
 
 static int SID = SIDUNKNOWN;
 static int radioNodeId = radioNodeIdUNKNOWN;
@@ -26,22 +26,22 @@ static int channelNumber = channelNumberUNKNOWN;
 static int channelSet = channelSetUNKNOWN;
 static int systemId = systemIdUNKNOWN;
 static int registrationMode = registrationModeUNKNOWN;
-static int keyStart = 0;
-static int tx_delay_ms = 0;
+static int keyStart;
+static int tx_delay_ms;
 static int retries = 5;
 static int async = 1;
 static int tx_queue_len = 1;
-static int arlan_EEPROM_bad = 0;
-int arlan_entry_and_exit_debug = 0;
+static int arlan_EEPROM_bad;
+int arlan_entry_and_exit_debug;
 
 #ifdef ARLAN_DEBUGING
 
-static int arlan_entry_debug = 0;
-static int arlan_exit_debug = 0;
+static int arlan_entry_debug;
+static int arlan_exit_debug;
 static int testMemory = testMemoryUNKNOWN;
 static int irq = irqUNKNOWN;
 static int txScrambled = 1;
-static int mdebug = 0;
+static int mdebug;
 #endif
 
 #if LINUX_VERSION_CODE > 0x20100
@@ -87,7 +87,7 @@ EXPORT_SYMBOL(last_arlan);
 #endif
 
 struct arlan_conf_stru arlan_conf[MAX_ARLANS];
-int arlans_found = 0;
+int arlans_found;
 
 static  int    arlan_probe_here(struct net_device *dev, int ioaddr);
 static  int    arlan_open(struct net_device *dev);
index f94b189fb75e5eb60141d6fd9e8263d622b1f34a..b7718aba5ffa3024ecbea739d290be1a61c8f875 100644 (file)
@@ -25,7 +25,7 @@
 
 static const char *version =
        "daynaport.c: v0.02 1999-05-17 Alan Cox (Alan.Cox@linux.org) and others\n";
-static int version_printed = 0;
+static int version_printed;
 
 #include <linux/module.h>
 #include <linux/init.h>
index 196c8112674294a25446f62d7bb40c8addf37859..eb78e1e0ebc0cefe18be859f6d04f0b4e936c822 100644 (file)
@@ -463,12 +463,12 @@ static u_char de1xx_irq[] __initdata = {2,3,4,5,7,9,0};
 static u_char de2xx_irq[] __initdata = {5,9,10,11,15,0};
 static u_char de422_irq[] __initdata = {5,9,10,11,0};
 static u_char *depca_irq;
-static int    autoprobed = 0, loading_module = 0;
+static int    autoprobed, loading_module;
 #endif /* MODULE */
 
 static char   name[DEPCA_STRLEN];
-static int    num_depcas = 0, num_eth = 0;
-static int    mem=0;                       /* For loadable module assignment
+static int    num_depcas, num_eth;
+static int    mem;                       /* For loadable module assignment
                                               use insmod mem=0x????? .... */
 static char   *adapter_name = '\0';        /* If no PROM when loadable module
                                              use insmod adapter_name=DE??? ...
@@ -908,12 +908,12 @@ static void depca_interrupt (int irq, void *dev_id, struct pt_regs *regs)
        /* Any resources available? */
        if ((TX_BUFFS_AVAIL >= 0) && netif_queue_stopped(dev)) {
                netif_wake_queue (dev);
-
-               /* Unmask the DEPCA board interrupts and turn off the LED */
-               nicsr = (nicsr & ~IM & ~LED);
-               outb (nicsr, DEPCA_NICSR);
        }
 
+       /* Unmask the DEPCA board interrupts and turn off the LED */
+       nicsr = (nicsr & ~IM & ~LED);
+       outb (nicsr, DEPCA_NICSR);
+
        spin_unlock (&lp->lock);
 }
 
index ab425dfee78d9b80b50d71f85163136a0c01f202..feea0ca03cd0371866555df7926e0485e40e9d91 100644 (file)
@@ -390,10 +390,10 @@ static struct net_device dev_e21[MAX_E21_CARDS] = {
        },
 };
 
-static int io[MAX_E21_CARDS] = { 0, };
-static int irq[MAX_E21_CARDS]  = { 0, };
-static int mem[MAX_E21_CARDS] = { 0, };
-static int xcvr[MAX_E21_CARDS] = { 0, };               /* choose int. or ext. xcvr */
+static int io[MAX_E21_CARDS];
+static int irq[MAX_E21_CARDS];
+static int mem[MAX_E21_CARDS];
+static int xcvr[MAX_E21_CARDS]               /* choose int. or ext. xcvr */
 
 MODULE_PARM(io, "1-" __MODULE_STRING(MAX_E21_CARDS) "i");
 MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_E21_CARDS) "i");
index af419c80e2148ad3196ea04d62bbc5c1ea337d84..6ba26b3b91814e4143df0079141c4b2b25ac4ddc 100644 (file)
@@ -34,12 +34,12 @@ static const char *version =
 /* A few user-configurable values that apply to all boards.
    First set is undocumented and spelled per Intel recommendations. */
 
-static int congenb = 0;                /* Enable congestion control in the DP83840. */
+static int congenb;            /* Enable congestion control in the DP83840. */
 static int txfifo = 8;         /* Tx FIFO threshold in 4 byte units, 0-15 */
 static int rxfifo = 8;         /* Rx FIFO threshold, default 32 bytes. */
 /* Tx/Rx DMA burst length, 0-127, 0 == no preemption, tx==128 -> disabled. */
 static int txdmacount = 128;
-static int rxdmacount = 0;
+static int rxdmacount;
 
 /* Set the copy breakpoint for the copy-only-tiny-buffer Rx method.
    Lower values use more memory, but are faster. */
@@ -611,9 +611,9 @@ static int __devinit eepro100_init_one (struct pci_dev *pdev,
        unsigned long ioaddr;
        int irq;
        int acpi_idle_state = 0, pm;
-       static int cards_found = 0;
+       static int cards_found;
 
-       static int did_version = 0;                     /* Already printed version info. */
+       static int did_version;                 /* Already printed version info. */
        if (speedo_debug > 0  &&  did_version++ == 0)
                printk(version);
 
index cabe97e14693a6df2a1aa5f8b606098df98bd296..daf7576651aa2bf4a89e463c9025077fa29209e4 100644 (file)
@@ -388,9 +388,9 @@ static struct net_device dev_es3210[MAX_ES_CARDS] = {
        },
 };
 
-static int io[MAX_ES_CARDS] = { 0, };
-static int irq[MAX_ES_CARDS]  = { 0, };
-static int mem[MAX_ES_CARDS] = { 0, };
+static int io[MAX_ES_CARDS];
+static int irq[MAX_ES_CARDS];
+static int mem[MAX_ES_CARDS];
 
 MODULE_PARM(io, "1-" __MODULE_STRING(MAX_ES_CARDS) "i");
 MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_ES_CARDS) "i");
index fd2c79235da98e9d8ad72351db3d161c3a096fbf..e12f65a7989fdc15fa7d4d6eb088c73937a3a76d 100644 (file)
@@ -178,7 +178,6 @@ int __init hydra_probe(struct net_device *dev)
                    release_mem_region(base_addr, 0x20);
                    continue;
                }
-               strcpy(z->name, "Hydra Ethernet Card");
 
                dev = init_etherdev(NULL, sizeof(struct hydra_private));
 
index 57d57d339866c31a8af0acd2e0eecec5090859c4..834300c28c546cb235e08a6630026d647868c7ca 100644 (file)
@@ -74,7 +74,7 @@ static char *driver_name = "nsc-ircc";
 
 /* Module parameters */
 static int qos_mtt_bits = 0x07;  /* 1 ms or more */
-static int dongle_id = 0;
+static int dongle_id;
 
 /* Use BIOS settions by default, but user may supply module parameters */
 static unsigned int io[]  = { ~0, ~0, ~0, ~0 };
index 6cfd71f15044cc5bdb521de66188ad5b5e60117e..c1674c550ee799b8c4f58d4f05ca6c6cafa50312 100644 (file)
@@ -382,9 +382,9 @@ static struct net_device dev_lne[MAX_LNE_CARDS] = {
        },
 };
 
-static int io[MAX_LNE_CARDS] = { 0, };
-static int irq[MAX_LNE_CARDS]  = { 0, };
-static int mem[MAX_LNE_CARDS] = { 0, };
+static int io[MAX_LNE_CARDS];
+static int irq[MAX_LNE_CARDS];
+static int mem[MAX_LNE_CARDS];
 
 MODULE_PARM(io, "1-" __MODULE_STRING(MAX_LNE_CARDS) "i");
 MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_LNE_CARDS) "i");
index 1fceea2fd5e016a20005000d318623109b8bfdd3..6c32ccb72e11263439412897c0eff4cd9f64b404 100644 (file)
@@ -369,9 +369,9 @@ static struct net_device dev_ne3210[MAX_NE3210_CARDS] = {
        },
 };
 
-static int io[MAX_NE3210_CARDS] = { 0, };
-static int irq[MAX_NE3210_CARDS]  = { 0, };
-static int mem[MAX_NE3210_CARDS] = { 0, };
+static int io[MAX_NE3210_CARDS];
+static int irq[MAX_NE3210_CARDS];
+static int mem[MAX_NE3210_CARDS];
 
 MODULE_PARM(io, "1-" __MODULE_STRING(MAX_NE3210_CARDS) "i");
 MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_NE3210_CARDS) "i");
index 7f3f76ebf29ae8497b6d4dcd7ce11e54777a1f29..1fd7d3445fd9d25f0325e576123bfb09f6269ad9 100644 (file)
@@ -117,7 +117,7 @@ static int irq_list[4] = { -1 };
 static int max_interrupt_work = 32;
 
 /* Force full duplex modes? */
-static int full_duplex = 0;
+static int full_duplex;
 
 /* To minimize the size of the driver source and make the driver more
    readable not all constants are symbolically defined.
index aff697033fc1b36558802d471a485ca83d54ab20..c5f5d34de6c2e3f7745128332e7de412af715a93 100644 (file)
@@ -28,9 +28,9 @@ static int max_interrupt_work = 25;
 
 #define MAX_UNITS 8
 /* Used to pass the full-duplex flag, etc. */
-static int full_duplex[MAX_UNITS] = {0, };
-static int options[MAX_UNITS] = {0, };
-static int mtu[MAX_UNITS] = {0, };                     /* Jumbo MTU for interfaces. */
+static int full_duplex[MAX_UNITS];
+static int options[MAX_UNITS];
+static int mtu[MAX_UNITS];                     /* Jumbo MTU for interfaces. */
 
 /*  The possible media types that can be set in options[] are: */
 static const char * const medianame[] = {
@@ -506,12 +506,12 @@ static struct net_device *tulip_probe1(struct pci_dev *pdev,
                                       struct net_device *dev, long ioaddr, int irq,
                                       int chip_idx, int board_idx)
 {
-       static int did_version = 0;                     /* Already printed version info. */
+       static int did_version;                 /* Already printed version info. */
        struct tulip_private *tp;
        /* See note below on the multiport cards. */
        static unsigned char last_phys_addr[6] = {0x00, 'L', 'i', 'n', 'u', 'x'};
-       static int last_irq = 0;
-       static int multiport_cnt = 0;           /* For four-port boards w/one EEPROM */
+       static int last_irq;
+       static int multiport_cnt;               /* For four-port boards w/one EEPROM */
        u8 chip_rev;
        int i;
        unsigned short sum;
@@ -913,9 +913,9 @@ static const char * block_name[] = {"21140 non-MII", "21140 MII PHY",
 static void parse_eeprom(struct net_device *dev)
 {
        /* The last media info list parsed, for multiport boards.  */
-       static struct mediatable *last_mediatable = NULL;
-       static unsigned char *last_ee_data = NULL;
-       static int controller_index = 0;
+       static struct mediatable *last_mediatable;
+       static unsigned char *last_ee_data;
+       static int controller_index;
        struct tulip_private *tp = (struct tulip_private *)dev->priv;
        long ioaddr = dev->base_addr;
        unsigned char *ee_data = tp->eeprom;
@@ -3074,7 +3074,7 @@ MODULE_DEVICE_TABLE(pci, tulip_pci_table);
 static int __devinit tulip_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 {
        struct net_device *dev;
-       static int board_idx = 0;
+       static int board_idx;
 
        printk(KERN_INFO "tulip_attach(%s)\n", pdev->slot_name);
 
index 9be388cf82081d330bd1862d63ca600e50288885..976dd578120a35bea20f4e00f54b5815c9976898 100644 (file)
@@ -42,7 +42,7 @@ static unsigned int pcnet32_portlist[] __initdata = {0x300, 0x320, 0x340, 0x360,
 static int pcnet32_debug = 1;
 static int tx_start = 1; /* Mapping -- 0:20, 1:64, 2:128, 3:~220 (depends on chip vers) */
 
-static struct net_device *pcnet32_dev = NULL;
+static struct net_device *pcnet32_dev;
 
 static const int max_interrupt_work = 80;
 static const int rx_copybreak = 200;
@@ -83,8 +83,8 @@ static unsigned char options_mapping[] = {
 };
 
 #define MAX_UNITS 8
-static int options[MAX_UNITS] = {0, };
-static int full_duplex[MAX_UNITS] = {0, };
+static int options[MAX_UNITS];
+static int full_duplex[MAX_UNITS];
 
 /*
  *                             Theory of Operation
@@ -476,7 +476,7 @@ static int __init pcnet32_probe_vlbus(int cards_found)
 static int __init
 pcnet32_probe_pci(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
-    static int card_idx = 0;
+    static int card_idx;
     long ioaddr;
     int err = 0;
 
index f59653eefa39b92cd64780daf2865fe143221f21..98b7db0f87dc3cf53dcdcb8d7092468f5b88d5a1 100644 (file)
@@ -709,7 +709,7 @@ static struct file_operations ppp_device_fops = {
 
 #define PPP_MAJOR      108
 
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
 
 /* Called at boot time if ppp is compiled into the kernel,
    or at module load time (from init_module) if compiled as a module. */
index ac358ff21228233452f5e2aee0e7f121e8149e90..50cdd2fee794491649c77a228106a68ca41656b1 100644 (file)
@@ -142,8 +142,6 @@ struct net_proto_family pppox_proto_family = {
        pppox_create
 };
 
-extern int pppoe_init (void);
-
 int __init pppox_init(void)
 {
        int err = 0;
@@ -152,7 +150,6 @@ int __init pppox_init(void)
 
        if (err == 0) {
                printk(KERN_INFO "Registered PPPoX v0.5\n");
-               pppoe_init();
        }
 
        return err;
index c1c79247e53281a70a02b4c7551689318ab31c92..2721cb05e9e2101586037e455af7f43de46e2fa6 100644 (file)
@@ -311,14 +311,7 @@ PAB, *PPAB;
  ** Indexed by a zero based (0-31) interface number.
  */ 
 #define MAX_ADAPTERS 32
-static PPAB  PCIAdapterBlock[MAX_ADAPTERS] = 
-{
-    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
-};
-
+static PPAB  PCIAdapterBlock[MAX_ADAPTERS];
 
 /*
 ** typedef NICSTAT
index 2e594440cdf294a342fc48a079cc9403fe9acd6c..3e7e1ecb4aef42f5ab4d70bfaca383a9246c91b4 100644 (file)
@@ -38,6 +38,7 @@
 #define RCLANMTL_H
 
 /* Linux specific includes */
+#include <asm/types.h>
 #define kprintf printk
 #ifdef RC_LINUX_MODULE     /* linux modules need non-library version of string functions */
 #include <linux/string.h>
 #define WARM_REBOOT_CAPABLE      0x01
 
  /* scalar data types */
-typedef unsigned char   U8;
-typedef unsigned char*  PU8;
-typedef unsigned short  U16;
-typedef unsigned short* PU16;
-typedef unsigned long   U32;
-typedef unsigned long*  PU32;
+typedef __u8           U8;
+typedef __u16          U16;
+typedef __u32          U32;
+typedef __u8*          PU8;
+typedef __u16*         PU16;
+typedef __u32*         PU32;
 typedef unsigned long   BF;
 typedef int             RC_RETURN;
 
index e4e2d11609a0efa422b72f831a5d899318148700..666078eecd4470c1a99f36766e54359626001387 100644 (file)
@@ -135,14 +135,7 @@ DPA, *PDPA;
 
 #define MAX_ADAPTERS 32
 
-static PDPA  PCIAdapters[MAX_ADAPTERS] = 
-{
-    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
-};
-
+static PDPA  PCIAdapters[MAX_ADAPTERS];
 
 static int RCinit(struct net_device *dev);
 static int RCscan(void);
@@ -163,7 +156,7 @@ static int RC_allocate_and_post_buffers(struct net_device *, int);
 
 
 /* A list of all installed RC devices, for removing the driver module. */
-static struct net_device *root_RCdev = NULL;
+static struct net_device *root_RCdev;
 
 static int __init rcpci_init_module (void)
 {
@@ -178,7 +171,7 @@ static int __init rcpci_init_module (void)
 static int RCscan(void)
 {
     int cards_found = 0;
-    static int pci_index = 0;
+    static int pci_index;
 
     if (!pcibios_present()) 
         return cards_found;
@@ -816,7 +809,7 @@ static void rc_timer(unsigned long data)
     struct net_device *dev = (struct net_device *)data;
     PDPA pDpa = (PDPA) (dev->priv);
     int init_status;
-    static int retry = 0;
+    static int retry;
     int post_buffers = MAX_NMBR_RCV_BUFFERS;
     int count = 0;
     int requested = 0;
@@ -1111,7 +1104,7 @@ static int RCioctl(struct net_device *dev, struct ifreq *rq, int cmd)
             }
             RCUD_GETSPEED = &RCuser.RCUS_GETSPEED;
             RCGetLinkSpeed(pDpa->id, (PU32) &RCUD_GETSPEED->LinkSpeedCode, NULL);
-            printk("RC speed = 0x%ld\n", RCUD_GETSPEED->LinkSpeedCode);
+            printk("RC speed = 0x%u\n", RCUD_GETSPEED->LinkSpeedCode);
             break;
         case RCUC_SETIPANDMASK:
             printk("RC SETIPANDMASK\n");
index 8d6b193a289f712efef1f068c4facdc225be310f..9f79b8318ba895c87e091efe84b805013b6d4c0d 100644 (file)
@@ -662,9 +662,9 @@ static struct net_device this_device = {
        0, 0, 0, NULL, netcard_probe };
 
 static int io = 0x300;
-static int irq = 0;
-static int dma = 0;
-static int mem = 0;
+static int irq;
+static int dma;
+static int mem;
 
 int init_module(void)
 {
index fb6d438d08372e6d84bd4947574479514c0d8315..9a0315f0c9ecb9360f893b2f98df418f1df436b8 100644 (file)
@@ -1861,8 +1861,8 @@ int ibmtr_change_mtu(struct net_device *dev, int mtu) {
 /* 3COM 3C619C supports 8 interrupts, 32 I/O ports */
 static struct net_device* dev_ibmtr[IBMTR_MAX_ADAPTERS];
 static int io[IBMTR_MAX_ADAPTERS] = {0xa20,0xa24};
-static int irq[IBMTR_MAX_ADAPTERS] = {0,0};
-static int mem[IBMTR_MAX_ADAPTERS] = {0,0};
+static int irq[IBMTR_MAX_ADAPTERS];
+static int mem[IBMTR_MAX_ADAPTERS];
 
 MODULE_PARM(io, "1-" __MODULE_STRING(IBMTR_MAX_ADAPTERS) "i");
 MODULE_PARM(irq, "1-" __MODULE_STRING(IBMTR_MAX_ADAPTERS) "i");
index 83024732af916c9433633e94c70db4373a142da0..32a596d2a22670a69fa5fdf54ca195dd55729daa 100644 (file)
@@ -5801,9 +5801,9 @@ static int smctr_wait_while_cbusy(struct net_device *dev)
 #ifdef MODULE
 
 static struct net_device* dev_smctr[SMCTR_MAX_ADAPTERS];
-static int io[SMCTR_MAX_ADAPTERS]        = { 0, 0 };
-static int irq[SMCTR_MAX_ADAPTERS]       = { 0, 0 };
-static int mem[SMCTR_MAX_ADAPTERS]       = { 0, 0 };
+static int io[SMCTR_MAX_ADAPTERS];
+static int irq[SMCTR_MAX_ADAPTERS];
+static int mem[SMCTR_MAX_ADAPTERS];
 
 MODULE_PARM(io,  "1-" __MODULE_STRING(SMCTR_MAX_ADAPTERS) "i");
 MODULE_PARM(irq, "1-" __MODULE_STRING(SMCTR_MAX_ADAPTERS) "i");
index 22dd24ab23e6d234b5601f3369f183a24202c24b..19d4f8f5e5f58127629f3a328aef48821ee964fd 100644 (file)
@@ -38,9 +38,9 @@ static int max_interrupt_work = 25;
 
 #define MAX_UNITS 8
 /* Used to pass the full-duplex flag, etc. */
-static int full_duplex[MAX_UNITS] = {0, };
-static int options[MAX_UNITS] = {0, };
-static int mtu[MAX_UNITS] = {0, };                     /* Jumbo MTU for interfaces. */
+static int full_duplex[MAX_UNITS];
+static int options[MAX_UNITS];
+static int mtu[MAX_UNITS];                     /* Jumbo MTU for interfaces. */
 
 /*  The possible media types that can be set in options[] are: */
 const char * const medianame[] = {
@@ -924,18 +924,20 @@ static void set_rx_mode(struct net_device *dev)
                                 i++, mclist = mclist->next)
                                set_bit(ether_crc_le(ETH_ALEN, mclist->dmi_addr) & 0x1ff,
                                                hash_table);
-                       for (i = 0; i < 32; i++)
-                               *setup_frm++ = *setup_frm++ = hash_table[i];
+                       for (i = 0; i < 32; i++) {
+                               *setup_frm++ = hash_table[i];
+                               *setup_frm++ = hash_table[i];
+                       }
                        setup_frm = &tp->setup_frame[13*6];
                } else {
                        /* We have <= 14 addresses so we can use the wonderful
                           16 address perfect filtering of the Tulip. */
                        for (i = 0, mclist = dev->mc_list; i < dev->mc_count;
                                 i++, mclist = mclist->next) {
-                               eaddrs = (u16 *)mclist->dmi_addr;
-                               *setup_frm++ = *setup_frm++ = *eaddrs++;
-                               *setup_frm++ = *setup_frm++ = *eaddrs++;
-                               *setup_frm++ = *setup_frm++ = *eaddrs++;
+                               u16 *eaddrs = (u16 *)mclist->dmi_addr;
+                               *setup_frm++ = eaddrs[0]; *setup_frm++ = eaddrs[0];
+                               *setup_frm++ = eaddrs[1]; *setup_frm++ = eaddrs[1];
+                               *setup_frm++ = eaddrs[2]; *setup_frm++ = eaddrs[2];
                        }
                        /* Fill the unused entries with the broadcast address. */
                        memset(setup_frm, 0xff, (15-i)*12);
@@ -944,9 +946,9 @@ static void set_rx_mode(struct net_device *dev)
 
                /* Fill the final entry with our physical address. */
                eaddrs = (u16 *)dev->dev_addr;
-               *setup_frm++ = *setup_frm++ = eaddrs[0];
-               *setup_frm++ = *setup_frm++ = eaddrs[1];
-               *setup_frm++ = *setup_frm++ = eaddrs[2];
+               *setup_frm++ = eaddrs[0]; *setup_frm++ = eaddrs[0];
+               *setup_frm++ = eaddrs[1]; *setup_frm++ = eaddrs[1];
+               *setup_frm++ = eaddrs[2]; *setup_frm++ = eaddrs[2];
 
                spin_lock_irqsave(&tp->lock, flags);
 
@@ -1010,12 +1012,12 @@ static void set_rx_mode(struct net_device *dev)
 static int __devinit tulip_init_one (struct pci_dev *pdev,
                                     const struct pci_device_id *ent)
 {
-       static int did_version = 0;                     /* Already printed version info. */
+       static int did_version;                 /* Already printed version info. */
        struct tulip_private *tp;
        /* See note below on the multiport cards. */
        static unsigned char last_phys_addr[6] = {0x00, 'L', 'i', 'n', 'u', 'x'};
-       static int last_irq = 0;
-       static int multiport_cnt = 0;           /* For four-port boards w/one EEPROM */
+       static int last_irq;
+       static int multiport_cnt;               /* For four-port boards w/one EEPROM */
        u8 chip_rev;
        int i, irq;
        unsigned short sum;
index 5ab238eb0002a23cb06a53e15107f3f6596fbdc3..e4fa70c31860c3d080c4448e6440683f57b79c9b 100644 (file)
@@ -228,7 +228,7 @@ static int cosa_major = 117;
 
 /* Maybe the following should be allocated dynamically */
 static struct cosa_data cosa_cards[MAX_CARDS];
-static int nr_cards = 0;
+static int nr_cards;
 
 #ifdef COSA_ISA_AUTOPROBE
 static int io[MAX_CARDS+1]  = { 0x220, 0x228, 0x210, 0x218, 0, };
@@ -365,7 +365,7 @@ static void debug_status_out(struct cosa_data *cosa, int status);
 \f
 /* ---------- Initialization stuff ---------- */
 
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
 
 #ifdef MODULE
 int init_module(void)
@@ -1387,7 +1387,7 @@ static void cosa_kick(struct cosa_data *cosa)
  */
 static int cosa_dma_able(struct channel_data *chan, char *buf, int len)
 {
-       static int count = 0;
+       static int count;
        unsigned long b = (unsigned long)buf;
        if (b+len >= MAX_DMA_ADDRESS)
                return 0;
index 6d46b2e460608680e96d4a2464c2a50edaae9459..520b1341adb64ef42f05691aaf1496a6bb6591b0 100644 (file)
@@ -102,8 +102,8 @@ static char drvname[]       = "wanpipe";
 static char fullname[] = "WANPIPE(tm) Multiprotocol Driver";
 static char copyright[]        = "(c) 1995-1999 Sangoma Technologies Inc.";
 static int ncards = CONFIG_WANPIPE_CARDS;
-static int active = 0;                 /* number of active cards */
-static sdla_t* card_array = NULL;      /* adapter data space */
+static int active;                     /* number of active cards */
+static sdla_t* card_array;     /* adapter data space */
 
 /* Task queue element for creating a 'thread' */
 static struct tq_struct sdla_tq =
index 8ce05ba8dd11242abf7143da3e694ff9ee5f9b62..92a614a39d89fd95b1ce12d43bc8996135deb69e 100644 (file)
@@ -447,10 +447,10 @@ static struct net_device dev_wd[MAX_WD_CARDS] = {
        },
 };
 
-static int io[MAX_WD_CARDS] = { 0, };
-static int irq[MAX_WD_CARDS]  = { 0, };
-static int mem[MAX_WD_CARDS] = { 0, };
-static int mem_end[MAX_WD_CARDS] = { 0, };     /* for non std. mem size */
+static int io[MAX_WD_CARDS];
+static int irq[MAX_WD_CARDS];
+static int mem[MAX_WD_CARDS];
+static int mem_end[MAX_WD_CARDS]     /* for non std. mem size */
 
 MODULE_PARM(io, "1-" __MODULE_STRING(MAX_WD_CARDS) "i");
 MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_WD_CARDS) "i");
index 054bb4d89d80e5afe2431c3c2d13eef3640bacfb..19045439e3d8c29321f2868fc3474a586be42756 100644 (file)
@@ -343,7 +343,6 @@ int __init parport_mfc3_init(void)
                unsigned long piabase = z->resource.start+PIABASE;
                if (!request_mem_region(piabase, sizeof(struct pia), "PIA"))
                        continue;
-               strcpy(z->name, "MultiFace III MC6821 PIA");
                pp = (struct pia *)ZTWO_VADDR(piabase);
                if (pias < MAX_MFC) {
                        pp->crb = 0;
index 9b2c652ac52b2c760c752d5d23d784e98cb9ea97..586ef3d2d9df39339746b2546465a49aca402340 100644 (file)
@@ -115,7 +115,7 @@ main(void)
 #undef VENDOR\n\
 #undef DEVICE\n\
 #undef ENDVENDOR\n", devf);
-       fputs("\n#undef CLASS", clsf);
+       fputs("\n#undef CLASS\n", clsf);
 
        fclose(devf);
        fclose(clsf);
index 7723913ba05f04e6d30852220ccf68900d838a16..bfb9de0be552d1b646ddf4a00e0f995a1b5b7b88 100644 (file)
 1053  Young Micro Systems
 1054  Hitachi, Ltd
 1055  EFAR Microsystems
+       9130  EIDE Controller
+       9460  PCI to ISA Bridge
+       9462  USB Universal Host Controller [OHCI]
+       9463  Power Management Controller [Bridge]
 1056  ICL
 # Motorola made a mistake and used 1507 instead of 1057 in some chips.
 # Please look at the 1507 entry as well when updating this.
index 81c9014c1ca17e2330f0347f7f311498645c6e7c..9f2d52d5ff495ec149f11247d9d596389db59e16 100644 (file)
@@ -70,8 +70,8 @@ static int lis_del_from_elist( strevent_t **list, pid_t pid, short events );
 static void lis_free_elist( strevent_t **list);
 static void kill_procs( struct strevent *elist, int sig, short e);
 
-static struct sparcaudio_driver *drivers[SPARCAUDIO_MAX_DEVICES] = {NULL};
-static devfs_handle_t devfs_handle = NULL;
+static struct sparcaudio_driver *drivers[SPARCAUDIO_MAX_DEVICES];
+static devfs_handle_t devfs_handle;
  
 /* This crap to be pulled off into a local include file */
 #if defined (LINUX_VERSION_CODE) && LINUX_VERSION_CODE < 0x20100
index 1679cb6d4d7351899889aa657688400de74d2fed..ad8b7e140b8ec9f48420ae98e2fa1e7eb6bec76c 100644 (file)
@@ -36,7 +36,7 @@ obj-$(CONFIG_SUN_AURORA)              += aurora.o
 obj-$(CONFIG_TADPOLE_TS102_UCTRL)      += uctrl.o
 obj-$(CONFIG_SUN_JSFLASH)              += jsflash.o
 
-O_OBJS := $(obj-y)
+O_OBJS += $(obj-y)
 M_OBJS := $(obj-m)
 
 include $(TOPDIR)/Rules.make
index 133246129b9405aa793d2bcd6f1326bf874b1480..4579404e310e5c70e867df408902c8397c583914 100644 (file)
@@ -1015,7 +1015,7 @@ static inline void freeLptPort(int idx)
 
 #endif
 
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
 
 #ifdef MODULE
 int init_module(void)
index be1071c784ae399eca3a3859ca103a19f2e791d8..ae7ba7ac18589401b5c5726f75661f104e4f0092 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: sab82532.c,v 1.51 2000/09/04 19:41:26 ecd Exp $
+/* $Id: sab82532.c,v 1.52 2000/10/14 10:09:04 davem Exp $
  * sab82532.c: ASYNC Driver for the SIEMENS SAB82532 DUSCC.
  *
  * Copyright (C) 1997  Eddie C. Dost  (ecd@skynet.be)
@@ -2133,7 +2133,7 @@ static void __init sab82532_kgdb_hook(int line)
 
 static inline void __init show_serial_version(void)
 {
-       char *revision = "$Revision: 1.51 $";
+       char *revision = "$Revision: 1.52 $";
        char *version, *p;
 
        version = strchr(revision, ' ');
index 416bfd58aa110bcfa2450494ebfc4aee446d2e36..1fd2d6fbf5e387a08cc46e5ed9664b51c9616941 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: su.c,v 1.41 2000/09/04 19:41:27 ecd Exp $
+/* $Id: su.c,v 1.42 2000/10/14 10:09:04 davem Exp $
  * su.c: Small serial driver for keyboard/mouse interface on sparc32/PCI
  *
  * Copyright (C) 1997  Eddie C. Dost  (ecd@skynet.be)
@@ -2219,7 +2219,7 @@ done:
  */
 static __inline__ void __init show_su_version(void)
 {
-       char *revision = "$Revision: 1.41 $";
+       char *revision = "$Revision: 1.42 $";
        char *version, *p;
 
        version = strchr(revision, ' ');
index 5540e734bb37b3b26150babbd947852683a8e402..f34c12250ecb809bc3f2d06451e9551c00251ef1 100644 (file)
@@ -80,7 +80,7 @@ extern void reset_vc(unsigned int new_console);
 extern void scrollback(int);
 extern void scrollfront(int);
 
-struct l1a_kbd_state l1a_state = { 0, 0 };
+struct l1a_kbd_state l1a_state;
 
 #ifndef CONFIG_PCI
 DECLARE_WAIT_QUEUE_HEAD(keypress_wait);
@@ -101,30 +101,30 @@ static spinlock_t sunkbd_lock = SPIN_LOCK_UNLOCKED;
  */
 
 /* shift state counters.. */
-static unsigned char k_down[NR_SHIFT] = {0, };
+static unsigned char k_down[NR_SHIFT];
 /* keyboard key bitmap */
-static unsigned long key_down[256/BITS_PER_LONG] = { 0, };
+static unsigned long key_down[256/BITS_PER_LONG];
 
 void push_kbd (int scan);
-int kbd_redirected = 0;
+int kbd_redirected;
 
-static int dead_key_next = 0;
+static int dead_key_next;
 /* 
  * In order to retrieve the shift_state (for the mouse server), either
  * the variable must be global, or a new procedure must be created to 
  * return the value. I chose the former way.
  */
 #ifndef CONFIG_PCI
-/*static*/ int shift_state = 0;
+/*static*/ int shift_state;
 #endif
 static int npadch = -1;                        /* -1 or number assembled on pad */
-static unsigned char diacr = 0;
-static char rep = 0;                   /* flag telling character repeat */
+static unsigned char diacr;
+static char rep;                       /* flag telling character repeat */
 struct kbd_struct kbd_table[MAX_NR_CONSOLES];
 static struct tty_struct **ttytab;
 static struct kbd_struct * kbd = kbd_table;
-static struct tty_struct * tty = NULL;
-static int compose_led_on = 0;
+static struct tty_struct * tty;
+static int compose_led_on;
 static int kbd_delay_ticks = HZ / 5;
 static int kbd_rate_ticks = HZ / 20;
 
index 77b849ef026da6b793df0b2e517bda404502bb08..73158f351708d69f3fb9fac206d8ded3a11e28de 100644 (file)
@@ -43,7 +43,7 @@
 #include <asm/vfc_ioctls.h>
 
 static struct file_operations vfc_fops;
-static devfs_handle_t devfs_handle = NULL;  /*  For the directory  */
+static devfs_handle_t devfs_handle;  /*  For the directory  */
 struct vfc_dev **vfc_dev_lst;
 static char vfcstr[]="vfc";
 static unsigned char saa9051_init_array[VFC_SAA9051_NR] = {
index aa6472d492a79281d1b826c154847f3274beb04e..67ef24fd3194ce702b5e010c50d511b143e0680c 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: zs.c,v 1.59 2000/08/29 07:01:55 davem Exp $
+/* $Id: zs.c,v 1.60 2000/10/14 10:09:04 davem Exp $
  * zs.c: Zilog serial port driver for the Sparc.
  *
  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
@@ -1913,7 +1913,7 @@ int zs_open(struct tty_struct *tty, struct file * filp)
 
 static void show_serial_version(void)
 {
-       char *revision = "$Revision: 1.59 $";
+       char *revision = "$Revision: 1.60 $";
        char *version, *p;
 
        version = strchr(revision, ' ');
index b26a8677b20204d60a952fc73b90a0b1e8d55218..98ceaf3e9d794b48bb1b13a227d743f81479b5ea 100644 (file)
@@ -205,7 +205,6 @@ int __init a2091_detect(Scsi_Host_Template *tpnt)
        address = z->resource.start;
        if (!request_mem_region(address, 256, "wd33c93"))
            continue;
-       strcpy(z->name, "A590/A2091 SCSI Host Adapter");
 
        instance = scsi_register (tpnt, sizeof (struct WD33C93_hostdata));
        instance->base = ZTWO_VADDR(address);
index a02006cb3e34d9c8bd2dddfceb6b6a78cff5e6ce..667eedd3cd89d98fe610b6aa4b25cdd38c93164c 100644 (file)
@@ -1280,7 +1280,8 @@ int aha152x_detect(Scsi_Host_Template * tpnt)
                        scsi_unregister(shpnt);
                        registered_count--;
                        release_region(shpnt->io_port, IO_RANGE);
-                       aha152x_host[shpnt->irq - IRQ_MIN] = shpnt = 0;
+                       aha152x_host[shpnt->irq - IRQ_MIN] = 0;
+                       shpnt = 0;
                        continue;
                }
                HOSTDATA(shpnt)->swint = 0;
index 217d79819fb9026de1052733297c0243c921f4c2..f2f457b79b1b8d828862b92e6c4a37240aad558f 100644 (file)
@@ -72,8 +72,6 @@ int __init amiga7xx_detect(Scsi_Host_Template *tpnt)
            case ZORRO_PROD_PHASE5_BLIZZARD_603E_PLUS:
                address = 0xf40000;
                if (request_mem_region(address, 0x1000, "ncr53c710")) {
-                   strcpy(z->name,
-                          "Blizzard 603e+ Accelerator and SCSI Host Adapter");
                    address = ZTWO_VADDR(address);
                    options = OPTION_MEMORY_MAPPED | OPTION_DEBUG_TEST1 |
                              OPTION_INTFLY | OPTION_SYNCHRONOUS | 
@@ -89,8 +87,6 @@ int __init amiga7xx_detect(Scsi_Host_Template *tpnt)
 #ifdef CONFIG_WARPENGINE_SCSI
            case ZORRO_PROD_MACROSYSTEMS_WARP_ENGINE_40xx:
                if (request_mem_region(address+0x40000, 0x1000, "ncr53c710")) {
-                   strcpy(z->name, "Warp Engine 40xx Accelerator, SCSI Host "
-                                   "Adapter and RAM Expansion");
                    address = (unsigned long)ioremap(address, size);
                    options = OPTION_MEMORY_MAPPED | OPTION_DEBUG_TEST1 |
                              OPTION_INTFLY | OPTION_SYNCHRONOUS |
@@ -107,7 +103,6 @@ int __init amiga7xx_detect(Scsi_Host_Template *tpnt)
            case ZORRO_PROD_CBM_A4091_1:
            case ZORRO_PROD_CBM_A4091_2:
                if (request_mem_region(address+0x800000, 0x1000, "ncr53c710")) {
-                   strcpy(z->name, "A4091 SCSI Host Adapter");
                    address = (unsigned long)ioremap(address, size);
                    options = OPTION_MEMORY_MAPPED | OPTION_DEBUG_TEST1 |
                              OPTION_INTFLY | OPTION_SYNCHRONOUS |
@@ -123,8 +118,6 @@ int __init amiga7xx_detect(Scsi_Host_Template *tpnt)
 #ifdef CONFIG_GVP_TURBO_SCSI
            case ZORRO_PROD_GVP_GFORCE_040_060:
                if (request_mem_region(address+0x40000, 0x1000, "ncr53c710")) {
-                   strcpy(z->name, "GForce 040/060 Accelerator and SCSI Host "
-                                   "Adapter");
                    address = ZTWO_VADDR(address);
                    options = OPTION_MEMORY_MAPPED | OPTION_DEBUG_TEST1 |
                              OPTION_INTFLY | OPTION_SYNCHRONOUS |
index a13a0ff2559ee717460db99eba9103f336d516eb..6872d7ca66bd3b8da6ab1967740a1733d829a1c2 100644 (file)
@@ -95,7 +95,6 @@ int __init blz1230_esp_detect(Scsi_Host_Template *tpnt)
                                           sizeof(struct ESP_regs));
                        return 0; /* Bail out if address did not hold data */
                }
-               strcpy(z->name, "Blizzard 1230 SCSI IV");
 
                /* Do command transfer with programmed I/O */
                esp->do_pio_cmds = 1;
index 3daac0f2a49c7c40f6e92c6df5c9550edfad749b..77e3e4f116bd03328b1da533e890753e0c517dee 100644 (file)
@@ -68,8 +68,6 @@ int __init blz2060_esp_detect(Scsi_Host_Template *tpnt)
            unsigned long board = z->resource.start;
            if (request_mem_region(board+BLZ2060_ESP_ADDR,
                                   sizeof(struct ESP_regs), "NCR53C9x")) {
-               strcpy(z->name, "Blizzard 2060 Accelerator");
-
                esp = esp_allocate(tpnt, (void *)board+BLZ2060_ESP_ADDR);
 
                /* Do command transfer with programmed I/O */
index 87a3e842d0028fcd9d617be492a9988c1adac51f..33150121c8aed55e9d5bc85fdeb5605b1017265d 100644 (file)
@@ -89,8 +89,6 @@ int __init cyber_esp_detect(Scsi_Host_Template *tpnt)
                                           sizeof(struct ESP_regs));
                        return 0;
                }
-               strcpy(z->name, "Cyberstorm SCSI Host Adapter");
-
                esp = esp_allocate(tpnt, (void *)board+CYBER_ESP_ADDR);
 
                /* Do command transfer with programmed I/O */
index cfd5ff6cb146d52e45db73f4a5954921860979d4..a1d53b314bc463fe7919b7acfd0d8c96177ca7ac 100644 (file)
@@ -85,7 +85,6 @@ int __init cyberII_esp_detect(Scsi_Host_Template *tpnt)
                                           sizeof(struct ESP_regs));
                        return 0; /* Bail out if address did not hold data */
                }
-               strcpy(z->name, "CyberStorm Mk II SCSI Host Adapter");
 
                /* Do command transfer with programmed I/O */
                esp->do_pio_cmds = 1;
index 0d0711878489c327e5778b68e3455a79dbb9bb26..a1f277e8d19bca41a2d76eb1a0d0c7f9ff4919dc 100644 (file)
@@ -689,12 +689,12 @@ static void do_interrupt_handler(int, void *, struct pt_regs *);
 static void flush_dev(Scsi_Device *, unsigned long, unsigned int, unsigned int);
 static int do_trace = FALSE;
 static int setup_done = FALSE;
-static int link_statistics = 0;
+static int link_statistics;
 static int tag_mode = TAG_MIXED;
 static int ext_tran = FALSE;
 static int rev_scan = TRUE;
 static int use_new_eh_code = TRUE;
-static char *boot_options = NULL;
+static char *boot_options;
 
 #if defined(CONFIG_SCSI_EATA_TAGGED_QUEUE)
 static int tagged_comm = TRUE;
index 0126ac43131c2f88082410b7c5054ed293ea5fb2..bb7f89990beb65917f83d04895f8b358e6ac3c64 100644 (file)
@@ -100,8 +100,6 @@ int __init fastlane_esp_detect(Scsi_Host_Template *tpnt)
                                           sizeof(struct ESP_regs));
                        return 0;
                }
-               strcpy(z->name, "Fastlane Z3 SCSI Host Adapter");
-
                esp = esp_allocate(tpnt, (void *)board+FASTLANE_ESP_ADDR);
 
                /* Do command transfer with programmed I/O */
index 7eb632ba05f9a5b54ba1d5b0c7c13b3620cee191..cd64662ee59243afe105b79fbd01f88b3173a1d3 100644 (file)
@@ -230,7 +230,6 @@ int __init gvp11_detect(Scsi_Host_Template *tpnt)
        address = z->resource.start;
        if (!request_mem_region(address, 256, "wd33c93"))
            continue;
-       strcpy(z->name, "GVP Series II SCSI");
 
 #ifdef CHECK_WD33C93
 
index a6f4f74ca0cada8edbe4073f36aeef3b8b9dfb30..9329e6a76ca39c891573046f064cdcc5e4893e1a 100644 (file)
@@ -430,12 +430,12 @@ static ide_startstop_t idescsi_issue_pc (ide_drive_t *drive, idescsi_pc_t *pc)
        if (drive->using_dma && rq->bh)
                dma_ok=!HWIF(drive)->dmaproc(test_bit (PC_WRITING, &pc->flags) ? ide_dma_write : ide_dma_read, drive);
 
+       SELECT_DRIVE(HWIF(drive), drive);
        if (IDE_CONTROL_REG)
                OUT_BYTE (drive->ctl,IDE_CONTROL_REG);
        OUT_BYTE (dma_ok,IDE_FEATURE_REG);
        OUT_BYTE (bcount >> 8,IDE_BCOUNTH_REG);
        OUT_BYTE (bcount & 0xff,IDE_BCOUNTL_REG);
-       OUT_BYTE (drive->select.all,IDE_SELECT_REG);
 
        if (dma_ok) {
                set_bit (PC_DMA_IN_PROGRESS, &pc->flags);
index 2e22157f07129a3937a052e0eeca75f2b52f54a2..976a67dc692a9632608b05ac22aca8a71a368472 100644 (file)
@@ -124,7 +124,6 @@ int oktagon_esp_detect(Scsi_Host_Template *tpnt)
            unsigned long board = z->resource.start;
            if (request_mem_region(board+OKTAGON_ESP_ADDR,
                                   sizeof(struct ESP_regs), "NCR53C9x")) {
-               strcpy(z->name, "Oktagon 2008 SCSI Host Adapter");
                /*
                 * It is a SCSI controller.
                 * Hardwire Host adapter to SCSI ID 7
index 2e9fd7313a606ba9125499a884107121a2703a88..acd59036ab9e3e3aa98fe3c9bb052e54517a22d2 100644 (file)
@@ -74,7 +74,7 @@
 
 #undef USE_STATIC_SCSI_MEMORY
 
-struct proc_dir_entry *proc_scsi = NULL;
+struct proc_dir_entry *proc_scsi;
 
 #ifdef CONFIG_PROC_FS
 static int scsi_proc_info(char *buffer, char **start, off_t offset, int length);
@@ -98,23 +98,23 @@ static void scsi_dump_status(int level);
 /*
  * Data declarations.
  */
-unsigned long scsi_pid = 0;
-Scsi_Cmnd *last_cmnd = NULL;
+unsigned long scsi_pid;
+Scsi_Cmnd *last_cmnd;
 /* Command groups 3 and 4 are reserved and should never be used.  */
 const unsigned char scsi_command_size[8] =
 {
        6, 10, 10, 12,
        12, 12, 10, 10
 };
-static unsigned long serial_number = 0;
-static Scsi_Cmnd *scsi_bh_queue_head = NULL;
-static Scsi_Cmnd *scsi_bh_queue_tail = NULL;
+static unsigned long serial_number;
+static Scsi_Cmnd *scsi_bh_queue_head;
+static Scsi_Cmnd *scsi_bh_queue_tail;
 
 /*
  * Note - the initial logging level can be set here to log events at boot time.
  * After the system is up, you may enable logging via the /proc interface.
  */
-unsigned int scsi_logging_level = 0;
+unsigned int scsi_logging_level;
 
 const char *const scsi_device_types[MAX_SCSI_DEVICE_CODE] =
 {
@@ -716,7 +716,7 @@ int scsi_dispatch_cmd(Scsi_Cmnd * SCpnt)
        return rtn;
 }
 
-devfs_handle_t scsi_devfs_handle = NULL;
+devfs_handle_t scsi_devfs_handle;
 
 /*
  * scsi_do_cmd sends all the commands out to the low-level driver.  It
@@ -2166,12 +2166,11 @@ static void scsi_unregister_host(Scsi_Host_Template * tpnt)
                while ((SHT = *SHTp) != NULL) {
                        if (SHT == tpnt) {
                                *SHTp = SHT->next;
+                               remove_proc_entry(tpnt->proc_name, proc_scsi);
                                break;
                        }
                        SHTp = &SHT->next;
                }
-               /* Rebuild the /proc/scsi directory entries */
-               remove_proc_entry(tpnt->proc_name, proc_scsi);
        }
        MOD_DEC_USE_COUNT;
 }
index 78f23f6d34de1421b3a72d1b27399b6256699363..5e4b52c78f22874a2d71cd000ffa6aa8929ca22a 100644 (file)
@@ -1546,10 +1546,10 @@ out:
        return retv;
 }
 
-#undef SET_BIT 0
-#undef CLR_BIT 1
-#undef SET_CLK 2
-#undef CLR_CLK 3
+#undef SET_BIT 
+#undef CLR_BIT 
+#undef SET_CLK 
+#undef CLR_CLK 
 
 /*
  *  Try reading Symbios NVRAM.
index b1399d36d5810611fdf89410b5b2158436fb9abf..5d943c64546726bfaa6514f581a379098bddbeed 100644 (file)
@@ -951,7 +951,7 @@ static int mail_out (Adapter *host, Scb *scbptr)
            break;
        }
        else
-           ogmb = (++ogmb) % OGMB_CNT;
+           ogmb = (ogmb + 1) % OGMB_CNT;
     }
     restore_flags (flags);
 
index dd174bfa687037da95e0e78cbfa09088104e85b3..50a045c1c4ada500f62a22eb82238d85bfc59062 100644 (file)
@@ -152,7 +152,7 @@ spinlock_t sound_loader_lock = SPIN_LOCK_UNLOCKED;
  *     list. Acquires locks as needed
  */
 
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
  
 static int sound_insert_unit(struct sound_unit **list, struct file_operations *fops, int index, int low, int top, const char *name, umode_t mode)
 {
index 7ca4666e4a201a69c641f49a4e79ef9a2be6c98f..ac0da7cfa0f5aabe8dd0d44516a31b9a2f99f69b 100644 (file)
@@ -306,7 +306,7 @@ static int attr2mask [] = {
        DSP_BIND_I2S, DSP_BIND_CENTER_LFE, DSP_BIND_SURR, DSP_BIND_SPDIF
 };
 
-static struct trident_card *devs = NULL;
+static struct trident_card *devs;
 
 static void ali_ac97_set(struct ac97_codec *codec, u8 reg, u16 val);
 static u16 ali_ac97_get(struct ac97_codec *codec, u8 reg);
index 53452e878ad8627f4060ccce9316ddfe586695be..584b3615c8e334a5e94f3fecf915058c4045d701 100644 (file)
@@ -67,6 +67,14 @@ static char ixj_c_revision[] = "$Revision: 3.31 $";
 #include <asm/segment.h>
 #include <asm/uaccess.h>
 
+#ifdef CONFIG_PCMCIA
+#include <pcmcia/version.h>
+#include <pcmcia/cs_types.h>
+#include <pcmcia/cs.h>
+#include <pcmcia/cistpl.h>
+#include <pcmcia/ds.h>
+#endif
+
 #ifdef CONFIG_ISAPNP
 #include <linux/isapnp.h>
 #endif
@@ -5876,8 +5884,8 @@ static void ixj_detach(dev_link_t * link)
        }
        /* Unlink device structure, free bits */
        *linkp = link->next;
-       kfree_s(link->priv, sizeof(ixj_info_t));
-       kfree_s(link, sizeof(struct dev_link_t));
+       kfree(link->priv);
+       kfree(link);
 }
 
 #define CS_CHECK(fn, args...) \
@@ -6039,7 +6047,7 @@ int ixj_event(event_t event, int priority, event_callback_args_t * args)
        case CS_EVENT_CARD_REMOVAL:
                link->state &= ~DEV_PRESENT;
                if (link->state & DEV_CONFIG) {
-                       link->release.expires = RUN_AT(HZ / 20);
+                       link->release.expires = jiffies + (HZ / 20);
                        link->state |= DEV_RELEASE_PENDING;
                        add_timer(&link->release);
                }
index 4fb391a8b9bbfba2bbb8c4bb3590f5024f5eda04..0d2957ca95979467d229fab97e25877e8de68b74 100644 (file)
@@ -64,6 +64,8 @@
 
 #define OHCI_USE_NPS           // force NoPowerSwitching mode
 // #define OHCI_VERBOSE_DEBUG  /* not always helpful */
+#define OHCI_MEM_SLAB
+// #define OHCI_MEM_FLAGS      SLAB_POISON     /* no redzones; see mm/slab.c */
 
 #include "usb-ohci.h"
 
@@ -95,13 +97,13 @@ static spinlock_t usb_ed_lock = SPIN_LOCK_UNLOCKED;
  
 /* free HCD-private data associated with this URB */
 
-static void urb_free_priv (urb_priv_t * urb_priv)
+static void urb_free_priv (struct ohci *hc, urb_priv_t * urb_priv)
 {
        int i;
 
        for (i = 0; i < urb_priv->length; i++) {
                if (urb_priv->td [i]) {
-                       OHCI_FREE (urb_priv->td [i]);
+                       td_free (hc, urb_priv->td [i]);
                }
        }
 
@@ -129,7 +131,7 @@ static void urb_rm_priv_locked (urb_t * urb)
                        }
                }
 
-               urb_free_priv (urb_priv);
+               urb_free_priv ((struct ohci *)urb->dev->bus, urb_priv);
                usb_dec_dev_use (urb->dev);
                urb->dev = NULL;
        }
@@ -531,16 +533,16 @@ static int sohci_submit_urb (urb_t * urb)
 
        /* allocate the TDs */
        for (i = 0; i < size; i++) { 
-               OHCI_ALLOC (urb_priv->td[i], sizeof (td_t));
+               urb_priv->td[i] = td_alloc (ohci);
                if (!urb_priv->td[i]) {
-                       urb_free_priv (urb_priv);
+                       urb_free_priv (ohci, urb_priv);
                        usb_dec_dev_use (urb->dev);     
                        return -ENOMEM;
                }
        }       
 
        if (ed->state == ED_NEW || (ed->state & ED_DEL)) {
-               urb_free_priv (urb_priv);
+               urb_free_priv (ohci, urb_priv);
                usb_dec_dev_use (urb->dev);     
                return -EINVAL;
        }
@@ -561,7 +563,7 @@ static int sohci_submit_urb (urb_t * urb)
                                bustime = usb_check_bandwidth (urb->dev, urb);
                        }
                        if (bustime < 0) {
-                               urb_free_priv (urb_priv);
+                               urb_free_priv (ohci, urb_priv);
                                usb_dec_dev_use (urb->dev);     
                                return bustime;
                        }
@@ -683,7 +685,11 @@ static int sohci_alloc_dev (struct usb_device *usb_dev)
 {
        struct ohci_device * dev;
 
-       dev = kmalloc (sizeof (*dev), GFP_KERNEL);
+       /* FIXME:  ED allocation with pci_consistent memory
+        * must know the controller ... either pass it in here,
+        * or decouple ED allocation from dev allocation.
+        */
+       dev = dev_alloc (NULL);
        if (!dev)
                return -ENOMEM;
                
@@ -772,7 +778,9 @@ static int sohci_free_dev (struct usb_device * usb_dev)
                        }
                }
        }
-       kfree (dev);
+
+       /* free device, and associated EDs */
+       dev_free (dev);
 
        return 0;
 }
@@ -1077,7 +1085,8 @@ static ed_t * ep_add_ed (struct usb_device * usb_dev, unsigned int pipe, int int
        
        if (ed->state == ED_NEW) {
                ed->hwINFO = cpu_to_le32 (OHCI_ED_SKIP); /* skip ed */
-               OHCI_ALLOC (td, sizeof (*td)); /* dummy td; end of td list for ed */
+               /* dummy td; end of td list for ed */
+               td = td_alloc (ohci);
                if (!td) {
                        /* out of memory */
                        spin_unlock_irqrestore (&usb_ed_lock, flags);
@@ -1425,7 +1434,7 @@ static void dl_del_list (ohci_t  * ohci, unsigned int frame)
 
                if (ed->state & ED_DEL) { /* set by sohci_free_dev */
                        struct ohci_device * dev = usb_to_ohci (ohci->dev[edINFO & 0x7F]);
-                       OHCI_FREE (tdTailP); /* free dummy td */
+                       td_free (ohci, tdTailP); /* free dummy td */
                        ed->hwINFO = cpu_to_le32 (OHCI_ED_SKIP); 
                        ed->state = ED_NEW; 
                        /* if all eds are removed wake up sohci_free_dev */
@@ -1443,7 +1452,7 @@ static void dl_del_list (ohci_t  * ohci, unsigned int frame)
                        if (tdHeadP == tdTailP) {
                                if (ed->state == ED_OPER)
                                        ep_unlink(ohci, ed);
-                               OHCI_FREE (tdTailP);
+                               td_free (ohci, tdTailP);
                                ed->hwINFO = cpu_to_le32 (OHCI_ED_SKIP);
                                ed->state = ED_NEW;
                                --(usb_to_ohci (ohci->dev[edINFO & 0x7F]))->ed_cnt;
@@ -2536,15 +2545,23 @@ static struct pmu_sleep_notifier ohci_sleep_notifier = {
 };
 #endif /* CONFIG_PMAC_PBOOK */
 
+
 /*-------------------------------------------------------------------------*/
 
 static int __init ohci_hcd_init (void) 
 {
-       int ret = pci_module_init (&ohci_pci_driver);
+       int ret;
+
+       if ((ret = ohci_mem_init ()) < 0)
+               return ret;
+
+       if ((ret = pci_module_init (&ohci_pci_driver)) < 0) {
+               ohci_mem_cleanup ();
+               return ret;
+       }
 
 #ifdef CONFIG_PMAC_PBOOK
-       if (ret >= 0)
-               pmu_register_sleep_notifier (&ohci_sleep_notifier);
+       pmu_register_sleep_notifier (&ohci_sleep_notifier);
 #endif  
        return ret;
 }
@@ -2557,6 +2574,7 @@ static void __exit ohci_hcd_cleanup (void)
        pmu_unregister_sleep_notifier (&ohci_sleep_notifier);
 #endif  
        pci_unregister_driver (&ohci_pci_driver);
+       ohci_mem_cleanup ();
 }
 
 module_init (ohci_hcd_init);
index 086db1a12f19cc4414d39001e21571b5c84a5ae7..349e4cda4680bb1c7ce62d0b481e9295c3770da4 100644 (file)
@@ -30,10 +30,6 @@ static int cc_to_error[16] = {
 };
 
 
-struct ed;
-struct td;
-/* for ED and TD structures */
-
 /* ED States */
 
 #define ED_NEW                 0x00
@@ -406,12 +402,100 @@ static int rh_submit_urb(urb_t * urb);
 static int rh_unlink_urb(urb_t * urb);
 static int rh_init_int_timer(urb_t * urb);
 
-#ifdef OHCI_VERBOSE_DEBUG
-#define OHCI_FREE(x) kfree(x); printk("OHCI FREE: %d: %4x\n", -- __ohci_free_cnt, (unsigned int) x)
-#define OHCI_ALLOC(x,size) (x) = kmalloc(size, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); printk("OHCI ALLO: %d: %4x\n", ++ __ohci_free_cnt,(unsigned int) x)
-static int __ohci_free_cnt = 0;
+/*-------------------------------------------------------------------------*/
+
+#define ALLOC_FLAGS (in_interrupt () ? GFP_ATOMIC : GFP_KERNEL)
+#ifdef OHCI_MEM_SLAB
+#define        __alloc(t,c) kmem_cache_alloc(c,ALLOC_FLAGS)
+#define        __free(c,x) kmem_cache_free(c,x)
+static kmem_cache_t *td_cache, *ed_cache;
+
+/*
+ * WARNING:  do NOT use this with "forced slab debug"; it won't respect
+ * our hardware alignment requirement.
+ */
+#ifndef OHCI_MEM_FLAGS
+#define        OHCI_MEM_FLAGS 0
+#endif
+
+static int ohci_mem_init (void)
+{
+       /* redzoning (or forced debug!) breaks alignment */
+       int     flags = (OHCI_MEM_FLAGS) & ~SLAB_RED_ZONE;
+
+       /* TDs accessed by controllers and host */
+       td_cache = kmem_cache_create ("ohci_td", sizeof (struct td), 0,
+               flags | SLAB_HWCACHE_ALIGN, NULL, NULL);
+       if (!td_cache) {
+               dbg ("no TD cache?");
+               return -ENOMEM;
+       }
+
+       /* EDs are accessed by controllers and host;  dev part is host-only */
+       ed_cache = kmem_cache_create ("ohci_ed", sizeof (struct ohci_device), 0,
+               flags | SLAB_HWCACHE_ALIGN, NULL, NULL);
+       if (!ed_cache) {
+               dbg ("no ED cache?");
+               kmem_cache_destroy (td_cache);
+               td_cache = 0;
+               return -ENOMEM;
+       }
+       dbg ("slab flags 0x%x", flags);
+       return 0;
+}
+
+static void ohci_mem_cleanup (void)
+{
+       if (ed_cache && kmem_cache_destroy (ed_cache))
+               err ("ed_cache remained");
+       ed_cache = 0;
+
+       if (td_cache && kmem_cache_destroy (td_cache))
+               err ("td_cache remained");
+       td_cache = 0;
+}
+
 #else
-#define OHCI_FREE(x) kfree(x) 
-#define OHCI_ALLOC(x,size) (x) = kmalloc(size, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL) 
+#define        __alloc(t,c) kmalloc(sizeof(t),ALLOC_FLAGS)
+#define        __free(dev,x) kfree(x)
+#define td_cache 0
+#define ed_cache 0
+
+static inline int ohci_mem_init (void) { return 0; }
+static inline void ohci_mem_cleanup (void) { return; }
+
+/* FIXME: pci_consistent version */
+
 #endif
+
+
+/* TDs ... */
+static inline struct td *
+td_alloc (struct ohci *hc)
+{
+       struct td *td = (struct td *) __alloc (struct td, td_cache);
+       return td;
+}
+
+static inline void
+td_free (struct ohci *hc, struct td *td)
+{
+       __free (td_cache, td);
+}
+
+
+/* DEV + EDs ... only the EDs need to be consistent */
+static inline struct ohci_device *
+dev_alloc (struct ohci *hc)
+{
+       struct ohci_device *dev = (struct ohci_device *)
+               __alloc (struct ohci_device, ed_cache);
+       return dev;
+}
+
+static inline void
+dev_free (struct ohci_device *dev)
+{
+       __free (ed_cache, dev);
+}
index 3c37f3edf930c67c81c92f3ccd710bac67261e97..4834f25cf0e3728865596690dfc8db1d9b1dccfe 100644 (file)
@@ -2579,11 +2579,13 @@ _static int process_urb (uhci_t *s, struct list_head *p)
 
                                if (urb->complete) {
                                        dbg("process_transfer: calling completion");
-                                       urb->dev=NULL;
+                                       if (urb->status!=-EINPROGRESS)
+                                               urb->dev=NULL;
                                        urb->complete ((struct urb *) urb);
                                }
                                else
-                                       urb->dev=NULL;
+                                       if (urb->status!=-EINPROGRESS)
+                                               urb->dev=NULL;
                        }
                        
                        usb_dec_dev_use (usb_dev);
index e38198485bb7beb811b07b4120d16164ece1d37f..57626f05c356b32cc6a12343565a0b52475533d1 100644 (file)
@@ -997,10 +997,10 @@ static int clgen_decode_var (const struct fb_var_screeninfo *var, void *par,
                vsync *= 2;
                vback *= 2;
        } else if (_par->var.vmode & FB_VMODE_INTERLACED) {
-               yres = ++yres / 2;
-               vfront = ++vfront / 2;
-               vsync = ++vsync / 2;
-               vback = ++vback / 2;
+               yres = (yres + 1) / 2;
+               vfront = (vfront + 1) / 2;
+               vsync = (vsync + 1) / 2;
+               vback = (vback + 1) / 2;
        }
        _par->HorizRes = xres;
        _par->HorizTotal = (xres + hfront + hsync + hback) / 8 - 5;
index 1e06548b3cf05959fcd39f67290965d002f56867..fe64ab9a143c1ebc55e251242d3c1cd5f074ca2b 100644 (file)
@@ -1190,7 +1190,7 @@ static void control_set_dispsw(struct display *disp, int cmode, struct fb_info_c
        }
 }
 
-static void control_init_info(struct fb_info *info, struct fb_info_control *p)
+static void __init control_init_info(struct fb_info *info, struct fb_info_control *p)
 {
        strcpy(info->modename, "control");
        info->node = -1;        /* ??? danj */
index bd7618def5c0f72385b4f804e45c3efa44739639..5c4af6bf0925adaafdc9bef48c33c9da45a642b3 100644 (file)
@@ -1070,7 +1070,6 @@ int __init cyberfb_init(void)
                release_mem_region(CyberRegs_phys, 0x10000);
                continue;
            }
-           strcpy(z->name, "CyberVision64 Graphics Board");
            DPRINTK("board_addr=%08lx\n", board_addr);
            DPRINTK("board_size=%08lx\n", board_size);
 
index 2deaeca27e7df9b8d6421e3f57b625e11fd28826..f7a5ffba3af0a4f93f90f98d7450dd7e7e015647 100644 (file)
@@ -296,7 +296,7 @@ static void dn_fb_set_disp(int con, struct fb_info *info) {
 
 }
   
-unsigned long dnfb_init(unsigned long mem_start) {
+unsigned long __init dnfb_init(unsigned long mem_start) {
 
        int err;
        
index ee14ed4093b5072ced348bc0a75b813f2ceceec2..3e08ebcb2df27e9ee791946e717e38404ececac0 100644 (file)
@@ -53,7 +53,7 @@ static int dummycon_dummy(void)
  *  Most of the operations are dummies.
  */
 
-struct consw dummy_con = {
+const struct consw dummy_con = {
     con_startup:       dummycon_startup,
     con_init:          dummycon_init,
     con_deinit:                DUMMY,
index c559afcca0a9e0b60a604075fc3f8a2b548cbd9f..2f2c9a3847e5a9ce8618b1fc9bf689611b4d3081 100644 (file)
@@ -2384,7 +2384,7 @@ static int __init fbcon_show_logo( void )
  *  The console `switch' structure for the frame buffer based console
  */
  
-struct consw fb_con = {
+const struct consw fb_con = {
     con_startup:       fbcon_startup, 
     con_init:          fbcon_init,
     con_deinit:        fbcon_deinit,
index 015b8b946a86fe71d5d12302d90a37b29187e96c..7b3d4982251e218c088143b0577928081a4ef0fe 100644 (file)
@@ -618,7 +618,7 @@ int GET_FB_IDX(kdev_t rdev)
     int fbidx = MINOR(rdev);
     if (fbidx >= 32) {
        int newfbidx = fbidx >> 5;
-       static int warned = 0;
+       static int warned;
        if (!(warned & (1<<newfbidx))) {
            warned |= 1<<newfbidx;
            printk("Warning: Remapping obsolete /dev/fb* minor %d to %d\n",
@@ -679,7 +679,7 @@ static struct file_operations fb_fops = {
        release:        fb_release,
 };
 
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
 
 int
 register_framebuffer(struct fb_info *fb_info)
index a5c173aa2ea3bcb0be788427c7af1cfdef8253ca..78538935a9b94d0adb3166b27279d41e7712beb4 100644 (file)
@@ -839,7 +839,7 @@ static struct fb_ops macfb_ops = {
        fb_set_cmap:    macfb_set_cmap,
 };
 
-void macfb_setup(char *options, int *ints)
+void __init macfb_setup(char *options, int *ints)
 {
        char *this_opt;
        
index aac8c4ab92dfd72e4d8e31d1aa4c05529debb7e5..88896352854fd1a2abefcc856281bc1b2e1fa7e0 100644 (file)
@@ -37,6 +37,7 @@
 #include <linux/vt_kern.h>
 #include <linux/vt_buffer.h>
 #include <linux/selection.h>
+#include <linux/spinlock.h>
 #include <linux/ioport.h>
 #include <linux/delay.h>
 #include <linux/init.h>
@@ -44,6 +45,7 @@
 #include <asm/io.h>
 #include <asm/vga.h>
 
+static spinlock_t mda_lock = SPIN_LOCK_UNLOCKED;
 
 /* description of the hardware layout */
 
@@ -80,7 +82,6 @@ MODULE_PARM(mda_first_vc, "1-255i");
 MODULE_PARM(mda_last_vc,  "1-255i");
 #endif
 
-
 /* MDA register values
  */
 
@@ -110,23 +111,24 @@ static void write_mda_b(unsigned int val, unsigned char reg)
 {
        unsigned long flags;
 
-       save_flags(flags); cli();
+       spin_lock_irqsave(&mda_lock, flags);    
 
        outb_p(reg, mda_index_port); 
        outb_p(val, mda_value_port);
 
-       restore_flags(flags);
+       spin_unlock_irqrestore(&mda_lock, flags);
 }
 
 static void write_mda_w(unsigned int val, unsigned char reg)
 {
        unsigned long flags;
 
-       save_flags(flags); cli();
+       spin_lock_irqsave(&mda_lock, flags);
 
        outb_p(reg,   mda_index_port); outb_p(val >> 8,   mda_value_port);
        outb_p(reg+1, mda_index_port); outb_p(val & 0xff, mda_value_port);
 
+       spin_unlock_irqrestore(&mda_lock, flags);
        restore_flags(flags);
 }
 
@@ -134,15 +136,14 @@ static int test_mda_b(unsigned char val, unsigned char reg)
 {
        unsigned long flags;
 
-       save_flags(flags); cli();
+       spin_lock_irqsave(&mda_lock, flags);
 
        outb_p(reg, mda_index_port); 
        outb  (val, mda_value_port);
 
        udelay(20); val = (inb_p(mda_value_port) == val);
 
-       restore_flags(flags);
-
+       spin_unlock_irqrestore(&mda_lock, flags);
        return val;
 }
 
@@ -422,7 +423,8 @@ static u8 mdacon_build_attr(struct vc_data *c, u8 color, u8 intensity,
 static void mdacon_invert_region(struct vc_data *c, u16 *p, int count)
 {
        for (; count > 0; count--) {
-               scr_writew(scr_readw(p) ^ 0x0800, p++);
+               scr_writew(scr_readw(p) ^ 0x0800, p);
+               p++;
        }
 }
 
@@ -585,7 +587,7 @@ static int mdacon_scroll(struct vc_data *c, int t, int b, int dir, int lines)
  *  The console `switch' structure for the MDA based console
  */
 
-struct consw mda_con = {
+const struct consw mda_con = {
        con_startup:            mdacon_startup,
        con_init:               mdacon_init,
        con_deinit:             mdacon_deinit,
index da99d78a14fc54d5f4da16cb898025341351ba62..4e056d2eadc5ce29668f4e7bbc8f49efbf9db7c2 100644 (file)
@@ -574,7 +574,7 @@ static int newport_dummy(struct vc_data *c)
 
 #define DUMMY (void *) newport_dummy
 
-struct consw newport_con = {
+const struct consw newport_con = {
     con_startup:       newport_startup,
     con_init:          newport_init,
     con_deinit:                DUMMY,
index 81b08345e4729a31bea4624dd04b5c685928ca9a..1a1b7a3db3697dbfa86f479afb8a352fbc2323d0 100644 (file)
@@ -369,7 +369,7 @@ static void __init offb_init_nodriver(struct device_node *dp)
     
 }
 
-static void offb_init_fb(const char *name, const char *full_name,
+static void __init offb_init_fb(const char *name, const char *full_name,
                                    int width, int height, int depth,
                                    int pitch, unsigned long address,
                                    struct device_node *dp)
index 9715ae88157411154edcb3de54f62cd07114c054..9c7277b702a1f0396407a0c1ceaf71efac9fe337 100644 (file)
@@ -566,7 +566,7 @@ static int promcon_dummy(void)
 
 #define DUMMY (void *) promcon_dummy
 
-struct consw prom_con = {
+const struct consw prom_con = {
        con_startup:            promcon_startup,
        con_init:               promcon_init,
        con_deinit:             promcon_deinit,
index 2b798e05d01a1b9b08fae6cfe86c151edcabaa5f..a5c68f07073381d510709d36e9a10fe3521ab0db 100644 (file)
@@ -313,7 +313,7 @@ static void q40fb_set_disp(int con, struct fb_info *info)
 #endif
 }
   
-int q40fb_init(void)
+int __init q40fb_init(void)
 {
 
         if ( !MACH_IS_Q40)
index ef39926ab43dde298efe597c63b3c48493414364..13e843c3d7cca785cb0f3edbca3816828dd4e007 100644 (file)
@@ -1391,7 +1391,6 @@ int __init retz3fb_init(void)
                        release_mem_region(board_addr, 0x00c00000);
                        continue;
                }
-               strcpy(z->name, "Retina Z3 Graphics ");
                if (!(zinfo = kmalloc(sizeof(struct retz3_fb_info),
                                      GFP_KERNEL)))
                        return -ENOMEM;
index 85c8f17307173e29290cfc827640799dcc56e701..c2d460b99f350b1d8557aafe506b78df3558acd6 100644 (file)
@@ -3313,7 +3313,7 @@ static struct fb_ops sisfb_ops = {
        fb_mmap:        sisfb_mmap,
 };
 
-int sisfb_setup(char *options)
+int __init sisfb_setup(char *options)
 {
        char *this_opt;
 
index fa19c744da623f61d9443fb0f20b43b4d86a2cfb..11e803273193505126868fdfda6769b048521be5 100644 (file)
@@ -448,7 +448,7 @@ static struct fb_ops vesafb_ops = {
        fb_pan_display: vesafb_pan_display,
 };
 
-int vesafb_setup(char *options)
+int __init vesafb_setup(char *options)
 {
        char *this_opt;
        
index 5ebfec7b0dc34e99f1a4ec7c311ab3125a9cf9a9..8a7e0a0ff9c9c4e21a60a276f377cf415a69b6e5 100644 (file)
@@ -1037,7 +1037,7 @@ static int vgacon_dummy(struct vc_data *c)
 
 #define DUMMY (void *) vgacon_dummy
 
-struct consw vga_con = {
+const struct consw vga_con = {
        con_startup:            vgacon_startup,
        con_init:               vgacon_init,
        con_deinit:             vgacon_deinit,
index 6be952607202dd2dab27d7cfb72ee65c138f0725..ed7bad2b17abc34ac98780b401297fac293090cd 100644 (file)
@@ -1139,7 +1139,6 @@ int __init virgefb_init(void)
                release_mem_region(CyberRegs_phys, 0x10000);
                continue;
            }
-           strcpy(z->name, "CyberVision64-3D Graphics Board");
 
            if (board_addr < 0x01000000) {
                /*
diff --git a/drivers/zorro/Config.in b/drivers/zorro/Config.in
new file mode 100644 (file)
index 0000000..dc91f84
--- /dev/null
@@ -0,0 +1,7 @@
+#
+# Zorro configuration
+#
+
+if [ "$CONFIG_ZORRO" = "y" ]; then
+   bool 'Zorro device name database' CONFIG_ZORRO_NAMES
+fi
index 8e14649b267a674e6cb4a3290f27f84ce2cbaafc..363e699eab88685cb20d42936c57177b28299944 100644 (file)
@@ -23,3 +23,11 @@ endif
 L_OBJS   += names.o
 
 include $(TOPDIR)/Rules.make
+
+names.o: names.c devlist.h
+
+devlist.h: zorro.ids gen-devlist
+       ./gen-devlist <zorro.ids
+
+gen-devlist: gen-devlist.c
+       $(HOSTCC) $(HOSTCFLAGS) -o gen-devlist gen-devlist.c
diff --git a/drivers/zorro/gen-devlist.c b/drivers/zorro/gen-devlist.c
new file mode 100644 (file)
index 0000000..b0a3559
--- /dev/null
@@ -0,0 +1,107 @@
+/*
+ *     Generate devlist.h from the Zorro ID file.
+ *
+ *     (c) 2000 Geert Uytterhoeven <geert@linux-m68k.org>
+ *
+ *     Based on the PCI version:
+ *
+ *     (c) 1999--2000 Martin Mares <mj@suse.cz>
+ */
+
+#include <stdio.h>
+#include <string.h>
+
+#define MAX_NAME_SIZE 63
+
+static void
+pq(FILE *f, const char *c)
+{
+       while (*c) {
+               if (*c == '"')
+                       fprintf(f, "\\\"");
+               else
+                       fputc(*c, f);
+               c++;
+       }
+}
+
+int
+main(void)
+{
+       char line[1024], *c, *bra, manuf[8];
+       int manufs = 0;
+       int mode = 0;
+       int lino = 0;
+       int manuf_len = 0;
+       FILE *devf;
+
+       devf = fopen("devlist.h", "w");
+       if (!devf) {
+               fprintf(stderr, "Cannot create output file!\n");
+               return 1;
+       }
+
+       while (fgets(line, sizeof(line)-1, stdin)) {
+               lino++;
+               if ((c = strchr(line, '\n')))
+                       *c = 0;
+               if (!line[0] || line[0] == '#')
+                       continue;
+               if (line[0] == '\t') {
+                       switch (mode) {
+                       case 1:
+                               if (strlen(line) > 5 && line[5] == ' ') {
+                                       c = line + 5;
+                                       while (*c == ' ')
+                                               *c++ = 0;
+                                       if (manuf_len + strlen(c) + 1 > MAX_NAME_SIZE) {
+                                               /* Too long, try cutting off long description */
+                                               bra = strchr(c, '[');
+                                               if (bra && bra > c && bra[-1] == ' ')
+                                                       bra[-1] = 0;
+                                               if (manuf_len + strlen(c) + 1 > MAX_NAME_SIZE) {
+                                                       fprintf(stderr, "Line %d: Product name too long\n", lino);
+                                                       return 1;
+                                               }
+                                       }
+                                       fprintf(devf, "\tPRODUCT(%s,%s,\"", manuf, line+1);
+                                       pq(devf, c);
+                                       fputs("\")\n", devf);
+                               } else goto err;
+                               break;
+                       default:
+                               goto err;
+                       }
+               } else if (strlen(line) > 4 && line[4] == ' ') {
+                       c = line + 4;
+                       while (*c == ' ')
+                               *c++ = 0;
+                       if (manufs)
+                               fputs("ENDMANUF()\n\n", devf);
+                       manufs++;
+                       strcpy(manuf, line);
+                       manuf_len = strlen(c);
+                       if (manuf_len + 24 > MAX_NAME_SIZE) {
+                               fprintf(stderr, "Line %d: manufacturer name too long\n", lino);
+                               return 1;
+                       }
+                       fprintf(devf, "MANUF(%s,\"", manuf);
+                       pq(devf, c);
+                       fputs("\")\n", devf);
+                       mode = 1;
+               } else {
+               err:
+                       fprintf(stderr, "Line %d: Syntax error in mode %d: %s\n", lino, mode, line);
+                       return 1;
+               }
+       }
+       fputs("ENDMANUF()\n\
+\n\
+#undef MANUF\n\
+#undef PRODUCT\n\
+#undef ENDMANUF\n", devf);
+
+       fclose(devf);
+
+       return 0;
+}
index 2277bcc2b162ae48b3cf10cf0589da06144cf95d..27bdf7b0a476ba529a8228e624bce31f9bf976b4 100644 (file)
@@ -1,13 +1,12 @@
 /*
- *    $Id: zorro.c,v 1.1.2.1 1998/06/07 23:21:02 geert Exp $
+ *     Zorro Device Name Tables
  *
- *    Zorro Expansion Device Names
+ *     Copyright (C) 1999--2000 Geert Uytterhoeven
  *
- *    Copyright (C) 1999-2000 Geert Uytterhoeven
+ *     Based on the PCI version:
  *
- *    This file is subject to the terms and conditions of the GNU General Public
- *    License.  See the file COPYING in the main directory of this archive
- *    for more details.
+ *     Copyright 1992--1999 Drew Eckhardt, Frederic Potter,
+ *     David Mosberger-Tang, Martin Mares
  */
 
 #include <linux/init.h>
 #include <linux/zorro.h>
 
 
-    /*
-     *  Just for reference, these are the boards we have a driver for in the
-     *  kernel:
-     *
-     *  ZORRO_PROD_AMERISTAR_A2065
-     *  ZORRO_PROD_BSC_FRAMEMASTER_II
-     *  ZORRO_PROD_BSC_MULTIFACE_III
-     *  ZORRO_PROD_BSC_OKTAGON_2008
-     *  ZORRO_PROD_CBM_A2065_1
-     *  ZORRO_PROD_CBM_A2065_2
-     *  ZORRO_PROD_CBM_A4091_1
-     *  ZORRO_PROD_CBM_A4091_2
-     *  ZORRO_PROD_CBM_A590_A2091_1
-     *  ZORRO_PROD_CBM_A590_A2091_2
-     *  ZORRO_PROD_GVP_A1291
-     *  ZORRO_PROD_GVP_A530_SCSI
-     *  ZORRO_PROD_GVP_COMBO_030_R3_SCSI
-     *  ZORRO_PROD_GVP_COMBO_030_R4_SCSI
-     *  ZORRO_PROD_GVP_EGS_28_24_SPECTRUM_RAM
-     *  ZORRO_PROD_GVP_EGS_28_24_SPECTRUM_REG
-     *  ZORRO_PROD_GVP_GFORCE_030_SCSI
-     *  ZORRO_PROD_GVP_GFORCE_040_060
-     *  ZORRO_PROD_GVP_GFORCE_040_1
-     *  ZORRO_PROD_GVP_GFORCE_040_SCSI_1
-     *  ZORRO_PROD_GVP_IO_EXTENDER
-     *  ZORRO_PROD_GVP_SERIES_II
-     *  ZORRO_PROD_HELFRICH_PICCOLO_RAM
-     *  ZORRO_PROD_HELFRICH_PICCOLO_REG
-     *  ZORRO_PROD_HELFRICH_RAINBOW_II
-     *  ZORRO_PROD_HELFRICH_SD64_RAM
-     *  ZORRO_PROD_HELFRICH_SD64_REG
-     *  ZORRO_PROD_HYDRA_SYSTEMS_AMIGANET
-     *  ZORRO_PROD_INDIVIDUAL_COMPUTERS_BUDDHA
-     *  ZORRO_PROD_INDIVIDUAL_COMPUTERS_CATWEASEL
-     *  ZORRO_PROD_MACROSYSTEMS_RETINA_Z3
-     *  ZORRO_PROD_MACROSYSTEMS_WARP_ENGINE_40xx
-     *  ZORRO_PROD_PHASE5_BLIZZARD_1220_CYBERSTORM
-     *  ZORRO_PROD_PHASE5_BLIZZARD_1230_II_FASTLANE_Z3_CYBERSCSI_CYBERSTORM060
-     *  ZORRO_PROD_PHASE5_BLIZZARD_1230_IV_1260
-     *  ZORRO_PROD_PHASE5_BLIZZARD_2060
-     *  ZORRO_PROD_PHASE5_BLIZZARD_603E_PLUS
-     *  ZORRO_PROD_PHASE5_CYBERSTORM_MK_II
-     *  ZORRO_PROD_PHASE5_CYBERVISION64
-     *  ZORRO_PROD_PHASE5_CYBERVISION64_3D
-     *  ZORRO_PROD_VILLAGE_TRONIC_ARIADNE
-     *  ZORRO_PROD_VILLAGE_TRONIC_ARIADNE2
-     *  ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_RAM
-     *  ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_REG
-     *  ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z3
-     *
-     *  And I guess these are automagically supported as well :-)
-     *
-     *  ZORRO_PROD_CBM_A560_RAM
-     *  ZORRO_PROD_CBM_A590_A2052_A2058_A2091
-     */
-
-void __init zorro_namedevice(struct zorro_dev *dev)
+#ifdef CONFIG_ZORRO_NAMES
+
+struct zorro_prod_info {
+       __u16 prod;
+       unsigned short seen;
+       const char *name;
+};
+
+struct zorro_manuf_info {
+       __u16 manuf;
+       unsigned short nr;
+       const char *name;
+       struct zorro_prod_info *prods;
+};
+
+/*
+ * This is ridiculous, but we want the strings in
+ * the .init section so that they don't take up
+ * real memory.. Parse the same file multiple times
+ * to get all the info.
+ */
+#define MANUF( manuf, name )           static const char __manufstr_##manuf[] __initdata = name;
+#define ENDMANUF()
+#define PRODUCT( manuf, prod, name )   static const char __prodstr_##manuf##prod[] __initdata = name;
+#include "devlist.h"
+
+
+#define MANUF( manuf, name )           static struct zorro_prod_info __prods_##manuf[] __initdata = {
+#define ENDMANUF()                     };
+#define PRODUCT( manuf, prod, name )   { 0x##prod, 0, __prodstr_##manuf##prod },
+#include "devlist.h"
+
+static const struct zorro_manuf_info __initdata zorro_manuf_list[] = {
+#define MANUF( manuf, name )           { 0x##manuf, sizeof(__prods_##manuf) / sizeof(struct zorro_prod_info), __manufstr_##manuf, __prods_##manuf },
+#define ENDMANUF()
+#define PRODUCT( manuf, prod, name )
+#include "devlist.h"
+};
+
+#define MANUFS (sizeof(zorro_manuf_list)/sizeof(struct zorro_manuf_info))
+
+void __init zorro_name_device(struct zorro_dev *dev)
+{
+       const struct zorro_manuf_info *manuf_p = zorro_manuf_list;
+       int i = MANUFS;
+       char *name = dev->name;
+
+       do {
+               if (manuf_p->manuf == ZORRO_MANUF(dev->id))
+                       goto match_manuf;
+               manuf_p++;
+       } while (--i);
+
+       /* Couldn't find either the manufacturer nor the product */
+       sprintf(name, "Zorro device %08x", dev->id);
+       return;
+
+       match_manuf: {
+               struct zorro_prod_info *prod_p = manuf_p->prods;
+               int i = manuf_p->nr;
+
+               while (i > 0) {
+                       if (prod_p->prod ==
+                           ((ZORRO_PROD(dev->id)<<8) | ZORRO_EPC(dev->id)))
+                               goto match_prod;
+                       prod_p++;
+                       i--;
+               }
+
+               /* Ok, found the manufacturer, but unknown product */
+               sprintf(name, "Zorro device %08x (%s)", dev->id, manuf_p->name);
+               return;
+
+               /* Full match */
+               match_prod: {
+                       char *n = name + sprintf(name, "%s %s", manuf_p->name, prod_p->name);
+                       int nr = prod_p->seen + 1;
+                       prod_p->seen = nr;
+                       if (nr > 1)
+                               sprintf(n, " (#%d)", nr);
+               }
+       }
+}
+
+#else
+
+void __init zorro_name_device(struct zorro_dev *dev)
 {
-    /*
-     *  Nah, we're not that stupid to put name databases in the kernel ;-)
-     *  That's why we have zorroutils...
-     */
-    sprintf(dev->name, "Zorro device %08x", dev->id);
 }
 
+#endif
index 10ac2eec303c1a802540faf6655e78496a95cac8..114a27ebbbcfa976866d9610487e5c84c9cb60db 100644 (file)
@@ -20,8 +20,6 @@
 #include <asm/amigahw.h>
 
 
-extern void zorro_namedevice(struct zorro_dev *dev);
-
     /*
      *  Zorro Expansion Devices
      */
@@ -36,13 +34,15 @@ struct zorro_dev zorro_autocon[ZORRO_NUM_AUTO];
      */
 
 static struct resource zorro_res[4] = {
+    /* Zorro II regions (on Zorro II/III) */
     { "Zorro II exp", 0x00e80000, 0x00efffff },
     { "Zorro II mem", 0x00200000, 0x009fffff },
+    /* Zorro III regions (on Zorro III only) */
     { "Zorro III exp", 0xff000000, 0xffffffff },
     { "Zorro III cfg", 0x40000000, 0x7fffffff }
 };
 
-static u_int __init zorro_num_res = 0;
+static u_int zorro_num_res __initdata = 0;
 
 
     /*
@@ -56,8 +56,9 @@ struct zorro_dev *zorro_find_device(zorro_id id, struct zorro_dev *from)
     if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(ZORRO))
        return NULL;
 
-    dev = from ? from+1 : &zorro_autocon[0];
-    for (; dev < zorro_autocon+zorro_num_autocon; dev++)
+    for (dev = from ? from+1 : &zorro_autocon[0];
+        dev < zorro_autocon+zorro_num_autocon;
+        dev++)
        if (id == ZORRO_WILDCARD || id == dev->id)
            return dev;
     return NULL;
@@ -146,10 +147,13 @@ void __init zorro_init(void)
            unsigned long magic = dev->resource.start+0x8000;
            dev->id |= *(u16 *)ZTWO_VADDR(magic) & GVP_PRODMASK;
        }
+       sprintf(dev->name, "Zorro device %08x", dev->id);
+       zorro_name_device(dev);
        dev->resource.name = dev->name;
-       zorro_namedevice(dev);
        if (request_resource(zorro_find_parent_resource(dev), &dev->resource))
-           printk("zorro_init: cannot request resource for board %d\n", i);
+           printk(KERN_ERR "Zorro: Address space collision on device %s "
+                  "[%lx:%lx]\n",
+                  dev->name, dev->resource.start, dev->resource.end);
     }
 
     /* Mark all available Zorro II memory */
diff --git a/drivers/zorro/zorro.ids b/drivers/zorro/zorro.ids
new file mode 100644 (file)
index 0000000..aec74bb
--- /dev/null
@@ -0,0 +1,469 @@
+#
+#      List of Zorro IDs
+#
+#      Maintained by Geert Uytterhoeven <zorro@linux-m68k.org>
+#      If you have any new entries, please send them to the maintainer.
+#
+#      $Id: zorro.ids,v 1.16 2000/09/28 18:45:47 geert Exp $
+#
+
+# Manufacturers and Products. Please keep sorted.
+
+# Syntax:
+# manufacturer  manufacturer_name
+#      product  product_name                           <-- single tab
+
+00d3  Pacific Peripherals
+       0000  SE 2000 A500 [HD Controller]
+       0a00  [SCSI Host Adapter]
+00dd  Kupke
+       0000  Golem RAM Box 2MB [RAM Expansion]
+0100  MacroSystems USA
+# The Stormbringer is actually made by Memphis
+       0000  Stormbringer [Accelerator]
+       1300  Warp Engine [Accelerator, SCSI Host Adapter and RAM Expansion]
+0200  3-State
+       0200  Megamix 2000 [RAM Expansion]
+0201  Commodore Braunschweig
+       0100  A2088 XT/A2286 AT [ISA Bus Bridge]
+       0200  A2286 AT [ISA Bus Bridge]
+       5400  A4091 [SCSI Host Adapter]
+       6700  A2386-SX [ISA Bus Bridge]
+0202  Commodore West Chester
+       0100  A2090/A2090A [SCSI Host Adapter]
+       0200  A590/A2091 [SCSI Host Adapter]
+       0300  A590/A2091 [SCSI Host Adapter]
+       0400  A2090B 2090 Autoboot [SCSI Host Adapter]
+       0900  A2060 [ArcNet Card]
+       0a00  A590/A2052/A2058/A2091 [RAM Expansion]
+       2000  A560 [RAM Expansion]
+       4500  A2232 Prototype [Multi I/O]
+       4600  A2232 [Multi I/O]
+       5000  A2620 68020 [Accelerator and RAM Expansion]
+       5100  A2630 68030 [Accelerator and RAM Expansion]
+       5400  A4091 [SCSI Host Adapter]
+       5a00  A2065 [Ethernet Card]]
+       6000  Romulator Card
+       6100  A3000 Test Fixture [Miscellaneous Expansion Card]
+       6700  A2386-SX [ISA Bus Bridge]
+       7000  A2065 [Ethernet Card]
+0203  Commodore West Chester
+       0300  A2090/A2090A Combitec/MacroSystem [SCSI Host Adapter]
+02f4  Progressive Peripherals & Systems
+       0200  EXP8000 [RAM Expansion]
+       6900  A2000 68040 [Accelerator]
+       9600  68040 [Accelerator]
+02ff  Kolff Computer Supplies
+       0000  KCS Power PC [ISA Bus Bridge]
+03ec  Cardco Ltd.
+       0400  Kronos 2000 [SCSI Host Adapter]]
+       0c00  A1000 [SCSI Host Adapter]
+       0e00  Escort [SCSI Host Adapter]
+       f500  A2410 HiRes [Graphics Card]
+03ed  A-Squared
+       0100  Live! 2000 [Video Card]
+03ee  Comspec Communications
+       0100  AX2000 [RAM Expansion]
+03f1  Anakin Research
+       0100  Easyl Drawing Tablet Interface
+03f2  Microbotics
+       0000  StarBoard II [RAM Expansion]
+       0200  StarDrive [SCSI Host Adapter]
+       0300  8-Up (Rev A) [RAM Expansion]
+       0400  8-Up (Rev Z) [RAM Expansion]
+       2000  Delta [RAM Expansion]
+       4000  8-Star [RAM Expansion]
+       4100  8-Star [Miscellaneous Expansion Card]
+       4400  VXL RAM*32 [RAM Expansion]
+       4500  VXL-30 [Accelerator]
+       6000  Delta [Miscellaneous Expansion Card]
+       8100  MBX 1200/1200z [RAM Expansion]
+       9600  Hardframe 2000 [SCSI Host Adapter]
+       9e00  Hardframe 2000 [SCSI Host Adapter]
+       c100  MBX 1200/1200z [Miscellaneous Expansion Card]
+03f4  Access Associates Alegra
+03f6  Expansion Technologies/Pacific Cypress
+03ff  ASDG
+       0100  [RAM Expansion]
+       0200  [RAM Expansion]
+       fe00  EB-920 Lan Rover [Ethernet Card]
+       ff00  GPIB/Dual IEEE-488/Twin-X [Multi I/O]
+0404  Ronin/Imtronics
+       3900  Hurricane 2800 [Accelerator and RAM Expansion]
+       5700  Hurricane 2800 [Accelerator and RAM Expansion]
+0406  Commodore/University of Lowell
+       0000  A2410 HiRes [Graphics Card]
+041d  Ameristar
+       0100  A2065 [Ethernet Card]
+       0900  A560 [ArcNet Card]
+       0a00  A4066 [Ethernet Card]
+       2000  1600-GX [Graphics Card]
+0420  Supra
+       0100  SupraDrive 4x4 [SCSI Host Adapter]
+       0200  1000 [RAM Expansion]
+       0300  2000 DMA [SCSI Host Adapter]
+       0500  500 [SCSI Host Adapter and RAM Expansion]
+       0800  500 [SCSI Host Adapter]
+       0900  500XP/2000 [RAM Expansion]
+       0a00  500RX/2000 [RAM Expansion]
+       0b00  2400zi [Modem]
+       0c00  500XP/SupraDrive WordSync [SCSI Host Adapter]
+       0d00  SupraDrive WordSync II [SCSI Host Adapter]
+       1000  2400zi+ [Modem]
+0422  Computer Systems Assosiates
+       1100  Magnum 40 [Accelerator and SCSI Host Adapter]
+       1500  12 Gauge [SCSI Host Adapter]
+0439  Marc Michael Groth
+0502  M-Tech
+       0300  AT500 [RAM Expansion]
+06e1  Great Valley Products
+       0800  Impact Series I [SCSI Host Adapter and RAM Expansion]
+       2000  Impact Vision 24 [Graphics Card]
+07da  ByteBox
+       0000  A500
+07db  Hacker Test Board
+07dc  DKB/Power Computing
+       0900  SecureKey
+       0e00  DKM 3128 [RAM Expansion]
+       0f00  Rapid Fire [SCSI Host Adapter]
+       1000  DKM 1202 [FPU and RAM Expansion]
+       1200  Cobra/Viper II 68EC030 [Accelerator]
+       1700  WildFire 060 [Accelerator]
+       ff00  WildFire 060 [Accelerator]
+07e1  Great Valley Products
+       0100  Impact Series I (4K) [SCSI Host Adapter]
+       0200  Impact Series I (16K/2) [SCSI Host Adapter]
+       0300  Impact Series I (16K/2) [SCSI Host Adapter]
+       0800  Impact 3001 [IDE Interface]
+       0900  Impact 3001 [RAM Expansion]
+       0a00  Impact Series II [RAM Expansion]
+       0b20  GForce 040 [Accelerator]
+       0b30  GForce 040 [Accelerator and SCSI Host Adapter]
+       0b40  A1291 [SCSI Host Adapter]
+       0b60  Combo 030 R4 [Accelerator]
+       0b70  Combo 030 R4 [Accelerator and SCSI Host Adapter]
+       0b78  Phone Pak
+       0b98  IO-Extender [Multi I/O]
+       0ba0  GForce 030 [Accelerator]
+       0bb0  GForce 030 [Accelerator and SCSI Host Adapter]
+       0bc0  A530 [Accelerator]
+       0bd0  A530 [Accelerator and SCSI Host Adapter]
+       0be0  Combo 030 R3 [Accelerator]
+       0bf0  Combo 030 R3 [Accelerator and SCSI Host Adapter]
+       0bf8  Series-II [SCSI Host Adapter]
+       0d00  Impact 3001 [IDE Interface]
+       1600  GForce 040/060 [Accelerator and SCSI Host Adapter]
+       2000  Impact Vision 24 [Graphics Card]
+       4400  Rembrandt [Graphics Card]
+       ff00  GForce 040 [Accelerator]
+07e5  California Access/Synergy
+       0100  Malibu [SCSI Host Adapter]
+07e6  Xetec
+       0100  FastCard [SCSI Host Adapter]
+       0200  FastCard [RAM Expansion]
+       0300  FastCard Plus [SCSI Host Adapter]
+07ea  Progressive Peripherals & Systems
+       0000  Mercury [Accelerator]
+       0100  A3000 68040 [Accelerator]
+       6900  A2000 68040 [Accelerator]
+       9600  Zeus [Accelerator, SCSI Host Adapter and RAM Expansion]
+       bb00  A500 68040 [Accelerator]
+# The AteoBus and Pixel64 are actually made by Ateo Concepts
+       fc00  AteoBus [Expansion Bus Bridge]
+       fe00  Pixel64 [Graphics Card]
+       ff00  Pixel64 RAM [Graphics Card]
+07ec  Xebec
+07f2  Spirit Technology
+       0100  Insider IN1000 [RAM Expansion]
+       0200  Insider IN500 [RAM Expansion]
+       0300  SIN500 [RAM Expansion]
+       0400  HDA 506 [HD Controller]
+       0500  AX-S [Miscellaneous Expansion Card]
+       0600  OctaByte [RAM Expansion]
+       0800  Inmate [SCSI Host Adapter and RAM Expansion]
+07f3  Spirit Technology
+07fe  BSC/Alfadata
+       0300  ALF 3 [SCSI Host Adapter]
+0801  BSC/Alfadata
+       0100  ALF 2 [SCSI Host Adapter]
+       0200  ALF 2 [SCSI Host Adapter]
+       0300  ALF 3 [SCSI Host Adapter]
+       0400  Oktagon 500 [SCSI Host Adapter]
+       0600  Tandem AT-2008/508 [IDE Interface]
+       0800  Oktagon 2008 [RAM Expansion]
+       1000  MultiFace I [Multi I/O]
+       2000  FrameMaster II [Graphics Card]
+       4000  ISDN MasterCard [ISDN Interface]
+0802  Cardco Ltd.
+       0400  Kronos 2000 [SCSI Host Adapter]
+       0c00  A1000 [SCSI Host Adapter]
+0804  Jochheim
+       0100  [RAM Expansion]
+       2000  [RAM Expansion]
+0807  Checkpoint Technologies
+       0000  Serial Solution [Multi Serial]
+0810  Edotronik
+       0100  IEEE-488 Interface Card
+       0200  CBM-8032 Card
+       0300  [Multi Serial]
+       0400  24Bit Realtime Video Digitizer
+       0500  32Bit Parallel I/O Interface
+       0600  PIC Prototyping Card
+       0700  16 Channel ADC Interface
+       0800  VME-Bus Controller
+       0900  DSP96000 Realtime Data Acquisition DSP Card
+0813  NES Inc.
+       0000  [RAM Expansion]
+0817  ICD
+       0100  Advantage 2000 [SCSI Host Adapter]
+       0300  Advantage [IDE Interface]
+       0400  Advantage 2080 [RAM Expansion]
+0819  Kupke
+       0100  Omti [HD Controller]
+       0200  Golem SCSI-II [SCSI Host Adapter]
+       0300  Golem Box
+       0400  030/882 [Accelerator]
+       0500  Golem [SCSI Host Adapter]
+081d  Great Valley Products
+       0900  A2000-RAM8/2 [Miscellaneous Expansion Card]
+       0a00  Impact Series II [RAM Expansion]
+081e  Interworks Network
+0820  Hardital Synthesis
+       1400  TQM 68030+68882 [Accelerator]
+0828  Applied Engineering
+       1000  DL2000 [Modem]
+       e000  RAM Works [RAM Expansion]
+082c  BSC/Alfadata
+       0400  Oktagon 500 [SCSI Host Adapter]
+       0500  Oktagon 2008 [SCSI Host Adapter]
+       0600  Tandem AT-2008/508 [IDE Interface]
+       0700  Alpha 1200 [RAM Expansion]
+       0800  Oktagon 2008 [RAM Expansion]
+       1000  MultiFace I [Multi I/O]
+       1100  MultiFace II [Multi I/O]
+       1200  MultiFace III [Multi I/O]
+       2000  FrameMaster II [Graphics Card]
+       2100  Graffiti RAM [Graphics Card]
+       2200  Graffiti [Graphics Card]
+       4000  ISDN MasterCard [ISDN Interface]
+       4100  ISDN MasterCard II [ISDN Interface]
+0835  Phoenix
+       2100  ST506 [HD Controller]
+       2200  [SCSI Host Adapter]
+       be00  [RAM Expansion]
+0836  Advanced Storage Systems
+       0100  Nexus [SCSI Host Adapter]
+       0800  Nexus [RAM Expansion]
+0838  Impulse
+       0000  FireCracker 24 (NTSC) [Graphics Card]
+       0100  FireCracker 24 (PAL) [Graphics Card]
+0840  IVS
+       0200  GrandSlam PIC 2 [RAM Expansion]
+       0400  GrandSlam PIC 1 [RAM Expansion]
+       1000  OverDrive [HD Controller]
+       3000  TrumpCard Classic [SCSI Host Adapter]
+       3400  TrumpCard Pro/GrandSlam [SCSI Host Adapter]
+       4000  Meta-4 [RAM Expansion]
+       bf00  Wavetools [Audio Card]
+       f300  Vector [SCSI Host Adapter]
+       f400  Vector [SCSI Host Adapter]
+0841  Vector
+       e300  Connection [Multi I/O]
+0845  XPert ProDev
+       0100  Visiona RAM [Graphics Card]
+       0200  Visiona [Graphics Card]
+       0300  Merlin RAM [Graphics Card]
+       0400  Merlin [Graphics Card]
+       c900  Merlin [Graphics Card]
+0849  Hydra Systems
+       0100  Amiganet [Ethernet Card]
+084f  Sunrize Industries
+       0100  AD1012 [Audio Card]
+       0200  AD516 [Audio Card]
+       0300  DD512 [Audio Card]
+0850  Triceratops
+       0100  [Multi I/O]
+0851  Applied Magic Inc.
+       0100  DMI Resolver [Graphics Card]
+       0200  Vivid 24 [Graphics Card]
+       0600  Digital Broadcaster [Video Card]
+085e  GFX-Base
+       0000  GDA-1 VRAM [Graphics Card]
+       0100  GDA-1 [Graphics Card]
+0860  RocTec
+       0100  RH 800C [HD Controller]
+       0200  RH 800C [RAM Expansion]
+0861  Kato
+# The Rainbow II and III are actually made by Ingenieurbüro Helfrich
+       2000  Rainbow II [Graphics Card]
+       2100  Rainbow III [Graphics Card]
+       8000  Melody MPEG [Audio Card]
+0862  Atlantis
+0864  Protar
+0865  ACS
+0866  Software Results Enterprises
+       0100  Golden Gate 2 Bus+ [ISA Bus Bridge]
+086a  Unknown
+       0100  Horizon [Graphics Card]
+       0200  Blackbox [Graphics Card]
+       0300  Voyager [Graphics Card]
+086d  Masoboshi
+       0300  MasterCard SC201 [RAM Expansion]
+       0400  MasterCard MC702 [SCSI Host Adapter and IDE Interface]
+       0700  MVD 819
+086f  Mainhattan-Data/A-Team
+       0100  [IDE Interface]
+0877  Village Tronic
+       0100  Domino RAM [Graphics Card]
+       0200  Domino [Graphics Card]
+       0300  Domino 16M Prototype [Graphics Card]
+       0b00  Picasso II/II+ RAM [Graphics Card]
+       0c00  Picasso II/II+ [Graphics Card]
+       0d00  Picasso II/II+ (Segmented Mode) [Graphics Card]
+       1500  Picasso IV Z2 RAM [Graphics Card]
+       1600  Picasso IV Z2 RAM [Graphics Card]
+       1700  Picasso IV Z2 [Graphics Card]
+       1800  Picasso IV Z3 [Graphics Card]
+       c900  Ariadne [Ethernet Card and Parallel Ports]
+       ca00  Ariadne II [Ethernet Card]
+087b  Utilities Unlimited
+       1500  Emplant Deluxe [Macintosh Emulator]
+       2000  Emplant Deluxe [Macintosh Emulator]
+0880  Amitrix
+       0100  [Multi I/O]
+       0200  CD-RAM [RAM Expansion]
+0885  ArMax
+       0000  OmniBus [Graphics Card]
+088d  ZEUS Electronic Development
+       0300  [ISDN Interface]
+       0400  Spider [Video Card]
+088f  NewTek
+       0000  VideoToaster [Video Card]
+0890  M-Tech Germany
+       0100  AT500 [IDE Interface]
+       0300  68030 [Accelerator]
+       0600  68020i [Accelerator]
+       2000  A1200 T68030 RTC [Accelerator]
+       2100  Viper Mk V/E-Matrix 530 [Accelerator and RAM Expansion]
+       2200  8MB [RAM Expansion]
+       2400  Viper Mk V/E-Matrix 530 [SCSI Host Adapter and IDE Interface]
+0891  Great Valley Products
+       0100  EGS 28/24 Spectrum RAM [Graphics Card]
+       0200  EGS 28/24 Spectrum [Graphics Card]
+0892  Apollo
+       0100  A1200 [FPU and RAM Expansion]
+0893  Ingenieurbüro Helfrich
+       0500  Piccolo RAM [Graphics Card]
+       0600  Piccolo [Graphics Card]
+       0700  PeggyPlus MPEG [Video Card]
+       0800  VideoCruncher [Video Card]
+       0a00  Piccolo SD64 RAM [Graphics Card]
+       0b00  Piccolo SD64 [Graphics Card]
+089b  MacroSystems USA
+       1300  Warp Engine 40xx [Accelerator, SCSI Host Adapter and RAM Expansion]
+089e  ElBox Computer
+       0600  1200/4 [RAM Expansion]
+       1900  PowerFlyer [IDE Interface]
+0a00  Harms Professional
+       1000  030 Plus [Accelerator]
+       d000  3500 Professional [Accelerator and RAM Expansion]
+0a50  Micronik
+       0a00  RCA 120 [RAM Expansion]
+0f0f  Micronik
+       0100  Z3i A1200 [Zorro III Extender and SCSI Host Adapter]
+1000  MegaMicro
+       0300  SCRAM 500 [SCSI Host Adapter]
+       0400  SCRAM 500 [RAM Expansion]
+1028  Ronin/Imtronics
+       3900  Hurricane 2800 [Accelerator and RAM Expansion]
+       5700  Hurricane 2800 [Accelerator and RAM Expansion]
+102f  Ateo Concepts
+       fc00  AteoBus [Expansion Bus Bridge]
+       fe00  Pixel64 [Graphics Card]
+       ff00  Pixel64 RAM [Graphics Card]
+1212  Individual Computers
+       0000  Buddha [IDE Interface]
+       1700  X-Surf [Ethernet Card]
+       2a00  Catweasel [IDE Interface and Floppy Controller]
+1248  Kupke
+       0100  Golem HD 3000 [HD Controller]
+1267  RBM-Computertechnik
+       0100  IOBlix [Multi I/O]
+1388  ITH
+       0100  ISDN-Master II [ISDN Interface]
+1389  VMC
+       0100  ISDN Blaster Z2 [ISDN Interface]
+       0200  HyperCom 4 [Multi I/O]
+       0600  HyperCom 4+ [Multi I/O]
+157c  Information
+       6400  ISDN Engine I [ISDN Interface]
+2017  Vortex
+       0700  Golden Gate 80386SX [ISA Bus Bridge]
+       0800  Golden Gate [RAM Expansion]
+       0900  Golden Gate 80486 [ISA Bus Bridge]
+2062  Expansion Systems
+       0100  DataFlyer 4000SX [SCSI Host Adapter]
+       0200  DataFlyer 4000SX [RAM Expansion]
+2100  ReadySoft
+       0100  AMax II/IV [Macintosh Emulator]
+2140  Phase 5
+       0100  Blizzard [RAM Expansion]
+       0200  Blizzard [Accelerator]
+       0600  Blizzard 1220-IV [Accelerator]
+       0a00  FastLane Z3 [RAM Expansion]
+       0b00  Blizzard 1230-II/Fastlane Z3/CyberSCSI/CyberStorm060 [Accelerator and/or SCSI Host Adapter]
+       0c00  Blizzard 1220/CyberStorm [Accelerator and SCSI Host Adapter]
+       0d00  Blizzard 1230 [Accelerator]
+       1100  Blizzard 1230-IV/1260 [Accelerator]
+       1800  Blizzard 2060 [Accelerator]
+       1900  CyberStorm Mk II [Flash ROM]
+       2200  CyberVision64 [Graphics Card]
+       3200  CyberVision64-3D Prototype [Graphics Card]
+       4300  CyberVision64-3D [Graphics Card]
+       6400  CyberStorm Mk III [Accelerator and SCSI Host Adapter]
+       6e00  Blizzard 603e+ [Accelerator and SCSI Host Adapter]
+2169  DPS
+       0100  Personal Animation Recorder [Video Card]
+2200  Apollo
+       0000  A620 68020 [Accelerator]
+       0100  A620 68020 [Accelerator]
+2222  Apollo
+       2200  AT-Apollo
+       2300  1230/1240/1260/2030/4040/4060 [Accelerator]
+38a5  Petsoff LP
+       0000  Delfina [Audio Card]
+       0100  Delfina Lite [Audio Card]
+       0200  Delfina Plus [Audio Card]
+3ff7  Uwe Gerlach
+       d400  RAM/ROM [Miscellaneous Expansion Card]
+4231  ACT
+       0100  Prelude [Audio Card]
+4754  MacroSystems Germany
+       0300  Maestro [Audio Card]
+       0400  VLab [Video Card]
+       0500  Maestro Pro [Audio Card]
+       0600  Retina [Graphics Card]
+       0800  MultiEvolution [SCSI Host Adapter]
+       0c00  Toccata [Audio Card]
+       0d00  Toccata Pro [Audio Card]
+       1000  Retina Z3 [Graphics Card]
+       1200  VLab Motion [Video Card]
+       1300  Altais [Graphics Card]
+       fd00  Falcon '040 [Accelerator]
+6766  Combitec
+8000  SKI Peripherals
+       0800  MAST Fireball [SCSI Host Adapter]
+       8000  [SCSI Host Adapter and Dual Serial Card]
+a9ad  Reis-Ware
+       1100  Scan King [Scanner Interface]
+aa01  Cameron
+       1000  Personal A4 [Scanner Interface]
+aa11  Reis-Ware
+       1100  Handyscanner [Scanner Interface]
+b5a8  Phoenix
+       2100  ST506 [HD Controller]
+       2200  [SCSI Host Adapter]
+       be00  [RAM Expansion]
+c008  Combitec
+       2a00  [HD Controller]
+       2b00  SRAM [RAM Expansion]
index c4849d32444148caff678aeaba6b46bc09132c69..cb88697e68b01a3a9d5bd55c31dfad093499d55a 100644 (file)
--- a/fs/attr.c
+++ b/fs/attr.c
@@ -110,6 +110,9 @@ int notify_change(struct dentry * dentry, struct iattr * attr)
        time_t now = CURRENT_TIME;
        unsigned int ia_valid = attr->ia_valid;
 
+       if (!inode)
+               BUG();
+
        attr->ia_ctime = now;
        if (!(ia_valid & ATTR_ATIME_SET))
                attr->ia_atime = now;
@@ -117,7 +120,7 @@ int notify_change(struct dentry * dentry, struct iattr * attr)
                attr->ia_mtime = now;
 
        lock_kernel();
-       if (inode && inode->i_op && inode->i_op->setattr) 
+       if (inode->i_op && inode->i_op->setattr) 
                error = inode->i_op->setattr(dentry, attr);
        else {
                error = inode_change_ok(inode, attr);
index 9ebea1ca7f8f4bb6565ace30201545378a4193ae..1a053242065fb55ad626a8bc28c88c03c7125816 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     fs/bfs/dir.c
  *     BFS directory operations.
- *     Copyright (C) 1999  Tigran Aivazian <tigran@ocston.org>
+ *     Copyright (C) 1999,2000  Tigran Aivazian <tigran@veritas.com>
  */
 
 #include <linux/sched.h>
index 1da12e6aed7d3099976948d1671266d757e566d2..f0ee10a1548e92d0f69b5cc0be80d979f2daa955 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     fs/bfs/file.c
  *     BFS file operations.
- *     Copyright (C) 1999 Tigran Aivazian <tigran@ocston.org>
+ *     Copyright (C) 1999,2000 Tigran Aivazian <tigran@veritas.com>
  */
 
 #include <linux/fs.h>
@@ -26,7 +26,7 @@ struct file_operations bfs_file_operations = {
 
 static int bfs_move_block(unsigned long from, unsigned long to, kdev_t dev)
 {
-       struct buffer_head *bh, *new = NULL;
+       struct buffer_head *bh, *new;
 
        bh = bread(dev, from, BFS_BSIZE);
        if (!bh)
@@ -56,11 +56,12 @@ static int bfs_move_blocks(kdev_t dev, unsigned long start, unsigned long end,
 static int bfs_get_block(struct inode * inode, long block, 
        struct buffer_head * bh_result, int create)
 {
-       long phys, next_free_block;
+       long phys;
        int err;
-       struct super_block *s = inode->i_sb;
+       struct super_block *sb = inode->i_sb;
+       struct buffer_head *sbh = sb->su_sbh;
 
-       if (block < 0 || block > s->su_blocks)
+       if (block < 0 || block > sb->su_blocks)
                return -EIO;
 
        phys = inode->iu_sblock + block;
@@ -90,24 +91,25 @@ static int bfs_get_block(struct inode * inode, long block,
 
        /* if the last data block for this file is the last allocated block, we can
           extend the file trivially, without moving it anywhere */
-       if (inode->iu_eblock == s->su_lf_eblk) {
+       if (inode->iu_eblock == sb->su_lf_eblk) {
                dprintf("c=%d, b=%08lx, phys=%08lx (simple extension)\n", 
                                create, block, phys);
                bh_result->b_dev = inode->i_dev;
                bh_result->b_blocknr = phys;
                bh_result->b_state |= (1UL << BH_Mapped);
-               s->su_lf_eblk = inode->iu_eblock = inode->iu_sblock + block;
+               sb->su_freeb -= phys - inode->iu_eblock;
+               sb->su_lf_eblk = inode->iu_eblock = phys;
                mark_inode_dirty(inode);
-               mark_buffer_dirty(s->su_sbh);
+               mark_buffer_dirty(sbh);
                err = 0;
                goto out;
        }
 
        /* Ok, we have to move this entire file to the next free block */
-       next_free_block = s->su_lf_eblk + 1;
+       phys = sb->su_lf_eblk + 1;
        if (inode->iu_sblock) { /* if data starts on block 0 then there is no data */
                err = bfs_move_blocks(inode->i_dev, inode->iu_sblock, 
-                               inode->iu_eblock, next_free_block);
+                               inode->iu_eblock, phys);
                if (err) {
                        dprintf("failed to move ino=%08lx -> fs corruption\n", inode->i_ino);
                        goto out;
@@ -115,12 +117,18 @@ static int bfs_get_block(struct inode * inode, long block,
        } else
                err = 0;
 
-       inode->iu_sblock = next_free_block;
-       s->su_lf_eblk = inode->iu_eblock = next_free_block + block;
+       dprintf("c=%d, b=%08lx, phys=%08lx (moved)\n", create, block, phys);
+       inode->iu_sblock = phys;
+       phys += block;
+       sb->su_lf_eblk = inode->iu_eblock = phys;
+
+       /* this assumes nothing can write the inode back while we are here
+        * and thus update inode->i_blocks! (XXX)*/
+       sb->su_freeb -= inode->iu_eblock - inode->iu_sblock + 1 - inode->i_blocks;
        mark_inode_dirty(inode);
-       mark_buffer_dirty(s->su_sbh);
+       mark_buffer_dirty(sbh);
        bh_result->b_dev = inode->i_dev;
-       bh_result->b_blocknr = inode->iu_sblock + block;
+       bh_result->b_blocknr = phys;
        bh_result->b_state |= (1UL << BH_Mapped);
 out:
        unlock_kernel();
@@ -153,8 +161,7 @@ struct address_space_operations bfs_aops = {
        sync_page:      block_sync_page,
        prepare_write:  bfs_prepare_write,
        commit_write:   generic_commit_write,
-       bmap:           bfs_bmap
+       bmap:           bfs_bmap,
 };
 
-struct inode_operations bfs_file_inops = {
-};
+struct inode_operations bfs_file_inops;
index fe1396497122c7116f91c379e8f6e9473c82d446..b3827a7ae3f00df6b422cd132f6404b03ca4b3db 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     fs/bfs/inode.c
  *     BFS superblock and inode operations.
- *     Copyright (C) 1999 Tigran Aivazian <tigran@veritas.com>
+ *     Copyright (C) 1999,2000 Tigran Aivazian <tigran@veritas.com>
  *     From fs/minix, Copyright (C) 1991, 1992 Linus Torvalds.
  */
 
@@ -325,7 +325,7 @@ out:
        return NULL;
 }
 
-static DECLARE_FSTYPE_DEV( bfs_fs_type, "bfs", bfs_read_super);
+static DECLARE_FSTYPE_DEV(bfs_fs_type, "bfs", bfs_read_super);
 
 static int __init init_bfs_fs(void)
 {
index 1629be78287ce1128a3b52fbbaf3123e3b42814f..e1ab9e89610bdbd7b9a943344fd497477ce57e85 100644 (file)
@@ -58,7 +58,7 @@ static int coda_venus_readdir(struct file *filp, void *dirent,
                              filldir_t filldir);
 int coda_fsync(struct file *, struct dentry *dentry, int datasync);
 
-int coda_hasmknod = 0;
+int coda_hasmknod;
 
 struct dentry_operations coda_dentry_operations =
 {
index 486e421855bad99328953711fbe8e111caff6171..ef05ac2fbb35ce1101f7e53fc081975acca5fada 100644 (file)
@@ -54,7 +54,7 @@
 extern struct file_system_type coda_fs_type;
 
 /* statistics */
-int           coda_hard    = 0;  /* allows signals during upcalls */
+int           coda_hard;         /* allows signals during upcalls */
 unsigned long coda_timeout = 30; /* .. secs, then signals will dequeue */
 
 
@@ -376,7 +376,7 @@ static struct file_operations coda_psdev_fops = {
        release:        coda_psdev_release,
 };
 
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
 
 static int init_coda_psdev(void)
 {
index a0cf6ba973122e03ae3e6ae0df50b0e8b455be70..4b34da094634b9a46e5c8e6ecce3af4f55c4b3d1 100644 (file)
@@ -95,7 +95,7 @@ static struct inode *get_cramfs_inode(struct super_block *sb, struct cramfs_inod
 static unsigned char read_buffers[READ_BUFFERS][BUFFER_SIZE];
 static unsigned buffer_blocknr[READ_BUFFERS];
 static struct super_block * buffer_dev[READ_BUFFERS];
-static int next_buffer = 0;
+static int next_buffer;
 
 /*
  * Returns a pointer to a buffer containing at least LEN bytes of
index 3ffb8275e325d8782de9391a5e348bc3d717da3b..264992d3ff54e8a0a5802f7438dfd103171e0efd 100644 (file)
@@ -654,7 +654,7 @@ struct devfs_entry
 };
 
 /*  The root of the device tree  */
-static struct devfs_entry *root_entry = NULL;
+static struct devfs_entry *root_entry;
 
 struct devfsd_buf_entry
 {
index 9f71763b1fd679c8385fc4bcf2c7f92cb3085d8d..05b681b6c56471da4a10244aaedd8fe37b8bab7d 100644 (file)
@@ -114,8 +114,8 @@ void devfs_register_tape (devfs_handle_t de)
     int pos;
     devfs_handle_t parent, slave;
     char name[16], dest[64];
-    static unsigned int tape_counter = 0;
-    static devfs_handle_t tape_dir = NULL;
+    static unsigned int tape_counter;
+    static devfs_handle_t tape_dir;
 
     if (tape_dir == NULL) tape_dir = devfs_mk_dir (NULL, "tapes", NULL);
     parent = devfs_get_parent (de);
index e4234cb45259343fbd6fbc040b7e82b3e11602de..10169c62ce43aa0486ff75b3d88f2f5dc8fa4337 100644 (file)
@@ -183,25 +183,22 @@ static struct dentry *ext2_lookup(struct inode * dir, struct dentry *dentry)
        return NULL;
 }
 
+#define S_SHIFT 12
+static unsigned char ext2_type_by_mode[S_IFMT >> S_SHIFT] = {
+       [S_IFREG >> S_SHIFT]    EXT2_FT_REG_FILE,
+       [S_IFDIR >> S_SHIFT]    EXT2_FT_DIR,
+       [S_IFCHR >> S_SHIFT]    EXT2_FT_CHRDEV,
+       [S_IFBLK >> S_SHIFT]    EXT2_FT_BLKDEV,
+       [S_IFIFO >> S_SHIFT]    EXT2_FT_FIFO,
+       [S_IFSOCK >> S_SHIFT]   EXT2_FT_SOCK,
+       [S_IFLNK >> S_SHIFT]    EXT2_FT_SYMLINK,
+};
+
 static inline void ext2_set_de_type(struct super_block *sb,
                                struct ext2_dir_entry_2 *de,
                                umode_t mode) {
-       if (!EXT2_HAS_INCOMPAT_FEATURE(sb, EXT2_FEATURE_INCOMPAT_FILETYPE))
-               return;
-       if (S_ISREG(mode))
-               de->file_type = EXT2_FT_REG_FILE;
-       else if (S_ISDIR(mode))
-               de->file_type = EXT2_FT_DIR;
-       else if (S_ISLNK(mode))
-               de->file_type = EXT2_FT_SYMLINK;
-       else if (S_ISSOCK(mode))
-               de->file_type = EXT2_FT_SOCK;
-       else if (S_ISFIFO(mode))
-               de->file_type = EXT2_FT_FIFO;
-       else if (S_ISCHR(mode))
-               de->file_type = EXT2_FT_CHRDEV;
-       else if (S_ISBLK(mode))
-               de->file_type = EXT2_FT_BLKDEV;
+       if (EXT2_HAS_INCOMPAT_FEATURE(sb, EXT2_FEATURE_INCOMPAT_FILETYPE))
+               de->file_type = ext2_type_by_mode[(mode & S_IFMT)>>S_SHIFT];
 }
 
 /*
index 5bfbaeb646c12f236a35c6771e7eca9f7b1dee37..91462e135e5d77a1457149f06fda884c7394187f 100644 (file)
@@ -98,8 +98,8 @@ struct cvf_format bigblock_cvf = {
        NULL
 };
 
-struct cvf_format *cvf_formats[MAX_CVF_FORMATS]={NULL,NULL,NULL};
-int cvf_format_use_count[MAX_CVF_FORMATS]={0,0,0};
+struct cvf_format *cvf_formats[MAX_CVF_FORMATS];
+int cvf_format_use_count[MAX_CVF_FORMATS];
 
 int register_cvf_format(struct cvf_format*cvf_format)
 { int i,j;
index fe8d02ad68ae052961970d06554f69affd93e70c..2e512770349a5bcee1a74f42c963997d7e451751 100644 (file)
@@ -514,7 +514,7 @@ void hfs_latin2mac(struct hfs_name *out, const char *in, int len)
        int hi, lo;
        unsigned char code, c, *count;
        unsigned char *p = out->Name;
-       static int map_initialized = 0;
+       static int map_initialized;
 
        if (!map_initialized) {
                int i;
index ba0a3546f3d5cc0a4bbfd2c6eedd3fae1f9522f6..96e3664e55ebfd8ff5620f1fbe2b04562c68a2ee 100644 (file)
@@ -547,7 +547,7 @@ static void clean_inode(struct inode *inode)
  
 struct inode * get_empty_inode(void)
 {
-       static unsigned long last_ino = 0;
+       static unsigned long last_ino;
        struct inode * inode;
 
        inode = alloc_inode();
index 820bc4c7bd46ec66efdb4dda2aefa5c75433179e..249e7514d768c2d193c914d9699ba007cce1dac4 100644 (file)
@@ -41,7 +41,7 @@ struct nlm_wait {
        u32                     b_status;       /* grant callback status */
 };
 
-static struct nlm_wait *       nlm_blocked = NULL;
+static struct nlm_wait *       nlm_blocked;
 
 /*
  * Block on a lock
index 283d66e97fade3e07e288d84c641802c0693492a..9fcbad317a09bfc0a746a35d3c83daeba495e684 100644 (file)
@@ -24,7 +24,7 @@ extern struct rpc_program     nsm_program;
 /*
  * Local NSM state
  */
-u32                            nsm_local_state = 0;
+u32                            nsm_local_state;
 
 /*
  * Common procedure for SM_MON/SM_UNMON calls
index eae976616d6ea5a92d959d9ff1a98f67a306c322..c0c96854d833b791ffe2d27838e13675b7719809 100644 (file)
@@ -40,7 +40,7 @@ static void   nlmsvc_notify_blocked(struct file_lock *);
 /*
  * The list of blocked locks to retry
  */
-static struct nlm_block *      nlm_blocked = NULL;
+static struct nlm_block *      nlm_blocked;
 
 /*
  * Insert a blocked lock into the global list
index ec4540f12a3b3b8ccef110c5368a69bd8738e223..3f6b770aacc7c56fd28ce81cfbd63bf5256c454c 100644 (file)
@@ -796,7 +796,7 @@ static int nfs_rmdir(struct inode *dir_i, struct dentry *dentry)
 static int nfs_sillyrename(struct inode *dir_i, struct dentry *dentry)
 {
        struct dentry *dir = dentry->d_parent;
-       static unsigned int sillycounter = 0;
+       static unsigned int sillycounter;
        const int      i_inosize  = sizeof(dir_i->i_ino)*2;
        const int      countersize = sizeof(sillycounter)*2;
        const int      slen       = strlen(".nfs") + i_inosize + countersize;
index a8b61c2e7ef19b817dea51cf193a3789d4a76b3d..7fef7da99b81cefe7ecb7052775577603c2b470a 100644 (file)
@@ -104,7 +104,8 @@ xdr_decode_string2(u32 *p, char **string, unsigned int *len,
 static inline u32*
 xdr_decode_time(u32 *p, u64 *timep)
 {
-       *timep = ((u64)ntohl(*p++) << 32) + (u64)ntohl(*p++);
+       u64 tmp = (u64)ntohl(*p++) << 32;
+       *timep = tmp + (u64)ntohl(*p++);
        return p;
 }
 
index ef8580c02b7da92a1554f08a4dfb680f83a05178..f6260a55205961f7060b27f473441c0e296f81e9 100644 (file)
@@ -143,7 +143,8 @@ xdr_encode_time(u32 *p, time_t time)
 static inline u32 *
 xdr_decode_time3(u32 *p, u64 *timep)
 {
-       *timep = ((u64)ntohl(*p++) << 32) + (u64)ntohl(*p++);
+       u64 tmp = (u64)ntohl(*p++) << 32;
+       *timep = tmp + (u64)ntohl(*p++);
        return p;
 }
 
@@ -184,7 +185,8 @@ xdr_decode_fattr(u32 *p, struct nfs_fattr *fattr)
        p = xdr_decode_hyper(p, &fattr->size);
        p = xdr_decode_hyper(p, &fattr->du.nfs3.used);
        /* Turn remote device info into Linux-specific dev_t */
-       fattr->rdev = (ntohl(*p++) << MINORBITS) | (ntohl(*p++) & MINORMASK);
+       fattr->rdev = ntohl(*p++) << MINORBITS;
+       fattr->rdev |= ntohl(*p++) & MINORMASK;
        p = xdr_decode_hyper(p, &fattr->fsid);
        p = xdr_decode_hyper(p, &fattr->fileid);
        p = xdr_decode_time3(p, &fattr->atime);
index 6575040d934be4a3a355c557500f41ec216e3702..7c1aad253e0942363828152637d8a79743787e64 100644 (file)
@@ -54,7 +54,7 @@ static void   nfs_readpage_result(struct rpc_task *task);
 # define IS_SWAPFILE(inode)    (0)
 #endif
 
-static kmem_cache_t *nfs_rdata_cachep = NULL;
+static kmem_cache_t *nfs_rdata_cachep;
 
 static __inline__ struct nfs_read_data *nfs_readdata_alloc(void)
 {
index a5bda60ba649bb6873e59cce2f00e3293428fe5e..bf7a4abe4d12035860bc07b9f61dd67a5940b781 100644 (file)
@@ -102,8 +102,8 @@ static void nfs_commit_done(struct rpc_task *);
 # define IS_SWAPFILE(inode)    (0)
 #endif
 
-static kmem_cache_t *nfs_page_cachep = NULL;
-static kmem_cache_t *nfs_wdata_cachep = NULL;
+static kmem_cache_t *nfs_page_cachep;
+static kmem_cache_t *nfs_wdata_cachep;
 
 static __inline__ struct nfs_page *nfs_page_alloc(void)
 {
@@ -1207,7 +1207,7 @@ nfs_writeback_done(struct rpc_task *task)
 
        /* We can't handle that yet but we check for it nevertheless */
        if (resp->count < argp->count && task->tk_status >= 0) {
-               static unsigned long    complain = 0;
+               static unsigned long    complain;
                if (time_before(complain, jiffies)) {
                        printk(KERN_WARNING
                               "NFS: Server wrote less than requested.\n");
@@ -1227,7 +1227,7 @@ nfs_writeback_done(struct rpc_task *task)
                 *       NFS_FILE_SYNC. We therefore implement this checking
                 *       as a dprintk() in order to avoid filling syslog.
                 */
-               static unsigned long    complain = 0;
+               static unsigned long    complain;
 
                if (time_before(complain, jiffies)) {
                        dprintk("NFS: faulty NFSv3 server %s:"
index 425778412d1a7db56f29f3d1563a0dde7e917455..8a061ebcbed40fa841e29a7f4859998b6a968400 100644 (file)
@@ -38,7 +38,7 @@ static struct nfscache_head * hash_list;
 static struct svc_cacherep *   lru_head;
 static struct svc_cacherep *   lru_tail;
 static struct svc_cacherep *   nfscache;
-static int                     cache_initialized = 0;
+static int                     cache_initialized;
 static int                     cache_disabled = 1;
 
 static int     nfsd_cache_append(struct svc_rqst *rqstp, struct svc_buf *data);
@@ -215,7 +215,7 @@ nfsd_cache_lookup(struct svc_rqst *rqstp, int type)
 
        /* This should not happen */
        if (rp == NULL) {
-               static int      complaints = 0;
+               static int      complaints;
 
                printk(KERN_WARNING "nfsd: all repcache entries locked!\n");
                if (++complaints > 5) {
index 672d66bf8e85ab2c0da5ef226b27237dfbfd35a8..7bf572e34e0d5c565dfe41a4d75c4543eb65b00e 100644 (file)
@@ -25,8 +25,8 @@
 /* #define NFSD_DEBUG_VERBOSE 1 */
 
 
-static int nfsd_nr_verified = 0;
-static int nfsd_nr_put = 0;
+static int nfsd_nr_verified;
+static int nfsd_nr_put;
 
 
 struct nfsd_getdents_callback {
index a796885e385fd6947d60a1055919115cf362318e..f01f1de86ea2429df19f07782ac8376ba6bd5f81 100644 (file)
@@ -74,8 +74,8 @@ struct raparms {
                                p_rawin;
 };
 
-static struct raparms *                raparml = NULL;
-static struct raparms *                raparm_cache = NULL;
+static struct raparms *                raparml;
+static struct raparms *                raparm_cache;
 
 /*
  * Look up one component of a pathname.
@@ -714,7 +714,7 @@ nfsd_write(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t offset,
        }
 
        if (err >= 0 && stable) {
-               static unsigned long    last_ino = 0;
+               static unsigned long    last_ino;
                static kdev_t           last_dev = NODEV;
 
                /*
index 3ea51cdfa6702316118fedd9f355959187a7a408..e98d8490c6f0c875637140745960f66fadc54426 100644 (file)
@@ -20,7 +20,7 @@
 #endif
 #include <linux/spinlock.h>
 
-static struct nls_table *tables = (struct nls_table *) NULL;
+static struct nls_table *tables;
 static spinlock_t nls_lock = SPIN_LOCK_UNLOCKED;
 
 /*
index 847904ba1162a9402e6bfdc9e6bb656d6f799f1d..25009833799b334abbee7fe0f335cadb660cf631 100644 (file)
@@ -8,7 +8,7 @@
 #include <linux/nls.h>
 #include <linux/errno.h>
 
-static struct nls_table *p_nls = NULL;
+static struct nls_table *p_nls;
 
 static struct nls_table table = {
        "big5",
index 98b380e598c2c44f45a81c47858cbae65eee5e51..196a076984635cc6e9a40f081cd0f106345b3ed0 100644 (file)
@@ -8,7 +8,7 @@
 #include <linux/nls.h>
 #include <linux/errno.h>
 
-static struct nls_table *p_nls = NULL;
+static struct nls_table *p_nls;
 
 
 #define SS2            (0x8E)          /* Single Shift 2 */
index 5219c237127a3aa06ff88a9bf411f78e4a052b18..f015c21bffae4bd9d61bac70a2491ea0eb0a7dea 100644 (file)
@@ -8,7 +8,7 @@
 #include <linux/nls.h>
 #include <linux/errno.h>
 
-static struct nls_table *p_nls = NULL;
+static struct nls_table *p_nls;
 
 static struct nls_table table = {
        "euc-kr",
index 542a10e97dfb5bdebebc36c3e6f34c994ece1905..06c184a27c5104eeb45bae83bf79783c4100d3cc 100644 (file)
@@ -8,7 +8,7 @@
 #include <linux/nls.h>
 #include <linux/errno.h>
 
-static struct nls_table *p_nls = NULL;
+static struct nls_table *p_nls;
 
 static struct nls_table table = {
        "gb2312",
index ec6fb598f12710815773c51508977c39c12c7870..463ee02a563b004ab9706948bf8ca29e202bec3b 100644 (file)
@@ -8,7 +8,7 @@
 #include <linux/nls.h>
 #include <linux/errno.h>
 
-static struct nls_table *p_nls = NULL;
+static struct nls_table *p_nls;
 
 static struct nls_table table = {
        "sjis",
index c99e81e6a73cd534b239d8f4d01d1e24db855ee8..f9ffb0a406fbf77f4db457f3f3671798da3ff726 100644 (file)
@@ -416,8 +416,7 @@ static struct file_operations ntfs_file_operations_nommap = {
 #endif
 };
 
-static struct inode_operations ntfs_inode_operations_nobmap = {
-};
+static struct inode_operations ntfs_inode_operations_nobmap;
 
 #ifdef CONFIG_NTFS_RW
 static int
@@ -577,8 +576,7 @@ static struct file_operations ntfs_file_operations = {
 #endif
 };
 
-static struct inode_operations ntfs_inode_operations = {
-};
+static struct inode_operations ntfs_inode_operations;
 
 static struct file_operations ntfs_dir_operations = {
        read:           generic_read_dir,
index 1dfc4ad3e8e367402d68b48c9ae6696e718d6998..9cee2ab1572120fd5d0e5a96f9f3321291bcdd34 100644 (file)
@@ -338,8 +338,8 @@ static void devfs_register_disc (struct gendisk *dev, int minor)
        devfs_handle_t dir, slave;
        unsigned int devfs_flags = DEVFS_FL_DEFAULT;
        char dirname[64], symlink[16];
-       static unsigned int disc_counter = 0;
-       static devfs_handle_t devfs_handle = NULL;
+       static unsigned int disc_counter;
+       static devfs_handle_t devfs_handle;
 
        if (dev->part[minor].de) return;
        if ( dev->flags && (dev->flags[devnum] & GENHD_FL_REMOVABLE) )
index 7625e4d5aff137040d16959160f8af228aa34e8f..a1f7efe0f75ba137f2a4cb239760c21371c34881 100644 (file)
@@ -347,6 +347,10 @@ static ssize_t mem_read(struct file * file, char * buf,
        return copied;
 }
 
+#define mem_write NULL
+
+#ifndef mem_write
+/* This is a security hazard */
 static ssize_t mem_write(struct file * file, const char * buf,
                         size_t count, loff_t *ppos)
 {
@@ -385,6 +389,7 @@ static ssize_t mem_write(struct file * file, const char * buf,
        free_page((unsigned long) page);
        return copied;
 }
+#endif
 
 static struct file_operations proc_mem_operations = {
        read:           mem_read,
index fb5c5895ccd86321b49d6b048667a30d527d7c70..4f2e3908aef55f087a3fc4933108807614e95cec 100644 (file)
@@ -884,24 +884,27 @@ static struct super_block *get_sb_single(struct file_system_type *fs_type,
        return sb;
 }
 
-static struct block_device *kill_super(struct super_block *sb, int umount_root)
+static void kill_super(struct super_block *sb, int umount_root)
 {
        struct block_device *bdev;
        kdev_t dev;
        struct dentry *root = sb->s_root;
+       struct file_system_type *fs = sb->s_type;
+       struct super_operations *sop = sb->s_op;
+
        sb->s_root = NULL;
        /* Need to clean after the sucker */
-       if (sb->s_type->fs_flags & FS_LITTER)
+       if (fs->fs_flags & FS_LITTER)
                d_genocide(root);
-       if (sb->s_type->fs_flags & (FS_SINGLE|FS_LITTER))
+       if (fs->fs_flags & (FS_SINGLE|FS_LITTER))
                shrink_dcache_parent(root);
        dput(root);
        lock_super(sb);
-       if (sb->s_op) {
-               if (sb->s_op->write_super && sb->s_dirt)
-                       sb->s_op->write_super(sb);
-               if (sb->s_op->put_super)
-                       sb->s_op->put_super(sb);
+       if (sop) {
+               if (sop->write_super && sb->s_dirt)
+                       sop->write_super(sb);
+               if (sop->put_super)
+                       sop->put_super(sb);
        }
 
        /* Forget any remaining inodes */
@@ -914,7 +917,7 @@ static struct block_device *kill_super(struct super_block *sb, int umount_root)
        sb->s_dev = 0;          /* Free the superblock */
        bdev = sb->s_bdev;
        sb->s_bdev = NULL;
-       put_filesystem(sb->s_type);
+       put_filesystem(fs);
        sb->s_type = NULL;
        unlock_super(sb);
        if (umount_root) {
@@ -928,7 +931,6 @@ static struct block_device *kill_super(struct super_block *sb, int umount_root)
                bdput(bdev);
        } else
                put_unnamed_dev(dev);
-       return bdev;
 }
 
 /*
index 4aebe9bdaf6fa07abb6c2cc4a6d69f0fc719ba69..4b661b5af3f8e4727e0dce94936d821949ce5d46 100644 (file)
@@ -22,8 +22,8 @@
 
 extern struct dentry_operations umsdos_dentry_operations;
 
-struct dentry *saved_root = NULL;      /* Original root if changed */
-struct inode *pseudo_root = NULL;      /* Useful to simulate the pseudo DOS */
+struct dentry *saved_root;     /* Original root if changed */
+struct inode *pseudo_root;     /* Useful to simulate the pseudo DOS */
                                        /* directory. See UMSDOS_readdir_x() */
 
 static struct dentry *check_pseudo_root(struct super_block *);
index dc23ef74d7812e5f5cd71f13a4c942a748fc62f0..dd09a2eeca2d9288352dc6ebeeebe6d20d018144 100644 (file)
@@ -80,7 +80,7 @@ ev5_flush_tlb_current(struct mm_struct *mm)
        __load_new_mm_context(mm);
 }
 
-extern inline void
+static inline void
 flush_tlb_other(struct mm_struct *mm)
 {
        mm->context = 0;
@@ -234,27 +234,13 @@ extern struct pgtable_cache_struct {
 #define pte_quicklist (quicklists.pte_cache)
 #define pgtable_cache_size (quicklists.pgtable_cache_sz)
 
-extern __inline__ pgd_t *get_pgd_slow(void)
-{
-       pgd_t *ret = (pgd_t *)__get_free_page(GFP_KERNEL), *init;
-       
-       if (ret) {
-               init = pgd_offset(&init_mm, 0UL);
-               memset (ret, 0, USER_PTRS_PER_PGD * sizeof(pgd_t));
-               memcpy (ret + USER_PTRS_PER_PGD, init + USER_PTRS_PER_PGD,
-                       (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t));
-
-               pgd_val(ret[PTRS_PER_PGD])
-                 = pte_val(mk_pte(virt_to_page(ret), PAGE_KERNEL));
-       }
-       return ret;
-}
+extern pgd_t *get_pgd_slow(void);
 
-extern __inline__ pgd_t *get_pgd_fast(void)
+static inline pgd_t *get_pgd_fast(void)
 {
        unsigned long *ret;
 
-       if((ret = pgd_quicklist) != NULL) {
+       if ((ret = pgd_quicklist) != NULL) {
                pgd_quicklist = (unsigned long *)(*ret);
                ret[0] = ret[1];
                pgtable_cache_size--;
@@ -263,25 +249,25 @@ extern __inline__ pgd_t *get_pgd_fast(void)
        return (pgd_t *)ret;
 }
 
-extern __inline__ void free_pgd_fast(pgd_t *pgd)
+static inline void free_pgd_fast(pgd_t *pgd)
 {
        *(unsigned long *)pgd = (unsigned long) pgd_quicklist;
        pgd_quicklist = (unsigned long *) pgd;
        pgtable_cache_size++;
 }
 
-extern __inline__ void free_pgd_slow(pgd_t *pgd)
+static inline void free_pgd_slow(pgd_t *pgd)
 {
        free_page((unsigned long)pgd);
 }
 
 extern pmd_t *get_pmd_slow(pgd_t *pgd, unsigned long address_premasked);
 
-extern __inline__ pmd_t *get_pmd_fast(void)
+static inline pmd_t *get_pmd_fast(void)
 {
        unsigned long *ret;
 
-       if((ret = (unsigned long *)pte_quicklist) != NULL) {
+       if ((ret = (unsigned long *)pte_quicklist) != NULL) {
                pte_quicklist = (unsigned long *)(*ret);
                ret[0] = ret[1];
                pgtable_cache_size--;
@@ -289,25 +275,25 @@ extern __inline__ pmd_t *get_pmd_fast(void)
        return (pmd_t *)ret;
 }
 
-extern __inline__ void free_pmd_fast(pmd_t *pmd)
+static inline void free_pmd_fast(pmd_t *pmd)
 {
        *(unsigned long *)pmd = (unsigned long) pte_quicklist;
        pte_quicklist = (unsigned long *) pmd;
        pgtable_cache_size++;
 }
 
-extern __inline__ void free_pmd_slow(pmd_t *pmd)
+static inline void free_pmd_slow(pmd_t *pmd)
 {
        free_page((unsigned long)pmd);
 }
 
 extern pte_t *get_pte_slow(pmd_t *pmd, unsigned long address_preadjusted);
 
-extern __inline__ pte_t *get_pte_fast(void)
+static inline pte_t *get_pte_fast(void)
 {
        unsigned long *ret;
 
-       if((ret = (unsigned long *)pte_quicklist) != NULL) {
+       if ((ret = (unsigned long *)pte_quicklist) != NULL) {
                pte_quicklist = (unsigned long *)(*ret);
                ret[0] = ret[1];
                pgtable_cache_size--;
@@ -315,14 +301,14 @@ extern __inline__ pte_t *get_pte_fast(void)
        return (pte_t *)ret;
 }
 
-extern __inline__ void free_pte_fast(pte_t *pte)
+static inline void free_pte_fast(pte_t *pte)
 {
        *(unsigned long *)pte = (unsigned long) pte_quicklist;
        pte_quicklist = (unsigned long *) pte;
        pgtable_cache_size++;
 }
 
-extern __inline__ void free_pte_slow(pte_t *pte)
+static inline void free_pte_slow(pte_t *pte)
 {
        free_page((unsigned long)pte);
 }
@@ -337,7 +323,7 @@ extern void __bad_pmd(pgd_t *pgd);
 #define pgd_free(pgd)          free_pgd_fast(pgd)
 #define pgd_alloc()            get_pgd_fast()
 
-extern inline pte_t * pte_alloc(pmd_t *pmd, unsigned long address)
+static inline pte_t * pte_alloc(pmd_t *pmd, unsigned long address)
 {
        address = (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1);
        if (pmd_none(*pmd)) {
@@ -355,7 +341,7 @@ extern inline pte_t * pte_alloc(pmd_t *pmd, unsigned long address)
        return (pte_t *) pmd_page(*pmd) + address;
 }
 
-extern inline pmd_t * pmd_alloc(pgd_t *pgd, unsigned long address)
+static inline pmd_t * pmd_alloc(pgd_t *pgd, unsigned long address)
 {
        address = (address >> PMD_SHIFT) & (PTRS_PER_PMD - 1);
        if (pgd_none(*pgd)) {
@@ -378,20 +364,4 @@ extern inline pmd_t * pmd_alloc(pgd_t *pgd, unsigned long address)
 
 extern int do_check_pgt_cache(int, int);
 
-extern inline void set_pgdir(unsigned long address, pgd_t entry)
-{
-       struct task_struct * p;
-       pgd_t *pgd;
-        
-       read_lock(&tasklist_lock);
-       for_each_task(p) {
-               if (!p->mm)
-                       continue;
-               *pgd_offset(p->mm,address) = entry;
-       }
-       read_unlock(&tasklist_lock);
-       for (pgd = (pgd_t *)pgd_quicklist; pgd; pgd = (pgd_t *)*(unsigned long *)pgd)
-               pgd[(address >> PGDIR_SHIFT) & (PTRS_PER_PAGE - 1)] = entry;
-}
-
 #endif /* _ALPHA_PGALLOC_H */
index d68e1833206609555bf0c26e9cf99132ca872dfd..5c4373d3b006c0c13ccd912069491e0aef58f4e9 100644 (file)
 /*
  * Entries per page directory level:  the Alpha is three-level, with
  * all levels having a one-page page table.
- *
- * The PGD is special:  the last entry is reserved for self-mapping.
  */
 #define PTRS_PER_PTE   (1UL << (PAGE_SHIFT-3))
 #define PTRS_PER_PMD   (1UL << (PAGE_SHIFT-3))
-#define PTRS_PER_PGD   ((1UL << (PAGE_SHIFT-3))-1)
+#define PTRS_PER_PGD   (1UL << (PAGE_SHIFT-3))
 #define USER_PTRS_PER_PGD      (TASK_SIZE / PGDIR_SIZE)
 #define FIRST_USER_PGD_NR      0
 
 /* Number of pointers that fit on a page:  this will go away. */
 #define PTRS_PER_PAGE  (1UL << (PAGE_SHIFT-3))
 
-#define CONSOLE_REMAP_START    0xFFFFFE0000000000
-#define VMALLOC_START          (CONSOLE_REMAP_START + PMD_SIZE)
+#ifdef CONFIG_ALPHA_LARGE_VMALLOC
+#define VMALLOC_START          0xfffffe0000000000
+#else
+#define VMALLOC_START          (-2*PGDIR_SIZE)
+#endif
 #define VMALLOC_VMADDR(x)      ((unsigned long)(x))
-#define VMALLOC_END            (~0UL)
+#define VMALLOC_END            (-PGDIR_SIZE)
 
 /*
  * OSF/1 PAL-code-imposed page table bits
@@ -260,7 +261,7 @@ extern inline pte_t pte_mkyoung(pte_t pte)  { pte_val(pte) |= __ACCESS_BITS; retu
 #define pgd_offset_k(address) pgd_offset(&init_mm, address)
 
 /* to find an entry in a page-table-directory. */
-#define pgd_index(address)     ((address >> PGDIR_SHIFT) & PTRS_PER_PGD)
+#define pgd_index(address)     ((address >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1))
 #define __pgd_offset(address)  pgd_index(address)
 #define pgd_offset(mm, address)        ((mm)->pgd+pgd_index(address))
 
@@ -319,4 +320,6 @@ extern inline pte_t mk_swap_pte(unsigned long type, unsigned long offset)
 
 extern void paging_init(void);
 
+#include <asm-generic/pgtable.h>
+
 #endif /* _ALPHA_PGTABLE_H */
index a18b260352a414ecac04c20a88dbaf7aaf4da8ae..09c7421cccce5e81552bc6adfbba91503c146350 100644 (file)
@@ -185,6 +185,8 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
 
 #define io_remap_page_range    remap_page_range
 
+#include <asm-generic/pgtable.h>
+
 #endif /* !__ASSEMBLY__ */
 
 #endif /* _ASMARM_PGTABLE_H */
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
new file mode 100644 (file)
index 0000000..07c393d
--- /dev/null
@@ -0,0 +1,41 @@
+#ifndef _ASM_GENERIC_PGTABLE_H
+#define _ASM_GENERIC_PGTABLE_H
+
+static inline int ptep_test_and_clear_young(pte_t *ptep)
+{
+       pte_t pte = *ptep;
+       if (!pte_young(pte))
+               return 0;
+       set_pte(ptep, pte_mkold(pte));
+       return 1;
+}
+
+static inline int ptep_test_and_clear_dirty(pte_t *ptep)
+{
+       pte_t pte = *ptep;
+       if (!pte_dirty(pte))
+               return 0;
+       set_pte(ptep, pte_mkclean(pte));
+       return 1;
+}
+
+static inline pte_t ptep_get_and_clear(pte_t *ptep)
+{
+       pte_t pte = *ptep;
+       pte_clear(ptep);
+       return pte;
+}
+
+static inline void ptep_clear_wrprotect(pte_t *ptep)
+{
+       pte_t old_pte = *ptep;
+       set_pte(ptep, pte_wrprotect(old_pte));
+}
+
+static inline void ptep_mkdirty(pte_t *ptep)
+{
+       pte_t old_pte = *ptep;
+       set_pte(ptep, pte_mkdirty(old_pte));
+}
+
+#endif /* _ASM_GENERIC_PGTABLE_H */
index 008a3d47d68f280d4bcda8b72147506ef139ee87..c60710120160f30b2af4bb9bfa0d6bbb395d67d9 100644 (file)
@@ -426,5 +426,5 @@ static void __init check_bugs(void)
        check_pentium_f00f();
 #endif
        check_cyrix_coma();
-       system_utsname.machine[1] = '0' + boot_cpu_data.x86;
+       system_utsname.machine[1] = '0' + (boot_cpu_data.x86 > 6 ? 6 : boot_cpu_data.x86);
 }
index de4a7a87c6c8ff0fa9cfed9744d30dd484d7f757..615911e5bd244e61a74ffe5d673054d6a7974a78 100644 (file)
@@ -6,7 +6,8 @@
 
 #include <linux/config.h>
 
-/* bytes per L1 cache line */
-#define        L1_CACHE_BYTES  CONFIG_X86_L1_CACHE_BYTES
+/* L1 cache line size */
+#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
+#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
 
 #endif
index 04a41eb5807a76f6548b9b64329bb0d2372eba2e..641fa495abcddcb6a9dbde890d78de7893b65618 100644 (file)
 
 #define FLOPPY_CAN_FALLBACK_ON_NODMA
 
-static int virtual_dma_count=0;
-static int virtual_dma_residue=0;
-static char *virtual_dma_addr=0;
-static int virtual_dma_mode=0;
-static int doing_pdma=0;
+static int virtual_dma_count;
+static int virtual_dma_residue;
+static char *virtual_dma_addr;
+static int virtual_dma_mode;
+static int doing_pdma;
 
 static void floppy_hardint(int irq, void *dev_id, struct pt_regs * regs)
 {
index 03b2ba4002b7bfa5de989da830d92423476e38c6..8272b8f29a54024508436e1c26cd8c548872aeb9 100644 (file)
  * These are used to make use of C type-checking..
  */
 #if CONFIG_X86_PAE
-typedef struct { unsigned long long pte; } pte_t;
+typedef struct { unsigned long pte_low, pte_high; } pte_t;
 typedef struct { unsigned long long pmd; } pmd_t;
 typedef struct { unsigned long long pgd; } pgd_t;
-#define PTE_MASK       (~(unsigned long long) (PAGE_SIZE-1))
+#define pte_val(x)     ((x).pte_low | ((unsigned long long)(x).pte_high << 32))
 #else
-typedef struct { unsigned long pte; } pte_t;
+typedef struct { unsigned long pte_low; } pte_t;
 typedef struct { unsigned long pmd; } pmd_t;
 typedef struct { unsigned long pgd; } pgd_t;
-#define PTE_MASK       PAGE_MASK
+#define pte_val(x)     ((x).pte_low)
 #endif
+#define PTE_MASK       PAGE_MASK
 
 typedef struct { unsigned long pgprot; } pgprot_t;
 
-#define pte_val(x)     ((x).pte)
 #define pmd_val(x)     ((x).pmd)
 #define pgd_val(x)     ((x).pgd)
 #define pgprot_val(x)  ((x).pgprot)
index dbb12f801e7a0b903b82ea412be1fca84c863a6e..bb5c2077e71ad7b2624acd7562902a5470f42683 100644 (file)
@@ -18,7 +18,7 @@
 #define PTRS_PER_PTE   1024
 
 #define pte_ERROR(e) \
-       printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e))
+       printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, (e).pte_low)
 #define pmd_ERROR(e) \
        printk("%s:%d: bad pmd %08lx.\n", __FILE__, __LINE__, pmd_val(e))
 #define pgd_ERROR(e) \
@@ -54,5 +54,10 @@ extern inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address)
 {
        return (pmd_t *) dir;
 }
+#define ptep_get_and_clear(xp) __pte(xchg(&(xp)->pte_low, 0))
+#define pte_same(a, b)         ((a).pte_low == (b).pte_low)
+#define pte_page(x)            (mem_map+((unsigned long)(((x).pte_low >> PAGE_SHIFT))))
+#define pte_none(x)            (!(x).pte_low)
+#define __mk_pte(page_nr,pgprot) __pte(((page_nr) << PAGE_SHIFT) | pgprot_val(pgprot))
 
 #endif /* _I386_PGTABLE_2LEVEL_H */
index 5ee848ef33386bd945db1b0492c6754150fdf8f9..aac1e31214711160b276ffce8d27728b85484113 100644 (file)
@@ -27,7 +27,7 @@
 #define PTRS_PER_PTE   512
 
 #define pte_ERROR(e) \
-       printk("%s:%d: bad pte %p(%016Lx).\n", __FILE__, __LINE__, &(e), pte_val(e))
+       printk("%s:%d: bad pte %p(%08lx%08lx).\n", __FILE__, __LINE__, &(e), (e).pte_high, (e).pte_low)
 #define pmd_ERROR(e) \
        printk("%s:%d: bad pmd %p(%016Lx).\n", __FILE__, __LINE__, &(e), pmd_val(e))
 #define pgd_ERROR(e) \
 extern inline int pgd_bad(pgd_t pgd)           { return 0; }
 extern inline int pgd_present(pgd_t pgd)       { return !pgd_none(pgd); }
 
-#define set_pte(pteptr,pteval) \
-               set_64bit((unsigned long long *)(pteptr),pte_val(pteval))
+/* Rules for using set_pte: the pte being assigned *must* be
+ * either not present or in a state where the hardware will
+ * not attempt to update the pte.  In places where this is
+ * not possible, use pte_get_and_clear to obtain the old pte
+ * value and then use set_pte to update it.  -ben
+ */
+static inline void set_pte(pte_t *ptep, pte_t pte)
+{
+       ptep->pte_high = pte.pte_high;
+       smp_wmb();
+       ptep->pte_low = pte.pte_low;
+}
 #define set_pmd(pmdptr,pmdval) \
                set_64bit((unsigned long long *)(pmdptr),pmd_val(pmdval))
 #define set_pgd(pgdptr,pgdval) \
@@ -76,4 +86,33 @@ extern inline void pgd_clear (pgd_t * pgd)
 #define pmd_offset(dir, address) ((pmd_t *) pgd_page(*(dir)) + \
                        __pmd_offset(address))
 
+static inline pte_t ptep_get_and_clear(pte_t *ptep)
+{
+       pte_t res;
+
+       /* xchg acts as a barrier before the setting of the high bits */
+       res.pte_low = xchg(&ptep->pte_low, 0);
+       res.pte_high = ptep->pte_high;
+       ptep->pte_high = 0;
+
+       return res;
+}
+
+static inline int pte_same(pte_t a, pte_t b)
+{
+       return a.pte_low == b.pte_low && a.pte_high == b.pte_high;
+}
+
+#define pte_page(x)    (mem_map+(((x).pte_low >> PAGE_SHIFT) | ((x).pte_high << (32 - PAGE_SHIFT))))
+#define pte_none(x)    (!(x).pte_low && !(x).pte_high)
+
+static inline pte_t __mk_pte(unsigned long page_nr, pgprot_t pgprot)
+{
+       pte_t pte;
+
+       pte.pte_high = page_nr >> (32 - PAGE_SHIFT);
+       pte.pte_low = (page_nr << PAGE_SHIFT) | pgprot_val(pgprot);
+       return pte;
+}
+
 #endif /* _I386_PGTABLE_3LEVEL_H */
index 4de265da0ff9ea76e6c14fd97eb40adf01834fae..5460e6ccc36e940c790c91cd8bb4983c559d1c6e 100644 (file)
 #include <asm/fixmap.h>
 #include <linux/threads.h>
 
+#ifndef _I386_BITOPS_H
+#include <asm/bitops.h>
+#endif
+
 extern pgd_t swapper_pg_dir[1024];
 extern void paging_init(void);
 
@@ -145,6 +149,16 @@ extern unsigned long empty_zero_page[1024];
  * the page directory entry points directly to a 4MB-aligned block of
  * memory. 
  */
+#define _PAGE_BIT_PRESENT      0
+#define _PAGE_BIT_RW           1
+#define _PAGE_BIT_USER         2
+#define _PAGE_BIT_PWT          3
+#define _PAGE_BIT_PCD          4
+#define _PAGE_BIT_ACCESSED     5
+#define _PAGE_BIT_DIRTY                6
+#define _PAGE_BIT_PSE          7       /* 4 MB (or 2MB) page, Pentium+, if present.. */
+#define _PAGE_BIT_GLOBAL       8       /* Global TLB entry PPro+ */
+
 #define _PAGE_PRESENT  0x001
 #define _PAGE_RW       0x002
 #define _PAGE_USER     0x004
@@ -231,8 +245,7 @@ extern unsigned long pg0[1024];
 extern void __handle_bad_pmd(pmd_t * pmd);
 extern void __handle_bad_pmd_kernel(pmd_t * pmd);
 
-#define pte_none(x)    (!pte_val(x))
-#define pte_present(x) (pte_val(x) & (_PAGE_PRESENT | _PAGE_PROTNONE))
+#define pte_present(x) ((x).pte_low & (_PAGE_PRESENT | _PAGE_PROTNONE))
 #define pte_clear(xp)  do { set_pte(xp, __pte(0)); } while (0)
 
 #define pmd_none(x)    (!pmd_val(x))
@@ -246,49 +259,49 @@ extern void __handle_bad_pmd_kernel(pmd_t * pmd);
  */
 #define page_address(page) ((page)->virtual)
 #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT))
-#define pte_page(x) (mem_map+((unsigned long)((pte_val(x) >> PAGE_SHIFT))))
 
 /*
  * The following only work if pte_present() is true.
  * Undefined behaviour if not..
  */
-extern inline int pte_read(pte_t pte)          { return pte_val(pte) & _PAGE_USER; }
-extern inline int pte_exec(pte_t pte)          { return pte_val(pte) & _PAGE_USER; }
-extern inline int pte_dirty(pte_t pte)         { return pte_val(pte) & _PAGE_DIRTY; }
-extern inline int pte_young(pte_t pte)         { return pte_val(pte) & _PAGE_ACCESSED; }
-extern inline int pte_write(pte_t pte)         { return pte_val(pte) & _PAGE_RW; }
-
-extern inline pte_t pte_rdprotect(pte_t pte)   { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; }
-extern inline pte_t pte_exprotect(pte_t pte)   { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; }
-extern inline pte_t pte_mkclean(pte_t pte)     { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_DIRTY)); return pte; }
-extern inline pte_t pte_mkold(pte_t pte)       { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_ACCESSED)); return pte; }
-extern inline pte_t pte_wrprotect(pte_t pte)   { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_RW)); return pte; }
-extern inline pte_t pte_mkread(pte_t pte)      { set_pte(&pte, __pte(pte_val(pte) | _PAGE_USER)); return pte; }
-extern inline pte_t pte_mkexec(pte_t pte)      { set_pte(&pte, __pte(pte_val(pte) | _PAGE_USER)); return pte; }
-extern inline pte_t pte_mkdirty(pte_t pte)     { set_pte(&pte, __pte(pte_val(pte) | _PAGE_DIRTY)); return pte; }
-extern inline pte_t pte_mkyoung(pte_t pte)     { set_pte(&pte, __pte(pte_val(pte) | _PAGE_ACCESSED)); return pte; }
-extern inline pte_t pte_mkwrite(pte_t pte)     { set_pte(&pte, __pte(pte_val(pte) | _PAGE_RW)); return pte; }
+static inline int pte_read(pte_t pte)          { return (pte).pte_low & _PAGE_USER; }
+static inline int pte_exec(pte_t pte)          { return (pte).pte_low & _PAGE_USER; }
+static inline int pte_dirty(pte_t pte)         { return (pte).pte_low & _PAGE_DIRTY; }
+static inline int pte_young(pte_t pte)         { return (pte).pte_low & _PAGE_ACCESSED; }
+static inline int pte_write(pte_t pte)         { return (pte).pte_low & _PAGE_RW; }
+
+static inline pte_t pte_rdprotect(pte_t pte)   { (pte).pte_low &= ~_PAGE_USER; return pte; }
+static inline pte_t pte_exprotect(pte_t pte)   { (pte).pte_low &= ~_PAGE_USER; return pte; }
+static inline pte_t pte_mkclean(pte_t pte)     { (pte).pte_low &= ~_PAGE_DIRTY; return pte; }
+static inline pte_t pte_mkold(pte_t pte)       { (pte).pte_low &= ~_PAGE_ACCESSED; return pte; }
+static inline pte_t pte_wrprotect(pte_t pte)   { (pte).pte_low &= ~_PAGE_RW; return pte; }
+static inline pte_t pte_mkread(pte_t pte)      { (pte).pte_low |= _PAGE_USER; return pte; }
+static inline pte_t pte_mkexec(pte_t pte)      { (pte).pte_low |= _PAGE_USER; return pte; }
+static inline pte_t pte_mkdirty(pte_t pte)     { (pte).pte_low |= _PAGE_DIRTY; return pte; }
+static inline pte_t pte_mkyoung(pte_t pte)     { (pte).pte_low |= _PAGE_ACCESSED; return pte; }
+static inline pte_t pte_mkwrite(pte_t pte)     { (pte).pte_low |= _PAGE_RW; return pte; }
+
+static inline  int ptep_test_and_clear_dirty(pte_t *ptep)      { return test_and_clear_bit(_PAGE_BIT_DIRTY, ptep); }
+static inline  int ptep_test_and_clear_young(pte_t *ptep)      { return test_and_clear_bit(_PAGE_BIT_ACCESSED, ptep); }
+static inline void ptep_clear_wrprotect(pte_t *ptep)           { clear_bit(_PAGE_BIT_RW, ptep); }
+static inline void ptep_mkdirty(pte_t *ptep)                   { set_bit(_PAGE_BIT_RW, ptep); }
 
 /*
  * Conversion functions: convert a page and protection to a page entry,
  * and a page entry and page directory to the page they refer to.
  */
 
-#define mk_pte(page,pgprot) \
-({                                                                     \
-       pte_t __pte;                                                    \
-                                                                       \
-       set_pte(&__pte, __pte(((page)-mem_map) *                        \
-               (unsigned long long)PAGE_SIZE + pgprot_val(pgprot)));   \
-       __pte;                                                          \
-})
+#define mk_pte(page, pgprot)   __mk_pte((page) - mem_map, (pgprot))
 
 /* This takes a physical page address that is used by the remapping functions */
-#define mk_pte_phys(physpage, pgprot) \
-({ pte_t __pte; set_pte(&__pte, __pte(physpage + pgprot_val(pgprot))); __pte; })
+#define mk_pte_phys(physpage, pgprot)  __mk_pte((physpage) >> PAGE_SHIFT, pgprot)
 
-extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
-{ set_pte(&pte, __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot))); return pte; }
+static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
+{
+       pte.pte_low &= _PAGE_CHG_MASK;
+       pte.pte_low |= pgprot_val(newprot);
+       return pte;
+}
 
 #define page_pte(page) page_pte_prot(page, __pgprot(0))
 
@@ -324,7 +337,7 @@ extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
 #define SWP_TYPE(x)                    (((x).val >> 1) & 0x3f)
 #define SWP_OFFSET(x)                  ((x).val >> 8)
 #define SWP_ENTRY(type, offset)                ((swp_entry_t) { ((type) << 1) | ((offset) << 8) })
-#define pte_to_swp_entry(pte)          ((swp_entry_t) { pte_val(pte) })
+#define pte_to_swp_entry(pte)          ((swp_entry_t) { (pte).pte_low })
 #define swp_entry_to_pte(x)            ((pte_t) { (x).val })
 
 #define module_map      vmalloc
index 98b4787e5c470444ffcf06a4ac3d41f39bd9d31c..6fbed9cc101592525d923affa779242250d4f3f2 100644 (file)
@@ -437,6 +437,8 @@ do {                                                                                                \
 extern unsigned long empty_zero_page[PAGE_SIZE/sizeof(unsigned long)];
 #define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
 
+#include <asm-generic/pgtable.h>
+
 # endif /* !__ASSEMBLY__ */
 
 #endif /* _ASM_IA64_PGTABLE_H */
index bedaecc4e020fd0573525f35d3ae4ca46365b9e1..2e128ff48551e5ad4bb086b57d650c97389aed95 100644 (file)
@@ -399,4 +399,6 @@ extern inline void update_mmu_cache(struct vm_area_struct * vma,
 
 #define io_remap_page_range remap_page_range
 
+#include <asm-generic/pgtable.h>
+
 #endif /* _M68K_PGTABLE_H */
index f11b734bc73e10922ff91511f39212e8a901a0ac..ddf041e4afad6a432f90d629494cfdeceaf18867 100644 (file)
@@ -714,6 +714,8 @@ extern inline void set_context(unsigned long val)
                : : "r" (val));
 }
 
+#include <asm-generic/pgtable.h>
+
 #endif /* !defined (_LANGUAGE_ASSEMBLY) */
 
 #define io_remap_page_range remap_page_range
index b959ab03a9c3bf3005eea0107a63b2a6747e4aaa..8714bacd6281e3d3fc10dff3b5a9433f7cc1300e 100644 (file)
@@ -767,6 +767,8 @@ extern inline void set_context(unsigned long val)
                : : "r" (val));
 }
 
+#include <asm-generic/pgtable.h>
+
 #endif /* !defined (_LANGUAGE_ASSEMBLY) */
 
 #endif /* _ASM_PGTABLE_H */
index c5a90fba0ddb8ab4897ce4c07e678a965c790a43..27c89e13ee43ae4da61ee08b0d4984a58ee61cbc 100644 (file)
@@ -488,6 +488,7 @@ extern void kernel_set_cachemode (unsigned long address, unsigned long size,
 
 #define io_remap_page_range remap_page_range 
 
+#include <asm-generic/pgtable.h>
 
 #endif __ASSEMBLY__
 #endif /* _PPC_PGTABLE_H */
index d6509ea2f528009831423c67b45a3a2bd79c0198..ae4f3b505332fcad6eae944ea6f3b4d1164084eb 100644 (file)
@@ -408,6 +408,8 @@ extern inline void update_mmu_cache(struct vm_area_struct * vma,
 #define module_map      vmalloc
 #define module_unmap    vfree
 
+#include <asm-generic/pgtable.h>
+
 #endif /* !__ASSEMBLY__ */
 
 /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
index f84b7904afd5d531ce8dc5233e296a115f5b5eb8..323b7eb7c0746f81c42501815bb11dc2c35553f1 100644 (file)
@@ -257,6 +257,8 @@ extern void update_mmu_cache(struct vm_area_struct * vma,
 #define module_map      vmalloc
 #define module_unmap    vfree
 
+#include <asm-generic/pgtable.h>
+
 #endif /* !__ASSEMBLY__ */
 
 /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
index 66e4aab801f74fbf382a520c980ed19fcd459f17..167387e5b7328f00a2c1b468618f496d3e39ad06 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: pgalloc.h,v 1.10 2000/10/13 01:40:26 davem Exp $ */
+/* $Id: pgalloc.h,v 1.11 2000/10/16 14:32:49 anton Exp $ */
 #ifndef _SPARC_PGALLOC_H
 #define _SPARC_PGALLOC_H
 
@@ -139,8 +139,4 @@ BTFIXUPDEF_CALL(pgd_t *, pgd_alloc, void)
 #define pgd_free(pgd) BTFIXUP_CALL(pgd_free)(pgd)
 #define pgd_alloc() BTFIXUP_CALL(pgd_alloc)()
 
-#error Anton, you need to do set_pgdir things now as on ix86, see i386/mm/fault.c
-
-#define set_pgdir(address,entry) BTFIXUP_CALL(set_pgdir)(address,entry)
-
 #endif /* _SPARC64_PGALLOC_H */
index 8562fc287d1c618ae37c32a754541b45cda13142..202ebe6d9f31bb42483e79194fbf23ff988c7ba7 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: pgtable.h,v 1.102 2000/08/14 00:46:13 anton Exp $ */
+/* $Id: pgtable.h,v 1.103 2000/10/16 14:32:49 anton Exp $ */
 #ifndef _SPARC_PGTABLE_H
 #define _SPARC_PGTABLE_H
 
@@ -321,8 +321,10 @@ BTFIXUPDEF_CALL_CONST(pte_t, mk_pte_io, unsigned long, pgprot_t, int)
 #define mk_pte_io(page,pgprot,space) BTFIXUP_CALL(mk_pte_io)(page,pgprot,space)
 
 BTFIXUPDEF_CALL(void, pgd_set, pgd_t *, pmd_t *)
+BTFIXUPDEF_CALL(void, pmd_set, pmd_t *, pte_t *)
 
 #define pgd_set(pgdp,pmdp) BTFIXUP_CALL(pgd_set)(pgdp,pmdp)
+#define pmd_set(pmdp,ptep) BTFIXUP_CALL(pmd_set)(pmdp,ptep)
 
 BTFIXUPDEF_INT(pte_modify_mask)
 
@@ -455,6 +457,8 @@ extern unsigned long *sparc_valid_addr_bitmap;
 extern int io_remap_page_range(unsigned long from, unsigned long to,
                               unsigned long size, pgprot_t prot, int space);
 
+#include <asm-generic/pgtable.h>
+
 #endif /* !(__ASSEMBLY__) */
 
 /* We provide our own get_unmapped_area to cope with VA holes for userland */
index 070fb31dbcb4a1a2b7f8ef07e32962e236c8f323..6eb90b44c70ad02184217d0cc957f9c1eb877b42 100644 (file)
@@ -295,6 +295,8 @@ extern unsigned long *sparc64_valid_addr_bitmap;
 extern int io_remap_page_range(unsigned long from, unsigned long offset,
                               unsigned long size, pgprot_t prot, int space);
 
+#include <asm-generic/pgtable.h>
+
 #endif /* !(__ASSEMBLY__) */
 
 /* We provide our own get_unmapped_area to cope with VA holes for userland */
index 359905839d69ff24d20837b8d97139b36c898d75..6560f2901519905b097db6c8e5124a806e4a3672 100644 (file)
@@ -8,6 +8,7 @@
 #include <asm/dma.h>
 #include <linux/cache.h>
 #include <linux/init.h>
+#include <linux/mmzone.h>
 
 /*
  *  simple boot-time physical memory area allocator.
@@ -43,16 +44,16 @@ extern void * __init __alloc_bootmem (unsigned long size, unsigned long align, u
        __alloc_bootmem((x), PAGE_SIZE, 0)
 extern unsigned long __init free_all_bootmem (void);
 
-extern unsigned long __init init_bootmem_node (int nid, unsigned long freepfn, unsigned long startpfn, unsigned long endpfn);
-extern void __init reserve_bootmem_node (int nid, unsigned long physaddr, unsigned long size);
-extern void __init free_bootmem_node (int nid, unsigned long addr, unsigned long size);
-extern unsigned long __init free_all_bootmem_node (int nid);
-extern void * __init __alloc_bootmem_node (int nid, unsigned long size, unsigned long align, unsigned long goal);
-#define alloc_bootmem_node(nid, x) \
-       __alloc_bootmem_node((nid), (x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS))
-#define alloc_bootmem_pages_node(nid, x) \
-       __alloc_bootmem_node((nid), (x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS))
-#define alloc_bootmem_low_pages_node(nid, x) \
-       __alloc_bootmem_node((nid), (x), PAGE_SIZE, 0)
+extern unsigned long __init init_bootmem_node (pg_data_t *pgdat, unsigned long freepfn, unsigned long startpfn, unsigned long endpfn);
+extern void __init reserve_bootmem_node (pg_data_t *pgdat, unsigned long physaddr, unsigned long size);
+extern void __init free_bootmem_node (pg_data_t *pgdat, unsigned long addr, unsigned long size);
+extern unsigned long __init free_all_bootmem_node (pg_data_t *pgdat);
+extern void * __init __alloc_bootmem_node (pg_data_t *pgdat, unsigned long size, unsigned long align, unsigned long goal);
+#define alloc_bootmem_node(pgdat, x) \
+       __alloc_bootmem_node((pgdat), (x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS))
+#define alloc_bootmem_pages_node(pgdat, x) \
+       __alloc_bootmem_node((pgdat), (x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS))
+#define alloc_bootmem_low_pages_node(pgdat, x) \
+       __alloc_bootmem_node((pgdat), (x), PAGE_SIZE, 0)
 
 #endif /* _LINUX_BOOTMEM_H */
index ebd81c0134340e07ab9d0bf4e87c15731b949856..b84efd74c9959b045c206ab0a57c867f687b7895 100644 (file)
 #define __constant_ntohl(x) ((__u32)(x))
 #define __constant_htons(x) ((__u16)(x))
 #define __constant_ntohs(x) ((__u16)(x))
-#define __constant_cpu_to_le64(x) ___swab64((x))
-#define __constant_le64_to_cpu(x) ___swab64((x))
-#define __constant_cpu_to_le32(x) ___swab32((x))
-#define __constant_le32_to_cpu(x) ___swab32((x))
-#define __constant_cpu_to_le16(x) ___swab16((x))
-#define __constant_le16_to_cpu(x) ___swab16((x))
+#define __constant_cpu_to_le64(x) ___constant_swab64((x))
+#define __constant_le64_to_cpu(x) ___constant_swab64((x))
+#define __constant_cpu_to_le32(x) ___constant_swab32((x))
+#define __constant_le32_to_cpu(x) ___constant_swab32((x))
+#define __constant_cpu_to_le16(x) ___constant_swab16((x))
+#define __constant_le16_to_cpu(x) ___constant_swab16((x))
 #define __constant_cpu_to_be64(x) ((__u64)(x))
 #define __constant_be64_to_cpu(x) ((__u64)(x))
 #define __constant_cpu_to_be32(x) ((__u32)(x))
index 5a5412403f710c712be2617120c7bb5cb301a883..1431663621567e22a2285ea8c185b5448772bca6 100644 (file)
 
 #include <linux/byteorder/swab.h>
 
-#define __constant_htonl(x) ___swab32((x))
-#define __constant_ntohl(x) ___swab32((x))
-#define __constant_htons(x) ___swab16((x))
-#define __constant_ntohs(x) ___swab16((x))
+#define __constant_htonl(x) ___constant_swab32((x))
+#define __constant_ntohl(x) ___constant_swab32((x))
+#define __constant_htons(x) ___constant_swab16((x))
+#define __constant_ntohs(x) ___constant_swab16((x))
 #define __constant_cpu_to_le64(x) ((__u64)(x))
 #define __constant_le64_to_cpu(x) ((__u64)(x))
 #define __constant_cpu_to_le32(x) ((__u32)(x))
 #define __constant_le32_to_cpu(x) ((__u32)(x))
 #define __constant_cpu_to_le16(x) ((__u16)(x))
 #define __constant_le16_to_cpu(x) ((__u16)(x))
-#define __constant_cpu_to_be64(x) ___swab64((x))
-#define __constant_be64_to_cpu(x) ___swab64((x))
-#define __constant_cpu_to_be32(x) ___swab32((x))
-#define __constant_be32_to_cpu(x) ___swab32((x))
-#define __constant_cpu_to_be16(x) ___swab16((x))
-#define __constant_be16_to_cpu(x) ___swab16((x))
+#define __constant_cpu_to_be64(x) ___constant_swab64((x))
+#define __constant_be64_to_cpu(x) ___constant_swab64((x))
+#define __constant_cpu_to_be32(x) ___constant_swab32((x))
+#define __constant_be32_to_cpu(x) ___constant_swab32((x))
+#define __constant_cpu_to_be16(x) ___constant_swab16((x))
+#define __constant_be16_to_cpu(x) ___constant_swab16((x))
 #define __cpu_to_le64(x) ((__u64)(x))
 #define __le64_to_cpu(x) ((__u64)(x))
 #define __cpu_to_le32(x) ((__u32)(x))
index 90f8c7433a063ceb905016c0675188771c3f8dde..618631cbc6e38a9fbbadddce26671a1bab6d302b 100644 (file)
 #include <linux/byteorder/swab.h>
 #include <linux/byteorder/swabb.h>
 
-#define __constant_htonl(x) ___swahb32((x))
-#define __constant_ntohl(x) ___swahb32((x))
-#define __constant_htons(x) ___swab16((x))
-#define __constant_ntohs(x) ___swab16((x))
+#define __constant_htonl(x) ___constant_swahb32((x))
+#define __constant_ntohl(x) ___constant_swahb32((x))
+#define __constant_htons(x) ___constant_swab16((x))
+#define __constant_ntohs(x) ___constant_swab16((x))
 #define __constant_cpu_to_le64(x) I DON'T KNOW
 #define __constant_le64_to_cpu(x) I DON'T KNOW
-#define __constant_cpu_to_le32(x) ___swahw32((x))
-#define __constant_le32_to_cpu(x) ___swahw32((x))
+#define __constant_cpu_to_le32(x) ___constant_swahw32((x))
+#define __constant_le32_to_cpu(x) ___constant_swahw32((x))
 #define __constant_cpu_to_le16(x) ((__u16)(x)
 #define __constant_le16_to_cpu(x) ((__u16)(x)
 #define __constant_cpu_to_be64(x) I DON'T KNOW
 #define __constant_be64_to_cpu(x) I DON'T KNOW
-#define __constant_cpu_to_be32(x) ___swahb32((x))
-#define __constant_be32_to_cpu(x) ___swahb32((x))
-#define __constant_cpu_to_be16(x) ___swab16((x))
-#define __constant_be16_to_cpu(x) ___swab16((x))
+#define __constant_cpu_to_be32(x) ___constant_swahb32((x))
+#define __constant_be32_to_cpu(x) ___constant_swahb32((x))
+#define __constant_cpu_to_be16(x) ___constant_swab16((x))
+#define __constant_be16_to_cpu(x) ___constant_swab16((x))
 #define __cpu_to_le64(x) I DON'T KNOW
 #define __le64_to_cpu(x) I DON'T KNOW
 #define __cpu_to_le32(x) ___swahw32((x))
index 23f1be7d718b515fda65f32e89027607649c151f..f75dccef48bf8333943bafc5f0b6ce223b6875f8 100644 (file)
  * how U/UL/ULL map to __u16, __u32, __u64. At least not in a portable way.
  */
 #define ___swab16(x) \
+({ \
+       __u16 __x = (x); \
+       ((__u16)( \
+               (((__u16)(__x) & (__u16)0x00ffU) << 8) | \
+               (((__u16)(__x) & (__u16)0xff00U) >> 8) )); \
+})
+
+#define ___swab32(x) \
+({ \
+       __u32 __x = (x); \
+       ((__u32)( \
+               (((__u32)(__x) & (__u32)0x000000ffUL) << 24) | \
+               (((__u32)(__x) & (__u32)0x0000ff00UL) <<  8) | \
+               (((__u32)(__x) & (__u32)0x00ff0000UL) >>  8) | \
+               (((__u32)(__x) & (__u32)0xff000000UL) >> 24) )); \
+})
+
+#define ___swab64(x) \
+({ \
+       __u64 __x = (x); \
+       ((__u64)( \
+               (__u64)(((__u64)(__x) & (__u64)0x00000000000000ffULL) << 56) | \
+               (__u64)(((__u64)(__x) & (__u64)0x000000000000ff00ULL) << 40) | \
+               (__u64)(((__u64)(__x) & (__u64)0x0000000000ff0000ULL) << 24) | \
+               (__u64)(((__u64)(__x) & (__u64)0x00000000ff000000ULL) <<  8) | \
+               (__u64)(((__u64)(__x) & (__u64)0x000000ff00000000ULL) >>  8) | \
+               (__u64)(((__u64)(__x) & (__u64)0x0000ff0000000000ULL) >> 24) | \
+               (__u64)(((__u64)(__x) & (__u64)0x00ff000000000000ULL) >> 40) | \
+               (__u64)(((__u64)(__x) & (__u64)0xff00000000000000ULL) >> 56) )); \
+})
+
+#define ___constant_swab16(x) \
        ((__u16)( \
                (((__u16)(x) & (__u16)0x00ffU) << 8) | \
                (((__u16)(x) & (__u16)0xff00U) >> 8) ))
-#define ___swab32(x) \
+#define ___constant_swab32(x) \
        ((__u32)( \
                (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
                (((__u32)(x) & (__u32)0x0000ff00UL) <<  8) | \
                (((__u32)(x) & (__u32)0x00ff0000UL) >>  8) | \
                (((__u32)(x) & (__u32)0xff000000UL) >> 24) ))
-#define ___swab64(x) \
+#define ___constant_swab64(x) \
        ((__u64)( \
                (__u64)(((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | \
                (__u64)(((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | \
index 782db2e8e94e108b60786a95368a0c8affb73e7b..a10ef3086853008f966010c03465ed0d8e198440 100644 (file)
  *
  */
 
-
 #define ___swahw32(x) \
+({ \
+       __u32 __x = (x); \
+       ((__u32)( \
+               (((__u32)(__x) & (__u32)0x0000ffffUL) << 16) | \
+               (((__u32)(__x) & (__u32)0xffff0000UL) >> 16) )); \
+})
+#define ___swahb32(x) \
+({ \
+       __u32 __x = (x); \
+       ((__u32)( \
+               (((__u32)(__x) & (__u32)0x00ff00ffUL) << 8) | \
+               (((__u32)(__x) & (__u32)0xff00ff00UL) >> 8) )) \
+})
+
+#define ___constant_swahw32(x) \
        ((__u32)( \
                (((__u32)(x) & (__u32)0x0000ffffUL) << 16) | \
                (((__u32)(x) & (__u32)0xffff0000UL) >> 16) ))
-#define ___swahb32(x) \
+#define ___constant_swahb32(x) \
        ((__u32)( \
                (((__u32)(x) & (__u32)0x00ff00ffUL) << 8) | \
                (((__u32)(x) & (__u32)0xff00ff00UL) >> 8) ))
index f8da31cbd0d7b8877309f96d11c784e0f1edbcbb..288f83b96f99c0f2417584279a12c76c9263f2e8 100644 (file)
@@ -50,16 +50,16 @@ struct consw {
        unsigned long (*con_getxy)(struct vc_data *, unsigned long, int *, int *);
 };
 
-extern struct consw *conswitchp;
+extern const struct consw *conswitchp;
 
-extern struct consw dummy_con; /* dummy console buffer */
-extern struct consw fb_con;    /* frame buffer based console */
-extern struct consw vga_con;   /* VGA text console */
-extern struct consw newport_con;       /* SGI Newport console  */
-extern struct consw prom_con;  /* SPARC PROM console */
+extern const struct consw dummy_con;   /* dummy console buffer */
+extern const struct consw fb_con;      /* frame buffer based console */
+extern const struct consw vga_con;     /* VGA text console */
+extern const struct consw newport_con; /* SGI Newport console  */
+extern const struct consw prom_con;    /* SPARC PROM console */
 
-void take_over_console(struct consw *sw, int first, int last, int deflt);
-void give_up_console(struct consw *sw);
+void take_over_console(const struct consw *sw, int first, int last, int deflt);
+void give_up_console(const struct consw *sw);
 
 /* scroll */
 #define SM_UP       (1)
index 0f664086af5e9037eee3215b303822920a8eca03..4dc4750ac2eb26cb3479a6be3cd7a3c33e09ef20 100644 (file)
@@ -16,7 +16,7 @@ struct vc_data {
        unsigned int    vc_cols;                /* [#] Console size */
        unsigned int    vc_rows;
        unsigned int    vc_size_row;            /* Bytes per row */
-       struct consw    *vc_sw;
+       const struct consw *vc_sw;
        unsigned short  *vc_screenbuf;          /* In-memory character/attribute buffer */
        unsigned int    vc_screenbuf_size;
        unsigned char   vc_attr;                /* Current attributes */
index e00d447608563f2f5f1ec3a7193f454fcd98ac54..23866ce797a73220961cf5f80f6cc78288b17783 100644 (file)
@@ -212,6 +212,9 @@ typedef unsigned char       byte;   /* used everywhere */
                (drive)->quirk_list = hwif->quirkproc(drive);   \
 }
 
+#define IDE_DEBUG(lineno) \
+       printk("%s,%s,line=%d\n", __FILE__, __FUNCTION__, (lineno))
+
 /*
  * Check for an interrupt and acknowledge the interrupt status
  */
index 59075b0709e175169bd5368a6eaa7425c0a80e72..41e7d92cce55ecc9c1c27589a97fd56c4f7e49cf 100644 (file)
@@ -151,8 +151,6 @@ extern int netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
                              int (*done)(struct netlink_callback*));
 
 
-extern void netlink_proto_init(struct net_proto *pro);
-
 #endif /* __KERNEL__ */
 
 #endif /* __LINUX_NETLINK_H */
index fd85e20b4d348e78a7df2f85d77e5c9d87d37bdb..db9260ee53f80f982dfbe33343c6949b6b07d6e0 100644 (file)
 #define PCI_DEVICE_ID_WINBOND2_89C940  0x0940
 #define PCI_DEVICE_ID_WINBOND2_89C940F 0x5a5a
 
+#define PCI_VENDOR_ID_EFAR             0x1055
+#define PCI_DEVICE_ID_EFAR_SLC90E66_1  0x9130
+#define PCI_DEVICE_ID_EFAR_SLC90E66_0  0x9460
+#define PCI_DEVICE_ID_EFAR_SLC90E66_2  0x9462
+#define PCI_DEVICE_ID_EFAR_SLC90E66_3  0x9463
+
 #define PCI_VENDOR_ID_MOTOROLA         0x1057
 #define PCI_VENDOR_ID_MOTOROLA_OOPS    0x1507
 #define PCI_DEVICE_ID_MOTOROLA_MPC105  0x0001
index 66451acdbf922d0ee698b293f33ede4f24514921..80feae4c7e40307255ec6f124f491ae495bf7dbb 100644 (file)
@@ -35,7 +35,6 @@ void (*kd_mksound)(unsigned int hz, unsigned int ticks);
 /* console.c */
 
 struct console_font_op;
-struct consw;
 
 int vc_allocate(unsigned int console);
 int vc_cons_allocated(unsigned int console);
index 9e7c078890d18185207a2f454728d41256fbae0a..aabaea5882776a52a4119288935a8a383412263f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  linux/zorro.h -- Amiga AutoConfig (Zorro) Bus Definitions
  *
- *  Copyright (C) 1995-2000 Geert Uytterhoeven
+ *  Copyright (C) 1995--2000 Geert Uytterhoeven
  *
  *  This file is subject to the terms and conditions of the GNU General Public
  *  License.  See the file COPYING in the main directory of this archive
@@ -14,8 +14,6 @@
 #ifndef __ASSEMBLY__
 
     /*
-     *  Known Zorro Boards
-     *
      *  Each Zorro board has a 32-bit ID of the form
      *
      *      mmmmmmmmmmmmmmmmppppppppeeeeeeee
@@ -41,551 +39,8 @@ typedef __u32 zorro_id;
 
 #define ZORRO_WILDCARD         (0xffffffff)    /* not official */
 
-
-#define ZORRO_MANUF_PACIFIC_PERIPHERALS                                0x00D3
-#define  ZORRO_PROD_PACIFIC_PERIPHERALS_SE_2000_A500           ZORRO_ID(PACIFIC_PERIPHERALS, 0x00, 0)
-#define  ZORRO_PROD_PACIFIC_PERIPHERALS_SCSI                   ZORRO_ID(PACIFIC_PERIPHERALS, 0x0A, 0)
-
-#define ZORRO_MANUF_MACROSYSTEMS_USA_2                         0x0100
-#define  ZORRO_PROD_MACROSYSTEMS_WARP_ENGINE                   ZORRO_ID(MACROSYSTEMS_USA_2, 0x13, 0)
-
-#define ZORRO_MANUF_KUPKE_1                                    0x00DD
-#define  ZORRO_PROD_KUPKE_GOLEM_RAM_BOX_2MB                    ZORRO_ID(KUPKE_1, 0x00, 0)
-
-#define ZORRO_MANUF_MEMPHIS                                    0x0100
-#define  ZORRO_PROD_MEMPHIS_STORMBRINGER                       ZORRO_ID(MEMPHIS, 0x00, 0)
-
-#define ZORRO_MANUF_3_STATE                                    0x0200
-#define  ZORRO_PROD_3_STATE_MEGAMIX_2000                       ZORRO_ID(3_STATE, 0x02, 0)
-
-#define ZORRO_MANUF_COMMODORE_BRAUNSCHWEIG                     0x0201
-#define  ZORRO_PROD_CBM_A2088_A2286                            ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x01, 0)
-#define  ZORRO_PROD_CBM_A2286                                  ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x02, 0)
-#define  ZORRO_PROD_CBM_A4091_1                                        ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x54, 0)
-#define  ZORRO_PROD_CBM_A2386SX_1                              ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x67, 0)
-
-#define ZORRO_MANUF_COMMODORE_WEST_CHESTER_1                   0x0202
-#define  ZORRO_PROD_CBM_A2090A                                 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x01, 0)
-#define  ZORRO_PROD_CBM_A590_A2091_1                           ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x02, 0)
-#define  ZORRO_PROD_CBM_A590_A2091_2                           ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x03, 0)
-#define  ZORRO_PROD_CBM_A2090B                                 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x04, 0)
-#define  ZORRO_PROD_CBM_A2060                                  ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x09, 0)
-#define  ZORRO_PROD_CBM_A590_A2052_A2058_A2091                 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x0A, 0)
-#define  ZORRO_PROD_CBM_A560_RAM                               ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x20, 0)
-#define  ZORRO_PROD_CBM_A2232_PROTOTYPE                                ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x45, 0)
-#define  ZORRO_PROD_CBM_A2232                                  ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x46, 0)
-#define  ZORRO_PROD_CBM_A2620                                  ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x50, 0)
-#define  ZORRO_PROD_CBM_A2630                                  ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x51, 0)
-#define  ZORRO_PROD_CBM_A4091_2                                        ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x54, 0)
-#define  ZORRO_PROD_CBM_A2065_1                                        ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x5A, 0)
-#define  ZORRO_PROD_CBM_ROMULATOR                              ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x60, 0)
-#define  ZORRO_PROD_CBM_A3000_TEST_FIXTURE                     ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x61, 0)
-#define  ZORRO_PROD_CBM_A2386SX_2                              ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x67, 0)
-#define  ZORRO_PROD_CBM_A2065_2                                        ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x70, 0)
-
-#define ZORRO_MANUF_COMMODORE_WEST_CHESTER_2                   0x0203
-#define  ZORRO_PROD_CBM_A2090A_CM                              ZORRO_ID(COMMODORE_WEST_CHESTER_2, 0x03, 0)
-
-#define ZORRO_MANUF_PROGRESSIVE_PERIPHERALS_AND_SYSTEMS_2      0x02F4
-#define  ZORRO_PROD_PPS_EXP8000                                        ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS_2, 0x02, 0)
-
-#define ZORRO_MANUF_KOLFF_COMPUTER_SUPPLIES                    0x02FF
-#define  ZORRO_PROD_KCS_POWER_PC_BOARD                         ZORRO_ID(KOLFF_COMPUTER_SUPPLIES, 0x00, 0)
-
-#define ZORRO_MANUF_CARDCO_1                                   0x03EC
-#define  ZORRO_PROD_CARDCO_KRONOS_2000_1                       ZORRO_ID(CARDCO_1, 0x04, 0)
-#define  ZORRO_PROD_CARDCO_A1000_1                             ZORRO_ID(CARDCO_1, 0x0C, 0)
-#define  ZORRO_PROD_CARDCO_ESCORT                              ZORRO_ID(CARDCO_1, 0x0E, 0)
-#define  ZORRO_PROD_CARDCO_A2410                               ZORRO_ID(CARDCO_1, 0xF5, 0)
-
-#define ZORRO_MANUF_A_SQUARED                                  0x03ED
-#define  ZORRO_PROD_A_SQUARED_LIVE_2000                                ZORRO_ID(A_SQUARED, 0x01, 0)
-
-#define ZORRO_MANUF_COMSPEC_COMMUNICATIONS                     0x03EE
-#define  ZORRO_PROD_COMSPEC_COMMUNICATIONS_AX2000              ZORRO_ID(COMSPEC_COMMUNICATIONS, 0x01, 0)
-
-#define ZORRO_MANUF_ANAKIN_RESEARCH                            0x03F1
-#define  ZORRO_PROD_ANAKIN_RESEARCH_EASYL                      ZORRO_ID(ANAKIN_RESEARCH, 0x01, 0)
-
-#define ZORRO_MANUF_MICROBOTICS                                        0x03F2
-#define  ZORRO_PROD_MICROBOTICS_STARBOARD_II                   ZORRO_ID(MICROBOTICS, 0x00, 0)
-#define  ZORRO_PROD_MICROBOTICS_STARDRIVE                      ZORRO_ID(MICROBOTICS, 0x02, 0)
-#define  ZORRO_PROD_MICROBOTICS_8_UP_A                         ZORRO_ID(MICROBOTICS, 0x03, 0)
-#define  ZORRO_PROD_MICROBOTICS_8_UP_Z                         ZORRO_ID(MICROBOTICS, 0x04, 0)
-#define  ZORRO_PROD_MICROBOTICS_DELTA_RAM                      ZORRO_ID(MICROBOTICS, 0x20, 0)
-#define  ZORRO_PROD_MICROBOTICS_8_STAR_RAM                     ZORRO_ID(MICROBOTICS, 0x40, 0)
-#define  ZORRO_PROD_MICROBOTICS_8_STAR                         ZORRO_ID(MICROBOTICS, 0x41, 0)
-#define  ZORRO_PROD_MICROBOTICS_VXL_RAM_32                     ZORRO_ID(MICROBOTICS, 0x44, 0)
-#define  ZORRO_PROD_MICROBOTICS_VXL_68030                      ZORRO_ID(MICROBOTICS, 0x45, 0)
-#define  ZORRO_PROD_MICROBOTICS_DELTA                          ZORRO_ID(MICROBOTICS, 0x60, 0)
-#define  ZORRO_PROD_MICROBOTICS_MBX_1200_1200Z_RAM             ZORRO_ID(MICROBOTICS, 0x81, 0)
-#define  ZORRO_PROD_MICROBOTICS_HARDFRAME_2000_1               ZORRO_ID(MICROBOTICS, 0x96, 0)
-#define  ZORRO_PROD_MICROBOTICS_HARDFRAME_2000_2               ZORRO_ID(MICROBOTICS, 0x9E, 0)
-#define  ZORRO_PROD_MICROBOTICS_MBX_1200_1200Z                 ZORRO_ID(MICROBOTICS, 0xC1, 0)
-
-#define ZORRO_MANUF_ACCESS_ASSOCIATES_ALEGRA                   0x03F4
-
-#define ZORRO_MANUF_EXPANSION_TECHNOLOGIES                     0x03F6
-
-#define ZORRO_MANUF_ASDG                                       0x03FF
-#define  ZORRO_PROD_ASDG_MEMORY_1                              ZORRO_ID(ASDG, 0x01, 0)
-#define  ZORRO_PROD_ASDG_MEMORY_2                              ZORRO_ID(ASDG, 0x02, 0)
-#define  ZORRO_PROD_ASDG_EB920_LAN_ROVER                       ZORRO_ID(ASDG, 0xFE, 0)
-#define  ZORRO_PROD_ASDG_GPIB_DUALIEEE488_TWIN_X               ZORRO_ID(ASDG, 0xFF, 0)
-
-#define ZORRO_MANUF_IMTRONICS_1                                        0x0404
-#define  ZORRO_PROD_IMTRONICS_HURRICANE_2800_1                 ZORRO_ID(IMTRONICS_1, 0x39, 0)
-#define  ZORRO_PROD_IMTRONICS_HURRICANE_2800_2                 ZORRO_ID(IMTRONICS_1, 0x57, 0)
-
-#define ZORRO_MANUF_CBM_UNIVERSITY_OF_LOWELL                   0x0406
-#define  ZORRO_PROD_CBM_A2410                                  ZORRO_ID(CBM_UNIVERSITY_OF_LOWELL, 0x00, 0)
-
-#define ZORRO_MANUF_AMERISTAR                                  0x041D
-#define  ZORRO_PROD_AMERISTAR_A2065                            ZORRO_ID(AMERISTAR, 0x01, 0)
-#define  ZORRO_PROD_AMERISTAR_A560                             ZORRO_ID(AMERISTAR, 0x09, 0)
-#define  ZORRO_PROD_AMERISTAR_A4066                            ZORRO_ID(AMERISTAR, 0x0A, 0)
-
-#define ZORRO_MANUF_SUPRA                                      0x0420
-#define  ZORRO_PROD_SUPRA_SUPRADRIVE_4x4                       ZORRO_ID(SUPRA, 0x01, 0)
-#define  ZORRO_PROD_SUPRA_1000_RAM                             ZORRO_ID(SUPRA, 0x02, 0)
-#define  ZORRO_PROD_SUPRA_2000_DMA                             ZORRO_ID(SUPRA, 0x03, 0)
-#define  ZORRO_PROD_SUPRA_500                                  ZORRO_ID(SUPRA, 0x05, 0)
-#define  ZORRO_PROD_SUPRA_500_SCSI                             ZORRO_ID(SUPRA, 0x08, 0)
-#define  ZORRO_PROD_SUPRA_500XP_2000_RAM                       ZORRO_ID(SUPRA, 0x09, 0)
-#define  ZORRO_PROD_SUPRA_500RX_2000_RAM                       ZORRO_ID(SUPRA, 0x0A, 0)
-#define  ZORRO_PROD_SUPRA_2400ZI                               ZORRO_ID(SUPRA, 0x0B, 0)
-#define  ZORRO_PROD_SUPRA_500XP_SUPRADRIVE_WORDSYNC            ZORRO_ID(SUPRA, 0x0C, 0)
-#define  ZORRO_PROD_SUPRA_SUPRADRIVE_WORDSYNC_II               ZORRO_ID(SUPRA, 0x0D, 0)
-#define  ZORRO_PROD_SUPRA_2400ZIPLUS                           ZORRO_ID(SUPRA, 0x10, 0)
-
-#define ZORRO_MANUF_COMPUTER_SYSTEMS_ASSOCIATES                        0x0422
-#define  ZORRO_PROD_CSA_MAGNUM                                 ZORRO_ID(COMPUTER_SYSTEMS_ASSOCIATES, 0x11, 0)
-#define  ZORRO_PROD_CSA_12_GAUGE                               ZORRO_ID(COMPUTER_SYSTEMS_ASSOCIATES, 0x15, 0)
-
-#define ZORRO_MANUF_MARC_MICHAEL_GROTH                         0x0439
-
-#define ZORRO_MANUF_M_TECH                                     0x0502
-#define  ZORRO_PROD_MTEC_AT500_1                               ZORRO_ID(M_TECH, 0x03, 0)
-
-#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_1                    0x06E1
-#define  ZORRO_PROD_GVP_IMPACT_SERIES_I                                ZORRO_ID(GREAT_VALLEY_PRODUCTS_1, 0x08, 0)
-
-#define ZORRO_MANUF_BYTEBOX                                    0x07DA
-#define  ZORRO_PROD_BYTEBOX_A500                               ZORRO_ID(BYTEBOX, 0x00, 0)
-
-#define ZORRO_MANUF_DKB_POWER_COMPUTING                                0x07DC
-#define  ZORRO_PROD_DKB_POWER_COMPUTING_SECUREKEY              ZORRO_ID(DKB_POWER_COMPUTING, 0x09, 0)
-#define  ZORRO_PROD_DKB_POWER_COMPUTING_DKM_3128               ZORRO_ID(DKB_POWER_COMPUTING, 0x0E, 0)
-#define  ZORRO_PROD_DKB_POWER_COMPUTING_RAPID_FIRE             ZORRO_ID(DKB_POWER_COMPUTING, 0x0F, 0)
-#define  ZORRO_PROD_DKB_POWER_COMPUTING_DKM_1202               ZORRO_ID(DKB_POWER_COMPUTING, 0x10, 0)
-#define  ZORRO_PROD_DKB_POWER_COMPUTING_COBRA_VIPER_II_68EC030 ZORRO_ID(DKB_POWER_COMPUTING, 0x12, 0)
-#define  ZORRO_PROD_DKB_POWER_COMPUTING_WILDFIRE_060_1         ZORRO_ID(DKB_POWER_COMPUTING, 0x17, 0)
-#define  ZORRO_PROD_DKB_POWER_COMPUTING_WILDFIRE_060_2         ZORRO_ID(DKB_POWER_COMPUTING, 0xFF, 0)
-
-#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_2                    0x07E1
-#define  ZORRO_PROD_GVP_IMPACT_SERIES_I_4K                     ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x01, 0)
-#define  ZORRO_PROD_GVP_IMPACT_SERIES_I_16K_2                  ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x02, 0)
-#define  ZORRO_PROD_GVP_IMPACT_SERIES_I_16K_3                  ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x03, 0)
-#define  ZORRO_PROD_GVP_IMPACT_3001_IDE_1                      ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x08, 0)
-#define  ZORRO_PROD_GVP_IMPACT_3001_RAM                                ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x09, 0)
-#define  ZORRO_PROD_GVP_IMPACT_SERIES_II_RAM_1                 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0A, 0)
-#define  ZORRO_PROD_GVP_EPC_BASE                               ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0)
-#define  ZORRO_PROD_GVP_GFORCE_040_1                           ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x20)
-#define  ZORRO_PROD_GVP_GFORCE_040_SCSI_1                      ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x30)
-#define  ZORRO_PROD_GVP_A1291                                  ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x40)
-#define  ZORRO_PROD_GVP_COMBO_030_R4                           ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x60)
-#define  ZORRO_PROD_GVP_COMBO_030_R4_SCSI                      ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x70)
-#define  ZORRO_PROD_GVP_PHONEPAK                               ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x78)
-#define  ZORRO_PROD_GVP_IO_EXTENDER                            ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x98)
-#define  ZORRO_PROD_GVP_GFORCE_030                             ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xa0)
-#define  ZORRO_PROD_GVP_GFORCE_030_SCSI                                ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xb0)
-#define  ZORRO_PROD_GVP_A530                                   ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xc0)
-#define  ZORRO_PROD_GVP_A530_SCSI                              ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xd0)
-#define  ZORRO_PROD_GVP_COMBO_030_R3                           ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xe0)
-#define  ZORRO_PROD_GVP_COMBO_030_R3_SCSI                      ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xf0)
-#define  ZORRO_PROD_GVP_SERIES_II                              ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xf8)
-#define  ZORRO_PROD_GVP_IMPACT_3001_IDE_2                      ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0D, 0)
-/*#define  ZORRO_PROD_GVP_A2000_030                            ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0D, 0)*/
-/*#define  ZORRO_PROD_GVP_GFORCE_040_SCSI_2                    ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0D, 0)*/
-#define  ZORRO_PROD_GVP_GFORCE_040_060                         ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x16, 0)
-#define  ZORRO_PROD_GVP_IMPACT_VISION_24                       ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x20, 0)
-#define  ZORRO_PROD_GVP_GFORCE_040_2                           ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0xFF, 0)
-
-#define ZORRO_MANUF_CALIFORNIA_ACCESS_SYNERGY                  0x07E5
-#define  ZORRO_PROD_CALIFORNIA_ACCESS_SYNERGY_MALIBU           ZORRO_ID(CALIFORNIA_ACCESS_SYNERGY, 0x01, 0)
-
-#define ZORRO_MANUF_XETEC                                      0x07E6
-#define  ZORRO_PROD_XETEC_FASTCARD                             ZORRO_ID(XETEC, 0x01, 0)
-#define  ZORRO_PROD_XETEC_FASTCARD_RAM                         ZORRO_ID(XETEC, 0x02, 0)
-#define  ZORRO_PROD_XETEC_FASTCARD_PLUS                                ZORRO_ID(XETEC, 0x03, 0)
-
-#define ZORRO_MANUF_PROGRESSIVE_PERIPHERALS_AND_SYSTEMS                0x07EA
-#define  ZORRO_PROD_PPS_MERCURY                                        ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x00, 0)
-#define  ZORRO_PROD_PPS_A3000_68040                            ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x01, 0)
-#define  ZORRO_PROD_PPS_A2000_68040                            ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x69, 0)
-#define  ZORRO_PROD_PPS_ZEUS                                   ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x96, 0)
-#define  ZORRO_PROD_PPS_A500_68040                             ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0xBB, 0)
-
-#define ZORRO_MANUF_XEBEC                                      0x07EC
-
-#define ZORRO_MANUF_SPIRIT_TECHNOLOGY                          0x07F2
-#define  ZORRO_PROD_SPIRIT_TECHNOLOGY_INSIDER_IN1000           ZORRO_ID(SPIRIT_TECHNOLOGY, 0x01, 0)
-#define  ZORRO_PROD_SPIRIT_TECHNOLOGY_INSIDER_IN500            ZORRO_ID(SPIRIT_TECHNOLOGY, 0x02, 0)
-#define  ZORRO_PROD_SPIRIT_TECHNOLOGY_SIN500                   ZORRO_ID(SPIRIT_TECHNOLOGY, 0x03, 0)
-#define  ZORRO_PROD_SPIRIT_TECHNOLOGY_HDA_506                  ZORRO_ID(SPIRIT_TECHNOLOGY, 0x04, 0)
-#define  ZORRO_PROD_SPIRIT_TECHNOLOGY_AX_S                     ZORRO_ID(SPIRIT_TECHNOLOGY, 0x05, 0)
-#define  ZORRO_PROD_SPIRIT_TECHNOLOGY_OCTABYTE                 ZORRO_ID(SPIRIT_TECHNOLOGY, 0x06, 0)
-#define  ZORRO_PROD_SPIRIT_TECHNOLOGY_INMATE                   ZORRO_ID(SPIRIT_TECHNOLOGY, 0x08, 0)
-
-#define ZORRO_MANUF_SPIRIT_TECHNOLOGY_2                                0x07F3
-
-#define ZORRO_MANUF_BSC_ALFADATA_1                             0x07FE
-#define  ZORRO_PROD_BSC_ALF_3_1                                        ZORRO_ID(BSC_ALFADATA_1, 0x03, 0)
-
-#define ZORRO_MANUF_BSC_ALFADATA_2                             0x0801
-#define  ZORRO_PROD_BSC_ALF_2_1                                        ZORRO_ID(BSC_ALFADATA_2, 0x01, 0)
-#define  ZORRO_PROD_BSC_ALF_2_2                                        ZORRO_ID(BSC_ALFADATA_2, 0x02, 0)
-#define  ZORRO_PROD_BSC_ALF_3_2                                        ZORRO_ID(BSC_ALFADATA_2, 0x03, 0)
-
-#define ZORRO_MANUF_CARDCO_2                                   0x0802
-#define  ZORRO_PROD_CARDCO_KRONOS_2000_2                       ZORRO_ID(CARDCO_2, 0x04, 0)
-#define  ZORRO_PROD_CARDCO_A1000_2                             ZORRO_ID(CARDCO_2, 0x0C, 0)
-
-#define ZORRO_MANUF_JOCHHEIM                                   0x0804
-#define  ZORRO_PROD_JOCHHEIM_RAM                               ZORRO_ID(JOCHHEIM, 0x01, 0)
-
-#define ZORRO_MANUF_CHECKPOINT_TECHNOLOGIES                    0x0807
-#define  ZORRO_PROD_CHECKPOINT_TECHNOLOGIES_SERIAL_SOLUTION    ZORRO_ID(CHECKPOINT_TECHNOLOGIES, 0x00, 0)
-
-#define ZORRO_MANUF_EDOTRONIK                                  0x0810
-#define  ZORRO_PROD_EDOTRONIK_IEEE_488                         ZORRO_ID(EDOTRONIK, 0x01, 0)
-#define  ZORRO_PROD_EDOTRONIK_8032                             ZORRO_ID(EDOTRONIK, 0x02, 0)
-#define  ZORRO_PROD_EDOTRONIK_MULTISERIAL                      ZORRO_ID(EDOTRONIK, 0x03, 0)
-#define  ZORRO_PROD_EDOTRONIK_VIDEODIGITIZER                   ZORRO_ID(EDOTRONIK, 0x04, 0)
-#define  ZORRO_PROD_EDOTRONIK_PARALLEL_IO                      ZORRO_ID(EDOTRONIK, 0x05, 0)
-#define  ZORRO_PROD_EDOTRONIK_PIC_PROTOYPING                   ZORRO_ID(EDOTRONIK, 0x06, 0)
-#define  ZORRO_PROD_EDOTRONIK_ADC                              ZORRO_ID(EDOTRONIK, 0x07, 0)
-#define  ZORRO_PROD_EDOTRONIK_VME                              ZORRO_ID(EDOTRONIK, 0x08, 0)
-#define  ZORRO_PROD_EDOTRONIK_DSP96000                         ZORRO_ID(EDOTRONIK, 0x09, 0)
-
-#define ZORRO_MANUF_NES_INC                                    0x0813
-#define  ZORRO_PROD_NES_INC_RAM                                        ZORRO_ID(NES_INC, 0x00, 0)
-
-#define ZORRO_MANUF_ICD                                                0x0817
-#define  ZORRO_PROD_ICD_ADVANTAGE_2000_SCSI                    ZORRO_ID(ICD, 0x01, 0)
-#define  ZORRO_PROD_ICD_ADVANTAGE_IDE                          ZORRO_ID(ICD, 0x03, 0)
-#define  ZORRO_PROD_ICD_ADVANTAGE_2080_RAM                     ZORRO_ID(ICD, 0x04, 0)
-
-#define ZORRO_MANUF_KUPKE_2                                    0x0819
-#define  ZORRO_PROD_KUPKE_OMTI                                 ZORRO_ID(KUPKE_2, 0x01, 0)
-#define  ZORRO_PROD_KUPKE_SCSI_II                              ZORRO_ID(KUPKE_2, 0x02, 0)
-#define  ZORRO_PROD_KUPKE_GOLEM_BOX                            ZORRO_ID(KUPKE_2, 0x03, 0)
-#define  ZORRO_PROD_KUPKE_030_882                              ZORRO_ID(KUPKE_2, 0x04, 0)
-#define  ZORRO_PROD_KUPKE_SCSI_AT                              ZORRO_ID(KUPKE_2, 0x05, 0)
-
-#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_3                    0x081D
-#define  ZORRO_PROD_GVP_A2000_RAM8                             ZORRO_ID(GREAT_VALLEY_PRODUCTS_3, 0x09, 0)
-#define  ZORRO_PROD_GVP_IMPACT_SERIES_II_RAM_2                 ZORRO_ID(GREAT_VALLEY_PRODUCTS_3, 0x0A, 0)
-
-#define ZORRO_MANUF_INTERWORKS_NETWORK                         0x081E
-
-#define ZORRO_MANUF_HARDITAL_SYNTHESIS                         0x0820
-#define  ZORRO_PROD_HARDITAL_SYNTHESIS_TQM_68030_68882         ZORRO_ID(HARDITAL_SYNTHESIS, 0x14, 0)
-
-#define ZORRO_MANUF_APPLIED_ENGINEERING                                0x0828
-#define  ZORRO_PROD_APPLIED_ENGINEERING_DL2000                 ZORRO_ID(APPLIED_ENGINEERING, 0x10, 0)
-#define  ZORRO_PROD_APPLIED_ENGINEERING_RAM_WORKS              ZORRO_ID(APPLIED_ENGINEERING, 0xE0, 0)
-
-#define ZORRO_MANUF_BSC_ALFADATA_3                             0x082C
-#define  ZORRO_PROD_BSC_OKTAGON_2008                           ZORRO_ID(BSC_ALFADATA_3, 0x05, 0)
-#define  ZORRO_PROD_BSC_TANDEM_AT_2008_508                     ZORRO_ID(BSC_ALFADATA_3, 0x06, 0)
-#define  ZORRO_PROD_BSC_ALFA_RAM_1200                          ZORRO_ID(BSC_ALFADATA_3, 0x07, 0)
-#define  ZORRO_PROD_BSC_OKTAGON_2008_RAM                       ZORRO_ID(BSC_ALFADATA_3, 0x08, 0)
-#define  ZORRO_PROD_BSC_MULTIFACE_I                            ZORRO_ID(BSC_ALFADATA_3, 0x10, 0)
-#define  ZORRO_PROD_BSC_MULTIFACE_II                           ZORRO_ID(BSC_ALFADATA_3, 0x11, 0)
-#define  ZORRO_PROD_BSC_MULTIFACE_III                          ZORRO_ID(BSC_ALFADATA_3, 0x12, 0)
-#define  ZORRO_PROD_BSC_FRAMEMASTER_II                         ZORRO_ID(BSC_ALFADATA_3, 0x20, 0)
-#define  ZORRO_PROD_BSC_GRAFFITI_RAM                           ZORRO_ID(BSC_ALFADATA_3, 0x21, 0)
-#define  ZORRO_PROD_BSC_GRAFFITI_REG                           ZORRO_ID(BSC_ALFADATA_3, 0x22, 0)
-#define  ZORRO_PROD_BSC_ISDN_MASTERCARD                                ZORRO_ID(BSC_ALFADATA_3, 0x40, 0)
-#define  ZORRO_PROD_BSC_ISDN_MASTERCARD_II                     ZORRO_ID(BSC_ALFADATA_3, 0x41, 0)
-
-#define ZORRO_MANUF_PHOENIX                                    0x0835
-#define  ZORRO_PROD_PHOENIX_ST506                              ZORRO_ID(PHOENIX, 0x21, 0)
-#define  ZORRO_PROD_PHOENIX_SCSI                               ZORRO_ID(PHOENIX, 0x22, 0)
-#define  ZORRO_PROD_PHOENIX_RAM                                        ZORRO_ID(PHOENIX, 0xBE, 0)
-
-#define ZORRO_MANUF_ADVANCED_STORAGE_SYSTEMS                   0x0836
-#define  ZORRO_PROD_ADVANCED_STORAGE_SYSTEMS_NEXUS             ZORRO_ID(ADVANCED_STORAGE_SYSTEMS, 0x01, 0)
-#define  ZORRO_PROD_ADVANCED_STORAGE_SYSTEMS_NEXUS_RAM         ZORRO_ID(ADVANCED_STORAGE_SYSTEMS, 0x08, 0)
-
-#define ZORRO_MANUF_IMPULSE                                    0x0838
-#define  ZORRO_PROD_IMPULSE_FIRECRACKER_24                     ZORRO_ID(IMPULSE, 0x00, 0)
-
-#define ZORRO_MANUF_IVS                                                0x0840
-#define  ZORRO_PROD_IVS_GRANDSLAM_PIC_2                                ZORRO_ID(IVS, 0x02, 0)
-#define  ZORRO_PROD_IVS_GRANDSLAM_PIC_1                                ZORRO_ID(IVS, 0x04, 0)
-#define  ZORRO_PROD_IVS_OVERDRIVE                              ZORRO_ID(IVS, 0x10, 0)
-#define  ZORRO_PROD_IVS_TRUMPCARD_CLASSIC                      ZORRO_ID(IVS, 0x30, 0)
-#define  ZORRO_PROD_IVS_TRUMPCARD_PRO_GRANDSLAM                        ZORRO_ID(IVS, 0x34, 0)
-#define  ZORRO_PROD_IVS_META_4                                 ZORRO_ID(IVS, 0x40, 0)
-#define  ZORRO_PROD_IVS_WAVETOOLS                              ZORRO_ID(IVS, 0xBF, 0)
-#define  ZORRO_PROD_IVS_VECTOR_1                               ZORRO_ID(IVS, 0xF3, 0)
-#define  ZORRO_PROD_IVS_VECTOR_2                               ZORRO_ID(IVS, 0xF4, 0)
-
-#define ZORRO_MANUF_VECTOR_1                                   0x0841
-#define  ZORRO_PROD_VECTOR_CONNECTION_1                                ZORRO_ID(VECTOR_1, 0xE3, 0)
-
-#define ZORRO_MANUF_XPERT_PRODEV                               0x0845
-#define  ZORRO_PROD_XPERT_PRODEV_VISIONA_RAM                   ZORRO_ID(XPERT_PRODEV, 0x01, 0)
-#define  ZORRO_PROD_XPERT_PRODEV_VISIONA_REG                   ZORRO_ID(XPERT_PRODEV, 0x02, 0)
-#define  ZORRO_PROD_XPERT_PRODEV_MERLIN_RAM                    ZORRO_ID(XPERT_PRODEV, 0x03, 0)
-#define  ZORRO_PROD_XPERT_PRODEV_MERLIN_REG_1                  ZORRO_ID(XPERT_PRODEV, 0x04, 0)
-#define  ZORRO_PROD_XPERT_PRODEV_MERLIN_REG_2                  ZORRO_ID(XPERT_PRODEV, 0xC9, 0)
-
-#define ZORRO_MANUF_HYDRA_SYSTEMS                              0x0849
-#define  ZORRO_PROD_HYDRA_SYSTEMS_AMIGANET                     ZORRO_ID(HYDRA_SYSTEMS, 0x01, 0)
-
-#define ZORRO_MANUF_SUNRIZE_INDUSTRIES                         0x084F
-#define  ZORRO_PROD_SUNRIZE_INDUSTRIES_AD1012                  ZORRO_ID(SUNRIZE_INDUSTRIES, 0x01, 0)
-#define  ZORRO_PROD_SUNRIZE_INDUSTRIES_AD516                   ZORRO_ID(SUNRIZE_INDUSTRIES, 0x02, 0)
-#define  ZORRO_PROD_SUNRIZE_INDUSTRIES_DD512                   ZORRO_ID(SUNRIZE_INDUSTRIES, 0x03, 0)
-
-#define ZORRO_MANUF_TRICERATOPS                                        0x0850
-#define  ZORRO_PROD_TRICERATOPS_MULTI_IO                       ZORRO_ID(TRICERATOPS, 0x01, 0)
-
-#define ZORRO_MANUF_APPLIED_MAGIC                              0x0851
-#define  ZORRO_PROD_APPLIED_MAGIC_DMI_RESOLVER                 ZORRO_ID(APPLIED_MAGIC, 0x01, 0)
-#define  ZORRO_PROD_APPLIED_MAGIC_DIGITAL_BROADCASTER          ZORRO_ID(APPLIED_MAGIC, 0x06, 0)
-
-#define ZORRO_MANUF_GFX_BASE                                   0x085E
-#define  ZORRO_PROD_GFX_BASE_GDA_1_VRAM                                ZORRO_ID(GFX_BASE, 0x00, 0)
-#define  ZORRO_PROD_GFX_BASE_GDA_1                             ZORRO_ID(GFX_BASE, 0x01, 0)
-
-#define ZORRO_MANUF_ROCTEC                                     0x0860
-#define  ZORRO_PROD_ROCTEC_RH_800C                             ZORRO_ID(ROCTEC, 0x01, 0)
-#define  ZORRO_PROD_ROCTEC_RH_800C_RAM                         ZORRO_ID(ROCTEC, 0x01, 0)
-
-#define ZORRO_MANUF_KATO                                       0x0861
-#define  ZORRO_PROD_KATO_MELODY                                        ZORRO_ID(KATO, 0x80, 0)
-/* ID clash!! */
-#define ZORRO_MANUF_HELFRICH_1                                 0x0861
-#define  ZORRO_PROD_HELFRICH_RAINBOW_II                                ZORRO_ID(HELFRICH_1, 0x20, 0)
-#define  ZORRO_PROD_HELFRICH_RAINBOW_III                       ZORRO_ID(HELFRICH_1, 0x21, 0)
-
-#define ZORRO_MANUF_ATLANTIS                                   0x0862
-
-#define ZORRO_MANUF_PROTAR                                     0x0864
-
-#define ZORRO_MANUF_ACS                                                0x0865
-
-#define ZORRO_MANUF_SOFTWARE_RESULTS_ENTERPRISES               0x0866
-#define  ZORRO_PROD_SOFTWARE_RESULTS_ENTERPRISES_GOLDEN_GATE_2_BUS_PLUS        ZORRO_ID(SOFTWARE_RESULTS_ENTERPRISES, 0x01, 0)
-
-#define ZORRO_MANUF_MASOBOSHI                                  0x086D
-#define  ZORRO_PROD_MASOBOSHI_MASTER_CARD_SC201                        ZORRO_ID(MASOBOSHI, 0x03, 0)
-#define  ZORRO_PROD_MASOBOSHI_MASTER_CARD_MC702                        ZORRO_ID(MASOBOSHI, 0x04, 0)
-#define  ZORRO_PROD_MASOBOSHI_MVD_819                          ZORRO_ID(MASOBOSHI, 0x07, 0)
-
-#define ZORRO_MANUF_MAINHATTAN_DATA                            0x086F
-#define  ZORRO_PROD_MAINHATTAN_DATA_IDE                                ZORRO_ID(MAINHATTAN_DATA, 0x01, 0)
-
-#define ZORRO_MANUF_VILLAGE_TRONIC                             0x0877
-#define  ZORRO_PROD_VILLAGE_TRONIC_DOMINO_RAM                  ZORRO_ID(VILLAGE_TRONIC, 0x01, 0)
-#define  ZORRO_PROD_VILLAGE_TRONIC_DOMINO_REG                  ZORRO_ID(VILLAGE_TRONIC, 0x02, 0)
-#define  ZORRO_PROD_VILLAGE_TRONIC_DOMINO_16M_PROTOTYPE                ZORRO_ID(VILLAGE_TRONIC, 0x03, 0)
-#define  ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_RAM      ZORRO_ID(VILLAGE_TRONIC, 0x0B, 0)
-#define  ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_REG      ZORRO_ID(VILLAGE_TRONIC, 0x0C, 0)
-#define  ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_SEGMENTED_MODE   ZORRO_ID(VILLAGE_TRONIC, 0x0D, 0)
-#define  ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_MEM1          ZORRO_ID(VILLAGE_TRONIC, 0x15, 0)
-#define  ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_MEM2          ZORRO_ID(VILLAGE_TRONIC, 0x16, 0)
-#define  ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_REG           ZORRO_ID(VILLAGE_TRONIC, 0x17, 0)
-#define  ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z3               ZORRO_ID(VILLAGE_TRONIC, 0x18, 0)
-#define  ZORRO_PROD_VILLAGE_TRONIC_ARIADNE                     ZORRO_ID(VILLAGE_TRONIC, 0xC9, 0)
-#define  ZORRO_PROD_VILLAGE_TRONIC_ARIADNE2                    ZORRO_ID(VILLAGE_TRONIC, 0xCA, 0)
-
-#define ZORRO_MANUF_UTILITIES_UNLIMITED                                0x087B
-#define  ZORRO_PROD_UTILITIES_UNLIMITED_EMPLANT_DELUXE         ZORRO_ID(UTILITIES_UNLIMITED, 0x15, 0)
-#define  ZORRO_PROD_UTILITIES_UNLIMITED_EMPLANT_DELUXE2                ZORRO_ID(UTILITIES_UNLIMITED, 0x20, 0)
-
-#define ZORRO_MANUF_AMITRIX                                    0x0880
-#define  ZORRO_PROD_AMITRIX_MULTI_IO                           ZORRO_ID(AMITRIX, 0x01, 0)
-#define  ZORRO_PROD_AMITRIX_CD_RAM                             ZORRO_ID(AMITRIX, 0x02, 0)
-
-#define ZORRO_MANUF_ARMAX                                      0x0885
-#define  ZORRO_PROD_ARMAX_OMNIBUS                              ZORRO_ID(ARMAX, 0x00, 0)
-
-#define ZORRO_MANUF_ZEUS                                       0x088D
-#define  ZORRO_PROD_ZEUS_SPIDER                                        ZORRO_ID(ZEUS, 0x04, 0)
-
-#define ZORRO_MANUF_NEWTEK                                     0x088F
-#define  ZORRO_PROD_NEWTEK_VIDEOTOASTER                                ZORRO_ID(NEWTEK, 0x00, 0)
-
-#define ZORRO_MANUF_M_TECH_GERMANY                             0x0890
-#define  ZORRO_PROD_MTEC_AT500_2                               ZORRO_ID(M_TECH_GERMANY, 0x01, 0)
-#define  ZORRO_PROD_MTEC_68030                                 ZORRO_ID(M_TECH_GERMANY, 0x03, 0)
-#define  ZORRO_PROD_MTEC_68020I                                        ZORRO_ID(M_TECH_GERMANY, 0x06, 0)
-#define  ZORRO_PROD_MTEC_A1200_T68030_RTC                      ZORRO_ID(M_TECH_GERMANY, 0x20, 0)
-#define  ZORRO_PROD_MTEC_VIPER_MK_V_E_MATRIX_530               ZORRO_ID(M_TECH_GERMANY, 0x21, 0)
-#define  ZORRO_PROD_MTEC_8_MB_RAM                              ZORRO_ID(M_TECH_GERMANY, 0x22, 0)
-#define  ZORRO_PROD_MTEC_VIPER_MK_V_E_MATRIX_530_SCSI_IDE      ZORRO_ID(M_TECH_GERMANY, 0x24, 0)
-
-#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_4                    0x0891
-#define  ZORRO_PROD_GVP_EGS_28_24_SPECTRUM_RAM                 ZORRO_ID(GREAT_VALLEY_PRODUCTS_4, 0x01, 0)
-#define  ZORRO_PROD_GVP_EGS_28_24_SPECTRUM_REG                 ZORRO_ID(GREAT_VALLEY_PRODUCTS_4, 0x02, 0)
-
-#define ZORRO_MANUF_APOLLO_1                                   0x0892
-#define  ZORRO_PROD_APOLLO_A1200                               ZORRO_ID(APOLLO_1, 0x01, 0)
-
-#define ZORRO_MANUF_HELFRICH_2                                 0x0893
-#define  ZORRO_PROD_HELFRICH_PICCOLO_RAM                       ZORRO_ID(HELFRICH_2, 0x05, 0)
-#define  ZORRO_PROD_HELFRICH_PICCOLO_REG                       ZORRO_ID(HELFRICH_2, 0x06, 0)
-#define  ZORRO_PROD_HELFRICH_PEGGY_PLUS_MPEG                   ZORRO_ID(HELFRICH_2, 0x07, 0)
-#define  ZORRO_PROD_HELFRICH_VIDEOCRUNCHER                     ZORRO_ID(HELFRICH_2, 0x08, 0)
-#define  ZORRO_PROD_HELFRICH_SD64_RAM                          ZORRO_ID(HELFRICH_2, 0x0A, 0)
-#define  ZORRO_PROD_HELFRICH_SD64_REG                          ZORRO_ID(HELFRICH_2, 0x0B, 0)
-
-#define ZORRO_MANUF_MACROSYSTEMS_USA                           0x089B
-#define  ZORRO_PROD_MACROSYSTEMS_WARP_ENGINE_40xx              ZORRO_ID(MACROSYSTEMS_USA, 0x13, 0)
-
-#define ZORRO_MANUF_ELBOX_COMPUTER                             0x089E
-#define  ZORRO_PROD_ELBOX_COMPUTER_1200_4                      ZORRO_ID(ELBOX_COMPUTER, 0x06, 0)
-
-#define ZORRO_MANUF_HARMS_PROFESSIONAL                         0x0A00
-#define  ZORRO_PROD_HARMS_PROFESSIONAL_030_PLUS                        ZORRO_ID(HARMS_PROFESSIONAL, 0x10, 0)
-#define  ZORRO_PROD_HARMS_PROFESSIONAL_3500                    ZORRO_ID(HARMS_PROFESSIONAL, 0xD0, 0)
-
-#define ZORRO_MANUF_MICRONIK                                   0x0A50
-#define  ZORRO_PROD_MICRONIK_RCA_120                           ZORRO_ID(MICRONIK, 0x0A, 0)
-
-#define ZORRO_MANUF_MICRONIK2                                  0x0F0F
-#define  ZORRO_PROD_MICRONIK2_Z3I                              ZORRO_ID(MICRONIK2, 0x01, 0)
-
-#define ZORRO_MANUF_MEGAMICRO                                  0x1000
-#define  ZORRO_PROD_MEGAMICRO_SCRAM_500                                ZORRO_ID(MEGAMICRO, 0x03, 0)
-#define  ZORRO_PROD_MEGAMICRO_SCRAM_500_RAM                    ZORRO_ID(MEGAMICRO, 0x04, 0)
-
-#define ZORRO_MANUF_IMTRONICS_2                                        0x1028
-#define  ZORRO_PROD_IMTRONICS_HURRICANE_2800_3                 ZORRO_ID(IMTRONICS_2, 0x39, 0)
-#define  ZORRO_PROD_IMTRONICS_HURRICANE_2800_4                 ZORRO_ID(IMTRONICS_2, 0x57, 0)
-
-/* unofficial ID */
-#define ZORRO_MANUF_INDIVIDUAL_COMPUTERS                       0x1212
-#define  ZORRO_PROD_INDIVIDUAL_COMPUTERS_BUDDHA                        ZORRO_ID(INDIVIDUAL_COMPUTERS, 0x00, 0)
-#define  ZORRO_PROD_INDIVIDUAL_COMPUTERS_CATWEASEL             ZORRO_ID(INDIVIDUAL_COMPUTERS, 0x2A, 0)
-
-#define ZORRO_MANUF_KUPKE_3                                    0x1248
-#define  ZORRO_PROD_KUPKE_GOLEM_HD_3000                                ZORRO_ID(KUPKE_3, 0x01, 0)
-
-#define ZORRO_MANUF_ITH                                                0x1388
-#define  ZORRO_PROD_ITH_ISDN_MASTER_II                         ZORRO_ID(ITH, 0x01, 0)
-
-#define ZORRO_MANUF_VMC                                                0x1389
-#define  ZORRO_PROD_VMC_ISDN_BLASTER_Z2                                ZORRO_ID(VMC, 0x01, 0)
-#define  ZORRO_PROD_VMC_HYPERCOM_4                             ZORRO_ID(VMC, 0x02, 0)
-
-#define ZORRO_MANUF_INFORMATION                                        0x157C
-#define  ZORRO_PROD_INFORMATION_ISDN_ENGINE_I                  ZORRO_ID(INFORMATION, 0x64, 0)
-
-#define ZORRO_MANUF_VORTEX                                     0x2017
-#define  ZORRO_PROD_VORTEX_GOLDEN_GATE_80386SX                 ZORRO_ID(VORTEX, 0x07, 0)
-#define  ZORRO_PROD_VORTEX_GOLDEN_GATE_RAM                     ZORRO_ID(VORTEX, 0x08, 0)
-#define  ZORRO_PROD_VORTEX_GOLDEN_GATE_80486                   ZORRO_ID(VORTEX, 0x09, 0)
-
-#define ZORRO_MANUF_EXPANSION_SYSTEMS                          0x2062
-#define  ZORRO_PROD_EXPANSION_SYSTEMS_DATAFLYER_4000SX         ZORRO_ID(EXPANSION_SYSTEMS, 0x01, 0)
-#define  ZORRO_PROD_EXPANSION_SYSTEMS_DATAFLYER_4000SX_RAM     ZORRO_ID(EXPANSION_SYSTEMS, 0x02, 0)
-
-#define ZORRO_MANUF_READYSOFT                                  0x2100
-#define  ZORRO_PROD_READYSOFT_AMAX_II_IV                       ZORRO_ID(READYSOFT, 0x01, 0)
-
-#define ZORRO_MANUF_PHASE5                                     0x2140
-#define  ZORRO_PROD_PHASE5_BLIZZARD_RAM                                ZORRO_ID(PHASE5, 0x01, 0)
-#define  ZORRO_PROD_PHASE5_BLIZZARD                            ZORRO_ID(PHASE5, 0x02, 0)
-#define  ZORRO_PROD_PHASE5_BLIZZARD_1220_IV                    ZORRO_ID(PHASE5, 0x06, 0)
-#define  ZORRO_PROD_PHASE5_FASTLANE_Z3_RAM                     ZORRO_ID(PHASE5, 0x0A, 0)
-#define  ZORRO_PROD_PHASE5_BLIZZARD_1230_II_FASTLANE_Z3_CYBERSCSI_CYBERSTORM060        ZORRO_ID(PHASE5, 0x0B, 0)
-#define  ZORRO_PROD_PHASE5_BLIZZARD_1220_CYBERSTORM            ZORRO_ID(PHASE5, 0x0C, 0)
-#define  ZORRO_PROD_PHASE5_BLIZZARD_1230                       ZORRO_ID(PHASE5, 0x0D, 0)
-#define  ZORRO_PROD_PHASE5_BLIZZARD_1230_IV_1260               ZORRO_ID(PHASE5, 0x11, 0)
-#define  ZORRO_PROD_PHASE5_BLIZZARD_2060                       ZORRO_ID(PHASE5, 0x18, 0)
-#define  ZORRO_PROD_PHASE5_CYBERSTORM_MK_II                    ZORRO_ID(PHASE5, 0x19, 0)
-#define  ZORRO_PROD_PHASE5_CYBERVISION64                       ZORRO_ID(PHASE5, 0x22, 0)
-#define  ZORRO_PROD_PHASE5_CYBERVISION64_3D_PROTOTYPE          ZORRO_ID(PHASE5, 0x32, 0)
-#define  ZORRO_PROD_PHASE5_CYBERVISION64_3D                    ZORRO_ID(PHASE5, 0x43, 0)
-#define  ZORRO_PROD_PHASE5_CYBERSTORM_MK_III                   ZORRO_ID(PHASE5, 0x64, 0)
-#define  ZORRO_PROD_PHASE5_BLIZZARD_603E_PLUS                  ZORRO_ID(PHASE5, 0x6e, 0)
-
-#define ZORRO_MANUF_DPS                                                0x2169
-#define  ZORRO_PROD_DPS_PERSONAL_ANIMATION_RECORDER            ZORRO_ID(DPS, 0x01, 0)
-
-#define ZORRO_MANUF_APOLLO_2                                   0x2200
-#define  ZORRO_PROD_APOLLO_A620_68020_1                                ZORRO_ID(APOLLO_2, 0x00, 0)
-#define  ZORRO_PROD_APOLLO_A620_68020_2                                ZORRO_ID(APOLLO_2, 0x01, 0)
-
-#define ZORRO_MANUF_APOLLO_3                                   0x2222
-#define  ZORRO_PROD_APOLLO_AT_APOLLO                           ZORRO_ID(APOLLO_3, 0x22, 0)
-#define  ZORRO_PROD_APOLLO_1230_1240_1260_2030_4040_4060       ZORRO_ID(APOLLO_3, 0x23, 0)
-
-#define ZORRO_MANUF_PETSOFF_LP                                 0x38A5
-#define  ZORRO_PROD_PETSOFF_LP_DELFINA                         ZORRO_ID(PETSOFF_LP, 0x00, 0)
-#define  ZORRO_PROD_PETSOFF_LP_DELFINA_LITE                    ZORRO_ID(PETSOFF_LP, 0x01, 0)
-
-#define ZORRO_MANUF_UWE_GERLACH                                        0x3FF7
-#define  ZORRO_PROD_UWE_GERLACH_RAM_ROM                                ZORRO_ID(UWE_GERLACH, 0xd4, 0)
-
-#define ZORRO_MANUF_ACT                                                0x4231
-#define  ZORRO_PROD_ACT_PRELUDE                                        ZORRO_ID(ACT, 0x01, 0)
-
-#define ZORRO_MANUF_MACROSYSTEMS_GERMANY                       0x4754
-#define  ZORRO_PROD_MACROSYSTEMS_MAESTRO                       ZORRO_ID(MACROSYSTEMS_GERMANY, 0x03, 0)
-#define  ZORRO_PROD_MACROSYSTEMS_VLAB                          ZORRO_ID(MACROSYSTEMS_GERMANY, 0x04, 0)
-#define  ZORRO_PROD_MACROSYSTEMS_MAESTRO_PRO                   ZORRO_ID(MACROSYSTEMS_GERMANY, 0x05, 0)
-#define  ZORRO_PROD_MACROSYSTEMS_RETINA                                ZORRO_ID(MACROSYSTEMS_GERMANY, 0x06, 0)
-#define  ZORRO_PROD_MACROSYSTEMS_MULTI_EVOLUTION               ZORRO_ID(MACROSYSTEMS_GERMANY, 0x08, 0)
-#define  ZORRO_PROD_MACROSYSTEMS_TOCCATA                       ZORRO_ID(MACROSYSTEMS_GERMANY, 0x0C, 0)
-#define  ZORRO_PROD_MACROSYSTEMS_RETINA_Z3                     ZORRO_ID(MACROSYSTEMS_GERMANY, 0x10, 0)
-#define  ZORRO_PROD_MACROSYSTEMS_VLAB_MOTION                   ZORRO_ID(MACROSYSTEMS_GERMANY, 0x12, 0)
-#define  ZORRO_PROD_MACROSYSTEMS_ALTAIS                                ZORRO_ID(MACROSYSTEMS_GERMANY, 0x13, 0)
-#define  ZORRO_PROD_MACROSYSTEMS_FALCON_040                    ZORRO_ID(MACROSYSTEMS_GERMANY, 0xFD, 0)
-
-#define ZORRO_MANUF_COMBITEC                                   0x6766
-
-#define ZORRO_MANUF_SKI_PERIPHERALS                            0x8000
-#define  ZORRO_PROD_SKI_PERIPHERALS_MAST_FIREBALL              ZORRO_ID(SKI_PERIPHERALS, 0x08, 0)
-#define  ZORRO_PROD_SKI_PERIPHERALS_SCSI_DUAL_SERIAL           ZORRO_ID(SKI_PERIPHERALS, 0x80, 0)
-
-#define ZORRO_MANUF_REIS_WARE_2                                        0xA9AD
-#define  ZORRO_PROD_REIS_WARE_SCAN_KING                                ZORRO_ID(REIS_WARE_2, 0x11, 0)
-
-#define ZORRO_MANUF_CAMERON                                    0xAA01
-#define  ZORRO_PROD_CAMERON_PERSONAL_A4                                ZORRO_ID(CAMERON, 0x10, 0)
-
-#define ZORRO_MANUF_REIS_WARE                                  0xAA11
-#define  ZORRO_PROD_REIS_WARE_HANDYSCANNER                     ZORRO_ID(REIS_WARE, 0x11, 0)
-
-#define ZORRO_MANUF_PHOENIX_2                                  0xB5A8
-#define  ZORRO_PROD_PHOENIX_ST506_2                            ZORRO_ID(PHOENIX_2, 0x21, 0)
-#define  ZORRO_PROD_PHOENIX_SCSI_2                             ZORRO_ID(PHOENIX_2, 0x22, 0)
-#define  ZORRO_PROD_PHOENIX_RAM_2                              ZORRO_ID(PHOENIX_2, 0xBE, 0)
-
-#define ZORRO_MANUF_COMBITEC_2                                 0xC008
-#define  ZORRO_PROD_COMBITEC_HD                                        ZORRO_ID(COMBITEC_2, 0x2A, 0)
-#define  ZORRO_PROD_COMBITEC_SRAM                              ZORRO_ID(COMBITEC_2, 0x2B, 0)
-
-
-    /*
-     *  Test and illegal Manufacturer IDs.
-     */
-
-#define ZORRO_MANUF_HACKER                                     0x07DB
-#define  ZORRO_PROD_GENERAL_PROTOTYPE                          ZORRO_ID(HACKER, 0x00, 0)
-#define  ZORRO_PROD_HACKER_SCSI                                        ZORRO_ID(HACKER, 0x01, 0)
-#define  ZORRO_PROD_RESOURCE_MANAGEMENT_FORCE_QUICKNET_QN2000  ZORRO_ID(HACKER, 0x02, 0)
-#define  ZORRO_PROD_VECTOR_CONNECTION_2                                ZORRO_ID(HACKER, 0xE0, 0)
-#define  ZORRO_PROD_VECTOR_CONNECTION_3                                ZORRO_ID(HACKER, 0xE1, 0)
-#define  ZORRO_PROD_VECTOR_CONNECTION_4                                ZORRO_ID(HACKER, 0xE2, 0)
-#define  ZORRO_PROD_VECTOR_CONNECTION_5                                ZORRO_ID(HACKER, 0xE3, 0)
+/* Include the ID list */
+#include <linux/zorro_ids.h>
 
 
     /*
@@ -704,7 +159,7 @@ struct zorro_dev {
     zorro_id id;
     u16 slotaddr;
     u16 slotsize;
-    char name[48];
+    char name[64];
     struct resource resource;
 };
 
@@ -717,6 +172,7 @@ extern struct zorro_dev zorro_autocon[ZORRO_NUM_AUTO];
      */
 
 extern void zorro_init(void);
+extern void zorro_name_device(struct zorro_dev *dev);
 
 extern struct zorro_dev *zorro_find_device(zorro_id id,
                                           struct zorro_dev *from);
diff --git a/include/linux/zorro_ids.h b/include/linux/zorro_ids.h
new file mode 100644 (file)
index 0000000..0a09d97
--- /dev/null
@@ -0,0 +1,551 @@
+/*
+ *  Zorro board IDs
+ *
+ *  Please keep sorted.
+ */
+
+
+#define ZORRO_MANUF_PACIFIC_PERIPHERALS                                0x00D3
+#define  ZORRO_PROD_PACIFIC_PERIPHERALS_SE_2000_A500           ZORRO_ID(PACIFIC_PERIPHERALS, 0x00, 0)
+#define  ZORRO_PROD_PACIFIC_PERIPHERALS_SCSI                   ZORRO_ID(PACIFIC_PERIPHERALS, 0x0A, 0)
+
+#define ZORRO_MANUF_MACROSYSTEMS_USA_2                         0x0100
+#define  ZORRO_PROD_MACROSYSTEMS_WARP_ENGINE                   ZORRO_ID(MACROSYSTEMS_USA_2, 0x13, 0)
+
+#define ZORRO_MANUF_KUPKE_1                                    0x00DD
+#define  ZORRO_PROD_KUPKE_GOLEM_RAM_BOX_2MB                    ZORRO_ID(KUPKE_1, 0x00, 0)
+
+#define ZORRO_MANUF_MEMPHIS                                    0x0100
+#define  ZORRO_PROD_MEMPHIS_STORMBRINGER                       ZORRO_ID(MEMPHIS, 0x00, 0)
+
+#define ZORRO_MANUF_3_STATE                                    0x0200
+#define  ZORRO_PROD_3_STATE_MEGAMIX_2000                       ZORRO_ID(3_STATE, 0x02, 0)
+
+#define ZORRO_MANUF_COMMODORE_BRAUNSCHWEIG                     0x0201
+#define  ZORRO_PROD_CBM_A2088_A2286                            ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x01, 0)
+#define  ZORRO_PROD_CBM_A2286                                  ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x02, 0)
+#define  ZORRO_PROD_CBM_A4091_1                                        ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x54, 0)
+#define  ZORRO_PROD_CBM_A2386SX_1                              ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x67, 0)
+
+#define ZORRO_MANUF_COMMODORE_WEST_CHESTER_1                   0x0202
+#define  ZORRO_PROD_CBM_A2090A                                 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x01, 0)
+#define  ZORRO_PROD_CBM_A590_A2091_1                           ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x02, 0)
+#define  ZORRO_PROD_CBM_A590_A2091_2                           ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x03, 0)
+#define  ZORRO_PROD_CBM_A2090B                                 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x04, 0)
+#define  ZORRO_PROD_CBM_A2060                                  ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x09, 0)
+#define  ZORRO_PROD_CBM_A590_A2052_A2058_A2091                 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x0A, 0)
+#define  ZORRO_PROD_CBM_A560_RAM                               ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x20, 0)
+#define  ZORRO_PROD_CBM_A2232_PROTOTYPE                                ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x45, 0)
+#define  ZORRO_PROD_CBM_A2232                                  ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x46, 0)
+#define  ZORRO_PROD_CBM_A2620                                  ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x50, 0)
+#define  ZORRO_PROD_CBM_A2630                                  ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x51, 0)
+#define  ZORRO_PROD_CBM_A4091_2                                        ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x54, 0)
+#define  ZORRO_PROD_CBM_A2065_1                                        ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x5A, 0)
+#define  ZORRO_PROD_CBM_ROMULATOR                              ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x60, 0)
+#define  ZORRO_PROD_CBM_A3000_TEST_FIXTURE                     ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x61, 0)
+#define  ZORRO_PROD_CBM_A2386SX_2                              ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x67, 0)
+#define  ZORRO_PROD_CBM_A2065_2                                        ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x70, 0)
+
+#define ZORRO_MANUF_COMMODORE_WEST_CHESTER_2                   0x0203
+#define  ZORRO_PROD_CBM_A2090A_CM                              ZORRO_ID(COMMODORE_WEST_CHESTER_2, 0x03, 0)
+
+#define ZORRO_MANUF_PROGRESSIVE_PERIPHERALS_AND_SYSTEMS_2      0x02F4
+#define  ZORRO_PROD_PPS_EXP8000                                        ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS_2, 0x02, 0)
+
+#define ZORRO_MANUF_KOLFF_COMPUTER_SUPPLIES                    0x02FF
+#define  ZORRO_PROD_KCS_POWER_PC_BOARD                         ZORRO_ID(KOLFF_COMPUTER_SUPPLIES, 0x00, 0)
+
+#define ZORRO_MANUF_CARDCO_1                                   0x03EC
+#define  ZORRO_PROD_CARDCO_KRONOS_2000_1                       ZORRO_ID(CARDCO_1, 0x04, 0)
+#define  ZORRO_PROD_CARDCO_A1000_1                             ZORRO_ID(CARDCO_1, 0x0C, 0)
+#define  ZORRO_PROD_CARDCO_ESCORT                              ZORRO_ID(CARDCO_1, 0x0E, 0)
+#define  ZORRO_PROD_CARDCO_A2410                               ZORRO_ID(CARDCO_1, 0xF5, 0)
+
+#define ZORRO_MANUF_A_SQUARED                                  0x03ED
+#define  ZORRO_PROD_A_SQUARED_LIVE_2000                                ZORRO_ID(A_SQUARED, 0x01, 0)
+
+#define ZORRO_MANUF_COMSPEC_COMMUNICATIONS                     0x03EE
+#define  ZORRO_PROD_COMSPEC_COMMUNICATIONS_AX2000              ZORRO_ID(COMSPEC_COMMUNICATIONS, 0x01, 0)
+
+#define ZORRO_MANUF_ANAKIN_RESEARCH                            0x03F1
+#define  ZORRO_PROD_ANAKIN_RESEARCH_EASYL                      ZORRO_ID(ANAKIN_RESEARCH, 0x01, 0)
+
+#define ZORRO_MANUF_MICROBOTICS                                        0x03F2
+#define  ZORRO_PROD_MICROBOTICS_STARBOARD_II                   ZORRO_ID(MICROBOTICS, 0x00, 0)
+#define  ZORRO_PROD_MICROBOTICS_STARDRIVE                      ZORRO_ID(MICROBOTICS, 0x02, 0)
+#define  ZORRO_PROD_MICROBOTICS_8_UP_A                         ZORRO_ID(MICROBOTICS, 0x03, 0)
+#define  ZORRO_PROD_MICROBOTICS_8_UP_Z                         ZORRO_ID(MICROBOTICS, 0x04, 0)
+#define  ZORRO_PROD_MICROBOTICS_DELTA_RAM                      ZORRO_ID(MICROBOTICS, 0x20, 0)
+#define  ZORRO_PROD_MICROBOTICS_8_STAR_RAM                     ZORRO_ID(MICROBOTICS, 0x40, 0)
+#define  ZORRO_PROD_MICROBOTICS_8_STAR                         ZORRO_ID(MICROBOTICS, 0x41, 0)
+#define  ZORRO_PROD_MICROBOTICS_VXL_RAM_32                     ZORRO_ID(MICROBOTICS, 0x44, 0)
+#define  ZORRO_PROD_MICROBOTICS_VXL_68030                      ZORRO_ID(MICROBOTICS, 0x45, 0)
+#define  ZORRO_PROD_MICROBOTICS_DELTA                          ZORRO_ID(MICROBOTICS, 0x60, 0)
+#define  ZORRO_PROD_MICROBOTICS_MBX_1200_1200Z_RAM             ZORRO_ID(MICROBOTICS, 0x81, 0)
+#define  ZORRO_PROD_MICROBOTICS_HARDFRAME_2000_1               ZORRO_ID(MICROBOTICS, 0x96, 0)
+#define  ZORRO_PROD_MICROBOTICS_HARDFRAME_2000_2               ZORRO_ID(MICROBOTICS, 0x9E, 0)
+#define  ZORRO_PROD_MICROBOTICS_MBX_1200_1200Z                 ZORRO_ID(MICROBOTICS, 0xC1, 0)
+
+#define ZORRO_MANUF_ACCESS_ASSOCIATES_ALEGRA                   0x03F4
+
+#define ZORRO_MANUF_EXPANSION_TECHNOLOGIES                     0x03F6
+
+#define ZORRO_MANUF_ASDG                                       0x03FF
+#define  ZORRO_PROD_ASDG_MEMORY_1                              ZORRO_ID(ASDG, 0x01, 0)
+#define  ZORRO_PROD_ASDG_MEMORY_2                              ZORRO_ID(ASDG, 0x02, 0)
+#define  ZORRO_PROD_ASDG_EB920_LAN_ROVER                       ZORRO_ID(ASDG, 0xFE, 0)
+#define  ZORRO_PROD_ASDG_GPIB_DUALIEEE488_TWIN_X               ZORRO_ID(ASDG, 0xFF, 0)
+
+#define ZORRO_MANUF_IMTRONICS_1                                        0x0404
+#define  ZORRO_PROD_IMTRONICS_HURRICANE_2800_1                 ZORRO_ID(IMTRONICS_1, 0x39, 0)
+#define  ZORRO_PROD_IMTRONICS_HURRICANE_2800_2                 ZORRO_ID(IMTRONICS_1, 0x57, 0)
+
+#define ZORRO_MANUF_CBM_UNIVERSITY_OF_LOWELL                   0x0406
+#define  ZORRO_PROD_CBM_A2410                                  ZORRO_ID(CBM_UNIVERSITY_OF_LOWELL, 0x00, 0)
+
+#define ZORRO_MANUF_AMERISTAR                                  0x041D
+#define  ZORRO_PROD_AMERISTAR_A2065                            ZORRO_ID(AMERISTAR, 0x01, 0)
+#define  ZORRO_PROD_AMERISTAR_A560                             ZORRO_ID(AMERISTAR, 0x09, 0)
+#define  ZORRO_PROD_AMERISTAR_A4066                            ZORRO_ID(AMERISTAR, 0x0A, 0)
+
+#define ZORRO_MANUF_SUPRA                                      0x0420
+#define  ZORRO_PROD_SUPRA_SUPRADRIVE_4x4                       ZORRO_ID(SUPRA, 0x01, 0)
+#define  ZORRO_PROD_SUPRA_1000_RAM                             ZORRO_ID(SUPRA, 0x02, 0)
+#define  ZORRO_PROD_SUPRA_2000_DMA                             ZORRO_ID(SUPRA, 0x03, 0)
+#define  ZORRO_PROD_SUPRA_500                                  ZORRO_ID(SUPRA, 0x05, 0)
+#define  ZORRO_PROD_SUPRA_500_SCSI                             ZORRO_ID(SUPRA, 0x08, 0)
+#define  ZORRO_PROD_SUPRA_500XP_2000_RAM                       ZORRO_ID(SUPRA, 0x09, 0)
+#define  ZORRO_PROD_SUPRA_500RX_2000_RAM                       ZORRO_ID(SUPRA, 0x0A, 0)
+#define  ZORRO_PROD_SUPRA_2400ZI                               ZORRO_ID(SUPRA, 0x0B, 0)
+#define  ZORRO_PROD_SUPRA_500XP_SUPRADRIVE_WORDSYNC            ZORRO_ID(SUPRA, 0x0C, 0)
+#define  ZORRO_PROD_SUPRA_SUPRADRIVE_WORDSYNC_II               ZORRO_ID(SUPRA, 0x0D, 0)
+#define  ZORRO_PROD_SUPRA_2400ZIPLUS                           ZORRO_ID(SUPRA, 0x10, 0)
+
+#define ZORRO_MANUF_COMPUTER_SYSTEMS_ASSOCIATES                        0x0422
+#define  ZORRO_PROD_CSA_MAGNUM                                 ZORRO_ID(COMPUTER_SYSTEMS_ASSOCIATES, 0x11, 0)
+#define  ZORRO_PROD_CSA_12_GAUGE                               ZORRO_ID(COMPUTER_SYSTEMS_ASSOCIATES, 0x15, 0)
+
+#define ZORRO_MANUF_MARC_MICHAEL_GROTH                         0x0439
+
+#define ZORRO_MANUF_M_TECH                                     0x0502
+#define  ZORRO_PROD_MTEC_AT500_1                               ZORRO_ID(M_TECH, 0x03, 0)
+
+#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_1                    0x06E1
+#define  ZORRO_PROD_GVP_IMPACT_SERIES_I                                ZORRO_ID(GREAT_VALLEY_PRODUCTS_1, 0x08, 0)
+
+#define ZORRO_MANUF_BYTEBOX                                    0x07DA
+#define  ZORRO_PROD_BYTEBOX_A500                               ZORRO_ID(BYTEBOX, 0x00, 0)
+
+#define ZORRO_MANUF_DKB_POWER_COMPUTING                                0x07DC
+#define  ZORRO_PROD_DKB_POWER_COMPUTING_SECUREKEY              ZORRO_ID(DKB_POWER_COMPUTING, 0x09, 0)
+#define  ZORRO_PROD_DKB_POWER_COMPUTING_DKM_3128               ZORRO_ID(DKB_POWER_COMPUTING, 0x0E, 0)
+#define  ZORRO_PROD_DKB_POWER_COMPUTING_RAPID_FIRE             ZORRO_ID(DKB_POWER_COMPUTING, 0x0F, 0)
+#define  ZORRO_PROD_DKB_POWER_COMPUTING_DKM_1202               ZORRO_ID(DKB_POWER_COMPUTING, 0x10, 0)
+#define  ZORRO_PROD_DKB_POWER_COMPUTING_COBRA_VIPER_II_68EC030 ZORRO_ID(DKB_POWER_COMPUTING, 0x12, 0)
+#define  ZORRO_PROD_DKB_POWER_COMPUTING_WILDFIRE_060_1         ZORRO_ID(DKB_POWER_COMPUTING, 0x17, 0)
+#define  ZORRO_PROD_DKB_POWER_COMPUTING_WILDFIRE_060_2         ZORRO_ID(DKB_POWER_COMPUTING, 0xFF, 0)
+
+#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_2                    0x07E1
+#define  ZORRO_PROD_GVP_IMPACT_SERIES_I_4K                     ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x01, 0)
+#define  ZORRO_PROD_GVP_IMPACT_SERIES_I_16K_2                  ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x02, 0)
+#define  ZORRO_PROD_GVP_IMPACT_SERIES_I_16K_3                  ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x03, 0)
+#define  ZORRO_PROD_GVP_IMPACT_3001_IDE_1                      ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x08, 0)
+#define  ZORRO_PROD_GVP_IMPACT_3001_RAM                                ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x09, 0)
+#define  ZORRO_PROD_GVP_IMPACT_SERIES_II_RAM_1                 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0A, 0)
+#define  ZORRO_PROD_GVP_EPC_BASE                               ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0)
+#define  ZORRO_PROD_GVP_GFORCE_040_1                           ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x20)
+#define  ZORRO_PROD_GVP_GFORCE_040_SCSI_1                      ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x30)
+#define  ZORRO_PROD_GVP_A1291                                  ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x40)
+#define  ZORRO_PROD_GVP_COMBO_030_R4                           ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x60)
+#define  ZORRO_PROD_GVP_COMBO_030_R4_SCSI                      ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x70)
+#define  ZORRO_PROD_GVP_PHONEPAK                               ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x78)
+#define  ZORRO_PROD_GVP_IO_EXTENDER                            ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x98)
+#define  ZORRO_PROD_GVP_GFORCE_030                             ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xa0)
+#define  ZORRO_PROD_GVP_GFORCE_030_SCSI                                ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xb0)
+#define  ZORRO_PROD_GVP_A530                                   ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xc0)
+#define  ZORRO_PROD_GVP_A530_SCSI                              ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xd0)
+#define  ZORRO_PROD_GVP_COMBO_030_R3                           ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xe0)
+#define  ZORRO_PROD_GVP_COMBO_030_R3_SCSI                      ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xf0)
+#define  ZORRO_PROD_GVP_SERIES_II                              ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xf8)
+#define  ZORRO_PROD_GVP_IMPACT_3001_IDE_2                      ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0D, 0)
+/*#define  ZORRO_PROD_GVP_A2000_030                            ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0D, 0)*/
+/*#define  ZORRO_PROD_GVP_GFORCE_040_SCSI_2                    ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0D, 0)*/
+#define  ZORRO_PROD_GVP_GFORCE_040_060                         ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x16, 0)
+#define  ZORRO_PROD_GVP_IMPACT_VISION_24                       ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x20, 0)
+#define  ZORRO_PROD_GVP_GFORCE_040_2                           ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0xFF, 0)
+
+#define ZORRO_MANUF_CALIFORNIA_ACCESS_SYNERGY                  0x07E5
+#define  ZORRO_PROD_CALIFORNIA_ACCESS_SYNERGY_MALIBU           ZORRO_ID(CALIFORNIA_ACCESS_SYNERGY, 0x01, 0)
+
+#define ZORRO_MANUF_XETEC                                      0x07E6
+#define  ZORRO_PROD_XETEC_FASTCARD                             ZORRO_ID(XETEC, 0x01, 0)
+#define  ZORRO_PROD_XETEC_FASTCARD_RAM                         ZORRO_ID(XETEC, 0x02, 0)
+#define  ZORRO_PROD_XETEC_FASTCARD_PLUS                                ZORRO_ID(XETEC, 0x03, 0)
+
+#define ZORRO_MANUF_PROGRESSIVE_PERIPHERALS_AND_SYSTEMS                0x07EA
+#define  ZORRO_PROD_PPS_MERCURY                                        ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x00, 0)
+#define  ZORRO_PROD_PPS_A3000_68040                            ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x01, 0)
+#define  ZORRO_PROD_PPS_A2000_68040                            ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x69, 0)
+#define  ZORRO_PROD_PPS_ZEUS                                   ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x96, 0)
+#define  ZORRO_PROD_PPS_A500_68040                             ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0xBB, 0)
+
+#define ZORRO_MANUF_XEBEC                                      0x07EC
+
+#define ZORRO_MANUF_SPIRIT_TECHNOLOGY                          0x07F2
+#define  ZORRO_PROD_SPIRIT_TECHNOLOGY_INSIDER_IN1000           ZORRO_ID(SPIRIT_TECHNOLOGY, 0x01, 0)
+#define  ZORRO_PROD_SPIRIT_TECHNOLOGY_INSIDER_IN500            ZORRO_ID(SPIRIT_TECHNOLOGY, 0x02, 0)
+#define  ZORRO_PROD_SPIRIT_TECHNOLOGY_SIN500                   ZORRO_ID(SPIRIT_TECHNOLOGY, 0x03, 0)
+#define  ZORRO_PROD_SPIRIT_TECHNOLOGY_HDA_506                  ZORRO_ID(SPIRIT_TECHNOLOGY, 0x04, 0)
+#define  ZORRO_PROD_SPIRIT_TECHNOLOGY_AX_S                     ZORRO_ID(SPIRIT_TECHNOLOGY, 0x05, 0)
+#define  ZORRO_PROD_SPIRIT_TECHNOLOGY_OCTABYTE                 ZORRO_ID(SPIRIT_TECHNOLOGY, 0x06, 0)
+#define  ZORRO_PROD_SPIRIT_TECHNOLOGY_INMATE                   ZORRO_ID(SPIRIT_TECHNOLOGY, 0x08, 0)
+
+#define ZORRO_MANUF_SPIRIT_TECHNOLOGY_2                                0x07F3
+
+#define ZORRO_MANUF_BSC_ALFADATA_1                             0x07FE
+#define  ZORRO_PROD_BSC_ALF_3_1                                        ZORRO_ID(BSC_ALFADATA_1, 0x03, 0)
+
+#define ZORRO_MANUF_BSC_ALFADATA_2                             0x0801
+#define  ZORRO_PROD_BSC_ALF_2_1                                        ZORRO_ID(BSC_ALFADATA_2, 0x01, 0)
+#define  ZORRO_PROD_BSC_ALF_2_2                                        ZORRO_ID(BSC_ALFADATA_2, 0x02, 0)
+#define  ZORRO_PROD_BSC_ALF_3_2                                        ZORRO_ID(BSC_ALFADATA_2, 0x03, 0)
+
+#define ZORRO_MANUF_CARDCO_2                                   0x0802
+#define  ZORRO_PROD_CARDCO_KRONOS_2000_2                       ZORRO_ID(CARDCO_2, 0x04, 0)
+#define  ZORRO_PROD_CARDCO_A1000_2                             ZORRO_ID(CARDCO_2, 0x0C, 0)
+
+#define ZORRO_MANUF_JOCHHEIM                                   0x0804
+#define  ZORRO_PROD_JOCHHEIM_RAM                               ZORRO_ID(JOCHHEIM, 0x01, 0)
+
+#define ZORRO_MANUF_CHECKPOINT_TECHNOLOGIES                    0x0807
+#define  ZORRO_PROD_CHECKPOINT_TECHNOLOGIES_SERIAL_SOLUTION    ZORRO_ID(CHECKPOINT_TECHNOLOGIES, 0x00, 0)
+
+#define ZORRO_MANUF_EDOTRONIK                                  0x0810
+#define  ZORRO_PROD_EDOTRONIK_IEEE_488                         ZORRO_ID(EDOTRONIK, 0x01, 0)
+#define  ZORRO_PROD_EDOTRONIK_8032                             ZORRO_ID(EDOTRONIK, 0x02, 0)
+#define  ZORRO_PROD_EDOTRONIK_MULTISERIAL                      ZORRO_ID(EDOTRONIK, 0x03, 0)
+#define  ZORRO_PROD_EDOTRONIK_VIDEODIGITIZER                   ZORRO_ID(EDOTRONIK, 0x04, 0)
+#define  ZORRO_PROD_EDOTRONIK_PARALLEL_IO                      ZORRO_ID(EDOTRONIK, 0x05, 0)
+#define  ZORRO_PROD_EDOTRONIK_PIC_PROTOYPING                   ZORRO_ID(EDOTRONIK, 0x06, 0)
+#define  ZORRO_PROD_EDOTRONIK_ADC                              ZORRO_ID(EDOTRONIK, 0x07, 0)
+#define  ZORRO_PROD_EDOTRONIK_VME                              ZORRO_ID(EDOTRONIK, 0x08, 0)
+#define  ZORRO_PROD_EDOTRONIK_DSP96000                         ZORRO_ID(EDOTRONIK, 0x09, 0)
+
+#define ZORRO_MANUF_NES_INC                                    0x0813
+#define  ZORRO_PROD_NES_INC_RAM                                        ZORRO_ID(NES_INC, 0x00, 0)
+
+#define ZORRO_MANUF_ICD                                                0x0817
+#define  ZORRO_PROD_ICD_ADVANTAGE_2000_SCSI                    ZORRO_ID(ICD, 0x01, 0)
+#define  ZORRO_PROD_ICD_ADVANTAGE_IDE                          ZORRO_ID(ICD, 0x03, 0)
+#define  ZORRO_PROD_ICD_ADVANTAGE_2080_RAM                     ZORRO_ID(ICD, 0x04, 0)
+
+#define ZORRO_MANUF_KUPKE_2                                    0x0819
+#define  ZORRO_PROD_KUPKE_OMTI                                 ZORRO_ID(KUPKE_2, 0x01, 0)
+#define  ZORRO_PROD_KUPKE_SCSI_II                              ZORRO_ID(KUPKE_2, 0x02, 0)
+#define  ZORRO_PROD_KUPKE_GOLEM_BOX                            ZORRO_ID(KUPKE_2, 0x03, 0)
+#define  ZORRO_PROD_KUPKE_030_882                              ZORRO_ID(KUPKE_2, 0x04, 0)
+#define  ZORRO_PROD_KUPKE_SCSI_AT                              ZORRO_ID(KUPKE_2, 0x05, 0)
+
+#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_3                    0x081D
+#define  ZORRO_PROD_GVP_A2000_RAM8                             ZORRO_ID(GREAT_VALLEY_PRODUCTS_3, 0x09, 0)
+#define  ZORRO_PROD_GVP_IMPACT_SERIES_II_RAM_2                 ZORRO_ID(GREAT_VALLEY_PRODUCTS_3, 0x0A, 0)
+
+#define ZORRO_MANUF_INTERWORKS_NETWORK                         0x081E
+
+#define ZORRO_MANUF_HARDITAL_SYNTHESIS                         0x0820
+#define  ZORRO_PROD_HARDITAL_SYNTHESIS_TQM_68030_68882         ZORRO_ID(HARDITAL_SYNTHESIS, 0x14, 0)
+
+#define ZORRO_MANUF_APPLIED_ENGINEERING                                0x0828
+#define  ZORRO_PROD_APPLIED_ENGINEERING_DL2000                 ZORRO_ID(APPLIED_ENGINEERING, 0x10, 0)
+#define  ZORRO_PROD_APPLIED_ENGINEERING_RAM_WORKS              ZORRO_ID(APPLIED_ENGINEERING, 0xE0, 0)
+
+#define ZORRO_MANUF_BSC_ALFADATA_3                             0x082C
+#define  ZORRO_PROD_BSC_OKTAGON_2008                           ZORRO_ID(BSC_ALFADATA_3, 0x05, 0)
+#define  ZORRO_PROD_BSC_TANDEM_AT_2008_508                     ZORRO_ID(BSC_ALFADATA_3, 0x06, 0)
+#define  ZORRO_PROD_BSC_ALFA_RAM_1200                          ZORRO_ID(BSC_ALFADATA_3, 0x07, 0)
+#define  ZORRO_PROD_BSC_OKTAGON_2008_RAM                       ZORRO_ID(BSC_ALFADATA_3, 0x08, 0)
+#define  ZORRO_PROD_BSC_MULTIFACE_I                            ZORRO_ID(BSC_ALFADATA_3, 0x10, 0)
+#define  ZORRO_PROD_BSC_MULTIFACE_II                           ZORRO_ID(BSC_ALFADATA_3, 0x11, 0)
+#define  ZORRO_PROD_BSC_MULTIFACE_III                          ZORRO_ID(BSC_ALFADATA_3, 0x12, 0)
+#define  ZORRO_PROD_BSC_FRAMEMASTER_II                         ZORRO_ID(BSC_ALFADATA_3, 0x20, 0)
+#define  ZORRO_PROD_BSC_GRAFFITI_RAM                           ZORRO_ID(BSC_ALFADATA_3, 0x21, 0)
+#define  ZORRO_PROD_BSC_GRAFFITI_REG                           ZORRO_ID(BSC_ALFADATA_3, 0x22, 0)
+#define  ZORRO_PROD_BSC_ISDN_MASTERCARD                                ZORRO_ID(BSC_ALFADATA_3, 0x40, 0)
+#define  ZORRO_PROD_BSC_ISDN_MASTERCARD_II                     ZORRO_ID(BSC_ALFADATA_3, 0x41, 0)
+
+#define ZORRO_MANUF_PHOENIX                                    0x0835
+#define  ZORRO_PROD_PHOENIX_ST506                              ZORRO_ID(PHOENIX, 0x21, 0)
+#define  ZORRO_PROD_PHOENIX_SCSI                               ZORRO_ID(PHOENIX, 0x22, 0)
+#define  ZORRO_PROD_PHOENIX_RAM                                        ZORRO_ID(PHOENIX, 0xBE, 0)
+
+#define ZORRO_MANUF_ADVANCED_STORAGE_SYSTEMS                   0x0836
+#define  ZORRO_PROD_ADVANCED_STORAGE_SYSTEMS_NEXUS             ZORRO_ID(ADVANCED_STORAGE_SYSTEMS, 0x01, 0)
+#define  ZORRO_PROD_ADVANCED_STORAGE_SYSTEMS_NEXUS_RAM         ZORRO_ID(ADVANCED_STORAGE_SYSTEMS, 0x08, 0)
+
+#define ZORRO_MANUF_IMPULSE                                    0x0838
+#define  ZORRO_PROD_IMPULSE_FIRECRACKER_24                     ZORRO_ID(IMPULSE, 0x00, 0)
+
+#define ZORRO_MANUF_IVS                                                0x0840
+#define  ZORRO_PROD_IVS_GRANDSLAM_PIC_2                                ZORRO_ID(IVS, 0x02, 0)
+#define  ZORRO_PROD_IVS_GRANDSLAM_PIC_1                                ZORRO_ID(IVS, 0x04, 0)
+#define  ZORRO_PROD_IVS_OVERDRIVE                              ZORRO_ID(IVS, 0x10, 0)
+#define  ZORRO_PROD_IVS_TRUMPCARD_CLASSIC                      ZORRO_ID(IVS, 0x30, 0)
+#define  ZORRO_PROD_IVS_TRUMPCARD_PRO_GRANDSLAM                        ZORRO_ID(IVS, 0x34, 0)
+#define  ZORRO_PROD_IVS_META_4                                 ZORRO_ID(IVS, 0x40, 0)
+#define  ZORRO_PROD_IVS_WAVETOOLS                              ZORRO_ID(IVS, 0xBF, 0)
+#define  ZORRO_PROD_IVS_VECTOR_1                               ZORRO_ID(IVS, 0xF3, 0)
+#define  ZORRO_PROD_IVS_VECTOR_2                               ZORRO_ID(IVS, 0xF4, 0)
+
+#define ZORRO_MANUF_VECTOR_1                                   0x0841
+#define  ZORRO_PROD_VECTOR_CONNECTION_1                                ZORRO_ID(VECTOR_1, 0xE3, 0)
+
+#define ZORRO_MANUF_XPERT_PRODEV                               0x0845
+#define  ZORRO_PROD_XPERT_PRODEV_VISIONA_RAM                   ZORRO_ID(XPERT_PRODEV, 0x01, 0)
+#define  ZORRO_PROD_XPERT_PRODEV_VISIONA_REG                   ZORRO_ID(XPERT_PRODEV, 0x02, 0)
+#define  ZORRO_PROD_XPERT_PRODEV_MERLIN_RAM                    ZORRO_ID(XPERT_PRODEV, 0x03, 0)
+#define  ZORRO_PROD_XPERT_PRODEV_MERLIN_REG_1                  ZORRO_ID(XPERT_PRODEV, 0x04, 0)
+#define  ZORRO_PROD_XPERT_PRODEV_MERLIN_REG_2                  ZORRO_ID(XPERT_PRODEV, 0xC9, 0)
+
+#define ZORRO_MANUF_HYDRA_SYSTEMS                              0x0849
+#define  ZORRO_PROD_HYDRA_SYSTEMS_AMIGANET                     ZORRO_ID(HYDRA_SYSTEMS, 0x01, 0)
+
+#define ZORRO_MANUF_SUNRIZE_INDUSTRIES                         0x084F
+#define  ZORRO_PROD_SUNRIZE_INDUSTRIES_AD1012                  ZORRO_ID(SUNRIZE_INDUSTRIES, 0x01, 0)
+#define  ZORRO_PROD_SUNRIZE_INDUSTRIES_AD516                   ZORRO_ID(SUNRIZE_INDUSTRIES, 0x02, 0)
+#define  ZORRO_PROD_SUNRIZE_INDUSTRIES_DD512                   ZORRO_ID(SUNRIZE_INDUSTRIES, 0x03, 0)
+
+#define ZORRO_MANUF_TRICERATOPS                                        0x0850
+#define  ZORRO_PROD_TRICERATOPS_MULTI_IO                       ZORRO_ID(TRICERATOPS, 0x01, 0)
+
+#define ZORRO_MANUF_APPLIED_MAGIC                              0x0851
+#define  ZORRO_PROD_APPLIED_MAGIC_DMI_RESOLVER                 ZORRO_ID(APPLIED_MAGIC, 0x01, 0)
+#define  ZORRO_PROD_APPLIED_MAGIC_DIGITAL_BROADCASTER          ZORRO_ID(APPLIED_MAGIC, 0x06, 0)
+
+#define ZORRO_MANUF_GFX_BASE                                   0x085E
+#define  ZORRO_PROD_GFX_BASE_GDA_1_VRAM                                ZORRO_ID(GFX_BASE, 0x00, 0)
+#define  ZORRO_PROD_GFX_BASE_GDA_1                             ZORRO_ID(GFX_BASE, 0x01, 0)
+
+#define ZORRO_MANUF_ROCTEC                                     0x0860
+#define  ZORRO_PROD_ROCTEC_RH_800C                             ZORRO_ID(ROCTEC, 0x01, 0)
+#define  ZORRO_PROD_ROCTEC_RH_800C_RAM                         ZORRO_ID(ROCTEC, 0x01, 0)
+
+#define ZORRO_MANUF_KATO                                       0x0861
+#define  ZORRO_PROD_KATO_MELODY                                        ZORRO_ID(KATO, 0x80, 0)
+/* ID clash!! */
+#define ZORRO_MANUF_HELFRICH_1                                 0x0861
+#define  ZORRO_PROD_HELFRICH_RAINBOW_II                                ZORRO_ID(HELFRICH_1, 0x20, 0)
+#define  ZORRO_PROD_HELFRICH_RAINBOW_III                       ZORRO_ID(HELFRICH_1, 0x21, 0)
+
+#define ZORRO_MANUF_ATLANTIS                                   0x0862
+
+#define ZORRO_MANUF_PROTAR                                     0x0864
+
+#define ZORRO_MANUF_ACS                                                0x0865
+
+#define ZORRO_MANUF_SOFTWARE_RESULTS_ENTERPRISES               0x0866
+#define  ZORRO_PROD_SOFTWARE_RESULTS_ENTERPRISES_GOLDEN_GATE_2_BUS_PLUS        ZORRO_ID(SOFTWARE_RESULTS_ENTERPRISES, 0x01, 0)
+
+#define ZORRO_MANUF_MASOBOSHI                                  0x086D
+#define  ZORRO_PROD_MASOBOSHI_MASTER_CARD_SC201                        ZORRO_ID(MASOBOSHI, 0x03, 0)
+#define  ZORRO_PROD_MASOBOSHI_MASTER_CARD_MC702                        ZORRO_ID(MASOBOSHI, 0x04, 0)
+#define  ZORRO_PROD_MASOBOSHI_MVD_819                          ZORRO_ID(MASOBOSHI, 0x07, 0)
+
+#define ZORRO_MANUF_MAINHATTAN_DATA                            0x086F
+#define  ZORRO_PROD_MAINHATTAN_DATA_IDE                                ZORRO_ID(MAINHATTAN_DATA, 0x01, 0)
+
+#define ZORRO_MANUF_VILLAGE_TRONIC                             0x0877
+#define  ZORRO_PROD_VILLAGE_TRONIC_DOMINO_RAM                  ZORRO_ID(VILLAGE_TRONIC, 0x01, 0)
+#define  ZORRO_PROD_VILLAGE_TRONIC_DOMINO_REG                  ZORRO_ID(VILLAGE_TRONIC, 0x02, 0)
+#define  ZORRO_PROD_VILLAGE_TRONIC_DOMINO_16M_PROTOTYPE                ZORRO_ID(VILLAGE_TRONIC, 0x03, 0)
+#define  ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_RAM      ZORRO_ID(VILLAGE_TRONIC, 0x0B, 0)
+#define  ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_REG      ZORRO_ID(VILLAGE_TRONIC, 0x0C, 0)
+#define  ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_SEGMENTED_MODE   ZORRO_ID(VILLAGE_TRONIC, 0x0D, 0)
+#define  ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_MEM1          ZORRO_ID(VILLAGE_TRONIC, 0x15, 0)
+#define  ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_MEM2          ZORRO_ID(VILLAGE_TRONIC, 0x16, 0)
+#define  ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_REG           ZORRO_ID(VILLAGE_TRONIC, 0x17, 0)
+#define  ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z3               ZORRO_ID(VILLAGE_TRONIC, 0x18, 0)
+#define  ZORRO_PROD_VILLAGE_TRONIC_ARIADNE                     ZORRO_ID(VILLAGE_TRONIC, 0xC9, 0)
+#define  ZORRO_PROD_VILLAGE_TRONIC_ARIADNE2                    ZORRO_ID(VILLAGE_TRONIC, 0xCA, 0)
+
+#define ZORRO_MANUF_UTILITIES_UNLIMITED                                0x087B
+#define  ZORRO_PROD_UTILITIES_UNLIMITED_EMPLANT_DELUXE         ZORRO_ID(UTILITIES_UNLIMITED, 0x15, 0)
+#define  ZORRO_PROD_UTILITIES_UNLIMITED_EMPLANT_DELUXE2                ZORRO_ID(UTILITIES_UNLIMITED, 0x20, 0)
+
+#define ZORRO_MANUF_AMITRIX                                    0x0880
+#define  ZORRO_PROD_AMITRIX_MULTI_IO                           ZORRO_ID(AMITRIX, 0x01, 0)
+#define  ZORRO_PROD_AMITRIX_CD_RAM                             ZORRO_ID(AMITRIX, 0x02, 0)
+
+#define ZORRO_MANUF_ARMAX                                      0x0885
+#define  ZORRO_PROD_ARMAX_OMNIBUS                              ZORRO_ID(ARMAX, 0x00, 0)
+
+#define ZORRO_MANUF_ZEUS                                       0x088D
+#define  ZORRO_PROD_ZEUS_SPIDER                                        ZORRO_ID(ZEUS, 0x04, 0)
+
+#define ZORRO_MANUF_NEWTEK                                     0x088F
+#define  ZORRO_PROD_NEWTEK_VIDEOTOASTER                                ZORRO_ID(NEWTEK, 0x00, 0)
+
+#define ZORRO_MANUF_M_TECH_GERMANY                             0x0890
+#define  ZORRO_PROD_MTEC_AT500_2                               ZORRO_ID(M_TECH_GERMANY, 0x01, 0)
+#define  ZORRO_PROD_MTEC_68030                                 ZORRO_ID(M_TECH_GERMANY, 0x03, 0)
+#define  ZORRO_PROD_MTEC_68020I                                        ZORRO_ID(M_TECH_GERMANY, 0x06, 0)
+#define  ZORRO_PROD_MTEC_A1200_T68030_RTC                      ZORRO_ID(M_TECH_GERMANY, 0x20, 0)
+#define  ZORRO_PROD_MTEC_VIPER_MK_V_E_MATRIX_530               ZORRO_ID(M_TECH_GERMANY, 0x21, 0)
+#define  ZORRO_PROD_MTEC_8_MB_RAM                              ZORRO_ID(M_TECH_GERMANY, 0x22, 0)
+#define  ZORRO_PROD_MTEC_VIPER_MK_V_E_MATRIX_530_SCSI_IDE      ZORRO_ID(M_TECH_GERMANY, 0x24, 0)
+
+#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_4                    0x0891
+#define  ZORRO_PROD_GVP_EGS_28_24_SPECTRUM_RAM                 ZORRO_ID(GREAT_VALLEY_PRODUCTS_4, 0x01, 0)
+#define  ZORRO_PROD_GVP_EGS_28_24_SPECTRUM_REG                 ZORRO_ID(GREAT_VALLEY_PRODUCTS_4, 0x02, 0)
+
+#define ZORRO_MANUF_APOLLO_1                                   0x0892
+#define  ZORRO_PROD_APOLLO_A1200                               ZORRO_ID(APOLLO_1, 0x01, 0)
+
+#define ZORRO_MANUF_HELFRICH_2                                 0x0893
+#define  ZORRO_PROD_HELFRICH_PICCOLO_RAM                       ZORRO_ID(HELFRICH_2, 0x05, 0)
+#define  ZORRO_PROD_HELFRICH_PICCOLO_REG                       ZORRO_ID(HELFRICH_2, 0x06, 0)
+#define  ZORRO_PROD_HELFRICH_PEGGY_PLUS_MPEG                   ZORRO_ID(HELFRICH_2, 0x07, 0)
+#define  ZORRO_PROD_HELFRICH_VIDEOCRUNCHER                     ZORRO_ID(HELFRICH_2, 0x08, 0)
+#define  ZORRO_PROD_HELFRICH_SD64_RAM                          ZORRO_ID(HELFRICH_2, 0x0A, 0)
+#define  ZORRO_PROD_HELFRICH_SD64_REG                          ZORRO_ID(HELFRICH_2, 0x0B, 0)
+
+#define ZORRO_MANUF_MACROSYSTEMS_USA                           0x089B
+#define  ZORRO_PROD_MACROSYSTEMS_WARP_ENGINE_40xx              ZORRO_ID(MACROSYSTEMS_USA, 0x13, 0)
+
+#define ZORRO_MANUF_ELBOX_COMPUTER                             0x089E
+#define  ZORRO_PROD_ELBOX_COMPUTER_1200_4                      ZORRO_ID(ELBOX_COMPUTER, 0x06, 0)
+
+#define ZORRO_MANUF_HARMS_PROFESSIONAL                         0x0A00
+#define  ZORRO_PROD_HARMS_PROFESSIONAL_030_PLUS                        ZORRO_ID(HARMS_PROFESSIONAL, 0x10, 0)
+#define  ZORRO_PROD_HARMS_PROFESSIONAL_3500                    ZORRO_ID(HARMS_PROFESSIONAL, 0xD0, 0)
+
+#define ZORRO_MANUF_MICRONIK                                   0x0A50
+#define  ZORRO_PROD_MICRONIK_RCA_120                           ZORRO_ID(MICRONIK, 0x0A, 0)
+
+#define ZORRO_MANUF_MICRONIK2                                  0x0F0F
+#define  ZORRO_PROD_MICRONIK2_Z3I                              ZORRO_ID(MICRONIK2, 0x01, 0)
+
+#define ZORRO_MANUF_MEGAMICRO                                  0x1000
+#define  ZORRO_PROD_MEGAMICRO_SCRAM_500                                ZORRO_ID(MEGAMICRO, 0x03, 0)
+#define  ZORRO_PROD_MEGAMICRO_SCRAM_500_RAM                    ZORRO_ID(MEGAMICRO, 0x04, 0)
+
+#define ZORRO_MANUF_IMTRONICS_2                                        0x1028
+#define  ZORRO_PROD_IMTRONICS_HURRICANE_2800_3                 ZORRO_ID(IMTRONICS_2, 0x39, 0)
+#define  ZORRO_PROD_IMTRONICS_HURRICANE_2800_4                 ZORRO_ID(IMTRONICS_2, 0x57, 0)
+
+/* unofficial ID */
+#define ZORRO_MANUF_INDIVIDUAL_COMPUTERS                       0x1212
+#define  ZORRO_PROD_INDIVIDUAL_COMPUTERS_BUDDHA                        ZORRO_ID(INDIVIDUAL_COMPUTERS, 0x00, 0)
+#define  ZORRO_PROD_INDIVIDUAL_COMPUTERS_CATWEASEL             ZORRO_ID(INDIVIDUAL_COMPUTERS, 0x2A, 0)
+
+#define ZORRO_MANUF_KUPKE_3                                    0x1248
+#define  ZORRO_PROD_KUPKE_GOLEM_HD_3000                                ZORRO_ID(KUPKE_3, 0x01, 0)
+
+#define ZORRO_MANUF_ITH                                                0x1388
+#define  ZORRO_PROD_ITH_ISDN_MASTER_II                         ZORRO_ID(ITH, 0x01, 0)
+
+#define ZORRO_MANUF_VMC                                                0x1389
+#define  ZORRO_PROD_VMC_ISDN_BLASTER_Z2                                ZORRO_ID(VMC, 0x01, 0)
+#define  ZORRO_PROD_VMC_HYPERCOM_4                             ZORRO_ID(VMC, 0x02, 0)
+
+#define ZORRO_MANUF_INFORMATION                                        0x157C
+#define  ZORRO_PROD_INFORMATION_ISDN_ENGINE_I                  ZORRO_ID(INFORMATION, 0x64, 0)
+
+#define ZORRO_MANUF_VORTEX                                     0x2017
+#define  ZORRO_PROD_VORTEX_GOLDEN_GATE_80386SX                 ZORRO_ID(VORTEX, 0x07, 0)
+#define  ZORRO_PROD_VORTEX_GOLDEN_GATE_RAM                     ZORRO_ID(VORTEX, 0x08, 0)
+#define  ZORRO_PROD_VORTEX_GOLDEN_GATE_80486                   ZORRO_ID(VORTEX, 0x09, 0)
+
+#define ZORRO_MANUF_EXPANSION_SYSTEMS                          0x2062
+#define  ZORRO_PROD_EXPANSION_SYSTEMS_DATAFLYER_4000SX         ZORRO_ID(EXPANSION_SYSTEMS, 0x01, 0)
+#define  ZORRO_PROD_EXPANSION_SYSTEMS_DATAFLYER_4000SX_RAM     ZORRO_ID(EXPANSION_SYSTEMS, 0x02, 0)
+
+#define ZORRO_MANUF_READYSOFT                                  0x2100
+#define  ZORRO_PROD_READYSOFT_AMAX_II_IV                       ZORRO_ID(READYSOFT, 0x01, 0)
+
+#define ZORRO_MANUF_PHASE5                                     0x2140
+#define  ZORRO_PROD_PHASE5_BLIZZARD_RAM                                ZORRO_ID(PHASE5, 0x01, 0)
+#define  ZORRO_PROD_PHASE5_BLIZZARD                            ZORRO_ID(PHASE5, 0x02, 0)
+#define  ZORRO_PROD_PHASE5_BLIZZARD_1220_IV                    ZORRO_ID(PHASE5, 0x06, 0)
+#define  ZORRO_PROD_PHASE5_FASTLANE_Z3_RAM                     ZORRO_ID(PHASE5, 0x0A, 0)
+#define  ZORRO_PROD_PHASE5_BLIZZARD_1230_II_FASTLANE_Z3_CYBERSCSI_CYBERSTORM060        ZORRO_ID(PHASE5, 0x0B, 0)
+#define  ZORRO_PROD_PHASE5_BLIZZARD_1220_CYBERSTORM            ZORRO_ID(PHASE5, 0x0C, 0)
+#define  ZORRO_PROD_PHASE5_BLIZZARD_1230                       ZORRO_ID(PHASE5, 0x0D, 0)
+#define  ZORRO_PROD_PHASE5_BLIZZARD_1230_IV_1260               ZORRO_ID(PHASE5, 0x11, 0)
+#define  ZORRO_PROD_PHASE5_BLIZZARD_2060                       ZORRO_ID(PHASE5, 0x18, 0)
+#define  ZORRO_PROD_PHASE5_CYBERSTORM_MK_II                    ZORRO_ID(PHASE5, 0x19, 0)
+#define  ZORRO_PROD_PHASE5_CYBERVISION64                       ZORRO_ID(PHASE5, 0x22, 0)
+#define  ZORRO_PROD_PHASE5_CYBERVISION64_3D_PROTOTYPE          ZORRO_ID(PHASE5, 0x32, 0)
+#define  ZORRO_PROD_PHASE5_CYBERVISION64_3D                    ZORRO_ID(PHASE5, 0x43, 0)
+#define  ZORRO_PROD_PHASE5_CYBERSTORM_MK_III                   ZORRO_ID(PHASE5, 0x64, 0)
+#define  ZORRO_PROD_PHASE5_BLIZZARD_603E_PLUS                  ZORRO_ID(PHASE5, 0x6e, 0)
+
+#define ZORRO_MANUF_DPS                                                0x2169
+#define  ZORRO_PROD_DPS_PERSONAL_ANIMATION_RECORDER            ZORRO_ID(DPS, 0x01, 0)
+
+#define ZORRO_MANUF_APOLLO_2                                   0x2200
+#define  ZORRO_PROD_APOLLO_A620_68020_1                                ZORRO_ID(APOLLO_2, 0x00, 0)
+#define  ZORRO_PROD_APOLLO_A620_68020_2                                ZORRO_ID(APOLLO_2, 0x01, 0)
+
+#define ZORRO_MANUF_APOLLO_3                                   0x2222
+#define  ZORRO_PROD_APOLLO_AT_APOLLO                           ZORRO_ID(APOLLO_3, 0x22, 0)
+#define  ZORRO_PROD_APOLLO_1230_1240_1260_2030_4040_4060       ZORRO_ID(APOLLO_3, 0x23, 0)
+
+#define ZORRO_MANUF_PETSOFF_LP                                 0x38A5
+#define  ZORRO_PROD_PETSOFF_LP_DELFINA                         ZORRO_ID(PETSOFF_LP, 0x00, 0)
+#define  ZORRO_PROD_PETSOFF_LP_DELFINA_LITE                    ZORRO_ID(PETSOFF_LP, 0x01, 0)
+
+#define ZORRO_MANUF_UWE_GERLACH                                        0x3FF7
+#define  ZORRO_PROD_UWE_GERLACH_RAM_ROM                                ZORRO_ID(UWE_GERLACH, 0xd4, 0)
+
+#define ZORRO_MANUF_ACT                                                0x4231
+#define  ZORRO_PROD_ACT_PRELUDE                                        ZORRO_ID(ACT, 0x01, 0)
+
+#define ZORRO_MANUF_MACROSYSTEMS_GERMANY                       0x4754
+#define  ZORRO_PROD_MACROSYSTEMS_MAESTRO                       ZORRO_ID(MACROSYSTEMS_GERMANY, 0x03, 0)
+#define  ZORRO_PROD_MACROSYSTEMS_VLAB                          ZORRO_ID(MACROSYSTEMS_GERMANY, 0x04, 0)
+#define  ZORRO_PROD_MACROSYSTEMS_MAESTRO_PRO                   ZORRO_ID(MACROSYSTEMS_GERMANY, 0x05, 0)
+#define  ZORRO_PROD_MACROSYSTEMS_RETINA                                ZORRO_ID(MACROSYSTEMS_GERMANY, 0x06, 0)
+#define  ZORRO_PROD_MACROSYSTEMS_MULTI_EVOLUTION               ZORRO_ID(MACROSYSTEMS_GERMANY, 0x08, 0)
+#define  ZORRO_PROD_MACROSYSTEMS_TOCCATA                       ZORRO_ID(MACROSYSTEMS_GERMANY, 0x0C, 0)
+#define  ZORRO_PROD_MACROSYSTEMS_RETINA_Z3                     ZORRO_ID(MACROSYSTEMS_GERMANY, 0x10, 0)
+#define  ZORRO_PROD_MACROSYSTEMS_VLAB_MOTION                   ZORRO_ID(MACROSYSTEMS_GERMANY, 0x12, 0)
+#define  ZORRO_PROD_MACROSYSTEMS_ALTAIS                                ZORRO_ID(MACROSYSTEMS_GERMANY, 0x13, 0)
+#define  ZORRO_PROD_MACROSYSTEMS_FALCON_040                    ZORRO_ID(MACROSYSTEMS_GERMANY, 0xFD, 0)
+
+#define ZORRO_MANUF_COMBITEC                                   0x6766
+
+#define ZORRO_MANUF_SKI_PERIPHERALS                            0x8000
+#define  ZORRO_PROD_SKI_PERIPHERALS_MAST_FIREBALL              ZORRO_ID(SKI_PERIPHERALS, 0x08, 0)
+#define  ZORRO_PROD_SKI_PERIPHERALS_SCSI_DUAL_SERIAL           ZORRO_ID(SKI_PERIPHERALS, 0x80, 0)
+
+#define ZORRO_MANUF_REIS_WARE_2                                        0xA9AD
+#define  ZORRO_PROD_REIS_WARE_SCAN_KING                                ZORRO_ID(REIS_WARE_2, 0x11, 0)
+
+#define ZORRO_MANUF_CAMERON                                    0xAA01
+#define  ZORRO_PROD_CAMERON_PERSONAL_A4                                ZORRO_ID(CAMERON, 0x10, 0)
+
+#define ZORRO_MANUF_REIS_WARE                                  0xAA11
+#define  ZORRO_PROD_REIS_WARE_HANDYSCANNER                     ZORRO_ID(REIS_WARE, 0x11, 0)
+
+#define ZORRO_MANUF_PHOENIX_2                                  0xB5A8
+#define  ZORRO_PROD_PHOENIX_ST506_2                            ZORRO_ID(PHOENIX_2, 0x21, 0)
+#define  ZORRO_PROD_PHOENIX_SCSI_2                             ZORRO_ID(PHOENIX_2, 0x22, 0)
+#define  ZORRO_PROD_PHOENIX_RAM_2                              ZORRO_ID(PHOENIX_2, 0xBE, 0)
+
+#define ZORRO_MANUF_COMBITEC_2                                 0xC008
+#define  ZORRO_PROD_COMBITEC_HD                                        ZORRO_ID(COMBITEC_2, 0x2A, 0)
+#define  ZORRO_PROD_COMBITEC_SRAM                              ZORRO_ID(COMBITEC_2, 0x2B, 0)
+
+
+    /*
+     *  Test and illegal Manufacturer IDs.
+     */
+
+#define ZORRO_MANUF_HACKER                                     0x07DB
+#define  ZORRO_PROD_GENERAL_PROTOTYPE                          ZORRO_ID(HACKER, 0x00, 0)
+#define  ZORRO_PROD_HACKER_SCSI                                        ZORRO_ID(HACKER, 0x01, 0)
+#define  ZORRO_PROD_RESOURCE_MANAGEMENT_FORCE_QUICKNET_QN2000  ZORRO_ID(HACKER, 0x02, 0)
+#define  ZORRO_PROD_VECTOR_CONNECTION_2                                ZORRO_ID(HACKER, 0xE0, 0)
+#define  ZORRO_PROD_VECTOR_CONNECTION_3                                ZORRO_ID(HACKER, 0xE1, 0)
+#define  ZORRO_PROD_VECTOR_CONNECTION_4                                ZORRO_ID(HACKER, 0xE2, 0)
+#define  ZORRO_PROD_VECTOR_CONNECTION_5                                ZORRO_ID(HACKER, 0xE3, 0)
diff --git a/include/net/atalkcall.h b/include/net/atalkcall.h
deleted file mode 100644 (file)
index 726e33c..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Separate to keep compilation of protocols.c simpler */
-extern void atalk_proto_init(struct net_proto *pro);
index f0c547d0b5d6a77e4cd1e2decb36997302d33508..50d4aa88953210ed18ad140a0e24c38576953d3e 100644 (file)
@@ -253,8 +253,6 @@ extern void ax25_ds_heartbeat_expiry(ax25_cb *);
 extern void ax25_ds_t3timer_expiry(ax25_cb *);
 extern void ax25_ds_idletimer_expiry(ax25_cb *);
 
-#include <net/ax25call.h>
-
 /* ax25_iface.c */
 extern int  ax25_protocol_register(unsigned int, int (*)(struct sk_buff *, ax25_cb *));
 extern void ax25_protocol_release(unsigned int);
diff --git a/include/net/ax25call.h b/include/net/ax25call.h
deleted file mode 100644 (file)
index 68b8a70..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Separate to keep compilation of protocols.c simpler */
-extern void ax25_proto_init(struct net_proto *pro);
diff --git a/include/net/decnet_call.h b/include/net/decnet_call.h
deleted file mode 100644 (file)
index 90a3056..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Separate to keep compilation of protocols.c simpler */
-extern void decnet_proto_init(struct net_proto *pro);
index c0d14663f32b52995dbdbe50c86794fa5442d8fc..624bc55ed95e09c9d330d326b70d49f7cf0434af 100644 (file)
@@ -9,6 +9,8 @@
 #ifndef _LINUX_DIVERT_H
 #define _LINUX_DIVERT_H
 
+#include <asm/types.h>
+
 #define        MAX_DIVERT_PORTS        8       /* Max number of ports to divert (tcp, udp) */
 
 /* Divertable protocols */
 #define        DIVERT_PROTO_TCP        0x0004
 #define        DIVERT_PROTO_UDP        0x0008
 
-#ifdef __KERNEL__
-       #define S16     s16
-       #define U16     u16
-       #define S32     s32
-       #define U32     u32
-       #define S64     s64
-       #define U64     u64
-#else
-       #define S16             __s16
-       #define U16             __u16
-       #define S32             __s32
-       #define U32             __u32
-       #define S64             __s64
-       #define U64             __u64
-#endif
-
 /*
  *     This is an Ethernet Frame Diverter option block
  */
@@ -41,10 +27,10 @@ struct divert_blk
 {
        int             divert;  /* are we active */
        unsigned int protos;    /* protocols */
-       U16             tcp_dst[MAX_DIVERT_PORTS]; /* specific tcp dst ports to divert */
-       U16             tcp_src[MAX_DIVERT_PORTS]; /* specific tcp src ports to divert */
-       U16             udp_dst[MAX_DIVERT_PORTS]; /* specific udp dst ports to divert */
-       U16             udp_src[MAX_DIVERT_PORTS]; /* specific udp src ports to divert */
+       u16             tcp_dst[MAX_DIVERT_PORTS]; /* specific tcp dst ports to divert */
+       u16             tcp_src[MAX_DIVERT_PORTS]; /* specific tcp src ports to divert */
+       u16             udp_dst[MAX_DIVERT_PORTS]; /* specific udp dst ports to divert */
+       u16             udp_src[MAX_DIVERT_PORTS]; /* specific udp src ports to divert */
 };
 
 /*
@@ -54,12 +40,12 @@ struct divert_blk
 
 typedef union _divert_cf_arg
 {
-       S16             int16;
-       U16             uint16;
-       S32             int32;
-       U32             uint32;
-       S64             int64;
-       U64             uint64;
+       s16             int16;
+       u16             uint16;
+       s32             int32;
+       u32             uint32;
+       s64             int64;
+       u64             uint64;
        void    *ptr;
 } divert_cf_arg;
 
index 667098922706ea25e7daefa4f3107a3e7d155edd..84e7cdb1dfd2ab0fa3fff5309d9b61f80aba0c0a 100644 (file)
@@ -41,8 +41,6 @@ struct ipxhdr
        ipx_address     ipx_source __attribute__ ((packed));
 };
 
-#include <net/ipxcall.h>
-
 typedef struct ipx_interface {
        /* IPX address */
        __u32           if_netnum;
diff --git a/include/net/ipxcall.h b/include/net/ipxcall.h
deleted file mode 100644 (file)
index eb5bd2b..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Separate to keep compilation of protocols.c simpler */
-extern void ipx_proto_init(struct net_proto *pro);
diff --git a/include/net/lapbcall.h b/include/net/lapbcall.h
deleted file mode 100644 (file)
index 825e7f2..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Separate to keep compilation of protocols.c simpler */
-extern void lapb_proto_init(struct net_proto *pro);
diff --git a/include/net/llccall.h b/include/net/llccall.h
deleted file mode 100644 (file)
index 07013ba..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-/* Separate to keep compilation of protocols.c simpler */
-extern void llc_init(struct net_proto *pro);
-
diff --git a/include/net/netbeuicall.h b/include/net/netbeuicall.h
deleted file mode 100644 (file)
index 5176f82..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Separate to keep compilation of protocols.c simpler */
-extern void netbeui_proto_init(struct net_proto *pro);
index 11aefe5fa93f2ed2fd1e8419220f6c4688ad78ec..21c9f8b866cdf47e6475349fb391f4aef7b913de 100644 (file)
@@ -121,8 +121,6 @@ extern void nr_destroy_socket(struct sock *);
 extern int  nr_rx_ip(struct sk_buff *, struct net_device *);
 extern int  nr_init(struct net_device *);
 
-#include <net/nrcall.h>
-
 /* nr_in.c */
 extern int  nr_process_rx_frame(struct sock *, struct sk_buff *);
 
diff --git a/include/net/nrcall.h b/include/net/nrcall.h
deleted file mode 100644 (file)
index 09ee699..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Separate to keep compilation of protocols.c simpler */
-extern void nr_proto_init(struct net_proto *pro);
diff --git a/include/net/p8022call.h b/include/net/p8022call.h
deleted file mode 100644 (file)
index 14f0c2c..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Separate to keep compilation of Space.c simpler */
-extern void p8022_proto_init(struct net_proto *);
diff --git a/include/net/psnapcall.h b/include/net/psnapcall.h
deleted file mode 100644 (file)
index 9da5763..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Separate to keep compilation of Space.c simpler */
-extern void snap_proto_init(struct net_proto *);
index da19fb64f1bb2130e97f5b6852404f2939b00dbc..f1f893e277cdee0f8db71de69cdb08b4e30747c5 100644 (file)
@@ -163,8 +163,6 @@ extern void rose_destroy_socket(struct sock *);
 extern int  rose_rx_ip(struct sk_buff *, struct net_device *);
 extern int  rose_init(struct net_device *);
 
-#include <net/rosecall.h>
-
 /* rose_in.c */
 extern int  rose_process_rx_frame(struct sock *, struct sk_buff *);
 
diff --git a/include/net/rosecall.h b/include/net/rosecall.h
deleted file mode 100644 (file)
index 5bbe69c..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Separate to keep compilation of protocols.c simpler */
-extern void rose_proto_init(struct net_proto *pro);
diff --git a/include/net/spxcall.h b/include/net/spxcall.h
deleted file mode 100644 (file)
index 0461fbb..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Separate to keep compilation of protocols.c simpler */
-extern void spx_proto_init(struct net_proto *pro);
index fb8346f819813306ba1e4e4f2fe9ca05f36cc6aa..fc3d83ee4e656075e13e99dfc31a11150c4fedee 100644 (file)
@@ -154,8 +154,6 @@ extern void x25_destroy_socket(struct sock *);
 extern int  x25_rx_call_request(struct sk_buff *, struct x25_neigh *, unsigned int);
 extern void x25_kill_by_neigh(struct x25_neigh *);
 
-#include <net/x25call.h>
-
 /* x25_dev.c */
 extern void x25_send_frame(struct sk_buff *, struct x25_neigh *);
 extern int  x25_lapb_receive_frame(struct sk_buff *, struct net_device *, struct packet_type *);
diff --git a/include/net/x25call.h b/include/net/x25call.h
deleted file mode 100644 (file)
index 7c478a1..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Separate to keep compilation of protocols.c simpler */
-extern void x25_proto_init(struct net_proto *pro);
index 5e5fbfe1b367652932fbf07452ac129d26787cda..15efa305c209a11b2d651c6ac170fcfdf40cc5ff 100644 (file)
@@ -28,22 +28,13 @@ extern const struct exception_table_entry __stop___ex_table[];
 
 static struct module kernel_module =
 {
-       sizeof(struct module),  /* size_of_struct */
-       NULL,                   /* next */
-       "",                     /* name */
-       0,                      /* size */
-       {ATOMIC_INIT(1)},       /* usecount */
-       MOD_RUNNING,            /* flags */
-       0,                      /* nsyms -- to filled in in init_modules */
-       0,                      /* ndeps */
-       __start___ksymtab,      /* syms */
-       NULL,                   /* deps */
-       NULL,                   /* refs */
-       NULL,                   /* init */
-       NULL,                   /* cleanup */
-       __start___ex_table,     /* ex_table_start */
-       __stop___ex_table,      /* ex_table_end */
-       /* Rest are NULL */
+       size_of_struct:         sizeof(struct module),
+       name:                   "",
+       uc:                     {ATOMIC_INIT(1)},
+       flags:                  MOD_RUNNING,
+       syms:                   __start___ksymtab,
+       ex_table_start:         __start___ex_table,     
+       ex_table_end:           __stop___ex_table
 };
 
 struct module *module_list = &kernel_module;
index d6e37fbf7b095614d91d693ccb8192d2c334b7f7..ac246f74589a5f3d53b322fddde86828f8f393bb 100644 (file)
@@ -22,7 +22,7 @@ extern void unblank_console(void);
 
 int panic_timeout;
 
-struct notifier_block *panic_notifier_list = NULL;
+struct notifier_block *panic_notifier_list;
 
 static int __init panic_setup(char *str)
 {
index af3d57bfd802abdb1aa056c671da8f5bf39162b0..7b967e30f71b474cdf96c16c91ead6a9435f5ec5 100644 (file)
@@ -45,7 +45,7 @@ int default_console_loglevel = DEFAULT_CONSOLE_LOGLEVEL;
 
 spinlock_t console_lock = SPIN_LOCK_UNLOCKED;
 
-struct console *console_drivers = NULL;
+struct console *console_drivers;
 static char log_buf[LOG_BUF_LEN];
 static unsigned long log_start;
 static unsigned long logged_chars;
index e4950d2e3ed3f3cd4ec67ec30d71a80673ff4e49..38eb5dee9ce8b8014ef5d8dbf36462e1d73a1645 100644 (file)
@@ -47,7 +47,7 @@ int C_A_D = 1;
  *     and the like. 
  */
 
-static struct notifier_block *reboot_notifier_list = NULL;
+static struct notifier_block *reboot_notifier_list;
 rwlock_t notifier_lock = RW_LOCK_UNLOCKED;
 
 /**
index 843ac0cbb174f1f3335a1871169886c397a58bc7..ffad77ad6203896bbcb5235ece1beda8748a3814 100644 (file)
@@ -34,7 +34,7 @@
  * The timezone where the local system is located.  Used as a default by some
  * programs who obtain this value by using gettimeofday.
  */
-struct timezone sys_tz = { 0, 0};
+struct timezone sys_tz;
 
 static void do_normal_gettime(struct timeval * tm)
 {
@@ -218,7 +218,7 @@ long pps_errcnt;            /* calibration errors */
 long pps_stbcnt;               /* stability limit exceeded */
 
 /* hook for a loadable hardpps kernel module */
-void (*hardpps_ptr)(struct timeval *) = (void (*)(struct timeval *))0;
+void (*hardpps_ptr)(struct timeval *);
 
 /* adjtimex mainly allows reading (and writing, if superuser) of
  * kernel time-keeping variables. used by xntpd.
index 0dd0a7331fea043f7ad1ddcc9fa9ebac64f04048..e67783a30b02b5476d3421319a3919f076c46c04 100644 (file)
@@ -164,7 +164,7 @@ static inline void internal_add_timer(struct timer_list *timer)
 spinlock_t timerlist_lock = SPIN_LOCK_UNLOCKED;
 
 #ifdef CONFIG_SMP
-volatile struct timer_list * volatile running_timer = NULL;
+volatile struct timer_list * volatile running_timer;
 #define timer_enter(t) do { running_timer = t; mb(); } while (0)
 #define timer_exit() do { running_timer = NULL; } while (0)
 #define timer_is_running(t) (running_timer == t)
index 0a8d37ba24502a2529482d107839f86d10a758ea..e9e9ef7bc4df1efb914c2f339a0310f64a05f4e9 100644 (file)
@@ -41,11 +41,15 @@ unsigned long __init bootmem_bootmap_pages (unsigned long pages)
 /*
  * Called once to set up the allocator itself.
  */
-static unsigned long __init init_bootmem_core (bootmem_data_t *bdata,
+static unsigned long __init init_bootmem_core (pg_data_t *pgdat,
        unsigned long mapstart, unsigned long start, unsigned long end)
 {
+       bootmem_data_t *bdata = pgdat->bdata;
        unsigned long mapsize = ((end - start)+7)/8;
 
+       pgdat->node_next = pgdat_list;
+       pgdat_list = pgdat;
+
        mapsize = (mapsize + (sizeof(long) - 1UL)) & ~(sizeof(long) - 1UL);
        bdata->node_bootmem_map = phys_to_virt(mapstart << PAGE_SHIFT);
        bdata->node_boot_start = (start << PAGE_SHIFT);
@@ -172,10 +176,6 @@ restart_scan:
                preferred = 0;
                goto restart_scan;
        }
-       /*
-        * Whoops, we cannot satisfy the allocation request.
-        */
-       BUG();
 found:
        if (start >= eidx)
                BUG();
@@ -221,15 +221,15 @@ found:
        return ret;
 }
 
-static unsigned long __init free_all_bootmem_core(int nid, bootmem_data_t *bdata)
+static unsigned long __init free_all_bootmem_core(pg_data_t *pgdat)
 {
-       struct page * page;
+       struct page *page = pgdat->node_mem_map;
+       bootmem_data_t *bdata = pgdat->bdata;
        unsigned long i, count, total = 0;
        unsigned long idx;
 
        if (!bdata->node_bootmem_map) BUG();
 
-       page = NODE_MEM_MAP(nid);
        count = 0;
        idx = bdata->node_low_pfn - (bdata->node_boot_start >> PAGE_SHIFT);
        for (i = 0; i < idx; i++, page++) {
@@ -260,59 +260,78 @@ static unsigned long __init free_all_bootmem_core(int nid, bootmem_data_t *bdata
        return total;
 }
 
-unsigned long __init init_bootmem_node (int nid, unsigned long freepfn, unsigned long startpfn, unsigned long endpfn)
+unsigned long __init init_bootmem_node (pg_data_t *pgdat, unsigned long freepfn, unsigned long startpfn, unsigned long endpfn)
 {
-       return(init_bootmem_core(NODE_DATA(nid)->bdata, freepfn, startpfn, endpfn));
+       return(init_bootmem_core(pgdat, freepfn, startpfn, endpfn));
 }
 
-void __init reserve_bootmem_node (int nid, unsigned long physaddr, unsigned long size)
+void __init reserve_bootmem_node (pg_data_t *pgdat, unsigned long physaddr, unsigned long size)
 {
-       reserve_bootmem_core(NODE_DATA(nid)->bdata, physaddr, size);
+       reserve_bootmem_core(pgdat->bdata, physaddr, size);
 }
 
-void __init free_bootmem_node (int nid, unsigned long physaddr, unsigned long size)
+void __init free_bootmem_node (pg_data_t *pgdat, unsigned long physaddr, unsigned long size)
 {
-       return(free_bootmem_core(NODE_DATA(nid)->bdata, physaddr, size));
+       return(free_bootmem_core(pgdat->bdata, physaddr, size));
 }
 
-unsigned long __init free_all_bootmem_node (int nid)
+unsigned long __init free_all_bootmem_node (pg_data_t *pgdat)
 {
-       return(free_all_bootmem_core(nid, NODE_DATA(nid)->bdata));
+       return(free_all_bootmem_core(pgdat));
 }
 
 unsigned long __init init_bootmem (unsigned long start, unsigned long pages)
 {
        max_low_pfn = pages;
        min_low_pfn = start;
-       return(init_bootmem_core(NODE_DATA(0)->bdata, start, 0, pages));
+       return(init_bootmem_core(&contig_page_data, start, 0, pages));
 }
 
 void __init reserve_bootmem (unsigned long addr, unsigned long size)
 {
-       reserve_bootmem_core(NODE_DATA(0)->bdata, addr, size);
+       reserve_bootmem_core(contig_page_data.bdata, addr, size);
 }
 
 void __init free_bootmem (unsigned long addr, unsigned long size)
 {
-       return(free_bootmem_core(NODE_DATA(0)->bdata, addr, size));
+       return(free_bootmem_core(contig_page_data.bdata, addr, size));
 }
 
 unsigned long __init free_all_bootmem (void)
 {
-       return(free_all_bootmem_core(0, NODE_DATA(0)->bdata));
+       return(free_all_bootmem_core(&contig_page_data));
 }
 
 void * __init __alloc_bootmem (unsigned long size, unsigned long align, unsigned long goal)
 {
+       pg_data_t *pgdat = pgdat_list;
+       void *ptr;
+
+       while (pgdat) {
+               if ((ptr = __alloc_bootmem_core(pgdat->bdata, size,
+                                               align, goal)))
+                       return(ptr);
+               pgdat = pgdat->node_next;
+       }
        /*
-        * In the discontigmem case, all non-node specific allocations come 
-        * from the first node, node 0.
+        * Whoops, we cannot satisfy the allocation request.
         */
-       return(__alloc_bootmem_core(NODE_DATA(0)->bdata, size, align, goal));
+       BUG();
+       return NULL;
 }
 
-void * __init __alloc_bootmem_node (int nid, unsigned long size, unsigned long align, unsigned long goal)
+void * __init __alloc_bootmem_node (pg_data_t *pgdat, unsigned long size, unsigned long align, unsigned long goal)
 {
-       return(__alloc_bootmem_core(NODE_DATA(nid)->bdata, size, align, goal));
+       void *ptr;
+
+       ptr = __alloc_bootmem_core(pgdat->bdata, size, align, goal);
+       if (ptr)
+               return (ptr);
+
+       /*
+        * Whoops, we cannot satisfy the allocation request.
+        */
+       BUG();
+       return NULL;
 }
 
index 68937481cf8e30e40e4d99a12633b596738ee71f..2a1248effe7f3de1ce0637cf664cdd417e9269a5 100644 (file)
@@ -1475,39 +1475,47 @@ int filemap_swapout(struct page * page, struct file * file)
        return retval;
 }
 
+/* Called with mm->page_table_lock held to protect against other
+ * threads/the swapper from ripping pte's out from under us.
+ */
 static inline int filemap_sync_pte(pte_t * ptep, struct vm_area_struct *vma,
        unsigned long address, unsigned int flags)
 {
        unsigned long pgoff;
-       pte_t pte = *ptep;
+       pte_t pte;
        struct page *page;
        int error;
 
+       pte = *ptep;
+
        if (!(flags & MS_INVALIDATE)) {
                if (!pte_present(pte))
-                       return 0;
-               if (!pte_dirty(pte))
-                       return 0;
+                       goto out;
+               if (!ptep_test_and_clear_dirty(ptep))
+                       goto out;
                flush_page_to_ram(pte_page(pte));
                flush_cache_page(vma, address);
-               set_pte(ptep, pte_mkclean(pte));
                flush_tlb_page(vma, address);
                page = pte_page(pte);
                page_cache_get(page);
        } else {
                if (pte_none(pte))
-                       return 0;
+                       goto out;
                flush_cache_page(vma, address);
-               pte_clear(ptep);
+
+               pte = ptep_get_and_clear(ptep);
                flush_tlb_page(vma, address);
+
                if (!pte_present(pte)) {
+                       spin_unlock(&vma->vm_mm->page_table_lock);
                        swap_free(pte_to_swp_entry(pte));
-                       return 0;
+                       spin_lock(&vma->vm_mm->page_table_lock);
+                       goto out;
                }
                page = pte_page(pte);
                if (!pte_dirty(pte) || flags == MS_INVALIDATE) {
                        page_cache_free(page);
-                       return 0;
+                       goto out;
                }
        }
        pgoff = (address - vma->vm_start) >> PAGE_CACHE_SHIFT;
@@ -1516,11 +1524,18 @@ static inline int filemap_sync_pte(pte_t * ptep, struct vm_area_struct *vma,
                printk("weirdness: pgoff=%lu index=%lu address=%lu vm_start=%lu vm_pgoff=%lu\n",
                        pgoff, page->index, address, vma->vm_start, vma->vm_pgoff);
        }
+
+       spin_unlock(&vma->vm_mm->page_table_lock);
        lock_page(page);
        error = filemap_write_page(vma->vm_file, page, 1);
        UnlockPage(page);
        page_cache_free(page);
+
+       spin_lock(&vma->vm_mm->page_table_lock);
        return error;
+
+out:
+       return 0;
 }
 
 static inline int filemap_sync_pte_range(pmd_t * pmd,
@@ -1590,6 +1605,11 @@ int filemap_sync(struct vm_area_struct * vma, unsigned long address,
        unsigned long end = address + size;
        int error = 0;
 
+       /* Aquire the lock early; it may be possible to avoid dropping
+        * and reaquiring it repeatedly.
+        */
+       spin_lock(&vma->vm_mm->page_table_lock);
+
        dir = pgd_offset(vma->vm_mm, address);
        flush_cache_range(vma->vm_mm, end - size, end);
        if (address >= end)
@@ -1600,6 +1620,9 @@ int filemap_sync(struct vm_area_struct * vma, unsigned long address,
                dir++;
        } while (address && (address < end));
        flush_tlb_range(vma->vm_mm, end - size, end);
+
+       spin_unlock(&vma->vm_mm->page_table_lock);
+
        return error;
 }
 
index 2b7d17fa71d4cc59260bf8b788805f6f78afeb4a..d83d9bb879b955949f2f74e8dc0b3e28c075929f 100644 (file)
@@ -130,10 +130,9 @@ static void flush_all_zero_pkmaps(void)
                if (pkmap_count[i] != 1)
                        continue;
                pkmap_count[i] = 0;
-               pte = pkmap_page_table[i];
+               pte = ptep_get_and_clear(pkmap_page_table+i);
                if (pte_none(pte))
                        BUG();
-               pte_clear(pkmap_page_table+i);
                page = pte_page(pte);
                page->virtual = NULL;
        }
index f1d2e13c9b185b2b0c1d52c2cbc4a7d63b53e3d3..4fb1334617e94d0d6288d81d874112cff9c5747c 100644 (file)
@@ -215,30 +215,30 @@ skip_copy_pte_range:              address = (address + PMD_SIZE) & PMD_MASK;
                                /* copy_one_pte */
 
                                if (pte_none(pte))
-                                       goto cont_copy_pte_range;
+                                       goto cont_copy_pte_range_noset;
                                if (!pte_present(pte)) {
                                        swap_duplicate(pte_to_swp_entry(pte));
-                                       set_pte(dst_pte, pte);
                                        goto cont_copy_pte_range;
                                }
                                ptepage = pte_page(pte);
                                if ((!VALID_PAGE(ptepage)) || 
-                                   PageReserved(ptepage)) {
-                                       set_pte(dst_pte, pte);
+                                   PageReserved(ptepage))
                                        goto cont_copy_pte_range;
-                               }
+
                                /* If it's a COW mapping, write protect it both in the parent and the child */
                                if (cow) {
-                                       pte = pte_wrprotect(pte);
-                                       set_pte(src_pte, pte);
+                                       ptep_clear_wrprotect(src_pte);
+                                       pte = *src_pte;
                                }
+
                                /* If it's a shared mapping, mark it clean in the child */
                                if (vma->vm_flags & VM_SHARED)
                                        pte = pte_mkclean(pte);
-                               set_pte(dst_pte, pte_mkold(pte));
+                               pte = pte_mkold(pte);
                                get_page(ptepage);
-                       
-cont_copy_pte_range:           address += PAGE_SIZE;
+
+cont_copy_pte_range:           set_pte(dst_pte, pte);
+cont_copy_pte_range_noset:     address += PAGE_SIZE;
                                if (address >= end)
                                        goto out;
                                src_pte++;
@@ -306,10 +306,9 @@ static inline int zap_pte_range(struct mm_struct *mm, pmd_t * pmd, unsigned long
                pte_t page;
                if (!size)
                        break;
-               page = *pte;
+               page = ptep_get_and_clear(pte);
                pte++;
                size--;
-               pte_clear(pte-1);
                if (pte_none(page))
                        continue;
                freed += free_pte(page);
@@ -642,7 +641,7 @@ static inline void zeromap_pte_range(pte_t * pte, unsigned long address,
                end = PMD_SIZE;
        do {
                pte_t zero_pte = pte_wrprotect(mk_pte(ZERO_PAGE(address), prot));
-               pte_t oldpage = *pte;
+               pte_t oldpage = ptep_get_and_clear(pte);
                set_pte(pte, zero_pte);
                forget_pte(oldpage);
                address += PAGE_SIZE;
@@ -712,8 +711,8 @@ static inline void remap_pte_range(pte_t * pte, unsigned long address, unsigned
                end = PMD_SIZE;
        do {
                struct page *page;
-               pte_t oldpage = *pte;
-               pte_clear(pte);
+               pte_t oldpage;
+               oldpage = ptep_get_and_clear(pte);
 
                page = virt_to_page(__va(phys_addr));
                if ((!VALID_PAGE(page)) || PageReserved(page))
@@ -746,6 +745,7 @@ static inline int remap_pmd_range(pmd_t * pmd, unsigned long address, unsigned l
        return 0;
 }
 
+/*  Note: this is only safe if the mm semaphore is held when called. */
 int remap_page_range(unsigned long from, unsigned long phys_addr, unsigned long size, pgprot_t prot)
 {
        int error = 0;
@@ -867,7 +867,7 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct * vma,
        /*
         * Re-check the pte - we dropped the lock
         */
-       if (pte_val(*page_table) == pte_val(pte)) {
+       if (pte_same(*page_table, pte)) {
                if (PageReserved(old_page))
                        ++mm->rss;
                break_cow(vma, old_page, new_page, address, page_table);
@@ -1214,7 +1214,7 @@ static inline int handle_pte_fault(struct mm_struct *mm,
         * didn't change from under us..
         */
        spin_lock(&mm->page_table_lock);
-       if (pte_val(entry) == pte_val(*pte)) {
+       if (pte_same(entry, *pte)) {
                if (write_access) {
                        if (!pte_write(entry))
                                return do_wp_page(mm, vma, address, pte, entry);
index b62536c7fea807b50e070abe7a2e3d5ebab51eef..7b61abb3e46bb9fceabed921a448000a85c1bb06 100644 (file)
@@ -30,9 +30,16 @@ static inline void change_pte_range(pmd_t * pmd, unsigned long address,
        if (end > PMD_SIZE)
                end = PMD_SIZE;
        do {
-               pte_t entry = *pte;
-               if (pte_present(entry))
+               if (pte_present(*pte)) {
+                       pte_t entry;
+
+                       /* Avoid an SMP race with hardware updated dirty/clean
+                        * bits by wiping the pte and then setting the new pte
+                        * into place.
+                        */
+                       entry = ptep_get_and_clear(pte);
                        set_pte(pte, pte_modify(entry, newprot));
+               }
                address += PAGE_SIZE;
                pte++;
        } while (address && (address < end));
index ebc27b74452487c5ec98f226a4da9fa5f0c9e062..719ca1ec156f118fb5546f7e3ef5fe5a8547495e 100644 (file)
@@ -63,14 +63,14 @@ static inline int copy_one_pte(struct mm_struct *mm, pte_t * src, pte_t * dst)
        pte_t pte;
 
        spin_lock(&mm->page_table_lock);
-       pte = *src;
-       if (!pte_none(pte)) {
-               error++;
-               if (dst) {
-                       pte_clear(src);
-                       set_pte(dst, pte);
-                       error--;
+       if (!pte_none(*src)) {
+               pte = ptep_get_and_clear(src);
+               if (!dst) {
+                       /* No dest?  We must put it back. */
+                       dst = src;
+                       error++;
                }
+               set_pte(dst, pte);
        }
        spin_unlock(&mm->page_table_lock);
        return error;
index 60f8350a0d0217fe6c86a55bb851e6eab0a003cb..47cb72ec63cbd55962fd9ebe983f562179fc83b6 100644 (file)
--- a/mm/numa.c
+++ b/mm/numa.c
@@ -78,7 +78,7 @@ void __init free_area_init_node(int nid, pg_data_t *pgdat, struct page *pmap,
        for (i = 0; i < MAX_NR_ZONES; i++)
                size += zones_size[i];
        size = LONG_ALIGN((size + 7) >> 3);
-       pgdat->valid_addr_bitmap = (unsigned long *)alloc_bootmem_node(nid, size);
+       pgdat->valid_addr_bitmap = (unsigned long *)alloc_bootmem_node(pgdat, size);
        memset(pgdat->valid_addr_bitmap, 0, size);
 }
 
index 0a8aa7cf85e009f7609e693593a261859071109c..90c07743935c0a4249171b8ede836a38774ee9d3 100644 (file)
@@ -261,7 +261,7 @@ static struct page * __alloc_pages_limit(zonelist_t *zonelist,
                                water_mark = z->pages_high;
                }
 
-               if (z->free_pages + z->inactive_clean_pages >= water_mark) {
+               if (z->free_pages + z->inactive_clean_pages > water_mark) {
                        struct page *page = NULL;
                        /* If possible, reclaim a page directly. */
                        if (direct_reclaim && z->free_pages < z->pages_min + 8)
@@ -287,7 +287,7 @@ struct page * __alloc_pages(zonelist_t *zonelist, unsigned long order)
        zone_t **zone;
        int direct_reclaim = 0;
        unsigned int gfp_mask = zonelist->gfp_mask;
-       struct page * page = NULL;
+       struct page * page;
 
        /*
         * Allocations put pressure on the VM subsystem.
@@ -510,17 +510,17 @@ try_again:
                 * happen when the OOM killer selects this task for
                 * instant execution...
                 */
-               if (direct_reclaim)
+               if (direct_reclaim) {
                        page = reclaim_page(z);
-               if (page)
-                       return page;
+                       if (page)
+                               return page;
+               }
 
                /* XXX: is pages_min/4 a good amount to reserve for this? */
                if (z->free_pages < z->pages_min / 4 &&
                                !(current->flags & PF_MEMALLOC))
                        continue;
-               if (!page)
-                       page = rmqueue(z, order);
+               page = rmqueue(z, order);
                if (page)
                        return page;
        }
@@ -779,9 +779,6 @@ void __init free_area_init_core(int nid, pg_data_t *pgdat, struct page **gmap,
        unsigned long totalpages, offset, realtotalpages;
        unsigned int cumulative = 0;
 
-       pgdat->node_next = pgdat_list;
-       pgdat_list = pgdat;
-
        totalpages = 0;
        for (i = 0; i < MAX_NR_ZONES; i++) {
                unsigned long size = zones_size[i];
@@ -806,7 +803,7 @@ void __init free_area_init_core(int nid, pg_data_t *pgdat, struct page **gmap,
         */
        map_size = (totalpages + 1)*sizeof(struct page);
        if (lmem_map == (struct page *)0) {
-               lmem_map = (struct page *) alloc_bootmem_node(nid, map_size);
+               lmem_map = (struct page *) alloc_bootmem_node(pgdat, map_size);
                lmem_map = (struct page *)(PAGE_OFFSET + 
                        MAP_ALIGN((unsigned long)lmem_map - PAGE_OFFSET));
        }
@@ -898,7 +895,7 @@ void __init free_area_init_core(int nid, pg_data_t *pgdat, struct page **gmap,
                        bitmap_size = (bitmap_size + 7) >> 3;
                        bitmap_size = LONG_ALIGN(bitmap_size);
                        zone->free_area[i].map = 
-                         (unsigned int *) alloc_bootmem_node(nid, bitmap_size);
+                         (unsigned int *) alloc_bootmem_node(pgdat, bitmap_size);
                }
        }
        build_zonelists(pgdat);
index 4cad5deab84cf9a27a0885b8dc85f29be3ef8cab..688e2fcddb49ae8cd66b124ff9e55e1d0156facf 100644 (file)
@@ -223,10 +223,10 @@ static inline void unuse_pte(struct vm_area_struct * vma, unsigned long address,
                if (pte_page(pte) != page)
                        return;
                /* We will be removing the swap cache in a moment, so... */
-               set_pte(dir, pte_mkdirty(pte));
+               ptep_mkdirty(dir);
                return;
        }
-       if (pte_val(pte) != entry.val)
+       if (pte_to_swp_entry(pte).val != entry.val)
                return;
        set_pte(dir, pte_mkdirty(mk_pte(page, vma->vm_page_prot)));
        swap_free(entry);
index f94f88018da265c4bc1cda652665a908116782d1..15261612eeff454584797c0b557fb9671f8ccc4f 100644 (file)
@@ -34,8 +34,8 @@ static inline void free_area_pte(pmd_t * pmd, unsigned long address, unsigned lo
        if (end > PMD_SIZE)
                end = PMD_SIZE;
        do {
-               pte_t page = *pte;
-               pte_clear(pte);
+               pte_t page;
+               page = ptep_get_and_clear(pte);
                address += PAGE_SIZE;
                pte++;
                if (pte_none(page))
index 26fd18455896717de36540d67d2ff31fbea455de..ccbe6de9ec540411e15b575f92b7d09a16ca6d8e 100644 (file)
@@ -55,8 +55,7 @@ static int try_to_swap_out(struct mm_struct * mm, struct vm_area_struct* vma, un
 
        onlist = PageActive(page);
        /* Don't look at this pte if it's been accessed recently. */
-       if (pte_young(pte)) {
-               set_pte(page_table, pte_mkold(pte));
+       if (ptep_test_and_clear_young(page_table)) {
                if (onlist) {
                        /*
                         * Transfer the "accessed" bit from the page
@@ -99,6 +98,10 @@ static int try_to_swap_out(struct mm_struct * mm, struct vm_area_struct* vma, un
        if (PageSwapCache(page)) {
                entry.val = page->index;
                swap_duplicate(entry);
+               if (pte_dirty(pte))
+                       BUG();
+               if (pte_write(pte))
+                       BUG();
                set_pte(page_table, swp_entry_to_pte(entry));
 drop_pte:
                UnlockPage(page);
@@ -109,6 +112,13 @@ drop_pte:
                goto out_failed;
        }
 
+       /* From this point on, the odds are that we're going to
+        * nuke this pte, so read and clear the pte.  This hook
+        * is needed on CPUs which update the accessed and dirty
+        * bits in hardware.
+        */
+       pte = ptep_get_and_clear(page_table);
+
        /*
         * Is it a clean page? Then it must be recoverable
         * by just paging it in again, and we can just drop
@@ -124,7 +134,6 @@ drop_pte:
         */
        if (!pte_dirty(pte)) {
                flush_cache_page(vma, address);
-               pte_clear(page_table);
                goto drop_pte;
        }
 
@@ -134,7 +143,7 @@ drop_pte:
         * locks etc.
         */
        if (!(gfp_mask & __GFP_IO))
-               goto out_unlock;
+               goto out_unlock_restore;
 
        /*
         * Don't do any of the expensive stuff if
@@ -143,7 +152,7 @@ drop_pte:
        if (page->zone->free_pages + page->zone->inactive_clean_pages
                                        + page->zone->inactive_dirty_pages
                        > page->zone->pages_high + inactive_target)
-               goto out_unlock;
+               goto out_unlock_restore;
 
        /*
         * Ok, it's really dirty. That means that
@@ -169,7 +178,7 @@ drop_pte:
                int error;
                struct file *file = vma->vm_file;
                if (file) get_file(file);
-               pte_clear(page_table);
+
                mm->rss--;
                flush_tlb_page(vma, address);
                spin_unlock(&mm->page_table_lock);
@@ -191,7 +200,7 @@ drop_pte:
         */
        entry = get_swap_page();
        if (!entry.val)
-               goto out_unlock; /* No swap space left */
+               goto out_unlock_restore; /* No swap space left */
 
        if (!(page = prepare_highmem_swapout(page)))
                goto out_swap_free;
@@ -215,10 +224,12 @@ out_free_success:
        page_cache_release(page);
        return 1;
 out_swap_free:
+       set_pte(page_table, pte);
        swap_free(entry);
 out_failed:
        return 0;
-out_unlock:
+out_unlock_restore:
+       set_pte(page_table, pte);
        UnlockPage(page);
        return 0;
 }
index 792bfd5e8128373195db3024beb7550611f625d4..987d8a5c450babdc11e9f6a9784bc77a8f76d9a9 100644 (file)
@@ -204,24 +204,11 @@ EXPORT_SYMBOL(llc_cancel_timers);
 
 #define ALL_TYPES_8022 0
 
-void __init llc_init(struct net_proto *proto)
+static int __init llc_init(void)
 {
        printk(KERN_NOTICE "IEEE 802.2 LLC for Linux 2.1 (c) 1996 Tim Alpaerts\n");
-       return;
-}
-
-#ifdef MODULE
-
-
-int init_module(void)
-{
-       llc_init(NULL);
        return 0;
 }
 
-void cleanup_module(void)
-{
-
-}
 
-#endif
+module_init(llc_init);
index 9be3100dd54ba77b1ffe279744177e4d6de21046..41a755e88842a67e648e4fab07dc699077b9ea16 100644 (file)
@@ -90,12 +90,15 @@ static struct packet_type p8022_packet_type =
 EXPORT_SYMBOL(register_8022_client);
 EXPORT_SYMBOL(unregister_8022_client);
 
-void __init p8022_proto_init(struct net_proto *pro)
+static int __init p8022_init(void)
 {
        p8022_packet_type.type=htons(ETH_P_802_2);
        dev_add_pack(&p8022_packet_type);
+       return 0;
 }
 
+module_init(p8022_init);
+
 struct datalink_proto *register_8022_client(unsigned char type, int (*rcvfunc)(struct sk_buff *, struct net_device *, struct packet_type *))
 {
        struct datalink_proto   *proto;
index 3c493d7d9ec41d84afb1f28143f523b2159eb5dd..907ac1b5465268c8d35fe22b28a8b654444385ad 100644 (file)
@@ -89,12 +89,14 @@ static void snap_datalink_header(struct datalink_proto *dl, struct sk_buff *skb,
 EXPORT_SYMBOL(register_snap_client);
 EXPORT_SYMBOL(unregister_snap_client);
 
-void __init snap_proto_init(struct net_proto *pro)
+static int __init snap_init(void)
 {
        snap_dl=register_8022_client(0xAA, snap_rcv);
        if(snap_dl==NULL)
                printk("SNAP - unable to register with 802.2\n");
+       return 0;
 }
+module_init(snap_init);
 
 /*
  *     Register SNAP clients. We don't yet use this for IP.
index 0979292575276b846b25c25875e6015306a1b96e..73c9384864090db2b5f3d79bb2050d6f2f518b6d 100644 (file)
@@ -540,7 +540,7 @@ static int rif_get_info(char *buffer,char **start, off_t offset, int length)
  *     too much for this.
  */
 
-void __init rif_init(struct net_proto *unused)
+static int __init rif_init(void)
 {
        rif_timer.expires  = RIF_TIMEOUT;
        rif_timer.data     = 0L;
@@ -549,4 +549,7 @@ void __init rif_init(struct net_proto *unused)
        add_timer(&rif_timer);
 
        proc_net_create("tr_rif",0,rif_get_info);
+       return 0;
 }
+
+module_init(rif_init);
index 44f47fabca0a58741b7fd650d7df068d9c7e357c..fcccc4e6de43fc9af72ff2baa89a8d2fd626643e 100644 (file)
@@ -46,7 +46,7 @@ subdir-$(CONFIG_DECNET)               += decnet
 subdir-$(CONFIG_ECONET)                += econet
 
 
-obj-y  := socket.o protocols.o $(join $(subdir-y), $(patsubst %,/%.o,$(notdir $(subdir-y))))
+obj-y  := socket.o $(join $(subdir-y), $(patsubst %,/%.o,$(notdir $(subdir-y))))
 ifeq ($(CONFIG_NET),y)
 obj-$(CONFIG_MODULES)          += netsyms.o
 obj-$(CONFIG_SYSCTL)           += sysctl_net.o
index 260a5e5304259af69888348830be2cfc9e274b6c..e7784dabd0cbaafcb1a579c52ba9d4c1b358c0ac 100644 (file)
@@ -2120,7 +2120,7 @@ EXPORT_SYMBOL(atalk_find_dev_addr);
 
 /* Called by proto.c on kernel start up */
 
-void __init atalk_proto_init(struct net_proto *pro)
+static int __init atalk_init(void)
 {
        (void) sock_register(&atalk_family_ops);
        if((ddp_dl = register_snap_client(ddp_snap_id, atalk_rcv)) == NULL)
@@ -2148,16 +2148,11 @@ void __init atalk_proto_init(struct net_proto *pro)
 #endif /* CONFIG_SYSCTL */
 
        printk(KERN_INFO "NET4: AppleTalk 0.18 for Linux NET4.0\n");
+       return 0;
 }
+module_init(atalk_init);
 
 #ifdef MODULE
-
-int init_module(void)
-{
-       atalk_proto_init(NULL);
-       return (0);
-}
-
 /*
  * Note on MOD_{INC,DEC}_USE_COUNT:
  *
@@ -2171,7 +2166,7 @@ int init_module(void)
  * sockets be closed from user space.
  */
 
-void cleanup_module(void)
+static void __exit atalk_exit(void)
 {
 #ifdef CONFIG_SYSCTL
        atalk_unregister_sysctl();
@@ -2195,6 +2190,7 @@ void cleanup_module(void)
 
        return;
 }
-
+module_exit(atalk_exit);
 #endif  /* MODULE */
+
 #endif  /* CONFIG_ATALK || CONFIG_ATALK_MODULE */
index fc71c2435093979964a72f111400cde0568fd856..ff28ed551a7367f7bef363176470efd993e20f98 100644 (file)
@@ -123,7 +123,7 @@ static struct net_proto_family pvc_family_ops = {
  */
 
 
-void __init atmpvc_proto_init(struct net_proto *pro)
+static int __init atmpvc_init(void)
 {
        int error;
 
@@ -139,4 +139,7 @@ void __init atmpvc_proto_init(struct net_proto *pro)
        error = atm_proc_init();
        if (error) printk("atm_proc_init fails with %d\n",error);
 #endif
+       return 0;
 }
+
+module_init(atmpvc_init);
index bffe7aac55c18664eb410e802baf7a82d146648c..7984cb22ab9b9f0bf103293d02a9c037be7e9f0c 100644 (file)
@@ -442,10 +442,13 @@ static struct net_proto_family svc_family_ops = {
  *     Initialize the ATM SVC protocol family
  */
 
-void __init atmsvc_proto_init(struct net_proto *pro)
+static int __init atmsvc_init(void)
 {
        if (sock_register(&svc_family_ops) < 0) {
                printk(KERN_ERR "ATMSVC: can't register");
-               return;
+               return -1;
        }
+       return 0;
 }
+
+module_init(atmsvc_init);
index 02874c103e237516a95a5bb37704cecfc344dc16..8e34e42e2040e47bbc20d4c94bda97b2991d397e 100644 (file)
  *                                             ax25_connect() and ax25_sendmsg()
  *                     Joerg(DL1BKE)           Added support for SO_BINDTODEVICE
  *                     Arnaldo C. Melo         s/suser/capable(CAP_NET_ADMIN)/, some more cleanups
+ *                     Michal Ostrowski        Module initialization cleanup.
  */
 
 #include <linux/config.h>
 #include <net/ip.h>
 #include <net/arp.h>
 
+
+
 ax25_cb *volatile ax25_list = NULL;
 
 static struct proto_ops ax25_proto_ops;
@@ -1844,7 +1847,7 @@ EXPORT_SYMBOL(asc2ax);
 EXPORT_SYMBOL(null_ax25_address);
 EXPORT_SYMBOL(ax25_display_timer);
 
-void __init ax25_proto_init(struct net_proto *pro)
+static int __init ax25_init(void)
 {
        sock_register(&ax25_family_ops);
        ax25_packet_type.type = htons(ETH_P_AX25);
@@ -1861,20 +1864,16 @@ void __init ax25_proto_init(struct net_proto *pro)
 #endif
 
        printk(KERN_INFO "NET4: G4KLX/GW4PTS AX.25 for Linux. Version 0.37 for Linux NET4.0\n");
+       return 0;
 }
+module_init(ax25_init);
+
 
 #ifdef MODULE
 MODULE_AUTHOR("Jonathan Naylor G4KLX <g4klx@g4klx.demon.co.uk>");
 MODULE_DESCRIPTION("The amateur radio AX.25 link layer protocol");
 
-int init_module(void)
-{
-       ax25_proto_init(NULL);
-
-       return 0;
-}
-
-void cleanup_module(void)
+static void __exit ax25_exit(void)
 {
 #ifdef CONFIG_PROC_FS
        proc_net_remove("ax25_route");
@@ -1895,6 +1894,7 @@ void cleanup_module(void)
 
        sock_unregister(PF_AX25);
 }
-#endif
+module_exit(ax25_exit);
+#endif /* MODULE */
 
 #endif
index cf590db040370cafd6d9074312de1891d2ca57f0..6b24a1416501d92c2b5bf20ddc3d38e2168cef3c 100644 (file)
@@ -13,6 +13,7 @@
  *                                     rather than any time but...
  *             Alan Cox        :       IFF_ALLMULTI support.
  *             Alan Cox        :       New format set_multicast_list() calls.
+ *             Gleb Natapov    :       Remove dev_mc_lock.
  *
  *     This program is free software; you can redistribute it and/or
  *     modify it under the terms of the GNU General Public License
  *     Device mc lists are changed by bh at least if IPv6 is enabled,
  *     so that it must be bh protected.
  *
- *     We protect all mc lists with global rw lock
- *     and block accesses to device mc filters with dev->xmit_lock.
+ *     We block accesses to device mc filters with dev->xmit_lock.
  */
-static rwlock_t dev_mc_lock = RW_LOCK_UNLOCKED;
 
 /*
  *     Update the multicast list into the physical NIC controller.
  */
  
-void dev_mc_upload(struct net_device *dev)
+static void __dev_mc_upload(struct net_device *dev)
 {
        /* Don't do anything till we up the interface
         * [dev_open will call this function so the list will
@@ -87,13 +86,14 @@ void dev_mc_upload(struct net_device *dev)
            !netif_device_present(dev))
                return;
 
-       read_lock_bh(&dev_mc_lock);
-       spin_lock(&dev->xmit_lock);
-       dev->xmit_lock_owner = smp_processor_id();
        dev->set_multicast_list(dev);
-       dev->xmit_lock_owner = -1;
-       spin_unlock(&dev->xmit_lock);
-       read_unlock_bh(&dev_mc_lock);
+}
+
+void dev_mc_upload(struct net_device *dev)
+{
+       spin_lock_bh(&dev->xmit_lock);
+       __dev_mc_upload(dev);
+       spin_unlock_bh(&dev->xmit_lock);
 }
 
 /*
@@ -105,7 +105,8 @@ int dev_mc_delete(struct net_device *dev, void *addr, int alen, int glbl)
        int err = 0;
        struct dev_mc_list *dmi, **dmip;
 
-       write_lock_bh(&dev_mc_lock);
+       spin_lock_bh(&dev->xmit_lock);
+
        for (dmip = &dev->mc_list; (dmi = *dmip) != NULL; dmip = &dmi->next) {
                /*
                 *      Find the entry we want to delete. The device could
@@ -127,7 +128,6 @@ int dev_mc_delete(struct net_device *dev, void *addr, int alen, int glbl)
                         */
                        *dmip = dmi->next;
                        dev->mc_count--;
-                       write_unlock_bh(&dev_mc_lock);
 
                        kfree(dmi);
 
@@ -135,13 +135,15 @@ int dev_mc_delete(struct net_device *dev, void *addr, int alen, int glbl)
                         *      We have altered the list, so the card
                         *      loaded filter is now wrong. Fix it
                         */
-                       dev_mc_upload(dev);
+                       __dev_mc_upload(dev);
+                       
+                       spin_unlock_bh(&dev->xmit_lock);
                        return 0;
                }
        }
        err = -ENOENT;
 done:
-       write_unlock_bh(&dev_mc_lock);
+       spin_unlock_bh(&dev->xmit_lock);
        return err;
 }
 
@@ -156,7 +158,7 @@ int dev_mc_add(struct net_device *dev, void *addr, int alen, int glbl)
 
        dmi1 = (struct dev_mc_list *)kmalloc(sizeof(*dmi), GFP_ATOMIC);
 
-       write_lock_bh(&dev_mc_lock);
+       spin_lock_bh(&dev->xmit_lock);
        for (dmi = dev->mc_list; dmi != NULL; dmi = dmi->next) {
                if (memcmp(dmi->dmi_addr, addr, dmi->dmi_addrlen) == 0 &&
                    dmi->dmi_addrlen == alen) {
@@ -172,7 +174,7 @@ int dev_mc_add(struct net_device *dev, void *addr, int alen, int glbl)
        }
 
        if ((dmi = dmi1) == NULL) {
-               write_unlock_bh(&dev_mc_lock);
+               spin_unlock_bh(&dev->xmit_lock);
                return -ENOMEM;
        }
        memcpy(dmi->dmi_addr, addr, alen);
@@ -182,12 +184,14 @@ int dev_mc_add(struct net_device *dev, void *addr, int alen, int glbl)
        dmi->dmi_gusers = glbl ? 1 : 0;
        dev->mc_list = dmi;
        dev->mc_count++;
-       write_unlock_bh(&dev_mc_lock);
-       dev_mc_upload(dev);
+
+       __dev_mc_upload(dev);
+       
+       spin_unlock_bh(&dev->xmit_lock);
        return 0;
 
 done:
-       write_unlock_bh(&dev_mc_lock);
+       spin_unlock_bh(&dev->xmit_lock);
        if (dmi1)
                kfree(dmi1);
        return err;
@@ -199,7 +203,8 @@ done:
 
 void dev_mc_discard(struct net_device *dev)
 {
-       write_lock_bh(&dev_mc_lock);
+       spin_lock_bh(&dev->xmit_lock);
+       
        while (dev->mc_list != NULL) {
                struct dev_mc_list *tmp = dev->mc_list;
                dev->mc_list = tmp->next;
@@ -208,7 +213,8 @@ void dev_mc_discard(struct net_device *dev)
                kfree(tmp);
        }
        dev->mc_count = 0;
-       write_unlock_bh(&dev_mc_lock);
+
+       spin_unlock_bh(&dev->xmit_lock);
 }
 
 #ifdef CONFIG_PROC_FS
@@ -222,7 +228,7 @@ static int dev_mc_read_proc(char *buffer, char **start, off_t offset,
 
        read_lock(&dev_base_lock);
        for (dev = dev_base; dev; dev = dev->next) {
-               read_lock_bh(&dev_mc_lock);
+               spin_lock_bh(&dev->xmit_lock);
                for (m = dev->mc_list; m; m = m->next) {
                        int i;
 
@@ -240,11 +246,11 @@ static int dev_mc_read_proc(char *buffer, char **start, off_t offset,
                                begin = pos;
                        }
                        if (pos > offset + length) {
-                               read_unlock_bh(&dev_mc_lock);
+                               spin_unlock_bh(&dev->xmit_lock);
                                goto done;
                        }
                }
-               read_unlock_bh(&dev_mc_lock);
+               spin_unlock_bh(&dev->xmit_lock);
        }
        *eof = 1;
 
index 348c30fce6d584803d22a5f71507926b396caf95..8de4439798a574d27e987bf5d9871fadc7a0f6d3 100644 (file)
@@ -2053,8 +2053,36 @@ void dn_register_sysctl(void);
 void dn_unregister_sysctl(void);
 #endif
 
-void __init decnet_proto_init(struct net_proto *pro)
+
+#ifdef MODULE
+EXPORT_NO_SYMBOLS;
+MODULE_DESCRIPTION("The Linux DECnet Network Protocol");
+MODULE_AUTHOR("Linux DECnet Project Team");
+
+static int addr[2] = {0, 0};
+
+MODULE_PARM(addr, "2i");
+MODULE_PARM_DESC(addr, "The DECnet address of this machine: area,node");
+#endif
+
+
+static int __init decnet_init(void)
 {
+#ifdef MODULE
+       if (addr[0] > 63 || addr[0] < 0) {
+               printk(KERN_ERR "DECnet: Area must be between 0 and 63");
+               return 1;
+       }
+
+       if (addr[1] > 1023 || addr[1] < 0) {
+               printk(KERN_ERR "DECnet: Node must be between 0 and 1023");
+               return 1;
+       }
+
+       decnet_address = dn_htons((addr[0] << 10) | addr[1]);
+       dn_dn2eth(decnet_ether_address, dn_ntohs(decnet_address));
+#endif
+
         printk(KERN_INFO "NET4: DECnet for Linux: V.2.3.49s (C) 1995-2000 Linux DECnet Project Team\n");
 
        sock_register(&dn_family_ops);
@@ -2074,6 +2102,7 @@ void __init decnet_proto_init(struct net_proto *pro)
 #ifdef CONFIG_SYSCTL
        dn_register_sysctl();
 #endif /* CONFIG_SYSCTL */
+       return 0;
 
 }
 
@@ -2093,37 +2122,7 @@ static int __init decnet_setup(char *str)
 __setup("decnet=", decnet_setup);
 #endif
 
-#ifdef MODULE
-EXPORT_NO_SYMBOLS;
-MODULE_DESCRIPTION("The Linux DECnet Network Protocol");
-MODULE_AUTHOR("Linux DECnet Project Team");
-
-static int addr[2] = {0, 0};
-
-MODULE_PARM(addr, "2i");
-MODULE_PARM_DESC(addr, "The DECnet address of this machine: area,node");
-
-int __init init_module(void)
-{
-       if (addr[0] > 63 || addr[0] < 0) {
-               printk(KERN_ERR "DECnet: Area must be between 0 and 63");
-               return 1;
-       }
-
-       if (addr[1] > 1023 || addr[1] < 0) {
-               printk(KERN_ERR "DECnet: Node must be between 0 and 1023");
-               return 1;
-       }
-
-       decnet_address = dn_htons((addr[0] << 10) | addr[1]);
-       dn_dn2eth(decnet_ether_address, dn_ntohs(decnet_address));
-
-       decnet_proto_init(NULL);
-
-       return 0;
-}
-
-void __exit cleanup_module(void)
+static void __exit decnet_exit(void)
 {
 #ifdef CONFIG_SYSCTL
        dn_unregister_sysctl();
@@ -2145,4 +2144,5 @@ void __exit cleanup_module(void)
        sock_unregister(AF_DECnet);
 }
 
-#endif
+module_init(decnet_init);
+module_exit(decnet_exit);
index 7a2a815ce4a89853472107d9f71bd9c9b46fac52..5d44e1f1220a5cc9c0b0cd9b096f7629c76dbda4 100644 (file)
@@ -1143,7 +1143,5 @@ int __init econet_proto_init(void)
        return 0;
 }
 
-#ifdef MODULE
 module_init(econet_proto_init);
 module_exit(econet_proto_exit);
-#endif
index f53d2e5265a01c04d18b0a35b82152ef2e9b8e4b..544800d7e9905bf6c3a62d6cf20ecf98651131c9 100644 (file)
@@ -5,7 +5,7 @@
  *
  *             PF_INET protocol family socket handler.
  *
- * Version:    $Id: af_inet.c,v 1.115 2000/10/06 10:37:47 davem Exp $
+ * Version:    $Id: af_inet.c,v 1.116 2000/10/15 01:34:45 davem Exp $
  *
  * Authors:    Ross Biro, <bir7@leland.Stanford.Edu>
  *             Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -956,7 +956,7 @@ extern void tcp_v4_init(struct net_proto_family *);
  *     Called by socket.c on kernel startup.  
  */
  
-void __init inet_proto_init(struct net_proto *pro)
+static int __init inet_init(void)
 {
        struct sk_buff *dummy_skb;
        struct inet_protocol *p;
@@ -966,7 +966,7 @@ void __init inet_proto_init(struct net_proto *pro)
        if (sizeof(struct inet_skb_parm) > sizeof(dummy_skb->cb))
        {
                printk(KERN_CRIT "inet_proto_init: panic\n");
-               return;
+               return -EINVAL;
        }
 
        /*
@@ -1040,4 +1040,6 @@ void __init inet_proto_init(struct net_proto *pro)
        proc_net_create ("tcp", 0, tcp_get_info);
        proc_net_create ("udp", 0, udp_get_info);
 #endif         /* CONFIG_PROC_FS */
+       return 0;
 }
+module_init(inet_init);
index 556634a2fce6be5076041d45a1587b01f77663f3..082848dda1fae0cc670ac82e11c83b394aa84bb6 100644 (file)
@@ -5,7 +5,7 @@
  *
  *             Implementation of the Transmission Control Protocol(TCP).
  *
- * Version:    $Id: tcp_ipv4.c,v 1.216 2000/10/10 03:58:56 davem Exp $
+ * Version:    $Id: tcp_ipv4.c,v 1.217 2000/10/15 13:15:19 davem Exp $
  *
  *             IPv4 specific functions
  *
@@ -75,7 +75,15 @@ static struct socket *tcp_socket=&tcp_inode.u.socket_i;
 void tcp_v4_send_check(struct sock *sk, struct tcphdr *th, int len, 
                       struct sk_buff *skb);
 
+/*
+ * ALL members must be initialised to prevent gcc-2.7.2.3 miscompilation
+ */
 struct tcp_hashinfo __cacheline_aligned tcp_hashinfo = {
+       __tcp_ehash:          NULL,
+       __tcp_bhash:          NULL,
+       __tcp_bhash_size:     0,
+       __tcp_ehash_size:     0,
+       __tcp_listening_hash: { NULL, },
        __tcp_lhash_lock:     RW_LOCK_UNLOCKED,
        __tcp_lhash_users:    ATOMIC_INIT(0),
        __tcp_lhash_wait:
index 869cac68957bc4c5cbfd038ebf26d5c699f2e2dc..2528e7c7ba62b89348425d9d08649d3e2b487d77 100644 (file)
@@ -7,7 +7,7 @@
  *
  *     Adapted from linux/net/ipv4/af_inet.c
  *
- *     $Id: af_inet6.c,v 1.58 2000/09/18 05:59:48 davem Exp $
+ *     $Id: af_inet6.c,v 1.59 2000/10/15 01:34:45 davem Exp $
  *
  *     Fixes:
  *     Hideaki YOSHIFUJI       :       sin6_scope_id support
@@ -502,11 +502,7 @@ extern void ipv6_sysctl_register(void);
 extern void ipv6_sysctl_unregister(void);
 #endif
 
-#ifdef MODULE
-int init_module(void)
-#else
-void __init inet6_proto_init(struct net_proto *pro)
-#endif
+static int __init inet6_init(void)
 {
        struct sk_buff *dummy_skb;
        int err;
@@ -523,11 +519,7 @@ void __init inet6_proto_init(struct net_proto *pro)
        if (sizeof(struct inet6_skb_parm) > sizeof(dummy_skb->cb))
        {
                printk(KERN_CRIT "inet6_proto_init: size fault\n");
-#ifdef MODULE
                return -EINVAL;
-#else
-               return;
-#endif
        }
 
        /*
@@ -577,11 +569,7 @@ void __init inet6_proto_init(struct net_proto *pro)
        /* Now the userspace is allowed to create INET6 sockets. */
        (void) sock_register(&inet6_family_ops);
        
-#ifdef MODULE
        return 0;
-#else
-       return;
-#endif
 
 #ifdef CONFIG_PROC_FS
 proc_snmp6_fail:
@@ -603,15 +591,13 @@ icmp_fail:
 #if defined(MODULE) && defined(CONFIG_SYSCTL)
        ipv6_sysctl_unregister();
 #endif
-#ifdef MODULE
        return err;
-#else
-       return;
-#endif
 }
+module_init(inet6_init);
+
 
 #ifdef MODULE
-void cleanup_module(void)
+static void inet6_exit(void)
 {
        /* First of all disallow new sockets creation. */
        sock_unregister(PF_INET6);
@@ -636,4 +622,5 @@ void cleanup_module(void)
        ipv6_sysctl_unregister();       
 #endif
 }
-#endif /* MODULE */
+module_exit(inet6_exit);
+#endif /* MODULE */
index bbb2b2630e6d8040719272254601ab305282641d..2fc3ea46cc8e055967df527f2e7e0cd759049d4e 100644 (file)
@@ -2387,9 +2387,8 @@ static unsigned char ipx_snap_id[5] = { 0x0, 0x0, 0x0, 0x81, 0x37 };
 
 
 
-/* Called by protocols.c on kernel start up */
 
-void ipx_proto_init(struct net_proto *pro)
+static int __init ipx_init(void)
 {
        (void) sock_register(&ipx_family_ops);
 
@@ -2415,7 +2414,9 @@ void ipx_proto_init(struct net_proto *pro)
 
        printk(KERN_INFO "NET4: Linux IPX 0.38 for NET4.0\n");
        printk(KERN_INFO "IPX Portions Copyright (c) 1995 Caldera, Inc.\n");
+       return 0;
 }
+module_init(ipx_init);
 
 /* Higher layers need this info to prep tx pkts */
 int ipx_if_offset(unsigned long ipx_net_number)
@@ -2434,7 +2435,6 @@ EXPORT_SYMBOL(ipx_remove_socket);
 EXPORT_SYMBOL(ipx_register_spx);
 EXPORT_SYMBOL(ipx_unregister_spx);
 
-#ifdef MODULE
 /* Note on MOD_{INC,DEC}_USE_COUNT:
  *
  * Use counts are incremented/decremented when
@@ -2448,6 +2448,7 @@ EXPORT_SYMBOL(ipx_unregister_spx);
  * sockets be closed from user space.
  */
 
+#ifdef MODULE
 static void ipx_proto_finito(void)
 {
        ipx_interface   *ifc;
@@ -2486,18 +2487,7 @@ static void ipx_proto_finito(void)
 
        return;
 }
-
-int init_module(void)
-{
-       ipx_proto_init(NULL);
-       return (0);
-}
-
-void cleanup_module(void)
-{
-       ipx_proto_finito();
-       return;
-}
-
+module_exit(ipx_proto_finito);
 #endif /* MODULE */
+
 #endif /* CONFIG_IPX || CONFIG_IPX_MODULE */
index 2ba86afcc2545a716662e71e502e34e43bba15b8..d6e8d81e59e815b1ed83247129b43815495d638f 100644 (file)
@@ -43,6 +43,7 @@
  ********************************************************************/
 
 #include <linux/config.h>
+#include <linux/init.h>
 #include <linux/types.h>
 #include <linux/socket.h>
 #include <linux/sockios.h>
@@ -2155,17 +2156,19 @@ static struct notifier_block irda_dev_notifier = {
  *    Initialize IrDA protocol layer
  *
  */
-void __init irda_proto_init(struct net_proto *pro)
+static int __init irda_proto_init(void)
 {
-       sock_register(&irda_family_ops);
-
-       irda_packet_type.type = htons(ETH_P_IRDA);
+        sock_register(&irda_family_ops);
+       
+        irda_packet_type.type = htons(ETH_P_IRDA);
         dev_add_pack(&irda_packet_type);
-
-       register_netdevice_notifier(&irda_dev_notifier);
-
-       irda_init();
+       
+        register_netdevice_notifier(&irda_dev_notifier);
+       
+        irda_init();
+       return 0;
 }
+module_init(irda_proto_init);
 
 /*
  * Function irda_proto_cleanup (void)
@@ -2186,4 +2189,5 @@ void irda_proto_cleanup(void)
        
         return;
 }
+module_exit(irda_proto_cleanup);
 #endif /* MODULE */
index fde6788c3d6b7802274001f8d937fd147da3b7c7..39257f87a5299ce226a7f59164decd998e0c2267 100644 (file)
@@ -545,28 +545,6 @@ void irda_proc_modcount(struct inode *inode, int fill)
 MODULE_AUTHOR("Dag Brattli <dagb@cs.uit.no>");
 MODULE_DESCRIPTION("The Linux IrDA Protocol Subsystem"); 
 MODULE_PARM(irda_debug, "1l");
-
-/*
- * Function init_module (void)
- *
- *    Initialize the irda module
- *
- */
-int init_module(void) 
-{
-       irda_proto_init(NULL);
-
-       return 0;
-}
-
-/*
- * Function cleanup_module (void)
- *
- *    Cleanup the irda module
- *
- */
-void cleanup_module(void) 
-{
-       irda_proto_cleanup();
-}
+module_exit(irda_proto_cleanup);
 #endif /* MODULE */
+
index 587304bca67a8a12b62db2ad25bbe1df3c5d3501..bdc84d72f929b6fb88a66d2139cc6589eac395e8 100644 (file)
@@ -401,25 +401,18 @@ EXPORT_SYMBOL(lapb_disconnect_request);
 EXPORT_SYMBOL(lapb_data_request);
 EXPORT_SYMBOL(lapb_data_received);
 
-void __init lapb_proto_init(struct net_proto *pro)
+static int __init lapb_init(void)
 {
        printk(KERN_INFO "NET4: LAPB for Linux. Version 0.01 for NET4.0\n");
+       return 0;
 }
 
 #ifdef MODULE
 MODULE_AUTHOR("Jonathan Naylor <g4klx@g4klx.demon.co.uk>");
 MODULE_DESCRIPTION("The X.25 Link Access Procedure B link layer protocol");
+#endif
 
-int init_module(void)
-{
-       lapb_proto_init(NULL);
 
-       return 0;
-}
-
-void cleanup_module(void)
-{
-}
-#endif
+module_init(lapb_init);
 
 #endif
index be011a234a82577e9739ff13349ff50ff925c810..3927d9c3a7673e111289a812c6c15dfafc740494 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/module.h>
 
 #include <linux/kernel.h>
+#include <linux/init.h>
 #include <linux/major.h>
 #include <linux/signal.h>
 #include <linux/sched.h>
@@ -968,16 +969,19 @@ struct net_proto_family netlink_family_ops = {
        netlink_create
 };
 
-void netlink_proto_init(struct net_proto *pro)
+static int __init netlink_proto_init(void)
 {
        struct sk_buff *dummy_skb;
 
        if (sizeof(struct netlink_skb_parms) > sizeof(dummy_skb->cb)) {
-               printk(KERN_CRIT "netlink_proto_init: panic\n");
-               return;
+               printk(KERN_CRIT "netlink_init: panic\n");
+               return -1;
        }
        sock_register(&netlink_family_ops);
 #ifdef CONFIG_PROC_FS
        create_proc_read_entry("net/netlink", 0, 0, netlink_read_proc, NULL);
 #endif
+       return 0;
 }
+
+module_init(netlink_proto_init);
index bc1b378fca047b1099a405a2529f9a3e4e913863..da7598a7965431be4c0a624a1f1e57a1b93b313e 100644 (file)
@@ -31,7 +31,7 @@
 #include <asm/system.h>
 #include <asm/uaccess.h>
 
-static unsigned open_map = 0;
+static unsigned open_map;
 static struct socket *netlink_user[MAX_LINKS];
 
 /*
@@ -178,7 +178,7 @@ static struct file_operations netlink_fops = {
        release:        netlink_release,
 };
 
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
 
 static void __init make_devfs_entries (const char *name, int minor)
 {
index 27d95703b75080985e28ddf0a67ce28f34ad8b2b..a0c139b3a436308d6afd7a8fbe2bffaa01152d61 100644 (file)
@@ -1261,13 +1261,13 @@ static struct notifier_block nr_dev_notifier = {
 
 static struct net_device *dev_nr;
 
-void __init nr_proto_init(struct net_proto *pro)
+static int __init nr_proto_init(void)
 {
        int i;
 
        if ((dev_nr = kmalloc(nr_ndevs * sizeof(struct net_device), GFP_KERNEL)) == NULL) {
                printk(KERN_ERR "NET/ROM: nr_proto_init - unable to allocate device structure\n");
-               return;
+               return -1;
        }
 
        memset(dev_nr, 0x00, nr_ndevs * sizeof(struct net_device));
@@ -1296,8 +1296,12 @@ void __init nr_proto_init(struct net_proto *pro)
        proc_net_create("nr_neigh", 0, nr_neigh_get_info);
        proc_net_create("nr_nodes", 0, nr_nodes_get_info);
 #endif 
+       return 0;
 }
 
+module_init(nr_proto_init);
+
+
 #ifdef MODULE
 EXPORT_NO_SYMBOLS;
 
@@ -1307,14 +1311,7 @@ MODULE_PARM_DESC(nr_ndevs, "number of NET/ROM devices");
 MODULE_AUTHOR("Jonathan Naylor G4KLX <g4klx@g4klx.demon.co.uk>");
 MODULE_DESCRIPTION("The amateur radio NET/ROM network and transport layer protocol");
 
-int init_module(void)
-{
-       nr_proto_init(NULL);
-
-       return 0;
-}
-
-void cleanup_module(void)
+static void nr_exit(void)
 {
        int i;
 
@@ -1348,7 +1345,9 @@ void cleanup_module(void)
 
        kfree(dev_nr);
 }
+module_exit(nr_exit);
+#endif /* MODULE */
+
 
-#endif
 
 #endif
index 4883d6ec249faf9d66ddef4fa76b8ad9c39b8785..906bcffbe303ac1abc7cadb51a65b033739899b5 100644 (file)
@@ -5,7 +5,7 @@
  *
  *             PACKET - implements raw packet sockets.
  *
- * Version:    $Id: af_packet.c,v 1.43 2000/10/06 10:37:47 davem Exp $
+ * Version:    $Id: af_packet.c,v 1.44 2000/10/15 01:34:47 davem Exp $
  *
  * Authors:    Ross Biro, <bir7@leland.Stanford.Edu>
  *             Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -33,6 +33,7 @@
  *             Alan Cox        :       Protocol setting support
  *     Alexey Kuznetsov        :       Untied from IPv4 stack.
  *     Cyrus Durgin            :       Fixed kerneld for kmod.
+ *     Michal Ostrowski        :       Module initialization cleanup.
  *
  *             This program is free software; you can redistribute it and/or
  *             modify it under the terms of the GNU General Public License
@@ -1872,8 +1873,8 @@ done:
 #endif
 
 
-#ifdef MODULE
-void cleanup_module(void)
+
+static void __exit packet_exit(void)
 {
 #ifdef CONFIG_PROC_FS
        remove_proc_entry("net/packet", 0);
@@ -1884,17 +1885,16 @@ void cleanup_module(void)
 }
 
 
-int init_module(void)
-#else
-void __init packet_proto_init(struct net_proto *pro)
-#endif
+static int __init packet_init(void)
 {
        sock_register(&packet_family_ops);
        register_netdevice_notifier(&packet_netdev_notifier);
 #ifdef CONFIG_PROC_FS
        create_proc_read_entry("net/packet", 0, 0, packet_read_proc, NULL);
 #endif
-#ifdef MODULE
        return 0;
-#endif
 }
+
+
+module_init(packet_init);
+module_exit(packet_exit);
diff --git a/net/protocols.c b/net/protocols.c
deleted file mode 100644 (file)
index 2188df9..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- *     Protocol initializer table. Here separately for convenience
- *
- */
-#include <linux/config.h>
-#include <linux/types.h>
-#include <linux/kernel.h>
-#include <linux/net.h>
-#include <linux/fs.h>
-
-#ifdef CONFIG_UNIX
-#include <linux/un.h>
-#include <net/af_unix.h>
-#endif
-
-#ifdef CONFIG_INET
-#include <linux/inet.h>
-#ifdef CONFIG_IPV6
-extern void inet6_proto_init(struct net_proto *pro);
-#endif
-#endif /* INET */
-
-#ifdef CONFIG_ECONET
-extern void econet_proto_init(struct net_proto *pro);
-#endif
-
-#ifdef CONFIG_NETLINK
-extern void netlink_proto_init(struct net_proto *pro);
-#endif
-
-#ifdef CONFIG_PACKET
-extern void packet_proto_init(struct net_proto *pro);
-#endif
-
-#if defined(CONFIG_IPX) || defined(CONFIG_IPX_MODULE)
-#define NEED_802
-#include <net/ipxcall.h>
-#endif
-
-#ifdef CONFIG_X25
-#include <net/x25call.h>
-#endif
-
-#ifdef CONFIG_LAPB
-#include <net/lapbcall.h>
-#endif
-
-#ifdef CONFIG_AX25
-#include <net/ax25call.h>
-#ifdef CONFIG_NETROM
-#include <net/nrcall.h>
-#endif
-#ifdef CONFIG_ROSE
-#include <net/rosecall.h>
-#endif
-#endif
-
-#ifdef CONFIG_IRDA
-#include <net/irda/irdacall.h>
-#endif
-
-#if defined(CONFIG_DECNET)
-#include <net/decnet_call.h>
-#endif
-
-#if defined(CONFIG_ATALK) || defined(CONFIG_ATALK_MODULE)
-#define NEED_802
-#include <net/atalkcall.h>
-#endif
-
-#if defined(CONFIG_NETBEUI)
-#define NEED_LLC
-#include <net/netbeuicall.h>
-#endif
-
-#if defined(CONFIG_LLC)
-#define NEED_LLC
-#endif
-
-#include <net/psnapcall.h>
-
-#ifdef CONFIG_TR
-#include <linux/netdevice.h>
-#include <linux/trdevice.h>
-extern void rif_init(struct net_proto *);
-#endif
-
-#ifdef CONFIG_ATM
-#include <linux/atm.h>
-#endif
-
-#ifdef NEED_LLC
-#define NEED_802
-#include <net/llccall.h>
-#endif
-
-#ifdef NEED_802
-#include <net/p8022call.h>
-#endif
-
-
-/*
- *     Protocol Table
- */
-struct net_proto protocols[] = {
-#ifdef  CONFIG_NETLINK
-  { "NETLINK", netlink_proto_init      },
-#endif
-
-#ifdef  CONFIG_PACKET
-  { "PACKET",  packet_proto_init       },
-#endif
-
-#ifdef CONFIG_UNIX
-  { "UNIX",    unix_proto_init },                      /* Unix domain socket family    */
-#endif
-
-#ifdef NEED_802
-  { "802.2",   p8022_proto_init },                     /* 802.2 demultiplexor          */
-  { "SNAP",    snap_proto_init },                      /* SNAP demultiplexor           */
-#endif
-
-#ifdef CONFIG_TR
-  { "RIF",     rif_init },                             /* RIF for Token ring           */
-#endif  
-
-#ifdef CONFIG_ATM
-  { "ATMPVC",  atmpvc_proto_init },                    /* ATM PVCs */
-  { "ATMSVC",  atmsvc_proto_init },                    /* ATM SVCs */
-#endif
-
-#ifdef NEED_LLC
-  { "802.2LLC", llc_init },                            /* 802.2 LLC */
-#endif  
-
-#ifdef CONFIG_AX25  
-  { "AX.25",   ax25_proto_init },                      /* Amateur Radio AX.25 */
-#ifdef CONFIG_NETROM
-  { "NET/ROM", nr_proto_init },                        /* Amateur Radio NET/ROM */
-#endif
-#ifdef CONFIG_ROSE
-  { "Rose",    rose_proto_init },                      /* Amateur Radio X.25 PLP */
-#endif
-#endif  
-#ifdef CONFIG_DECNET
-  { "DECnet",   decnet_proto_init },                    /* DECnet */
-#endif
-#ifdef CONFIG_INET
-  { "INET",    inet_proto_init },                      /* TCP/IP */
-#ifdef CONFIG_IPV6
-  { "INET6",   inet6_proto_init},                      /* IPv6 */
-#endif
-#endif
-
-#ifdef  CONFIG_IPX
-  { "IPX",     ipx_proto_init },                       /* IPX                          */
-#endif
-
-#ifdef CONFIG_ATALK
-  { "DDP",     atalk_proto_init },                     /* Netatalk Appletalk driver    */
-#endif
-
-#ifdef CONFIG_LAPB
-  { "LAPB",     lapb_proto_init },                     /* LAPB protocols */
-#endif
-
-#ifdef CONFIG_X25
-  { "X.25",    x25_proto_init },                       /* CCITT X.25 Packet Layer */
-#endif
-
-#ifdef CONFIG_ECONET
-  { "Econet",  econet_proto_init },                    /* Acorn Econet */
-#endif
-
-#ifdef CONFIG_IRDA
-  { "IrDA",     irda_proto_init },                     /* IrDA protocols */
-#endif
-  { NULL,      NULL            }                       /* End marker                   */
-};
index f61d9cd34df177d57d069259323464d789c40bcd..f639e578abd0fa6eff03ae13dc73f40385449b06 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/config.h>
 #if defined(CONFIG_ROSE) || defined(CONFIG_ROSE_MODULE)
 #include <linux/module.h>
+#include <linux/init.h>
 #include <linux/errno.h>
 #include <linux/types.h>
 #include <linux/socket.h>
@@ -56,7 +57,6 @@
 #include <linux/proc_fs.h>
 #include <net/ip.h>
 #include <net/arp.h>
-#include <linux/init.h>
 
 int rose_ndevs = 10;
 
@@ -1427,7 +1427,7 @@ static struct notifier_block rose_dev_notifier = {
 
 static struct net_device *dev_rose;
 
-void __init rose_proto_init(struct net_proto *pro)
+static int __init rose_proto_init(void)
 {
        int i;
 
@@ -1435,7 +1435,7 @@ void __init rose_proto_init(struct net_proto *pro)
 
        if ((dev_rose = kmalloc(rose_ndevs * sizeof(struct net_device), GFP_KERNEL)) == NULL) {
                printk(KERN_ERR "ROSE: rose_proto_init - unable to allocate device structure\n");
-               return;
+               return -1;
        }
 
        memset(dev_rose, 0x00, rose_ndevs * sizeof(struct net_device));
@@ -1466,7 +1466,9 @@ void __init rose_proto_init(struct net_proto *pro)
        proc_net_create("rose_nodes", 0, rose_nodes_get_info);
        proc_net_create("rose_routes", 0, rose_routes_get_info);
 #endif
+       return 0;
 }
+module_init(rose_proto_init);
 
 #ifdef MODULE
 EXPORT_NO_SYMBOLS;
@@ -1477,14 +1479,7 @@ MODULE_PARM_DESC(rose_ndevs, "number of ROSE devices");
 MODULE_AUTHOR("Jonathan Naylor G4KLX <g4klx@g4klx.demon.co.uk>");
 MODULE_DESCRIPTION("The amateur radio ROSE network layer protocol");
 
-int init_module(void)
-{
-       rose_proto_init(NULL);
-
-       return 0;
-}
-
-void cleanup_module(void)
+static void __exit rose_exit(void)
 {
        int i;
 
@@ -1522,7 +1517,8 @@ void cleanup_module(void)
 
        kfree(dev_rose);
 }
+module_exit(rose_exit);
+#endif /* MODULE */
 
-#endif
 
 #endif
index 5957514aac349a13931dc8e8915a82a168350166..4b6ad8ad5fd207a34fb865e32a7a5c4ae60202ff 100644 (file)
@@ -1638,20 +1638,6 @@ int sock_unregister(int family)
        return 0;
 }
 
-void __init proto_init(void)
-{
-       extern struct net_proto protocols[];    /* Network protocols */
-       struct net_proto *pro;
-
-       /* Kick all configured protocols. */
-       pro = protocols;
-       while (pro->name != NULL) 
-       {
-               (*pro->init_func)(pro);
-               pro++;
-       }
-       /* We're all done... */
-}
 
 extern void sk_init(void);
 
@@ -1712,10 +1698,13 @@ void __init sock_init(void)
 
        register_filesystem(&sock_fs_type);
        sock_mnt = kern_mount(&sock_fs_type);
-       proto_init();
+       /* The real protocol initialization is performed when
+        *  do_initcalls is run.  
+        */
+
 
        /*
-        *      The netlink device handler may be needed early.
+        * The netlink device handler may be needed early.
         */
 
 #ifdef  CONFIG_RTNETLINK
index 407f8f6b63d0a4b2b95cc0ac99b4393993c17152..62e8b1b853283e9e41c16e9380ff059ddfd8ecbb 100644 (file)
@@ -8,7 +8,7 @@
  *             as published by the Free Software Foundation; either version
  *             2 of the License, or (at your option) any later version.
  *
- * Version:    $Id: af_unix.c,v 1.105 2000/08/16 10:58:22 davem Exp $
+ * Version:    $Id: af_unix.c,v 1.106 2000/10/15 01:34:48 davem Exp $
  *
  * Fixes:
  *             Linus Torvalds  :       Assorted bug cures.
@@ -46,6 +46,7 @@
  *             Artur Skawina   :       Hash function optimizations
  *          Alexey Kuznetsov   :       Full scale SMP. Lot of bugs are introduced 8)
  *           Malcolm Beattie   :       Set peercred for socketpair
+ *          Michal Ostrowski   :       Module initialization cleanup.
  *
  *
  * Known differences from reference BSD that was tested:
@@ -1845,16 +1846,12 @@ struct net_proto_family unix_family_ops = {
        unix_create
 };
 
-#ifdef MODULE
 #ifdef CONFIG_SYSCTL
 extern void unix_sysctl_register(void);
 extern void unix_sysctl_unregister(void);
 #endif
 
-int init_module(void)
-#else
-void __init unix_proto_init(struct net_proto *pro)
-#endif
+static int __init af_unix_init(void)
 {
        struct sk_buff *dummy_skb;
        
@@ -1862,28 +1859,21 @@ void __init unix_proto_init(struct net_proto *pro)
        if (sizeof(struct unix_skb_parms) > sizeof(dummy_skb->cb))
        {
                printk(KERN_CRIT "unix_proto_init: panic\n");
-#ifdef MODULE
                return -1;
-#else
-               return;
-#endif
        }
        sock_register(&unix_family_ops);
 #ifdef CONFIG_PROC_FS
        create_proc_read_entry("net/unix", 0, 0, unix_read_proc, NULL);
 #endif
 
-#ifdef MODULE
 #ifdef CONFIG_SYSCTL
        unix_sysctl_register();
 #endif
 
        return 0;
-#endif
 }
 
-#ifdef MODULE
-void cleanup_module(void)
+static void __exit af_unix_exit(void)
 {
        sock_unregister(PF_UNIX);
 #ifdef CONFIG_SYSCTL
@@ -1893,7 +1883,9 @@ void cleanup_module(void)
        remove_proc_entry("net/unix", 0);
 #endif
 }
-#endif
+
+module_init(af_unix_init);
+module_exit(af_unix_exit);
 
 /*
  * Local variables:
index 744a4446a0625217787071f3b479774e42be4bda..885119da3928c6db0811b5cdfeb53124b7145f9c 100644 (file)
@@ -26,7 +26,6 @@ ctl_table unix_table[] = {
        {0}
 };
 
-#ifdef MODULE
 static struct ctl_table_header * unix_sysctl_header;
 static struct ctl_table unix_root_table[];
 static struct ctl_table unix_net_table[];
@@ -50,6 +49,5 @@ void unix_sysctl_unregister(void)
 {
        unregister_sysctl_table(unix_sysctl_header);
 }
-#endif /* MODULE */
 
 #endif /* CONFIG_SYSCTL */
index 9af3a0e3d595e209644bb9e5d7a5b1d25c144589..320722c40494cf3b7dccdd278f002d59c5c6bbb7 100644 (file)
@@ -1283,8 +1283,11 @@ void x25_kill_by_neigh(struct x25_neigh *neigh)
        } 
 }
 
-void __init x25_proto_init(struct net_proto *pro)
+static int __init x25_init(void)
 {
+#ifdef MODULE
+       struct net_device *dev;
+#endif /* MODULE */
        sock_register(&x25_family_ops);
 
        x25_packet_type.type = htons(ETH_P_X25);
@@ -1302,20 +1305,8 @@ void __init x25_proto_init(struct net_proto *pro)
        proc_net_create("x25", 0, x25_get_info);
        proc_net_create("x25_routes", 0, x25_routes_get_info);
 #endif 
-}
 
 #ifdef MODULE
-EXPORT_NO_SYMBOLS;
-
-MODULE_AUTHOR("Jonathan Naylor <g4klx@g4klx.demon.co.uk>");
-MODULE_DESCRIPTION("The X.25 Packet Layer network layer protocol");
-
-int init_module(void)
-{
-       struct net_device *dev;
-
-       x25_proto_init(NULL);
-
        /*
         *      Register any pre existing devices.
         */
@@ -1329,11 +1320,20 @@ int init_module(void)
                        x25_link_device_up(dev);
        }
        read_unlock(&dev_base_lock);
-
+#endif /* MODULE */
        return 0;
 }
+module_init(x25_init);
+
 
-void cleanup_module(void)
+
+#ifdef MODULE
+EXPORT_NO_SYMBOLS;
+
+MODULE_AUTHOR("Jonathan Naylor <g4klx@g4klx.demon.co.uk>");
+MODULE_DESCRIPTION("The X.25 Packet Layer network layer protocol");
+
+static void __exit x25_exit(void)
 {
 
 #ifdef CONFIG_PROC_FS
@@ -1354,7 +1354,7 @@ void cleanup_module(void)
 
        sock_unregister(AF_X25);
 }
-
+module_exit(x25_exit);
 #endif
 
 #endif