r4256 - dists/trunk/linux-2.4/debian/patches-debian

Sven Luther luther at costa.debian.org
Thu Sep 22 09:30:48 UTC 2005


Author: luther
Date: 2005-09-22 09:30:47 +0000 (Thu, 22 Sep 2005)
New Revision: 4256

Removed:
   dists/trunk/linux-2.4/debian/patches-debian/amd64-int3-fix.patch
   dists/trunk/linux-2.4/debian/patches-debian/amd64-tlb-flush-sigsegv-fix.patch
   dists/trunk/linux-2.4/debian/patches-debian/drivers-scsi-megaraid_splitup.patch
   dists/trunk/linux-2.4/debian/patches-debian/fbdev-radeon-noaccel.patch
   dists/trunk/linux-2.4/debian/patches-debian/fs-asfs-2.patch
   dists/trunk/linux-2.4/debian/patches-debian/ia64-irq-affinity-upfix.patch
   dists/trunk/linux-2.4/debian/patches-debian/m68k-42_dma.patch
   dists/trunk/linux-2.4/debian/patches-debian/m68k-sonic.patch
   dists/trunk/linux-2.4/debian/patches-debian/modular-ide-pnp.patch
   dists/trunk/linux-2.4/debian/patches-debian/modular-ide.patch
   dists/trunk/linux-2.4/debian/patches-debian/patch-2.6.13.1
   dists/trunk/linux-2.4/debian/patches-debian/patch-2.6.13.2
   dists/trunk/linux-2.4/debian/patches-debian/powerpc-apus.patch
   dists/trunk/linux-2.4/debian/patches-debian/powerpc-calibrate-tau.patch
   dists/trunk/linux-2.4/debian/patches-debian/powerpc-fix-power3-ftbfs.patch
   dists/trunk/linux-2.4/debian/patches-debian/powerpc-g3-750cxe.patch
   dists/trunk/linux-2.4/debian/patches-debian/powerpc-g4-l2-flush-errata.patch
   dists/trunk/linux-2.4/debian/patches-debian/powerpc-mkvmlinuz-support.patch
   dists/trunk/linux-2.4/debian/patches-debian/powerpc-mv643xx-hotplug-support.patch
   dists/trunk/linux-2.4/debian/patches-debian/powerpc-pmac-cache-power34-fix.patch
   dists/trunk/linux-2.4/debian/patches-debian/powerpc-pmac-sound-check.patch
   dists/trunk/linux-2.4/debian/patches-debian/powerpc-ppc64-biarch-override.patch
   dists/trunk/linux-2.4/debian/patches-debian/powerpc-serial-of.patch
   dists/trunk/linux-2.4/debian/patches-debian/powerpc-serial.patch
   dists/trunk/linux-2.4/debian/patches-debian/qla2xxx-removed.patch
   dists/trunk/linux-2.4/debian/patches-debian/remove-references-to-removed-drivers.patch
   dists/trunk/linux-2.4/debian/patches-debian/series/
   dists/trunk/linux-2.4/debian/patches-debian/sparc64-hme-lockup.patch
   dists/trunk/linux-2.4/debian/patches-debian/tty-locking-fixes9.patch
   dists/trunk/linux-2.4/debian/patches-debian/version.patch
Log:
Removed the 2.6 patches.


Deleted: dists/trunk/linux-2.4/debian/patches-debian/amd64-int3-fix.patch
===================================================================
--- dists/trunk/linux-2.4/debian/patches-debian/amd64-int3-fix.patch	2005-09-22 09:22:48 UTC (rev 4255)
+++ dists/trunk/linux-2.4/debian/patches-debian/amd64-int3-fix.patch	2005-09-22 09:30:47 UTC (rev 4256)
@@ -1,18 +0,0 @@
-## amd64-int3-fix.dpatch by <fschueler at gmx.net>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Description: Revert int3 handling
-## DP: Patch author: Andi Kleen <ak at muc.de>
-## DP: Upstream status: not yet committed to BK
-#
---- a/arch/x86_64/kernel/kprobes.c	2005-06-06 11:22:29.000000000 -0400
-+++ b/arch/x86_64/kernel/kprobes.c	2005-06-15 21:17:14.000000000 -0400
-@@ -447,6 +447,8 @@
- 	struct die_args *args = (struct die_args *)data;
- 	switch (val) {
- 	case DIE_INT3:
-+		if (args->regs->cs & 3)
-+			return NOTIFY_DONE;
- 		if (kprobe_handler(args->regs))
- 			return NOTIFY_STOP;
- 		break;

Deleted: dists/trunk/linux-2.4/debian/patches-debian/amd64-tlb-flush-sigsegv-fix.patch
===================================================================
--- dists/trunk/linux-2.4/debian/patches-debian/amd64-tlb-flush-sigsegv-fix.patch	2005-09-22 09:22:48 UTC (rev 4255)
+++ dists/trunk/linux-2.4/debian/patches-debian/amd64-tlb-flush-sigsegv-fix.patch	2005-09-22 09:30:47 UTC (rev 4256)
@@ -1,47 +0,0 @@
-From: Linus Torvalds <torvalds at g5.osdl.org>
-Date: Sat, 17 Sep 2005 22:41:04 +0000 (-0700)
-Subject:     x86-64/smp: fix random SIGSEGV issues
-X-Git-Url: http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=bc5e8fdfc622b03acf5ac974a1b8b26da6511c99
-
-  x86-64/smp: fix random SIGSEGV issues
-  
-  They seem to have been due to AMD errata 63/122; the fix is to disable
-  TLB flush filtering in SMP configurations.
-  
-  Confirmed to fix the problem by Andrew Walrond <andrew at walrond.org>
-  
-  [ Let's see if we'll have a better fix eventually, this is the Q&D
-    "let's get this fixed and out there" version ]
-  
-  Signed-off-by: Linus Torvalds <torvalds at osdl.org>
----
-
---- a/arch/x86_64/kernel/setup.c
-+++ b/arch/x86_64/kernel/setup.c
-@@ -793,11 +793,26 @@
- #endif
- }
- 
-+#define HWCR 0xc0010015
-+
- static int __init init_amd(struct cpuinfo_x86 *c)
- {
- 	int r;
- 	int level;
- 
-+#ifdef CONFIG_SMP
-+	unsigned long value;
-+
-+	// Disable TLB flush filter by setting HWCR.FFDIS:
-+	// bit 6 of msr C001_0015
-+	//
-+	// Errata 63 for SH-B3 steppings
-+	// Errata 122 for all(?) steppings
-+	rdmsrl(HWCR, value);
-+	value |= 1 << 6;
-+	wrmsrl(HWCR, value);
-+#endif
-+
- 	/* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
- 	   3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */
- 	clear_bit(0*32+31, &c->x86_capability);

Deleted: dists/trunk/linux-2.4/debian/patches-debian/drivers-scsi-megaraid_splitup.patch
===================================================================
--- dists/trunk/linux-2.4/debian/patches-debian/drivers-scsi-megaraid_splitup.patch	2005-09-22 09:22:48 UTC (rev 4255)
+++ dists/trunk/linux-2.4/debian/patches-debian/drivers-scsi-megaraid_splitup.patch	2005-09-22 09:30:47 UTC (rev 4256)
@@ -1,108 +0,0 @@
-# From Fabio M. Di Nitto <fabbione at ubuntu.com>
-# Date 27th May 2005
-# Source Ubuntu kernel-team baz-archive
-#        http://people.u.c/~lamont/Archives/kernel-team@ubuntu.com--2005/
-#        kernel-debian--pre1,2--2.6.11.93
-#
-# * The megaraid legacy driver is around only to support AMI megaraid 1 and 2.
-#   All the other controllers are supported (according to the code) by the
-#   new megaraid driver:
-#   - Add patch drivers-scsi-megaraid_spiltup.dpatch:
-#     . Split PCI ID's properly between the 2 drivers.
-#     . Allow compilation of both drivers at the same time.
-#     . Update Kconfig.megaraid to reflect the new changes in the help.
-#     . Rename a few things in the old megaraid driver to avoid possible
-#       conflicts with the new drivers (NOTE: there might be more that needs
-#       to be changed given that now the 2 modules can be loaded at the same
-#       time).
-
-diff -urNad linux-source-2.6.12-2.6.11.90/drivers/scsi/megaraid/Kconfig.megaraid /usr/src/dpatchtemp/dpep.eRg2wK/linux-source-2.6.12-2.6.11.90/drivers/scsi/megaraid/Kconfig.megaraid
---- linux-source-2.6.12-2.6.11.90/drivers/scsi/megaraid/Kconfig.megaraid	2005-03-02 08:37:49.000000000 +0100
-+++ /usr/src/dpatchtemp/dpep.eRg2wK/linux-source-2.6.12-2.6.11.90/drivers/scsi/megaraid/Kconfig.megaraid	2005-04-19 08:28:09.521239400 +0200
-@@ -64,15 +64,11 @@
- 	To compile this driver as a module, choose M here: the
- 	module will be called megaraid_mbox
- 
--if MEGARAID_NEWGEN=n
- config MEGARAID_LEGACY
- 	tristate "LSI Logic Legacy MegaRAID Driver"
- 	depends on PCI && SCSI
- 	help
--	This driver supports the LSI MegaRAID 418, 428, 438, 466, 762, 490
--	and 467 SCSI host adapters. This driver also support the all U320
--	RAID controllers
-+	This driver supports the AMI MEGARAID 1 and 2.
- 
- 	To compile this driver as a module, choose M here: the
- 	module will be called megaraid
--endif
-diff -urNad linux-source-2.6.12-2.6.11.90/drivers/scsi/megaraid.c /usr/src/dpatchtemp/dpep.eRg2wK/linux-source-2.6.12-2.6.11.90/drivers/scsi/megaraid.c
---- linux-source-2.6.12-2.6.11.90/drivers/scsi/megaraid.c	2005-03-02 08:37:30.000000000 +0100
-+++ /usr/src/dpatchtemp/dpep.eRg2wK/linux-source-2.6.12-2.6.11.90/drivers/scsi/megaraid.c	2005-04-19 08:35:13.889725584 +0200
-@@ -4565,7 +4565,7 @@
- };
- 
- static int __devinit
--megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
-+megaraid_legacy_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
- {
- 	struct Scsi_Host *host;
- 	adapter_t *adapter;
-@@ -5033,35 +5033,23 @@
- }
- 
- static struct pci_device_id megaraid_pci_tbl[] = {
--	{PCI_VENDOR_ID_DELL, PCI_DEVICE_ID_DISCOVERY,
--		PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
--	{PCI_VENDOR_ID_DELL, PCI_DEVICE_ID_PERC4_DI,
--		PCI_ANY_ID, PCI_ANY_ID, 0, 0, BOARD_64BIT},
--	{PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_PERC4_QC_VERDE,
--		PCI_ANY_ID, PCI_ANY_ID, 0, 0, BOARD_64BIT},
- 	{PCI_VENDOR_ID_AMI, PCI_DEVICE_ID_AMI_MEGARAID,
- 		PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- 	{PCI_VENDOR_ID_AMI, PCI_DEVICE_ID_AMI_MEGARAID2,
- 		PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
--	{PCI_VENDOR_ID_AMI, PCI_DEVICE_ID_AMI_MEGARAID3,
--		PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
--	{PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_AMI_MEGARAID3,
--		PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
--	{PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_AMI_MEGARAID3,
--		PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- 	{0,}
- };
- MODULE_DEVICE_TABLE(pci, megaraid_pci_tbl);
- 
- static struct pci_driver megaraid_pci_driver = {
--	.name		= "megaraid",
-+	.name		= "megaraidlegacy",
- 	.id_table	= megaraid_pci_tbl,
--	.probe		= megaraid_probe_one,
-+	.probe		= megaraid_legacy_probe_one,
- 	.remove		= __devexit_p(megaraid_remove_one),
- 	.shutdown	= megaraid_shutdown,
- };
- 
--static int __init megaraid_init(void)
-+static int __init megaraid_legacy_init(void)
- {
- 	int error;
- 
-@@ -5102,7 +5090,7 @@
- 	return 0;
- }
- 
--static void __exit megaraid_exit(void)
-+static void __exit megaraid_legacy_exit(void)
- {
- 	/*
- 	 * Unregister the character device interface to the driver.
-@@ -5116,7 +5104,7 @@
- #endif
- }
- 
--module_init(megaraid_init);
--module_exit(megaraid_exit);
-+module_init(megaraid_legacy_init);
-+module_exit(megaraid_legacy_exit);
- 
- /* vi: set ts=8 sw=8 tw=78: */

Deleted: dists/trunk/linux-2.4/debian/patches-debian/fbdev-radeon-noaccel.patch
===================================================================
--- dists/trunk/linux-2.4/debian/patches-debian/fbdev-radeon-noaccel.patch	2005-09-22 09:22:48 UTC (rev 4255)
+++ dists/trunk/linux-2.4/debian/patches-debian/fbdev-radeon-noaccel.patch	2005-09-22 09:30:47 UTC (rev 4256)
@@ -1,17 +0,0 @@
-diff -aurN a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
---- a/drivers/video/aty/radeon_base.c	2005-06-06 11:22:29.000000000 -0400
-+++ b/drivers/video/aty/radeon_base.c	2005-06-15 21:55:56.000000000 -0400
-@@ -1907,8 +1907,12 @@
- 
- 	fb_alloc_cmap(&info->cmap, 256, 0);
- 
--	if (noaccel)
-+	if (noaccel) {
- 		info->flags |= FBINFO_HWACCEL_DISABLED;
-+		info->fix.accel = FB_ACCEL_NONE;
-+	} else {
-+		info->fix.accel = FB_ACCEL_ATI_RADEON;
-+	}
- 
-         return 0;
- }

Deleted: dists/trunk/linux-2.4/debian/patches-debian/fs-asfs-2.patch
===================================================================
--- dists/trunk/linux-2.4/debian/patches-debian/fs-asfs-2.patch	2005-09-22 09:22:48 UTC (rev 4255)
+++ dists/trunk/linux-2.4/debian/patches-debian/fs-asfs-2.patch	2005-09-22 09:30:47 UTC (rev 4256)
@@ -1,5262 +0,0 @@
-## fs-asfs.dpatch by Sven Luther <luther at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Description: add support for the Amiga SmartFilesystem (asfs), 1.0beta9
-## DP: Patch author: Marek Szyprowski <marek at amiga.pl>
-## DP: Upstream status: submitted but no reply. Submitted again on 2005.03.22.
-## DP: Reference: http://home.elka.pw.edu.pl/~mszyprow/programy/asfs/
-
-diff -aurN a/Documentation/filesystems/00-INDEX b/Documentation/filesystems/00-INDEX
---- a/Documentation/filesystems/00-INDEX	2005-06-06 11:22:29.000000000 -0400
-+++ b/Documentation/filesystems/00-INDEX	2005-06-15 22:05:09.000000000 -0400
-@@ -6,6 +6,8 @@
- 	- info and mount options for the Acorn Advanced Disc Filing System.
- affs.txt
- 	- info and mount options for the Amiga Fast File System.
-+asfs.txt
-+	- info and mount options for the Amiga Smart File System.
- bfs.txt
- 	- info for the SCO UnixWare Boot Filesystem (BFS).
- cifs.txt
-diff -aurN a/Documentation/filesystems/asfs.txt b/Documentation/filesystems/asfs.txt
---- a/Documentation/filesystems/asfs.txt	1969-12-31 19:00:00.000000000 -0500
-+++ b/Documentation/filesystems/asfs.txt	2005-06-15 22:05:09.000000000 -0400
-@@ -0,0 +1,161 @@
-+
-+Amiga SmartFileSystem, Linux implementation
-+===========================================
-+
-+ASFS is a Amiga Smart FileSystem driver for Linux. It supports reading
-+files and directories. From version 1.0 there is also an experimental 
-+(almost full) write support. Experimental means that it hasn't been 
-+tested enough yet, so use it with care. Symbolic links (in AmigaOS
-+called soft links) are also supported read/write. Read notes below 
-+about symlinks support.
-+
-+
-+Unsupported features of Amiga SFS
-+================================
-+
-+ASFS currently does not support safe-delete feature of Amiga SFS 
-+filesystem. It simply deletes files instead of moving them to 
-+".recycled" directory. It also doesn't remove files from ".recycled" 
-+directory, when there is no space left on drive. 
-+
-+If there is no space left, you need to manually remove files from 
-+".recycled" directory. Also if you want to delete a file in a safe 
-+way, you need to move it to ".recycled" directory by hand.
-+
-+Because of all of above, the amount of free space on disk does not 
-+include space used by all files from ".recycled" directory.
-+
-+
-+Limitations
-+===========
-+
-+There is no Amiga protection bits into Linux permission bits tranlation
-+and vice versa. If you need this feature, mail me.
-+
-+ASFS will always keep some amount of blocks free. This means that you 
-+cannot fill the drive completely. It is because Amiga SFS uses some 
-+special methods of writing data (called safe write), which needs some
-+additional free space.
-+
-+File systems with unfinished transactions (this happens when system crashed
-+during writing data to disk on AmigaOS/MorphOS) will be mounted read-only
-+to protect data. The only way to fix such filesystem is to mount it under
-+AmigaOS or MorphOS.
-+
-+Do not try to mount and write to filesystem with errors. Bad things will
-+happen.
-+
-+
-+Mount options for the ASFS
-+==========================
-+
-+setuid=uid	
-+		This sets the owner of all files and directories in the file
-+		system to uid.
-+
-+setgid=gid	
-+		Same as above, but for gid.
-+
-+mode=mode	
-+		Sets the mode flags to the given (octal) value. Directories 
-+		will get an x permission if the corresponding r bit is set.
-+		The default mode is 0644, which means that everybody are allowed 
-+		to read files, but only root can write to them.
-+		(for directories this means also that search bits are set).
-+
-+prefix=path	
-+		Path will be prefixed to every absolute path name of symbolic 
-+		links on an ASFS/AFFS partition. Default = "/". (See below.)
-+
-+volume=name
-+		When symbolic links with an absolute path are created
-+		on an ASFS/AFFS partition, name will be prepended as the
-+		volume name. Default = "" (empty string). (See below.)
-+
-+lowercasevol
-+		Translate all volume names in symlinks to lower case.
-+		Disabled by default. (See below.)
-+
-+iocharset=name
-+		Character set to use for converting file names. Specifies 
-+		character set used by your Linux system. 
-+codepage=name
-+		Set the codepage number for converting file names. Specifies
-+		character set used by your Amiga. Use full name (for example
-+		'cp1251' instead of '1251') here, this allows to specify any
-+		character set, not only numbered one (like 'iso8859-2').
-+		Use special name 'none' to disable the NLS file name 
-+		translation.
-+
-+Symbolic links
-+==============
-+
-+Although the Amiga and Linux file systems resemble each other, there
-+are some, not always subtle, differences. One of them becomes apparent
-+with symbolic links. While Linux has a file system with exactly one
-+root directory, the Amiga has a separate root directory for each
-+file system (for example, partition, floppy disk, ...). With the Amiga,
-+these entities are called "volumes". They have symbolic names which
-+can be used to access them. Thus, symbolic links can point to a
-+different volume. ASFS turns the volume name into a directory name
-+and prepends the prefix path (see prefix option) to it. When option
-+"lowercasevol" is set, it also translates volume names to lower case.
-+If the volume name is the same as a name given in "volume" option,
-+it will be ignored and an absolute path will be created.
-+
-+Example:
-+You mount all your Amiga partitions under /amiga/<volume> (where
-+<volume> is the name of the volume), and you give options
-+`prefix="/amiga/",volume="Linux",lowercasevol' when mounting all your 
-+ASFS partitions. (They might be "User", "WB" and "Graphics", the mount 
-+points /amiga/user, /amiga/wb and /amiga/graphics). 
-+
-+A symbolic link referring to "USER:sc/include/dos/dos.h" will be 
-+translated to "/amiga/user/sc/include/dos/dos.h".
-+A symbolic link referring to "Linux:etc/fstab" will be translated to
-+"/etc/fstab".
-+If you create a symlink referring to "/amiga/graphics/data/pict.jpg",
-+it will be saved as "graphics:data/pict.jpg".
-+If you create a symlink referring to "/boot/System.map", it will be 
-+saved as "Linux:boot/System.map".
-+
-+
-+Other information
-+=================
-+
-+Supported block sizes are: 512, 1024, 2048 and 4096 bytes. Larger blocks
-+speed up almost everything at the expense of wasted disk space. The speed
-+gain above 4K seems not really worth the price, so you don't lose too
-+much here, either.
-+
-+This file system has been tested on Motorola PPC and 68k, as well as 
-+Intel x86 systems. I don't know, if it works on other Linux systems.
-+
-+This filesystem is in BETA STAGE. This means that driver MIGHT corrupt
-+or damage data on your disk. Remember! YOU USE IT ON YOUR OWN RISK! 
-+
-+I made almost all I could to minimalize this risk. On my systems several 
-+gigabytes has been succesfully copied from and to SFS disks. I would also 
-+appreciate any infomation if this filesystem works on your system or not. 
-+See next paragraph for my email.
-+
-+Some parts of this documentation has been adapted from AFFS driver docs.
-+
-+
-+Author, contact and copyright infos
-+===================================
-+
-+ASFS has been written by Marek 'March' Szyprowski <marek at amiga.pl>.
-+Mail me if you have any suggestions or found a bug.
-+
-+Copyright (C) 2003,2004,2005  Marek 'March' Szyprowski <marek at amiga.pl>
-+
-+Thanks to Marcin Kurek (Morgoth/Dreamolers-CAPS) for help and parts 
-+of original amiga version of SmartFilesystem source code. 
-+
-+SmartFilesystem is copyrighted (C) 2003,2004 by: John Hendrikx, 
-+Ralph Schmidt, Emmanuel Lesueur, David Gerber and Marcin Kurek
-+
-+The ASFS driver is realased under the terms of of the GNU General 
-+Public License. See source code for more details.
-+
-diff -aurN a/fs/Kconfig b/fs/Kconfig
---- a/fs/Kconfig	2005-06-06 11:22:29.000000000 -0400
-+++ b/fs/Kconfig	2005-06-15 22:05:09.000000000 -0400
-@@ -921,6 +921,53 @@
- 	  To compile this file system support as a module, choose M here: the
- 	  module will be called affs.  If unsure, say N.
- 
-+config ASFS_FS
-+	tristate "Amiga SFS file system support (EXPERIMENTAL)"
-+	select NLS
-+	depends on EXPERIMENTAL
-+	help
-+
-+	  The Amiga Smart FileSystem (SFS) is the file system used on hard 
-+	  disks by Amiga(tm) and MorphOS(tm) systems.  Say Y if you want 
-+	  to be able to read files from an Amiga SFS partition on your hard 
-+	  drive.
-+
-+	  For more information read <file:Documentation/filesystems/asfs.txt>
-+
-+	  To compile this file system support as a module, choose M here: the
-+	  module will be called asfs.
-+
-+	  If unsure, say N.
-+
-+config ASFS_DEFAULT_CODEPAGE
-+	string "Default codepage for SFS"
-+	depends on ASFS_FS
-+	default ""
-+	help
-+	  This option should be set to the codepage of your SFS filesystems.
-+	  It can be overridden with the 'codepage' mount option. Leave it blank 
-+	  or enter 'none' to disable filename converting.
-+
-+	  Use full codepage name (for example 'cp1251' instead of '1251') here, 
-+	  this allows to specify any character set, not only numbered one (like 
-+	  'iso8859-2').
-+
-+	  If unsure, leave it blank.
-+
-+config ASFS_RW
-+	bool "Amiga SFS write support (DANGEROUS)"
-+	depends on ASFS_FS
-+	help
-+
-+	  If you say Y here, you will be able to write to ASFS file
-+	  systems as well as read from them. The read-write support in ASFS
-+	  is in beta stage. This means that useing it to write files to SFS 
-+	  partitions is DANGEROUS and COULD corrupt the filesystem.
-+
-+	  For more information read <file:Documentation/filesystems/asfs.txt>
-+
-+	  If unsure, say N.
-+
- config HFS_FS
- 	tristate "Apple Macintosh file system support (EXPERIMENTAL)"
- 	depends on EXPERIMENTAL
-diff -aurN a/fs/Makefile b/fs/Makefile
---- a/fs/Makefile	2005-06-06 11:22:29.000000000 -0400
-+++ b/fs/Makefile	2005-06-15 22:05:09.000000000 -0400
-@@ -81,6 +81,7 @@
- obj-$(CONFIG_JFFS_FS)		+= jffs/
- obj-$(CONFIG_JFFS2_FS)		+= jffs2/
- obj-$(CONFIG_AFFS_FS)		+= affs/
-+obj-$(CONFIG_ASFS_FS)		+= asfs/
- obj-$(CONFIG_ROMFS_FS)		+= romfs/
- obj-$(CONFIG_QNX4FS_FS)		+= qnx4/
- obj-$(CONFIG_AUTOFS_FS)		+= autofs/
-diff -aurN a/fs/asfs/Changes b/fs/asfs/Changes
---- a/fs/asfs/Changes	1969-12-31 19:00:00.000000000 -0500
-+++ b/fs/asfs/Changes	2005-06-15 22:05:09.000000000 -0400
-@@ -0,0 +1,108 @@
-+
-+Amiga Smart File System, Linux implementation
-+
-+Please direct bug reports to: marek at amiga.pl
-+
-+History:
-+
-+v1.0beta9 (17.03.2005)
-+- added NLS support (thanks to Pavel Fedin!)
-+
-+v1.0beta8 (07.01.2005)
-+- adapted to 2.6.10 kenrel VFS changes
-+- added workaround for buggy Mandrake kernel headers
-+
-+v1.0beta7 (25.06.2004)
-+- small changes in documentation
-+- code clean up: bitfuncs.c, super.c, inode.c, *.h, Makefile, added 
-+  asfs_ prefix to function names, made some functions static
-+  (big thanks to Christoph Hellwig for advice!)
-+- fixed minor bugs (inode leak in super.c, not-realesed buffer during 
-+  object renaming in inode.c)
-+- now files/dirs are created with global ownership/permission bits
-+
-+v1.0beta6 (04.06.2004)
-+- fixed: ASFS_SB(sb)->flags was always zero in 2.6.x code
-+
-+v1.0beta5 (07.05.2004)
-+- finally fixed a problem with file size attrib. not being written
-+  to disk
-+- fixed some problems with GCC 3.x and debug enabled
-+
-+v1.0beta4 (12.04.2004)
-+- removed dummy asfs_notify_change (this fixes major bug introduced
-+  in 1.0beta3 - file size wasn't written to disk) until it will 
-+  be implemented completely
-+
-+v1.0beta3 (22.03.2004) - still beta
-+- updated for 2.6.x kernels VFS changes
-+- code clean-up 
-+- added dummy asfs_notify_change (chmod now returns no errors)
-+- added symlinks write support
-+- fixed: ASFS_SB(sb)->flags was always zero
-+
-+v1.0beta2 (11.01.2004) - special version for Pegasos][ kernel
-+- separated read and write functions, can be compiled also
-+  as read-only fs
-+
-+v1.0beta1 (02.12.2003) - first public beta with write support
-+- added dentry hashing/comparing routines
-+- code clean-up
-+
-+v1.0aplha4 (30.11.2003) - preparing for first public beta
-+- fixed some problems with renaming/moving files
-+- fixed two major bugs, which didn't occur when fs was mounted
-+  on loopback device (newly allocated blocks were not written to
-+  disk and state bits were not set correctly on newly mapped file
-+  blocks)
-+- fixed many small bugs in io code (some buffers were not freed)
-+- added/modified sb locks in asfs_lookup and asfs_getblock
-+- fixed serious bug in file block allocation routines
-+
-+v1.0aplha3 (23.11.2003)
-+- added (hopefully) all byteswap code, should now work again on 
-+  little-endian systems (also with write support!)
-+- updated documentation
-+
-+v1.0alpha2 (13.11.2003) 
-+- now alocates file blocks in chunks during one request
-+- fixed some dead-locks, other fixes
-+
-+v1.0alpha (02.11.2003) - first working version with full write support
-+- too much to list it here ;)
-+
-+... (working on write support)
-+
-+v0.7 (12.10.2003) - internal realase
-+- added asfs_breadcheck, modified asfs_get_node, asfs_search_BTree, 
-+  no more from_be32/16 macros, other...
-+- code splitted into several files
-+
-+v0.6 (04.09.2003) - final read-only version
-+- added support for HashTables, directory scaning should be
-+  MUCH faster now
-+- added checking of block IDs before reading any data from block
-+
-+v0.5 (19.07.2003)
-+- added simple but effective extent cache - real speed-up 
-+  in reading large files
-+- added read support for symlinks - based on AFFS symlinks
-+
-+v0.4 (10.07.2003)
-+- third code clean-up (thanks to Roman Zippel for advice)
-+- now uses generic readpage and readinode routines
-+
-+v0.3beta (17.06.2003)
-+- second code clean-up
-+
-+v0.2beta2 (15.06.2003)
-+- fixed yet another stupid bug - driver can't read root block on little-endian systems
-+v0.2beta (15.06.2003)
-+- fixed stupid bug - now files have 'file' flag (S_IFREG) set...
-+- added mount options to set uid, gid and mode of files and dirs
-+- made hidden files & dirs really hidden (= not listed in directories)
-+- code clean-up
-+
-+v0.1beta (11.06.2003) 
-+- after many kernel crashes, finally got it! 
-+- first working read-only filesystem driver
-diff -aurN a/fs/asfs/Makefile b/fs/asfs/Makefile
---- a/fs/asfs/Makefile	1969-12-31 19:00:00.000000000 -0500
-+++ b/fs/asfs/Makefile	2005-06-15 22:05:09.000000000 -0400
-@@ -0,0 +1,8 @@
-+#
-+# Makefile for the linux asfs filesystem routines.
-+#
-+
-+obj-$(CONFIG_ASFS_FS) += asfs.o
-+
-+asfs-y += dir.o extents.o file.o inode.o namei.o nodes.o objects.o super.o symlink.o
-+asfs-$(CONFIG_ASFS_RW) += adminspace.o bitfuncs.o 
-diff -aurN a/fs/asfs/adminspace.c b/fs/asfs/adminspace.c
---- a/fs/asfs/adminspace.c	1969-12-31 19:00:00.000000000 -0500
-+++ b/fs/asfs/adminspace.c	2005-06-15 22:05:09.000000000 -0400
-@@ -0,0 +1,446 @@
-+/*
-+ *
-+ * Amiga Smart File System, Linux implementation
-+ * version: 1.0beta7
-+ *
-+ * This file contains some parts of the original amiga version of 
-+ * SmartFilesystem source code.
-+ *
-+ * SmartFilesystem is copyrighted (C) 2003 by: John Hendrikx, 
-+ * Ralph Schmidt, Emmanuel Lesueur, David Gerber, and Marcin Kurek
-+ * 
-+ * Adapted and modified by Marek 'March' Szyprowski <marek at amiga.pl>
-+ *
-+ */
-+
-+#include <linux/types.h>
-+#include <linux/errno.h>
-+#include <linux/slab.h>
-+#include <linux/fs.h>
-+#include <linux/buffer_head.h>
-+#include <linux/vfs.h>
-+#include "asfs_fs.h"
-+#include "bitfuncs.h"
-+
-+#include <asm/byteorder.h>
-+
-+#ifdef CONFIG_ASFS_RW
-+
-+static int setfreeblocks(struct super_block *sb, u32 freeblocks)
-+{
-+	struct buffer_head *bh;
-+	if ((bh = asfs_breadcheck(sb, ASFS_SB(sb)->rootobjectcontainer, ASFS_OBJECTCONTAINER_ID))) {
-+		struct fsRootInfo *ri = (struct fsRootInfo *) ((u8 *) bh->b_data + sb->s_blocksize - sizeof(struct fsRootInfo));
-+		ASFS_SB(sb)->freeblocks = freeblocks;
-+		ri->freeblocks = cpu_to_be32(freeblocks);
-+		asfs_bstore(sb, bh);
-+		asfs_brelse(bh);
-+		return 0;
-+	}
-+	return -EIO;
-+}
-+
-+static inline int enoughspace(struct super_block *sb, u32 blocks)
-+{
-+	if (ASFS_SB(sb)->freeblocks - ASFS_ALWAYSFREE < blocks)
-+		return FALSE;
-+
-+	return TRUE;
-+}
-+
-+	/* Determines the amount of free blocks starting from block /block/.
-+	   If there are no blocks found or if there was an error -1 is returned,
-+	   otherwise this function will count the number of free blocks until
-+	   an allocated block is encountered or until maxneeded has been
-+	   exceeded. */
-+
-+static int availablespace(struct super_block *sb, u32 block, u32 maxneeded)
-+{
-+	struct buffer_head *bh = NULL;
-+	struct fsBitmap *b;
-+	u32 longs = ASFS_SB(sb)->blocks_inbitmap >> 5;
-+	u32 maxbitmapblock = ASFS_SB(sb)->bitmapbase + ASFS_SB(sb)->blocks_bitmap;
-+	int blocksfound = 0;
-+	u32 bitstart;
-+	int bitend;
-+	u32 nextblock = ASFS_SB(sb)->bitmapbase + block / ASFS_SB(sb)->blocks_inbitmap;
-+
-+	bitstart = block % ASFS_SB(sb)->blocks_inbitmap;
-+
-+	while (nextblock < maxbitmapblock && (bh = asfs_breadcheck(sb, nextblock++, ASFS_BITMAP_ID))) {
-+		b = (void *) bh->b_data;
-+
-+		if ((bitend = bmffz(b->bitmap, longs, bitstart)) >= 0) {
-+			blocksfound += bitend - bitstart;
-+			asfs_brelse(bh);
-+			return blocksfound;
-+		}
-+		blocksfound += ASFS_SB(sb)->blocks_inbitmap - bitstart;
-+		if (blocksfound >= maxneeded) {
-+			asfs_brelse(bh);
-+			return blocksfound;
-+		}
-+		bitstart = 0;
-+		asfs_brelse(bh);
-+	}
-+
-+	if (bh == NULL)
-+		return (-1);
-+
-+	return (blocksfound);
-+}
-+
-+int asfs_findspace(struct super_block *sb, u32 maxneeded, u32 start, u32 end, u32 * returned_block, u32 * returned_blocks)
-+{
-+	struct buffer_head *bh;
-+	u32 longs = ASFS_SB(sb)->blocks_inbitmap >> 5;
-+	u32 space = 0;
-+	u32 block;
-+	u32 bitmapblock = ASFS_SB(sb)->bitmapbase + start / ASFS_SB(sb)->blocks_inbitmap;
-+	u32 breakpoint;
-+	int bitstart, bitend;
-+	int reads;
-+
-+	if (enoughspace(sb, maxneeded) == FALSE) {
-+		*returned_block = 0;
-+		*returned_blocks = 0;
-+		return -ENOSPC;
-+	}
-+
-+	if (start >= ASFS_SB(sb)->totalblocks)
-+		start -= ASFS_SB(sb)->totalblocks;
-+
-+	if (end == 0)
-+		end = ASFS_SB(sb)->totalblocks;
-+
-+	reads = ((end - 1) / ASFS_SB(sb)->blocks_inbitmap) + 1 - start / ASFS_SB(sb)->blocks_inbitmap;
-+
-+	if (start >= end)
-+		reads += (ASFS_SB(sb)->totalblocks - 1) / ASFS_SB(sb)->blocks_inbitmap + 1;
-+
-+	breakpoint = (start < end ? end : ASFS_SB(sb)->totalblocks);
-+
-+	*returned_block = 0;
-+	*returned_blocks = 0;
-+
-+	bitend = start % ASFS_SB(sb)->blocks_inbitmap;
-+	block = start - bitend;
-+
-+	while ((bh = asfs_breadcheck(sb, bitmapblock++, ASFS_BITMAP_ID))) {
-+		struct fsBitmap *b = (void *) bh->b_data;
-+		u32 localbreakpoint = breakpoint - block;
-+
-+		if (localbreakpoint > ASFS_SB(sb)->blocks_inbitmap)
-+			localbreakpoint = ASFS_SB(sb)->blocks_inbitmap;
-+
-+		/* At this point space contains the amount of free blocks at
-+		   the end of the previous bitmap block.  If there are no
-+		   free blocks at the start of this bitmap block, space will
-+		   be set to zero, since in that case the space isn't adjacent. */
-+
-+		while ((bitstart = bmffo(b->bitmap, longs, bitend)) < ASFS_SB(sb)->blocks_inbitmap) {
-+			/* found the start of an empty space, now find out how large it is */
-+
-+			if (bitstart >= localbreakpoint)
-+				break;
-+
-+			if (bitstart != 0)
-+				space = 0;
-+
-+			bitend = bmffz(b->bitmap, longs, bitstart);
-+
-+			if (bitend > localbreakpoint)
-+				bitend = localbreakpoint;
-+
-+			space += bitend - bitstart;
-+
-+			if (*returned_blocks < space) {
-+				*returned_block = block + bitend - space;
-+				if (space >= maxneeded) {
-+					*returned_blocks = maxneeded;
-+					asfs_brelse(bh);
-+					return 0;
-+				}
-+				*returned_blocks = space;
-+			}
-+
-+			if (bitend >= localbreakpoint)
-+				break;
-+		}
-+
-+		if (--reads == 0)
-+			break;
-+
-+		/* no (more) empty spaces found in this block */
-+
-+		if (bitend != ASFS_SB(sb)->blocks_inbitmap)
-+			space = 0;
-+
-+		bitend = 0;
-+		block += ASFS_SB(sb)->blocks_inbitmap;
-+
-+		if (block >= ASFS_SB(sb)->totalblocks) {
-+			block = 0;
-+			space = 0;
-+			breakpoint = end;
-+			bitmapblock = ASFS_SB(sb)->bitmapbase;
-+		}
-+		asfs_brelse(bh);
-+	}
-+
-+	if (bh == NULL)
-+		return -EIO;
-+
-+	asfs_brelse(bh);
-+
-+	if (*returned_blocks == 0)
-+		return -ENOSPC;
-+	else
-+		return 0;
-+}
-+
-+int asfs_markspace(struct super_block *sb, u32 block, u32 blocks)
-+{
-+	int errorcode;
-+
-+	asfs_debug("markspace: Marking %d blocks from block %d\n", blocks, block);
-+
-+	if ((availablespace(sb, block, blocks)) < blocks) {
-+		printk("ASFS: Attempted to mark %d blocks from block %d, but some of them were already full!\n", blocks, block);
-+		return -EIO;
-+	}
-+
-+	if ((errorcode = setfreeblocks(sb, ASFS_SB(sb)->freeblocks - blocks)) == 0) {
-+		struct buffer_head *bh;
-+		u32 skipblocks = block / ASFS_SB(sb)->blocks_inbitmap;
-+		u32 longs = (sb->s_blocksize - sizeof(struct fsBitmap)) >> 2;
-+		u32 bitmapblock;
-+
-+		block -= skipblocks * ASFS_SB(sb)->blocks_inbitmap;
-+		bitmapblock = ASFS_SB(sb)->bitmapbase + skipblocks;
-+
-+		while (blocks > 0) {
-+			if ((bh = asfs_breadcheck(sb, bitmapblock++, ASFS_BITMAP_ID))) {
-+				struct fsBitmap *b = (void *) bh->b_data;
-+
-+				blocks -= bmclr(b->bitmap, longs, block, blocks);
-+				block = 0;
-+
-+				asfs_bstore(sb, bh);
-+				asfs_brelse(bh);
-+			} else
-+				return -EIO;
-+		}
-+	}
-+
-+	return (errorcode);
-+}
-+
-+	/* This function checks the bitmap and tries to locate at least /blocksneeded/
-+	   adjacent unused blocks.  If found it sets returned_block to the start block
-+	   and returns no error.  If not found, ERROR_DISK_IS_FULL is returned and
-+	   returned_block is set to zero.  Any other errors are returned as well. */
-+
-+static inline int internalfindspace(struct super_block *sb, u32 blocksneeded, u32 startblock, u32 endblock, u32 * returned_block)
-+{
-+	u32 blocks;
-+	int errorcode;
-+
-+	if ((errorcode = asfs_findspace(sb, blocksneeded, startblock, endblock, returned_block, &blocks)) == 0)
-+		if (blocks != blocksneeded)
-+			return -ENOSPC;
-+
-+	return errorcode;
-+}
-+
-+static int findandmarkspace(struct super_block *sb, u32 blocksneeded, u32 * returned_block)
-+{
-+	int errorcode;
-+
-+	if (enoughspace(sb, blocksneeded) != FALSE) {
-+		if ((errorcode = internalfindspace(sb, blocksneeded, 0, ASFS_SB(sb)->totalblocks, returned_block)) == 0)
-+			errorcode = asfs_markspace(sb, *returned_block, blocksneeded);
-+	} else
-+		errorcode = -ENOSPC;
-+
-+	return (errorcode);
-+}
-+
-+/* ************************** */
-+
-+int asfs_freespace(struct super_block *sb, u32 block, u32 blocks)
-+{
-+	int errorcode;
-+
-+	asfs_debug("freespace: Freeing %d blocks from block %d\n", blocks, block);
-+
-+	if ((errorcode = setfreeblocks(sb, ASFS_SB(sb)->freeblocks + blocks)) == 0) {
-+		struct buffer_head *bh;
-+		u32 skipblocks = block / ASFS_SB(sb)->blocks_inbitmap;
-+		u32 longs = (sb->s_blocksize - sizeof(struct fsBitmap)) >> 2;
-+		u32 bitmapblock;
-+
-+		block -= skipblocks * ASFS_SB(sb)->blocks_inbitmap;
-+		bitmapblock = ASFS_SB(sb)->bitmapbase + skipblocks;
-+
-+		while (blocks > 0) {
-+			if ((bh = asfs_breadcheck(sb, bitmapblock++, ASFS_BITMAP_ID))) {
-+				struct fsBitmap *b = (void *) bh->b_data;
-+
-+				blocks -= bmset(b->bitmap, longs, block, blocks);
-+				block = 0;
-+
-+				asfs_bstore(sb, bh);
-+				asfs_brelse(bh);
-+			} else
-+				return -EIO;
-+		}
-+	}
-+
-+	return (errorcode);
-+}
-+
-+/*************** admin space containers ****************/
-+
-+int asfs_allocadminspace(struct super_block *sb, u32 *returned_block)
-+{
-+	struct buffer_head *bh;
-+	u32 adminspaceblock = ASFS_SB(sb)->adminspacecontainer;
-+	int errorcode = -EIO;
-+
-+	asfs_debug("allocadminspace: allocating new block\n");
-+
-+	while ((bh = asfs_breadcheck(sb, adminspaceblock, ASFS_ADMINSPACECONTAINER_ID))) {
-+		struct fsAdminSpaceContainer *asc1 = (void *) bh->b_data;
-+		struct fsAdminSpace *as1 = asc1->adminspace;
-+		int adminspaces1 = (sb->s_blocksize - sizeof(struct fsAdminSpaceContainer)) / sizeof(struct fsAdminSpace);
-+
-+		while (adminspaces1-- > 0) {
-+			s16 bitoffset;
-+
-+			if (as1->space != 0 && (bitoffset = bfffz(be32_to_cpu(as1->bits), 0)) >= 0) {
-+				u32 emptyadminblock = be32_to_cpu(as1->space) + bitoffset;
-+				as1->bits |= cpu_to_be32(1 << (31 - bitoffset));
-+				asfs_bstore(sb, bh);
-+				*returned_block = emptyadminblock;
-+				asfs_brelse(bh);
-+				asfs_debug("allocadminspace: found block %d\n", *returned_block);
-+				return 0;
-+			}
-+			as1++;
-+		}
-+
-+		adminspaceblock = be32_to_cpu(asc1->next);
-+		asfs_brelse(bh);
-+
-+		if (adminspaceblock == 0) {
-+			u32 startblock;
-+
-+			asfs_debug("allocadminspace: allocating new adminspace area\n");
-+
-+			/* If we get here it means current adminspace areas are all filled.
-+			   We would now need to find a new area and create a fsAdminSpace
-+			   structure in one of the AdminSpaceContainer blocks.  If these
-+			   don't have any room left for new adminspace areas a new
-+			   AdminSpaceContainer would have to be created first which is
-+			   placed as the first block in the newly found admin area. */
-+
-+			adminspaceblock = ASFS_SB(sb)->adminspacecontainer;
-+
-+			if ((errorcode = findandmarkspace(sb, 32, &startblock)))
-+				return errorcode;
-+
-+			while ((bh = asfs_breadcheck(sb, adminspaceblock, ASFS_ADMINSPACECONTAINER_ID))) {
-+				struct fsAdminSpaceContainer *asc2 = (void *) bh->b_data;
-+				struct fsAdminSpace *as2 = asc2->adminspace;
-+				int adminspaces2 = (sb->s_blocksize - sizeof(struct fsAdminSpaceContainer)) / sizeof(struct fsAdminSpace);
-+
-+				while (adminspaces2-- > 0 && as2->space != 0)
-+					as2++;
-+
-+				if (adminspaces2 >= 0) {	/* Found a unused AdminSpace in this AdminSpaceContainer! */
-+					as2->space = cpu_to_be32(startblock);
-+					as2->bits = 0;
-+					asfs_bstore(sb, bh);
-+					asfs_brelse(bh);
-+					break;
-+				}
-+
-+				if (asc2->next == 0) {
-+					/* Oh-oh... we marked our new adminspace area in use, but we couldn't
-+					   find space to store a fsAdminSpace structure in the existing
-+					   fsAdminSpaceContainer blocks.  This means we need to create and
-+					   link a new fsAdminSpaceContainer as the first block in our newly
-+					   marked adminspace. */
-+
-+					asc2->next = cpu_to_be32(startblock);
-+					asfs_bstore(sb, bh);
-+					asfs_brelse(bh);
-+
-+					/* Now preparing new AdminSpaceContainer */
-+
-+					if ((bh = asfs_getzeroblk(sb, startblock)) == NULL)
-+						return -EIO;
-+
-+					asc2 = (void *) bh->b_data;
-+					asc2->bheader.id = cpu_to_be32(ASFS_ADMINSPACECONTAINER_ID);
-+					asc2->bheader.ownblock = cpu_to_be32(startblock);
-+					asc2->previous = cpu_to_be32(adminspaceblock);
-+					asc2->adminspace[0].space = cpu_to_be32(startblock);
-+					asc2->adminspace[0].bits = cpu_to_be32(0x80000000);
-+					asc2->bits = 32;
-+
-+					asfs_bstore(sb, bh);
-+					asfs_brelse(bh);
-+
-+					adminspaceblock = startblock;
-+					break;	/* Breaks through to outer loop! */
-+				}
-+				adminspaceblock = be32_to_cpu(asc2->next);
-+				asfs_brelse(bh);
-+			}
-+		}
-+	}
-+	return errorcode;
-+}
-+
-+int asfs_freeadminspace(struct super_block *sb, u32 block)
-+{
-+	struct buffer_head *bh;
-+	u32 adminspaceblock = ASFS_SB(sb)->adminspacecontainer;
-+
-+	asfs_debug("freeadminspace: Entry -- freeing block %d\n", block);
-+
-+	while ((bh = asfs_breadcheck(sb, adminspaceblock, ASFS_ADMINSPACECONTAINER_ID))) {
-+		struct fsAdminSpaceContainer *asc = (void *) bh->b_data;
-+		struct fsAdminSpace *as = asc->adminspace;
-+		int adminspaces = (sb->s_blocksize - sizeof(struct fsAdminSpaceContainer)) / sizeof(struct fsAdminSpace);
-+
-+		while (adminspaces-- > 0) {
-+			if (block >= be32_to_cpu(as->space) && block < be32_to_cpu(as->space) + 32) {
-+				s16 bitoffset = block - be32_to_cpu(as->space);
-+				asfs_debug("freeadminspace: Block to be freed is located in AdminSpaceContainer block at %d\n", adminspaceblock);
-+				as->bits &= cpu_to_be32(~(1 << (31 - bitoffset)));
-+				asfs_bstore(sb, bh);
-+				asfs_brelse(bh);
-+				return 0;
-+			}
-+			as++;
-+		}
-+
-+		if ((adminspaceblock = be32_to_cpu(asc->next)) == 0)
-+			break;
-+
-+		asfs_brelse(bh);
-+	}
-+
-+	if (bh != NULL) {
-+		asfs_brelse(bh);
-+		printk("ASFS: Unable to free an administration block. The block cannot be found.");
-+		return -ENOENT;
-+	}
-+
-+	return -EIO;
-+}
-+
-+#endif
-diff -aurN a/fs/asfs/asfs_fs.h b/fs/asfs/asfs_fs.h
---- a/fs/asfs/asfs_fs.h	1969-12-31 19:00:00.000000000 -0500
-+++ b/fs/asfs/asfs_fs.h	2005-06-15 22:05:09.000000000 -0400
-@@ -0,0 +1,234 @@
-+#ifndef __LINUX_ASFS_FS_H
-+#define __LINUX_ASFS_FS_H
-+
-+#include <linux/types.h>
-+#include <linux/fs.h>
-+#include <linux/buffer_head.h>
-+#include <asm/byteorder.h>
-+#include <linux/amigasfs.h>
-+
-+#define asfs_debug(fmt,arg...) /* no debug at all */
-+//#define asfs_debug(fmt,arg...) printk(fmt,##arg)  /* general debug infos */
-+
-+#if !defined (__BIG_ENDIAN) && !defined (__LITTLE_ENDIAN)
-+#error Endianes must be known for ASFS to work. Sorry.
-+#endif
-+
-+#define ASFS_MAXFN_BUF (ASFS_MAXFN + 4)
-+#define ASFS_DEFAULT_UID 0
-+#define ASFS_DEFAULT_GID 0
-+#define ASFS_DEFAULT_MODE 0644	/* default permission bits for files, dirs have same permission, but with "x" set */
-+
-+/* Extent structure located in RAM (e.g. inside inode structure), 
-+   currently used to store last used extent */
-+
-+struct inramExtent {
-+	u32 startblock;	/* Block from begginig of the file */
-+	u32 key;
-+	u32 next;
-+	u16 blocks;
-+};
-+
-+/* inode in-kernel data */
-+
-+struct asfs_inode_info {
-+	u32 firstblock;
-+	u32 hashtable;
-+	int modified;
-+	loff_t mmu_private;
-+	struct inramExtent ext_cache;
-+	struct inode vfs_inode;
-+};
-+
-+/* short cut to get to the asfs specific inode data */
-+static inline struct asfs_inode_info *ASFS_I(struct inode *inode)
-+{
-+   return list_entry(inode, struct asfs_inode_info, vfs_inode);
-+}
-+
-+/* Amiga SFS superblock in-core data */
-+
-+struct asfs_sb_info {
-+	u32 totalblocks;
-+	u32 rootobjectcontainer;
-+	u32 extentbnoderoot;
-+	u32 objectnoderoot;
-+
-+	u32 adminspacecontainer;
-+	u32 bitmapbase;
-+	u32 freeblocks;
-+	u32 blocks_inbitmap;
-+	u32 blocks_bitmap;
-+	u32 block_rovingblockptr;
-+
-+	uid_t uid;
-+	gid_t gid;
-+	umode_t mode;
-+	u16 flags;
-+	char *prefix;
-+	char *root_volume;		/* Volume prefix for absolute symlinks. */
-+	char *iocharset;
-+	char *codepage;
-+	struct nls_table *nls_io;
-+	struct nls_table *nls_disk;
-+};
-+
-+/* short cut to get to the asfs specific sb data */
-+static inline struct asfs_sb_info *ASFS_SB(struct super_block *sb)
-+{
-+	return sb->s_fs_info;
-+}
-+ 
-+/* io inline code */
-+
-+u32 asfs_calcchecksum(void *block, u32 blocksize);
-+
-+static inline int
-+asfs_check_block(struct fsBlockHeader *block, u32 blocksize, u32 n, u32 id)
-+{
-+	if (asfs_calcchecksum(block, blocksize) ==
-+	    be32_to_cpu(((struct fsBlockHeader *) block)->checksum) &&
-+	    n == be32_to_cpu(((struct fsBlockHeader *) block)->ownblock) &&
-+	    id == be32_to_cpu(((struct fsBlockHeader *) block)->id))
-+		return TRUE;
-+	return FALSE;
-+}
-+
-+/* get fs structure from block and do some checks... */
-+static inline struct buffer_head *
-+asfs_breadcheck(struct super_block *sb, u32 n, u32 type)
-+{
-+	struct buffer_head *bh;
-+	if ((bh = sb_bread(sb, n))) {
-+		if (asfs_check_block ((void *)bh->b_data, sb->s_blocksize, n, type)) {
-+			return bh;	/* all okay */
-+		}
-+		brelse(bh);
-+	}
-+	return NULL;		/* error */
-+}
-+
-+static inline struct buffer_head *
-+asfs_getzeroblk(struct super_block *sb, int block)
-+{
-+	struct buffer_head *bh;
-+	bh = sb_getblk(sb, block);
-+	lock_buffer(bh);
-+	memset(bh->b_data, 0, sb->s_blocksize);
-+	set_buffer_uptodate(bh);
-+	unlock_buffer(bh);
-+	return bh;
-+}
-+
-+static inline void 
-+asfs_bstore(struct super_block *sb, struct buffer_head *bh)
-+{
-+	((struct fsBlockHeader *) (bh->b_data))->checksum =
-+	    cpu_to_be32(asfs_calcchecksum(bh->b_data, sb->s_blocksize));
-+	mark_buffer_dirty(bh);
-+}
-+
-+static inline void asfs_brelse(struct buffer_head *bh)
-+{
-+	brelse(bh);
-+}
-+
-+static inline void dec_count(struct inode *inode)
-+{
-+	inode->i_nlink--;
-+	mark_inode_dirty(inode);
-+}
-+
-+/* all prototypes */
-+
-+/* adminspace.c */
-+int asfs_allocadminspace(struct super_block *sb, u32 * block);
-+int asfs_freeadminspace(struct super_block *sb, u32 block);
-+int asfs_markspace(struct super_block *sb, u32 block, u32 blocks);
-+int asfs_freespace(struct super_block *sb, u32 block, u32 blocks);
-+int asfs_findspace(struct super_block *sb, u32 maxneeded, u32 start, u32 end,
-+	      u32 * returned_block, u32 * returned_blocks);
-+
-+/* dir.c */
-+int asfs_readdir(struct file *filp, void *dirent, filldir_t filldir);
-+struct dentry *asfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd);
-+
-+/* extents.c */
-+int asfs_getextent(struct super_block *sb, u32 key, struct buffer_head **ret_bh,
-+	      struct fsExtentBNode **ret_ebn);
-+int asfs_deletebnode(struct super_block *sb, struct buffer_head *cb, u32 key);
-+int asfs_deleteextents(struct super_block *sb, u32 key);
-+int asfs_addblocks(struct super_block *sb, u16 blocks, u32 newspace,
-+	      u32 objectnode, u32 * io_lastextentbnode);
-+
-+/* file.c */
-+int asfs_readpage(struct file *file, struct page *page);
-+sector_t asfs_bmap(struct address_space *mapping, sector_t block);
-+int asfs_writepage(struct page *page, struct writeback_control *wbc);
-+int asfs_prepare_write(struct file *file, struct page *page, unsigned from,
-+		       unsigned to);
-+void asfs_truncate(struct inode *inode);
-+int asfs_file_open(struct inode *inode, struct file *filp);
-+int asfs_file_release(struct inode *inode, struct file *filp);
-+
-+/* inode.c */
-+struct inode *asfs_get_root_inode(struct super_block *sb);
-+void asfs_read_locked_inode(struct inode *inode, void *arg);
-+int asfs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd);
-+int asfs_mkdir(struct inode *dir, struct dentry *dentry, int mode);
-+int asfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname);
-+int asfs_rmdir(struct inode *dir, struct dentry *dentry);
-+int asfs_unlink(struct inode *dir, struct dentry *dentry);
-+int asfs_rename(struct inode *old_dir, struct dentry *old_dentry,
-+		struct inode *new_dir, struct dentry *new_dentry);
-+int asfs_notify_change(struct dentry *dentry, struct iattr *attr);
-+
-+/* namei */
-+u8 asfs_lowerchar(u8 c);
-+int asfs_check_name(const u8 *name, int len);
-+int asfs_namecmp(u8 *s, u8 *ct, int casesensitive, struct nls_table *t);
-+u16 asfs_hash(u8 *name, int casesensitive);
-+void asfs_translate(u8 *to, u8 *from, struct nls_table *nls_to, struct nls_table *nls_from, int limit);
-+
-+/* nodes */
-+int asfs_getnode(struct super_block *sb, u32 nodeno,
-+	    struct buffer_head **ret_bh, struct fsObjectNode **ret_node);
-+int asfs_createnode(struct super_block *sb, struct buffer_head **returned_cb,
-+	       struct fsNode **returned_node, u32 * returned_nodeno);
-+int asfs_deletenode(struct super_block *sb, u32 objectnode);
-+
-+/* objects */
-+struct fsObject *asfs_nextobject(struct fsObject *obj);
-+struct fsObject *asfs_find_obj_by_name(struct super_block *sb,
-+		struct fsObjectContainer *objcont, u8 * name);
-+int asfs_readobject(struct super_block *sb, u32 objectnode,
-+	       struct buffer_head **cb, struct fsObject **returned_object);
-+int asfs_createobject(struct super_block *sb, struct buffer_head **io_cb,
-+		 struct fsObject **io_o, struct fsObject *src_o,
-+		 u8 * objname, int force);
-+int asfs_deleteobject(struct super_block *sb, struct buffer_head *cb,
-+		 struct fsObject *o);
-+int asfs_renameobject(struct super_block *sb, struct buffer_head *cb1,
-+		 struct fsObject *o1, struct buffer_head *cbparent,
-+		 struct fsObject *oparent, u8 * newname);
-+
-+int asfs_addblockstofile(struct super_block *sb, struct buffer_head *objcb,
-+		    struct fsObject *o, u32 blocks, u32 * newspace,
-+		    u32 * addedblocks);
-+int asfs_truncateblocksinfile(struct super_block *sb, struct buffer_head *bh,
-+			 struct fsObject *o, u32 newsize);
-+
-+/* super.c */
-+struct super_block *asfs_read_super(struct super_block *sb, void *data,
-+				    int silent);
-+void asfs_put_super(struct super_block *sb);
-+int asfs_statfs(struct super_block *sb, struct kstatfs *buf);
-+int asfs_remount(struct super_block *sb, int *flags, char *data);
-+struct inode *asfs_alloc_inode(struct super_block *sb);
-+void asfs_destroy_inode(struct inode *inode);
-+
-+/* symlink.c */
-+int asfs_symlink_readpage(struct file *file, struct page *page);
-+int asfs_write_symlink(struct inode *symfile, const char *symname);
-+
-+#endif
-diff -aurN a/fs/asfs/bitfuncs.c b/fs/asfs/bitfuncs.c
---- a/fs/asfs/bitfuncs.c	1969-12-31 19:00:00.000000000 -0500
-+++ b/fs/asfs/bitfuncs.c	2005-06-15 22:05:09.000000000 -0400
-@@ -0,0 +1,171 @@
-+/*
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License
-+ * as published by the Free Software Foundation; either version
-+ * 2 of the License, or (at your option) any later version.
-+ *
-+ */
-+
-+#include <linux/types.h>
-+#include <asm/byteorder.h>
-+#include "bitfuncs.h"
-+
-+/* Bitmap (bm) functions:
-+   These functions perform bit-operations on regions of memory which
-+   are a multiple of 4 bytes in length. Bitmap is in bigendian byte order.
-+*/
-+
-+/* This function finds the first set bit in a region of memory starting
-+   with /bitoffset/.  The region of memory is /longs/ longs long.  It
-+   returns the bitoffset of the first set bit it finds. */
-+
-+int bmffo(u32 *bitmap, int longs, int bitoffset)
-+{
-+	u32 *scan = bitmap;
-+	int longoffset, bit;
-+
-+	longoffset = bitoffset >> 5;
-+	longs -= longoffset;
-+	scan += longoffset;
-+
-+	bitoffset = bitoffset & 0x1F;
-+
-+	if (bitoffset != 0) {
-+		if ((bit = bfffo(be32_to_cpu(*scan), bitoffset)) >= 0) {
-+			return (bit + ((scan - bitmap) << 5));
-+		}
-+		scan++;
-+		longs--;
-+	}
-+
-+	while (longs-- > 0) {
-+		if (*scan++ != 0) {
-+			return (bfffo(be32_to_cpu(*--scan), 0) + ((scan - bitmap) << 5));
-+		}
-+	}
-+
-+	return (-1);
-+}
-+
-+/* This function finds the first unset bit in a region of memory starting
-+   with /bitoffset/.  The region of memory is /longs/ longs long.  It
-+   returns the bitoffset of the first unset bit it finds. */
-+
-+int bmffz(u32 *bitmap, int longs, int bitoffset)
-+{
-+	u32 *scan = bitmap;
-+	int longoffset, bit;
-+
-+	longoffset = bitoffset >> 5;
-+	longs -= longoffset;
-+	scan += longoffset;
-+
-+	bitoffset = bitoffset & 0x1F;
-+
-+	if (bitoffset != 0) {
-+		if ((bit = bfffz(be32_to_cpu(*scan), bitoffset)) >= 0) {
-+			return (bit + ((scan - bitmap) << 5));
-+		}
-+		scan++;
-+		longs--;
-+	}
-+
-+	while (longs-- > 0) {
-+		if (*scan++ != 0xFFFFFFFF) {
-+			return (bfffz(be32_to_cpu(*--scan), 0) + ((scan - bitmap) << 5));
-+		}
-+	}
-+
-+	return (-1);
-+}
-+
-+/* This function clears /bits/ bits in a region of memory starting
-+   with /bitoffset/.  The region of memory is /longs/ longs long.  If
-+   the region of memory is too small to clear /bits/ bits then this
-+   function exits after having cleared all bits till the end of the
-+   memory region.  In any case it returns the number of bits which
-+   were actually cleared. */
-+
-+int bmclr(u32 *bitmap, int longs, int bitoffset, int bits)
-+{
-+	u32 *scan = bitmap;
-+	int longoffset;
-+	int orgbits = bits;
-+
-+	longoffset = bitoffset >> 5;
-+	longs -= longoffset;
-+	scan += longoffset;
-+
-+	bitoffset = bitoffset & 0x1F;
-+
-+	if (bitoffset != 0) {
-+		if (bits < 32) {
-+			*scan = cpu_to_be32(bfclr(be32_to_cpu(*scan), bitoffset, bits));
-+		} else {
-+			*scan = cpu_to_be32(bfclr(be32_to_cpu(*scan), bitoffset, 32));
-+		}
-+		scan++;
-+		longs--;
-+		bits -= 32 - bitoffset;
-+	}
-+
-+	while (bits > 0 && longs-- > 0) {
-+		if (bits > 31) {
-+			*scan++ = 0;
-+		} else {
-+			*scan = cpu_to_be32(bfclr(be32_to_cpu(*scan), 0, bits));
-+		}
-+		bits -= 32;
-+	}
-+
-+	if (bits <= 0) {
-+		return (orgbits);
-+	}
-+	return (orgbits - bits);
-+}
-+
-+/* This function sets /bits/ bits in a region of memory starting
-+   with /bitoffset/.  The region of memory is /longs/ longs long.  If
-+   the region of memory is too small to set /bits/ bits then this
-+   function exits after having set all bits till the end of the
-+   memory region.  In any case it returns the number of bits which
-+   were actually set. */
-+
-+int bmset(u32 *bitmap, int longs, int bitoffset, int bits)
-+{
-+	u32 *scan = bitmap;
-+	int longoffset;
-+	int orgbits = bits;
-+
-+	longoffset = bitoffset >> 5;
-+	longs -= longoffset;
-+	scan += longoffset;
-+
-+	bitoffset = bitoffset & 0x1F;
-+
-+	if (bitoffset != 0) {
-+		if (bits < 32) {
-+			*scan = cpu_to_be32(bfset(be32_to_cpu(*scan), bitoffset, bits));
-+		} else {
-+			*scan = cpu_to_be32(bfset(be32_to_cpu(*scan), bitoffset, 32));
-+		}
-+		scan++;
-+		longs--;
-+		bits -= 32 - bitoffset;
-+	}
-+
-+	while (bits > 0 && longs-- > 0) {
-+		if (bits > 31) {
-+			*scan++ = 0xFFFFFFFF;
-+		} else {
-+			*scan = cpu_to_be32(bfset(be32_to_cpu(*scan), 0, bits));
-+		}
-+		bits -= 32;
-+	}
-+
-+	if (bits <= 0) {
-+		return (orgbits);
-+	}
-+	return (orgbits - bits);
-+}
-diff -aurN a/fs/asfs/bitfuncs.h b/fs/asfs/bitfuncs.h
---- a/fs/asfs/bitfuncs.h	1969-12-31 19:00:00.000000000 -0500
-+++ b/fs/asfs/bitfuncs.h	2005-06-15 22:05:09.000000000 -0400
-@@ -0,0 +1,59 @@
-+/*
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License
-+ * as published by the Free Software Foundation; either version
-+ * 2 of the License, or (at your option) any later version.
-+ *
-+ */
-+
-+#ifndef __BITFUNCS_H
-+#define __BITFUNCS_H
-+
-+#include <linux/types.h>
-+#include <asm/byteorder.h>
-+
-+#include <asm/bitops.h>
-+#include <linux/bitops.h>
-+
-+/* Finds first set bit in /data/ starting at /bitoffset/.  This function
-+   considers the MSB to be the first bit. */
-+static inline int bfffo(u32 data, int bitoffset)
-+{
-+	u32 mask = 0xffffffff >> bitoffset;
-+	data &= mask;
-+	return data == 0 ? -1 : 32-fls(data);
-+}
-+
-+/* Finds first zero bit in /data/ starting at /bitoffset/.  This function
-+   considers the MSB to be the first bit. */
-+static inline int bfffz(u32 data, int bitoffset)
-+{
-+	return bfffo(~data, bitoffset);
-+}
-+
-+/* Sets /bits/ bits starting from /bitoffset/ in /data/.
-+   /bits/ must be between 1 and 32. */
-+static inline u32 bfset(u32 data, int bitoffset, int bits)
-+{
-+	u32 mask = ~((1 << (32 - bits)) - 1);
-+	mask >>= bitoffset;
-+	return data | mask;
-+}
-+
-+/* Clears /bits/ bits starting from /bitoffset/ in /data/.
-+   /bits/ must be between 1 and 32. */
-+static inline u32 bfclr(u32 data, int bitoffset, int bits)
-+{
-+	u32 mask = ~((1 << (32 - bits)) - 1);
-+	mask >>= bitoffset;
-+	return data & ~mask;
-+}
-+
-+/* bm??? functions assumes that in-memory bitmap is in bigendian byte order */
-+int bmffo(u32 *, int, int);
-+int bmffz(u32 *, int, int);
-+int bmclr(u32 *, int, int, int);
-+int bmset(u32 *, int, int, int);
-+
-+#endif
-diff -aurN a/fs/asfs/dir.c b/fs/asfs/dir.c
---- a/fs/asfs/dir.c	1969-12-31 19:00:00.000000000 -0500
-+++ b/fs/asfs/dir.c	2005-06-15 22:05:09.000000000 -0400
-@@ -0,0 +1,240 @@
-+/*
-+ *
-+ * Amiga Smart File System, Linux implementation
-+ * version: 1.0beta7
-+ *
-+ * Copyright (C) 2003,2004  Marek 'March' Szyprowski <marek at amiga.pl>
-+ *
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License
-+ * as published by the Free Software Foundation; either version
-+ * 2 of the License, or (at your option) any later version.
-+ *
-+ */
-+
-+#include <linux/types.h>
-+#include <linux/errno.h>
-+#include <linux/slab.h>
-+#include <linux/fs.h>
-+#include <linux/buffer_head.h>
-+#include <linux/vfs.h>
-+#include "asfs_fs.h"
-+
-+#include <asm/byteorder.h>
-+
-+extern struct dentry_operations asfs_dentry_operations;
-+
-+int asfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
-+{
-+	struct inode *dir = filp->f_dentry->d_inode;
-+	struct super_block *sb = dir->i_sb;
-+	struct nls_table *nls_io = ASFS_SB(sb)->nls_io;
-+	struct nls_table *nls_disk = ASFS_SB(sb)->nls_disk;
-+	u8 buf[512];
-+	unsigned long f_pos;
-+	int stored = 0;
-+
-+	struct buffer_head *bh;
-+	struct fsObjectContainer *objcont;
-+	struct fsObject *obj;
-+	u32 block;
-+	int startnode;
-+	int add;
-+
-+	asfs_debug("asfs_readdir:\n");
-+
-+	if (filp->f_pos == ASFS_SB(sb)->totalblocks)
-+		return stored;
-+
-+	f_pos = filp->f_pos;
-+
-+	if (f_pos == 0) {
-+		filp->private_data = (void *)0;
-+		if (filldir(dirent, ".", 1, f_pos, dir->i_ino, DT_DIR) < 0)
-+			return 0;
-+		filp->f_pos = f_pos = 1;
-+		stored++;
-+	}
-+	if (f_pos == 1) {
-+		if (filldir(dirent, "..", 2, f_pos, parent_ino(filp->f_dentry), DT_DIR) < 0)
-+			return stored;
-+		filp->f_pos = f_pos = 2;
-+		stored++;
-+	}
-+
-+	if (ASFS_I(dir)->firstblock == 0) {	/* empty directory */
-+		filp->f_pos = ASFS_SB(sb)->totalblocks;
-+		ASFS_I(dir)->modified = 0;
-+		return stored;
-+	}
-+
-+	if (f_pos == 2) {	/* reading directory from its beginning */
-+		block = ASFS_I(dir)->firstblock;
-+		add = 1;
-+		startnode = 0;
-+	} else {
-+		startnode = (int)filp->private_data;
-+		add = 0;
-+		if (ASFS_I(dir)->modified == 0)
-+			block = f_pos;
-+		else
-+			block = ASFS_I(dir)->firstblock;
-+	}
-+
-+	do {
-+		if (!(bh = asfs_breadcheck(sb, block, ASFS_OBJECTCONTAINER_ID)))
-+			return stored;
-+		objcont = (struct fsObjectContainer *) bh->b_data;
-+		obj = &(objcont->object[0]);
-+
-+		while (be32_to_cpu(obj->objectnode) > 0 && 
-+		      ((char *)obj - (char *)objcont) + sizeof(struct fsObject) + 2 < sb->s_blocksize) {
-+
-+			if (!add && be32_to_cpu(obj->objectnode) == startnode)
-+				add++;
-+
-+			if (add && !(obj->bits & OTYPE_HIDDEN)) {
-+				unsigned int type;
-+				asfs_translate(buf, obj->name, nls_io, nls_disk, 512);
-+				asfs_debug("ASFS: DirFilling: entry #%d \"%s\" (node %u offset %u), type %x\n", \
-+				           stored, buf, be32_to_cpu(obj->objectnode), block, obj->bits);
-+				filp->f_pos = block;
-+
-+				if (obj->bits & OTYPE_DIR)
-+					type = DT_DIR;
-+				else if (obj->bits & OTYPE_LINK && !(obj->bits & OTYPE_HARDLINK))
-+					type = DT_LNK;
-+				else
-+					type = DT_REG;
-+
-+				if (filldir(dirent, buf, strlen(buf), block, be32_to_cpu(obj->objectnode), type) < 0) {
-+					filp->private_data = (void *)be32_to_cpu(obj->objectnode);
-+					ASFS_I(dir)->modified = 0;
-+					asfs_debug("ASFS: DirFilling: to be continued...\n");
-+					asfs_brelse(bh);
-+					return stored;
-+				}
-+				stored++;
-+			}
-+			obj = asfs_nextobject(obj);
-+		}
-+		block = be32_to_cpu(objcont->next);
-+		asfs_brelse(bh);
-+
-+	} while (block != 0);
-+
-+	filp->f_pos = ASFS_SB(sb)->totalblocks;
-+	ASFS_I(dir)->modified = 0;
-+
-+	return stored;
-+}
-+
-+static struct fsObject *asfs_find_obj_by_name_nls(struct super_block *sb, struct fsObjectContainer *objcont, u8 * name)
-+{
-+	struct fsObject *obj;
-+	u8 buf[512];
-+
-+	obj = &(objcont->object[0]);
-+	while (be32_to_cpu(obj->objectnode) > 0 && ((char *) obj - (char *) objcont) + sizeof(struct fsObject) + 2 < sb->s_blocksize) {
-+		asfs_translate(buf, obj->name, ASFS_SB(sb)->nls_io, ASFS_SB(sb)->nls_disk, 512);
-+		if (asfs_namecmp(buf, name, ASFS_SB(sb)->flags & ASFS_ROOTBITS_CASESENSITIVE, ASFS_SB(sb)->nls_io) == 0) {
-+			asfs_debug("Object found! Node %u, Name %s, Type %x, inCont %u\n", be32_to_cpu(obj->objectnode), obj->name, obj->bits, be32_to_cpu(objcont->bheader.ownblock));
-+			return obj;
-+		}
-+		obj = asfs_nextobject(obj);
-+	}
-+	return NULL;
-+}
-+
-+struct dentry *asfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
-+{
-+	int res = -EACCES;       /* placeholder for "no data here" */
-+	struct inode *inode;
-+	struct super_block *sb = dir->i_sb;
-+	u8 *name = (u8 *) dentry->d_name.name;
-+	struct buffer_head *bh;
-+	struct fsObject *obj;
-+	u8 bufname[ASFS_MAXFN_BUF];
-+
-+	asfs_translate(bufname, name, ASFS_SB(sb)->nls_disk, ASFS_SB(sb)->nls_io, ASFS_MAXFN_BUF);
-+
-+	asfs_debug("asfs_lookup: (searching \"%s\"...) ", name);
-+
-+	lock_super(sb);
-+
-+	if ((!strchr(name, '?')) && (ASFS_I(dir)->hashtable != 0)) {	/* hashtable block is available and name can be reverse translated, quick search */
-+		struct fsObjectNode *node_p;
-+		struct buffer_head *node_bh;
-+		u32 node;
-+		u16 hash16;
-+
-+		asfs_debug("(quick search) ");
-+
-+		if (!(bh = asfs_breadcheck(sb, ASFS_I(dir)->hashtable, ASFS_HASHTABLE_ID))) {
-+			unlock_super(sb);
-+			return ERR_PTR(res);
-+		}
-+		hash16 = asfs_hash(bufname, ASFS_SB(sb)->flags & ASFS_ROOTBITS_CASESENSITIVE); 
-+		node = be32_to_cpu(((struct fsHashTable *) bh->b_data)->hashentry[HASHCHAIN(hash16)]);
-+		asfs_brelse(bh);
-+
-+		while (node != 0) {
-+			if (asfs_getnode(sb, node, &node_bh, &node_p) != 0)
-+				goto not_found;
-+			if (be16_to_cpu(node_p->hash16) == hash16) {
-+				if (!(bh = asfs_breadcheck(sb, be32_to_cpu(node_p->node.data), ASFS_OBJECTCONTAINER_ID))) {
-+					asfs_brelse(node_bh);
-+					unlock_super(sb);
-+					return ERR_PTR(res);
-+				}
-+				if ((obj = asfs_find_obj_by_name(sb, (struct fsObjectContainer *) bh->b_data, bufname)) != NULL) {
-+					asfs_brelse(node_bh);
-+					goto found_inode;
-+				}
-+				asfs_brelse(bh);
-+			}
-+			node = be32_to_cpu(node_p->next);
-+			asfs_brelse(node_bh);
-+		}
-+	} else { /* hashtable not available or name can't be reverse-translated, long search */
-+		struct fsObjectContainer *objcont;
-+		u32 block;
-+
-+		asfs_debug("(long search) ");
-+		block = ASFS_I(dir)->firstblock;
-+		while (block != 0) {
-+			if (!(bh = asfs_breadcheck(sb, block, ASFS_OBJECTCONTAINER_ID))) {
-+				unlock_super(sb);
-+				return ERR_PTR(res);
-+			}
-+			objcont = (struct fsObjectContainer *) bh->b_data;
-+			if ((obj = asfs_find_obj_by_name_nls(sb, objcont, name)) != NULL)
-+				goto found_inode;
-+			block = be32_to_cpu(objcont->next);
-+			asfs_brelse(bh);
-+		}
-+	}
-+
-+not_found:
-+	unlock_super(sb);
-+	inode = NULL;
-+	asfs_debug("object not found.\n");
-+	if (0) {
-+found_inode:
-+		unlock_super(sb);
-+		if (!(inode = iget_locked(sb, be32_to_cpu(obj->objectnode)))) {
-+			asfs_debug("ASFS: Strange - no inode allocated.\n");
-+			return ERR_PTR(res);
-+		}
-+		if (inode->i_state & I_NEW) {
-+			asfs_read_locked_inode(inode, obj);
-+			unlock_new_inode(inode);
-+		}
-+		asfs_brelse(bh);
-+	}
-+	res = 0;
-+	dentry->d_op = &asfs_dentry_operations;
-+	d_add(dentry, inode);
-+	return ERR_PTR(res);
-+}
-diff -aurN a/fs/asfs/extents.c b/fs/asfs/extents.c
---- a/fs/asfs/extents.c	1969-12-31 19:00:00.000000000 -0500
-+++ b/fs/asfs/extents.c	2005-06-15 22:05:09.000000000 -0400
-@@ -0,0 +1,586 @@
-+/*
-+ *
-+ * Amiga Smart File System, Linux implementation
-+ * version: 1.0beta7
-+ *
-+ * This file contains some parts of the original amiga version of 
-+ * SmartFilesystem source code.
-+ *
-+ * SmartFilesystem is copyrighted (C) 2003 by: John Hendrikx, 
-+ * Ralph Schmidt, Emmanuel Lesueur, David Gerber and Marcin Kurek
-+ * 
-+ * Adapted and modified by Marek 'March' Szyprowski <marek at amiga.pl>
-+ *
-+ */
-+
-+#include <linux/types.h>
-+#include <linux/errno.h>
-+#include <linux/slab.h>
-+#include <linux/fs.h>
-+#include <linux/buffer_head.h>
-+#include <linux/vfs.h>
-+#include "asfs_fs.h"
-+
-+#include <asm/byteorder.h>
-+
-+	/* This function looks for the BNode equal to the key.  If no
-+	   exact match is available then the BNode which is slightly
-+	   lower than key will be returned.  If no such BNode exists
-+	   either, then the first BNode in this block is returned.
-+
-+	   This function will return the first BNode even if there
-+	   are no BNode's at all in this block (this can only happen
-+	   for the Root of the tree).  Be sure to check if the Root
-+	   is not empty before calling this function. */
-+
-+static struct BNode *searchforbnode(u32 key, struct BTreeContainer *tc)
-+{
-+	struct BNode *tn;
-+	s16 n = be16_to_cpu(tc->nodecount) - 1;
-+
-+	tn = (struct BNode *) ((u8 *) tc->bnode + n * tc->nodesize);
-+	for (;;) {
-+		if (n <= 0 || key >= be32_to_cpu(tn->key))
-+			return tn;
-+
-+		tn = (struct BNode *) ((u8 *) tn - tc->nodesize);
-+		n--;
-+	}
-+}
-+
-+/* This function finds the BNode with the given key.  If no exact match can be
-+   found then this function will return either the next or previous closest
-+   match (don't rely on this).
-+
-+   If there were no BNode's at all, then *returned_bh will be NULL. */
-+
-+static int findbnode(struct super_block *sb, u32 key, struct buffer_head **returned_bh, struct BNode **returned_bnode)
-+{
-+	u32 rootblock = ASFS_SB(sb)->extentbnoderoot;
-+
-+	asfs_debug("findbnode: Looking for BNode with key %d\n", key);
-+
-+	while ((*returned_bh = asfs_breadcheck(sb, rootblock, ASFS_BNODECONTAINER_ID))) {
-+		struct fsBNodeContainer *bnc = (void *) (*returned_bh)->b_data;
-+		struct BTreeContainer *btc = &bnc->btc;
-+
-+		if (btc->nodecount == 0) {
-+			*returned_bnode = NULL;
-+			break;
-+		}
-+
-+		*returned_bnode = searchforbnode(key, btc);
-+		if (btc->isleaf == TRUE)
-+			break;
-+
-+		rootblock = be32_to_cpu((*returned_bnode)->data);
-+		asfs_brelse(*returned_bh);
-+	}
-+
-+	if (*returned_bh == NULL)
-+		return -EIO;
-+
-+	return 0;
-+}
-+
-+int asfs_getextent(struct super_block *sb, u32 key, struct buffer_head **ret_bh, struct fsExtentBNode **ret_ebn)
-+{
-+	int result;
-+	if ((result = findbnode(sb, key, ret_bh, (struct BNode **)ret_ebn)) == 0) 
-+		if (be32_to_cpu((*ret_ebn)->key) != key) {
-+			brelse(*ret_bh);
-+			*ret_bh = NULL;
-+			return -ENOENT;
-+		}
-+
-+	return result;
-+}
-+
-+#ifdef CONFIG_ASFS_RW
-+
-+	/* This routine inserts a node sorted into a BTreeContainer.  It does
-+	   this by starting at the end, and moving the nodes one by one to
-+	   a higher slot until the empty slot has the correct position for
-+	   this key.  Donot use this function on completely filled
-+	   BTreeContainers! */
-+
-+static struct BNode *insertbnode(u32 key, struct BTreeContainer *btc)
-+{
-+	struct BNode *bn;
-+	bn = (struct BNode *) ((u8 *) btc->bnode + btc->nodesize * (be16_to_cpu(btc->nodecount) - 1));
-+
-+	for (;;) {
-+		if (bn < btc->bnode || key > be32_to_cpu(bn->key)) {
-+			bn = (struct BNode *) ((u8 *) bn + btc->nodesize);
-+			bn->key = cpu_to_be32(key);
-+			btc->nodecount = cpu_to_be16(be16_to_cpu(btc->nodecount) + 1);
-+			break;
-+		} else 
-+			memmove((u8 *)bn + btc->nodesize, bn, btc->nodesize);
-+
-+		bn = (struct BNode *) ((u8 *) bn - btc->nodesize);
-+	}
-+
-+	return bn;
-+}
-+
-+static int getparentbtreecontainer(struct super_block *sb, struct buffer_head *bh, struct buffer_head **parent_bh)
-+{
-+	u32 rootblock = ASFS_SB(sb)->extentbnoderoot;
-+	u32 childkey = be32_to_cpu(((struct fsBNodeContainer *) bh->b_data)->btc.bnode[0].key);
-+	u32 childblock = be32_to_cpu(((struct fsBNodeContainer *) bh->b_data)->bheader.ownblock);
-+
-+	asfs_debug("getparentbtreecontainer: Getting parent of block %d\n", childblock);
-+
-+	/* This function gets the BTreeContainer parent of the passed in buffer_head. If
-+	   there is no parent this function sets dest_cont io_bh to NULL */
-+
-+	if (rootblock != childblock) {
-+		while ((*parent_bh = asfs_breadcheck(sb, rootblock, ASFS_BNODECONTAINER_ID))) {
-+			struct fsBNodeContainer *bnc = (void *) (*parent_bh)->b_data;
-+			struct BTreeContainer *btc = &bnc->btc;
-+			struct BNode *bn;
-+			s16 n = be16_to_cpu(btc->nodecount);
-+
-+			if (btc->isleaf == TRUE) {
-+				asfs_brelse(*parent_bh);
-+				break;
-+			}
-+
-+			while (n-- > 0)
-+				if (be32_to_cpu(btc->bnode[n].data) == childblock)
-+					return 0;	/* Found parent!! */
-+
-+			bn = searchforbnode(childkey, btc);	/* This searchforbnode() doesn't have to get EXACT key matches. */
-+			rootblock = be32_to_cpu(bn->data);
-+			asfs_brelse(*parent_bh);
-+		}
-+		if (*parent_bh == NULL)
-+			return -EIO;
-+	}
-+
-+	*parent_bh = NULL;
-+	return 0;
-+}
-+
-+/* Spits a btreecontainer. It realses passed in bh! */
-+
-+static int splitbtreecontainer(struct super_block *sb, struct buffer_head *bh)
-+{
-+	struct buffer_head *bhparent;
-+	struct BNode *bn;
-+	int errorcode;
-+
-+	asfs_debug("splitbtreecontainer: splitting block %u\n", be32_to_cpu(((struct fsBlockHeader *) bh->b_data)->ownblock));
-+
-+	if ((errorcode = getparentbtreecontainer(sb, bh, &bhparent)) == 0) {
-+		if (bhparent == NULL) {
-+			u32 newbcontblock;
-+			u32 bcontblock;
-+			/* We need to create Root tree-container - adding new level to extent tree */
-+
-+			asfs_debug("splitbtreecontainer: creating root tree-container.\n");
-+
-+			bhparent = bh;
-+			if ((errorcode = asfs_allocadminspace(sb, &newbcontblock)) == 0 && (bh = asfs_getzeroblk(sb, newbcontblock))) {
-+				struct fsBNodeContainer *bnc = (void *) bh->b_data;
-+				struct fsBNodeContainer *bncparent = (void *) bhparent->b_data;
-+				struct BTreeContainer *btcparent = &bncparent->btc;
-+
-+				bcontblock = be32_to_cpu(bncparent->bheader.ownblock);
-+				memcpy(bh->b_data, bhparent->b_data, sb->s_blocksize);
-+				bnc->bheader.ownblock = cpu_to_be32(newbcontblock);
-+				asfs_bstore(sb, bh);
-+
-+				memset(bhparent->b_data, '\0', sb->s_blocksize);	/* Not strictly needed, but makes things more clear. */
-+				bncparent->bheader.id = cpu_to_be32(ASFS_BNODECONTAINER_ID);
-+				bncparent->bheader.ownblock = cpu_to_be32(bcontblock);
-+				btcparent->isleaf = FALSE;
-+				btcparent->nodesize = sizeof(struct BNode);
-+				btcparent->nodecount = 0;
-+
-+				bn = insertbnode(0, btcparent);
-+				bn->data = cpu_to_be32(newbcontblock);
-+
-+				asfs_bstore(sb, bhparent);
-+			}
-+			if (bh == NULL)
-+				errorcode = -EIO;
-+		}
-+
-+		if (errorcode == 0) {
-+			struct fsBNodeContainer *bncparent = (void *) bhparent->b_data;
-+			struct BTreeContainer *btcparent = &bncparent->btc;
-+			int branches1 = (sb->s_blocksize - sizeof(struct fsBNodeContainer)) / btcparent->nodesize;
-+
-+			if (be16_to_cpu(btcparent->nodecount) == branches1) {
-+				/* We need to split the parent tree-container first! */
-+				if ((errorcode = splitbtreecontainer(sb, bhparent)) == 0) {
-+					/* bhparent might have changed after the split and has been released */
-+					if ((errorcode = getparentbtreecontainer(sb, bh, &bhparent)) == 0) {	
-+						bncparent = (void *) bhparent->b_data;
-+						btcparent = &bncparent->btc;
-+					}
-+				}
-+			}
-+
-+			if (errorcode == 0) {
-+				u32 newbcontblock;
-+				struct buffer_head *bhnew;
-+
-+				/* We can split this container and add it to the parent
-+				   because the parent has enough room. */
-+
-+				if ((errorcode = asfs_allocadminspace(sb, &newbcontblock)) == 0 && (bhnew = asfs_getzeroblk(sb, newbcontblock))) {
-+					struct fsBNodeContainer *bncnew = (void *) bhnew->b_data;
-+					struct BTreeContainer *btcnew = &bncnew->btc;
-+					struct fsBNodeContainer *bnc = (void *) bh->b_data;
-+					struct BTreeContainer *btc = &bnc->btc;
-+					int branches2 = (sb->s_blocksize - sizeof(struct fsBNodeContainer)) / btc->nodesize;
-+					u32 newkey;
-+
-+					bncnew->bheader.id = cpu_to_be32(ASFS_BNODECONTAINER_ID);
-+					bncnew->bheader.ownblock = cpu_to_be32(newbcontblock);
-+
-+					btcnew->isleaf = btc->isleaf;
-+					btcnew->nodesize = btc->nodesize;
-+
-+					btcnew->nodecount = cpu_to_be16(branches2 - branches2 / 2);
-+
-+					memcpy(btcnew->bnode, (u8 *) btc->bnode + branches2 / 2 * btc->nodesize, (branches2 - branches2 / 2) * btc->nodesize);
-+					newkey = be32_to_cpu(btcnew->bnode[0].key);
-+
-+					asfs_bstore(sb, bhnew);
-+					asfs_brelse(bhnew);
-+
-+					btc->nodecount = cpu_to_be16(branches2 / 2);
-+					asfs_bstore(sb, bh);
-+
-+					bn = insertbnode(newkey, btcparent);
-+					bn->data = cpu_to_be32(newbcontblock);
-+					asfs_bstore(sb, bhparent);
-+				}
-+			}
-+		}
-+		asfs_brelse(bhparent);
-+	}
-+	asfs_brelse(bh);
-+
-+	return errorcode;
-+}
-+
-+/* Returns created extentbnode - returned_bh need to saved and realesed in caller funkction! */
-+
-+int createextentbnode(struct super_block *sb, u32 key, struct buffer_head **returned_bh, struct BNode **returned_bnode)
-+{
-+	int errorcode;
-+
-+	asfs_debug("createbnode: Creating BNode with key %d\n", key);
-+
-+	while ((errorcode = findbnode(sb, key, returned_bh, returned_bnode)) == 0) {
-+		struct fsBNodeContainer *bnc = (void *) (*returned_bh)->b_data;
-+		struct BTreeContainer *btc = &bnc->btc;
-+		int extbranches = (sb->s_blocksize - sizeof(struct fsBNodeContainer)) / btc->nodesize;
-+
-+		asfs_debug("createbnode: findbnode found block %d\n", be32_to_cpu(((struct fsBlockHeader *) (*returned_bh)->b_data)->ownblock));
-+
-+		if (be16_to_cpu(btc->nodecount) < extbranches) {
-+			/* Simply insert new node in this BTreeContainer */
-+			asfs_debug("createbnode: Simple insert\n");
-+			*returned_bnode = insertbnode(key, btc);
-+			break;
-+		} else if ((errorcode = splitbtreecontainer(sb, *returned_bh)) != 0)
-+			break;
-+
-+		/* Loop and try insert it the normal way again :-) */
-+	}
-+
-+	return (errorcode);
-+}
-+
-+
-+/* This routine removes a node from a BTreeContainer indentified
-+   by its key.  If no such key exists this routine does nothing.
-+   It correctly handles empty BTreeContainers. */
-+
-+static void removebnode(u32 key, struct BTreeContainer *btc)
-+{
-+	struct BNode *bn = btc->bnode;
-+	int n = 0;
-+
-+	asfs_debug("removebnode: key %d\n", key);
-+
-+	while (n < be16_to_cpu(btc->nodecount)) {
-+		if (be32_to_cpu(bn->key) == key) {
-+			btc->nodecount = cpu_to_be16(be16_to_cpu(btc->nodecount) - 1);
-+			memmove(bn, (u8 *) bn + btc->nodesize, (be16_to_cpu(btc->nodecount) - n) * btc->nodesize);
-+			break;
-+		}
-+		bn = (struct BNode *) ((u8 *) bn + btc->nodesize);
-+		n++;
-+	}
-+}
-+
-+int asfs_deletebnode(struct super_block *sb, struct buffer_head *bh, u32 key)
-+{
-+	struct fsBNodeContainer *bnc1 = (void *) bh->b_data;
-+	struct BTreeContainer *btc = &bnc1->btc;
-+	u16 branches = (sb->s_blocksize - sizeof(struct fsBNodeContainer)) / btc->nodesize;
-+	int errorcode = 0;
-+
-+	/* Deletes specified internal node. */
-+
-+	removebnode(key, btc);
-+	asfs_bstore(sb, bh);
-+
-+	/* Now checks if the container still contains enough nodes,
-+	   and takes action accordingly. */
-+
-+	asfs_debug("deletebnode: branches = %d, btc->nodecount = %d\n", branches, be16_to_cpu(btc->nodecount));
-+
-+	if (be16_to_cpu(btc->nodecount) < (branches + 1) / 2) {
-+		struct buffer_head *bhparent;
-+		struct buffer_head *bhsec;
-+
-+		/* nodecount has become to low.  We need to merge this Container
-+		   with a neighbouring Container, or we need to steal a few nodes
-+		   from a neighbouring Container. */
-+
-+		/* We get the parent of the container here, so we can find out what
-+		   containers neighbour the container which currently hasn't got enough nodes. */
-+
-+		if ((errorcode = getparentbtreecontainer(sb, bh, &bhparent)) == 0) {
-+			if (bhparent != NULL) {
-+				struct fsBNodeContainer *bncparent = (void *) bhparent->b_data;
-+				struct BTreeContainer *btcparent = &bncparent->btc;
-+				s16 n;
-+
-+				asfs_debug("deletebnode: get parent returned block %d.\n", be32_to_cpu(((struct fsBlockHeader *) bhparent->b_data)->ownblock));
-+
-+				for (n = 0; n < be16_to_cpu(btcparent->nodecount); n++)
-+					if (btcparent->bnode[n].data == bnc1->bheader.ownblock)
-+						break;
-+				/* n is now the offset of our own bnode. */
-+
-+				if (n < be16_to_cpu(btcparent->nodecount) - 1) {	/* Check if we have a next neighbour. */
-+					asfs_debug("deletebnode: using next container - merging blocks %d and %d\n", be32_to_cpu(bnc1->bheader.ownblock), be32_to_cpu(btcparent->bnode[n+1].data));
-+
-+					if ((bhsec = asfs_breadcheck(sb, be32_to_cpu(btcparent->bnode[n + 1].data), ASFS_BNODECONTAINER_ID))) {
-+						struct fsBNodeContainer *bnc_next = (void *) bhsec->b_data;
-+						struct BTreeContainer *btc_next = &bnc_next->btc;
-+
-+						if (be16_to_cpu(btc_next->nodecount) + be16_to_cpu(btc->nodecount) > branches) {	/* Check if we need to steal nodes. */
-+							s16 nodestosteal = (be16_to_cpu(btc_next->nodecount) + be16_to_cpu(btc->nodecount)) / 2 - be16_to_cpu(btc->nodecount);
-+
-+							/* Merging them is not possible.  Steal a few nodes then. */
-+							memcpy((u8 *) btc->bnode + be16_to_cpu(btc->nodecount) * btc->nodesize, btc_next->bnode, nodestosteal * btc->nodesize);
-+							btc->nodecount = cpu_to_be16(be16_to_cpu(btc->nodecount) + nodestosteal);
-+							asfs_bstore(sb, bh);
-+
-+							memcpy(btc_next->bnode, (u8 *) btc_next->bnode + btc_next->nodesize * nodestosteal,
-+							       btc->nodesize * (be16_to_cpu(btc_next->nodecount) - nodestosteal));
-+							btc_next->nodecount = cpu_to_be16(be16_to_cpu(btc_next->nodecount) - nodestosteal);
-+							asfs_bstore(sb, bhsec);
-+
-+							btcparent->bnode[n + 1].key = btc_next->bnode[0].key;
-+							asfs_bstore(sb, bhparent);
-+						} else {	/* Merging is possible. */
-+							memcpy((u8 *) btc->bnode + btc->nodesize * be16_to_cpu(btc->nodecount), btc_next->bnode, btc->nodesize * be16_to_cpu(btc_next->nodecount));
-+							btc->nodecount = cpu_to_be16(be16_to_cpu(btc->nodecount) + be16_to_cpu(btc_next->nodecount));
-+							asfs_bstore(sb, bh);
-+
-+							if ((errorcode = asfs_freeadminspace(sb, be32_to_cpu(((struct fsBlockHeader *) bhsec->b_data)->ownblock))) == 0)
-+								errorcode = asfs_deletebnode(sb, bhparent, be32_to_cpu(btcparent->bnode[n + 1].key));
-+						}
-+						asfs_brelse(bhsec);
-+					}
-+				} else if (n > 0) {	/* Check if we have a previous neighbour. */
-+					asfs_debug("deletebnode: using prev container.\n");
-+
-+					if ((bhsec = asfs_breadcheck(sb, be32_to_cpu(btcparent->bnode[n - 1].data), ASFS_BNODECONTAINER_ID)) == 0) {
-+						struct fsBNodeContainer *bnc2 = (void *) bhsec->b_data;
-+						struct BTreeContainer *btc2 = &bnc2->btc;
-+
-+						if (be16_to_cpu(btc2->nodecount) + be16_to_cpu(btc->nodecount) > branches) {
-+							/* Merging them is not possible.  Steal a few nodes then. */
-+							s16 nodestosteal = (be16_to_cpu(btc2->nodecount) + be16_to_cpu(btc->nodecount)) / 2 - be16_to_cpu(btc->nodecount);
-+
-+							memmove((u8 *) btc->bnode + nodestosteal * btc->nodesize, btc->bnode, be16_to_cpu(btc->nodecount) * btc->nodesize);
-+							btc->nodecount = cpu_to_be16(be16_to_cpu(btc->nodecount) + nodestosteal);
-+							memcpy(btc->bnode, (u8 *) btc2->bnode + (be16_to_cpu(btc2->nodecount) - nodestosteal) * btc2->nodesize, nodestosteal * btc->nodesize);
-+
-+							asfs_bstore(sb, bh);
-+
-+							btc2->nodecount = cpu_to_be16(be16_to_cpu(btc2->nodecount) - nodestosteal);
-+							asfs_bstore(sb, bhsec);
-+
-+							btcparent->bnode[n].key = btc->bnode[0].key;
-+							asfs_bstore(sb, bhparent);
-+						} else {	/* Merging is possible. */
-+							memcpy((u8 *) btc2->bnode + be16_to_cpu(btc2->nodecount) * btc2->nodesize, btc->bnode, be16_to_cpu(btc->nodecount) * btc->nodesize);
-+							btc2->nodecount = cpu_to_be16(be16_to_cpu(btc2->nodecount) + be16_to_cpu(btc->nodecount));
-+							asfs_bstore(sb, bhsec);
-+
-+							if ((errorcode = asfs_freeadminspace(sb, be32_to_cpu(((struct fsBlockHeader *) bhsec->b_data)->ownblock))) == 0)
-+								errorcode = asfs_deletebnode(sb, bhparent, be32_to_cpu(btcparent->bnode[n].key));
-+						}
-+						asfs_brelse(bhsec);
-+					}
-+				}
-+				/*      else    
-+				   {
-+				   // Never happens, except for root and then we don't care.
-+				   } */
-+			} else if (btc->nodecount == 1) {
-+				/* No parent, so must be root. */
-+
-+				asfs_debug("deletebnode: no parent so must be root\n");
-+
-+				if (btc->isleaf == FALSE) {
-+					struct fsBNodeContainer *bnc3 = (void *) bh->b_data;
-+
-+					/* The current root has only 1 node.  We now copy the data of this node into the
-+					   root and promote that data to be the new root.  The rootblock number stays the
-+					   same that way. */
-+
-+					if ((bhsec = asfs_breadcheck(sb, be32_to_cpu(btc->bnode[0].data), ASFS_BNODECONTAINER_ID))) {
-+						u32 blockno = be32_to_cpu(((struct fsBlockHeader *) bh->b_data)->ownblock);
-+						memcpy(bh->b_data, bhsec->b_data, sb->s_blocksize);
-+						bnc3->bheader.ownblock = cpu_to_be32(blockno);
-+
-+						asfs_bstore(sb, bh);
-+						errorcode = asfs_freeadminspace(sb, be32_to_cpu(((struct fsBlockHeader *) bhsec->b_data)->ownblock));
-+						asfs_brelse(bhsec);
-+					} else
-+						errorcode = -EIO;
-+				}
-+				/* If not, then root contains leafs. */
-+			}
-+
-+			asfs_debug("deletebnode: almost done\n");
-+			/* otherwise, it must be the root, and the root is allowed
-+			   to contain less than the minimum amount of nodes. */
-+
-+		}
-+		if (bhparent != NULL)
-+			asfs_brelse(bhparent);
-+	}
-+
-+	return errorcode;
-+}
-+
-+   /* Deletes an fsExtentBNode structure by key and any fsExtentBNodes linked to it.
-+      This function DOES NOT fix the next pointer in a possible fsExtentBNode which
-+      might have been pointing to the first BNode we are deleting.  Make sure you check
-+      this yourself, if needed.
-+
-+      If key is zero, than this function does nothing. */
-+
-+int asfs_deleteextents(struct super_block *sb, u32 key)
-+{
-+	struct buffer_head *bh;
-+	struct fsExtentBNode *ebn;
-+	int errorcode = 0;
-+
-+	asfs_debug("deleteextents: Entry -- deleting extents from key %d\n", key);
-+
-+	while (key != 0 && (errorcode = findbnode(sb, key, &bh, (struct BNode **) &ebn)) == 0) {
-+		/* node to be deleted located. */
-+		key = be32_to_cpu(ebn->next);
-+		if ((errorcode = asfs_freespace(sb, be32_to_cpu(ebn->key), be16_to_cpu(ebn->blocks))) != 0)
-+			break;
-+
-+		if ((errorcode = asfs_deletebnode(sb, bh, be32_to_cpu(ebn->key))) != 0)
-+			break;
-+
-+		asfs_brelse(bh);
-+	}
-+
-+	return (errorcode);
-+}
-+
-+   /* This function adds /blocks/ blocks starting at block /newspace/ to a file
-+      identified by /objectnode/ and /lastextentbnode/.  /io_lastextentbnode/ can
-+      be zero if there is no ExtentBNode chain attached to this file yet.
-+      /blocks/ ranges from 1 to 8192.  To be able to extend Extents which are
-+      almost full, it is wise to make this value no higher than 8192 blocks.
-+      /io_lastextentbnode/ will contain the new lastextentbnode value when this
-+      function completes.
-+      If there was no chain yet, then this function will create a new one.  */
-+
-+int asfs_addblocks(struct super_block *sb, u16 blocks, u32 newspace, u32 objectnode, u32 *io_lastextentbnode)
-+{
-+	struct buffer_head *bh;
-+	struct fsExtentBNode *ebn;
-+	int errorcode = 0;
-+
-+	if (*io_lastextentbnode != 0) {
-+		/* There was already a ExtentBNode chain for this file.  Extending it. */
-+
-+		asfs_debug("  addblocks: Extending existing ExtentBNode chain.\n");
-+
-+		if ((errorcode = asfs_getextent(sb, *io_lastextentbnode, &bh, &ebn)) == 0) {
-+			if (be32_to_cpu(ebn->key) + be16_to_cpu(ebn->blocks) == newspace && be16_to_cpu(ebn->blocks) + blocks < 65536) {
-+				/* It is possible to extent the last ExtentBNode! */
-+				asfs_debug("  addblocks: Extending last ExtentBNode.\n");
-+
-+				ebn->blocks = cpu_to_be16(be16_to_cpu(ebn->blocks) + blocks);
-+
-+				asfs_bstore(sb, bh);
-+				asfs_brelse(bh);
-+			} else {
-+				/* It isn't possible to extent the last ExtentBNode so we create
-+				   a new one and link it to the last ExtentBNode. */
-+
-+				ebn->next = cpu_to_be32(newspace);
-+				asfs_bstore(sb, bh);
-+				asfs_brelse(bh);
-+
-+				if ((errorcode = createextentbnode(sb, newspace, &bh, (struct BNode **) &ebn)) == 0) {
-+					asfs_debug("  addblocks: Created new ExtentBNode.\n");
-+
-+					ebn->key = cpu_to_be32(newspace);
-+					ebn->prev = cpu_to_be32(*io_lastextentbnode);
-+					ebn->next = 0;
-+					ebn->blocks = cpu_to_be16(blocks);
-+
-+					*io_lastextentbnode = newspace;
-+
-+					asfs_bstore(sb, bh);
-+					asfs_brelse(bh);
-+
-+					ASFS_SB(sb)->block_rovingblockptr = newspace + blocks;
-+
-+	/* to be changed in the future */
-+/*					if (ASFS_SB(sb)->block_rovingblockptr >= ASFS_SB(sb)->totalblocks)
-+						ASFS_SB(sb)->block_rovingblockptr = 0;*/
-+				}
-+			}
-+		}
-+	} else {
-+		/* There is no ExtentBNode chain yet for this file.  Attaching one! */
-+		if ((errorcode = createextentbnode(sb, newspace, &bh, (struct BNode **) &ebn)) == 0) {
-+			asfs_debug("  addblocks: Created new ExtentBNode chain.\n");
-+
-+			ebn->key = cpu_to_be32(newspace);
-+			ebn->prev = cpu_to_be32(objectnode + 0x80000000);
-+			ebn->next = 0;
-+			ebn->blocks = cpu_to_be16(blocks);
-+
-+			*io_lastextentbnode = newspace;
-+
-+			asfs_bstore(sb, bh);
-+			asfs_brelse(bh);
-+
-+			ASFS_SB(sb)->block_rovingblockptr = newspace + blocks;
-+
-+/*			if (ASFS_SB(sb)->block_rovingblockptr >= ASFS_SB(sb)->totalblocks)
-+				ASFS_SB(sb)->block_rovingblockptr = 0;*/
-+		}
-+	}
-+
-+	asfs_debug("  addblocks: done.\n");
-+
-+	return errorcode;
-+}
-+#endif
-diff -aurN a/fs/asfs/file.c b/fs/asfs/file.c
---- a/fs/asfs/file.c	1969-12-31 19:00:00.000000000 -0500
-+++ b/fs/asfs/file.c	2005-06-15 22:05:09.000000000 -0400
-@@ -0,0 +1,251 @@
-+/*
-+ *
-+ * Amiga Smart File System, Linux implementation
-+ * version: 1.0beta7
-+ *  
-+ * Copyright (C) 2003,2004  Marek 'March' Szyprowski <marek at amiga.pl>
-+ *
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License
-+ * as published by the Free Software Foundation; either version
-+ * 2 of the License, or (at your option) any later version.
-+ *
-+ */
-+
-+#include <linux/types.h>
-+#include <linux/errno.h>
-+#include <linux/slab.h>
-+#include <linux/fs.h>
-+#include <linux/pagemap.h>
-+#include <linux/buffer_head.h>
-+#include <linux/vfs.h>
-+#include "asfs_fs.h"
-+
-+#include <asm/byteorder.h>
-+
-+static int
-+asfs_get_block(struct inode *inode, sector_t block, struct buffer_head *bh_result, int create)
-+{
-+	struct buffer_head *ebn_bh;
-+	struct fsExtentBNode extent, *ebn_p;
-+	u32 filedata;
-+	unsigned long pos;
-+	struct super_block *sb = inode->i_sb;
-+#ifdef CONFIG_ASFS_RW
-+	int error;
-+	struct buffer_head *bh;
-+	struct fsObject *obj;
-+#endif
-+
-+	asfs_debug("ASFS: get_block(%lu, %ld, %d)\n", inode->i_ino, block, create);
-+
-+	if (block < 0) {
-+		printk(KERN_ERR "ASFS: asfsget_block: requested block (%ld) < 0!\n", block);
-+		return -EIO;
-+	} else if (block >= inode->i_blocks && !create) {
-+		printk(KERN_ERR "ASFS: asfsget_block: strange block request %ld!\n", block);
-+		return -EIO;
-+	} 
-+
-+	if (create)
-+#ifdef CONFIG_ASFS_RW
-+		ASFS_I(inode)->modified = TRUE;
-+#else
-+		return -EROFS;
-+#endif
-+
-+	if (block < inode->i_blocks)
-+		create = 0;
-+
-+	lock_super(sb);
-+
-+#ifdef CONFIG_ASFS_RW
-+	if (create) {
-+		int blockstoadd;
-+		u32 newspace, addedblocks;
-+
-+		blockstoadd = block - inode->i_blocks + 1;
-+
-+		if (blockstoadd < ASFS_BLOCKCHUNKS)
-+			blockstoadd = ASFS_BLOCKCHUNKS;
-+ 
-+		asfs_debug("ASFS get_block: Trying to add %d blocks to file\n", blockstoadd);
-+		
-+		if ((error = asfs_readobject(sb, inode->i_ino, &bh, &obj)) != 0) {
-+			unlock_super(sb);
-+			return error;
-+		}
-+
-+		if ((error = asfs_addblockstofile(sb, bh, obj, blockstoadd, &newspace, &addedblocks)) != 0) {
-+			asfs_brelse(bh);
-+			unlock_super(sb);
-+			return error;
-+		}
-+		ASFS_I(inode)->mmu_private += addedblocks * sb->s_blocksize;
-+		inode->i_blocks += addedblocks;
-+		ASFS_I(inode)->ext_cache.key = 0;
-+		ASFS_I(inode)->firstblock = be32_to_cpu(obj->object.file.data);
-+		asfs_brelse(bh);
-+	}
-+#endif
-+
-+	if (ASFS_I(inode)->ext_cache.key > 0 && ASFS_I(inode)->ext_cache.startblock <= block) {
-+		extent.key = ASFS_I(inode)->ext_cache.key;
-+		extent.next = ASFS_I(inode)->ext_cache.next;
-+		extent.blocks = ASFS_I(inode)->ext_cache.blocks;
-+		pos = ASFS_I(inode)->ext_cache.startblock;
-+	} else {
-+		if (asfs_getextent(inode->i_sb, ASFS_I(inode)->firstblock, &ebn_bh, &ebn_p) != 0) {
-+			unlock_super(sb);
-+			return -EIO;
-+		}
-+		extent.key = be32_to_cpu(ebn_p->key);
-+		extent.next = be32_to_cpu(ebn_p->next);
-+		extent.blocks = be16_to_cpu(ebn_p->blocks);
-+		pos = 0;
-+		asfs_brelse(ebn_bh);
-+	}
-+	ebn_p = &extent;
-+	filedata = ebn_p->next;
-+
-+	while (pos + ebn_p->blocks <= block && ebn_p->next != 0 && pos < inode->i_blocks) {
-+		pos += ebn_p->blocks;
-+		if (asfs_getextent(inode->i_sb, filedata, &ebn_bh, &ebn_p) != 0) {
-+			unlock_super(sb);
-+			return -EIO;
-+		}
-+		extent.key = be32_to_cpu(ebn_p->key);
-+		extent.next = be32_to_cpu(ebn_p->next);
-+		extent.blocks = be16_to_cpu(ebn_p->blocks);
-+		ebn_p = &extent;	
-+		filedata = ebn_p->next;
-+		asfs_brelse(ebn_bh);
-+	}
-+
-+	unlock_super(sb);
-+
-+	map_bh(bh_result, inode->i_sb, (sector_t) (ebn_p->key + block - pos));
-+
-+	if (create)
-+		set_buffer_new(bh_result);
-+
-+	asfs_debug("ASFS: get_block - mapped block %lu\n", ebn_p->key + block - pos);
-+
-+	ASFS_I(inode)->ext_cache.startblock = pos;
-+	ASFS_I(inode)->ext_cache.key = ebn_p->key;
-+	ASFS_I(inode)->ext_cache.next = ebn_p->next;
-+	ASFS_I(inode)->ext_cache.blocks = ebn_p->blocks;
-+
-+	return 0;
-+}
-+
-+int asfs_readpage(struct file *file, struct page *page)
-+{
-+	asfs_debug("ASFS: %s\n", __FUNCTION__);
-+	return block_read_full_page(page, asfs_get_block);
-+}
-+
-+sector_t asfs_bmap(struct address_space *mapping, sector_t block)
-+{
-+	asfs_debug("ASFS: %s\n", __FUNCTION__);
-+	return generic_block_bmap(mapping,block,asfs_get_block);
-+}
-+
-+#ifdef CONFIG_ASFS_RW
-+
-+int asfs_writepage(struct page *page, struct writeback_control *wbc)
-+{
-+	asfs_debug("ASFS: %s\n", __FUNCTION__);
-+	return block_write_full_page(page, asfs_get_block, wbc);
-+}
-+
-+int asfs_prepare_write(struct file *file, struct page *page, unsigned from, unsigned to)
-+{
-+	asfs_debug("ASFS: %s\n", __FUNCTION__);
-+	return cont_prepare_write(page, from, to, asfs_get_block, &ASFS_I(page->mapping->host)->mmu_private);
-+}
-+
-+void asfs_truncate(struct inode *inode)
-+{
-+	struct super_block *sb = inode->i_sb;
-+	struct buffer_head *bh;
-+	struct fsObject *obj;
-+
-+	asfs_debug("AFFS: truncate(inode=%d, oldsize=%u, newsize=%u)\n",
-+		 (u32)inode->i_ino, (u32)ASFS_I(inode)->mmu_private, (u32)inode->i_size);
-+
-+	if (inode->i_size > ASFS_I(inode)->mmu_private) {
-+		printk("ASFS: enlarging file is not supported yet\n");
-+		return;
-+	}
-+
-+	lock_super(sb);
-+
-+	if ((asfs_readobject(sb, inode->i_ino, &bh, &obj)) != 0) {
-+		unlock_super(sb);
-+		return;
-+	}
-+
-+	if (asfs_truncateblocksinfile(sb, bh, obj, inode->i_size) != 0) {
-+		asfs_brelse(bh);
-+		unlock_super(sb);
-+		return;
-+	}
-+		
-+	obj->object.file.size = cpu_to_be32(inode->i_size);
-+	ASFS_I(inode)->mmu_private = inode->i_size;
-+	ASFS_I(inode)->modified = TRUE;
-+	inode->i_blocks = (be32_to_cpu(obj->object.file.size) + sb->s_blocksize - 1) >> sb->s_blocksize_bits;
-+	asfs_bstore(sb, bh);
-+	asfs_brelse(bh);
-+
-+	unlock_super(sb);
-+}
-+
-+int asfs_file_open(struct inode *inode, struct file *filp)
-+{
-+	if (atomic_read(&filp->f_count) != 1)
-+		return 0;
-+	asfs_debug("ASFS: file open (node %d)\n", (int)inode->i_ino);
-+	return 0;
-+}
-+
-+int asfs_file_release(struct inode *inode, struct file *filp)
-+{
-+	int error = 0;
-+
-+	asfs_debug("ASFS: file release (node %d oc %d)\n", (int)inode->i_ino, atomic_read(&filp->f_count));
-+
-+	if (atomic_read(&filp->f_count) != 0)
-+		return 0;
-+
-+	if (ASFS_I(inode)->modified == TRUE) {
-+		struct buffer_head *bh;
-+		struct fsObject *obj;
-+		lock_super(inode->i_sb);
-+
-+		if ((error = asfs_readobject(inode->i_sb, inode->i_ino, &bh, &obj)) != 0) {
-+			unlock_super(inode->i_sb);
-+			return error;
-+		}
-+
-+		obj->datemodified = cpu_to_be32(inode->i_mtime.tv_sec - (365*8+2)*24*60*60);
-+		if (inode->i_mode & S_IFREG) {
-+			error = asfs_truncateblocksinfile(inode->i_sb, bh, obj, (u32)inode->i_size);
-+			obj->object.file.size = cpu_to_be32(inode->i_size);
-+			ASFS_I(inode)->mmu_private = inode->i_size;
-+			inode->i_blocks = (be32_to_cpu(obj->object.file.size) + inode->i_sb->s_blocksize - 1) >> inode->i_sb->s_blocksize_bits;
-+		}
-+		asfs_bstore(inode->i_sb, bh);
-+
-+		unlock_super(inode->i_sb);
-+
-+		asfs_brelse(bh);
-+	}
-+	ASFS_I(inode)->modified = FALSE;
-+
-+	return error;
-+}
-+
-+#endif
-diff -aurN a/fs/asfs/inode.c b/fs/asfs/inode.c
---- a/fs/asfs/inode.c	1969-12-31 19:00:00.000000000 -0500
-+++ b/fs/asfs/inode.c	2005-06-15 22:05:09.000000000 -0400
-@@ -0,0 +1,426 @@
-+/*
-+ *
-+ * Amiga Smart File System, Linux implementation
-+ * version: 1.0beta8
-+ *  
-+ * Copyright (C) 2003,2004,2005  Marek 'March' Szyprowski <marek at amiga.pl>
-+ *
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License
-+ * as published by the Free Software Foundation; either version
-+ * 2 of the License, or (at your option) any later version.
-+ *
-+ */
-+
-+#include <linux/types.h>
-+#include <linux/errno.h>
-+#include <linux/slab.h>
-+#include <linux/fs.h>
-+#include <linux/smp_lock.h>
-+#include <linux/time.h>
-+#include <linux/buffer_head.h>
-+#include <linux/vfs.h>
-+#include <linux/dirent.h>
-+#include "asfs_fs.h"
-+
-+#include <asm/byteorder.h>
-+
-+/* Mapping from our types to the kernel */
-+
-+static struct address_space_operations asfs_aops = {
-+	.readpage	= asfs_readpage,
-+	.sync_page	= block_sync_page,
-+	.bmap		= asfs_bmap,
-+#ifdef CONFIG_ASFS_RW
-+	.writepage	= asfs_writepage,
-+	.prepare_write = asfs_prepare_write,
-+	.commit_write = generic_commit_write,
-+#endif
-+};
-+
-+static struct file_operations asfs_file_operations = {
-+	.llseek		= generic_file_llseek,
-+	.read		= generic_file_read,
-+	.mmap		= generic_file_mmap,
-+#ifdef CONFIG_ASFS_RW
-+	.write		= generic_file_write,
-+	.open		= asfs_file_open,
-+	.release	= asfs_file_release,
-+	.fsync		= file_fsync,
-+#endif
-+};
-+
-+static struct file_operations asfs_dir_operations = {
-+	.read		= generic_read_dir,
-+	.readdir	= asfs_readdir,
-+};
-+
-+static struct inode_operations asfs_dir_inode_operations = {
-+	.lookup		= asfs_lookup,
-+#ifdef CONFIG_ASFS_RW
-+	.create		= asfs_create,
-+	.unlink		= asfs_unlink,
-+	.symlink	= asfs_symlink,
-+	.mkdir		= asfs_mkdir,
-+	.rmdir		= asfs_rmdir,
-+	.rename		= asfs_rename,
-+/*	.setattr	= asfs_notify_change,*/
-+#endif
-+};
-+
-+static struct inode_operations asfs_file_inode_operations = {
-+#ifdef CONFIG_ASFS_RW
-+	.truncate	= asfs_truncate,
-+/*	.setattr		= asfs_notify_change,*/
-+#endif
-+};
-+
-+static struct address_space_operations asfs_symlink_aops = {
-+	.readpage	= asfs_symlink_readpage,
-+};
-+
-+static struct inode_operations asfs_symlink_inode_operations = {
-+	.readlink	= page_readlink,
-+	.follow_link	= page_follow_link_light,
-+	.put_link	= page_put_link,
-+#ifdef CONFIG_ASFS_RW
-+/*	.setattr	= asfs_notify_change,*/
-+#endif
-+};
-+
-+void asfs_read_locked_inode(struct inode *inode, void *arg)
-+{
-+	struct super_block *sb = inode->i_sb;
-+	struct fsObject *obj = arg;
-+
-+	inode->i_mode = ASFS_SB(sb)->mode;
-+	inode->i_mtime.tv_sec = inode->i_atime.tv_sec = inode->i_ctime.tv_sec = be32_to_cpu(obj->datemodified) + (365*8+2)*24*60*60;  
-+	/* Linux: seconds since 01-01-1970, AmigaSFS: seconds since 01-01-1978 */
-+	inode->i_mtime.tv_nsec = inode->i_ctime.tv_nsec = inode->i_atime.tv_nsec = 0;
-+	inode->i_uid = ASFS_SB(sb)->uid;
-+	inode->i_gid = ASFS_SB(sb)->gid;
-+
-+	asfs_debug("asfs_read_inode2: Setting-up node %lu... ", inode->i_ino);
-+
-+	if (obj->bits & OTYPE_DIR) {
-+		asfs_debug("dir (FirstdirBlock: %u, HashTable %u)\n", \
-+		           be32_to_cpu(obj->object.dir.firstdirblock), be32_to_cpu(obj->object.dir.hashtable));
-+
-+		inode->i_size = 0;
-+		inode->i_op = &asfs_dir_inode_operations;
-+		inode->i_fop = &asfs_dir_operations;
-+		inode->i_mode |= S_IFDIR | ((inode->i_mode & 0400) ? 0100 : 0) | 
-+		              ((inode->i_mode & 0040) ? 0010 : 0) | ((inode->i_mode & 0004) ? 0001 : 0);
-+		ASFS_I(inode)->firstblock = be32_to_cpu(obj->object.dir.firstdirblock);
-+		ASFS_I(inode)->hashtable = be32_to_cpu(obj->object.dir.hashtable);
-+		ASFS_I(inode)->modified = 0;
-+	} else if (obj->bits & OTYPE_LINK && !(obj->bits & OTYPE_HARDLINK)) {
-+		asfs_debug("symlink\n");
-+		inode->i_size = 0;
-+		inode->i_op = &asfs_symlink_inode_operations;
-+		inode->i_mapping->a_ops = &asfs_symlink_aops;
-+		inode->i_mode |= S_IFLNK | S_IRWXUGO;
-+		ASFS_I(inode)->firstblock = be32_to_cpu(obj->object.file.data);
-+	} else {
-+		asfs_debug("file (Size: %u, FirstBlock: %u)\n", be32_to_cpu(obj->object.file.size), be32_to_cpu(obj->object.file.data));
-+		inode->i_size = be32_to_cpu(obj->object.file.size);
-+		inode->i_blocks = (be32_to_cpu(obj->object.file.size) + sb->s_blocksize - 1) >> sb->s_blocksize_bits;
-+		inode->i_op = &asfs_file_inode_operations;
-+		inode->i_fop = &asfs_file_operations;
-+		inode->i_mapping->a_ops = &asfs_aops;
-+		inode->i_mode |= S_IFREG;
-+		ASFS_I(inode)->firstblock = be32_to_cpu(obj->object.file.data);
-+		ASFS_I(inode)->ext_cache.startblock = 0;
-+		ASFS_I(inode)->ext_cache.key = 0;
-+		ASFS_I(inode)->mmu_private = inode->i_size;
-+	}
-+	return;	
-+}
-+
-+struct inode *asfs_get_root_inode(struct super_block *sb)
-+{
-+	struct inode *result = NULL;
-+	struct fsObject *obj;
-+	struct buffer_head *bh;
-+
-+	asfs_debug("asfs_get_root_inode\n");
-+
-+	if ((bh = asfs_breadcheck(sb, ASFS_SB(sb)->rootobjectcontainer, ASFS_OBJECTCONTAINER_ID))) {
-+		obj = &(((struct fsObjectContainer *)bh->b_data)->object[0]);
-+		if (be32_to_cpu(obj->objectnode) > 0)
-+			result = iget_locked(sb, be32_to_cpu(obj->objectnode));
-+
-+		if (result != NULL && result->i_state & I_NEW) {
-+			asfs_read_locked_inode(result, obj);
-+			unlock_new_inode(result);
-+		}
-+		asfs_brelse(bh);
-+	}
-+	return result;
-+}
-+
-+#ifdef CONFIG_ASFS_RW
-+
-+static void asfs_sync_dir_inode(struct inode *dir, struct fsObject *obj)
-+{
-+	ASFS_I(dir)->firstblock = be32_to_cpu(obj->object.dir.firstdirblock);
-+	ASFS_I(dir)->modified = 1;
-+	dir->i_mtime = dir->i_atime = dir->i_ctime = CURRENT_TIME;
-+	obj->datemodified = cpu_to_be32(dir->i_mtime.tv_sec - (365*8+2)*24*60*60);
-+}
-+
-+enum { it_file, it_dir, it_link };
-+
-+static int asfs_create_object(struct inode *dir, struct dentry *dentry, int mode, int type, const char *symname)
-+{
-+	int error;
-+	struct super_block *sb = dir->i_sb;
-+	struct inode *inode;
-+	struct buffer_head *bh, *dir_bh;
-+	struct fsObject obj_data, *dir_obj, *obj;
-+	u8 *name = (u8 *) dentry->d_name.name;
-+	u8 bufname[ASFS_MAXFN_BUF];
-+
-+	asfs_debug("asfs_create_obj %s in dir node %d\n", name, (int)dir->i_ino);
-+
-+	asfs_translate(bufname, name, ASFS_SB(sb)->nls_disk, ASFS_SB(sb)->nls_io, ASFS_MAXFN_BUF);
-+	if ((error = asfs_check_name(bufname, strlen(bufname))) != 0)
-+		return error;
-+
-+	sb = dir->i_sb;
-+	inode = new_inode(sb);
-+	if (!inode)
-+		return -ENOMEM;
-+
-+	memset(&obj_data, 0, sizeof(struct fsObject));
-+
-+	obj_data.protection = cpu_to_be32(FIBF_READ|FIBF_WRITE|FIBF_EXECUTE|FIBF_DELETE);
-+	obj_data.datemodified = cpu_to_be32(inode->i_mtime.tv_sec - (365*8+2)*24*60*60);
-+	switch (type) {
-+	case it_dir:
-+		obj_data.bits = OTYPE_DIR;
-+		break;
-+	case it_link:
-+		obj_data.bits = OTYPE_LINK;
-+		break;
-+	default:
-+		break;
-+	}
-+
-+	lock_super(sb);
-+
-+	if ((error = asfs_readobject(sb, dir->i_ino, &dir_bh, &dir_obj)) != 0) {
-+		dec_count(inode);
-+		unlock_super(sb);
-+		return error;
-+	}
-+
-+	bh = dir_bh;
-+	obj = dir_obj;
-+
-+	if ((error = asfs_createobject(sb, &bh, &obj, &obj_data, bufname, FALSE)) != 0) {
-+		asfs_brelse(dir_bh);
-+		dec_count(inode);
-+		unlock_super(sb);
-+		return error;
-+	}
-+
-+	inode->i_ino = be32_to_cpu(obj->objectnode);
-+	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
-+	inode->i_size = inode->i_blocks = inode->i_blksize = 0;
-+	inode->i_uid = dir->i_uid;
-+	inode->i_gid = dir->i_gid;
-+	inode->i_mode = mode | ASFS_SB(sb)->mode;
-+
-+	switch (type) {
-+	case it_dir:
-+		inode->i_mode |= S_IFDIR;
-+		inode->i_op = &asfs_dir_inode_operations;
-+		inode->i_fop = &asfs_dir_operations;
-+		ASFS_I(inode)->firstblock = be32_to_cpu(obj->object.dir.firstdirblock);
-+		ASFS_I(inode)->hashtable = be32_to_cpu(obj->object.dir.hashtable);
-+		ASFS_I(inode)->modified = 0;
-+		break;
-+	case it_file:
-+		inode->i_mode |= S_IFREG;
-+		inode->i_op = &asfs_file_inode_operations;
-+		inode->i_fop = &asfs_file_operations;
-+		inode->i_mapping->a_ops = &asfs_aops;
-+		ASFS_I(inode)->firstblock = be32_to_cpu(obj->object.file.data);
-+		ASFS_I(inode)->ext_cache.startblock = 0;
-+		ASFS_I(inode)->ext_cache.key = 0;
-+		ASFS_I(inode)->mmu_private = inode->i_size;
-+		break;
-+	case it_link:
-+		inode->i_mode = S_IFLNK | S_IRWXUGO;
-+		inode->i_op = &page_symlink_inode_operations;
-+		inode->i_mapping->a_ops = &asfs_symlink_aops;
-+		ASFS_I(inode)->firstblock = be32_to_cpu(obj->object.file.data);
-+		error = asfs_write_symlink(inode, symname);
-+		break;
-+	default:
-+		break;
-+	}
-+
-+	asfs_bstore(sb, bh);
-+	insert_inode_hash(inode);
-+	mark_inode_dirty(inode);
-+	d_instantiate(dentry, inode);
-+	asfs_sync_dir_inode(dir, dir_obj);
-+	asfs_bstore(sb, dir_bh); 
-+
-+	unlock_super(sb);
-+	asfs_brelse(bh);
-+	asfs_brelse(dir_bh);
-+	
-+	return error;
-+}
-+
-+int asfs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd)
-+{
-+	return asfs_create_object(dir, dentry, mode, it_file, NULL);
-+}
-+
-+int asfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
-+{
-+	return asfs_create_object(dir, dentry, mode, it_dir, NULL);
-+}
-+
-+int asfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname)
-+{
-+	return asfs_create_object(dir, dentry, 0, it_link, symname);
-+}
-+
-+int asfs_rmdir(struct inode *dir, struct dentry *dentry)
-+{
-+	asfs_debug("ASFS: %s\n", __FUNCTION__);
-+
-+	if (ASFS_I(dentry->d_inode)->firstblock != 0)
-+		return -ENOTEMPTY;
-+	
-+	return asfs_unlink(dir, dentry);
-+}
-+
-+int asfs_unlink(struct inode *dir, struct dentry *dentry)
-+{
-+	struct inode *inode = dentry->d_inode;
-+	int error;
-+	struct super_block *sb = dir->i_sb;
-+	struct buffer_head *bh, *dir_bh;
-+	struct fsObject *dir_obj, *obj;
-+
-+	asfs_debug("ASFS: %s\n", __FUNCTION__);
-+
-+	lock_super(sb);
-+
-+	if ((error = asfs_readobject(sb, inode->i_ino, &bh, &obj)) != 0) {
-+		unlock_super(sb);
-+		return error;
-+	}
-+	if ((error = asfs_deleteobject(sb, bh, obj)) != 0) {
-+		asfs_brelse(bh);
-+		unlock_super(sb);
-+		return error;
-+	}
-+	asfs_brelse(bh);
-+
-+	/* directory data could change after removing the object */
-+	if ((error = asfs_readobject(sb, dir->i_ino, &dir_bh, &dir_obj)) != 0) {
-+		unlock_super(sb);
-+		return error;
-+	}
-+
-+	asfs_sync_dir_inode(dir, dir_obj);
-+	asfs_bstore(sb, dir_bh); 
-+
-+	dec_count(inode);
-+	unlock_super(sb);
-+	asfs_brelse(dir_bh);
-+
-+	return 0;
-+}
-+
-+int asfs_rename(struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry)
-+{
-+	struct super_block *sb = old_dir->i_sb;
-+	struct buffer_head *src_bh, *old_bh, *new_bh;
-+	int error;
-+	struct fsObject *src_obj, *old_obj, *new_obj;
-+	u8 bufname[ASFS_MAXFN_BUF];
-+
-+	asfs_debug("ASFS: rename (old=%u,\"%*s\" to new=%u,\"%*s\")\n",
-+		 (u32)old_dir->i_ino, (int)old_dentry->d_name.len, old_dentry->d_name.name,
-+		 (u32)new_dir->i_ino, (int)new_dentry->d_name.len, new_dentry->d_name.name);
-+
-+	asfs_translate(bufname, (u8 *) new_dentry->d_name.name, ASFS_SB(sb)->nls_disk, ASFS_SB(sb)->nls_io, ASFS_MAXFN_BUF);
-+	if ((error = asfs_check_name(bufname, strlen(bufname))) != 0)
-+		return error;
-+
-+
-+	/* Unlink destination if it already exists */
-+	if (new_dentry->d_inode) 
-+		if ((error = asfs_unlink(new_dir, new_dentry)) != 0)
-+			return error;
-+
-+	lock_super(sb);
-+
-+	if ((error = asfs_readobject(sb, old_dentry->d_inode->i_ino, &src_bh, &src_obj)) != 0) {
-+		unlock_super(sb);
-+		return error;
-+	}
-+	if ((error = asfs_readobject(sb, new_dir->i_ino, &new_bh, &new_obj)) != 0) {
-+		asfs_brelse(src_bh);
-+		unlock_super(sb);
-+		return error;
-+	}
-+
-+	if ((error = asfs_renameobject(sb, src_bh, src_obj, new_bh, new_obj, bufname)) != 0) {
-+		asfs_brelse(src_bh);
-+		asfs_brelse(new_bh);
-+		unlock_super(sb);
-+		return error;
-+	}
-+	asfs_brelse(src_bh);
-+	asfs_brelse(new_bh);
-+
-+	if ((error = asfs_readobject(sb, old_dir->i_ino, &old_bh, &old_obj)) != 0) {
-+		unlock_super(sb);
-+		return error;
-+	}
-+	if ((error = asfs_readobject(sb, new_dir->i_ino, &new_bh, &new_obj)) != 0) {
-+		asfs_brelse(old_bh);
-+		unlock_super(sb);
-+		return error;
-+	}
-+
-+	asfs_sync_dir_inode(old_dir, old_obj);
-+	asfs_sync_dir_inode(new_dir, new_obj);
-+
-+	asfs_bstore(sb, new_bh);	
-+	asfs_bstore(sb, old_bh);
-+
-+	unlock_super(sb);
-+	asfs_brelse(old_bh);
-+	asfs_brelse(new_bh);
-+
-+	mark_inode_dirty(old_dir);
-+	mark_inode_dirty(new_dir);
-+
-+	return 0;
-+}
-+
-+/*
-+int asfs_notify_change(struct dentry *dentry, struct iattr *attr)
-+{
-+	struct inode *inode = dentry->d_inode;
-+	int error = 0;
-+
-+	asfs_debug("ASFS: notify_change(%lu,0x%x)\n",inode->i_ino,attr->ia_valid);
-+
-+	error = inode_change_ok(inode,attr);
-+
-+	return error;
-+}
-+*/
-+#endif
-diff -aurN a/fs/asfs/namei.c b/fs/asfs/namei.c
---- a/fs/asfs/namei.c	1969-12-31 19:00:00.000000000 -0500
-+++ b/fs/asfs/namei.c	2005-06-15 22:05:09.000000000 -0400
-@@ -0,0 +1,197 @@
-+/*
-+ *
-+ * Amiga Smart File System, Linux implementation
-+ * version: 1.0beta7
-+ *
-+ * Copyright (C) 2003,2004  Marek 'March' Szyprowski <marek at amiga.pl>
-+ *
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License
-+ * as published by the Free Software Foundation; either version
-+ * 2 of the License, or (at your option) any later version.
-+ *
-+ */
-+
-+#include <linux/types.h>
-+#include <linux/errno.h>
-+#include <linux/slab.h>
-+#include <linux/string.h>
-+#include <linux/fs.h>
-+#include <linux/buffer_head.h>
-+#include <linux/vfs.h>
-+#include <linux/string.h>
-+#include <linux/nls.h>
-+#include "asfs_fs.h"
-+
-+static inline u8 asfs_upperchar(u8 c)
-+{
-+	if ((c >= 224 && c <= 254 && c != 247) || (c >= 'a' && c <= 'z'))
-+		c -= 32;
-+	return (c);
-+}
-+
-+u8 asfs_lowerchar(u8 c)
-+{
-+	if ((c >= 192 && c <= 222 && c != 215) || (c >= 'A' && c <= 'Z'))
-+		c += 32;
-+	return (c);
-+}
-+
-+static inline u8 asfs_nls_upperchar(u8 c, struct nls_table *t)
-+{
-+	if (t) {
-+		u8 nc = t->charset2upper[c];
-+		return nc ? nc : c;
-+	} else
-+		return asfs_upperchar(c);
-+}
-+
-+/* Check if the name is valid for a asfs object. */
-+
-+inline int asfs_check_name(const u8 *name, int len)
-+{
-+	int i;
-+
-+	if (len > ASFS_MAXFN)
-+		return -ENAMETOOLONG;
-+
-+	for (i = 0; i < len; i++)
-+		if (name[i] < ' ' || name[i] == ':' || (name[i] > 0x7e && name[i] < 0xa0))
-+			return -EINVAL;
-+
-+	return 0;
-+}
-+
-+/* Note: the dentry argument is the parent dentry. */
-+
-+static int asfs_hash_dentry(struct dentry *dentry, struct qstr *qstr)
-+{
-+	struct super_block *sb = dentry->d_inode->i_sb;
-+	const u8 *name = qstr->name;
-+	unsigned long hash;
-+	int i;
-+	struct nls_table *nls_io = ASFS_SB(sb)->nls_io;
-+
-+	i = asfs_check_name(qstr->name,qstr->len);
-+	if (i)
-+		return i;
-+
-+	hash = init_name_hash();
-+
-+	if (ASFS_SB(sb)->flags & ASFS_ROOTBITS_CASESENSITIVE)
-+		for (i=qstr->len; i > 0; name++, i--)
-+			hash = partial_name_hash(*name, hash);
-+	else
-+		for (i=qstr->len; i > 0; name++, i--)
-+			hash = partial_name_hash(asfs_nls_upperchar(*name, nls_io), hash);
-+
-+	qstr->hash = end_name_hash(hash);
-+
-+	return 0;
-+}
-+
-+static int asfs_compare_dentry(struct dentry *dentry, struct qstr *a, struct qstr *b)
-+{
-+	struct super_block *sb = dentry->d_inode->i_sb;
-+	const u8 *aname = a->name;
-+	const u8 *bname = b->name;
-+	int len;
-+	struct nls_table *nls_io = ASFS_SB(sb)->nls_io;
-+
-+	/* 'a' is the qstr of an already existing dentry, so the name
-+	 * must be valid. 'b' must be validated first.
-+	 */
-+
-+	if (asfs_check_name(b->name,b->len))
-+		return 1;
-+
-+	if (a->len != b->len)
-+		return 1;
-+
-+	if (ASFS_SB(sb)->flags & ASFS_ROOTBITS_CASESENSITIVE) {
-+		for (len=a->len; len > 0; len--)
-+			if (*aname++ != *bname++)
-+				return 1;
-+	} else {
-+		for (len=a->len; len > 0; len--)
-+			if (asfs_nls_upperchar(*aname++, nls_io) != asfs_nls_upperchar(*bname++, nls_io))
-+				return 1;
-+	}
-+
-+	return 0;
-+}
-+
-+struct dentry_operations asfs_dentry_operations = {
-+	d_hash:		asfs_hash_dentry,
-+	d_compare:	asfs_compare_dentry,
-+};
-+
-+int asfs_namecmp(u8 *s, u8 *ct, int casesensitive, struct nls_table *t)
-+{
-+	if (casesensitive) {
-+		while (*s == *ct && *ct != '\0' && *ct != '/') {
-+			s++;
-+			ct++;
-+		}
-+	} else {
-+		while (asfs_nls_upperchar(*s, t) == asfs_nls_upperchar(*ct, t) && *ct != '\0'
-+		       && *ct != '/') {
-+			s++;
-+			ct++;
-+		}
-+	}
-+	return (*s == '\0' && (*ct == '\0' || *ct == '/')) ? 0 : *ct - *s;
-+}
-+
-+u16 asfs_hash(u8 *name, int casesensitive)
-+{
-+	u16 hashval = 0;
-+	while (name[hashval] != 0 && name[hashval] != '/')
-+		hashval++;
-+	if (casesensitive) {
-+		u8 c = *name;
-+		while (c != 0 && c != '/') {
-+			hashval = hashval * 13 + c;
-+			c = *++name;
-+		}
-+	} else {
-+		u8 c = *name;
-+		while (c != 0 && c != '/') {
-+			hashval = hashval * 13 + asfs_upperchar(c);
-+			c = *++name;
-+		}
-+	}
-+	return hashval;
-+}
-+
-+void asfs_translate(u8 *to, u8 *from, struct nls_table *nls_to, struct nls_table *nls_from, int limit)
-+{
-+	wchar_t uni;
-+	int i, len;
-+	int from_len, to_len = limit;
-+
-+	if (nls_to) {
-+		from_len = strlen(from);
-+		for (i=0; i < from_len && to_len > 1; ) {
-+			len = nls_from->char2uni(&from[i], from_len-i, &uni);
-+			if (len > 0) {
-+				i += len;
-+				len = nls_to->uni2char(uni, to, to_len);
-+				if (len > 0) {
-+					to += len;
-+					to_len -= len;
-+				}
-+			} else
-+				i++;
-+			if (len < 0) {
-+				*to++ = '?';
-+				to_len--;
-+			}
-+		}
-+		*to = '\0';
-+	} else {
-+		strncpy (to, from, limit);
-+		to[limit] = '\0';
-+	}
-+}
-diff -aurN a/fs/asfs/nodes.c b/fs/asfs/nodes.c
---- a/fs/asfs/nodes.c	1969-12-31 19:00:00.000000000 -0500
-+++ b/fs/asfs/nodes.c	2005-06-15 22:05:09.000000000 -0400
-@@ -0,0 +1,455 @@
-+/*
-+ *
-+ * Amiga Smart File System, Linux implementation
-+ * version: 1.0beta7
-+ *
-+ * This file contains some parts of the original amiga version of 
-+ * SmartFilesystem source code.
-+ *
-+ * SmartFilesystem is copyrighted (C) 2003 by: John Hendrikx, 
-+ * Ralph Schmidt, Emmanuel Lesueur, David Gerber and Marcin Kurek
-+ * 
-+ * Adapted and modified by Marek 'March' Szyprowski <marek at amiga.pl>
-+ *
-+ */
-+
-+#include <linux/types.h>
-+#include <linux/errno.h>
-+#include <linux/slab.h>
-+#include <linux/fs.h>
-+#include <linux/buffer_head.h>
-+#include <linux/vfs.h>
-+#include "asfs_fs.h"
-+
-+#include <asm/byteorder.h>
-+
-+/* Finds a specific node by number. */
-+int asfs_getnode(struct super_block *sb, u32 nodeno, struct buffer_head **ret_bh, struct fsObjectNode **ret_node)
-+{
-+	struct buffer_head *bh;
-+	struct fsNodeContainer *nodecont;
-+	u32 nodeindex = ASFS_SB(sb)->objectnoderoot;
-+
-+	while ((bh = asfs_breadcheck(sb, nodeindex, ASFS_NODECONTAINER_ID))) {
-+		nodecont = (struct fsNodeContainer *) bh->b_data;
-+
-+		if (be32_to_cpu(nodecont->nodes) == 1) {
-+			*ret_node = (struct fsObjectNode *) ((u8 *) nodecont->node + NODE_STRUCT_SIZE * (nodeno - be32_to_cpu(nodecont->nodenumber)));
-+			*ret_bh = bh;
-+			return 0;
-+		} else {
-+			u16 containerentry = (nodeno - be32_to_cpu(nodecont->nodenumber)) / be32_to_cpu(nodecont->nodes);
-+			nodeindex = be32_to_cpu(nodecont->node[containerentry]) >> (sb->s_blocksize_bits - ASFS_BLCKFACCURACY);
-+		}
-+		asfs_brelse(bh);
-+	}
-+	if (bh == NULL)
-+		return -EIO;
-+	return -ENOENT;
-+}
-+
-+#ifdef CONFIG_ASFS_RW
-+
-+	/* Looks for the parent of the passed-in buffer_head (fsNodeContainer)
-+	   starting from the root.  It returns an error if any error occured.
-+	   If error is 0 and io_bh is NULL as well, then there was no parent (ie,
-+	   you asked parent of the root).  Otherwise io_bh should contain the
-+	   parent of the passed-in NodeContainer. */
-+
-+static int parentnodecontainer(struct super_block *sb, struct buffer_head **io_bh)
-+{
-+	u32 noderoot = ASFS_SB(sb)->objectnoderoot;
-+	u32 childblock = be32_to_cpu(((struct fsBlockHeader *) (*io_bh)->b_data)->ownblock);
-+	u32 nodenumber = be32_to_cpu(((struct fsNodeContainer *) (*io_bh)->b_data)->nodenumber);
-+	int errorcode = 0;
-+
-+	if (noderoot == childblock) {
-+		*io_bh = NULL;
-+		return 0;
-+	}
-+
-+	while ((*io_bh = asfs_breadcheck(sb, noderoot, ASFS_NODECONTAINER_ID))) {
-+		struct fsNodeContainer *nc = (void *) (*io_bh)->b_data;
-+
-+		if (be32_to_cpu(nc->nodes) == 1) {
-+			/* We've descended the tree to a leaf NodeContainer, something
-+			   which should never happen if the passed-in io_bh had
-+			   contained a valid fsNodeContainer. */
-+			printk("ASFS: Failed to locate the parent NodeContainer - node tree is corrupted!\n");
-+			*io_bh = NULL;
-+			return -EIO;
-+		} else {
-+			u16 containerentry = (nodenumber - be32_to_cpu(nc->nodenumber)) / be32_to_cpu(nc->nodes);
-+			noderoot = be32_to_cpu(nc->node[containerentry]) >> (sb->s_blocksize_bits - ASFS_BLCKFACCURACY);
-+		}
-+
-+		if (noderoot == childblock)
-+			break;
-+
-+		asfs_brelse(*io_bh);
-+	}
-+
-+	if (*io_bh == NULL)
-+		return -EIO;
-+
-+	return errorcode;
-+}
-+
-+
-+static int isfull(struct super_block *sb, struct fsNodeContainer *nc)
-+{
-+	u32 *p = nc->node;
-+	s16 n = NODECONT_BLOCK_COUNT;
-+
-+	while (--n >= 0) {
-+		if (*p == 0 || (be32_to_cpu(*p) & 0x00000001) == 0) {
-+			break;
-+		}
-+		p++;
-+	}
-+
-+	return n < 0;
-+}
-+
-+static int markparentfull(struct super_block *sb, struct buffer_head *bh)
-+{
-+	u32 nodenumber = be32_to_cpu(((struct fsNodeContainer *) (bh->b_data))->nodenumber);
-+	int errorcode;
-+
-+	if ((errorcode = parentnodecontainer(sb, &bh)) == 0 && bh != 0) {
-+		struct fsNodeContainer *nc = (void *) bh->b_data;
-+		u16 containerentry = (nodenumber - be32_to_cpu(nc->nodenumber)) / be32_to_cpu(nc->nodes);
-+
-+		nc->node[containerentry] = cpu_to_be32(be32_to_cpu(nc->node[containerentry]) | 0x00000001);
-+
-+		asfs_bstore(sb, bh);
-+
-+		if (isfull(sb, nc)) {	/* This container now is full as well!  Mark the next higher up container too then! */
-+			return markparentfull(sb, bh);
-+		}
-+		asfs_brelse(bh);
-+	}
-+
-+	return errorcode;
-+}
-+
-+static int addnewnodelevel(struct super_block *sb, u16 nodesize)
-+{
-+	struct buffer_head *bh;
-+	u32 noderoot = ASFS_SB(sb)->objectnoderoot;
-+	int errorcode;
-+
-+	/* Adds a new level to the Node tree. */
-+
-+	asfs_debug("addnewnodelevel: Entry\n");
-+
-+	if ((bh = asfs_breadcheck(sb, noderoot, ASFS_NODECONTAINER_ID))) {
-+		struct buffer_head *newbh;
-+		u32 newblock;
-+
-+		if ((errorcode = asfs_allocadminspace(sb, &newblock)) == 0 && (newbh = asfs_getzeroblk(sb, newblock))) {
-+			struct fsNodeContainer *nc = (void *) bh->b_data;
-+			struct fsNodeContainer *newnc = (void *) newbh->b_data;
-+
-+			/* The newly allocated block will become a copy of the current root. */
-+
-+			newnc->bheader.id = cpu_to_be32(ASFS_NODECONTAINER_ID);
-+			newnc->bheader.ownblock = cpu_to_be32(newblock);
-+			newnc->nodenumber = nc->nodenumber;
-+			newnc->nodes = nc->nodes;
-+			memcpy(newnc->node, nc->node, sb->s_blocksize - sizeof(struct fsNodeContainer));
-+
-+			asfs_bstore(sb, newbh);
-+			asfs_brelse(newbh);
-+
-+			/* The current root will now be transformed into a new root. */
-+
-+			if (be32_to_cpu(nc->nodes) == 1)
-+				nc->nodes = cpu_to_be32((sb->s_blocksize - sizeof(struct fsNodeContainer)) / nodesize);
-+			else
-+				nc->nodes = cpu_to_be32(be32_to_cpu(nc->nodes) * NODECONT_BLOCK_COUNT);
-+
-+			nc->node[0] = cpu_to_be32((newblock << (sb->s_blocksize_bits - ASFS_BLCKFACCURACY)) + 1);	/* Tree is full from that point! */
-+			memset(&nc->node[1], 0, sb->s_blocksize - sizeof(struct fsNodeContainer) - 4);
-+
-+			asfs_bstore(sb, bh);
-+		}
-+		asfs_brelse(bh);
-+	} else
-+		errorcode = -EIO;
-+
-+	return errorcode;
-+}
-+
-+static int createnodecontainer(struct super_block *sb, u32 nodenumber, u32 nodes, u32 * returned_block)
-+{
-+	struct buffer_head *bh;
-+	int errorcode;
-+	u32 newblock;
-+
-+	asfs_debug("createnodecontainer: nodenumber = %u, nodes = %u\n", nodenumber, nodes);
-+
-+	if ((errorcode = asfs_allocadminspace(sb, &newblock)) == 0 && (bh = asfs_getzeroblk(sb, newblock))) {
-+		struct fsNodeContainer *nc = (void *) bh->b_data;
-+
-+		nc->bheader.id = cpu_to_be32(ASFS_NODECONTAINER_ID);
-+		nc->bheader.ownblock = cpu_to_be32(newblock);
-+
-+		nc->nodenumber = cpu_to_be32(nodenumber);
-+		nc->nodes = cpu_to_be32(nodes);
-+
-+		asfs_bstore(sb, bh);
-+		asfs_brelse(bh);
-+		*returned_block = newblock;
-+	}
-+
-+	return errorcode;
-+}
-+
-+	/* This function creates a new fsNode structure in a fsNodeContainer.  If needed
-+	   it will create a new fsNodeContainers and a new fsNodeIndexContainer. */
-+
-+int asfs_createnode(struct super_block *sb, struct buffer_head **returned_bh, struct fsNode **returned_node, u32 * returned_nodeno)
-+{
-+	u16 nodecount = (sb->s_blocksize - sizeof(struct fsNodeContainer)) / NODE_STRUCT_SIZE;
-+	u32 noderoot = ASFS_SB(sb)->objectnoderoot;
-+	u32 nodeindex = noderoot;
-+	int errorcode = 0;
-+
-+	while ((*returned_bh = asfs_breadcheck(sb, nodeindex, ASFS_NODECONTAINER_ID))) {
-+		struct fsNodeContainer *nc = (void *) (*returned_bh)->b_data;
-+
-+		if (be32_to_cpu(nc->nodes) == 1) {	/* Is it a leaf-container? */
-+			struct fsNode *n;
-+			s16 i = nodecount;
-+
-+			n = (struct fsNode *) nc->node;
-+
-+			while (i-- > 0) {
-+				if (n->data == 0)
-+					break;
-+
-+				n = (struct fsNode *) ((u8 *) n + NODE_STRUCT_SIZE);
-+			}
-+
-+			if (i >= 0) {
-+				/* Found an empty fsNode structure! */
-+				*returned_node = n;
-+				*returned_nodeno = be32_to_cpu(nc->nodenumber) + ((u8 *) n - (u8 *) nc->node) / NODE_STRUCT_SIZE;
-+
-+				asfs_debug("createnode: Created Node %d\n", *returned_nodeno);
-+
-+				/* Below we continue to look through the NodeContainer block.  We skip the entry
-+				   we found to be unused, and see if there are any more unused entries.  If we
-+				   do not find any more unused entries then this container is now full. */
-+
-+				n = (struct fsNode *) ((u8 *) n + NODE_STRUCT_SIZE);
-+
-+				while (i-- > 0) {
-+					if (n->data == 0)
-+						break;
-+
-+					n = (struct fsNode *) ((u8 *) n + NODE_STRUCT_SIZE);
-+				}
-+
-+				if (i < 0) {
-+					/* No more empty fsNode structures in this block.  Mark parent full. */
-+					errorcode = markparentfull(sb, *returned_bh);
-+				}
-+
-+				return errorcode;
-+			} else {
-+				/* What happened now is that we found a leaf-container which was
-+				   completely filled.  In practice this should only happen when there
-+				   is only a single NodeContainer (only this container), or when there
-+				   was an error in one of the full-bits in a higher level container. */
-+
-+				if (noderoot != nodeindex) {
-+					/*** Hmmm... it looks like there was a damaged full-bit or something.
-+					     In this case we'd probably better call markcontainerfull. */
-+
-+					printk("ASFS: Couldn't find empty Node in NodeContainer while NodeIndexContainer indicated there should be one!\n");
-+
-+					errorcode = -ENOSPC;
-+					break;
-+				} else {
-+					/* Container is completely filled. */
-+
-+					if ((errorcode = addnewnodelevel(sb, NODE_STRUCT_SIZE)) != 0)
-+						return errorcode;
-+
-+					nodeindex = noderoot;
-+				}
-+			}
-+		} else {	/* This isn't a leaf container */
-+			u32 *p = nc->node;
-+			s16 i = NODECONT_BLOCK_COUNT;
-+
-+			/* We've read a normal container */
-+
-+			while (i-- > 0) {
-+				if (*p != 0 && (be32_to_cpu(*p) & 0x00000001) == 0)
-+					break;
-+
-+				p++;
-+			}
-+
-+			if (i >= 0) {
-+				/* Found a not completely filled Container */
-+
-+				nodeindex = be32_to_cpu(*p) >> (sb->s_blocksize_bits - ASFS_BLCKFACCURACY);
-+			} else {
-+				/* Everything in the NodeIndexContainer was completely filled.  There possibly
-+				   are some unused pointers in this block however.  */
-+
-+				asfs_debug("createnode: NodeContainer at block has no empty Nodes.\n");
-+
-+				p = nc->node;
-+				i = NODECONT_BLOCK_COUNT;
-+
-+				while (i-- > 0) {
-+					if (*p == 0)
-+						break;
-+
-+					p++;
-+				}
-+
-+				if (i >= 0) {
-+					u32 newblock;
-+					u32 nodes;
-+
-+					/* Found an unused Container pointer */
-+
-+					if (be32_to_cpu(nc->nodes) == (sb->s_blocksize - sizeof(struct fsNodeContainer)) / NODE_STRUCT_SIZE) {
-+						nodes = 1;
-+					} else {
-+						nodes = be32_to_cpu(nc->nodes) / NODECONT_BLOCK_COUNT;
-+					}
-+
-+					if ((errorcode = createnodecontainer(sb, be32_to_cpu(nc->nodenumber) + (p - nc->node) * be32_to_cpu(nc->nodes), nodes, &newblock)) != 0) {
-+						break;
-+					}
-+
-+					*p = cpu_to_be32(newblock << (sb->s_blocksize_bits - ASFS_BLCKFACCURACY));
-+
-+					asfs_bstore(sb, *returned_bh);
-+				} else {
-+					/* Container is completely filled.  This must be the top-level NodeIndex container
-+					   as otherwise the full-bit would have been wrong! */
-+
-+					if ((errorcode = addnewnodelevel(sb, NODE_STRUCT_SIZE)) != 0)
-+						break;
-+
-+					nodeindex = noderoot;
-+				}
-+			}
-+		}
-+		asfs_brelse(*returned_bh);
-+	}
-+
-+	if (*returned_bh == NULL)
-+		return -EIO;
-+
-+	return (errorcode);
-+}
-+
-+static int markparentempty(struct super_block *sb, struct buffer_head *bh)
-+{
-+	u32 nodenumber = be32_to_cpu(((struct fsNodeContainer *) bh->b_data)->nodenumber);
-+	int errorcode;
-+
-+	if ((errorcode = parentnodecontainer(sb, &bh)) == 0 && bh != 0) {
-+		struct fsNodeContainer *nc = (void *) bh->b_data;
-+		int wasfull;
-+		u16 containerentry = (nodenumber - be32_to_cpu(nc->nodenumber)) / be32_to_cpu(nc->nodes);
-+
-+		wasfull = isfull(sb, nc);
-+
-+		nc->node[containerentry] = cpu_to_be32(be32_to_cpu(nc->node[containerentry]) & ~0x00000001);
-+
-+		asfs_bstore(sb, bh);
-+
-+		if (wasfull) {
-+			/* This container was completely full before!  Mark the next higher up container too then! */
-+			return markparentempty(sb, bh);
-+		}
-+		asfs_brelse(bh);
-+	}
-+
-+	return errorcode;
-+}
-+
-+static int freecontainer(struct super_block *sb, struct buffer_head *bh)
-+{
-+	u32 nodenumber = be32_to_cpu(((struct fsNodeContainer *) bh->b_data)->nodenumber);
-+	int errorcode;
-+
-+	if ((errorcode = parentnodecontainer(sb, &bh)) == 0 && bh != NULL) {	/* This line also prevents the freeing of the noderoot. */
-+		struct fsNodeContainer *nc = (void *) bh->b_data;
-+		u16 containerindex = (nodenumber - be32_to_cpu(nc->nodenumber)) / be32_to_cpu(nc->nodes);
-+
-+		if ((errorcode = asfs_freeadminspace(sb, be32_to_cpu(nc->node[containerindex]) >> (sb->s_blocksize_bits - ASFS_BLCKFACCURACY))) == 0) {
-+			u32 *p = nc->node;
-+			s16 n = NODECONT_BLOCK_COUNT;
-+
-+			nc->node[containerindex] = 0;
-+			asfs_bstore(sb, bh);
-+
-+			while (n-- > 0)
-+				if (*p++ != 0)
-+					break;
-+
-+			if (n < 0) {	/* This container is now completely empty!  Free this NodeIndexContainer too then! */
-+				return freecontainer(sb, bh);
-+			}
-+		}
-+		asfs_brelse(bh);
-+	}
-+
-+	return errorcode;
-+}
-+
-+static int internaldeletenode(struct super_block *sb, struct buffer_head *bh, struct fsNode *n)
-+{
-+	struct fsNodeContainer *nc = (void *) bh->b_data;
-+	u16 nodecount = (sb->s_blocksize - sizeof(struct fsNodeContainer)) / NODE_STRUCT_SIZE;
-+	s16 i = nodecount;
-+	s16 empty = 0;
-+	int errorcode = 0;
-+
-+	n->data = 0;
-+	n = (struct fsNode *) nc->node;
-+
-+	while (i-- > 0) {
-+		if (n->data == 0)
-+			empty++;
-+
-+		n = (struct fsNode *) ((u8 *) n + NODE_STRUCT_SIZE);
-+	}
-+
-+	asfs_bstore(sb, bh);
-+
-+	if (empty == 1)		/* NodeContainer was completely full before, so we need to mark it empty now. */
-+		errorcode = markparentempty(sb, bh);
-+	else if (empty == nodecount)	/* NodeContainer is now completely empty!  Free it! */
-+		errorcode = freecontainer(sb, bh);
-+
-+	return (errorcode);
-+}
-+
-+int asfs_deletenode(struct super_block *sb, u32 objectnode)
-+{
-+	struct buffer_head *bh;
-+	struct fsObjectNode *on;
-+	int errorcode;
-+
-+	asfs_debug("deletenode: Deleting Node %d\n", objectnode);
-+
-+	if ((errorcode = asfs_getnode(sb, objectnode, &bh, &on)) == 0)
-+		errorcode = internaldeletenode(sb, bh, (struct fsNode *) on);
-+
-+	asfs_brelse(bh);
-+	return (errorcode);
-+}
-+
-+#endif
-diff -aurN a/fs/asfs/objects.c b/fs/asfs/objects.c
---- a/fs/asfs/objects.c	1969-12-31 19:00:00.000000000 -0500
-+++ b/fs/asfs/objects.c	2005-06-15 22:05:09.000000000 -0400
-@@ -0,0 +1,765 @@
-+/*
-+ *
-+ * Amiga Smart File System, Linux implementation
-+ * version: 1.0beta7
-+ *
-+ * This file contains some parts of the original amiga version of 
-+ * SmartFilesystem source code.
-+ *
-+ * SmartFilesystem is copyrighted (C) 2003 by: John Hendrikx, 
-+ * Ralph Schmidt, Emmanuel Lesueur, David Gerber, and Marcin Kurek
-+ * 
-+ * Adapted and modified by Marek 'March' Szyprowski <marek at amiga.pl>
-+ *
-+ */
-+
-+#include <linux/types.h>
-+#include <linux/errno.h>
-+#include <linux/slab.h>
-+#include <linux/fs.h>
-+#include <linux/buffer_head.h>
-+#include <linux/vfs.h>
-+#include "asfs_fs.h"
-+
-+#include <asm/byteorder.h>
-+
-+struct fsObject *asfs_nextobject(struct fsObject *obj)
-+{
-+	int i;
-+	u8 *p = obj->name;
-+
-+	for (i = 2; i > 0; p++)
-+		if (*p == '\0')
-+			i--;
-+	if ((p - (u8 *) obj) & 0x01)
-+		p++;
-+
-+	return ((struct fsObject *) p);
-+}
-+
-+struct fsObject *asfs_find_obj_by_name(struct super_block *sb, struct fsObjectContainer *objcont, u8 * name)
-+{
-+	struct fsObject *obj;
-+
-+	obj = &(objcont->object[0]);
-+	while (be32_to_cpu(obj->objectnode) > 0 && ((char *) obj - (char *) objcont) + sizeof(struct fsObject) + 2 < sb->s_blocksize) {
-+		if (asfs_namecmp(obj->name, name, ASFS_SB(sb)->flags & ASFS_ROOTBITS_CASESENSITIVE, NULL) == 0) {
-+			asfs_debug("Object found! Node %u, Name %s, Type %x, inCont %u\n", be32_to_cpu(obj->objectnode), obj->name, obj->bits, be32_to_cpu(objcont->bheader.ownblock));
-+			return obj;
-+		}
-+		obj = asfs_nextobject(obj);
-+	}
-+	return NULL;
-+}
-+
-+#ifdef CONFIG_ASFS_RW
-+
-+struct fsObject *find_obj_by_node(struct super_block *sb, struct fsObjectContainer *objcont, u32 objnode)
-+{
-+	struct fsObject *obj;
-+
-+	obj = &(objcont->object[0]);
-+	while (be32_to_cpu(obj->objectnode) > 0 && ((char *) obj - (char *) objcont) + sizeof(struct fsObject) + 2 < sb->s_blocksize) {
-+		if (be32_to_cpu(obj->objectnode) == objnode) {
-+			return obj;
-+		}
-+		obj = asfs_nextobject(obj);
-+	}
-+	return NULL;
-+}
-+
-+int asfs_readobject(struct super_block *sb, u32 objectnode, struct buffer_head **bh, struct fsObject **returned_object)
-+{
-+	struct fsObjectNode *on;
-+	int errorcode;
-+	u32 contblock;
-+
-+	asfs_debug("Seaching object - node %d\n", objectnode);
-+
-+	if ((errorcode = asfs_getnode(sb, objectnode, bh, &on)) != 0)
-+		return errorcode;
-+	contblock = be32_to_cpu(on->node.data);
-+	asfs_brelse(*bh);
-+
-+	if (contblock > 0 && (*bh = asfs_breadcheck(sb, contblock, ASFS_OBJECTCONTAINER_ID))) {
-+		*returned_object = find_obj_by_node(sb, (void *) (*bh)->b_data, objectnode);
-+		if (*returned_object == NULL) {
-+			brelse(*bh);
-+			*bh = NULL;
-+			return -ENOENT;
-+		}
-+		return 0;
-+	} else
-+		return -EIO;
-+}
-+
-+static int removeobjectcontainer(struct super_block *sb, struct buffer_head *bh)
-+{
-+	struct fsObjectContainer *oc = (void *) bh->b_data;
-+	int errorcode;
-+	struct buffer_head *block;
-+
-+	asfs_debug("removeobjectcontainer: block %u\n", be32_to_cpu(oc->bheader.ownblock));
-+
-+	if (oc->next != 0 && oc->next != oc->bheader.ownblock) {
-+		struct fsObjectContainer *next_oc;
-+
-+		if ((block = asfs_breadcheck(sb, be32_to_cpu(oc->next), ASFS_OBJECTCONTAINER_ID)) == NULL)
-+			return -EIO;
-+
-+		next_oc = (void *) block->b_data;
-+		next_oc->previous = oc->previous;
-+
-+		asfs_bstore(sb, block);
-+		asfs_brelse(block);
-+	}
-+
-+	if (oc->previous != 0 && oc->previous != oc->bheader.ownblock) {
-+		struct fsObjectContainer *previous_oc;
-+
-+		if ((block = asfs_breadcheck(sb, be32_to_cpu(oc->previous), ASFS_OBJECTCONTAINER_ID)) == NULL)
-+			return -EIO;
-+
-+		previous_oc = (void *) block->b_data;
-+		previous_oc->next = oc->next;
-+
-+		asfs_bstore(sb, block);
-+		asfs_brelse(block);
-+	} else {
-+		struct fsObject *parent_o;
-+
-+		if ((errorcode = asfs_readobject(sb, be32_to_cpu(oc->parent), &block, &parent_o)) != 0)
-+			return (errorcode);
-+
-+		parent_o->object.dir.firstdirblock = oc->next;
-+
-+		asfs_bstore(sb, block);
-+		asfs_brelse(block);
-+	}
-+
-+	if ((errorcode = asfs_freeadminspace(sb, be32_to_cpu(oc->bheader.ownblock))) != 0)
-+		return (errorcode);
-+
-+	return (0);
-+}
-+
-+static int setrecycledinfodiff(struct super_block *sb, s32 deletedfiles, s32 deletedblocks)
-+{
-+	struct buffer_head *bh;
-+
-+	if ((bh = asfs_breadcheck(sb, ASFS_SB(sb)->rootobjectcontainer, ASFS_OBJECTCONTAINER_ID))) {
-+		struct fsRootInfo *ri = (struct fsRootInfo *) ((u8 *) bh->b_data + sb->s_blocksize - sizeof(struct fsRootInfo));
-+
-+		ri->deletedfiles = cpu_to_be32(be32_to_cpu(ri->deletedfiles) + deletedfiles);
-+		ri->deletedblocks = cpu_to_be32(be32_to_cpu(ri->deletedblocks) + deletedblocks);
-+
-+		asfs_bstore(sb, bh);
-+		asfs_brelse(bh);
-+	} else
-+		return -EIO;
-+	return 0;
-+}
-+
-+	/* This function removes the fsObject structure passed in from the passed
-+	   buffer_head.  If the ObjectContainer becomes completely empty it will be 
-+	   delinked from the ObjectContainer chain and marked free for reuse.
-+	   This function doesn't delink the object from the hashchain! */
-+
-+static int simpleremoveobject(struct super_block *sb, struct buffer_head *bh, struct fsObject *o)
-+{
-+	struct fsObjectContainer *oc = (void *) bh->b_data;
-+	int errorcode = 0;
-+
-+	asfs_debug("simpleremoveobject:\n");
-+
-+	if (be32_to_cpu(oc->parent) == ASFS_RECYCLEDNODE) {
-+		/* This object is removed from the Recycled directory. */
-+		if ((errorcode = setrecycledinfodiff(sb, -1, -((be32_to_cpu(o->object.file.size) + sb->s_blocksize - 1) >> sb->s_blocksize_bits))) != 0)
-+			return errorcode;
-+	}
-+
-+	if ((asfs_nextobject(oc->object))->name[0] == '\0')
-+		errorcode = removeobjectcontainer(sb, bh);
-+	else {
-+		struct fsObject *nexto;
-+		int objlen;
-+
-+		nexto = asfs_nextobject(o);
-+		objlen = (u8 *) nexto - (u8 *) o;
-+
-+		memmove(o, nexto, sb->s_blocksize - ((u8 *) nexto - (u8 *) oc));
-+		memset((u8 *) oc + sb->s_blocksize - objlen, 0, objlen);
-+
-+		asfs_bstore(sb, bh);
-+	}
-+	return errorcode;
-+}
-+
-+/* This function delinks the passed in ObjectNode from its hash-chain.  Handy when deleting
-+   the object, or when renaming/moving it. */
-+
-+static int dehashobjectquick(struct super_block *sb, u32 objectnode, u8 *name, u32 parentobjectnode)
-+{
-+	struct fsObject *o;
-+	int errorcode = 0;
-+	struct buffer_head *block;
-+
-+	asfs_debug("dehashobject: Delinking object %d (=ObjectNode) from hashchain. Parentnode = %d\n", objectnode, parentobjectnode);
-+
-+	if ((errorcode = asfs_readobject(sb, parentobjectnode, &block, &o)) == 0 && o->object.dir.hashtable != 0) {
-+		u32 hashtable = be32_to_cpu(o->object.dir.hashtable);
-+		asfs_brelse(block);
-+
-+		if ((block = asfs_breadcheck(sb, hashtable, ASFS_HASHTABLE_ID))) {
-+			struct buffer_head *node_bh;
-+			struct fsObjectNode *onptr, on;
-+			struct fsHashTable *ht = (void *) block->b_data;
-+			u32 nexthash;
-+
-+			if ((errorcode = asfs_getnode(sb, objectnode, &node_bh, &onptr)) == 0) {
-+				u16 hashchain;
-+
-+				asfs_debug("dehashobject: Read HashTable block of parent object of object to be delinked\n");
-+
-+				hashchain = HASHCHAIN(asfs_hash(name, ASFS_SB(sb)->flags & ASFS_ROOTBITS_CASESENSITIVE));
-+				nexthash = be32_to_cpu(ht->hashentry[hashchain]);
-+
-+				if (nexthash == objectnode) {
-+					/* The hashtable directly points to the fsObject to be delinked.  We simply
-+					   modify the Hashtable to point to the new nexthash entry. */
-+
-+					asfs_debug("dehashobject: The hashtable points directly to the to be delinked object\n");
-+
-+					ht->hashentry[hashchain] = onptr->next;
-+					asfs_bstore(sb, block);
-+				} else {
-+					struct fsObjectNode *onsearch = 0;
-+
-+					on = *onptr;
-+
-+					asfs_debug("dehashobject: Walking through hashchain\n");
-+
-+					while (nexthash != 0 && nexthash != objectnode) {
-+						asfs_brelse(node_bh);
-+						if ((errorcode = asfs_getnode(sb, nexthash, &node_bh, &onsearch)) != 0)
-+							break;
-+						nexthash = be32_to_cpu(onsearch->next);
-+					}
-+
-+					if (errorcode == 0) {
-+						if (nexthash != 0) {
-+							/* Previous fsObjectNode found in hash chain.  Modify the fsObjectNode to 'skip' the
-+							   ObjectNode which is being delinked from the hash chain. */
-+
-+							onsearch->next = on.next;
-+							asfs_bstore(sb, node_bh);
-+						} else {
-+							printk("ASFS: Hashchain of object %d is corrupt or incorrectly linked.", objectnode);
-+
-+							/*** This is strange.  We have been looking for the fsObjectNode which is located before the
-+							     passed in fsObjectNode in the hash-chain.  However, we never found the
-+							     fsObjectNode reffered to in the hash-chain!  Has to be somekind
-+							     of internal error... */
-+
-+							errorcode = -ENOENT;
-+						}
-+					}
-+				}
-+				asfs_brelse(node_bh);
-+			}
-+			asfs_brelse(block);
-+		}
-+	}
-+	return errorcode;
-+}
-+
-+
-+	/* This function removes an object from any directory.  It takes care
-+	   of delinking the object from the hashchain and also frees the
-+	   objectnode number. */
-+
-+static int removeobject(struct super_block *sb, struct buffer_head *bh, struct fsObject *o)
-+{
-+	struct fsObjectContainer *oc = (void *) bh->b_data;
-+	int errorcode;
-+
-+	asfs_debug("removeobject\n");
-+
-+	if ((errorcode = dehashobjectquick(sb, be32_to_cpu(o->objectnode), o->name, be32_to_cpu(oc->parent))) == 0) {
-+		u32 objectnode = be32_to_cpu(o->objectnode);
-+
-+		if ((errorcode = simpleremoveobject(sb, bh, o)) == 0)
-+			errorcode = asfs_deletenode(sb, objectnode);
-+	}
-+
-+	return (errorcode);
-+}
-+
-+	/* This function deletes the specified object. */
-+int asfs_deleteobject(struct super_block *sb, struct buffer_head *bh, struct fsObject *o)
-+{
-+	int errorcode = 0;
-+
-+	asfs_debug("deleteobject: Entry -- deleting object %d (%s)\n", be32_to_cpu(o->objectnode), o->name);
-+
-+	if ((o->bits & OTYPE_DIR) == 0 || o->object.dir.firstdirblock == 0) {
-+		u8 bits = o->bits;
-+		u32 hashblckno = be32_to_cpu(o->object.dir.hashtable);
-+		u32 extentbnode = be32_to_cpu(o->object.file.data);
-+
-+		if ((errorcode = removeobject(sb, bh, o)) == 0) {
-+			if ((bits & OTYPE_LINK) != 0) {
-+				asfs_debug("deleteobject: Object is soft link!\n");
-+				errorcode = asfs_freeadminspace(sb, extentbnode);
-+			} else if ((bits & OTYPE_DIR) != 0) {
-+				asfs_debug("deleteobject: Object is a directory!\n");
-+				errorcode = asfs_freeadminspace(sb, hashblckno);
-+			} else {
-+				asfs_debug("deleteobject: Object is a file\n");
-+				if (extentbnode != 0)
-+					errorcode = asfs_deleteextents(sb, extentbnode);
-+			}
-+		}
-+	}
-+
-+	return (errorcode);
-+}
-+
-+	/* This function takes a HashBlock pointer, an ObjectNode and an ObjectName.
-+	   If there is a hashblock, then this function will correctly link the object
-+	   into the hashchain.  If there isn't a hashblock (=0) then this function
-+	   does nothing.  */
-+
-+static int hashobject(struct super_block *sb, u32 hashblock, struct fsObjectNode *on, u32 nodeno, u8 *objectname)
-+{
-+	struct buffer_head *hash_bh;
-+
-+	asfs_debug("hashobject, using hashblock %d\n", hashblock);
-+	if (hashblock == 0)
-+		return 0;
-+
-+	if ((hash_bh = asfs_breadcheck(sb, hashblock, ASFS_HASHTABLE_ID))) {
-+		struct fsHashTable *ht = (void *) hash_bh->b_data;
-+		u32 nexthash;
-+		u16 hashvalue, hashchain;
-+
-+		hashvalue = asfs_hash(objectname, ASFS_SB(sb)->flags & ASFS_ROOTBITS_CASESENSITIVE);
-+		hashchain = HASHCHAIN(hashvalue);
-+		nexthash = be32_to_cpu(ht->hashentry[hashchain]);
-+
-+		ht->hashentry[hashchain] = cpu_to_be32(nodeno);
-+
-+		asfs_bstore(sb, hash_bh);
-+		asfs_brelse(hash_bh);
-+
-+		on->next = cpu_to_be32(nexthash);
-+		on->hash16 = cpu_to_be16(hashvalue);
-+	} else
-+		return -EIO;
-+
-+	return 0;
-+}
-+
-+	/* This function returns a pointer to the first unused byte in
-+	   an ObjectContainer. */
-+
-+static u8 *emptyspaceinobjectcontainer(struct super_block *sb, struct fsObjectContainer *oc)
-+{
-+	struct fsObject *o = oc->object;
-+	u8 *endadr;
-+
-+	endadr = (u8 *) oc + sb->s_blocksize - sizeof(struct fsObject) - 2;
-+
-+	while ((u8 *) o < endadr && o->name[0] != 0)
-+		o = asfs_nextobject(o);
-+
-+	return (u8 *) o;
-+}
-+
-+	/* This function will look in the directory indicated by io_o
-+	   for an ObjectContainer block which contains bytesneeded free
-+	   bytes.  If none is found then this function simply creates a
-+	   new ObjectContainer and adds that to the indicated directory. */
-+
-+static int findobjectspace(struct super_block *sb, struct buffer_head **io_bh, struct fsObject **io_o, u32 bytesneeded)
-+{
-+	struct buffer_head *bhparent = *io_bh;
-+	struct fsObject *oparent = *io_o;
-+	struct buffer_head *bh;
-+	u32 nextblock = be32_to_cpu(oparent->object.dir.firstdirblock);
-+	int errorcode = 0;
-+
-+	asfs_debug("findobjectspace: Looking for %u bytes in directory with ObjectNode number %d (in block %d)\n", bytesneeded, be32_to_cpu((*io_o)->objectnode),
-+		   be32_to_cpu(((struct fsBlockHeader *) (*io_bh)->b_data)->ownblock));
-+
-+	while (nextblock != 0 && (bh = asfs_breadcheck(sb, nextblock, ASFS_OBJECTCONTAINER_ID))) {
-+		struct fsObjectContainer *oc = (void *) bh->b_data;
-+		u8 *emptyspace;
-+
-+		/* We need to find out how much free space this ObjectContainer has */
-+
-+		emptyspace = emptyspaceinobjectcontainer(sb, oc);
-+
-+		if ((u8 *) oc + sb->s_blocksize - emptyspace >= bytesneeded) {
-+			/* We found enough space in one of the ObjectContainer blocks!!
-+			   We return a struct fsObject *. */
-+			*io_bh = bh;
-+			*io_o = (struct fsObject *) emptyspace;
-+			break;
-+		}
-+		nextblock = be32_to_cpu(oc->next);
-+		asfs_brelse(bh);
-+	}
-+
-+	if (nextblock == 0) {
-+		u32 newcontblock;
-+		/* If we get here, we traversed the *entire* directory (ough!) and found no empty
-+		   space large enough for our entry.  We allocate new space and add it to this
-+		   directory. */
-+
-+		if ((errorcode = asfs_allocadminspace(sb, &newcontblock)) == 0 && (bh = asfs_getzeroblk(sb, newcontblock))) {
-+			struct fsObjectContainer *oc = (void *) bh->b_data;
-+			struct buffer_head *bhnext;
-+
-+			asfs_debug("findobjectspace: No room was found, allocated new block at %u\n", newcontblock);
-+
-+			/* Allocated new block.  We will now link it to the START of the directory chain
-+			   so the new free space can be found quickly when more entries need to be added. */
-+
-+			oc->bheader.id = cpu_to_be32(ASFS_OBJECTCONTAINER_ID);
-+			oc->bheader.ownblock = cpu_to_be32(newcontblock);
-+			oc->parent = oparent->objectnode;
-+			oc->next = oparent->object.dir.firstdirblock;
-+			oc->previous = 0;
-+
-+			oparent->object.dir.firstdirblock = cpu_to_be32(newcontblock);
-+
-+			asfs_bstore(sb, bhparent);
-+
-+			if (oc->next != 0 && (bhnext = asfs_breadcheck(sb, be32_to_cpu(oc->next), ASFS_OBJECTCONTAINER_ID))) {
-+				struct fsObjectContainer *ocnext = (void *) bhnext->b_data;
-+				ocnext->previous = cpu_to_be32(newcontblock);
-+				asfs_bstore(sb, bhnext);
-+				asfs_brelse(bhnext);
-+			}
-+
-+			*io_bh = bh;
-+			*io_o = oc->object;
-+		}
-+	}
-+
-+	asfs_debug("findobjectspace: new object will be in container block %u\n", be32_to_cpu(((struct fsBlockHeader *) (*io_bh)->b_data)->ownblock));
-+
-+	return (errorcode);
-+}
-+
-+/* io_bh & io_o refer to the direct parent of the new object.  Objectname is the
-+	name of the new object (name only). Does not realese io_bh !!! */
-+
-+int asfs_createobject(struct super_block *sb, struct buffer_head **io_bh, struct fsObject **io_o, struct fsObject *src_o, u8 *objectname, int force)
-+{
-+	int errorcode;
-+	u32 object_size;
-+	u32 hashblock = be32_to_cpu((*io_o)->object.dir.hashtable);
-+
-+	asfs_debug("createobject: Creating object '%s' in dir '%s'.\n", objectname, (*io_o)->name);
-+
-+	if (!force && ASFS_SB(sb)->freeblocks < ASFS_ALWAYSFREE)
-+		return -ENOSPC;
-+
-+	if (!force && be32_to_cpu((*io_o)->objectnode) == ASFS_RECYCLEDNODE)
-+		return -EINVAL;
-+
-+	object_size = sizeof(struct fsObject) + strlen(objectname) + 2;
-+
-+	if ((errorcode = findobjectspace(sb, io_bh, io_o, object_size)) == 0) {
-+		struct fsObject *o2 = *io_o;
-+		u8 *name = o2->name;
-+		u8 *objname = objectname;
-+		struct buffer_head *node_bh;
-+		struct fsObjectNode *on;
-+		u32 nodeno;
-+
-+		**io_o = *src_o;	/* Copying whole object data... */
-+
-+		while (*objname != 0)	/* Copying name */
-+			*name++ = *objname++;
-+
-+		*name++ = 0;
-+		*name = 0;	/* zero byte for comment */
-+
-+		if (o2->objectnode != 0)	/* ObjectNode reuse or creation */
-+			errorcode = asfs_getnode(sb, o2->objectnode, &node_bh, &on);
-+		else {
-+			if ((errorcode = asfs_createnode(sb, &node_bh, (struct fsNode **) &on, &nodeno)) == 0) {
-+				on->hash16 = cpu_to_be16(asfs_hash(o2->name, ASFS_SB(sb)->flags & ASFS_ROOTBITS_CASESENSITIVE));
-+				o2->objectnode = cpu_to_be32(nodeno);
-+			}
-+			asfs_debug("createnode returned with errorcode: %d\n", errorcode);
-+		}
-+
-+		if (errorcode == 0) {	/* in io_bh there is a container with created object */
-+			on->node.data = ((struct fsBlockHeader *) (*io_bh)->b_data)->ownblock;
-+			if ((errorcode = hashobject(sb, hashblock, on, be32_to_cpu(o2->objectnode), objectname)) == 0) {
-+				asfs_bstore(sb, node_bh);
-+				asfs_brelse(node_bh);
-+			} else
-+				errorcode = -EIO;
-+		}
-+
-+		if (errorcode == 0) {	/* HashBlock reuse or creation:*/
-+
-+			if ((o2->bits & OTYPE_DIR) != 0 && o2->object.dir.hashtable == 0) {
-+				struct buffer_head *hashbh;
-+				u32 hashblock;
-+
-+				asfs_debug("creating Hashblock\n");
-+
-+				if ((errorcode = asfs_allocadminspace(sb, &hashblock)) == 0 && (hashbh = asfs_getzeroblk(sb, hashblock))) {	    
-+					struct fsHashTable *ht = (void *) hashbh->b_data;
-+
-+					o2->object.dir.hashtable = cpu_to_be32(hashblock);
-+
-+					ht->bheader.id = cpu_to_be32(ASFS_HASHTABLE_ID);
-+					ht->bheader.ownblock = cpu_to_be32(hashblock);
-+					ht->parent = o2->objectnode;
-+
-+					asfs_bstore(sb, hashbh);
-+					asfs_brelse(hashbh);
-+				}
-+			}
-+		}
-+
-+		if (errorcode == 0) {	/* SoftLink creation: */
-+			if ((o2->bits & (OTYPE_LINK | OTYPE_HARDLINK)) == OTYPE_LINK && o2->object.file.data == 0) {
-+				struct buffer_head *bh2;
-+				u32 slinkblock;
-+
-+				if ((errorcode = asfs_allocadminspace(sb, &slinkblock)) == 0 && (bh2 = asfs_getzeroblk(sb, slinkblock))) {
-+					struct fsSoftLink *sl = (void *) bh2->b_data;
-+					o2->object.file.data = cpu_to_be32(slinkblock);
-+					sl->bheader.id = cpu_to_be32(ASFS_SOFTLINK_ID);
-+					sl->bheader.ownblock = cpu_to_be32(slinkblock);
-+					sl->parent = o2->objectnode;
-+					sl->next = 0;
-+					sl->previous = 0;
-+					asfs_bstore(sb, bh2);
-+					asfs_brelse(bh2);
-+				}
-+			}
-+		}
-+	}
-+	asfs_debug("createobject: done.\n");
-+
-+	return (errorcode);
-+}
-+
-+	/* This function extends the file object 'o' with a number  of blocks 
-+		(hopefully, if any blocks has been found!). Only new Extents will 
-+      be created -- the size of the file will not be altered, and changing 
-+		it is left up to the caller.  If the file did not have any blocks 
-+		yet, then the o->object.file.data will be set to the first (new) 
-+		ExtentBNode. It returns the number of added blocks through 
-+		addedblocks pointer */
-+
-+int asfs_addblockstofile(struct super_block *sb, struct buffer_head *objbh, struct fsObject *o, u32 blocks, u32 * newspace, u32 * addedblocks)
-+{
-+	u32 lastextentbnode;
-+	int errorcode = 0;
-+	struct fsExtentBNode *ebnp;
-+	struct buffer_head *block = NULL;
-+
-+
-+	asfs_debug("extendblocksinfile: Trying to increasing number of blocks by %d.\n", blocks);
-+
-+	lastextentbnode = be32_to_cpu(o->object.file.data);
-+
-+	if (lastextentbnode != 0) {
-+		while (lastextentbnode != 0 && errorcode == 0) {
-+			if (block != NULL)
-+				asfs_brelse(block);
-+			errorcode = asfs_getextent(sb, lastextentbnode, &block, &ebnp);
-+			lastextentbnode = be32_to_cpu(ebnp->next);
-+		}
-+		lastextentbnode = be32_to_cpu(ebnp->key);
-+	}
-+
-+	if (errorcode == 0) {
-+		u32 searchstart;
-+
-+		u32 found_block;
-+		u32 found_blocks;
-+
-+		*addedblocks = 0;
-+		*newspace = 0;
-+
-+		if (lastextentbnode != 0)
-+			searchstart = be32_to_cpu(ebnp->key) + be16_to_cpu(ebnp->blocks);
-+		else
-+			searchstart = 0; //ASFS_SB(sb)->block_rovingblockptr;
-+
-+		if ((errorcode = asfs_findspace(sb, blocks, searchstart, searchstart, &found_block, &found_blocks)) != 0) {
-+			asfs_brelse(block);
-+			asfs_debug("extendblocksinfile: findspace returned %s\n", errorcode == -ENOSPC ? "ENOSPC" : "error");
-+			return errorcode;
-+		}
-+
-+		blocks = found_blocks;
-+		errorcode = asfs_markspace(sb, found_block, found_blocks);
-+		*addedblocks = found_blocks;
-+		*newspace = found_block;
-+
-+		asfs_debug("extendblocksinfile: block = %u, lastextentbnode = %u, extentblocks = %d\n", found_block, lastextentbnode, blocks);
-+
-+		if ((errorcode = asfs_addblocks(sb, blocks, found_block, be32_to_cpu(o->objectnode), &lastextentbnode)) != 0) {
-+			asfs_debug("extendblocksinfile: addblocks returned errorcode %d\n", errorcode);
-+			return errorcode;
-+		}
-+
-+		if (o->object.file.data == 0)
-+			o->object.file.data = cpu_to_be32(lastextentbnode);
-+	}
-+
-+	if (block)
-+		asfs_brelse(block);
-+	asfs_bstore(sb, objbh);
-+
-+	asfs_debug("addblockstofile: done. added %d blocks\n", *addedblocks);
-+
-+	return errorcode;
-+}
-+
-+	/* The Object indicated by bh1 & o1, gets renamed to newname and placed
-+	   in the directory indicated by bhparent & oparent. */
-+
-+int asfs_renameobject(struct super_block *sb, struct buffer_head *bh1, struct fsObject *o1, struct buffer_head *bhparent, struct fsObject *oparent, u8 * newname)
-+{
-+	struct fsObject object;
-+	u32 oldparentnode = be32_to_cpu(((struct fsObjectContainer *) bh1->b_data)->parent);
-+	u8 oldname[107];
-+	int errorcode;
-+
-+	asfs_debug("renameobject: Renaming '%s' to '%s' in dir '%s'\n", o1->name, newname, oparent->name);
-+
-+	object = *o1;
-+	strcpy(oldname, o1->name);
-+
-+	if ((errorcode = dehashobjectquick(sb, be32_to_cpu(o1->objectnode), o1->name, oldparentnode)) == 0) {
-+		u32 parentobjectnode = be32_to_cpu(oparent->objectnode);
-+
-+		if ((errorcode = simpleremoveobject(sb, bh1, o1)) == 0) {
-+			struct buffer_head *bh2 = bhparent;
-+			struct fsObject *o2;
-+
-+			/* oparent might changed after simpleremoveobject */
-+			oparent = o2 = find_obj_by_node(sb, (struct fsObjectContainer *) bhparent->b_data, parentobjectnode);
-+
-+			/* In goes the Parent bh & o, out comes the New object's bh & o :-) */
-+			if ((errorcode = asfs_createobject(sb, &bh2, &o2, &object, newname, TRUE)) == 0) {
-+				asfs_bstore(sb, bh2);
-+				if (be32_to_cpu(oparent->objectnode) == ASFS_RECYCLEDNODE) {
-+					asfs_debug("renameobject: Updating recycled dir info\n");
-+					if ((errorcode = setrecycledinfodiff(sb, 1, (be32_to_cpu(o2->object.file.size) + sb->s_blocksize - 1) >> sb->s_blocksize_bits)) != 0) {
-+						brelse(bh2);
-+						return errorcode;
-+					}
-+				}
-+				brelse(bh2);
-+				asfs_debug("renameobject: Succesfully created & stored new object.\n");
-+			} else { /* recreate object in old place, maybe this will not fail, but who knows... */
-+				asfs_debug("renameobject: Creating new object failed. Trying to recreate it in source directory.\n");
-+				if (asfs_readobject(sb, oldparentnode, &bh1, &o1) == 0) {
-+					struct buffer_head *bh2 = bh1;
-+					if (asfs_createobject(sb, &bh2, &o1, &object, oldname, TRUE) == 0) {
-+						asfs_bstore(sb, bh2);
-+						if (oldparentnode == ASFS_RECYCLEDNODE) {
-+							asfs_debug("renameobject: Updating recycled dir info\n");
-+							setrecycledinfodiff(sb, 1, (be32_to_cpu(o1->object.file.size) + sb->s_blocksize - 1) >> sb->s_blocksize_bits);
-+						}
-+						brelse(bh2);
-+					}
-+					brelse(bh1);
-+				}
-+			}
-+		}
-+	}
-+	return errorcode;
-+}
-+
-+		/* Truncates the specified file to /newsize/ bytes */
-+
-+int asfs_truncateblocksinfile(struct super_block *sb, struct buffer_head *bh, struct fsObject *o, u32 newsize)
-+{
-+	struct buffer_head *ebh;
-+	struct fsExtentBNode *ebn;
-+	int errorcode;
-+	u32 pos = 0;
-+	u32 newblocks = (newsize + sb->s_blocksize - 1) >> sb->s_blocksize_bits;
-+	u32 filedata = be32_to_cpu(o->object.file.data);
-+	u32 eprev, ekey;
-+	u16 eblocks;
-+
-+	asfs_debug("trucateblocksinfile: newsize %u\n", newsize);
-+
-+	if (filedata == 0)
-+		return 0;
-+
-+	for (;;) {
-+		if ((errorcode = asfs_getextent(sb, filedata, &ebh, &ebn)) != 0)
-+			return errorcode;
-+		if (pos + be16_to_cpu(ebn->blocks) >= newblocks)
-+			break;
-+		pos += be16_to_cpu(ebn->blocks);
-+		if ((filedata = be32_to_cpu(ebn->next)) == 0)
-+			break;
-+		asfs_brelse(ebh);
-+	};
-+
-+	eblocks = newblocks - pos;
-+	ekey = be32_to_cpu(ebn->key);
-+	eprev = be32_to_cpu(ebn->prev);
-+
-+	if (be16_to_cpu(ebn->blocks) < eblocks) {
-+		printk("ASFS: Extent chain is too short or damaged!\n");
-+		asfs_brelse(ebh);
-+		return -ENOENT;
-+	}
-+	if (be16_to_cpu(ebn->blocks) - eblocks > 0 && (errorcode = asfs_freespace(sb, be32_to_cpu(ebn->key) + eblocks, be16_to_cpu(ebn->blocks) - eblocks)) != 0) {
-+		asfs_brelse(ebh);
-+		return errorcode;
-+	}
-+	if (be32_to_cpu(ebn->next) > 0 && (errorcode = asfs_deleteextents(sb, be32_to_cpu(ebn->next))) != 0) {
-+		asfs_brelse(ebh);
-+		return errorcode;
-+	}
-+	ebn->blocks = cpu_to_be16(eblocks);
-+	ebn->next = 0;
-+	asfs_bstore(sb, ebh);
-+
-+	if (eblocks == 0) {
-+		if (eprev & MSB_MASK) {
-+			o->object.file.data = 0;
-+			asfs_bstore(sb, bh);
-+		} else {
-+			struct buffer_head *ebhp;
-+			struct fsExtentBNode *ebnp;
-+
-+			if ((errorcode = asfs_getextent(sb, eprev & !MSB_MASK, &ebhp, &ebnp)) != 0) {
-+				asfs_brelse(ebh);
-+				return errorcode;
-+			}
-+
-+			ebnp->next = 0;
-+			asfs_bstore(sb, ebhp);
-+			asfs_brelse(ebhp);
-+		}
-+		if ((errorcode = asfs_deletebnode(sb, ebh, ekey)) != 0) {
-+			asfs_brelse(ebh);
-+			return errorcode;
-+		}
-+	}
-+	asfs_brelse(ebh);
-+
-+	return 0;
-+}
-+#endif
-diff -aurN a/fs/asfs/super.c b/fs/asfs/super.c
---- a/fs/asfs/super.c	1969-12-31 19:00:00.000000000 -0500
-+++ b/fs/asfs/super.c	2005-06-15 22:05:09.000000000 -0400
-@@ -0,0 +1,488 @@
-+/*
-+ *
-+ * Amiga Smart File System, Linux implementation
-+ *
-+ * version: 1.0beta9 for 2.6.xx kernel
-+ *  
-+ * Copyright (C) 2003,2004,2005  Marek 'March' Szyprowski <marek at amiga.pl>
-+ *
-+ * NLS support by Pavel Fedin (C) 2005
-+ *
-+ *
-+ * Thanks to Marcin Kurek (Morgoth/Dreamolers-CAPS) for help and parts 
-+ * of original amiga version of SmartFilesystem source code. 
-+ *
-+ * SmartFilesystem is copyrighted (C) 2003 by: John Hendrikx, 
-+ * Ralph Schmidt, Emmanuel Lesueur, David Gerber and Marcin Kurek
-+ * 
-+ *
-+ * ASFS is based on the Amiga FFS filesystem for Linux
-+ * Copyright (C) 1993  Ray Burr
-+ * Copyright (C) 1996  Hans-Joachim Widmaier
-+ *
-+ * Earlier versions were based on the Linux implementation of 
-+ * the ROMFS file system
-+ * Copyright (C) 1997-1999  Janos Farkas <chexum at shadow.banki.hu>
-+ *
-+ * ASFS used some parts of the smbfs filesystem:
-+ * Copyright (C) 1995, 1996 by Paal-Kr. Engstad and Volker Lendecke
-+ * Copyright (C) 1997 by Volker Lendecke
-+ *
-+ * and parts of the Minix filesystem additionally
-+ * Copyright (C) 1991, 1992  Linus Torvalds
-+ * Copyright (C) 1996  Gertjan van Wingerde 
-+ *
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License
-+ * as published by the Free Software Foundation; either version
-+ * 2 of the License, or (at your option) any later version.
-+ *
-+ */
-+
-+/* todo:
-+ * - remove bugs
-+ * - add missing features (maybe safe-delete, other...)
-+ * - create other fs tools like mkfs.asfs and fsck.asfs, some data-recovery tools
-+ */
-+
-+#define ASFS_VERSION "1.0beta9 (17.03.2005)"
-+
-+#include <linux/module.h>
-+#include <linux/types.h>
-+#include <linux/errno.h>
-+#include <linux/slab.h>
-+#include <linux/fs.h>
-+#include <linux/init.h>
-+#include <linux/smp_lock.h>
-+#include <linux/buffer_head.h>
-+#include <linux/vfs.h>
-+#include <linux/parser.h>
-+#include <linux/nls.h>
-+#include "asfs_fs.h"
-+
-+#include <asm/byteorder.h>
-+#include <asm/uaccess.h>
-+
-+static char asfs_default_codepage[] = CONFIG_ASFS_DEFAULT_CODEPAGE;
-+static char asfs_default_iocharset[] = CONFIG_NLS_DEFAULT;
-+
-+u32 asfs_calcchecksum(void *block, u32 blocksize)
-+{
-+	u32 *data = block, checksum = 1;
-+	while (blocksize > 0) {
-+		checksum += be32_to_cpu(*data++);
-+		blocksize -= 4;
-+	}
-+	checksum -= be32_to_cpu(((struct fsBlockHeader *)block)->checksum);
-+	return -checksum;
-+}
-+
-+static struct super_operations asfs_ops = {
-+	.alloc_inode	= asfs_alloc_inode,
-+	.destroy_inode	= asfs_destroy_inode,
-+	.put_super		= asfs_put_super,
-+	.statfs			= asfs_statfs,
-+#ifdef CONFIG_ASFS_RW
-+	.remount_fs		= asfs_remount,
-+#endif
-+};
-+
-+extern struct dentry_operations asfs_dentry_operations;
-+
-+enum {
-+	Opt_mode, Opt_setgid, Opt_setuid, Opt_prefix, Opt_volume, 
-+	Opt_lcvol, Opt_iocharset, Opt_codepage, Opt_ignore, Opt_err
-+};
-+
-+static match_table_t tokens = {
-+	{Opt_mode, "mode=%o"},
-+	{Opt_setgid, "setgid=%u"},
-+	{Opt_setuid, "setuid=%u"},
-+	{Opt_prefix, "prefix=%s"},
-+	{Opt_volume, "volume=%s"},
-+	{Opt_lcvol, "lowercasevol"},
-+	{Opt_iocharset, "iocharset=%s"},
-+	{Opt_codepage, "codepage=%s"},
-+	{Opt_ignore, "grpquota"},
-+	{Opt_ignore, "noquota"},
-+	{Opt_ignore, "quota"},
-+	{Opt_ignore, "usrquota"},
-+	{Opt_err, NULL},
-+};
-+
-+static int asfs_parse_options(char *options, struct super_block *sb)
-+{
-+	char *p;
-+	substring_t args[MAX_OPT_ARGS];
-+
-+	if (!options)
-+		return 1;
-+	while ((p = strsep(&options, ",")) != NULL) {
-+		int token, option;
-+		if (!*p)
-+			continue;
-+		token = match_token(p, tokens, args);
-+
-+		switch (token) {
-+		case Opt_mode:
-+			if (match_octal(&args[0], &option))
-+				goto no_arg;
-+			ASFS_SB(sb)->mode = option & 0777;
-+			break;
-+		case Opt_setgid:
-+			if (match_int(&args[0], &option))
-+				goto no_arg;
-+			ASFS_SB(sb)->gid = option;
-+			break;
-+		case Opt_setuid:
-+			if (match_int(&args[0], &option))
-+				goto no_arg;
-+			ASFS_SB(sb)->uid = option;
-+			break;
-+		case Opt_prefix:
-+			if (ASFS_SB(sb)->prefix) {
-+				kfree(ASFS_SB(sb)->prefix);
-+				ASFS_SB(sb)->prefix = NULL;
-+			}
-+			ASFS_SB(sb)->prefix = match_strdup(&args[0]);
-+			if (! ASFS_SB(sb)->prefix)
-+				return 0;
-+			break;
-+		case Opt_volume:
-+			if (ASFS_SB(sb)->root_volume) {
-+				kfree(ASFS_SB(sb)->root_volume);
-+				ASFS_SB(sb)->root_volume = NULL;
-+			}
-+			ASFS_SB(sb)->root_volume = match_strdup(&args[0]);
-+			if (! ASFS_SB(sb)->root_volume)
-+				return 0;
-+			break;
-+		case Opt_lcvol:
-+			ASFS_SB(sb)->flags |= ASFS_VOL_LOWERCASE;
-+			break;
-+		case Opt_iocharset:
-+			if (ASFS_SB(sb)->iocharset != asfs_default_iocharset)
-+				kfree(ASFS_SB(sb)->iocharset);
-+			ASFS_SB(sb)->iocharset = match_strdup(&args[0]);
-+			if (!ASFS_SB(sb)->iocharset)
-+				return 0;
-+			break;
-+		case Opt_codepage:
-+			if (ASFS_SB(sb)->codepage != asfs_default_codepage)
-+				kfree(ASFS_SB(sb)->codepage);
-+			ASFS_SB(sb)->codepage = match_strdup(&args[0]);
-+			if (!ASFS_SB(sb)->codepage)
-+				return 0;
-+		case Opt_ignore:
-+		 	/* Silently ignore the quota options */
-+			break;
-+		default:
-+no_arg:
-+			printk("ASFS: Unrecognized mount option \"%s\" "
-+					"or missing value\n", p);
-+			return 0;
-+		}
-+	}
-+	return 1;
-+}
-+
-+static int asfs_fill_super(struct super_block *sb, void *data, int silent)
-+{
-+	struct asfs_sb_info *sbi;
-+	struct buffer_head *bh;
-+	struct fsRootBlock *rootblock;
-+	struct inode *rootinode;
-+
-+	sbi = kmalloc(sizeof(struct asfs_sb_info), GFP_KERNEL);
-+	if (!sbi)
-+		return -ENOMEM;
-+	sb->s_fs_info = sbi;
-+
-+	/* Fill in defaults */
-+	ASFS_SB(sb)->uid = ASFS_DEFAULT_UID;
-+	ASFS_SB(sb)->gid = ASFS_DEFAULT_GID;
-+	ASFS_SB(sb)->mode = ASFS_DEFAULT_MODE;
-+	ASFS_SB(sb)->prefix = NULL;
-+	ASFS_SB(sb)->root_volume = NULL;
-+	ASFS_SB(sb)->flags = 0;
-+	ASFS_SB(sb)->iocharset = asfs_default_iocharset;
-+	ASFS_SB(sb)->codepage = asfs_default_codepage;
-+
-+	if (!asfs_parse_options(data, sb)) {
-+		printk(KERN_ERR "ASFS: Error parsing options\n");
-+		return -EINVAL;
-+	}
-+
-+	if (!sb_set_blocksize(sb, 512))
-+		return -EINVAL;
-+	sb->s_maxbytes = ASFS_MAXFILESIZE;
-+
-+	bh = sb_bread(sb, 0);
-+	if (!bh) {
-+		printk(KERN_ERR "ASFS: unable to read superblock\n");
-+		return -EINVAL;
-+	}
-+
-+	rootblock = (struct fsRootBlock *)bh->b_data;
-+
-+	if (be32_to_cpu(rootblock->bheader.id) == ASFS_ROOTID && 
-+		be16_to_cpu(rootblock->version) == ASFS_STRUCTURE_VERISON) {
-+
-+		sb->s_blocksize = be32_to_cpu(rootblock->blocksize);
-+		ASFS_SB(sb)->totalblocks = be32_to_cpu(rootblock->totalblocks);
-+		ASFS_SB(sb)->rootobjectcontainer = be32_to_cpu(rootblock->rootobjectcontainer);
-+		ASFS_SB(sb)->extentbnoderoot = be32_to_cpu(rootblock->extentbnoderoot);
-+		ASFS_SB(sb)->objectnoderoot = be32_to_cpu(rootblock->objectnoderoot);
-+		ASFS_SB(sb)->flags |= 0xff & rootblock->bits;
-+		ASFS_SB(sb)->adminspacecontainer = be32_to_cpu(rootblock->adminspacecontainer);
-+		ASFS_SB(sb)->bitmapbase = be32_to_cpu(rootblock->bitmapbase);
-+		ASFS_SB(sb)->blocks_inbitmap = (sb->s_blocksize - sizeof(struct fsBitmap))<<3;  /* must be a multiple of 32 !! */
-+		ASFS_SB(sb)->blocks_bitmap = (ASFS_SB(sb)->totalblocks + ASFS_SB(sb)->blocks_inbitmap - 1) / ASFS_SB(sb)->blocks_inbitmap;
-+		ASFS_SB(sb)->block_rovingblockptr = 0;
-+		asfs_brelse(bh);
-+
-+		if (!sb_set_blocksize(sb, sb->s_blocksize)) {
-+			printk(KERN_ERR "ASFS: Found Amiga SFS RootBlock on dev %s, but blocksize %ld is not supported!\n", \
-+			       sb->s_id, sb->s_blocksize);
-+			return -EINVAL;
-+		}
-+
-+		bh = sb_bread(sb, 0);
-+		if (!bh) {
-+			printk(KERN_ERR "ASFS: unable to read superblock\n");
-+			goto out;
-+		}
-+		rootblock = (struct fsRootBlock *)bh->b_data;
-+
-+		if (asfs_check_block((void *)rootblock, sb->s_blocksize, 0, ASFS_ROOTID)) {
-+#ifdef CONFIG_ASFS_RW
-+			struct buffer_head *tmpbh;
-+			if ((tmpbh = asfs_breadcheck(sb, ASFS_SB(sb)->rootobjectcontainer, ASFS_OBJECTCONTAINER_ID))) {
-+				struct fsRootInfo *ri = (struct fsRootInfo *)((u8 *)tmpbh->b_data + sb->s_blocksize - sizeof(struct fsRootInfo));
-+				ASFS_SB(sb)->freeblocks = be32_to_cpu(ri->freeblocks);
-+				asfs_brelse(tmpbh);
-+			} else
-+				ASFS_SB(sb)->freeblocks = 0;
-+
-+			if ((tmpbh = asfs_breadcheck(sb, ASFS_SB(sb)->rootobjectcontainer+2, ASFS_TRANSACTIONFAILURE_ID))) {
-+				printk(KERN_NOTICE "VFS: Found Amiga SFS RootBlock on dev %s, but it has unfinished transaction. Mounting read-only.\n", sb->s_id);
-+				ASFS_SB(sb)->flags |= ASFS_READONLY;
-+				asfs_brelse(tmpbh);
-+			}
-+
-+			if ((tmpbh = asfs_breadcheck(sb, ASFS_SB(sb)->totalblocks-1, ASFS_ROOTID)) == NULL) {
-+				printk(KERN_NOTICE "VFS: Found Amiga SFS RootBlock on dev %s, but there is no second RootBlock! Mounting read-only.\n", sb->s_id);
-+				ASFS_SB(sb)->flags |= ASFS_READONLY;
-+				asfs_brelse(tmpbh);
-+			}
-+			if (!(ASFS_SB(sb)->flags & ASFS_READONLY))
-+				printk(KERN_NOTICE "VFS: Found Amiga SFS RootBlock on dev %s.\n", sb->s_id);
-+#else
-+			ASFS_SB(sb)->freeblocks = 0;
-+			ASFS_SB(sb)->flags |= ASFS_READONLY;
-+			printk(KERN_NOTICE "VFS: Found Amiga SFS RootBlock on dev %s.\n", sb->s_id);
-+#endif
-+		} else {
-+			if (!silent)
-+				printk(KERN_ERR "VFS: Found Amiga SFS RootBlock on dev %s, but it has checksum error!\n", \
-+				       sb->s_id);
-+			goto out;
-+		}
-+	} else {
-+		if (!silent)
-+			printk(KERN_ERR "VFS: Can't find a valid Amiga SFS filesystem on dev %s.\n", \
-+			       sb->s_id);
-+		goto out;
-+	}
-+
-+	asfs_brelse(bh);
-+
-+	sb->s_magic = ASFS_MAGIC;
-+	sb->s_flags |= MS_NODEV | MS_NOSUID;
-+	if (ASFS_SB(sb)->flags & ASFS_READONLY) 
-+		sb->s_flags |= MS_RDONLY;
-+	sb->s_op = &asfs_ops;
-+	asfs_debug("Case sensitive: %s\n", (ASFS_SB(sb)->flags & ASFS_ROOTBITS_CASESENSITIVE) ? "yes" : "no");
-+
-+	if (ASFS_SB(sb)->codepage[0] != '\0' && strcmp(ASFS_SB(sb)->codepage, "none") != 0) {
-+		ASFS_SB(sb)->nls_disk = load_nls(ASFS_SB(sb)->codepage);
-+		if (!ASFS_SB(sb)->nls_disk) {
-+			printk(KERN_ERR "ASFS: codepage %s not found\n", ASFS_SB(sb)->codepage);
-+			return -EINVAL;
-+		}
-+		ASFS_SB(sb)->nls_io = load_nls(ASFS_SB(sb)->iocharset);
-+		if (!ASFS_SB(sb)->nls_io) {
-+			printk(KERN_ERR "ASFS: IO charset %s not found\n", ASFS_SB(sb)->iocharset);
-+			goto out2;
-+		}
-+	} else {
-+		ASFS_SB(sb)->nls_io = NULL;
-+		ASFS_SB(sb)->nls_disk = NULL;
-+	}
-+
-+	if ((rootinode = asfs_get_root_inode(sb))) {
-+		if ((sb->s_root = d_alloc_root(rootinode))) {
-+			sb->s_root->d_op = &asfs_dentry_operations;
-+			return 0;
-+		}
-+		iput(rootinode);
-+	}
-+	unload_nls(ASFS_SB(sb)->nls_io);
-+out2:
-+	unload_nls(ASFS_SB(sb)->nls_disk);
-+	return -EINVAL;
-+
-+out:
-+	asfs_brelse(bh);
-+	return -EINVAL;
-+
-+}
-+
-+#ifdef CONFIG_ASFS_RW
-+int asfs_remount(struct super_block *sb, int *flags, char *data)
-+{
-+	asfs_debug("ASFS: remount (flags=0x%x, opts=\"%s\")\n",*flags,data);
-+
-+	if (!asfs_parse_options(data,sb))
-+		return -EINVAL;
-+
-+	if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY))
-+		return 0;
-+
-+	if (*flags & MS_RDONLY) {
-+		sb->s_flags |= MS_RDONLY;
-+	} else if (!(ASFS_SB(sb)->flags & ASFS_READONLY)) {
-+		sb->s_flags &= ~MS_RDONLY;
-+	} else {
-+		printk("VFS: Can't remount Amiga SFS on dev %s read/write because of errors.", sb->s_id);
-+		return -EINVAL;
-+	}
-+	return 0;
-+}
-+#endif
-+
-+void asfs_put_super(struct super_block *sb)
-+{
-+	struct asfs_sb_info *sbi = ASFS_SB(sb);
-+
-+	if (ASFS_SB(sb)->prefix)
-+		kfree(ASFS_SB(sb)->prefix);
-+	if (ASFS_SB(sb)->root_volume)
-+		kfree(ASFS_SB(sb)->root_volume);
-+	if (ASFS_SB(sb)->nls_disk)
-+		unload_nls(ASFS_SB(sb)->nls_disk);
-+	if (ASFS_SB(sb)->nls_io)
-+		unload_nls(ASFS_SB(sb)->nls_io);
-+	if (ASFS_SB(sb)->iocharset != asfs_default_iocharset)
-+		kfree(ASFS_SB(sb)->iocharset);
-+	if (ASFS_SB(sb)->codepage != asfs_default_codepage)
-+		kfree(ASFS_SB(sb)->codepage);
-+
-+	kfree(sbi);
-+	sb->s_fs_info = NULL;
-+	return;
-+}
-+
-+/* That's simple too. */
-+int asfs_statfs(struct super_block *sb, struct kstatfs *buf)
-+{
-+	buf->f_type = ASFS_MAGIC;
-+	buf->f_bsize = sb->s_blocksize;
-+	buf->f_bfree = buf->f_bavail = ASFS_SB(sb)->freeblocks;
-+	buf->f_blocks = ASFS_SB(sb)->totalblocks;
-+	buf->f_namelen = ASFS_MAXFN;
-+	return 0;
-+}
-+
-+/* --- new in 2.6.x --- */
-+static kmem_cache_t * asfs_inode_cachep;
-+
-+struct inode *asfs_alloc_inode(struct super_block *sb)
-+{
-+	struct asfs_inode_info *ei;
-+	ei = (struct asfs_inode_info *)kmem_cache_alloc(asfs_inode_cachep, SLAB_KERNEL);
-+	if (!ei)
-+		return NULL;
-+	return &ei->vfs_inode;
-+}
-+
-+void asfs_destroy_inode(struct inode *inode)
-+{
-+	kmem_cache_free(asfs_inode_cachep, ASFS_I(inode));
-+}
-+
-+static void init_once(void * foo, kmem_cache_t * cachep, unsigned long flags)
-+{
-+	struct asfs_inode_info *ei = (struct asfs_inode_info *) foo;
-+
-+	if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) ==
-+	    SLAB_CTOR_CONSTRUCTOR) {
-+		inode_init_once(&ei->vfs_inode);
-+	}
-+}
-+
-+static int init_inodecache(void)
-+{
-+	asfs_inode_cachep = kmem_cache_create("asfs_inode_cache",
-+					     sizeof(struct asfs_inode_info),
-+					     0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT,
-+					     init_once, NULL);
-+	if (asfs_inode_cachep == NULL)
-+		return -ENOMEM;
-+	return 0;
-+}
-+
-+static void destroy_inodecache(void)
-+{
-+	if (kmem_cache_destroy(asfs_inode_cachep))
-+		printk(KERN_INFO "asfs_inode_cache: not all structures were freed\n");
-+}
-+
-+static struct super_block *asfs_get_sb(struct file_system_type *fs_type,
-+	int flags, const char *dev_name, void *data)
-+{
-+	return get_sb_bdev(fs_type, flags, dev_name, data, asfs_fill_super);
-+}
-+
-+static struct file_system_type asfs_fs_type = {
-+	.owner		= THIS_MODULE,
-+	.name		= "asfs",
-+	.get_sb		= asfs_get_sb,
-+	.kill_sb	= kill_block_super,
-+	.fs_flags	= FS_REQUIRES_DEV,
-+};
-+
-+static int __init init_asfs_fs(void)
-+{
-+	int err = init_inodecache();
-+	if (err)
-+		goto out1;
-+	err = register_filesystem(&asfs_fs_type);
-+	if (err)
-+		goto out;
-+	return 0;
-+out:
-+	destroy_inodecache();
-+out1:
-+	return err;
-+}
-+
-+static void __exit exit_asfs_fs(void)
-+{
-+	unregister_filesystem(&asfs_fs_type);
-+	destroy_inodecache();
-+}
-+
-+/* Yes, works even as a module... :) */
-+
-+#ifdef CONFIG_ASFS_RW
-+MODULE_DESCRIPTION("Amiga Smart File System (read/write) support for Linux kernel 2.6.x v" ASFS_VERSION);
-+#else
-+MODULE_DESCRIPTION("Amiga Smart File System (read-only) support for Linux kernel 2.6.x v" ASFS_VERSION);
-+#endif
-+MODULE_LICENSE("GPL");
-+MODULE_AUTHOR("Marek Szyprowski <marek at amiga.pl>");
-+
-+module_init(init_asfs_fs)
-+module_exit(exit_asfs_fs)
-diff -aurN a/fs/asfs/symlink.c b/fs/asfs/symlink.c
---- a/fs/asfs/symlink.c	1969-12-31 19:00:00.000000000 -0500
-+++ b/fs/asfs/symlink.c	2005-06-15 22:05:09.000000000 -0400
-@@ -0,0 +1,235 @@
-+/*
-+ *
-+ * Amiga Smart File System, Linux implementation
-+ * version: 1.0beta9
-+ *  
-+ * Copyright (C) 2003,2004,2005  Marek 'March' Szyprowski <marek at amiga.pl>
-+ *
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License
-+ * as published by the Free Software Foundation; either version
-+ * 2 of the License, or (at your option) any later version.
-+ *
-+ */
-+
-+#include <linux/types.h>
-+#include <linux/errno.h>
-+#include <linux/slab.h>
-+#include <linux/fs.h>
-+#include <linux/buffer_head.h>
-+#include <linux/vfs.h>
-+#include <linux/pagemap.h>
-+#include <linux/nls.h>
-+#include "asfs_fs.h"
-+
-+#include <asm/byteorder.h>
-+#include <asm/uaccess.h>
-+
-+int asfs_symlink_readpage(struct file *file, struct page *page)
-+{
-+	struct buffer_head *bh;
-+	struct fsSoftLink *slinkcont;
-+	struct inode *inode = page->mapping->host;
-+	struct super_block *sb = inode->i_sb;
-+	struct nls_table *nls_io = ASFS_SB(sb)->nls_io;
-+	struct nls_table *nls_disk = ASFS_SB(sb)->nls_disk;
-+	char *link = kmap(page);
-+	int i = 0, j = 0;
-+	char c, lc = 0, *prefix, *lf, *p;
-+	wchar_t uni;
-+	int clen;
-+
-+	if (!(bh = asfs_breadcheck(sb, ASFS_I(inode)->firstblock, ASFS_SOFTLINK_ID))) {
-+		SetPageError(page);
-+		kunmap(page);
-+		unlock_page(page);
-+		return -EIO;
-+	}
-+	slinkcont = (struct fsSoftLink *) bh->b_data;
-+
-+	lf = slinkcont->string;
-+	prefix = ASFS_SB(sb)->prefix ? ASFS_SB(sb)->prefix : "/";
-+
-+	if ((p = strchr(lf,':'))) {	/* Handle assign or volume name */
-+		if (ASFS_SB(sb)->root_volume &&
-+		    strncmp(lf, ASFS_SB(sb)->root_volume, strlen(ASFS_SB(sb)->root_volume)) == 0) {
-+			/* global root volume name found */
-+			link[i++] = '/';
-+			lf = p+1;
-+		} else {
-+			/* adding volume prefix */ 
-+			while (i < 1023 && (c = prefix[i]))
-+				link[i++] = c;
-+			while (i < 1023 && lf[j] != ':')
-+			{
-+				c = lf[j++];
-+				if (ASFS_SB(sb)->flags & ASFS_VOL_LOWERCASE)
-+					c = asfs_lowerchar(c);
-+				if (nls_io)
-+				{
-+					clen = nls_disk->char2uni(&c, 1, &uni);
-+					if (clen>0) {
-+						clen = nls_io->uni2char(uni, &link[i], NLS_MAX_CHARSET_SIZE);
-+						if (clen>0)
-+							i += clen;
-+					}
-+					if (clen<0)
-+						link[i++] = '?';
-+				} else
-+					link[i++] = c;
-+			}
-+			if (i < 1023)
-+				link[i++] = '/';
-+			j++;
-+		}
-+		lc = '/';
-+	}
-+
-+	while (i < 1023 && (c = lf[j])) {
-+		if (c == '/' && lc == '/' && i < 1020) {	/* parent dir */
-+			link[i++] = '.';
-+			link[i++] = '.';
-+		}
-+		lc = c;
-+		if (nls_io)
-+		{
-+			clen = nls_disk->char2uni(&c, 1, &uni);
-+			if (clen>0) {
-+				clen = nls_io->uni2char(uni, &link[i], NLS_MAX_CHARSET_SIZE);
-+				if (clen>0)
-+					i += clen;
-+			}
-+			if (clen<0)
-+				link[i++] = '?';
-+		} else
-+			link[i++] = c;
-+		j++;
-+	}
-+	link[i] = '\0';
-+	SetPageUptodate(page);
-+	kunmap(page);
-+	unlock_page(page);
-+	asfs_brelse(bh);
-+	return 0;
-+}
-+
-+#ifdef CONFIG_ASFS_RW
-+
-+int asfs_write_symlink(struct inode *symfile, const char *symname)
-+{
-+	struct super_block *sb = symfile->i_sb;
-+	struct buffer_head *bh;
-+	struct fsSoftLink *slinkcont;
-+	struct nls_table *nls_io = ASFS_SB(sb)->nls_io;
-+	struct nls_table *nls_disk = ASFS_SB(sb)->nls_disk;
-+	char *p, c, lc;
-+	int i, maxlen, pflen;
-+	wchar_t uni;
-+	int clen, blen;
-+
-+	asfs_debug("asfs_write_symlink %s to node %d\n", symname, (int)symfile->i_ino);
-+
-+	if (!(bh = asfs_breadcheck(sb, ASFS_I(symfile)->firstblock, ASFS_SOFTLINK_ID))) {
-+		unlock_super(sb);
-+		return -EIO;
-+	}
-+	slinkcont = (struct fsSoftLink *) bh->b_data;
-+
-+	/* translating symlink target path */
-+
-+	maxlen = sb->s_blocksize - sizeof(struct fsSoftLink) - 2;
-+	i  = 0;
-+	p  = slinkcont->string;
-+	lc = '/';
-+
-+	if (*symname == '/') {
-+		while (*symname == '/')
-+			symname++;
-+		if (ASFS_SB(sb)->prefix &&
-+		    strncmp(symname-1, ASFS_SB(sb)->prefix, (pflen = strlen(ASFS_SB(sb)->prefix))) == 0) {
-+			/* found volume prefix, ommiting it */
-+			symname += pflen;
-+			blen = strlen(symname);
-+			while (*symname != '/' && *symname != '\0') {
-+				clen = nls_io->char2uni(symname, blen, &uni);
-+				if (clen>0) {
-+					symname += clen;
-+					blen -= clen;
-+					clen = nls_disk->uni2char(uni, p, NLS_MAX_CHARSET_SIZE);
-+					if (clen>0)
-+						p += clen;
-+				}
-+				else
-+				{
-+					symname++;
-+					blen--;
-+				}
-+				if (clen<0)
-+					*p++ = '?';
-+				i++;
-+			}
-+			symname++;
-+			*p++ = ':';
-+		} else if (ASFS_SB(sb)->root_volume) {	/* adding root volume name */
-+			while (ASFS_SB(sb)->root_volume[i])
-+				*p++ = ASFS_SB(sb)->root_volume[i++];
-+			*p++ = ':';
-+		} else {	/* do nothing */
-+			*p++ = '/';
-+		}
-+		i++;
-+	}
-+
-+	blen = strlen(symname);
-+	while (i < maxlen && (c = *symname)) {
-+		if (c == '.' && lc == '/' && symname[1] == '.' && symname[2] == '/') {
-+			*p++ = '/';
-+			i++;
-+			symname += 3;
-+			blen -= 3;
-+			lc = '/';
-+		} else if (c == '.' && lc == '/' && symname[1] == '/') {
-+			symname += 2;
-+			blen -= 2;
-+			lc = '/';
-+		} else {
-+			clen = nls_io->char2uni(symname, blen, &uni);
-+			if (clen>0) {
-+				symname += clen;
-+				blen -= clen;
-+				clen = nls_disk->uni2char(uni, p, NLS_MAX_CHARSET_SIZE);
-+				if (clen>0)
-+					lc = *p;
-+					p += clen;
-+			}
-+			else
-+			{
-+				symname++;
-+				blen--;
-+			}
-+			if (clen<0)
-+			{
-+				*p++ = '?';
-+				lc = '?';
-+			}
-+			i++;
-+		}
-+		if (lc == '/')
-+			while (*symname == '/')
-+			{
-+				symname++;
-+				blen--;
-+			}
-+	}
-+	*p = 0;
-+
-+	asfs_bstore(sb, bh);
-+	asfs_brelse(bh);
-+
-+	unlock_super(sb);
-+	
-+	return 0;
-+}
-+
-+#endif
-diff -aurN a/include/linux/amigasfs.h b/include/linux/amigasfs.h
---- a/include/linux/amigasfs.h	1969-12-31 19:00:00.000000000 -0500
-+++ b/include/linux/amigasfs.h	2005-06-15 22:05:09.000000000 -0400
-@@ -0,0 +1,276 @@
-+#ifndef __LINUX_AMIGASFS_H
-+#define __LINUX_AMIGASFS_H
-+
-+#include <linux/types.h>
-+
-+/* some helper macros... */
-+#define ASFS_MAKE_ID(a,b,c,d) (((a)&0xff)<<24|((b)&0xff)<<16|((c)&0xff)<<8|((d)&0xff))
-+
-+/* Amiga SFS block IDs */
-+#define ASFS_ROOTID                 ASFS_MAKE_ID('S','F','S','\0')
-+#define ASFS_OBJECTCONTAINER_ID     ASFS_MAKE_ID('O','B','J','C')
-+#define ASFS_BNODECONTAINER_ID      ASFS_MAKE_ID('B','N','D','C')
-+#define ASFS_NODECONTAINER_ID       ASFS_MAKE_ID('N','D','C',' ')
-+#define ASFS_HASHTABLE_ID           ASFS_MAKE_ID('H','T','A','B')
-+#define ASFS_SOFTLINK_ID            ASFS_MAKE_ID('S','L','N','K')
-+#define ASFS_ADMINSPACECONTAINER_ID ASFS_MAKE_ID('A','D','M','C')
-+#define ASFS_BITMAP_ID              ASFS_MAKE_ID('B','T','M','P')
-+#define ASFS_TRANSACTIONFAILURE_ID  ASFS_MAKE_ID('T','R','F','A')
-+
-+/* Amiga SFS defines and magic values */
-+
-+#define ASFS_MAGIC 0xa0ff
-+#define ASFS_MAXFN (105u)
-+#define ASFS_MAXFILESIZE 0x8FFFFFFE
-+
-+#define ASFS_STRUCTURE_VERISON (3)
-+#define ASFS_BLCKFACCURACY	(5)
-+
-+#define ASFS_ROOTBITS_CASESENSITIVE (128)
-+#define ASFS_READONLY (512)
-+#define ASFS_VOL_LOWERCASE (1024)
-+
-+#define ASFS_ROOTNODE   (1)
-+#define ASFS_RECYCLEDNODE (2)
-+
-+#define OTYPE_HIDDEN      (1)
-+#define OTYPE_HARDLINK    (32)
-+#define OTYPE_LINK        (64)
-+#define OTYPE_DIR         (128)
-+
-+#define MSB_MASK (1ul << 31)
-+
-+#define NODE_STRUCT_SIZE (10)	/* (sizeof(struct fsObjectNode)) */
-+#define NODECONT_BLOCK_COUNT ((sb->s_blocksize - sizeof(struct fsNodeContainer)) / sizeof(u32))
-+
-+#define ASFS_ALWAYSFREE (16)		/* keep this amount of blocks free */
-+
-+#define ASFS_BLOCKCHUNKS (16)		/* try to allocate this number of blocks in one request */
-+
-+#ifndef TRUE
-+#define TRUE		1
-+#endif
-+#ifndef FALSE
-+#define FALSE		0
-+#endif
-+
-+/* amigados protection bits */
-+
-+#define FIBB_SCRIPT    6	/* program is a script (execute) file */
-+#define FIBB_PURE      5	/* program is reentrant and rexecutable */
-+#define FIBB_ARCHIVE   4	/* cleared whenever file is changed */
-+#define FIBB_READ      3	/* ignored by old filesystem */
-+#define FIBB_WRITE     2	/* ignored by old filesystem */
-+#define FIBB_EXECUTE   1	/* ignored by system, used by Shell */
-+#define FIBB_DELETE    0	/* prevent file from being deleted */
-+
-+#define FIBF_SCRIPT    (1<<FIBB_SCRIPT)
-+#define FIBF_PURE      (1<<FIBB_PURE)
-+#define FIBF_ARCHIVE   (1<<FIBB_ARCHIVE)
-+#define FIBF_READ      (1<<FIBB_READ)
-+#define FIBF_WRITE     (1<<FIBB_WRITE)
-+#define FIBF_EXECUTE   (1<<FIBB_EXECUTE)
-+#define FIBF_DELETE    (1<<FIBB_DELETE)
-+
-+/* name hashing macro */
-+
-+#define HASHCHAIN(x) (u16)(x % (u16)(((sb->s_blocksize) - sizeof(struct fsHashTable))>>2))
-+
-+/* Each block has its own header with checksum and id, its called fsBlockHeader */
-+
-+struct fsBlockHeader {
-+	u32 id;			/* 4 character id string of this block */
-+	u32 checksum;		/* The checksum */
-+	u32 ownblock;		/* The blocknumber of the block this block is stored at */
-+};
-+
-+/* On-disk "super block", called fsRootBlock */
-+
-+struct fsRootBlock {
-+	struct fsBlockHeader bheader;
-+
-+	u16 version;		/* Version number of the filesystem block structure */
-+	u16 sequencenumber;	/* The Root with the highest sequencenumber is valid */
-+
-+	u32 datecreated;	/* Creation date (when first formatted).  Cannot be changed. */
-+	u8 bits;		/* various settings, see defines below. */
-+	u8 pad1;
-+	u16 pad2;
-+
-+	u32 reserved1[2];
-+
-+	u32 firstbyteh;		/* The first byte of our partition from the start of the */
-+	u32 firstbyte;		/* disk.  firstbyteh = upper 32 bits, firstbyte = lower 32 bits. */
-+
-+	u32 lastbyteh;		/* The last byte of our partition, excluding this one. */
-+	u32 lastbyte;
-+
-+	u32 totalblocks;	/* size of this partition in blocks */
-+	u32 blocksize;		/* blocksize used */
-+
-+	u32 reserved2[2];
-+	u32 reserved3[8];
-+
-+	u32 bitmapbase;		/* location of the bitmap */
-+	u32 adminspacecontainer;	/* location of first adminspace container */
-+	u32 rootobjectcontainer;	/* location of the root objectcontainer */
-+	u32 extentbnoderoot;	/* location of the root of the extentbnode B-tree */
-+	u32 objectnoderoot;	/* location of the root of the objectnode tree */
-+
-+	u32 reserved4[3];
-+};
-+
-+/* On disk inode, called fsObject */
-+
-+struct fsObject {
-+	u16 owneruid;
-+	u16 ownergid;
-+	u32 objectnode;
-+	u32 protection;
-+
-+	union {
-+		struct {
-+			u32 data;
-+			u32 size;
-+		} file;
-+
-+		struct {
-+			u32 hashtable;	/* for directories & root, 0 means no hashblock */
-+			u32 firstdirblock;
-+		} dir;
-+	} object;
-+
-+	u32 datemodified;
-+	u8 bits;
-+
-+	u8 name[0];
-+	u8 comment[0];
-+};
-+
-+/* On disk block containging a number of fsObjects */
-+
-+struct fsObjectContainer {
-+	struct fsBlockHeader bheader;
-+
-+	u32 parent;
-+	u32 next;
-+	u32 previous;		/* 0 for the first block in the directory chain */
-+
-+	struct fsObject object[0];
-+};
-+
-+/* BTree structures, used to collect file data position on disk */
-+
-+struct fsExtentBNode {
-+	u32 key;		/* data! */
-+	u32 next;
-+	u32 prev;
-+	u16 blocks;		/* The size in blocks of the region this Extent controls */
-+};
-+
-+struct BNode {
-+	u32 key;
-+	u32 data;
-+};
-+
-+struct BTreeContainer {
-+	u16 nodecount;
-+	u8 isleaf;
-+	u8 nodesize;		/* Must be a multiple of 2 */
-+
-+	struct BNode bnode[0];
-+};
-+
-+/* On disk block with BTreeContainer */
-+
-+struct fsBNodeContainer {
-+	struct fsBlockHeader bheader;
-+	struct BTreeContainer btc;
-+};
-+
-+/* On disk block  with soft link data */
-+
-+struct fsSoftLink {
-+	struct fsBlockHeader bheader;
-+	u32 parent;
-+	u32 next;
-+	u32 previous;
-+	u8 string[0];
-+};
-+
-+/* On disk block with hashtable data */
-+
-+struct fsHashTable {
-+	struct fsBlockHeader bheader;
-+	u32 parent;
-+	u32 hashentry[0];
-+};
-+
-+/* On disk block with node index and some helper structures */
-+
-+struct fsNodeContainer {
-+	struct fsBlockHeader bheader;
-+	u32 nodenumber;
-+	u32 nodes;
-+	u32 node[0];
-+};
-+
-+struct fsNode {
-+	u32 data;
-+};
-+
-+struct fsObjectNode {
-+	struct fsNode node;
-+	u32 next;
-+	u16 hash16;
-+} __attribute__ ((packed));
-+
-+/* Some adminspace and bitmap block structures */
-+
-+struct fsAdminSpace {
-+	u32 space;
-+	u32 bits;		
-+/* Set bits are used blocks, bit 31 is	the first block in the AdminSpace. */
-+};
-+
-+struct fsAdminSpaceContainer {
-+	struct fsBlockHeader bheader;
-+
-+	u32 next;
-+	u32 previous;
-+
-+	u8 bits;
-+	u8 pad1;
-+	u16 pad2;
-+
-+	struct fsAdminSpace adminspace[0];
-+};
-+
-+struct fsBitmap {
-+	struct fsBlockHeader bheader;
-+
-+	u32 bitmap[0];
-+
-+/* Bits are 1 if the block is free, and 0 if full.
-+   Bitmap must consist of an integral number of longwords. */
-+};
-+
-+/* The fsRootInfo structure has all kinds of information about the format
-+   of the disk. */
-+
-+struct fsRootInfo {
-+	u32 deletedblocks;	/* Amount in blocks which deleted files consume. */
-+	u32 deletedfiles;	/* Number of deleted files in recycled. */
-+	u32 freeblocks;		/* Cached number of free blocks on disk. */
-+
-+	u32 datecreated;
-+
-+	u32 lastallocatedblock;	/* Block which was most recently allocated */
-+	u32 lastallocatedadminspace;	/* AdminSpaceContainer which most recently was used to allocate a block */
-+	u32 lastallocatedextentnode;	/* ExtentNode which was most recently created */
-+	u32 lastallocatedobjectnode;	/* ObjectNode which was most recently created */
-+
-+	u32 rovingpointer;
-+};
-+
-+#endif

Deleted: dists/trunk/linux-2.4/debian/patches-debian/ia64-irq-affinity-upfix.patch
===================================================================
--- dists/trunk/linux-2.4/debian/patches-debian/ia64-irq-affinity-upfix.patch	2005-09-22 09:22:48 UTC (rev 4255)
+++ dists/trunk/linux-2.4/debian/patches-debian/ia64-irq-affinity-upfix.patch	2005-09-22 09:30:47 UTC (rev 4256)
@@ -1,19 +0,0 @@
-## DP: Description: Add a no-op set_irq_affinity_info() for non-SMP
-## DP: Patch author: dann frazier <dannf at hp.com>
-## DP: Upstream status: Submitted
-#
-diff -aurN a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c
---- a/arch/ia64/kernel/irq.c	2005-06-06 11:22:29.000000000 -0400
-+++ b/arch/ia64/kernel/irq.c	2005-06-15 22:13:24.000000000 -0400
-@@ -141,7 +141,10 @@
- 	}
- }
- 
--
-+#else /* !CONFIG_SMP */
-+void set_irq_affinity_info (unsigned int irq, int hwid, int redir)
-+{
-+}
- #endif /* CONFIG_SMP */
- 
- #ifdef CONFIG_HOTPLUG_CPU

Deleted: dists/trunk/linux-2.4/debian/patches-debian/m68k-42_dma.patch
===================================================================
--- dists/trunk/linux-2.4/debian/patches-debian/m68k-42_dma.patch	2005-09-22 09:22:48 UTC (rev 4255)
+++ dists/trunk/linux-2.4/debian/patches-debian/m68k-42_dma.patch	2005-09-22 09:30:47 UTC (rev 4256)
@@ -1,282 +0,0 @@
- arch/m68k/kernel/Makefile      |    4 -
- arch/m68k/kernel/dma.c         |  112 +++++++++++++++++++++++++++++++++++++++++
- include/asm-m68k/dma-mapping.h |   63 ++++++++++++++++++++---
- include/asm-m68k/scatterlist.h |    9 +--
- 4 files changed, 175 insertions(+), 13 deletions(-)
-
-Index: linux-tmp/include/asm-m68k/scatterlist.h
-===================================================================
---- linux-tmp.orig/include/asm-m68k/scatterlist.h	2005-06-04 21:57:39.000000000 +0200
-+++ linux-tmp/include/asm-m68k/scatterlist.h	2005-06-04 21:57:50.000000000 +0200
-@@ -2,18 +2,17 @@
- #define _M68K_SCATTERLIST_H
- 
- struct scatterlist {
--	/* These two are only valid if ADDRESS member of this
--	 * struct is NULL.
--	 */
- 	struct page *page;
- 	unsigned int offset;
--
- 	unsigned int length;
- 
--	__u32 dvma_address; /* A place to hang host-specific addresses at. */
-+	__u32 dma_address;	/* A place to hang host-specific addresses at. */
- };
- 
- /* This is bogus and should go away. */
- #define ISA_DMA_THRESHOLD (0x00ffffff)
- 
-+#define sg_dma_address(sg)	((sg)->dma_address)
-+#define sg_dma_len(sg)		((sg)->length)
-+
- #endif /* !(_M68K_SCATTERLIST_H) */
-Index: linux-tmp/arch/m68k/kernel/Makefile
-===================================================================
---- linux-tmp.orig/arch/m68k/kernel/Makefile	2005-06-04 21:57:39.000000000 +0200
-+++ linux-tmp/arch/m68k/kernel/Makefile	2005-06-04 21:57:50.000000000 +0200
-@@ -9,8 +9,8 @@ else
- endif
- extra-y	+= vmlinux.lds
- 
--obj-y		:= entry.o process.o traps.o ints.o signal.o ptrace.o \
--			sys_m68k.o time.o semaphore.o setup.o m68k_ksyms.o
-+obj-y	:= entry.o process.o traps.o ints.o dma.o signal.o ptrace.o \
-+	   sys_m68k.o time.o semaphore.o setup.o m68k_ksyms.o
- 
- obj-$(CONFIG_PCI)	+= bios32.o
- obj-$(CONFIG_MODULES)	+= module.o
-Index: linux-tmp/arch/m68k/kernel/dma.c
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ linux-tmp/arch/m68k/kernel/dma.c	2005-06-04 22:30:41.495377370 +0200
-@@ -0,0 +1,112 @@
-+
-+#include <linux/dma-mapping.h>
-+#include <linux/device.h>
-+#include <linux/kernel.h>
-+#include <linux/vmalloc.h>
-+
-+#include <asm/pgalloc.h>
-+#include <asm/scatterlist.h>
-+
-+void *dma_alloc_coherent(struct device *dev, size_t size,
-+			 dma_addr_t *handle, int flag)
-+{
-+	struct page *page, **map;
-+	pgprot_t pgprot;
-+	void *addr;
-+	int i, order;
-+
-+	pr_debug("dma_alloc_coherent: %d,%x\n", size, flag);
-+
-+	size = PAGE_ALIGN(size);
-+	order = get_order(size);
-+
-+	page = alloc_pages(flag, order);
-+	if (!page)
-+		return NULL;
-+
-+	*handle = page_to_phys(page);
-+	map = kmalloc(sizeof(struct page *) << order, flag);
-+	if (!map) {
-+		__free_pages(page, order);
-+		return NULL;
-+	}
-+	order = 1 << order;
-+	size >>= PAGE_SHIFT;
-+	map[0] = page;
-+	for (i = 1; i < size; i++) {
-+		map[i] = page + i;
-+		get_page(map[i]);
-+	}
-+	for (; i < order; i++)
-+		__free_page(page + i);
-+	pgprot = __pgprot(_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_DIRTY);
-+	if (CPU_IS_040_OR_060)
-+		pgprot_val(pgprot) |= _PAGE_GLOBAL040 | _PAGE_NOCACHE_S;
-+	else
-+		pgprot_val(pgprot) |= _PAGE_NOCACHE030;
-+	addr = vmap(map, size, flag, pgprot);
-+	kfree(map);
-+
-+	return addr;
-+}
-+
-+void dma_free_coherent(struct device *dev, size_t size,
-+		       void *addr, dma_addr_t handle)
-+{
-+	vfree(addr);
-+}
-+
-+inline void dma_sync_single_for_device(struct device *dev, dma_addr_t handle, size_t size,
-+				       enum dma_data_direction dir)
-+{
-+	if (dir == DMA_TO_DEVICE)
-+		cache_push(handle, size);
-+	else if (dir == DMA_FROM_DEVICE)
-+		cache_clear(handle, size);
-+}
-+
-+void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents,
-+			    enum dma_data_direction dir)
-+{
-+	int i;
-+
-+	for (i = 0; i < nents; sg++, i++)
-+		dma_sync_single_for_device(dev, sg->dma_address, sg->length, dir);
-+}
-+
-+dma_addr_t dma_map_single(struct device *dev, void *addr, size_t size,
-+			  enum dma_data_direction dir)
-+{
-+	dma_addr_t handle = virt_to_bus(addr);
-+	dma_sync_single_for_device(dev, handle, size, dir);
-+	return handle;
-+}
-+
-+dma_addr_t dma_map_page(struct device *dev, struct page *page,
-+			unsigned long offset, size_t size,
-+			enum dma_data_direction dir)
-+{
-+	dma_addr_t handle = page_to_phys(page) + offset;
-+	dma_sync_single_for_device(dev, handle, size, dir);
-+	return handle;
-+}
-+
-+int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
-+	       enum dma_data_direction dir)
-+{
-+	int i;
-+
-+	for (i = 0; i < nents; sg++, i++) {
-+		sg->dma_address = page_to_phys(sg->page) + sg->offset;
-+		dma_sync_single_for_device(dev, sg->dma_address, sg->length, dir);
-+	}
-+	return nents;
-+}
-+
-+EXPORT_SYMBOL(dma_alloc_coherent);
-+EXPORT_SYMBOL(dma_free_coherent);
-+EXPORT_SYMBOL(dma_map_single);
-+EXPORT_SYMBOL(dma_map_page);
-+EXPORT_SYMBOL(dma_map_sg);
-+EXPORT_SYMBOL(dma_sync_single_for_device);
-+EXPORT_SYMBOL(dma_sync_sg_for_device);
-Index: linux-tmp/include/asm-m68k/dma-mapping.h
-===================================================================
---- linux-tmp.orig/include/asm-m68k/dma-mapping.h	2005-06-04 21:57:39.000000000 +0200
-+++ linux-tmp/include/asm-m68k/dma-mapping.h	2005-06-04 21:57:50.000000000 +0200
-@@ -1,12 +1,63 @@
- #ifndef _M68K_DMA_MAPPING_H
- #define _M68K_DMA_MAPPING_H
- 
--#include <linux/config.h>
-+struct scatterlist;
- 
--#ifdef CONFIG_PCI
--#include <asm-generic/dma-mapping.h>
--#else
--#include <asm-generic/dma-mapping-broken.h>
--#endif
-+static inline int dma_supported(struct device *dev, u64 mask)
-+{
-+	return 1;
-+}
-+
-+static inline int dma_set_mask(struct device *dev, u64 mask)
-+{
-+	return 0;
-+}
-+
-+extern void *dma_alloc_coherent(struct device *, size_t,
-+				dma_addr_t *, int);
-+extern void dma_free_coherent(struct device *, size_t,
-+			      void *, dma_addr_t);
-+
-+extern dma_addr_t dma_map_single(struct device *, void *, size_t,
-+				 enum dma_data_direction);
-+static inline void dma_unmap_single(struct device *dev, dma_addr_t addr,
-+				    size_t size, enum dma_data_direction dir)
-+{
-+}
-+
-+extern dma_addr_t dma_map_page(struct device *, struct page *,
-+			       unsigned long, size_t size,
-+			       enum dma_data_direction);
-+static inline void dma_unmap_page(struct device *dev, dma_addr_t address,
-+				  size_t size, enum dma_data_direction dir)
-+{
-+}
-+
-+extern int dma_map_sg(struct device *, struct scatterlist *, int,
-+		      enum dma_data_direction);
-+static inline void dma_unmap_sg(struct device *dev, struct scatterlist *sg,
-+				int nhwentries, enum dma_data_direction dir)
-+{
-+}
-+
-+extern void dma_sync_single_for_device(struct device *, dma_addr_t, size_t,
-+				       enum dma_data_direction);
-+extern void dma_sync_sg_for_device(struct device *, struct scatterlist *, int,
-+				   enum dma_data_direction);
-+
-+static inline void dma_sync_single_for_cpu(struct device *dev, dma_addr_t handle,
-+					   size_t size, enum dma_data_direction dir)
-+{
-+}
-+
-+static inline void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg,
-+				       int nents, enum dma_data_direction dir)
-+{
-+}
-+
-+static inline int dma_mapping_error(dma_addr_t handle)
-+{
-+	return 0;
-+}
- 
- #endif  /* _M68K_DMA_MAPPING_H */
-diff -pur -X /home/roman/nodiff linux-tmp/arch/m68k/apollo/Makefile linux/arch/m68k/apollo/Makefile
---- linux-tmp/arch/m68k/apollo/Makefile	2002-12-17 00:58:44.000000000 +0100
-+++ linux/arch/m68k/apollo/Makefile	2005-06-10 23:28:12.000000000 +0200
-@@ -2,4 +2,4 @@
- # Makefile for Linux arch/m68k/amiga source directory
- #
- 
--obj-y		:= config.o dn_ints.o dma.o
-+obj-y		:= config.o dn_ints.o
-diff -pur -X /home/roman/nodiff linux-tmp/drivers/scsi/sun3x_esp.c linux/drivers/scsi/sun3x_esp.c
---- linux-tmp/drivers/scsi/sun3x_esp.c	2004-12-30 00:48:46.000000000 +0100
-+++ linux/drivers/scsi/sun3x_esp.c	2005-06-11 02:43:27.000000000 +0200
-@@ -334,11 +334,11 @@ static void dma_mmu_get_scsi_sgl (struct
-     struct scatterlist *sg = sp->SCp.buffer;
- 
-     while (sz >= 0) {
--	    sg[sz].dvma_address = dvma_map((unsigned long)page_address(sg[sz].page) +
-+	    sg[sz].dma_address = dvma_map((unsigned long)page_address(sg[sz].page) +
- 					   sg[sz].offset, sg[sz].length);
- 	    sz--;
-     }
--    sp->SCp.ptr=(char *)((unsigned long)sp->SCp.buffer->dvma_address);
-+    sp->SCp.ptr=(char *)((unsigned long)sp->SCp.buffer->dma_address);
- }
- 
- static void dma_mmu_release_scsi_one (struct NCR_ESP *esp, Scsi_Cmnd *sp)
-@@ -352,14 +352,14 @@ static void dma_mmu_release_scsi_sgl (st
-     struct scatterlist *sg = (struct scatterlist *)sp->buffer;
-                         
-     while(sz >= 0) {
--        dvma_unmap((char *)sg[sz].dvma_address);
-+        dvma_unmap((char *)sg[sz].dma_address);
-         sz--;
-     }
- }
- 
- static void dma_advance_sg (Scsi_Cmnd *sp)
- {
--    sp->SCp.ptr = (char *)((unsigned long)sp->SCp.buffer->dvma_address);
-+    sp->SCp.ptr = (char *)((unsigned long)sp->SCp.buffer->dma_address);
- }
- 
- static int sun3x_esp_release(struct Scsi_Host *instance)

Deleted: dists/trunk/linux-2.4/debian/patches-debian/m68k-sonic.patch
===================================================================
--- dists/trunk/linux-2.4/debian/patches-debian/m68k-sonic.patch	2005-09-22 09:22:48 UTC (rev 4255)
+++ dists/trunk/linux-2.4/debian/patches-debian/m68k-sonic.patch	2005-09-22 09:30:47 UTC (rev 4256)
@@ -1,2650 +0,0 @@
-
-The purpose of this patch:
-
-- Adopt the DMA API (jazzsonic, macsonic & core driver).
-
-- Adopt the driver model (macsonic).
-
-This part was cribbed from jazzsonic. As a consequence, macsonic once 
-again works as a module. Driver model is also used by the DMA calls.
-
-- Support 16 bit cards (macsonic & core driver, also affects jazzsonic)
-
-This code was adapted from the mac68k linux 2.2 kernel, where it has 
-languished for a long time.
-
-- Support more 32-bit mac cards (macsonic)
-
-Also from mac68k repo.
-
-- Zero-copy buffer handling (core driver)
-
-Provides a nice performance improvement. The new algorithm incidentally 
-helped to replace the old Jazz DMA code.
-
-The patch was tested on a variety of macs (several 32-bit quadra built-in 
-NICs, a 16-bit LC PDS NIC and a 16-bit comm-slot NIC), and also on MIPS 
-Jazz.
-
-This patch combines the three previous patches in this thread.
-
-
-Signed-off-by: Finn Thain <fthain at telegraphics.com.au>
-Acked-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
-Acked-by: Jeff Garzik <jgarzik at pobox.com>
-
-
-
---- orig/drivers/net/Space.c	Sun Jul 10 22:11:34 2005
-+++ linux/drivers/net/Space.c	Sun Jul 10 22:11:46 2005
-@@ -87,7 +87,6 @@
- extern struct net_device *tc515_probe(int unit);
- extern struct net_device *lance_probe(int unit);
- extern struct net_device *mace_probe(int unit);
--extern struct net_device *macsonic_probe(int unit);
- extern struct net_device *mac8390_probe(int unit);
- extern struct net_device *mac89x0_probe(int unit);
- extern struct net_device *mc32_probe(int unit);
-@@ -289,9 +288,6 @@
- #endif
- #ifdef CONFIG_MACMACE		/* Mac 68k Quadra AV builtin Ethernet */
- 	{mace_probe, 0},
--#endif
--#ifdef CONFIG_MACSONIC		/* Mac SONIC-based Ethernet of all sorts */ 
--	{macsonic_probe, 0},
- #endif
- #ifdef CONFIG_MAC8390           /* NuBus NS8390-based cards */
- 	{mac8390_probe, 0},
---- orig/drivers/net/jazzsonic.c	Sun Jul 10 22:11:34 2005
-+++ linux/drivers/net/jazzsonic.c	Sun Jul 10 22:22:39 2005
-@@ -1,5 +1,10 @@
- /*
-- * sonic.c
-+ * jazzsonic.c
-+ *
-+ * (C) 2005 Finn Thain
-+ *
-+ * Converted to DMA API, and (from the mac68k project) introduced
-+ * dhd's support for 16-bit cards.
-  *
-  * (C) 1996,1998 by Thomas Bogendoerfer (tsbogend at alpha.franken.de)
-  * 
-@@ -28,8 +33,8 @@
- #include <linux/netdevice.h>
- #include <linux/etherdevice.h>
- #include <linux/skbuff.h>
--#include <linux/bitops.h>
- #include <linux/device.h>
-+#include <linux/dma-mapping.h>
- 
- #include <asm/bootinfo.h>
- #include <asm/system.h>
-@@ -44,22 +49,20 @@
- 
- #define SONIC_MEM_SIZE	0x100
- 
--#define SREGS_PAD(n)    u16 n;
--
- #include "sonic.h"
- 
- /*
-  * Macros to access SONIC registers
-  */
--#define SONIC_READ(reg) (*((volatile unsigned int *)base_addr+reg))
-+#define SONIC_READ(reg) (*((volatile unsigned int *)dev->base_addr+reg))
- 
- #define SONIC_WRITE(reg,val)						\
- do {									\
--	*((volatile unsigned int *)base_addr+(reg)) = (val);		\
-+	*((volatile unsigned int *)dev->base_addr+(reg)) = (val);		\
- } while (0)
- 
- 
--/* use 0 for production, 1 for verification, >2 for debug */
-+/* use 0 for production, 1 for verification, >1 for debug */
- #ifdef SONIC_DEBUG
- static unsigned int sonic_debug = SONIC_DEBUG;
- #else 
-@@ -85,18 +88,18 @@
- 	0xffff			/* end of list */
- };
- 
--static int __init sonic_probe1(struct net_device *dev, unsigned long base_addr,
--                               unsigned int irq)
-+static int __init sonic_probe1(struct net_device *dev)
- {
- 	static unsigned version_printed;
- 	unsigned int silicon_revision;
- 	unsigned int val;
--	struct sonic_local *lp;
-+	struct sonic_local *lp = netdev_priv(dev);
- 	int err = -ENODEV;
- 	int i;
- 
--	if (!request_mem_region(base_addr, SONIC_MEM_SIZE, jazz_sonic_string))
-+	if (!request_mem_region(dev->base_addr, SONIC_MEM_SIZE, jazz_sonic_string))
- 		return -EBUSY;
-+
- 	/*
- 	 * get the Silicon Revision ID. If this is one of the known
- 	 * one assume that we found a SONIC ethernet controller at
-@@ -120,11 +123,7 @@
- 	if (sonic_debug  &&  version_printed++ == 0)
- 		printk(version);
- 
--	printk("%s: Sonic ethernet found at 0x%08lx, ", dev->name, base_addr);
--
--	/* Fill in the 'dev' fields. */
--	dev->base_addr = base_addr;
--	dev->irq = irq;
-+	printk(KERN_INFO "%s: Sonic ethernet found at 0x%08lx, ", lp->device->bus_id, dev->base_addr);
- 
- 	/*
- 	 * Put the sonic into software reset, then
-@@ -138,84 +137,44 @@
- 		dev->dev_addr[i*2+1] = val >> 8;
- 	}
- 
--	printk("HW Address ");
--	for (i = 0; i < 6; i++) {
--		printk("%2.2x", dev->dev_addr[i]);
--		if (i<5)
--			printk(":");
--	}
--
--	printk(" IRQ %d\n", irq);
--
- 	err = -ENOMEM;
-     
- 	/* Initialize the device structure. */
--	if (dev->priv == NULL) {
--		/*
--		 * the memory be located in the same 64kb segment
--		 */
--		lp = NULL;
--		i = 0;
--		do {
--			lp = kmalloc(sizeof(*lp), GFP_KERNEL);
--			if ((unsigned long) lp >> 16
--			    != ((unsigned long)lp + sizeof(*lp) ) >> 16) {
--				/* FIXME, free the memory later */
--				kfree(lp);
--				lp = NULL;
--			}
--		} while (lp == NULL && i++ < 20);
--
--		if (lp == NULL) {
--			printk("%s: couldn't allocate memory for descriptors\n",
--			       dev->name);
--			goto out;
--		}
- 
--		memset(lp, 0, sizeof(struct sonic_local));
--
--		/* get the virtual dma address */
--		lp->cda_laddr = vdma_alloc(CPHYSADDR(lp),sizeof(*lp));
--		if (lp->cda_laddr == ~0UL) {
--			printk("%s: couldn't get DMA page entry for "
--			       "descriptors\n", dev->name);
--			goto out1;
--		}
--
--		lp->tda_laddr = lp->cda_laddr + sizeof (lp->cda);
--		lp->rra_laddr = lp->tda_laddr + sizeof (lp->tda);
--		lp->rda_laddr = lp->rra_laddr + sizeof (lp->rra);
--	
--		/* allocate receive buffer area */
--		/* FIXME, maybe we should use skbs */
--		lp->rba = kmalloc(SONIC_NUM_RRS * SONIC_RBSIZE, GFP_KERNEL);
--		if (!lp->rba) {
--			printk("%s: couldn't allocate receive buffers\n",
--			       dev->name);
--			goto out2;
--		}
-+	lp->dma_bitmode = SONIC_BITMODE32;
- 
--		/* get virtual dma address */
--		lp->rba_laddr = vdma_alloc(CPHYSADDR(lp->rba),
--		                           SONIC_NUM_RRS * SONIC_RBSIZE);
--		if (lp->rba_laddr == ~0UL) {
--			printk("%s: couldn't get DMA page entry for receive "
--			       "buffers\n",dev->name);
--			goto out3;
--		}
--
--		/* now convert pointer to KSEG1 pointer */
--		lp->rba = (char *)KSEG1ADDR(lp->rba);
--		flush_cache_all();
--		dev->priv = (struct sonic_local *)KSEG1ADDR(lp);
-+	/* Allocate the entire chunk of memory for the descriptors.
-+           Note that this cannot cross a 64K boundary. */
-+	if ((lp->descriptors = dma_alloc_coherent(lp->device,
-+				SIZEOF_SONIC_DESC * SONIC_BUS_SCALE(lp->dma_bitmode),
-+				&lp->descriptors_laddr, GFP_KERNEL)) == NULL) {
-+		printk(KERN_ERR "%s: couldn't alloc DMA memory for descriptors.\n", lp->device->bus_id);
-+		goto out;
- 	}
- 
--	lp = (struct sonic_local *)dev->priv;
-+	/* Now set up the pointers to point to the appropriate places */
-+	lp->cda = lp->descriptors;
-+	lp->tda = lp->cda + (SIZEOF_SONIC_CDA
-+	                     * SONIC_BUS_SCALE(lp->dma_bitmode));
-+	lp->rda = lp->tda + (SIZEOF_SONIC_TD * SONIC_NUM_TDS
-+	                     * SONIC_BUS_SCALE(lp->dma_bitmode));
-+	lp->rra = lp->rda + (SIZEOF_SONIC_RD * SONIC_NUM_RDS
-+	                     * SONIC_BUS_SCALE(lp->dma_bitmode));
-+
-+	lp->cda_laddr = lp->descriptors_laddr;
-+	lp->tda_laddr = lp->cda_laddr + (SIZEOF_SONIC_CDA
-+	                     * SONIC_BUS_SCALE(lp->dma_bitmode));
-+	lp->rda_laddr = lp->tda_laddr + (SIZEOF_SONIC_TD * SONIC_NUM_TDS
-+	                     * SONIC_BUS_SCALE(lp->dma_bitmode));
-+	lp->rra_laddr = lp->rda_laddr + (SIZEOF_SONIC_RD * SONIC_NUM_RDS
-+	                     * SONIC_BUS_SCALE(lp->dma_bitmode));
-+
- 	dev->open = sonic_open;
- 	dev->stop = sonic_close;
- 	dev->hard_start_xmit = sonic_send_packet;
--	dev->get_stats	= sonic_get_stats;
-+	dev->get_stats = sonic_get_stats;
- 	dev->set_multicast_list = &sonic_multicast_list;
-+	dev->tx_timeout = sonic_tx_timeout;
- 	dev->watchdog_timeo = TX_TIMEOUT;
- 
- 	/*
-@@ -226,14 +185,8 @@
- 	SONIC_WRITE(SONIC_MPT,0xffff);
- 
- 	return 0;
--out3:
--	kfree(lp->rba);
--out2:
--	vdma_free(lp->cda_laddr);
--out1:
--	kfree(lp);
- out:
--	release_region(base_addr, SONIC_MEM_SIZE);
-+	release_region(dev->base_addr, SONIC_MEM_SIZE);
- 	return err;
- }
- 
-@@ -245,7 +198,6 @@
- {
- 	struct net_device *dev;
- 	struct sonic_local *lp;
--	unsigned long base_addr;
- 	int err = 0;
- 	int i;
- 
-@@ -255,21 +207,26 @@
- 	if (mips_machgroup != MACH_GROUP_JAZZ)
- 		return -ENODEV;
- 
--	dev = alloc_etherdev(0);
-+	dev = alloc_etherdev(sizeof(struct sonic_local));
- 	if (!dev)
- 		return -ENOMEM;
- 
-+	lp = netdev_priv(dev);
-+	lp->device = device;
-+	SET_NETDEV_DEV(dev, device);
-+ 	SET_MODULE_OWNER(dev);
-+
- 	netdev_boot_setup_check(dev);
--	base_addr = dev->base_addr;
- 
--	if (base_addr >= KSEG0)	{ /* Check a single specified location. */
--		err = sonic_probe1(dev, base_addr, dev->irq);
--	} else if (base_addr != 0) { /* Don't probe at all. */
-+	if (dev->base_addr >= KSEG0) { /* Check a single specified location. */
-+		err = sonic_probe1(dev);
-+	} else if (dev->base_addr != 0) { /* Don't probe at all. */
- 		err = -ENXIO;
- 	} else {
- 		for (i = 0; sonic_portlist[i].port; i++) {
--			int io = sonic_portlist[i].port;
--			if (sonic_probe1(dev, io, sonic_portlist[i].irq) == 0)
-+			dev->base_addr = sonic_portlist[i].port;
-+			dev->irq = sonic_portlist[i].irq;
-+			if (sonic_probe1(dev) == 0)
- 				break;
- 		}
- 		if (!sonic_portlist[i].port)
-@@ -281,14 +238,17 @@
- 	if (err)
- 		goto out1;
- 
-+	printk("%s: MAC ", dev->name);
-+	for (i = 0; i < 6; i++) {
-+		printk("%2.2x", dev->dev_addr[i]);
-+		if (i < 5)
-+			printk(":");
-+	}
-+	printk(" IRQ %d\n", dev->irq);
-+
- 	return 0;
- 
- out1:
--	lp = dev->priv;
--	vdma_free(lp->rba_laddr);
--	kfree(lp->rba);
--	vdma_free(lp->cda_laddr);
--	kfree(lp);
- 	release_region(dev->base_addr, SONIC_MEM_SIZE);
- out:
- 	free_netdev(dev);
-@@ -296,21 +256,22 @@
- 	return err;
- }
- 
--/*
-- *      SONIC uses a normal IRQ
-- */
--#define sonic_request_irq       request_irq
--#define sonic_free_irq          free_irq
-+MODULE_DESCRIPTION("Jazz SONIC ethernet driver");
-+module_param(sonic_debug, int, 0);
-+MODULE_PARM_DESC(sonic_debug, "jazzsonic debug level (1-4)");
- 
--#define sonic_chiptomem(x)      KSEG1ADDR(vdma_log2phys(x))
-+#define SONIC_IRQ_FLAG SA_INTERRUPT
- 
- #include "sonic.c"
- 
- static int __devexit jazz_sonic_device_remove (struct device *device)
- {
- 	struct net_device *dev = device->driver_data;
-+	struct sonic_local* lp = netdev_priv(dev);
- 
- 	unregister_netdev (dev);
-+	dma_free_coherent(lp->device, SIZEOF_SONIC_DESC * SONIC_BUS_SCALE(lp->dma_bitmode),
-+	                  lp->descriptors, lp->descriptors_laddr);
- 	release_region (dev->base_addr, SONIC_MEM_SIZE);
- 	free_netdev (dev);
- 
-@@ -323,7 +284,7 @@
- 	.probe	= jazz_sonic_probe,
- 	.remove	= __devexit_p(jazz_sonic_device_remove),
- };
--                                                                                
-+
- static void jazz_sonic_platform_release (struct device *device)
- {
- 	struct platform_device *pldev;
-@@ -336,10 +297,11 @@
- static int __init jazz_sonic_init_module(void)
- {
- 	struct platform_device *pldev;
-+	int err;
- 
--	if (driver_register(&jazz_sonic_driver)) {
-+	if ((err = driver_register(&jazz_sonic_driver))) {
- 		printk(KERN_ERR "Driver registration failed\n");
--		return -ENOMEM;
-+		return err;
- 	}
- 
- 	jazz_sonic_device = NULL;
---- orig/drivers/net/macsonic.c	Sun Jul 10 22:11:34 2005
-+++ linux/drivers/net/macsonic.c	Sun Jul 10 22:23:06 2005
-@@ -1,6 +1,12 @@
- /*
-  * macsonic.c
-  *
-+ * (C) 2005 Finn Thain
-+ *
-+ * Converted to DMA API, converted to unified driver model, made it work as
-+ * a module again, and from the mac68k project, introduced more 32-bit cards
-+ * and dhd's support for 16-bit cards.
-+ *
-  * (C) 1998 Alan Cox
-  *
-  * Debugging Andreas Ehliar, Michael Schmitz
-@@ -26,8 +32,8 @@
-  */
- 
- #include <linux/kernel.h>
-+#include <linux/module.h>
- #include <linux/types.h>
--#include <linux/ctype.h>
- #include <linux/fcntl.h>
- #include <linux/interrupt.h>
- #include <linux/init.h>
-@@ -41,8 +47,8 @@
- #include <linux/netdevice.h>
- #include <linux/etherdevice.h>
- #include <linux/skbuff.h>
--#include <linux/module.h>
--#include <linux/bitops.h>
-+#include <linux/device.h>
-+#include <linux/dma-mapping.h>
- 
- #include <asm/bootinfo.h>
- #include <asm/system.h>
-@@ -54,25 +60,28 @@
- #include <asm/macints.h>
- #include <asm/mac_via.h>
- 
--#define SREGS_PAD(n)    u16 n;
-+static char mac_sonic_string[] = "macsonic";
-+static struct platform_device *mac_sonic_device;
- 
- #include "sonic.h"
- 
--#define SONIC_READ(reg) \
--	nubus_readl(base_addr+(reg))
--#define SONIC_WRITE(reg,val) \
--	nubus_writel((val), base_addr+(reg))
--#define sonic_read(dev, reg) \
--	nubus_readl((dev)->base_addr+(reg))
--#define sonic_write(dev, reg, val) \
--	nubus_writel((val), (dev)->base_addr+(reg))
--
-+/* These should basically be bus-size and endian independent (since
-+   the SONIC is at least smart enough that it uses the same endianness
-+   as the host, unlike certain less enlightened Macintosh NICs) */
-+#define SONIC_READ(reg) (nubus_readw(dev->base_addr + (reg * 4) \
-+	      + lp->reg_offset))
-+#define SONIC_WRITE(reg,val) (nubus_writew(val, dev->base_addr + (reg * 4) \
-+	      + lp->reg_offset))
-+
-+/* use 0 for production, 1 for verification, >1 for debug */
-+#ifdef SONIC_DEBUG
-+static unsigned int sonic_debug = SONIC_DEBUG;
-+#else 
-+static unsigned int sonic_debug = 1;
-+#endif
- 
--static int sonic_debug;
- static int sonic_version_printed;
- 
--static int reg_offset;
--
- extern int mac_onboard_sonic_probe(struct net_device* dev);
- extern int mac_nubus_sonic_probe(struct net_device* dev);
- 
-@@ -108,40 +117,6 @@
- 
- #define SONIC_READ_PROM(addr) nubus_readb(prom_addr+addr)
- 
--struct net_device * __init macsonic_probe(int unit)
--{
--	struct net_device *dev = alloc_etherdev(0);
--	int err;
--
--	if (!dev)
--		return ERR_PTR(-ENOMEM);
--
--	if (unit >= 0)
--		sprintf(dev->name, "eth%d", unit);
--
-- 	SET_MODULE_OWNER(dev);
--
--	/* This will catch fatal stuff like -ENOMEM as well as success */
--	err = mac_onboard_sonic_probe(dev);
--	if (err == 0)
--		goto found;
--	if (err != -ENODEV)
--		goto out;
--	err = mac_nubus_sonic_probe(dev);
--	if (err)
--		goto out;
--found:
--	err = register_netdev(dev);
--	if (err)
--		goto out1;
--	return dev;
--out1:
--	kfree(dev->priv);
--out:
--	free_netdev(dev);
--	return ERR_PTR(err);
--}
--
- /*
-  * For reversing the PROM address
-  */
-@@ -160,103 +135,55 @@
- 
- int __init macsonic_init(struct net_device* dev)
- {
--	struct sonic_local* lp = NULL;
--	int i;
-+	struct sonic_local* lp = netdev_priv(dev);
- 
- 	/* Allocate the entire chunk of memory for the descriptors.
-            Note that this cannot cross a 64K boundary. */
--	for (i = 0; i < 20; i++) {
--		unsigned long desc_base, desc_top;
--		if((lp = kmalloc(sizeof(struct sonic_local), GFP_KERNEL | GFP_DMA)) == NULL) {
--			printk(KERN_ERR "%s: couldn't allocate descriptor buffers\n", dev->name);
--			return -ENOMEM;
--		}
--
--		desc_base = (unsigned long) lp;
--		desc_top = desc_base + sizeof(struct sonic_local);
--		if ((desc_top & 0xffff) >= (desc_base & 0xffff))
--			break;
--		/* Hmm. try again (FIXME: does this actually work?) */
--		kfree(lp);
--		printk(KERN_DEBUG
--		       "%s: didn't get continguous chunk [%08lx - %08lx], trying again\n",
--		       dev->name, desc_base, desc_top);
--	}
--
--	if (lp == NULL) {
--		printk(KERN_ERR "%s: tried 20 times to allocate descriptor buffers, giving up.\n",
--		       dev->name);
-+	if ((lp->descriptors = dma_alloc_coherent(lp->device,
-+	            SIZEOF_SONIC_DESC * SONIC_BUS_SCALE(lp->dma_bitmode),
-+	            &lp->descriptors_laddr, GFP_KERNEL)) == NULL) {
-+		printk(KERN_ERR "%s: couldn't alloc DMA memory for descriptors.\n", lp->device->bus_id);
- 		return -ENOMEM;
--	}		       
--
--	dev->priv = lp;
--
--#if 0
--	/* this code is only here as a curiousity...   mainly, where the 
--	   fuck did SONIC_BUS_SCALE come from, and what was it supposed
--	   to do?  the normal allocation works great for 32 bit stuffs..  */
-+	}
- 
- 	/* Now set up the pointers to point to the appropriate places */
--	lp->cda = lp->sonic_desc;
--	lp->tda = lp->cda + (SIZEOF_SONIC_CDA * SONIC_BUS_SCALE(lp->dma_bitmode));
-+	lp->cda = lp->descriptors;
-+	lp->tda = lp->cda + (SIZEOF_SONIC_CDA
-+	                     * SONIC_BUS_SCALE(lp->dma_bitmode));
- 	lp->rda = lp->tda + (SIZEOF_SONIC_TD * SONIC_NUM_TDS
--			     * SONIC_BUS_SCALE(lp->dma_bitmode));
-+	                     * SONIC_BUS_SCALE(lp->dma_bitmode));
- 	lp->rra = lp->rda + (SIZEOF_SONIC_RD * SONIC_NUM_RDS
--			     * SONIC_BUS_SCALE(lp->dma_bitmode));
-+	                     * SONIC_BUS_SCALE(lp->dma_bitmode));
- 
--#endif
--	
--	memset(lp, 0, sizeof(struct sonic_local));
--
--	lp->cda_laddr = (unsigned int)&(lp->cda);
--	lp->tda_laddr = (unsigned int)lp->tda;
--	lp->rra_laddr = (unsigned int)lp->rra;
--	lp->rda_laddr = (unsigned int)lp->rda;
--
--	/* FIXME, maybe we should use skbs */
--	if ((lp->rba = (char *)
--	     kmalloc(SONIC_NUM_RRS * SONIC_RBSIZE, GFP_KERNEL | GFP_DMA)) == NULL) {
--		printk(KERN_ERR "%s: couldn't allocate receive buffers\n", dev->name);
--		dev->priv = NULL;
--		kfree(lp);
--		return -ENOMEM;
--	}
--
--	lp->rba_laddr = (unsigned int)lp->rba;
--
--	{
--		int rs, ds;
--
--		/* almost always 12*4096, but let's not take chances */
--		rs = ((SONIC_NUM_RRS * SONIC_RBSIZE + 4095) / 4096) * 4096;
--		/* almost always under a page, but let's not take chances */
--		ds = ((sizeof(struct sonic_local) + 4095) / 4096) * 4096;
--		kernel_set_cachemode(lp->rba, rs, IOMAP_NOCACHE_SER);
--		kernel_set_cachemode(lp, ds, IOMAP_NOCACHE_SER);
--	}
--	
--#if 0
--	flush_cache_all();
--#endif
-+	lp->cda_laddr = lp->descriptors_laddr;
-+	lp->tda_laddr = lp->cda_laddr + (SIZEOF_SONIC_CDA
-+	                     * SONIC_BUS_SCALE(lp->dma_bitmode));
-+	lp->rda_laddr = lp->tda_laddr + (SIZEOF_SONIC_TD * SONIC_NUM_TDS
-+	                     * SONIC_BUS_SCALE(lp->dma_bitmode));
-+	lp->rra_laddr = lp->rda_laddr + (SIZEOF_SONIC_RD * SONIC_NUM_RDS
-+	                     * SONIC_BUS_SCALE(lp->dma_bitmode));
- 
- 	dev->open = sonic_open;
- 	dev->stop = sonic_close;
- 	dev->hard_start_xmit = sonic_send_packet;
- 	dev->get_stats = sonic_get_stats;
- 	dev->set_multicast_list = &sonic_multicast_list;
-+	dev->tx_timeout = sonic_tx_timeout;
-+	dev->watchdog_timeo = TX_TIMEOUT;
- 
- 	/*
- 	 * clear tally counter
- 	 */
--	sonic_write(dev, SONIC_CRCT, 0xffff);
--	sonic_write(dev, SONIC_FAET, 0xffff);
--	sonic_write(dev, SONIC_MPT, 0xffff);
-+	SONIC_WRITE(SONIC_CRCT, 0xffff);
-+	SONIC_WRITE(SONIC_FAET, 0xffff);
-+	SONIC_WRITE(SONIC_MPT, 0xffff);
- 
- 	return 0;
- }
- 
- int __init mac_onboard_sonic_ethernet_addr(struct net_device* dev)
- {
-+	struct sonic_local *lp = netdev_priv(dev);
- 	const int prom_addr = ONBOARD_SONIC_PROM_BASE;
- 	int i;
- 
-@@ -270,6 +197,7 @@
- 	   why this is so. */
- 	if (memcmp(dev->dev_addr, "\x08\x00\x07", 3) &&
- 	    memcmp(dev->dev_addr, "\x00\xA0\x40", 3) &&
-+	    memcmp(dev->dev_addr, "\x00\x80\x19", 3) &&
- 	    memcmp(dev->dev_addr, "\x00\x05\x02", 3))
- 		bit_reverse_addr(dev->dev_addr);
- 	else
-@@ -281,22 +209,23 @@
-            the card... */
- 	if (memcmp(dev->dev_addr, "\x08\x00\x07", 3) &&
- 	    memcmp(dev->dev_addr, "\x00\xA0\x40", 3) &&
-+	    memcmp(dev->dev_addr, "\x00\x80\x19", 3) &&
- 	    memcmp(dev->dev_addr, "\x00\x05\x02", 3))
- 	{
- 		unsigned short val;
- 
- 		printk(KERN_INFO "macsonic: PROM seems to be wrong, trying CAM entry 15\n");
- 		
--		sonic_write(dev, SONIC_CMD, SONIC_CR_RST);
--		sonic_write(dev, SONIC_CEP, 15);
-+		SONIC_WRITE(SONIC_CMD, SONIC_CR_RST);
-+		SONIC_WRITE(SONIC_CEP, 15);
- 
--		val = sonic_read(dev, SONIC_CAP2);
-+		val = SONIC_READ(SONIC_CAP2);
- 		dev->dev_addr[5] = val >> 8;
- 		dev->dev_addr[4] = val & 0xff;
--		val = sonic_read(dev, SONIC_CAP1);
-+		val = SONIC_READ(SONIC_CAP1);
- 		dev->dev_addr[3] = val >> 8;
- 		dev->dev_addr[2] = val & 0xff;
--		val = sonic_read(dev, SONIC_CAP0);
-+		val = SONIC_READ(SONIC_CAP0);
- 		dev->dev_addr[1] = val >> 8;
- 		dev->dev_addr[0] = val & 0xff;
- 		
-@@ -311,6 +240,7 @@
- 
- 	if (memcmp(dev->dev_addr, "\x08\x00\x07", 3) &&
- 	    memcmp(dev->dev_addr, "\x00\xA0\x40", 3) &&
-+	    memcmp(dev->dev_addr, "\x00\x80\x19", 3) &&
- 	    memcmp(dev->dev_addr, "\x00\x05\x02", 3))
- 	{
- 		/*
-@@ -325,8 +255,9 @@
- {
- 	/* Bwahahaha */
- 	static int once_is_more_than_enough;
--	int i;
--	int dma_bitmode;
-+	struct sonic_local* lp = netdev_priv(dev);
-+	int sr;
-+	int commslot = 0;
- 	
- 	if (once_is_more_than_enough)
- 		return -ENODEV;
-@@ -335,20 +266,18 @@
- 	if (!MACH_IS_MAC)
- 		return -ENODEV;
- 
--	printk(KERN_INFO "Checking for internal Macintosh ethernet (SONIC).. ");
--
- 	if (macintosh_config->ether_type != MAC_ETHER_SONIC)
--	{
--		printk("none.\n");
- 		return -ENODEV;
--	}
--
-+	
-+	printk(KERN_INFO "Checking for internal Macintosh ethernet (SONIC).. ");
-+	
- 	/* Bogus probing, on the models which may or may not have
- 	   Ethernet (BTW, the Ethernet *is* always at the same
- 	   address, and nothing else lives there, at least if Apple's
- 	   documentation is to be believed) */
- 	if (macintosh_config->ident == MAC_MODEL_Q630 ||
- 	    macintosh_config->ident == MAC_MODEL_P588 ||
-+	    macintosh_config->ident == MAC_MODEL_P575 ||
- 	    macintosh_config->ident == MAC_MODEL_C610) {
- 		unsigned long flags;
- 		int card_present;
-@@ -361,13 +290,13 @@
- 			printk("none.\n");
- 			return -ENODEV;
- 		}
-+		commslot = 1;
- 	}
- 
- 	printk("yes\n");	
- 
--	/* Danger!  My arms are flailing wildly!  You *must* set this
--           before using sonic_read() */
--
-+	/* Danger!  My arms are flailing wildly!  You *must* set lp->reg_offset
-+	 * and dev->base_addr before using SONIC_READ() or SONIC_WRITE() */
- 	dev->base_addr = ONBOARD_SONIC_REGISTERS;
- 	if (via_alt_mapping)
- 		dev->irq = IRQ_AUTO_3;
-@@ -379,84 +308,66 @@
- 		sonic_version_printed = 1;
- 	}
- 	printk(KERN_INFO "%s: onboard / comm-slot SONIC at 0x%08lx\n",
--	       dev->name, dev->base_addr);
--
--	/* Now do a song and dance routine in an attempt to determine
--           the bus width */
-+	       lp->device->bus_id, dev->base_addr);
- 
- 	/* The PowerBook's SONIC is 16 bit always. */
- 	if (macintosh_config->ident == MAC_MODEL_PB520) {
--		reg_offset = 0;
--		dma_bitmode = 0;
--	} else if (macintosh_config->ident == MAC_MODEL_C610) {
--		reg_offset = 0;
--		dma_bitmode = 1;
--	} else {
-+		lp->reg_offset = 0;
-+		lp->dma_bitmode = SONIC_BITMODE16;
-+		sr = SONIC_READ(SONIC_SR);
-+	} else if (commslot) {
- 		/* Some of the comm-slot cards are 16 bit.  But some
--                   of them are not.  The 32-bit cards use offset 2 and
--                   pad with zeroes or sometimes ones (I think...)
--                   Therefore, if we try offset 0 and get a silicon
--                   revision of 0, we assume 16 bit. */
--		int sr;
--
--		/* Technically this is not necessary since we zeroed
--                   it above */
--		reg_offset = 0;
--		dma_bitmode = 0;
--		sr = sonic_read(dev, SONIC_SR);
--		if (sr == 0 || sr == 0xffff) {
--			reg_offset = 2;
--			/* 83932 is 0x0004, 83934 is 0x0100 or 0x0101 */
--			sr = sonic_read(dev, SONIC_SR);
--			dma_bitmode = 1;
--			
-+		   of them are not.  The 32-bit cards use offset 2 and
-+		   have known revisions, we try reading the revision
-+		   register at offset 2, if we don't get a known revision
-+		   we assume 16 bit at offset 0.  */
-+		lp->reg_offset = 2;
-+		lp->dma_bitmode = SONIC_BITMODE16;
-+
-+		sr = SONIC_READ(SONIC_SR);
-+		if (sr == 0x0004 || sr == 0x0006 || sr == 0x0100 || sr == 0x0101) 
-+			/* 83932 is 0x0004 or 0x0006, 83934 is 0x0100 or 0x0101 */
-+			lp->dma_bitmode = SONIC_BITMODE32;
-+		else {
-+			lp->dma_bitmode = SONIC_BITMODE16;
-+			lp->reg_offset = 0;
-+			sr = SONIC_READ(SONIC_SR);
- 		}
--		printk(KERN_INFO
--		       "%s: revision 0x%04x, using %d bit DMA and register offset %d\n",
--		       dev->name, sr, dma_bitmode?32:16, reg_offset);
--	}
--	
-+	} else {
-+		/* All onboard cards are at offset 2 with 32 bit DMA. */
-+		lp->reg_offset = 2;
-+		lp->dma_bitmode = SONIC_BITMODE32;
-+		sr = SONIC_READ(SONIC_SR);
-+	}
-+	printk(KERN_INFO
-+	       "%s: revision 0x%04x, using %d bit DMA and register offset %d\n",
-+	       lp->device->bus_id, sr, lp->dma_bitmode?32:16, lp->reg_offset);
-+
-+#if 0 /* This is sometimes useful to find out how MacOS configured the card. */
-+	printk(KERN_INFO "%s: DCR: 0x%04x, DCR2: 0x%04x\n", lp->device->bus_id,
-+	       SONIC_READ(SONIC_DCR) & 0xffff, SONIC_READ(SONIC_DCR2) & 0xffff);
-+#endif
- 
--	/* this carries my sincere apologies -- by the time I got to updating
--	   the driver, support for "reg_offsets" appeares nowhere in the sonic
--	   code, going back for over a year.  Fortunately, my Mac does't seem
--	   to use whatever this was.
--
--	   If you know how this is supposed to be implemented, either fix it,
--	   or contact me (sammy at oh.verio.com) to explain what it is. --Sam */
--	   
--	if(reg_offset) {
--		printk("%s: register offset unsupported.  please fix this if you know what it is.\n", dev->name);
--		return -ENODEV;
--	}
--	
- 	/* Software reset, then initialize control registers. */
--	sonic_write(dev, SONIC_CMD, SONIC_CR_RST);
--	sonic_write(dev, SONIC_DCR, SONIC_DCR_BMS |
--		    SONIC_DCR_RFT1 | SONIC_DCR_TFT0 | SONIC_DCR_EXBUS |
--		    (dma_bitmode ? SONIC_DCR_DW : 0));
-+	SONIC_WRITE(SONIC_CMD, SONIC_CR_RST);
-+
-+	SONIC_WRITE(SONIC_DCR, SONIC_DCR_EXBUS | SONIC_DCR_BMS |
-+	                       SONIC_DCR_RFT1  | SONIC_DCR_TFT0 |
-+	                       (lp->dma_bitmode ? SONIC_DCR_DW : 0));
- 
- 	/* This *must* be written back to in order to restore the
--           extended programmable output bits */
--	sonic_write(dev, SONIC_DCR2, 0);
-+	 * extended programmable output bits, as it may not have been
-+	 * initialised since the hardware reset. */
-+	SONIC_WRITE(SONIC_DCR2, 0);
- 
- 	/* Clear *and* disable interrupts to be on the safe side */
--	sonic_write(dev, SONIC_ISR,0x7fff);
--	sonic_write(dev, SONIC_IMR,0);
-+	SONIC_WRITE(SONIC_IMR, 0);
-+	SONIC_WRITE(SONIC_ISR, 0x7fff);
- 
- 	/* Now look for the MAC address. */
- 	if (mac_onboard_sonic_ethernet_addr(dev) != 0)
- 		return -ENODEV;
- 
--	printk(KERN_INFO "MAC ");
--	for (i = 0; i < 6; i++) {
--		printk("%2.2x", dev->dev_addr[i]);
--		if (i < 5)
--			printk(":");
--	}
--
--	printk(" IRQ %d\n", dev->irq);
--
- 	/* Shared init code */
- 	return macsonic_init(dev);
- }
-@@ -468,8 +379,10 @@
- 	int i;
- 	for(i = 0; i < 6; i++)
- 		dev->dev_addr[i] = SONIC_READ_PROM(i);
--	/* For now we are going to assume that they're all bit-reversed */
--	bit_reverse_addr(dev->dev_addr);
-+
-+	/* Some of the addresses are bit-reversed */
-+	if (id != MACSONIC_DAYNA)
-+		bit_reverse_addr(dev->dev_addr);
- 
- 	return 0;
- }
-@@ -487,6 +400,15 @@
- 		else
- 			return MACSONIC_APPLE;
- 	}
-+	
-+	if (ndev->dr_hw == NUBUS_DRHW_SMC9194 &&
-+	    ndev->dr_sw == NUBUS_DRSW_DAYNA)
-+		return MACSONIC_DAYNA;
-+	
-+	if (ndev->dr_hw == NUBUS_DRHW_SONIC_LC &&
-+	    ndev->dr_sw == 0) { /* huh? */
-+		return MACSONIC_APPLE16;
-+	}
- 	return -1;
- }
- 
-@@ -494,12 +416,12 @@
- {
- 	static int slots;
- 	struct nubus_dev* ndev = NULL;
-+	struct sonic_local* lp = netdev_priv(dev);
- 	unsigned long base_addr, prom_addr;
- 	u16 sonic_dcr;
--	int id;
--	int i;
--	int dma_bitmode;
--
-+	int id = -1;
-+	int reg_offset, dma_bitmode;
-+	
- 	/* Find the first SONIC that hasn't been initialized already */
- 	while ((ndev = nubus_find_type(NUBUS_CAT_NETWORK,
- 				       NUBUS_TYPE_ETHERNET, ndev)) != NULL)
-@@ -521,51 +443,52 @@
- 	case MACSONIC_DUODOCK:
- 		base_addr = ndev->board->slot_addr + DUODOCK_SONIC_REGISTERS;
- 		prom_addr = ndev->board->slot_addr + DUODOCK_SONIC_PROM_BASE;
--		sonic_dcr = SONIC_DCR_EXBUS | SONIC_DCR_RFT0 | SONIC_DCR_RFT1
--			| SONIC_DCR_TFT0;
-+		sonic_dcr = SONIC_DCR_EXBUS | SONIC_DCR_RFT0 | SONIC_DCR_RFT1 |
-+		            SONIC_DCR_TFT0;
- 		reg_offset = 2;
--		dma_bitmode = 1;
-+		dma_bitmode = SONIC_BITMODE32;
- 		break;
- 	case MACSONIC_APPLE:
- 		base_addr = ndev->board->slot_addr + APPLE_SONIC_REGISTERS;
- 		prom_addr = ndev->board->slot_addr + APPLE_SONIC_PROM_BASE;
- 		sonic_dcr = SONIC_DCR_BMS | SONIC_DCR_RFT1 | SONIC_DCR_TFT0;
- 		reg_offset = 0;
--		dma_bitmode = 1;
-+		dma_bitmode = SONIC_BITMODE32;
- 		break;
- 	case MACSONIC_APPLE16:
- 		base_addr = ndev->board->slot_addr + APPLE_SONIC_REGISTERS;
- 		prom_addr = ndev->board->slot_addr + APPLE_SONIC_PROM_BASE;
--		sonic_dcr = SONIC_DCR_EXBUS
-- 			| SONIC_DCR_RFT1 | SONIC_DCR_TFT0
--			| SONIC_DCR_PO1 | SONIC_DCR_BMS; 
-+		sonic_dcr = SONIC_DCR_EXBUS | SONIC_DCR_RFT1 | SONIC_DCR_TFT0 |
-+		            SONIC_DCR_PO1 | SONIC_DCR_BMS; 
- 		reg_offset = 0;
--		dma_bitmode = 0;
-+		dma_bitmode = SONIC_BITMODE16;
- 		break;
- 	case MACSONIC_DAYNALINK:
- 		base_addr = ndev->board->slot_addr + APPLE_SONIC_REGISTERS;
- 		prom_addr = ndev->board->slot_addr + DAYNALINK_PROM_BASE;
--		sonic_dcr = SONIC_DCR_RFT1 | SONIC_DCR_TFT0
--			| SONIC_DCR_PO1 | SONIC_DCR_BMS; 
-+		sonic_dcr = SONIC_DCR_RFT1 | SONIC_DCR_TFT0 |
-+		            SONIC_DCR_PO1 | SONIC_DCR_BMS; 
- 		reg_offset = 0;
--		dma_bitmode = 0;
-+		dma_bitmode = SONIC_BITMODE16;
- 		break;
- 	case MACSONIC_DAYNA:
- 		base_addr = ndev->board->slot_addr + DAYNA_SONIC_REGISTERS;
- 		prom_addr = ndev->board->slot_addr + DAYNA_SONIC_MAC_ADDR;
--		sonic_dcr = SONIC_DCR_BMS
--			| SONIC_DCR_RFT1 | SONIC_DCR_TFT0 | SONIC_DCR_PO1;
-+		sonic_dcr = SONIC_DCR_BMS |
-+		            SONIC_DCR_RFT1 | SONIC_DCR_TFT0 | SONIC_DCR_PO1;
- 		reg_offset = 0;
--		dma_bitmode = 0;
-+		dma_bitmode = SONIC_BITMODE16;
- 		break;
- 	default:
- 		printk(KERN_ERR "macsonic: WTF, id is %d\n", id);
- 		return -ENODEV;
- 	}
- 
--	/* Danger!  My arms are flailing wildly!  You *must* set this
--           before using sonic_read() */
-+	/* Danger!  My arms are flailing wildly!  You *must* set lp->reg_offset
-+	 * and dev->base_addr before using SONIC_READ() or SONIC_WRITE() */
- 	dev->base_addr = base_addr;
-+	lp->reg_offset = reg_offset;
-+	lp->dma_bitmode = dma_bitmode;
- 	dev->irq = SLOT2IRQ(ndev->board->slot);
- 
- 	if (!sonic_version_printed) {
-@@ -573,29 +496,66 @@
- 		sonic_version_printed = 1;
- 	}
- 	printk(KERN_INFO "%s: %s in slot %X\n",
--	       dev->name, ndev->board->name, ndev->board->slot);
-+	       lp->device->bus_id, ndev->board->name, ndev->board->slot);
- 	printk(KERN_INFO "%s: revision 0x%04x, using %d bit DMA and register offset %d\n",
--	       dev->name, sonic_read(dev, SONIC_SR), dma_bitmode?32:16, reg_offset);
-+	       lp->device->bus_id, SONIC_READ(SONIC_SR), dma_bitmode?32:16, reg_offset);
- 
--	if(reg_offset) {
--		printk("%s: register offset unsupported.  please fix this if you know what it is.\n", dev->name);
--		return -ENODEV;
--	}
-+#if 0 /* This is sometimes useful to find out how MacOS configured the card. */
-+	printk(KERN_INFO "%s: DCR: 0x%04x, DCR2: 0x%04x\n", lp->device->bus_id,
-+	       SONIC_READ(SONIC_DCR) & 0xffff, SONIC_READ(SONIC_DCR2) & 0xffff);
-+#endif
- 
- 	/* Software reset, then initialize control registers. */
--	sonic_write(dev, SONIC_CMD, SONIC_CR_RST);
--	sonic_write(dev, SONIC_DCR, sonic_dcr
--		    | (dma_bitmode ? SONIC_DCR_DW : 0));
-+	SONIC_WRITE(SONIC_CMD, SONIC_CR_RST);
-+	SONIC_WRITE(SONIC_DCR, sonic_dcr | (dma_bitmode ? SONIC_DCR_DW : 0));
-+	/* This *must* be written back to in order to restore the
-+	 * extended programmable output bits, since it may not have been
-+	 * initialised since the hardware reset. */
-+	SONIC_WRITE(SONIC_DCR2, 0);
- 
- 	/* Clear *and* disable interrupts to be on the safe side */
--	sonic_write(dev, SONIC_ISR,0x7fff);
--	sonic_write(dev, SONIC_IMR,0);
-+	SONIC_WRITE(SONIC_IMR, 0);
-+	SONIC_WRITE(SONIC_ISR, 0x7fff);
- 
- 	/* Now look for the MAC address. */
- 	if (mac_nubus_sonic_ethernet_addr(dev, prom_addr, id) != 0)
- 		return -ENODEV;
- 
--	printk(KERN_INFO "MAC ");
-+	/* Shared init code */
-+	return macsonic_init(dev);
-+}
-+
-+static int __init mac_sonic_probe(struct device *device)
-+{
-+	struct net_device *dev;
-+	struct sonic_local *lp;
-+	int err;
-+	int i;
-+
-+	dev = alloc_etherdev(sizeof(struct sonic_local));
-+	if (!dev)
-+		return -ENOMEM;
-+
-+	lp = netdev_priv(dev);
-+	lp->device = device;
-+	SET_NETDEV_DEV(dev, device);
-+ 	SET_MODULE_OWNER(dev);
-+
-+	/* This will catch fatal stuff like -ENOMEM as well as success */
-+	err = mac_onboard_sonic_probe(dev);
-+	if (err == 0)
-+		goto found;
-+	if (err != -ENODEV)
-+		goto out;
-+	err = mac_nubus_sonic_probe(dev);
-+	if (err)
-+		goto out;
-+found:
-+	err = register_netdev(dev);
-+	if (err)
-+		goto out;
-+
-+	printk("%s: MAC ", dev->name);
- 	for (i = 0; i < 6; i++) {
- 		printk("%2.2x", dev->dev_addr[i]);
- 		if (i < 5)
-@@ -603,55 +563,95 @@
- 	}
- 	printk(" IRQ %d\n", dev->irq);
- 
--	/* Shared init code */
--	return macsonic_init(dev);
--}
-+	return 0;
- 
--#ifdef MODULE
--static struct net_device *dev_macsonic;
-+out:
-+	free_netdev(dev);
-+
-+	return err;
-+}
- 
--MODULE_PARM(sonic_debug, "i");
-+MODULE_DESCRIPTION("Macintosh SONIC ethernet driver");
-+module_param(sonic_debug, int, 0);
- MODULE_PARM_DESC(sonic_debug, "macsonic debug level (1-4)");
- 
--int
--init_module(void)
-+#define SONIC_IRQ_FLAG IRQ_FLG_FAST
-+
-+#include "sonic.c"
-+
-+static int __devexit mac_sonic_device_remove (struct device *device)
- {
--        dev_macsonic = macsonic_probe(-1);
--	if (IS_ERR(dev_macsonic)) {
--                printk(KERN_WARNING "macsonic.c: No card found\n");
--		return PTR_ERR(dev_macsonic);
--	}
-+	struct net_device *dev = device->driver_data;
-+	struct sonic_local* lp = netdev_priv(dev);
-+
-+	unregister_netdev (dev);
-+	dma_free_coherent(lp->device, SIZEOF_SONIC_DESC * SONIC_BUS_SCALE(lp->dma_bitmode),
-+	                  lp->descriptors, lp->descriptors_laddr);
-+	free_netdev (dev);
-+
- 	return 0;
- }
- 
--void
--cleanup_module(void)
-+static struct device_driver mac_sonic_driver = {
-+	.name   = mac_sonic_string,
-+	.bus    = &platform_bus_type,
-+	.probe  = mac_sonic_probe,
-+	.remove = __devexit_p(mac_sonic_device_remove),
-+};
-+
-+static void mac_sonic_platform_release(struct device *device)
- {
--	unregister_netdev(dev_macsonic);
--	kfree(dev_macsonic->priv);
--	free_netdev(dev_macsonic);
-+	struct platform_device *pldev;
-+
-+	/* free device */
-+	pldev = to_platform_device (device);
-+	kfree (pldev);
- }
--#endif /* MODULE */
- 
-+static int __init mac_sonic_init_module(void)
-+{
-+	struct platform_device *pldev;
-+	int err;
-+
-+	if ((err = driver_register(&mac_sonic_driver))) {
-+		printk(KERN_ERR "Driver registration failed\n");
-+		return err;
-+	}
- 
--#define vdma_alloc(foo, bar) ((u32)foo)
--#define vdma_free(baz)
--#define sonic_chiptomem(bat) (bat)
--#define PHYSADDR(quux) (quux)
--#define CPHYSADDR(quux) (quux)
-+	mac_sonic_device = NULL;
- 
--#define sonic_request_irq       request_irq
--#define sonic_free_irq          free_irq
-+	if (!(pldev = kmalloc (sizeof (*pldev), GFP_KERNEL))) {
-+		goto out_unregister;
-+	}
- 
--#include "sonic.c"
-+	memset(pldev, 0, sizeof (*pldev));
-+	pldev->name		= mac_sonic_string;
-+	pldev->id		= 0;
-+	pldev->dev.release	= mac_sonic_platform_release;
-+	mac_sonic_device	= pldev;
- 
--/*
-- * Local variables:
-- *  compile-command: "m68k-linux-gcc -D__KERNEL__ -I../../include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -fno-strength-reduce -ffixed-a2 -DMODULE -DMODVERSIONS -include ../../include/linux/modversions.h   -c -o macsonic.o macsonic.c"
-- *  version-control: t
-- *  kept-new-versions: 5
-- *  c-indent-level: 8
-- *  tab-width: 8
-- * End:
-- *
-- */
-+	if (platform_device_register (pldev)) {
-+		kfree(pldev);
-+		mac_sonic_device = NULL;
-+	}
-+
-+	return 0;
-+
-+out_unregister:
-+	platform_device_unregister(pldev);
-+
-+	return -ENOMEM;
-+}
-+
-+static void __exit mac_sonic_cleanup_module(void)
-+{
-+	driver_unregister(&mac_sonic_driver);
-+
-+	if (mac_sonic_device) {
-+		platform_device_unregister(mac_sonic_device);
-+		mac_sonic_device = NULL;
-+	}
-+}
-+
-+module_init(mac_sonic_init_module);
-+module_exit(mac_sonic_cleanup_module);
---- orig/drivers/net/sonic.c	Sun Jul 10 22:11:34 2005
-+++ linux/drivers/net/sonic.c	Sun Jul 10 22:26:14 2005
-@@ -1,6 +1,11 @@
- /*
-  * sonic.c
-  *
-+ * (C) 2005 Finn Thain
-+ *
-+ * Converted to DMA API, added zero-copy buffer handling, and
-+ * (from the mac68k project) introduced dhd's support for 16-bit cards.
-+ *
-  * (C) 1996,1998 by Thomas Bogendoerfer (tsbogend at alpha.franken.de)
-  * 
-  * This driver is based on work from Andreas Busse, but most of
-@@ -9,12 +14,23 @@
-  * (C) 1995 by Andreas Busse (andy at waldorf-gmbh.de)
-  *
-  *    Core code included by system sonic drivers
-+ *
-+ * And... partially rewritten again by David Huggins-Daines in order
-+ * to cope with screwed up Macintosh NICs that may or may not use
-+ * 16-bit DMA.
-+ *
-+ * (C) 1999 David Huggins-Daines <dhd at debian.org>
-+ *
-  */
- 
- /*
-  * Sources: Olivetti M700-10 Risc Personal Computer hardware handbook,
-  * National Semiconductors data sheet for the DP83932B Sonic Ethernet
-  * controller, and the files "8390.c" and "skeleton.c" in this directory.
-+ *
-+ * Additional sources: Nat Semi data sheet for the DP83932C and Nat Semi
-+ * Application Note AN-746, the files "lance.c" and "ibmlana.c". See also
-+ * the NetBSD file "sys/arch/mac68k/dev/if_sn.c".
-  */
- 
- 
-@@ -28,6 +44,9 @@
-  */
- static int sonic_open(struct net_device *dev)
- {
-+	struct sonic_local *lp = netdev_priv(dev);
-+	int i;
-+	
- 	if (sonic_debug > 2)
- 		printk("sonic_open: initializing sonic driver.\n");
- 
-@@ -40,14 +59,59 @@
-  * This means that during execution of the handler interrupt are disabled
-  * covering another bug otherwise corrupting data.  This doesn't mean
-  * this glue works ok under all situations.
-+ *
-+ * Note (dhd): this also appears to prevent lockups on the Macintrash
-+ * when more than one Ethernet card is installed (knock on wood)
-+ *
-+ * Note (fthain): whether the above is still true is anyones guess. Certainly
-+ * the buffer handling algorithms will not tolerate re-entrance without some
-+ * mutual exclusion added. Anyway, the memcpy has now been eliminated from the
-+ * rx code to make this a faster "fast interrupt".
-  */
--//    if (sonic_request_irq(dev->irq, &sonic_interrupt, 0, "sonic", dev)) {
--	if (sonic_request_irq(dev->irq, &sonic_interrupt, SA_INTERRUPT,
--	                      "sonic", dev)) {
--		printk("\n%s: unable to get IRQ %d .\n", dev->name, dev->irq);
-+	if (request_irq(dev->irq, &sonic_interrupt, SONIC_IRQ_FLAG, "sonic", dev)) {
-+		printk(KERN_ERR "\n%s: unable to get IRQ %d .\n", dev->name, dev->irq);
- 		return -EAGAIN;
- 	}
- 
-+	for (i = 0; i < SONIC_NUM_RRS; i++) {
-+		struct sk_buff *skb = dev_alloc_skb(SONIC_RBSIZE + 2);
-+		if (skb == NULL) {
-+			while(i > 0) { /* free any that were allocated successfully */
-+				i--;
-+				dev_kfree_skb(lp->rx_skb[i]);
-+				lp->rx_skb[i] = NULL;
-+			}
-+			printk(KERN_ERR "%s: couldn't allocate receive buffers\n",
-+			       dev->name);
-+			return -ENOMEM;
-+		}
-+		skb->dev = dev;
-+		/* align IP header unless DMA requires otherwise */
-+		if (SONIC_BUS_SCALE(lp->dma_bitmode) == 2)
-+			skb_reserve(skb, 2);
-+		lp->rx_skb[i] = skb;
-+	}
-+
-+	for (i = 0; i < SONIC_NUM_RRS; i++) {
-+		dma_addr_t laddr = dma_map_single(lp->device, skb_put(lp->rx_skb[i], SONIC_RBSIZE),
-+		                                  SONIC_RBSIZE, DMA_FROM_DEVICE);
-+		if (!laddr) {
-+			while(i > 0) { /* free any that were mapped successfully */
-+				i--;
-+				dma_unmap_single(lp->device, lp->rx_laddr[i], SONIC_RBSIZE, DMA_FROM_DEVICE);
-+				lp->rx_laddr[i] = (dma_addr_t)0;
-+			}
-+			for (i = 0; i < SONIC_NUM_RRS; i++) {
-+				dev_kfree_skb(lp->rx_skb[i]);
-+				lp->rx_skb[i] = NULL;
-+			}
-+			printk(KERN_ERR "%s: couldn't map rx DMA buffers\n",
-+			       dev->name);
-+			return -ENOMEM;
-+		}
-+		lp->rx_laddr[i] = laddr;
-+	}
-+
- 	/*
- 	 * Initialize the SONIC
- 	 */
-@@ -67,7 +131,8 @@
-  */
- static int sonic_close(struct net_device *dev)
- {
--	unsigned int base_addr = dev->base_addr;
-+	struct sonic_local *lp = netdev_priv(dev);
-+	int i;
- 
- 	if (sonic_debug > 2)
- 		printk("sonic_close\n");
-@@ -77,20 +142,56 @@
- 	/*
- 	 * stop the SONIC, disable interrupts
- 	 */
--	SONIC_WRITE(SONIC_ISR, 0x7fff);
- 	SONIC_WRITE(SONIC_IMR, 0);
-+	SONIC_WRITE(SONIC_ISR, 0x7fff);
- 	SONIC_WRITE(SONIC_CMD, SONIC_CR_RST);
- 
--	sonic_free_irq(dev->irq, dev);	/* release the IRQ */
-+	/* unmap and free skbs that haven't been transmitted */
-+	for (i = 0; i < SONIC_NUM_TDS; i++) {
-+		if(lp->tx_laddr[i]) {
-+			dma_unmap_single(lp->device, lp->tx_laddr[i], lp->tx_len[i], DMA_TO_DEVICE);
-+			lp->tx_laddr[i] = (dma_addr_t)0;
-+		}
-+		if(lp->tx_skb[i]) {
-+			dev_kfree_skb(lp->tx_skb[i]);
-+			lp->tx_skb[i] = NULL;
-+		}
-+	}
-+
-+	/* unmap and free the receive buffers */
-+	for (i = 0; i < SONIC_NUM_RRS; i++) {
-+		if(lp->rx_laddr[i]) {
-+			dma_unmap_single(lp->device, lp->rx_laddr[i], SONIC_RBSIZE, DMA_FROM_DEVICE);
-+			lp->rx_laddr[i] = (dma_addr_t)0;
-+		}
-+		if(lp->rx_skb[i]) {
-+			dev_kfree_skb(lp->rx_skb[i]);
-+			lp->rx_skb[i] = NULL;
-+		}
-+	}
-+
-+	free_irq(dev->irq, dev);	/* release the IRQ */
- 
- 	return 0;
- }
- 
- static void sonic_tx_timeout(struct net_device *dev)
- {
--	struct sonic_local *lp = (struct sonic_local *) dev->priv;
--	printk("%s: transmit timed out.\n", dev->name);
--
-+	struct sonic_local *lp = netdev_priv(dev);
-+	int i;
-+	/* Stop the interrupts for this */
-+	SONIC_WRITE(SONIC_IMR, 0);
-+	/* We could resend the original skbs. Easier to re-initialise. */
-+	for (i = 0; i < SONIC_NUM_TDS; i++) {
-+		if(lp->tx_laddr[i]) {
-+			dma_unmap_single(lp->device, lp->tx_laddr[i], lp->tx_len[i], DMA_TO_DEVICE);
-+			lp->tx_laddr[i] = (dma_addr_t)0;
-+		}
-+		if(lp->tx_skb[i]) {
-+			dev_kfree_skb(lp->tx_skb[i]);
-+			lp->tx_skb[i] = NULL;
-+		}
-+	}
- 	/* Try to restart the adaptor. */
- 	sonic_init(dev);
- 	lp->stats.tx_errors++;
-@@ -100,60 +201,92 @@
- 
- /*
-  * transmit packet
-+ *
-+ * Appends new TD during transmission thus avoiding any TX interrupts
-+ * until we run out of TDs.
-+ * This routine interacts closely with the ISR in that it may,
-+ *   set tx_skb[i]
-+ *   reset the status flags of the new TD
-+ *   set and reset EOL flags
-+ *   stop the tx queue
-+ * The ISR interacts with this routine in various ways. It may,
-+ *   reset tx_skb[i]
-+ *   test the EOL and status flags of the TDs
-+ *   wake the tx queue
-+ * Concurrently with all of this, the SONIC is potentially writing to
-+ * the status flags of the TDs.
-+ * Until some mutual exclusion is added, this code will not work with SMP. However,
-+ * MIPS Jazz machines and m68k Macs were all uni-processor machines.
-  */
-+
- static int sonic_send_packet(struct sk_buff *skb, struct net_device *dev)
- {
--	struct sonic_local *lp = (struct sonic_local *) dev->priv;
--	unsigned int base_addr = dev->base_addr;
--	unsigned int laddr;
--	int entry, length;
--
--	netif_stop_queue(dev);
-+	struct sonic_local *lp = netdev_priv(dev);
-+	dma_addr_t laddr;
-+	int length;
-+	int entry = lp->next_tx;
- 
- 	if (sonic_debug > 2)
- 		printk("sonic_send_packet: skb=%p, dev=%p\n", skb, dev);
- 
-+	length = skb->len;
-+	if (length < ETH_ZLEN) {
-+		skb = skb_padto(skb, ETH_ZLEN);
-+		if (skb == NULL)
-+			return 0;
-+		length = ETH_ZLEN;
-+	}
-+
- 	/*
- 	 * Map the packet data into the logical DMA address space
- 	 */
--	if ((laddr = vdma_alloc(CPHYSADDR(skb->data), skb->len)) == ~0UL) {
--		printk("%s: no VDMA entry for transmit available.\n",
--		       dev->name);
-+
-+	laddr = dma_map_single(lp->device, skb->data, length, DMA_TO_DEVICE);
-+	if (!laddr) {
-+		printk(KERN_ERR "%s: failed to map tx DMA buffer.\n", dev->name);
- 		dev_kfree_skb(skb);
--		netif_start_queue(dev);
- 		return 1;
- 	}
--	entry = lp->cur_tx & SONIC_TDS_MASK;
--	lp->tx_laddr[entry] = laddr;
--	lp->tx_skb[entry] = skb;
--
--	length = (skb->len < ETH_ZLEN) ? ETH_ZLEN : skb->len;
--	flush_cache_all();
-+   
-+	sonic_tda_put(dev, entry, SONIC_TD_STATUS, 0);       /* clear status */
-+	sonic_tda_put(dev, entry, SONIC_TD_FRAG_COUNT, 1);   /* single fragment */
-+	sonic_tda_put(dev, entry, SONIC_TD_PKTSIZE, length); /* length of packet */
-+	sonic_tda_put(dev, entry, SONIC_TD_FRAG_PTR_L, laddr & 0xffff);
-+	sonic_tda_put(dev, entry, SONIC_TD_FRAG_PTR_H, laddr >> 16);
-+	sonic_tda_put(dev, entry, SONIC_TD_FRAG_SIZE, length);
-+	sonic_tda_put(dev, entry, SONIC_TD_LINK,
-+		sonic_tda_get(dev, entry, SONIC_TD_LINK) | SONIC_EOL);
- 
- 	/*
--	 * Setup the transmit descriptor and issue the transmit command.
-+	 * Must set tx_skb[entry] only after clearing status, and
-+	 * before clearing EOL and before stopping queue
- 	 */
--	lp->tda[entry].tx_status = 0;	/* clear status */
--	lp->tda[entry].tx_frag_count = 1;	/* single fragment */
--	lp->tda[entry].tx_pktsize = length;	/* length of packet */
--	lp->tda[entry].tx_frag_ptr_l = laddr & 0xffff;
--	lp->tda[entry].tx_frag_ptr_h = laddr >> 16;
--	lp->tda[entry].tx_frag_size = length;
--	lp->cur_tx++;
--	lp->stats.tx_bytes += length;
-+	wmb();
-+	lp->tx_len[entry] = length;
-+	lp->tx_laddr[entry] = laddr;
-+	lp->tx_skb[entry] = skb;
-+
-+	wmb();
-+	sonic_tda_put(dev, lp->eol_tx, SONIC_TD_LINK,
-+				  sonic_tda_get(dev, lp->eol_tx, SONIC_TD_LINK) & ~SONIC_EOL);
-+	lp->eol_tx = entry;
-+
-+	lp->next_tx = (entry + 1) & SONIC_TDS_MASK;
-+	if (lp->tx_skb[lp->next_tx] != NULL) {
-+		/* The ring is full, the ISR has yet to process the next TD. */
-+		if (sonic_debug > 3)
-+			printk("%s: stopping queue\n", dev->name);
-+		netif_stop_queue(dev);
-+		/* after this packet, wait for ISR to free up some TDAs */
-+	} else netif_start_queue(dev);
- 
- 	if (sonic_debug > 2)
--		printk("sonic_send_packet: issueing Tx command\n");
-+		printk("sonic_send_packet: issuing Tx command\n");
- 
- 	SONIC_WRITE(SONIC_CMD, SONIC_CR_TXP);
- 
- 	dev->trans_start = jiffies;
- 
--	if (lp->cur_tx < lp->dirty_tx + SONIC_NUM_TDS)
--		netif_start_queue(dev);
--	else
--		lp->tx_full = 1;
--
- 	return 0;
- }
- 
-@@ -164,175 +297,199 @@
- static irqreturn_t sonic_interrupt(int irq, void *dev_id, struct pt_regs *regs)
- {
- 	struct net_device *dev = (struct net_device *) dev_id;
--	unsigned int base_addr = dev->base_addr;
--	struct sonic_local *lp;
-+	struct sonic_local *lp = netdev_priv(dev);
- 	int status;
- 
- 	if (dev == NULL) {
--		printk("sonic_interrupt: irq %d for unknown device.\n", irq);
-+		printk(KERN_ERR "sonic_interrupt: irq %d for unknown device.\n", irq);
- 		return IRQ_NONE;
- 	}
- 
--	lp = (struct sonic_local *) dev->priv;
--
--	status = SONIC_READ(SONIC_ISR);
--	SONIC_WRITE(SONIC_ISR, 0x7fff);	/* clear all bits */
--
--	if (sonic_debug > 2)
--		printk("sonic_interrupt: ISR=%x\n", status);
--
--	if (status & SONIC_INT_PKTRX) {
--		sonic_rx(dev);	/* got packet(s) */
--	}
--
--	if (status & SONIC_INT_TXDN) {
--		int dirty_tx = lp->dirty_tx;
-+	if (!(status = SONIC_READ(SONIC_ISR) & SONIC_IMR_DEFAULT))
-+		return IRQ_NONE;
- 
--		while (dirty_tx < lp->cur_tx) {
--			int entry = dirty_tx & SONIC_TDS_MASK;
--			int status = lp->tda[entry].tx_status;
-+	do {
-+		if (status & SONIC_INT_PKTRX) {
-+			if (sonic_debug > 2)
-+				printk("%s: packet rx\n", dev->name);
-+			sonic_rx(dev);	/* got packet(s) */
-+			SONIC_WRITE(SONIC_ISR, SONIC_INT_PKTRX); /* clear the interrupt */
-+		}
- 
--			if (sonic_debug > 3)
--				printk
--				    ("sonic_interrupt: status %d, cur_tx %d, dirty_tx %d\n",
--				     status, lp->cur_tx, lp->dirty_tx);
-+		if (status & SONIC_INT_TXDN) {
-+			int entry = lp->cur_tx;
-+			int td_status;
-+			int freed_some = 0;
-+
-+			/* At this point, cur_tx is the index of a TD that is one of:
-+			 *   unallocated/freed                          (status set   & tx_skb[entry] clear)
-+			 *   allocated and sent                         (status set   & tx_skb[entry] set  )
-+			 *   allocated and not yet sent                 (status clear & tx_skb[entry] set  )
-+			 *   still being allocated by sonic_send_packet (status clear & tx_skb[entry] clear)
-+			 */
- 
--			if (status == 0) {
--				/* It still hasn't been Txed, kick the sonic again */
--				SONIC_WRITE(SONIC_CMD, SONIC_CR_TXP);
--				break;
--			}
-+			if (sonic_debug > 2)
-+				printk("%s: tx done\n", dev->name);
- 
--			/* put back EOL and free descriptor */
--			lp->tda[entry].tx_frag_count = 0;
--			lp->tda[entry].tx_status = 0;
--
--			if (status & 0x0001)
--				lp->stats.tx_packets++;
--			else {
--				lp->stats.tx_errors++;
--				if (status & 0x0642)
--					lp->stats.tx_aborted_errors++;
--				if (status & 0x0180)
--					lp->stats.tx_carrier_errors++;
--				if (status & 0x0020)
--					lp->stats.tx_window_errors++;
--				if (status & 0x0004)
--					lp->stats.tx_fifo_errors++;
--			}
-+			while (lp->tx_skb[entry] != NULL) {
-+				if ((td_status = sonic_tda_get(dev, entry, SONIC_TD_STATUS)) == 0)
-+					break;
-+
-+				if (td_status & 0x0001) {
-+					lp->stats.tx_packets++;
-+					lp->stats.tx_bytes += sonic_tda_get(dev, entry, SONIC_TD_PKTSIZE);
-+				} else {
-+					lp->stats.tx_errors++;
-+					if (td_status & 0x0642)
-+						lp->stats.tx_aborted_errors++;
-+					if (td_status & 0x0180)
-+						lp->stats.tx_carrier_errors++;
-+					if (td_status & 0x0020)
-+						lp->stats.tx_window_errors++;
-+					if (td_status & 0x0004)
-+						lp->stats.tx_fifo_errors++;
-+				}
- 
--			/* We must free the original skb */
--			if (lp->tx_skb[entry]) {
-+				/* We must free the original skb */
- 				dev_kfree_skb_irq(lp->tx_skb[entry]);
--				lp->tx_skb[entry] = 0;
-+				lp->tx_skb[entry] = NULL;
-+				/* and unmap DMA buffer */
-+				dma_unmap_single(lp->device, lp->tx_laddr[entry], lp->tx_len[entry], DMA_TO_DEVICE);
-+				lp->tx_laddr[entry] = (dma_addr_t)0;
-+				freed_some = 1;
-+
-+				if (sonic_tda_get(dev, entry, SONIC_TD_LINK) & SONIC_EOL) {
-+					entry = (entry + 1) & SONIC_TDS_MASK;
-+					break;
-+				}
-+				entry = (entry + 1) & SONIC_TDS_MASK;
- 			}
--			/* and the VDMA address */
--			vdma_free(lp->tx_laddr[entry]);
--			dirty_tx++;
--		}
- 
--		if (lp->tx_full
--		    && dirty_tx + SONIC_NUM_TDS > lp->cur_tx + 2) {
--			/* The ring is no longer full, clear tbusy. */
--			lp->tx_full = 0;
--			netif_wake_queue(dev);
-+			if (freed_some || lp->tx_skb[entry] == NULL)
-+				netif_wake_queue(dev);  /* The ring is no longer full */
-+			lp->cur_tx = entry;
-+			SONIC_WRITE(SONIC_ISR, SONIC_INT_TXDN); /* clear the interrupt */
- 		}
- 
--		lp->dirty_tx = dirty_tx;
--	}
-+		/*
-+		 * check error conditions
-+		 */
-+		if (status & SONIC_INT_RFO) {
-+			if (sonic_debug > 1)
-+				printk("%s: rx fifo overrun\n", dev->name);
-+			lp->stats.rx_fifo_errors++;
-+			SONIC_WRITE(SONIC_ISR, SONIC_INT_RFO); /* clear the interrupt */
-+		}
-+		if (status & SONIC_INT_RDE) {
-+			if (sonic_debug > 1)
-+				printk("%s: rx descriptors exhausted\n", dev->name);
-+			lp->stats.rx_dropped++;
-+			SONIC_WRITE(SONIC_ISR, SONIC_INT_RDE); /* clear the interrupt */
-+		}
-+		if (status & SONIC_INT_RBAE) {
-+			if (sonic_debug > 1)
-+				printk("%s: rx buffer area exceeded\n", dev->name);
-+			lp->stats.rx_dropped++;
-+			SONIC_WRITE(SONIC_ISR, SONIC_INT_RBAE); /* clear the interrupt */
-+		}
- 
--	/*
--	 * check error conditions
--	 */
--	if (status & SONIC_INT_RFO) {
--		printk("%s: receive fifo underrun\n", dev->name);
--		lp->stats.rx_fifo_errors++;
--	}
--	if (status & SONIC_INT_RDE) {
--		printk("%s: receive descriptors exhausted\n", dev->name);
--		lp->stats.rx_dropped++;
--	}
--	if (status & SONIC_INT_RBE) {
--		printk("%s: receive buffer exhausted\n", dev->name);
--		lp->stats.rx_dropped++;
--	}
--	if (status & SONIC_INT_RBAE) {
--		printk("%s: receive buffer area exhausted\n", dev->name);
--		lp->stats.rx_dropped++;
--	}
-+		/* counter overruns; all counters are 16bit wide */
-+		if (status & SONIC_INT_FAE) {
-+			lp->stats.rx_frame_errors += 65536;
-+			SONIC_WRITE(SONIC_ISR, SONIC_INT_FAE); /* clear the interrupt */
-+		}
-+		if (status & SONIC_INT_CRC) {
-+			lp->stats.rx_crc_errors += 65536;
-+			SONIC_WRITE(SONIC_ISR, SONIC_INT_CRC); /* clear the interrupt */
-+		}
-+		if (status & SONIC_INT_MP) {
-+			lp->stats.rx_missed_errors += 65536;
-+			SONIC_WRITE(SONIC_ISR, SONIC_INT_MP); /* clear the interrupt */
-+		}
- 
--	/* counter overruns; all counters are 16bit wide */
--	if (status & SONIC_INT_FAE)
--		lp->stats.rx_frame_errors += 65536;
--	if (status & SONIC_INT_CRC)
--		lp->stats.rx_crc_errors += 65536;
--	if (status & SONIC_INT_MP)
--		lp->stats.rx_missed_errors += 65536;
-+		/* transmit error */
-+		if (status & SONIC_INT_TXER) {
-+			if ((SONIC_READ(SONIC_TCR) & SONIC_TCR_FU) && (sonic_debug > 2))
-+				printk(KERN_ERR "%s: tx fifo underrun\n", dev->name);
-+			SONIC_WRITE(SONIC_ISR, SONIC_INT_TXER); /* clear the interrupt */
-+		}
- 
--	/* transmit error */
--	if (status & SONIC_INT_TXER)
--		lp->stats.tx_errors++;
-+		/* bus retry */
-+		if (status & SONIC_INT_BR) {
-+			printk(KERN_ERR "%s: Bus retry occurred! Device interrupt disabled.\n",
-+				dev->name);
-+			/* ... to help debug DMA problems causing endless interrupts. */
-+			/* Bounce the eth interface to turn on the interrupt again. */
-+			SONIC_WRITE(SONIC_IMR, 0);
-+			SONIC_WRITE(SONIC_ISR, SONIC_INT_BR); /* clear the interrupt */
-+		}
- 
--	/*
--	 * clear interrupt bits and return
--	 */
--	SONIC_WRITE(SONIC_ISR, status);
-+		/* load CAM done */
-+		if (status & SONIC_INT_LCD)
-+			SONIC_WRITE(SONIC_ISR, SONIC_INT_LCD); /* clear the interrupt */
-+	} while((status = SONIC_READ(SONIC_ISR) & SONIC_IMR_DEFAULT));
- 	return IRQ_HANDLED;
- }
- 
- /*
-- * We have a good packet(s), get it/them out of the buffers.
-+ * We have a good packet(s), pass it/them up the network stack.
-  */
- static void sonic_rx(struct net_device *dev)
- {
--	unsigned int base_addr = dev->base_addr;
--	struct sonic_local *lp = (struct sonic_local *) dev->priv;
--	sonic_rd_t *rd = &lp->rda[lp->cur_rx & SONIC_RDS_MASK];
-+	struct sonic_local *lp = netdev_priv(dev);
- 	int status;
-+	int entry = lp->cur_rx;
- 
--	while (rd->in_use == 0) {
--		struct sk_buff *skb;
-+	while (sonic_rda_get(dev, entry, SONIC_RD_IN_USE) == 0) {
-+		struct sk_buff *used_skb;
-+		struct sk_buff *new_skb;
-+		dma_addr_t new_laddr;
-+		u16 bufadr_l;
-+		u16 bufadr_h;
- 		int pkt_len;
--		unsigned char *pkt_ptr;
- 
--		status = rd->rx_status;
--		if (sonic_debug > 3)
--			printk("status %x, cur_rx %d, cur_rra %x\n",
--			       status, lp->cur_rx, lp->cur_rra);
-+		status = sonic_rda_get(dev, entry, SONIC_RD_STATUS);
- 		if (status & SONIC_RCR_PRX) {
--			pkt_len = rd->rx_pktlen;
--			pkt_ptr =
--			    (char *)
--			    sonic_chiptomem((rd->rx_pktptr_h << 16) +
--					    rd->rx_pktptr_l);
--
--			if (sonic_debug > 3)
--				printk
--				    ("pktptr %p (rba %p) h:%x l:%x, bsize h:%x l:%x\n",
--				     pkt_ptr, lp->rba, rd->rx_pktptr_h,
--				     rd->rx_pktptr_l,
--				     SONIC_READ(SONIC_RBWC1),
--				     SONIC_READ(SONIC_RBWC0));
--
- 			/* Malloc up new buffer. */
--			skb = dev_alloc_skb(pkt_len + 2);
--			if (skb == NULL) {
--				printk
--				    ("%s: Memory squeeze, dropping packet.\n",
--				     dev->name);
-+			new_skb = dev_alloc_skb(SONIC_RBSIZE + 2);
-+			if (new_skb == NULL) {
-+				printk(KERN_ERR "%s: Memory squeeze, dropping packet.\n", dev->name);
- 				lp->stats.rx_dropped++;
- 				break;
- 			}
--			skb->dev = dev;
--			skb_reserve(skb, 2);	/* 16 byte align */
--			skb_put(skb, pkt_len);	/* Make room */
--			eth_copy_and_sum(skb, pkt_ptr, pkt_len, 0);
--			skb->protocol = eth_type_trans(skb, dev);
--			netif_rx(skb);	/* pass the packet to upper layers */
-+			new_skb->dev = dev;
-+			/* provide 16 byte IP header alignment unless DMA requires otherwise */
-+			if(SONIC_BUS_SCALE(lp->dma_bitmode) == 2)
-+				skb_reserve(new_skb, 2); 
-+
-+			new_laddr = dma_map_single(lp->device, skb_put(new_skb, SONIC_RBSIZE),
-+		                               SONIC_RBSIZE, DMA_FROM_DEVICE);
-+			if (!new_laddr) {
-+				dev_kfree_skb(new_skb);
-+				printk(KERN_ERR "%s: Failed to map rx buffer, dropping packet.\n", dev->name);
-+				lp->stats.rx_dropped++;
-+				break;
-+			}
-+
-+			/* now we have a new skb to replace it, pass the used one up the stack */
-+			dma_unmap_single(lp->device, lp->rx_laddr[entry], SONIC_RBSIZE, DMA_FROM_DEVICE);
-+			used_skb = lp->rx_skb[entry];
-+			pkt_len = sonic_rda_get(dev, entry, SONIC_RD_PKTLEN);
-+			skb_trim(used_skb, pkt_len);
-+			used_skb->protocol = eth_type_trans(used_skb, dev);
-+			netif_rx(used_skb);
- 			dev->last_rx = jiffies;
- 			lp->stats.rx_packets++;
- 			lp->stats.rx_bytes += pkt_len;
- 
-+			/* and insert the new skb */
-+			lp->rx_laddr[entry] = new_laddr;
-+			lp->rx_skb[entry] = new_skb;
-+
-+			bufadr_l = (unsigned long)new_laddr & 0xffff;
-+			bufadr_h = (unsigned long)new_laddr >> 16;
-+			sonic_rra_put(dev, entry, SONIC_RR_BUFADR_L, bufadr_l);
-+			sonic_rra_put(dev, entry, SONIC_RR_BUFADR_H, bufadr_h);
- 		} else {
- 			/* This should only happen, if we enable accepting broken packets. */
- 			lp->stats.rx_errors++;
-@@ -341,29 +498,35 @@
- 			if (status & SONIC_RCR_CRCR)
- 				lp->stats.rx_crc_errors++;
- 		}
--
--		rd->in_use = 1;
--		rd = &lp->rda[(++lp->cur_rx) & SONIC_RDS_MASK];
--		/* now give back the buffer to the receive buffer area */
- 		if (status & SONIC_RCR_LPKT) {
- 			/*
--			 * this was the last packet out of the current receice buffer
-+			 * this was the last packet out of the current receive buffer
- 			 * give the buffer back to the SONIC
- 			 */
--			lp->cur_rra += sizeof(sonic_rr_t);
--			if (lp->cur_rra >
--			    (lp->rra_laddr +
--			     (SONIC_NUM_RRS -
--			      1) * sizeof(sonic_rr_t))) lp->cur_rra =
--				    lp->rra_laddr;
--			SONIC_WRITE(SONIC_RWP, lp->cur_rra & 0xffff);
-+			lp->cur_rwp += SIZEOF_SONIC_RR * SONIC_BUS_SCALE(lp->dma_bitmode);
-+			if (lp->cur_rwp >= lp->rra_end) lp->cur_rwp = lp->rra_laddr & 0xffff;
-+			SONIC_WRITE(SONIC_RWP, lp->cur_rwp);
-+			if (SONIC_READ(SONIC_ISR) & SONIC_INT_RBE) {
-+				if (sonic_debug > 2)
-+					printk("%s: rx buffer exhausted\n", dev->name);
-+				SONIC_WRITE(SONIC_ISR, SONIC_INT_RBE); /* clear the flag */
-+			}
- 		} else
--			printk
--			    ("%s: rx desc without RCR_LPKT. Shouldn't happen !?\n",
-+			printk(KERN_ERR "%s: rx desc without RCR_LPKT. Shouldn't happen !?\n",
- 			     dev->name);
-+		/*
-+		 * give back the descriptor
-+		 */
-+		sonic_rda_put(dev, entry, SONIC_RD_LINK,
-+			sonic_rda_get(dev, entry, SONIC_RD_LINK) | SONIC_EOL);
-+		sonic_rda_put(dev, entry, SONIC_RD_IN_USE, 1);
-+		sonic_rda_put(dev, lp->eol_rx, SONIC_RD_LINK,
-+			sonic_rda_get(dev, lp->eol_rx, SONIC_RD_LINK) & ~SONIC_EOL);
-+		lp->eol_rx = entry;
-+		lp->cur_rx = entry = (entry + 1) & SONIC_RDS_MASK;
- 	}
- 	/*
--	 * If any worth-while packets have been received, dev_rint()
-+	 * If any worth-while packets have been received, netif_rx()
- 	 * has done a mark_bh(NET_BH) for us and will work on them
- 	 * when we get to the bottom-half routine.
- 	 */
-@@ -376,8 +539,7 @@
-  */
- static struct net_device_stats *sonic_get_stats(struct net_device *dev)
- {
--	struct sonic_local *lp = (struct sonic_local *) dev->priv;
--	unsigned int base_addr = dev->base_addr;
-+	struct sonic_local *lp = netdev_priv(dev);
- 
- 	/* read the tally counter from the SONIC and reset them */
- 	lp->stats.rx_crc_errors += SONIC_READ(SONIC_CRCT);
-@@ -396,8 +558,7 @@
-  */
- static void sonic_multicast_list(struct net_device *dev)
- {
--	struct sonic_local *lp = (struct sonic_local *) dev->priv;
--	unsigned int base_addr = dev->base_addr;
-+	struct sonic_local *lp = netdev_priv(dev);
- 	unsigned int rcr;
- 	struct dev_mc_list *dmi = dev->mc_list;
- 	unsigned char *addr;
-@@ -413,20 +574,15 @@
- 			rcr |= SONIC_RCR_AMC;
- 		} else {
- 			if (sonic_debug > 2)
--				printk
--				    ("sonic_multicast_list: mc_count %d\n",
--				     dev->mc_count);
--			lp->cda.cam_enable = 1;	/* always enable our own address */
-+				printk("sonic_multicast_list: mc_count %d\n", dev->mc_count);
-+			sonic_set_cam_enable(dev, 1);  /* always enable our own address */
- 			for (i = 1; i <= dev->mc_count; i++) {
- 				addr = dmi->dmi_addr;
- 				dmi = dmi->next;
--				lp->cda.cam_desc[i].cam_cap0 =
--				    addr[1] << 8 | addr[0];
--				lp->cda.cam_desc[i].cam_cap1 =
--				    addr[3] << 8 | addr[2];
--				lp->cda.cam_desc[i].cam_cap2 =
--				    addr[5] << 8 | addr[4];
--				lp->cda.cam_enable |= (1 << i);
-+				sonic_cda_put(dev, i, SONIC_CD_CAP0, addr[1] << 8 | addr[0]);
-+				sonic_cda_put(dev, i, SONIC_CD_CAP1, addr[3] << 8 | addr[2]);
-+				sonic_cda_put(dev, i, SONIC_CD_CAP2, addr[5] << 8 | addr[4]);
-+				sonic_set_cam_enable(dev, sonic_get_cam_enable(dev) | (1 << i));
- 			}
- 			SONIC_WRITE(SONIC_CDC, 16);
- 			/* issue Load CAM command */
-@@ -447,19 +603,16 @@
-  */
- static int sonic_init(struct net_device *dev)
- {
--	unsigned int base_addr = dev->base_addr;
- 	unsigned int cmd;
--	struct sonic_local *lp = (struct sonic_local *) dev->priv;
--	unsigned int rra_start;
--	unsigned int rra_end;
-+	struct sonic_local *lp = netdev_priv(dev);
- 	int i;
- 
- 	/*
- 	 * put the Sonic into software-reset mode and
- 	 * disable all interrupts
- 	 */
--	SONIC_WRITE(SONIC_ISR, 0x7fff);
- 	SONIC_WRITE(SONIC_IMR, 0);
-+	SONIC_WRITE(SONIC_ISR, 0x7fff);
- 	SONIC_WRITE(SONIC_CMD, SONIC_CR_RST);
- 
- 	/*
-@@ -475,34 +628,32 @@
- 	if (sonic_debug > 2)
- 		printk("sonic_init: initialize receive resource area\n");
- 
--	rra_start = lp->rra_laddr & 0xffff;
--	rra_end =
--	    (rra_start + (SONIC_NUM_RRS * sizeof(sonic_rr_t))) & 0xffff;
--
- 	for (i = 0; i < SONIC_NUM_RRS; i++) {
--		lp->rra[i].rx_bufadr_l =
--		    (lp->rba_laddr + i * SONIC_RBSIZE) & 0xffff;
--		lp->rra[i].rx_bufadr_h =
--		    (lp->rba_laddr + i * SONIC_RBSIZE) >> 16;
--		lp->rra[i].rx_bufsize_l = SONIC_RBSIZE >> 1;
--		lp->rra[i].rx_bufsize_h = 0;
-+		u16 bufadr_l = (unsigned long)lp->rx_laddr[i] & 0xffff;
-+		u16 bufadr_h = (unsigned long)lp->rx_laddr[i] >> 16;
-+		sonic_rra_put(dev, i, SONIC_RR_BUFADR_L, bufadr_l);
-+		sonic_rra_put(dev, i, SONIC_RR_BUFADR_H, bufadr_h);
-+		sonic_rra_put(dev, i, SONIC_RR_BUFSIZE_L, SONIC_RBSIZE >> 1);
-+		sonic_rra_put(dev, i, SONIC_RR_BUFSIZE_H, 0);
- 	}
- 
- 	/* initialize all RRA registers */
--	SONIC_WRITE(SONIC_RSA, rra_start);
--	SONIC_WRITE(SONIC_REA, rra_end);
--	SONIC_WRITE(SONIC_RRP, rra_start);
--	SONIC_WRITE(SONIC_RWP, rra_end);
-+	lp->rra_end = (lp->rra_laddr + SONIC_NUM_RRS * SIZEOF_SONIC_RR *
-+					SONIC_BUS_SCALE(lp->dma_bitmode)) & 0xffff;
-+	lp->cur_rwp = (lp->rra_laddr + (SONIC_NUM_RRS - 1) * SIZEOF_SONIC_RR *
-+					SONIC_BUS_SCALE(lp->dma_bitmode)) & 0xffff;
-+  
-+	SONIC_WRITE(SONIC_RSA, lp->rra_laddr & 0xffff);
-+	SONIC_WRITE(SONIC_REA, lp->rra_end);
-+	SONIC_WRITE(SONIC_RRP, lp->rra_laddr & 0xffff);
-+	SONIC_WRITE(SONIC_RWP, lp->cur_rwp);
- 	SONIC_WRITE(SONIC_URRA, lp->rra_laddr >> 16);
--	SONIC_WRITE(SONIC_EOBC, (SONIC_RBSIZE - 2) >> 1);
--
--	lp->cur_rra =
--	    lp->rra_laddr + (SONIC_NUM_RRS - 1) * sizeof(sonic_rr_t);
-+	SONIC_WRITE(SONIC_EOBC, (SONIC_RBSIZE >> 1) - (lp->dma_bitmode ? 2 : 1));
- 
- 	/* load the resource pointers */
- 	if (sonic_debug > 3)
--		printk("sonic_init: issueing RRRA command\n");
--
-+		printk("sonic_init: issuing RRRA command\n");
-+  
- 	SONIC_WRITE(SONIC_CMD, SONIC_CR_RRRA);
- 	i = 0;
- 	while (i++ < 100) {
-@@ -511,27 +662,30 @@
- 	}
- 
- 	if (sonic_debug > 2)
--		printk("sonic_init: status=%x\n", SONIC_READ(SONIC_CMD));
--
-+		printk("sonic_init: status=%x i=%d\n", SONIC_READ(SONIC_CMD), i);
-+    
- 	/*
- 	 * Initialize the receive descriptors so that they
- 	 * become a circular linked list, ie. let the last
- 	 * descriptor point to the first again.
- 	 */
- 	if (sonic_debug > 2)
--		printk("sonic_init: initialize receive descriptors\n");
--	for (i = 0; i < SONIC_NUM_RDS; i++) {
--		lp->rda[i].rx_status = 0;
--		lp->rda[i].rx_pktlen = 0;
--		lp->rda[i].rx_pktptr_l = 0;
--		lp->rda[i].rx_pktptr_h = 0;
--		lp->rda[i].rx_seqno = 0;
--		lp->rda[i].in_use = 1;
--		lp->rda[i].link =
--		    lp->rda_laddr + (i + 1) * sizeof(sonic_rd_t);
-+		printk("sonic_init: initialize receive descriptors\n");      
-+	for (i=0; i<SONIC_NUM_RDS; i++) {
-+		sonic_rda_put(dev, i, SONIC_RD_STATUS, 0);
-+		sonic_rda_put(dev, i, SONIC_RD_PKTLEN, 0);
-+		sonic_rda_put(dev, i, SONIC_RD_PKTPTR_L, 0);
-+		sonic_rda_put(dev, i, SONIC_RD_PKTPTR_H, 0);
-+		sonic_rda_put(dev, i, SONIC_RD_SEQNO, 0);
-+		sonic_rda_put(dev, i, SONIC_RD_IN_USE, 1);
-+		sonic_rda_put(dev, i, SONIC_RD_LINK,
-+			lp->rda_laddr +
-+			((i+1) * SIZEOF_SONIC_RD * SONIC_BUS_SCALE(lp->dma_bitmode)));
- 	}
- 	/* fix last descriptor */
--	lp->rda[SONIC_NUM_RDS - 1].link = lp->rda_laddr;
-+	sonic_rda_put(dev, SONIC_NUM_RDS - 1, SONIC_RD_LINK,
-+		(lp->rda_laddr & 0xffff) | SONIC_EOL);
-+	lp->eol_rx = SONIC_NUM_RDS - 1;
- 	lp->cur_rx = 0;
- 	SONIC_WRITE(SONIC_URDA, lp->rda_laddr >> 16);
- 	SONIC_WRITE(SONIC_CRDA, lp->rda_laddr & 0xffff);
-@@ -542,34 +696,34 @@
- 	if (sonic_debug > 2)
- 		printk("sonic_init: initialize transmit descriptors\n");
- 	for (i = 0; i < SONIC_NUM_TDS; i++) {
--		lp->tda[i].tx_status = 0;
--		lp->tda[i].tx_config = 0;
--		lp->tda[i].tx_pktsize = 0;
--		lp->tda[i].tx_frag_count = 0;
--		lp->tda[i].link =
--		    (lp->tda_laddr +
--		     (i + 1) * sizeof(sonic_td_t)) | SONIC_END_OF_LINKS;
-+		sonic_tda_put(dev, i, SONIC_TD_STATUS, 0);
-+		sonic_tda_put(dev, i, SONIC_TD_CONFIG, 0);
-+		sonic_tda_put(dev, i, SONIC_TD_PKTSIZE, 0);
-+		sonic_tda_put(dev, i, SONIC_TD_FRAG_COUNT, 0);
-+		sonic_tda_put(dev, i, SONIC_TD_LINK,
-+			(lp->tda_laddr & 0xffff) +
-+			(i + 1) * SIZEOF_SONIC_TD * SONIC_BUS_SCALE(lp->dma_bitmode));
-+		lp->tx_skb[i] = NULL;
- 	}
--	lp->tda[SONIC_NUM_TDS - 1].link =
--	    (lp->tda_laddr & 0xffff) | SONIC_END_OF_LINKS;
-+	/* fix last descriptor */
-+	sonic_tda_put(dev, SONIC_NUM_TDS - 1, SONIC_TD_LINK,
-+		(lp->tda_laddr & 0xffff));
- 
- 	SONIC_WRITE(SONIC_UTDA, lp->tda_laddr >> 16);
- 	SONIC_WRITE(SONIC_CTDA, lp->tda_laddr & 0xffff);
--	lp->cur_tx = lp->dirty_tx = 0;
--
-+	lp->cur_tx = lp->next_tx = 0;
-+	lp->eol_tx = SONIC_NUM_TDS - 1;
-+    
- 	/*
- 	 * put our own address to CAM desc[0]
- 	 */
--	lp->cda.cam_desc[0].cam_cap0 =
--	    dev->dev_addr[1] << 8 | dev->dev_addr[0];
--	lp->cda.cam_desc[0].cam_cap1 =
--	    dev->dev_addr[3] << 8 | dev->dev_addr[2];
--	lp->cda.cam_desc[0].cam_cap2 =
--	    dev->dev_addr[5] << 8 | dev->dev_addr[4];
--	lp->cda.cam_enable = 1;
-+	sonic_cda_put(dev, 0, SONIC_CD_CAP0, dev->dev_addr[1] << 8 | dev->dev_addr[0]);
-+	sonic_cda_put(dev, 0, SONIC_CD_CAP1, dev->dev_addr[3] << 8 | dev->dev_addr[2]);
-+	sonic_cda_put(dev, 0, SONIC_CD_CAP2, dev->dev_addr[5] << 8 | dev->dev_addr[4]);
-+	sonic_set_cam_enable(dev, 1);
- 
- 	for (i = 0; i < 16; i++)
--		lp->cda.cam_desc[i].cam_entry_pointer = i;
-+		sonic_cda_put(dev, i, SONIC_CD_ENTRY_POINTER, i);
- 
- 	/*
- 	 * initialize CAM registers
-@@ -588,8 +742,8 @@
- 			break;
- 	}
- 	if (sonic_debug > 2) {
--		printk("sonic_init: CMD=%x, ISR=%x\n",
--		       SONIC_READ(SONIC_CMD), SONIC_READ(SONIC_ISR));
-+		printk("sonic_init: CMD=%x, ISR=%x\n, i=%d",
-+		       SONIC_READ(SONIC_CMD), SONIC_READ(SONIC_ISR), i);
- 	}
- 
- 	/*
-@@ -604,7 +758,7 @@
- 
- 	cmd = SONIC_READ(SONIC_CMD);
- 	if ((cmd & SONIC_CR_RXEN) == 0 || (cmd & SONIC_CR_STP) == 0)
--		printk("sonic_init: failed, status=%x\n", cmd);
-+		printk(KERN_ERR "sonic_init: failed, status=%x\n", cmd);
- 
- 	if (sonic_debug > 2)
- 		printk("sonic_init: new status=%x\n",
---- orig/drivers/net/sonic.h	Sun Jul 10 22:11:34 2005
-+++ linux/drivers/net/sonic.h	Sun Jul 10 22:11:46 2005
-@@ -1,5 +1,5 @@
- /*
-- * Helpfile for sonic.c
-+ * Header file for sonic.c
-  *
-  * (C) Waldorf Electronics, Germany
-  * Written by Andreas Busse
-@@ -9,10 +9,16 @@
-  * and pad structure members must be exchanged. Also, the structures
-  * need to be changed accordingly to the bus size. 
-  *
-- * 981229 MSch:	did just that for the 68k Mac port (32 bit, big endian),
-- *		see CONFIG_MACSONIC branch below.
-+ * 981229 MSch:	did just that for the 68k Mac port (32 bit, big endian)
-  *
-+ * 990611 David Huggins-Daines <dhd at debian.org>: This machine abstraction
-+ * does not cope with 16-bit bus sizes very well.  Therefore I have
-+ * rewritten it with ugly macros and evil inlines.
-+ *
-+ * 050625 Finn Thain: introduced more 32-bit cards and dhd's support
-+ *        for 16-bit cards (from the mac68k project).
-  */
-+
- #ifndef SONIC_H
- #define SONIC_H
- 
-@@ -83,6 +89,7 @@
- /*
-  * Error counters
-  */
-+
- #define SONIC_CRCT              0x2c
- #define SONIC_FAET              0x2d
- #define SONIC_MPT               0x2e
-@@ -182,14 +189,14 @@
- 
- #define SONIC_INT_BR		0x4000
- #define SONIC_INT_HBL		0x2000
--#define SONIC_INT_LCD           0x1000
--#define SONIC_INT_PINT          0x0800
--#define SONIC_INT_PKTRX         0x0400
--#define SONIC_INT_TXDN          0x0200
--#define SONIC_INT_TXER          0x0100
--#define SONIC_INT_TC            0x0080
--#define SONIC_INT_RDE           0x0040
--#define SONIC_INT_RBE           0x0020
-+#define SONIC_INT_LCD		0x1000
-+#define SONIC_INT_PINT		0x0800
-+#define SONIC_INT_PKTRX		0x0400
-+#define SONIC_INT_TXDN		0x0200
-+#define SONIC_INT_TXER		0x0100
-+#define SONIC_INT_TC		0x0080
-+#define SONIC_INT_RDE		0x0040
-+#define SONIC_INT_RBE		0x0020
- #define SONIC_INT_RBAE		0x0010
- #define SONIC_INT_CRC		0x0008
- #define SONIC_INT_FAE		0x0004
-@@ -201,224 +208,61 @@
-  * The interrupts we allow.
-  */
- 
--#define SONIC_IMR_DEFAULT	(SONIC_INT_BR | \
--				SONIC_INT_LCD | \
--                                SONIC_INT_PINT | \
-+#define SONIC_IMR_DEFAULT     ( SONIC_INT_BR | \
-+                                SONIC_INT_LCD | \
-+                                SONIC_INT_RFO | \
-                                 SONIC_INT_PKTRX | \
-                                 SONIC_INT_TXDN | \
-                                 SONIC_INT_TXER | \
-                                 SONIC_INT_RDE | \
--                                SONIC_INT_RBE | \
-                                 SONIC_INT_RBAE | \
-                                 SONIC_INT_CRC | \
-                                 SONIC_INT_FAE | \
-                                 SONIC_INT_MP)
- 
- 
--#define	SONIC_END_OF_LINKS	0x0001
--
--
--#ifdef CONFIG_MACSONIC
--/*
-- * Big endian like structures on 680x0 Macs
-- */
--
--typedef struct {
--	u32 rx_bufadr_l;	/* receive buffer ptr */
--	u32 rx_bufadr_h;
--
--	u32 rx_bufsize_l;	/* no. of words in the receive buffer */
--	u32 rx_bufsize_h;
--} sonic_rr_t;
--
--/*
-- * Sonic receive descriptor. Receive descriptors are
-- * kept in a linked list of these structures.
-- */
--
--typedef struct {
--	SREGS_PAD(pad0);
--	u16 rx_status;		/* status after reception of a packet */
--	 SREGS_PAD(pad1);
--	u16 rx_pktlen;		/* length of the packet incl. CRC */
--
--	/*
--	 * Pointers to the location in the receive buffer area (RBA)
--	 * where the packet resides. A packet is always received into
--	 * a contiguous piece of memory.
--	 */
--	 SREGS_PAD(pad2);
--	u16 rx_pktptr_l;
--	 SREGS_PAD(pad3);
--	u16 rx_pktptr_h;
--
--	 SREGS_PAD(pad4);
--	u16 rx_seqno;		/* sequence no. */
--
--	 SREGS_PAD(pad5);
--	u16 link;		/* link to next RDD (end if EOL bit set) */
--
--	/*
--	 * Owner of this descriptor, 0= driver, 1=sonic
--	 */
--
--	 SREGS_PAD(pad6);
--	u16 in_use;
--
--	caddr_t rda_next;	/* pointer to next RD */
--} sonic_rd_t;
--
--
--/*
-- * Describes a Transmit Descriptor
-- */
--typedef struct {
--	SREGS_PAD(pad0);
--	u16 tx_status;		/* status after transmission of a packet */
--	 SREGS_PAD(pad1);
--	u16 tx_config;		/* transmit configuration for this packet */
--	 SREGS_PAD(pad2);
--	u16 tx_pktsize;		/* size of the packet to be transmitted */
--	 SREGS_PAD(pad3);
--	u16 tx_frag_count;	/* no. of fragments */
--
--	 SREGS_PAD(pad4);
--	u16 tx_frag_ptr_l;
--	 SREGS_PAD(pad5);
--	u16 tx_frag_ptr_h;
--	 SREGS_PAD(pad6);
--	u16 tx_frag_size;
--
--	 SREGS_PAD(pad7);
--	u16 link;		/* ptr to next descriptor */
--} sonic_td_t;
--
--
--/*
-- * Describes an entry in the CAM Descriptor Area.
-- */
--
--typedef struct {
--	SREGS_PAD(pad0);
--	u16 cam_entry_pointer;
--	 SREGS_PAD(pad1);
--	u16 cam_cap0;
--	 SREGS_PAD(pad2);
--	u16 cam_cap1;
--	 SREGS_PAD(pad3);
--	u16 cam_cap2;
--} sonic_cd_t;
--
-+#define SONIC_EOL       0x0001
- #define CAM_DESCRIPTORS 16
- 
-+/* Offsets in the various DMA buffers accessed by the SONIC */
- 
--typedef struct {
--	sonic_cd_t cam_desc[CAM_DESCRIPTORS];
--	 SREGS_PAD(pad);
--	u16 cam_enable;
--} sonic_cda_t;
--
--#else				/* original declarations, little endian 32 bit */
--
--/*
-- * structure definitions
-- */
--
--typedef struct {
--	u32 rx_bufadr_l;	/* receive buffer ptr */
--	u32 rx_bufadr_h;
--
--	u32 rx_bufsize_l;	/* no. of words in the receive buffer */
--	u32 rx_bufsize_h;
--} sonic_rr_t;
--
--/*
-- * Sonic receive descriptor. Receive descriptors are
-- * kept in a linked list of these structures.
-- */
--
--typedef struct {
--	u16 rx_status;		/* status after reception of a packet */
--	 SREGS_PAD(pad0);
--	u16 rx_pktlen;		/* length of the packet incl. CRC */
--	 SREGS_PAD(pad1);
--
--	/*
--	 * Pointers to the location in the receive buffer area (RBA)
--	 * where the packet resides. A packet is always received into
--	 * a contiguous piece of memory.
--	 */
--	u16 rx_pktptr_l;
--	 SREGS_PAD(pad2);
--	u16 rx_pktptr_h;
--	 SREGS_PAD(pad3);
--
--	u16 rx_seqno;		/* sequence no. */
--	 SREGS_PAD(pad4);
--
--	u16 link;		/* link to next RDD (end if EOL bit set) */
--	 SREGS_PAD(pad5);
--
--	/*
--	 * Owner of this descriptor, 0= driver, 1=sonic
--	 */
--
--	u16 in_use;
--	 SREGS_PAD(pad6);
--
--	caddr_t rda_next;	/* pointer to next RD */
--} sonic_rd_t;
--
--
--/*
-- * Describes a Transmit Descriptor
-- */
--typedef struct {
--	u16 tx_status;		/* status after transmission of a packet */
--	 SREGS_PAD(pad0);
--	u16 tx_config;		/* transmit configuration for this packet */
--	 SREGS_PAD(pad1);
--	u16 tx_pktsize;		/* size of the packet to be transmitted */
--	 SREGS_PAD(pad2);
--	u16 tx_frag_count;	/* no. of fragments */
--	 SREGS_PAD(pad3);
--
--	u16 tx_frag_ptr_l;
--	 SREGS_PAD(pad4);
--	u16 tx_frag_ptr_h;
--	 SREGS_PAD(pad5);
--	u16 tx_frag_size;
--	 SREGS_PAD(pad6);
--
--	u16 link;		/* ptr to next descriptor */
--	 SREGS_PAD(pad7);
--} sonic_td_t;
--
--
--/*
-- * Describes an entry in the CAM Descriptor Area.
-- */
--
--typedef struct {
--	u16 cam_entry_pointer;
--	 SREGS_PAD(pad0);
--	u16 cam_cap0;
--	 SREGS_PAD(pad1);
--	u16 cam_cap1;
--	 SREGS_PAD(pad2);
--	u16 cam_cap2;
--	 SREGS_PAD(pad3);
--} sonic_cd_t;
--
--#define CAM_DESCRIPTORS 16
-+#define SONIC_BITMODE16 0
-+#define SONIC_BITMODE32 1
-+#define SONIC_BUS_SCALE(bitmode) ((bitmode) ? 4 : 2)
-+/* Note!  These are all measured in bus-size units, so use SONIC_BUS_SCALE */
-+#define SIZEOF_SONIC_RR 4
-+#define SONIC_RR_BUFADR_L  0
-+#define SONIC_RR_BUFADR_H  1
-+#define SONIC_RR_BUFSIZE_L 2
-+#define SONIC_RR_BUFSIZE_H 3
-+
-+#define SIZEOF_SONIC_RD 7
-+#define SONIC_RD_STATUS   0
-+#define SONIC_RD_PKTLEN   1
-+#define SONIC_RD_PKTPTR_L 2
-+#define SONIC_RD_PKTPTR_H 3
-+#define SONIC_RD_SEQNO    4
-+#define SONIC_RD_LINK     5
-+#define SONIC_RD_IN_USE   6
-+
-+#define SIZEOF_SONIC_TD 8
-+#define SONIC_TD_STATUS       0
-+#define SONIC_TD_CONFIG       1
-+#define SONIC_TD_PKTSIZE      2
-+#define SONIC_TD_FRAG_COUNT   3
-+#define SONIC_TD_FRAG_PTR_L   4
-+#define SONIC_TD_FRAG_PTR_H   5
-+#define SONIC_TD_FRAG_SIZE    6
-+#define SONIC_TD_LINK         7
-+
-+#define SIZEOF_SONIC_CD 4
-+#define SONIC_CD_ENTRY_POINTER 0
-+#define SONIC_CD_CAP0          1
-+#define SONIC_CD_CAP1          2
-+#define SONIC_CD_CAP2          3
- 
--
--typedef struct {
--	sonic_cd_t cam_desc[CAM_DESCRIPTORS];
--	u16 cam_enable;
--	 SREGS_PAD(pad);
--} sonic_cda_t;
--#endif				/* endianness */
-+#define SIZEOF_SONIC_CDA ((CAM_DESCRIPTORS * SIZEOF_SONIC_CD) + 1)
-+#define SONIC_CDA_CAM_ENABLE   (CAM_DESCRIPTORS * SIZEOF_SONIC_CD)
- 
- /*
-  * Some tunables for the buffer areas. Power of 2 is required
-@@ -426,44 +270,60 @@
-  *
-  * MSch: use more buffer space for the slow m68k Macs!
-  */
--#ifdef CONFIG_MACSONIC
--#define SONIC_NUM_RRS    32	/* number of receive resources */
--#define SONIC_NUM_RDS    SONIC_NUM_RRS	/* number of receive descriptors */
--#define SONIC_NUM_TDS    32	/* number of transmit descriptors */
--#else
--#define SONIC_NUM_RRS    16	/* number of receive resources */
--#define SONIC_NUM_RDS    SONIC_NUM_RRS	/* number of receive descriptors */
--#define SONIC_NUM_TDS    16	/* number of transmit descriptors */
--#endif
--#define SONIC_RBSIZE   1520	/* size of one resource buffer */
--
--#define SONIC_RDS_MASK   (SONIC_NUM_RDS-1)
--#define SONIC_TDS_MASK   (SONIC_NUM_TDS-1)
--
-+#define SONIC_NUM_RRS   16            /* number of receive resources */
-+#define SONIC_NUM_RDS   SONIC_NUM_RRS /* number of receive descriptors */
-+#define SONIC_NUM_TDS   16            /* number of transmit descriptors */
-+
-+#define SONIC_RDS_MASK  (SONIC_NUM_RDS-1)
-+#define SONIC_TDS_MASK  (SONIC_NUM_TDS-1)
-+
-+#define SONIC_RBSIZE	1520          /* size of one resource buffer */
-+
-+/* Again, measured in bus size units! */
-+#define SIZEOF_SONIC_DESC (SIZEOF_SONIC_CDA	\
-+	+ (SIZEOF_SONIC_TD * SONIC_NUM_TDS)	\
-+	+ (SIZEOF_SONIC_RD * SONIC_NUM_RDS)	\
-+	+ (SIZEOF_SONIC_RR * SONIC_NUM_RRS))
- 
- /* Information that need to be kept for each board. */
- struct sonic_local {
--	sonic_cda_t cda;	/* virtual CPU address of CDA */
--	sonic_td_t tda[SONIC_NUM_TDS];	/* transmit descriptor area */
--	sonic_rr_t rra[SONIC_NUM_RRS];	/* receive resource area */
--	sonic_rd_t rda[SONIC_NUM_RDS];	/* receive descriptor area */
--	struct sk_buff *tx_skb[SONIC_NUM_TDS];	/* skbuffs for packets to transmit */
--	unsigned int tx_laddr[SONIC_NUM_TDS];	/* logical DMA address fro skbuffs */
--	unsigned char *rba;	/* start of receive buffer areas */
--	unsigned int cda_laddr;	/* logical DMA address of CDA */
--	unsigned int tda_laddr;	/* logical DMA address of TDA */
--	unsigned int rra_laddr;	/* logical DMA address of RRA */
--	unsigned int rda_laddr;	/* logical DMA address of RDA */
--	unsigned int rba_laddr;	/* logical DMA address of RBA */
--	unsigned int cur_rra;	/* current indexes to resource areas */
-+	/* Bus size.  0 == 16 bits, 1 == 32 bits. */
-+	int dma_bitmode;
-+	/* Register offset within the longword (independent of endianness,
-+	   and varies from one type of Macintosh SONIC to another
-+	   (Aarrgh)) */
-+	int reg_offset;
-+	void *descriptors;
-+	/* Crud.  These areas have to be within the same 64K.  Therefore
-+       we allocate a desriptors page, and point these to places within it. */
-+	void *cda;  /* CAM descriptor area */
-+	void *tda;  /* Transmit descriptor area */
-+	void *rra;  /* Receive resource area */
-+	void *rda;  /* Receive descriptor area */
-+	struct sk_buff* volatile rx_skb[SONIC_NUM_RRS];	/* packets to be received */
-+	struct sk_buff* volatile tx_skb[SONIC_NUM_TDS];	/* packets to be transmitted */
-+	unsigned int tx_len[SONIC_NUM_TDS]; /* lengths of tx DMA mappings */
-+	/* Logical DMA addresses on MIPS, bus addresses on m68k
-+	 * (so "laddr" is a bit misleading) */
-+	dma_addr_t descriptors_laddr;
-+	u32 cda_laddr;              /* logical DMA address of CDA */
-+	u32 tda_laddr;              /* logical DMA address of TDA */
-+	u32 rra_laddr;              /* logical DMA address of RRA */
-+	u32 rda_laddr;              /* logical DMA address of RDA */
-+	dma_addr_t rx_laddr[SONIC_NUM_RRS]; /* logical DMA addresses of rx skbuffs */
-+	dma_addr_t tx_laddr[SONIC_NUM_TDS]; /* logical DMA addresses of tx skbuffs */
-+	unsigned int rra_end;
-+	unsigned int cur_rwp;
- 	unsigned int cur_rx;
--	unsigned int cur_tx;
--	unsigned int dirty_tx;	/* last unacked transmit packet */
--	char tx_full;
-+	unsigned int cur_tx;           /* first unacked transmit packet */
-+	unsigned int eol_rx;
-+	unsigned int eol_tx;           /* last unacked transmit packet */
-+	unsigned int next_tx;          /* next free TD */
-+	struct device *device;         /* generic device */
- 	struct net_device_stats stats;
- };
- 
--#define TX_TIMEOUT 6
-+#define TX_TIMEOUT (3 * HZ)
- 
- /* Index to functions, as function prototypes. */
- 
-@@ -476,6 +336,114 @@
- static void sonic_multicast_list(struct net_device *dev);
- static int sonic_init(struct net_device *dev);
- static void sonic_tx_timeout(struct net_device *dev);
-+
-+/* Internal inlines for reading/writing DMA buffers.  Note that bus
-+   size and endianness matter here, whereas they don't for registers,
-+   as far as we can tell. */
-+/* OpenBSD calls this "SWO".  I'd like to think that sonic_buf_put()
-+   is a much better name. */
-+static inline void sonic_buf_put(void* base, int bitmode,
-+				 int offset, __u16 val)
-+{
-+	if (bitmode)
-+#ifdef __BIG_ENDIAN
-+		((__u16 *) base + (offset*2))[1] = val;
-+#else
-+		((__u16 *) base + (offset*2))[0] = val;
-+#endif
-+	else
-+	 	((__u16 *) base)[offset] = val;
-+}
-+
-+static inline __u16 sonic_buf_get(void* base, int bitmode,
-+				  int offset)
-+{
-+	if (bitmode)
-+#ifdef __BIG_ENDIAN
-+		return ((volatile __u16 *) base + (offset*2))[1];
-+#else
-+		return ((volatile __u16 *) base + (offset*2))[0];
-+#endif
-+	else
-+		return ((volatile __u16 *) base)[offset];
-+}
-+
-+/* Inlines that you should actually use for reading/writing DMA buffers */
-+static inline void sonic_cda_put(struct net_device* dev, int entry,
-+				 int offset, __u16 val)
-+{
-+	struct sonic_local* lp = (struct sonic_local *) dev->priv;
-+	sonic_buf_put(lp->cda, lp->dma_bitmode,
-+		      (entry * SIZEOF_SONIC_CD) + offset, val);
-+}
-+
-+static inline __u16 sonic_cda_get(struct net_device* dev, int entry,
-+				  int offset)
-+{
-+	struct sonic_local* lp = (struct sonic_local *) dev->priv;
-+	return sonic_buf_get(lp->cda, lp->dma_bitmode,
-+			     (entry * SIZEOF_SONIC_CD) + offset);
-+}
-+
-+static inline void sonic_set_cam_enable(struct net_device* dev, __u16 val)
-+{
-+	struct sonic_local* lp = (struct sonic_local *) dev->priv;
-+	sonic_buf_put(lp->cda, lp->dma_bitmode, SONIC_CDA_CAM_ENABLE, val);
-+}
-+
-+static inline __u16 sonic_get_cam_enable(struct net_device* dev)
-+{
-+	struct sonic_local* lp = (struct sonic_local *) dev->priv;
-+	return sonic_buf_get(lp->cda, lp->dma_bitmode, SONIC_CDA_CAM_ENABLE);
-+}
-+
-+static inline void sonic_tda_put(struct net_device* dev, int entry,
-+				 int offset, __u16 val)
-+{
-+	struct sonic_local* lp = (struct sonic_local *) dev->priv;
-+	sonic_buf_put(lp->tda, lp->dma_bitmode,
-+		      (entry * SIZEOF_SONIC_TD) + offset, val);
-+}
-+
-+static inline __u16 sonic_tda_get(struct net_device* dev, int entry,
-+				  int offset)
-+{
-+	struct sonic_local* lp = (struct sonic_local *) dev->priv;
-+	return sonic_buf_get(lp->tda, lp->dma_bitmode,
-+			     (entry * SIZEOF_SONIC_TD) + offset);
-+}
-+
-+static inline void sonic_rda_put(struct net_device* dev, int entry,
-+				 int offset, __u16 val)
-+{
-+	struct sonic_local* lp = (struct sonic_local *) dev->priv;
-+	sonic_buf_put(lp->rda, lp->dma_bitmode,
-+		      (entry * SIZEOF_SONIC_RD) + offset, val);
-+}
-+
-+static inline __u16 sonic_rda_get(struct net_device* dev, int entry,
-+				  int offset)
-+{
-+	struct sonic_local* lp = (struct sonic_local *) dev->priv;
-+	return sonic_buf_get(lp->rda, lp->dma_bitmode,
-+			     (entry * SIZEOF_SONIC_RD) + offset);
-+}
-+
-+static inline void sonic_rra_put(struct net_device* dev, int entry,
-+				 int offset, __u16 val)
-+{
-+	struct sonic_local* lp = (struct sonic_local *) dev->priv;
-+	sonic_buf_put(lp->rra, lp->dma_bitmode,
-+		      (entry * SIZEOF_SONIC_RR) + offset, val);
-+}
-+
-+static inline __u16 sonic_rra_get(struct net_device* dev, int entry,
-+				  int offset)
-+{
-+	struct sonic_local* lp = (struct sonic_local *) dev->priv;
-+	return sonic_buf_get(lp->rra, lp->dma_bitmode,
-+			     (entry * SIZEOF_SONIC_RR) + offset);
-+}
- 
- static const char *version =
-     "sonic.c:v0.92 20.9.98 tsbogend at alpha.franken.de\n";

Deleted: dists/trunk/linux-2.4/debian/patches-debian/modular-ide-pnp.patch
===================================================================
--- dists/trunk/linux-2.4/debian/patches-debian/modular-ide-pnp.patch	2005-09-22 09:22:48 UTC (rev 4255)
+++ dists/trunk/linux-2.4/debian/patches-debian/modular-ide-pnp.patch	2005-09-22 09:30:47 UTC (rev 4256)
@@ -1,74 +0,0 @@
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Description: Allow modular built of ide-pnp
-## DP: Patch author: Herbert Xu, Christoph Hellwig
-## DP: Upstream status: submitted
-#
-diff -aurN a/drivers/ide/Kconfig b/drivers/ide/Kconfig
---- a/drivers/ide/Kconfig	2005-06-06 11:22:29.000000000 -0400
-+++ b/drivers/ide/Kconfig	2005-06-15 22:15:06.000000000 -0400
-@@ -315,7 +315,7 @@
- 	  Otherwise say N.
- 
- config BLK_DEV_IDEPNP
--	bool "PNP EIDE support"
-+	tristate "PNP EIDE support"
- 	depends on PNP
- 	help
- 	  If you have a PnP (Plug and Play) compatible EIDE card and
-diff -aurN a/drivers/ide/Makefile b/drivers/ide/Makefile
---- a/drivers/ide/Makefile	2005-06-06 11:22:29.000000000 -0400
-+++ b/drivers/ide/Makefile	2005-06-15 22:15:06.000000000 -0400
-@@ -23,6 +23,5 @@
- ide-core-$(CONFIG_BLK_DEV_IDEDMA)	+= ide-dma.o
- ide-core-$(CONFIG_PROC_FS)		+= ide-proc.o
--ide-core-$(CONFIG_BLK_DEV_IDEPNP)	+= ide-pnp.o
- 
- # built-in only drivers from arm/
- ide-core-$(CONFIG_IDE_ARM)		+= arm/ide_arm.o
-@@ -43,6 +42,7 @@
- 
- obj-$(CONFIG_BLK_DEV_IDE)		+= ide-core.o
- obj-$(CONFIG_IDE_GENERIC)		+= ide-generic.o
-+obj-$(CONFIG_BLK_DEV_IDEPNP)		+= ide-pnp.o
- 
- obj-$(CONFIG_BLK_DEV_IDEDISK)		+= ide-disk.o
- obj-$(CONFIG_BLK_DEV_IDECD)		+= ide-cd.o
-diff -aurN a/drivers/ide/ide-pnp.c b/drivers/ide/ide-pnp.c
---- a/drivers/ide/ide-pnp.c	2005-06-06 11:22:29.000000000 -0400
-+++ b/drivers/ide/ide-pnp.c	2005-06-15 22:15:06.000000000 -0400
-@@ -69,7 +69,21 @@
- 	.remove		= idepnp_remove,
- };
- 
--void __init pnpide_init(void)
-+int __init pnpide_init(void)
- {
--	pnp_register_driver(&idepnp_driver);
-+	return pnp_register_driver(&idepnp_driver);
- }
-+
-+#ifdef MODULE
-+static void __exit pnpide_exit(void)
-+{
-+       pnp_unregister_driver(&idepnp_driver);
-+}
-+
-+module_init(pnpide_init);
-+module_exit(pnpide_exit);
-+#endif
-+
-+MODULE_AUTHOR("Andrey Panin");
-+MODULE_DESCRIPTION("Enabler for ISAPNP IDE devices");
-+MODULE_LICENSE("GPL");
-diff -aurN a/drivers/ide/ide.c b/drivers/ide/ide.c
---- a/drivers/ide/ide.c	2005-06-06 11:22:29.000000000 -0400
-+++ b/drivers/ide/ide.c	2005-06-15 22:15:06.000000000 -0400
-@@ -1789,7 +1789,7 @@
- 	return 1;
- }
- 
--extern void pnpide_init(void);
-+extern int pnpide_init(void);
- extern void h8300_ide_init(void);
- 
- /*

Deleted: dists/trunk/linux-2.4/debian/patches-debian/modular-ide.patch
===================================================================
--- dists/trunk/linux-2.4/debian/patches-debian/modular-ide.patch	2005-09-22 09:22:48 UTC (rev 4255)
+++ dists/trunk/linux-2.4/debian/patches-debian/modular-ide.patch	2005-09-22 09:30:47 UTC (rev 4256)
@@ -1,126 +0,0 @@
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Description: fix IDE modularisation
-## DP: Patch author: Herbert Xu
-## DP: Upstream status: rejected
-#
-diff -aurN a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c
---- a/drivers/ide/ide-generic.c	2005-06-06 11:22:29.000000000 -0400
-+++ b/drivers/ide/ide-generic.c	2005-06-15 22:16:56.000000000 -0400
-@@ -11,9 +11,14 @@
- #include <linux/init.h>
- #include <linux/module.h>
- #include <linux/ide.h>
-+#include <linux/config.h>
- 
- static int __init ide_generic_init(void)
- {
-+#ifdef CONFIG_BLK_DEV_IDEPCI
-+	ide_scan_pcibus();
-+#endif
-+
- 	if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET])
- 		ide_get_lock(NULL, NULL); /* for atari only */
- 
-diff -aurN a/drivers/ide/ide.c b/drivers/ide/ide.c
---- a/drivers/ide/ide.c	2005-06-06 11:22:29.000000000 -0400
-+++ b/drivers/ide/ide.c	2005-06-15 22:16:56.000000000 -0400
-@@ -175,10 +175,11 @@
- static int initializing;	/* set while initializing built-in drivers */
- 
- DECLARE_MUTEX(ide_cfg_sem);
-+EXPORT_SYMBOL(ide_cfg_sem);
-  __cacheline_aligned_in_smp DEFINE_SPINLOCK(ide_lock);
- 
- #ifdef CONFIG_BLK_DEV_IDEPCI
--static int ide_scan_direction; /* THIS was formerly 2.2.x pci=reverse */
-+int ide_scan_direction;		/* THIS was formerly 2.2.x pci=reverse */
- #endif
- 
- #ifdef CONFIG_IDEDMA_AUTO
-@@ -1418,6 +1419,8 @@
- 
- EXPORT_SYMBOL(generic_ide_ioctl);
- 
-+EXPORT_SYMBOL(ide_add_generic_settings);
-+
- /*
-  * stridx() returns the offset of c within s,
-  * or -1 if c is '\0' or not found within s.
-@@ -1797,9 +1800,9 @@
-  */
- static void __init probe_for_hwifs (void)
- {
--#ifdef CONFIG_BLK_DEV_IDEPCI
--	ide_scan_pcibus(ide_scan_direction);
--#endif /* CONFIG_BLK_DEV_IDEPCI */
-+#if defined(CONFIG_BLK_DEV_IDEPCI) && !defined(MODULE)
-+	ide_scan_pcibus();
-+#endif /* CONFIG_BLK_DEV_IDEPCI && !MODULE */
- 
- #ifdef CONFIG_ETRAX_IDE
- 	{
-diff -aurN a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c
---- a/drivers/ide/setup-pci.c	2005-06-06 11:22:29.000000000 -0400
-+++ b/drivers/ide/setup-pci.c	2005-06-15 22:16:56.000000000 -0400
-@@ -837,7 +837,7 @@
-  *	boot up the pci layer takes over the job.
-  */
-  
--static int __init ide_scan_pcidev(struct pci_dev *dev)
-+static int ide_scan_pcidev(struct pci_dev *dev)
- {
- 	struct list_head *l;
- 	struct pci_driver *d;
-@@ -863,21 +863,23 @@
- 
- /**
-  *	ide_scan_pcibus		-	perform the initial IDE driver scan
-- *	@scan_direction: set for reverse order scanning
-  *
-  *	Perform the initial bus rather than driver ordered scan of the
-  *	PCI drivers. After this all IDE pci handling becomes standard
-  *	module ordering not traditionally ordered.
-  */
-  	
--void __init ide_scan_pcibus (int scan_direction)
-+void ide_scan_pcibus(void)
- {
- 	struct pci_dev *dev = NULL;
- 	struct pci_driver *d;
- 	struct list_head *l, *n;
- 
-+	if (!pre_init)
-+		return;
-+
- 	pre_init = 0;
--	if (!scan_direction) {
-+	if (!ide_scan_direction) {
- 		while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
- 			ide_scan_pcidev(dev);
- 		}
-@@ -899,3 +901,5 @@
- 		pci_register_driver(d);
- 	}
- }
-+
-+EXPORT_SYMBOL_GPL(ide_scan_pcibus);
-diff -aurN a/include/linux/ide.h b/include/linux/ide.h
---- a/include/linux/ide.h	2005-06-06 11:22:29.000000000 -0400
-+++ b/include/linux/ide.h	2005-06-15 22:16:56.000000000 -0400
-@@ -1115,6 +1115,7 @@
- extern	ide_hwif_t	ide_hwifs[];		/* master data repository */
- #endif
- extern int noautodma;
-+extern int ide_scan_direction;
- 
- extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs);
- extern int __ide_end_request (ide_drive_t *drive, struct request *rq, int uptodate, int nrsecs);
-@@ -1323,7 +1324,7 @@
- 
- extern int ideprobe_init(void);
- 
--extern void ide_scan_pcibus(int scan_direction) __init;
-+extern void ide_scan_pcibus(void);
- extern int ide_pci_register_driver(struct pci_driver *driver);
- extern void ide_pci_unregister_driver(struct pci_driver *driver);
- void ide_pci_setup_ports(struct pci_dev *, struct ide_pci_device_s *, int, ata_index_t *);

Deleted: dists/trunk/linux-2.4/debian/patches-debian/patch-2.6.13.1
===================================================================
--- dists/trunk/linux-2.4/debian/patches-debian/patch-2.6.13.1	2005-09-22 09:22:48 UTC (rev 4255)
+++ dists/trunk/linux-2.4/debian/patches-debian/patch-2.6.13.1	2005-09-22 09:30:47 UTC (rev 4256)
@@ -1,422 +0,0 @@
-diff --git a/arch/i386/pci/common.c b/arch/i386/pci/common.c
---- a/arch/i386/pci/common.c
-+++ b/arch/i386/pci/common.c
-@@ -165,7 +165,6 @@ static int __init pcibios_init(void)
- 	if ((pci_probe & PCI_BIOS_SORT) && !(pci_probe & PCI_NO_SORT))
- 		pcibios_sort();
- #endif
--	pci_assign_unassigned_resources();
- 	return 0;
- }
- 
-diff --git a/arch/i386/pci/i386.c b/arch/i386/pci/i386.c
---- a/arch/i386/pci/i386.c
-+++ b/arch/i386/pci/i386.c
-@@ -170,43 +170,26 @@ static void __init pcibios_allocate_reso
- static int __init pcibios_assign_resources(void)
- {
- 	struct pci_dev *dev = NULL;
--	int idx;
--	struct resource *r;
-+	struct resource *r, *pr;
- 
--	for_each_pci_dev(dev) {
--		int class = dev->class >> 8;
--
--		/* Don't touch classless devices and host bridges */
--		if (!class || class == PCI_CLASS_BRIDGE_HOST)
--			continue;
--
--		for(idx=0; idx<6; idx++) {
--			r = &dev->resource[idx];
--
--			/*
--			 *  Don't touch IDE controllers and I/O ports of video cards!
--			 */
--			if ((class == PCI_CLASS_STORAGE_IDE && idx < 4) ||
--			    (class == PCI_CLASS_DISPLAY_VGA && (r->flags & IORESOURCE_IO)))
--				continue;
--
--			/*
--			 *  We shall assign a new address to this resource, either because
--			 *  the BIOS forgot to do so or because we have decided the old
--			 *  address was unusable for some reason.
--			 */
--			if (!r->start && r->end)
--				pci_assign_resource(dev, idx);
--		}
--
--		if (pci_probe & PCI_ASSIGN_ROMS) {
-+	if (!(pci_probe & PCI_ASSIGN_ROMS)) {
-+		/* Try to use BIOS settings for ROMs, otherwise let
-+		   pci_assign_unassigned_resources() allocate the new
-+		   addresses. */
-+		for_each_pci_dev(dev) {
- 			r = &dev->resource[PCI_ROM_RESOURCE];
--			r->end -= r->start;
--			r->start = 0;
--			if (r->end)
--				pci_assign_resource(dev, PCI_ROM_RESOURCE);
-+			if (!r->flags || !r->start)
-+				continue;
-+			pr = pci_find_parent_resource(dev, r);
-+			if (!pr || request_resource(pr, r) < 0) {
-+				r->end -= r->start;
-+				r->start = 0;
-+			}
- 		}
- 	}
-+
-+	pci_assign_unassigned_resources();
-+
- 	return 0;
- }
- 
-diff --git a/crypto/cipher.c b/crypto/cipher.c
---- a/crypto/cipher.c
-+++ b/crypto/cipher.c
-@@ -191,6 +191,8 @@ static unsigned int cbc_process_encrypt(
- 	u8 *iv = desc->info;
- 	unsigned int done = 0;
- 
-+	nbytes -= bsize;
-+
- 	do {
- 		xor(iv, src);
- 		fn(crypto_tfm_ctx(tfm), dst, iv);
-@@ -198,7 +200,7 @@ static unsigned int cbc_process_encrypt(
- 
- 		src += bsize;
- 		dst += bsize;
--	} while ((done += bsize) < nbytes);
-+	} while ((done += bsize) <= nbytes);
- 
- 	return done;
- }
-@@ -219,6 +221,8 @@ static unsigned int cbc_process_decrypt(
- 	u8 *iv = desc->info;
- 	unsigned int done = 0;
- 
-+	nbytes -= bsize;
-+
- 	do {
- 		u8 *tmp_dst = *dst_p;
- 
-@@ -230,7 +234,7 @@ static unsigned int cbc_process_decrypt(
- 
- 		src += bsize;
- 		dst += bsize;
--	} while ((done += bsize) < nbytes);
-+	} while ((done += bsize) <= nbytes);
- 
- 	return done;
- }
-@@ -243,12 +247,14 @@ static unsigned int ecb_process(const st
- 	void (*fn)(void *, u8 *, const u8 *) = desc->crfn;
- 	unsigned int done = 0;
- 
-+	nbytes -= bsize;
-+
- 	do {
- 		fn(crypto_tfm_ctx(tfm), dst, src);
- 
- 		src += bsize;
- 		dst += bsize;
--	} while ((done += bsize) < nbytes);
-+	} while ((done += bsize) <= nbytes);
- 
- 	return done;
- }
-diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c
---- a/drivers/char/rtc.c
-+++ b/drivers/char/rtc.c
-@@ -938,10 +938,9 @@ found:
- 
- 	/*
- 	 * XXX Interrupt pin #7 in Espresso is shared between RTC and
--	 * PCI Slot 2 INTA# (and some INTx# in Slot 1). SA_INTERRUPT here
--	 * is asking for trouble with add-on boards. Change to SA_SHIRQ.
-+	 * PCI Slot 2 INTA# (and some INTx# in Slot 1).
- 	 */
--	if (request_irq(rtc_irq, rtc_interrupt, SA_INTERRUPT, "rtc", (void *)&rtc_port)) {
-+	if (request_irq(rtc_irq, rtc_interrupt, SA_SHIRQ, "rtc", (void *)&rtc_port)) {
- 		/*
- 		 * Standard way for sparc to print irq's is to use
- 		 * __irq_itoa(). I think for EBus it's ok to use %d.
-diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
---- a/drivers/media/video/Kconfig
-+++ b/drivers/media/video/Kconfig
-@@ -254,6 +254,7 @@ config VIDEO_SAA7134_DVB
- 	select VIDEO_BUF_DVB
- 	select DVB_MT352
- 	select DVB_CX22702
-+	select DVB_TDA1004X
- 	---help---
- 	  This adds support for DVB cards based on the
- 	  Philips saa7134 chip.
-diff --git a/drivers/pci/rom.c b/drivers/pci/rom.c
---- a/drivers/pci/rom.c
-+++ b/drivers/pci/rom.c
-@@ -21,13 +21,21 @@
-  * between the ROM and other resources, so enabling it may disable access
-  * to MMIO registers or other card memory.
-  */
--static void pci_enable_rom(struct pci_dev *pdev)
-+static int pci_enable_rom(struct pci_dev *pdev)
- {
-+	struct resource *res = pdev->resource + PCI_ROM_RESOURCE;
-+	struct pci_bus_region region;
- 	u32 rom_addr;
- 
-+	if (!res->flags)
-+		return -1;
-+
-+	pcibios_resource_to_bus(pdev, &region, res);
- 	pci_read_config_dword(pdev, pdev->rom_base_reg, &rom_addr);
--	rom_addr |= PCI_ROM_ADDRESS_ENABLE;
-+	rom_addr &= ~PCI_ROM_ADDRESS_MASK;
-+	rom_addr |= region.start | PCI_ROM_ADDRESS_ENABLE;
- 	pci_write_config_dword(pdev, pdev->rom_base_reg, rom_addr);
-+	return 0;
- }
- 
- /**
-@@ -71,19 +79,21 @@ void __iomem *pci_map_rom(struct pci_dev
- 	} else {
- 		if (res->flags & IORESOURCE_ROM_COPY) {
- 			*size = pci_resource_len(pdev, PCI_ROM_RESOURCE);
--			return (void __iomem *)pci_resource_start(pdev, PCI_ROM_RESOURCE);
-+			return (void __iomem *)pci_resource_start(pdev,
-+							     PCI_ROM_RESOURCE);
- 		} else {
- 			/* assign the ROM an address if it doesn't have one */
--			if (res->parent == NULL)
--				pci_assign_resource(pdev, PCI_ROM_RESOURCE);
--
-+			if (res->parent == NULL &&
-+			    pci_assign_resource(pdev,PCI_ROM_RESOURCE))
-+				return NULL;
- 			start = pci_resource_start(pdev, PCI_ROM_RESOURCE);
- 			*size = pci_resource_len(pdev, PCI_ROM_RESOURCE);
- 			if (*size == 0)
- 				return NULL;
- 
- 			/* Enable ROM space decodes */
--			pci_enable_rom(pdev);
-+			if (pci_enable_rom(pdev))
-+				return NULL;
- 		}
- 	}
- 
-diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
---- a/drivers/pci/setup-bus.c
-+++ b/drivers/pci/setup-bus.c
-@@ -40,7 +40,7 @@
-  * FIXME: IO should be max 256 bytes.  However, since we may
-  * have a P2P bridge below a cardbus bridge, we need 4K.
-  */
--#define CARDBUS_IO_SIZE		(256)
-+#define CARDBUS_IO_SIZE		(4*1024)
- #define CARDBUS_MEM_SIZE	(32*1024*1024)
- 
- static void __devinit
-diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
---- a/drivers/scsi/aacraid/aachba.c
-+++ b/drivers/scsi/aacraid/aachba.c
-@@ -968,7 +968,7 @@ static int aac_read(struct scsi_cmnd * s
- 		fibsize = sizeof(struct aac_read64) + 
- 			((le32_to_cpu(readcmd->sg.count) - 1) * 
- 			 sizeof (struct sgentry64));
--		BUG_ON (fibsize > (sizeof(struct hw_fib) - 
-+		BUG_ON (fibsize > (dev->max_fib_size - 
- 					sizeof(struct aac_fibhdr)));
- 		/*
- 		 *	Now send the Fib to the adapter
-diff --git a/include/net/compat.h b/include/net/compat.h
---- a/include/net/compat.h
-+++ b/include/net/compat.h
-@@ -33,7 +33,8 @@ extern asmlinkage long compat_sys_sendms
- extern asmlinkage long compat_sys_recvmsg(int,struct compat_msghdr __user *,unsigned);
- extern asmlinkage long compat_sys_getsockopt(int, int, int, char __user *, int __user *);
- extern int put_cmsg_compat(struct msghdr*, int, int, int, void *);
--extern int cmsghdr_from_user_compat_to_kern(struct msghdr *, unsigned char *,
--		int);
-+
-+struct sock;
-+extern int cmsghdr_from_user_compat_to_kern(struct msghdr *, struct sock *, unsigned char *, int);
- 
- #endif /* NET_COMPAT_H */
-diff --git a/net/compat.c b/net/compat.c
---- a/net/compat.c
-+++ b/net/compat.c
-@@ -135,13 +135,14 @@ static inline struct compat_cmsghdr __us
-  * thus placement) of cmsg headers and length are different for
-  * 32-bit apps.  -DaveM
-  */
--int cmsghdr_from_user_compat_to_kern(struct msghdr *kmsg,
-+int cmsghdr_from_user_compat_to_kern(struct msghdr *kmsg, struct sock *sk,
- 			       unsigned char *stackbuf, int stackbuf_size)
- {
- 	struct compat_cmsghdr __user *ucmsg;
- 	struct cmsghdr *kcmsg, *kcmsg_base;
- 	compat_size_t ucmlen;
- 	__kernel_size_t kcmlen, tmp;
-+	int err = -EFAULT;
- 
- 	kcmlen = 0;
- 	kcmsg_base = kcmsg = (struct cmsghdr *)stackbuf;
-@@ -156,6 +157,7 @@ int cmsghdr_from_user_compat_to_kern(str
- 
- 		tmp = ((ucmlen - CMSG_COMPAT_ALIGN(sizeof(*ucmsg))) +
- 		       CMSG_ALIGN(sizeof(struct cmsghdr)));
-+		tmp = CMSG_ALIGN(tmp);
- 		kcmlen += tmp;
- 		ucmsg = cmsg_compat_nxthdr(kmsg, ucmsg, ucmlen);
- 	}
-@@ -167,30 +169,34 @@ int cmsghdr_from_user_compat_to_kern(str
- 	 * until we have successfully copied over all of the data
- 	 * from the user.
- 	 */
--	if(kcmlen > stackbuf_size)
--		kcmsg_base = kcmsg = kmalloc(kcmlen, GFP_KERNEL);
--	if(kcmsg == NULL)
-+	if (kcmlen > stackbuf_size)
-+		kcmsg_base = kcmsg = sock_kmalloc(sk, kcmlen, GFP_KERNEL);
-+	if (kcmsg == NULL)
- 		return -ENOBUFS;
- 
- 	/* Now copy them over neatly. */
- 	memset(kcmsg, 0, kcmlen);
- 	ucmsg = CMSG_COMPAT_FIRSTHDR(kmsg);
- 	while(ucmsg != NULL) {
--		__get_user(ucmlen, &ucmsg->cmsg_len);
-+		if (__get_user(ucmlen, &ucmsg->cmsg_len))
-+			goto Efault;
-+		if (!CMSG_COMPAT_OK(ucmlen, ucmsg, kmsg))
-+			goto Einval;
- 		tmp = ((ucmlen - CMSG_COMPAT_ALIGN(sizeof(*ucmsg))) +
- 		       CMSG_ALIGN(sizeof(struct cmsghdr)));
-+		if ((char *)kcmsg_base + kcmlen - (char *)kcmsg < CMSG_ALIGN(tmp))
-+			goto Einval;
- 		kcmsg->cmsg_len = tmp;
--		__get_user(kcmsg->cmsg_level, &ucmsg->cmsg_level);
--		__get_user(kcmsg->cmsg_type, &ucmsg->cmsg_type);
--
--		/* Copy over the data. */
--		if(copy_from_user(CMSG_DATA(kcmsg),
--				  CMSG_COMPAT_DATA(ucmsg),
--				  (ucmlen - CMSG_COMPAT_ALIGN(sizeof(*ucmsg)))))
--			goto out_free_efault;
-+		tmp = CMSG_ALIGN(tmp);
-+		if (__get_user(kcmsg->cmsg_level, &ucmsg->cmsg_level) ||
-+		    __get_user(kcmsg->cmsg_type, &ucmsg->cmsg_type) ||
-+		    copy_from_user(CMSG_DATA(kcmsg),
-+				   CMSG_COMPAT_DATA(ucmsg),
-+				   (ucmlen - CMSG_COMPAT_ALIGN(sizeof(*ucmsg)))))
-+			goto Efault;
- 
- 		/* Advance. */
--		kcmsg = (struct cmsghdr *)((char *)kcmsg + CMSG_ALIGN(tmp));
-+		kcmsg = (struct cmsghdr *)((char *)kcmsg + tmp);
- 		ucmsg = cmsg_compat_nxthdr(kmsg, ucmsg, ucmlen);
- 	}
- 
-@@ -199,10 +205,12 @@ int cmsghdr_from_user_compat_to_kern(str
- 	kmsg->msg_controllen = kcmlen;
- 	return 0;
- 
--out_free_efault:
--	if(kcmsg_base != (struct cmsghdr *)stackbuf)
--		kfree(kcmsg_base);
--	return -EFAULT;
-+Einval:
-+	err = -EINVAL;
-+Efault:
-+	if (kcmsg_base != (struct cmsghdr *)stackbuf)
-+		sock_kfree_s(sk, kcmsg_base, kcmlen);
-+	return err;
- }
- 
- int put_cmsg_compat(struct msghdr *kmsg, int level, int type, int len, void *data)
-diff --git a/net/core/filter.c b/net/core/filter.c
---- a/net/core/filter.c
-+++ b/net/core/filter.c
-@@ -182,7 +182,7 @@ int sk_run_filter(struct sk_buff *skb, s
- 				A = ntohl(*(u32 *)ptr);
- 				continue;
- 			}
--			return 0;
-+			break;
- 		case BPF_LD|BPF_H|BPF_ABS:
- 			k = fentry->k;
-  load_h:
-@@ -191,7 +191,7 @@ int sk_run_filter(struct sk_buff *skb, s
- 				A = ntohs(*(u16 *)ptr);
- 				continue;
- 			}
--			return 0;
-+			break;
- 		case BPF_LD|BPF_B|BPF_ABS:
- 			k = fentry->k;
- load_b:
-@@ -200,7 +200,7 @@ load_b:
- 				A = *(u8 *)ptr;
- 				continue;
- 			}
--			return 0;
-+			break;
- 		case BPF_LD|BPF_W|BPF_LEN:
- 			A = skb->len;
- 			continue;
-diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
---- a/net/ipv4/ip_fragment.c
-+++ b/net/ipv4/ip_fragment.c
-@@ -457,7 +457,7 @@ static void ip_frag_queue(struct ipq *qp
- 
- 	if (pskb_pull(skb, ihl) == NULL)
- 		goto err;
--	if (pskb_trim(skb, end-offset))
-+	if (pskb_trim_rcsum(skb, end-offset))
- 		goto err;
- 
- 	/* Find out which fragments are in front and at the back of us
-diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
---- a/net/ipv4/raw.c
-+++ b/net/ipv4/raw.c
-@@ -358,7 +358,7 @@ static void raw_probe_proto_opt(struct f
- 
- 			if (type && code) {
- 				get_user(fl->fl_icmp_type, type);
--				__get_user(fl->fl_icmp_code, code);
-+			        get_user(fl->fl_icmp_code, code);
- 				probed = 1;
- 			}
- 			break;
-diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
---- a/net/ipv6/raw.c
-+++ b/net/ipv6/raw.c
-@@ -619,7 +619,7 @@ static void rawv6_probe_proto_opt(struct
- 
- 			if (type && code) {
- 				get_user(fl->fl_icmp_type, type);
--				__get_user(fl->fl_icmp_code, code);
-+				get_user(fl->fl_icmp_code, code);
- 				probed = 1;
- 			}
- 			break;
-diff --git a/net/socket.c b/net/socket.c
---- a/net/socket.c
-+++ b/net/socket.c
-@@ -1739,10 +1739,11 @@ asmlinkage long sys_sendmsg(int fd, stru
- 		goto out_freeiov;
- 	ctl_len = msg_sys.msg_controllen; 
- 	if ((MSG_CMSG_COMPAT & flags) && ctl_len) {
--		err = cmsghdr_from_user_compat_to_kern(&msg_sys, ctl, sizeof(ctl));
-+		err = cmsghdr_from_user_compat_to_kern(&msg_sys, sock->sk, ctl, sizeof(ctl));
- 		if (err)
- 			goto out_freeiov;
- 		ctl_buf = msg_sys.msg_control;
-+		ctl_len = msg_sys.msg_controllen;
- 	} else if (ctl_len) {
- 		if (ctl_len > sizeof(ctl))
- 		{

Deleted: dists/trunk/linux-2.4/debian/patches-debian/patch-2.6.13.2
===================================================================
--- dists/trunk/linux-2.4/debian/patches-debian/patch-2.6.13.2	2005-09-22 09:22:48 UTC (rev 4255)
+++ dists/trunk/linux-2.4/debian/patches-debian/patch-2.6.13.2	2005-09-22 09:30:47 UTC (rev 4256)
@@ -1,328 +0,0 @@
-diff --git a/arch/x86_64/ia32/ia32_ioctl.c b/arch/x86_64/ia32/ia32_ioctl.c
---- a/arch/x86_64/ia32/ia32_ioctl.c
-+++ b/arch/x86_64/ia32/ia32_ioctl.c
-@@ -24,17 +24,26 @@
- static int tiocgdev(unsigned fd, unsigned cmd,  unsigned int __user *ptr) 
- { 
- 
--	struct file *file = fget(fd);
-+	struct file *file;
- 	struct tty_struct *real_tty;
-+	int fput_needed, ret;
- 
-+	file = fget_light(fd, &fput_needed);
- 	if (!file)
- 		return -EBADF;
-+
-+	ret = -EINVAL;
- 	if (file->f_op->ioctl != tty_ioctl)
--		return -EINVAL; 
-+		goto out;
- 	real_tty = (struct tty_struct *)file->private_data;
- 	if (!real_tty) 	
--		return -EINVAL; 
--	return put_user(new_encode_dev(tty_devnum(real_tty)), ptr); 
-+		goto out;
-+
-+	ret = put_user(new_encode_dev(tty_devnum(real_tty)), ptr); 
-+
-+out:
-+	fput_light(file, fput_needed);
-+	return ret;
- } 
- 
- #define RTC_IRQP_READ32	_IOR('p', 0x0b, unsigned int)	 /* Read IRQ rate   */
-diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c
---- a/drivers/ide/pci/cmd64x.c
-+++ b/drivers/ide/pci/cmd64x.c
-@@ -608,7 +608,7 @@ static unsigned int __devinit init_chips
- 
- #ifdef __i386__
- 	if (dev->resource[PCI_ROM_RESOURCE].start) {
--		pci_write_config_byte(dev, PCI_ROM_ADDRESS, dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE);
-+		pci_write_config_dword(dev, PCI_ROM_ADDRESS, dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE);
- 		printk(KERN_INFO "%s: ROM enabled at 0x%08lx\n", name, dev->resource[PCI_ROM_RESOURCE].start);
- 	}
- #endif
-diff --git a/drivers/ide/pci/hpt34x.c b/drivers/ide/pci/hpt34x.c
---- a/drivers/ide/pci/hpt34x.c
-+++ b/drivers/ide/pci/hpt34x.c
-@@ -173,7 +173,7 @@ static unsigned int __devinit init_chips
- 
- 	if (cmd & PCI_COMMAND_MEMORY) {
- 		if (pci_resource_start(dev, PCI_ROM_RESOURCE)) {
--			pci_write_config_byte(dev, PCI_ROM_ADDRESS,
-+			pci_write_config_dword(dev, PCI_ROM_ADDRESS,
- 				dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE);
- 			printk(KERN_INFO "HPT345: ROM enabled at 0x%08lx\n",
- 				dev->resource[PCI_ROM_RESOURCE].start);
-diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c
---- a/drivers/ide/pci/hpt366.c
-+++ b/drivers/ide/pci/hpt366.c
-@@ -1334,9 +1334,13 @@ static int __devinit init_hpt366(struct 
- static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev, const char *name)
- {
- 	int ret = 0;
--	/* FIXME: Not portable */
-+
-+	/*
-+	 * FIXME: Not portable. Also, why do we enable the ROM in the first place?
-+	 * We don't seem to be using it.
-+	 */
- 	if (dev->resource[PCI_ROM_RESOURCE].start)
--		pci_write_config_byte(dev, PCI_ROM_ADDRESS,
-+		pci_write_config_dword(dev, PCI_ROM_ADDRESS,
- 			dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE);
- 
- 	pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, (L1_CACHE_BYTES / 4));
-diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
---- a/drivers/net/forcedeth.c
-+++ b/drivers/net/forcedeth.c
-@@ -1888,6 +1888,9 @@ static int nv_open(struct net_device *de
- 		writel(NVREG_MIISTAT_MASK, base + NvRegMIIStatus);
- 		dprintk(KERN_INFO "startup: got 0x%08x.\n", miistat);
- 	}
-+	/* set linkspeed to invalid value, thus force nv_update_linkspeed
-+	 * to init hw */
-+	np->linkspeed = 0; 
- 	ret = nv_update_linkspeed(dev);
- 	nv_start_rx(dev);
- 	nv_start_tx(dev);
-diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
---- a/drivers/net/sungem.c
-+++ b/drivers/net/sungem.c
-@@ -2816,7 +2816,7 @@ static int gem_ioctl(struct net_device *
- 
- #if (!defined(__sparc__) && !defined(CONFIG_PPC_PMAC))
- /* Fetch MAC address from vital product data of PCI ROM. */
--static void find_eth_addr_in_vpd(void __iomem *rom_base, int len, unsigned char *dev_addr)
-+static int find_eth_addr_in_vpd(void __iomem *rom_base, int len, unsigned char *dev_addr)
- {
- 	int this_offset;
- 
-@@ -2837,35 +2837,27 @@ static void find_eth_addr_in_vpd(void __
- 
- 		for (i = 0; i < 6; i++)
- 			dev_addr[i] = readb(p + i);
--		break;
-+		return 1;
- 	}
-+	return 0;
- }
- 
- static void get_gem_mac_nonobp(struct pci_dev *pdev, unsigned char *dev_addr)
- {
--	u32 rom_reg_orig;
--	void __iomem *p;
--
--	if (pdev->resource[PCI_ROM_RESOURCE].parent == NULL) {
--		if (pci_assign_resource(pdev, PCI_ROM_RESOURCE) < 0)
--			goto use_random;
--	}
--
--	pci_read_config_dword(pdev, pdev->rom_base_reg, &rom_reg_orig);
--	pci_write_config_dword(pdev, pdev->rom_base_reg,
--			       rom_reg_orig | PCI_ROM_ADDRESS_ENABLE);
-+	size_t size;
-+	void __iomem *p = pci_map_rom(pdev, &size);
- 
--	p = ioremap(pci_resource_start(pdev, PCI_ROM_RESOURCE), (64 * 1024));
--	if (p != NULL && readb(p) == 0x55 && readb(p + 1) == 0xaa)
--		find_eth_addr_in_vpd(p, (64 * 1024), dev_addr);
-+	if (p) {
-+			int found;
- 
--	if (p != NULL)
--		iounmap(p);
--
--	pci_write_config_dword(pdev, pdev->rom_base_reg, rom_reg_orig);
--	return;
-+		found = readb(p) == 0x55 &&
-+			readb(p + 1) == 0xaa &&
-+			find_eth_addr_in_vpd(p, (64 * 1024), dev_addr);
-+		pci_unmap_rom(pdev, p);
-+		if (found)
-+			return;
-+	}
- 
--use_random:
- 	/* Sun MAC prefix then 3 random bytes. */
- 	dev_addr[0] = 0x08;
- 	dev_addr[1] = 0x00;
-diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c
---- a/drivers/net/sunhme.c
-+++ b/drivers/net/sunhme.c
-@@ -2954,7 +2954,7 @@ static int is_quattro_p(struct pci_dev *
- }
- 
- /* Fetch MAC address from vital product data of PCI ROM. */
--static void find_eth_addr_in_vpd(void __iomem *rom_base, int len, int index, unsigned char *dev_addr)
-+static int find_eth_addr_in_vpd(void __iomem *rom_base, int len, int index, unsigned char *dev_addr)
- {
- 	int this_offset;
- 
-@@ -2977,42 +2977,33 @@ static void find_eth_addr_in_vpd(void __
- 
- 			for (i = 0; i < 6; i++)
- 				dev_addr[i] = readb(p + i);
--			break;
-+			return 1;
- 		}
- 		index--;
- 	}
-+	return 0;
- }
- 
- static void get_hme_mac_nonsparc(struct pci_dev *pdev, unsigned char *dev_addr)
- {
--	u32 rom_reg_orig;
--	void __iomem *p;
--	int index;
-+	size_t size;
-+	void __iomem *p = pci_map_rom(pdev, &size);
- 
--	index = 0;
--	if (is_quattro_p(pdev))
--		index = PCI_SLOT(pdev->devfn);
--
--	if (pdev->resource[PCI_ROM_RESOURCE].parent == NULL) {
--		if (pci_assign_resource(pdev, PCI_ROM_RESOURCE) < 0)
--			goto use_random;
-+	if (p) {
-+		int index = 0;
-+		int found;
-+
-+		if (is_quattro_p(pdev))
-+			index = PCI_SLOT(pdev->devfn);
-+
-+		found = readb(p) == 0x55 &&
-+			readb(p + 1) == 0xaa &&
-+			find_eth_addr_in_vpd(p, (64 * 1024), index, dev_addr);
-+		pci_unmap_rom(pdev, p);
-+		if (found)
-+			return;
- 	}
- 
--	pci_read_config_dword(pdev, pdev->rom_base_reg, &rom_reg_orig);
--	pci_write_config_dword(pdev, pdev->rom_base_reg,
--			       rom_reg_orig | PCI_ROM_ADDRESS_ENABLE);
--
--	p = ioremap(pci_resource_start(pdev, PCI_ROM_RESOURCE), (64 * 1024));
--	if (p != NULL && readb(p) == 0x55 && readb(p + 1) == 0xaa)
--		find_eth_addr_in_vpd(p, (64 * 1024), index, dev_addr);
--
--	if (p != NULL)
--		iounmap(p);
--
--	pci_write_config_dword(pdev, pdev->rom_base_reg, rom_reg_orig);
--	return;
--
--use_random:
- 	/* Sun MAC prefix then 3 random bytes. */
- 	dev_addr[0] = 0x08;
- 	dev_addr[1] = 0x00;
-diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
---- a/drivers/usb/serial/ftdi_sio.c
-+++ b/drivers/usb/serial/ftdi_sio.c
-@@ -874,7 +874,7 @@ static void ftdi_determine_type(struct u
- 	unsigned interfaces;
- 
- 	/* Assume it is not the original SIO device for now. */
--	priv->baud_base = 48000000 / 16;
-+	priv->baud_base = 48000000 / 2;
- 	priv->write_offset = 0;
- 
- 	version = le16_to_cpu(udev->descriptor.bcdDevice);
-diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
---- a/fs/compat_ioctl.c
-+++ b/fs/compat_ioctl.c
-@@ -798,13 +798,16 @@ static int routing_ioctl(unsigned int fd
- 		r = (void *) &r4;
- 	}
- 
--	if (ret)
--		return -EFAULT;
-+	if (ret) {
-+		ret = -EFAULT;
-+		goto out;
-+	}
- 
- 	set_fs (KERNEL_DS);
- 	ret = sys_ioctl (fd, cmd, (unsigned long) r);
- 	set_fs (old_fs);
- 
-+out:
- 	if (mysock)
- 		sockfd_put(mysock);
- 
-diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c
---- a/fs/jfs/inode.c
-+++ b/fs/jfs/inode.c
-@@ -128,21 +128,21 @@ void jfs_delete_inode(struct inode *inod
- {
- 	jfs_info("In jfs_delete_inode, inode = 0x%p", inode);
- 
--	if (is_bad_inode(inode) ||
--	    (JFS_IP(inode)->fileset != cpu_to_le32(FILESYSTEM_I)))
--			return;
-+	if (!is_bad_inode(inode) &&
-+	    (JFS_IP(inode)->fileset == cpu_to_le32(FILESYSTEM_I))) {
- 
--	if (test_cflag(COMMIT_Freewmap, inode))
--		jfs_free_zero_link(inode);
-+		if (test_cflag(COMMIT_Freewmap, inode))
-+			jfs_free_zero_link(inode);
- 
--	diFree(inode);
-+		diFree(inode);
- 
--	/*
--	 * Free the inode from the quota allocation.
--	 */
--	DQUOT_INIT(inode);
--	DQUOT_FREE_INODE(inode);
--	DQUOT_DROP(inode);
-+		/*
-+		 * Free the inode from the quota allocation.
-+		 */
-+		DQUOT_INIT(inode);
-+		DQUOT_FREE_INODE(inode);
-+		DQUOT_DROP(inode);
-+	}
- 
- 	clear_inode(inode);
- }
-diff --git a/mm/mempolicy.c b/mm/mempolicy.c
---- a/mm/mempolicy.c
-+++ b/mm/mempolicy.c
-@@ -333,8 +333,13 @@ check_range(struct mm_struct *mm, unsign
- 		if (prev && prev->vm_end < vma->vm_start)
- 			return ERR_PTR(-EFAULT);
- 		if ((flags & MPOL_MF_STRICT) && !is_vm_hugetlb_page(vma)) {
-+			unsigned long endvma = vma->vm_end; 
-+			if (endvma > end)
-+				endvma = end;
-+			if (vma->vm_start > start)
-+				start = vma->vm_start;
- 			err = check_pgd_range(vma->vm_mm,
--					   vma->vm_start, vma->vm_end, nodes);
-+					   start, endvma, nodes);
- 			if (err) {
- 				first = ERR_PTR(err);
- 				break;
-diff --git a/net/ipv4/netfilter/ipt_MASQUERADE.c b/net/ipv4/netfilter/ipt_MASQUERADE.c
---- a/net/ipv4/netfilter/ipt_MASQUERADE.c
-+++ b/net/ipv4/netfilter/ipt_MASQUERADE.c
-@@ -95,6 +95,12 @@ masquerade_target(struct sk_buff **pskb,
- 	IP_NF_ASSERT(ct && (ctinfo == IP_CT_NEW || ctinfo == IP_CT_RELATED
- 	                    || ctinfo == IP_CT_RELATED + IP_CT_IS_REPLY));
- 
-+	/* Source address is 0.0.0.0 - locally generated packet that is
-+	 * probably not supposed to be masqueraded.
-+	 */
-+	if (ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.ip == 0)
-+		return NF_ACCEPT;
-+
- 	mr = targinfo;
- 	rt = (struct rtable *)(*pskb)->dst;
- 	newsrc = inet_select_addr(out, rt->rt_gateway, RT_SCOPE_UNIVERSE);

Deleted: dists/trunk/linux-2.4/debian/patches-debian/powerpc-apus.patch
===================================================================
--- dists/trunk/linux-2.4/debian/patches-debian/powerpc-apus.patch	2005-09-22 09:22:48 UTC (rev 4255)
+++ dists/trunk/linux-2.4/debian/patches-debian/powerpc-apus.patch	2005-09-22 09:30:47 UTC (rev 4256)
@@ -1,3046 +0,0 @@
-# 
-# PowerPC/Apus support patch
-# Needed support for Amiga PowerUP boards.
-# Author: mostly Roman Zippel <zippel at linux-m68k.org>
-# Upstream status: got synced with 2.6.12 recently, so in better status than
-# previous apus patches. Only 81k left.
-#
-
-diff -Nur -x CVS linux-2.6.12/arch/ppc/amiga/amiints.c 2.6/arch/ppc/amiga/amiints.c
---- linux-2.6.12/arch/ppc/amiga/amiints.c	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/amiga/amiints.c	2004-02-04 22:21:34.000000000 +0100
-@@ -67,9 +67,10 @@
- 
- static short ami_ablecount[AMI_IRQS];
- 
--static void ami_badint(int irq, void *dev_id, struct pt_regs *fp)
-+static irqreturn_t ami_badint(int irq, void *dev_id, struct pt_regs *fp)
- {
- /*	num_spurious += 1;*/
-+	return IRQ_NONE;
- }
- 
- /*
-@@ -206,7 +207,7 @@
-  * The builtin Amiga hardware interrupt handlers.
-  */
- 
--static void ami_int1(int irq, void *dev_id, struct pt_regs *fp)
-+static irqreturn_t ami_int1(int irq, void *dev_id, struct pt_regs *fp)
- {
- 	unsigned short ints = custom.intreqr & custom.intenar;
- 
-@@ -227,9 +228,10 @@
- 		custom.intreq = IF_SOFT;
- 		amiga_do_irq(IRQ_AMIGA_SOFT, fp);
- 	}
-+	return IRQ_HANDLED;
- }
- 
--static void ami_int3(int irq, void *dev_id, struct pt_regs *fp)
-+static irqreturn_t ami_int3(int irq, void *dev_id, struct pt_regs *fp)
- {
- 	unsigned short ints = custom.intreqr & custom.intenar;
- 
-@@ -248,9 +250,11 @@
- 	/* if a vertical blank interrupt */
- 	if (ints & IF_VERTB)
- 		amiga_do_irq_list(IRQ_AMIGA_VERTB, fp);
-+
-+	return IRQ_HANDLED;
- }
- 
--static void ami_int4(int irq, void *dev_id, struct pt_regs *fp)
-+static irqreturn_t ami_int4(int irq, void *dev_id, struct pt_regs *fp)
- {
- 	unsigned short ints = custom.intreqr & custom.intenar;
- 
-@@ -277,9 +281,10 @@
- 		custom.intreq = IF_AUD3;
- 		amiga_do_irq(IRQ_AMIGA_AUD3, fp);
- 	}
-+	return IRQ_HANDLED;
- }
- 
--static void ami_int5(int irq, void *dev_id, struct pt_regs *fp)
-+static irqreturn_t ami_int5(int irq, void *dev_id, struct pt_regs *fp)
- {
- 	unsigned short ints = custom.intreqr & custom.intenar;
- 
-@@ -294,11 +299,13 @@
- 		custom.intreq = IF_DSKSYN;
- 		amiga_do_irq(IRQ_AMIGA_DSKSYN, fp);
- 	}
-+	return IRQ_HANDLED;
- }
- 
--static void ami_int7(int irq, void *dev_id, struct pt_regs *fp)
-+static irqreturn_t ami_int7(int irq, void *dev_id, struct pt_regs *fp)
- {
- 	panic ("level 7 interrupt received\n");
-+	return IRQ_NONE;
- }
- 
- #ifdef CONFIG_APUS
-diff -Nur -x CVS linux-2.6.12/arch/ppc/amiga/cia.c 2.6/arch/ppc/amiga/cia.c
---- linux-2.6.12/arch/ppc/amiga/cia.c	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/amiga/cia.c	2004-02-04 22:21:34.000000000 +0100
-@@ -134,7 +134,7 @@
- 	return cia_able_irq_private(base, mask);
- }
- 
--static void cia_handler(int irq, void *dev_id, struct pt_regs *fp)
-+static irqreturn_t cia_handler(int irq, void *dev_id, struct pt_regs *fp)
- {
- 	struct ciabase *base = (struct ciabase *)dev_id;
- 	irq_desc_t *desc;
-@@ -156,6 +156,7 @@
- 		desc++;
- 	}
- 	amiga_do_irq_list(base->server_irq, fp);
-+	return IRQ_HANDLED;
- }
- 
- void __init cia_init_IRQ(struct ciabase *base)
-diff -Nur -x CVS linux-2.6.12/arch/ppc/amiga/config.c 2.6/arch/ppc/amiga/config.c
---- linux-2.6.12/arch/ppc/amiga/config.c	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/amiga/config.c	2005-07-30 20:52:47.000000000 +0200
-@@ -20,11 +20,12 @@
- #include <linux/mm.h>
- #include <linux/kd.h>
- #include <linux/tty.h>
-+#include <linux/rtc.h>
- #include <linux/console.h>
- #include <linux/init.h>
--#ifdef CONFIG_ZORRO
-+#include <linux/interrupt.h>
- #include <linux/zorro.h>
--#endif
-+#include <linux/delay.h>
- 
- #include <asm/bootinfo.h>
- #include <asm/setup.h>
-@@ -71,29 +72,9 @@
- 
- extern char m68k_debug_device[];
- 
--static void amiga_sched_init(irqreturn_t (*handler)(int, void *, struct pt_regs *));
--/* amiga specific irq functions */
--extern void amiga_init_IRQ (void);
--extern void (*amiga_default_handler[]) (int, void *, struct pt_regs *);
--extern int amiga_request_irq (unsigned int irq,
--			      void (*handler)(int, void *, struct pt_regs *),
--                              unsigned long flags, const char *devname,
--			      void *dev_id);
--extern void amiga_free_irq (unsigned int irq, void *dev_id);
--extern void amiga_enable_irq (unsigned int);
--extern void amiga_disable_irq (unsigned int);
- static void amiga_get_model(char *model);
- static int amiga_get_hardware_list(char *buffer);
- /* amiga specific timer functions */
--static unsigned long amiga_gettimeoffset (void);
--static void a3000_gettod (int *, int *, int *, int *, int *, int *);
--static void a2000_gettod (int *, int *, int *, int *, int *, int *);
--static int amiga_hwclk (int, struct hwclk_time *);
--static int amiga_set_clock_mmss (unsigned long);
--#ifdef CONFIG_AMIGA_FLOPPY
--extern void amiga_floppy_setup(char *, int *);
--#endif
--static void amiga_reset (void);
- extern void amiga_init_sound(void);
- static void amiga_savekmsg_init(void);
- static void amiga_mem_console_write(struct console *co, const char *b,
-@@ -101,9 +82,6 @@
- void amiga_serial_console_write(struct console *co, const char *s,
- 				unsigned int count);
- static void amiga_debug_init(void);
--#ifdef CONFIG_HEARTBEAT
--static void amiga_heartbeat(int on);
--#endif
- 
- static struct console amiga_console_driver = {
- 	.name =		"debug",
-@@ -384,48 +362,15 @@
-   for (i = 0; i < 4; i++)
-     request_resource(&iomem_resource, &((struct resource *)&mb_resources)[i]);
- 
--  mach_sched_init      = amiga_sched_init;
--  mach_init_IRQ        = amiga_init_IRQ;
--#ifndef CONFIG_APUS
--  mach_default_handler = &amiga_default_handler;
--  mach_request_irq     = amiga_request_irq;
--  mach_free_irq        = amiga_free_irq;
--  enable_irq           = amiga_enable_irq;
--  disable_irq          = amiga_disable_irq;
--#endif
--  mach_get_model       = amiga_get_model;
--  mach_get_hardware_list = amiga_get_hardware_list;
--  mach_gettimeoffset   = amiga_gettimeoffset;
-   if (AMIGAHW_PRESENT(A3000_CLK)){
--    mach_gettod  = a3000_gettod;
-     rtc_resource.name = "A3000 RTC";
-     request_resource(&iomem_resource, &rtc_resource);
-   }
-   else{ /* if (AMIGAHW_PRESENT(A2000_CLK)) */
--    mach_gettod  = a2000_gettod;
-     rtc_resource.name = "A2000 RTC";
-     request_resource(&iomem_resource, &rtc_resource);
-   }
- 
--  mach_max_dma_address = 0xffffffff; /*
--				      * default MAX_DMA=0xffffffff
--				      * on all machines. If we don't
--				      * do so, the SCSI code will not
--				      * be able to allocate any mem
--				      * for transfers, unless we are
--				      * dealing with a Z2 mem only
--				      * system.                  /Jes
--				      */
--
--  mach_hwclk           = amiga_hwclk;
--  mach_set_clock_mmss  = amiga_set_clock_mmss;
--#ifdef CONFIG_AMIGA_FLOPPY
--  mach_floppy_setup    = amiga_floppy_setup;
--#endif
--  mach_reset           = amiga_reset;
--#ifdef CONFIG_HEARTBEAT
--  mach_heartbeat = amiga_heartbeat;
--#endif
- 
-   /* Fill in the clock values (based on the 700 kHz E-Clock) */
-   amiga_masterclock = 40*amiga_eclock;	/* 28 MHz */
-@@ -473,242 +418,141 @@
- 	  *(unsigned char *)ZTWO_VADDR(0xde0002) |= 0x80;
- }
- 
--static unsigned short jiffy_ticks;
--
--static void __init amiga_sched_init(irqreturn_t (*timer_routine)(int, void *,
--						struct pt_regs *))
--{
--	static struct resource sched_res = {
--	    "timer", 0x00bfd400, 0x00bfd5ff,
--	};
--	jiffy_ticks = (amiga_eclock+HZ/2)/HZ;
--
--	if (request_resource(&mb_resources._ciab, &sched_res))
--	    printk("Cannot allocate ciab.ta{lo,hi}\n");
--	ciab.cra &= 0xC0;   /* turn off timer A, continuous mode, from Eclk */
--	ciab.talo = jiffy_ticks % 256;
--	ciab.tahi = jiffy_ticks / 256;
--
--	/* install interrupt service routine for CIAB Timer A
--	 *
--	 * Please don't change this to use ciaa, as it interferes with the
--	 * SCSI code. We'll have to take a look at this later
--	 */
--	request_irq(IRQ_AMIGA_CIAB_TA, timer_routine, 0, "timer", NULL);
--	/* start timer */
--	ciab.cra |= 0x11;
--}
--
- #define TICK_SIZE 10000
- 
--extern unsigned char cia_get_irq_mask(unsigned int irq);
--
--/* This is always executed with interrupts disabled.  */
--static unsigned long amiga_gettimeoffset (void)
--{
--	unsigned short hi, lo, hi2;
--	unsigned long ticks, offset = 0;
--
--	/* read CIA B timer A current value */
--	hi  = ciab.tahi;
--	lo  = ciab.talo;
--	hi2 = ciab.tahi;
--
--	if (hi != hi2) {
--		lo = ciab.talo;
--		hi = hi2;
--	}
--
--	ticks = hi << 8 | lo;
--
--	if (ticks > jiffy_ticks / 2)
--		/* check for pending interrupt */
--		if (cia_get_irq_mask(IRQ_AMIGA_CIAB) & CIA_ICR_TA)
--			offset = 10000;
--
--	ticks = jiffy_ticks - ticks;
--	ticks = (10000 * ticks) / jiffy_ticks;
--
--	return ticks + offset;
--}
--
--static void a3000_gettod (int *yearp, int *monp, int *dayp,
--			  int *hourp, int *minp, int *secp)
--{
--	volatile struct tod3000 *tod = TOD_3000;
--
--	tod->cntrl1 = TOD3000_CNTRL1_HOLD;
--
--	*secp  = tod->second1 * 10 + tod->second2;
--	*minp  = tod->minute1 * 10 + tod->minute2;
--	*hourp = tod->hour1   * 10 + tod->hour2;
--	*dayp  = tod->day1    * 10 + tod->day2;
--	*monp  = tod->month1  * 10 + tod->month2;
--	*yearp = tod->year1   * 10 + tod->year2;
--
--	tod->cntrl1 = TOD3000_CNTRL1_FREE;
--}
--
--static void a2000_gettod (int *yearp, int *monp, int *dayp,
--			  int *hourp, int *minp, int *secp)
--{
--	volatile struct tod2000 *tod = TOD_2000;
--
--	tod->cntrl1 = TOD2000_CNTRL1_HOLD;
--
--	while (tod->cntrl1 & TOD2000_CNTRL1_BUSY)
--		;
--
--	*secp  = tod->second1     * 10 + tod->second2;
--	*minp  = tod->minute1     * 10 + tod->minute2;
--	*hourp = (tod->hour1 & 3) * 10 + tod->hour2;
--	*dayp  = tod->day1        * 10 + tod->day2;
--	*monp  = tod->month1      * 10 + tod->month2;
--	*yearp = tod->year1       * 10 + tod->year2;
--
--	if (!(tod->cntrl3 & TOD2000_CNTRL3_24HMODE)){
--		if (!(tod->hour1 & TOD2000_HOUR1_PM) && *hourp == 12)
--			*hourp = 0;
--		else if ((tod->hour1 & TOD2000_HOUR1_PM) && *hourp != 12)
--			*hourp += 12;
--	}
--
--	tod->cntrl1 &= ~TOD2000_CNTRL1_HOLD;
--}
--
--static int amiga_hwclk(int op, struct hwclk_time *t)
-+int amiga_hwclk(int op, struct rtc_time *t)
- {
- 	if (AMIGAHW_PRESENT(A3000_CLK)) {
--		volatile struct tod3000 *tod = TOD_3000;
--
--		tod->cntrl1 = TOD3000_CNTRL1_HOLD;
-+		tod_3000.cntrl1 = TOD3000_CNTRL1_HOLD;
- 
- 		if (!op) { /* read */
--			t->sec  = tod->second1 * 10 + tod->second2;
--			t->min  = tod->minute1 * 10 + tod->minute2;
--			t->hour = tod->hour1   * 10 + tod->hour2;
--			t->day  = tod->day1    * 10 + tod->day2;
--			t->wday = tod->weekday;
--			t->mon  = tod->month1  * 10 + tod->month2 - 1;
--			t->year = tod->year1   * 10 + tod->year2;
--			if (t->year <= 69)
--				t->year += 100;
-+			t->tm_sec  = tod_3000.second1 * 10 + tod_3000.second2;
-+			t->tm_min  = tod_3000.minute1 * 10 + tod_3000.minute2;
-+			t->tm_hour = tod_3000.hour1   * 10 + tod_3000.hour2;
-+			t->tm_mday = tod_3000.day1    * 10 + tod_3000.day2;
-+			t->tm_wday = tod_3000.weekday;
-+			t->tm_mon  = tod_3000.month1  * 10 + tod_3000.month2 - 1;
-+			t->tm_year = tod_3000.year1   * 10 + tod_3000.year2;
-+			if (t->tm_year <= 69)
-+				t->tm_year += 100;
- 		} else {
--			tod->second1 = t->sec / 10;
--			tod->second2 = t->sec % 10;
--			tod->minute1 = t->min / 10;
--			tod->minute2 = t->min % 10;
--			tod->hour1   = t->hour / 10;
--			tod->hour2   = t->hour % 10;
--			tod->day1    = t->day / 10;
--			tod->day2    = t->day % 10;
--			if (t->wday != -1)
--				tod->weekday = t->wday;
--			tod->month1  = (t->mon + 1) / 10;
--			tod->month2  = (t->mon + 1) % 10;
--			if (t->year >= 100)
--				t->year -= 100;
--			tod->year1   = t->year / 10;
--			tod->year2   = t->year % 10;
-+			tod_3000.second1 = t->tm_sec / 10;
-+			tod_3000.second2 = t->tm_sec % 10;
-+			tod_3000.minute1 = t->tm_min / 10;
-+			tod_3000.minute2 = t->tm_min % 10;
-+			tod_3000.hour1   = t->tm_hour / 10;
-+			tod_3000.hour2   = t->tm_hour % 10;
-+			tod_3000.day1    = t->tm_mday / 10;
-+			tod_3000.day2    = t->tm_mday % 10;
-+			if (t->tm_wday != -1)
-+				tod_3000.weekday = t->tm_wday;
-+			tod_3000.month1  = (t->tm_mon + 1) / 10;
-+			tod_3000.month2  = (t->tm_mon + 1) % 10;
-+			if (t->tm_year >= 100)
-+				t->tm_year -= 100;
-+			tod_3000.year1   = t->tm_year / 10;
-+			tod_3000.year2   = t->tm_year % 10;
- 		}
- 
--		tod->cntrl1 = TOD3000_CNTRL1_FREE;
-+		tod_3000.cntrl1 = TOD3000_CNTRL1_FREE;
- 	} else /* if (AMIGAHW_PRESENT(A2000_CLK)) */ {
--		volatile struct tod2000 *tod = TOD_2000;
-+		int cnt = 5;
- 
--		tod->cntrl1 = TOD2000_CNTRL1_HOLD;
--	
--		while (tod->cntrl1 & TOD2000_CNTRL1_BUSY)
--			;
-+		tod_2000.cntrl1 = TOD2000_CNTRL1_HOLD;
-+
-+		while ((tod_2000.cntrl1 & TOD2000_CNTRL1_BUSY) && cnt--) {
-+			tod_2000.cntrl1 &= ~TOD2000_CNTRL1_HOLD;
-+			udelay(70);
-+			tod_2000.cntrl1 |= TOD2000_CNTRL1_HOLD;
-+		}
-+
-+		if (!cnt)
-+			printk(KERN_INFO "hwclk: timed out waiting for RTC (0x%x)\n", tod_2000.cntrl1);
- 
- 		if (!op) { /* read */
--			t->sec  = tod->second1     * 10 + tod->second2;
--			t->min  = tod->minute1     * 10 + tod->minute2;
--			t->hour = (tod->hour1 & 3) * 10 + tod->hour2;
--			t->day  = tod->day1        * 10 + tod->day2;
--			t->wday = tod->weekday;
--			t->mon  = tod->month1      * 10 + tod->month2 - 1;
--			t->year = tod->year1       * 10 + tod->year2;
--			if (t->year <= 69)
--				t->year += 100;
--
--			if (!(tod->cntrl3 & TOD2000_CNTRL3_24HMODE)){
--				if (!(tod->hour1 & TOD2000_HOUR1_PM) && t->hour == 12)
--					t->hour = 0;
--				else if ((tod->hour1 & TOD2000_HOUR1_PM) && t->hour != 12)
--					t->hour += 12;
-+			t->tm_sec  = tod_2000.second1     * 10 + tod_2000.second2;
-+			t->tm_min  = tod_2000.minute1     * 10 + tod_2000.minute2;
-+			t->tm_hour = (tod_2000.hour1 & 3) * 10 + tod_2000.hour2;
-+			t->tm_mday = tod_2000.day1        * 10 + tod_2000.day2;
-+			t->tm_wday = tod_2000.weekday;
-+			t->tm_mon  = tod_2000.month1      * 10 + tod_2000.month2 - 1;
-+			t->tm_year = tod_2000.year1       * 10 + tod_2000.year2;
-+			if (t->tm_year <= 69)
-+				t->tm_year += 100;
-+
-+			if (!(tod_2000.cntrl3 & TOD2000_CNTRL3_24HMODE)){
-+				if (!(tod_2000.hour1 & TOD2000_HOUR1_PM) && t->tm_hour == 12)
-+					t->tm_hour = 0;
-+				else if ((tod_2000.hour1 & TOD2000_HOUR1_PM) && t->tm_hour != 12)
-+					t->tm_hour += 12;
- 			}
- 		} else {
--			tod->second1 = t->sec / 10;
--			tod->second2 = t->sec % 10;
--			tod->minute1 = t->min / 10;
--			tod->minute2 = t->min % 10;
--			if (tod->cntrl3 & TOD2000_CNTRL3_24HMODE)
--				tod->hour1 = t->hour / 10;
--			else if (t->hour >= 12)
--				tod->hour1 = TOD2000_HOUR1_PM +
--					(t->hour - 12) / 10;
-+			tod_2000.second1 = t->tm_sec / 10;
-+			tod_2000.second2 = t->tm_sec % 10;
-+			tod_2000.minute1 = t->tm_min / 10;
-+			tod_2000.minute2 = t->tm_min % 10;
-+			if (tod_2000.cntrl3 & TOD2000_CNTRL3_24HMODE)
-+				tod_2000.hour1 = t->tm_hour / 10;
-+			else if (t->tm_hour >= 12)
-+				tod_2000.hour1 = TOD2000_HOUR1_PM +
-+					(t->tm_hour - 12) / 10;
- 			else
--				tod->hour1 = t->hour / 10;
--			tod->hour2   = t->hour % 10;
--			tod->day1    = t->day / 10;
--			tod->day2    = t->day % 10;
--			if (t->wday != -1)
--				tod->weekday = t->wday;
--			tod->month1  = (t->mon + 1) / 10;
--			tod->month2  = (t->mon + 1) % 10;
--			if (t->year >= 100)
--				t->year -= 100;
--			tod->year1   = t->year / 10;
--			tod->year2   = t->year % 10;
-+				tod_2000.hour1 = t->tm_hour / 10;
-+			tod_2000.hour2   = t->tm_hour % 10;
-+			tod_2000.day1    = t->tm_mday / 10;
-+			tod_2000.day2    = t->tm_mday % 10;
-+			if (t->tm_wday != -1)
-+				tod_2000.weekday = t->tm_wday;
-+			tod_2000.month1  = (t->tm_mon + 1) / 10;
-+			tod_2000.month2  = (t->tm_mon + 1) % 10;
-+			if (t->tm_year >= 100)
-+				t->tm_year -= 100;
-+			tod_2000.year1   = t->tm_year / 10;
-+			tod_2000.year2   = t->tm_year % 10;
- 		}
- 
--		tod->cntrl1 &= ~TOD2000_CNTRL1_HOLD;
-+		tod_2000.cntrl1 &= ~TOD2000_CNTRL1_HOLD;
- 	}
- 
- 	return 0;
- }
- 
--static int amiga_set_clock_mmss (unsigned long nowtime)
-+int amiga_set_clock_mmss(unsigned long nowtime)
- {
- 	short real_seconds = nowtime % 60, real_minutes = (nowtime / 60) % 60;
- 
- 	if (AMIGAHW_PRESENT(A3000_CLK)) {
--		volatile struct tod3000 *tod = TOD_3000;
--
--		tod->cntrl1 = TOD3000_CNTRL1_HOLD;
-+		tod_3000.cntrl1 = TOD3000_CNTRL1_HOLD;
- 
--		tod->second1 = real_seconds / 10;
--		tod->second2 = real_seconds % 10;
--		tod->minute1 = real_minutes / 10;
--		tod->minute2 = real_minutes % 10;
-+		tod_3000.second1 = real_seconds / 10;
-+		tod_3000.second2 = real_seconds % 10;
-+		tod_3000.minute1 = real_minutes / 10;
-+		tod_3000.minute2 = real_minutes % 10;
- 
--		tod->cntrl1 = TOD3000_CNTRL1_FREE;
-+		tod_3000.cntrl1 = TOD3000_CNTRL1_FREE;
- 	} else /* if (AMIGAHW_PRESENT(A2000_CLK)) */ {
--		volatile struct tod2000 *tod = TOD_2000;
-+		int cnt = 5;
- 
--		tod->cntrl1 = TOD2000_CNTRL1_HOLD;
--	
--		while (tod->cntrl1 & TOD2000_CNTRL1_BUSY)
--			;
--
--		tod->second1 = real_seconds / 10;
--		tod->second2 = real_seconds % 10;
--		tod->minute1 = real_minutes / 10;
--		tod->minute2 = real_minutes % 10;
-+		tod_2000.cntrl1 |= TOD2000_CNTRL1_HOLD;
- 
--		tod->cntrl1 &= ~TOD2000_CNTRL1_HOLD;
--	}
-+		while ((tod_2000.cntrl1 & TOD2000_CNTRL1_BUSY) && cnt--) {
-+			tod_2000.cntrl1 &= ~TOD2000_CNTRL1_HOLD;
-+			udelay(70);
-+			tod_2000.cntrl1 |= TOD2000_CNTRL1_HOLD;
-+		}
- 
--	return 0;
--}
-+		if (!cnt)
-+			printk(KERN_INFO "set_clock_mmss: timed out waiting for RTC (0x%x)\n", tod_2000.cntrl1);
- 
--static NORET_TYPE void amiga_reset( void )
--    ATTRIB_NORET;
-+		tod_2000.second1 = real_seconds / 10;
-+		tod_2000.second2 = real_seconds % 10;
-+		tod_2000.minute1 = real_minutes / 10;
-+		tod_2000.minute2 = real_minutes % 10;
- 
--static void amiga_reset (void)
--{
--  for (;;);
-+		tod_2000.cntrl1 &= ~TOD2000_CNTRL1_HOLD;
-+	}
-+
-+	return 0;
- }
- 
- 
-@@ -841,16 +685,6 @@
- 	}
- }
- 
--#ifdef CONFIG_HEARTBEAT
--static void amiga_heartbeat(int on)
--{
--    if (on)
--	ciaa.pra &= ~2;
--    else
--	ciaa.pra |= 2;
--}
--#endif
--
-     /*
-      *  Amiga specific parts of /proc
-      */
-@@ -943,19 +777,14 @@
- 	u_long mem;
- 	int i;
- 
--	if (mach_get_model)
--		mach_get_model(model);
--	else
--		strcpy(model, "Unknown PowerPC");
-+	amiga_get_model(model);
- 
- 	len += sprintf(buffer+len, "Model:\t\t%s\n", model);
--	len += get_cpuinfo(buffer+len);
-+	//len += get_cpuinfo(buffer+len);
- 	for (mem = 0, i = 0; i < m68k_realnum_memory; i++)
- 		mem += m68k_memory[i].size;
- 	len += sprintf(buffer+len, "System Memory:\t%ldK\n", mem>>10);
--
--	if (mach_get_hardware_list)
--		len += mach_get_hardware_list(buffer+len);
-+	len += amiga_get_hardware_list(buffer+len);
- 
- 	return(len);
- }
-diff -Nur -x CVS linux-2.6.12/arch/ppc/amiga/Makefile 2.6/arch/ppc/amiga/Makefile
---- linux-2.6.12/arch/ppc/amiga/Makefile	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/amiga/Makefile	2004-07-03 19:53:51.000000000 +0200
-@@ -1,8 +1,8 @@
- #
--# Makefile for Linux arch/m68k/amiga source directory
-+# Makefile for Linux arch/ppc/amiga source directory
- #
- 
--obj-y		:= config.o amiints.o cia.o time.o bootinfo.o amisound.o \
--			chipram.o amiga_ksyms.o
-+obj-y	:= config.o amiints.o cia.o bootinfo.o \
-+	   amisound.o chipram.o amiga_ksyms.o
- 
- obj-$(CONFIG_AMIGA_PCMCIA) += pcmcia.o
-diff -Nur -x CVS linux-2.6.12/arch/ppc/amiga/time.c 2.6/arch/ppc/amiga/time.c
---- linux-2.6.12/arch/ppc/amiga/time.c	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/amiga/time.c	1970-01-01 01:00:00.000000000 +0100
-@@ -1,58 +0,0 @@
--#include <linux/config.h> /* CONFIG_HEARTBEAT */
--#include <linux/errno.h>
--#include <linux/sched.h>
--#include <linux/kernel.h>
--#include <linux/param.h>
--#include <linux/string.h>
--#include <linux/mm.h>
--
--#include <asm/machdep.h>
--#include <asm/io.h>
--
--#include <linux/timex.h>
--
--unsigned long m68k_get_rtc_time(void)
--{
--	unsigned int year, mon, day, hour, min, sec;
--
--	extern void arch_gettod(int *year, int *mon, int *day, int *hour,
--				int *min, int *sec);
--
--	arch_gettod (&year, &mon, &day, &hour, &min, &sec);
--
--	if ((year += 1900) < 1970)
--		year += 100;
--
--	return mktime(year, mon, day, hour, min, sec);
--}
--
--int m68k_set_rtc_time(unsigned long nowtime)
--{
--  if (mach_set_clock_mmss)
--    return mach_set_clock_mmss (nowtime);
--  return -1;
--}
--
--void apus_heartbeat (void)
--{
--#ifdef CONFIG_HEARTBEAT
--	static unsigned cnt = 0, period = 0, dist = 0;
--
--	if (cnt == 0 || cnt == dist)
--                mach_heartbeat( 1 );
--	else if (cnt == 7 || cnt == dist+7)
--                mach_heartbeat( 0 );
--
--	if (++cnt > period) {
--                cnt = 0;
--                /* The hyperbolic function below modifies the heartbeat period
--                 * length in dependency of the current (5min) load. It goes
--                 * through the points f(0)=126, f(1)=86, f(5)=51,
--                 * f(inf)->30. */
--                period = ((672<<FSHIFT)/(5*avenrun[0]+(7<<FSHIFT))) + 30;
--                dist = period / 4;
--	}
--#endif
--	/* should be made smarter */
--	ppc_md.heartbeat_count = 1;
--}
-diff -Nur -x CVS linux-2.6.12/arch/ppc/configs/apus_defconfig 2.6/arch/ppc/configs/apus_defconfig
---- linux-2.6.12/arch/ppc/configs/apus_defconfig	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/configs/apus_defconfig	2005-08-04 20:04:09.000000000 +0200
-@@ -1,61 +1,99 @@
- #
- # Automatically generated make config: don't edit
-+# Linux kernel version: 2.6.12
-+# Sun Jul 31 18:13:08 2005
- #
- CONFIG_MMU=y
-+CONFIG_GENERIC_HARDIRQS=y
- CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-+CONFIG_GENERIC_CALIBRATE_DELAY=y
- CONFIG_HAVE_DEC_LOCK=y
-+CONFIG_PPC=y
-+CONFIG_PPC32=y
-+CONFIG_GENERIC_NVRAM=y
-+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
- 
- #
- # Code maturity level options
- #
- CONFIG_EXPERIMENTAL=y
-+CONFIG_CLEAN_COMPILE=y
-+CONFIG_BROKEN_ON_SMP=y
-+CONFIG_INIT_ENV_ARG_LIMIT=32
- 
- #
- # General setup
- #
-+CONFIG_LOCALVERSION=""
- CONFIG_SWAP=y
- CONFIG_SYSVIPC=y
--# CONFIG_BSD_PROCESS_ACCT is not set
-+CONFIG_POSIX_MQUEUE=y
-+CONFIG_BSD_PROCESS_ACCT=y
-+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
- CONFIG_SYSCTL=y
--CONFIG_LOG_BUF_SHIFT=14
-+# CONFIG_AUDIT is not set
-+# CONFIG_HOTPLUG is not set
-+CONFIG_KOBJECT_UEVENT=y
-+# CONFIG_IKCONFIG is not set
- # CONFIG_EMBEDDED is not set
-+CONFIG_KALLSYMS=y
-+# CONFIG_KALLSYMS_ALL is not set
-+# CONFIG_KALLSYMS_EXTRA_PASS is not set
-+CONFIG_PRINTK=y
-+CONFIG_BUG=y
-+CONFIG_BASE_FULL=y
- CONFIG_FUTEX=y
- CONFIG_EPOLL=y
-+CONFIG_SHMEM=y
-+CONFIG_CC_ALIGN_FUNCTIONS=0
-+CONFIG_CC_ALIGN_LABELS=0
-+CONFIG_CC_ALIGN_LOOPS=0
-+CONFIG_CC_ALIGN_JUMPS=0
-+# CONFIG_TINY_SHMEM is not set
-+CONFIG_BASE_SMALL=0
- 
- #
- # Loadable module support
- #
- CONFIG_MODULES=y
- CONFIG_MODULE_UNLOAD=y
--CONFIG_MODULE_FORCE_UNLOAD=y
-+# CONFIG_MODULE_FORCE_UNLOAD is not set
- CONFIG_OBSOLETE_MODPARM=y
- # CONFIG_MODVERSIONS is not set
-+# CONFIG_MODULE_SRCVERSION_ALL is not set
- CONFIG_KMOD=y
- 
- #
--# Platform support
-+# Processor
- #
--CONFIG_PPC=y
--CONFIG_PPC32=y
- CONFIG_6xx=y
- # CONFIG_40x is not set
-+# CONFIG_44x is not set
- # CONFIG_POWER3 is not set
-+# CONFIG_POWER4 is not set
- # CONFIG_8xx is not set
-+# CONFIG_E500 is not set
-+CONFIG_PPC_FPU=y
-+# CONFIG_ALTIVEC is not set
-+# CONFIG_TAU is not set
-+# CONFIG_CPU_FREQ is not set
-+# CONFIG_PM is not set
-+CONFIG_PPC_STD_MMU=y
- 
- #
--# IBM 4xx options
-+# Platform options
- #
--# CONFIG_8260 is not set
--CONFIG_GENERIC_ISA_DMA=y
--CONFIG_PPC_STD_MMU=y
--CONFIG_SERIAL_CONSOLE=y
- # CONFIG_PPC_MULTIPLATFORM is not set
- CONFIG_APUS=y
--# CONFIG_WILLOW_2 is not set
-+# CONFIG_KATANA is not set
-+# CONFIG_WILLOW is not set
-+# CONFIG_CPCI690 is not set
- # CONFIG_PCORE is not set
- # CONFIG_POWERPMC250 is not set
--# CONFIG_EV64260 is not set
-+# CONFIG_CHESTNUT is not set
- # CONFIG_SPRUCE is not set
-+# CONFIG_HDPU is not set
-+# CONFIG_EV64260 is not set
- # CONFIG_LOPEC is not set
- # CONFIG_MCPN765 is not set
- # CONFIG_MVME5100 is not set
-@@ -63,41 +101,25 @@
- # CONFIG_PRPMC750 is not set
- # CONFIG_PRPMC800 is not set
- # CONFIG_SANDPOINT is not set
-+# CONFIG_RADSTONE_PPC7D is not set
- # CONFIG_ADIR is not set
- # CONFIG_K2 is not set
- # CONFIG_PAL4 is not set
- # CONFIG_GEMINI is not set
-+# CONFIG_EST8260 is not set
-+# CONFIG_SBC82xx is not set
-+# CONFIG_SBS8260 is not set
-+# CONFIG_RPX8260 is not set
-+# CONFIG_TQM8260 is not set
-+# CONFIG_ADS8272 is not set
-+# CONFIG_PQ2FADS is not set
-+# CONFIG_LITE5200 is not set
-+# CONFIG_MPC834x_SYS is not set
- # CONFIG_SMP is not set
- # CONFIG_PREEMPT is not set
--# CONFIG_ALTIVEC is not set
--# CONFIG_TAU is not set
--# CONFIG_CPU_FREQ is not set
--
--#
--# General setup
--#
- # CONFIG_HIGHMEM is not set
--CONFIG_PCI=y
--CONFIG_PCI_DOMAINS=y
--CONFIG_PCI_PERMEDIA=y
--CONFIG_KCORE_ELF=y
- CONFIG_BINFMT_ELF=y
--CONFIG_KERNEL_ELF=y
- CONFIG_BINFMT_MISC=m
--CONFIG_PCI_LEGACY_PROC=y
--CONFIG_PCI_NAMES=y
--# CONFIG_HOTPLUG is not set
--
--#
--# Parallel port support
--#
--CONFIG_PARPORT=m
--# CONFIG_PARPORT_PC is not set
--CONFIG_PARPORT_AMIGA=m
--# CONFIG_PARPORT_MFC3 is not set
--# CONFIG_PARPORT_OTHER is not set
--# CONFIG_PARPORT_1284 is not set
--CONFIG_PPC601_SYNC_FIX=y
- # CONFIG_CMDLINE_BOOL is not set
- CONFIG_AMIGA=y
- CONFIG_ZORRO=y
-@@ -105,16 +127,34 @@
- CONFIG_APUS_FAST_EXCEPT=y
- CONFIG_AMIGA_PCMCIA=y
- CONFIG_AMIGA_BUILTIN_SERIAL=y
--CONFIG_GVPIOEXT=y
-+CONFIG_GVPIOEXT=m
- CONFIG_GVPIOEXT_LP=m
- CONFIG_GVPIOEXT_PLIP=m
--CONFIG_MULTIFACE_III_TTY=y
--CONFIG_A2232=y
--CONFIG_WHIPPET_SERIAL=y
-+CONFIG_MULTIFACE_III_TTY=m
-+CONFIG_A2232=m
-+CONFIG_WHIPPET_SERIAL=m
- CONFIG_APNE=y
-+CONFIG_SERIAL_CONSOLE=y
- CONFIG_HEARTBEAT=y
- CONFIG_PROC_HARDWARE=y
- CONFIG_ZORRO_NAMES=y
-+CONFIG_ISA_DMA_API=y
-+
-+#
-+# Bus options
-+#
-+CONFIG_GENERIC_ISA_DMA=y
-+CONFIG_PCI=y
-+CONFIG_PCI_DOMAINS=y
-+CONFIG_PCI_PERMEDIA=y
-+CONFIG_PCI_LEGACY_PROC=y
-+CONFIG_PCI_NAMES=y
-+# CONFIG_PCI_DEBUG is not set
-+
-+#
-+# PCCARD (PCMCIA/CardBus) support
-+#
-+# CONFIG_PCCARD is not set
- 
- #
- # Advanced setup
-@@ -131,14 +171,36 @@
- CONFIG_BOOT_LOAD=0x00800000
- 
- #
-+# Device Drivers
-+#
-+
-+#
-+# Generic Driver Options
-+#
-+CONFIG_STANDALONE=y
-+CONFIG_PREVENT_FIRMWARE_BUILD=y
-+# CONFIG_FW_LOADER is not set
-+# CONFIG_DEBUG_DRIVER is not set
-+
-+#
- # Memory Technology Devices (MTD)
- #
- # CONFIG_MTD is not set
- 
- #
-+# Parallel port support
-+#
-+CONFIG_PARPORT=m
-+# CONFIG_PARPORT_PC is not set
-+CONFIG_PARPORT_NOT_PC=y
-+CONFIG_PARPORT_AMIGA=m
-+# CONFIG_PARPORT_MFC3 is not set
-+# CONFIG_PARPORT_GSC is not set
-+# CONFIG_PARPORT_1284 is not set
-+
-+#
- # Plug and Play support
- #
--# CONFIG_PNP is not set
- 
- #
- # Block devices
-@@ -151,42 +213,41 @@
- # CONFIG_BLK_CPQ_CISS_DA is not set
- # CONFIG_BLK_DEV_DAC960 is not set
- # CONFIG_BLK_DEV_UMEM is not set
-+# CONFIG_BLK_DEV_COW_COMMON is not set
- CONFIG_BLK_DEV_LOOP=y
-+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
- CONFIG_BLK_DEV_NBD=m
--CONFIG_BLK_DEV_RAM=y
-+# CONFIG_BLK_DEV_SX8 is not set
-+CONFIG_BLK_DEV_RAM=m
-+CONFIG_BLK_DEV_RAM_COUNT=16
- CONFIG_BLK_DEV_RAM_SIZE=4096
--CONFIG_BLK_DEV_INITRD=y
-+CONFIG_INITRAMFS_SOURCE=""
-+# CONFIG_LBD is not set
-+# CONFIG_CDROM_PKTCDVD is not set
- 
- #
--# Multi-device support (RAID and LVM)
-+# IO Schedulers
- #
--CONFIG_MD=y
--CONFIG_BLK_DEV_MD=m
--CONFIG_MD_LINEAR=m
--CONFIG_MD_RAID0=m
--CONFIG_MD_RAID1=m
--CONFIG_MD_RAID5=m
--# CONFIG_MD_MULTIPATH is not set
--CONFIG_BLK_DEV_DM=m
-+CONFIG_IOSCHED_NOOP=y
-+CONFIG_IOSCHED_AS=y
-+CONFIG_IOSCHED_DEADLINE=y
-+CONFIG_IOSCHED_CFQ=y
-+# CONFIG_ATA_OVER_ETH is not set
- 
- #
--# ATA/IDE/MFM/RLL support
-+# ATA/ATAPI/MFM/RLL support
- #
- 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 is not set
-+# CONFIG_BLK_DEV_IDE_SATA is not set
- CONFIG_BLK_DEV_IDEDISK=y
- # CONFIG_IDEDISK_MULTI_MODE is not set
--# CONFIG_IDEDISK_STROKE is not set
- CONFIG_BLK_DEV_IDECD=y
-+# CONFIG_BLK_DEV_IDETAPE is not set
- CONFIG_BLK_DEV_IDEFLOPPY=y
- CONFIG_BLK_DEV_IDESCSI=m
- # CONFIG_IDE_TASK_IOCTL is not set
-@@ -194,15 +255,21 @@
- #
- # IDE chipset support/bugfixes
- #
-+CONFIG_IDE_GENERIC=y
- # CONFIG_BLK_DEV_IDEPCI is not set
-+# CONFIG_IDE_ARM is not set
- CONFIG_BLK_DEV_GAYLE=y
- CONFIG_BLK_DEV_IDEDOUBLER=y
- CONFIG_BLK_DEV_BUDDHA=y
-+# CONFIG_BLK_DEV_IDEDMA is not set
-+# CONFIG_IDEDMA_AUTO is not set
-+# CONFIG_BLK_DEV_HD is not set
- 
- #
--# SCSI support
-+# SCSI device support
- #
- CONFIG_SCSI=y
-+CONFIG_SCSI_PROC_FS=y
- 
- #
- # SCSI support type (disk, tape, CD-ROM)
-@@ -218,53 +285,56 @@
- # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
- #
- # CONFIG_SCSI_MULTI_LUN is not set
--# CONFIG_SCSI_REPORT_LUNS is not set
- CONFIG_SCSI_CONSTANTS=y
- CONFIG_SCSI_LOGGING=y
- 
- #
-+# SCSI Transport Attributes
-+#
-+# CONFIG_SCSI_SPI_ATTRS is not set
-+# CONFIG_SCSI_FC_ATTRS is not set
-+# CONFIG_SCSI_ISCSI_ATTRS is not set
-+
-+#
- # SCSI low-level drivers
- #
- # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-+# CONFIG_SCSI_3W_9XXX is not set
- # CONFIG_SCSI_ACARD is not set
- # CONFIG_SCSI_AACRAID is not set
- # CONFIG_SCSI_AIC7XXX is not set
- # CONFIG_SCSI_AIC7XXX_OLD is not set
- # CONFIG_SCSI_AIC79XX is not set
- # CONFIG_SCSI_DPT_I2O is not set
--# 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_MEGARAID_NEWGEN is not set
-+# CONFIG_MEGARAID_LEGACY is not set
-+# CONFIG_SCSI_SATA is not set
- # CONFIG_SCSI_BUSLOGIC is not set
--# CONFIG_SCSI_CPQFCTS is not set
- # CONFIG_SCSI_DMX3191D is not set
- # CONFIG_SCSI_EATA is not set
--# CONFIG_SCSI_EATA_PIO is not set
- # CONFIG_SCSI_FUTURE_DOMAIN is not set
- # CONFIG_SCSI_GDTH is not set
--# CONFIG_SCSI_GENERIC_NCR5380 is not set
--# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
-+# CONFIG_SCSI_IPS is not set
- # CONFIG_SCSI_INITIO is not set
- # CONFIG_SCSI_INIA100 is not set
- # CONFIG_SCSI_PPA is not set
- # CONFIG_SCSI_IMM is not set
--# CONFIG_SCSI_NCR53C7xx is not set
- # CONFIG_SCSI_SYM53C8XX_2 is not set
--# CONFIG_SCSI_NCR53C8XX is not set
--# CONFIG_SCSI_SYM53C8XX is not set
--# CONFIG_SCSI_PCI2000 is not set
--# CONFIG_SCSI_PCI2220I is not set
--# CONFIG_SCSI_QLOGIC_ISP is not set
-+# CONFIG_SCSI_IPR is not set
- # CONFIG_SCSI_QLOGIC_FC is not set
- # CONFIG_SCSI_QLOGIC_1280 is not set
-+CONFIG_SCSI_QLA2XXX=y
-+# CONFIG_SCSI_QLA21XX is not set
-+# CONFIG_SCSI_QLA22XX is not set
-+# CONFIG_SCSI_QLA2300 is not set
-+# CONFIG_SCSI_QLA2322 is not set
-+# CONFIG_SCSI_QLA6312 is not set
-+# CONFIG_SCSI_LPFC is not set
- # CONFIG_SCSI_DC395x is not set
- # CONFIG_SCSI_DC390T is not set
--# CONFIG_SCSI_U14_34F is not set
- # CONFIG_SCSI_NSP32 is not set
- # CONFIG_SCSI_DEBUG is not set
- CONFIG_A3000_SCSI=y
--CONFIG_A4000T_SCSI=y
- CONFIG_A2091_SCSI=y
- CONFIG_GVP11_SCSI=y
- CONFIG_CYBERSTORM_SCSI=y
-@@ -272,18 +342,35 @@
- CONFIG_BLZ2060_SCSI=y
- CONFIG_BLZ1230_SCSI=y
- CONFIG_FASTLANE_SCSI=y
--CONFIG_A4091_SCSI=y
--CONFIG_WARPENGINE_SCSI=y
--CONFIG_BLZ603EPLUS_SCSI=y
- CONFIG_OKTAGON_SCSI=y
- 
- #
-+# Multi-device support (RAID and LVM)
-+#
-+CONFIG_MD=y
-+CONFIG_BLK_DEV_MD=m
-+CONFIG_MD_LINEAR=m
-+CONFIG_MD_RAID0=m
-+CONFIG_MD_RAID1=m
-+CONFIG_MD_RAID10=m
-+CONFIG_MD_RAID5=m
-+# CONFIG_MD_RAID6 is not set
-+# CONFIG_MD_MULTIPATH is not set
-+# CONFIG_MD_FAULTY is not set
-+CONFIG_BLK_DEV_DM=m
-+# CONFIG_DM_CRYPT is not set
-+# CONFIG_DM_SNAPSHOT is not set
-+# CONFIG_DM_MIRROR is not set
-+# CONFIG_DM_ZERO is not set
-+# CONFIG_DM_MULTIPATH is not set
-+
-+#
- # Fusion MPT device support
- #
- # CONFIG_FUSION is not set
- 
- #
--# IEEE 1394 (FireWire) support (EXPERIMENTAL)
-+# IEEE 1394 (FireWire) support
- #
- # CONFIG_IEEE1394 is not set
- 
-@@ -293,6 +380,10 @@
- # CONFIG_I2O is not set
- 
- #
-+# Macintosh device drivers
-+#
-+
-+#
- # Networking support
- #
- CONFIG_NET=y
-@@ -300,11 +391,8 @@
- #
- # Networking options
- #
--CONFIG_PACKET=m
-+CONFIG_PACKET=y
- CONFIG_PACKET_MMAP=y
--CONFIG_NETLINK_DEV=m
--CONFIG_NETFILTER=y
--# CONFIG_NETFILTER_DEBUG is not set
- CONFIG_UNIX=y
- # CONFIG_NET_KEY is not set
- CONFIG_INET=y
-@@ -314,16 +402,29 @@
- # CONFIG_NET_IPIP is not set
- # CONFIG_NET_IPGRE is not set
- # CONFIG_ARPD is not set
--# CONFIG_INET_ECN is not set
- CONFIG_SYN_COOKIES=y
- # CONFIG_INET_AH is not set
- # CONFIG_INET_ESP is not set
- # CONFIG_INET_IPCOMP is not set
-+# CONFIG_INET_TUNNEL is not set
-+CONFIG_IP_TCPDIAG=y
-+# CONFIG_IP_TCPDIAG_IPV6 is not set
-+
-+#
-+# IP: Virtual Server Configuration
-+#
-+# CONFIG_IP_VS is not set
-+# CONFIG_IPV6 is not set
-+CONFIG_NETFILTER=y
-+# CONFIG_NETFILTER_DEBUG is not set
- 
- #
- # IP: Netfilter Configuration
- #
- CONFIG_IP_NF_CONNTRACK=m
-+# CONFIG_IP_NF_CT_ACCT is not set
-+# CONFIG_IP_NF_CONNTRACK_MARK is not set
-+# CONFIG_IP_NF_CT_PROTO_SCTP is not set
- CONFIG_IP_NF_FTP=m
- CONFIG_IP_NF_IRC=m
- CONFIG_IP_NF_TFTP=m
-@@ -331,11 +432,13 @@
- CONFIG_IP_NF_QUEUE=m
- CONFIG_IP_NF_IPTABLES=m
- CONFIG_IP_NF_MATCH_LIMIT=m
-+# CONFIG_IP_NF_MATCH_IPRANGE is not set
- CONFIG_IP_NF_MATCH_MAC=m
- # CONFIG_IP_NF_MATCH_PKTTYPE is not set
- CONFIG_IP_NF_MATCH_MARK=m
- CONFIG_IP_NF_MATCH_MULTIPORT=m
- CONFIG_IP_NF_MATCH_TOS=m
-+# CONFIG_IP_NF_MATCH_RECENT is not set
- # CONFIG_IP_NF_MATCH_ECN is not set
- # CONFIG_IP_NF_MATCH_DSCP is not set
- # CONFIG_IP_NF_MATCH_AH_ESP is not set
-@@ -345,15 +448,23 @@
- CONFIG_IP_NF_MATCH_HELPER=m
- CONFIG_IP_NF_MATCH_STATE=m
- CONFIG_IP_NF_MATCH_CONNTRACK=m
--CONFIG_IP_NF_MATCH_UNCLEAN=m
- CONFIG_IP_NF_MATCH_OWNER=m
-+# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
-+# CONFIG_IP_NF_MATCH_REALM is not set
-+# CONFIG_IP_NF_MATCH_SCTP is not set
-+# CONFIG_IP_NF_MATCH_COMMENT is not set
-+# CONFIG_IP_NF_MATCH_HASHLIMIT is not set
- CONFIG_IP_NF_FILTER=m
- CONFIG_IP_NF_TARGET_REJECT=m
--CONFIG_IP_NF_TARGET_MIRROR=m
-+CONFIG_IP_NF_TARGET_LOG=m
-+CONFIG_IP_NF_TARGET_ULOG=m
-+CONFIG_IP_NF_TARGET_TCPMSS=m
- CONFIG_IP_NF_NAT=m
- CONFIG_IP_NF_NAT_NEEDED=y
- CONFIG_IP_NF_TARGET_MASQUERADE=m
- CONFIG_IP_NF_TARGET_REDIRECT=m
-+# CONFIG_IP_NF_TARGET_NETMAP is not set
-+# CONFIG_IP_NF_TARGET_SAME is not set
- CONFIG_IP_NF_NAT_SNMP_BASIC=m
- CONFIG_IP_NF_NAT_IRC=m
- CONFIG_IP_NF_NAT_FTP=m
-@@ -364,64 +475,64 @@
- CONFIG_IP_NF_TARGET_ECN=m
- CONFIG_IP_NF_TARGET_DSCP=m
- CONFIG_IP_NF_TARGET_MARK=m
--CONFIG_IP_NF_TARGET_LOG=m
--CONFIG_IP_NF_TARGET_ULOG=m
--CONFIG_IP_NF_TARGET_TCPMSS=m
-+# CONFIG_IP_NF_TARGET_CLASSIFY is not set
-+# CONFIG_IP_NF_RAW is not set
- CONFIG_IP_NF_ARPTABLES=m
- CONFIG_IP_NF_ARPFILTER=m
--CONFIG_IP_NF_COMPAT_IPCHAINS=m
--# CONFIG_IP_NF_COMPAT_IPFWADM is not set
--# CONFIG_IPV6 is not set
--# CONFIG_XFRM_USER is not set
-+# CONFIG_IP_NF_ARP_MANGLE is not set
- 
- #
- # SCTP Configuration (EXPERIMENTAL)
- #
--CONFIG_IPV6_SCTP__=y
- # CONFIG_IP_SCTP is not set
- # CONFIG_ATM is not set
-+# CONFIG_BRIDGE is not set
- # CONFIG_VLAN_8021Q is not set
--# CONFIG_LLC is not set
- # CONFIG_DECNET is not set
--# CONFIG_BRIDGE is not set
-+# CONFIG_LLC2 is not set
-+# CONFIG_IPX is not set
-+# CONFIG_ATALK is not set
- # CONFIG_X25 is not set
- # CONFIG_LAPB is not set
- # CONFIG_NET_DIVERT is not set
- # CONFIG_ECONET is not set
- # CONFIG_WAN_ROUTER is not set
--# CONFIG_NET_HW_FLOWCONTROL is not set
- 
- #
- # QoS and/or fair queueing
- #
- # CONFIG_NET_SCHED is not set
-+# CONFIG_NET_CLS_ROUTE is not set
- 
- #
- # Network testing
- #
- # CONFIG_NET_PKTGEN is not set
-+# CONFIG_NETPOLL is not set
-+# CONFIG_NET_POLL_CONTROLLER is not set
-+# CONFIG_HAMRADIO is not set
-+# CONFIG_IRDA is not set
-+# CONFIG_BT is not set
- CONFIG_NETDEVICES=y
-+CONFIG_DUMMY=m
-+# CONFIG_BONDING is not set
-+# CONFIG_EQUALIZER is not set
-+CONFIG_TUN=m
- 
- #
- # ARCnet devices
- #
- # CONFIG_ARCNET is not set
--CONFIG_DUMMY=m
--# CONFIG_BONDING is not set
--# CONFIG_EQUALIZER is not set
--CONFIG_TUN=m
--# CONFIG_ETHERTAP is not set
- 
- #
- # Ethernet (10 or 100Mbit)
- #
- CONFIG_NET_ETHERNET=y
- # CONFIG_MII is not set
--# CONFIG_OAKNET is not set
- CONFIG_ARIADNE=y
--# CONFIG_ZORRO8390 is not set
- CONFIG_A2065=y
- CONFIG_HYDRA=y
-+CONFIG_ZORRO8390=y
- # CONFIG_HAPPYMEAL is not set
- # CONFIG_SUNGEM is not set
- # CONFIG_NET_VENDOR_3COM is not set
-@@ -445,11 +556,28 @@
- # CONFIG_R8169 is not set
- # CONFIG_SK98LIN is not set
- # CONFIG_TIGON3 is not set
-+# CONFIG_BNX2 is not set
- 
- #
- # Ethernet (10000 Mbit)
- #
- # CONFIG_IXGB is not set
-+# CONFIG_S2IO is not set
-+
-+#
-+# Token Ring devices
-+#
-+# CONFIG_TR is not set
-+
-+#
-+# Wireless LAN (non-hamradio)
-+#
-+# CONFIG_NET_RADIO is not set
-+
-+#
-+# Wan interfaces
-+#
-+# CONFIG_WAN is not set
- # CONFIG_FDDI is not set
- # CONFIG_HIPPI is not set
- CONFIG_PLIP=m
-@@ -465,96 +593,29 @@
- CONFIG_SLIP_COMPRESSED=y
- CONFIG_SLIP_SMART=y
- CONFIG_SLIP_MODE_SLIP6=y
--
--#
--# Wireless LAN (non-hamradio)
--#
--# CONFIG_NET_RADIO is not set
--
--#
--# Token Ring devices (depends on LLC=y)
--#
- # CONFIG_NET_FC is not set
--# CONFIG_RCPCI is not set
- # CONFIG_SHAPER is not set
--
--#
--# Wan interfaces
--#
--# CONFIG_WAN is not set
--
--#
--# Amateur Radio support
--#
--# CONFIG_HAMRADIO is not set
--
--#
--# IrDA (infrared) support
--#
--# CONFIG_IRDA is not set
-+# CONFIG_NETCONSOLE is not set
- 
- #
- # ISDN subsystem
- #
--# CONFIG_ISDN_BOOL is not set
-+# CONFIG_ISDN is not set
- 
- #
--# Graphics support
-+# Telephony Support
- #
--CONFIG_FB=y
--# CONFIG_FB_CIRRUS is not set
--CONFIG_FB_PM2=y
--# CONFIG_FB_PM2_FIFO_DISCONNECT is not set
--# CONFIG_FB_PM2_PCI is not set
--CONFIG_FB_PM2_CVPPC=y
--CONFIG_FB_CYBER2000=y
--CONFIG_FB_AMIGA=y
--CONFIG_FB_AMIGA_OCS=y
--CONFIG_FB_AMIGA_ECS=y
--CONFIG_FB_AMIGA_AGA=y
--CONFIG_FB_CYBER=y
--CONFIG_FB_VIRGE=y
--CONFIG_FB_RETINAZ3=y
--CONFIG_FB_FM2=y
--# CONFIG_FB_CT65550 is not set
--# CONFIG_FB_IMSTT is not set
--# CONFIG_FB_S3TRIO is not set
--# CONFIG_FB_VGA16 is not set
--# CONFIG_FB_RIVA is not set
--# CONFIG_FB_MATROX is not set
--# CONFIG_FB_RADEON is not set
--# CONFIG_FB_ATY128 is not set
--# CONFIG_FB_ATY is not set
--# CONFIG_FB_SIS is not set
--# CONFIG_FB_NEOMAGIC is not set
--# CONFIG_FB_3DFX is not set
--# CONFIG_FB_VOODOO1 is not set
--# CONFIG_FB_TRIDENT is not set
--# CONFIG_FB_PM3 is not set
--# CONFIG_FB_VIRTUAL is not set
--
--#
--# Logo configuration
--#
--CONFIG_LOGO=y
--CONFIG_LOGO_LINUX_MONO=y
--CONFIG_LOGO_LINUX_VGA16=y
--CONFIG_LOGO_LINUX_CLUT224=y
--
--#
--# Old CD-ROM drivers (not SCSI, not IDE)
--#
--# CONFIG_CD_NO_IDESCSI is not set
-+# CONFIG_PHONE is not set
- 
- #
- # Input device support
- #
--CONFIG_INPUT=m
-+CONFIG_INPUT=y
- 
- #
- # Userland interfaces
- #
--CONFIG_INPUT_MOUSEDEV=m
-+CONFIG_INPUT_MOUSEDEV=y
- CONFIG_INPUT_MOUSEDEV_PSAUX=y
- CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
- CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-@@ -564,42 +625,37 @@
- CONFIG_INPUT_EVBUG=m
- 
- #
--# Input I/O drivers
--#
--# CONFIG_GAMEPORT is not set
--CONFIG_SOUND_GAMEPORT=y
--CONFIG_SERIO=y
--# CONFIG_SERIO_I8042 is not set
--CONFIG_SERIO_SERPORT=y
--# CONFIG_SERIO_CT82C710 is not set
--# CONFIG_SERIO_PARKBD is not set
--
--#
- # Input Device Drivers
- #
- CONFIG_INPUT_KEYBOARD=y
--CONFIG_KEYBOARD_ATKBD=m
-+# CONFIG_KEYBOARD_ATKBD is not set
- # CONFIG_KEYBOARD_SUNKBD is not set
-+# CONFIG_KEYBOARD_LKKBD is not set
- # CONFIG_KEYBOARD_XTKBD is not set
- # CONFIG_KEYBOARD_NEWTON is not set
--CONFIG_KEYBOARD_AMIGA=m
-+CONFIG_KEYBOARD_AMIGA=y
- CONFIG_INPUT_MOUSE=y
--CONFIG_MOUSE_PS2=m
--CONFIG_MOUSE_SERIAL=m
-+# CONFIG_MOUSE_PS2 is not set
-+# CONFIG_MOUSE_SERIAL is not set
- CONFIG_MOUSE_AMIGA=m
-+# CONFIG_MOUSE_VSXXXAA is not set
- # CONFIG_INPUT_JOYSTICK is not set
- # CONFIG_INPUT_TOUCHSCREEN is not set
- CONFIG_INPUT_MISC=y
--# CONFIG_INPUT_PCSPKR is not set
- CONFIG_INPUT_UINPUT=m
- 
- #
--# Macintosh device drivers
-+# Hardware I/O ports
- #
-+# CONFIG_SERIO is not set
-+# CONFIG_GAMEPORT is not set
- 
- #
- # Character devices
- #
-+CONFIG_VT=y
-+CONFIG_VT_CONSOLE=y
-+CONFIG_HW_CONSOLE=y
- # CONFIG_SERIAL_NONSTANDARD is not set
- 
- #
-@@ -610,34 +666,16 @@
- #
- # Non-8250 serial port support
- #
-+# CONFIG_SERIAL_JSM is not set
- CONFIG_UNIX98_PTYS=y
--CONFIG_UNIX98_PTY_COUNT=256
-+CONFIG_LEGACY_PTYS=y
-+CONFIG_LEGACY_PTY_COUNT=256
- CONFIG_PRINTER=m
- # CONFIG_LP_CONSOLE is not set
- # CONFIG_PPDEV is not set
- # CONFIG_TIPAR is not set
- 
- #
--# I2C support
--#
--# CONFIG_I2C is not set
--
--#
--# I2C Hardware Sensors Mainboard support
--#
--
--#
--# I2C Hardware Sensors Chip support
--#
--# CONFIG_I2C_SENSOR is not set
--
--#
--# Mice
--#
--CONFIG_BUSMOUSE=y
--# CONFIG_QIC02_TAPE is not set
--
--#
- # IPMI
- #
- # CONFIG_IPMI_HANDLER is not set
-@@ -656,11 +694,28 @@
- #
- # Ftape, the floppy tape device driver
- #
--# CONFIG_FTAPE is not set
- # CONFIG_AGP is not set
- # CONFIG_DRM is not set
- # CONFIG_RAW_DRIVER is not set
--# CONFIG_HANGCHECK_TIMER is not set
-+
-+#
-+# TPM devices
-+#
-+# CONFIG_TCG_TPM is not set
-+
-+#
-+# I2C support
-+#
-+# CONFIG_I2C is not set
-+
-+#
-+# Dallas's 1-wire bus
-+#
-+# CONFIG_W1 is not set
-+
-+#
-+# Misc devices
-+#
- 
- #
- # Multimedia devices
-@@ -673,6 +728,154 @@
- # CONFIG_DVB is not set
- 
- #
-+# Graphics support
-+#
-+CONFIG_FB=y
-+CONFIG_FB_CFB_FILLRECT=y
-+CONFIG_FB_CFB_COPYAREA=y
-+CONFIG_FB_CFB_IMAGEBLIT=y
-+CONFIG_FB_SOFT_CURSOR=y
-+# CONFIG_FB_MACMODES is not set
-+# CONFIG_FB_MODE_HELPERS is not set
-+# CONFIG_FB_TILEBLITTING is not set
-+# CONFIG_FB_CIRRUS is not set
-+# CONFIG_FB_PM2 is not set
-+CONFIG_FB_CYBER2000=y
-+CONFIG_FB_AMIGA=y
-+CONFIG_FB_AMIGA_OCS=y
-+CONFIG_FB_AMIGA_ECS=y
-+CONFIG_FB_AMIGA_AGA=y
-+CONFIG_FB_FM2=y
-+# CONFIG_FB_CT65550 is not set
-+# CONFIG_FB_ASILIANT is not set
-+# CONFIG_FB_IMSTT is not set
-+# CONFIG_FB_VGA16 is not set
-+# CONFIG_FB_NVIDIA is not set
-+# CONFIG_FB_RIVA is not set
-+# CONFIG_FB_MATROX is not set
-+# CONFIG_FB_RADEON_OLD is not set
-+# CONFIG_FB_RADEON is not set
-+# CONFIG_FB_ATY128 is not set
-+# CONFIG_FB_ATY is not set
-+# CONFIG_FB_SAVAGE is not set
-+# CONFIG_FB_SIS is not set
-+# CONFIG_FB_NEOMAGIC is not set
-+# CONFIG_FB_KYRO is not set
-+# CONFIG_FB_3DFX is not set
-+# CONFIG_FB_VOODOO1 is not set
-+# CONFIG_FB_TRIDENT is not set
-+# CONFIG_FB_S1D13XXX is not set
-+# CONFIG_FB_VIRTUAL is not set
-+
-+#
-+# Console display driver support
-+#
-+CONFIG_VGA_CONSOLE=y
-+CONFIG_DUMMY_CONSOLE=y
-+CONFIG_FRAMEBUFFER_CONSOLE=y
-+# CONFIG_FONTS is not set
-+CONFIG_FONT_8x8=y
-+CONFIG_FONT_8x16=y
-+CONFIG_FONT_PEARL_8x8=y
-+
-+#
-+# Logo configuration
-+#
-+CONFIG_LOGO=y
-+CONFIG_LOGO_LINUX_MONO=y
-+CONFIG_LOGO_LINUX_VGA16=y
-+CONFIG_LOGO_LINUX_CLUT224=y
-+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
-+
-+#
-+# Sound
-+#
-+CONFIG_SOUND=y
-+CONFIG_DMASOUND_PAULA=m
-+CONFIG_DMASOUND=m
-+
-+#
-+# Advanced Linux Sound Architecture
-+#
-+# CONFIG_SND is not set
-+
-+#
-+# Open Sound System
-+#
-+CONFIG_SOUND_PRIME=m
-+# CONFIG_SOUND_BT878 is not set
-+# CONFIG_SOUND_CMPCI is not set
-+# CONFIG_SOUND_EMU10K1 is not set
-+# CONFIG_SOUND_FUSION is not set
-+# CONFIG_SOUND_CS4281 is not set
-+# CONFIG_SOUND_ES1370 is not set
-+# CONFIG_SOUND_ES1371 is not set
-+# CONFIG_SOUND_ESSSOLO1 is not set
-+# CONFIG_SOUND_MAESTRO is not set
-+# CONFIG_SOUND_MAESTRO3 is not set
-+# CONFIG_SOUND_ICH is not set
-+# CONFIG_SOUND_SONICVIBES is not set
-+# CONFIG_SOUND_TRIDENT is not set
-+# CONFIG_SOUND_MSNDCLAS is not set
-+# CONFIG_SOUND_MSNDPIN is not set
-+# CONFIG_SOUND_VIA82CXXX is not set
-+CONFIG_SOUND_OSS=m
-+CONFIG_SOUND_TRACEINIT=y
-+# CONFIG_SOUND_DMAP is not set
-+# CONFIG_SOUND_AD1816 is not set
-+# CONFIG_SOUND_AD1889 is not set
-+# CONFIG_SOUND_SGALAXY is not set
-+# CONFIG_SOUND_ADLIB is not set
-+# CONFIG_SOUND_ACI_MIXER is not set
-+# CONFIG_SOUND_CS4232 is not set
-+# CONFIG_SOUND_SSCAPE is not set
-+# CONFIG_SOUND_GUS is not set
-+CONFIG_SOUND_VMIDI=m
-+# CONFIG_SOUND_TRIX is not set
-+# CONFIG_SOUND_MSS is not set
-+# CONFIG_SOUND_MPU401 is not set
-+# CONFIG_SOUND_NM256 is not set
-+# CONFIG_SOUND_MAD16 is not set
-+# CONFIG_SOUND_PAS is not set
-+# CONFIG_SOUND_PSS is not set
-+# CONFIG_SOUND_SB is not set
-+# CONFIG_SOUND_AWE32_SYNTH is not set
-+# CONFIG_SOUND_WAVEFRONT is not set
-+# CONFIG_SOUND_MAUI is not set
-+# CONFIG_SOUND_YM3812 is not set
-+# CONFIG_SOUND_OPL3SA1 is not set
-+# CONFIG_SOUND_OPL3SA2 is not set
-+# CONFIG_SOUND_YMFPCI is not set
-+# CONFIG_SOUND_UART6850 is not set
-+# CONFIG_SOUND_AEDSP16 is not set
-+# CONFIG_SOUND_ALI5455 is not set
-+# CONFIG_SOUND_FORTE is not set
-+# CONFIG_SOUND_RME96XX is not set
-+# CONFIG_SOUND_AD1980 is not set
-+
-+#
-+# USB support
-+#
-+CONFIG_USB_ARCH_HAS_HCD=y
-+CONFIG_USB_ARCH_HAS_OHCI=y
-+# CONFIG_USB is not set
-+
-+#
-+# USB Gadget Support
-+#
-+# CONFIG_USB_GADGET is not set
-+
-+#
-+# MMC/SD Card support
-+#
-+# CONFIG_MMC is not set
-+
-+#
-+# InfiniBand support
-+#
-+# CONFIG_INFINIBAND is not set
-+
-+#
- # File systems
- #
- CONFIG_EXT2_FS=y
-@@ -686,10 +889,15 @@
- CONFIG_FS_MBCACHE=y
- # CONFIG_REISERFS_FS is not set
- # CONFIG_JFS_FS is not set
-+
-+#
-+# XFS support
-+#
- # CONFIG_XFS_FS is not set
- CONFIG_MINIX_FS=y
--CONFIG_ROMFS_FS=y
-+CONFIG_ROMFS_FS=m
- # CONFIG_QUOTA is not set
-+CONFIG_DNOTIFY=y
- CONFIG_AUTOFS_FS=m
- CONFIG_AUTOFS4_FS=m
- 
-@@ -707,16 +915,21 @@
- CONFIG_FAT_FS=y
- CONFIG_MSDOS_FS=y
- CONFIG_VFAT_FS=y
-+CONFIG_FAT_DEFAULT_CODEPAGE=437
-+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
- # CONFIG_NTFS_FS is not set
- 
- #
- # Pseudo filesystems
- #
- CONFIG_PROC_FS=y
-+CONFIG_PROC_KCORE=y
-+CONFIG_SYSFS=y
- # CONFIG_DEVFS_FS is not set
--CONFIG_DEVPTS_FS=y
- # CONFIG_DEVPTS_FS_XATTR is not set
- CONFIG_TMPFS=y
-+# CONFIG_TMPFS_XATTR is not set
-+# CONFIG_HUGETLB_PAGE is not set
- CONFIG_RAMFS=y
- 
- #
-@@ -725,10 +938,11 @@
- # CONFIG_ADFS_FS is not set
- CONFIG_AFFS_FS=y
- CONFIG_HFS_FS=y
-+# CONFIG_HFSPLUS_FS is not set
- # CONFIG_BEFS_FS is not set
- # CONFIG_BFS_FS is not set
- # CONFIG_EFS_FS is not set
--CONFIG_CRAMFS=y
-+CONFIG_CRAMFS=m
- # CONFIG_VXFS_FS is not set
- # CONFIG_HPFS_FS is not set
- # CONFIG_QNX4FS_FS is not set
-@@ -741,6 +955,7 @@
- CONFIG_NFS_FS=y
- CONFIG_NFS_V3=y
- # CONFIG_NFS_V4 is not set
-+# CONFIG_NFS_DIRECTIO is not set
- CONFIG_NFSD=m
- CONFIG_NFSD_V3=y
- # CONFIG_NFSD_V4 is not set
-@@ -749,13 +964,14 @@
- CONFIG_LOCKD_V4=y
- CONFIG_EXPORTFS=m
- CONFIG_SUNRPC=y
--# CONFIG_SUNRPC_GSS is not set
-+# CONFIG_RPCSEC_GSS_KRB5 is not set
-+# CONFIG_RPCSEC_GSS_SPKM3 is not set
- CONFIG_SMB_FS=m
- # CONFIG_SMB_NLS_DEFAULT is not set
- # CONFIG_CIFS is not set
- # CONFIG_NCP_FS is not set
- CONFIG_CODA_FS=m
--# CONFIG_INTERMEZZO_FS is not set
-+# CONFIG_CODA_FS_OLD_API is not set
- # CONFIG_AFS_FS is not set
- 
- #
-@@ -773,17 +989,15 @@
- CONFIG_SOLARIS_X86_PARTITION=y
- CONFIG_UNIXWARE_DISKLABEL=y
- # CONFIG_LDM_PARTITION is not set
--# CONFIG_NEC98_PARTITION is not set
- # CONFIG_SGI_PARTITION is not set
- # CONFIG_ULTRIX_PARTITION is not set
- # CONFIG_SUN_PARTITION is not set
- # CONFIG_EFI_PARTITION is not set
--CONFIG_SMB_NLS=y
--CONFIG_NLS=y
- 
- #
- # Native Language Support
- #
-+CONFIG_NLS=y
- CONFIG_NLS_DEFAULT="iso8859-1"
- CONFIG_NLS_CODEPAGE_437=m
- CONFIG_NLS_CODEPAGE_737=m
-@@ -806,8 +1020,9 @@
- CONFIG_NLS_CODEPAGE_949=m
- CONFIG_NLS_CODEPAGE_874=m
- CONFIG_NLS_ISO8859_8=m
--# CONFIG_NLS_CODEPAGE_1250 is not set
-+CONFIG_NLS_CODEPAGE_1250=m
- CONFIG_NLS_CODEPAGE_1251=m
-+CONFIG_NLS_ASCII=m
- CONFIG_NLS_ISO8859_1=m
- CONFIG_NLS_ISO8859_2=m
- CONFIG_NLS_ISO8859_3=m
-@@ -824,97 +1039,47 @@
- CONFIG_NLS_UTF8=m
- 
- #
--# Sound
--#
--CONFIG_SOUND=y
--CONFIG_DMASOUND_PAULA=m
--CONFIG_DMASOUND=m
--
--#
--# Advanced Linux Sound Architecture
--#
--# CONFIG_SND is not set
--
--#
--# Open Sound System
--#
--CONFIG_SOUND_PRIME=m
--# CONFIG_SOUND_BT878 is not set
--# CONFIG_SOUND_CMPCI is not set
--# CONFIG_SOUND_EMU10K1 is not set
--# CONFIG_SOUND_FUSION is not set
--# CONFIG_SOUND_CS4281 is not set
--# CONFIG_SOUND_ES1370 is not set
--# CONFIG_SOUND_ES1371 is not set
--# CONFIG_SOUND_ESSSOLO1 is not set
--# CONFIG_SOUND_MAESTRO is not set
--# CONFIG_SOUND_MAESTRO3 is not set
--# CONFIG_SOUND_ICH is not set
--# CONFIG_SOUND_RME96XX is not set
--# CONFIG_SOUND_SONICVIBES is not set
--# CONFIG_SOUND_TRIDENT is not set
--# CONFIG_SOUND_MSNDCLAS is not set
--# CONFIG_SOUND_MSNDPIN is not set
--# CONFIG_SOUND_VIA82CXXX is not set
--CONFIG_SOUND_OSS=m
--CONFIG_SOUND_TRACEINIT=y
--CONFIG_SOUND_DMAP=y
--# CONFIG_SOUND_AD1816 is not set
--# CONFIG_SOUND_SGALAXY is not set
--# CONFIG_SOUND_ADLIB is not set
--# CONFIG_SOUND_ACI_MIXER is not set
--# CONFIG_SOUND_CS4232 is not set
--# CONFIG_SOUND_SSCAPE is not set
--# CONFIG_SOUND_GUS is not set
--CONFIG_SOUND_VMIDI=m
--# CONFIG_SOUND_TRIX is not set
--# CONFIG_SOUND_MSS is not set
--# CONFIG_SOUND_MPU401 is not set
--# CONFIG_SOUND_NM256 is not set
--# CONFIG_SOUND_MAD16 is not set
--# CONFIG_SOUND_PAS is not set
--# CONFIG_SOUND_PSS is not set
--# CONFIG_SOUND_SB is not set
--# CONFIG_SOUND_AWE32_SYNTH is not set
--# CONFIG_SOUND_WAVEFRONT is not set
--# CONFIG_SOUND_MAUI is not set
--# CONFIG_SOUND_YM3812 is not set
--# CONFIG_SOUND_OPL3SA1 is not set
--# CONFIG_SOUND_OPL3SA2 is not set
--# CONFIG_SOUND_YMFPCI is not set
--# CONFIG_SOUND_UART6850 is not set
--# CONFIG_SOUND_AEDSP16 is not set
--
--#
--# USB support
--#
--# CONFIG_USB is not set
--# CONFIG_USB_GADGET is not set
--
--#
--# Bluetooth support
--#
--# CONFIG_BT is not set
--
--#
- # Library routines
- #
--# CONFIG_CRC32 is not set
-+CONFIG_CRC_CCITT=y
-+CONFIG_CRC32=y
-+CONFIG_LIBCRC32C=m
- CONFIG_ZLIB_INFLATE=y
- CONFIG_ZLIB_DEFLATE=y
- 
- #
-+# Profiling support
-+#
-+# CONFIG_PROFILING is not set
-+
-+#
- # Kernel hacking
- #
--# CONFIG_DEBUG_KERNEL is not set
--# CONFIG_KALLSYMS is not set
-+# CONFIG_PRINTK_TIME is not set
-+CONFIG_DEBUG_KERNEL=y
-+CONFIG_MAGIC_SYSRQ=y
-+CONFIG_LOG_BUF_SHIFT=14
-+# CONFIG_SCHEDSTATS is not set
-+# CONFIG_DEBUG_SLAB is not set
-+# CONFIG_DEBUG_SPINLOCK is not set
-+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
-+# CONFIG_DEBUG_KOBJECT is not set
-+# CONFIG_DEBUG_INFO is not set
-+# CONFIG_DEBUG_FS is not set
-+# CONFIG_XMON is not set
-+# CONFIG_BDI_SWITCH is not set
- 
- #
- # Security options
- #
-+# CONFIG_KEYS is not set
- # CONFIG_SECURITY is not set
- 
- #
- # Cryptographic options
- #
- # CONFIG_CRYPTO is not set
-+
-+#
-+# Hardware crypto devices
-+#
-diff -Nur -x CVS linux-2.6.12/arch/ppc/kernel/entry.S 2.6/arch/ppc/kernel/entry.S
---- linux-2.6.12/arch/ppc/kernel/entry.S	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/kernel/entry.S	2005-07-31 03:18:11.000000000 +0200
-@@ -1026,3 +1026,6 @@
- 	/* XXX load up BATs and panic */
- 
- #endif /* CONFIG_PPC_OF */
-+
-+	.global	__head_end
-+__head_end:
-diff -Nur -x CVS linux-2.6.12/arch/ppc/kernel/head.S 2.6/arch/ppc/kernel/head.S
---- linux-2.6.12/arch/ppc/kernel/head.S	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/kernel/head.S	2005-08-04 01:40:55.000000000 +0200
-@@ -353,6 +353,28 @@
- #if defined(CONFIG_GEMINI) && defined(CONFIG_SMP)
- 	. = 0x100
- 	b	__secondary_start_gemini
-+#elif defined(CONFIG_APUS)
-+	. = 0x100
-+	mfspr	r4,SPRN_HID0
-+	li	r3,0
-+	ori	r3,r3,0xc000
-+	andc	r4,r4,r3
-+	mtspr	SPRN_HID0,r4
-+	isync
-+	sync
-+	lis	r8,0x6170
-+	ori	r8,r8,0x7573
-+	lis	r9,0xfff0
-+	lwz	r9,0x1f8(r9)
-+	lis	r1,init_thread_union at ha
-+	addi	r1,r1,init_thread_union at l
-+	addi	r1,r1,THREAD_SIZE-STACK_FRAME_OVERHEAD
-+	subis	r1,r1,KERNELBASE at h
-+	add	r1,r1,r9
-+	mr	r3,r8
-+	mr	r4,r9
-+	mtlr	r4
-+	blrl
- #else
- 	EXCEPTION(0x100, Reset, UnknownException, EXC_XFER_STD)
- #endif
-@@ -408,7 +430,15 @@
- 	bne	1f			/* if not, try to put a PTE */
- 	mfspr	r4,SPRN_DAR		/* into the hash table */
- 	rlwinm	r3,r10,32-15,21,21	/* DSISR_STORE -> _PAGE_RW */
-+#ifndef CONFIG_APUS
- 	bl	hash_page
-+#else
-+	lis     r5,hash_page at h
-+	ori	r5,r5,hash_page at l
-+	tophys(r5,r5)
-+	mtlr	r5
-+	blrl
-+#endif
- 1:	stw	r10,_DSISR(r11)
- 	mr	r5,r10
- 	mfspr	r4,SPRN_DAR
-@@ -433,7 +463,15 @@
- 	beq	1f			/* if so, try to put a PTE */
- 	li	r3,0			/* into the hash table */
- 	mr	r4,r12			/* SRR0 is fault address */
-+#ifndef CONFIG_APUS
- 	bl	hash_page
-+#else
-+	lis     r5,hash_page at h
-+	ori	r5,r5,hash_page at l
-+	tophys(r5,r5)
-+	mtlr	r5
-+	blrl
-+#endif
- 1:	mr	r4,r12
- 	mr	r5,r9
- 	EXC_XFER_EE_LITE(0x400, handle_page_fault)
-@@ -1201,19 +1239,6 @@
- 	bl	machine_init
- 	bl	MMU_init
- 
--#ifdef CONFIG_APUS
--	/* Copy exception code to exception vector base on APUS. */
--	lis	r4,KERNELBASE at h
--#ifdef CONFIG_APUS_FAST_EXCEPT
--	lis	r3,0xfff0		/* Copy to 0xfff00000 */
--#else
--	lis	r3,0			/* Copy to 0x00000000 */
--#endif
--	li	r5,0x4000		/* # bytes of memory to copy */
--	li	r6,0
--	bl	copy_and_flush		/* copy the first 0x4000 bytes */
--#endif  /* CONFIG_APUS */
--
- /*
-  * Go back to running unmapped so we can load up new values
-  * for SDR1 (hash table pointer) and the segment registers
-@@ -1231,6 +1256,22 @@
- /* Load up the kernel context */
- 2:	bl	load_up_mmu
- 
-+#ifdef CONFIG_APUS
-+	/* Copy exception code to exception vector base on APUS. */
-+	lis	r4,KERNELBASE at h
-+	tophys(r4,r4)
-+#ifdef CONFIG_APUS_FAST_EXCEPT
-+	lis	r3,0xfff0		/* Copy to 0xfff00000 */
-+#else
-+	lis	r3,0			/* Copy to 0x00000000 */
-+#endif
-+	lis	r5,__head_end at h		/* # bytes of memory to copy */
-+	ori	r5,r5,__head_end at l
-+	subis	r5,r5,KERNELBASE at h
-+	li	r6,0
-+	bl	copy_and_flush		/* copy the first 0x4000 bytes */
-+#endif  /* CONFIG_APUS */
-+
- #ifdef CONFIG_BDI_SWITCH
- 	/* Add helper information for the Abatron bdiGDB debugger.
- 	 * We do this here because we know the mmu is disabled, and
-@@ -1411,6 +1452,17 @@
- 	mtspr	SPRN_DBAT0U,r11		/* bit in upper BAT register */
- 	mtspr	SPRN_IBAT0L,r8
- 	mtspr	SPRN_IBAT0U,r11
-+#ifdef CONFIG_APUS
-+	/* map ZII space for early debug prints */
-+	lis	r8,0x8000
-+	ori	r8,r8,0x01ff
-+	mtspr	SPRN_DBAT2U,r8
-+	mtspr	SPRN_IBAT2U,r8
-+	lis	r8,0x0000
-+	ori	r8,r8,0x002a
-+	mtspr	SPRN_DBAT2L,r8
-+	mtspr	SPRN_IBAT2L,r8
-+#endif
- 	isync
- 	blr
- 
-diff -Nur -x CVS linux-2.6.12/arch/ppc/kernel/Makefile 2.6/arch/ppc/kernel/Makefile
---- linux-2.6.12/arch/ppc/kernel/Makefile	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/kernel/Makefile	2005-07-31 03:18:11.000000000 +0200
-@@ -9,10 +9,11 @@
- extra-$(CONFIG_8xx)		:= head_8xx.o
- extra-$(CONFIG_6xx)		+= idle_6xx.o
- extra-$(CONFIG_POWER4)		+= idle_power4.o
-+extra-y				+= entry.o
- extra-$(CONFIG_PPC_FPU)		+= fpu.o
- extra-y				+= vmlinux.lds
- 
--obj-y				:= entry.o traps.o irq.o idle.o time.o misc.o \
-+obj-y				:= traps.o irq.o idle.o time.o misc.o \
- 					process.o signal.o ptrace.o align.o \
- 					semaphore.o syscalls.o setup.o \
- 					cputable.o ppc_htab.o perfmon.o
-diff -Nur -x CVS linux-2.6.12/arch/ppc/kernel/misc.S 2.6/arch/ppc/kernel/misc.S
---- linux-2.6.12/arch/ppc/kernel/misc.S	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/kernel/misc.S	2005-07-31 03:18:12.000000000 +0200
-@@ -1368,7 +1368,11 @@
- 	.long sys_fstat64
- 	.long sys_pciconfig_read
- 	.long sys_pciconfig_write
-+#ifdef CONFIG_PCI
- 	.long sys_pciconfig_iobase 	/* 200 */
-+#else
-+	.long sys_ni_syscall
-+#endif
- 	.long sys_ni_syscall		/* 201 - reserved - MacOnLinux - new */
- 	.long sys_getdents64
- 	.long sys_pivot_root
-diff -Nur -x CVS linux-2.6.12/arch/ppc/kernel/ppc_ksyms.c 2.6/arch/ppc/kernel/ppc_ksyms.c
---- linux-2.6.12/arch/ppc/kernel/ppc_ksyms.c	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/kernel/ppc_ksyms.c	2005-07-31 03:18:12.000000000 +0200
-@@ -69,8 +69,6 @@
- long long __ashldi3(long long, int);
- long long __lshrdi3(long long, int);
- 
--extern unsigned long mm_ptov (unsigned long paddr);
--
- EXPORT_SYMBOL(clear_pages);
- EXPORT_SYMBOL(clear_user_page);
- EXPORT_SYMBOL(do_signal);
-@@ -147,7 +145,6 @@
- EXPORT_SYMBOL(_insl_ns);
- EXPORT_SYMBOL(_outsl_ns);
- EXPORT_SYMBOL(iopa);
--EXPORT_SYMBOL(mm_ptov);
- EXPORT_SYMBOL(ioremap);
- #ifdef CONFIG_44x
- EXPORT_SYMBOL(ioremap64);
-diff -Nur -x CVS linux-2.6.12/arch/ppc/kernel/setup.c 2.6/arch/ppc/kernel/setup.c
---- linux-2.6.12/arch/ppc/kernel/setup.c	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/kernel/setup.c	2005-08-04 01:42:52.000000000 +0200
-@@ -550,6 +550,7 @@
- #endif /* CONFIG_SERIAL_CORE_CONSOLE */
- #endif /* CONFIG_PPC_MULTIPLATFORM */
- 
-+#ifndef CONFIG_APUS
- struct bi_record *find_bootinfo(void)
- {
- 	struct bi_record *rec;
-@@ -601,6 +602,7 @@
- 		rec = (struct bi_record *)((ulong)rec + rec->size);
- 	}
- }
-+#endif
- 
- /*
-  * Find out what kind of machine we're on and save any data we need
-diff -Nur -x CVS linux-2.6.12/arch/ppc/kernel/time.c 2.6/arch/ppc/kernel/time.c
---- linux-2.6.12/arch/ppc/kernel/time.c	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/kernel/time.c	2005-07-31 03:18:12.000000000 +0200
-@@ -150,6 +150,7 @@
- 		tb_last_stamp = jiffy_stamp;
- 		do_timer(regs);
- 
-+#ifndef CONFIG_APUS
- 		/*
- 		 * update the rtc when needed, this should be performed on the
- 		 * right fraction of a second. Half or full second ?
-@@ -176,6 +177,7 @@
- 				/* Try again one minute later */
- 				last_rtc_update += 60;
- 		}
-+#endif
- 		write_sequnlock(&xtime_lock);
- 	}
- 	if ( !disarm_decr[smp_processor_id()] )
-diff -Nur -x CVS linux-2.6.12/arch/ppc/Makefile 2.6/arch/ppc/Makefile
---- linux-2.6.12/arch/ppc/Makefile	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/Makefile	2005-07-31 03:18:11.000000000 +0200
-@@ -51,6 +51,8 @@
- head-$(CONFIG_44x)		:= arch/ppc/kernel/head_44x.o
- head-$(CONFIG_FSL_BOOKE)	:= arch/ppc/kernel/head_fsl_booke.o
- 
-+head-y				+= arch/ppc/mm/hashtable.o
-+head-y				+= arch/ppc/kernel/entry.o
- head-$(CONFIG_6xx)		+= arch/ppc/kernel/idle_6xx.o
- head-$(CONFIG_POWER4)		+= arch/ppc/kernel/idle_power4.o
- head-$(CONFIG_PPC_FPU)		+= arch/ppc/kernel/fpu.o
-@@ -73,7 +75,9 @@
- 
- .PHONY: $(BOOT_TARGETS)
- 
-+ifndef CONFIG_APUS
- all: uImage zImage
-+endif
- 
- CPPFLAGS_vmlinux.lds	:= -Upowerpc
- 
-diff -Nur -x CVS linux-2.6.12/arch/ppc/mm/init.c 2.6/arch/ppc/mm/init.c
---- linux-2.6.12/arch/ppc/mm/init.c	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/mm/init.c	2005-07-31 03:18:12.000000000 +0200
-@@ -61,9 +61,6 @@
- unsigned long total_memory;
- unsigned long total_lowmem;
- 
--unsigned long ppc_memstart;
--unsigned long ppc_memoffset = PAGE_OFFSET;
--
- int mem_init_done;
- int init_bootmem_done;
- int boot_mapsize;
-diff -Nur -x CVS linux-2.6.12/arch/ppc/mm/Makefile 2.6/arch/ppc/mm/Makefile
---- linux-2.6.12/arch/ppc/mm/Makefile	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/mm/Makefile	2004-09-25 23:09:43.000000000 +0200
-@@ -5,7 +5,8 @@
- obj-y				:= fault.o init.o mem_pieces.o \
- 					mmu_context.o pgtable.o
- 
--obj-$(CONFIG_PPC_STD_MMU)	+= hashtable.o ppc_mmu.o tlb.o
-+extra-$(CONFIG_PPC_STD_MMU)	:= hashtable.o
-+obj-$(CONFIG_PPC_STD_MMU)	+= ppc_mmu.o tlb.o
- obj-$(CONFIG_40x)		+= 4xx_mmu.o
- obj-$(CONFIG_44x)		+= 44x_mmu.o
- obj-$(CONFIG_FSL_BOOKE)		+= fsl_booke_mmu.o
-diff -Nur -x CVS linux-2.6.12/arch/ppc/mm/pgtable.c 2.6/arch/ppc/mm/pgtable.c
---- linux-2.6.12/arch/ppc/mm/pgtable.c	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/mm/pgtable.c	2005-07-31 03:18:12.000000000 +0200
-@@ -191,8 +191,8 @@
- 	 * Don't allow anybody to remap normal RAM that we're using.
- 	 * mem_init() sets high_memory so only do the check after that.
- 	 */
--	if ( mem_init_done && (p < virt_to_phys(high_memory)) )
--	{
-+	if (mem_init_done && (p + size >= virt_to_phys(KERNELBASE)) &&
-+	    (p < virt_to_phys(high_memory))) {
- 		printk("__ioremap(): phys addr "PHYS_FMT" is RAM lr %p\n", p,
- 		       __builtin_return_address(0));
- 		return NULL;
-@@ -430,42 +430,3 @@
- 
- 	return(pa);
- }
--
--/* This is will find the virtual address for a physical one....
-- * Swiped from APUS, could be dangerous :-).
-- * This is only a placeholder until I really find a way to make this
-- * work.  -- Dan
-- */
--unsigned long
--mm_ptov (unsigned long paddr)
--{
--	unsigned long ret;
--#if 0
--	if (paddr < 16*1024*1024)
--		ret = ZTWO_VADDR(paddr);
--	else {
--		int i;
--
--		for (i = 0; i < kmap_chunk_count;){
--			unsigned long phys = kmap_chunks[i++];
--			unsigned long size = kmap_chunks[i++];
--			unsigned long virt = kmap_chunks[i++];
--			if (paddr >= phys
--			    && paddr < (phys + size)){
--				ret = virt + paddr - phys;
--				goto exit;
--			}
--		}
--	
--		ret = (unsigned long) __va(paddr);
--	}
--exit:
--#ifdef DEBUGPV
--	printk ("PTOV(%lx)=%lx\n", paddr, ret);
--#endif
--#else
--	ret = (unsigned long)paddr + KERNELBASE;
--#endif
--	return ret;
--}
--
-diff -Nur -x CVS linux-2.6.12/arch/ppc/platforms/apus_setup.c 2.6/arch/ppc/platforms/apus_setup.c
---- linux-2.6.12/arch/ppc/platforms/apus_setup.c	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/platforms/apus_setup.c	2005-08-04 01:43:41.000000000 +0200
-@@ -17,11 +17,14 @@
- #include <linux/kernel.h>
- #include <linux/sched.h>
- #include <linux/init.h>
-+#include <linux/interrupt.h>
-+#include <linux/irq.h>
- #include <linux/initrd.h>
-+#include <linux/module.h>
- #include <linux/seq_file.h>
- 
- /* Needs INITSERIAL call in head.S! */
--#undef APUS_DEBUG
-+#define APUS_DEBUG
- 
- #include <asm/bootinfo.h>
- #include <asm/setup.h>
-@@ -32,52 +35,26 @@
- #include <asm/dma.h>
- #include <asm/machdep.h>
- #include <asm/time.h>
-+#include <asm/tlbflush.h>
- 
- unsigned long m68k_machtype;
- char debug_device[6] = "";
- 
--extern void amiga_init_IRQ(void);
--
--extern void apus_setup_pci_ptrs(void);
--
--void (*mach_sched_init) (void (*handler)(int, void *, struct pt_regs *)) __initdata = NULL;
--/* machine dependent irq functions */
--void (*mach_init_IRQ) (void) __initdata = NULL;
--void (*(*mach_default_handler)[]) (int, void *, struct pt_regs *) = NULL;
--void (*mach_get_model) (char *model) = NULL;
--int (*mach_get_hardware_list) (char *buffer) = NULL;
--int (*mach_get_irq_list) (struct seq_file *, void *) = NULL;
--void (*mach_process_int) (int, struct pt_regs *) = NULL;
--/* machine dependent timer functions */
--unsigned long (*mach_gettimeoffset) (void);
--void (*mach_gettod) (int*, int*, int*, int*, int*, int*);
--int (*mach_hwclk) (int, struct hwclk_time*) = NULL;
--int (*mach_set_clock_mmss) (unsigned long) = NULL;
--void (*mach_reset)( void );
--long mach_max_dma_address = 0x00ffffff; /* default set to the lower 16MB */
--#if defined(CONFIG_AMIGA_FLOPPY)
--void (*mach_floppy_setup) (char *, int *) __initdata = NULL;
--#endif
--#ifdef CONFIG_HEARTBEAT
--void (*mach_heartbeat) (int) = NULL;
--extern void apus_heartbeat (void);
--#endif
--
--extern unsigned long amiga_model;
--extern unsigned decrementer_count;/* count value for 1e6/HZ microseconds */
--extern unsigned count_period_num; /* 1 decrementer count equals */
--extern unsigned count_period_den; /* count_period_num / count_period_den us */
--
- int num_memory = 0;
- struct mem_info memory[NUM_MEMINFO];/* memory description */
- /* FIXME: Duplicate memory data to avoid conflicts with m68k shared code. */
- int m68k_realnum_memory = 0;
- struct mem_info m68k_memory[NUM_MEMINFO];/* memory description */
- 
-+unsigned long ppc_memstart;
-+unsigned long ppc_pgstart;
-+unsigned long ppc_memoffset;
-+
-+EXPORT_SYMBOL(ppc_memoffset);
-+EXPORT_SYMBOL(ppc_pgstart);
-+
- struct mem_info ramdisk;
- 
--extern void amiga_floppy_setup(char *, int *);
--extern void config_amiga(void);
- 
- static int __60nsram = 0;
- 
-@@ -92,25 +69,43 @@
-  */
- unsigned long apus_get_rtc_time(void)
- {
--#ifdef CONFIG_APUS
--	extern unsigned long m68k_get_rtc_time(void);
-+	struct rtc_time t;
- 
--	return m68k_get_rtc_time ();
--#else
--	return 0;
--#endif
-+	amiga_hwclk(0, &t);
-+	t.tm_year += 1900;
-+
-+	return mktime(t.tm_year, t.tm_mon, t.tm_mday,
-+		      t.tm_hour, t.tm_min, t.tm_sec);
- }
- 
- int apus_set_rtc_time(unsigned long nowtime)
- {
--#ifdef CONFIG_APUS
--	extern int m68k_set_rtc_time(unsigned long nowtime);
-+	return amiga_set_clock_mmss(nowtime);
-+}
- 
--	return m68k_set_rtc_time (nowtime);
--#else
--	return 0;
--#endif
-+#ifdef CONFIG_HEARTBEAT
-+static void apus_heartbeat(void)
-+{
-+	static unsigned cnt = 0, period = 0, dist = 0;
-+
-+	if (cnt == 0 || cnt == dist)
-+		ciaa.pra &= ~2;
-+	else if (cnt == 7 || cnt == dist + 7)
-+		ciaa.pra |= 2;
-+
-+	if (++cnt > period) {
-+		cnt = 0;
-+		/* The hyperbolic function below modifies the heartbeat period
-+		 * length in dependency of the current (5min) load. It goes
-+		 * through the points f(0)=126, f(1)=86, f(5)=51,
-+		 * f(inf)->30. */
-+		period = ((672<<FSHIFT) / (5*avenrun[0] + (7<<FSHIFT))) + 30;
-+		dist = period / 4;
-+	}
-+	/* should be made smarter */
-+	ppc_md.heartbeat_count = 1;
- }
-+#endif
- 
- /*********************************************************** SETUP */
- /* From arch/m68k/kernel/setup.c. */
-@@ -206,8 +201,8 @@
- 
- void apus_calibrate_decr(void)
- {
--#ifdef CONFIG_APUS
- 	unsigned long freq;
-+	unsigned int tmp;
- 
- 	/* This algorithm for determining the bus speed was
-            contributed by Ralph Schmidt. */
-@@ -239,15 +234,34 @@
- 		freq = 15000000;
- 	} else if ((bus_speed >= 63) && (bus_speed < 69)) {
- 		bus_speed = 67;
--		freq = 16666667;
-+		freq = 16500000;
- 	} else {
- 		printk ("APUS: Unable to determine bus speed (%d). "
--			"Defaulting to 50MHz", bus_speed);
-+			"Defaulting to 50MHz\n", bus_speed);
- 		bus_speed = 50;
- 		freq = 12500000;
- 		speed_test_failed = 1;
- 	}
- 
-+	ciab.cra = (ciab.cra & 0xc0) | 0x08;
-+	ciab.icr;
-+	wmb();
-+	ciab.talo = 0;
-+	wmb();
-+	ciab.tahi = 0x80;
-+	wmb();
-+
-+	get_current_tb(&start);
-+	while (!(ciab.icr & 1))
-+		barrier();
-+	get_current_tb(&stop);
-+
-+	tmp = stop - start;
-+	start = tmp * amiga_eclock;
-+	stop = mulhwu(tmp, amiga_eclock);
-+	start += stop << 32;
-+	freq = start / 0x8000;
-+
- 	/* Ease diagnostics... */
- 	{
- 		extern int __map_without_bats;
-@@ -285,36 +299,8 @@
- 
- 	__bus_speed = bus_speed;
- 	__speed_test_failed = speed_test_failed;
--#endif
--}
--
--void arch_gettod(int *year, int *mon, int *day, int *hour,
--		 int *min, int *sec)
--{
--#ifdef CONFIG_APUS
--	if (mach_gettod)
--		mach_gettod(year, mon, day, hour, min, sec);
--	else
--		*year = *mon = *day = *hour = *min = *sec = 0;
--#endif
- }
- 
--/* for "kbd-reset" cmdline param */
--__init
--void kbd_reset_setup(char *str, int *ints)
--{
--}
--
--/*********************************************************** FLOPPY */
--#if defined(CONFIG_AMIGA_FLOPPY)
--__init
--void floppy_setup(char *str, int *ints)
--{
--	if (mach_floppy_setup)
--		mach_floppy_setup (str, ints);
--}
--#endif
--
- /*********************************************************** MEMORY */
- #define KMAP_MAX 32
- unsigned long kmap_chunks[KMAP_MAX*3];
-@@ -330,26 +316,22 @@
- 	va &= PAGE_MASK;
- 
- 	dir = pgd_offset( mm, va );
--	if (dir)
--	{
-+	if (dir) {
- 		pmd = pmd_offset(dir, va & PAGE_MASK);
- 		if (pmd && pmd_present(*pmd))
--		{
--			pte = pte_offset(pmd, va);
--		}
-+			pte = pte_offset_kernel(pmd, va);
- 	}
- 	return pte;
- }
- 
- 
- /* Again simulating an m68k/mm/kmap.c function. */
--void kernel_set_cachemode( unsigned long address, unsigned long size,
--			   unsigned int cmode )
-+void kernel_set_cachemode(unsigned long address, unsigned long size,
-+			  unsigned int cmode)
- {
--	unsigned long mask, flags;
-+	unsigned long mask, flags, end;
- 
--	switch (cmode)
--	{
-+	switch (cmode) {
- 	case IOMAP_FULL_CACHING:
- 		mask = ~(_PAGE_NO_CACHE | _PAGE_GUARDED);
- 		flags = 0;
-@@ -359,60 +341,29 @@
- 		flags = (_PAGE_NO_CACHE | _PAGE_GUARDED);
- 		break;
- 	default:
--		panic ("kernel_set_cachemode() doesn't support mode %d\n",
--		       cmode);
-+		panic("kernel_set_cachemode() doesn't support mode %d\n", cmode);
- 		break;
- 	}
- 
--	size /= PAGE_SIZE;
-+	end = address + size;
- 	address &= PAGE_MASK;
--	while (size--)
--	{
-+	while (address < end) {
- 		pte_t *pte;
- 
- 		pte = my_find_pte(&init_mm, address);
--		if ( !pte )
--		{
-+		if (!pte) {
- 			printk("pte NULL in kernel_set_cachemode()\n");
- 			return;
- 		}
- 
--                pte_val (*pte) &= mask;
--                pte_val (*pte) |= flags;
-+                pte_val(*pte) &= mask;
-+                pte_val(*pte) |= flags;
-                 flush_tlb_page(find_vma(&init_mm,address),address);
- 
- 		address += PAGE_SIZE;
- 	}
- }
- 
--unsigned long mm_ptov (unsigned long paddr)
--{
--	unsigned long ret;
--	if (paddr < 16*1024*1024)
--		ret = ZTWO_VADDR(paddr);
--	else {
--		int i;
--
--		for (i = 0; i < kmap_chunk_count;){
--			unsigned long phys = kmap_chunks[i++];
--			unsigned long size = kmap_chunks[i++];
--			unsigned long virt = kmap_chunks[i++];
--			if (paddr >= phys
--			    && paddr < (phys + size)){
--				ret = virt + paddr - phys;
--				goto exit;
--			}
--		}
--
--		ret = (unsigned long) __va(paddr);
--	}
--exit:
--#ifdef DEBUGPV
--	printk ("PTOV(%lx)=%lx\n", paddr, ret);
--#endif
--	return ret;
--}
--
- int mm_end_of_chunk (unsigned long addr, int len)
- {
- 	if (memory[0].addr + memory[0].size == addr + len)
-@@ -422,11 +373,10 @@
- 
- /*********************************************************** CACHE */
- 
--#define L1_CACHE_BYTES 32
- #define MAX_CACHE_SIZE 8192
--void cache_push(__u32 addr, int length)
-+void cache_push(u32 paddr, int length)
- {
--	addr = mm_ptov(addr);
-+	char *addr = __va(paddr);
- 
- 	if (MAX_CACHE_SIZE < length)
- 		length = MAX_CACHE_SIZE;
-@@ -443,12 +393,14 @@
- 	       : : "r" (addr));
- }
- 
--void cache_clear(__u32 addr, int length)
-+void cache_clear(u32 paddr, int length)
- {
-+	char *addr;
-+
- 	if (MAX_CACHE_SIZE < length)
- 		length = MAX_CACHE_SIZE;
- 
--	addr = mm_ptov(addr);
-+	addr = __va(paddr);
- 
- 	__asm ("dcbf 0,%0\n\t"
- 	       "sync \n\t"
-@@ -518,6 +470,8 @@
- 	level = (ipl_emu >> 3) & IPLEMU_IPLMASK;
- 	mask = IPLEMU_SETRESET|IPLEMU_DISABLEINT|level;
- 	level ^= 7;
-+	if (!level)
-+		return -1;
- 
- 	/* Save previous IPL value */
- 	if (last_ipl[level])
-@@ -535,6 +489,15 @@
- 	return level + IRQ_AMIGA_AUTO;
- }
- 
-+unsigned int apus_startup_irq(unsigned int irq)
-+{
-+	return 0;
-+}
-+
-+void apus_ack_irq(unsigned int irq)
-+{
-+}
-+
- void apus_end_irq(unsigned int irq)
- {
- 	unsigned char ipl_emu;
-@@ -646,10 +609,12 @@
- 	__debug_ser_out('\r');
- }
- 
-+#ifdef APUS_DEBUG
- static void apus_progress(char *s, unsigned short value)
- {
- 	__debug_print_string(s);
- }
-+#endif
- 
- /****************************************************** init */
- 
-@@ -664,6 +629,8 @@
- 
- struct hw_interrupt_type amiga_sys_irqctrl = {
- 	.typename = "Amiga IPL",
-+	.startup = apus_startup_irq,
-+	.ack = apus_ack_irq,
- 	.end = apus_end_irq,
- };
- 
-@@ -677,33 +644,32 @@
- unsigned long __init apus_find_end_of_memory(void)
- {
- 	int shadow = 0;
--	unsigned long total;
-+	unsigned long total, size;
- 
- 	/* The memory size reported by ADOS excludes the 512KB
- 	   reserved for PPC exception registers and possibly 512KB
- 	   containing a shadow of the ADOS ROM. */
--	{
--		unsigned long size = memory[0].size;
--
--		/* If 2MB aligned, size was probably user
--                   specified. We can't tell anything about shadowing
--                   in this case so skip shadow assignment. */
--		if (0 != (size & 0x1fffff)){
--			/* Align to 512KB to ensure correct handling
--			   of both memfile and system specified
--			   sizes. */
--			size = ((size+0x0007ffff) & 0xfff80000);
--			/* If memory is 1MB aligned, assume
--                           shadowing. */
--			shadow = !(size & 0x80000);
--		}
-+	size = memory[0].size;
- 
--		/* Add the chunk that ADOS does not see. by aligning
--                   the size to the nearest 2MB limit upwards.  */
--		memory[0].size = ((size+0x001fffff) & 0xffe00000);
--	}
-+	/* If 2MB aligned, size was probably user
-+	   specified. We can't tell anything about shadowing
-+	   in this case so skip shadow assignment. */
-+	if (size & 0x1fffff){
-+		/* Align to 512KB to ensure correct handling
-+		   of both memfile and system specified
-+		   sizes. */
-+		size = ((size+0x0007ffff) & 0xfff80000);
-+		/* If memory is 1MB aligned, assume
-+		   shadowing. */
-+		shadow = !(size & 0x80000);
-+	}
-+
-+	/* Add the chunk that ADOS does not see. by aligning
-+	   the size to the nearest 2MB limit upwards.  */
-+	memory[0].size = (size + 0x001fffff) & 0xffe00000;
- 
- 	ppc_memstart = memory[0].addr;
-+	ppc_pgstart = memory[0].addr >> PAGE_SHIFT;
- 	ppc_memoffset = PAGE_OFFSET - PPC_MEMSTART;
- 	total = memory[0].size;
- 
-diff -Nur -x CVS linux-2.6.12/arch/ppc/platforms/ivms8.h 2.6/arch/ppc/platforms/ivms8.h
---- linux-2.6.12/arch/ppc/platforms/ivms8.h	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/platforms/ivms8.h	2004-02-01 00:24:09.000000000 +0100
-@@ -40,8 +40,7 @@
- #define IDE0_BASE_OFFSET		0x0000	/* Offset in PCMCIA memory */
- #define IDE0_DATA_REG_OFFSET		0x0000
- #define IDE0_ERROR_REG_OFFSET		0x0081
--#define IDE0_NSECTOR_REG_OFFSET		0x0082
--#define IDE0_SECTOR_REG_OFFSET		0x0083
-+#define IDE0_NSECTOR_REG_OFFine ID0_SEC#define IDE0_SECTOR_REG_OFFSET		0x0083
- #define IDE0_LCYL_REG_OFFSET		0x0084
- #define IDE0_HCYL_REG_OFFSET		0x0085
- #define IDE0_SELECT_REG_OFFSET		0x0086
-diff -Nur -x CVS linux-2.6.12/drivers/block/amiflop.c 2.6/drivers/block/amiflop.c
---- linux-2.6.12/drivers/block/amiflop.c	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/drivers/block/amiflop.c	2005-07-31 01:06:43.000000000 +0200
-@@ -59,6 +59,7 @@
- #include <linux/hdreg.h>
- #include <linux/delay.h>
- #include <linux/init.h>
-+#include <linux/interrupt.h>
- #include <linux/amifdreg.h>
- #include <linux/amifd.h>
- #include <linux/buffer_head.h>
-diff -Nur -x CVS linux-2.6.12/include/asm-m68k/bootinfo.h 2.6/include/asm-m68k/bootinfo.h
---- linux-2.6.12/include/asm-m68k/bootinfo.h	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/include/asm-m68k/bootinfo.h	2005-07-30 22:49:24.000000000 +0200
-@@ -81,6 +81,8 @@
- #define BI_AMIGA_ECLOCK		0x8005	/* EClock frequency (u_long) */
- #define BI_AMIGA_CHIPSET	0x8006	/* native chipset present (u_long) */
- #define BI_AMIGA_SERPER		0x8007	/* serial port period (u_short) */
-+#define BI_AMIGA_PUP_BRIDGE	0x8008	/* powerup bridge (u_short) */
-+#define BI_AMIGA_BPPC_SCSI	0x8009	/* blizzard ppc scsi*/
- 
-     /*
-      *  Atari-specific tags
-diff -Nur -x CVS linux-2.6.12/include/asm-ppc/amigahw.h 2.6/include/asm-ppc/amigahw.h
---- linux-2.6.12/include/asm-ppc/amigahw.h	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/include/asm-ppc/amigahw.h	2004-07-03 19:59:46.000000000 +0200
-@@ -1,6 +1,6 @@
--#ifdef __KERNEL__
- #ifndef __ASMPPC_AMIGAHW_H
- #define __ASMPPC_AMIGAHW_H
-+#ifdef __KERNEL__
- 
- #include <linux/config.h>
- #include <asm-m68k/amigahw.h>
-@@ -12,6 +12,13 @@
- #define CHIP_PHYSADDR      (0x004000)
- #endif
- 
-+struct rtc_time;
-+
-+extern void amiga_init_IRQ(void);
-+extern int amiga_hwclk(int, struct rtc_time *);
-+extern int amiga_set_clock_mmss (unsigned long nowtime);
-+extern void config_amiga(void);
-+extern void apus_setup_pci_ptrs(void);
- 
--#endif /* __ASMPPC_AMIGAHW_H */
- #endif /* __KERNEL__ */
-+#endif /* __ASMPPC_AMIGAHW_H */
-diff -Nur -x CVS linux-2.6.12/include/asm-ppc/bootinfo.h 2.6/include/asm-ppc/bootinfo.h
---- linux-2.6.12/include/asm-ppc/bootinfo.h	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/include/asm-ppc/bootinfo.h	2004-02-21 22:42:00.000000000 +0100
-@@ -36,7 +36,6 @@
- extern void bootinfo_init(struct bi_record *rec);
- extern void bootinfo_append(unsigned long tag, unsigned long size, void * data);
- extern void parse_bootinfo(struct bi_record *rec);
--extern unsigned long boot_mem_size;
- 
- static inline struct bi_record *
- bootinfo_addr(unsigned long offset)
-@@ -47,6 +46,7 @@
- }
- #endif /* CONFIG_APUS */
- 
-+extern unsigned long boot_mem_size;
- 
- #endif /* _PPC_BOOTINFO_H */
- #endif /* __KERNEL__ */
-diff -Nur -x CVS linux-2.6.12/include/asm-ppc/current.h 2.6/include/asm-ppc/current.h
---- linux-2.6.12/include/asm-ppc/current.h	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/include/asm-ppc/current.h	2004-02-04 22:21:36.000000000 +0100
-@@ -1,11 +1,11 @@
--#ifdef __KERNEL__
- #ifndef _PPC_CURRENT_H
- #define _PPC_CURRENT_H
-+#ifdef __KERNEL__
- 
- /*
-  * We keep `current' in r2 for speed.
-  */
- register struct task_struct *current asm ("r2");
- 
--#endif /* !(_PPC_CURRENT_H) */
- #endif /* __KERNEL__ */
-+#endif /* !(_PPC_CURRENT_H) */
-diff -Nur -x CVS linux-2.6.12/include/asm-ppc/io.h 2.6/include/asm-ppc/io.h
---- linux-2.6.12/include/asm-ppc/io.h	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/include/asm-ppc/io.h	2005-07-31 03:18:36.000000000 +0200
-@@ -1,6 +1,6 @@
--#ifdef __KERNEL__
- #ifndef _PPC_IO_H
- #define _PPC_IO_H
-+#ifdef __KERNEL__
- 
- #include <linux/config.h>
- #include <linux/string.h>
-@@ -294,10 +294,10 @@
- __do_out_asm(outb, "stbx")
- #ifdef CONFIG_APUS
- __do_in_asm(inb, "lbzx")
--__do_in_asm(inw, "lhz%U1%X1")
--__do_in_asm(inl, "lwz%U1%X1")
--__do_out_asm(outl,"stw%U0%X0")
--__do_out_asm(outw, "sth%U0%X0")
-+__do_in_asm(inw, "lhzx")
-+__do_in_asm(inl, "lwzx")
-+__do_out_asm(outl,"stwx")
-+__do_out_asm(outw, "sthx")
- #elif defined (CONFIG_8260_PCI9)
- /* in asm cannot be defined if PCI9 workaround is used */
- #define inb(port)		in_8((port)+___IO_BASE)
-@@ -377,12 +377,19 @@
- extern void __iomem *ioremap64(unsigned long long address, unsigned long size);
- #endif
- #define ioremap_nocache(addr, size)	ioremap((addr), (size))
-+#define ioremap_writethrough(addr, size) __ioremap((addr), (size), _PAGE_WRITETHRU)
- extern void iounmap(volatile void __iomem *addr);
- extern unsigned long iopa(unsigned long addr);
- extern unsigned long mm_ptov(unsigned long addr) __attribute_const__;
- extern void io_block_mapping(unsigned long virt, phys_addr_t phys,
- 			     unsigned int size, int flags);
- 
-+/* Values for nocacheflag and cmode */
-+#define IOMAP_FULL_CACHING		0
-+#define IOMAP_NOCACHE_SER		1
-+#define IOMAP_NOCACHE_NONSER		2
-+#define IOMAP_WRITETHROUGH		3
-+
- /*
-  * The PCI bus is inherently Little-Endian.  The PowerPC is being
-  * run Big-Endian.  Thus all values which cross the [PCI] barrier
-@@ -392,24 +399,16 @@
-  */
- extern inline unsigned long virt_to_bus(volatile void * address)
- {
--#ifndef CONFIG_APUS
-         if (address == (void *)0)
- 		return 0;
--        return (unsigned long)address - KERNELBASE + PCI_DRAM_OFFSET;
--#else
--	return iopa ((unsigned long) address);
--#endif
-+	return __pa(address) + PCI_DRAM_OFFSET;
- }
- 
- extern inline void * bus_to_virt(unsigned long address)
- {
--#ifndef CONFIG_APUS
-         if (address == 0)
- 		return NULL;
--        return (void *)(address - PCI_DRAM_OFFSET + KERNELBASE);
--#else
--	return (void*) mm_ptov (address);
--#endif
-+	return __va(address) - PCI_DRAM_OFFSET;
- }
- 
- /*
-@@ -418,20 +417,12 @@
-  */
- extern inline unsigned long virt_to_phys(volatile void * address)
- {
--#ifndef CONFIG_APUS
--	return (unsigned long) address - KERNELBASE;
--#else
--	return iopa ((unsigned long) address);
--#endif
-+	return __pa(address);
- }
- 
- extern inline void * phys_to_virt(unsigned long address)
- {
--#ifndef CONFIG_APUS
--	return (void *) (address + KERNELBASE);
--#else
--	return (void*) mm_ptov (address);
--#endif
-+	return __va(address);
- }
- 
- /*
-@@ -546,8 +537,6 @@
- extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max);
- extern void pci_iounmap(struct pci_dev *dev, void __iomem *);
- 
--#endif /* _PPC_IO_H */
--
- #ifdef CONFIG_8260_PCI9
- #include <asm/mpc8260_pci9.h>
- #endif
-@@ -564,3 +553,4 @@
- #define xlate_dev_kmem_ptr(p)	p
- 
- #endif /* __KERNEL__ */
-+#endif /* _PPC_IO_H */
-diff -Nur -x CVS linux-2.6.12/include/asm-ppc/machdep.h 2.6/include/asm-ppc/machdep.h
---- linux-2.6.12/include/asm-ppc/machdep.h	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/include/asm-ppc/machdep.h	2005-07-31 03:18:37.000000000 +0200
-@@ -8,10 +8,6 @@
- #include <asm/setup.h>
- #include <asm/page.h>
- 
--#ifdef CONFIG_APUS
--#include <asm-m68k/machdep.h>
--#endif
--
- struct pt_regs;
- struct pci_bus;	
- struct pci_dev;
-diff -Nur -x CVS linux-2.6.12/include/asm-ppc/pgtable.h 2.6/include/asm-ppc/pgtable.h
---- linux-2.6.12/include/asm-ppc/pgtable.h	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/include/asm-ppc/pgtable.h	2005-07-31 03:18:37.000000000 +0200
-@@ -679,7 +679,7 @@
- #define pmd_page_kernel(pmd)	\
- 	((unsigned long) __va(pmd_val(pmd) & PAGE_MASK))
- #define pmd_page(pmd)		\
--	(mem_map + (pmd_val(pmd) >> PAGE_SHIFT))
-+	pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)
- #else
- #define pmd_page_kernel(pmd)	\
- 	((unsigned long) (pmd_val(pmd) & PAGE_MASK))
-diff -Nur -x CVS linux-2.6.12/include/asm-ppc/zorro.h 2.6/include/asm-ppc/zorro.h
---- linux-2.6.12/include/asm-ppc/zorro.h	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/include/asm-ppc/zorro.h	2005-08-04 01:48:26.000000000 +0200
-@@ -3,13 +3,50 @@
- 
- #include <asm/io.h>
- 
--#define z_readb in_8
--#define z_readw in_be16
--#define z_readl in_be32
--
--#define z_writeb(val, port) out_8((port), (val))
--#define z_writew(val, port) out_be16((port), (val))
--#define z_writel(val, port) out_be32((port), (val))
-+static inline unsigned int z_readb(unsigned long addr)
-+{
-+	unsigned int ret;
-+
-+	ret = *(volatile u8 *)addr;
-+	eieio();
-+	return ret;
-+}
-+
-+static inline unsigned int z_readw(unsigned long addr)
-+{
-+	unsigned int ret;
-+
-+	ret = *(volatile u16 *)addr;
-+	eieio();
-+	return ret;
-+}
-+
-+static inline unsigned int z_readl(unsigned long addr)
-+{
-+	unsigned int ret;
-+
-+	ret = *(volatile u32 *)addr;
-+	eieio();
-+	return ret;
-+}
-+
-+static inline void z_writeb(unsigned int val, unsigned long addr)
-+{
-+	*(volatile u8 *)addr = val;
-+	eieio();
-+}
-+
-+static inline void z_writew(unsigned int val, unsigned long addr)
-+{
-+	*(volatile u16 *)addr = val;
-+	eieio();
-+}
-+
-+static inline void z_writel(unsigned int val,unsigned long addr)
-+{
-+	*(volatile u32 *)addr = val;
-+	eieio();
-+}
- 
- #define z_memset_io(a,b,c)	memset((void *)(a),(b),(c))
- #define z_memcpy_fromio(a,b,c)	memcpy((a),(void *)(b),(c))
-@@ -19,7 +56,6 @@
- 		       unsigned long flags);
- 
- extern void *ioremap(unsigned long address, unsigned long size);
--extern void iounmap(void *addr);
- 
- extern void *__ioremap(unsigned long address, unsigned long size,
-                        unsigned long flags);
-diff -Nur -x CVS linux-2.6.12/include/video/vga.h 2.6/include/video/vga.h
---- linux-2.6.12/include/video/vga.h	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/include/video/vga.h	2005-07-30 20:52:54.000000000 +0200
-@@ -28,6 +28,7 @@
-  * Ugh, we don't have PCI space, so map readb() and friends to use Zorro space
-  * for MMIO accesses. This should make cirrusfb work again on Amiga
-  */
-+#include <asm/zorro.h>
- #undef inb_p
- #undef inw_p
- #undef outb_p
-@@ -36,11 +37,17 @@
- #undef writeb
- #undef writew
- #define inb_p(port)	0
-+#undef inw_p
- #define inw_p(port)	0
-+#undef outb_p
- #define outb_p(port, val)	do { } while (0)
-+#undef outw
- #define outw(port, val)		do { } while (0)
-+#undef readb
- #define readb		z_readb
-+#undef writeb
- #define writeb		z_writeb
-+#undef writew
- #define writew		z_writew
- #endif
- #include <asm/byteorder.h>

Deleted: dists/trunk/linux-2.4/debian/patches-debian/powerpc-calibrate-tau.patch
===================================================================
--- dists/trunk/linux-2.4/debian/patches-debian/powerpc-calibrate-tau.patch	2005-09-22 09:22:48 UTC (rev 4255)
+++ dists/trunk/linux-2.4/debian/patches-debian/powerpc-calibrate-tau.patch	2005-09-22 09:30:47 UTC (rev 4256)
@@ -1,69 +0,0 @@
-#! /bin/sh -e 
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Description: Adds support TAU calibration on G3 processors
-## DP: Patch author: Nicolas DET <nd at bplan-gmbh.de>
-## DP: Upstream status: submitted
-
-diff -aurN a/arch/ppc/Kconfig b/arch/ppc/Kconfig
---- a/arch/ppc/Kconfig	2005-06-06 11:22:29.000000000 -0400
-+++ b/arch/ppc/Kconfig	2005-06-17 20:48:38.000000000 -0400
-@@ -198,6 +198,24 @@
- 
- 	  If in doubt, say N here.
- 
-+config TAU_CALIBRATED
-+        bool "The CPU sensor has been calibrated."
-+	depends on TAU
-+	help
-+	   Enable it you got the real temperature with an external sensor
-+	   and you know the offset between the one advertised by the CPU
-+	   and the real one
-+
-+config TAU_CALIBRATED_VALUE
-+	int "Offset of the themal sensor"
-+	depends on TAU_CALIBRATED
-+	default "0"
-+	help
-+	  This is the offset of the thermal sensor compare to the real value
-+	  For example, if you get 27°C in /proc/cpuinfo (uncalibrated) and
-+	  you know real one is 53°C, then you should set 26 as offset.
-+	  value = Real val - CPU val;
-+
- config MATH_EMULATION
- 	bool "Math emulation"
- 	depends on 4xx || 8xx || E500
-diff -aurN a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c
---- a/arch/ppc/kernel/setup.c	2005-06-06 11:22:29.000000000 -0400
-+++ b/arch/ppc/kernel/setup.c	2005-06-17 20:50:14.000000000 -0400
-@@ -201,17 +201,25 @@
- 
- #ifdef CONFIG_TAU
- 	if (cur_cpu_spec[i]->cpu_features & CPU_FTR_TAU) {
-+#ifdef CONFIG_TAU_CALIBRATED
-+		int is_calibrated	= 1;
-+		int temp_offset		= CONFIG_TAU_CALIBRATED_VALUE;
-+#else
-+		int is_calibrated 	= 0;
-+		int temp_offset		= 0;
-+#endif
- #ifdef CONFIG_TAU_AVERAGE
- 		/* more straightforward, but potentially misleading */
--		seq_printf(m,  "temperature \t: %u C (uncalibrated)\n",
--			   cpu_temp(i));
-+		seq_printf(m,  "temperature \t: %u C %s- average\n",
-+			   cpu_temp(i) + temp_offset,  is_calibrated ? "" : "(uncalibrated) " );
- #else
- 		/* show the actual temp sensor range */
- 		u32 temp;
- 		temp = cpu_temp_both(i);
--		seq_printf(m, "temperature \t: %u-%u C (uncalibrated)\n",
--			   temp & 0xff, temp >> 16);
--#endif
-+		seq_printf(m, "temperature \t: %u-%u C %s\n",
-+			   (temp & 0xff) + temp_offset, (temp >> 16) + temp_offset, is_calibrated ? "" : "(uncalibrated)" );
-+
-+#endif /* CONFIG_TAU_AVERAGE */
- 	}
- #endif /* CONFIG_TAU */
- 

Deleted: dists/trunk/linux-2.4/debian/patches-debian/powerpc-fix-power3-ftbfs.patch
===================================================================
--- dists/trunk/linux-2.4/debian/patches-debian/powerpc-fix-power3-ftbfs.patch	2005-09-22 09:22:48 UTC (rev 4255)
+++ dists/trunk/linux-2.4/debian/patches-debian/powerpc-fix-power3-ftbfs.patch	2005-09-22 09:30:47 UTC (rev 4256)
@@ -1,27 +0,0 @@
-#! /bin/sh -e 
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Description: Works around a broken build system, namely the
-## DP: Description: simple bootloader on power 3/4.
-## DP: Misc: Pulled from the ubuntu tree.
-## DP: Patch author: fabbione at ubuntu.com
-## DP: Upstream status: FTBFS fix, guess it will be fixed upstream too
-
-. $(dirname $0)/DPATCH
-
- at DPATCH@
-diff -urNad linux-source-2.6.10-2.6.10/arch/ppc/boot/simple/misc-prep.c /usr/src/dpatchtemp/dpep.cQRwcC/linux-source-2.6.10-2.6.10/arch/ppc/boot/simple/misc-prep.c
---- linux-source-2.6.10-2.6.10/arch/ppc/boot/simple/misc-prep.c	2004-12-24 22:33:51.000000000 +0100
-+++ /usr/src/dpatchtemp/dpep.cQRwcC/linux-source-2.6.10-2.6.10/arch/ppc/boot/simple/misc-prep.c	2004-12-28 10:43:29.838010536 +0100
-@@ -152,9 +152,11 @@
- 		hold_residual->VitalProductData.Reserved5 = 0xdeadbeef;
- 	}
- 
-+#if defined(CONFIG_6xx)
- 	/* Now go and clear out the BATs and ensure that our MSR is
- 	 * correct .*/
- 	disable_6xx_mmu();
-+#endif
- 
- 	/* Make r3 be a pointer to the residual data. */
- 	return (unsigned long)hold_residual;

Deleted: dists/trunk/linux-2.4/debian/patches-debian/powerpc-g3-750cxe.patch
===================================================================
--- dists/trunk/linux-2.4/debian/patches-debian/powerpc-g3-750cxe.patch	2005-09-22 09:22:48 UTC (rev 4255)
+++ dists/trunk/linux-2.4/debian/patches-debian/powerpc-g3-750cxe.patch	2005-09-22 09:30:47 UTC (rev 4256)
@@ -1,68 +0,0 @@
-#! /bin/sh -e 
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Description: Adds support for 750CXe rev 3.1, prv 0008 3311 (previously recognized as 745/755).
-## DP: Patch author: Nicolas DET <nd at bplan-gmbh.de>
-## DP: Upstream status: submitted
-
-. $(dirname $0)/DPATCH
-
- at DPATCH@
---- linux-2.6.11.orig/arch/ppc/kernel/cputable.c	2005-03-02 08:38:09.000000000 +0100
-+++ linux-2.6.11_nico/arch/ppc/kernel/cputable.c	2005-03-04 15:39:11.032975088 +0100
-@@ -198,20 +198,6 @@
- 		.num_pmcs		= 4,
- 		.cpu_setup		= __setup_cpu_750
- 	},
--	{	/* 745/755 */
--		.pvr_mask		= 0xfffff000,
--		.pvr_value		= 0x00083000,
--		.cpu_name		= "745/755",
--		.cpu_features		= CPU_FTR_COMMON |
--			CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE |
--			CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_TAU |
--			CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP,
--		.cpu_user_features	= COMMON_PPC,
--		.icache_bsize		= 32,
--		.dcache_bsize		= 32,
--		.num_pmcs		= 4,
--		.cpu_setup		= __setup_cpu_750
--	},
- 	{	/* 750CX (80100 and 8010x?) */
- 		.pvr_mask		= 0xfffffff0,
- 		.pvr_value		= 0x00080100,
-@@ -254,6 +240,34 @@
- 		.num_pmcs		= 4,
- 		.cpu_setup		= __setup_cpu_750cx
- 	},
-+	{	/* 750CXe (00082311 or 00083311) revision 3.1 / 3.1 pre_GA */
-+		.pvr_mask		= 0xffff0fff,
-+		.pvr_value		= 0x00080311,
-+		.cpu_name		= "750CXe rev 3.1",
-+		.cpu_features		= CPU_FTR_COMMON |
-+			CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE |
-+			CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_TAU |
-+			CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP,
-+		.cpu_user_features	= COMMON_PPC,
-+		.icache_bsize		= 32,
-+		.dcache_bsize		= 32,
-+		.num_pmcs		= 4,
-+		.cpu_setup		= __setup_cpu_750cx
-+	},
-+	{	/* 745/755 */
-+		.pvr_mask		= 0xfffff000,
-+		.pvr_value		= 0x00083000,
-+		.cpu_name		= "745/755",
-+		.cpu_features		= CPU_FTR_COMMON |
-+			CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE |
-+			CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_TAU |
-+			CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP,
-+		.cpu_user_features	= COMMON_PPC,
-+		.icache_bsize		= 32,
-+		.dcache_bsize		= 32,
-+		.num_pmcs		= 4,
-+		.cpu_setup		= __setup_cpu_750
-+	},
- 	{	/* 750FX rev 1.x */
- 		.pvr_mask		= 0xffffff00,
- 		.pvr_value		= 0x70000100,

Deleted: dists/trunk/linux-2.4/debian/patches-debian/powerpc-g4-l2-flush-errata.patch
===================================================================
--- dists/trunk/linux-2.4/debian/patches-debian/powerpc-g4-l2-flush-errata.patch	2005-09-22 09:22:48 UTC (rev 4255)
+++ dists/trunk/linux-2.4/debian/patches-debian/powerpc-g4-l2-flush-errata.patch	2005-09-22 09:30:47 UTC (rev 4256)
@@ -1,243 +0,0 @@
-# Description: Fixes g4 l2 cache flush and MSR erratas.
-# Patch author: Jacob Pan.
-# Rediffed for 2.6.12 by Sven Luther <luther at debian.org>
-# Upstream status: under review by benh.
-
-. $(dirname $0)/DPATCH
-
- at DPATCH@
---- linux-kernel-2.6.12-2.6.12/./arch/ppc/kernel/cputable.c.orig	2005-06-17 19:48:29.000000000 +0000
-+++ linux-kernel-2.6.12-2.6.12/./arch/ppc/kernel/cputable.c	2005-07-16 12:09:33.000000000 +0000
-@@ -380,7 +380,7 @@
- 			CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB |
- 			CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
- 			CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 |
--			CPU_FTR_NEED_COHERENT,
-+			CPU_FTR_NEED_COHERENT | CPU_FTR_HWFLUSH_L2_CACHE,
- 		.cpu_user_features	= COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP,
- 		.icache_bsize		= 32,
- 		.dcache_bsize		= 32,
-@@ -397,7 +397,7 @@
- 			CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
- 			CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 |
- 			CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_L3_DISABLE_NAP |
--			CPU_FTR_NEED_COHERENT,
-+			CPU_FTR_NEED_COHERENT | CPU_FTR_HWFLUSH_L2_CACHE,
- 		.cpu_user_features	= COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP,
- 		.icache_bsize		= 32,
- 		.dcache_bsize		= 32,
-@@ -413,7 +413,8 @@
- 			CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR |
- 			CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
- 			CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 |
--			CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_NEED_COHERENT,
-+			CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_NEED_COHERENT |
-+			CPU_FTR_HWFLUSH_L2_CACHE,
- 		.cpu_user_features	= COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP,
- 		.icache_bsize		= 32,
- 		.dcache_bsize		= 32,
-@@ -428,7 +429,8 @@
- 			CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB |
- 			CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
- 			CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 |
--			CPU_FTR_HAS_HIGH_BATS | CPU_FTR_NEED_COHERENT,
-+			CPU_FTR_HAS_HIGH_BATS | CPU_FTR_NEED_COHERENT |
-+			CPU_FTR_HWFLUSH_L2_CACHE,
- 		.cpu_user_features	= COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP,
- 		.icache_bsize		= 32,
- 		.dcache_bsize		= 32,
-@@ -445,7 +447,8 @@
- 			CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
- 			CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 |
- 			CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_L3_DISABLE_NAP |
--			CPU_FTR_NEED_COHERENT | CPU_FTR_HAS_HIGH_BATS,
-+			CPU_FTR_NEED_COHERENT | CPU_FTR_HAS_HIGH_BATS |
-+			CPU_FTR_HWFLUSH_L2_CACHE,
- 		.cpu_user_features	= COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP,
- 		.icache_bsize		= 32,
- 		.dcache_bsize		= 32,
-@@ -462,7 +465,7 @@
- 			CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
- 			CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 |
- 			CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS |
--			CPU_FTR_NEED_COHERENT,
-+			CPU_FTR_NEED_COHERENT | CPU_FTR_HWFLUSH_L2_CACHE,
- 		.cpu_user_features	= COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP,
- 		.icache_bsize		= 32,
- 		.dcache_bsize		= 32,
-@@ -479,7 +482,8 @@
- 			CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
- 			CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 |
- 			CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS |
--			CPU_FTR_NEED_COHERENT | CPU_FTR_NO_BTIC,
-+			CPU_FTR_NEED_COHERENT | CPU_FTR_NO_BTIC |
-+			CPU_FTR_HWFLUSH_L2_CACHE,
- 		.cpu_user_features	= COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP,
- 		.icache_bsize		= 32,
- 		.dcache_bsize		= 32,
-@@ -496,7 +500,8 @@
- 			CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
- 			CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 |
- 			CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS |
--			CPU_FTR_NEED_COHERENT | CPU_FTR_NO_BTIC,
-+			CPU_FTR_NEED_COHERENT | CPU_FTR_NO_BTIC |
-+			CPU_FTR_HWFLUSH_L2_CACHE,
- 		.cpu_user_features	= COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP,
- 		.icache_bsize		= 32,
- 		.dcache_bsize		= 32,
-@@ -513,7 +518,7 @@
- 			CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
- 			CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 |
- 			CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS |
--			CPU_FTR_NEED_COHERENT,
-+			CPU_FTR_NEED_COHERENT | CPU_FTR_HWFLUSH_L2_CACHE,
- 		.cpu_user_features	= COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP,
- 		.icache_bsize		= 32,
- 		.dcache_bsize		= 32,
-@@ -529,7 +534,8 @@
- 			CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR |
- 			CPU_FTR_ALTIVEC_COMP | CPU_FTR_HPTE_TABLE |
- 			CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR |
--			CPU_FTR_HAS_HIGH_BATS | CPU_FTR_NEED_COHERENT,
-+			CPU_FTR_HAS_HIGH_BATS | CPU_FTR_NEED_COHERENT |
-+			CPU_FTR_HWFLUSH_L2_CACHE,
- 		.cpu_user_features	= COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP,
- 		.icache_bsize		= 32,
- 		.dcache_bsize		= 32,
-@@ -537,7 +543,7 @@
- 		.cpu_setup		= __setup_cpu_745x
- 	},
- 	{	/* 82xx (8240, 8245, 8260 are all 603e cores) */
--		.pvr_mask		= 0x7fff0000,
-+		.pvr_mask		= 0x7fff0000,	
- 		.pvr_value		= 0x00810000,
- 		.cpu_name		= "82xx",
- 		.cpu_features		= CPU_FTR_COMMON |
---- linux-kernel-2.6.12-2.6.12/./arch/ppc/kernel/l2cr.S.orig	2005-06-17 19:48:29.000000000 +0000
-+++ linux-kernel-2.6.12-2.6.12/./arch/ppc/kernel/l2cr.S	2005-07-16 11:50:39.000000000 +0000
-@@ -36,7 +36,9 @@
- 		several months.  The L2CR is similar, but I'm going
- 		to assume the user of this functions knows what they
- 		are doing.
--
-+	June 17, 2004.
-+	- JPAN: Fixed 745X L3 cache enablement routine, also use HW flush assist.
-+	
- 	Author:	Terry Greeniaus (tgree at phys.ualberta.ca)
- 	Please e-mail updates to this file to me, thanks!
- */
-@@ -155,9 +157,7 @@
- 	       Don't do this unless you accomodate all processor variations.
- 	       The bit moved on the 7450.....
- 	  ****/
--
--	/* TODO: use HW flush assist when available */
--
-+BEGIN_FTR_SECTION
- 	lis	r4,0x0002
- 	mtctr	r4
- 	li	r4,0
-@@ -176,7 +176,23 @@
- 	dcbf	0,r4
- 	addi	r4,r4,32		/* Go to start of next cache line */
- 	bdnz	1b
-+END_FTR_SECTION_IFCLR(CPU_FTR_HWFLUSH_L2_CACHE)
- 
-+BEGIN_FTR_SECTION
-+	/* Use HW flush assist, MPC7447A errata #3 */
-+	oris	r4,r4,0x0010	/* Set L2CR[IONLY/11] = 1 */
-+	oris	r4,r4,0x0001	/* Set L2CR[DONLY/15] = 1 */
-+	mtspr   SPRN_L2CR,r4		/* Lock the L2	*/
-+	sync
-+	ori	r4,r4,0x0800	/* Set L2CR[L2HWF/20] = 1 */
-+	mtspr   SPRN_L2CR,r4		/* Flush the L2 */
-+1:	
-+	mfspr	r4,SPRN_L2CR
-+	andi.	r4,r4,0x0800	/* L2HWF still set? */
-+	bne	1b
-+	sync	/* sync to clear the store queues before L3 flush (UM step 5)*/
-+END_FTR_SECTION_IFSET(CPU_FTR_HWFLUSH_L2_CACHE)
-+	
- 2:
- 	/* Set up the L2CR configuration bits (and switch L2 off) */
- 	/* CPU errata: Make sure the mtspr below is already in the
-@@ -293,17 +309,18 @@
- 
- 	/* Flush the cache.
- 	 */
--
--	/* TODO: use HW flush assist */
--
--	lis	r4,0x0008
--	mtctr	r4
--	li	r4,0
--1:
--	lwzx	r0,r0,r4
--	dcbf	0,r4
--	addi	r4,r4,32		/* Go to start of next cache line */
--	bdnz	1b
-+	/* use HW flush assist. (UM 3.6.3.1.5) */
-+	mfspr	r4, SPRN_L3CR
-+	oris	r4,r4,0x0040	/* Set L3CR[L3IO/9] = 1. */
-+	ori	r4,r4,0x0040	/* Set L3CR[L3DO/29] = 1.*/
-+	mtspr	1018,r4		/* Lock the L3 by making IONLY and DONLY */
-+	ori	r4,r4,0x0800	/* Set L3CR[L3HWF/20] for hardware flush */
-+	mtspr	SPRN_L3CR,r4
-+flush_745x_L3_poll:
-+	mfspr	r4,SPRN_L3CR
-+	rlwinm.	r4,r4,0,20,20
-+	bne	flush_745x_L3_poll
-+	sync	/* Clear the store queues per procedure (UM step 8) */
- 
- 2:
- 	/* Set up the L3CR configuration bits (and switch L3 off) */
-@@ -349,8 +366,8 @@
- 	cmplwi	r5,0
- 	beq	4f
- 
--	/* Enable the cache */
--	oris	r3,r3,(L3CR_L3E | L3CR_L3CLKEN)@h
-+	/* enable L3 clock */
-+	oris	r3,r3,(L3CR_L3CLKEN)@h
- 	mtspr	SPRN_L3CR,r3
- 	sync
- 
-@@ -358,6 +375,15 @@
- 	li	r0,256
- 	mtctr	r0
- 1:	bdnz	1b
-+	
-+	/* Clear MSSSR0 which may cause parity error */
-+	xor	r5,r5,r5
-+	mtspr	1015, r5
-+	
-+	/* Enable L3 cache */
-+	oris	r3,r3,(L3CR_L3E)@h
-+	mtspr	SPRN_L3CR,r3
-+	sync
- 
- 	/* Restore MSR (restores EE and DR bits to original state) */
- 4:	SYNC
---- linux-kernel-2.6.12-2.6.12/./arch/ppc/kernel/traps.c.orig	2005-06-17 19:48:29.000000000 +0000
-+++ linux-kernel-2.6.12-2.6.12/./arch/ppc/kernel/traps.c	2005-07-16 11:50:39.000000000 +0000
-@@ -307,7 +307,9 @@
- 	case 0x80000:
- 		printk("Machine check signal\n");
- 		break;
--	case 0:		/* for 601 */
-+	case 0:		/* for 601 and 744x */
-+		printk("Transfer error ack signal if 601, or MCP if 744x \n");
-+		break;
- 	case 0x40000:
- 	case 0x140000:	/* 7450 MSS error and TEA */
- 		printk("Transfer error ack signal\n");
---- linux-kernel-2.6.12-2.6.12/./include/asm-ppc/cputable.h.orig	2005-06-17 19:48:29.000000000 +0000
-+++ linux-kernel-2.6.12-2.6.12/./include/asm-ppc/cputable.h	2005-07-16 11:52:01.000000000 +0000
-@@ -89,6 +89,7 @@
- #define CPU_FTR_NEED_COHERENT		0x00020000
- #define CPU_FTR_NO_BTIC			0x00040000
- #define CPU_FTR_BIG_PHYS		0x00080000
-+#define CPU_FTR_HWFLUSH_L2_CACHE	0x00100000
- 
- #ifdef __ASSEMBLY__
- 

Deleted: dists/trunk/linux-2.4/debian/patches-debian/powerpc-mkvmlinuz-support.patch
===================================================================
--- dists/trunk/linux-2.4/debian/patches-debian/powerpc-mkvmlinuz-support.patch	2005-09-22 09:22:48 UTC (rev 4255)
+++ dists/trunk/linux-2.4/debian/patches-debian/powerpc-mkvmlinuz-support.patch	2005-09-22 09:30:47 UTC (rev 4256)
@@ -1,54 +0,0 @@
-# 
-# Mkvmlinuz support patch, called by debian's kernel-package to generate
-# the files needed by mkvmlinuz to generate the bootable images from vmlinux.
-# Author: Sven Luther <luther at debian.org>
-# Based on work from: Jens Schmalzing <jensen at debian.org>
-# Original comment from Jens :
-#   This shell script is intended to be put into the debian subdirectory
-#   of a Linux kernel tree, where make-kpkg will find and execute it
-#   while building a kernel-image package.  The purpose of this script
-#   is to add glue (object code, libraries, utilities and so on) from
-#   the kernel tree to the kernel-image package.  Later, the mkvmlinuz
-#   utility, which is available as a separate Debian package, can use
-#   this glue to create a bootable compressed kernel from the
-#   uncompressed kernel in the kernel-image package and optionally a
-#   ramdisk.  This is especially important on PowerPC subarchitectures
-#   that don't have a boot loader, but also comes handy for rescue
-#   systems and the like.
-# Upstream status: well, this is a debian specific hack, it would be nice
-# if it was going upstream, but probably not in this form.
-#
---- linux-kernel-2.6.12-2.6.12/arch/ppc/boot/Makefile.orig	2005-07-15 12:46:28.000000000 +0000
-+++ linux-kernel-2.6.12-2.6.12/arch/ppc/boot/Makefile	2005-07-15 12:55:56.000000000 +0000
-@@ -32,3 +32,31 @@
- $(bootdir-y): $(addprefix $(obj)/,$(subdir-y)) \
- 		$(addprefix $(obj)/,$(hostprogs-y))
- 	$(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS)
-+
-+mkvmlinuz_support_install:
-+	# mkvmlinuz support, based on work done originally by Jens Schmalzing <jensen at debian.org>
-+	mkdir -p $(INSTALL_MKVMLINUZ)/boot
-+	install -m 644 -o root -g root ld.script openfirmware/note $(INSTALL_MKVMLINUZ)/boot
-+
-+	mkdir -p $(INSTALL_MKVMLINUZ)/lib
-+	install -m 644 -o root -g root ../../../lib/lib.a $(INSTALL_MKVMLINUZ)/lib
-+	install -m 644 -o root -g root lib/lib.a $(INSTALL_MKVMLINUZ)/lib/ppc.a
-+	install -m 644 -o root -g root common/lib.a $(INSTALL_MKVMLINUZ)/lib/common.a
-+	install -m 644 -o root -g root of1275/lib.a $(INSTALL_MKVMLINUZ)/lib/of.a
-+
-+	mkdir -p $(INSTALL_MKVMLINUZ)/obj/openfirmware
-+	install -m 644 -o root -g root openfirmware/*.o $(INSTALL_MKVMLINUZ)/obj/openfirmware
-+	rm -f $(INSTALL_MKVMLINUZ)/obj/openfirmware/image*
-+
-+	mkdir -p $(INSTALL_MKVMLINUZ)/obj/simple
-+	install -m 644 -o root -g root simple/*.o $(INSTALL_MKVMLINUZ)/obj/simple
-+	rm -f $(INSTALL_MKVMLINUZ)/obj/simple/image*.o
-+
-+	mkdir -p $(INSTALL_MKVMLINUZ)/utils
-+	install -m 755 -o root -g root utils/addnote $(INSTALL_MKVMLINUZ)/utils
-+	install -m 755 -o root -g root utils/hack-coff $(INSTALL_MKVMLINUZ)/utils
-+	install -m 755 -o root -g root utils/mkbugboot $(INSTALL_MKVMLINUZ)/utils
-+	install -m 755 -o root -g root utils/mknote $(INSTALL_MKVMLINUZ)/utils
-+	install -m 755 -o root -g root utils/mkprep $(INSTALL_MKVMLINUZ)/utils
-+	install -m 755 -o root -g root utils/mktree $(INSTALL_MKVMLINUZ)/utils
-+

Deleted: dists/trunk/linux-2.4/debian/patches-debian/powerpc-mv643xx-hotplug-support.patch
===================================================================
--- dists/trunk/linux-2.4/debian/patches-debian/powerpc-mv643xx-hotplug-support.patch	2005-09-22 09:22:48 UTC (rev 4255)
+++ dists/trunk/linux-2.4/debian/patches-debian/powerpc-mv643xx-hotplug-support.patch	2005-09-22 09:30:47 UTC (rev 4256)
@@ -1,35 +0,0 @@
-# 
-# Hotplug support patch for mv643xx_eth driver used on pegasos machines.
-# Author: Nicolas Det <nicolas.det at bplan-gmbh.de>
-# Upstream status: In the process of being submitted, may need a bit of
-# cleanup in order to not break embedded arches using this controller, but
-# should not be a worry for debian.
-#
---- linux-2.6.14-rc1/drivers/net/mv643xx_eth.c	2005-09-14 08:15:11.000065096 +0200
-+++ linux-2.6.14-rc1_nico/drivers/net/mv643xx_eth.c	2005-09-15 12:57:50.646269250 +0200
-@@ -1533,6 +1533,9 @@
- 	printk(KERN_NOTICE "%s: RX NAPI Enabled \n", dev->name);
- #endif
- 
-+	if (mp->tx_sram_size > 0)
-+		printk(KERN_NOTICE "%s: Using SRAM\n", dev->name);
-+
- 	return 0;
- 
- out:
-@@ -1640,6 +1643,15 @@
- 		" and Dale Farnsworth");
- MODULE_DESCRIPTION("Ethernet driver for Marvell MV643XX");
- 
-+#include <linux/pci.h>
-+
-+static struct pci_device_id pci_marvell_mv64360[] = {
-+		{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, PCI_DEVICE_ID_MARVELL_MV64360) },
-+		{ }
-+	};
-+
-+MODULE_DEVICE_TABLE(pci, pci_marvell_mv64360);
-+
- /*
-  * The second part is the low level driver of the gigE ethernet ports.
-  */

Deleted: dists/trunk/linux-2.4/debian/patches-debian/powerpc-pmac-cache-power34-fix.patch
===================================================================
--- dists/trunk/linux-2.4/debian/patches-debian/powerpc-pmac-cache-power34-fix.patch	2005-09-22 09:22:48 UTC (rev 4255)
+++ dists/trunk/linux-2.4/debian/patches-debian/powerpc-pmac-cache-power34-fix.patch	2005-09-22 09:30:47 UTC (rev 4256)
@@ -1,30 +0,0 @@
-#! /bin/sh -e
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Description: [PATCH] ppc32: fixes FTBFS on power3/4.
-## DP: This patch doesn't build pmac_cache.S on power3/power4, since it is
-## DP: broken there and not needed.
-## DP: Patch author: Sven Luther <luther at debian.org>
-## DP: Upstream status: FTBFS, submitted to linuxppc-dev and benh.
-
-. $(dirname $0)/DPATCH
-
- at DPATCH@
---- kernel-source-2.6.11/arch/ppc/platforms/Makefile.orig	2005-03-27 11:38:25.000000000 +0200
-+++ kernel-source-2.6.11/arch/ppc/platforms/Makefile	2005-03-27 11:39:23.000000000 +0200
-@@ -9,9 +9,15 @@
- ifeq ($(CONFIG_APUS),y)
- obj-$(CONFIG_PCI)		+= apus_pci.o
- endif
-+ifeq ($(CONFIG_6xx),y)
- obj-$(CONFIG_PPC_PMAC)		+= pmac_pic.o pmac_setup.o pmac_time.o \
- 					pmac_feature.o pmac_pci.o pmac_sleep.o \
- 					pmac_low_i2c.o pmac_cache.o
-+else
-+obj-$(CONFIG_PPC_PMAC)		+= pmac_pic.o pmac_setup.o pmac_time.o \
-+					pmac_feature.o pmac_pci.o pmac_sleep.o \
-+					pmac_low_i2c.o
-+endif
- obj-$(CONFIG_PPC_CHRP)		+= chrp_setup.o chrp_time.o chrp_pci.o \
- 					chrp_pegasos_eth.o
- obj-$(CONFIG_PPC_PREP)		+= prep_pci.o prep_setup.o

Deleted: dists/trunk/linux-2.4/debian/patches-debian/powerpc-pmac-sound-check.patch
===================================================================
--- dists/trunk/linux-2.4/debian/patches-debian/powerpc-pmac-sound-check.patch	2005-09-22 09:22:48 UTC (rev 4255)
+++ dists/trunk/linux-2.4/debian/patches-debian/powerpc-pmac-sound-check.patch	2005-09-22 09:30:47 UTC (rev 4256)
@@ -1,30 +0,0 @@
-# Description: checks if ppc_md.feature_call is present before using it.
-# Patch author: David Woodhouse <dwmw2 at infradead.org>
-# Upstream status: submitted.
-
-We shouldn't be assuming that ppc_md.feature_call will be present.
-
-Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
-
---- linux-2.6.12/sound/ppc/pmac.c.orig	2005-08-17 11:19:46.000000000 +0100
-+++ linux-2.6.12/sound/ppc/pmac.c	2005-08-17 11:20:05.000000000 +0100
-@@ -765,7 +765,8 @@ snd_pmac_ctrl_intr(int irq, void *devid,
-  */
- static void snd_pmac_sound_feature(pmac_t *chip, int enable)
- {
--	ppc_md.feature_call(PMAC_FTR_SOUND_CHIP_ENABLE, chip->node, 0, enable);
-+	if (ppc_md.feature_call)
-+		ppc_md.feature_call(PMAC_FTR_SOUND_CHIP_ENABLE, chip->node, 0, enable);
- }
- 
- /*
-
--- 
-dwmw2
-
----------------------------------------------------------------------------------------
-Wanadoo vous informe que cet  e-mail a ete controle par l'anti-virus mail. 
-Aucun virus connu a ce jour par nos services n'a ete detecte.
-
-
-

Deleted: dists/trunk/linux-2.4/debian/patches-debian/powerpc-ppc64-biarch-override.patch
===================================================================
--- dists/trunk/linux-2.4/debian/patches-debian/powerpc-ppc64-biarch-override.patch	2005-09-22 09:22:48 UTC (rev 4255)
+++ dists/trunk/linux-2.4/debian/patches-debian/powerpc-ppc64-biarch-override.patch	2005-09-22 09:30:47 UTC (rev 4256)
@@ -1,44 +0,0 @@
-# Subject: [patch 059/167] ppc64: override command line AS/LD/CC variables when adding -m64 and co for biarch compilers
-# To: torvalds at osdl.org
-# Cc: akpm at osdl.org, sven.luther at wanadoo.fr, anton at samba.org,
-#    benh at kernel.crashing.org, paulus at samba.org
-# From: akpm at osdl.org
-#
-# The following kind of calls currently fails :
-#
-#  make ARCH=ppc64 CC="gcc-3.4"
-#
-# Since the code for detecting a biarch compiler and adding the needed 64bit
-# magic argument fails if the AS/LD/CC commands are overriden in the command
-# line.
-#
-# The attached patch fixes this by using the make override and += directive,
-# but i am not 100% sure this will work without gmake, as i am no Makefile
-# expert.
-# 
-# Cc: Paul Mackerras <paulus at samba.org>
-# Cc: Anton Blanchard <anton at samba.org>
-# Cc: Benjamin Herrenschmidt <benh at kernel.crashing.org>
-# Signed-off-by: Andrew Morton <akpm at osdl.org>
-# ---
-#
-# arch/ppc64/Makefile |    6 +++---
-# 1 files changed, 3 insertions(+), 3 deletions(-)
-#
-diff -puN arch/ppc64/Makefile~ppc64-override-command-line-as-ld-cc-variables-when-adding-m64-and-co-for-biarch-compilers arch/ppc64/Makefile
---- 25/arch/ppc64/Makefile~ppc64-override-command-line-as-ld-cc-variables-when-adding-m64-and-co-for-biarch-compilers	2005-06-21 16:29:10.000000000 -0700
-+++ 25-akpm/arch/ppc64/Makefile	2005-06-21 16:29:10.000000000 -0700
-@@ -35,9 +35,9 @@ CROSS32AS	:= $(AS) -a32
- CROSS32LD	:= $(LD) -m elf32ppc
- CROSS32OBJCOPY	:= $(OBJCOPY)
- endif
--AS              := $(AS) -a64
--LD              := $(LD) -m elf64ppc
--CC		:= $(CC) -m64
-+override AS	+= -a64
-+override LD	+= -m elf64ppc
-+override CC	+= -m64
- endif
- 
- export CROSS32CC CROSS32AS CROSS32LD CROSS32OBJCOPY
-_

Deleted: dists/trunk/linux-2.4/debian/patches-debian/powerpc-serial-of.patch
===================================================================
--- dists/trunk/linux-2.4/debian/patches-debian/powerpc-serial-of.patch	2005-09-22 09:22:48 UTC (rev 4255)
+++ dists/trunk/linux-2.4/debian/patches-debian/powerpc-serial-of.patch	2005-09-22 09:30:47 UTC (rev 4256)
@@ -1,442 +0,0 @@
-# Description: Adds a new OF-based serial driver instead of the bit-banging # one.
-# Patch author: David Woodhouse <dwmw2 at infradead.org>
-# Upstream status: Well, this should replace the hacky workaround
-# introduced in the powerpc-serial patch. not yet enabled though as i am
-# unsure how this will work on PReP hardware.
-
---- linux-2.6.12/drivers/serial/Makefile~	2005-08-11 13:51:50.000000000 +0100
-+++ linux-2.6.12/drivers/serial/Makefile	2005-08-15 21:08:49.000000000 +0100
-@@ -22,6 +22,7 @@ obj-$(CONFIG_SERIAL_8250_ACCENT) += 8250
- obj-$(CONFIG_SERIAL_8250_BOCA) += 8250_boca.o
- obj-$(CONFIG_SERIAL_8250_HUB6) += 8250_hub6.o
- obj-$(CONFIG_SERIAL_8250_MCA) += 8250_mca.o
-+obj-$(CONFIG_SERIAL_8250_OF) += 8250_of.o
- obj-$(CONFIG_SERIAL_AMBA_PL010) += amba-pl010.o
- obj-$(CONFIG_SERIAL_AMBA_PL011) += amba-pl011.o
- obj-$(CONFIG_SERIAL_CLPS711X) += clps711x.o
---- linux-2.6.12/drivers/serial/8250_of.c~	2005-08-15 21:14:27.000000000 +0100
-+++ linux-2.6.12/drivers/serial/8250_of.c	2005-08-15 21:20:59.000000000 +0100
-@@ -0,0 +1,199 @@
-+#include <linux/kernel.h>
-+#include <linux/serial.h>
-+#include <linux/serial_8250.h>
-+#include <linux/config.h>
-+#include <linux/module.h>
-+#include <linux/init.h>
-+#include <linux/pci.h>
-+#include <asm/serial.h>
-+#include <asm/prom.h>
-+
-+#if 0
-+#define DBG(fmt...) printk(KERN_DEBUG fmt)
-+#else
-+#define DBG(fmt) do { } while (0)
-+#endif
-+
-+/*
-+ * This function can be used by platforms to "find" legacy serial ports.
-+ * It works for "serial" nodes under an "isa" node, and will try to
-+ * respect the "ibm,aix-loc" property if any. It works with up to 8
-+ * ports.
-+ */
-+
-+#define MAX_LEGACY_SERIAL_PORTS	8
-+static int ports_probed = 0;
-+
-+static struct plat_serial8250_port serial_ports[MAX_LEGACY_SERIAL_PORTS+1];
-+static unsigned int old_serial_count;
-+
-+void __init generic_find_legacy_serial_ports(u64 *physport,
-+		unsigned int *default_speed)
-+{
-+	struct device_node *np;
-+	u32 *sizeprop;
-+
-+	struct isa_reg_property {
-+		u32 space;
-+		u32 address;
-+		u32 size;
-+	};
-+
-+	DBG(" -> generic_find_legacy_serial_port()\n");
-+	ports_probed = 1;
-+
-+	*physport = 0;
-+	if (default_speed)
-+		*default_speed = 0;
-+
-+	np = of_find_node_by_path("/");
-+	if (!np)
-+		return;
-+
-+	/* First fill our array */
-+	for (np = NULL; (np = of_find_node_by_type(np, "serial"));) {
-+		struct device_node *isa, *pci;
-+		struct isa_reg_property *reg;
-+		unsigned long phys_size, addr_size;
-+		u64 io_base;
-+		u32 *rangesp;
-+		u32 *interrupts, *clk, *spd;
-+		char *typep;
-+		int index, rlen, rentsize;
-+
-+		/* Ok, first check if it's under an "isa" parent */
-+		isa = of_get_parent(np);
-+		if (!isa || strcmp(isa->name, "isa")) {
-+			DBG("%s: no isa parent found\n", np->full_name);
-+			continue;
-+		}
-+		
-+		/* Now look for an "ibm,aix-loc" property that gives us ordering
-+		 * if any...
-+		 */
-+	 	typep = (char *)get_property(np, "ibm,aix-loc", NULL);
-+
-+		/* Get the ISA port number */
-+		reg = (struct isa_reg_property *)get_property(np, "reg", NULL);	
-+		if (reg == NULL)
-+			goto next_port;
-+		/* We assume the interrupt number isn't translated ... */
-+		interrupts = (u32 *)get_property(np, "interrupts", NULL);
-+		/* get clock freq. if present */
-+		clk = (u32 *)get_property(np, "clock-frequency", NULL);
-+		/* get default speed if present */
-+		spd = (u32 *)get_property(np, "current-speed", NULL);
-+		/* Default to locate at end of array */
-+		index = old_serial_count; /* end of the array by default */
-+
-+		/* If we have a location index, then use it */
-+		if (typep && *typep == 'S') {
-+			index = simple_strtol(typep+1, NULL, 0) - 1;
-+			/* if index is out of range, use end of array instead */
-+			if (index >= MAX_LEGACY_SERIAL_PORTS)
-+				index = old_serial_count;
-+			/* if our index is still out of range, that mean that
-+			 * array is full, we could scan for a free slot but that
-+			 * make little sense to bother, just skip the port
-+			 */
-+			if (index >= MAX_LEGACY_SERIAL_PORTS)
-+				goto next_port;
-+			if (index >= old_serial_count)
-+				old_serial_count = index + 1;
-+			/* Check if there is a port who already claimed our slot */
-+			if (serial_ports[index].iobase != 0) {
-+				/* if we still have some room, move it, else override */
-+				if (old_serial_count < MAX_LEGACY_SERIAL_PORTS) {
-+					DBG("Moved legacy port %d -> %d\n", index,
-+					    old_serial_count);
-+					serial_ports[old_serial_count++] =
-+						serial_ports[index];
-+				} else {
-+					DBG("Replacing legacy port %d\n", index);
-+				}
-+			}
-+		}
-+		if (index >= MAX_LEGACY_SERIAL_PORTS)
-+			goto next_port;
-+		if (index >= old_serial_count)
-+			old_serial_count = index + 1;
-+
-+		/* Now fill the entry */
-+		memset(&serial_ports[index], 0, sizeof(struct plat_serial8250_port));
-+		serial_ports[index].uartclk = (clk && *clk) ? *clk : BASE_BAUD * 16;
-+		serial_ports[index].iobase = reg->address;
-+		serial_ports[index].irq = interrupts ? interrupts[0] : 0;
-+		serial_ports[index].flags = ASYNC_BOOT_AUTOCONF;
-+
-+		DBG("Added legacy port, index: %d, port: %x, irq: %d, clk: %d\n",
-+		    index,
-+		    serial_ports[index].iobase,
-+		    serial_ports[index].irq,
-+		    serial_ports[index].uartclk);
-+
-+		/* Get phys address of IO reg for port 1 */
-+		if (index != 0)
-+			goto next_port;
-+
-+		pci = of_get_parent(isa);
-+		if (!pci) {
-+			DBG("%s: no pci parent found\n", np->full_name);
-+			goto next_port;
-+		}
-+
-+		rangesp = (u32 *)get_property(pci, "ranges", &rlen);
-+		if (rangesp == NULL) {
-+			of_node_put(pci);
-+			goto next_port;
-+		}
-+		rlen /= 4;
-+
-+		/* we need the #size-cells of the PCI bridge node itself */
-+		phys_size = 1;
-+		sizeprop = (u32 *)get_property(pci, "#size-cells", NULL);
-+		if (sizeprop != NULL)
-+			phys_size = *sizeprop;
-+		/* we need the parent #addr-cells */
-+		addr_size = prom_n_addr_cells(pci);
-+		rentsize = 3 + addr_size + phys_size;
-+		io_base = 0;
-+		for (;rlen >= rentsize; rlen -= rentsize,rangesp += rentsize) {
-+			if (((rangesp[0] >> 24) & 0x3) != 1)
-+				continue; /* not IO space */
-+			io_base = rangesp[3];
-+			if (addr_size == 2)
-+				io_base = (io_base << 32) | rangesp[4];
-+		}
-+		if (io_base != 0) {
-+			*physport = io_base + reg->address;
-+			if (default_speed && spd)
-+				*default_speed = *spd;
-+		}
-+		of_node_put(pci);
-+	next_port:
-+		of_node_put(isa);
-+	}
-+
-+	DBG(" <- generic_find_legacy_serial_port()\n");
-+}
-+
-+static struct platform_device serial_device = {
-+	.name	= "serial8250",
-+	.id	= 0,
-+	.dev	= {
-+		.platform_data = serial_ports,
-+	},
-+};
-+
-+static int __init serial_dev_init(void)
-+{
-+	u64 phys;
-+	unsigned int spd;
-+
-+	if (!ports_probed)
-+		generic_find_legacy_serial_ports(&phys, &spd);
-+	return platform_device_register(&serial_device);
-+}
-+arch_initcall(serial_dev_init);
-+
-+
---- linux-2.6.12/drivers/serial/Kconfig~	2005-08-11 13:51:50.000000000 +0100
-+++ linux-2.6.12/drivers/serial/Kconfig	2005-08-15 21:13:41.000000000 +0100
-@@ -77,6 +77,11 @@ config SERIAL_8250_CS
- 
- 	  If unsure, say N.
- 
-+config SERIAL_8250_OF
-+       bool
-+       default y
-+       depends on PPC_OF && SERIAL_8250 != n
-+
- config SERIAL_8250_ACPI
- 	bool "8250/16550 device discovery via ACPI namespace"
- 	default y if IA64
---- linux-2.6.12/arch/ppc64/kernel/setup.c~	2005-08-11 13:52:04.000000000 +0100
-+++ linux-2.6.12/arch/ppc64/kernel/setup.c	2005-08-15 20:27:25.000000000 +0100
-@@ -1147,186 +1147,6 @@ void __init setup_default_decr(void)
- 	lpaca->next_jiffy_update_tb = get_tb() + tb_ticks_per_jiffy;
- }
- 
--#ifndef CONFIG_PPC_ISERIES
--/*
-- * This function can be used by platforms to "find" legacy serial ports.
-- * It works for "serial" nodes under an "isa" node, and will try to
-- * respect the "ibm,aix-loc" property if any. It works with up to 8
-- * ports.
-- */
--
--#define MAX_LEGACY_SERIAL_PORTS	8
--static struct plat_serial8250_port serial_ports[MAX_LEGACY_SERIAL_PORTS+1];
--static unsigned int old_serial_count;
--
--void __init generic_find_legacy_serial_ports(u64 *physport,
--		unsigned int *default_speed)
--{
--	struct device_node *np;
--	u32 *sizeprop;
--
--	struct isa_reg_property {
--		u32 space;
--		u32 address;
--		u32 size;
--	};
--	struct pci_reg_property {
--		struct pci_address addr;
--		u32 size_hi;
--		u32 size_lo;
--	};                                                                        
--
--	DBG(" -> generic_find_legacy_serial_port()\n");
--
--	*physport = 0;
--	if (default_speed)
--		*default_speed = 0;
--
--	np = of_find_node_by_path("/");
--	if (!np)
--		return;
--
--	/* First fill our array */
--	for (np = NULL; (np = of_find_node_by_type(np, "serial"));) {
--		struct device_node *isa, *pci;
--		struct isa_reg_property *reg;
--		unsigned long phys_size, addr_size, io_base;
--		u32 *rangesp;
--		u32 *interrupts, *clk, *spd;
--		char *typep;
--		int index, rlen, rentsize;
--
--		/* Ok, first check if it's under an "isa" parent */
--		isa = of_get_parent(np);
--		if (!isa || strcmp(isa->name, "isa")) {
--			DBG("%s: no isa parent found\n", np->full_name);
--			continue;
--		}
--		
--		/* Now look for an "ibm,aix-loc" property that gives us ordering
--		 * if any...
--		 */
--	 	typep = (char *)get_property(np, "ibm,aix-loc", NULL);
--
--		/* Get the ISA port number */
--		reg = (struct isa_reg_property *)get_property(np, "reg", NULL);	
--		if (reg == NULL)
--			goto next_port;
--		/* We assume the interrupt number isn't translated ... */
--		interrupts = (u32 *)get_property(np, "interrupts", NULL);
--		/* get clock freq. if present */
--		clk = (u32 *)get_property(np, "clock-frequency", NULL);
--		/* get default speed if present */
--		spd = (u32 *)get_property(np, "current-speed", NULL);
--		/* Default to locate at end of array */
--		index = old_serial_count; /* end of the array by default */
--
--		/* If we have a location index, then use it */
--		if (typep && *typep == 'S') {
--			index = simple_strtol(typep+1, NULL, 0) - 1;
--			/* if index is out of range, use end of array instead */
--			if (index >= MAX_LEGACY_SERIAL_PORTS)
--				index = old_serial_count;
--			/* if our index is still out of range, that mean that
--			 * array is full, we could scan for a free slot but that
--			 * make little sense to bother, just skip the port
--			 */
--			if (index >= MAX_LEGACY_SERIAL_PORTS)
--				goto next_port;
--			if (index >= old_serial_count)
--				old_serial_count = index + 1;
--			/* Check if there is a port who already claimed our slot */
--			if (serial_ports[index].iobase != 0) {
--				/* if we still have some room, move it, else override */
--				if (old_serial_count < MAX_LEGACY_SERIAL_PORTS) {
--					DBG("Moved legacy port %d -> %d\n", index,
--					    old_serial_count);
--					serial_ports[old_serial_count++] =
--						serial_ports[index];
--				} else {
--					DBG("Replacing legacy port %d\n", index);
--				}
--			}
--		}
--		if (index >= MAX_LEGACY_SERIAL_PORTS)
--			goto next_port;
--		if (index >= old_serial_count)
--			old_serial_count = index + 1;
--
--		/* Now fill the entry */
--		memset(&serial_ports[index], 0, sizeof(struct plat_serial8250_port));
--		serial_ports[index].uartclk = clk ? *clk : BASE_BAUD * 16;
--		serial_ports[index].iobase = reg->address;
--		serial_ports[index].irq = interrupts ? interrupts[0] : 0;
--		serial_ports[index].flags = ASYNC_BOOT_AUTOCONF;
--
--		DBG("Added legacy port, index: %d, port: %x, irq: %d, clk: %d\n",
--		    index,
--		    serial_ports[index].iobase,
--		    serial_ports[index].irq,
--		    serial_ports[index].uartclk);
--
--		/* Get phys address of IO reg for port 1 */
--		if (index != 0)
--			goto next_port;
--
--		pci = of_get_parent(isa);
--		if (!pci) {
--			DBG("%s: no pci parent found\n", np->full_name);
--			goto next_port;
--		}
--
--		rangesp = (u32 *)get_property(pci, "ranges", &rlen);
--		if (rangesp == NULL) {
--			of_node_put(pci);
--			goto next_port;
--		}
--		rlen /= 4;
--
--		/* we need the #size-cells of the PCI bridge node itself */
--		phys_size = 1;
--		sizeprop = (u32 *)get_property(pci, "#size-cells", NULL);
--		if (sizeprop != NULL)
--			phys_size = *sizeprop;
--		/* we need the parent #addr-cells */
--		addr_size = prom_n_addr_cells(pci);
--		rentsize = 3 + addr_size + phys_size;
--		io_base = 0;
--		for (;rlen >= rentsize; rlen -= rentsize,rangesp += rentsize) {
--			if (((rangesp[0] >> 24) & 0x3) != 1)
--				continue; /* not IO space */
--			io_base = rangesp[3];
--			if (addr_size == 2)
--				io_base = (io_base << 32) | rangesp[4];
--		}
--		if (io_base != 0) {
--			*physport = io_base + reg->address;
--			if (default_speed && spd)
--				*default_speed = *spd;
--		}
--		of_node_put(pci);
--	next_port:
--		of_node_put(isa);
--	}
--
--	DBG(" <- generic_find_legacy_serial_port()\n");
--}
--
--static struct platform_device serial_device = {
--	.name	= "serial8250",
--	.id	= 0,
--	.dev	= {
--		.platform_data = serial_ports,
--	},
--};
--
--static int __init serial_dev_init(void)
--{
--	return platform_device_register(&serial_device);
--}
--arch_initcall(serial_dev_init);
--
--#endif /* CONFIG_PPC_ISERIES */
- 
- int check_legacy_ioport(unsigned long base_port)
- {
---- linux-2.6.12/include/asm-ppc/pc_serial.h~	2005-08-15 21:19:32.000000000 +0100
-+++ linux-2.6.12/include/asm-ppc/pc_serial.h	2005-08-15 21:20:24.000000000 +0100
-@@ -26,18 +26,3 @@
- #define RS_TABLE_SIZE  4
- #endif
- 
--/* Standard COM flags (except for COM4, because of the 8514 problem) */
--#ifdef CONFIG_SERIAL_DETECT_IRQ
--#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ)
--#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ)
--#else
--#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
--#define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF
--#endif
--
--#define SERIAL_PORT_DFNS			\
--	/* UART CLK   PORT IRQ     FLAGS        */			\
--	{ 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS },	/* ttyS0 */	\
--	{ 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS },	/* ttyS1 */	\
--	{ 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS },	/* ttyS2 */	\
--	{ 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS },	/* ttyS3 */

Deleted: dists/trunk/linux-2.4/debian/patches-debian/powerpc-serial.patch
===================================================================
--- dists/trunk/linux-2.4/debian/patches-debian/powerpc-serial.patch	2005-09-22 09:22:48 UTC (rev 4255)
+++ dists/trunk/linux-2.4/debian/patches-debian/powerpc-serial.patch	2005-09-22 09:30:47 UTC (rev 4256)
@@ -1,48 +0,0 @@
-#! /bin/sh -e 
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Description: Disables legacy serial driver on powermacs.
-## DP: Patch author: Sven Luther <luther at debian.org> 
-## DP: Patch author: adapted from the SuSE kernel tree.
-## DP: Upstream status: workaround hack waiting for a clean legacy device solution.
-
-diff -aurN a/drivers/serial/8250.c b/drivers/serial/8250.c
---- a/drivers/serial/8250.c	2005-06-17 15:48:29.000000000 -0400
-+++ b/drivers/serial/8250.c	2005-06-18 12:05:39.000000000 -0400
-@@ -46,6 +46,10 @@
- 
- #include "8250.h"
- 
-+#ifdef CONFIG_PPC_MULTIPLATFORM
-+#include <asm/processor.h>
-+#endif
-+
- /*
-  * Configuration:
-  *   share_irqs - whether we pass SA_SHIRQ to request_irq().  This option
-@@ -2188,6 +2192,12 @@
- 
- static int __init serial8250_console_init(void)
- {
-+#ifdef CONFIG_PPC_MULTIPLATFORM
-+	if(_machine == _MACH_Pmac) {
-+		printk("%s: nothing to do on PowerMac\n",__FUNCTION__);
-+		return -ENODEV;
-+	}
-+#endif
- 	serial8250_isa_init_ports();
- 	register_console(&serial8250_console);
- 	return 0;
-@@ -2491,6 +2501,12 @@
- {
- 	int ret, i;
- 
-+#ifdef CONFIG_PPC_MULTIPLATFORM
-+	if(_machine == _MACH_Pmac) {
-+		printk("%s: nothing to do on PowerMac\n",__FUNCTION__);
-+		return -ENODEV;
-+	}
-+#endif
- 	printk(KERN_INFO "Serial: 8250/16550 driver $Revision: 1.90 $ "
- 		"%d ports, IRQ sharing %sabled\n", (int) UART_NR,
- 		share_irqs ? "en" : "dis");

Deleted: dists/trunk/linux-2.4/debian/patches-debian/qla2xxx-removed.patch
===================================================================
--- dists/trunk/linux-2.4/debian/patches-debian/qla2xxx-removed.patch	2005-09-22 09:22:48 UTC (rev 4255)
+++ dists/trunk/linux-2.4/debian/patches-debian/qla2xxx-removed.patch	2005-09-22 09:30:47 UTC (rev 4256)
@@ -1,11 +0,0 @@
-diff -aurN a/drivers/scsi/Makefile b/drivers/scsi/Makefile
---- a/drivers/scsi/Makefile	2005-06-17 15:48:29.000000000 -0400
-+++ b/drivers/scsi/Makefile	2005-06-18 15:19:15.000000000 -0400
-@@ -79,7 +79,6 @@
- obj-$(CONFIG_SCSI_QLOGIC_ISP)	+= qlogicisp.o 
- obj-$(CONFIG_SCSI_QLOGIC_FC)	+= qlogicfc.o 
- obj-$(CONFIG_SCSI_QLOGIC_1280)	+= qla1280.o 
--obj-$(CONFIG_SCSI_QLA2XXX)	+= qla2xxx/
- obj-$(CONFIG_SCSI_LPFC)		+= lpfc/
- obj-$(CONFIG_SCSI_PAS16)	+= pas16.o
- obj-$(CONFIG_SCSI_SEAGATE)	+= seagate.o

Deleted: dists/trunk/linux-2.4/debian/patches-debian/remove-references-to-removed-drivers.patch
===================================================================
--- dists/trunk/linux-2.4/debian/patches-debian/remove-references-to-removed-drivers.patch	2005-09-22 09:22:48 UTC (rev 4255)
+++ dists/trunk/linux-2.4/debian/patches-debian/remove-references-to-removed-drivers.patch	2005-09-22 09:30:47 UTC (rev 4256)
@@ -1,342 +0,0 @@
-diff -aurN a/arch/alpha/defconfig b/arch/alpha/defconfig
---- a/arch/alpha/defconfig	2005-06-17 15:48:29.000000000 -0400
-+++ b/arch/alpha/defconfig	2005-06-18 16:11:08.000000000 -0400
-@@ -512,7 +512,6 @@
- # CONFIG_B44 is not set
- # CONFIG_FORCEDETH is not set
- # CONFIG_CS89x0 is not set
--# CONFIG_DGRS is not set
- # CONFIG_EEPRO100 is not set
- # CONFIG_E100 is not set
- # CONFIG_LNE390 is not set
-@@ -533,7 +532,6 @@
- #
- # Ethernet (1000 Mbit)
- #
--# CONFIG_ACENIC is not set
- # CONFIG_DL2K is not set
- # CONFIG_E1000 is not set
- # CONFIG_NS83820 is not set
-diff -aurN a/arch/arm/configs/lpd7a404_defconfig b/arch/arm/configs/lpd7a404_defconfig
---- a/arch/arm/configs/lpd7a404_defconfig	2005-06-17 15:48:29.000000000 -0400
-+++ b/arch/arm/configs/lpd7a404_defconfig	2005-06-18 16:30:01.000000000 -0400
-@@ -676,8 +676,6 @@
- #
- # USB Miscellaneous drivers
- #
--# CONFIG_USB_EMI62 is not set
--# CONFIG_USB_EMI26 is not set
- # CONFIG_USB_AUERSWALD is not set
- # CONFIG_USB_RIO500 is not set
- # CONFIG_USB_LEGOTOWER is not set
-diff -aurN a/arch/i386/defconfig b/arch/i386/defconfig
---- a/arch/i386/defconfig	2005-06-17 15:48:29.000000000 -0400
-+++ b/arch/i386/defconfig	2005-06-18 16:22:33.000000000 -0400
-@@ -624,7 +624,6 @@
- # CONFIG_B44 is not set
- # CONFIG_FORCEDETH is not set
- # CONFIG_CS89x0 is not set
--# CONFIG_DGRS is not set
- # CONFIG_EEPRO100 is not set
- # CONFIG_E100 is not set
- # CONFIG_FEALNX is not set
-@@ -646,7 +645,6 @@
- #
- # Ethernet (1000 Mbit)
- #
--# CONFIG_ACENIC is not set
- # CONFIG_DL2K is not set
- # CONFIG_E1000 is not set
- # CONFIG_NS83820 is not set
-@@ -1026,7 +1024,6 @@
- #
- # USB Multimedia devices
- #
--# CONFIG_USB_DABUSB is not set
- 
- #
- # Video4Linux support is needed for USB Multimedia device support
-@@ -1054,8 +1051,6 @@
- #
- # USB Miscellaneous drivers
- #
--# CONFIG_USB_EMI62 is not set
--# CONFIG_USB_EMI26 is not set
- # CONFIG_USB_TIGL is not set
- # CONFIG_USB_AUERSWALD is not set
- # CONFIG_USB_RIO500 is not set
-diff -aurN a/arch/ia64/configs/zx1_defconfig b/arch/ia64/configs/zx1_defconfig
---- a/arch/ia64/configs/zx1_defconfig	2005-06-17 15:48:29.000000000 -0400
-+++ b/arch/ia64/configs/zx1_defconfig	2005-06-18 16:27:49.000000000 -0400
-@@ -1014,8 +1014,6 @@
- #
- # USB Miscellaneous drivers
- #
--# CONFIG_USB_EMI62 is not set
--# CONFIG_USB_EMI26 is not set
- # CONFIG_USB_AUERSWALD is not set
- # CONFIG_USB_RIO500 is not set
- # CONFIG_USB_LEGOTOWER is not set
-diff -aurN a/arch/ia64/defconfig b/arch/ia64/defconfig
---- a/arch/ia64/defconfig	2005-06-17 15:48:29.000000000 -0400
-+++ b/arch/ia64/defconfig	2005-06-18 16:28:03.000000000 -0400
-@@ -482,7 +482,6 @@
- # CONFIG_ADAPTEC_STARFIRE is not set
- # CONFIG_B44 is not set
- # CONFIG_FORCEDETH is not set
--# CONFIG_DGRS is not set
- CONFIG_EEPRO100=m
- CONFIG_E100=m
- # CONFIG_FEALNX is not set
-@@ -500,7 +499,6 @@
- #
- # Ethernet (1000 Mbit)
- #
--# CONFIG_ACENIC is not set
- # CONFIG_DL2K is not set
- CONFIG_E1000=y
- # CONFIG_E1000_NAPI is not set
-@@ -879,7 +877,6 @@
- #
- # USB Multimedia devices
- #
--# CONFIG_USB_DABUSB is not set
- 
- #
- # Video4Linux support is needed for USB Multimedia device support
-@@ -906,8 +903,6 @@
- #
- # USB Miscellaneous drivers
- #
--# CONFIG_USB_EMI62 is not set
--# CONFIG_USB_EMI26 is not set
- # CONFIG_USB_AUERSWALD is not set
- # CONFIG_USB_RIO500 is not set
- # CONFIG_USB_LEGOTOWER is not set
-diff -aurN a/arch/mips/configs/rm200_defconfig b/arch/mips/configs/rm200_defconfig
---- a/arch/mips/configs/rm200_defconfig	2005-06-17 15:48:29.000000000 -0400
-+++ b/arch/mips/configs/rm200_defconfig	2005-06-18 16:27:28.000000000 -0400
-@@ -1098,8 +1098,6 @@
- #
- # USB Miscellaneous drivers
- #
--# CONFIG_USB_EMI62 is not set
--# CONFIG_USB_EMI26 is not set
- CONFIG_USB_AUERSWALD=m
- CONFIG_USB_RIO500=m
- CONFIG_USB_LEGOTOWER=m
-diff -aurN a/arch/ppc/configs/common_defconfig b/arch/ppc/configs/common_defconfig
---- a/arch/ppc/configs/common_defconfig	2005-06-17 15:48:29.000000000 -0400
-+++ b/arch/ppc/configs/common_defconfig	2005-06-18 16:24:38.000000000 -0400
-@@ -1213,8 +1213,6 @@
- #
- # USB Miscellaneous drivers
- #
--# CONFIG_USB_EMI62 is not set
--# CONFIG_USB_EMI26 is not set
- # CONFIG_USB_AUERSWALD is not set
- # CONFIG_USB_RIO500 is not set
- # CONFIG_USB_LEGOTOWER is not set
-diff -aurN a/arch/ppc/configs/lopec_defconfig b/arch/ppc/configs/lopec_defconfig
---- a/arch/ppc/configs/lopec_defconfig	2005-06-17 15:48:29.000000000 -0400
-+++ b/arch/ppc/configs/lopec_defconfig	2005-06-18 16:25:01.000000000 -0400
-@@ -681,8 +681,6 @@
- #
- # USB Miscellaneous drivers
- #
--# CONFIG_USB_EMI62 is not set
--# CONFIG_USB_EMI26 is not set
- # CONFIG_USB_TIGL is not set
- # CONFIG_USB_AUERSWALD is not set
- # CONFIG_USB_RIO500 is not set
-diff -aurN a/arch/ppc/configs/pmac_defconfig b/arch/ppc/configs/pmac_defconfig
---- a/arch/ppc/configs/pmac_defconfig	2005-06-17 15:48:29.000000000 -0400
-+++ b/arch/ppc/configs/pmac_defconfig	2005-06-18 16:25:19.000000000 -0400
-@@ -1278,8 +1278,6 @@
- #
- # USB Miscellaneous drivers
- #
--# CONFIG_USB_EMI62 is not set
--# CONFIG_USB_EMI26 is not set
- # CONFIG_USB_AUERSWALD is not set
- # CONFIG_USB_RIO500 is not set
- # CONFIG_USB_LEGOTOWER is not set
-diff -aurN a/arch/ppc/configs/sandpoint_defconfig b/arch/ppc/configs/sandpoint_defconfig
---- a/arch/ppc/configs/sandpoint_defconfig	2005-06-17 15:48:29.000000000 -0400
-+++ b/arch/ppc/configs/sandpoint_defconfig	2005-06-18 16:24:50.000000000 -0400
-@@ -600,8 +600,6 @@
- #
- # USB Miscellaneous drivers
- #
--# CONFIG_USB_EMI62 is not set
--# CONFIG_USB_EMI26 is not set
- # CONFIG_USB_TIGL is not set
- # CONFIG_USB_AUERSWALD is not set
- # CONFIG_USB_RIO500 is not set
-diff -aurN a/arch/ppc64/configs/g5_defconfig b/arch/ppc64/configs/g5_defconfig
---- a/arch/ppc64/configs/g5_defconfig	2005-06-17 15:48:29.000000000 -0400
-+++ b/arch/ppc64/configs/g5_defconfig	2005-06-18 16:28:43.000000000 -0400
-@@ -1059,8 +1059,6 @@
- #
- # USB Miscellaneous drivers
- #
--# CONFIG_USB_EMI62 is not set
--# CONFIG_USB_EMI26 is not set
- # CONFIG_USB_AUERSWALD is not set
- # CONFIG_USB_RIO500 is not set
- # CONFIG_USB_LEGOTOWER is not set
-diff -aurN a/arch/ppc64/configs/pSeries_defconfig b/arch/ppc64/configs/pSeries_defconfig
---- a/arch/ppc64/configs/pSeries_defconfig	2005-06-17 15:48:29.000000000 -0400
-+++ b/arch/ppc64/configs/pSeries_defconfig	2005-06-18 16:29:21.000000000 -0400
-@@ -1014,8 +1014,6 @@
- #
- # USB Miscellaneous drivers
- #
--# CONFIG_USB_EMI62 is not set
--# CONFIG_USB_EMI26 is not set
- # CONFIG_USB_AUERSWALD is not set
- # CONFIG_USB_RIO500 is not set
- # CONFIG_USB_LEGOTOWER is not set
-diff -aurN a/arch/ppc64/defconfig b/arch/ppc64/defconfig
---- a/arch/ppc64/defconfig	2005-06-17 15:48:29.000000000 -0400
-+++ b/arch/ppc64/defconfig	2005-06-18 16:29:36.000000000 -0400
-@@ -591,7 +591,6 @@
- # CONFIG_ADAPTEC_STARFIRE is not set
- # CONFIG_B44 is not set
- # CONFIG_FORCEDETH is not set
--# CONFIG_DGRS is not set
- # CONFIG_EEPRO100 is not set
- CONFIG_E100=y
- # CONFIG_FEALNX is not set
-@@ -607,8 +606,6 @@
- #
- # Ethernet (1000 Mbit)
- #
--CONFIG_ACENIC=y
--CONFIG_ACENIC_OMIT_TIGON_I=y
- # CONFIG_DL2K is not set
- CONFIG_E1000=y
- # CONFIG_E1000_NAPI is not set
-@@ -1040,7 +1037,6 @@
- #
- # USB Multimedia devices
- #
--# CONFIG_USB_DABUSB is not set
- 
- #
- # Video4Linux support is needed for USB Multimedia device support
-@@ -1069,8 +1065,6 @@
- #
- # USB Miscellaneous drivers
- #
--# CONFIG_USB_EMI62 is not set
--# CONFIG_USB_EMI26 is not set
- # CONFIG_USB_AUERSWALD is not set
- # CONFIG_USB_RIO500 is not set
- # CONFIG_USB_LEGOTOWER is not set
-diff -aurN a/arch/sparc64/defconfig b/arch/sparc64/defconfig
---- a/arch/sparc64/defconfig	2005-06-17 15:48:29.000000000 -0400
-+++ b/arch/sparc64/defconfig	2005-06-18 16:23:32.000000000 -0400
-@@ -904,7 +904,6 @@
- CONFIG_ADAPTEC_STARFIRE_NAPI=y
- CONFIG_B44=m
- CONFIG_FORCEDETH=m
--CONFIG_DGRS=m
- CONFIG_EEPRO100=m
- CONFIG_E100=m
- CONFIG_FEALNX=m
-@@ -926,8 +925,6 @@
- #
- # Ethernet (1000 Mbit)
- #
--CONFIG_ACENIC=m
--# CONFIG_ACENIC_OMIT_TIGON_I is not set
- CONFIG_DL2K=m
- CONFIG_E1000=m
- CONFIG_E1000_NAPI=y
-@@ -1723,7 +1720,6 @@
- #
- # USB Multimedia devices
- #
--# CONFIG_USB_DABUSB is not set
- # CONFIG_USB_VICAM is not set
- # CONFIG_USB_DSBR is not set
- # CONFIG_USB_IBMCAM is not set
-@@ -1817,8 +1813,6 @@
- #
- # USB Miscellaneous drivers
- #
--CONFIG_USB_EMI62=m
--CONFIG_USB_EMI26=m
- CONFIG_USB_AUERSWALD=m
- CONFIG_USB_RIO500=m
- CONFIG_USB_LEGOTOWER=m
-diff -aurN a/arch/x86_64/defconfig b/arch/x86_64/defconfig
---- a/arch/x86_64/defconfig	2005-06-17 15:48:29.000000000 -0400
-+++ b/arch/x86_64/defconfig	2005-06-18 16:31:01.000000000 -0400
-@@ -530,7 +530,6 @@
- # CONFIG_ADAPTEC_STARFIRE is not set
- # CONFIG_B44 is not set
- CONFIG_FORCEDETH=y
--# CONFIG_DGRS is not set
- # CONFIG_EEPRO100 is not set
- CONFIG_E100=y
- # CONFIG_FEALNX is not set
-@@ -550,7 +549,6 @@
- #
- # Ethernet (1000 Mbit)
- #
--# CONFIG_ACENIC is not set
- # CONFIG_DL2K is not set
- CONFIG_E1000=y
- # CONFIG_E1000_NAPI is not set
-@@ -862,7 +860,6 @@
- #
- # USB Multimedia devices
- #
--# CONFIG_USB_DABUSB is not set
- 
- #
- # Video4Linux support is needed for USB Multimedia device support
-@@ -890,8 +887,6 @@
- #
- # USB Miscellaneous drivers
- #
--# CONFIG_USB_EMI62 is not set
--# CONFIG_USB_EMI26 is not set
- # CONFIG_USB_AUERSWALD is not set
- # CONFIG_USB_RIO500 is not set
- # CONFIG_USB_LEGOTOWER is not set
-diff -aurN a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig
---- a/drivers/usb/misc/Kconfig	2005-06-18 11:23:01.000000000 -0400
-+++ b/drivers/usb/misc/Kconfig	2005-06-18 16:31:32.000000000 -0400
-@@ -4,19 +4,6 @@
- comment "USB Miscellaneous drivers"
- 	depends on USB
- 
--config USB_EMI26
--	tristate "EMI 2|6 USB Audio interface support"
--	depends on USB
--	---help---
--	  This driver loads firmware to Emagic EMI 2|6 low latency USB
--	  Audio interface.
--
--	  After firmware load the device is handled with standard linux
--	  USB Audio driver.
--
--	  To compile this driver as a module, choose M here: the
--	  module will be called emi26.
--
- config USB_AUERSWALD
- 	tristate "USB Auerswald ISDN support (EXPERIMENTAL)"
- 	depends on USB && EXPERIMENTAL
---- linux-2.6.13/drivers/usb/misc/Makefile.orig	2005-08-06 11:56:51.000000000 +0200
-+++ linux-2.6.13/drivers/usb/misc/Makefile	2005-08-06 11:58:37.000000000 +0200
-@@ -5,7 +5,6 @@
- 
- obj-$(CONFIG_USB_AUERSWALD)	+= auerswald.o
- obj-$(CONFIG_USB_CYTHERM)	+= cytherm.o
--obj-$(CONFIG_USB_EMI26)		+= emi26.o
- obj-$(CONFIG_USB_IDMOUSE)	+= idmouse.o
- obj-$(CONFIG_USB_LCD)		+= usblcd.o
- obj-$(CONFIG_USB_LD)		+= ldusb.o

Deleted: dists/trunk/linux-2.4/debian/patches-debian/sparc64-hme-lockup.patch
===================================================================
--- dists/trunk/linux-2.4/debian/patches-debian/sparc64-hme-lockup.patch	2005-09-22 09:22:48 UTC (rev 4255)
+++ dists/trunk/linux-2.4/debian/patches-debian/sparc64-hme-lockup.patch	2005-09-22 09:30:47 UTC (rev 4256)
@@ -1,16 +0,0 @@
-# origin: Debian (bcollins)
-# cset: n/a
-# inclusion: not suitable for upstream
-# revision date: 2004-10-08
-
-diff -aurN a/drivers/net/sunhme.c b/drivers/net/sunhme.c
---- a/drivers/net/sunhme.c	2005-06-17 15:48:29.000000000 -0400
-+++ b/drivers/net/sunhme.c	2005-06-18 12:12:18.000000000 -0400
-@@ -1996,6 +1996,7 @@
- 	}
- 	hp->tx_old = elem;
- 	TXD((">"));
-+	udelay(1);
- 
- 	if (netif_queue_stopped(dev) &&
- 	    TX_BUFFS_AVAIL(hp) > (MAX_SKB_FRAGS + 1))

Deleted: dists/trunk/linux-2.4/debian/patches-debian/tty-locking-fixes9.patch
===================================================================
--- dists/trunk/linux-2.4/debian/patches-debian/tty-locking-fixes9.patch	2005-09-22 09:22:48 UTC (rev 4255)
+++ dists/trunk/linux-2.4/debian/patches-debian/tty-locking-fixes9.patch	2005-09-22 09:30:47 UTC (rev 4256)
@@ -1,12 +0,0 @@
---- kernel-source-2.6.11-2.6.11-orig/drivers/serial/serial_core.c	2005-03-02 08:37:50.000000000 +0100
-+++ kernel-source-2.6.11-2.6.11/drivers/serial/serial_core.c	2005-03-05 10:46:43.417109240 +0100
-@@ -108,7 +108,8 @@
- static void uart_tasklet_action(unsigned long data)
- {
- 	struct uart_state *state = (struct uart_state *)data;
--	tty_wakeup(state->info->tty);
-+	if (state->info->tty)
-+		tty_wakeup(state->info->tty);
- }
- 
- static inline void

Deleted: dists/trunk/linux-2.4/debian/patches-debian/version.patch
===================================================================
--- dists/trunk/linux-2.4/debian/patches-debian/version.patch	2005-09-22 09:22:48 UTC (rev 4255)
+++ dists/trunk/linux-2.4/debian/patches-debian/version.patch	2005-09-22 09:30:47 UTC (rev 4256)
@@ -1,80 +0,0 @@
-Attach informations from debian/changelog to compile.h.
-
----
-commit 932fa20ce2db25e496f6aedf6f624e939f3dafa8
-tree 87ebceaf3f1a47f9fafef53ad36510fab9cf3d5f
-parent 05dbb1e557b392c8cef3675b4ba6497794ad4124
-author Bastian Blank <waldi at debian.org> Tue, 13 Sep 2005 22:03:33 +0000
-committer Bastian Blank <waldi at debian.org> Tue, 13 Sep 2005 22:03:33 +0000
-
- scripts/mkcompile_h |   13 +++++++++++++
- 1 files changed, 13 insertions(+), 0 deletions(-)
-
-diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
---- a/scripts/mkcompile_h
-+++ b/scripts/mkcompile_h
-@@ -55,6 +55,19 @@ UTS_TRUNCATE="sed -e s/\(.\{1,$UTS_LEN\}
-   fi
- 
-   echo \#define LINUX_COMPILER \"`$CC -v 2>&1 | tail -n 1`\"
-+
-+  if [ -e debian/changelog ]; then
-+    DISTRIBUTION=$(lsb_release -is 2>/dev/null)
-+    [ "$DISTRIBUTION" ] || DISTRIBUTION=Debian
-+    MAINTAINER=$(dpkg-parsechangelog | sed -ne 's,^Maintainer: .[^<]*<\([^>]*\)>,\1,p')
-+    VERSION=$(dpkg-parsechangelog | awk '/^Version:/ {print $$2}')
-+    echo \#define LINUX_COMPILE_SYSTEM_DISTRIBUTION \"$DISTRIBUTION\"
-+    echo \#define LINUX_COMPILE_SYSTEM_MAINTAINER \"$MAINTAINER\"
-+    echo \#define LINUX_COMPILE_SYSTEM_VERSION \"$VERSION\"
-+    if [ -e debian/official ]; then
-+      echo \#define LINUX_COMPILE_SYSTEM_OFFICIAL
-+    fi
-+  fi
- ) > .tmpcompile
- 
- # Only replace the real compile.h if the new one is different,
-
-
-
-!-------------------------------------------------------------flip-
-
-
-Use debian packaging informations in version string.
-
----
-commit f9117a71c91d355243befb1a24bc557ea5d98e5b
-tree 30e508720f0783c2a93b9103edd5e710f81f7f34
-parent 932fa20ce2db25e496f6aedf6f624e939f3dafa8
-author Bastian Blank <waldi at debian.org> Tue, 13 Sep 2005 22:04:14 +0000
-committer Bastian Blank <waldi at debian.org> Tue, 13 Sep 2005 22:04:14 +0000
-
- init/version.c |   14 ++++++++++++--
- 1 files changed, 12 insertions(+), 2 deletions(-)
-
-diff --git a/init/version.c b/init/version.c
---- a/init/version.c
-+++ b/init/version.c
-@@ -29,5 +29,15 @@ struct new_utsname system_utsname = {
- EXPORT_SYMBOL(system_utsname);
- 
- const char linux_banner[] =
--	"Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
--	LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n";
-+	"Linux version " UTS_RELEASE " "
-+#ifdef LINUX_COMPILE_SYSTEM_OFFICIAL
-+	"(" LINUX_COMPILE_SYSTEM_DISTRIBUTION " "
-+	    LINUX_COMPILE_SYSTEM_VERSION ") "
-+	"(" LINUX_COMPILE_SYSTEM_MAINTAINER ") "
-+#else
-+# ifdef LINUX_COMPILE_SYSTEM_VERSION
-+	"(" LINUX_COMPILE_SYSTEM_VERSION ") "
-+# endif
-+	"(" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ") "
-+#endif
-+	"(" LINUX_COMPILER ") " UTS_VERSION "\n";
-
-
-
-!-------------------------------------------------------------flip-
-
-




More information about the Kernel-svn-changes mailing list