[kernel] r11250 - dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25

Christian T. Steigies cts at alioth.debian.org
Sat May 3 09:45:39 UTC 2008


Author: cts
Date: Sat May  3 09:45:38 2008
New Revision: 11250

Log:
add m68k patches for 2.6.25


Added:
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/130-adbraw.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/134-atari-fat.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/141-ide.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/143-ioext.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/149-mc68681.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/152-pci.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/478-serial.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/633-atari_scc.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/HTC_PASIC3-depends-on-ARCH_PXA.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/amifb-add-ami_modedb-to-modelist.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/amiga-debug=mem.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/amiga-platform-device.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/amiga-platform-device2.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/atafb-cfb16.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/atafb-line_length.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/atari-aranym.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/atari-ethernat-updates.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/atari-ethernat.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/atari-ethernec.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/atari-platform-device.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/atari-rom-isa.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/b43-depends-on-HAS_DMA.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/blinux-list-is-subscribers-only.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/drivers-input-serio-hp_sdc.c-needs-linux-semaphore.h.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/ext4-adilger-bounces.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/ext4-bitops-fix.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/falconide_intr_lock-ratelimit.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/fb-CONFIG_FB_DEFERRED_IO-should-default-to-n.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-add-multi_defconfig.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-allnoconfig.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-convert-access_ok-to-inline-func.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-correct-FB_HP300-dependencies.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-dnfb-breaks-multi-platform.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-ethernat-breaks-multi-platform.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-ethernec-dynamic.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-hp300-breaks-multi-platform.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-initcalls-should-return-ENODEV-if-device-not-found.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-initrd-fix.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-input-drivers-break-multiplatform.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-isa-type-name-conflicts.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-kill-CONFIG_FB_DAFB.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-macide-breaks-multi-platform.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-net-drivers-break-multiplatform.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-new-mac_esp-driver.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-noswap-linux-swap-h-needs-linux-pagemap-h.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-q40-floppy-is-broken.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-remove-old-mac_esp-cruft.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-remove-traditional.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-replace-linux-68k-by-linux-m68k.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-scsi-HOST_C-cleanup.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-silence-BUG-can-return-warnings.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-skip-writebacks-for-bus-errors.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-update-defconfig-latest.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-update-defconfig.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-vme_scc-globals.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-vmlinux-std_sun3.lds.S_cleanup_use_PAGE_SIZE_macro.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-whippet-serial-no-longer-exists.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/mac-platform-device.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/net-b44-no-pci.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/proc-switch-proc-bus-zorro-devices-to-seq_file-interface.diff
   dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/zorro-module-device-table.diff

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/130-adbraw.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/130-adbraw.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,42 @@
+To: linus, alan
+Cc: lkml
+Subject: [PATCH] ADB raw packets
+
+From: Linux/m68k legacy
+
+ADB: add support for raw packets
+---
+ drivers/macintosh/adb.c |    7 ++++---
+ include/linux/adb.h     |    1 +
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+--- a/drivers/macintosh/adb.c
++++ b/drivers/macintosh/adb.c
+@@ -413,13 +413,14 @@ adb_request(struct adb_request *req, voi
+ 	if (nbytes < 1)
+ 		return -EINVAL;
+ 
+-	req->nbytes = nbytes+1;
++	i = (flags & ADBREQ_RAW) ? 0 : 1;
++	req->nbytes = nbytes+i;
+ 	req->done = done;
+ 	req->reply_expected = flags & ADBREQ_REPLY;
+ 	req->data[0] = ADB_PACKET;
+ 	va_start(list, nbytes);
+-	for (i = 0; i < nbytes; ++i)
+-		req->data[i+1] = va_arg(list, int);
++	while (i < req->nbytes)
++		req->data[i++] = va_arg(list, int);
+ 	va_end(list);
+ 
+ 	if (flags & ADBREQ_NOSEND)
+--- a/include/linux/adb.h
++++ b/include/linux/adb.h
+@@ -76,6 +76,7 @@ struct adb_driver {
+ #define ADBREQ_REPLY	1	/* expect reply */
+ #define ADBREQ_SYNC	2	/* poll until done */
+ #define ADBREQ_NOSEND	4	/* build the request, but don't send it */
++#define ADBREQ_RAW	8	/* send raw packet (don't prepend ADB_PACKET) */
+ 
+ /* Messages sent thru the client_list notifier. You should NOT stop
+    the operation, at least not with this version */

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/134-atari-fat.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/134-atari-fat.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,101 @@
+To: linus, alan
+Cc: lkml
+Subject: [PATCH] Atari FAT updates
+
+From: Linux/m68k legacy
+
+Add support for the Atari-variant of the FAT filesystem
+---
+ fs/fat/inode.c |   46 +++++++++++++++++++++++++++++++++++++++++++---
+ 1 file changed, 43 insertions(+), 3 deletions(-)
+
+--- a/fs/fat/inode.c
++++ b/fs/fat/inode.c
+@@ -17,6 +17,7 @@
+ #include <linux/smp_lock.h>
+ #include <linux/seq_file.h>
+ #include <linux/msdos_fs.h>
++#include <linux/major.h>
+ #include <linux/pagemap.h>
+ #include <linux/mpage.h>
+ #include <linux/buffer_head.h>
+@@ -847,7 +848,7 @@ enum {
+ 	Opt_check_n, Opt_check_r, Opt_check_s, Opt_uid, Opt_gid,
+ 	Opt_umask, Opt_dmask, Opt_fmask, Opt_codepage, Opt_usefree, Opt_nocase,
+ 	Opt_quiet, Opt_showexec, Opt_debug, Opt_immutable,
+-	Opt_dots, Opt_nodots,
++	Opt_dots, Opt_nodots, Opt_atari_no, Opt_atari_yes,
+ 	Opt_charset, Opt_shortname_lower, Opt_shortname_win95,
+ 	Opt_shortname_winnt, Opt_shortname_mixed, Opt_utf8_no, Opt_utf8_yes,
+ 	Opt_uni_xl_no, Opt_uni_xl_yes, Opt_nonumtail_no, Opt_nonumtail_yes,
+@@ -873,6 +874,9 @@ static match_table_t fat_tokens = {
+ 	{Opt_showexec, "showexec"},
+ 	{Opt_debug, "debug"},
+ 	{Opt_immutable, "sys_immutable"},
++	{Opt_atari_yes, "atari=yes"},
++	{Opt_atari_yes, "atari"},
++	{Opt_atari_no, "atari=no"},
+ 	{Opt_obsolate, "conv=binary"},
+ 	{Opt_obsolate, "conv=text"},
+ 	{Opt_obsolate, "conv=auto"},
+@@ -948,6 +952,13 @@ static int parse_options(char *options, 
+ 	opts->utf8 = opts->unicode_xlate = 0;
+ 	opts->numtail = 1;
+ 	opts->usefree = opts->nocase = 0;
++	opts->atari = 0;
++
++#ifdef CONFIG_ATARI
++	if (MACH_IS_ATARI)
++	/* make Atari GEMDOS format the default if machine is an Atari */
++		opts->atari = 1;
++#endif
+ 	*debug = 0;
+ 
+ 	if (!options)
+@@ -999,6 +1010,12 @@ static int parse_options(char *options, 
+ 		case Opt_immutable:
+ 			opts->sys_immutable = 1;
+ 			break;
++		case Opt_atari_yes:
++			opts->atari = 1;
++			break;
++		case Opt_atari_no:
++			opts->atari = 0;
++			break;
+ 		case Opt_uid:
+ 			if (match_int(&args[0], &option))
+ 				return 0;
+@@ -1333,8 +1350,31 @@ int fat_fill_super(struct super_block *s
+ 
+ 	total_clusters = (total_sectors - sbi->data_start) / sbi->sec_per_clus;
+ 
+-	if (sbi->fat_bits != 32)
+-		sbi->fat_bits = (total_clusters > MAX_FAT12) ? 16 : 12;
++	if (!sbi->options.atari) {
++		if (sbi->fat_bits != 32)
++			sbi->fat_bits = (total_clusters > MAX_FAT12) ? 16 : 12;
++	} else {
++		int sectors;
++		/* Atari GEMDOS partitions always have 16-bit fat */
++		if (sbi->fat_bits != 32)
++			sbi->fat_bits = 16;
++		/* If more clusters than fat entries in 16-bit fat, we assume
++		 * it's a real MSDOS partition with 12-bit fat.
++		 */
++		if (sbi->fat_bits != 32 && total_clusters+2 > sbi->
++			fat_length*SECTOR_SIZE*8/sbi->fat_bits)
++			sbi->fat_bits = 12;
++		/* if it's a floppy disk --> 12bit fat */
++		if (sbi->fat_bits != 32 && MAJOR(sb->s_dev) == FLOPPY_MAJOR)
++			sbi->fat_bits = 12;
++		/* if it's a ramdisk or loopback device and has one of the usual
++		 * floppy sizes -> 12bit FAT  */
++		sectors = total_sectors + sbi->data_start;
++		if (sbi->fat_bits != 32 && (MAJOR(sb->s_dev) == RAMDISK_MAJOR ||
++			 MAJOR(sb->s_dev) == LOOP_MAJOR) &&
++			(sectors == 720 || sectors == 1440 || sectors == 2880))
++			sbi->fat_bits = 12;
++	}
+ 
+ 	/* check that FAT table does not overflow */
+ 	fat_clusters = sbi->fat_length * sb->s_blocksize * 8 / sbi->fat_bits;

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/141-ide.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/141-ide.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,37 @@
+To: linus, alan
+Cc: lkml
+Subject: [PATCH] M68k IDE updates
+
+From: Linux/m68k legacy
+
+M68k IDE updates: Add m68k-isms to the generic ide_fix_driveid()
+---
+ drivers/ide/ide-iops.c |   17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+--- a/drivers/ide/ide-iops.c
++++ b/drivers/ide/ide-iops.c
+@@ -297,6 +297,23 @@ void ide_fix_driveid (struct hd_driveid 
+ 	int i;
+ 	u16 *stringcast;
+ 
++#ifdef __mc68000__
++	if (!MACH_IS_AMIGA && !MACH_IS_MAC && !MACH_IS_Q40 && !MACH_IS_ATARI)
++		return;
++
++#ifdef M68K_IDE_SWAPW
++	if (M68K_IDE_SWAPW) {	/* fix bus byteorder first */
++		u_char *p = (u_char *)id;
++		u_char t;
++		for (i = 0; i < 512; i += 2) {
++			t = p[i];
++			p[i] = p[i+1];
++			p[i+1] = t;
++		}
++	}
++#endif
++#endif /* __mc68000__ */
++
+ 	id->config         = __le16_to_cpu(id->config);
+ 	id->cyls           = __le16_to_cpu(id->cyls);
+ 	id->reserved2      = __le16_to_cpu(id->reserved2);

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/143-ioext.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/143-ioext.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,1351 @@
+To: linus, alan
+Cc: lkml
+Subject: [PATCH] Amiga GVP I/O Extender PLIP
+
+From: Linux/m68k legacy
+
+Add a PLIP driver for the Amiga GVP I/O Extender's parallel port
+---
+ drivers/char/16c552.h     |  165 +++++++
+ drivers/char/ioext.h      |  107 ++++
+ drivers/char/plip_ioext.c | 1057 ++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 1329 insertions(+)
+
+--- /dev/null
++++ b/drivers/char/16c552.h
+@@ -0,0 +1,165 @@
++/*
++ * Definitions for the 16c552 DACE
++ * (dual-asynchronous-communications-element) used on the GVP
++ * IO-Extender.
++ *
++ * Basically this is two 16c550 uarts's and a parallel port, which is
++ * why the serial definitions should be valid for the 16c550 uart
++ * aswell.
++ *
++ * Data was taken from National Semiconductors duart 16c552
++ * data-sheets and the Texas Instruments DACE 16c552 data-sheets (the
++ * NS version of the chip is _non_ standard and their data-sheets did
++ * cost me several wasted hours of work).
++ *
++ * This file is (C) 1995 Jes Sorensen (jds at kom.auc.dk)
++ *
++ * Moved from drivers/char/ to include/linux/, because it's useful
++ * on more than just the one card. I'm using it on the hp300 DCA
++ * serial driver, for example.
++ *      -- Peter Maydell <pmaydell at chiark.greenend.org.uk> 05/1998
++ */
++
++#ifndef _16C552_H_
++#define _16C552_H_
++
++/* Serial stuff */
++
++struct uart_16c550 {
++	volatile u_char skip0;
++	volatile u_char RBR;
++	volatile u_char skip1;
++	volatile u_char IER;
++	volatile u_char skip2;
++	volatile u_char IIR;
++	volatile u_char skip3;
++	volatile u_char LCR;
++	volatile u_char skip4;
++	volatile u_char MCR;
++	volatile u_char skip5;
++	volatile u_char LSR;
++	volatile u_char skip6;
++	volatile u_char MSR;
++	volatile u_char skip7;
++	volatile u_char SCR;
++};
++
++#define THR RBR
++#define FCR IIR
++#define DLL RBR
++#define DLM IER
++#define AFR IIR
++
++/*
++ * Bit-defines for the various registers.
++ */
++
++
++/* IER */
++
++#define ERDAI         (1<<0)
++#define ETHREI        (1<<1)
++#define ELSI          (1<<2)
++#define EMSI          (1<<3)
++
++/* IIR - Interrupt Ident. Register */
++
++#define IRQ_PEND      (1<<0) /* NOTE: IRQ_PEND=0 implies irq pending */
++#define IRQ_ID1       (1<<1)
++#define IRQ_ID2       (1<<2)
++#define IRQ_ID3       (1<<3)
++#define FIFO_ENA0     (1<<6) /* Both these are set when FCR(1<<0)=1 */
++#define FIFO_ENA1     (1<<7)
++
++#define IRQ_RLS  (IRQ_ID1 | IRQ_ID2)
++#define IRQ_RDA  (IRQ_ID2)
++#define IRQ_CTI  (IRQ_ID2 | IRQ_ID3)
++#define IRQ_THRE (IRQ_ID1)
++#define IRQ_MS   0
++
++/* FCR - FIFO Control Register */
++
++#define FIFO_ENA      (1<<0)
++#define RCVR_FIFO_RES (1<<1)
++#define XMIT_FIFO_RES (1<<2)
++#define DMA_MODE_SEL  (1<<3)
++#define RCVR_TRIG_LSB (1<<6)
++#define RCVR_TRIG_MSB (1<<7)
++
++#define FIFO_TRIG_1   0x00
++#define FIFO_TRIG_4   RCVR_TRIG_LSB
++#define FIFO_TRIG_8   RCVR_TRIG_MSB
++#define FIFO_TRIG_14  RCVR_TRIG_LSB|RCVR_TRIG_MSB
++
++/* LCR - Line Control Register */
++
++#define WLS0          (1<<0)
++#define WLS1          (1<<1)
++#define STB           (1<<2)
++#define PEN           (1<<3)
++#define EPS           (1<<4)
++#define STICK_PARITY  (1<<5)
++#define SET_BREAK     (1<<6)
++#define DLAB          (1<<7)
++
++#define data_5bit      0x00
++#define data_6bit      0x01
++#define data_7bit      0x02
++#define data_8bit      0x03
++
++
++/* MCR - Modem Control Register */
++
++#define DTR           (1<<0)
++#define RTS           (1<<1)
++#define OUT1          (1<<2)
++#define OUT2          (1<<3)
++#define LOOP          (1<<4)
++
++/* LSR - Line Status Register */
++
++#define DR            (1<<0)
++#define OE            (1<<1)
++#define PE            (1<<2)
++#define FE            (1<<3)
++#define BI            (1<<4)
++#define THRE          (1<<5)
++#define TEMT          (1<<6)
++#define RCVR_FIFO_ERR (1<<7)
++
++/* MSR - Modem Status Register */
++
++#define DCTS          (1<<0)
++#define DDSR          (1<<1)
++#define TERI          (1<<2)
++#define DDCD          (1<<3)
++#define CTS           (1<<4)
++#define DSR           (1<<5)
++#define RING_I        (1<<6)
++#define DCD           (1<<7)
++
++/* AFR - Alternate Function Register */
++
++#define CONCUR_WRITE  (1<<0)
++#define BAUDOUT       (1<<1)
++#define RXRDY         (1<<2)
++
++/* Parallel stuff */
++
++/*
++ * Unfortunately National Semiconductors did not supply the
++ * specifications for the parallel port in the chip :-(
++ * TI succed though, so here they are :-)
++ *
++ * Defines for the bits can be found by including <linux/lp.h>
++ */
++struct IOEXT_par {
++	volatile u_char skip0;
++	volatile u_char DATA;
++	volatile u_char skip1;
++	volatile u_char STATUS;
++	volatile u_char skip2;
++	volatile u_char CTRL;
++};
++
++#endif
+--- /dev/null
++++ b/drivers/char/ioext.h
+@@ -0,0 +1,107 @@
++/*
++ * Shared data structure for GVP IO-Extender support.
++ *
++ * Merge of ioext.h and ser_ioext.h
++ */
++#ifndef _IOEXT_H_
++#define _IOEXT_H_
++
++#include <linux/netdevice.h>
++
++#include "16c552.h"
++
++#define MAX_IOEXT 5 /*
++		     * The maximum number of io-extenders is 5, as you
++		     * can't have more than 5 ZII boards in any Amiga.
++		     */
++
++#define UART_CLK 7372800
++
++#define IOEXT_BAUD_BASE (UART_CLK / 16)
++
++#define IOEXT_MAX_LINES 2
++
++#define IOEXT_PAR_PLIP  0x0001
++#define IOEXT_PAR_LP    0x0002
++
++
++/*
++ * Macros for the serial driver.
++ */
++#define curruart(info) ((struct uart_16c550 *)(info->port))
++
++#define ser_DTRon(info)  curruart(info)->MCR |=  DTR
++#define ser_RTSon(info)  curruart(info)->MCR |=  RTS
++#define ser_DTRoff(info) curruart(info)->MCR &= ~DTR
++#define ser_RTSoff(info) curruart(info)->MCR &= ~RTS
++
++
++/*
++ * CNTR defines (copied from the GVP SCSI-driver file gvp11.h
++ */
++#define GVP_BUSY	(1<<0)
++#define GVP_IRQ_PEND	(1<<1)
++#define GVP_IRQ_ENA	(1<<3)
++#define GVP_DIR_WRITE   (1<<4)
++
++
++/*
++ * CTRL defines
++ */
++#define PORT0_MIDI   (1<<0)  /* CLR = DRIVERS         SET = MIDI      */
++#define PORT1_MIDI   (1<<1)  /* CLR = DRIVERS         SET = MIDI      */
++#define PORT0_DRIVER (1<<2)  /* CLR = RS232,          SET = MIDI      */
++#define PORT1_DRIVER (1<<3)  /* CLR = RS232,          SET = MIDI      */
++#define IRQ_SEL      (1<<4)  /* CLR = INT2,           SET = INT6      */
++#define ROM_BANK_SEL (1<<5)  /* CLR = LOW 32K,        SET = HIGH 32K  */
++#define PORT0_CTRL   (1<<6)  /* CLR = RTSx or RXRDYx, SET = RTSx ONLY */
++#define PORT1_CTRL   (1<<7)  /* CLR = RTSx or RXRDYx, SET = RTSx ONLY */
++
++
++/*
++ * This is the struct describing the registers on the IO-Extender.
++ * NOTE: The board uses a dual uart (16c552), which should be equal to
++ * two 16c550 uarts.
++ */
++typedef struct {
++	char gap0[0x41];
++	volatile unsigned char CNTR;	/* GVP DMAC CNTR (status register)   */
++	char gap1[0x11e];
++	struct uart_16c550 uart0;	/* The first uart                    */
++	char gap2[0xf0];
++	struct uart_16c550 uart1;	/* The second uart                   */
++	char gap3[0xf0];
++	struct IOEXT_par par;		/* The parallel port                 */
++	char gap4[0xfb];
++	volatile unsigned char CTRL;	/* The control-register on the board */
++} IOEXT_struct;
++
++
++typedef struct {
++	int num_uarts;
++	int line[IOEXT_MAX_LINES];
++	volatile struct uart_16c550 *uart[IOEXT_MAX_LINES];
++	IOEXT_struct *board;
++	int spurious_count;
++	unsigned char par_use;		/* IOEXT_PAR_xxx */
++#if defined(CONFIG_GVPIOEXT_PLIP) || defined(CONFIG_GVPIOEXT_PLIP_MODULE)
++	struct nt_device *dev;
++#endif
++#if defined(CONFIG_GVPIOEXT_LP) || defined(CONFIG_GVPIOEXT_LP_MODULE)
++	struct lp_struct *lp_table;
++	int lp_dev;
++	int lp_interrupt;
++#endif
++} IOExtInfoType;
++
++/* Number of detected boards.  */
++extern int ioext_num;
++extern IOExtInfoType ioext_info[MAX_IOEXT];
++
++void ioext_plip_interrupt(struct net_device *dev, int *spurious_count);
++void ioext_lp_interrupt(int dev, int *spurious_count);
++
++extern struct net_device ioext_dev_plip[3];
++extern struct lp_struct ioext_lp_table[1];
++
++#endif
+--- /dev/null
++++ b/drivers/char/plip_ioext.c
+@@ -0,0 +1,1057 @@
++/*
++ * plip_ioext: A parallel port "network" driver for GVP IO-Extender.
++ *
++ * Authors:	See drivers/net/plip.c
++ *              IO-Extender version by Steve Bennett, <msteveb at ozemail.com.au>
++ *
++ * This driver is for use with a 5-bit cable (LapLink (R) cable).
++ */
++
++static const char *version = "NET3 PLIP version 2.2/m68k";
++
++#define __NO_VERSION__
++
++#include <linux/module.h>
++#include <linux/types.h>
++#include <linux/sched.h>
++#include <linux/errno.h>
++#include <linux/interrupt.h>
++#include <linux/slab.h>
++#include <linux/termios.h>
++#include <linux/tty.h>
++#include <linux/serial.h>
++
++#include <asm/setup.h>
++#include <asm/irq.h>
++#include <asm/amigahw.h>
++#include <asm/amigaints.h>
++#include <linux/zorro.h>
++
++#include <linux/kernel.h>
++#include <linux/fcntl.h>
++#include <linux/string.h>
++#include <linux/ptrace.h>
++#include <linux/if_ether.h>
++
++#include <asm/system.h>
++
++#include <linux/in.h>
++#include <linux/delay.h>
++/*#include <linux/lp_m68k.h>*/
++
++#include <linux/netdevice.h>
++#include <linux/etherdevice.h>
++#include <linux/inetdevice.h>
++#include <linux/skbuff.h>
++#include <linux/if_plip.h>
++
++#include <linux/tqueue.h>
++#include <linux/ioport.h>
++#include <linux/bitops.h>
++#include <asm/byteorder.h>
++
++#include "ioext.h"
++
++#define DEBUG 0
++
++/* Map 'struct device *' to our control structure */
++#define PLIP_DEV(DEV) (&ioext_info[(DEV)->irq])
++
++/************************************************************************
++**
++** PLIP definitions
++**
++*************************************************************************
++*/
++
++/* Use 0 for production, 1 for verification, >2 for debug */
++#ifndef NET_DEBUG
++#define NET_DEBUG 2
++#endif
++static unsigned int net_debug = NET_DEBUG;
++
++/* In micro second */
++#define PLIP_DELAY_UNIT       1
++
++/* Connection time out = PLIP_TRIGGER_WAIT * PLIP_DELAY_UNIT usec */
++#define PLIP_TRIGGER_WAIT	 500
++
++/* Nibble time out = PLIP_NIBBLE_WAIT * PLIP_DELAY_UNIT usec */
++#define PLIP_NIBBLE_WAIT        3000
++
++#define PAR_DATA(dev)     ((dev)->base_addr+0)
++#define PAR_STATUS(dev)   ((dev)->base_addr+2)
++#define PAR_CONTROL(dev)  ((dev)->base_addr+4)
++
++static void enable_par_irq(struct device *dev, int on);
++static int plip_init(struct device *dev);
++
++/* Bottom halfs */
++static void plip_kick_bh(struct device *dev);
++static void plip_bh(struct device *dev);
++
++/* Functions for DEV methods */
++static int plip_rebuild_header(struct sk_buff *skb);
++static int plip_tx_packet(struct sk_buff *skb, struct device *dev);
++static int plip_open(struct device *dev);
++static int plip_close(struct device *dev);
++static struct enet_statistics *plip_get_stats(struct device *dev);
++static int plip_config(struct device *dev, struct ifmap *map);
++static int plip_ioctl(struct device *dev, struct ifreq *ifr, int cmd);
++
++enum plip_connection_state {
++	PLIP_CN_NONE=0,
++	PLIP_CN_RECEIVE,
++	PLIP_CN_SEND,
++	PLIP_CN_CLOSING,
++	PLIP_CN_ERROR
++};
++
++enum plip_packet_state {
++	PLIP_PK_DONE=0,
++	PLIP_PK_TRIGGER,
++	PLIP_PK_LENGTH_LSB,
++	PLIP_PK_LENGTH_MSB,
++	PLIP_PK_DATA,
++	PLIP_PK_CHECKSUM
++};
++
++enum plip_nibble_state {
++	PLIP_NB_BEGIN,
++	PLIP_NB_1,
++	PLIP_NB_2,
++};
++
++struct plip_local {
++	enum plip_packet_state state;
++	enum plip_nibble_state nibble;
++	union {
++		struct {
++#if defined(__LITTLE_ENDIAN)
++			unsigned char lsb;
++			unsigned char msb;
++#elif defined(__BIG_ENDIAN)
++			unsigned char msb;
++			unsigned char lsb;
++#else
++#error  "Please fix the endianness defines in <asm/byteorder.h>"
++#endif
++		} b;
++		unsigned short h;
++	} length;
++	unsigned short byte;
++	unsigned char  checksum;
++	unsigned char  data;
++	struct sk_buff *skb;
++};
++
++struct net_local {
++	struct enet_statistics enet_stats;
++	struct tq_struct immediate;
++	struct tq_struct deferred;
++	struct plip_local snd_data;
++	struct plip_local rcv_data;
++	unsigned long  trigger;
++	unsigned long  nibble;
++	enum plip_connection_state connection;
++	unsigned short timeout_count;
++	char is_deferred;
++	int (*orig_rebuild_header)(struct sk_buff *skb);
++};
++
++struct device ioext_dev_plip[] = {
++	{
++		"plip0",
++		0, 0, 0, 0,    /* memory */
++		0, 0,    /* base, irq */
++		0, 0, 0, NULL, plip_init
++	},
++	{
++		"plip1",
++		0, 0, 0, 0,    /* memory */
++		0, 0,    /* base, irq */
++		0, 0, 0, NULL, plip_init
++	},
++	{
++		"plip2",
++		0, 0, 0, 0,    /* memory */
++		0, 0,    /* base, irq */
++		0, 0, 0, NULL, plip_init
++	}
++};
++
++/*
++ * Check for and handle an interrupt for this PLIP device.
++ *
++ */
++void ioext_plip_interrupt(struct device *dev, int *spurious_count)
++{
++	struct net_local *nl;
++	struct plip_local *rcv;
++	unsigned char c0;
++	unsigned long flags;
++
++	nl = (struct net_local *)dev->priv;
++	rcv = &nl->rcv_data;
++
++	c0 = z_readb(PAR_STATUS(dev));
++
++	if (dev->interrupt) {
++		return;
++	}
++
++	if ((c0 & 0xf8) != 0xc0) {
++		/* Not for us */
++		++*spurious_count;
++		return;
++	}
++
++	*spurious_count = 0;
++	dev->interrupt = 1;
++
++	local_irq_save(flags);
++
++	switch (nl->connection) {
++	case PLIP_CN_CLOSING:
++		dev->tbusy = 0;
++	case PLIP_CN_NONE:
++	case PLIP_CN_SEND:
++		dev->last_rx = jiffies;
++		rcv->state = PLIP_PK_TRIGGER;
++		nl->connection = PLIP_CN_RECEIVE;
++		nl->timeout_count = 0;
++		queue_task(&nl->immediate, &tq_immediate);
++		mark_bh(IMMEDIATE_BH);
++		local_irq_restore(flags);
++#if 0
++		printk("%s: receive irq in SEND/NONE/CLOSING (%d) ok\n",
++		       dev->name, nl->connection);
++#endif
++		break;
++
++	case PLIP_CN_RECEIVE:
++		local_irq_restore(flags);
++		printk("%s: receive interrupt when receiving packet\n",
++		       dev->name);
++		break;
++
++	case PLIP_CN_ERROR:
++		local_irq_restore(flags);
++		printk("%s: receive interrupt in error state\n", dev->name);
++		break;
++	}
++}
++
++
++/* Bottom half handler for the delayed request.
++   This routine is kicked by do_timer().
++   Request `plip_bh' to be invoked. */
++static void
++plip_kick_bh(struct device *dev)
++{
++	struct net_local *nl = (struct net_local *)dev->priv;
++
++	if (nl->is_deferred) {
++		queue_task(&nl->immediate, &tq_immediate);
++		mark_bh(IMMEDIATE_BH);
++	}
++}
++
++/* Forward declarations of internal routines */
++static int plip_none(struct device *, struct net_local *,
++		     struct plip_local *, struct plip_local *);
++static int plip_receive_packet(struct device *, struct net_local *,
++			       struct plip_local *, struct plip_local *);
++static int plip_send_packet(struct device *, struct net_local *,
++			    struct plip_local *, struct plip_local *);
++static int plip_connection_close(struct device *, struct net_local *,
++				 struct plip_local *, struct plip_local *);
++static int plip_error(struct device *, struct net_local *,
++		      struct plip_local *, struct plip_local *);
++static int plip_bh_timeout_error(struct device *dev, struct net_local *nl,
++				 struct plip_local *snd,
++				 struct plip_local *rcv,
++				 int error);
++
++#define OK        0
++#define TIMEOUT   1
++#define ERROR     2
++
++typedef int (*plip_func)(struct device *dev, struct net_local *nl,
++			 struct plip_local *snd, struct plip_local *rcv);
++
++static plip_func connection_state_table[] =
++{
++	plip_none,
++	plip_receive_packet,
++	plip_send_packet,
++	plip_connection_close,
++	plip_error
++};
++
++/*
++** enable_par_irq()
++**
++** Enable or disable parallel irq for 'dev' according to 'on'.
++**
++** It is NOT possible to disable only the parallel irq.
++** So we disable the board interrupt instead. This means that
++** during reception of a PLIP packet, no serial interrupts can
++** happen. Sorry.
++*/
++static void enable_par_irq(struct device *dev, int on)
++{
++	if (on) {
++		PLIP_DEV(dev)->board->CNTR |= GVP_IRQ_ENA;
++	}
++	else {
++		PLIP_DEV(dev)->board->CNTR &= ~GVP_IRQ_ENA;
++	}
++}
++
++/* Bottom half handler of PLIP. */
++static void
++plip_bh(struct device *dev)
++{
++	struct net_local *nl = (struct net_local *)dev->priv;
++	struct plip_local *snd = &nl->snd_data;
++	struct plip_local *rcv = &nl->rcv_data;
++	plip_func f;
++	int r;
++
++	nl->is_deferred = 0;
++	f = connection_state_table[nl->connection];
++	if ((r = (*f)(dev, nl, snd, rcv)) != OK
++	    && (r = plip_bh_timeout_error(dev, nl, snd, rcv, r)) != OK) {
++		nl->is_deferred = 1;
++		queue_task(&nl->deferred, &tq_timer);
++	}
++}
++
++static int
++plip_bh_timeout_error(struct device *dev, struct net_local *nl,
++		      struct plip_local *snd, struct plip_local *rcv,
++		      int error)
++{
++	unsigned char c0;
++	unsigned long flags;
++
++	local_irq_save(flags);
++	if (nl->connection == PLIP_CN_SEND) {
++
++		if (error != ERROR) { /* Timeout */
++			nl->timeout_count++;
++			if ((snd->state == PLIP_PK_TRIGGER
++			     && nl->timeout_count <= 10)
++			    || nl->timeout_count <= 3) {
++				local_irq_restore(flags);
++				/* Try again later */
++				return TIMEOUT;
++			}
++			c0 = z_readb(PAR_STATUS(dev));
++			printk(KERN_INFO "%s: transmit timeout(%d,%02x)\n",
++			       dev->name, snd->state, c0);
++		}
++		nl->enet_stats.tx_errors++;
++		nl->enet_stats.tx_aborted_errors++;
++	} else if (nl->connection == PLIP_CN_RECEIVE) {
++		if (rcv->state == PLIP_PK_TRIGGER) {
++			/* Transmission was interrupted. */
++			local_irq_restore(flags);
++			return OK;
++		}
++		if (error != ERROR) { /* Timeout */
++			if (++nl->timeout_count <= 3) {
++				local_irq_restore(flags);
++				/* Try again later */
++				return TIMEOUT;
++			}
++			c0 = z_readb(PAR_STATUS(dev));
++			printk(KERN_INFO "%s: receive timeout(%d,%02x)\n",
++			       dev->name, rcv->state, c0);
++		}
++		nl->enet_stats.rx_dropped++;
++	}
++	rcv->state = PLIP_PK_DONE;
++	if (rcv->skb) {
++		kfree_skb(rcv->skb);
++		rcv->skb = NULL;
++	}
++	snd->state = PLIP_PK_DONE;
++	if (snd->skb) {
++		dev_kfree_skb(snd->skb);
++		snd->skb = NULL;
++	}
++	enable_par_irq(dev, 0);
++	dev->tbusy = 1;
++	nl->connection = PLIP_CN_ERROR;
++	z_writeb(0x00, PAR_DATA(dev));
++	local_irq_restore(flags);
++
++	return TIMEOUT;
++}
++
++static int
++plip_none(struct device *dev, struct net_local *nl,
++	  struct plip_local *snd, struct plip_local *rcv)
++{
++	return OK;
++}
++
++/* PLIP_RECEIVE --- receive a byte(two nibbles)
++   Returns OK on success, TIMEOUT on timeout */
++inline static int
++plip_receive(struct device *dev, unsigned short nibble_timeout,
++	     enum plip_nibble_state *ns_p, unsigned char *data_p)
++{
++	unsigned char c0, c1;
++	unsigned int cx;
++
++	switch (*ns_p) {
++	case PLIP_NB_BEGIN:
++		cx = nibble_timeout;
++		while (1) {
++			c0 = z_readb(PAR_STATUS(dev));
++			udelay(PLIP_DELAY_UNIT);
++			if ((c0 & 0x80) == 0) {
++				c1 = z_readb(PAR_STATUS(dev));
++				if (c0 == c1)
++					break;
++			}
++			if (--cx == 0)
++				return TIMEOUT;
++		}
++#if 0
++		printk("received first nybble: %02X -> %02X\n",
++		       c0, (c0 >> 3) & 0x0F);
++#endif
++		*data_p = (c0 >> 3) & 0x0f;
++		z_writeb(0x10, PAR_DATA(dev)); /* send ACK */
++		*ns_p = PLIP_NB_1;
++
++	case PLIP_NB_1:
++		cx = nibble_timeout;
++		while (1) {
++			c0 = z_readb(PAR_STATUS(dev));
++			udelay(PLIP_DELAY_UNIT);
++			if (c0 & 0x80) {
++				c1 = z_readb(PAR_STATUS(dev));
++				if (c0 == c1)
++					break;
++			}
++			if (--cx == 0)
++				return TIMEOUT;
++		}
++#if 0
++		printk("received second nybble: %02X -> %02X\n",
++		       c0, (c0 << 1) & 0xF0);
++#endif
++		*data_p |= (c0 << 1) & 0xf0;
++		z_writeb(0x00, PAR_DATA(dev)); /* send ACK */
++		*ns_p = PLIP_NB_BEGIN;
++	case PLIP_NB_2:
++		break;
++	}
++	return OK;
++}
++
++/* PLIP_RECEIVE_PACKET --- receive a packet */
++static int
++plip_receive_packet(struct device *dev, struct net_local *nl,
++		    struct plip_local *snd, struct plip_local *rcv)
++{
++	unsigned short nibble_timeout = nl->nibble;
++	unsigned char *lbuf;
++	unsigned long flags;
++
++	switch (rcv->state) {
++	case PLIP_PK_TRIGGER:
++		enable_par_irq(dev, 0);
++		dev->interrupt = 0;
++		z_writeb(0x01, PAR_DATA(dev)); /* send ACK */
++		if (net_debug > 2)
++			printk(KERN_DEBUG "%s: receive start\n", dev->name);
++		rcv->state = PLIP_PK_LENGTH_LSB;
++		rcv->nibble = PLIP_NB_BEGIN;
++
++	case PLIP_PK_LENGTH_LSB:
++		if (snd->state != PLIP_PK_DONE) {
++			if (plip_receive(dev, nl->trigger,
++					 &rcv->nibble, &rcv->length.b.lsb)) {
++				/* collision, here dev->tbusy == 1 */
++				rcv->state = PLIP_PK_DONE;
++				nl->is_deferred = 1;
++				nl->connection = PLIP_CN_SEND;
++				queue_task(&nl->deferred, &tq_timer);
++				enable_par_irq(dev, 1);
++				return OK;
++			}
++		} else {
++			if (plip_receive(dev, nibble_timeout,
++					 &rcv->nibble, &rcv->length.b.lsb))
++				return TIMEOUT;
++		}
++		rcv->state = PLIP_PK_LENGTH_MSB;
++
++	case PLIP_PK_LENGTH_MSB:
++		if (plip_receive(dev, nibble_timeout,
++				 &rcv->nibble, &rcv->length.b.msb))
++			return TIMEOUT;
++		if (rcv->length.h > dev->mtu + dev->hard_header_len
++		    || rcv->length.h < 8) {
++			printk(KERN_INFO "%s: bogus packet size %d.\n",
++			       dev->name, rcv->length.h);
++			return ERROR;
++		}
++		/* Malloc up new buffer. */
++		rcv->skb = dev_alloc_skb(rcv->length.h);
++		if (rcv->skb == NULL) {
++			printk(KERN_INFO "%s: Memory squeeze.\n", dev->name);
++			return ERROR;
++		}
++		skb_put(rcv->skb,rcv->length.h);
++		rcv->skb->dev = dev;
++		rcv->state = PLIP_PK_DATA;
++		rcv->byte = 0;
++		rcv->checksum = 0;
++
++	case PLIP_PK_DATA:
++		lbuf = rcv->skb->data;
++		do
++			if (plip_receive(dev, nibble_timeout,
++					 &rcv->nibble, &lbuf[rcv->byte]))
++				return TIMEOUT;
++		while (++rcv->byte < rcv->length.h);
++		do
++			rcv->checksum += lbuf[--rcv->byte];
++		while (rcv->byte);
++		rcv->state = PLIP_PK_CHECKSUM;
++
++	case PLIP_PK_CHECKSUM:
++		if (plip_receive(dev, nibble_timeout,
++				 &rcv->nibble, &rcv->data))
++			return TIMEOUT;
++		if (rcv->data != rcv->checksum) {
++			nl->enet_stats.rx_crc_errors++;
++			if (net_debug)
++				printk(KERN_INFO "%s: checksum error\n",
++				       dev->name);
++			return ERROR;
++		}
++		rcv->state = PLIP_PK_DONE;
++
++	case PLIP_PK_DONE:
++		/* Inform the upper layer for the arrival of a packet. */
++		rcv->skb->protocol=eth_type_trans(rcv->skb, dev);
++		netif_rx(rcv->skb);
++		nl->enet_stats.rx_packets++;
++		rcv->skb = NULL;
++		if (net_debug > 2)
++			printk(KERN_DEBUG "%s: receive end\n", dev->name);
++
++		/* Close the connection. */
++		z_writeb (0x00, PAR_DATA(dev));
++
++		local_irq_save(flags);
++		if (snd->state != PLIP_PK_DONE) {
++			nl->connection = PLIP_CN_SEND;
++			local_irq_restore(flags);
++			queue_task(&nl->immediate, &tq_immediate);
++			mark_bh(IMMEDIATE_BH);
++			enable_par_irq(dev, 1);
++			return OK;
++		} else {
++			nl->connection = PLIP_CN_NONE;
++			local_irq_restore(flags);
++			enable_par_irq(dev, 1);
++			return OK;
++		}
++	}
++	return OK;
++}
++
++/* PLIP_SEND --- send a byte (two nibbles)
++   Returns OK on success, TIMEOUT when timeout    */
++inline static int
++plip_send(struct device *dev, unsigned short nibble_timeout,
++	  enum plip_nibble_state *ns_p, unsigned char data)
++{
++	unsigned char c0;
++	unsigned int cx;
++
++	switch (*ns_p) {
++	case PLIP_NB_BEGIN:
++		z_writeb((data & 0x0f), PAR_DATA(dev));
++		*ns_p = PLIP_NB_1;
++
++	case PLIP_NB_1:
++		z_writeb(0x10 | (data & 0x0f), PAR_DATA(dev));
++		cx = nibble_timeout;
++		while (1) {
++			c0 = z_readb(PAR_STATUS(dev));
++			if ((c0 & 0x80) == 0)
++				break;
++			if (--cx == 0)
++				return TIMEOUT;
++			udelay(PLIP_DELAY_UNIT);
++		}
++		z_writeb(0x10 | (data >> 4), PAR_DATA(dev));
++		*ns_p = PLIP_NB_2;
++
++	case PLIP_NB_2:
++		z_writeb((data >> 4), PAR_DATA(dev));
++		cx = nibble_timeout;
++		while (1) {
++			c0 = z_readb(PAR_STATUS(dev));
++			if (c0 & 0x80)
++				break;
++			if (--cx == 0)
++				return TIMEOUT;
++			udelay(PLIP_DELAY_UNIT);
++		}
++		*ns_p = PLIP_NB_BEGIN;
++		return OK;
++	}
++	return OK;
++}
++
++/* PLIP_SEND_PACKET --- send a packet */
++static int
++plip_send_packet(struct device *dev, struct net_local *nl,
++		 struct plip_local *snd, struct plip_local *rcv)
++{
++	unsigned short nibble_timeout = nl->nibble;
++	unsigned char *lbuf;
++	unsigned char c0;
++	unsigned int cx;
++	unsigned long flags;
++
++	if (snd->skb == NULL || (lbuf = snd->skb->data) == NULL) {
++		printk(KERN_INFO "%s: send skb lost\n", dev->name);
++		snd->state = PLIP_PK_DONE;
++		snd->skb = NULL;
++		return ERROR;
++	}
++
++	if (snd->length.h == 0) {
++		return OK;
++	}
++
++	switch (snd->state) {
++	case PLIP_PK_TRIGGER:
++		if ((z_readb(PAR_STATUS(dev)) & 0xf8) != 0x80)
++			return TIMEOUT;
++
++		/* Trigger remote rx interrupt. */
++		z_writeb(0x08, PAR_DATA(dev));
++		cx = nl->trigger;
++		while (1) {
++			udelay(PLIP_DELAY_UNIT);
++                        local_irq_save(flags);
++			if (nl->connection == PLIP_CN_RECEIVE) {
++				local_irq_restore(flags);
++				/* interrupted */
++				nl->enet_stats.collisions++;
++				if (net_debug > 1)
++					printk(KERN_INFO "%s: collision.\n",
++					       dev->name);
++				return OK;
++			}
++			c0 = z_readb(PAR_STATUS(dev));
++			if (c0 & 0x08) {
++				enable_par_irq(dev, 0);
++				if (net_debug > 2)
++					printk(KERN_DEBUG "%s: send start\n",
++					       dev->name);
++				snd->state = PLIP_PK_LENGTH_LSB;
++				snd->nibble = PLIP_NB_BEGIN;
++				nl->timeout_count = 0;
++				local_irq_restore(flags);
++				break;
++			}
++			local_irq_restore(flags);
++			if (--cx == 0) {
++				z_writeb(0x00, PAR_DATA(dev));
++				return TIMEOUT;
++			}
++		}
++
++	case PLIP_PK_LENGTH_LSB:
++		if (plip_send(dev, nibble_timeout,
++			      &snd->nibble, snd->length.b.lsb))
++			return TIMEOUT;
++		snd->state = PLIP_PK_LENGTH_MSB;
++
++	case PLIP_PK_LENGTH_MSB:
++		if (plip_send(dev, nibble_timeout,
++			      &snd->nibble, snd->length.b.msb))
++			return TIMEOUT;
++		snd->state = PLIP_PK_DATA;
++		snd->byte = 0;
++		snd->checksum = 0;
++
++	case PLIP_PK_DATA:
++		do
++			if (plip_send(dev, nibble_timeout,
++				      &snd->nibble, lbuf[snd->byte]))
++				return TIMEOUT;
++		while (++snd->byte < snd->length.h);
++		do
++			snd->checksum += lbuf[--snd->byte];
++		while (snd->byte);
++		snd->state = PLIP_PK_CHECKSUM;
++
++	case PLIP_PK_CHECKSUM:
++		if (plip_send(dev, nibble_timeout,
++			      &snd->nibble, snd->checksum))
++			return TIMEOUT;
++
++		dev_kfree_skb(snd->skb);
++		nl->enet_stats.tx_packets++;
++		snd->state = PLIP_PK_DONE;
++
++	case PLIP_PK_DONE:
++		/* Close the connection */
++		z_writeb (0x00, PAR_DATA(dev));
++		snd->skb = NULL;
++		if (net_debug > 2)
++			printk(KERN_DEBUG "%s: send end\n", dev->name);
++		nl->connection = PLIP_CN_CLOSING;
++		nl->is_deferred = 1;
++		queue_task(&nl->deferred, &tq_timer);
++		enable_par_irq(dev, 1);
++		return OK;
++	}
++	return OK;
++}
++
++static int
++plip_connection_close(struct device *dev, struct net_local *nl,
++		      struct plip_local *snd, struct plip_local *rcv)
++{
++	unsigned long flags;
++
++        local_irq_save(flags);
++	if (nl->connection == PLIP_CN_CLOSING) {
++		nl->connection = PLIP_CN_NONE;
++		dev->tbusy = 0;
++		mark_bh(NET_BH);
++	}
++	local_irq_restore(flags);
++	return OK;
++}
++
++/* PLIP_ERROR --- wait till other end settled */
++static int
++plip_error(struct device *dev, struct net_local *nl,
++	   struct plip_local *snd, struct plip_local *rcv)
++{
++	unsigned char status;
++
++	status = z_readb(PAR_STATUS(dev));
++	if ((status & 0xf8) == 0x80) {
++		if (net_debug > 2)
++			printk(KERN_DEBUG "%s: reset interface.\n", dev->name);
++		nl->connection = PLIP_CN_NONE;
++		dev->tbusy = 0;
++		dev->interrupt = 0;
++		enable_par_irq(dev, 1);
++		mark_bh(NET_BH);
++	} else {
++		nl->is_deferred = 1;
++		queue_task(&nl->deferred, &tq_timer);
++	}
++
++	return OK;
++}
++
++/* We don't need to send arp, for plip is point-to-point. */
++static int
++plip_rebuild_header(struct sk_buff *skb)
++{
++	struct device *dev = skb->dev;
++	struct net_local *nl = (struct net_local *)dev->priv;
++	struct ethhdr *eth = (struct ethhdr *)skb->data;
++	int i;
++
++	if ((dev->flags & IFF_NOARP)==0)
++		return nl->orig_rebuild_header(skb);
++
++	if (eth->h_proto != __constant_htons(ETH_P_IP)
++#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
++	    && eth->h_proto != __constant_htons(ETH_P_IPV6)
++#endif
++		) {
++		printk(KERN_ERR "plip_rebuild_header: Don't know how to resolve type %d addresses?\n", (int)eth->h_proto);
++		memcpy(eth->h_source, dev->dev_addr, dev->addr_len);
++		return 0;
++	}
++
++	for (i=0; i < ETH_ALEN - sizeof(u32); i++)
++		eth->h_dest[i] = 0xfc;
++#if 0
++	*(u32 *)(eth->h_dest+i) = dst;
++#else
++	/* Do not want to include net/route.h here.
++	 * In any case, it is TOP of silliness to emulate
++	 * hardware addresses on PtP link. --ANK
++	 */
++	*(u32 *)(eth->h_dest+i) = 0;
++#endif
++	return 0;
++}
++
++static int
++plip_tx_packet(struct sk_buff *skb, struct device *dev)
++{
++	struct net_local *nl = (struct net_local *)dev->priv;
++	struct plip_local *snd = &nl->snd_data;
++	unsigned long flags;
++
++	if (dev->tbusy)
++		return 1;
++
++	if (test_and_set_bit(0, (void*)&dev->tbusy) != 0) {
++		printk(KERN_ERR "%s: Transmitter access conflict.\n",
++		       dev->name);
++		return 1;
++	}
++
++	if (skb->len > dev->mtu + dev->hard_header_len) {
++		printk(KERN_ERR "%s: packet too big, %d.\n",
++		       dev->name, (int)skb->len);
++		dev->tbusy = 0;
++		return 0;
++	}
++
++	if (net_debug > 2)
++		printk(KERN_DEBUG "%s: send request\n", dev->name);
++
++	local_irq_save(flags);
++	dev->trans_start = jiffies;
++	snd->skb = skb;
++	snd->length.h = skb->len;
++	snd->state = PLIP_PK_TRIGGER;
++	if (nl->connection == PLIP_CN_NONE) {
++		nl->connection = PLIP_CN_SEND;
++		nl->timeout_count = 0;
++	}
++	queue_task(&nl->immediate, &tq_immediate);
++	mark_bh(IMMEDIATE_BH);
++	local_irq_restore(flags);
++
++	return 0;
++}
++
++/* Open/initialize the board.  This is called (in the current kernel)
++   sometime after booting when the 'ifconfig' program is run.
++
++ */
++static int
++plip_open(struct device *dev)
++{
++	struct net_local *nl = (struct net_local *)dev->priv;
++	struct in_device *in_dev;
++
++#if defined(CONFIG_GVPIOEXT_LP) || defined(CONFIG_GVPIOEXT_LP_MODULE)
++	/* Yes, there is a race condition here. Fix it later */
++	if (PLIP_DEV(dev)->par_use & IOEXT_PAR_LP) {
++		/* Can't open if lp is in use */
++#if DEBUG
++		printk("par is in use by lp\n");
++#endif
++		return(-EBUSY);
++	}
++#endif
++	PLIP_DEV(dev)->par_use |= IOEXT_PAR_PLIP;
++
++#if DEBUG
++	printk("plip_open(): sending 00 to data port\n");
++#endif
++
++	/* Clear the data port. */
++	z_writeb (0x00, PAR_DATA(dev));
++
++#if DEBUG
++	printk("plip_open(): sent\n");
++#endif
++
++	/* Initialize the state machine. */
++	nl->rcv_data.state = nl->snd_data.state = PLIP_PK_DONE;
++	nl->rcv_data.skb = nl->snd_data.skb = NULL;
++	nl->connection = PLIP_CN_NONE;
++	nl->is_deferred = 0;
++
++	/* Fill in the MAC-level header.
++	   (ab)Use "dev->broadcast" to store point-to-point MAC address.
++
++	   PLIP doesn't have a real mac address, but we need to create one
++	   to be DOS compatible.  */
++	memset(dev->dev_addr,  0xfc, ETH_ALEN);
++	memset(dev->broadcast, 0xfc, ETH_ALEN);
++
++	if ((in_dev=dev->ip_ptr) != NULL) {
++		/*
++		 *	Any address will do - we take the first
++		 */
++		struct in_ifaddr *ifa=in_dev->ifa_list;
++		if (ifa != NULL) {
++			memcpy(dev->dev_addr+2, &ifa->ifa_local, 4);
++			memcpy(dev->broadcast+2, &ifa->ifa_address, 4);
++		}
++	}
++
++	dev->interrupt = 0;
++	dev->start = 1;
++	dev->tbusy = 0;
++
++	MOD_INC_USE_COUNT;
++
++	/* Enable rx interrupt. */
++	enable_par_irq(dev, 1);
++
++	return 0;
++}
++
++/* The inverse routine to plip_open (). */
++static int
++plip_close(struct device *dev)
++{
++	struct net_local *nl = (struct net_local *)dev->priv;
++	struct plip_local *snd = &nl->snd_data;
++	struct plip_local *rcv = &nl->rcv_data;
++	unsigned long flags;
++
++	dev->tbusy = 1;
++	dev->start = 0;
++        local_irq_save(flags);
++	nl->is_deferred = 0;
++	nl->connection = PLIP_CN_NONE;
++	local_irq_restore(flags);
++	z_writeb(0x00, PAR_DATA(dev));
++
++	snd->state = PLIP_PK_DONE;
++	if (snd->skb) {
++		dev_kfree_skb(snd->skb);
++		snd->skb = NULL;
++	}
++	rcv->state = PLIP_PK_DONE;
++	if (rcv->skb) {
++		kfree_skb(rcv->skb);
++		rcv->skb = NULL;
++	}
++
++	PLIP_DEV(dev)->par_use &= ~IOEXT_PAR_PLIP;
++
++	MOD_DEC_USE_COUNT;
++	return 0;
++}
++
++static struct enet_statistics *
++plip_get_stats(struct device *dev)
++{
++	struct net_local *nl = (struct net_local *)dev->priv;
++	struct enet_statistics *r = &nl->enet_stats;
++
++	return r;
++}
++
++static int
++plip_config(struct device *dev, struct ifmap *map)
++{
++	if (dev->flags & IFF_UP)
++		return -EBUSY;
++
++	printk(KERN_INFO "%s: This interface is autodetected (ignored).\n",
++	       dev->name);
++
++	return 0;
++}
++
++static int
++plip_ioctl(struct device *dev, struct ifreq *rq, int cmd)
++{
++	struct net_local *nl = (struct net_local *) dev->priv;
++	struct plipconf *pc = (struct plipconf *) &rq->ifr_data;
++
++	switch(pc->pcmd) {
++	case PLIP_GET_TIMEOUT:
++		pc->trigger = nl->trigger;
++		pc->nibble  = nl->nibble;
++		break;
++	case PLIP_SET_TIMEOUT:
++		nl->trigger = pc->trigger;
++		nl->nibble  = pc->nibble;
++		break;
++	default:
++		return -EOPNOTSUPP;
++	}
++	return 0;
++}
++
++/*
++ * Detect and initialize all IO-Extenders in this system.
++ *
++ * Both PLIP and serial devices are configured.
++ */
++int plip_init(struct device *dev)
++{
++	IOEXT_struct *board;
++	struct net_local *nl;
++
++	if (ioext_num == 0) {
++		printk(KERN_INFO "%s\n", version);
++	}
++
++	board = PLIP_DEV(dev)->board;
++	dev->base_addr = (unsigned long)&board->par.DATA;
++
++	/* Cheat and use irq to index into our table */
++	dev->irq = ioext_num;
++
++	printk(KERN_INFO "%s: IO-Extender parallel port at 0x%08lX\n", dev->name, dev->base_addr);
++
++	/* Fill in the generic fields of the device structure. */
++	ether_setup(dev);
++
++	/* Then, override parts of it */
++	dev->hard_start_xmit  = plip_tx_packet;
++	dev->open    = plip_open;
++	dev->stop    = plip_close;
++	dev->get_stats     = plip_get_stats;
++	dev->set_config    = plip_config;
++	dev->do_ioctl    = plip_ioctl;
++	dev->tx_queue_len  = 10;
++	dev->flags          = IFF_POINTOPOINT|IFF_NOARP;
++
++	/* Set the private structure */
++	dev->priv = kmalloc(sizeof (struct net_local), GFP_KERNEL);
++	if (dev->priv == NULL) {
++		printk(KERN_ERR "%s: out of memory\n", dev->name);
++		return -ENOMEM;
++	}
++	memset(dev->priv, 0, sizeof(struct net_local));
++	nl = (struct net_local *) dev->priv;
++
++	nl->orig_rebuild_header = dev->rebuild_header;
++	dev->rebuild_header   = plip_rebuild_header;
++
++	/* Initialize constants */
++	nl->trigger  = PLIP_TRIGGER_WAIT;
++	nl->nibble  = PLIP_NIBBLE_WAIT;
++
++	/* Initialize task queue structures */
++	nl->immediate.next = NULL;
++	nl->immediate.sync = 0;
++	nl->immediate.routine = (void *)(void *)plip_bh;
++	nl->immediate.data = dev;
++
++	nl->deferred.next = NULL;
++	nl->deferred.sync = 0;
++	nl->deferred.routine = (void *)(void *)plip_kick_bh;
++	nl->deferred.data = dev;
++
++	/* Don't enable interrupts yet */
++
++	return 0;
++}

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/149-mc68681.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/149-mc68681.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,145 @@
+To: linus, alan
+Cc: lkml
+Subject: [PATCH] MC68681 DUART
+
+From: Linux/m68k legacy
+
+MC68681 DUART register definitions for the Amiga MultiFace III serial driver.
+---
+ drivers/char/mc68681.h |  131 +++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 131 insertions(+)
+
+--- /dev/null
++++ b/drivers/char/mc68681.h
+@@ -0,0 +1,131 @@
++#ifndef _MC68681_H_
++#define _MC68681_H_
++
++/*
++ * This describes an MC68681 DUART. It has almost only overlayed registers, which
++ * the structure very ugly.
++ * Note that the ri-register isn't really a register of the duart but a kludge of bsc
++ * to make the ring indicator available.
++ *
++ * The data came from the MFC-31-Developer Kit (from Ralph Seidel,
++ * zodiac at darkness.gun.de) and the data sheet of Phillip's clone device (SCN68681)
++ * (from Richard Hirst, srh at gpt.co.uk)
++ *
++ * 11.11.95 copyright Joerg Dorchain (dorchain at mpi-sb.mpg.de)
++ *
++ */
++
++struct duarthalf {
++union {
++volatile u_char mr1; /* rw */
++volatile u_char mr2; /* rw */
++}  mr;
++volatile u_char ri;   /* special, read */
++union {
++volatile u_char sr;  /* read */
++volatile u_char csr; /* write */
++} sr_csr;
++u_char pad1;
++volatile u_char cr; /* write */
++u_char pad2;
++union {
++volatile u_char rhr; /* read */
++volatile u_char thr; /* write */
++} hr;
++u_char pad3;
++};
++
++struct duart {
++struct duarthalf pa;
++union {
++volatile u_char ipcr; /* read */
++volatile u_char acr;  /* write */
++} ipcr_acr;
++u_char pad1;
++union {
++volatile u_char isr; /* read */
++volatile u_char imr; /* write */
++} ir;
++u_char pad2;
++volatile u_char ctu;
++u_char pad3;
++volatile u_char ctl;
++u_char pad4;
++struct duarthalf pb;
++volatile u_char ivr;
++u_char pad5;
++union {
++volatile u_char ipr; /* read */
++volatile u_char opcr; /* write */
++} ipr_opcr;
++u_char pad6;
++union {
++volatile u_char start; /* read */
++volatile u_char sopc; /* write */
++} start_sopc;
++u_char pad7;
++union {
++volatile u_char stop; /* read */
++volatile u_char ropc; /* write */
++} stop_ropc;
++u_char pad8;
++};
++
++#define MR1_BITS 3
++#define MR1_5BITS 0
++#define MR1_6BITS 1
++#define MR1_7BITS 2
++#define MR1_8BITS 3
++
++#define MR1_PARITY_ODD 4
++
++#define MR1_PARITY 24
++#define MR1_PARITY_WITH 0
++#define MR1_PARITY_FORCE 8
++#define MR1_PARITY_NO 16
++#define MR1_PARITY_MULTIDROP 24
++
++#define MR1_ERROR_BLOCK 32
++#define MR1_FFULL_IRQ 64
++#define MR1_RxRTS_ON 128
++
++#define MR2_STOPS 15
++#define MR2_1STOP 7
++#define MR2_2STOP 15
++
++#define MR2_CTS_ON 16
++#define MR2_TxRTS_ON 32
++
++#define MR2_MODE 192
++#define MR2_NORMAL 0
++#define MR2_ECHO 64
++#define MR2_LOCALLOOP 128
++#define MR2_REMOTELOOP 192
++
++#define CR_RXCOMMAND 3
++#define CR_NONE 0
++#define CR_RX_ON 1
++#define CR_RX_OFF 2
++#define CR_TXCOMMAND 12
++#define CR_TX_ON 4
++#define CR_TX_OFF 8
++#define CR_MISC 112
++#define CR_RESET_MR 16
++#define CR_RESET_RX 32
++#define CR_RESET_TX 48
++#define CR_RESET_ERR 64
++#define CR_RESET_BREAK 80
++#define CR_START_BREAK 96
++#define CR_STOP_BREAK 112
++
++#define SR_RXRDY 1
++#define SR_FFULL 2
++#define SR_TXRDY 4
++#define SR_TXEMPT 8
++#define SR_OVERRUN 16
++#define SR_PARITY 32
++#define SR_FRAMING 64
++#define SR_BREAK 128
++
++
++#endif

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/152-pci.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/152-pci.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,20 @@
+To: linus, alan
+Cc: lkml
+Subject: [PATCH] M68k PCI
+
+First steps in making m68k PCI support compilable again
+---
+ arch/m68k/kernel/bios32.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/m68k/kernel/bios32.c
++++ b/arch/m68k/kernel/bios32.c
+@@ -284,7 +284,7 @@ static void __init layout_bus(struct pci
+ 
+ 	DBG_DEVS(("layout_bus: starting bus %d\n", bus->number));
+ 
+-	if (!bus->devices && !bus->children)
++	if (list_empty(&bus->devices) && list_empty(&bus->children))
+ 		return;
+ 
+ 	/*

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/478-serial.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/478-serial.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,29 @@
+To: linus, akpm
+Cc: lkml
+Subject: [PATCH] M68k SERIAL_PORT_DFNS only if CONFIG_ISA
+
+From: Kars de Jong <jongk at linux-m68k.org>
+
+M68k serial: Only define SERIAL_PORT_DFNS when CONFIG_ISA is defined. Otherwise
+the first 4 slots in the 8250 driver are unavailable on non-ISA machines.
+
+Signed-off-by: Kars de Jong <jongk at linux-m68k.org>
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ include/asm-m68k/serial.h |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/include/asm-m68k/serial.h
++++ b/include/asm-m68k/serial.h
+@@ -25,9 +25,11 @@
+ #define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF
+ #endif
+ 
++#ifdef CONFIG_ISA
+ #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 */
++#endif

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/633-atari_scc.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/633-atari_scc.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,1737 @@
+To: linus, akpm
+Cc: lkml
+Subject: [PATCH] m68k: Atari SCC serial driver
+
+From: Michael Schmitz <schmitz at opal.biophys.uni-duesseldorf.de>
+
+Atari SCC serial driver - this one works less well in 2.6 than it did in 2.4,
+most likely due to the way flip buffer push is handled now - i.e. no
+immediate push of received characters to the line disc. if the handler
+runs in interrupt context, and the bottom half for pushing is run as
+delayed task. 9 out of 10 ping packets end up in the bit bucket this way.
+I haven't figured out how to prevent overruns yet, and getting this right
+will require a bit more testing.
+
+Anyway, the basics are working, and maybe someone can figure out a better
+way to push characters up to the ldisc.
+
+Signed-off-by: Michael Schmitz <schmitz at debian.org>
+Signed-off-by: Roman Zippel <zippel at linux-m68k.org>
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ drivers/char/Makefile    |    1 
+ drivers/char/atari_scc.c | 1699 +++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 1700 insertions(+)
+
+--- a/drivers/char/Makefile
++++ b/drivers/char/Makefile
+@@ -31,6 +31,7 @@ obj-$(CONFIG_DIGIEPCA)		+= epca.o
+ obj-$(CONFIG_SPECIALIX)		+= specialix.o
+ obj-$(CONFIG_MOXA_INTELLIO)	+= moxa.o
+ obj-$(CONFIG_A2232)		+= ser_a2232.o generic_serial.o
++obj-$(CONFIG_ATARI_SCC)		+= atari_scc.o generic_serial.o
+ obj-$(CONFIG_ATARI_DSP56K)	+= dsp56k.o
+ obj-$(CONFIG_MOXA_SMARTIO)	+= mxser.o
+ obj-$(CONFIG_COMPUTONE)		+= ip2/
+--- /dev/null
++++ b/drivers/char/atari_scc.c
+@@ -0,0 +1,1699 @@
++/*
++ * Atari TT/Falcon Am8530 SCC serial ports implementation.
++ *
++ * Copyright 2005 Michael Schmitz
++ *
++ * Based on:
++ *   drivers/char/vme_scc.c: MVME147, MVME162, BVME6000 SCC serial ports
++ *   implementation.
++ *   Copyright 1999 Richard Hirst <richard at sleepie.demon.co.uk>
++ *
++ * which, in turn, was
++ *
++ * Based on atari_SCC.c which was
++ *   Copyright 1994-95 Roman Hodek <Roman.Hodek at informatik.uni-erlangen.de>
++ *   Partially based on PC-Linux serial.c by Linus Torvalds and Theodore Ts'o
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License.  See the file COPYING in the main directory of this archive
++ * for more details.
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/kdev_t.h>
++#include <asm/io.h>
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/ioport.h>
++#include <linux/interrupt.h>
++#include <linux/errno.h>
++#include <linux/tty.h>
++#include <linux/tty_flip.h>
++#include <linux/mm.h>
++#include <linux/serial.h>
++#include <linux/fcntl.h>
++#include <linux/major.h>
++#include <linux/delay.h>
++#include <linux/slab.h>
++#include <linux/miscdevice.h>
++#include <linux/console.h>
++#include <linux/init.h>
++#include <asm/setup.h>
++#include <asm/uaccess.h>
++#include <asm/bootinfo.h>
++
++#include <asm/atarihw.h>
++#include <asm/atariints.h>
++
++#include <linux/generic_serial.h>
++#include "scc.h"
++
++#define CONFIG_TT_SCC     1
++#define CONFIG_FALCON_SCC 1
++
++#define CHANNEL_A	0
++#define CHANNEL_B	1
++
++#define SCC_MINOR_BASE	64
++
++/* Shadows for all SCC write registers */
++static unsigned char scc_shadow[2][16];
++
++/* Location to access for SCC register access delay */
++static volatile unsigned char *scc_del = NULL;
++
++/* To keep track of STATUS_REG state for detection of Ext/Status int source */
++static unsigned char scc_last_status_reg[2];
++
++/***************************** Prototypes *****************************/
++
++/* Function prototypes */
++static void scc_disable_tx_interrupts(void *ptr);
++static void scc_enable_tx_interrupts(void *ptr);
++static void scc_disable_rx_interrupts(void *ptr);
++static void scc_enable_rx_interrupts(void *ptr);
++static int scc_get_CD(void *ptr);
++static void scc_shutdown_port(void *ptr);
++static int scc_set_real_termios(void *ptr);
++static void scc_hungup(void *ptr);
++static void scc_close(void *ptr);
++static int scc_chars_in_buffer(void *ptr);
++static int scc_open(struct tty_struct *tty, struct file *filp);
++static int scc_ioctl(struct tty_struct *tty, struct file *filp,
++		     unsigned int cmd, unsigned long arg);
++static void scc_throttle(struct tty_struct *tty);
++static void scc_unthrottle(struct tty_struct *tty);
++static irqreturn_t scc_tx_int(int irq, void *data);
++static irqreturn_t scc_rx_int(int irq, void *data);
++static irqreturn_t scc_stat_int(int irq, void *data);
++static irqreturn_t scc_spcond_int(int irq, void *data);
++static void scc_setsignals(struct scc_port *port, int dtr, int rts);
++static void scc_break_ctl(struct tty_struct *tty, int break_state);
++
++static struct tty_driver *scc_driver;
++
++static struct scc_port scc_ports[2];
++
++/*
++ * Flags to indicate one of the serial ports has already been initialized by the
++ * serial debug driver. We may want to hold off reinitializing ...
++ */
++
++/* Flag that Modem1 port is already initialized and used */
++extern int atari_SCC_init_done;
++/* Can be set somewhere, if a SCC master reset has already be done and should
++ * not be repeated; used by kgdb */
++extern int atari_SCC_reset_done;
++
++/*---------------------------------------------------------------------------
++ * Interface from generic_serial.c back here
++ *--------------------------------------------------------------------------*/
++
++static struct real_driver scc_real_driver = {
++	.disable_tx_interrupts	= scc_disable_tx_interrupts,
++	.enable_tx_interrupts	= scc_enable_tx_interrupts,
++	.disable_rx_interrupts	= scc_disable_rx_interrupts,
++	.enable_rx_interrupts	= scc_enable_rx_interrupts,
++	.get_CD			= scc_get_CD,
++	.shutdown_port		= scc_shutdown_port,
++	.set_real_termios	= scc_set_real_termios,
++	.chars_in_buffer	= scc_chars_in_buffer,
++	.close			= scc_close,
++	.hungup			= scc_hungup,
++};
++
++static struct tty_operations scc_ops = {
++	.open			= scc_open,
++	.close			= gs_close,
++	.write			= gs_write,
++	.put_char		= gs_put_char,
++	.flush_chars		= gs_flush_chars,
++	.write_room		= gs_write_room,
++	.chars_in_buffer	= gs_chars_in_buffer,
++	.flush_buffer		= gs_flush_buffer,
++	.ioctl			= scc_ioctl,
++	.throttle		= scc_throttle,
++	.unthrottle		= scc_unthrottle,
++	.set_termios		= gs_set_termios,
++	.stop			= gs_stop,
++	.start			= gs_start,
++	.hangup			= gs_hangup,
++	.break_ctl		= scc_break_ctl,
++};
++
++/* BRG values for the standard speeds and the various clock sources */
++
++typedef struct {
++	unsigned clksrc;		/* clock source to use or -1 for not possible */
++	unsigned div;			/* divisor: 1, 2 and 4 correspond to
++					 * direct 1:16, 1:32 and 1:64 modes,
++					 * divisors >= 4 yield a BRG value of
++					 * div/2-2 (in 1:16 mode)
++					 */
++} BAUD_ENTRY;
++
++/* A pointer for each channel to the current baud table */
++static BAUD_ENTRY *scc_baud_table[2];
++
++/* Baud table format:
++ *
++ * Each entry consists of the clock source (CLK_RTxC, CLK_TRxC or
++ * CLK_PCLK) and a divisor. The following rules apply to the divisor:
++ *
++ *   - CLK_RTxC: 1 or even (1, 2 and 4 are the direct modes, > 4 use
++ *               the BRG)
++ *
++ *   - CLK_TRxC: 1, 2 or 4 (no BRG, only direct modes possible)
++ *
++ *   - CLK_PCLK: >= 4 and even (no direct modes, only BRG)
++ *
++ */
++
++/* This table is used if RTxC = 3.672 MHz. This is the case for TT's
++ * channel A and for both channels on the Mega STE/Falcon. (TRxC is unused)
++ */
++
++static BAUD_ENTRY bdtab_norm[20] = {
++	/* B0      */ { 0, 0 },
++	/* B50     */ { CLK_RTxC, 4590 },
++	/* B75     */ { CLK_RTxC, 3060 },
++	/* B110    */ { CLK_PCLK, 4576 },
++	/* B134    */ { CLK_PCLK, 3756 },
++	/* B150    */ { CLK_RTxC, 1530 },
++	/* B200    */ { CLK_PCLK, 2516 },
++	/* B300    */ { CLK_PCLK, 1678 },
++	/* B600    */ { CLK_PCLK, 838 },
++	/* B1200   */ { CLK_PCLK, 420 },
++	/* B1800   */ { CLK_PCLK, 280 },
++	/* B2400   */ { CLK_PCLK, 210 },
++	/* B4800   */ { CLK_RTxC, 48 },
++	/* B9600   */ { CLK_RTxC, 24 },
++	/* B19200  */ { CLK_RTxC, 12 },
++	/* B38400  */ { CLK_RTxC, 6 },   /* #15 spd_extra */
++	/* B57600  */ { CLK_RTxC, 4 },   /* #16 spd_hi */
++	/* B115200 */ { CLK_RTxC, 2 },   /* #17 spd_vhi */
++	/* B230400 */ { CLK_RTxC, 1 },   /* #18 spd_shi */
++	/* B460800 */ { 0, 0 }           /* #19 spd_warp: Impossible */
++};
++
++/* This is a special table for the TT channel B with 307.2 kHz at RTxC
++ * and 2.4576 MHz at TRxC
++ */
++static BAUD_ENTRY bdtab_TTChB[20] = {
++	/* B0      */ { 0, 0 },
++	/* B50     */ { CLK_RTxC, 384 },
++	/* B75     */ { CLK_RTxC, 256 },
++	/* B110    */ { CLK_PCLK, 4576 },
++	/* B134    */ { CLK_PCLK, 3756 },
++	/* B150    */ { CLK_RTxC, 128 },
++	/* B200    */ { CLK_RTxC, 96 },
++	/* B300    */ { CLK_RTxC, 64 },
++	/* B600    */ { CLK_RTxC, 32 },
++	/* B1200   */ { CLK_RTxC, 16 },
++	/* B1800   */ { CLK_PCLK, 280 },
++	/* B2400   */ { CLK_RTxC, 8 },
++	/* B4800   */ { CLK_RTxC, 4 },
++	/* B9600   */ { CLK_RTxC, 2 },
++	/* B19200  */ { CLK_RTxC, 1 },
++	/* B38400  */ { CLK_TRxC, 4 },
++	/* B57600  */ { CLK_TRxC, 2 }, /* 57600 is not possible, use 76800 instead */
++	/* B115200 */ { CLK_TRxC, 1 }, /* 115200 is not possible, use 153600 instead */
++	/* B230400 */ { 0, 0 },        /* #18 spd_shi: Impossible  */
++	/* B460800 */ { 0, 0 }         /* #19 spd_warp: Impossible */
++};
++
++
++/*----------------------------------------------------------------------------
++ * atari_scc_init() and support functions
++ *---------------------------------------------------------------------------*/
++
++static int scc_init_drivers(void)
++{
++	int error;
++
++	scc_driver = alloc_tty_driver(2);
++	if (!scc_driver)
++		return -ENOMEM;
++	scc_driver->owner = THIS_MODULE;
++	scc_driver->driver_name = "scc";
++	scc_driver->name = "ttyS";
++	scc_driver->major = TTY_MAJOR;
++	scc_driver->minor_start = SCC_MINOR_BASE;
++	scc_driver->type = TTY_DRIVER_TYPE_SERIAL;
++	scc_driver->subtype = SERIAL_TYPE_NORMAL;
++	scc_driver->init_termios = tty_std_termios;
++	scc_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
++	scc_driver->flags = TTY_DRIVER_REAL_RAW;
++
++	tty_set_operations(scc_driver, &scc_ops);
++
++	if ((error = tty_register_driver(scc_driver))) {
++		printk(KERN_ERR "scc: Couldn't register scc driver, error = %d\n",
++		       error);
++		put_tty_driver(scc_driver);
++		return 1;
++	}
++
++	return 0;
++}
++
++
++/* ports[] array is indexed by line no (i.e. [0] for ttyS0, [1] for ttyS1).
++ */
++
++static void scc_init_portstructs(void)
++{
++	struct scc_port *port;
++	int i;
++
++	for (i = 0; i < 2; i++) {
++		port = scc_ports + i;
++		port->gs.magic = SCC_MAGIC;
++		port->gs.close_delay = HZ/2;
++		port->gs.closing_wait = 30 * HZ;
++		port->gs.rd = &scc_real_driver;
++#ifdef NEW_WRITE_LOCKING
++		port->gs.port_write_sem = MUTEX;
++#endif
++		init_waitqueue_head(&port->gs.open_wait);
++		init_waitqueue_head(&port->gs.close_wait);
++	}
++}
++
++
++#ifdef CONFIG_TT_SCC
++static int atari_tt_scc_init(void)
++{
++	struct scc_port *port;
++
++	printk(KERN_INFO "SCC: Atari TT Serial Driver\n");
++	/* FIXME channel A may be switchable between modem and LAN port */
++	/* Init channel A */
++	if (atari_SCC_init_done)
++		printk(KERN_INFO "SCC: already initialized, expect trouble!\n");
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: init channel A\n");
++#endif
++	port = &scc_ports[0];
++	port->channel = CHANNEL_A;
++	port->ctrlp = (volatile unsigned char *)&scc.cha_a_ctrl;
++	port->datap = port->ctrlp + 1;
++	port->port_a = &scc_ports[0];
++	port->port_b = &scc_ports[1];
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: request channel A irqs, port = %p\n", port);
++#endif
++	request_irq(IRQ_SCCA_TX, scc_tx_int, IRQ_TYPE_PRIO, "SCC-A TX", port);
++	request_irq(IRQ_SCCA_STAT, scc_stat_int, IRQ_TYPE_PRIO,
++		    "SCC-A status", port);
++	request_irq(IRQ_SCCA_RX, scc_rx_int, IRQ_TYPE_PRIO, "SCC-A RX", port);
++	request_irq(IRQ_SCCA_SPCOND, scc_spcond_int, IRQ_TYPE_PRIO,
++		    "SCC-A special cond", port);
++	{
++		SCC_ACCESS_INIT(port);
++#ifdef DEBUG
++		printk(KERN_INFO "SCC: read SCC status\n");
++#endif
++		/* on the first access, read status register to reset internal pointers */
++		SCCread(STATUS_REG);
++#ifdef DEBUG
++		printk(KERN_INFO "SCC: reset SCC\n");
++#endif
++		/* FIXME: master reset, once only */
++		SCCwrite(MASTER_INT_CTRL, MIC_HARD_RESET);
++		udelay(40);
++
++		/* disable interrupts for this channel */
++		SCCwrite(INT_AND_DMA_REG, 0);
++		/* Set the interrupt vector ; 0x60 for all Atari models */
++		SCCwrite(INT_VECTOR_REG, 0x60);
++		/* Interrupt parameters: vector includes status, status low */
++		SCCwrite(MASTER_INT_CTRL, MIC_VEC_INCL_STAT);
++		SCCmod(MASTER_INT_CTRL, 0xff, MIC_MASTER_INT_ENAB);
++
++		/* disable interrupts for this channel */
++		SCCwrite(INT_AND_DMA_REG, 0);
++	}
++
++	if (!atari_SCC_init_done) {
++		/* Init channel B */
++#ifdef DEBUG
++		printk(KERN_INFO "SCC: init channel B\n");
++#endif
++		port = &scc_ports[1];
++		port->channel = CHANNEL_B;
++		port->ctrlp = (volatile unsigned char *)&scc.cha_b_ctrl;
++		port->datap = port->ctrlp + 1;
++		port->port_a = &scc_ports[0];
++		port->port_b = &scc_ports[1];
++#ifdef DEBUG
++		printk(KERN_INFO "SCC: request channel B irqs, port = %p\n", port);
++#endif
++		request_irq(IRQ_SCCB_TX, scc_tx_int, IRQ_TYPE_PRIO,
++			    "SCC-B TX", port);
++		request_irq(IRQ_SCCB_STAT, scc_stat_int, IRQ_TYPE_PRIO,
++			    "SCC-B status", port);
++		request_irq(IRQ_SCCB_RX, scc_rx_int, IRQ_TYPE_PRIO,
++			    "SCC-B RX", port);
++		request_irq(IRQ_SCCB_SPCOND, scc_spcond_int, IRQ_TYPE_PRIO,
++			    "SCC-B special cond", port);
++		{
++			SCC_ACCESS_INIT(port);
++
++			/* disable interrupts for this channel */
++			SCCwrite(INT_AND_DMA_REG, 0);
++		}
++/* not implemented yet */
++#if 0
++		request_irq(IRQ_TT_MFP_RI, scc_ri_int, IRQ_TYPE_SLOW,
++			    "TT-MFP ring indicator (modem 2)", port);
++#endif
++
++	}
++
++	/* once only: initalize MFP timer C for RTxC */
++	tt_mfp.tim_ct_cd = (tt_mfp.tim_ct_cd & ~0x70) | 0x10;
++	tt_mfp.tim_dt_c = 1;
++	atari_turnoff_irq(IRQ_TT_MFP_TIMC);
++
++	/* set baud tables */
++	scc_baud_table[CHANNEL_A] = bdtab_norm;
++	scc_baud_table[CHANNEL_B] = bdtab_TTChB;
++
++	/* Initialise the tty driver structures and register */
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: scc_init_portstructs()\n");
++#endif
++	scc_init_portstructs();
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: scc_init_drivers()\n");
++#endif
++	scc_init_drivers();
++
++	return 0;
++}
++#endif
++
++
++#ifdef CONFIG_FALCON_SCC
++static int atari_falcon_scc_init(void)
++{
++	struct scc_port *port;
++
++	printk(KERN_INFO "SCC: Atari Falcon Serial Driver\n");
++	if (atari_SCC_init_done)
++		printk(KERN_INFO "SCC: already initialized, expect trouble!\n");
++
++	/* Init channel A */
++	port = &scc_ports[0];
++	port->channel = CHANNEL_A;
++	port->ctrlp = (volatile unsigned char *)&scc.cha_a_ctrl;
++	port->datap = port->ctrlp + 2;
++	port->port_a = &scc_ports[0];
++	port->port_b = &scc_ports[1];
++	request_irq(IRQ_SCCA_TX, scc_tx_int, IRQ_TYPE_PRIO, "SCC-A TX", port);
++	request_irq(IRQ_SCCA_STAT, scc_stat_int, IRQ_TYPE_PRIO,
++		    "SCC-A status", port);
++	request_irq(IRQ_SCCA_RX, scc_rx_int, IRQ_TYPE_PRIO, "SCC-A RX", port);
++	request_irq(IRQ_SCCA_SPCOND, scc_spcond_int, IRQ_TYPE_PRIO,
++		    "SCC-A special cond", port);
++	{
++		SCC_ACCESS_INIT(port);
++
++		/* on the first access, read status register to reset internal pointers */
++		SCCread(STATUS_REG);
++
++		/* FIXME: master reset, once only */
++		SCCwrite(MASTER_INT_CTRL, MIC_HARD_RESET);
++		udelay(40);
++
++		/* disable interrupts for this channel */
++		SCCwrite(INT_AND_DMA_REG, 0);
++		/* Set the interrupt vector */
++		SCCwrite(INT_VECTOR_REG, 0x60);
++		/* Interrupt parameters: vector includes status, status low */
++		SCCwrite(MASTER_INT_CTRL, MIC_VEC_INCL_STAT);
++		SCCmod(MASTER_INT_CTRL, 0xff, MIC_MASTER_INT_ENAB);
++	}
++
++	/* conditionalize if port in use by console ?? */
++	/* Init channel B */
++	port = &scc_ports[1];
++	port->channel = CHANNEL_B;
++	port->ctrlp = (volatile unsigned char *)&scc.cha_b_ctrl;
++	port->datap = port->ctrlp + 2;
++	port->port_a = &scc_ports[0];
++	port->port_b = &scc_ports[1];
++	request_irq(IRQ_SCCB_TX, scc_tx_int, IRQ_TYPE_PRIO, "SCC-B TX", port);
++	request_irq(IRQ_SCCB_STAT, scc_stat_int, IRQ_TYPE_PRIO,
++		    "SCC-B status", port);
++	request_irq(IRQ_SCCB_RX, scc_rx_int, IRQ_TYPE_PRIO, "SCC-B RX", port);
++	request_irq(IRQ_SCCB_SPCOND, scc_spcond_int, IRQ_TYPE_PRIO,
++		    "SCC-B special cond", port);
++
++	{
++		SCC_ACCESS_INIT(port);	/* Either channel will do */
++
++		/* disable interrupts for this channel */
++		SCCwrite(INT_AND_DMA_REG, 0);
++	}
++
++	/* set baud tables */
++	scc_baud_table[CHANNEL_A] = bdtab_norm;
++	scc_baud_table[CHANNEL_B] = bdtab_norm;
++
++	/* Initialise the tty driver structures and register */
++	scc_init_portstructs();
++	scc_init_drivers();
++
++	return 0;
++}
++#endif
++
++
++#ifdef CONFIG_ST_SCC
++static int atari_st_scc_init(void)
++{
++	struct scc_port *port;
++
++	int escc = ATARIHW_PRESENT(ST_ESCC);
++
++	printk(KERN_INFO "SCC: Atari MegaST/E Serial Driver\n");
++	/* FIXME: ports reversed logic */
++	/* Init channel A */
++	port = &scc_ports[1];
++	port->channel = CHANNEL_A;
++	port->ctrlp = (volatile unsigned char *)(escc ? &st_escc.cha_a_ctrl : &scc.cha_a_ctrl);
++	port->datap = port->ctrlp + 4;
++	port->port_a = &scc_ports[1];
++	port->port_b = &scc_ports[0];
++	request_irq(IRQ_SCCA_TX, scc_tx_int, IRQ_TYPE_PRIO, "SCC-A TX", port);
++	request_irq(IRQ_SCCA_STAT, scc_stat_int, IRQ_TYPE_PRIO,
++		    "SCC-A status", port);
++	request_irq(IRQ_SCCA_RX, scc_rx_int, IRQ_TYPE_PRIO, "SCC-A RX", port);
++	request_irq(SCCA_SPCOND, scc_spcond_int, IRQ_TYPE_PRIO,
++		    "SCC-A special cond", port);
++	{
++		SCC_ACCESS_INIT(port);
++
++		/* on the first access, read status register to reset internal pointers */
++		SCCread(STATUS_REG);
++
++		/* FIXME: master reset, once only */
++		SCCwrite(MASTER_INT_CTRL, MIC_HARD_RESET);
++		udelay(40);
++
++		/* disable interrupts for this channel */
++		SCCwrite(INT_AND_DMA_REG, 0);
++		/* Set the interrupt vector */
++		SCCwrite(INT_VECTOR_REG, BVME_IRQ_SCC_BASE);
++		/* Interrupt parameters: vector includes status, status low */
++		SCCwrite(MASTER_INT_CTRL, MIC_VEC_INCL_STAT);
++		SCCmod(MASTER_INT_CTRL, 0xff, MIC_MASTER_INT_ENAB);
++	}
++
++	/* Init channel B */
++	port = &scc_ports[0];
++	port->channel = CHANNEL_B;
++	port->ctrlp = (volatile unsigned char *)(escc ? &st_escc.cha_b_ctrl : &scc.cha_b_ctrl);
++	port->datap = port->ctrlp + 4;
++	port->port_a = &scc_ports[0];
++	port->port_b = &scc_ports[1];
++	request_irq(IRQ_SCCB_TX, scc_tx_int, IRQ_TYPE_PRIO, "SCC-B TX", port);
++	request_irq(IRQ_SCCB_STAT, scc_stat_int, IRQ_TYPE_PRIO,
++		    "SCC-B status", port);
++	request_irq(IRQ_SCCB_RX, scc_rx_int, IRQ_TYPE_PRIO, "SCC-B RX", port);
++	request_irq(IRQ_SCCB_SPCOND, scc_spcond_int, IRQ_TYPE_PRIO,
++		    "SCC-B special cond", port);
++
++	{
++		SCC_ACCESS_INIT(port);	/* Either channel will do */
++
++		/* disable interrupts for this channel */
++		SCCwrite(INT_AND_DMA_REG, 0);
++	}
++
++	/* set baud tables */
++	scc_baud_table[CHANNEL_A] = bdtab_norm;
++	scc_baud_table[CHANNEL_B] = bdtab_norm;
++
++	/* Initialise the tty driver structures and register */
++	scc_init_portstructs();
++	scc_init_drivers();
++
++	return 0;
++}
++#endif
++
++
++int atari_scc_init(void)
++{
++	int res = -ENODEV;
++	static int called = 0;
++
++	if (called)
++		return res;
++	called = 1;
++
++	if (!(ATARIHW_PRESENT(SCC) || ATARIHW_PRESENT(ST_ESCC)))
++		return -ENODEV;
++
++	scc_del = &mfp.par_dt_reg;
++
++#ifdef CONFIG_TT_SCC
++	if (MACH_IS_TT)
++		res = atari_tt_scc_init();
++#endif
++#ifdef CONFIG_FALCON_SCC
++	if (MACH_IS_FALCON)
++		res = atari_falcon_scc_init();
++#endif
++#ifdef CONFIG_ST_SCC
++	if (MACH_IS_ST)
++		res = atari_st_scc_init();
++#endif
++	return res;
++}
++
++void atari_scc_cleanup(void)
++{
++	struct scc_port *port;
++
++	tty_unregister_driver(scc_driver);
++	port = &scc_ports[0];
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: free channel A irqs, port = %p\n", port);
++#endif
++	free_irq(IRQ_SCCA_TX, port);
++	free_irq(IRQ_SCCA_STAT, port);
++	free_irq(IRQ_SCCA_RX, port);
++	free_irq(IRQ_SCCA_SPCOND, port);
++
++	port = &scc_ports[1];
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: free channel A irqs, port = %p\n", port);
++#endif
++	free_irq(IRQ_SCCB_TX, port);
++	free_irq(IRQ_SCCB_STAT, port);
++	free_irq(IRQ_SCCB_RX, port);
++	free_irq(IRQ_SCCB_SPCOND, port);
++
++}
++
++module_init(atari_scc_init);
++module_exit(atari_scc_cleanup);
++
++/*---------------------------------------------------------------------------
++ * Interrupt handlers
++ *--------------------------------------------------------------------------*/
++
++static irqreturn_t scc_rx_int(int irq, void *data)
++{
++	unsigned char ch;
++	struct scc_port *port = data;
++	struct tty_struct *tty = port->gs.tty;
++	SCC_ACCESS_INIT(port);
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: rx_int ...\n");
++#endif
++	ch = SCCread_NB(RX_DATA_REG);
++	if (!tty) {
++		printk(KERN_WARNING "scc_rx_int with NULL tty!\n");
++		SCCwrite_NB(COMMAND_REG, CR_HIGHEST_IUS_RESET);
++		return IRQ_HANDLED;
++	}
++	tty_insert_flip_char(tty, ch, 0);
++#if 0
++	if (tty->flip.count < TTY_FLIPBUF_SIZE) {
++		*tty->flip.char_buf_ptr = ch;
++		*tty->flip.flag_buf_ptr = 0;
++		tty->flip.flag_buf_ptr++;
++		tty->flip.char_buf_ptr++;
++		tty->flip.count++;
++	}
++#endif
++	/* Check if another character is already ready; in that case, the
++	 * spcond_int() function must be used, because this character may have an
++	 * error condition that isn't signalled by the interrupt vector used!
++	 */
++	if (SCCread(INT_PENDING_REG) &
++	    (port->channel == CHANNEL_A ? IPR_A_RX : IPR_B_RX)) {
++		scc_spcond_int(irq, data);
++		return IRQ_HANDLED;
++	}
++
++	SCCwrite_NB(COMMAND_REG, CR_HIGHEST_IUS_RESET);
++
++	tty_flip_buffer_push(tty);
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: rx_int done\n");
++#endif
++	return IRQ_HANDLED;
++}
++
++
++static irqreturn_t scc_spcond_int(int irq, void *data)
++{
++	struct scc_port *port = data;
++	struct tty_struct *tty = port->gs.tty;
++	unsigned char stat, ch, err;
++	int int_pending_mask = port->channel == CHANNEL_A ? IPR_A_RX : IPR_B_RX;
++
++	SCC_ACCESS_INIT(port);
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: spcond_int ...\n");
++#endif
++	if (!tty) {
++		printk(KERN_WARNING "scc_spcond_int with NULL tty!\n");
++		SCCwrite(COMMAND_REG, CR_ERROR_RESET);
++		SCCwrite_NB(COMMAND_REG, CR_HIGHEST_IUS_RESET);
++		return IRQ_HANDLED;
++	}
++	do {
++		stat = SCCread(SPCOND_STATUS_REG);
++		ch = SCCread_NB(RX_DATA_REG);
++
++		if (stat & SCSR_RX_OVERRUN)
++			err = TTY_OVERRUN;
++		else if (stat & SCSR_PARITY_ERR)
++			err = TTY_PARITY;
++		else if (stat & SCSR_CRC_FRAME_ERR)
++			err = TTY_FRAME;
++		else
++			err = 0;
++
++		tty_insert_flip_char(tty, ch, err);
++#if 0
++		if (tty->flip.count < TTY_FLIPBUF_SIZE) {
++			*tty->flip.char_buf_ptr = ch;
++			*tty->flip.flag_buf_ptr = err;
++			tty->flip.flag_buf_ptr++;
++			tty->flip.char_buf_ptr++;
++			tty->flip.count++;
++		}
++#endif
++		/* ++TeSche: *All* errors have to be cleared manually,
++		 * else the condition persists for the next chars
++		 */
++		if (err)
++			SCCwrite(COMMAND_REG, CR_ERROR_RESET);
++
++	} while (SCCread(INT_PENDING_REG) & int_pending_mask);
++
++	SCCwrite_NB(COMMAND_REG, CR_HIGHEST_IUS_RESET);
++
++	tty_flip_buffer_push(tty);
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: spcond_int done\n");
++#endif
++	return IRQ_HANDLED;
++}
++
++/* not implemented yet */
++#if 0
++static void scc_ri_int(int irq, void *data)
++{
++	struct scc_port *port = data;
++	/* update input line counter */
++	port->icount.rng++;
++	wake_up_interruptible(&port->delta_msr_wait);
++}
++#endif
++
++static irqreturn_t scc_tx_int(int irq, void *data)
++{
++	struct scc_port *port = data;
++	SCC_ACCESS_INIT(port);
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: tx_int irq %d port %p ...\n", irq, data);
++#endif
++	if (!port->gs.tty) {
++		printk(KERN_WARNING "scc_tx_int with NULL tty!\n");
++		SCCmod(INT_AND_DMA_REG, ~IDR_TX_INT_ENAB, 0);
++		SCCwrite(COMMAND_REG, CR_TX_PENDING_RESET);
++		SCCwrite_NB(COMMAND_REG, CR_HIGHEST_IUS_RESET);
++		return IRQ_HANDLED;
++	}
++	while ((SCCread_NB(STATUS_REG) & SR_TX_BUF_EMPTY)) {
++		if (port->x_char) {
++#ifdef DEBUG
++			printk(KERN_INFO "SCC: tx_int writing char %c\n",
++			       port->x_char);
++#endif
++			SCCwrite(TX_DATA_REG, port->x_char);
++			port->x_char = 0;
++		} else if ((port->gs.xmit_cnt <= 0) || port->gs.tty->stopped ||
++			   port->gs.tty->hw_stopped) {
++#ifdef DEBUG
++			printk(KERN_INFO "SCC: nothing to do!\n");
++#endif
++			break;
++		} else {
++#ifdef DEBUG
++			printk(KERN_INFO "SCC: tx_int writing buf %c\n",
++			       port->gs.xmit_buf[port->gs.xmit_tail]);
++#endif
++			SCCwrite(TX_DATA_REG, port->gs.xmit_buf[port->gs.xmit_tail++]);
++			port->gs.xmit_tail = port->gs.xmit_tail & (SERIAL_XMIT_SIZE-1);
++			if (--port->gs.xmit_cnt <= 0)
++				break;
++		}
++	}
++	if ((port->gs.xmit_cnt <= 0) || port->gs.tty->stopped ||
++	    port->gs.tty->hw_stopped) {
++#ifdef DEBUG
++		printk(KERN_INFO "SCC: nothing to do, disabling int\n");
++#endif
++		/* disable tx interrupts */
++		SCCmod(INT_AND_DMA_REG, ~IDR_TX_INT_ENAB, 0);
++		SCCwrite(COMMAND_REG, CR_TX_PENDING_RESET);	/* disable tx_int on next tx underrun? */
++		port->gs.flags &= ~GS_TX_INTEN;
++	}
++	if (port->gs.tty && port->gs.xmit_cnt <= port->gs.wakeup_chars) {
++#ifdef DEBUG
++		printk(KERN_INFO "SCC: waking up tty!\n");
++#endif
++		tty_wakeup(port->gs.tty);
++	}
++
++	SCCwrite_NB(COMMAND_REG, CR_HIGHEST_IUS_RESET);
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: tx_int done\n");
++#endif
++	return IRQ_HANDLED;
++}
++
++
++static irqreturn_t scc_stat_int(int irq, void *data)
++{
++	struct scc_port *port = data;
++	unsigned channel = port->channel;
++	unsigned char last_sr, sr, changed;
++	SCC_ACCESS_INIT(port);
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: stat_int ...\n");
++#endif
++	last_sr = scc_last_status_reg[channel];
++	sr = scc_last_status_reg[channel] = SCCread_NB(STATUS_REG);
++	changed = last_sr ^ sr;
++
++	if (changed & SR_DCD) {
++		port->c_dcd = !!(sr & SR_DCD);
++		if (!(port->gs.flags & ASYNC_CHECK_CD))
++			;	/* Don't report DCD changes */
++		else if (port->c_dcd) {
++			/* Are we blocking in open? */
++			wake_up_interruptible(&port->gs.open_wait);
++		} else {
++			if (port->gs.tty)
++				tty_hangup(port->gs.tty);
++		}
++	}
++
++	// FIXME: CTS and DSR status changes?
++
++	SCCwrite(COMMAND_REG, CR_EXTSTAT_RESET);
++	SCCwrite_NB(COMMAND_REG, CR_HIGHEST_IUS_RESET);
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: stat_int done\n");
++#endif
++	return IRQ_HANDLED;
++}
++
++
++/*---------------------------------------------------------------------------
++ * generic_serial.c callback funtions
++ *--------------------------------------------------------------------------*/
++
++static void scc_disable_tx_interrupts(void *ptr)
++{
++	struct scc_port *port = ptr;
++	unsigned long flags;
++	SCC_ACCESS_INIT(port);
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: disable_tx_int ...\n");
++#endif
++	local_irq_save(flags);
++	SCCmod(INT_AND_DMA_REG, ~IDR_TX_INT_ENAB, 0);
++	port->gs.flags &= ~GS_TX_INTEN;
++	local_irq_restore(flags);
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: disable_tx_int done!\n");
++#endif
++}
++
++
++static void scc_enable_tx_interrupts(void *ptr)
++{
++	struct scc_port *port = ptr;
++	unsigned long flags;
++
++	SCC_ACCESS_INIT(port);
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: enable_tx_int ...\n");
++#endif
++	local_irq_save(flags);
++	SCCmod(INT_AND_DMA_REG, 0xff, IDR_TX_INT_ENAB);
++	/* restart the transmitter */
++	scc_tx_int(0, port);
++	local_irq_restore(flags);
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: enable_tx_int done!\n");
++#endif
++}
++
++
++static void scc_disable_rx_interrupts(void *ptr)
++{
++	struct scc_port *port = ptr;
++	unsigned long flags;
++
++	SCC_ACCESS_INIT(port);
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: disable_rx_int ...\n");
++#endif
++	local_irq_save(flags);
++	SCCmod(INT_AND_DMA_REG,
++	       ~(IDR_RX_INT_MASK|IDR_PARERR_AS_SPCOND|IDR_EXTSTAT_INT_ENAB), 0);
++	local_irq_restore(flags);
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: disable_rx_int done!\n");
++#endif
++}
++
++
++static void scc_enable_rx_interrupts(void *ptr)
++{
++	struct scc_port *port = ptr;
++	unsigned long flags;
++
++	SCC_ACCESS_INIT(port);
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: enable_rx_int ...\n");
++#endif
++	local_irq_save(flags);
++	SCCmod(INT_AND_DMA_REG, 0xff,
++	       IDR_EXTSTAT_INT_ENAB|IDR_PARERR_AS_SPCOND|IDR_RX_INT_ALL);
++	local_irq_restore(flags);
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: enable_rx_int done!\n");
++#endif
++}
++
++
++static int scc_get_CD(void *ptr)
++{
++	struct scc_port *port = ptr;
++	unsigned channel = port->channel;
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: get_CD!\n");
++#endif
++	return !!(scc_last_status_reg[channel] & SR_DCD);
++}
++
++
++static void scc_shutdown_port(void *ptr)
++{
++	struct scc_port *port = ptr;
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: shutdown_port ...\n");
++#endif
++	port->gs.flags &= ~GS_ACTIVE;
++	if (port->gs.tty && port->gs.tty->termios->c_cflag & HUPCL)
++		scc_setsignals(port, 0, 0);
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: shutdown_port done!\n");
++#endif
++}
++
++
++static int scc_set_real_termios(void *ptr)
++{
++	/* the SCC has char sizes 5,7,6,8 in that order! */
++	static int chsize_map[4] = { 0, 2, 1, 3 };
++	unsigned int cflag, baud, baudbits, baudidx, brgmode;
++	unsigned int clkmode, clksrc, div, chsize, channel, brgval = 0;
++	unsigned long flags;
++	struct scc_port *port = ptr;
++	SCC_ACCESS_INIT(port);
++
++	if (!port->gs.tty || !port->gs.tty->termios)
++		return 0;
++
++	channel = port->channel;
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: termios for channel %p\n", channel);
++#endif
++	cflag = port->gs.tty->termios->c_cflag;
++	baud = port->gs.baud;
++	baudbits = cflag & CBAUD;
++	chsize = (cflag & CSIZE) >> 4;
++
++	if (baud == 0) {
++		/* speed == 0 -> drop DTR */
++		local_irq_save(flags);
++		SCCmod(TX_CTRL_REG, ~TCR_DTR, 0);
++		local_irq_restore(flags);
++		return 0;
++	} else if ((MACH_IS_TT && (baud < 50 || baud > 115200)) ||
++		   (MACH_IS_FALCON && (baud < 50 || baud > 230400))) {
++		printk(KERN_NOTICE "SCC: Bad speed requested, %d\n", baud);
++		return 0;
++	}
++
++	if (cflag & CLOCAL)
++		port->gs.flags &= ~ASYNC_CHECK_CD;
++	else
++		port->gs.flags |= ASYNC_CHECK_CD;
++
++	// calculate brgval for Atari; enable direct modes!
++
++	/* convert baud rate from gs.baud to table index, set custom divisor eventually */
++
++	div     = 0;
++	clksrc  = 0;
++	baudidx = 0;
++
++	switch (baud) {
++	case 50:
++		baudidx = 1;
++		break;
++	case 75:
++		baudidx = 2;
++		break;
++	case 110:
++		baudidx = 3;
++		break;
++	case 134:
++		baudidx = 4;
++		break;
++	case 150:
++		baudidx = 5;
++		break;
++	case 200:
++		baudidx = 6;
++		break;
++	case 300:
++		baudidx = 7;
++		break;
++	case 600:
++		baudidx = 8;
++		break;
++	case 1200:
++		baudidx = 9;
++		break;
++	case 1800:
++		baudidx = 10;
++		break;
++	case 2400:
++		baudidx = 11;
++		break;
++	case 4800:
++		baudidx = 12;
++		break;
++	case 9600:
++		baudidx = 13;
++		break;
++	case 19200:
++		baudidx = 14;
++		break;
++	case 38400:
++		baudidx = 15;
++		break;
++	case 57600:
++		baudidx = 16;
++		break;
++	case 115200:
++		baudidx = 17;
++		break;
++	case 230400:
++		baudidx = 18;
++		break;
++	default:
++		baudidx = 15;
++		break;
++	}
++
++	/* do we have a custom divisor ?? */
++	if (!div) {
++		if (baudidx > 19)
++			baudidx = 19;
++		clksrc = scc_baud_table[channel][baudidx].clksrc;
++		div = scc_baud_table[channel][baudidx].div;
++		if (!div) {
++			printk(" SCC_change_speed: divisor = 0 !!!");
++			return 0;
++		}
++	}
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: termios baud %d baudbits %d baudidx %d \n clksrc %d div %d\n",
++		baud, baudbits, baudidx, clksrc, div);
++#endif
++	/* compute the SCC's clock source, clock mode, BRG mode and BRG
++	 * value from clksrc and div
++	 */
++	if (div <= 4) {
++		clkmode = (div == 1 ? A1CR_CLKMODE_x16 :
++			   div == 2 ? A1CR_CLKMODE_x32 :
++				      A1CR_CLKMODE_x64);
++		clksrc  = (clksrc == CLK_RTxC
++			   ? CCR_TXCLK_RTxC | CCR_RXCLK_RTxC
++			   : CCR_TXCLK_TRxC | CCR_RXCLK_TRxC);
++		brgmode = 0; /* off */
++		brgval  = 0;
++	} else {
++		brgval  = div/2 - 2;
++		brgmode = (DCR_BRG_ENAB |
++			   (clksrc == CLK_PCLK ? DCR_BRG_USE_PCLK : 0));
++		clkmode = A1CR_CLKMODE_x16;
++		clksrc  = CCR_TXCLK_BRG | CCR_RXCLK_BRG;
++	}
++
++	//printk(KERN_INFO "SCC: termios baud %d baudbits %d baudidx %d \n clksrc %d clkmode %d div %d brgval %d brgmode %d\n",
++	//	baud, baudbits, baudidx, clksrc, clkmode, div, brgval, brgmode);
++
++	/* Now we have all parameters and can go to set them: */
++	local_irq_save(flags);
++
++#ifdef DEBUG
++	printk("  brgval=%d brgmode=%02x clkmode=%02x clksrc=%02x\n",
++		brgval, brgmode, clkmode, clksrc);
++#endif
++	/* receiver's character size and auto-enables */
++#if 0	// auto-enable considered harmful ...
++	SCCmod(RX_CTRL_REG, ~(RCR_CHSIZE_MASK|RCR_AUTO_ENAB_MODE),
++	       (chsize_map[chsize] << 6) |
++	       ((cflag & CRTSCTS) ? RCR_AUTO_ENAB_MODE : 0));
++#else
++	/* receiver's character size */
++	SCCmod(RX_CTRL_REG, ~RCR_CHSIZE_MASK, chsize_map[chsize] << 6);
++#endif
++#ifdef DEBUG
++	printk("  RX_CTRL_REG <- %02x\n", SCCread( RX_CTRL_REG ));
++#endif
++
++	// clock mode changes depending on baud rate
++	/* parity and stop bits (both, Tx and Rx) and clock mode */
++	SCCmod(AUX1_CTRL_REG,
++		~(A1CR_PARITY_MASK | A1CR_MODE_MASK | A1CR_CLKMODE_MASK),
++		((cflag & PARENB
++		  ? (cflag & PARODD ? A1CR_PARITY_ODD : A1CR_PARITY_EVEN)
++		  : A1CR_PARITY_NONE)
++		 | (cflag & CSTOPB ? A1CR_MODE_ASYNC_2 : A1CR_MODE_ASYNC_1)
++		 | clkmode));
++
++#ifdef DEBUG
++	printk("  AUX1_CTRL_REG <- %02x\n", SCCread(AUX1_CTRL_REG));
++#endif
++	/* sender's character size, set DTR for valid baud rate */
++	SCCmod(TX_CTRL_REG, ~TCR_CHSIZE_MASK, chsize_map[chsize] << 5 | TCR_DTR);
++#ifdef DEBUG
++	printk("  TX_CTRL_REG <- %02x\n", SCCread(TX_CTRL_REG));
++#endif
++
++	// clock sources change for TT !!
++	/* clock sources never change */
++	/* clock sources */
++	SCCmod(CLK_CTRL_REG, ~(CCR_TXCLK_MASK | CCR_RXCLK_MASK), clksrc);
++#ifdef DEBUG
++	printk("  CLK_CTRL_REG <- %02x\n", SCCread(CLK_CTRL_REG));
++#endif
++
++	/* disable BRG before changing the value */
++	SCCmod(DPLL_CTRL_REG, ~DCR_BRG_ENAB, 0);
++	/* BRG value */
++	SCCwrite(TIMER_LOW_REG, brgval & 0xff);
++	SCCwrite(TIMER_HIGH_REG, (brgval >> 8) & 0xff);
++	/* BRG enable, and clock source never changes */
++	//SCCmod(DPLL_CTRL_REG, 0xff, DCR_BRG_ENAB);
++	SCCmod(DPLL_CTRL_REG, ~(DCR_BRG_ENAB | DCR_BRG_USE_PCLK), brgmode);
++#ifdef DEBUG
++	printk("  TIMER_LOW_REG <- %02x\n", SCCread(TIMER_LOW_REG));
++	printk("  TIMER_HIGH_REG <- %02x\n", SCCread(TIMER_HIGH_REG));
++#endif
++#ifdef DEBUG
++	printk("  DPLL_CTRL_REG <- %02x\n", SCCread(DPLL_CTRL_REG));
++#endif
++
++	local_irq_restore(flags);
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: done termios for channel %d\n", channel);
++#endif
++	return 0;
++}
++
++
++static int scc_chars_in_buffer(void *ptr)
++{
++	struct scc_port *port = ptr;
++#ifdef DEBUG
++	int rv;
++#endif
++	SCC_ACCESS_INIT(port);
++#ifdef DEBUG
++	rv = (SCCread(SPCOND_STATUS_REG) & SCSR_ALL_SENT) ? 0  : 1;
++	printk(KERN_INFO "SCC: chars_in_buffer: %d\n", rv);
++	return rv;
++#else
++	return (SCCread(SPCOND_STATUS_REG) & SCSR_ALL_SENT) ? 0  : 1;
++#endif
++}
++
++
++/* Comment taken from sx.c (2.4.0):
++   I haven't the foggiest why the decrement use count has to happen
++   here. The whole linux serial drivers stuff needs to be redesigned.
++   My guess is that this is a hack to minimize the impact of a bug
++   elsewhere. Thinking about it some more. (try it sometime) Try
++   running minicom on a serial port that is driven by a modularized
++   driver. Have the modem hangup. Then remove the driver module. Then
++   exit minicom.  I expect an "oops".  -- REW */
++
++static void scc_hungup(void *ptr)
++{
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: hungup ...\n");
++#endif
++	scc_disable_tx_interrupts(ptr);
++	scc_disable_rx_interrupts(ptr);
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: hungup done\n");
++#endif
++}
++
++
++static void scc_close(void *ptr)
++{
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: close ...\n");
++#endif
++	scc_disable_tx_interrupts(ptr);
++	scc_disable_rx_interrupts(ptr);
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: close done\n");
++#endif
++}
++
++
++/*---------------------------------------------------------------------------
++ * Internal support functions
++ *--------------------------------------------------------------------------*/
++
++static void scc_setsignals(struct scc_port *port, int dtr, int rts)
++{
++	unsigned long flags;
++	unsigned char t;
++	SCC_ACCESS_INIT(port);
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: setsignals dtr %d rts %d...\n", dtr, rts);
++#endif
++	local_irq_save(flags);
++	t = SCCread(TX_CTRL_REG);
++	if (dtr >= 0)
++		t = dtr? (t | TCR_DTR): (t & ~TCR_DTR);
++	if (rts >= 0)
++		t = rts? (t | TCR_RTS): (t & ~TCR_RTS);
++	SCCwrite(TX_CTRL_REG, t);
++	local_irq_restore(flags);
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: setsignals done\n");
++#endif
++}
++
++
++static void scc_send_xchar(struct tty_struct *tty, char ch)
++{
++	struct scc_port *port = (struct scc_port *)tty->driver_data;
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: send_xchar ...\n");
++#endif
++	port->x_char = ch;
++	if (ch)
++		scc_enable_tx_interrupts(port);
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: send_xchar done\n");
++#endif
++}
++
++
++/*---------------------------------------------------------------------------
++ * Driver entrypoints referenced from above
++ *--------------------------------------------------------------------------*/
++
++static int scc_open(struct tty_struct *tty, struct file *filp)
++{
++	int line = tty->index;
++	int retval;
++	struct scc_port *port = &scc_ports[line];
++	int i, channel = port->channel;
++	unsigned long flags;
++	SCC_ACCESS_INIT(port);
++
++	static const struct {
++		unsigned reg, val;
++	} scc_init_tab[] = {
++		/* no parity, 1 stop bit, async, 1:16 */
++		{ AUX1_CTRL_REG, A1CR_PARITY_NONE|A1CR_MODE_ASYNC_1|A1CR_CLKMODE_x64 },
++		/* parity error is special cond, ints disabled, no DMA */
++		{ INT_AND_DMA_REG, IDR_PARERR_AS_SPCOND | IDR_RX_INT_DISAB },
++		/* Rx 8 bits/char, no auto enable, Rx off */
++		{ RX_CTRL_REG, RCR_CHSIZE_8 },
++		/* DTR off, Tx 8 bits/char, RTS off, Tx off */
++		{ TX_CTRL_REG, TCR_CHSIZE_8 },
++		/* special features off */
++		{ AUX2_CTRL_REG, 0 },
++		/* RTxC is XTAL, TRxC is input, both clocks = RTxC */
++		{ CLK_CTRL_REG, CCR_TRxCOUT_XTAL | CCR_TXCLK_RTxC | CCR_RXCLK_RTxC },
++		{ DPLL_CTRL_REG, 0 },
++		/* Start Rx */
++		{ RX_CTRL_REG, RCR_RX_ENAB | RCR_CHSIZE_8 },
++		/* Start Tx */
++		{ TX_CTRL_REG, TCR_TX_ENAB | TCR_RTS | TCR_DTR | TCR_CHSIZE_8 },
++		/* Ext/Stat ints: CTS, DCD, SYNC (DSR) */
++		{ INT_CTRL_REG, ICR_ENAB_DCD_INT | ICR_ENAB_CTS_INT | ICR_ENAB_SYNC_INT },
++		/* Reset Ext/Stat ints */
++		{ COMMAND_REG, CR_EXTSTAT_RESET },
++		/* ...again */
++		{ COMMAND_REG, CR_EXTSTAT_RESET },
++		/* Rx int always, TX int off, Ext/Stat int on */
++		{ INT_AND_DMA_REG, IDR_EXTSTAT_INT_ENAB |
++		  IDR_PARERR_AS_SPCOND | IDR_RX_INT_ALL }
++	};
++
++	if (atari_SCC_init_done && line == 1)
++		return -ENODEV;
++
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: open port ...\n");
++#endif
++	if (!(port->gs.flags & ASYNC_INITIALIZED)) {
++#ifdef DEBUG
++		printk(KERN_INFO "SCC: init port ...\n");
++#endif
++		local_irq_save(flags);
++
++		SCCmod(MASTER_INT_CTRL, 0x3f,
++		       channel == 0 ? MIC_CH_A_RESET : MIC_CH_B_RESET);
++		udelay(40);		/* extra delay after a reset */
++
++		for (i = 0; i < sizeof(scc_init_tab)/sizeof(*scc_init_tab); ++i)
++			SCCwrite(scc_init_tab[i].reg, scc_init_tab[i].val);
++
++
++		/* remember status register for detection of DCD and CTS changes */
++		scc_last_status_reg[channel] = SCCread(STATUS_REG);
++
++		port->c_dcd = 0;	/* Prevent initial 1->0 interrupt */
++		scc_setsignals(port, 1, 1);
++		local_irq_restore(flags);
++#ifdef DEBUG
++		printk(KERN_INFO "SCC: init port done!\n");
++#endif
++	}
++
++	tty->driver_data = port;
++	port->gs.tty = tty;
++	port->gs.count++;
++#ifdef DEBUG
++	printk(KERN_WARNING "SCC: gs init port ...\n");
++#endif
++	retval = gs_init_port(&port->gs);
++	if (retval) {
++		port->gs.count--;
++		return retval;
++	}
++#ifdef DEBUG
++	printk(KERN_WARNING "SCC: gs init port done!\n");
++#endif
++	port->gs.flags |= GS_ACTIVE;
++
++#ifdef DEBUG
++	printk(KERN_WARNING "SCC: gs wait ready ...\n");
++#endif
++	retval = gs_block_til_ready(port, filp);
++#ifdef DEBUG
++	printk(KERN_WARNING "SCC: gs wait ready done!\n");
++#endif
++	if (retval) {
++		port->gs.count--;
++		return retval;
++	}
++
++	port->c_dcd = scc_get_CD(port);
++
++#ifdef DEBUG
++	printk(KERN_WARNING "SCC: enable rx ints ...\n");
++#endif
++	scc_enable_rx_interrupts(port);
++#ifdef DEBUG
++	printk(KERN_WARNING "SCC: enable rx ints done!\n");
++
++	printk(KERN_INFO "SCC: open port done!\n");
++#endif
++	return 0;
++}
++
++
++static void scc_throttle(struct tty_struct *tty)
++{
++	struct scc_port *port = (struct scc_port *)tty->driver_data;
++	unsigned long flags;
++	SCC_ACCESS_INIT(port);
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: throttle ...\n");
++#endif
++	if (tty->termios->c_cflag & CRTSCTS) {
++		local_irq_save(flags);
++		SCCmod(TX_CTRL_REG, ~TCR_RTS, 0);
++		local_irq_restore(flags);
++	}
++	if (I_IXOFF(tty))
++		scc_send_xchar(tty, STOP_CHAR(tty));
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: throttle done!\n");
++#endif
++}
++
++
++static void scc_unthrottle(struct tty_struct *tty)
++{
++	struct scc_port *port = (struct scc_port *)tty->driver_data;
++	unsigned long flags;
++	SCC_ACCESS_INIT(port);
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: unthrottle ...\n");
++#endif
++	if (tty->termios->c_cflag & CRTSCTS) {
++		local_irq_save(flags);
++		SCCmod(TX_CTRL_REG, 0xff, TCR_RTS);
++		local_irq_restore(flags);
++	}
++	if (I_IXOFF(tty))
++		scc_send_xchar(tty, START_CHAR(tty));
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: unthrottle done!\n");
++#endif
++}
++
++
++static int scc_ioctl(struct tty_struct *tty, struct file *file,
++		     unsigned int cmd, unsigned long arg)
++{
++	struct scc_port *port = (struct scc_port *)tty->driver_data;
++	int retval;
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: ioctl! cmd %d, arg %p \n", cmd, arg);
++#endif
++	//if (serial_paranoia_check(info, tty->device, "zs_ioctl"))
++	//	return -ENODEV;
++
++	if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
++	    (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGWILD) &&
++	    (cmd != TIOCSERSWILD) && (cmd != TIOCSERGSTRUCT)) {
++		if (tty->flags & (1 << TTY_IO_ERROR))
++			return -EIO;
++	}
++
++	switch (cmd) {
++	case TCSBRK:	/* SVID version: non-zero arg --> no break */
++#ifdef DEBUG
++		printk(KERN_INFO "SCC: ioctl TCSBRK\n");
++#endif
++		retval = tty_check_change(tty);
++		if (retval)
++			return retval;
++		tty_wait_until_sent(tty, 0);
++		//if (!arg)
++		//	send_break(info, HZ/4);	/* 1/4 second */
++		return 0;
++	case TCSBRKP:	/* support for POSIX tcsendbreak() */
++#ifdef DEBUG
++		printk(KERN_INFO "SCC: ioctl TCSBRKP\n");
++#endif
++		retval = tty_check_change(tty);
++		if (retval)
++			return retval;
++		tty_wait_until_sent(tty, 0);
++		//send_break(info, arg ? arg*(HZ/10) : HZ/4);
++		return 0;
++	case TIOCGSOFTCAR:
++#ifdef DEBUG
++		printk(KERN_INFO "SCC: ioctl TIOCGSOFTCAR\n");
++#endif
++		if (put_user(C_CLOCAL(tty) ? 1 : 0, (unsigned long *) arg))
++			return -EFAULT;
++		return 0;
++	case TIOCSSOFTCAR:
++#ifdef DEBUG
++		printk(KERN_INFO "SCC: ioctl TIOCSSOFTCAR\n");
++#endif
++		if (get_user(arg, (unsigned long *)arg))
++			return -EFAULT;
++		tty->termios->c_cflag =
++			((tty->termios->c_cflag & ~CLOCAL) |
++			 (arg ? CLOCAL : 0));
++		return 0;
++	case TIOCMGET:
++#ifdef DEBUG
++		printk(KERN_INFO "SCC: ioctl TIOCMGET\n");
++#endif
++		//return get_modem_info(info, (unsigned int *)arg);
++		return 0;
++	case TIOCMBIS:
++	case TIOCMBIC:
++	case TIOCMSET:
++#ifdef DEBUG
++		printk(KERN_INFO "SCC: ioctl TIOCMSET\n");
++#endif
++		//return set_modem_info(info, cmd, (unsigned int *)arg);
++		return 0;
++	case TIOCGSERIAL:
++#ifdef DEBUG
++		printk(KERN_INFO "SCC: ioctl TIOCGSERIAL\n");
++#endif
++		return 0;
++		//return get_serial_info(info,
++		//		       (struct serial_struct *)arg);
++	case TIOCSSERIAL:
++#ifdef DEBUG
++		printk(KERN_INFO "SCC: ioctl TIOCSSERIAL\n");
++#endif
++		return 0;
++		//return set_serial_info(info,
++		//		       (struct serial_struct *)arg);
++	case TIOCSERGETLSR: /* Get line status register */
++#ifdef DEBUG
++		printk(KERN_INFO "SCC: ioctl TIOCSERGETLSR\n");
++#endif
++		return 0;
++		//return get_lsr_info(info, (unsigned int *)arg);
++
++	case TIOCSERGSTRUCT:
++#ifdef DEBUG
++		printk(KERN_INFO "SCC: ioctl TIOCSERGSTRUCT\n");
++#endif
++		return 0;
++		if (copy_to_user((struct scc_port *)arg,
++				 port, sizeof(struct scc_port)))
++			return -EFAULT;
++		return 0;
++
++	default:
++#ifdef DEBUG
++		printk(KERN_INFO "SCC: ioctl default\n");
++#endif
++		return -ENOIOCTLCMD;
++	}
++	return 0;
++}
++
++
++static void scc_break_ctl(struct tty_struct *tty, int break_state)
++{
++	struct scc_port *port = (struct scc_port *)tty->driver_data;
++	unsigned long flags;
++	SCC_ACCESS_INIT(port);
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: break ctl ...\n");
++#endif
++	local_irq_save(flags);
++	SCCmod(TX_CTRL_REG, ~TCR_SEND_BREAK, break_state ? TCR_SEND_BREAK : 0);
++	local_irq_restore(flags);
++#ifdef DEBUG
++	printk(KERN_INFO "SCC: break ctl done!\n");
++#endif
++}
++
++
++/*---------------------------------------------------------------------------
++ * Serial console stuff...
++ *--------------------------------------------------------------------------*/
++#if 1
++#define scc_delay() \
++	asm volatile ("tstb %0" : : "m" (*scc_del) : "cc")
++
++#define SCC_WRITE(reg,val)				\
++	do {						\
++		scc.cha_b_ctrl = (reg);			\
++		scc_delay();				\
++		scc.cha_b_ctrl = (val);			\
++		scc_delay();				\
++	} while (0)
++
++/* loops_per_jiffy isn't initialized yet, so we can't use udelay(). This does a
++ * delay of ~ 60us. */
++#define LONG_DELAY()					\
++	do {						\
++		int i;					\
++		for (i = 100; i > 0; --i)		\
++			scc_delay();			\
++	} while (0)
++
++static void atari_init_scc_port(int cflag)
++{
++	extern int atari_SCC_reset_done;
++	static int clksrc_table[9] =
++		/* reg 11: 0x50 = BRG, 0x00 = RTxC, 0x28 = TRxC */
++		{ 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x00, 0x00 };
++	static int brgsrc_table[9] =
++		/* reg 14: 0 = RTxC, 2 = PCLK */
++		{ 2, 2, 2, 2, 2, 2, 0, 2, 2 };
++	static int clkmode_table[9] =
++		/* reg 4: 0x40 = x16, 0x80 = x32, 0xc0 = x64 */
++		{ 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xc0, 0x80 };
++	static int div_table[9] =
++		/* reg12 (BRG low) */
++		{ 208, 138, 103, 50, 24, 11, 1, 0, 0 };
++
++	int baud = cflag & CBAUD;
++	int clksrc, clkmode, div, reg3, reg5;
++
++	scc_del = &mfp.par_dt_reg;
++
++	if (cflag & CBAUDEX)
++		baud += B38400;
++	if (baud < B1200 || baud > B38400+2)
++		baud = B9600;		/* use default 9600bps for non-implemented rates */
++	baud -= B1200;			/* tables starts at 1200bps */
++
++	clksrc  = clksrc_table[baud];
++	clkmode = clkmode_table[baud];
++	div     = div_table[baud];
++	if (ATARIHW_PRESENT(TT_MFP) && baud >= 6) {
++		/* special treatment for TT, where rates >= 38400 are done via TRxC */
++		clksrc = 0x28; /* TRxC */
++		clkmode = baud == 6 ? 0xc0 :
++			  baud == 7 ? 0x80 : /* really 76800bps */
++				      0x40;  /* really 153600bps */
++		div = 0;
++	}
++
++	reg3 = (cflag & CSIZE) == CS8 ? 0xc0 : 0x40;
++	reg5 = (cflag & CSIZE) == CS8 ? 0x60 : 0x20 | 0x82 /* assert DTR/RTS */;
++
++	(void)scc.cha_b_ctrl;		/* reset reg pointer */
++	SCC_WRITE(9, 0xc0);		/* reset */
++	LONG_DELAY();			/* extra delay after WR9 access */
++	SCC_WRITE(4, (cflag & PARENB) ? ((cflag & PARODD) ? 0x01 : 0x03) : 0 |
++		  0x04 /* 1 stopbit */ |
++		  clkmode);
++	SCC_WRITE(3, reg3);
++	SCC_WRITE(5, reg5);
++	SCC_WRITE(9, 0);		/* no interrupts */
++	LONG_DELAY();			/* extra delay after WR9 access */
++	SCC_WRITE(10, 0);		/* NRZ mode */
++	SCC_WRITE(11, clksrc);		/* main clock source */
++	SCC_WRITE(12, div);		/* BRG value */
++	SCC_WRITE(13, 0);		/* BRG high byte */
++	SCC_WRITE(14, brgsrc_table[baud]);
++	SCC_WRITE(14, brgsrc_table[baud] | (div ? 1 : 0));
++	SCC_WRITE(3, reg3 | 1);
++	SCC_WRITE(5, reg5 | 8);
++
++	atari_SCC_reset_done = 1;
++	atari_SCC_init_done = 1;
++}
++
++static void scc_ch_write(char ch)
++{
++	volatile char *p = NULL;
++
++	if (MACH_IS_TT || MACH_IS_FALCON)
++		p = (volatile char *)&scc.cha_b_ctrl;
++
++	if (MACH_IS_ST)
++		p = (volatile char *)&scc.cha_b_ctrl;
++
++	if (MACH_IS_STE)
++		p = (volatile char *)&st_escc.cha_b_ctrl;
++
++	do {
++		scc_delay();
++	}
++	while (!(*p & 4));
++	// scc_delay();
++	// *p = 8;
++	scc_delay();
++	*(p+1) = ch;
++}
++
++/* The console must be locked when we get here. */
++
++static void scc_console_write(struct console *co, const char *str, unsigned count)
++{
++	unsigned long flags;
++
++	//printk("scc_console_write: %s\n", str);
++	local_irq_save(flags);
++
++	while (count--) {
++		if (*str == '\n')
++			scc_ch_write('\r');
++		scc_ch_write(*str++);
++	}
++	local_irq_restore(flags);
++	//printk("scc_console_write done!\n");
++}
++
++static struct tty_driver *scc_console_device(struct console *c, int *index)
++{
++	*index = c->index;
++	return scc_driver;
++}
++
++
++static int __init scc_console_setup(struct console *co, char *options)
++{
++	printk("scc_console_setup: initializing SCC port B\n");
++	atari_init_scc_port(B9600|CS8);
++	printk("scc_console_setup: done!\n");
++	return 0;
++}
++
++
++static struct console sercons = {
++	.name		= "ttyS",
++	.write		= scc_console_write,
++	.device		= scc_console_device,
++	.setup		= scc_console_setup,
++	.flags		= CON_PRINTBUFFER,
++	.index		= -1,
++};
++
++
++static int __init vme_scc_console_init(void)
++{
++	if (MACH_IS_TT || MACH_IS_ST || MACH_IS_FALCON)
++		register_console(&sercons);
++	return 0;
++}
++
++console_initcall(vme_scc_console_init);
++#endif
++
++/***************************** End of Functions *********************/
++
++MODULE_AUTHOR("Michael Schmitz");
++MODULE_DESCRIPTION("Atari Amd8350 SCC serial driver");
++MODULE_LICENSE("GPL");

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/HTC_PASIC3-depends-on-ARCH_PXA.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/HTC_PASIC3-depends-on-ARCH_PXA.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,21 @@
+Subject: [PATCH] HTC_PASIC3 should depend on ARCH_PXA
+
+drivers/mfd/htc-pasic3.c:22:31: error: asm/arch/pxa-regs.h: No such file or directory
+
+or we should just drop the offending #include.
+
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ drivers/mfd/htc-pasic3.c |    1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/drivers/mfd/htc-pasic3.c
++++ b/drivers/mfd/htc-pasic3.c
+@@ -19,7 +19,6 @@
+ #include <linux/interrupt.h>
+ #include <linux/mfd/htc-pasic3.h>
+ 
+-#include <asm/arch/pxa-regs.h>
+ 
+ struct pasic3_data {
+ 	void __iomem *mapping;

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/amifb-add-ami_modedb-to-modelist.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/amifb-add-ami_modedb-to-modelist.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,16 @@
+---
+ drivers/video/amifb.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/video/amifb.c
++++ b/drivers/video/amifb.c
+@@ -2383,6 +2383,9 @@ default_chipset:
+ 		goto amifb_error;
+ 	}
+ 
++	fb_videomode_to_modelist(ami_modedb, NUM_TOTAL_MODES,
++				 &fb_info.modelist);
++
+ 	round_down_bpp = 0;
+ 	chipptr = chipalloc(fb_info.fix.smem_len+
+ 	                    SPRITEMEMSIZE+

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/amiga-debug=mem.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/amiga-debug=mem.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,74 @@
+---
+ arch/m68k/amiga/config.c |   30 +++++++++++++++++++++---------
+ 1 file changed, 21 insertions(+), 9 deletions(-)
+
+--- a/arch/m68k/amiga/config.c
++++ b/arch/m68k/amiga/config.c
+@@ -109,6 +109,7 @@ static void amiga_mem_console_write(stru
+ 				    unsigned int count);
+ void amiga_serial_console_write(struct console *co, const char *s,
+ 				unsigned int count);
++static void __init amiga_savekmsg_init(void);
+ #ifdef CONFIG_HEARTBEAT
+ static void amiga_heartbeat(int on);
+ #endif
+@@ -119,6 +120,8 @@ static struct console amiga_console_driv
+ 	.index	= -1,
+ };
+ 
++static int __initdata amiga_enable_debug_mem;
++
+ 
+     /*
+      *  Motherboard Resources present in all Amiga models
+@@ -465,6 +468,9 @@ void __init config_amiga(void)
+ 	/* initialize chipram allocator */
+ 	amiga_chip_init();
+ 
++	if (amiga_enable_debug_mem && AMIGAHW_PRESENT(CHIP_RAM))
++		amiga_savekmsg_init();
++
+ 	/* our beloved beeper */
+ 	if (AMIGAHW_PRESENT(AMI_AUDIO))
+ 		amiga_init_sound();
+@@ -783,18 +789,10 @@ static void amiga_mem_console_write(stru
+ 	}
+ }
+ 
+-static int __init amiga_savekmsg_setup(char *arg)
++static void __init amiga_savekmsg_init(void)
+ {
+ 	static struct resource debug_res = { .name = "Debug" };
+ 
+-	if (!MACH_IS_AMIGA || strcmp(arg, "mem"))
+-		goto done;
+-
+-	if (!AMIGAHW_PRESENT(CHIP_RAM)) {
+-		printk("Warning: no chipram present for debugging\n");
+-		goto done;
+-	}
+-
+ 	savekmsg = amiga_chip_alloc_res(SAVEKMSG_MAXMEM, &debug_res);
+ 	savekmsg->magic1 = SAVEKMSG_MAGIC1;
+ 	savekmsg->magic2 = SAVEKMSG_MAGIC2;
+@@ -803,6 +801,20 @@ static int __init amiga_savekmsg_setup(c
+ 
+ 	amiga_console_driver.write = amiga_mem_console_write;
+ 	register_console(&amiga_console_driver);
++}
++
++static int __init amiga_savekmsg_setup(char *arg)
++{
++	if (!MACH_IS_AMIGA || strcmp(arg, "mem"))
++		goto done;
++
++	if (!AMIGAHW_PRESENT(CHIP_RAM)) {
++		printk("Warning: no chipram present for debugging\n");
++		amiga_enable_debug_mem = 1;
++		goto done;
++	}
++
++	amiga_savekmsg_init();
+ 
+ done:
+ 	return 0;

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/amiga-platform-device.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/amiga-platform-device.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,191 @@
+
+static int __init xxx_probe(struct platform_device *pdev)
+{
+	regs = platform_get_resource(pdev, IORESOURCE_MEM, CTRL_IOMEM_ID);
+	fifo = platform_get_resource(pdev, IORESOURCE_MEM, FIFO_IOMEM_ID);
+	if (!regs || !fifo)
+		return -ENXIO;
+
+	irq = platform_get_irq(pdev, 0);
+	if (irq < 0)
+		return irq;
+
+
+
+
+
+	platform_set_drvdata(pdev, xxx);
+
+
+
+
+
+
+
+
+}
+
+static int __exit xxx_remove(struct platform_device *pdev)
+{
+	xxx = platform_get_drvdata(pdev);
+
+	platform_set_drvdata(pdev, NULL);
+
+
+	return 0;
+}
+
+static struct platform_driver xxx_driver = {
+        .remove         = __exit_p(xxx_remove),
+        .driver         = {
+                .name           = "xxx",
+        },
+};
+
+static int __init xxx_init(void)
+{
+        return platform_driver_probe(&xxx_driver, xxx_probe);
+}
+module_init(xxx_init);
+
+static void __exit xxx_exit(void)
+{
+        platform_driver_unregister(&xxx_driver);
+}
+module_exit(xxx_exit);
+
+arch/m68k/amiga/amiints.c:	if (AMIGAHW_PRESENT(PCMCIA))
+arch/m68k/amiga/chipram.c:    if (!AMIGAHW_PRESENT(CHIP_RAM))
+arch/m68k/amiga/config.c:	if (AMIGAHW_PRESENT(name))		\
+arch/m68k/amiga/config.c:	if (AMIGAHW_PRESENT(ZORRO))
+arch/m68k/amiga/config.c:		printk("ZORRO%s ", AMIGAHW_PRESENT(ZORRO3) ? "3" : "");
+arch/m68k/amiga/config.c:	if (AMIGAHW_PRESENT(A3000_CLK)) {
+arch/m68k/amiga/config.c:	} else /* if (AMIGAHW_PRESENT(A2000_CLK)) */ {
+arch/m68k/amiga/config.c:	if (AMIGAHW_PRESENT(ZORRO3)) {
+arch/m68k/amiga/config.c:	if (amiga_enable_debug_mem && AMIGAHW_PRESENT(CHIP_RAM))
+arch/m68k/amiga/config.c:	if (AMIGAHW_PRESENT(AMI_AUDIO))
+arch/m68k/amiga/config.c:	if (AMIGAHW_PRESENT(MAGIC_REKICK))
+arch/m68k/amiga/config.c:	if (AMIGAHW_PRESENT(A3000_CLK)) {
+arch/m68k/amiga/config.c:	} else /* if (AMIGAHW_PRESENT(A2000_CLK)) */ {
+arch/m68k/amiga/config.c:	if (AMIGAHW_PRESENT(A3000_CLK)) {
+arch/m68k/amiga/config.c:	} else /* if (AMIGAHW_PRESENT(A2000_CLK)) */ {
+arch/m68k/amiga/config.c:	if (!AMIGAHW_PRESENT(CHIP_RAM)) {
+arch/m68k/amiga/config.c:	if (AMIGAHW_PRESENT(CHIP_RAM))
+arch/m68k/amiga/config.c:	if (AMIGAHW_PRESENT(AMI_VIDEO)) {
+arch/m68k/amiga/config.c:	if (AMIGAHW_PRESENT(name))			\
+arch/m68k/amiga/config.c:	if (AMIGAHW_PRESENT(ZORRO))
+arch/m68k/amiga/config.c:				AMIGAHW_PRESENT(ZORRO3) ? "I" : "",
+arch/m68k/kernel/setup.c:	if (MACH_IS_AMIGA && AMIGAHW_PRESENT(GG2_ISA)) {
+arch/m68k/kernel/setup.c:	if (MACH_IS_AMIGA && AMIGAHW_PRESENT(PCMCIA)) {
+drivers/block/amiflop.c:	if (!AMIGAHW_PRESENT(AMI_FLOPPY))
+drivers/char/amiserial.c:	if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(AMI_SERIAL))
+drivers/ide/legacy/gayle.c:    if ((a4000 = AMIGAHW_PRESENT(A4000_IDE)) || AMIGAHW_PRESENT(A1200_IDE))
+drivers/input/keyboard/amikbd.c:	if (!AMIGAHW_PRESENT(AMI_KEYBOARD))
+drivers/input/mouse/amimouse.c:	if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(AMI_MOUSE))
+drivers/net/apne.c:	if ( !(AMIGAHW_PRESENT(PCMCIA)) )
+drivers/parport/parport_amiga.c:	if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(AMI_PARALLEL))
+drivers/scsi/a3000.c:    if  (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(A3000_SCSI))
+drivers/scsi/a4000t.c:	if (!(MACH_IS_AMIGA && AMIGAHW_PRESENT(A4000_SCSI)))
+drivers/video/amifb.c:	if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(AMI_VIDEO))
+drivers/video/amifb.c:			if (AMIGAHW_PRESENT(AMBER_FF))
+drivers/video/amifb.c:			} else if (AMIGAHW_PRESENT(AGNUS_HR_PAL) ||
+drivers/video/amifb.c:			           AMIGAHW_PRESENT(AGNUS_HR_NTSC)) {
+drivers/video/amifb.c:			} else if (AMIGAHW_PRESENT(AGNUS_HR_PAL) ||
+drivers/video/amifb.c:			           AMIGAHW_PRESENT(AGNUS_HR_NTSC)) {
+drivers/zorro/proc.c:	if (MACH_IS_AMIGA && AMIGAHW_PRESENT(ZORRO)) {
+drivers/zorro/zorro.c:    if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(ZORRO))
+drivers/zorro/zorro.c:    if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(ZORRO))
+drivers/zorro/zorro.c:    zorro_bus.num_resources = AMIGAHW_PRESENT(ZORRO3) ? 4 : 2;
+include/asm-m68k/amigahw.h:#define AMIGAHW_PRESENT(name)	(amiga_hw_present.name)
+sound/oss/dmasound/dmasound_paula.c:	if (MACH_IS_AMIGA && AMIGAHW_PRESENT(AMI_AUDIO)) {
+---
+ arch/m68k/amiga/Makefile   |    2 -
+ arch/m68k/amiga/platform.c |   73 +++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 74 insertions(+), 1 deletion(-)
+
+--- a/arch/m68k/amiga/Makefile
++++ b/arch/m68k/amiga/Makefile
+@@ -2,6 +2,6 @@
+ # Makefile for Linux arch/m68k/amiga source directory
+ #
+ 
+-obj-y		:= config.o amiints.o cia.o chipram.o amisound.o
++obj-y		:= config.o amiints.o cia.o chipram.o amisound.o platform.o
+ 
+ obj-$(CONFIG_AMIGA_PCMCIA)	+= pcmcia.o
+--- /dev/null
++++ b/arch/m68k/amiga/platform.c
+@@ -0,0 +1,73 @@
++/*
++ *  Copyright (C) 2007 Geert Uytterhoeven
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License.  See the file COPYING in the main directory of this archive
++ * for more details.
++ */
++
++#include <linux/platform_device.h>
++#include <linux/mm.h>			// FIXME show_mem()
++
++#include <asm/amigahw.h>
++
++
++static struct platform_device amiga_serial = {
++	.name =	"amiga-serial",
++	.id	= -1,
++};
++
++static int __init amiga_init_devices(void)
++{
++	if (AMIGAHW_PRESENT(AMI_FLOPPY))
++		platform_device_register_simple("amiga-floppy", -1, NULL, 0);
++
++	if (AMIGAHW_PRESENT(AMI_SERIAL))
++		platform_device_register(&amiga_serial);
++
++#if 0
++    /* video hardware */
++[ ] AMIGAHW_PRESENT(AMI_VIDEO);		/* Amiga Video */
++[ ] AMIGAHW_PRESENT(AMI_BLITTER);	/* Amiga Blitter */
++[ ] AMIGAHW_PRESENT(AMBER_FF);		/* Amber Flicker Fixer */
++    /* sound hardware */
++[ ] AMIGAHW_PRESENT(AMI_AUDIO);		/* Amiga Audio */
++    /* disk storage interfaces */
++[ ] AMIGAHW_PRESENT(AMI_FLOPPY);	/* Amiga Floppy */
++[ ] AMIGAHW_PRESENT(A3000_SCSI);	/* SCSI (wd33c93, A3000 alike) */
++[ ] AMIGAHW_PRESENT(A4000_SCSI);	/* SCSI (ncr53c710, A4000T alike) */
++[ ] AMIGAHW_PRESENT(A1200_IDE);		/* IDE (A1200 alike) */
++[ ] AMIGAHW_PRESENT(A4000_IDE);		/* IDE (A4000 alike) */
++[ ] AMIGAHW_PRESENT(CD_ROM);		/* CD ROM drive */
++    /* other I/O hardware */
++[ ] AMIGAHW_PRESENT(AMI_KEYBOARD);	/* Amiga Keyboard */
++[ ] AMIGAHW_PRESENT(AMI_MOUSE);		/* Amiga Mouse */
++[ ] AMIGAHW_PRESENT(AMI_SERIAL);	/* Amiga Serial */
++[ ] AMIGAHW_PRESENT(AMI_PARALLEL);	/* Amiga Parallel */
++    /* real time clocks */
++[ ] AMIGAHW_PRESENT(A2000_CLK);		/* Hardware Clock (A2000 alike) */
++[ ] AMIGAHW_PRESENT(A3000_CLK);		/* Hardware Clock (A3000 alike) */
++    /* supporting hardware */
++[ ] AMIGAHW_PRESENT(CHIP_RAM);		/* Chip RAM */
++[ ] AMIGAHW_PRESENT(PAULA);		/* Paula (8364) */
++[ ] AMIGAHW_PRESENT(DENISE);		/* Denise (8362) */
++[ ] AMIGAHW_PRESENT(DENISE_HR);		/* Denise (8373) */
++[ ] AMIGAHW_PRESENT(LISA);		/* Lisa (8375) */
++[ ] AMIGAHW_PRESENT(AGNUS_PAL);		/* Normal/Fat PAL Agnus (8367/8371) */
++[ ] AMIGAHW_PRESENT(AGNUS_NTSC);	/* Normal/Fat NTSC Agnus (8361/8370) */
++[ ] AMIGAHW_PRESENT(AGNUS_HR_PAL);	/* Fat Hires PAL Agnus (8372) */
++[ ] AMIGAHW_PRESENT(AGNUS_HR_NTSC);	/* Fat Hires NTSC Agnus (8372) */
++[ ] AMIGAHW_PRESENT(ALICE_PAL);		/* PAL Alice (8374) */
++[ ] AMIGAHW_PRESENT(ALICE_NTSC);	/* NTSC Alice (8374) */
++[ ] AMIGAHW_PRESENT(MAGIC_REKICK);	/* A3000 Magic Hard Rekick */
++[ ] AMIGAHW_PRESENT(PCMCIA);		/* PCMCIA Slot */
++[ ] AMIGAHW_PRESENT(GG2_ISA);		/* GG2 Zorro2ISA Bridge */
++[ ] AMIGAHW_PRESENT(ZORRO);		/* Zorro AutoConfig */
++[ ] AMIGAHW_PRESENT(ZORRO3);		/* Zorro III */
++#endif
++
++	return 0;
++}
++
++device_initcall(amiga_init_devices);
++

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/amiga-platform-device2.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/amiga-platform-device2.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,32 @@
+---
+ arch/m68k/amiga/platform.c |   18 ++++++++++++++++--
+ 1 file changed, 16 insertions(+), 2 deletions(-)
+
+--- a/arch/m68k/amiga/platform.c
++++ b/arch/m68k/amiga/platform.c
+@@ -12,9 +12,23 @@
+ #include <asm/amigahw.h>
+ 
+ 
++static struct resource amiga_serial_resources[] = {
++	{
++		/*
++		 *  We request SERDAT and SERPER only, because the serial
++		 *  registers are too spread over the custom register space
++		 */
++		.start	= CUSTOM_PHYSADDR+0x30,
++		.end	= CUSTOM_PHYSADDR+0x33,
++		.flags	= IORESOURCE_MEM,
++	}
++};
++
+ static struct platform_device amiga_serial = {
+-	.name =	"amiga-serial",
+-	.id	= -1,
++	.name		= "amiga-serial",
++	.id		= -1,
++	.num_resources	= ARRAY_SIZE(amiga_serial_resources),
++	.resource	= amiga_serial_resources,
+ };
+ 
+ static int __init amiga_init_devices(void)

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/atafb-cfb16.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/atafb-cfb16.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,48 @@
+---
+ drivers/video/atafb.c |   21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+
+--- a/drivers/video/atafb.c
++++ b/drivers/video/atafb.c
+@@ -2549,6 +2549,13 @@ static void atafb_fillrect(struct fb_inf
+ 	if (!rect->width || !rect->height)
+ 		return;
+ 
++#ifdef ATAFB_FALCON
++	if (info->var.bits_per_pixel == 16) {
++		cfb_fillrect(info, rect);
++		return;
++	}
++#endif
++
+ 	/*
+ 	 * We could use hardware clipping but on many cards you get around
+ 	 * hardware clipping by writing to framebuffer directly.
+@@ -2583,6 +2590,13 @@ static void atafb_copyarea(struct fb_inf
+ 	u32 dx, dy, sx, sy, width, height;
+ 	int rev_copy = 0;
+ 
++#ifdef ATAFB_FALCON
++	if (info->var.bits_per_pixel == 16) {
++		cfb_copyarea(info, area);
++		return;
++	}
++#endif
++
+ 	/* clip the destination */
+ 	x2 = area->dx + area->width;
+ 	y2 = area->dy + area->height;
+@@ -2629,6 +2643,13 @@ static void atafb_imageblit(struct fb_in
+ 	const char *src;
+ 	u32 dx, dy, width, height, pitch;
+ 
++#ifdef ATAFB_FALCON
++	if (info->var.bits_per_pixel == 16) {
++		cfb_imageblit(info, image);
++		return;
++	}
++#endif
++
+ 	/*
+ 	 * We could use hardware clipping but on many cards you get around
+ 	 * hardware clipping by writing to framebuffer directly like we are

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/atafb-line_length.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/atafb-line_length.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,69 @@
+---
+ drivers/video/atafb.c |   13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+--- a/drivers/video/atafb.c
++++ b/drivers/video/atafb.c
+@@ -614,7 +614,7 @@ static int tt_encode_fix(struct fb_fix_s
+ 	fix->xpanstep = 0;
+ 	fix->ypanstep = 1;
+ 	fix->ywrapstep = 0;
+-	fix->line_length = 0;
++	fix->line_length = par->next_line;
+ 	fix->accel = FB_ACCEL_ATARIBLITT;
+ 	return 0;
+ }
+@@ -917,8 +917,10 @@ static int falcon_encode_fix(struct fb_f
+ 		/* Is this ok or should it be DIRECTCOLOR? */
+ 		fix->visual = FB_VISUAL_TRUECOLOR;
+ 		fix->xpanstep = 2;
++		/* FIXME: cfb driver needs line_length */
++		fix->line_length = (par->hw.falcon.line_width + par->hw.falcon.line_offset) * par->hw.falcon.bpp / 8;
++		printk(KERN_INFO "atafb: falcon_encode_fix -- line_length = %d\n", fix->line_length);
+ 	}
+-	fix->line_length = 0;
+ 	fix->accel = FB_ACCEL_ATARIBLITT;
+ 	return 0;
+ }
+@@ -1852,7 +1854,7 @@ static int stste_encode_fix(struct fb_fi
+ 		fix->ypanstep = 0;
+ 	}
+ 	fix->ywrapstep = 0;
+-	fix->line_length = 0;
++	fix->line_length = par->next_line;
+ 	fix->accel = FB_ACCEL_ATARIBLITT;
+ 	return 0;
+ }
+@@ -2169,7 +2171,7 @@ static int ext_encode_fix(struct fb_fix_
+ 	fix->xpanstep = 0;
+ 	fix->ypanstep = 0;
+ 	fix->ywrapstep = 0;
+-	fix->line_length = 0;
++	fix->line_length = par->next_line;
+ 	return 0;
+ }
+ 
+@@ -2551,6 +2553,7 @@ static void atafb_fillrect(struct fb_inf
+ 
+ #ifdef ATAFB_FALCON
+ 	if (info->var.bits_per_pixel == 16) {
++printk("fix->line_length = %u, cfb_fillrect\n", info->fix.line_length);
+ 		cfb_fillrect(info, rect);
+ 		return;
+ 	}
+@@ -2592,6 +2595,7 @@ static void atafb_copyarea(struct fb_inf
+ 
+ #ifdef ATAFB_FALCON
+ 	if (info->var.bits_per_pixel == 16) {
++printk("fix->line_length = %u, cfb_copyarea\n", info->fix.line_length);
+ 		cfb_copyarea(info, area);
+ 		return;
+ 	}
+@@ -2645,6 +2649,7 @@ static void atafb_imageblit(struct fb_in
+ 
+ #ifdef ATAFB_FALCON
+ 	if (info->var.bits_per_pixel == 16) {
++printk("fix->line_length = %u, cfb_imageblit\n", info->fix.line_length);
+ 		cfb_imageblit(info, image);
+ 		return;
+ 	}

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/atari-aranym.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/atari-aranym.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,534 @@
+Subject: [PATCH] m68k: Atari ARAnyM support
+
+From: Michael Schmitz <schmitz at opal.biophys.uni-duesseldorf.de>
+
+This isn't really my kettle of fish, but I post it anyway unless Petr
+complains :-)
+
+This is what makes it possible for me to test 2.6 builds on the
+emulator...
+
+Should be signed off by Petr, really.
+
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ arch/m68k/Kconfig          |   15 ++
+ arch/m68k/Makefile         |    1 
+ arch/m68k/emu/Makefile     |    7 +
+ arch/m68k/emu/natfeat.c    |  113 +++++++++++++++++
+ arch/m68k/emu/nfeth.c      |  284 +++++++++++++++++++++++++++++++++++++++++++++
+ arch/m68k/kernel/setup.c   |    5 
+ drivers/net/Kconfig        |    8 +
+ include/asm-m68k/natfeat.h |   22 +++
+ 8 files changed, 455 insertions(+)
+
+--- a/arch/m68k/Kconfig
++++ b/arch/m68k/Kconfig
+@@ -270,6 +270,21 @@ config Q40
+ 	  Q60. Select your CPU below.  For 68LC060 don't forget to enable FPU
+ 	  emulation.
+ 
++config NATFEAT
++	bool "ARAnyM emulator support"
++	depends on ATARI
++	help
++	  This option enables support for ARAnyM native features, such as
++	  access to a disk image as /dev/hda. Useful with the ARANYM option.
++
++config NFETH
++	tristate "NatFeat Ethernet support"
++	depends on NET_ETHERNET && NATFEAT
++	help
++	  Say Y to include support for the ARAnyM NatFeat network device
++	  which will emulate a regular ethernet device while presenting an
++	  ethertap device to the host system.
++
+ comment "Processor type"
+ 
+ config M68020
+--- a/arch/m68k/Makefile
++++ b/arch/m68k/Makefile
+@@ -76,6 +76,7 @@ core-$(CONFIG_MVME16x)		+= arch/m68k/mvm
+ core-$(CONFIG_BVME6000)		+= arch/m68k/bvme6000/
+ core-$(CONFIG_SUN3X)		+= arch/m68k/sun3x/	arch/m68k/sun3/
+ core-$(CONFIG_SUN3)		+= arch/m68k/sun3/	arch/m68k/sun3/prom/
++core-$(CONFIG_NATFEAT)		+= arch/m68k/emu/
+ core-$(CONFIG_M68040)		+= arch/m68k/fpsp040/
+ core-$(CONFIG_M68060)		+= arch/m68k/ifpsp060/
+ core-$(CONFIG_M68KFPU_EMU)	+= arch/m68k/math-emu/
+--- /dev/null
++++ b/arch/m68k/emu/Makefile
+@@ -0,0 +1,7 @@
++#
++# Makefile for Linux arch/m68k/emu source directory
++#
++
++obj-y			+= natfeat.o
++
++obj-$(CONFIG_NFETH)	+= nfeth.o
+--- /dev/null
++++ b/arch/m68k/emu/natfeat.c
+@@ -0,0 +1,113 @@
++/*
++ * natfeat.c - ARAnyM hardware support via Native Features (natfeats)
++ *
++ * Copyright (c) 2005 Petr Stehlik of ARAnyM dev team
++ *
++ * Reworked for Linux by Roman Zippel <zippel at linux-m68k.org>
++ *
++ * This software may be used and distributed according to the terms of
++ * the GNU General Public License (GPL), incorporated herein by reference.
++ */
++
++#include <linux/types.h>
++#include <linux/console.h>
++#include <linux/string.h>
++#include <linux/kernel.h>
++#include <linux/io.h>
++#include <asm/machdep.h>
++#include <asm/natfeat.h>
++
++asm("\n"
++"	.global nf_get_id,nf_call\n"
++"nf_get_id:\n"
++"	.short	0x7300\n"
++"	rts\n"
++"nf_call:\n"
++"	.short	0x7301\n"
++"	rts\n"
++"1:	moveq.l	#0,%d0\n"
++"	rts\n"
++"	.section __ex_table,\"a\"\n"
++"	.long	nf_get_id,1b\n"
++"	.long	nf_call,1b\n"
++"	.previous");
++
++static int stderr_id;
++
++static void nf_write(struct console *co, const char *str, unsigned int count)
++{
++	char buf[68];
++
++	buf[64] = 0;
++	while (count > 64) {
++		memcpy(buf, str, 64);
++		nf_call(stderr_id, buf);
++		str += 64;
++		count -= 64;
++	}
++	memcpy(buf, str, count);
++	buf[count] = 0;
++	nf_call(stderr_id, buf);
++}
++
++void nfprint(const char *fmt, ...)
++{
++	static char buf[256];
++	va_list ap;
++	int n;
++
++	va_start(ap, fmt);
++	n = vsnprintf(buf, 256, fmt, ap);
++	nf_call(nf_get_id("NF_STDERR"), buf);
++	va_end(ap);
++}
++
++static struct console nf_console_driver = {
++	.name	= "debug",
++	.write	= nf_write,
++	.flags	= CON_PRINTBUFFER,
++	.index	= -1,
++};
++
++static int __init nf_debug_setup(char *arg)
++{
++	if (strcmp(arg, "emu"))
++		return 0;
++
++	stderr_id = nf_get_id("NF_STDERR");
++	if (stderr_id)
++		register_console(&nf_console_driver);
++	return 0;
++}
++
++early_param("debug", nf_debug_setup);
++
++static void nf_poweroff(void)
++{
++	long id = nf_get_id("NF_SHUTDOWN");
++
++	if (id)
++		nf_call(id);
++}
++
++void nf_init(void)
++{
++	unsigned long id, version;
++	char buf[256];
++
++	id = nf_get_id("NF_VERSION");
++	if (!id)
++		return;
++	version = nf_call(id);
++
++	id = nf_get_id("NF_NAME");
++	if (!id)
++		return;
++	nf_call(id, buf, 256);
++	buf[255] = 0;
++
++	pr_info("NatFeats found (%s, %lu.%lu)\n", buf, version >> 16,
++		version & 0xffff);
++
++	mach_power_off = nf_poweroff;
++}
+--- /dev/null
++++ b/arch/m68k/emu/nfeth.c
+@@ -0,0 +1,284 @@
++/*
++ * atari_nfeth.c - ARAnyM ethernet card driver for GNU/Linux
++ *
++ * Copyright (c) 2005 Milan Jurik, Petr Stehlik of ARAnyM dev team
++ *
++ * Based on ARAnyM driver for FreeMiNT written by Standa Opichal
++ *
++ * This software may be used and distributed according to the terms of
++ * the GNU General Public License (GPL), incorporated herein by reference.
++ */
++
++#include <linux/netdevice.h>
++#include <linux/etherdevice.h>
++#include <linux/module.h>
++#include <net/ieee80211.h>
++#include <asm/natfeat.h>
++#include <asm/virtconvert.h>
++
++enum {
++	GET_VERSION = 0,	/* no parameters, return NFAPI_VERSION in d0 */
++	XIF_INTLEVEL,		/* no parameters, return Interrupt Level in d0 */
++	XIF_IRQ,		/* acknowledge interrupt from host */
++	XIF_START,		/* (ethX), called on 'ifup', start receiver thread */
++	XIF_STOP,		/* (ethX), called on 'ifdown', stop the thread */
++	XIF_READLENGTH,		/* (ethX), return size of network data block to read */
++	XIF_READBLOCK,		/* (ethX, buffer, size), read block of network data */
++	XIF_WRITEBLOCK,		/* (ethX, buffer, size), write block of network data */
++	XIF_GET_MAC,		/* (ethX, buffer, size), return MAC HW addr in buffer */
++	XIF_GET_IPHOST,		/* (ethX, buffer, size), return IP address of host */
++	XIF_GET_IPATARI,	/* (ethX, buffer, size), return IP address of atari */
++	XIF_GET_NETMASK		/* (ethX, buffer, size), return IP netmask */
++};
++
++#define DRV_NAME	"nfeth"
++#define DRV_VERSION	"0.3"
++#define DRV_RELDATE	"10/12/2005"
++
++#define MAX_UNIT	8
++
++/* These identify the driver base version and may not be removed. */
++static char version[] __devinitdata =
++KERN_INFO DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " S.Opichal, M.Jurik, P.Stehlik\n"
++KERN_INFO "  http://aranym.atari.org/\n";
++
++MODULE_AUTHOR("Milan Jurik");
++MODULE_DESCRIPTION("Atari NFeth driver");
++MODULE_LICENSE("GPL");
++/*
++MODULE_PARM(nfeth_debug, "i");
++MODULE_PARM_DESC(nfeth_debug, "nfeth_debug level (1-2)");
++*/
++
++
++static long nfEtherID;
++static int nfEtherIRQ;
++
++struct nfeth_private {
++	int ethX;
++	struct net_device_stats	stats;
++};
++
++static struct net_device *nfeth_dev[MAX_UNIT];
++
++int nfeth_open(struct net_device *dev);
++int nfeth_stop(struct net_device *dev);
++irqreturn_t nfeth_interrupt(int irq, void *dev_id);
++int nfeth_xmit(struct sk_buff *skb, struct net_device *dev);
++
++int nfeth_open(struct net_device *dev)
++{
++	struct nfeth_private *priv = netdev_priv(dev);
++	int res;
++
++	res = nf_call(nfEtherID + XIF_START, priv->ethX);
++
++	/* Clean statistics */
++	memset(&priv->stats, 0, sizeof(struct net_device_stats));
++
++	pr_debug(DRV_NAME ": open %d\n", res);
++
++	/* Ready for data */
++	netif_start_queue(dev);
++
++	return 0;
++}
++
++int nfeth_stop(struct net_device *dev)
++{
++	struct nfeth_private *priv = netdev_priv(dev);
++
++	/* No more data */
++	netif_stop_queue(dev);
++
++	nf_call(nfEtherID + XIF_STOP, priv->ethX);
++
++	return 0;
++}
++
++/*
++ * Read a packet out of the adapter and pass it to the upper layers
++ */
++static inline void recv_packet(struct net_device *dev)
++{
++	struct nfeth_private *priv = netdev_priv(dev);
++	int handled = 0;
++	unsigned short pktlen;
++	struct sk_buff *skb;
++
++	/* read packet length (excluding 32 bit crc) */
++	pktlen = nf_call(nfEtherID + XIF_READLENGTH, priv->ethX);
++
++	pr_debug(DRV_NAME ": recv_packet: %i\n", pktlen);
++
++	if (!pktlen) {
++		pr_debug(DRV_NAME ": recv_packet: pktlen == 0\n");
++		priv->stats.rx_errors++;
++		return;
++	}
++
++	skb = dev_alloc_skb(pktlen + 2);
++	if (!skb) {
++		pr_debug(DRV_NAME
++			 ": recv_packet: out of mem (buf_alloc failed)\n");
++		priv->stats.rx_dropped++;
++		return;
++	}
++
++	skb->dev = dev;
++	skb_reserve(skb, 2);		/* 16 Byte align  */
++	skb_put(skb, pktlen);		/* make room */
++	nf_call(nfEtherID + XIF_READBLOCK, priv->ethX, virt_to_phys(skb->data),
++		pktlen);
++
++	skb->protocol = eth_type_trans(skb, dev);
++	netif_rx(skb);
++	dev->last_rx = jiffies;
++	priv->stats.rx_packets++;
++	priv->stats.rx_bytes += pktlen;
++
++	/* and enqueue packet */
++	handled = 1;
++	return;
++}
++
++irqreturn_t nfeth_interrupt(int irq, void *dev_id)
++{
++	int i, m, mask;
++
++	mask = nf_call(nfEtherID + XIF_IRQ, 0);
++	for (i = 0, m = 1; i < MAX_UNIT; m <<= 1, i++) {
++		if (mask & m && nfeth_dev[i]) {
++			recv_packet(nfeth_dev[i]);
++			nf_call(nfEtherID + XIF_IRQ, m);
++		}
++	}
++	return IRQ_HANDLED;
++}
++
++int nfeth_xmit(struct sk_buff *skb, struct net_device *dev)
++{
++	int len;
++	char *data, shortpkt[ETH_ZLEN];
++	struct nfeth_private *priv = netdev_priv(dev);
++
++	data = skb->data;
++	len = skb->len;
++	if (len < ETH_ZLEN) {
++		memset(shortpkt, 0, ETH_ZLEN);
++		memcpy(shortpkt, data, len);
++		data = shortpkt;
++		len = ETH_ZLEN;
++	}
++
++	dev->trans_start = jiffies;
++
++	pr_debug(DRV_NAME ": send %d bytes\n", len);
++	nf_call(nfEtherID + XIF_WRITEBLOCK, priv->ethX, virt_to_phys(data),
++		len);
++
++	priv->stats.tx_packets++;
++	priv->stats.tx_bytes += len;
++
++	dev_kfree_skb(skb);
++	return 0;
++}
++
++static void nfeth_tx_timeout(struct net_device *dev)
++{
++	struct nfeth_private *priv = netdev_priv(dev);
++	priv->stats.tx_errors++;
++	netif_wake_queue(dev);
++}
++
++static struct net_device_stats *nfeth_get_stats(struct net_device *dev)
++{
++	struct nfeth_private *priv = netdev_priv(dev);
++	return &priv->stats;
++}
++
++struct net_device * __init nfeth_probe(int unit)
++{
++	struct net_device *dev;
++	struct nfeth_private *priv;
++	char mac[ETH_ALEN], host_ip[32], local_ip[32];
++	DECLARE_MAC_BUF(macfmt);
++	int err;
++
++	if (!nf_call(nfEtherID + XIF_GET_MAC, unit, mac, ETH_ALEN))
++		return NULL;
++
++	dev = alloc_etherdev(sizeof(struct nfeth_private));
++	if (!dev)
++		return NULL;
++
++	dev->irq = nfEtherIRQ;
++	dev->open = nfeth_open;
++	dev->stop = nfeth_stop;
++	dev->hard_start_xmit = nfeth_xmit;
++	dev->tx_timeout = nfeth_tx_timeout;
++	dev->get_stats = nfeth_get_stats;
++	dev->flags |= NETIF_F_NO_CSUM;
++	memcpy(dev->dev_addr, mac, ETH_ALEN);
++
++	priv = netdev_priv(dev);
++	priv->ethX = unit;
++
++	err = register_netdev(dev);
++	if (err) {
++		free_netdev(dev);
++		return NULL;
++	}
++
++	nf_call(nfEtherID + XIF_GET_IPHOST, unit,
++		host_ip, sizeof(host_ip));
++	nf_call(nfEtherID + XIF_GET_IPATARI, unit,
++		local_ip, sizeof(local_ip));
++
++	pr_info("%s: nfeth addr:%s (%s) HWaddr:%s\n", dev->name, host_ip,
++		local_ip, print_mac(macfmt, mac));
++
++	return dev;
++}
++
++int __init nfeth_init(void)
++{
++	long ver;
++	int i;
++
++	nfEtherID = nf_get_id("ETHERNET");
++	if (!nfEtherID)
++		return -ENODEV;
++
++	ver = nf_call(nfEtherID + GET_VERSION);
++	pr_info("nfeth API %lu\n", ver);
++
++	nfEtherIRQ = nf_call(nfEtherID + XIF_INTLEVEL);
++	if (request_irq(nfEtherIRQ, nfeth_interrupt, IRQF_SHARED,
++			"eth emu", nfeth_interrupt)) {
++		printk(KERN_ERR "nfeth: request for irq %d failed",
++		       nfEtherIRQ);
++		return -ENODEV;
++	}
++
++	for (i = 0; i < MAX_UNIT; i++)
++		nfeth_dev[i] = nfeth_probe(i);
++
++	return 0;
++}
++
++void __exit nfeth_cleanup(void)
++{
++	int i;
++
++	for (i = 0; i < MAX_UNIT; i++) {
++		if (nfeth_dev[i]) {
++			unregister_netdev(nfeth_dev[0]);
++			free_netdev(nfeth_dev[0]);
++		}
++	}
++	free_irq(nfEtherIRQ, nfeth_interrupt);
++}
++
++module_init(nfeth_init);
++module_exit(nfeth_cleanup);
+--- a/arch/m68k/kernel/setup.c
++++ b/arch/m68k/kernel/setup.c
+@@ -39,6 +39,7 @@
+ #ifdef CONFIG_SUN3X
+ #include <asm/dvma.h>
+ #endif
++#include <asm/natfeat.h>
+ 
+ unsigned long m68k_machtype;
+ unsigned long m68k_cputype;
+@@ -314,6 +315,10 @@ void __init setup_arch(char **cmdline_p)
+ 		panic("No configuration setup");
+ 	}
+ 
++#ifdef CONFIG_NATFEAT
++	nf_init();
++#endif
++
+ 	paging_init();
+ 
+ #ifndef CONFIG_SUN3
+--- a/drivers/net/Kconfig
++++ b/drivers/net/Kconfig
+@@ -423,6 +423,14 @@ config ATARILANCE
+ 	  on the AMD Lance chipset: RieblCard (with or without battery), or
+ 	  PAMCard VME (also the version by Rhotron, with different addresses).
+ 
++config ATARI_ETHERNEC
++	tristate "Atari EtherNEC Ethernet support"
++	depends on NET_ETHERNET && ATARI && ATARI_ROM_ISA
++	help
++	  Say Y to include support for the EtherNEC network adapter for the
++	  ROM port. The driver works by polling instead of interrupts, so it
++	  is quite slow.
++
+ config SUN3LANCE
+ 	tristate "Sun3/Sun3x on-board LANCE support"
+ 	depends on SUN3 || SUN3X
+--- /dev/null
++++ b/include/asm-m68k/natfeat.h
+@@ -0,0 +1,22 @@
++/*
++ * ARAnyM hardware support via Native Features (natfeats)
++ *
++ * Copyright (c) 2005 Petr Stehlik of ARAnyM dev team
++ *
++ * This software may be used and distributed according to the terms of
++ * the GNU General Public License (GPL), incorporated herein by reference.
++ */
++
++#ifndef _NATFEAT_H
++#define _NATFEAT_H
++
++long nf_get_id(const char *feature_name);
++long nf_call(long id, ...);
++
++void nf_init(void);
++void nf_shutdown(void);
++
++void nfprint(const char *fmt, ...)
++	__attribute__ ((format (printf, 1, 2)));
++
++# endif /* _NATFEAT_H */

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/atari-ethernat-updates.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/atari-ethernat-updates.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,623 @@
+
+FIXME marked it broken for now, until the remaining issues are fixed.
+
+---
+ drivers/net/Kconfig        |    2 
+ drivers/net/atari_91C111.c |  208 ++++++++++++++++++++++-----------------------
+ 2 files changed, 105 insertions(+), 105 deletions(-)
+
+--- a/drivers/net/Kconfig
++++ b/drivers/net/Kconfig
+@@ -435,7 +435,7 @@ config ATARI_ETHERNAT
+ 	tristate "Atari EtherNAT Ethernet support"
+ 	select CRC32
+ 	select MII
+-	depends on NET_ETHERNET && ATARI
++	depends on NET_ETHERNET && ATARI && BROKEN
+ 	help
+ 	  Say Y to include support for the EtherNAT network adapter for the
+ 	  CT/60 extension port. The driver works by polling instead of
+--- a/drivers/net/atari_91C111.c
++++ b/drivers/net/atari_91C111.c
+@@ -231,7 +231,7 @@ static void PRINT_PKT(u_char *buf, int l
+ 	spin_lock_irq(&lp->lock);					\
+ 	mask = SMC_GET_INT_MASK();					\
+ 	mask |= (x);							\
+-	SMC_SET_INT_MASK(mask);						\
++	SMC_SET_INT_MASK(lp, mask);					\
+ 	spin_unlock_irq(&lp->lock);					\
+ } while (0)
+ 
+@@ -241,7 +241,7 @@ static void PRINT_PKT(u_char *buf, int l
+ 	spin_lock_irq(&lp->lock);					\
+ 	mask = SMC_GET_INT_MASK();					\
+ 	mask &= ~(x);							\
+-	SMC_SET_INT_MASK(mask);						\
++	SMC_SET_INT_MASK(lp, mask);					\
+ 	spin_unlock_irq(&lp->lock);					\
+ } while (0)
+ 
+@@ -345,8 +345,8 @@ static void smc_reset(struct net_device 
+ 
+ 	/* Disable all interrupts, block TX tasklet */
+ 	spin_lock_irq(&lp->lock);
+-	SMC_SELECT_BANK(2);
+-	SMC_SET_INT_MASK(0);
++	SMC_SELECT_BANK(lp, 2);
++	SMC_SET_INT_MASK(lp, 0);
+ 	pending_skb = lp->pending_tx_skb;
+ 	lp->pending_tx_skb = NULL;
+ 	spin_unlock_irq(&lp->lock);
+@@ -362,15 +362,15 @@ static void smc_reset(struct net_device 
+ 	 * This resets the registers mostly to defaults, but doesn't
+ 	 * affect EEPROM.  That seems unnecessary
+ 	 */
+-	SMC_SELECT_BANK(0);
+-	SMC_SET_RCR(RCR_SOFTRST);
++	SMC_SELECT_BANK(lp, 0);
++	SMC_SET_RCR(lp, RCR_SOFTRST);
+ 
+ 	/*
+ 	 * Setup the Configuration Register
+ 	 * This is necessary because the CONFIG_REG is not affected
+ 	 * by a soft reset
+ 	 */
+-	SMC_SELECT_BANK(1);
++	SMC_SELECT_BANK(lp, 1);
+ 
+ 	cfg = CONFIG_DEFAULT;
+ 
+@@ -388,7 +388,7 @@ static void smc_reset(struct net_device 
+ 	 */
+ 	cfg |= CONFIG_EPH_POWER_EN;
+ 
+-	SMC_SET_CONFIG(cfg);
++	SMC_SET_CONFIG(lp, cfg);
+ 
+ 	/* this should pause enough for the chip to be happy */
+ 	/*
+@@ -401,11 +401,11 @@ static void smc_reset(struct net_device 
+ 	udelay(1);
+ 
+ 	/* Disable transmit and receive functionality */
+-	SMC_SELECT_BANK(0);
+-	SMC_SET_RCR(RCR_CLEAR);
+-	SMC_SET_TCR(TCR_CLEAR);
++	SMC_SELECT_BANK(lp, 0);
++	SMC_SET_RCR(lp, RCR_CLEAR);
++	SMC_SET_TCR(lp, TCR_CLEAR);
+ 
+-	SMC_SELECT_BANK(1);
++	SMC_SELECT_BANK(lp, 1);
+ 	ctl = SMC_GET_CTL() | CTL_LE_ENABLE;
+ 
+ 	/*
+@@ -417,11 +417,11 @@ static void smc_reset(struct net_device 
+ 		ctl |= CTL_AUTO_RELEASE;
+ 	else
+ 		ctl &= ~CTL_AUTO_RELEASE;
+-	SMC_SET_CTL(ctl);
++	SMC_SET_CTL(lp, ctl);
+ 
+ 	/* Reset the MMU */
+-	SMC_SELECT_BANK(2);
+-	SMC_SET_MMU_CMD(MC_RESET);
++	SMC_SELECT_BANK(lp, 2);
++	SMC_SET_MMU_CMD(lp, MC_RESET);
+ 	SMC_WAIT_MMU_BUSY();
+ }
+ 
+@@ -437,19 +437,19 @@ static void smc_enable(struct net_device
+ 	DBG(2, "%s: %s\n", dev->name, __FUNCTION__);
+ 
+ 	/* see the header file for options in TCR/RCR DEFAULT */
+-	SMC_SELECT_BANK(0);
+-	SMC_SET_TCR(lp->tcr_cur_mode);
+-	SMC_SET_RCR(lp->rcr_cur_mode);
++	SMC_SELECT_BANK(lp, 0);
++	SMC_SET_TCR(lp, lp->tcr_cur_mode);
++	SMC_SET_RCR(lp, lp->rcr_cur_mode);
+ 
+-	SMC_SELECT_BANK(1);
+-	SMC_SET_MAC_ADDR(dev->dev_addr);
++	SMC_SELECT_BANK(lp, 1);
++	SMC_SET_MAC_ADDR(lp, dev->dev_addr);
+ 
+ 	/* now, enable interrupts */
+ 	mask = IM_EPH_INT|IM_RX_OVRN_INT|IM_RCV_INT;
+ 	if (lp->version >= (CHIP_91100 << 4))
+ 		mask |= IM_MDINT;
+-	SMC_SELECT_BANK(2);
+-	SMC_SET_INT_MASK(mask);
++	SMC_SELECT_BANK(lp, 2);
++	SMC_SET_INT_MASK(lp, mask);
+ 
+ 	/*
+ 	 * From this point the register bank must _NOT_ be switched away
+@@ -472,8 +472,8 @@ static void smc_shutdown(struct net_devi
+ 
+ 	/* no more interrupts for me */
+ 	spin_lock_irq(&lp->lock);
+-	SMC_SELECT_BANK(2);
+-	SMC_SET_INT_MASK(0);
++	SMC_SELECT_BANK(lp, 2);
++	SMC_SET_INT_MASK(lp, 0);
+ 	pending_skb = lp->pending_tx_skb;
+ 	lp->pending_tx_skb = NULL;
+ 	spin_unlock_irq(&lp->lock);
+@@ -481,14 +481,14 @@ static void smc_shutdown(struct net_devi
+ 		dev_kfree_skb(pending_skb);
+ 
+ 	/* and tell the card to stay away from that nasty outside world */
+-	SMC_SELECT_BANK(0);
+-	SMC_SET_RCR(RCR_CLEAR);
+-	SMC_SET_TCR(TCR_CLEAR);
++	SMC_SELECT_BANK(lp, 0);
++	SMC_SET_RCR(lp, RCR_CLEAR);
++	SMC_SET_TCR(lp, TCR_CLEAR);
+ 
+ #ifdef POWER_DOWN
+ 	/* finally, shut the chip down */
+-	SMC_SELECT_BANK(1);
+-	SMC_SET_CONFIG(SMC_GET_CONFIG() & ~CONFIG_EPH_POWER_EN);
++	SMC_SELECT_BANK(lp, 1);
++	SMC_SET_CONFIG(lp, SMC_GET_CONFIG() & ~CONFIG_EPH_POWER_EN);
+ #endif
+ }
+ 
+@@ -510,10 +510,10 @@ static inline void  smc_rcv(struct net_d
+ 	}
+ 
+ 	/* read from start of packet */
+-	SMC_SET_PTR(PTR_READ | PTR_RCV | PTR_AUTOINC);
++	SMC_SET_PTR(lp, PTR_READ | PTR_RCV | PTR_AUTOINC);
+ 
+ 	/* First two words are status and packet length */
+-	SMC_GET_PKT_HDR(status, packet_len);
++	SMC_GET_PKT_HDR(lp, status, packet_len);
+ 	packet_len &= 0x07ff;  /* mask off top bits */
+ 	DBG(2, "%s: RX PNR 0x%x STATUS 0x%04x LENGTH 0x%04x (%d)\n",
+ 		dev->name, packet_number, status,
+@@ -533,7 +533,7 @@ static inline void  smc_rcv(struct net_d
+ 			status |= RS_TOOSHORT;
+ 		}
+ 		SMC_WAIT_MMU_BUSY();
+-		SMC_SET_MMU_CMD(MC_RELEASE);
++		SMC_SET_MMU_CMD(lp, MC_RELEASE);
+ 		dev->stats.rx_errors++;
+ 		if (status & RS_ALGNERR)
+ 			dev->stats.rx_frame_errors++;
+@@ -563,7 +563,7 @@ static inline void  smc_rcv(struct net_d
+ 			printk(KERN_NOTICE "%s: Low memory, packet dropped.\n",
+ 				dev->name);
+ 			SMC_WAIT_MMU_BUSY();
+-			SMC_SET_MMU_CMD(MC_RELEASE);
++			SMC_SET_MMU_CMD(lp, MC_RELEASE);
+ 			dev->stats.rx_dropped++;
+ 			return;
+ 		}
+@@ -582,10 +582,10 @@ static inline void  smc_rcv(struct net_d
+ 		 */
+ 		data_len = packet_len - ((status & RS_ODDFRAME) ? 5 : 6);
+ 		data = skb_put(skb, data_len);
+-		SMC_PULL_DATA(data, packet_len - 4);
++		SMC_PULL_DATA(lp, data, packet_len - 4);
+ 
+ 		SMC_WAIT_MMU_BUSY();
+-		SMC_SET_MMU_CMD(MC_RELEASE);
++		SMC_SET_MMU_CMD(lp, MC_RELEASE);
+ 
+ 		PRINT_PKT(data, packet_len - 4);
+ 
+@@ -673,8 +673,8 @@ static void smc_hardware_send_pkt(unsign
+ 	}
+ 
+ 	/* point to the beginning of the packet */
+-	SMC_SET_PN(packet_no);
+-	SMC_SET_PTR(PTR_AUTOINC);
++	SMC_SET_PN(lp, packet_no);
++	SMC_SET_PTR(lp, PTR_AUTOINC);
+ 
+ 	buf = skb->data;
+ 	len = skb->len;
+@@ -686,10 +686,10 @@ static void smc_hardware_send_pkt(unsign
+ 	 * Send the packet length (+6 for status words, length, and ctl.
+ 	 * The card will pad to 64 bytes with zeroes if packet is too small.
+ 	 */
+-	SMC_PUT_PKT_HDR(0, len + 6);
++	SMC_PUT_PKT_HDR(lp, 0, len + 6);
+ 
+ 	/* send the actual data */
+-	SMC_PUSH_DATA(buf, len & ~1);
++	SMC_PUSH_DATA(lp, buf, len & ~1);
+ 
+ 	/* Send final ctl word with the last byte if there is one */
+ 	SMC_outw(((len & 1) ? (0x2000 | buf[len-1]) : 0), ioaddr, DATA_REG);
+@@ -706,7 +706,7 @@ static void smc_hardware_send_pkt(unsign
+ 		netif_stop_queue(dev);
+ 
+ 	/* queue the packet for TX */
+-	SMC_SET_MMU_CMD(MC_ENQUEUE);
++	SMC_SET_MMU_CMD(lp, MC_ENQUEUE);
+ 	smc_special_unlock(&lp->lock);
+ 
+ 	dev->trans_start = jiffies;
+@@ -760,7 +760,7 @@ static int smc_hard_start_xmit(struct sk
+ 	smc_special_lock(&lp->lock);
+ 
+ 	/* now, try to allocate the memory */
+-	SMC_SET_MMU_CMD(MC_ALLOC | numPages);
++	SMC_SET_MMU_CMD(lp, MC_ALLOC | numPages);
+ 
+ 	/*
+ 	 * Poll the chip for a short amount of time in case the
+@@ -770,7 +770,7 @@ static int smc_hard_start_xmit(struct sk
+ 	do {
+ 		status = SMC_GET_INT();
+ 		if (status & IM_ALLOC_INT) {
+-			SMC_ACK_INT(IM_ALLOC_INT);
++			SMC_ACK_INT(lp, IM_ALLOC_INT);
+   			break;
+ 		}
+    	} while (--poll_count);
+@@ -816,11 +816,11 @@ static void smc_tx(struct net_device *de
+ 
+ 	/* select packet to read from */
+ 	saved_packet = SMC_GET_PN();
+-	SMC_SET_PN(packet_no);
++	SMC_SET_PN(lp, packet_no);
+ 
+ 	/* read the first word (status word) from this packet */
+-	SMC_SET_PTR(PTR_AUTOINC | PTR_READ);
+-	SMC_GET_PKT_HDR(tx_status, pkt_len);
++	SMC_SET_PTR(lp, PTR_AUTOINC | PTR_READ);
++	SMC_GET_PKT_HDR(lp, tx_status, pkt_len);
+ 	DBG(2, "%s: TX STATUS 0x%04x PNR 0x%02x\n",
+ 		dev->name, tx_status, packet_no);
+ 
+@@ -844,16 +844,16 @@ static void smc_tx(struct net_device *de
+ 
+ 	/* kill the packet */
+ 	SMC_WAIT_MMU_BUSY();
+-	SMC_SET_MMU_CMD(MC_FREEPKT);
++	SMC_SET_MMU_CMD(lp, MC_FREEPKT);
+ 
+ 	/* Don't restore Packet Number Reg until busy bit is cleared */
+ 	SMC_WAIT_MMU_BUSY();
+-	SMC_SET_PN(saved_packet);
++	SMC_SET_PN(lp, saved_packet);
+ 
+ 	/* re-enable transmit */
+-	SMC_SELECT_BANK(0);
+-	SMC_SET_TCR(lp->tcr_cur_mode);
+-	SMC_SELECT_BANK(2);
++	SMC_SELECT_BANK(lp, 0);
++	SMC_SET_TCR(lp, lp->tcr_cur_mode);
++	SMC_SELECT_BANK(lp, 2);
+ }
+ 
+ 
+@@ -874,9 +874,9 @@ static void smc_mii_out(struct net_devic
+ 		else
+ 			mii_reg &= ~MII_MDO;
+ 
+-		SMC_SET_MII(mii_reg);
++		SMC_SET_MII(lp, mii_reg);
+ 		udelay(MII_DELAY);
+-		SMC_SET_MII(mii_reg | MII_MCLK);
++		SMC_SET_MII(lp, mii_reg | MII_MCLK);
+ 		udelay(MII_DELAY);
+ 	}
+ }
+@@ -888,15 +888,15 @@ static unsigned int smc_mii_in(struct ne
+ 	unsigned int mii_reg, mask, val;
+ 
+ 	mii_reg = SMC_GET_MII() & ~(MII_MCLK | MII_MDOE | MII_MDO);
+-	SMC_SET_MII(mii_reg);
++	SMC_SET_MII(lp, mii_reg);
+ 
+ 	for (mask = 1 << (bits - 1), val = 0; mask; mask >>= 1) {
+ 		if (SMC_GET_MII() & MII_MDI)
+ 			val |= mask;
+ 
+-		SMC_SET_MII(mii_reg);
++		SMC_SET_MII(lp, mii_reg);
+ 		udelay(MII_DELAY);
+-		SMC_SET_MII(mii_reg | MII_MCLK);
++		SMC_SET_MII(lp, mii_reg | MII_MCLK);
+ 		udelay(MII_DELAY);
+ 	}
+ 
+@@ -912,7 +912,7 @@ static int smc_phy_read(struct net_devic
+ 	void __iomem *ioaddr = lp->base;
+ 	unsigned int phydata;
+ 
+-	SMC_SELECT_BANK(3);
++	SMC_SELECT_BANK(lp, 3);
+ 
+ 	/* Idle - 32 ones */
+ 	smc_mii_out(dev, 0xffffffff, 32);
+@@ -924,12 +924,12 @@ static int smc_phy_read(struct net_devic
+ 	phydata = smc_mii_in(dev, 18);
+ 
+ 	/* Return to idle state */
+-	SMC_SET_MII(SMC_GET_MII() & ~(MII_MCLK|MII_MDOE|MII_MDO));
++	SMC_SET_MII(lp, SMC_GET_MII() & ~(MII_MCLK|MII_MDOE|MII_MDO));
+ 
+ 	DBG(3, "%s: phyaddr=0x%x, phyreg=0x%x, phydata=0x%x\n",
+ 		__FUNCTION__, phyaddr, phyreg, phydata);
+ 
+-	SMC_SELECT_BANK(2);
++	SMC_SELECT_BANK(lp, 2);
+ 	return phydata;
+ }
+ 
+@@ -942,7 +942,7 @@ static void smc_phy_write(struct net_dev
+ 	struct smc_local *lp = netdev_priv(dev);
+ 	void __iomem *ioaddr = lp->base;
+ 
+-	SMC_SELECT_BANK(3);
++	SMC_SELECT_BANK(lp, 3);
+ 
+ 	/* Idle - 32 ones */
+ 	smc_mii_out(dev, 0xffffffff, 32);
+@@ -951,12 +951,12 @@ static void smc_phy_write(struct net_dev
+ 	smc_mii_out(dev, 5 << 28 | phyaddr << 23 | phyreg << 18 | 2 << 16 | phydata, 32);
+ 
+ 	/* Return to idle state */
+-	SMC_SET_MII(SMC_GET_MII() & ~(MII_MCLK|MII_MDOE|MII_MDO));
++	SMC_SET_MII(lp, SMC_GET_MII() & ~(MII_MCLK|MII_MDOE|MII_MDO));
+ 
+ 	DBG(3, "%s: phyaddr=0x%x, phyreg=0x%x, phydata=0x%x\n",
+ 		__FUNCTION__, phyaddr, phyreg, phydata);
+ 
+-	SMC_SELECT_BANK(2);
++	SMC_SELECT_BANK(lp, 2);
+ }
+ 
+ /*
+@@ -1029,9 +1029,9 @@ static int smc_phy_fixed(struct net_devi
+ 	smc_phy_write(dev, phyaddr, MII_BMCR, bmcr);
+ 
+ 	/* Re-Configure the Receive/Phy Control register */
+-	SMC_SELECT_BANK(0);
+-	SMC_SET_RPC(lp->rpc_cur_mode);
+-	SMC_SELECT_BANK(2);
++	SMC_SELECT_BANK(lp, 0);
++	SMC_SET_RPC(lp, lp->rpc_cur_mode);
++	SMC_SELECT_BANK(lp, 2);
+ 
+ 	return 1;
+ }
+@@ -1122,8 +1122,8 @@ static void smc_phy_check_media(struct n
+ 			lp->tcr_cur_mode &= ~TCR_SWFDUP;
+ 		}
+ 
+-		SMC_SELECT_BANK(0);
+-		SMC_SET_TCR(lp->tcr_cur_mode);
++		SMC_SELECT_BANK(lp, 0);
++		SMC_SET_TCR(lp, lp->tcr_cur_mode);
+ 	}
+ }
+ 
+@@ -1172,8 +1172,8 @@ static void smc_phy_configure(struct wor
+ 		PHY_INT_SPDDET | PHY_INT_DPLXDET);
+ 
+ 	/* Configure the Receive/Phy Control register */
+-	SMC_SELECT_BANK(0);
+-	SMC_SET_RPC(lp->rpc_cur_mode);
++	SMC_SELECT_BANK(lp, 0);
++	SMC_SET_RPC(lp, lp->rpc_cur_mode);
+ 
+ 	/* If the user requested no auto neg, then go set his request */
+ 	if (lp->mii.force_media) {
+@@ -1230,7 +1230,7 @@ static void smc_phy_configure(struct wor
+ 	smc_phy_check_media(dev, 1);
+ 
+ smc_phy_configure_exit:
+-	SMC_SELECT_BANK(2);
++	SMC_SELECT_BANK(lp, 2);
+ 	spin_unlock_irq(&lp->lock);
+ 	lp->work_pending = 0;
+ }
+@@ -1272,9 +1272,9 @@ static void smc_10bt_check_media(struct 
+ 
+ 	old_carrier = netif_carrier_ok(dev) ? 1 : 0;
+ 
+-	SMC_SELECT_BANK(0);
++	SMC_SELECT_BANK(lp, 0);
+ 	new_carrier = (SMC_GET_EPH_STATUS() & ES_LINK_OK) ? 1 : 0;
+-	SMC_SELECT_BANK(2);
++	SMC_SELECT_BANK(lp, 2);
+ 
+ 	if (init || (old_carrier != new_carrier)) {
+ 		if (!new_carrier) {
+@@ -1296,11 +1296,11 @@ static void smc_eph_interrupt(struct net
+ 
+ 	smc_10bt_check_media(dev, 0);
+ 
+-	SMC_SELECT_BANK(1);
++	SMC_SELECT_BANK(lp, 1);
+ 	ctl = SMC_GET_CTL();
+-	SMC_SET_CTL(ctl & ~CTL_LE_ENABLE);
+-	SMC_SET_CTL(ctl);
+-	SMC_SELECT_BANK(2);
++	SMC_SET_CTL(lp, ctl & ~CTL_LE_ENABLE);
++	SMC_SET_CTL(lp, ctl);
++	SMC_SELECT_BANK(lp, 2);
+ }
+ 
+ /*
+@@ -1326,7 +1326,7 @@ static irqreturn_t smc_interrupt(int irq
+ 
+ 	saved_pointer = SMC_GET_PTR();
+ 	mask = SMC_GET_INT_MASK();
+-	SMC_SET_INT_MASK(0);
++	SMC_SET_INT_MASK(lp, 0);
+ 
+ 	/* set a timeout value, so I don't stay here forever */
+ 	timeout = MAX_IRQ_LOOPS;
+@@ -1336,9 +1336,9 @@ static irqreturn_t smc_interrupt(int irq
+ 
+ 		DBG(2, "%s: INT 0x%02x MASK 0x%02x MEM 0x%04x FIFO 0x%04x\n",
+ 			dev->name, status, mask,
+-			({ int meminfo; SMC_SELECT_BANK(0);
++			({ int meminfo; SMC_SELECT_BANK(lp, 0);
+ 			   meminfo = SMC_GET_MIR();
+-			   SMC_SELECT_BANK(2); meminfo; }),
++			   SMC_SELECT_BANK(lp, 2); meminfo; }),
+ 			SMC_GET_FIFO());
+ 
+ 		status &= mask;
+@@ -1349,7 +1349,7 @@ static irqreturn_t smc_interrupt(int irq
+ 			/* do this before RX as it will free memory quickly */
+ 			DBG(3, "%s: TX int\n", dev->name);
+ 			smc_tx(dev);
+-			SMC_ACK_INT(IM_TX_INT);
++			SMC_ACK_INT(lp, IM_TX_INT);
+ 			if (THROTTLE_TX_PKTS)
+ 				netif_wake_queue(dev);
+ 		} else if (status & IM_RCV_INT) {
+@@ -1364,9 +1364,9 @@ static irqreturn_t smc_interrupt(int irq
+ 			mask &= ~IM_TX_EMPTY_INT;
+ 
+ 			/* update stats */
+-			SMC_SELECT_BANK(0);
++			SMC_SELECT_BANK(lp, 0);
+ 			card_stats = SMC_GET_COUNTER();
+-			SMC_SELECT_BANK(2);
++			SMC_SELECT_BANK(lp, 2);
+ 
+ 			/* single collisions */
+ 			dev->stats.collisions += card_stats & 0xF;
+@@ -1376,26 +1376,26 @@ static irqreturn_t smc_interrupt(int irq
+ 			dev->stats.collisions += card_stats & 0xF;
+ 		} else if (status & IM_RX_OVRN_INT) {
+ 			DBG(1, "%s: RX overrun (EPH_ST 0x%04x)\n", dev->name,
+-			       ({ int eph_st; SMC_SELECT_BANK(0);
++			       ({ int eph_st; SMC_SELECT_BANK(lp, 0);
+ 				  eph_st = SMC_GET_EPH_STATUS();
+-				  SMC_SELECT_BANK(2); eph_st; }) );
+-			SMC_ACK_INT(IM_RX_OVRN_INT);
++				  SMC_SELECT_BANK(lp, 2); eph_st; }) );
++			SMC_ACK_INT(lp, IM_RX_OVRN_INT);
+ 			dev->stats.rx_errors++;
+ 			dev->stats.rx_fifo_errors++;
+ 		} else if (status & IM_EPH_INT) {
+ 			smc_eph_interrupt(dev);
+ 		} else if (status & IM_MDINT) {
+-			SMC_ACK_INT(IM_MDINT);
++			SMC_ACK_INT(lp, IM_MDINT);
+ 			smc_phy_interrupt(dev);
+ 		} else if (status & IM_ERCV_INT) {
+-			SMC_ACK_INT(IM_ERCV_INT);
++			SMC_ACK_INT(lp, IM_ERCV_INT);
+ 			PRINTK("%s: UNSUPPORTED: ERCV INTERRUPT \n", dev->name);
+ 		}
+ 	} while (--timeout);
+ 
+ 	/* restore register states */
+-	SMC_SET_PTR(saved_pointer);
+-	SMC_SET_INT_MASK(mask);
++	SMC_SET_PTR(lp, saved_pointer);
++	SMC_SET_INT_MASK(lp, mask);
+ 	spin_unlock(&lp->lock);
+ 
+ 	if (timeout == MAX_IRQ_LOOPS)
+@@ -1441,10 +1441,10 @@ static void smc_timeout(struct net_devic
+ 	status = SMC_GET_INT();
+ 	mask = SMC_GET_INT_MASK();
+ 	fifo = SMC_GET_FIFO();
+-	SMC_SELECT_BANK(0);
++	SMC_SELECT_BANK(lp, 0);
+ 	eph_st = SMC_GET_EPH_STATUS();
+ 	meminfo = SMC_GET_MIR();
+-	SMC_SELECT_BANK(2);
++	SMC_SELECT_BANK(lp, 2);
+ 	spin_unlock_irq(&lp->lock);
+ 	PRINTK( "%s: TX timeout (INT 0x%02x INTMASK 0x%02x "
+ 		"MEM 0x%04x FIFO 0x%04x EPH_ST 0x%04x)\n",
+@@ -1564,13 +1564,13 @@ static void smc_set_multicast_list(struc
+ 	}
+ 
+ 	spin_lock_irq(&lp->lock);
+-	SMC_SELECT_BANK(0);
+-	SMC_SET_RCR(lp->rcr_cur_mode);
++	SMC_SELECT_BANK(lp, 0);
++	SMC_SET_RCR(lp, lp->rcr_cur_mode);
+ 	if (update_multicast) {
+-		SMC_SELECT_BANK(3);
+-		SMC_SET_MCAST(multicast_table);
++		SMC_SELECT_BANK(lp, 3);
++		SMC_SET_MCAST(lp, multicast_table);
+ 	}
+-	SMC_SELECT_BANK(2);
++	SMC_SELECT_BANK(lp, 2);
+ 	spin_unlock_irq(&lp->lock);
+ }
+ 
+@@ -1789,14 +1789,14 @@ static int __init smc_findirq(void __iom
+ 	 * when done.
+ 	 */
+ 	/* enable ALLOCation interrupts ONLY */
+-	SMC_SELECT_BANK(2);
+-	SMC_SET_INT_MASK(IM_ALLOC_INT);
++	SMC_SELECT_BANK(lp, 2);
++	SMC_SET_INT_MASK(lp, IM_ALLOC_INT);
+ 
+ 	/*
+  	 * Allocate 512 bytes of memory.  Note that the chip was just
+ 	 * reset so all the memory is available
+ 	 */
+-	SMC_SET_MMU_CMD(MC_ALLOC | 1);
++	SMC_SET_MMU_CMD(lp, MC_ALLOC | 1);
+ 
+ 	/*
+ 	 * Wait until positive that the interrupt has been generated
+@@ -1817,7 +1817,7 @@ static int __init smc_findirq(void __iom
+ 	 */
+ 
+ 	/* and disable all interrupts again */
+-	SMC_SET_INT_MASK(0);
++	SMC_SET_INT_MASK(lp, 0);
+ 
+ 	/* and return what I found */
+ 	return probe_irq_off(cookie);
+@@ -1880,7 +1880,7 @@ static int __init smc_probe(struct net_d
+ 	 * The above MIGHT indicate a device, but I need to write to
+ 	 * further test this.
+ 	 */
+-	SMC_SELECT_BANK(0);
++	SMC_SELECT_BANK(lp, 0);
+ 	val = SMC_CURRENT_BANK();
+ 	if ((val & 0xFF00) != 0x3300) {
+ 		retval = -ENODEV;
+@@ -1893,7 +1893,7 @@ static int __init smc_probe(struct net_d
+ 	 * register to bank 1, so I can access the base address
+ 	 * register
+ 	 */
+-	SMC_SELECT_BANK(1);
++	SMC_SELECT_BANK(lp, 1);
+ 	val = SMC_GET_BASE();
+ 	val = ((val & 0x1F00) >> 3) << SMC_IO_SHIFT;
+ 	if (((unsigned int)ioaddr & (0x3e0 << SMC_IO_SHIFT)) != val) {
+@@ -1906,7 +1906,7 @@ static int __init smc_probe(struct net_d
+ 	 * recognize.  These might need to be added to later,
+ 	 * as future revisions could be added.
+ 	 */
+-	SMC_SELECT_BANK(3);
++	SMC_SELECT_BANK(lp, 3);
+ 	revision_register = SMC_GET_REV();
+ 	DBG(2, "%s: revision = 0x%04x\n", CARDNAME, revision_register);
+ 	version_string = chip_ids[ (revision_register >> 4) & 0xF];
+@@ -1931,8 +1931,8 @@ static int __init smc_probe(struct net_d
+ 	spin_lock_init(&lp->lock);
+ 
+ 	/* Get the MAC address */
+-	SMC_SELECT_BANK(1);
+-	SMC_GET_MAC_ADDR(dev->dev_addr);
++	SMC_SELECT_BANK(lp, 1);
++	SMC_GET_MAC_ADDR(lp, dev->dev_addr);
+ 
+ 	/* now, reset the chip, and put it into a known state */
+ 	smc_reset(dev);

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/atari-ethernat.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/atari-ethernat.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,2581 @@
+From schmitz at opal.biophys.uni-duesseldorf.de Mon Oct 22 10:03:40 2007
+Date: Mon, 22 Oct 2007 09:27:52 +0200 (CEST)
+From: Michael Schmitz <schmitz at opal.biophys.uni-duesseldorf.de>
+To: Geert Uytterhoeven <geert at linux-m68k.org>
+Cc: Michael Schmitz <schmitz at opal.biophys.uni-duesseldorf.de>, linux-m68k at vger.kernel.org, cts at debian.org
+Subject: [PATCH] Atari EtherNAT (SMC91C111) driver
+
+Hi Geert,
+
+> On Sun, 21 Oct 2007, Michael Schmitz wrote:
+> > this patch is needed to make the Atari EtherNEC driver with the associated
+> > ROM port ISA I/O stuff compile again. This is relative to your quilt patch
+> > queue and git 2.6 as of yesterday. Please apply.
+>
+> Thanks, applied.
+
+Thanks - I'll have a few updates to this shortly, just noticed the
+multi-byte IO emulation (inw, inl etc.) that we discussed months ago had
+gone missing from the patch. That's what you get for keeping too many
+trees around.
+
+But first things first - I finally had enough time to work on the platform
+driver code I need for the SMC91C111 driver aka EtherNAT driver for the
+Falcon. Here's the patch - I could only test it so far on ARAnyM, meaning
+the driver correctly fails to load because the hardware cannot be found.
+Christian may be able to build the driver and test on his Falcon before I
+get mine set up.
+
+One thing that I am not entirely happy about is having the driver resource
+registered unconditionally in atari/config.c, regardless whether the
+driver is built or not. May I incude autoconf.h in the arch code? The
+other one is a kconfig issue - I need to select MMIO either as module or
+builtin, depending on how the EtherNAT driver is built. That does not
+appear to be automatic yet.
+
+Aside from that, at least something that can be tested.
+
+Signed-off-by: Michael Schmitz <schmitz at biophys.uni-duesseldorf.de>
+
+---
+ arch/m68k/atari/config.c   |   41 
+ drivers/net/Kconfig        |   10 
+ drivers/net/Makefile       |    1 
+ drivers/net/atari_91C111.c | 2437 +++++++++++++++++++++++++++++++++++++++++++++
+ include/asm-m68k/io.h      |    2 
+ 5 files changed, 2491 insertions(+)
+
+--- a/arch/m68k/atari/config.c
++++ b/arch/m68k/atari/config.c
+@@ -30,6 +30,7 @@
+ #include <linux/init.h>
+ #include <linux/delay.h>
+ #include <linux/ioport.h>
++#include <linux/platform_device.h>
+ #include <linux/vt_kern.h>
+ #include <linux/module.h>
+ 
+@@ -670,3 +671,43 @@ static int atari_get_hardware_list(char 
+ 
+ 	return len;
+ }
++
++/*
++ * MSch: initial platform device support for Atari, required for EtherNAT
++ */
++
++#define ATARI_ETHERNAT_PHYS_ADDR	0x80000000
++#define ATARI_ETHERNAT_IRQ		0xc3
++
++static struct resource smc91x_resources[] = {
++	[0] = {
++		.name	= "smc91x-regs",
++		.start	= ATARI_ETHERNAT_PHYS_ADDR,
++		.end	= ATARI_ETHERNAT_PHYS_ADDR + 0xfffff,
++		.flags	= IORESOURCE_MEM,
++	},
++	[1] = {
++		.name	= "smc91x-irq",
++		.start	= ATARI_ETHERNAT_IRQ,
++		.end	= ATARI_ETHERNAT_IRQ,
++		.flags	= IORESOURCE_IRQ,
++	},
++};
++
++static struct platform_device smc91x_device = {
++	.name		= "smc91x",
++	.id		= -1,
++	.num_resources	= ARRAY_SIZE(smc91x_resources),
++	.resource	= smc91x_resources,
++};
++
++static struct platform_device *atari_platform_devices[] __initdata = {
++	&smc91x_device
++};
++
++int __init atari_platform_init(void)
++{
++	return platform_add_devices(atari_platform_devices, ARRAY_SIZE(atari_platform_devices));
++}
++
++arch_initcall(atari_platform_init);
+--- a/drivers/net/Kconfig
++++ b/drivers/net/Kconfig
+@@ -431,6 +431,16 @@ config ATARI_ETHERNEC
+ 	  ROM port. The driver works by polling instead of interrupts, so it
+ 	  is quite slow.
+ 
++config ATARI_ETHERNAT
++	tristate "Atari EtherNAT Ethernet support"
++	select CRC32
++	select MII
++	depends on NET_ETHERNET && ATARI
++	help
++	  Say Y to include support for the EtherNAT network adapter for the
++	  CT/60 extension port. The driver works by polling instead of
++	  interrupts, so it is quite slow.
++
+ config SUN3LANCE
+ 	tristate "Sun3/Sun3x on-board LANCE support"
+ 	depends on SUN3 || SUN3X
+--- a/drivers/net/Makefile
++++ b/drivers/net/Makefile
+@@ -198,6 +198,7 @@ obj-$(CONFIG_SGI_IOC3_ETH) += ioc3-eth.o
+ obj-$(CONFIG_DECLANCE) += declance.o
+ obj-$(CONFIG_ATARILANCE) += atarilance.o
+ obj-$(CONFIG_ATARI_ETHERNEC) += atari_ethernec.o 8390.o
++obj-$(CONFIG_ATARI_ETHERNAT) += atari_91C111.o
+ obj-$(CONFIG_A2065) += a2065.o
+ obj-$(CONFIG_HYDRA) += hydra.o
+ obj-$(CONFIG_ARIADNE) += ariadne.o
+--- /dev/null
++++ b/drivers/net/atari_91C111.c
+@@ -0,0 +1,2437 @@
++/*
++ * smc91x.c
++ * This is a driver for SMSC's 91C9x/91C1xx single-chip Ethernet devices.
++ *
++ * Copyright (C) 1996 by Erik Stahlman
++ * Copyright (C) 2001 Standard Microsystems Corporation
++ *	Developed by Simple Network Magic Corporation
++ * Copyright (C) 2003 Monta Vista Software, Inc.
++ *	Unified SMC91x driver by Nicolas Pitre
++ *
++ * 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.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
++ *
++ * Arguments:
++ * 	io	= for the base address
++ *	irq	= for the IRQ
++ *	nowait	= 0 for normal wait states, 1 eliminates additional wait states
++ *
++ * original author:
++ * 	Erik Stahlman <erik at vt.edu>
++ *
++ * hardware multicast code:
++ *    Peter Cammaert <pc at denkart.be>
++ *
++ * contributors:
++ * 	Daris A Nevil <dnevil at snmc.com>
++ *      Nicolas Pitre <nico at cam.org>
++ *	Russell King <rmk at arm.linux.org.uk>
++ *
++ * History:
++ *   08/20/00  Arnaldo Melo       fix kfree(skb) in smc_hardware_send_packet
++ *   12/15/00  Christian Jullien  fix "Warning: kfree_skb on hard IRQ"
++ *   03/16/01  Daris A Nevil      modified smc9194.c for use with LAN91C111
++ *   08/22/01  Scott Anderson     merge changes from smc9194 to smc91111
++ *   08/21/01  Pramod B Bhardwaj  added support for RevB of LAN91C111
++ *   12/20/01  Jeff Sutherland    initial port to Xscale PXA with DMA support
++ *   04/07/03  Nicolas Pitre      unified SMC91x driver, killed irq races,
++ *                                more bus abstraction, big cleanup, etc.
++ *   29/09/03  Russell King       - add driver model support
++ *                                - ethtool support
++ *                                - convert to use generic MII interface
++ *                                - add link up/down notification
++ *                                - don't try to handle full negotiation in
++ *                                  smc_phy_configure
++ *                                - clean up (and fix stack overrun) in PHY
++ *                                  MII read/write functions
++ *   22/09/04  Nicolas Pitre      big update (see commit log for details)
++ */
++static const char version[] =
++	"smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico at cam.org>\n";
++
++#define SMC_DEBUG 2
++
++/* Debugging level */
++#ifndef SMC_DEBUG
++#define SMC_DEBUG		0
++#endif
++
++
++#include <linux/init.h>
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/slab.h>
++#include <linux/delay.h>
++#include <linux/interrupt.h>
++#include <linux/errno.h>
++#include <linux/ioport.h>
++#include <linux/crc32.h>
++#include <linux/platform_device.h>
++#include <linux/spinlock.h>
++#include <linux/ethtool.h>
++#include <linux/mii.h>
++#include <linux/workqueue.h>
++
++#include <linux/netdevice.h>
++#include <linux/etherdevice.h>
++#include <linux/skbuff.h>
++
++#include <asm/hwtest.h>
++#include <asm/atariints.h>
++#include <asm/io.h>
++#include <asm/irq.h>
++
++#include "smc91x.h"
++
++#ifdef CONFIG_ISA
++/*
++ * the LAN91C111 can be at any of the following port addresses.  To change,
++ * for a slightly different card, you can add it to the array.  Keep in
++ * mind that the array must end in zero.
++ */
++static unsigned int smc_portlist[] __initdata = {
++	0x200, 0x220, 0x240, 0x260, 0x280, 0x2A0, 0x2C0, 0x2E0,
++	0x300, 0x320, 0x340, 0x360, 0x380, 0x3A0, 0x3C0, 0x3E0, 0
++};
++
++#endif  /* CONFIG_ISA */
++
++#ifndef SMC_IOADDR
++# define SMC_IOADDR		-1
++#endif
++static unsigned long io = SMC_IOADDR;
++module_param(io, ulong, 0400);
++MODULE_PARM_DESC(io, "I/O base address");
++
++#ifndef SMC_IRQ
++# define SMC_IRQ		-1
++#endif
++static int irq = SMC_IRQ;
++module_param(irq, int, 0400);
++MODULE_PARM_DESC(irq, "IRQ number");
++
++
++#ifndef SMC_NOWAIT
++# define SMC_NOWAIT		0
++#endif
++static int nowait = SMC_NOWAIT;
++module_param(nowait, int, 0400);
++MODULE_PARM_DESC(nowait, "set to 1 for no wait state");
++
++/*
++ * Transmit timeout, default 5 seconds.
++ */
++static int watchdog = 1000;
++module_param(watchdog, int, 0400);
++MODULE_PARM_DESC(watchdog, "transmit timeout in milliseconds");
++
++MODULE_LICENSE("GPL");
++
++/*
++ * The internal workings of the driver.  If you are changing anything
++ * here with the SMC stuff, you should have the datasheet and know
++ * what you are doing.
++ */
++#define CARDNAME "smc91x"
++
++/*
++ * Use power-down feature of the chip
++ */
++#define POWER_DOWN		1
++
++/*
++ * Wait time for memory to be free.  This probably shouldn't be
++ * tuned that much, as waiting for this means nothing else happens
++ * in the system
++ */
++#define MEMORY_WAIT_TIME	16
++
++/*
++ * The maximum number of processing loops allowed for each call to the
++ * IRQ handler.
++ */
++#define MAX_IRQ_LOOPS		8
++
++/*
++ * This selects whether TX packets are sent one by one to the SMC91x internal
++ * memory and throttled until transmission completes.  This may prevent
++ * RX overruns a litle by keeping much of the memory free for RX packets
++ * but to the expense of reduced TX throughput and increased IRQ overhead.
++ * Note this is not a cure for a too slow data bus or too high IRQ latency.
++ */
++#define THROTTLE_TX_PKTS	0
++
++/*
++ * The MII clock high/low times.  2x this number gives the MII clock period
++ * in microseconds. (was 50, but this gives 6.4ms for each MII transaction!)
++ */
++#define MII_DELAY		1
++
++#if SMC_DEBUG > 0
++#define DBG(n, args...)					\
++	do {						\
++		if (SMC_DEBUG >= (n))			\
++			printk(args);	\
++	} while (0)
++
++#define PRINTK(args...)   printk(args)
++#else
++#define DBG(n, args...)   do { } while(0)
++#define PRINTK(args...)   printk(KERN_DEBUG args)
++#endif
++
++#if SMC_DEBUG > 3
++static void PRINT_PKT(u_char *buf, int length)
++{
++	int i;
++	int remainder;
++	int lines;
++
++	lines = length / 16;
++	remainder = length % 16;
++
++	for (i = 0; i < lines ; i ++) {
++		int cur;
++		for (cur = 0; cur < 8; cur++) {
++			u_char a, b;
++			a = *buf++;
++			b = *buf++;
++			printk("%02x%02x ", a, b);
++		}
++		printk("\n");
++	}
++	for (i = 0; i < remainder/2 ; i++) {
++		u_char a, b;
++		a = *buf++;
++		b = *buf++;
++		printk("%02x%02x ", a, b);
++	}
++	printk("\n");
++}
++#else
++#define PRINT_PKT(x...)  do { } while(0)
++#endif
++
++
++/* this enables an interrupt in the interrupt mask register */
++#define SMC_ENABLE_INT(x) do {						\
++	unsigned char mask;						\
++	spin_lock_irq(&lp->lock);					\
++	mask = SMC_GET_INT_MASK();					\
++	mask |= (x);							\
++	SMC_SET_INT_MASK(mask);						\
++	spin_unlock_irq(&lp->lock);					\
++} while (0)
++
++/* this disables an interrupt from the interrupt mask register */
++#define SMC_DISABLE_INT(x) do {						\
++	unsigned char mask;						\
++	spin_lock_irq(&lp->lock);					\
++	mask = SMC_GET_INT_MASK();					\
++	mask &= ~(x);							\
++	SMC_SET_INT_MASK(mask);						\
++	spin_unlock_irq(&lp->lock);					\
++} while (0)
++
++/*
++ * Wait while MMU is busy.  This is usually in the order of a few nanosecs
++ * if at all, but let's avoid deadlocking the system if the hardware
++ * decides to go south.
++ */
++#define SMC_WAIT_MMU_BUSY() do {					\
++	if (unlikely(SMC_GET_MMU_CMD() & MC_BUSY)) {			\
++		unsigned long timeout = jiffies + 2;			\
++		while (SMC_GET_MMU_CMD() & MC_BUSY) {			\
++			if (time_after(jiffies, timeout)) {		\
++				printk("%s: timeout %s line %d\n",	\
++					dev->name, __FILE__, __LINE__);	\
++				break;					\
++			}						\
++			cpu_relax();					\
++		}							\
++	}								\
++} while (0)
++
++/*
++ * Timer based operation on Atari
++ */
++static irqreturn_t smc_interrupt(int irq, void *dev_id);
++
++static int use_poll = 0;
++module_param(use_poll, int, 0);
++MODULE_PARM_DESC(use_poll, "Use timer interrupt to poll driver");
++
++/* This is used by cleanup, to prevent the module from being unloaded while
++ * intrpt_routine is still in the task queue
++ */
++static wait_queue_head_t WaitQ;
++
++static struct delayed_work tqueue;
++
++static struct net_device *poll_dev = NULL;
++
++static void atari_ethernat_int(struct work_struct *work)
++{
++	struct net_device *dev  = poll_dev;
++
++        if(!dev) {
++	        /* If cleanup wants us to die */
++                if (waitqueue_active(&WaitQ))
++                  wake_up(&WaitQ);               /* Now cleanup_module can return */
++                else
++                  /* Put ourselves back in the task queue */
++                  schedule_delayed_work(&tqueue, 1);
++		return;
++        }
++
++	if (netif_running(dev)) {
++		smc_interrupt(dev->irq, dev);
++        }
++
++	/* If cleanup wants us to die */
++	if (waitqueue_active(&WaitQ))
++	wake_up(&WaitQ);               /* Now cleanup_module can return */
++	else
++	/* Put ourselves back in the task queue */
++	schedule_delayed_work(&tqueue, 0); /* reduced delay from 1 */
++}
++
++static void atari_ethernat_start_poll(struct net_device *dev)
++{
++	poll_dev = dev;
++
++	init_waitqueue_head(&WaitQ);
++
++	/* MSch: need to insert dev into work struct?? */
++
++	INIT_DELAYED_WORK(&tqueue, atari_ethernat_int);
++	schedule_delayed_work(&tqueue, 1);
++}
++
++static void atari_ethernat_stop_poll(struct net_device *dev)
++{
++	poll_dev = NULL;
++
++	if (dev) {
++	        sleep_on(&WaitQ);
++	}
++}
++
++
++
++/*
++ * this does a soft reset on the device
++ */
++static void smc_reset(struct net_device *dev)
++{
++	struct smc_local *lp = netdev_priv(dev);
++	void __iomem *ioaddr = lp->base;
++	unsigned int ctl, cfg;
++	struct sk_buff *pending_skb;
++
++	DBG(2, "%s: %s\n", dev->name, __FUNCTION__);
++
++	/* Disable all interrupts, block TX tasklet */
++	spin_lock_irq(&lp->lock);
++	SMC_SELECT_BANK(2);
++	SMC_SET_INT_MASK(0);
++	pending_skb = lp->pending_tx_skb;
++	lp->pending_tx_skb = NULL;
++	spin_unlock_irq(&lp->lock);
++
++	/* free any pending tx skb */
++	if (pending_skb) {
++		dev_kfree_skb(pending_skb);
++		dev->stats.tx_errors++;
++		dev->stats.tx_aborted_errors++;
++	}
++
++	/*
++	 * This resets the registers mostly to defaults, but doesn't
++	 * affect EEPROM.  That seems unnecessary
++	 */
++	SMC_SELECT_BANK(0);
++	SMC_SET_RCR(RCR_SOFTRST);
++
++	/*
++	 * Setup the Configuration Register
++	 * This is necessary because the CONFIG_REG is not affected
++	 * by a soft reset
++	 */
++	SMC_SELECT_BANK(1);
++
++	cfg = CONFIG_DEFAULT;
++
++	/*
++	 * Setup for fast accesses if requested.  If the card/system
++	 * can't handle it then there will be no recovery except for
++	 * a hard reset or power cycle
++	 */
++	if (nowait)
++		cfg |= CONFIG_NO_WAIT;
++
++	/*
++	 * Release from possible power-down state
++	 * Configuration register is not affected by Soft Reset
++	 */
++	cfg |= CONFIG_EPH_POWER_EN;
++
++	SMC_SET_CONFIG(cfg);
++
++	/* this should pause enough for the chip to be happy */
++	/*
++	 * elaborate?  What does the chip _need_? --jgarzik
++	 *
++	 * This seems to be undocumented, but something the original
++	 * driver(s) have always done.  Suspect undocumented timing
++	 * info/determined empirically. --rmk
++	 */
++	udelay(1);
++
++	/* Disable transmit and receive functionality */
++	SMC_SELECT_BANK(0);
++	SMC_SET_RCR(RCR_CLEAR);
++	SMC_SET_TCR(TCR_CLEAR);
++
++	SMC_SELECT_BANK(1);
++	ctl = SMC_GET_CTL() | CTL_LE_ENABLE;
++
++	/*
++	 * Set the control register to automatically release successfully
++	 * transmitted packets, to make the best use out of our limited
++	 * memory
++	 */
++	if(!THROTTLE_TX_PKTS)
++		ctl |= CTL_AUTO_RELEASE;
++	else
++		ctl &= ~CTL_AUTO_RELEASE;
++	SMC_SET_CTL(ctl);
++
++	/* Reset the MMU */
++	SMC_SELECT_BANK(2);
++	SMC_SET_MMU_CMD(MC_RESET);
++	SMC_WAIT_MMU_BUSY();
++}
++
++/*
++ * Enable Interrupts, Receive, and Transmit
++ */
++static void smc_enable(struct net_device *dev)
++{
++	struct smc_local *lp = netdev_priv(dev);
++	void __iomem *ioaddr = lp->base;
++	int mask;
++
++	DBG(2, "%s: %s\n", dev->name, __FUNCTION__);
++
++	/* see the header file for options in TCR/RCR DEFAULT */
++	SMC_SELECT_BANK(0);
++	SMC_SET_TCR(lp->tcr_cur_mode);
++	SMC_SET_RCR(lp->rcr_cur_mode);
++
++	SMC_SELECT_BANK(1);
++	SMC_SET_MAC_ADDR(dev->dev_addr);
++
++	/* now, enable interrupts */
++	mask = IM_EPH_INT|IM_RX_OVRN_INT|IM_RCV_INT;
++	if (lp->version >= (CHIP_91100 << 4))
++		mask |= IM_MDINT;
++	SMC_SELECT_BANK(2);
++	SMC_SET_INT_MASK(mask);
++
++	/*
++	 * From this point the register bank must _NOT_ be switched away
++	 * to something else than bank 2 without proper locking against
++	 * races with any tasklet or interrupt handlers until smc_shutdown()
++	 * or smc_reset() is called.
++	 */
++}
++
++/*
++ * this puts the device in an inactive state
++ */
++static void smc_shutdown(struct net_device *dev)
++{
++	struct smc_local *lp = netdev_priv(dev);
++	void __iomem *ioaddr = lp->base;
++	struct sk_buff *pending_skb;
++
++	DBG(2, "%s: %s\n", CARDNAME, __FUNCTION__);
++
++	/* no more interrupts for me */
++	spin_lock_irq(&lp->lock);
++	SMC_SELECT_BANK(2);
++	SMC_SET_INT_MASK(0);
++	pending_skb = lp->pending_tx_skb;
++	lp->pending_tx_skb = NULL;
++	spin_unlock_irq(&lp->lock);
++	if (pending_skb)
++		dev_kfree_skb(pending_skb);
++
++	/* and tell the card to stay away from that nasty outside world */
++	SMC_SELECT_BANK(0);
++	SMC_SET_RCR(RCR_CLEAR);
++	SMC_SET_TCR(TCR_CLEAR);
++
++#ifdef POWER_DOWN
++	/* finally, shut the chip down */
++	SMC_SELECT_BANK(1);
++	SMC_SET_CONFIG(SMC_GET_CONFIG() & ~CONFIG_EPH_POWER_EN);
++#endif
++}
++
++/*
++ * This is the procedure to handle the receipt of a packet.
++ */
++static inline void  smc_rcv(struct net_device *dev)
++{
++	struct smc_local *lp = netdev_priv(dev);
++	void __iomem *ioaddr = lp->base;
++	unsigned int packet_number, status, packet_len;
++
++	DBG(3, "%s: %s\n", dev->name, __FUNCTION__);
++
++	packet_number = SMC_GET_RXFIFO();
++	if (unlikely(packet_number & RXFIFO_REMPTY)) {
++		PRINTK("%s: smc_rcv with nothing on FIFO.\n", dev->name);
++		return;
++	}
++
++	/* read from start of packet */
++	SMC_SET_PTR(PTR_READ | PTR_RCV | PTR_AUTOINC);
++
++	/* First two words are status and packet length */
++	SMC_GET_PKT_HDR(status, packet_len);
++	packet_len &= 0x07ff;  /* mask off top bits */
++	DBG(2, "%s: RX PNR 0x%x STATUS 0x%04x LENGTH 0x%04x (%d)\n",
++		dev->name, packet_number, status,
++		packet_len, packet_len);
++
++	back:
++	if (unlikely(packet_len < 6 || status & RS_ERRORS)) {
++		if (status & RS_TOOLONG && packet_len <= (1514 + 4 + 6)) {
++			/* accept VLAN packets */
++			status &= ~RS_TOOLONG;
++			goto back;
++		}
++		if (packet_len < 6) {
++			/* bloody hardware */
++			printk(KERN_ERR "%s: fubar (rxlen %u status %x\n",
++					dev->name, packet_len, status);
++			status |= RS_TOOSHORT;
++		}
++		SMC_WAIT_MMU_BUSY();
++		SMC_SET_MMU_CMD(MC_RELEASE);
++		dev->stats.rx_errors++;
++		if (status & RS_ALGNERR)
++			dev->stats.rx_frame_errors++;
++		if (status & (RS_TOOSHORT | RS_TOOLONG))
++			dev->stats.rx_length_errors++;
++		if (status & RS_BADCRC)
++			dev->stats.rx_crc_errors++;
++	} else {
++		struct sk_buff *skb;
++		unsigned char *data;
++		unsigned int data_len;
++
++		/* set multicast stats */
++		if (status & RS_MULTICAST)
++			dev->stats.multicast++;
++
++		/*
++		 * Actual payload is packet_len - 6 (or 5 if odd byte).
++		 * We want skb_reserve(2) and the final ctrl word
++		 * (2 bytes, possibly containing the payload odd byte).
++		 * Furthermore, we add 2 bytes to allow rounding up to
++		 * multiple of 4 bytes on 32 bit buses.
++		 * Hence packet_len - 6 + 2 + 2 + 2.
++		 */
++		skb = dev_alloc_skb(packet_len);
++		if (unlikely(skb == NULL)) {
++			printk(KERN_NOTICE "%s: Low memory, packet dropped.\n",
++				dev->name);
++			SMC_WAIT_MMU_BUSY();
++			SMC_SET_MMU_CMD(MC_RELEASE);
++			dev->stats.rx_dropped++;
++			return;
++		}
++
++		/* Align IP header to 32 bits */
++		skb_reserve(skb, 2);
++
++		/* BUG: the LAN91C111 rev A never sets this bit. Force it. */
++		if (lp->version == 0x90)
++			status |= RS_ODDFRAME;
++
++		/*
++		 * If odd length: packet_len - 5,
++		 * otherwise packet_len - 6.
++		 * With the trailing ctrl byte it's packet_len - 4.
++		 */
++		data_len = packet_len - ((status & RS_ODDFRAME) ? 5 : 6);
++		data = skb_put(skb, data_len);
++		SMC_PULL_DATA(data, packet_len - 4);
++
++		SMC_WAIT_MMU_BUSY();
++		SMC_SET_MMU_CMD(MC_RELEASE);
++
++		PRINT_PKT(data, packet_len - 4);
++
++		dev->last_rx = jiffies;
++		skb->protocol = eth_type_trans(skb, dev);
++		netif_rx(skb);
++		dev->stats.rx_packets++;
++		dev->stats.rx_bytes += data_len;
++	}
++}
++
++#ifdef CONFIG_SMP
++/*
++ * On SMP we have the following problem:
++ *
++ * 	A = smc_hardware_send_pkt()
++ * 	B = smc_hard_start_xmit()
++ * 	C = smc_interrupt()
++ *
++ * A and B can never be executed simultaneously.  However, at least on UP,
++ * it is possible (and even desirable) for C to interrupt execution of
++ * A or B in order to have better RX reliability and avoid overruns.
++ * C, just like A and B, must have exclusive access to the chip and
++ * each of them must lock against any other concurrent access.
++ * Unfortunately this is not possible to have C suspend execution of A or
++ * B taking place on another CPU. On UP this is no an issue since A and B
++ * are run from softirq context and C from hard IRQ context, and there is
++ * no other CPU where concurrent access can happen.
++ * If ever there is a way to force at least B and C to always be executed
++ * on the same CPU then we could use read/write locks to protect against
++ * any other concurrent access and C would always interrupt B. But life
++ * isn't that easy in a SMP world...
++ */
++#define smc_special_trylock(lock)					\
++({									\
++	int __ret;							\
++	local_irq_disable();						\
++	__ret = spin_trylock(lock);					\
++	if (!__ret)							\
++		local_irq_enable();					\
++	__ret;								\
++})
++#define smc_special_lock(lock)		spin_lock_irq(lock)
++#define smc_special_unlock(lock)	spin_unlock_irq(lock)
++#else
++#define smc_special_trylock(lock)	(1)
++#define smc_special_lock(lock)		do { } while (0)
++#define smc_special_unlock(lock)	do { } while (0)
++#endif
++
++/*
++ * This is called to actually send a packet to the chip.
++ */
++static void smc_hardware_send_pkt(unsigned long data)
++{
++	struct net_device *dev = (struct net_device *)data;
++	struct smc_local *lp = netdev_priv(dev);
++	void __iomem *ioaddr = lp->base;
++	struct sk_buff *skb;
++	unsigned int packet_no, len;
++	unsigned char *buf;
++
++	DBG(3, "%s: %s\n", dev->name, __FUNCTION__);
++
++	if (!smc_special_trylock(&lp->lock)) {
++		netif_stop_queue(dev);
++		tasklet_schedule(&lp->tx_task);
++		return;
++	}
++
++	skb = lp->pending_tx_skb;
++	if (unlikely(!skb)) {
++		smc_special_unlock(&lp->lock);
++		return;
++	}
++	lp->pending_tx_skb = NULL;
++
++	packet_no = SMC_GET_AR();
++	if (unlikely(packet_no & AR_FAILED)) {
++		printk("%s: Memory allocation failed.\n", dev->name);
++		dev->stats.tx_errors++;
++		dev->stats.tx_fifo_errors++;
++		smc_special_unlock(&lp->lock);
++		goto done;
++	}
++
++	/* point to the beginning of the packet */
++	SMC_SET_PN(packet_no);
++	SMC_SET_PTR(PTR_AUTOINC);
++
++	buf = skb->data;
++	len = skb->len;
++	DBG(2, "%s: TX PNR 0x%x LENGTH 0x%04x (%d) BUF 0x%p\n",
++		dev->name, packet_no, len, len, buf);
++	PRINT_PKT(buf, len);
++
++	/*
++	 * Send the packet length (+6 for status words, length, and ctl.
++	 * The card will pad to 64 bytes with zeroes if packet is too small.
++	 */
++	SMC_PUT_PKT_HDR(0, len + 6);
++
++	/* send the actual data */
++	SMC_PUSH_DATA(buf, len & ~1);
++
++	/* Send final ctl word with the last byte if there is one */
++	SMC_outw(((len & 1) ? (0x2000 | buf[len-1]) : 0), ioaddr, DATA_REG);
++
++	/*
++	 * If THROTTLE_TX_PKTS is set, we stop the queue here. This will
++	 * have the effect of having at most one packet queued for TX
++	 * in the chip's memory at all time.
++	 *
++	 * If THROTTLE_TX_PKTS is not set then the queue is stopped only
++	 * when memory allocation (MC_ALLOC) does not succeed right away.
++	 */
++	if (THROTTLE_TX_PKTS)
++		netif_stop_queue(dev);
++
++	/* queue the packet for TX */
++	SMC_SET_MMU_CMD(MC_ENQUEUE);
++	smc_special_unlock(&lp->lock);
++
++	dev->trans_start = jiffies;
++	dev->stats.tx_packets++;
++	dev->stats.tx_bytes += len;
++
++	SMC_ENABLE_INT(IM_TX_INT | IM_TX_EMPTY_INT);
++
++done:	if (!THROTTLE_TX_PKTS)
++		netif_wake_queue(dev);
++
++	dev_kfree_skb(skb);
++}
++
++/*
++ * Since I am not sure if I will have enough room in the chip's ram
++ * to store the packet, I call this routine which either sends it
++ * now, or set the card to generates an interrupt when ready
++ * for the packet.
++ */
++static int smc_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
++{
++	struct smc_local *lp = netdev_priv(dev);
++	void __iomem *ioaddr = lp->base;
++	unsigned int numPages, poll_count, status;
++
++	DBG(3, "%s: %s\n", dev->name, __FUNCTION__);
++
++	BUG_ON(lp->pending_tx_skb != NULL);
++
++	/*
++	 * The MMU wants the number of pages to be the number of 256 bytes
++	 * 'pages', minus 1 (since a packet can't ever have 0 pages :))
++	 *
++	 * The 91C111 ignores the size bits, but earlier models don't.
++	 *
++	 * Pkt size for allocating is data length +6 (for additional status
++	 * words, length and ctl)
++	 *
++	 * If odd size then last byte is included in ctl word.
++	 */
++	numPages = ((skb->len & ~1) + (6 - 1)) >> 8;
++	if (unlikely(numPages > 7)) {
++		printk("%s: Far too big packet error.\n", dev->name);
++		dev->stats.tx_errors++;
++		dev->stats.tx_dropped++;
++		dev_kfree_skb(skb);
++		return 0;
++	}
++
++	smc_special_lock(&lp->lock);
++
++	/* now, try to allocate the memory */
++	SMC_SET_MMU_CMD(MC_ALLOC | numPages);
++
++	/*
++	 * Poll the chip for a short amount of time in case the
++	 * allocation succeeds quickly.
++	 */
++	poll_count = MEMORY_WAIT_TIME;
++	do {
++		status = SMC_GET_INT();
++		if (status & IM_ALLOC_INT) {
++			SMC_ACK_INT(IM_ALLOC_INT);
++  			break;
++		}
++   	} while (--poll_count);
++
++	smc_special_unlock(&lp->lock);
++
++	lp->pending_tx_skb = skb;
++   	if (!poll_count) {
++		/* oh well, wait until the chip finds memory later */
++		netif_stop_queue(dev);
++		DBG(2, "%s: TX memory allocation deferred.\n", dev->name);
++		SMC_ENABLE_INT(IM_ALLOC_INT);
++   	} else {
++		/*
++		 * Allocation succeeded: push packet to the chip's own memory
++		 * immediately.
++		 */
++		smc_hardware_send_pkt((unsigned long)dev);
++	}
++
++	return 0;
++}
++
++/*
++ * This handles a TX interrupt, which is only called when:
++ * - a TX error occurred, or
++ * - CTL_AUTO_RELEASE is not set and TX of a packet completed.
++ */
++static void smc_tx(struct net_device *dev)
++{
++	struct smc_local *lp = netdev_priv(dev);
++	void __iomem *ioaddr = lp->base;
++	unsigned int saved_packet, packet_no, tx_status, pkt_len;
++
++	DBG(3, "%s: %s\n", dev->name, __FUNCTION__);
++
++	/* If the TX FIFO is empty then nothing to do */
++	packet_no = SMC_GET_TXFIFO();
++	if (unlikely(packet_no & TXFIFO_TEMPTY)) {
++		PRINTK("%s: smc_tx with nothing on FIFO.\n", dev->name);
++		return;
++	}
++
++	/* select packet to read from */
++	saved_packet = SMC_GET_PN();
++	SMC_SET_PN(packet_no);
++
++	/* read the first word (status word) from this packet */
++	SMC_SET_PTR(PTR_AUTOINC | PTR_READ);
++	SMC_GET_PKT_HDR(tx_status, pkt_len);
++	DBG(2, "%s: TX STATUS 0x%04x PNR 0x%02x\n",
++		dev->name, tx_status, packet_no);
++
++	if (!(tx_status & ES_TX_SUC))
++		dev->stats.tx_errors++;
++
++	if (tx_status & ES_LOSTCARR)
++		dev->stats.tx_carrier_errors++;
++
++	if (tx_status & (ES_LATCOL | ES_16COL)) {
++		PRINTK("%s: %s occurred on last xmit\n", dev->name,
++		       (tx_status & ES_LATCOL) ?
++			"late collision" : "too many collisions");
++		dev->stats.tx_window_errors++;
++		if (!(dev->stats.tx_window_errors & 63) && net_ratelimit()) {
++			printk(KERN_INFO "%s: unexpectedly large number of "
++			       "bad collisions. Please check duplex "
++			       "setting.\n", dev->name);
++		}
++	}
++
++	/* kill the packet */
++	SMC_WAIT_MMU_BUSY();
++	SMC_SET_MMU_CMD(MC_FREEPKT);
++
++	/* Don't restore Packet Number Reg until busy bit is cleared */
++	SMC_WAIT_MMU_BUSY();
++	SMC_SET_PN(saved_packet);
++
++	/* re-enable transmit */
++	SMC_SELECT_BANK(0);
++	SMC_SET_TCR(lp->tcr_cur_mode);
++	SMC_SELECT_BANK(2);
++}
++
++
++/*---PHY CONTROL AND CONFIGURATION-----------------------------------------*/
++
++static void smc_mii_out(struct net_device *dev, unsigned int val, int bits)
++{
++	struct smc_local *lp = netdev_priv(dev);
++	void __iomem *ioaddr = lp->base;
++	unsigned int mii_reg, mask;
++
++	mii_reg = SMC_GET_MII() & ~(MII_MCLK | MII_MDOE | MII_MDO);
++	mii_reg |= MII_MDOE;
++
++	for (mask = 1 << (bits - 1); mask; mask >>= 1) {
++		if (val & mask)
++			mii_reg |= MII_MDO;
++		else
++			mii_reg &= ~MII_MDO;
++
++		SMC_SET_MII(mii_reg);
++		udelay(MII_DELAY);
++		SMC_SET_MII(mii_reg | MII_MCLK);
++		udelay(MII_DELAY);
++	}
++}
++
++static unsigned int smc_mii_in(struct net_device *dev, int bits)
++{
++	struct smc_local *lp = netdev_priv(dev);
++	void __iomem *ioaddr = lp->base;
++	unsigned int mii_reg, mask, val;
++
++	mii_reg = SMC_GET_MII() & ~(MII_MCLK | MII_MDOE | MII_MDO);
++	SMC_SET_MII(mii_reg);
++
++	for (mask = 1 << (bits - 1), val = 0; mask; mask >>= 1) {
++		if (SMC_GET_MII() & MII_MDI)
++			val |= mask;
++
++		SMC_SET_MII(mii_reg);
++		udelay(MII_DELAY);
++		SMC_SET_MII(mii_reg | MII_MCLK);
++		udelay(MII_DELAY);
++	}
++
++	return val;
++}
++
++/*
++ * Reads a register from the MII Management serial interface
++ */
++static int smc_phy_read(struct net_device *dev, int phyaddr, int phyreg)
++{
++	struct smc_local *lp = netdev_priv(dev);
++	void __iomem *ioaddr = lp->base;
++	unsigned int phydata;
++
++	SMC_SELECT_BANK(3);
++
++	/* Idle - 32 ones */
++	smc_mii_out(dev, 0xffffffff, 32);
++
++	/* Start code (01) + read (10) + phyaddr + phyreg */
++	smc_mii_out(dev, 6 << 10 | phyaddr << 5 | phyreg, 14);
++
++	/* Turnaround (2bits) + phydata */
++	phydata = smc_mii_in(dev, 18);
++
++	/* Return to idle state */
++	SMC_SET_MII(SMC_GET_MII() & ~(MII_MCLK|MII_MDOE|MII_MDO));
++
++	DBG(3, "%s: phyaddr=0x%x, phyreg=0x%x, phydata=0x%x\n",
++		__FUNCTION__, phyaddr, phyreg, phydata);
++
++	SMC_SELECT_BANK(2);
++	return phydata;
++}
++
++/*
++ * Writes a register to the MII Management serial interface
++ */
++static void smc_phy_write(struct net_device *dev, int phyaddr, int phyreg,
++			  int phydata)
++{
++	struct smc_local *lp = netdev_priv(dev);
++	void __iomem *ioaddr = lp->base;
++
++	SMC_SELECT_BANK(3);
++
++	/* Idle - 32 ones */
++	smc_mii_out(dev, 0xffffffff, 32);
++
++	/* Start code (01) + write (01) + phyaddr + phyreg + turnaround + phydata */
++	smc_mii_out(dev, 5 << 28 | phyaddr << 23 | phyreg << 18 | 2 << 16 | phydata, 32);
++
++	/* Return to idle state */
++	SMC_SET_MII(SMC_GET_MII() & ~(MII_MCLK|MII_MDOE|MII_MDO));
++
++	DBG(3, "%s: phyaddr=0x%x, phyreg=0x%x, phydata=0x%x\n",
++		__FUNCTION__, phyaddr, phyreg, phydata);
++
++	SMC_SELECT_BANK(2);
++}
++
++/*
++ * Finds and reports the PHY address
++ */
++static void smc_phy_detect(struct net_device *dev)
++{
++	struct smc_local *lp = netdev_priv(dev);
++	int phyaddr;
++
++	DBG(2, "%s: %s\n", dev->name, __FUNCTION__);
++
++	lp->phy_type = 0;
++
++	/*
++	 * Scan all 32 PHY addresses if necessary, starting at
++	 * PHY#1 to PHY#31, and then PHY#0 last.
++	 */
++	for (phyaddr = 1; phyaddr < 33; ++phyaddr) {
++		unsigned int id1, id2;
++
++		/* Read the PHY identifiers */
++		id1 = smc_phy_read(dev, phyaddr & 31, MII_PHYSID1);
++		id2 = smc_phy_read(dev, phyaddr & 31, MII_PHYSID2);
++
++		DBG(3, "%s: phy_id1=0x%x, phy_id2=0x%x\n",
++			dev->name, id1, id2);
++
++		/* Make sure it is a valid identifier */
++		if (id1 != 0x0000 && id1 != 0xffff && id1 != 0x8000 &&
++		    id2 != 0x0000 && id2 != 0xffff && id2 != 0x8000) {
++			/* Save the PHY's address */
++			lp->mii.phy_id = phyaddr & 31;
++			lp->phy_type = id1 << 16 | id2;
++			break;
++		}
++	}
++}
++
++/*
++ * Sets the PHY to a configuration as determined by the user
++ */
++static int smc_phy_fixed(struct net_device *dev)
++{
++	struct smc_local *lp = netdev_priv(dev);
++	void __iomem *ioaddr = lp->base;
++	int phyaddr = lp->mii.phy_id;
++	int bmcr, cfg1;
++
++	DBG(3, "%s: %s\n", dev->name, __FUNCTION__);
++
++	/* Enter Link Disable state */
++	cfg1 = smc_phy_read(dev, phyaddr, PHY_CFG1_REG);
++	cfg1 |= PHY_CFG1_LNKDIS;
++	smc_phy_write(dev, phyaddr, PHY_CFG1_REG, cfg1);
++
++	/*
++	 * Set our fixed capabilities
++	 * Disable auto-negotiation
++	 */
++	bmcr = 0;
++
++	if (lp->ctl_rfduplx)
++		bmcr |= BMCR_FULLDPLX;
++
++	if (lp->ctl_rspeed == 100)
++		bmcr |= BMCR_SPEED100;
++
++	/* Write our capabilities to the phy control register */
++	smc_phy_write(dev, phyaddr, MII_BMCR, bmcr);
++
++	/* Re-Configure the Receive/Phy Control register */
++	SMC_SELECT_BANK(0);
++	SMC_SET_RPC(lp->rpc_cur_mode);
++	SMC_SELECT_BANK(2);
++
++	return 1;
++}
++
++/*
++ * smc_phy_reset - reset the phy
++ * @dev: net device
++ * @phy: phy address
++ *
++ * Issue a software reset for the specified PHY and
++ * wait up to 100ms for the reset to complete.  We should
++ * not access the PHY for 50ms after issuing the reset.
++ *
++ * The time to wait appears to be dependent on the PHY.
++ *
++ * Must be called with lp->lock locked.
++ */
++static int smc_phy_reset(struct net_device *dev, int phy)
++{
++	struct smc_local *lp = netdev_priv(dev);
++	unsigned int bmcr;
++	int timeout;
++
++	smc_phy_write(dev, phy, MII_BMCR, BMCR_RESET);
++
++	for (timeout = 2; timeout; timeout--) {
++		spin_unlock_irq(&lp->lock);
++		msleep(50);
++		spin_lock_irq(&lp->lock);
++
++		bmcr = smc_phy_read(dev, phy, MII_BMCR);
++		if (!(bmcr & BMCR_RESET))
++			break;
++	}
++
++	return bmcr & BMCR_RESET;
++}
++
++/*
++ * smc_phy_powerdown - powerdown phy
++ * @dev: net device
++ *
++ * Power down the specified PHY
++ */
++static void smc_phy_powerdown(struct net_device *dev)
++{
++	struct smc_local *lp = netdev_priv(dev);
++	unsigned int bmcr;
++	int phy = lp->mii.phy_id;
++
++	if (lp->phy_type == 0)
++		return;
++
++	/* We need to ensure that no calls to smc_phy_configure are
++	   pending.
++
++	   flush_scheduled_work() cannot be called because we are
++	   running with the netlink semaphore held (from
++	   devinet_ioctl()) and the pending work queue contains
++	   linkwatch_event() (scheduled by netif_carrier_off()
++	   above). linkwatch_event() also wants the netlink semaphore.
++	*/
++	while(lp->work_pending)
++		yield();
++
++	bmcr = smc_phy_read(dev, phy, MII_BMCR);
++	smc_phy_write(dev, phy, MII_BMCR, bmcr | BMCR_PDOWN);
++}
++
++/*
++ * smc_phy_check_media - check the media status and adjust TCR
++ * @dev: net device
++ * @init: set true for initialisation
++ *
++ * Select duplex mode depending on negotiation state.  This
++ * also updates our carrier state.
++ */
++static void smc_phy_check_media(struct net_device *dev, int init)
++{
++	struct smc_local *lp = netdev_priv(dev);
++	void __iomem *ioaddr = lp->base;
++
++	if (mii_check_media(&lp->mii, netif_msg_link(lp), init)) {
++		/* duplex state has changed */
++		if (lp->mii.full_duplex) {
++			lp->tcr_cur_mode |= TCR_SWFDUP;
++		} else {
++			lp->tcr_cur_mode &= ~TCR_SWFDUP;
++		}
++
++		SMC_SELECT_BANK(0);
++		SMC_SET_TCR(lp->tcr_cur_mode);
++	}
++}
++
++/*
++ * Configures the specified PHY through the MII management interface
++ * using Autonegotiation.
++ * Calls smc_phy_fixed() if the user has requested a certain config.
++ * If RPC ANEG bit is set, the media selection is dependent purely on
++ * the selection by the MII (either in the MII BMCR reg or the result
++ * of autonegotiation.)  If the RPC ANEG bit is cleared, the selection
++ * is controlled by the RPC SPEED and RPC DPLX bits.
++ */
++static void smc_phy_configure(struct work_struct *work)
++{
++	struct smc_local *lp =
++		container_of(work, struct smc_local, phy_configure);
++	struct net_device *dev = lp->dev;
++	void __iomem *ioaddr = lp->base;
++	int phyaddr = lp->mii.phy_id;
++	int my_phy_caps; /* My PHY capabilities */
++	int my_ad_caps; /* My Advertised capabilities */
++	int status;
++
++	DBG(3, "%s:smc_program_phy()\n", dev->name);
++
++	spin_lock_irq(&lp->lock);
++
++	/*
++	 * We should not be called if phy_type is zero.
++	 */
++	if (lp->phy_type == 0)
++		goto smc_phy_configure_exit;
++
++	if (smc_phy_reset(dev, phyaddr)) {
++		printk("%s: PHY reset timed out\n", dev->name);
++		goto smc_phy_configure_exit;
++	}
++
++	/*
++	 * Enable PHY Interrupts (for register 18)
++	 * Interrupts listed here are disabled
++	 */
++	smc_phy_write(dev, phyaddr, PHY_MASK_REG,
++		PHY_INT_LOSSSYNC | PHY_INT_CWRD | PHY_INT_SSD |
++		PHY_INT_ESD | PHY_INT_RPOL | PHY_INT_JAB |
++		PHY_INT_SPDDET | PHY_INT_DPLXDET);
++
++	/* Configure the Receive/Phy Control register */
++	SMC_SELECT_BANK(0);
++	SMC_SET_RPC(lp->rpc_cur_mode);
++
++	/* If the user requested no auto neg, then go set his request */
++	if (lp->mii.force_media) {
++		smc_phy_fixed(dev);
++		goto smc_phy_configure_exit;
++	}
++
++	/* Copy our capabilities from MII_BMSR to MII_ADVERTISE */
++	my_phy_caps = smc_phy_read(dev, phyaddr, MII_BMSR);
++
++	if (!(my_phy_caps & BMSR_ANEGCAPABLE)) {
++		printk(KERN_INFO "Auto negotiation NOT supported\n");
++		smc_phy_fixed(dev);
++		goto smc_phy_configure_exit;
++	}
++
++	my_ad_caps = ADVERTISE_CSMA; /* I am CSMA capable */
++
++	if (my_phy_caps & BMSR_100BASE4)
++		my_ad_caps |= ADVERTISE_100BASE4;
++	if (my_phy_caps & BMSR_100FULL)
++		my_ad_caps |= ADVERTISE_100FULL;
++	if (my_phy_caps & BMSR_100HALF)
++		my_ad_caps |= ADVERTISE_100HALF;
++	if (my_phy_caps & BMSR_10FULL)
++		my_ad_caps |= ADVERTISE_10FULL;
++	if (my_phy_caps & BMSR_10HALF)
++		my_ad_caps |= ADVERTISE_10HALF;
++
++	/* Disable capabilities not selected by our user */
++	if (lp->ctl_rspeed != 100)
++		my_ad_caps &= ~(ADVERTISE_100BASE4|ADVERTISE_100FULL|ADVERTISE_100HALF);
++
++	if (!lp->ctl_rfduplx)
++		my_ad_caps &= ~(ADVERTISE_100FULL|ADVERTISE_10FULL);
++
++	/* Update our Auto-Neg Advertisement Register */
++	smc_phy_write(dev, phyaddr, MII_ADVERTISE, my_ad_caps);
++	lp->mii.advertising = my_ad_caps;
++
++	/*
++	 * Read the register back.  Without this, it appears that when
++	 * auto-negotiation is restarted, sometimes it isn't ready and
++	 * the link does not come up.
++	 */
++	status = smc_phy_read(dev, phyaddr, MII_ADVERTISE);
++
++	DBG(2, "%s: phy caps=%x\n", dev->name, my_phy_caps);
++	DBG(2, "%s: phy advertised caps=%x\n", dev->name, my_ad_caps);
++
++	/* Restart auto-negotiation process in order to advertise my caps */
++	smc_phy_write(dev, phyaddr, MII_BMCR, BMCR_ANENABLE | BMCR_ANRESTART);
++
++	smc_phy_check_media(dev, 1);
++
++smc_phy_configure_exit:
++	SMC_SELECT_BANK(2);
++	spin_unlock_irq(&lp->lock);
++	lp->work_pending = 0;
++}
++
++/*
++ * smc_phy_interrupt
++ *
++ * Purpose:  Handle interrupts relating to PHY register 18. This is
++ *  called from the "hard" interrupt handler under our private spinlock.
++ */
++static void smc_phy_interrupt(struct net_device *dev)
++{
++	struct smc_local *lp = netdev_priv(dev);
++	int phyaddr = lp->mii.phy_id;
++	int phy18;
++
++	DBG(2, "%s: %s\n", dev->name, __FUNCTION__);
++
++	if (lp->phy_type == 0)
++		return;
++
++	for(;;) {
++		smc_phy_check_media(dev, 0);
++
++		/* Read PHY Register 18, Status Output */
++		phy18 = smc_phy_read(dev, phyaddr, PHY_INT_REG);
++		if ((phy18 & PHY_INT_INT) == 0)
++			break;
++	}
++}
++
++/*--- END PHY CONTROL AND CONFIGURATION-------------------------------------*/
++
++static void smc_10bt_check_media(struct net_device *dev, int init)
++{
++	struct smc_local *lp = netdev_priv(dev);
++	void __iomem *ioaddr = lp->base;
++	unsigned int old_carrier, new_carrier;
++
++	old_carrier = netif_carrier_ok(dev) ? 1 : 0;
++
++	SMC_SELECT_BANK(0);
++	new_carrier = (SMC_GET_EPH_STATUS() & ES_LINK_OK) ? 1 : 0;
++	SMC_SELECT_BANK(2);
++
++	if (init || (old_carrier != new_carrier)) {
++		if (!new_carrier) {
++			netif_carrier_off(dev);
++		} else {
++			netif_carrier_on(dev);
++		}
++		if (netif_msg_link(lp))
++			printk(KERN_INFO "%s: link %s\n", dev->name,
++			       new_carrier ? "up" : "down");
++	}
++}
++
++static void smc_eph_interrupt(struct net_device *dev)
++{
++	struct smc_local *lp = netdev_priv(dev);
++	void __iomem *ioaddr = lp->base;
++	unsigned int ctl;
++
++	smc_10bt_check_media(dev, 0);
++
++	SMC_SELECT_BANK(1);
++	ctl = SMC_GET_CTL();
++	SMC_SET_CTL(ctl & ~CTL_LE_ENABLE);
++	SMC_SET_CTL(ctl);
++	SMC_SELECT_BANK(2);
++}
++
++/*
++ * This is the main routine of the driver, to handle the device when
++ * it needs some attention.
++ */
++static irqreturn_t smc_interrupt(int irq, void *dev_id)
++{
++	struct net_device *dev = dev_id;
++	struct smc_local *lp = netdev_priv(dev);
++	void __iomem *ioaddr = lp->base;
++	int status, mask, timeout, card_stats;
++	int saved_pointer;
++
++	DBG(3, "%s: %s\n", dev->name, __FUNCTION__);
++
++	spin_lock(&lp->lock);
++
++	/* A preamble may be used when there is a potential race
++	 * between the interruptible transmit functions and this
++	 * ISR. */
++	SMC_INTERRUPT_PREAMBLE;
++
++	saved_pointer = SMC_GET_PTR();
++	mask = SMC_GET_INT_MASK();
++	SMC_SET_INT_MASK(0);
++
++	/* set a timeout value, so I don't stay here forever */
++	timeout = MAX_IRQ_LOOPS;
++
++	do {
++		status = SMC_GET_INT();
++
++		DBG(2, "%s: INT 0x%02x MASK 0x%02x MEM 0x%04x FIFO 0x%04x\n",
++			dev->name, status, mask,
++			({ int meminfo; SMC_SELECT_BANK(0);
++			   meminfo = SMC_GET_MIR();
++			   SMC_SELECT_BANK(2); meminfo; }),
++			SMC_GET_FIFO());
++
++		status &= mask;
++		if (!status)
++			break;
++
++		if (status & IM_TX_INT) {
++			/* do this before RX as it will free memory quickly */
++			DBG(3, "%s: TX int\n", dev->name);
++			smc_tx(dev);
++			SMC_ACK_INT(IM_TX_INT);
++			if (THROTTLE_TX_PKTS)
++				netif_wake_queue(dev);
++		} else if (status & IM_RCV_INT) {
++			DBG(3, "%s: RX irq\n", dev->name);
++			smc_rcv(dev);
++		} else if (status & IM_ALLOC_INT) {
++			DBG(3, "%s: Allocation irq\n", dev->name);
++			tasklet_hi_schedule(&lp->tx_task);
++			mask &= ~IM_ALLOC_INT;
++		} else if (status & IM_TX_EMPTY_INT) {
++			DBG(3, "%s: TX empty\n", dev->name);
++			mask &= ~IM_TX_EMPTY_INT;
++
++			/* update stats */
++			SMC_SELECT_BANK(0);
++			card_stats = SMC_GET_COUNTER();
++			SMC_SELECT_BANK(2);
++
++			/* single collisions */
++			dev->stats.collisions += card_stats & 0xF;
++			card_stats >>= 4;
++
++			/* multiple collisions */
++			dev->stats.collisions += card_stats & 0xF;
++		} else if (status & IM_RX_OVRN_INT) {
++			DBG(1, "%s: RX overrun (EPH_ST 0x%04x)\n", dev->name,
++			       ({ int eph_st; SMC_SELECT_BANK(0);
++				  eph_st = SMC_GET_EPH_STATUS();
++				  SMC_SELECT_BANK(2); eph_st; }) );
++			SMC_ACK_INT(IM_RX_OVRN_INT);
++			dev->stats.rx_errors++;
++			dev->stats.rx_fifo_errors++;
++		} else if (status & IM_EPH_INT) {
++			smc_eph_interrupt(dev);
++		} else if (status & IM_MDINT) {
++			SMC_ACK_INT(IM_MDINT);
++			smc_phy_interrupt(dev);
++		} else if (status & IM_ERCV_INT) {
++			SMC_ACK_INT(IM_ERCV_INT);
++			PRINTK("%s: UNSUPPORTED: ERCV INTERRUPT \n", dev->name);
++		}
++	} while (--timeout);
++
++	/* restore register states */
++	SMC_SET_PTR(saved_pointer);
++	SMC_SET_INT_MASK(mask);
++	spin_unlock(&lp->lock);
++
++	if (timeout == MAX_IRQ_LOOPS)
++		PRINTK("%s: spurious interrupt (mask = 0x%02x)\n",
++		       dev->name, mask);
++	DBG(3, "%s: Interrupt done (%d loops)\n",
++	       dev->name, MAX_IRQ_LOOPS - timeout);
++
++	/*
++	 * We return IRQ_HANDLED unconditionally here even if there was
++	 * nothing to do.  There is a possibility that a packet might
++	 * get enqueued into the chip right after TX_EMPTY_INT is raised
++	 * but just before the CPU acknowledges the IRQ.
++	 * Better take an unneeded IRQ in some occasions than complexifying
++	 * the code for all cases.
++	 */
++	return IRQ_HANDLED;
++}
++
++#ifdef CONFIG_NET_POLL_CONTROLLER
++/*
++ * Polling receive - used by netconsole and other diagnostic tools
++ * to allow network i/o with interrupts disabled.
++ */
++static void smc_poll_controller(struct net_device *dev)
++{
++	disable_irq(dev->irq);
++	smc_interrupt(dev->irq, dev);
++	enable_irq(dev->irq);
++}
++#endif
++
++/* Our watchdog timed out. Called by the networking layer */
++static void smc_timeout(struct net_device *dev)
++{
++	struct smc_local *lp = netdev_priv(dev);
++	void __iomem *ioaddr = lp->base;
++	int status, mask, eph_st, meminfo, fifo;
++
++	DBG(2, "%s: %s\n", dev->name, __FUNCTION__);
++
++	spin_lock_irq(&lp->lock);
++	status = SMC_GET_INT();
++	mask = SMC_GET_INT_MASK();
++	fifo = SMC_GET_FIFO();
++	SMC_SELECT_BANK(0);
++	eph_st = SMC_GET_EPH_STATUS();
++	meminfo = SMC_GET_MIR();
++	SMC_SELECT_BANK(2);
++	spin_unlock_irq(&lp->lock);
++	PRINTK( "%s: TX timeout (INT 0x%02x INTMASK 0x%02x "
++		"MEM 0x%04x FIFO 0x%04x EPH_ST 0x%04x)\n",
++		dev->name, status, mask, meminfo, fifo, eph_st );
++
++	smc_reset(dev);
++	smc_enable(dev);
++
++	/*
++	 * Reconfiguring the PHY doesn't seem like a bad idea here, but
++	 * smc_phy_configure() calls msleep() which calls schedule_timeout()
++	 * which calls schedule().  Hence we use a work queue.
++	 */
++	if (lp->phy_type != 0) {
++		if (schedule_work(&lp->phy_configure)) {
++			lp->work_pending = 1;
++		}
++	}
++
++	/* We can accept TX packets again */
++	dev->trans_start = jiffies;
++	netif_wake_queue(dev);
++}
++
++/*
++ * This routine will, depending on the values passed to it,
++ * either make it accept multicast packets, go into
++ * promiscuous mode (for TCPDUMP and cousins) or accept
++ * a select set of multicast packets
++ */
++static void smc_set_multicast_list(struct net_device *dev)
++{
++	struct smc_local *lp = netdev_priv(dev);
++	void __iomem *ioaddr = lp->base;
++	unsigned char multicast_table[8];
++	int update_multicast = 0;
++
++	DBG(2, "%s: %s\n", dev->name, __FUNCTION__);
++
++	if (dev->flags & IFF_PROMISC) {
++		DBG(2, "%s: RCR_PRMS\n", dev->name);
++		lp->rcr_cur_mode |= RCR_PRMS;
++	}
++
++/* BUG?  I never disable promiscuous mode if multicasting was turned on.
++   Now, I turn off promiscuous mode, but I don't do anything to multicasting
++   when promiscuous mode is turned on.
++*/
++
++	/*
++	 * Here, I am setting this to accept all multicast packets.
++	 * I don't need to zero the multicast table, because the flag is
++	 * checked before the table is
++	 */
++	else if (dev->flags & IFF_ALLMULTI || dev->mc_count > 16) {
++		DBG(2, "%s: RCR_ALMUL\n", dev->name);
++		lp->rcr_cur_mode |= RCR_ALMUL;
++	}
++
++	/*
++	 * This sets the internal hardware table to filter out unwanted
++	 * multicast packets before they take up memory.
++	 *
++	 * The SMC chip uses a hash table where the high 6 bits of the CRC of
++	 * address are the offset into the table.  If that bit is 1, then the
++	 * multicast packet is accepted.  Otherwise, it's dropped silently.
++	 *
++	 * To use the 6 bits as an offset into the table, the high 3 bits are
++	 * the number of the 8 bit register, while the low 3 bits are the bit
++	 * within that register.
++	 */
++	else if (dev->mc_count)  {
++		int i;
++		struct dev_mc_list *cur_addr;
++
++		/* table for flipping the order of 3 bits */
++		static const unsigned char invert3[] = {0, 4, 2, 6, 1, 5, 3, 7};
++
++		/* start with a table of all zeros: reject all */
++		memset(multicast_table, 0, sizeof(multicast_table));
++
++		cur_addr = dev->mc_list;
++		for (i = 0; i < dev->mc_count; i++, cur_addr = cur_addr->next) {
++			int position;
++
++			/* do we have a pointer here? */
++			if (!cur_addr)
++				break;
++			/* make sure this is a multicast address -
++		   	   shouldn't this be a given if we have it here ? */
++			if (!(*cur_addr->dmi_addr & 1))
++				continue;
++
++			/* only use the low order bits */
++			position = crc32_le(~0, cur_addr->dmi_addr, 6) & 0x3f;
++
++			/* do some messy swapping to put the bit in the right spot */
++			multicast_table[invert3[position&7]] |=
++				(1<<invert3[(position>>3)&7]);
++		}
++
++		/* be sure I get rid of flags I might have set */
++		lp->rcr_cur_mode &= ~(RCR_PRMS | RCR_ALMUL);
++
++		/* now, the table can be loaded into the chipset */
++		update_multicast = 1;
++	} else  {
++		DBG(2, "%s: ~(RCR_PRMS|RCR_ALMUL)\n", dev->name);
++		lp->rcr_cur_mode &= ~(RCR_PRMS | RCR_ALMUL);
++
++		/*
++		 * since I'm disabling all multicast entirely, I need to
++		 * clear the multicast list
++		 */
++		memset(multicast_table, 0, sizeof(multicast_table));
++		update_multicast = 1;
++	}
++
++	spin_lock_irq(&lp->lock);
++	SMC_SELECT_BANK(0);
++	SMC_SET_RCR(lp->rcr_cur_mode);
++	if (update_multicast) {
++		SMC_SELECT_BANK(3);
++		SMC_SET_MCAST(multicast_table);
++	}
++	SMC_SELECT_BANK(2);
++	spin_unlock_irq(&lp->lock);
++}
++
++
++/*
++ * Open and Initialize the board
++ *
++ * Set up everything, reset the card, etc..
++ */
++static int
++smc_open(struct net_device *dev)
++{
++	struct smc_local *lp = netdev_priv(dev);
++
++	DBG(2, "%s: %s\n", dev->name, __FUNCTION__);
++
++	/*
++	 * Check that the address is valid.  If its not, refuse
++	 * to bring the device up.  The user must specify an
++	 * address using ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx
++	 */
++	if (!is_valid_ether_addr(dev->dev_addr)) {
++		PRINTK("%s: no valid ethernet hw addr\n", __FUNCTION__);
++		return -EINVAL;
++	}
++
++	/* Setup the default Register Modes */
++	lp->tcr_cur_mode = TCR_DEFAULT;
++	lp->rcr_cur_mode = RCR_DEFAULT;
++	lp->rpc_cur_mode = RPC_DEFAULT;
++
++	/*
++	 * If we are not using a MII interface, we need to
++	 * monitor our own carrier signal to detect faults.
++	 */
++	if (lp->phy_type == 0)
++		lp->tcr_cur_mode |= TCR_MON_CSN;
++
++	/* reset the hardware */
++	smc_reset(dev);
++	smc_enable(dev);
++
++	/* Configure the PHY, initialize the link state */
++	if (lp->phy_type != 0)
++		smc_phy_configure(&lp->phy_configure);
++	else {
++		spin_lock_irq(&lp->lock);
++		smc_10bt_check_media(dev, 1);
++		spin_unlock_irq(&lp->lock);
++	}
++
++	netif_start_queue(dev);
++	return 0;
++}
++
++/*
++ * smc_close
++ *
++ * this makes the board clean up everything that it can
++ * and not talk to the outside world.   Caused by
++ * an 'ifconfig ethX down'
++ */
++static int smc_close(struct net_device *dev)
++{
++	struct smc_local *lp = netdev_priv(dev);
++
++	DBG(2, "%s: %s\n", dev->name, __FUNCTION__);
++
++	netif_stop_queue(dev);
++	netif_carrier_off(dev);
++
++	/* clear everything */
++	smc_shutdown(dev);
++	tasklet_kill(&lp->tx_task);
++	smc_phy_powerdown(dev);
++	return 0;
++}
++
++/*
++ * Ethtool support
++ */
++static int
++smc_ethtool_getsettings(struct net_device *dev, struct ethtool_cmd *cmd)
++{
++	struct smc_local *lp = netdev_priv(dev);
++	int ret;
++
++	cmd->maxtxpkt = 1;
++	cmd->maxrxpkt = 1;
++
++	if (lp->phy_type != 0) {
++		spin_lock_irq(&lp->lock);
++		ret = mii_ethtool_gset(&lp->mii, cmd);
++		spin_unlock_irq(&lp->lock);
++	} else {
++		cmd->supported = SUPPORTED_10baseT_Half |
++				 SUPPORTED_10baseT_Full |
++				 SUPPORTED_TP | SUPPORTED_AUI;
++
++		if (lp->ctl_rspeed == 10)
++			cmd->speed = SPEED_10;
++		else if (lp->ctl_rspeed == 100)
++			cmd->speed = SPEED_100;
++
++		cmd->autoneg = AUTONEG_DISABLE;
++		cmd->transceiver = XCVR_INTERNAL;
++		cmd->port = 0;
++		cmd->duplex = lp->tcr_cur_mode & TCR_SWFDUP ? DUPLEX_FULL : DUPLEX_HALF;
++
++		ret = 0;
++	}
++
++	return ret;
++}
++
++static int
++smc_ethtool_setsettings(struct net_device *dev, struct ethtool_cmd *cmd)
++{
++	struct smc_local *lp = netdev_priv(dev);
++	int ret;
++
++	if (lp->phy_type != 0) {
++		spin_lock_irq(&lp->lock);
++		ret = mii_ethtool_sset(&lp->mii, cmd);
++		spin_unlock_irq(&lp->lock);
++	} else {
++		if (cmd->autoneg != AUTONEG_DISABLE ||
++		    cmd->speed != SPEED_10 ||
++		    (cmd->duplex != DUPLEX_HALF && cmd->duplex != DUPLEX_FULL) ||
++		    (cmd->port != PORT_TP && cmd->port != PORT_AUI))
++			return -EINVAL;
++
++//		lp->port = cmd->port;
++		lp->ctl_rfduplx = cmd->duplex == DUPLEX_FULL;
++
++//		if (netif_running(dev))
++//			smc_set_port(dev);
++
++		ret = 0;
++	}
++
++	return ret;
++}
++
++static void
++smc_ethtool_getdrvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
++{
++	strncpy(info->driver, CARDNAME, sizeof(info->driver));
++	strncpy(info->version, version, sizeof(info->version));
++	strncpy(info->bus_info, dev->dev.parent->bus_id, sizeof(info->bus_info));
++}
++
++static int smc_ethtool_nwayreset(struct net_device *dev)
++{
++	struct smc_local *lp = netdev_priv(dev);
++	int ret = -EINVAL;
++
++	if (lp->phy_type != 0) {
++		spin_lock_irq(&lp->lock);
++		ret = mii_nway_restart(&lp->mii);
++		spin_unlock_irq(&lp->lock);
++	}
++
++	return ret;
++}
++
++static u32 smc_ethtool_getmsglevel(struct net_device *dev)
++{
++	struct smc_local *lp = netdev_priv(dev);
++	return lp->msg_enable;
++}
++
++static void smc_ethtool_setmsglevel(struct net_device *dev, u32 level)
++{
++	struct smc_local *lp = netdev_priv(dev);
++	lp->msg_enable = level;
++}
++
++static struct ethtool_ops smc_ethtool_ops = {
++	.get_settings	= smc_ethtool_getsettings,
++	.set_settings	= smc_ethtool_setsettings,
++	.get_drvinfo	= smc_ethtool_getdrvinfo,
++
++	.get_msglevel	= smc_ethtool_getmsglevel,
++	.set_msglevel	= smc_ethtool_setmsglevel,
++	.nway_reset	= smc_ethtool_nwayreset,
++	.get_link	= ethtool_op_get_link,
++//	.get_eeprom	= smc_ethtool_geteeprom,
++//	.set_eeprom	= smc_ethtool_seteeprom,
++};
++
++/*
++ * smc_findirq
++ *
++ * This routine has a simple purpose -- make the SMC chip generate an
++ * interrupt, so an auto-detect routine can detect it, and find the IRQ,
++ */
++/*
++ * does this still work?
++ *
++ * I just deleted auto_irq.c, since it was never built...
++ *   --jgarzik
++ */
++static int __init smc_findirq(void __iomem *ioaddr)
++{
++	int timeout = 20;
++	unsigned long cookie;
++
++	DBG(2, "%s: %s\n", CARDNAME, __FUNCTION__);
++
++	cookie = probe_irq_on();
++
++	/*
++	 * What I try to do here is trigger an ALLOC_INT. This is done
++	 * by allocating a small chunk of memory, which will give an interrupt
++	 * when done.
++	 */
++	/* enable ALLOCation interrupts ONLY */
++	SMC_SELECT_BANK(2);
++	SMC_SET_INT_MASK(IM_ALLOC_INT);
++
++	/*
++ 	 * Allocate 512 bytes of memory.  Note that the chip was just
++	 * reset so all the memory is available
++	 */
++	SMC_SET_MMU_CMD(MC_ALLOC | 1);
++
++	/*
++	 * Wait until positive that the interrupt has been generated
++	 */
++	do {
++		int int_status;
++		udelay(10);
++		int_status = SMC_GET_INT();
++		if (int_status & IM_ALLOC_INT)
++			break;		/* got the interrupt */
++	} while (--timeout);
++
++	/*
++	 * there is really nothing that I can do here if timeout fails,
++	 * as autoirq_report will return a 0 anyway, which is what I
++	 * want in this case.   Plus, the clean up is needed in both
++	 * cases.
++	 */
++
++	/* and disable all interrupts again */
++	SMC_SET_INT_MASK(0);
++
++	/* and return what I found */
++	return probe_irq_off(cookie);
++}
++
++/*
++ * Function: smc_probe(unsigned long ioaddr)
++ *
++ * Purpose:
++ *	Tests to see if a given ioaddr points to an SMC91x chip.
++ *	Returns a 0 on success
++ *
++ * Algorithm:
++ *	(1) see if the high byte of BANK_SELECT is 0x33
++ * 	(2) compare the ioaddr with the base register's address
++ *	(3) see if I recognize the chip ID in the appropriate register
++ *
++ * Here I do typical initialization tasks.
++ *
++ * o  Initialize the structure if needed
++ * o  print out my vanity message if not done so already
++ * o  print out what type of hardware is detected
++ * o  print out the ethernet address
++ * o  find the IRQ
++ * o  set up my private data
++ * o  configure the dev structure with my subroutines
++ * o  actually GRAB the irq.
++ * o  GRAB the region
++ */
++static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr)
++{
++	struct smc_local *lp = netdev_priv(dev);
++	static int version_printed = 0;
++	int retval;
++	unsigned int val, revision_register;
++	const char *version_string;
++	DECLARE_MAC_BUF(mac);
++
++	DBG(2, "%s: %s\n", CARDNAME, __FUNCTION__);
++
++        if (!hwreg_present( ioaddr + BANK_SELECT )) {
++		retval = -ENODEV;
++		goto err_out;
++	}
++
++	/* First, see if the high byte is 0x33 */
++	val = SMC_CURRENT_BANK();
++	DBG(2, "%s: bank signature probe returned 0x%04x\n", CARDNAME, val);
++	if ((val & 0xFF00) != 0x3300) {
++		if ((val & 0xFF) == 0x33) {
++			printk(KERN_WARNING
++				"%s: Detected possible byte-swapped interface"
++				" at IOADDR %p\n", CARDNAME, ioaddr);
++		}
++		retval = -ENODEV;
++		goto err_out;
++	}
++
++	/*
++	 * The above MIGHT indicate a device, but I need to write to
++	 * further test this.
++	 */
++	SMC_SELECT_BANK(0);
++	val = SMC_CURRENT_BANK();
++	if ((val & 0xFF00) != 0x3300) {
++		retval = -ENODEV;
++		goto err_out;
++	}
++
++	/*
++	 * well, we've already written once, so hopefully another
++	 * time won't hurt.  This time, I need to switch the bank
++	 * register to bank 1, so I can access the base address
++	 * register
++	 */
++	SMC_SELECT_BANK(1);
++	val = SMC_GET_BASE();
++	val = ((val & 0x1F00) >> 3) << SMC_IO_SHIFT;
++	if (((unsigned int)ioaddr & (0x3e0 << SMC_IO_SHIFT)) != val) {
++		printk("%s: IOADDR %p doesn't match configuration (%x).\n",
++			CARDNAME, ioaddr, val);
++	}
++
++	/*
++	 * check if the revision register is something that I
++	 * recognize.  These might need to be added to later,
++	 * as future revisions could be added.
++	 */
++	SMC_SELECT_BANK(3);
++	revision_register = SMC_GET_REV();
++	DBG(2, "%s: revision = 0x%04x\n", CARDNAME, revision_register);
++	version_string = chip_ids[ (revision_register >> 4) & 0xF];
++	if (!version_string || (revision_register & 0xff00) != 0x3300) {
++		/* I don't recognize this chip, so... */
++		printk("%s: IO %p: Unrecognized revision register 0x%04x"
++			", Contact author.\n", CARDNAME,
++			ioaddr, revision_register);
++
++		retval = -ENODEV;
++		goto err_out;
++	}
++
++	/* At this point I'll assume that the chip is an SMC91x. */
++	if (version_printed++ == 0)
++		printk("%s", version);
++
++	/* fill in some of the fields */
++	dev->base_addr = (unsigned long)ioaddr;
++	lp->base = ioaddr;
++	lp->version = revision_register & 0xff;
++	spin_lock_init(&lp->lock);
++
++	/* Get the MAC address */
++	SMC_SELECT_BANK(1);
++	SMC_GET_MAC_ADDR(dev->dev_addr);
++
++	/* now, reset the chip, and put it into a known state */
++	smc_reset(dev);
++
++	/*
++	 * If dev->irq is 0, then the device has to be banged on to see
++	 * what the IRQ is.
++ 	 *
++	 * This banging doesn't always detect the IRQ, for unknown reasons.
++	 * a workaround is to reset the chip and try again.
++	 *
++	 * Interestingly, the DOS packet driver *SETS* the IRQ on the card to
++	 * be what is requested on the command line.   I don't do that, mostly
++	 * because the card that I have uses a non-standard method of accessing
++	 * the IRQs, and because this _should_ work in most configurations.
++	 *
++	 * Specifying an IRQ is done with the assumption that the user knows
++	 * what (s)he is doing.  No checking is done!!!!
++	 */
++	if (dev->irq < 1) {
++		int trials;
++
++		trials = 3;
++		while (trials--) {
++			dev->irq = smc_findirq(ioaddr);
++			if (dev->irq)
++				break;
++			/* kick the card and try again */
++			smc_reset(dev);
++		}
++	}
++	if (dev->irq == 0) {
++		printk("%s: Couldn't autodetect your IRQ. Use irq=xx.\n",
++			dev->name);
++		retval = -ENODEV;
++		goto err_out;
++	}
++	dev->irq = irq_canonicalize(dev->irq);
++
++	/* Fill in the fields of the device structure with ethernet values. */
++	ether_setup(dev);
++
++	dev->open = smc_open;
++	dev->stop = smc_close;
++	dev->hard_start_xmit = smc_hard_start_xmit;
++	dev->tx_timeout = smc_timeout;
++	dev->watchdog_timeo = msecs_to_jiffies(watchdog);
++	dev->set_multicast_list = smc_set_multicast_list;
++	dev->ethtool_ops = &smc_ethtool_ops;
++#ifdef CONFIG_NET_POLL_CONTROLLER
++	dev->poll_controller = smc_poll_controller;
++#endif
++
++	tasklet_init(&lp->tx_task, smc_hardware_send_pkt, (unsigned long)dev);
++	INIT_WORK(&lp->phy_configure, smc_phy_configure);
++	lp->dev = dev;
++	lp->mii.phy_id_mask = 0x1f;
++	lp->mii.reg_num_mask = 0x1f;
++	lp->mii.force_media = 0;
++	lp->mii.full_duplex = 0;
++	lp->mii.dev = dev;
++	lp->mii.mdio_read = smc_phy_read;
++	lp->mii.mdio_write = smc_phy_write;
++
++	/*
++	 * Locate the phy, if any.
++	 */
++	if (lp->version >= (CHIP_91100 << 4))
++		smc_phy_detect(dev);
++
++	/* then shut everything down to save power */
++	smc_shutdown(dev);
++	smc_phy_powerdown(dev);
++
++	/* Set default parameters */
++	lp->msg_enable = NETIF_MSG_LINK;
++	lp->ctl_rfduplx = 0;
++	lp->ctl_rspeed = 10;
++
++	if (lp->version >= (CHIP_91100 << 4)) {
++		lp->ctl_rfduplx = 1;
++		lp->ctl_rspeed = 100;
++	}
++
++	/* Grab the IRQ */
++      	retval = request_irq(dev->irq, &smc_interrupt, SMC_IRQ_FLAGS, dev->name, dev);
++      	if (retval) {
++      		use_poll = 1;
++      		//goto err_out;
++	}
++
++#ifdef SMC_USE_PXA_DMA
++	{
++		int dma = pxa_request_dma(dev->name, DMA_PRIO_LOW,
++					  smc_pxa_dma_irq, NULL);
++		if (dma >= 0)
++			dev->dma = dma;
++	}
++#endif
++
++	retval = register_netdev(dev);
++	if (retval == 0) {
++		/* now, print out the card info, in a short format.. */
++		printk("%s: %s (rev %d) at %p IRQ %d",
++			dev->name, version_string, revision_register & 0x0f,
++			lp->base, dev->irq);
++
++		if (dev->dma != (unsigned char)-1)
++			printk(" DMA %d", dev->dma);
++
++		printk("%s%s\n", nowait ? " [nowait]" : "",
++			THROTTLE_TX_PKTS ? " [throttle_tx]" : "");
++
++		if (!is_valid_ether_addr(dev->dev_addr)) {
++			printk("%s: Invalid ethernet MAC address.  Please "
++			       "set using ifconfig\n", dev->name);
++		} else {
++			/* Print the Ethernet address */
++			printk("%s: Ethernet addr: %s\n",
++			       dev->name, print_mac(mac, dev->dev_addr));
++		}
++
++		if (lp->phy_type == 0) {
++			PRINTK("%s: No PHY found\n", dev->name);
++		} else if ((lp->phy_type & 0xfffffff0) == 0x0016f840) {
++			PRINTK("%s: PHY LAN83C183 (LAN91C111 Internal)\n", dev->name);
++		} else if ((lp->phy_type & 0xfffffff0) == 0x02821c50) {
++			PRINTK("%s: PHY LAN83C180\n", dev->name);
++		}
++	}
++
++err_out:
++#ifdef SMC_USE_PXA_DMA
++	if (retval && dev->dma != (unsigned char)-1)
++		pxa_free_dma(dev->dma);
++#endif
++	return retval;
++}
++
++static int smc_enable_device(struct platform_device *pdev)
++{
++	unsigned long flags;
++	unsigned char ecor, ecsr;
++	void __iomem *addr;
++	struct resource * res;
++
++	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib");
++	if (!res)
++		return 0;
++
++        printk("smc91x-attrib resource found, start=%x !\n", res->start);
++
++	/*
++	 * Map the attribute space.  This is overkill, but clean.
++	 */
++	addr = ioremap(res->start, ATTRIB_SIZE);
++	if (!addr)
++		return -ENOMEM;
++
++        printk("smc91x-attrib resource remapped, start=%p !\n", addr);
++
++        /*
++	 * Reset the device.  We must disable IRQs around this
++	 * since a reset causes the IRQ line become active.
++	 */
++	local_irq_save(flags);
++	ecor = readb(addr + (ECOR << SMC_IO_SHIFT)) & ~ECOR_RESET;
++	writeb(ecor | ECOR_RESET, addr + (ECOR << SMC_IO_SHIFT));
++	readb(addr + (ECOR << SMC_IO_SHIFT));
++
++	/*
++	 * Wait 100us for the chip to reset.
++	 */
++	udelay(100);
++
++	/*
++	 * The device will ignore all writes to the enable bit while
++	 * reset is asserted, even if the reset bit is cleared in the
++	 * same write.  Must clear reset first, then enable the device.
++	 */
++	writeb(ecor, addr + (ECOR << SMC_IO_SHIFT));
++	writeb(ecor | ECOR_ENABLE, addr + (ECOR << SMC_IO_SHIFT));
++
++	/*
++	 * Set the appropriate byte/word mode.
++	 */
++	ecsr = readb(addr + (ECSR << SMC_IO_SHIFT)) & ~ECSR_IOIS8;
++	if (!SMC_CAN_USE_16BIT)
++		ecsr |= ECSR_IOIS8;
++	writeb(ecsr, addr + (ECSR << SMC_IO_SHIFT));
++	local_irq_restore(flags);
++
++	iounmap(addr);
++
++	/*
++	 * Wait for the chip to wake up.  We could poll the control
++	 * register in the main register space, but that isn't mapped
++	 * yet.  We know this is going to take 750us.
++	 */
++	msleep(1);
++
++	return 0;
++}
++
++static int smc_request_attrib(struct platform_device *pdev)
++{
++	struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib");
++
++	if (!res)
++		return 0;
++
++	if (!request_mem_region(res->start, ATTRIB_SIZE, CARDNAME))
++		return -EBUSY;
++
++	return 0;
++}
++
++static void smc_release_attrib(struct platform_device *pdev)
++{
++	struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib");
++
++	if (res)
++		release_mem_region(res->start, ATTRIB_SIZE);
++}
++
++static inline void smc_request_datacs(struct platform_device *pdev, struct net_device *ndev)
++{
++	if (SMC_CAN_USE_DATACS) {
++		struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-data32");
++		struct smc_local *lp = netdev_priv(ndev);
++
++		if (!res)
++			return;
++
++		if(!request_mem_region(res->start, SMC_DATA_EXTENT, CARDNAME)) {
++			printk(KERN_INFO "%s: failed to request datacs memory region.\n", CARDNAME);
++			return;
++		}
++
++		lp->datacs = ioremap(res->start, SMC_DATA_EXTENT);
++	}
++}
++
++static void smc_release_datacs(struct platform_device *pdev, struct net_device *ndev)
++{
++	if (SMC_CAN_USE_DATACS) {
++		struct smc_local *lp = netdev_priv(ndev);
++		struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-data32");
++
++		if (lp->datacs)
++			iounmap(lp->datacs);
++
++		lp->datacs = NULL;
++
++		if (res)
++			release_mem_region(res->start, SMC_DATA_EXTENT);
++	}
++}
++
++/*
++ * Resources defined and added to platform data in arch/m68k/atari/config.c
++ * These are left here for reference only!
++ */
++
++struct resource ethernat_attr = {
++	.start	= 0x80000000,
++	.end	= 0x800000FF,
++	.name	= "smc91x-attrib",
++	.flags	= IORESOURCE_MEM
++};
++
++struct resource ethernat_datacs = {
++	.start	= 0,
++	.end	= 0,
++	.name	= "smc91x-data32",
++	.flags	= IORESOURCE_MEM
++};
++
++/*
++ * smc_init(void)
++ *   Input parameters:
++ *	dev->base_addr == 0, try to find all possible locations
++ *	dev->base_addr > 0x1ff, this is the address to check
++ *	dev->base_addr == <anything else>, return failure code
++ *
++ *   Output:
++ *	0 --> there is a device
++ *	anything else, error
++ */
++
++static int __init atari_ethernat_pdev_probe(struct platform_device *pdev)
++{
++	struct net_device *ndev;
++	struct resource *res;
++	unsigned int __iomem *addr;
++	int ret;
++
++	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-regs");
++	if (!res)
++		res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++	if (!res) {
++		printk("smc91x-regs resource not found!\n");
++		ret = -ENODEV;
++		goto out;
++	}
++
++	printk("smc91x-regs resource found, start=%x !\n", res->start);
++
++	if (!request_mem_region(res->start, SMC_IO_EXTENT, CARDNAME)) {
++		printk("could not request smc91x-regs resource at %ul!\n", res->start);
++		ret = -EBUSY;
++		goto out;
++	}
++
++	ndev = alloc_etherdev(sizeof(struct smc_local));
++	if (!ndev) {
++		printk("%s: could not allocate device.\n", CARDNAME);
++		ret = -ENOMEM;
++		goto out_release_io;
++	}
++	SET_NETDEV_DEV(ndev, &pdev->dev);
++
++	ndev->dma = (unsigned char)-1;
++	ndev->irq = platform_get_irq(pdev, 0);
++	if (ndev->irq < 0) {
++		printk("atari_91C111: cannot determine interrupt! Using timer D poll...\n");
++		ndev->irq = IRQ_MFP_TIMD;
++		/* timer actually set up later */
++	}
++
++	ret = smc_request_attrib(pdev);
++	if (ret)
++		goto out_free_netdev;
++#if defined(CONFIG_SA1100_ASSABET)
++	NCR_0 |= NCR_ENET_OSC_EN;
++#endif
++	ret = smc_enable_device(pdev);
++	if (ret)
++		goto out_release_attrib;
++
++	addr = ioremap(res->start, SMC_IO_EXTENT);
++	if (!addr) {
++		ret = -ENOMEM;
++		goto out_release_attrib;
++	}
++
++	/*
++	 * Maybe postpone, see below?
++	 */
++#ifdef SMC_USE_PXA_DMA
++	{
++		struct smc_local *lp = netdev_priv(ndev);
++		lp->device = &pdev->dev;
++		lp->physaddr = res->start;
++	}
++#endif
++
++	printk("smc91x-regs resource remapped, start=%p!\n", addr);
++
++	// about to probe for device; need to enable net IRQ here!
++	// probe for base address + 0x23 or 0x20
++
++	platform_set_drvdata(pdev, ndev);
++	ret = smc_probe(ndev, addr);
++	if (ret != 0)
++		goto out_iounmap;
++	/*
++	 * allocation of lp and setting of device and physaddr maybe here instead?
++	 */
++#ifdef SMC_USE_PXA_DMA
++	else {
++		struct smc_local *lp = netdev_priv(ndev);
++		lp->physaddr = res->start;
++	}
++#endif
++
++
++	if (ndev->irq < 0) {
++		if (use_poll)
++			atari_ethernat_start_poll(ndev);
++	} else if (ndev->irq == IRQ_MFP_TIMD) {
++		// init timer if not already running
++		/* set Timer D data Register */
++		mfp.tim_dt_d = 123;	/* 200 Hz */
++		/* start timer D, div = 1:100 */
++		mfp.tim_ct_cd = (mfp.tim_ct_cd & 0xf0) | 0x6;
++	}
++
++	smc_request_datacs(pdev, ndev);
++
++	return 0;
++
++ out_iounmap:
++	platform_set_drvdata(pdev, NULL);
++	iounmap(addr);
++ out_release_attrib:
++	smc_release_attrib(pdev);
++ out_free_netdev:
++	free_netdev(ndev);
++ out_release_io:
++	release_mem_region(res->start, SMC_IO_EXTENT);
++ out:
++	printk("%s: not found (%d).\n", CARDNAME, ret);
++
++	return ret;
++}
++
++static int smc_drv_remove(struct platform_device *pdev)
++{
++	struct net_device *ndev = platform_get_drvdata(pdev);
++	struct smc_local *lp = netdev_priv(ndev);
++	struct resource *res;
++
++	platform_set_drvdata(pdev, NULL);
++
++	if (use_poll)
++		atari_ethernat_stop_poll(ndev);
++
++	unregister_netdev(ndev);
++
++	free_irq(ndev->irq, ndev);
++
++#ifdef SMC_USE_PXA_DMA
++	if (ndev->dma != (unsigned char)-1)
++		pxa_free_dma(ndev->dma);
++#endif
++	iounmap(lp->base);
++
++	smc_release_datacs(pdev,ndev);
++	smc_release_attrib(pdev);
++
++	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-regs");
++	if (!res)
++		platform_get_resource(pdev, IORESOURCE_MEM, 0);
++	release_mem_region(res->start, SMC_IO_EXTENT);
++
++	free_netdev(ndev);
++
++	return 0;
++}
++
++static int smc_drv_suspend(struct platform_device *dev, pm_message_t state)
++{
++	struct net_device *ndev = platform_get_drvdata(dev);
++
++	if (ndev) {
++		if (netif_running(ndev)) {
++			netif_device_detach(ndev);
++			smc_shutdown(ndev);
++			smc_phy_powerdown(ndev);
++		}
++	}
++	return 0;
++}
++
++static int smc_drv_resume(struct platform_device *dev)
++{
++	struct net_device *ndev = platform_get_drvdata(dev);
++
++	if (ndev) {
++		struct smc_local *lp = netdev_priv(ndev);
++		smc_enable_device(dev);
++		if (netif_running(ndev)) {
++			smc_reset(ndev);
++			smc_enable(ndev);
++			if (lp->phy_type != 0)
++				smc_phy_configure(&lp->phy_configure);
++			netif_device_attach(ndev);
++		}
++	}
++	return 0;
++}
++
++static struct platform_driver smc_driver = {
++	.probe		= atari_ethernat_pdev_probe,
++	.remove		= smc_drv_remove,
++	.suspend	= smc_drv_suspend,
++	.resume		= smc_drv_resume,
++	.driver		= {
++		.name	= CARDNAME,
++	},
++};
++
++static int __init smc_init(void)
++{
++#ifdef MODULE
++	if (io == -1)
++		printk(KERN_WARNING
++			"%s: You shouldn't use auto-probing with insmod!\n",
++			CARDNAME);
++#endif
++
++	return platform_driver_register(&smc_driver);
++}
++
++static void __exit smc_cleanup(void)
++{
++	platform_driver_unregister(&smc_driver);
++}
++
++module_init(smc_init);
++module_exit(smc_cleanup);
+--- a/include/asm-m68k/io.h
++++ b/include/asm-m68k/io.h
+@@ -457,6 +457,8 @@ static inline void isa_delay(void)
+ #define readw   isa_readw
+ #define writeb  isa_writeb
+ #define writew  isa_writew
++#define readsl  raw_insl
++#define writesl raw_outsl
+ #endif
+ 
+ #if !defined(CONFIG_ISA) && !defined(CONFIG_PCI) && !defined(CONFIG_ATARI_ROM_ISA)

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/atari-ethernec.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/atari-ethernec.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,1063 @@
+Subject: [PATCH] m68k: Atari EtherNEC driver
+Cc: Jeff Garzik <jgarzik at pobox.com>, netdev at vger.kernel.org
+
+From: Michael Schmitz <schmitz at opal.biophys.uni-duesseldorf.de>
+
+Atari EtherNEC driver
+
+Signed-off-by: Michael Schmitz <schmitz at debian.org>
+Signed-off-by: Roman Zippel <zippel at linux-m68k.org>
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ drivers/net/Makefile         |    1 
+ drivers/net/Space.c          |    4 
+ drivers/net/atari_ethernec.c | 1014 +++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 1019 insertions(+)
+
+--- a/drivers/net/Makefile
++++ b/drivers/net/Makefile
+@@ -197,6 +197,7 @@ obj-$(CONFIG_MIPS_SIM_NET) += mipsnet.o
+ obj-$(CONFIG_SGI_IOC3_ETH) += ioc3-eth.o
+ obj-$(CONFIG_DECLANCE) += declance.o
+ obj-$(CONFIG_ATARILANCE) += atarilance.o
++obj-$(CONFIG_ATARI_ETHERNEC) += atari_ethernec.o 8390.o
+ obj-$(CONFIG_A2065) += a2065.o
+ obj-$(CONFIG_HYDRA) += hydra.o
+ obj-$(CONFIG_ARIADNE) += ariadne.o
+--- a/drivers/net/Space.c
++++ b/drivers/net/Space.c
+@@ -72,6 +72,7 @@ extern struct net_device *SK_init(int un
+ extern struct net_device *seeq8005_probe(int unit);
+ extern struct net_device *smc_init(int unit);
+ extern struct net_device *atarilance_probe(int unit);
++extern struct net_device *atari_ethernec_probe(int unit);
+ extern struct net_device *sun3lance_probe(int unit);
+ extern struct net_device *sun3_82586_probe(int unit);
+ extern struct net_device *apne_probe(int unit);
+@@ -253,6 +254,9 @@ static struct devprobe2 m68k_probes[] __
+ #ifdef CONFIG_ATARILANCE	/* Lance-based Atari ethernet boards */
+ 	{atarilance_probe, 0},
+ #endif
++#ifdef CONFIG_ATARI_ETHERNEC	/* NE2000 based ROM port ethernet cards */
++	{atari_ethernec_probe, 0},
++#endif
+ #ifdef CONFIG_SUN3LANCE         /* sun3 onboard Lance chip */
+ 	{sun3lance_probe, 0},
+ #endif
+--- /dev/null
++++ b/drivers/net/atari_ethernec.c
+@@ -0,0 +1,1014 @@
++/*
++ * atari_ethernec.c: Atari cartridge port ethernet adapter
++ * (C) 2006 Michael Schmitz
++ *
++ * Modified after:
++ */
++
++/* ne.c: A general non-shared-memory NS8390 ethernet driver for linux. */
++/*
++    Written 1992-94 by Donald Becker.
++
++    Copyright 1993 United States Government as represented by the
++    Director, National Security Agency.
++
++    This software may be used and distributed according to the terms
++    of the GNU General Public License, incorporated herein by reference.
++
++    The author may be reached as becker at scyld.com, or C/O
++    Scyld Computing Corporation, 410 Severn Ave., Suite 210, Annapolis MD 21403
++
++    This driver should work with many programmed-I/O 8390-based ethernet
++    boards.  Currently it supports the NE1000, NE2000, many clones,
++    and some Cabletron products.
++
++    Changelog:
++
++    Paul Gortmaker	: use ENISR_RDC to monitor Tx PIO uploads, made
++			  sanity checks and bad clone support optional.
++    Paul Gortmaker	: new reset code, reset card after probe at boot.
++    Paul Gortmaker	: multiple card support for module users.
++    Paul Gortmaker	: Support for PCI ne2k clones, similar to lance.c
++    Paul Gortmaker	: Allow users with bad cards to avoid full probe.
++    Paul Gortmaker	: PCI probe changes, more PCI cards supported.
++    rjohnson at analogic.com : Changed init order so an interrupt will only
++    occur after memory is allocated for dev->priv. Deallocated memory
++    last in cleanup_modue()
++    Richard Guenther    : Added support for ISAPnP cards
++    Paul Gortmaker	: Discontinued PCI support - use ne2k-pci.c instead.
++    Hayato Fujiwara	: Add m32r support.
++
++*/
++
++/*
++ * From the driver distribution kit by Thomas Redelberger:
++ *
++ * Hardware circuit description (see directory ETHERNEC for schematics)
++ *
++ * As there is no reset line on the CP, a resistor and a capacitor are
++ * used to reset the NE card on power up.
++ *
++ * Reading from the NE card is done by a read cycle on the CP at address
++ * /ROM4 + 512*ISA address as the ISA address lines A0-A4 are connected
++ * to CP A9-A13. /ROM4 going low will start the ISA read cycle, enable
++ * the ISA bus buffers of the NE card and start decoding of the ISA IO
++ * address by the NE card. /ROM4 going high ends the cycle and the
++ * processor latches the data.
++ *
++ * Because the CP is read only writing to the NE card must be done with
++ * the trick to read from addresses that stand for the data. Dummy reads
++ * at /ROM3 base address + data*2 + ISA address*512 effect this. You
++ * might wonder why everything appears to be shifted up one bit. There is
++ * no CP "A0" address line. There are the signals /UDS and /LDS instead
++ * typical for the 68000 family. The original design which generated an
++ * "A0" worked on an ST and an STE but did not on a Falcon.
++ *
++ * The falling edge of /ROM3 enables the CP address lines A1-A8 onto the
++ * data bus and starts the ISA write cycle. The rising edge will end the
++ * ISA write cycle and the NE latches the data. The processor will also
++ * see and just read this same data but that is harmless.
++ * Elmar Hilgart reported that the bus buffer IC shall be an TTL F-type
++ * to keep up with the fast cycles on the Falcon.
++ *
++ * Base addresses:
++ * rom4            EQU     $00fa0000       ; ROM4 base address
++ * rom3            EQU     $00fb0000       ; ROM3 base address
++ *
++ */
++
++/* Routines for the NatSemi-based designs (NE[12]000). */
++
++static const char version1[] =
++"ne.c:v1.10 9/23/94 Donald Becker (becker at scyld.com)\n";
++static const char version2[] =
++"atari_ethernec.c 11/10/06 Michael Schmitz (schmitz at debian.org)\n";
++
++
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/wait.h>
++#include <linux/sched.h>
++#include <linux/errno.h>
++#include <linux/isapnp.h>
++#include <linux/init.h>
++#include <linux/interrupt.h>
++#include <linux/delay.h>
++#include <linux/netdevice.h>
++#include <linux/etherdevice.h>
++#include <linux/jiffies.h>
++#include <linux/workqueue.h>
++
++#include <asm/system.h>
++#include <asm/atarihw.h>
++#include <asm/atariints.h>
++#include <asm/io.h>
++
++#include "8390.h"
++
++#define DRV_NAME "ethernec"
++
++/* Some defines that people can play with if so inclined. */
++
++/* Do we support clones that don't adhere to 14,15 of the SAprom ? */
++#define SUPPORT_NE_BAD_CLONES
++
++/* Do we perform extra sanity checks on stuff ? */
++/* #define NE_SANITY_CHECK */
++
++/* Do we implement the read before write bugfix ? */
++/* #define NE_RW_BUGFIX */
++
++/* Do we have a non std. amount of memory? (in units of 256 byte pages) */
++/* #define PACKETBUF_MEMSIZE	0x40 */
++
++/* A zero-terminated list of I/O addresses to be probed at boot. */
++#ifndef MODULE
++static unsigned int netcard_portlist[] __initdata = {
++	0x300, 0x280, 0x320, 0x340, 0x360, 0x380, 0
++};
++#endif
++
++static struct isapnp_device_id isapnp_clone_list[] __initdata = {
++	{	ISAPNP_CARD_ID('A','X','E',0x2011),
++		ISAPNP_VENDOR('A','X','E'), ISAPNP_FUNCTION(0x2011),
++		(long) "NetGear EA201" },
++	{	ISAPNP_ANY_ID, ISAPNP_ANY_ID,
++		ISAPNP_VENDOR('E','D','I'), ISAPNP_FUNCTION(0x0216),
++		(long) "NN NE2000" },
++	{	ISAPNP_ANY_ID, ISAPNP_ANY_ID,
++		ISAPNP_VENDOR('P','N','P'), ISAPNP_FUNCTION(0x80d6),
++		(long) "Generic PNP" },
++	{ }	/* terminate list */
++};
++
++MODULE_DEVICE_TABLE(isapnp, isapnp_clone_list);
++
++#ifdef SUPPORT_NE_BAD_CLONES
++/* A list of bad clones that we none-the-less recognize. */
++static struct { const char *name8, *name16; unsigned char SAprefix[4];}
++bad_clone_list[] __initdata = {
++	{"DE100", "DE200", {0x00, 0xDE, 0x01,}},
++	{"DE120", "DE220", {0x00, 0x80, 0xc8,}},
++	{"DFI1000", "DFI2000", {'D', 'F', 'I',}}, /* Original, eh?  */
++	{"EtherNext UTP8", "EtherNext UTP16", {0x00, 0x00, 0x79}},
++	{"NE1000","NE2000-invalid", {0x00, 0x00, 0xd8}}, /* Ancient real NE1000. */
++	{"NN1000", "NN2000",  {0x08, 0x03, 0x08}}, /* Outlaw no-name clone. */
++	{"4-DIM8","4-DIM16", {0x00,0x00,0x4d,}},  /* Outlaw 4-Dimension cards. */
++	{"Con-Intl_8", "Con-Intl_16", {0x00, 0x00, 0x24}}, /* Connect Int'nl */
++	{"ET-100","ET-200", {0x00, 0x45, 0x54}}, /* YANG and YA clone */
++	{"COMPEX","COMPEX16",{0x00,0x80,0x48}}, /* Broken ISA Compex cards */
++	{"E-LAN100", "E-LAN200", {0x00, 0x00, 0x5d}}, /* Broken ne1000 clones */
++	{"PCM-4823", "PCM-4823", {0x00, 0xc0, 0x6c}}, /* Broken Advantech MoBo */
++	{"REALTEK", "RTL8019", {0x00, 0x00, 0xe8}}, /* no-name with Realtek chip */
++#if defined(CONFIG_TOSHIBA_RBTX4927) || defined(CONFIG_TOSHIBA_RBTX4938)
++	{"RBHMA4X00-RTL8019", "RBHMA4X00/RTL8019", {0x00, 0x60, 0x0a}},  /* Toshiba built-in */
++#endif
++	{"LCS-8834", "LCS-8836", {0x04, 0x04, 0x37}}, /* ShinyNet (SET) */
++	{NULL,}
++};
++#endif
++
++/* ---- No user-serviceable parts below ---- */
++
++#define NE_BASE	 (dev->base_addr)
++#define NE_CMD		0x00
++#define NE_DATAPORT	0x10	/* NatSemi-defined port window offset. */
++#define NE_RESET	0x1f	/* Issue a read to reset, a write to clear. */
++#define NE_IO_EXTENT	0x20
++
++#define NE1SM_START_PG	0x20	/* First page of TX buffer */
++#define NE1SM_STOP_PG	0x40	/* Last page +1 of RX ring */
++#define NESM_START_PG	0x40	/* First page of TX buffer */
++#define NESM_STOP_PG	0x80	/* Last page +1 of RX ring */
++
++#if defined(CONFIG_PLAT_MAPPI)
++#  define DCR_VAL 0x4b
++#elif defined(CONFIG_PLAT_OAKS32R)  || \
++   defined(CONFIG_TOSHIBA_RBTX4927) || defined(CONFIG_TOSHIBA_RBTX4938) || \
++   defined(CONFIG_ATARI_ETHERNEC) || defined(CONFIG_ATARI_ETHERNEC_MODULE)
++#  define DCR_VAL 0x48		/* 8-bit mode */
++#else
++#  define DCR_VAL 0x49
++#endif
++
++#if defined(CONFIG_ATARI_ETHERNEC) || defined(CONFIG_ATARI_ETHERNEC_MODULE)
++#  define ETHERNEC_RTL_8019_BASE 0x300
++#  define ETHERNEC_RTL_8019_IRQ IRQ_MFP_TIMD
++#endif
++
++static int ne_probe1(struct net_device *dev, int ioaddr);
++static int ne_probe_isapnp(struct net_device *dev);
++
++static int ne_open(struct net_device *dev);
++static int ne_close(struct net_device *dev);
++
++static void ne_reset_8390(struct net_device *dev);
++static void ne_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr,
++			    int ring_page);
++static void ne_block_input(struct net_device *dev, int count,
++			   struct sk_buff *skb, int ring_offset);
++static void ne_block_output(struct net_device *dev, const int count,
++			    const unsigned char *buf, const int start_page);
++
++
++/*
++ * The Atari ROM port has no interrupt line, so we poll the card instead.
++ */
++
++static int use_poll;
++
++/*
++ * This is used by cleanup, to prevent the module from being unloaded while
++ * intrpt_routine is still in the task queue
++ */
++static wait_queue_head_t WaitQ;
++
++static struct delayed_work tqueue;
++
++static struct net_device *poll_dev = NULL;
++
++static void atari_ethernec_int(struct work_struct *work)
++{
++	struct net_device *dev = poll_dev;
++
++	if (!dev) {
++		/* If cleanup wants us to die */
++		if (waitqueue_active(&WaitQ))
++			wake_up(&WaitQ);	/* Now cleanup_module can return */
++		else
++			/* Put ourselves back in the task queue */
++			schedule_delayed_work(&tqueue, 1);
++		return;
++	}
++
++	if (netif_running(dev))
++		ei_interrupt(dev->irq, dev);
++
++	/* If cleanup wants us to die */
++	if (waitqueue_active(&WaitQ))
++		wake_up(&WaitQ);	/* Now cleanup_module can return */
++	else
++		/* Put ourselves back in the task queue */
++		schedule_delayed_work(&tqueue, 0); /* reduced delay from 1 */
++}
++
++static void atari_ethernec_start_poll(struct net_device *dev)
++{
++	poll_dev = dev;
++
++	init_waitqueue_head(&WaitQ);
++
++	INIT_DELAYED_WORK(&tqueue, atari_ethernec_int);
++	schedule_delayed_work(&tqueue, 1);
++}
++
++static void atari_ethernec_stop_poll(struct net_device *dev)
++{
++	poll_dev = NULL;
++
++	if (dev)
++		sleep_on(&WaitQ);
++}
++
++
++/*  Probe for various non-shared-memory ethercards.
++
++   NEx000-clone boards have a Station Address PROM (SAPROM) in the packet
++   buffer memory space.  NE2000 clones have 0x57,0x57 in bytes 0x0e,0x0f of
++   the SAPROM, while other supposed NE2000 clones must be detected by their
++   SA prefix.
++
++   Reading the SAPROM from a word-wide card with the 8390 set in byte-wide
++   mode results in doubled values, which can be detected and compensated for.
++
++   The probe is also responsible for initializing the card and filling
++   in the 'dev' and 'ei_status' structures.
++
++   We use the minimum memory size for some ethercard product lines, iff we can't
++   distinguish models.  You can increase the packet buffer size by setting
++   PACKETBUF_MEMSIZE.  Reported Cabletron packet buffer locations are:
++	E1010   starts at 0x100 and ends at 0x2000.
++	E1010-x starts at 0x100 and ends at 0x8000. ("-x" means "more memory")
++	E2010	 starts at 0x100 and ends at 0x4000.
++	E2010-x starts at 0x100 and ends at 0xffff.
++*/
++
++static int __init do_ne_probe(struct net_device *dev)
++{
++	unsigned int base_addr = dev->base_addr;
++	int rv;
++#ifndef MODULE
++	int orig_irq = dev->irq;
++#endif
++
++	/* First check any supplied i/o locations. User knows best. <cough> */
++	if (base_addr > 0x1ff) {	/* Check a single specified location. */
++		rv = ne_probe1(dev, base_addr);
++		if (!rv && use_poll) {
++			/* Seems we have a valid device here; set up polling routine */
++			poll_dev = dev;
++			atari_ethernec_start_poll(dev);
++		}
++		return rv;
++	} else if (base_addr != 0)	/* Don't probe at all. */
++		return -ENXIO;
++
++	/* Then look for any installed ISAPnP clones */
++	if (isapnp_present() && (ne_probe_isapnp(dev) == 0))
++		return 0;
++
++#ifndef MODULE
++	/* Last resort. The semi-risky ISA auto-probe. */
++	for (base_addr = 0; netcard_portlist[base_addr] != 0; base_addr++) {
++		int ioaddr = netcard_portlist[base_addr];
++		dev->irq = orig_irq;
++		rv = ne_probe1(dev, ioaddr);
++		if (rv == 0) {
++			if (use_poll) {
++				poll_dev = dev;
++				atari_ethernec_start_poll(dev);
++			}
++			return 0;
++		}
++	}
++#endif
++
++	return -ENODEV;
++}
++
++#ifndef MODULE
++struct net_device * __init atari_ethernec_probe(int unit)
++{
++	struct net_device *dev = alloc_ei_netdev();
++	int err;
++
++	if (!dev)
++		return ERR_PTR(-ENOMEM);
++
++	sprintf(dev->name, "eth%d", unit);
++	netdev_boot_setup_check(dev);
++
++#if defined(CONFIG_ATARI_ETHERNEC)
++	dev->base_addr = ETHERNEC_RTL_8019_BASE;
++	dev->irq = ETHERNEC_RTL_8019_IRQ;
++#endif
++	err = do_ne_probe(dev);
++	if (err)
++		goto out;
++
++	/* Seems we have a valid device here; set up polling routine */
++	return dev;
++out:
++	free_netdev(dev);
++	return ERR_PTR(err);
++}
++#endif
++
++static int __init ne_probe_isapnp(struct net_device *dev)
++{
++	int i;
++
++	for (i = 0; isapnp_clone_list[i].vendor != 0; i++) {
++		struct pnp_dev *idev = NULL;
++
++		while ((idev = pnp_find_dev(NULL,
++					    isapnp_clone_list[i].vendor,
++					    isapnp_clone_list[i].function,
++					    idev))) {
++			/* Avoid already found cards from previous calls */
++			if (pnp_device_attach(idev) < 0)
++				continue;
++			if (pnp_activate_dev(idev) < 0) {
++				pnp_device_detach(idev);
++				continue;
++			}
++			/* if no io and irq, search for next */
++			if (!pnp_port_valid(idev, 0) || !pnp_irq_valid(idev, 0)) {
++				pnp_device_detach(idev);
++				continue;
++			}
++			/* found it */
++			dev->base_addr = pnp_port_start(idev, 0);
++			dev->irq = pnp_irq(idev, 0);
++			printk(KERN_INFO "atari_ethernec.c: ISAPnP reports %s at i/o %#lx, irq %d.\n",
++			       (char *) isapnp_clone_list[i].driver_data,
++			       dev->base_addr, dev->irq);
++			if (ne_probe1(dev, dev->base_addr) != 0) {	/* Shouldn't happen. */
++				printk(KERN_ERR "atari_ethernec.c: Probe of ISAPnP card at %#lx failed.\n",
++				       dev->base_addr);
++				pnp_device_detach(idev);
++				return -ENXIO;
++			}
++			ei_status.priv = (unsigned long)idev;
++			break;
++		}
++		if (!idev)
++			continue;
++		return 0;
++	}
++
++	return -ENODEV;
++}
++
++static int __init ne_probe1(struct net_device *dev, int ioaddr)
++{
++	int i;
++	unsigned char SA_prom[32];
++	int wordlength = 2;
++	const char *name = NULL;
++	int start_page, stop_page;
++	int neX000, ctron, copam, bad_card;
++	int reg0, ret;
++	static unsigned version_printed;
++
++	if (!request_region(ioaddr, NE_IO_EXTENT, DRV_NAME))
++		return -EBUSY;
++
++	reg0 = inb_p(ioaddr);
++	if (reg0 == 0xFF) {
++		ret = -ENODEV;
++		goto err_out;
++	}
++
++	/* Do a preliminary verification that we have a 8390. */
++	{
++		int regd;
++		outb_p(E8390_NODMA+E8390_PAGE1+E8390_STOP, ioaddr + E8390_CMD);
++		regd = inb_p(ioaddr + 0x0d);
++		outb_p(0xff, ioaddr + 0x0d);
++		outb_p(E8390_NODMA+E8390_PAGE0, ioaddr + E8390_CMD);
++		inb_p(ioaddr + EN0_COUNTER0); /* Clear the counter by reading. */
++		if (inb_p(ioaddr + EN0_COUNTER0) != 0) {
++			outb_p(reg0, ioaddr);
++			outb_p(regd, ioaddr + 0x0d);	/* Restore the old values. */
++			ret = -ENODEV;
++			goto err_out;
++		}
++	}
++
++	if (ei_debug && version_printed++ == 0)
++		printk(KERN_INFO "%s" KERN_INFO "%s", version1, version2);
++
++	/* A user with a poor card that fails to ack the reset, or that
++	   does not have a valid 0x57,0x57 signature can still use this
++	   without having to recompile. Specifying an i/o address along
++	   with an otherwise unused dev->mem_end value of "0xBAD" will
++	   cause the driver to skip these parts of the probe. */
++
++	bad_card = ((dev->base_addr != 0) && (dev->mem_end == 0xbad));
++
++	/* Reset card. Who knows what dain-bramaged state it was left in. */
++
++	{
++		unsigned long reset_start_time = jiffies;
++
++		/* DON'T change these to inb_p/outb_p or reset will fail on clones. */
++		outb(inb(ioaddr + NE_RESET), ioaddr + NE_RESET);
++
++		while ((inb_p(ioaddr + EN0_ISR) & ENISR_RESET) == 0) {
++			if (time_after(jiffies, reset_start_time + 2 * HZ / 100)) {
++				if (bad_card) {
++					printk(" (warning: no reset ack)");
++					break;
++				} else {
++					// MSch: ARAnyM exits here
++					printk(" not found (no reset ack).\n");
++					ret = -ENODEV;
++					goto err_out;
++				}
++			}
++		}
++
++		outb_p(0xff, ioaddr + EN0_ISR);		/* Ack all intr. */
++	}
++
++	/* Read the 16 bytes of station address PROM.
++	   We must first initialize registers, similar to NS8390_init(eifdev, 0).
++	   We can't reliably read the SAPROM address without this.
++	   (I learned the hard way!). */
++	{
++		struct {unsigned char value, offset; } program_seq[] =
++		{
++			{E8390_NODMA+E8390_PAGE0+E8390_STOP, E8390_CMD}, /* Select page 0*/
++			{0x48,	EN0_DCFG},	/* Set byte-wide (0x48) access. */
++			{0x00,	EN0_RCNTLO},	/* Clear the count regs. */
++			{0x00,	EN0_RCNTHI},
++			{0x00,	EN0_IMR},	/* Mask completion irq. */
++			{0xFF,	EN0_ISR},
++			{E8390_RXOFF, EN0_RXCR},	/* 0x20  Set to monitor */
++			{E8390_TXOFF, EN0_TXCR},	/* 0x02  and loopback mode. */
++			{32,	EN0_RCNTLO},
++			{0x00,	EN0_RCNTHI},
++			{0x00,	EN0_RSARLO},	/* DMA starting at 0x0000. */
++			{0x00,	EN0_RSARHI},
++			{E8390_RREAD+E8390_START, E8390_CMD},
++		};
++
++		for (i = 0; i < sizeof(program_seq)/sizeof(program_seq[0]); i++)
++			outb_p(program_seq[i].value, ioaddr + program_seq[i].offset);
++
++	}
++	for (i = 0; i < 32 /*sizeof(SA_prom)*/; i += 2) {
++		SA_prom[i] = inb(ioaddr + NE_DATAPORT);
++		SA_prom[i+1] = inb(ioaddr + NE_DATAPORT);
++		if (SA_prom[i] != SA_prom[i+1])
++			wordlength = 1;
++	}
++
++	if (wordlength == 2) {
++		for (i = 0; i < 16; i++)
++			SA_prom[i] = SA_prom[i+i];
++		/* We must set the 8390 for word mode. */
++		outb_p(DCR_VAL, ioaddr + EN0_DCFG);
++		start_page = NESM_START_PG;
++
++		/*
++		 * Realtek RTL8019AS datasheet says that the PSTOP register
++		 * shouldn't exceed 0x60 in 8-bit mode.
++		 * This chip can be identified by reading the signature from
++		 * the  remote byte count registers (otherwise write-only)...
++		 */
++		if ((DCR_VAL & 0x01) == 0 &&		/* 8-bit mode */
++		    inb(ioaddr + EN0_RCNTLO) == 0x50 &&
++		    inb(ioaddr + EN0_RCNTHI) == 0x70)
++			stop_page = 0x60;
++		else
++			stop_page = NESM_STOP_PG;
++	} else {
++		start_page = NE1SM_START_PG;
++		stop_page  = NE1SM_STOP_PG;
++	}
++
++#if  defined(CONFIG_PLAT_MAPPI) || defined(CONFIG_PLAT_OAKS32R)
++	neX000 = ((SA_prom[14] == 0x57 && SA_prom[15] == 0x57)
++		|| (SA_prom[14] == 0x42 && SA_prom[15] == 0x42));
++#else
++	neX000 = (SA_prom[14] == 0x57 && SA_prom[15] == 0x57);
++#endif
++	ctron =  (SA_prom[0] == 0x00 && SA_prom[1] == 0x00 && SA_prom[2] == 0x1d);
++	copam =  (SA_prom[14] == 0x49 && SA_prom[15] == 0x00);
++
++	/* Set up the rest of the parameters. */
++	if (neX000 || bad_card || copam) {
++		name = (wordlength == 2) ? "NE2000" : "NE1000";
++	} else if (ctron) {
++		name = (wordlength == 2) ? "Ctron-8" : "Ctron-16";
++		start_page = 0x01;
++		stop_page = (wordlength == 2) ? 0x40 : 0x20;
++	} else {
++#ifdef SUPPORT_NE_BAD_CLONES
++		/* Ack!  Well, there might be a *bad* NE*000 clone there.
++		   Check for total bogus addresses. */
++		for (i = 0; bad_clone_list[i].name8; i++) {
++			if (SA_prom[0] == bad_clone_list[i].SAprefix[0] &&
++			    SA_prom[1] == bad_clone_list[i].SAprefix[1] &&
++			    SA_prom[2] == bad_clone_list[i].SAprefix[2]) {
++				if (wordlength == 2) {
++					name = bad_clone_list[i].name16;
++				} else {
++					name = bad_clone_list[i].name8;
++				}
++				break;
++			}
++		}
++		if (bad_clone_list[i].name8 == NULL) {
++			printk(" not found (invalid signature %2.2x %2.2x).\n",
++			       SA_prom[14], SA_prom[15]);
++			ret = -ENXIO;
++			goto err_out;
++		}
++#else
++		printk(" not found.\n");
++		ret = -ENXIO;
++		goto err_out;
++#endif
++	}
++
++	if (dev->irq < 2) {
++		unsigned long cookie = probe_irq_on();
++		outb_p(0x50, ioaddr + EN0_IMR);	/* Enable one interrupt. */
++		outb_p(0x00, ioaddr + EN0_RCNTLO);
++		outb_p(0x00, ioaddr + EN0_RCNTHI);
++		outb_p(E8390_RREAD+E8390_START, ioaddr); /* Trigger it... */
++		mdelay(10);		/* wait 10ms for interrupt to propagate */
++		outb_p(0x00, ioaddr + EN0_IMR);		/* Mask it again. */
++		dev->irq = probe_irq_off(cookie);
++		if (ei_debug > 2)
++			printk(" autoirq is %d\n", dev->irq);
++	} else if (dev->irq == 2)
++		/* Fixup for users that don't know that IRQ 2 is really IRQ 9,
++		   or don't know which one to set. */
++		dev->irq = 9;
++
++	/*
++	 * use timer based polling!
++	 */
++	if (! dev->irq) {
++		printk(" failed to detect IRQ line. Assuming irq %d\n",
++		       ETHERNEC_RTL_8019_IRQ);
++		dev->irq = ETHERNEC_RTL_8019_IRQ;
++		/* timer routine set up in atari_ethernec_probe() */
++		if (dev->irq == IRQ_MFP_TIMD) {
++			/* set Timer D data Register */
++			mfp.tim_dt_d = 123;	/* 200 Hz */
++			/* start timer D, div = 1:100 */
++			mfp.tim_ct_cd = (mfp.tim_ct_cd & 0xf0) | 0x6;
++		}
++		ret = request_irq(dev->irq, ei_interrupt, 0, name, dev);
++		if (ret) {
++			printk(" unable to get IRQ %d (errno=%d), polling instead.\n",
++			       dev->irq, ret);
++			use_poll = 1;
++		}
++	} else {
++
++		/* Snarf the interrupt now.  There's no point in waiting since we cannot
++		   share and the board will usually be enabled. */
++		ret = request_irq(dev->irq, ei_interrupt, 0, name, dev);
++		if (ret) {
++			printk(" unable to get IRQ %d (errno=%d).\n", dev->irq, ret);
++			goto err_out;
++		}
++	}
++	dev->base_addr = ioaddr;
++
++#ifdef CONFIG_PLAT_MAPPI
++	outb_p(E8390_NODMA + E8390_PAGE1 + E8390_STOP,
++		ioaddr + E8390_CMD); /* 0x61 */
++	for (i = 0; i < ETHER_ADDR_LEN; i++) {
++		dev->dev_addr[i] = SA_prom[i] = inb_p(ioaddr + EN1_PHYS_SHIFT(i));
++		printk(" %2.2x", SA_prom[i]);
++	}
++#else
++	for (i = 0; i < ETHER_ADDR_LEN; i++) {
++		printk(" %2.2x", SA_prom[i]);
++		dev->dev_addr[i] = SA_prom[i];
++	}
++#endif
++
++	printk("\n%s: %s found at %#x, using IRQ %d.\n",
++		dev->name, name, ioaddr, dev->irq);
++
++	ei_status.name = name;
++	ei_status.tx_start_page = start_page;
++	ei_status.stop_page = stop_page;
++
++	/* Use 16-bit mode only if this wasn't overridden by DCR_VAL */
++	ei_status.word16 = (wordlength == 2 && (DCR_VAL & 0x01));
++
++	ei_status.rx_start_page = start_page + TX_PAGES;
++#ifdef PACKETBUF_MEMSIZE
++	/* Allow the packet buffer size to be overridden by know-it-alls. */
++	ei_status.stop_page = ei_status.tx_start_page + PACKETBUF_MEMSIZE;
++#endif
++
++	ei_status.reset_8390 = &ne_reset_8390;
++	ei_status.block_input = &ne_block_input;
++	ei_status.block_output = &ne_block_output;
++	ei_status.get_8390_hdr = &ne_get_8390_hdr;
++	ei_status.priv = 0;
++	dev->open = &ne_open;
++	dev->stop = &ne_close;
++#ifdef CONFIG_NET_POLL_CONTROLLER
++	dev->poll_controller = ei_poll;
++#endif
++	NS8390_init(dev, 0);
++
++	ret = register_netdev(dev);
++	if (ret)
++		goto out_irq;
++	return 0;
++
++out_irq:
++	free_irq(dev->irq, dev);
++err_out:
++	release_region(ioaddr, NE_IO_EXTENT);
++	return ret;
++}
++
++static int ne_open(struct net_device *dev)
++{
++	ei_open(dev);
++	return 0;
++}
++
++static int ne_close(struct net_device *dev)
++{
++	if (ei_debug > 1)
++		printk(KERN_DEBUG "%s: Shutting down ethercard.\n", dev->name);
++	ei_close(dev);
++	return 0;
++}
++
++/* Hard reset the card.  This used to pause for the same period that a
++   8390 reset command required, but that shouldn't be necessary. */
++
++static void ne_reset_8390(struct net_device *dev)
++{
++	unsigned long reset_start_time = jiffies;
++
++	if (ei_debug > 1)
++		printk(KERN_DEBUG "resetting the 8390 t=%ld...", jiffies);
++
++	/* DON'T change these to inb_p/outb_p or reset will fail on clones. */
++	outb(inb(NE_BASE + NE_RESET), NE_BASE + NE_RESET);
++
++	ei_status.txing = 0;
++	ei_status.dmaing = 0;
++
++	/* This check _should_not_ be necessary, omit eventually. */
++	while ((inb_p(NE_BASE+EN0_ISR) & ENISR_RESET) == 0) {
++		if (time_after(jiffies, reset_start_time + 2*HZ/100)) {
++			printk(KERN_WARNING "%s: ne_reset_8390() did not complete.\n",
++			       dev->name);
++			break;
++		}
++	}
++	outb_p(ENISR_RESET, NE_BASE + EN0_ISR);	/* Ack intr. */
++}
++
++/* Grab the 8390 specific header. Similar to the block_input routine, but
++   we don't need to be concerned with ring wrap as the header will be at
++   the start of a page, so we optimize accordingly. */
++
++static void ne_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr, int ring_page)
++{
++	int nic_base = dev->base_addr;
++
++	/* This *shouldn't* happen. If it does, it's the last thing you'll see */
++
++	if (ei_status.dmaing)
++	{
++		printk(KERN_EMERG "%s: DMAing conflict in ne_get_8390_hdr "
++			"[DMAstat:%d][irqlock:%d].\n",
++			dev->name, ei_status.dmaing, ei_status.irqlock);
++		return;
++	}
++
++	ei_status.dmaing |= 0x01;
++	outb_p(E8390_NODMA+E8390_PAGE0+E8390_START, nic_base+ NE_CMD);
++	outb_p(sizeof(struct e8390_pkt_hdr), nic_base + EN0_RCNTLO);
++	outb_p(0, nic_base + EN0_RCNTHI);
++	outb_p(0, nic_base + EN0_RSARLO);		/* On page boundary */
++	outb_p(ring_page, nic_base + EN0_RSARHI);
++	outb_p(E8390_RREAD+E8390_START, nic_base + NE_CMD);
++
++	if (ei_status.word16)
++		insw(NE_BASE + NE_DATAPORT, hdr, sizeof(struct e8390_pkt_hdr)>>1);
++	else
++		insb(NE_BASE + NE_DATAPORT, hdr, sizeof(struct e8390_pkt_hdr));
++
++	outb_p(ENISR_RDC, nic_base + EN0_ISR);	/* Ack intr. */
++	ei_status.dmaing &= ~0x01;
++
++	le16_to_cpus(&hdr->count);
++}
++
++/* Block input and output, similar to the Crynwr packet driver.  If you
++   are porting to a new ethercard, look at the packet driver source for hints.
++   The NEx000 doesn't share the on-board packet memory -- you have to put
++   the packet out through the "remote DMA" dataport using outb. */
++
++static void ne_block_input(struct net_device *dev, int count,
++			   struct sk_buff *skb, int ring_offset)
++{
++#ifdef NE_SANITY_CHECK
++	int xfer_count = count;
++#endif
++	int nic_base = dev->base_addr;
++	char *buf = skb->data;
++
++	/* This *shouldn't* happen. If it does, it's the last thing you'll see */
++	if (ei_status.dmaing) {
++		printk(KERN_EMERG "%s: DMAing conflict in ne_block_input "
++			"[DMAstat:%d][irqlock:%d].\n",
++			dev->name, ei_status.dmaing, ei_status.irqlock);
++		return;
++	}
++	ei_status.dmaing |= 0x01;
++	outb_p(E8390_NODMA+E8390_PAGE0+E8390_START, nic_base+ NE_CMD);
++	outb_p(count & 0xff, nic_base + EN0_RCNTLO);
++	outb_p(count >> 8, nic_base + EN0_RCNTHI);
++	outb_p(ring_offset & 0xff, nic_base + EN0_RSARLO);
++	outb_p(ring_offset >> 8, nic_base + EN0_RSARHI);
++	outb_p(E8390_RREAD+E8390_START, nic_base + NE_CMD);
++
++	if (ei_status.word16) {
++		insw(NE_BASE + NE_DATAPORT,buf,count>>1);
++		if (count & 0x01) {
++			buf[count-1] = inb(NE_BASE + NE_DATAPORT);
++#ifdef NE_SANITY_CHECK
++			xfer_count++;
++#endif
++		}
++	} else {
++		insb(NE_BASE + NE_DATAPORT, buf, count);
++	}
++
++#ifdef NE_SANITY_CHECK
++	/* This was for the ALPHA version only, but enough people have
++	   been encountering problems so it is still here.  If you see
++	   this message you either 1) have a slightly incompatible clone
++	   or 2) have noise/speed problems with your bus. */
++
++	if (ei_debug > 1) {
++		/* DMA termination address check... */
++		int addr, tries = 20;
++		do {
++			/* DON'T check for 'inb_p(EN0_ISR) & ENISR_RDC' here
++			   -- it's broken for Rx on some cards! */
++			int high = inb_p(nic_base + EN0_RSARHI);
++			int low = inb_p(nic_base + EN0_RSARLO);
++			addr = (high << 8) + low;
++			if (((ring_offset + xfer_count) & 0xff) == low)
++				break;
++		} while (--tries > 0);
++		if (tries <= 0)
++			printk(KERN_WARNING "%s: RX transfer address mismatch,"
++				"%#4.4x (expected) vs. %#4.4x (actual).\n",
++				dev->name, ring_offset + xfer_count, addr);
++	}
++#endif
++	outb_p(ENISR_RDC, nic_base + EN0_ISR);	/* Ack intr. */
++	ei_status.dmaing &= ~0x01;
++}
++
++static void ne_block_output(struct net_device *dev, int count,
++			    const unsigned char *buf, const int start_page)
++{
++	int nic_base = NE_BASE;
++	unsigned long dma_start;
++#ifdef NE_SANITY_CHECK
++	int retries = 0;
++#endif
++
++	/* Round the count up for word writes.  Do we need to do this?
++	   What effect will an odd byte count have on the 8390?
++	   I should check someday. */
++
++	if (ei_status.word16 && (count & 0x01))
++		count++;
++
++	/* This *shouldn't* happen. If it does, it's the last thing you'll see */
++	if (ei_status.dmaing) {
++		printk(KERN_EMERG "%s: DMAing conflict in ne_block_output."
++			"[DMAstat:%d][irqlock:%d]\n",
++			dev->name, ei_status.dmaing, ei_status.irqlock);
++		return;
++	}
++	ei_status.dmaing |= 0x01;
++	/* We should already be in page 0, but to be safe... */
++	outb_p(E8390_PAGE0+E8390_START+E8390_NODMA, nic_base + NE_CMD);
++
++#ifdef NE_SANITY_CHECK
++retry:
++#endif
++
++#ifdef NE8390_RW_BUGFIX
++	/* Handle the read-before-write bug the same way as the
++	   Crynwr packet driver -- the NatSemi method doesn't work.
++	   Actually this doesn't always work either, but if you have
++	   problems with your NEx000 this is better than nothing! */
++
++	outb_p(0x42, nic_base + EN0_RCNTLO);
++	outb_p(0x00,   nic_base + EN0_RCNTHI);
++	outb_p(0x42, nic_base + EN0_RSARLO);
++	outb_p(0x00, nic_base + EN0_RSARHI);
++	outb_p(E8390_RREAD+E8390_START, nic_base + NE_CMD);
++	/* Make certain that the dummy read has occurred. */
++	udelay(6);
++#endif
++
++	outb_p(ENISR_RDC, nic_base + EN0_ISR);
++
++	/* Now the normal output. */
++	outb_p(count & 0xff, nic_base + EN0_RCNTLO);
++	outb_p(count >> 8,   nic_base + EN0_RCNTHI);
++	outb_p(0x00, nic_base + EN0_RSARLO);
++	outb_p(start_page, nic_base + EN0_RSARHI);
++
++	outb_p(E8390_RWRITE+E8390_START, nic_base + NE_CMD);
++	if (ei_status.word16)
++		outsw(NE_BASE + NE_DATAPORT, buf, count>>1);
++	else
++		outsb(NE_BASE + NE_DATAPORT, buf, count);
++
++	dma_start = jiffies;
++
++#ifdef NE_SANITY_CHECK
++	/* This was for the ALPHA version only, but enough people have
++	   been encountering problems so it is still here. */
++
++	if (ei_debug > 1) {
++		/* DMA termination address check... */
++		int addr, tries = 20;
++		do {
++			int high = inb_p(nic_base + EN0_RSARHI);
++			int low = inb_p(nic_base + EN0_RSARLO);
++			addr = (high << 8) + low;
++			if ((start_page << 8) + count == addr)
++				break;
++		} while (--tries > 0);
++
++		if (tries <= 0) {
++			printk(KERN_WARNING "%s: Tx packet transfer address mismatch,"
++				"%#4.4x (expected) vs. %#4.4x (actual).\n",
++				dev->name, (start_page << 8) + count, addr);
++			if (retries++ == 0)
++				goto retry;
++		}
++	}
++#endif
++
++	while ((inb_p(nic_base + EN0_ISR) & ENISR_RDC) == 0) {
++		if (time_after(jiffies, dma_start + 2*HZ/100)) {		/* 20ms */
++			printk(KERN_WARNING "%s: timeout waiting for Tx RDC.\n", dev->name);
++			ne_reset_8390(dev);
++			NS8390_init(dev, 1);
++			break;
++		}
++	}
++
++	outb_p(ENISR_RDC, nic_base + EN0_ISR);	/* Ack intr. */
++	ei_status.dmaing &= ~0x01;
++	return;
++}
++
++
++#ifdef MODULE
++#define MAX_NE_CARDS	4	/* Max number of NE cards per module */
++static struct net_device *dev_ne[MAX_NE_CARDS];
++static int io[MAX_NE_CARDS];
++static int irq[MAX_NE_CARDS];
++static int bad[MAX_NE_CARDS];	/* 0xbad = bad sig or no reset ack */
++
++module_param_array(io, int, NULL, 0);
++module_param_array(irq, int, NULL, 0);
++module_param_array(bad, int, NULL, 0);
++module_param(use_poll, int, 0);
++MODULE_PARM_DESC(io, "I/O base address(es),required");
++MODULE_PARM_DESC(irq, "IRQ number(s)");
++MODULE_PARM_DESC(bad, "Accept card(s) with bad signatures");
++MODULE_PARM_DESC(use_poll, "Use timer interrupt to poll driver");
++MODULE_DESCRIPTION("NE1000/NE2000 ISA/PnP Ethernet driver");
++MODULE_LICENSE("GPL");
++
++/* This is set up so that no ISA autoprobe takes place. We can't guarantee
++that the ne2k probe is the last 8390 based probe to take place (as it
++is at boot) and so the probe will get confused by any other 8390 cards.
++ISA device autoprobes on a running machine are not recommended anyway. */
++
++int __init init_module(void)
++{
++	int this_dev, found = 0;
++
++	for (this_dev = 0; this_dev < MAX_NE_CARDS; this_dev++) {
++		struct net_device *dev = alloc_ei_netdev();
++		if (!dev)
++			break;
++		dev->irq = irq[this_dev];
++		dev->mem_end = bad[this_dev];
++		dev->base_addr = io[this_dev];
++		if (do_ne_probe(dev) == 0) {
++			dev_ne[found++] = dev;
++			continue;
++		}
++		free_netdev(dev);
++		if (found)
++			break;
++		if (io[this_dev] != 0)
++			printk(KERN_WARNING "atari_ethernec.c: No NE*000 card found at i/o = %#x\n", io[this_dev]);
++		else
++			printk(KERN_NOTICE "atari_ethernec.c: You must supply \"io=0xNNN\" value(s) for ISA cards.\n");
++		return -ENXIO;
++	}
++	if (found)
++		return 0;
++	return -ENODEV;
++}
++
++static void cleanup_card(struct net_device *dev)
++{
++	struct pnp_dev *idev = (struct pnp_dev *)ei_status.priv;
++	if (idev)
++		pnp_device_detach(idev);
++	free_irq(dev->irq, dev);
++	release_region(dev->base_addr, NE_IO_EXTENT);
++}
++
++void cleanup_module(void)
++{
++	int this_dev;
++
++	for (this_dev = 0; this_dev < MAX_NE_CARDS; this_dev++) {
++		struct net_device *dev = dev_ne[this_dev];
++		if (dev) {
++			if (use_poll)
++				atari_ethernec_stop_poll(dev);
++			unregister_netdev(dev);
++			cleanup_card(dev);
++			free_netdev(dev);
++		}
++	}
++}
++#endif /* MODULE */

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/atari-platform-device.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/atari-platform-device.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,73 @@
+arch/m68k/atari/ataints.c:	   ATARIHW_PRESENT(TT_MFP)) ||									\
+arch/m68k/atari/ataints.c:	   !((n) & 1) && ATARIHW_PRESENT(SCC)) ||						\
+arch/m68k/atari/ataints.c:	if (ATARIHW_PRESENT(TT_MFP)) {
+arch/m68k/atari/ataints.c:	if (ATARIHW_PRESENT(SCC) && !atari_SCC_reset_done) {
+arch/m68k/atari/ataints.c:	if (ATARIHW_PRESENT(SCU)) {
+arch/m68k/atari/ataints.c:	if (ATARIHW_PRESENT(PCM_8BIT) && ATARIHW_PRESENT(MICROWIRE)) {
+arch/m68k/atari/config.c:	if (!MACH_IS_HADES && !ATARIHW_PRESENT(ST_SCSI)) {
+arch/m68k/atari/config.c:		if (ATARIHW_PRESENT(MSTE_CLK))
+arch/m68k/atari/config.c:	if (ATARIHW_PRESENT(name))			\
+arch/m68k/atari/debug.c:	if (ATARIHW_PRESENT(TT_MFP) && baud >= 6) {
+drivers/block/ataflop.c:		if (ATARIHW_PRESENT(FDCSPEED))
+drivers/block/ataflop.c:	if (ATARIHW_PRESENT(FDCSPEED))
+drivers/block/ataflop.c:	if (ATARIHW_PRESENT(FDCSPEED))
+drivers/block/ataflop.c:	if (ATARIHW_PRESENT(FDCSPEED)) {
+drivers/block/ataflop.c:	if (ATARIHW_PRESENT(FDCSPEED))
+drivers/block/ataflop.c:		if (ATARIHW_PRESENT(EXTD_DMA)) {
+drivers/block/ataflop.c:			paddr = ATARIHW_PRESENT(EXTD_DMA) ? 
+drivers/block/ataflop.c:	if (ATARIHW_PRESENT(EXTD_DMA))
+drivers/block/ataflop.c:		if (ATARIHW_PRESENT( EXTD_DMA ))
+drivers/block/ataflop.c:			if (ATARIHW_PRESENT(FDCSPEED)) {
+drivers/block/ataflop.c:			addr = ATARIHW_PRESENT( EXTD_DMA ) ? ReqData : DMABuffer;
+drivers/block/ataflop.c:			if (!ATARIHW_PRESENT( EXTD_DMA ))
+drivers/block/ataflop.c:	if (ATARIHW_PRESENT( EXTD_DMA ))
+drivers/block/ataflop.c:		if (ATARIHW_PRESENT( FDCSPEED ) || MACH_IS_MEDUSA)
+drivers/block/ataflop.c:	if (ATARIHW_PRESENT(FDCSPEED))
+drivers/char/dsp56k.c:	if(!MACH_IS_ATARI || !ATARIHW_PRESENT(DSP56K)) {
+drivers/char/nvram.c:#define CHECK_DRIVER_INIT()	(MACH_IS_ATARI && ATARIHW_PRESENT(TT_CLK))
+drivers/ide/legacy/falconide.c:    if (MACH_IS_ATARI && ATARIHW_PRESENT(IDE)) {
+drivers/input/keyboard/atakbd.c:	if (!MACH_IS_ATARI || !ATARIHW_PRESENT(ST_MFP))
+drivers/input/mouse/atarimouse.c:	if (!MACH_IS_ATARI || !ATARIHW_PRESENT(ST_MFP))
+drivers/scsi/atari_scsi.c:#define	IS_A_TT()	ATARIHW_PRESENT(TT_SCSI)
+drivers/scsi/atari_scsi.c:	    (!ATARIHW_PRESENT(ST_SCSI) && !ATARIHW_PRESENT(TT_SCSI)) ||
+drivers/scsi/atari_scsi.c:		if (ATARIHW_PRESENT(TT_CLK) && nvram_check_checksum()) {
+drivers/scsi/atari_scsi.c:	if (MACH_IS_ATARI && ATARIHW_PRESENT(ST_SCSI) &&
+drivers/scsi/atari_scsi.c:	    !ATARIHW_PRESENT(EXTD_DMA) && m68k_num_memory > 1) {
+drivers/scsi/atari_scsi.c:		atari_dma_stram_mask = (ATARIHW_PRESENT(EXTD_DMA) ? 0x00000000
+drivers/video/atafb.c:	if (ATARIHW_PRESENT(PCM_8BIT)) {
+drivers/video/atafb.c:	if (ATARIHW_PRESENT(EXTD_SHIFTER)) {
+drivers/video/atafb.c:	var->red.length = ATARIHW_PRESENT(EXTD_SHIFTER) ? 4 : 3;
+drivers/video/atafb.c:	if (ATARIHW_PRESENT(EXTD_SHIFTER))
+drivers/video/atafb.c:	if (ATARIHW_PRESENT(EXTD_SHIFTER))
+drivers/video/atafb.c:	if (ATARIHW_PRESENT(PCM_8BIT)) {
+drivers/video/atafb.c:	if (!ATARIHW_PRESENT(EXTD_SHIFTER))
+drivers/video/atafb.c:	if (ATARIHW_PRESENT(EXTD_SHIFTER))
+drivers/video/atafb.c:	    (!ATARIHW_PRESENT(EXTD_SHIFTER) && var->xoffset))
+drivers/video/atafb.c:		if (ATARIHW_PRESENT(TT_SHIFTER)) {
+drivers/video/atafb.c:		if (ATARIHW_PRESENT(VIDEL_SHIFTER)) {
+drivers/video/atafb.c:		if (ATARIHW_PRESENT(STND_SHIFTER) ||
+drivers/video/atafb.c:		    ATARIHW_PRESENT(EXTD_SHIFTER)) {
+include/asm-m68k/atarihw.h:#define ATARIHW_PRESENT(name)	(atari_hw_present.name)
+sound/oss/dmasound/dmasound_atari.c:	if (MACH_IS_ATARI && ATARIHW_PRESENT(PCM_8BIT)) {
+sound/oss/dmasound/dmasound_atari.c:	    if (ATARIHW_PRESENT(CODEC)) {
+sound/oss/dmasound/dmasound_atari.c:	    } else if (ATARIHW_PRESENT(MICROWIRE)) {
+drivers/char/atari_scc.c:	int escc = ATARIHW_PRESENT(ST_ESCC);
+drivers/char/atari_scc.c:	if (!(ATARIHW_PRESENT(SCC) || ATARIHW_PRESENT(ST_ESCC)))
+drivers/char/atari_scc.c:	if (ATARIHW_PRESENT(TT_MFP) && baud >= 6) {
+---
+ arch/m68k/atari/platform.c |   10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+--- /dev/null
++++ b/arch/m68k/atari/platform.c
+@@ -0,0 +1,10 @@
++/*
++ *  Copyright (C) 2007 Geert Uytterhoeven
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License.  See the file COPYING in the main directory of this archive
++ * for more details.
++ */
++
++#include <linux/platform_device.h>
++

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/atari-rom-isa.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/atari-rom-isa.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,401 @@
+Subject: [PATCH] m68k: Atari ROM port ISA adapter support
+
+From: Michael Schmitz <schmitz at opal.biophys.uni-duesseldorf.de>
+
+Atari ROM port ISA adapter support
+
+Signed-off-by: Michael Schmitz <schmitz at debian.org>
+Signed-off-by: Roman Zippel <zippel at linux-m68k.org>
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ arch/m68k/Kconfig         |   10 +++
+ include/asm-m68k/io.h     |  137 ++++++++++++++++++++++++++++++++++++++++++++--
+ include/asm-m68k/raw_io.h |  116 ++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 258 insertions(+), 5 deletions(-)
+
+--- a/arch/m68k/Kconfig
++++ b/arch/m68k/Kconfig
+@@ -153,6 +153,16 @@ config PCI
+ 	  your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or
+ 	  VESA. If you have PCI, say Y, otherwise N.
+ 
++config ATARI_ROM_ISA
++	bool "Atari ROM port ISA adapter support"
++	depends on ATARI
++	help
++	  This option enables support for the ROM port ISA adapter used to
++	  operate ISA cards on Atari. Only 8  bit cards are supported, and
++	  no interrupt lines are connected.
++	  The only driver currently using this adapter is the EtherNEC
++	  driver for RTL8019AS based NE2000 compatible network cards.
++
+ config MAC
+ 	bool "Macintosh support"
+ 	depends on !MMU_SUN3
+--- a/include/asm-m68k/io.h
++++ b/include/asm-m68k/io.h
+@@ -83,9 +83,26 @@ extern unsigned long gg2_isa_base;
+ #endif
+ #endif /* AMIGA_PCMCIA */
+ 
++#ifdef CONFIG_ATARI_ROM_ISA
+ 
++#define enec_isa_read_base  0xfffa0000
++#define enec_isa_write_base 0xfffb0000
+ 
+-#ifdef CONFIG_ISA
++#define ENEC_ISA_IO_B(ioaddr)	(enec_isa_read_base+((((unsigned long)(ioaddr))&0x1F)<<9))
++#define ENEC_ISA_IO_W(ioaddr)	(enec_isa_read_base+((((unsigned long)(ioaddr))&0x1F)<<9))
++#define ENEC_ISA_MEM_B(madr)	(enec_isa_read_base+((((unsigned long)(madr))&0x1F)<<9))
++#define ENEC_ISA_MEM_W(madr)	(enec_isa_read_base+((((unsigned long)(madr))&0x1F)<<9))
++
++#ifndef MULTI_ISA
++#define MULTI_ISA 0
++#else
++#undef MULTI_ISA
++#define MULTI_ISA 1
++#endif
++#endif /* ATARI */
++
++
++#if defined(CONFIG_ISA) || defined(CONFIG_ATARI_ROM_ISA)
+ 
+ #if MULTI_ISA == 0
+ #undef MULTI_ISA
+@@ -94,6 +111,7 @@ extern unsigned long gg2_isa_base;
+ #define Q40_ISA (1)
+ #define GG2_ISA (2)
+ #define AG_ISA  (3)
++#define ENEC_ISA (4)
+ 
+ #if defined(CONFIG_Q40) && !defined(MULTI_ISA)
+ #define ISA_TYPE Q40_ISA
+@@ -107,6 +125,10 @@ extern unsigned long gg2_isa_base;
+ #define ISA_TYPE GG2_ISA
+ #define ISA_SEX  0
+ #endif
++#if defined(CONFIG_ATARI_ROM_ISA) && !defined(MULTI_ISA)
++#define ISA_TYPE ENEC_ISA
++#define ISA_SEX  0
++#endif
+ 
+ #ifdef MULTI_ISA
+ extern int isa_type;
+@@ -134,6 +156,9 @@ static inline u8 __iomem *isa_itb(unsign
+ #ifdef CONFIG_AMIGA_PCMCIA
+     case AG_ISA: return (u8 __iomem *)AG_ISA_IO_B(addr);
+ #endif
++#ifdef CONFIG_ATARI_ROM_ISA
++    case ENEC_ISA: return (u8 __iomem *)ENEC_ISA_IO_B(addr);
++#endif
+     default: return NULL; /* avoid warnings, just in case */
+     }
+ }
+@@ -150,6 +175,9 @@ static inline u16 __iomem *isa_itw(unsig
+ #ifdef CONFIG_AMIGA_PCMCIA
+     case AG_ISA: return (u16 __iomem *)AG_ISA_IO_W(addr);
+ #endif
++#ifdef CONFIG_ATARI_ROM_ISA
++    case ENEC_ISA: return (u16 __iomem *)ENEC_ISA_IO_W(addr);
++#endif
+     default: return NULL; /* avoid warnings, just in case */
+     }
+ }
+@@ -160,7 +188,7 @@ static inline u32 __iomem *isa_itl(unsig
+ #ifdef CONFIG_AMIGA_PCMCIA
+     case AG_ISA: return (u32 __iomem *)AG_ISA_IO_W(addr);
+ #endif
+-    default: return 0; /* avoid warnings, just in case */
++    default: return NULL; /* avoid warnings, just in case */
+     }
+ }
+ static inline u8 __iomem *isa_mtb(unsigned long addr)
+@@ -176,6 +204,9 @@ static inline u8 __iomem *isa_mtb(unsign
+ #ifdef CONFIG_AMIGA_PCMCIA
+     case AG_ISA: return (u8 __iomem *)addr;
+ #endif
++#ifdef CONFIG_ATARI_ROM_ISA
++    case ENEC_ISA: return (u8 __iomem *)ENEC_ISA_MEM_B(addr);
++#endif
+     default: return NULL; /* avoid warnings, just in case */
+     }
+ }
+@@ -192,6 +223,9 @@ static inline u16 __iomem *isa_mtw(unsig
+ #ifdef CONFIG_AMIGA_PCMCIA
+     case AG_ISA: return (u16 __iomem *)addr;
+ #endif
++#ifdef CONFIG_ATARI_ROM_ISA
++    case ENEC_ISA: return (u16 __iomem *)ENEC_ISA_MEM_W(addr);
++#endif
+     default: return NULL; /* avoid warnings, just in case */
+     }
+ }
+@@ -213,6 +247,34 @@ static inline u16 __iomem *isa_mtw(unsig
+ 	(ISA_SEX ? out_be16(isa_mtw((unsigned long)(p)),(val))	\
+ 		 : out_le16(isa_mtw((unsigned long)(p)),(val)))
+ 
++#if defined(CONFIG_ATARI_ROM_ISA)
++#define isa_rom_inb(port)      rom_in_8(isa_itb(port))
++#define isa_rom_inw(port)	\
++	(ISA_SEX ? rom_in_be16(isa_itw(port))	\
++		 : rom_in_le16(isa_itw(port)))
++#define isa_rom_inl(port)	\
++	(ISA_SEX ? rom_in_be32(isa_itw(port))	\
++		 : rom_in_le32(isa_itw(port)))
++
++#define isa_rom_outb(val, port) rom_out_8(isa_itb(port), (val))
++#define isa_rom_outw(val, port)	\
++	(ISA_SEX ? rom_out_be16(isa_itw(port), (val))	\
++		 : rom_out_le16(isa_itw(port), (val)))
++#define isa_rom_outl(val, port)	\
++	(ISA_SEX ? rom_out_be32(isa_itw(port), (val))	\
++		 : rom_out_le32(isa_itw(port), (val)))
++
++#define isa_rom_readb(p)       rom_in_8(isa_mtb((unsigned long)(p)))
++#define isa_rom_readw(p)       \
++	(ISA_SEX ? rom_in_be16(isa_mtw((unsigned long)(p)))	\
++		 : rom_in_le16(isa_mtw((unsigned long)(p))))
++
++#define isa_rom_writeb(val, p)  rom_out_8(isa_mtb((unsigned long)(p)), (val))
++#define isa_rom_writew(val, p)  \
++	(ISA_SEX ? rom_out_be16(isa_mtw((unsigned long)(p)), (val))	\
++		 : rom_out_le16(isa_mtw((unsigned long)(p)), (val)))
++#endif
++
+ static inline void isa_delay(void)
+ {
+   switch(ISA_TYPE)
+@@ -226,6 +288,9 @@ static inline void isa_delay(void)
+ #ifdef CONFIG_AMIGA_PCMCIA
+     case AG_ISA: break;
+ #endif
++#ifdef CONFIG_ATARI_ROM_ISA
++    case ENEC_ISA: break;
++#endif
+     default: break; /* avoid warnings */
+     }
+ }
+@@ -256,10 +321,40 @@ static inline void isa_delay(void)
+        (ISA_SEX ? raw_outsl(isa_itl(port), (u32 *)(buf), (nr)) :  \
+                   raw_outsw_swapw(isa_itw(port), (u16 *)(buf), (nr)<<1))
+ 
++
++#if defined(CONFIG_ATARI_ROM_ISA)
++#define isa_rom_inb_p(p)	({ u8 _v = isa_rom_inb(p); isa_delay(); _v; })
++#define isa_rom_inw_p(p)	({ u16 _v = isa_rom_inw(p); isa_delay(); _v; })
++#define isa_rom_inl_p(p)	({ u32 _v = isa_rom_inl(p); isa_delay(); _v; })
++#define isa_rom_outb_p(v, p)	({ isa_rom_outb((v), (p)); isa_delay(); })
++#define isa_rom_outw_p(v, p)	({ isa_rom_outw((v), (p)); isa_delay(); })
++#define isa_rom_outl_p(v, p)	({ isa_rom_outl((v), (p)); isa_delay(); })
++
++#define isa_rom_insb(port, buf, nr) raw_rom_insb(isa_itb(port), (u8 *)(buf), (nr))
++
++#define isa_rom_insw(port, buf, nr)     \
++       (ISA_SEX ? raw_rom_insw(isa_itw(port), (u16 *)(buf), (nr)) :    \
++		  raw_rom_insw_swapw(isa_itw(port), (u16 *)(buf), (nr)))
++
++#define isa_rom_insl(port, buf, nr)     \
++       (ISA_SEX ? raw_rom_insl(isa_itw(port), (u32 *)(buf), (nr)) :    \
++                  raw_rom_insw_swapw(isa_itw(port), (u16 *)(buf), (nr)<<1))
++
++#define isa_rom_outsb(port, buf, nr) raw_rom_outsb(isa_itb(port), (u8 *)(buf), (nr))
++
++#define isa_rom_outsw(port, buf, nr)    \
++       (ISA_SEX ? raw_rom_outsw(isa_itw(port), (u16 *)(buf), (nr)) :  \
++		  raw_rom_outsw_swapw(isa_itw(port), (u16 *)(buf), (nr)))
++
++#define isa_rom_outsl(port, buf, nr)    \
++       (ISA_SEX ? raw_rom_outsl(isa_itw(port), (u32 *)(buf), (nr)) :  \
++                  raw_rom_outsw_swapw(isa_itw(port), (u16 *)(buf), (nr)<<1))
++#endif
++
+ #endif  /* CONFIG_ISA */
+ 
+ 
+-#if defined(CONFIG_ISA) && !defined(CONFIG_PCI)
++#if defined(CONFIG_ISA) && !defined(CONFIG_PCI) && !defined(CONFIG_ATARI_ROM_ISA)
+ #define inb     isa_inb
+ #define inb_p   isa_inb_p
+ #define outb    isa_outb
+@@ -330,7 +425,41 @@ static inline void isa_delay(void)
+ #endif
+ #endif /* CONFIG_PCI */
+ 
+-#if !defined(CONFIG_ISA) && !defined(CONFIG_PCI)
++#if defined(CONFIG_ATARI_ROM_ISA)
++/*
++ * kernel with both ROM port ISA and IDE compiled in, those have
++ * conflicting defs for in/out. Simply consider port < 1024
++ * ROM port ISA and everything else regular ISA for IDE. read,write not defined
++ * in this case
++ */
++#define inb(port)	((port) < 1024 ? isa_rom_inb(port) : in_8(port))
++#define inb_p(port)	((port) < 1024 ? isa_rom_inb_p(port) : in_8(port))
++#define inw(port)	((port) < 1024 ? isa_rom_inw(port) : in_le16(port))
++#define inw_p(port)	((port) < 1024 ? isa_rom_inw_p(port) : in_le16(port))
++#define inl(port)	((port) < 1024 ? isa_rom_inl(port) : in_le32(port))
++#define inl_p(port)	((port) < 1024 ? isa_rom_inl_p(port) : in_le32(port))
++
++#define outb(val, port)	((port) < 1024 ? isa_rom_outb((val), (port)) : out_8((port), (val)))
++#define outb_p(val, port) ((port) < 1024 ? isa_rom_outb_p((val), (port)) : out_8((port), (val)))
++#define outw(val, port)	((port) < 1024 ? isa_rom_outw((val), (port)) : out_le16((port), (val)))
++#define outw_p(val, port) ((port) < 1024 ? isa_rom_outw_p((val), (port)) : out_le16((port), (val)))
++#define outl(val, port)	((port) < 1024 ? isa_rom_outl((val), (port)) : out_le32((port), (val)))
++#define outl_p(val, port) ((port) < 1024 ? isa_rom_outl_p((val), (port)) : out_le32((port), (val)))
++
++#define insb    isa_rom_insb
++#define insw    isa_rom_insw
++#define insl    isa_rom_insl
++#define outsb   isa_rom_outsb
++#define outsw   isa_rom_outsw
++#define outsl   isa_rom_outsl
++
++#define readb   isa_readb
++#define readw   isa_readw
++#define writeb  isa_writeb
++#define writew  isa_writew
++#endif
++
++#if !defined(CONFIG_ISA) && !defined(CONFIG_PCI) && !defined(CONFIG_ATARI_ROM_ISA)
+ /*
+  * We need to define dummy functions for GENERIC_IOMAP support.
+  */
+--- a/include/asm-m68k/raw_io.h
++++ b/include/asm-m68k/raw_io.h
+@@ -10,7 +10,7 @@
+ 
+ #ifdef __KERNEL__
+ 
+-#include <asm/types.h>
++#include <asm/byteorder.h>
+ 
+ 
+ /* Values for nocacheflag and cmode */
+@@ -60,6 +60,46 @@ extern void __iounmap(void *addr, unsign
+ #define __raw_writew(val,addr) out_be16((addr),(val))
+ #define __raw_writel(val,addr) out_be32((addr),(val))
+ 
++/*
++ * Atari ROM port (cartridge port) ISA adapter, used for the EtherNEC NE2000
++ * network card driver.
++ * The ISA adapter connects address lines A9-A13 to ISA address lines A0-A4,
++ * and hardwires the rest of the ISA addresses for a base address of 0x300.
++ *
++ * Data lines D8-D15 are connected to ISA data lines D0-D7 for reading.
++ * For writes, address lines A1-A8 are latched to ISA data lines D0-D7
++ * (meaning the bit pattern on A1-A8 can be read back as byte).
++ *
++ * Reads and writes are byte only.
++ */
++
++#if defined(CONFIG_ATARI_ROM_ISA)
++#define rom_in_8(addr) \
++	({ u16 __v = (*(__force volatile u16 *) (addr)); __v >>= 8; __v; })
++#define rom_in_be16(addr) \
++	({ u16 __v = (*(__force volatile u16 *) (addr)); __v >>= 8; __v; })
++#define rom_in_be32(addr) \
++	({ u32 __v = (*(__force volatile u32 *) (addr)); __v >>= 8; __v; })
++#define rom_in_le16(addr) \
++	({ u16 __v = le16_to_cpu(*(__force volatile u16 *) (addr)); __v >>= 8; __v; })
++#define rom_in_le32(addr) \
++	({ u32 __v = le32_to_cpu(*(__force volatile u32 *) (addr)); __v >>= 8; __v; })
++
++#define rom_out_8(addr, b)	({u8 __w, __v = (b); __w = ((*(__force volatile u8 *)  ((addr) + 0x10000 + (__v<<1)))); })
++#define rom_out_be16(addr, w)	({u16 __w, __v = (w); __w = ((*(__force volatile u16 *) ((addr) + 0x10000 + (__v<<1)))); })
++#define rom_out_be32(addr, l)	({u32 __w, __v = (l); __w = ((*(__force volatile u32 *) ((addr) + 0x10000 + (__v<<1)))); })
++#define rom_out_le16(addr, w)	({u16 __w, __v = cpu_to_le16(w); __w = ((*(__force volatile u16 *) ((addr) + 0x10000 + (__v<<1)))); })
++#define rom_out_le32(addr, l)	({u32 __w, __v = cpu_to_le32(l); __w = ((*(__force volatile u32 *) ((addr) + 0x10000 + (__v<<1)))); })
++
++#define raw_rom_inb rom_in_8
++#define raw_rom_inw rom_in_be16
++#define raw_rom_inl rom_in_be32
++
++#define raw_rom_outb(val, port) rom_out_8((port), (val))
++#define raw_rom_outw(val, port) rom_out_be16((port), (val))
++#define raw_rom_outl(val, port) rom_out_be32((port), (val))
++#endif /* CONFIG_ATARI_ROM_ISA */
++
+ static inline void raw_insb(volatile u8 __iomem *port, u8 *buf, unsigned int len)
+ {
+ 	unsigned int i;
+@@ -342,6 +382,80 @@ static inline void raw_outsw_swapw(volat
+ 		: "d0", "a0", "a1", "d6");
+ }
+ 
++
++#if defined(CONFIG_ATARI_ROM_ISA)
++static inline void raw_rom_insb(volatile u8 __iomem *port, u8 *buf, unsigned int len)
++{
++	unsigned int i;
++
++	for (i = 0; i < len; i++)
++		*buf++ = rom_in_8(port);
++}
++
++static inline void raw_rom_outsb(volatile u8 __iomem *port, const u8 *buf,
++			     unsigned int len)
++{
++	unsigned int i;
++
++	for (i = 0; i < len; i++)
++		rom_out_8(port, *buf++);
++}
++
++static inline void raw_rom_insw(volatile u16 __iomem *port, u16 *buf,
++				   unsigned int nr)
++{
++	unsigned int i;
++
++	for (i = 0; i < nr; i++)
++		*buf++ = rom_in_be16(port);
++}
++
++static inline void raw_rom_outsw(volatile u16 __iomem *port, const u16 *buf,
++				   unsigned int nr)
++{
++	unsigned int i;
++
++	for (i = 0; i < nr; i++)
++		rom_out_be16(port, *buf++);
++}
++
++static inline void raw_rom_insw_swapw(volatile u16 __iomem *port, u16 *buf,
++				   unsigned int nr)
++{
++	unsigned int i;
++
++	for (i = 0; i < nr; i++)
++		*buf++ = rom_in_le16(port);
++}
++
++static inline void raw_rom_outsw_swapw(volatile u16 __iomem *port, const u16 *buf,
++				   unsigned int nr)
++{
++	unsigned int i;
++
++	for (i = 0; i < nr; i++)
++		rom_out_le16(port, *buf++);
++}
++
++static inline void raw_rom_insl(volatile u16 __iomem *port, u32 *buf,
++				   unsigned int nr)
++{
++	unsigned int i;
++
++	for (i = 0; i < nr; i++)
++		*buf++ = rom_in_be32(port);
++}
++
++static inline void raw_rom_outsl(volatile u16 __iomem *port, const u32 *buf,
++				   unsigned int nr)
++{
++	unsigned int i;
++
++	for (i = 0; i < nr; i++)
++		rom_out_be32(port, *buf++);
++}
++#endif /* CONFIG_ATARI_ROM_ISA */
++
+ #endif /* __KERNEL__ */
+ 
+ #endif /* _RAW_IO_H */

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/b43-depends-on-HAS_DMA.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/b43-depends-on-HAS_DMA.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,32 @@
+Subject: b43 should depend on HAS_DMA
+To: Michael Buesch <mb at bu3sch.de>, Stefano Brivio <st3 at riseup.net>
+Cc: linux-wireless at vger.kernel.org
+
+b43 should depend on HAS_DMA
+
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ drivers/net/wireless/b43/Kconfig       |    2 +-
+ drivers/net/wireless/b43legacy/Kconfig |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/wireless/b43/Kconfig
++++ b/drivers/net/wireless/b43/Kconfig
+@@ -1,6 +1,6 @@
+ config B43
+ 	tristate "Broadcom 43xx wireless support (mac80211 stack)"
+-	depends on SSB_POSSIBLE && MAC80211 && WLAN_80211
++	depends on SSB_POSSIBLE && MAC80211 && WLAN_80211 && HAS_DMA
+ 	select SSB
+ 	select FW_LOADER
+ 	select HW_RANDOM
+--- a/drivers/net/wireless/b43legacy/Kconfig
++++ b/drivers/net/wireless/b43legacy/Kconfig
+@@ -1,6 +1,6 @@
+ config B43LEGACY
+ 	tristate "Broadcom 43xx-legacy wireless support (mac80211 stack)"
+-	depends on SSB_POSSIBLE && MAC80211 && WLAN_80211
++	depends on SSB_POSSIBLE && MAC80211 && WLAN_80211 && HAS_DMA
+ 	select SSB
+ 	select FW_LOADER
+ 	select HW_RANDOM

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/blinux-list-is-subscribers-only.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/blinux-list-is-subscribers-only.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,15 @@
+---
+ MAINTAINERS |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/MAINTAINERS
++++ b/MAINTAINERS
+@@ -1390,7 +1390,7 @@ S:	Supported
+ DOUBLETALK DRIVER
+ P:	James R. Van Zandt
+ M:	jrv at vanzandt.mv.com
+-L:	blinux-list at redhat.com
++L:	blinux-list at redhat.com (subscribers-only)
+ S:	Maintained
+ 
+ DRIVER CORE, KOBJECTS, AND SYSFS

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/drivers-input-serio-hp_sdc.c-needs-linux-semaphore.h.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/drivers-input-serio-hp_sdc.c-needs-linux-semaphore.h.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,22 @@
+Subject: [PATCH] drivers/input/serio/hp_sdc.c needs <linux/semaphore.h>
+
+From: Geert Uytterhoeven <geert at linux-m68k.org>
+
+drivers/input/serio/hp_sdc.c: In function 'hp_sdc_take':
+drivers/input/serio/hp_sdc.c:198: error: implicit declaration of function 'up'
+
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ drivers/input/serio/hp_sdc.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/input/serio/hp_sdc.c
++++ b/drivers/input/serio/hp_sdc.c
+@@ -69,6 +69,7 @@
+ #include <linux/time.h>
+ #include <linux/slab.h>
+ #include <linux/hil.h>
++#include <linux/semaphore.h>
+ #include <asm/io.h>
+ #include <asm/system.h>
+ 

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/ext4-adilger-bounces.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/ext4-adilger-bounces.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,27 @@
+Subject: MAINTAINERS: Update the email address of Andreas Dilger
+
+MAINTAINERS: Update the email address of Andreas Dilger
+
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ MAINTAINERS |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/MAINTAINERS
++++ b/MAINTAINERS
+@@ -1578,13 +1578,13 @@ S:	Maintained
+ 
+ EXT3 FILE SYSTEM
+ P:	Stephen Tweedie, Andrew Morton
+-M:	sct at redhat.com, akpm at linux-foundation.org, adilger at clusterfs.com
++M:	sct at redhat.com, akpm at linux-foundation.org, adilger at sun.com
+ L:	linux-ext4 at vger.kernel.org
+ S:	Maintained
+ 
+ EXT4 FILE SYSTEM
+ P:	Stephen Tweedie, Andrew Morton
+-M:	sct at redhat.com, akpm at linux-foundation.org, adilger at clusterfs.com
++M:	sct at redhat.com, akpm at linux-foundation.org, adilger at sun.com
+ L:	linux-ext4 at vger.kernel.org
+ S:	Maintained
+ 

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/ext4-bitops-fix.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/ext4-bitops-fix.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,18 @@
+---
+ include/asm-m68k/bitops.h |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/include/asm-m68k/bitops.h
++++ b/include/asm-m68k/bitops.h
+@@ -410,6 +410,11 @@ static inline int ext2_find_next_zero_bi
+ 	res = ext2_find_first_zero_bit (p, size - 32 * (p - addr));
+ 	return (p - addr) * 32 + res;
+ }
++
++extern unsigned long generic_find_next_le_bit(const unsigned long *addr,
++					      unsigned long size,
++					      unsigned long offset);
++
+ #define ext2_find_next_bit(addr, size, off) \
+ 	generic_find_next_le_bit((unsigned long *)(addr), (size), (off))
+ 

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/falconide_intr_lock-ratelimit.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/falconide_intr_lock-ratelimit.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,22 @@
+Subject: [PATCH] m68k: Ratelimit ide_release_lock bug messages
+
+Ratelimit the annoying ide_release_lock bug messages as attempting to release
+the already released lock does not appear to cause any harm in practice.
+
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ include/asm-m68k/ide.h |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/include/asm-m68k/ide.h
++++ b/include/asm-m68k/ide.h
+@@ -114,7 +114,8 @@ static __inline__ void ide_release_lock 
+ {
+ 	if (MACH_IS_ATARI) {
+ 		if (falconide_intr_lock == 0) {
+-			printk("ide_release_lock: bug\n");
++			if (printk_ratelimit())
++				printk("ide_release_lock: bug\n");
+ 			return;
+ 		}
+ 		falconide_intr_lock = 0;

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/fb-CONFIG_FB_DEFERRED_IO-should-default-to-n.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/fb-CONFIG_FB_DEFERRED_IO-should-default-to-n.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,25 @@
+Subject: [PATCH] fbdev: Do not let CONFIG_FB_DEFERRED_IO default to y
+
+From: Geert Uytterhoeven <geert at linux-m68k.org>
+
+CONFIG_FB_DEFERRED_IO can not be turned off, while it's already selected
+automatically by the drivers that need it.
+
+Although it's nice to have more compile-coverage, not being able to disable a
+rarely used feature is annoying.
+
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ drivers/video/Kconfig |    1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/drivers/video/Kconfig
++++ b/drivers/video/Kconfig
+@@ -147,7 +147,6 @@ config FB_SYS_FOPS
+ config FB_DEFERRED_IO
+ 	bool
+ 	depends on FB
+-	default y
+ 
+ config FB_SVGALIB
+ 	tristate

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-add-multi_defconfig.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-add-multi_defconfig.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,1270 @@
+Subject: [PATCH] m68k: Add multi_defconfig
+
+From: Geert Uytterhoeven <geert at linux-m68k.org>
+
+Add multi_defconfig, to build a kernel for all supported m68k platforms,
+excluding Sun 3 (Sun 3 kernels are incompatible with all other m68k platforms)
+
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ arch/m68k/configs/multi_defconfig | 1255 ++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 1255 insertions(+)
+
+--- /dev/null
++++ b/arch/m68k/configs/multi_defconfig
+@@ -0,0 +1,1255 @@
++#
++# Automatically generated make config: don't edit
++# Linux kernel version: 2.6.25
++# Wed Apr 23 22:39:35 2008
++#
++CONFIG_M68K=y
++CONFIG_MMU=y
++CONFIG_RWSEM_GENERIC_SPINLOCK=y
++# CONFIG_ARCH_HAS_ILOG2_U32 is not set
++# CONFIG_ARCH_HAS_ILOG2_U64 is not set
++CONFIG_GENERIC_HWEIGHT=y
++CONFIG_GENERIC_CALIBRATE_DELAY=y
++CONFIG_TIME_LOW_RES=y
++CONFIG_GENERIC_IOMAP=y
++CONFIG_NO_IOPORT=y
++# CONFIG_NO_DMA is not set
++CONFIG_ARCH_SUPPORTS_AOUT=y
++CONFIG_HZ=100
++CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
++
++#
++# General setup
++#
++CONFIG_EXPERIMENTAL=y
++CONFIG_BROKEN_ON_SMP=y
++CONFIG_INIT_ENV_ARG_LIMIT=32
++CONFIG_LOCALVERSION="-multi"
++CONFIG_LOCALVERSION_AUTO=y
++CONFIG_SWAP=y
++CONFIG_SYSVIPC=y
++CONFIG_SYSVIPC_SYSCTL=y
++CONFIG_POSIX_MQUEUE=y
++CONFIG_BSD_PROCESS_ACCT=y
++# CONFIG_BSD_PROCESS_ACCT_V3 is not set
++# CONFIG_TASKSTATS is not set
++# CONFIG_AUDIT is not set
++# CONFIG_IKCONFIG is not set
++CONFIG_LOG_BUF_SHIFT=14
++# CONFIG_CGROUPS is not set
++# CONFIG_GROUP_SCHED is not set
++# CONFIG_SYSFS_DEPRECATED_V2 is not set
++CONFIG_RELAY=y
++CONFIG_NAMESPACES=y
++# CONFIG_UTS_NS is not set
++# CONFIG_IPC_NS is not set
++# CONFIG_USER_NS is not set
++# CONFIG_PID_NS is not set
++CONFIG_BLK_DEV_INITRD=y
++CONFIG_INITRAMFS_SOURCE=""
++# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
++CONFIG_SYSCTL=y
++# CONFIG_EMBEDDED is not set
++CONFIG_UID16=y
++CONFIG_SYSCTL_SYSCALL=y
++CONFIG_KALLSYMS=y
++# CONFIG_KALLSYMS_EXTRA_PASS is not set
++CONFIG_HOTPLUG=y
++CONFIG_PRINTK=y
++CONFIG_BUG=y
++CONFIG_ELF_CORE=y
++# CONFIG_COMPAT_BRK is not set
++CONFIG_BASE_FULL=y
++CONFIG_FUTEX=y
++CONFIG_ANON_INODES=y
++CONFIG_EPOLL=y
++CONFIG_SIGNALFD=y
++CONFIG_TIMERFD=y
++CONFIG_EVENTFD=y
++CONFIG_SHMEM=y
++CONFIG_VM_EVENT_COUNTERS=y
++CONFIG_SLAB=y
++# CONFIG_SLUB is not set
++# CONFIG_SLOB is not set
++# CONFIG_PROFILING is not set
++# CONFIG_MARKERS is not set
++# CONFIG_HAVE_OPROFILE is not set
++# CONFIG_HAVE_KPROBES is not set
++# CONFIG_HAVE_KRETPROBES is not set
++CONFIG_PROC_PAGE_MONITOR=y
++CONFIG_SLABINFO=y
++CONFIG_RT_MUTEXES=y
++# CONFIG_TINY_SHMEM is not set
++CONFIG_BASE_SMALL=0
++CONFIG_MODULES=y
++CONFIG_MODULE_UNLOAD=y
++# CONFIG_MODULE_FORCE_UNLOAD is not set
++# CONFIG_MODVERSIONS is not set
++# CONFIG_MODULE_SRCVERSION_ALL is not set
++CONFIG_KMOD=y
++CONFIG_BLOCK=y
++# CONFIG_LBD is not set
++# CONFIG_BLK_DEV_IO_TRACE is not set
++# CONFIG_LSF is not set
++CONFIG_BLK_DEV_BSG=y
++
++#
++# IO Schedulers
++#
++CONFIG_IOSCHED_NOOP=y
++CONFIG_IOSCHED_AS=y
++CONFIG_IOSCHED_DEADLINE=y
++CONFIG_IOSCHED_CFQ=y
++CONFIG_DEFAULT_AS=y
++# CONFIG_DEFAULT_DEADLINE is not set
++# CONFIG_DEFAULT_CFQ is not set
++# CONFIG_DEFAULT_NOOP is not set
++CONFIG_DEFAULT_IOSCHED="anticipatory"
++CONFIG_CLASSIC_RCU=y
++
++#
++# Platform dependent setup
++#
++# CONFIG_SUN3 is not set
++CONFIG_AMIGA=y
++CONFIG_ATARI=y
++CONFIG_MAC=y
++CONFIG_NUBUS=y
++CONFIG_M68K_L2_CACHE=y
++CONFIG_APOLLO=y
++CONFIG_VME=y
++CONFIG_MVME147=y
++CONFIG_MVME16x=y
++CONFIG_BVME6000=y
++CONFIG_HP300=y
++CONFIG_DIO=y
++CONFIG_SUN3X=y
++CONFIG_Q40=y
++
++#
++# Processor type
++#
++CONFIG_M68020=y
++CONFIG_M68030=y
++CONFIG_M68040=y
++CONFIG_M68060=y
++CONFIG_MMU_MOTOROLA=y
++# CONFIG_M68KFPU_EMU is not set
++# CONFIG_ADVANCED is not set
++CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
++CONFIG_NODES_SHIFT=3
++CONFIG_SELECT_MEMORY_MODEL=y
++# CONFIG_FLATMEM_MANUAL is not set
++CONFIG_DISCONTIGMEM_MANUAL=y
++# CONFIG_SPARSEMEM_MANUAL is not set
++CONFIG_DISCONTIGMEM=y
++CONFIG_FLAT_NODE_MEM_MAP=y
++CONFIG_NEED_MULTIPLE_NODES=y
++# CONFIG_SPARSEMEM_STATIC is not set
++# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
++CONFIG_SPLIT_PTLOCK_CPUS=4
++# CONFIG_RESOURCES_64BIT is not set
++CONFIG_ZONE_DMA_FLAG=1
++CONFIG_BOUNCE=y
++CONFIG_VIRT_TO_BUS=y
++
++#
++# General setup
++#
++CONFIG_BINFMT_ELF=y
++CONFIG_BINFMT_AOUT=m
++CONFIG_BINFMT_MISC=m
++CONFIG_ZORRO=y
++CONFIG_AMIGA_PCMCIA=y
++CONFIG_STRAM_PROC=y
++CONFIG_HEARTBEAT=y
++CONFIG_PROC_HARDWARE=y
++CONFIG_ISA=y
++CONFIG_GENERIC_ISA_DMA=y
++CONFIG_ZONE_DMA=y
++# CONFIG_ARCH_SUPPORTS_MSI is not set
++CONFIG_ZORRO_NAMES=y
++
++#
++# Networking
++#
++CONFIG_NET=y
++
++#
++# Networking options
++#
++CONFIG_PACKET=y
++# CONFIG_PACKET_MMAP is not set
++CONFIG_UNIX=y
++CONFIG_XFRM=y
++# CONFIG_XFRM_USER is not set
++# CONFIG_XFRM_SUB_POLICY is not set
++CONFIG_XFRM_MIGRATE=y
++# CONFIG_XFRM_STATISTICS is not set
++CONFIG_NET_KEY=y
++CONFIG_NET_KEY_MIGRATE=y
++CONFIG_INET=y
++# CONFIG_IP_MULTICAST is not set
++# CONFIG_IP_ADVANCED_ROUTER is not set
++CONFIG_IP_FIB_HASH=y
++CONFIG_IP_PNP=y
++CONFIG_IP_PNP_DHCP=y
++CONFIG_IP_PNP_BOOTP=y
++CONFIG_IP_PNP_RARP=y
++CONFIG_NET_IPIP=m
++CONFIG_NET_IPGRE=m
++# CONFIG_ARPD is not set
++CONFIG_SYN_COOKIES=y
++CONFIG_INET_AH=m
++CONFIG_INET_ESP=m
++CONFIG_INET_IPCOMP=m
++CONFIG_INET_XFRM_TUNNEL=m
++CONFIG_INET_TUNNEL=m
++CONFIG_INET_XFRM_MODE_TRANSPORT=m
++CONFIG_INET_XFRM_MODE_TUNNEL=m
++CONFIG_INET_XFRM_MODE_BEET=m
++CONFIG_INET_LRO=m
++CONFIG_INET_DIAG=m
++CONFIG_INET_TCP_DIAG=m
++# CONFIG_TCP_CONG_ADVANCED is not set
++CONFIG_TCP_CONG_CUBIC=y
++CONFIG_DEFAULT_TCP_CONG="cubic"
++# CONFIG_TCP_MD5SIG is not set
++# CONFIG_IP_VS is not set
++CONFIG_IPV6=m
++CONFIG_IPV6_PRIVACY=y
++CONFIG_IPV6_ROUTER_PREF=y
++CONFIG_IPV6_ROUTE_INFO=y
++# CONFIG_IPV6_OPTIMISTIC_DAD is not set
++CONFIG_INET6_AH=m
++CONFIG_INET6_ESP=m
++CONFIG_INET6_IPCOMP=m
++# CONFIG_IPV6_MIP6 is not set
++CONFIG_INET6_XFRM_TUNNEL=m
++CONFIG_INET6_TUNNEL=m
++CONFIG_INET6_XFRM_MODE_TRANSPORT=m
++CONFIG_INET6_XFRM_MODE_TUNNEL=m
++CONFIG_INET6_XFRM_MODE_BEET=m
++CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
++CONFIG_IPV6_SIT=m
++CONFIG_IPV6_NDISC_NODETYPE=y
++CONFIG_IPV6_TUNNEL=m
++# CONFIG_IPV6_MULTIPLE_TABLES is not set
++# CONFIG_IPV6_MROUTE is not set
++# CONFIG_NETWORK_SECMARK is not set
++CONFIG_NETFILTER=y
++# CONFIG_NETFILTER_DEBUG is not set
++CONFIG_NETFILTER_ADVANCED=y
++
++#
++# Core Netfilter Configuration
++#
++CONFIG_NETFILTER_NETLINK=m
++CONFIG_NETFILTER_NETLINK_QUEUE=m
++CONFIG_NETFILTER_NETLINK_LOG=m
++CONFIG_NF_CONNTRACK=m
++CONFIG_NF_CT_ACCT=y
++CONFIG_NF_CONNTRACK_MARK=y
++# CONFIG_NF_CONNTRACK_EVENTS is not set
++# CONFIG_NF_CT_PROTO_DCCP is not set
++CONFIG_NF_CT_PROTO_GRE=m
++CONFIG_NF_CT_PROTO_SCTP=m
++CONFIG_NF_CT_PROTO_UDPLITE=m
++CONFIG_NF_CONNTRACK_AMANDA=m
++CONFIG_NF_CONNTRACK_FTP=m
++CONFIG_NF_CONNTRACK_H323=m
++CONFIG_NF_CONNTRACK_IRC=m
++CONFIG_NF_CONNTRACK_NETBIOS_NS=m
++CONFIG_NF_CONNTRACK_PPTP=m
++CONFIG_NF_CONNTRACK_SANE=m
++CONFIG_NF_CONNTRACK_SIP=m
++CONFIG_NF_CONNTRACK_TFTP=m
++# CONFIG_NF_CT_NETLINK is not set
++CONFIG_NETFILTER_XTABLES=m
++CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
++CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
++CONFIG_NETFILTER_XT_TARGET_DSCP=m
++CONFIG_NETFILTER_XT_TARGET_MARK=m
++CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
++CONFIG_NETFILTER_XT_TARGET_NFLOG=m
++CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
++CONFIG_NETFILTER_XT_TARGET_RATEEST=m
++CONFIG_NETFILTER_XT_TARGET_TRACE=m
++CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
++CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m
++CONFIG_NETFILTER_XT_MATCH_COMMENT=m
++CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
++CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
++CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
++CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
++CONFIG_NETFILTER_XT_MATCH_DCCP=m
++CONFIG_NETFILTER_XT_MATCH_DSCP=m
++CONFIG_NETFILTER_XT_MATCH_ESP=m
++CONFIG_NETFILTER_XT_MATCH_HELPER=m
++CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
++CONFIG_NETFILTER_XT_MATCH_LENGTH=m
++CONFIG_NETFILTER_XT_MATCH_LIMIT=m
++CONFIG_NETFILTER_XT_MATCH_MAC=m
++CONFIG_NETFILTER_XT_MATCH_MARK=m
++CONFIG_NETFILTER_XT_MATCH_OWNER=m
++CONFIG_NETFILTER_XT_MATCH_POLICY=m
++CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
++CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
++CONFIG_NETFILTER_XT_MATCH_QUOTA=m
++CONFIG_NETFILTER_XT_MATCH_RATEEST=m
++CONFIG_NETFILTER_XT_MATCH_REALM=m
++CONFIG_NETFILTER_XT_MATCH_SCTP=m
++CONFIG_NETFILTER_XT_MATCH_STATE=m
++CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
++CONFIG_NETFILTER_XT_MATCH_STRING=m
++CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
++CONFIG_NETFILTER_XT_MATCH_TIME=m
++CONFIG_NETFILTER_XT_MATCH_U32=m
++CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
++
++#
++# IP: Netfilter Configuration
++#
++CONFIG_NF_CONNTRACK_IPV4=m
++CONFIG_NF_CONNTRACK_PROC_COMPAT=y
++CONFIG_IP_NF_QUEUE=m
++CONFIG_IP_NF_IPTABLES=m
++CONFIG_IP_NF_MATCH_RECENT=m
++CONFIG_IP_NF_MATCH_ECN=m
++CONFIG_IP_NF_MATCH_AH=m
++CONFIG_IP_NF_MATCH_TTL=m
++CONFIG_IP_NF_MATCH_ADDRTYPE=m
++CONFIG_IP_NF_FILTER=m
++CONFIG_IP_NF_TARGET_REJECT=m
++CONFIG_IP_NF_TARGET_LOG=m
++CONFIG_IP_NF_TARGET_ULOG=m
++CONFIG_NF_NAT=m
++CONFIG_NF_NAT_NEEDED=y
++CONFIG_IP_NF_TARGET_MASQUERADE=m
++CONFIG_IP_NF_TARGET_REDIRECT=m
++CONFIG_IP_NF_TARGET_NETMAP=m
++CONFIG_NF_NAT_SNMP_BASIC=m
++CONFIG_NF_NAT_PROTO_GRE=m
++CONFIG_NF_NAT_PROTO_UDPLITE=m
++CONFIG_NF_NAT_PROTO_SCTP=m
++CONFIG_NF_NAT_FTP=m
++CONFIG_NF_NAT_IRC=m
++CONFIG_NF_NAT_TFTP=m
++CONFIG_NF_NAT_AMANDA=m
++CONFIG_NF_NAT_PPTP=m
++CONFIG_NF_NAT_H323=m
++CONFIG_NF_NAT_SIP=m
++CONFIG_IP_NF_MANGLE=m
++CONFIG_IP_NF_TARGET_ECN=m
++CONFIG_IP_NF_TARGET_TTL=m
++CONFIG_IP_NF_TARGET_CLUSTERIP=m
++CONFIG_IP_NF_RAW=m
++CONFIG_IP_NF_ARPTABLES=m
++CONFIG_IP_NF_ARPFILTER=m
++CONFIG_IP_NF_ARP_MANGLE=m
++
++#
++# IPv6: Netfilter Configuration
++#
++CONFIG_NF_CONNTRACK_IPV6=m
++CONFIG_IP6_NF_QUEUE=m
++CONFIG_IP6_NF_IPTABLES=m
++CONFIG_IP6_NF_MATCH_RT=m
++CONFIG_IP6_NF_MATCH_OPTS=m
++CONFIG_IP6_NF_MATCH_FRAG=m
++CONFIG_IP6_NF_MATCH_HL=m
++CONFIG_IP6_NF_MATCH_IPV6HEADER=m
++CONFIG_IP6_NF_MATCH_AH=m
++CONFIG_IP6_NF_MATCH_MH=m
++CONFIG_IP6_NF_MATCH_EUI64=m
++CONFIG_IP6_NF_FILTER=m
++CONFIG_IP6_NF_TARGET_LOG=m
++CONFIG_IP6_NF_TARGET_REJECT=m
++CONFIG_IP6_NF_MANGLE=m
++CONFIG_IP6_NF_TARGET_HL=m
++CONFIG_IP6_NF_RAW=m
++CONFIG_IP_DCCP=m
++CONFIG_INET_DCCP_DIAG=m
++CONFIG_IP_DCCP_ACKVEC=y
++
++#
++# DCCP CCIDs Configuration (EXPERIMENTAL)
++#
++CONFIG_IP_DCCP_CCID2=m
++# CONFIG_IP_DCCP_CCID2_DEBUG is not set
++CONFIG_IP_DCCP_CCID3=m
++# CONFIG_IP_DCCP_CCID3_DEBUG is not set
++CONFIG_IP_DCCP_CCID3_RTO=100
++CONFIG_IP_DCCP_TFRC_LIB=m
++CONFIG_IP_SCTP=m
++# CONFIG_SCTP_DBG_MSG is not set
++# CONFIG_SCTP_DBG_OBJCNT is not set
++# CONFIG_SCTP_HMAC_NONE is not set
++# CONFIG_SCTP_HMAC_SHA1 is not set
++CONFIG_SCTP_HMAC_MD5=y
++# CONFIG_TIPC is not set
++# CONFIG_ATM is not set
++# CONFIG_BRIDGE is not set
++# CONFIG_VLAN_8021Q is not set
++# CONFIG_DECNET is not set
++CONFIG_LLC=m
++# CONFIG_LLC2 is not set
++# CONFIG_IPX is not set
++CONFIG_ATALK=m
++CONFIG_DEV_APPLETALK=m
++# CONFIG_COPS is not set
++CONFIG_IPDDP=m
++CONFIG_IPDDP_ENCAP=y
++CONFIG_IPDDP_DECAP=y
++# CONFIG_X25 is not set
++# CONFIG_LAPB is not set
++# CONFIG_ECONET is not set
++# CONFIG_WAN_ROUTER is not set
++# CONFIG_NET_SCHED is not set
++CONFIG_NET_CLS_ROUTE=y
++
++#
++# Network testing
++#
++# CONFIG_NET_PKTGEN is not set
++# CONFIG_HAMRADIO is not set
++# CONFIG_CAN is not set
++# CONFIG_IRDA is not set
++# CONFIG_BT is not set
++# CONFIG_AF_RXRPC is not set
++
++#
++# Wireless
++#
++# CONFIG_CFG80211 is not set
++CONFIG_WIRELESS_EXT=y
++# CONFIG_MAC80211 is not set
++CONFIG_IEEE80211=m
++# CONFIG_IEEE80211_DEBUG is not set
++CONFIG_IEEE80211_CRYPT_WEP=m
++CONFIG_IEEE80211_CRYPT_CCMP=m
++CONFIG_IEEE80211_CRYPT_TKIP=m
++# CONFIG_RFKILL is not set
++# CONFIG_NET_9P is not set
++
++#
++# Device Drivers
++#
++
++#
++# Generic Driver Options
++#
++CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
++CONFIG_STANDALONE=y
++CONFIG_PREVENT_FIRMWARE_BUILD=y
++CONFIG_FW_LOADER=m
++# CONFIG_SYS_HYPERVISOR is not set
++CONFIG_CONNECTOR=m
++# CONFIG_MTD is not set
++CONFIG_PARPORT=m
++# CONFIG_PARPORT_PC is not set
++CONFIG_PARPORT_AMIGA=m
++CONFIG_PARPORT_MFC3=m
++CONFIG_PARPORT_ATARI=m
++# CONFIG_PARPORT_GSC is not set
++# CONFIG_PARPORT_AX88796 is not set
++CONFIG_PARPORT_1284=y
++CONFIG_PARPORT_NOT_PC=y
++# CONFIG_PNP is not set
++CONFIG_BLK_DEV=y
++CONFIG_AMIGA_FLOPPY=y
++CONFIG_ATARI_FLOPPY=y
++CONFIG_AMIGA_Z2RAM=y
++# CONFIG_BLK_DEV_COW_COMMON is not set
++CONFIG_BLK_DEV_LOOP=y
++CONFIG_BLK_DEV_CRYPTOLOOP=m
++CONFIG_BLK_DEV_NBD=m
++CONFIG_BLK_DEV_RAM=y
++CONFIG_BLK_DEV_RAM_COUNT=16
++CONFIG_BLK_DEV_RAM_SIZE=4096
++# CONFIG_BLK_DEV_XIP is not set
++CONFIG_CDROM_PKTCDVD=m
++CONFIG_CDROM_PKTCDVD_BUFFERS=8
++# CONFIG_CDROM_PKTCDVD_WCACHE is not set
++CONFIG_ATA_OVER_ETH=m
++CONFIG_MISC_DEVICES=y
++# CONFIG_EEPROM_93CX6 is not set
++# CONFIG_ENCLOSURE_SERVICES is not set
++CONFIG_HAVE_IDE=y
++CONFIG_IDE=y
++CONFIG_BLK_DEV_IDE=y
++
++#
++# Please see Documentation/ide/ide.txt for help/info on IDE drives
++#
++# CONFIG_BLK_DEV_IDE_SATA is not set
++CONFIG_BLK_DEV_IDEDISK=y
++# CONFIG_IDEDISK_MULTI_MODE is not set
++CONFIG_BLK_DEV_IDECD=y
++CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
++# CONFIG_BLK_DEV_IDETAPE is not set
++CONFIG_BLK_DEV_IDEFLOPPY=m
++# CONFIG_BLK_DEV_IDESCSI is not set
++# CONFIG_IDE_TASK_IOCTL is not set
++CONFIG_IDE_PROC_FS=y
++
++#
++# IDE chipset support/bugfixes
++#
++# CONFIG_BLK_DEV_PLATFORM is not set
++CONFIG_BLK_DEV_GAYLE=y
++CONFIG_BLK_DEV_IDEDOUBLER=y
++CONFIG_BLK_DEV_BUDDHA=y
++CONFIG_BLK_DEV_FALCON_IDE=y
++CONFIG_BLK_DEV_MAC_IDE=y
++CONFIG_BLK_DEV_Q40IDE=y
++# CONFIG_BLK_DEV_IDEDMA is not set
++# CONFIG_BLK_DEV_HD_ONLY is not set
++# CONFIG_BLK_DEV_HD is not set
++
++#
++# SCSI device support
++#
++CONFIG_RAID_ATTRS=m
++CONFIG_SCSI=y
++CONFIG_SCSI_DMA=y
++CONFIG_SCSI_TGT=m
++# CONFIG_SCSI_NETLINK is not set
++CONFIG_SCSI_PROC_FS=y
++
++#
++# SCSI support type (disk, tape, CD-ROM)
++#
++CONFIG_BLK_DEV_SD=y
++CONFIG_CHR_DEV_ST=m
++CONFIG_CHR_DEV_OSST=m
++CONFIG_BLK_DEV_SR=y
++CONFIG_BLK_DEV_SR_VENDOR=y
++CONFIG_CHR_DEV_SG=m
++# CONFIG_CHR_DEV_SCH is not set
++
++#
++# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
++#
++# CONFIG_SCSI_MULTI_LUN is not set
++CONFIG_SCSI_CONSTANTS=y
++# CONFIG_SCSI_LOGGING is not set
++# CONFIG_SCSI_SCAN_ASYNC is not set
++CONFIG_SCSI_WAIT_SCAN=m
++
++#
++# SCSI Transports
++#
++CONFIG_SCSI_SPI_ATTRS=y
++# CONFIG_SCSI_FC_ATTRS is not set
++CONFIG_SCSI_ISCSI_ATTRS=m
++CONFIG_SCSI_SAS_ATTRS=m
++CONFIG_SCSI_SAS_LIBSAS=m
++CONFIG_SCSI_SAS_HOST_SMP=y
++# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
++CONFIG_SCSI_SRP_ATTRS=m
++CONFIG_SCSI_SRP_TGT_ATTRS=y
++CONFIG_SCSI_LOWLEVEL=y
++CONFIG_ISCSI_TCP=m
++# CONFIG_SCSI_AHA152X is not set
++# CONFIG_SCSI_AIC7XXX_OLD is not set
++# CONFIG_SCSI_ADVANSYS is not set
++# CONFIG_SCSI_IN2000 is not set
++# CONFIG_SCSI_DTC3280 is not set
++# CONFIG_SCSI_FUTURE_DOMAIN is not set
++# CONFIG_SCSI_GENERIC_NCR5380 is not set
++# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
++# CONFIG_SCSI_NCR53C406A is not set
++CONFIG_53C700_BE_BUS=y
++# CONFIG_SCSI_PAS16 is not set
++# CONFIG_SCSI_QLOGIC_FAS is not set
++# CONFIG_SCSI_SYM53C416 is not set
++# CONFIG_SCSI_T128 is not set
++# CONFIG_SCSI_DEBUG is not set
++CONFIG_A3000_SCSI=y
++CONFIG_A2091_SCSI=y
++CONFIG_GVP11_SCSI=y
++CONFIG_SCSI_A4000T=y
++CONFIG_SCSI_ZORRO7XX=y
++CONFIG_ATARI_SCSI=y
++# CONFIG_ATARI_SCSI_TOSHIBA_DELAY is not set
++# CONFIG_ATARI_SCSI_RESET_BOOT is not set
++CONFIG_MAC_SCSI=y
++CONFIG_MVME147_SCSI=y
++CONFIG_MVME16x_SCSI=y
++CONFIG_BVME6000_SCSI=y
++CONFIG_SUN3X_ESP=y
++CONFIG_MD=y
++CONFIG_BLK_DEV_MD=m
++CONFIG_MD_LINEAR=m
++CONFIG_MD_RAID0=m
++CONFIG_MD_RAID1=m
++# CONFIG_MD_RAID10 is not set
++CONFIG_MD_RAID456=m
++CONFIG_MD_RAID5_RESHAPE=y
++CONFIG_MD_MULTIPATH=m
++# CONFIG_MD_FAULTY is not set
++CONFIG_BLK_DEV_DM=m
++# CONFIG_DM_DEBUG is not set
++CONFIG_DM_CRYPT=m
++CONFIG_DM_SNAPSHOT=m
++CONFIG_DM_MIRROR=m
++CONFIG_DM_ZERO=m
++CONFIG_DM_MULTIPATH=m
++CONFIG_DM_MULTIPATH_EMC=m
++CONFIG_DM_MULTIPATH_RDAC=m
++CONFIG_DM_MULTIPATH_HP=m
++# CONFIG_DM_DELAY is not set
++CONFIG_DM_UEVENT=y
++CONFIG_MACINTOSH_DRIVERS=y
++CONFIG_ADB=y
++CONFIG_ADB_MACII=y
++CONFIG_ADB_MACIISI=y
++CONFIG_ADB_IOP=y
++CONFIG_ADB_PMU68K=y
++CONFIG_ADB_CUDA=y
++CONFIG_INPUT_ADBHID=y
++CONFIG_MAC_EMUMOUSEBTN=y
++CONFIG_NETDEVICES=y
++# CONFIG_NETDEVICES_MULTIQUEUE is not set
++CONFIG_DUMMY=m
++# CONFIG_BONDING is not set
++CONFIG_MACVLAN=m
++CONFIG_EQUALIZER=m
++# CONFIG_TUN is not set
++CONFIG_VETH=m
++# CONFIG_ARCNET is not set
++# CONFIG_PHYLIB is not set
++CONFIG_NET_ETHERNET=y
++CONFIG_MII=m
++CONFIG_ARIADNE=m
++CONFIG_A2065=m
++CONFIG_HYDRA=m
++CONFIG_ZORRO8390=m
++CONFIG_APNE=m
++CONFIG_APOLLO_ELPLUS=y
++CONFIG_MAC8390=y
++CONFIG_MAC89x0=m
++CONFIG_MACSONIC=m
++CONFIG_MACMACE=y
++CONFIG_MVME147_NET=y
++CONFIG_MVME16x_NET=y
++CONFIG_BVME6000_NET=y
++CONFIG_ATARILANCE=m
++CONFIG_SUN3LANCE=y
++CONFIG_HPLANCE=y
++# CONFIG_NET_VENDOR_3COM is not set
++# CONFIG_NET_VENDOR_SMC is not set
++# CONFIG_NET_VENDOR_RACAL is not set
++# CONFIG_AT1700 is not set
++# CONFIG_DEPCA is not set
++# CONFIG_HP100 is not set
++# CONFIG_NET_ISA is not set
++CONFIG_NE2000=m
++# CONFIG_IBM_NEW_EMAC_ZMII is not set
++# CONFIG_IBM_NEW_EMAC_RGMII is not set
++# CONFIG_IBM_NEW_EMAC_TAH is not set
++# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
++# CONFIG_NET_PCI is not set
++# CONFIG_B44 is not set
++# CONFIG_NET_POCKET is not set
++# CONFIG_NETDEV_1000 is not set
++# CONFIG_NETDEV_10000 is not set
++# CONFIG_TR is not set
++
++#
++# Wireless LAN
++#
++# CONFIG_WLAN_PRE80211 is not set
++# CONFIG_WLAN_80211 is not set
++# CONFIG_IWLWIFI_LEDS is not set
++# CONFIG_WAN is not set
++# CONFIG_PLIP is not set
++CONFIG_PPP=m
++# CONFIG_PPP_MULTILINK is not set
++CONFIG_PPP_FILTER=y
++CONFIG_PPP_ASYNC=m
++CONFIG_PPP_SYNC_TTY=m
++CONFIG_PPP_DEFLATE=m
++CONFIG_PPP_BSDCOMP=m
++CONFIG_PPP_MPPE=m
++CONFIG_PPPOE=m
++CONFIG_PPPOL2TP=m
++CONFIG_SLIP=m
++CONFIG_SLIP_COMPRESSED=y
++CONFIG_SLHC=m
++CONFIG_SLIP_SMART=y
++CONFIG_SLIP_MODE_SLIP6=y
++CONFIG_NETCONSOLE=m
++CONFIG_NETCONSOLE_DYNAMIC=y
++CONFIG_NETPOLL=y
++# CONFIG_NETPOLL_TRAP is not set
++CONFIG_NET_POLL_CONTROLLER=y
++# CONFIG_ISDN is not set
++# CONFIG_PHONE is not set
++
++#
++# Input device support
++#
++CONFIG_INPUT=y
++CONFIG_INPUT_FF_MEMLESS=m
++# CONFIG_INPUT_POLLDEV is not set
++
++#
++# Userland interfaces
++#
++CONFIG_INPUT_MOUSEDEV=y
++CONFIG_INPUT_MOUSEDEV_PSAUX=y
++CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
++CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
++# CONFIG_INPUT_JOYDEV is not set
++# CONFIG_INPUT_EVDEV is not set
++# CONFIG_INPUT_EVBUG is not set
++
++#
++# Input Device Drivers
++#
++CONFIG_INPUT_KEYBOARD=y
++# CONFIG_KEYBOARD_ATKBD is not set
++CONFIG_KEYBOARD_SUNKBD=y
++# CONFIG_KEYBOARD_LKKBD is not set
++# CONFIG_KEYBOARD_XTKBD is not set
++# CONFIG_KEYBOARD_NEWTON is not set
++# CONFIG_KEYBOARD_STOWAWAY is not set
++CONFIG_KEYBOARD_AMIGA=y
++CONFIG_ATARI_KBD_CORE=y
++CONFIG_KEYBOARD_ATARI=y
++CONFIG_KEYBOARD_HIL_OLD=y
++CONFIG_KEYBOARD_HIL=y
++CONFIG_INPUT_MOUSE=y
++CONFIG_MOUSE_PS2=y
++CONFIG_MOUSE_PS2_ALPS=y
++CONFIG_MOUSE_PS2_LOGIPS2PP=y
++CONFIG_MOUSE_PS2_SYNAPTICS=y
++CONFIG_MOUSE_PS2_LIFEBOOK=y
++CONFIG_MOUSE_PS2_TRACKPOINT=y
++# CONFIG_MOUSE_PS2_TOUCHKIT is not set
++CONFIG_MOUSE_SERIAL=m
++# CONFIG_MOUSE_INPORT is not set
++# CONFIG_MOUSE_LOGIBM is not set
++# CONFIG_MOUSE_PC110PAD is not set
++CONFIG_MOUSE_AMIGA=m
++CONFIG_MOUSE_ATARI=m
++# CONFIG_MOUSE_VSXXXAA is not set
++CONFIG_MOUSE_HIL=m
++CONFIG_INPUT_JOYSTICK=y
++# CONFIG_JOYSTICK_ANALOG is not set
++# CONFIG_JOYSTICK_A3D is not set
++# CONFIG_JOYSTICK_ADI is not set
++# CONFIG_JOYSTICK_COBRA is not set
++# CONFIG_JOYSTICK_GF2K is not set
++# CONFIG_JOYSTICK_GRIP is not set
++# CONFIG_JOYSTICK_GRIP_MP is not set
++# CONFIG_JOYSTICK_GUILLEMOT is not set
++# CONFIG_JOYSTICK_INTERACT is not set
++# CONFIG_JOYSTICK_SIDEWINDER is not set
++# CONFIG_JOYSTICK_TMDC is not set
++# CONFIG_JOYSTICK_IFORCE is not set
++# CONFIG_JOYSTICK_WARRIOR is not set
++# CONFIG_JOYSTICK_MAGELLAN is not set
++# CONFIG_JOYSTICK_SPACEORB is not set
++# CONFIG_JOYSTICK_SPACEBALL is not set
++# CONFIG_JOYSTICK_STINGER is not set
++# CONFIG_JOYSTICK_TWIDJOY is not set
++# CONFIG_JOYSTICK_DB9 is not set
++# CONFIG_JOYSTICK_GAMECON is not set
++# CONFIG_JOYSTICK_TURBOGRAFX is not set
++CONFIG_JOYSTICK_AMIGA=m
++# CONFIG_JOYSTICK_JOYDUMP is not set
++# CONFIG_INPUT_TABLET is not set
++# CONFIG_INPUT_TOUCHSCREEN is not set
++CONFIG_INPUT_MISC=y
++CONFIG_INPUT_M68K_BEEP=m
++# CONFIG_INPUT_UINPUT is not set
++CONFIG_HP_SDC_RTC=m
++
++#
++# Hardware I/O ports
++#
++CONFIG_SERIO=y
++# CONFIG_SERIO_SERPORT is not set
++CONFIG_SERIO_Q40KBD=m
++# CONFIG_SERIO_PARKBD is not set
++CONFIG_HP_SDC=y
++CONFIG_HIL_MLC=y
++CONFIG_SERIO_LIBPS2=y
++# CONFIG_SERIO_RAW is not set
++# CONFIG_GAMEPORT is not set
++
++#
++# Character devices
++#
++CONFIG_VT=y
++CONFIG_VT_CONSOLE=y
++CONFIG_HW_CONSOLE=y
++CONFIG_VT_HW_CONSOLE_BINDING=y
++# CONFIG_SERIAL_NONSTANDARD is not set
++CONFIG_A2232=m
++
++#
++# Serial drivers
++#
++# CONFIG_SERIAL_8250 is not set
++
++#
++# Non-8250 serial port support
++#
++CONFIG_UNIX98_PTYS=y
++CONFIG_LEGACY_PTYS=y
++CONFIG_LEGACY_PTY_COUNT=256
++CONFIG_PRINTER=m
++# CONFIG_LP_CONSOLE is not set
++# CONFIG_PPDEV is not set
++# CONFIG_IPMI_HANDLER is not set
++# CONFIG_HW_RANDOM is not set
++CONFIG_NVRAM=y
++CONFIG_GEN_RTC=m
++CONFIG_GEN_RTC_X=y
++# CONFIG_DTLK is not set
++# CONFIG_R3964 is not set
++# CONFIG_RAW_DRIVER is not set
++# CONFIG_TCG_TPM is not set
++# CONFIG_I2C is not set
++
++#
++# SPI support
++#
++# CONFIG_SPI is not set
++# CONFIG_SPI_MASTER is not set
++# CONFIG_W1 is not set
++# CONFIG_POWER_SUPPLY is not set
++# CONFIG_HWMON is not set
++# CONFIG_THERMAL is not set
++# CONFIG_WATCHDOG is not set
++
++#
++# Sonics Silicon Backplane
++#
++CONFIG_SSB_POSSIBLE=y
++# CONFIG_SSB is not set
++
++#
++# Multifunction device drivers
++#
++# CONFIG_MFD_SM501 is not set
++# CONFIG_HTC_PASIC3 is not set
++
++#
++# Multimedia devices
++#
++# CONFIG_VIDEO_DEV is not set
++# CONFIG_DVB_CORE is not set
++# CONFIG_DAB is not set
++
++#
++# Graphics support
++#
++# CONFIG_VGASTATE is not set
++# CONFIG_VIDEO_OUTPUT_CONTROL is not set
++CONFIG_FB=y
++# CONFIG_FIRMWARE_EDID is not set
++# CONFIG_FB_DDC is not set
++CONFIG_FB_CFB_FILLRECT=y
++CONFIG_FB_CFB_COPYAREA=y
++CONFIG_FB_CFB_IMAGEBLIT=y
++# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
++# CONFIG_FB_SYS_FILLRECT is not set
++# CONFIG_FB_SYS_COPYAREA is not set
++# CONFIG_FB_SYS_IMAGEBLIT is not set
++# CONFIG_FB_SYS_FOPS is not set
++CONFIG_FB_DEFERRED_IO=y
++# CONFIG_FB_SVGALIB is not set
++CONFIG_FB_MACMODES=y
++# CONFIG_FB_BACKLIGHT is not set
++# CONFIG_FB_MODE_HELPERS is not set
++# CONFIG_FB_TILEBLITTING is not set
++
++#
++# Frame buffer hardware drivers
++#
++CONFIG_FB_CIRRUS=y
++CONFIG_FB_APOLLO=y
++CONFIG_FB_Q40=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_ATARI=y
++CONFIG_FB_VALKYRIE=y
++CONFIG_FB_MAC=y
++CONFIG_FB_HP300=y
++# CONFIG_FB_UVESA is not set
++# CONFIG_FB_S1D13XXX is not set
++# CONFIG_FB_ATY is not set
++# CONFIG_FB_VIRTUAL is not set
++# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
++
++#
++# Display device support
++#
++# CONFIG_DISPLAY_SUPPORT is not set
++
++#
++# Console display driver support
++#
++CONFIG_DUMMY_CONSOLE=y
++CONFIG_FRAMEBUFFER_CONSOLE=y
++# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
++# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
++# CONFIG_FONTS is not set
++CONFIG_FONT_8x8=y
++CONFIG_FONT_8x16=y
++CONFIG_FONT_6x11=y
++CONFIG_FONT_PEARL_8x8=y
++CONFIG_LOGO=y
++CONFIG_LOGO_LINUX_MONO=y
++CONFIG_LOGO_LINUX_VGA16=y
++CONFIG_LOGO_LINUX_CLUT224=y
++CONFIG_LOGO_MAC_CLUT224=y
++
++#
++# Sound
++#
++CONFIG_SOUND=m
++CONFIG_DMASOUND_ATARI=m
++CONFIG_DMASOUND_PAULA=m
++CONFIG_DMASOUND_Q40=m
++CONFIG_DMASOUND=m
++CONFIG_HID_SUPPORT=y
++CONFIG_HID=m
++# CONFIG_HID_DEBUG is not set
++CONFIG_HIDRAW=y
++# CONFIG_USB_SUPPORT is not set
++# CONFIG_MMC is not set
++# CONFIG_MEMSTICK is not set
++# CONFIG_NEW_LEDS is not set
++# CONFIG_RTC_CLASS is not set
++# CONFIG_AUXDISPLAY is not set
++# CONFIG_UIO is not set
++
++#
++# Character devices
++#
++CONFIG_ATARI_MFPSER=m
++CONFIG_ATARI_SCC=y
++CONFIG_ATARI_SCC_DMA=y
++CONFIG_ATARI_MIDI=m
++CONFIG_ATARI_DSP56K=m
++CONFIG_AMIGA_BUILTIN_SERIAL=y
++CONFIG_MULTIFACE_III_TTY=m
++CONFIG_MAC_SCC=y
++CONFIG_MAC_HID=y
++CONFIG_MVME147_SCC=y
++CONFIG_SERIAL167=y
++CONFIG_MVME162_SCC=y
++CONFIG_BVME6000_SCC=y
++CONFIG_DN_SERIAL=y
++CONFIG_SERIAL_CONSOLE=y
++
++#
++# File systems
++#
++CONFIG_EXT2_FS=y
++# CONFIG_EXT2_FS_XATTR is not set
++# CONFIG_EXT2_FS_XIP is not set
++CONFIG_EXT3_FS=y
++# CONFIG_EXT3_FS_XATTR is not set
++# CONFIG_EXT4DEV_FS is not set
++CONFIG_JBD=y
++CONFIG_REISERFS_FS=m
++# CONFIG_REISERFS_CHECK is not set
++# CONFIG_REISERFS_PROC_INFO is not set
++# CONFIG_REISERFS_FS_XATTR is not set
++CONFIG_JFS_FS=m
++# CONFIG_JFS_POSIX_ACL is not set
++# CONFIG_JFS_SECURITY is not set
++# CONFIG_JFS_DEBUG is not set
++# CONFIG_JFS_STATISTICS is not set
++# CONFIG_FS_POSIX_ACL is not set
++CONFIG_XFS_FS=m
++# CONFIG_XFS_QUOTA is not set
++# CONFIG_XFS_POSIX_ACL is not set
++# CONFIG_XFS_RT is not set
++CONFIG_OCFS2_FS=m
++CONFIG_OCFS2_FS_O2CB=m
++CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m
++# CONFIG_OCFS2_DEBUG_MASKLOG is not set
++# CONFIG_OCFS2_DEBUG_FS is not set
++CONFIG_DNOTIFY=y
++CONFIG_INOTIFY=y
++CONFIG_INOTIFY_USER=y
++CONFIG_QUOTA=y
++CONFIG_QUOTA_NETLINK_INTERFACE=y
++# CONFIG_PRINT_QUOTA_WARNING is not set
++# CONFIG_QFMT_V1 is not set
++# CONFIG_QFMT_V2 is not set
++CONFIG_QUOTACTL=y
++CONFIG_AUTOFS_FS=m
++CONFIG_AUTOFS4_FS=m
++CONFIG_FUSE_FS=m
++
++#
++# CD-ROM/DVD Filesystems
++#
++CONFIG_ISO9660_FS=y
++CONFIG_JOLIET=y
++CONFIG_ZISOFS=y
++CONFIG_UDF_FS=m
++CONFIG_UDF_NLS=y
++
++#
++# DOS/FAT/NT Filesystems
++#
++CONFIG_FAT_FS=y
++CONFIG_MSDOS_FS=y
++CONFIG_VFAT_FS=m
++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_PROC_SYSCTL=y
++CONFIG_SYSFS=y
++CONFIG_TMPFS=y
++# CONFIG_TMPFS_POSIX_ACL is not set
++# CONFIG_HUGETLB_PAGE is not set
++CONFIG_CONFIGFS_FS=m
++
++#
++# Miscellaneous filesystems
++#
++# CONFIG_ADFS_FS is not set
++CONFIG_AFFS_FS=m
++CONFIG_HFS_FS=y
++CONFIG_HFSPLUS_FS=y
++# CONFIG_BEFS_FS is not set
++# CONFIG_BFS_FS is not set
++# CONFIG_EFS_FS is not set
++CONFIG_CRAMFS=m
++# CONFIG_VXFS_FS is not set
++CONFIG_MINIX_FS=y
++CONFIG_HPFS_FS=m
++# CONFIG_QNX4FS_FS is not set
++# CONFIG_ROMFS_FS is not set
++CONFIG_SYSV_FS=m
++CONFIG_UFS_FS=m
++# CONFIG_UFS_FS_WRITE is not set
++# CONFIG_UFS_DEBUG is not set
++CONFIG_NETWORK_FILESYSTEMS=y
++CONFIG_NFS_FS=y
++CONFIG_NFS_V3=y
++# CONFIG_NFS_V3_ACL is not set
++CONFIG_NFS_V4=y
++# CONFIG_NFS_DIRECTIO is not set
++CONFIG_NFSD=m
++CONFIG_NFSD_V3=y
++# CONFIG_NFSD_V3_ACL is not set
++# CONFIG_NFSD_V4 is not set
++CONFIG_NFSD_TCP=y
++CONFIG_ROOT_NFS=y
++CONFIG_LOCKD=y
++CONFIG_LOCKD_V4=y
++CONFIG_EXPORTFS=m
++CONFIG_NFS_COMMON=y
++CONFIG_SUNRPC=y
++CONFIG_SUNRPC_GSS=y
++CONFIG_SUNRPC_BIND34=y
++CONFIG_RPCSEC_GSS_KRB5=y
++# CONFIG_RPCSEC_GSS_SPKM3 is not set
++CONFIG_SMB_FS=m
++CONFIG_SMB_NLS_DEFAULT=y
++CONFIG_SMB_NLS_REMOTE="cp437"
++# CONFIG_CIFS is not set
++# CONFIG_NCP_FS is not set
++CONFIG_CODA_FS=m
++# CONFIG_CODA_FS_OLD_API is not set
++# CONFIG_AFS_FS is not set
++
++#
++# Partition Types
++#
++# CONFIG_PARTITION_ADVANCED is not set
++CONFIG_AMIGA_PARTITION=y
++CONFIG_ATARI_PARTITION=y
++CONFIG_MAC_PARTITION=y
++CONFIG_MSDOS_PARTITION=y
++CONFIG_SUN_PARTITION=y
++CONFIG_SYSV68_PARTITION=y
++CONFIG_NLS=y
++CONFIG_NLS_DEFAULT="iso8859-1"
++CONFIG_NLS_CODEPAGE_437=y
++CONFIG_NLS_CODEPAGE_737=m
++CONFIG_NLS_CODEPAGE_775=m
++CONFIG_NLS_CODEPAGE_850=m
++CONFIG_NLS_CODEPAGE_852=m
++CONFIG_NLS_CODEPAGE_855=m
++CONFIG_NLS_CODEPAGE_857=m
++CONFIG_NLS_CODEPAGE_860=m
++CONFIG_NLS_CODEPAGE_861=m
++CONFIG_NLS_CODEPAGE_862=m
++CONFIG_NLS_CODEPAGE_863=m
++CONFIG_NLS_CODEPAGE_864=m
++CONFIG_NLS_CODEPAGE_865=m
++CONFIG_NLS_CODEPAGE_866=m
++CONFIG_NLS_CODEPAGE_869=m
++CONFIG_NLS_CODEPAGE_936=m
++CONFIG_NLS_CODEPAGE_950=m
++CONFIG_NLS_CODEPAGE_932=m
++CONFIG_NLS_CODEPAGE_949=m
++CONFIG_NLS_CODEPAGE_874=m
++CONFIG_NLS_ISO8859_8=m
++CONFIG_NLS_CODEPAGE_1250=m
++CONFIG_NLS_CODEPAGE_1251=m
++CONFIG_NLS_ASCII=m
++CONFIG_NLS_ISO8859_1=y
++CONFIG_NLS_ISO8859_2=m
++CONFIG_NLS_ISO8859_3=m
++CONFIG_NLS_ISO8859_4=m
++CONFIG_NLS_ISO8859_5=m
++CONFIG_NLS_ISO8859_6=m
++CONFIG_NLS_ISO8859_7=m
++CONFIG_NLS_ISO8859_9=m
++CONFIG_NLS_ISO8859_13=m
++CONFIG_NLS_ISO8859_14=m
++CONFIG_NLS_ISO8859_15=m
++CONFIG_NLS_KOI8_R=m
++CONFIG_NLS_KOI8_U=m
++CONFIG_NLS_UTF8=y
++CONFIG_DLM=m
++# CONFIG_DLM_DEBUG is not set
++
++#
++# Kernel hacking
++#
++# CONFIG_PRINTK_TIME is not set
++CONFIG_ENABLE_WARN_DEPRECATED=y
++CONFIG_ENABLE_MUST_CHECK=y
++CONFIG_MAGIC_SYSRQ=y
++# CONFIG_UNUSED_SYMBOLS is not set
++# CONFIG_DEBUG_FS is not set
++# CONFIG_HEADERS_CHECK is not set
++# CONFIG_DEBUG_KERNEL is not set
++CONFIG_DEBUG_BUGVERBOSE=y
++# CONFIG_SAMPLES is not set
++
++#
++# Security options
++#
++# CONFIG_KEYS is not set
++# CONFIG_SECURITY is not set
++# CONFIG_SECURITY_FILE_CAPABILITIES is not set
++CONFIG_XOR_BLOCKS=m
++CONFIG_ASYNC_CORE=m
++CONFIG_ASYNC_MEMCPY=m
++CONFIG_ASYNC_XOR=m
++CONFIG_CRYPTO=y
++
++#
++# Crypto core or helper
++#
++CONFIG_CRYPTO_ALGAPI=y
++CONFIG_CRYPTO_AEAD=m
++CONFIG_CRYPTO_BLKCIPHER=y
++CONFIG_CRYPTO_HASH=y
++CONFIG_CRYPTO_MANAGER=y
++CONFIG_CRYPTO_GF128MUL=m
++CONFIG_CRYPTO_NULL=m
++CONFIG_CRYPTO_CRYPTD=m
++CONFIG_CRYPTO_AUTHENC=m
++CONFIG_CRYPTO_TEST=m
++
++#
++# Authenticated Encryption with Associated Data
++#
++CONFIG_CRYPTO_CCM=m
++CONFIG_CRYPTO_GCM=m
++CONFIG_CRYPTO_SEQIV=m
++
++#
++# Block modes
++#
++CONFIG_CRYPTO_CBC=y
++CONFIG_CRYPTO_CTR=m
++# CONFIG_CRYPTO_CTS is not set
++CONFIG_CRYPTO_ECB=m
++CONFIG_CRYPTO_LRW=m
++CONFIG_CRYPTO_PCBC=m
++CONFIG_CRYPTO_XTS=m
++
++#
++# Hash modes
++#
++CONFIG_CRYPTO_HMAC=y
++CONFIG_CRYPTO_XCBC=m
++
++#
++# Digest
++#
++CONFIG_CRYPTO_CRC32C=m
++CONFIG_CRYPTO_MD4=m
++CONFIG_CRYPTO_MD5=y
++CONFIG_CRYPTO_MICHAEL_MIC=m
++CONFIG_CRYPTO_SHA1=m
++CONFIG_CRYPTO_SHA256=m
++CONFIG_CRYPTO_SHA512=m
++CONFIG_CRYPTO_TGR192=m
++CONFIG_CRYPTO_WP512=m
++
++#
++# Ciphers
++#
++CONFIG_CRYPTO_AES=m
++CONFIG_CRYPTO_ANUBIS=m
++CONFIG_CRYPTO_ARC4=m
++CONFIG_CRYPTO_BLOWFISH=m
++CONFIG_CRYPTO_CAMELLIA=m
++CONFIG_CRYPTO_CAST5=m
++CONFIG_CRYPTO_CAST6=m
++CONFIG_CRYPTO_DES=y
++CONFIG_CRYPTO_FCRYPT=m
++CONFIG_CRYPTO_KHAZAD=m
++CONFIG_CRYPTO_SALSA20=m
++CONFIG_CRYPTO_SEED=m
++CONFIG_CRYPTO_SERPENT=m
++CONFIG_CRYPTO_TEA=m
++CONFIG_CRYPTO_TWOFISH=m
++CONFIG_CRYPTO_TWOFISH_COMMON=m
++
++#
++# Compression
++#
++CONFIG_CRYPTO_DEFLATE=m
++CONFIG_CRYPTO_LZO=m
++# CONFIG_CRYPTO_HW is not set
++
++#
++# Library routines
++#
++CONFIG_BITREVERSE=y
++CONFIG_CRC_CCITT=m
++CONFIG_CRC16=y
++CONFIG_CRC_ITU_T=m
++CONFIG_CRC32=y
++# CONFIG_CRC7 is not set
++CONFIG_LIBCRC32C=m
++CONFIG_ZLIB_INFLATE=y
++CONFIG_ZLIB_DEFLATE=m
++CONFIG_LZO_COMPRESS=m
++CONFIG_LZO_DECOMPRESS=m
++CONFIG_TEXTSEARCH=y
++CONFIG_TEXTSEARCH_KMP=m
++CONFIG_TEXTSEARCH_BM=m
++CONFIG_TEXTSEARCH_FSM=m
++CONFIG_PLIST=y
++CONFIG_HAS_IOMEM=y
++CONFIG_HAS_DMA=y

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-allnoconfig.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-allnoconfig.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,115 @@
+Subject: [PATCH] m68k: Allow no CPU/platform type for allnoconfig
+
+From: Geert Uytterhoeven <geert at linux-m68k.org>
+
+Allow no CPU/platform type for allnoconfig
+  - Provide a dummy value for FPSTATESIZE if no CPU type was selected
+  - Provide a dummy value for NR_IRQS if no platform type was selected
+  - Warn the user if no CPU or platform type was selected
+
+Note: you still cannot build an allnoconfig kernel, as CONFIG_SWAP=n doesn't
+build and we cannot easily fix that
+(http://groups.google.com/group/linux.kernel/browse_thread/thread/d430c78b07e1827b)
+
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ arch/m68k/kernel/setup.c    |    6 ++++++
+ include/asm-m68k/fpu.h      |   10 +++++-----
+ include/asm-m68k/irq.h      |    2 +-
+ include/asm-m68k/tlbflush.h |    8 ++++----
+ 4 files changed, 16 insertions(+), 10 deletions(-)
+
+--- a/arch/m68k/kernel/setup.c
++++ b/arch/m68k/kernel/setup.c
+@@ -26,6 +26,7 @@
+ 
+ #include <asm/bootinfo.h>
+ #include <asm/setup.h>
++#include <asm/fpu.h>
+ #include <asm/irq.h>
+ #include <asm/io.h>
+ #include <asm/machdep.h>
+@@ -41,6 +42,11 @@
+ #endif
+ #include <asm/natfeat.h>
+ 
++#if !FPSTATESIZE || !NR_IRQS
++#warning No CPU/platform type selected, your kernel will not work!
++#warning Are you building an allnoconfig kernel?
++#endif
++
+ unsigned long m68k_machtype;
+ unsigned long m68k_cputype;
+ EXPORT_SYMBOL(m68k_machtype);
+--- a/include/asm-m68k/fpu.h
++++ b/include/asm-m68k/fpu.h
+@@ -7,15 +7,15 @@
+  */
+ 
+ #if defined(CONFIG_M68020) || defined(CONFIG_M68030)
+-#define FPSTATESIZE (216/sizeof(unsigned char))
++#define FPSTATESIZE (216)
+ #elif defined(CONFIG_M68040)
+-#define FPSTATESIZE (96/sizeof(unsigned char))
++#define FPSTATESIZE (96)
+ #elif defined(CONFIG_M68KFPU_EMU)
+-#define FPSTATESIZE (28/sizeof(unsigned char))
++#define FPSTATESIZE (28)
+ #elif defined(CONFIG_M68060)
+-#define FPSTATESIZE (12/sizeof(unsigned char))
++#define FPSTATESIZE (12)
+ #else
+-#define FPSTATESIZE error no_cpu_type_configured
++#define FPSTATESIZE (0)
+ #endif
+ 
+ #endif /* __M68K_FPU_H */
+--- a/include/asm-m68k/irq.h
++++ b/include/asm-m68k/irq.h
+@@ -24,7 +24,7 @@
+ #elif defined(CONFIG_HP300)
+ #define NR_IRQS	8
+ #else
+-#error unknown nr of irqs
++#define NR_IRQS	0
+ #endif
+ 
+ /*
+--- a/include/asm-m68k/tlbflush.h
++++ b/include/asm-m68k/tlbflush.h
+@@ -16,7 +16,7 @@ static inline void flush_tlb_kernel_page
+ 				     ".chip 68k"
+ 				     : : "a" (addr));
+ 		set_fs(old_fs);
+-	} else
++	} else if (CPU_IS_020_OR_030)
+ 		__asm__ __volatile__("pflush #4,#4,(%0)" : : "a" (addr));
+ }
+ 
+@@ -29,7 +29,7 @@ static inline void __flush_tlb(void)
+ 		__asm__ __volatile__(".chip 68040\n\t"
+ 				     "pflushan\n\t"
+ 				     ".chip 68k");
+-	else
++	else if (CPU_IS_020_OR_030)
+ 		__asm__ __volatile__("pflush #0,#4");
+ }
+ 
+@@ -45,7 +45,7 @@ static inline void __flush_tlb_one(unsig
+ {
+ 	if (CPU_IS_040_OR_060)
+ 		__flush_tlb040_one(addr);
+-	else
++	else if (CPU_IS_020_OR_030)
+ 		__asm__ __volatile__("pflush #0,#4,(%0)" : : "a" (addr));
+ }
+ 
+@@ -60,7 +60,7 @@ static inline void flush_tlb_all(void)
+ 		__asm__ __volatile__(".chip 68040\n\t"
+ 				     "pflusha\n\t"
+ 				     ".chip 68k");
+-	else
++	else if (CPU_IS_020_OR_030)
+ 		__asm__ __volatile__("pflusha");
+ }
+ 

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-convert-access_ok-to-inline-func.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-convert-access_ok-to-inline-func.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,30 @@
+Subject: [PATCH] m68k: Convert access_ok() to an inline function
+
+From: Geert Uytterhoeven <geert at linux-m68k.org>
+
+Convert access_ok() from a macro to an inline function, so the compiler no
+longer complains about unused variables:
+
+    fs/read_write.c: In function 'rw_copy_check_uvector':
+    fs/read_write.c:556: warning: unused variable 'buf'
+
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ include/asm-m68k/uaccess.h |    6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/include/asm-m68k/uaccess.h
++++ b/include/asm-m68k/uaccess.h
+@@ -14,7 +14,11 @@
+ #define VERIFY_WRITE	1
+ 
+ /* We let the MMU do all checking */
+-#define access_ok(type,addr,size) 1
++static inline int access_ok(int type, const void __user *addr,
++			    unsigned long size)
++{
++	return 1;
++}
+ 
+ /*
+  * The exception table consists of pairs of addresses: the first is the

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-correct-FB_HP300-dependencies.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-correct-FB_HP300-dependencies.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,27 @@
+Subject: [PATCH] m68k: FB_HP300 depends on DIO and doesn't need FB_CFB_FILLRECT
+Cc: linux-fbdev-devel at lists.sourceforge.net
+
+From: Geert Uytterhoeven <geert at linux-m68k.org>
+
+Correct FB_HP300 dependencies:
+  - FB_HP300 doesn't depend only on HP300, but also on DIO (which depends on
+    HP300)
+  - FB_HP300 does not need FB_CFB_FILLRECT
+
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ drivers/video/Kconfig |    3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/video/Kconfig
++++ b/drivers/video/Kconfig
+@@ -596,8 +596,7 @@ config FB_MAC
+ 
+ config FB_HP300
+ 	bool
+-	depends on (FB = y) && HP300
+-	select FB_CFB_FILLRECT
++	depends on (FB = y) && DIO
+ 	select FB_CFB_IMAGEBLIT
+ 	default y
+ 

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-dnfb-breaks-multi-platform.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-dnfb-breaks-multi-platform.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,25 @@
+Subject: [PATCH] m68k: dnfb doesn't check for Apollo
+Cc: linux-fbdev-devel at lists.sourceforge.net
+
+From: Geert Uytterhoeven <geert at linux-m68k.org>
+
+The Apollo frame buffer device driver (dnfb) doesn't check whether it's
+actually running on Apollo hardware, causing a crash if it isn't.
+
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ drivers/video/dnfb.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/video/dnfb.c
++++ b/drivers/video/dnfb.c
+@@ -284,6 +284,9 @@ int __init dnfb_init(void)
+ {
+ 	int ret;
+ 
++	if (!MACH_IS_APOLLO)
++		return -ENODEV;
++
+ 	if (fb_get_options("dnfb", NULL))
+ 		return -ENODEV;
+ 

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-ethernat-breaks-multi-platform.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-ethernat-breaks-multi-platform.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,16 @@
+---
+ drivers/net/atari_91C111.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/net/atari_91C111.c
++++ b/drivers/net/atari_91C111.c
+@@ -2418,6 +2418,9 @@ static struct platform_driver smc_driver
+ 
+ static int __init smc_init(void)
+ {
++	if (!MACH_IS_ATARI)
++		return -ENODEV;
++
+ #ifdef MODULE
+ 	if (io == -1)
+ 		printk(KERN_WARNING

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-ethernec-dynamic.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-ethernec-dynamic.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,38 @@
+---
+ arch/m68k/kernel/setup.c |   12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+--- a/arch/m68k/kernel/setup.c
++++ b/arch/m68k/kernel/setup.c
+@@ -356,22 +356,28 @@ void __init setup_arch(char **cmdline_p)
+ 
+ /* set ISA defs early as possible */
+ #if defined(CONFIG_ISA) && defined(MULTI_ISA)
+-#if defined(CONFIG_Q40)
+ 	if (MACH_IS_Q40) {
+ 		isa_type = ISA_TYPE_Q40;
+ 		isa_sex = 0;
+ 	}
+-#elif defined(CONFIG_GG2)
++#ifdef CONFIG_GG2
+ 	if (MACH_IS_AMIGA && AMIGAHW_PRESENT(GG2_ISA)) {
+ 		isa_type = ISA_TYPE_GG2;
+ 		isa_sex = 0;
+ 	}
+-#elif defined(CONFIG_AMIGA_PCMCIA)
++#endif
++#ifdef CONFIG_AMIGA_PCMCIA
+ 	if (MACH_IS_AMIGA && AMIGAHW_PRESENT(PCMCIA)) {
+ 		isa_type = ISA_TYPE_AG;
+ 		isa_sex = 1;
+ 	}
+ #endif
++#ifdef CONFIG_ATARI_ROM_ISA
++	if (MACH_IS_ATARI) {
++		isa_type = ISA_TYPE_ENEC;
++		isa_sex = 0;
++	}
++#endif
+ #endif
+ }
+ 

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-hp300-breaks-multi-platform.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-hp300-breaks-multi-platform.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,23 @@
+Subject: [PATCH] m68k: Correct jump if not running on HP300
+
+From: Geert Uytterhoeven <geert at linux-m68k.org>
+
+When running a HP300-enabled kernel on non-HP300 hardware, a test in the early
+startup code jumps to the wrong label, causing a double bus fault.
+
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ arch/m68k/kernel/head.S |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/m68k/kernel/head.S
++++ b/arch/m68k/kernel/head.S
+@@ -1434,7 +1434,7 @@ L(mmu_fixup_done):
+ #endif
+ 
+ #ifdef CONFIG_HP300
+-	is_not_hp300(1f)
++	is_not_hp300(2f)
+ 	/*
+ 	 * Fix up the iobase register to point to the new location of the LEDs.
+ 	 */

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-initcalls-should-return-ENODEV-if-device-not-found.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-initcalls-should-return-ENODEV-if-device-not-found.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,93 @@
+Subject: [PATCH] m68k: Return -ENODEV if no device is found
+
+From: Geert Uytterhoeven <geert at linux-m68k.org>
+
+According to the tests in do_initcalls(), the proper error code in case no
+device is found is -ENODEV, not -ENXIO or -EIO.
+
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ drivers/block/amiflop.c      |    6 +++---
+ drivers/block/z2ram.c        |    2 +-
+ drivers/input/serio/q40kbd.c |    2 +-
+ drivers/video/amifb.c        |    4 ++--
+ drivers/video/hpfb.c         |    2 +-
+ 5 files changed, 8 insertions(+), 8 deletions(-)
+
+--- a/drivers/block/amiflop.c
++++ b/drivers/block/amiflop.c
+@@ -1714,10 +1714,10 @@ static int __init amiga_floppy_init(void
+ 	int i, ret;
+ 
+ 	if (!MACH_IS_AMIGA)
+-		return -ENXIO;
++		return -ENODEV;
+ 
+ 	if (!AMIGAHW_PRESENT(AMI_FLOPPY))
+-		return -ENXIO;
++		return -ENODEV;
+ 
+ 	if (register_blkdev(FLOPPY_MAJOR,"fd"))
+ 		return -EBUSY;
+@@ -1755,7 +1755,7 @@ static int __init amiga_floppy_init(void
+ 	if (!floppy_queue)
+ 		goto out_queue;
+ 
+-	ret = -ENXIO;
++	ret = -ENODEV;
+ 	if (fd_probe_drives() < 1) /* No usable drives */
+ 		goto out_probe;
+ 
+--- a/drivers/block/z2ram.c
++++ b/drivers/block/z2ram.c
+@@ -332,7 +332,7 @@ z2_init(void)
+     int ret;
+ 
+     if (!MACH_IS_AMIGA)
+-	return -ENXIO;
++	return -ENODEV;
+ 
+     ret = -EBUSY;
+     if (register_blkdev(Z2RAM_MAJOR, DEVICE_NAME))
+--- a/drivers/input/serio/q40kbd.c
++++ b/drivers/input/serio/q40kbd.c
+@@ -156,7 +156,7 @@ static int __init q40kbd_init(void)
+ 	int error;
+ 
+ 	if (!MACH_IS_Q40)
+-		return -EIO;
++		return -ENODEV;
+ 
+ 	error = platform_driver_register(&q40kbd_driver);
+ 	if (error)
+--- a/drivers/video/amifb.c
++++ b/drivers/video/amifb.c
+@@ -2261,7 +2261,7 @@ int __init amifb_init(void)
+ 	amifb_setup(option);
+ #endif
+ 	if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(AMI_VIDEO))
+-		return -ENXIO;
++		return -ENODEV;
+ 
+ 	/*
+ 	 * We request all registers starting from bplpt[0]
+@@ -2333,7 +2333,7 @@ default_chipset:
+ 			strcat(fb_info.fix.id, "Unknown");
+ 			goto default_chipset;
+ #else /* CONFIG_FB_AMIGA_OCS */
+-			err = -ENXIO;
++			err = -ENODEV;
+ 			goto amifb_error;
+ #endif /* CONFIG_FB_AMIGA_OCS */
+ 			break;
+--- a/drivers/video/hpfb.c
++++ b/drivers/video/hpfb.c
+@@ -382,7 +382,7 @@ int __init hpfb_init(void)
+ #define INTFBPADDR 0x560000
+ 
+ 	if (!MACH_IS_HP300)
+-		return -ENXIO;
++		return -ENODEV;
+ 
+ 	if (fb_get_options("hpfb", NULL))
+ 		return -ENODEV;

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-initrd-fix.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-initrd-fix.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,52 @@
+Subject: [PATCH] initrd: Fix virtual/physical mix-up in overwrite test
+
+From: Geert Uytterhoeven <geert at linux-m68k.org>
+
+On recent kernels, I get the following error when using an initrd:
+
+| initrd overwritten (0x00b78000 < 0x07668000) - disabling it.
+
+My Amiga 4000 has 12 MiB of RAM at physical address 0x07400000 (virtual
+0x00000000).
+The initrd is located at the end of RAM: 0x00b78000 - 0x00c00000 (virtual).
+The overwrite test compares the (virtual) initrd location to the (physical)
+first available memory location, which fails.
+
+This patch converts initrd_start to a page frame number, so it can be safely
+compared with min_low_pfn.
+
+Before the introduction of discontiguous memory support on m68k
+(12d810c1b8c2b913d48e629e2b5c01d105029839), min_low_pfn was just left
+untouched by the m68k-specific code (zero, I guess), and everything worked
+fine.
+
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+On several platforms, initrd_below_start_ok is set to 1:
+
+| arch/mips/kernel/setup.c:       initrd_below_start_ok = 1;
+| arch/parisc/mm/init.c:                  initrd_below_start_ok = 1;
+| arch/powerpc/kernel/prom.c:                     initrd_below_start_ok = 1;
+| arch/ppc/platforms/hdpu.c:                      initrd_below_start_ok = 1;
+| arch/xtensa/kernel/setup.c:             initrd_below_start_ok = 1;
+
+Some of these may be workarounds for this bug. Please check.
+
+ init/main.c |    5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/init/main.c
++++ b/init/main.c
+@@ -620,9 +620,10 @@ asmlinkage void __init start_kernel(void
+ 
+ #ifdef CONFIG_BLK_DEV_INITRD
+ 	if (initrd_start && !initrd_below_start_ok &&
+-			initrd_start < min_low_pfn << PAGE_SHIFT) {
++	    page_to_pfn(virt_to_page(initrd_start)) < min_low_pfn) {
+ 		printk(KERN_CRIT "initrd overwritten (0x%08lx < 0x%08lx) - "
+-		    "disabling it.\n",initrd_start,min_low_pfn << PAGE_SHIFT);
++		    "disabling it.\n",
++		    page_to_pfn(virt_to_page(initrd_start)), min_low_pfn);
+ 		initrd_start = 0;
+ 	}
+ #endif

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-input-drivers-break-multiplatform.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-input-drivers-break-multiplatform.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,43 @@
+Subject: [PATCH] m68k: Some input drivers do not check the platform
+Cc: linux-input at vger.kernel.org, linux-parisc at vger.kernel.org
+
+From: Geert Uytterhoeven <geert at linux-m68k.org>
+
+Some input drivers do not check whether they're actually running on the
+correct platform, causing multi-platform kernels to crash if they are not.
+
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+
+---
+ drivers/input/misc/hp_sdc_rtc.c  |    5 +++++
+ drivers/input/serio/hp_sdc_mlc.c |    5 +++++
+ 2 files changed, 10 insertions(+)
+
+--- a/drivers/input/misc/hp_sdc_rtc.c
++++ b/drivers/input/misc/hp_sdc_rtc.c
+@@ -691,6 +691,11 @@ static int __init hp_sdc_rtc_init(void)
+ {
+ 	int ret;
+ 
++#ifdef __mc68000__
++	if (!MACH_IS_HP300)
++		return -ENODEV;
++#endif
++
+ 	init_MUTEX(&i8042tregs);
+ 
+ 	if ((ret = hp_sdc_request_timer_irq(&hp_sdc_rtc_isr)))
+--- a/drivers/input/serio/hp_sdc_mlc.c
++++ b/drivers/input/serio/hp_sdc_mlc.c
+@@ -306,6 +306,11 @@ static int __init hp_sdc_mlc_init(void)
+ {
+ 	hil_mlc *mlc = &hp_sdc_mlc;
+ 
++#ifdef __mc68000__
++	if (!MACH_IS_HP300)
++		return -ENODEV;
++#endif
++
+ 	printk(KERN_INFO PREFIX "Registering the System Domain Controller's HIL MLC.\n");
+ 
+ 	hp_sdc_mlc_priv.emtestmode = 0;

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-isa-type-name-conflicts.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-isa-type-name-conflicts.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,187 @@
+Subject: [PATCH] m68k: Prefix ISA type with ISA_TYPE_
+
+From: Geert Uytterhoeven <geert at linux-m68k.org>
+
+The *_ISA type defines are quite generic and cause namespace conflicts in some
+kernel configurations (e.g. with `AMIGAHW_DECLARE(GG2_ISA)' in
+<asm/amigahw.h>). Use ISA_TYPE_* to avoid such conflicts.
+
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ arch/m68k/kernel/setup.c |    6 ++--
+ include/asm-m68k/io.h    |   58 +++++++++++++++++++++++------------------------
+ 2 files changed, 32 insertions(+), 32 deletions(-)
+
+--- a/arch/m68k/kernel/setup.c
++++ b/arch/m68k/kernel/setup.c
+@@ -358,17 +358,17 @@ void __init setup_arch(char **cmdline_p)
+ #if defined(CONFIG_ISA) && defined(MULTI_ISA)
+ #if defined(CONFIG_Q40)
+ 	if (MACH_IS_Q40) {
+-		isa_type = Q40_ISA;
++		isa_type = ISA_TYPE_Q40;
+ 		isa_sex = 0;
+ 	}
+ #elif defined(CONFIG_GG2)
+ 	if (MACH_IS_AMIGA && AMIGAHW_PRESENT(GG2_ISA)) {
+-		isa_type = GG2_ISA;
++		isa_type = ISA_TYPE_GG2;
+ 		isa_sex = 0;
+ 	}
+ #elif defined(CONFIG_AMIGA_PCMCIA)
+ 	if (MACH_IS_AMIGA && AMIGAHW_PRESENT(PCMCIA)) {
+-		isa_type = AG_ISA;
++		isa_type = ISA_TYPE_AG;
+ 		isa_sex = 1;
+ 	}
+ #endif
+--- a/include/asm-m68k/io.h
++++ b/include/asm-m68k/io.h
+@@ -108,25 +108,25 @@ extern unsigned long gg2_isa_base;
+ #undef MULTI_ISA
+ #endif
+ 
+-#define Q40_ISA (1)
+-#define GG2_ISA (2)
+-#define AG_ISA  (3)
+-#define ENEC_ISA (4)
++#define ISA_TYPE_Q40 (1)
++#define ISA_TYPE_GG2 (2)
++#define ISA_TYPE_AG  (3)
++#define ISA_TYPE_ENEC (4)
+ 
+ #if defined(CONFIG_Q40) && !defined(MULTI_ISA)
+-#define ISA_TYPE Q40_ISA
++#define ISA_TYPE ISA_TYPE_Q40
+ #define ISA_SEX  0
+ #endif
+ #if defined(CONFIG_AMIGA_PCMCIA) && !defined(MULTI_ISA)
+-#define ISA_TYPE AG_ISA
++#define ISA_TYPE ISA_TYPE_AG
+ #define ISA_SEX  1
+ #endif
+ #if defined(CONFIG_GG2) && !defined(MULTI_ISA)
+-#define ISA_TYPE GG2_ISA
++#define ISA_TYPE ISA_TYPE_GG2
+ #define ISA_SEX  0
+ #endif
+ #if defined(CONFIG_ATARI_ROM_ISA) && !defined(MULTI_ISA)
+-#define ISA_TYPE ENEC_ISA
++#define ISA_TYPE ISA_TYPE_ENEC
+ #define ISA_SEX  0
+ #endif
+ 
+@@ -148,16 +148,16 @@ static inline u8 __iomem *isa_itb(unsign
+   switch(ISA_TYPE)
+     {
+ #ifdef CONFIG_Q40
+-    case Q40_ISA: return (u8 __iomem *)Q40_ISA_IO_B(addr);
++    case ISA_TYPE_Q40: return (u8 __iomem *)Q40_ISA_IO_B(addr);
+ #endif
+ #ifdef CONFIG_GG2
+-    case GG2_ISA: return (u8 __iomem *)GG2_ISA_IO_B(addr);
++    case ISA_TYPE_GG2: return (u8 __iomem *)GG2_ISA_IO_B(addr);
+ #endif
+ #ifdef CONFIG_AMIGA_PCMCIA
+-    case AG_ISA: return (u8 __iomem *)AG_ISA_IO_B(addr);
++    case ISA_TYPE_AG: return (u8 __iomem *)AG_ISA_IO_B(addr);
+ #endif
+ #ifdef CONFIG_ATARI_ROM_ISA
+-    case ENEC_ISA: return (u8 __iomem *)ENEC_ISA_IO_B(addr);
++    case ISA_TYPE_ENEC: return (u8 __iomem *)ENEC_ISA_IO_B(addr);
+ #endif
+     default: return NULL; /* avoid warnings, just in case */
+     }
+@@ -167,16 +167,16 @@ static inline u16 __iomem *isa_itw(unsig
+   switch(ISA_TYPE)
+     {
+ #ifdef CONFIG_Q40
+-    case Q40_ISA: return (u16 __iomem *)Q40_ISA_IO_W(addr);
++    case ISA_TYPE_Q40: return (u16 __iomem *)Q40_ISA_IO_W(addr);
+ #endif
+ #ifdef CONFIG_GG2
+-    case GG2_ISA: return (u16 __iomem *)GG2_ISA_IO_W(addr);
++    case ISA_TYPE_GG2: return (u16 __iomem *)GG2_ISA_IO_W(addr);
+ #endif
+ #ifdef CONFIG_AMIGA_PCMCIA
+-    case AG_ISA: return (u16 __iomem *)AG_ISA_IO_W(addr);
++    case ISA_TYPE_AG: return (u16 __iomem *)AG_ISA_IO_W(addr);
+ #endif
+ #ifdef CONFIG_ATARI_ROM_ISA
+-    case ENEC_ISA: return (u16 __iomem *)ENEC_ISA_IO_W(addr);
++    case ISA_TYPE_ENEC: return (u16 __iomem *)ENEC_ISA_IO_W(addr);
+ #endif
+     default: return NULL; /* avoid warnings, just in case */
+     }
+@@ -186,7 +186,7 @@ static inline u32 __iomem *isa_itl(unsig
+   switch(ISA_TYPE)
+     {
+ #ifdef CONFIG_AMIGA_PCMCIA
+-    case AG_ISA: return (u32 __iomem *)AG_ISA_IO_W(addr);
++    case ISA_TYPE_AG: return (u32 __iomem *)AG_ISA_IO_W(addr);
+ #endif
+     default: return NULL; /* avoid warnings, just in case */
+     }
+@@ -196,16 +196,16 @@ static inline u8 __iomem *isa_mtb(unsign
+   switch(ISA_TYPE)
+     {
+ #ifdef CONFIG_Q40
+-    case Q40_ISA: return (u8 __iomem *)Q40_ISA_MEM_B(addr);
++    case ISA_TYPE_Q40: return (u8 __iomem *)Q40_ISA_MEM_B(addr);
+ #endif
+ #ifdef CONFIG_GG2
+-    case GG2_ISA: return (u8 __iomem *)GG2_ISA_MEM_B(addr);
++    case ISA_TYPE_GG2: return (u8 __iomem *)GG2_ISA_MEM_B(addr);
+ #endif
+ #ifdef CONFIG_AMIGA_PCMCIA
+-    case AG_ISA: return (u8 __iomem *)addr;
++    case ISA_TYPE_AG: return (u8 __iomem *)addr;
+ #endif
+ #ifdef CONFIG_ATARI_ROM_ISA
+-    case ENEC_ISA: return (u8 __iomem *)ENEC_ISA_MEM_B(addr);
++    case ISA_TYPE_ENEC: return (u8 __iomem *)ENEC_ISA_MEM_B(addr);
+ #endif
+     default: return NULL; /* avoid warnings, just in case */
+     }
+@@ -215,16 +215,16 @@ static inline u16 __iomem *isa_mtw(unsig
+   switch(ISA_TYPE)
+     {
+ #ifdef CONFIG_Q40
+-    case Q40_ISA: return (u16 __iomem *)Q40_ISA_MEM_W(addr);
++    case ISA_TYPE_Q40: return (u16 __iomem *)Q40_ISA_MEM_W(addr);
+ #endif
+ #ifdef CONFIG_GG2
+-    case GG2_ISA: return (u16 __iomem *)GG2_ISA_MEM_W(addr);
++    case ISA_TYPE_GG2: return (u16 __iomem *)GG2_ISA_MEM_W(addr);
+ #endif
+ #ifdef CONFIG_AMIGA_PCMCIA
+-    case AG_ISA: return (u16 __iomem *)addr;
++    case ISA_TYPE_AG: return (u16 __iomem *)addr;
+ #endif
+ #ifdef CONFIG_ATARI_ROM_ISA
+-    case ENEC_ISA: return (u16 __iomem *)ENEC_ISA_MEM_W(addr);
++    case ISA_TYPE_ENEC: return (u16 __iomem *)ENEC_ISA_MEM_W(addr);
+ #endif
+     default: return NULL; /* avoid warnings, just in case */
+     }
+@@ -280,16 +280,16 @@ static inline void isa_delay(void)
+   switch(ISA_TYPE)
+     {
+ #ifdef CONFIG_Q40
+-    case Q40_ISA: isa_outb(0,0x80); break;
++    case ISA_TYPE_Q40: isa_outb(0,0x80); break;
+ #endif
+ #ifdef CONFIG_GG2
+-    case GG2_ISA: break;
++    case ISA_TYPE_GG2: break;
+ #endif
+ #ifdef CONFIG_AMIGA_PCMCIA
+-    case AG_ISA: break;
++    case ISA_TYPE_AG: break;
+ #endif
+ #ifdef CONFIG_ATARI_ROM_ISA
+-    case ENEC_ISA: break;
++    case ISA_TYPE_ENEC: break;
+ #endif
+     default: break; /* avoid warnings */
+     }

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-kill-CONFIG_FB_DAFB.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-kill-CONFIG_FB_DAFB.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,22 @@
+Subject: [PATCH] m68k: Kill CONFIG_FB_DAFB
+Cc: linux-fbdev-devel at lists.sourceforge.net
+
+From: Geert Uytterhoeven <geert at linux-m68k.org>
+
+CONFIG_FB_DAFB is a leftover from pre-Kconfig
+
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ drivers/video/Kconfig |    1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/drivers/video/Kconfig
++++ b/drivers/video/Kconfig
+@@ -594,7 +594,6 @@ config FB_MAC
+ 	select FB_CFB_IMAGEBLIT
+ 	select FB_MACMODES
+ 
+-#      bool '  Apple DAFB display support' CONFIG_FB_DAFB
+ config FB_HP300
+ 	bool
+ 	depends on (FB = y) && HP300

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-macide-breaks-multi-platform.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-macide-breaks-multi-platform.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,25 @@
+Subject: [PATCH] m68k: macide doesn't check for Mac
+Cc: linux-ide at vger.kernel.org
+
+From: Geert Uytterhoeven <geert at linux-m68k.org>
+
+The Macintosh IDE driver (macide) doesn't check whether it's actually running
+on Mac hardware, causing a crash if it isn't.
+
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ drivers/ide/legacy/macide.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/ide/legacy/macide.c
++++ b/drivers/ide/legacy/macide.c
+@@ -95,6 +95,9 @@ static int __init macide_init(void)
+ 	int irq;
+ 	hw_regs_t hw;
+ 
++	if (!MACH_IS_MAC)
++		return -ENODEV;
++
+ 	switch (macintosh_config->ide_type) {
+ 	case MAC_IDE_QUADRA:
+ 		base = IDE_BASE;

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-net-drivers-break-multiplatform.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-net-drivers-break-multiplatform.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,97 @@
+Subject: [PATCH] m68k: Some network drivers do not check the platform
+Cc: netdev at vger.kernel.org
+
+From: Geert Uytterhoeven <geert at linux-m68k.org>
+
+Some network drivers do not check whether they're actually running on the
+correct platform, causing multi-platform kernels to crash if they are not.
+
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ drivers/net/82596.c     |    7 +++++++
+ drivers/net/apne.c      |    3 +++
+ drivers/net/mac89x0.c   |    3 +++
+ drivers/net/macmace.c   |    3 +++
+ drivers/net/sun3lance.c |    3 +++
+ 5 files changed, 19 insertions(+)
+
+--- a/drivers/net/82596.c
++++ b/drivers/net/82596.c
+@@ -1162,6 +1162,7 @@ struct net_device * __init i82596_probe(
+ 		memcpy(eth_addr, (void *) 0xfffc1f2c, 6);	/* YUCK! Get addr from NOVRAM */
+ 		dev->base_addr = MVME_I596_BASE;
+ 		dev->irq = (unsigned) MVME16x_IRQ_I596;
++		goto found;
+ 	}
+ #endif
+ #ifdef ENABLE_BVME6000_NET
+@@ -1176,6 +1177,7 @@ struct net_device * __init i82596_probe(
+ 		rtc[3] = msr;
+ 		dev->base_addr = BVME_I596_BASE;
+ 		dev->irq = (unsigned) BVME_IRQ_I596;
++		goto found;
+ 	}
+ #endif
+ #ifdef ENABLE_APRICOT
+@@ -1212,8 +1214,13 @@ struct net_device * __init i82596_probe(
+ 		}
+ 
+ 		dev->irq = 10;
++		goto found;
+ 	}
+ #endif
++	err = -ENODEV;
++	goto out;
++
++found:
+ 	dev->mem_start = (int)__get_free_pages(GFP_ATOMIC, 0);
+ 	if (!dev->mem_start) {
+ 		err = -ENOMEM;
+--- a/drivers/net/apne.c
++++ b/drivers/net/apne.c
+@@ -127,6 +127,9 @@ struct net_device * __init apne_probe(in
+ #endif
+ 	int err;
+ 
++	if (!MACH_IS_AMIGA)
++		return ERR_PTR(-ENODEV);
++
+ 	if (apne_owned)
+ 		return ERR_PTR(-ENODEV);
+ 
+--- a/drivers/net/mac89x0.c
++++ b/drivers/net/mac89x0.c
+@@ -183,6 +183,9 @@ struct net_device * __init mac89x0_probe
+ 	int err = -ENODEV;
+ 	DECLARE_MAC_BUF(mac);
+ 
++	if (!MACH_IS_MAC)
++		return ERR_PTR(-ENODEV);
++
+ 	dev = alloc_etherdev(sizeof(struct net_local));
+ 	if (!dev)
+ 		return ERR_PTR(-ENOMEM);
+--- a/drivers/net/macmace.c
++++ b/drivers/net/macmace.c
+@@ -781,6 +781,9 @@ static int __init mac_mace_init_module(v
+ {
+ 	int err;
+ 
++	if (!MACH_IS_MAC)
++		return -ENODEV;
++
+ 	if ((err = platform_driver_register(&mac_mace_driver))) {
+ 		printk(KERN_ERR "Driver registration failed\n");
+ 		return err;
+--- a/drivers/net/sun3lance.c
++++ b/drivers/net/sun3lance.c
+@@ -250,6 +250,9 @@ struct net_device * __init sun3lance_pro
+ 	static int found;
+ 	int err = -ENODEV;
+ 
++	if (!MACH_IS_SUN3 && !MACH_IS_SUN3X)
++		return ERR_PTR(-ENODEV);
++
+ 	/* check that this machine has an onboard lance */
+ 	switch(idprom->id_machtype) {
+ 	case SM_SUN3|SM_3_50:

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-new-mac_esp-driver.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-new-mac_esp-driver.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,842 @@
+Subject: [PATCH] m68k: new mac_esp scsi driver
+Cc: David Miller <davem at davemloft.net>, Roman Zippel <zippel at linux-m68k.org>, linux-scsi at vger.kernel.org, linux-m68k at vger.kernel.org
+
+From: Finn Thain <fthain at telegraphics.com.au>
+
+Replace the mac_esp driver with a new one based on the esp_scsi core.
+
+For esp_scsi: add support for sync transfers for the PIO mode, add a new 
+esp_driver_ops method to get the maximum dma transfer size (like the old 
+NCR53C9x driver), and some cleanups.
+
+Signed-off-by: Finn Thain <fthain at telegraphics.com.au>
+Acked-by: David S. Miller <davem at davemloft.net>
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ drivers/scsi/Kconfig    |   10 
+ drivers/scsi/Makefile   |    1 
+ drivers/scsi/esp_scsi.c |   35 +-
+ drivers/scsi/esp_scsi.h |    9 
+ drivers/scsi/mac_esp.c  |  657 ++++++++++++++++++++++++++++++++++++++++++++++++
+ 5 files changed, 700 insertions(+), 12 deletions(-)
+
+--- a/drivers/scsi/Kconfig
++++ b/drivers/scsi/Kconfig
+@@ -1677,6 +1677,16 @@ config MAC_SCSI
+ 	  SCSI-HOWTO, available from
+ 	  <http://www.tldp.org/docs.html#howto>.
+ 
++config SCSI_MAC_ESP
++	tristate "Macintosh NCR53c9[46] SCSI"
++	depends on MAC && SCSI
++	help
++	  This is the NCR 53c9x SCSI controller found on most of the 68040
++	  based Macintoshes.
++
++	  To compile this driver as a module, choose M here: the module
++	  will be called mac_esp.
++
+ config MVME147_SCSI
+ 	bool "WD33C93 SCSI driver for MVME147"
+ 	depends on MVME147 && SCSI=y
+--- a/drivers/scsi/Makefile
++++ b/drivers/scsi/Makefile
+@@ -46,6 +46,7 @@ obj-$(CONFIG_MVME147_SCSI)	+= mvme147.o	
+ obj-$(CONFIG_SGIWD93_SCSI)	+= sgiwd93.o	wd33c93.o
+ obj-$(CONFIG_ATARI_SCSI)	+= atari_scsi.o
+ obj-$(CONFIG_MAC_SCSI)		+= mac_scsi.o
++obj-$(CONFIG_SCSI_MAC_ESP)	+= esp_scsi.o	mac_esp.o
+ obj-$(CONFIG_SUN3_SCSI)		+= sun3_scsi.o  sun3_scsi_vme.o
+ obj-$(CONFIG_MVME16x_SCSI)	+= 53c700.o	mvme16x_scsi.o
+ obj-$(CONFIG_BVME6000_SCSI)	+= 53c700.o	bvme6000_scsi.o
+--- a/drivers/scsi/esp_scsi.c
++++ b/drivers/scsi/esp_scsi.c
+@@ -978,7 +978,7 @@ static int esp_check_spur_intr(struct es
+ 			 */
+ 			if (!esp->ops->dma_error(esp)) {
+ 				printk(KERN_ERR PFX "esp%d: Spurious irq, "
+-				       "sreg=%x.\n",
++				       "sreg=%02x.\n",
+ 				       esp->host->unique_id, esp->sreg);
+ 				return -1;
+ 			}
+@@ -1447,6 +1447,9 @@ static void esp_msgin_sdtr(struct esp *e
+ 	if (offset > 15)
+ 		goto do_reject;
+ 
++	if (esp->flags & ESP_FLAG_DISABLE_SYNC)
++		offset = 0;
++
+ 	if (offset) {
+ 		int rounded_up, one_clock;
+ 
+@@ -1697,7 +1700,12 @@ again:
+ 		else
+ 			ent->flags &= ~ESP_CMD_FLAG_WRITE;
+ 
+-		dma_len = esp_dma_length_limit(esp, dma_addr, dma_len);
++		if (esp->ops->dma_length_limit)
++			dma_len = esp->ops->dma_length_limit(esp, dma_addr,
++							     dma_len);
++		else
++			dma_len = esp_dma_length_limit(esp, dma_addr, dma_len);
++
+ 		esp->data_dma_len = dma_len;
+ 
+ 		if (!dma_len) {
+@@ -1761,7 +1769,6 @@ again:
+ 		esp_advance_dma(esp, ent, cmd, bytes_sent);
+ 		esp_event(esp, ESP_EVENT_CHECK_PHASE);
+ 		goto again;
+-		break;
+ 	}
+ 
+ 	case ESP_EVENT_STATUS: {
+@@ -2235,7 +2242,7 @@ static void esp_bootup_reset(struct esp 
+ 
+ static void esp_set_clock_params(struct esp *esp)
+ {
+-	int fmhz;
++	int fhz;
+ 	u8 ccf;
+ 
+ 	/* This is getting messy but it has to be done correctly or else
+@@ -2270,9 +2277,9 @@ static void esp_set_clock_params(struct 
+ 	 *    This entails the smallest and largest sync period we could ever
+ 	 *    handle on this ESP.
+ 	 */
+-	fmhz = esp->cfreq;
++	fhz = esp->cfreq;
+ 
+-	ccf = ((fmhz / 1000000) + 4) / 5;
++	ccf = ((fhz / 1000000) + 4) / 5;
+ 	if (ccf == 1)
+ 		ccf = 2;
+ 
+@@ -2281,16 +2288,16 @@ static void esp_set_clock_params(struct 
+ 	 * been unable to find the clock-frequency PROM property.  All
+ 	 * other machines provide useful values it seems.
+ 	 */
+-	if (fmhz <= 5000000 || ccf < 1 || ccf > 8) {
+-		fmhz = 20000000;
++	if (fhz <= 5000000 || ccf < 1 || ccf > 8) {
++		fhz = 20000000;
+ 		ccf = 4;
+ 	}
+ 
+ 	esp->cfact = (ccf == 8 ? 0 : ccf);
+-	esp->cfreq = fmhz;
+-	esp->ccycle = ESP_MHZ_TO_CYCLE(fmhz);
++	esp->cfreq = fhz;
++	esp->ccycle = ESP_HZ_TO_CYCLE(fhz);
+ 	esp->ctick = ESP_TICK(ccf, esp->ccycle);
+-	esp->neg_defp = ESP_NEG_DEFP(fmhz, ccf);
++	esp->neg_defp = ESP_NEG_DEFP(fhz, ccf);
+ 	esp->sync_defp = SYNC_DEFP_SLOW;
+ }
+ 
+@@ -2382,6 +2389,12 @@ static int esp_slave_configure(struct sc
+ 	struct esp_target_data *tp = &esp->target[dev->id];
+ 	int goal_tags, queue_depth;
+ 
++	if (esp->flags & ESP_FLAG_DISABLE_SYNC) {
++		/* Bypass async domain validation */
++		dev->ppr  = 0;
++		dev->sdtr = 0;
++	}
++
+ 	goal_tags = 0;
+ 
+ 	if (dev->tagged_supported) {
+--- a/drivers/scsi/esp_scsi.h
++++ b/drivers/scsi/esp_scsi.h
+@@ -224,7 +224,7 @@
+ #define ESP_TIMEO_CONST       8192
+ #define ESP_NEG_DEFP(mhz, cfact) \
+         ((ESP_BUS_TIMEOUT * ((mhz) / 1000)) / (8192 * (cfact)))
+-#define ESP_MHZ_TO_CYCLE(mhertz)  ((1000000000) / ((mhertz) / 1000))
++#define ESP_HZ_TO_CYCLE(hertz)  ((1000000000) / ((hertz) / 1000))
+ #define ESP_TICK(ccf, cycle)  ((7682 * (ccf) * (cycle) / 1000))
+ 
+ /* For slow to medium speed input clock rates we shoot for 5mb/s, but for high
+@@ -368,6 +368,12 @@ struct esp_driver_ops {
+ 	 */
+ 	int (*irq_pending)(struct esp *esp);
+ 
++	/* Return the maximum allowable size of a DMA transfer for a
++	 * given buffer.
++	 */
++	u32 (*dma_length_limit)(struct esp *esp, u32 dma_addr,
++				u32 dma_len);
++
+ 	/* Reset the DMA engine entirely.  On return, ESP interrupts
+ 	 * should be enabled.  Often the interrupt enabling is
+ 	 * controlled in the DMA engine.
+@@ -471,6 +477,7 @@ struct esp {
+ #define ESP_FLAG_DOING_SLOWCMD	0x00000004
+ #define ESP_FLAG_WIDE_CAPABLE	0x00000008
+ #define ESP_FLAG_QUICKIRQ_CHECK	0x00000010
++#define ESP_FLAG_DISABLE_SYNC	0x00000020
+ 
+ 	u8			select_state;
+ #define ESP_SELECT_NONE		0x00 /* Not selecting */
+--- /dev/null
++++ b/drivers/scsi/mac_esp.c
+@@ -0,0 +1,657 @@
++/* mac_esp.c: ESP front-end for Macintosh Quadra systems.
++ *
++ * Adapted from jazz_esp.c and the old mac_esp.c.
++ *
++ * The pseudo DMA algorithm is based on the one used in NetBSD.
++ * See sys/arch/mac68k/obio/esp.c for some background information.
++ *
++ * Copyright (C) 2007-2008 Finn Thain
++ */
++
++#include <linux/kernel.h>
++#include <linux/types.h>
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/interrupt.h>
++#include <linux/platform_device.h>
++#include <linux/dma-mapping.h>
++#include <linux/scatterlist.h>
++#include <linux/delay.h>
++#include <linux/io.h>
++#include <linux/nubus.h>
++
++#include <asm/irq.h>
++#include <asm/dma.h>
++
++#include <asm/macints.h>
++#include <asm/macintosh.h>
++
++#include <scsi/scsi_host.h>
++
++#include "esp_scsi.h"
++
++#define DRV_MODULE_NAME     "mac_esp"
++#define PFX                 DRV_MODULE_NAME ": "
++#define DRV_VERSION         "1.000"
++#define DRV_MODULE_RELDATE  "Sept 15, 2007"
++
++#define MAC_ESP_IO_BASE          0x50F00000
++#define MAC_ESP_REGS_QUADRA      (MAC_ESP_IO_BASE + 0x10000)
++#define MAC_ESP_REGS_QUADRA2     (MAC_ESP_IO_BASE + 0xF000)
++#define MAC_ESP_REGS_QUADRA3     (MAC_ESP_IO_BASE + 0x18000)
++#define MAC_ESP_REGS_SPACING     0x402
++#define MAC_ESP_PDMA_REG         0xF9800024
++#define MAC_ESP_PDMA_REG_SPACING 0x4
++#define MAC_ESP_PDMA_IO_OFFSET   0x100
++
++#define esp_read8(REG)		mac_esp_read8(esp, REG)
++#define esp_write8(VAL, REG)	mac_esp_write8(esp, VAL, REG)
++
++struct mac_esp_priv {
++	struct esp *esp;
++	void __iomem *pdma_regs;
++	void __iomem *pdma_io;
++	int error;
++};
++static struct platform_device *internal_esp, *external_esp;
++
++#define MAC_ESP_GET_PRIV(esp) ((struct mac_esp_priv *) \
++			       platform_get_drvdata((struct platform_device *) \
++						    (esp->dev)))
++
++static inline void mac_esp_write8(struct esp *esp, u8 val, unsigned long reg)
++{
++	nubus_writeb(val, esp->regs + reg * 16);
++}
++
++static inline u8 mac_esp_read8(struct esp *esp, unsigned long reg)
++{
++	return nubus_readb(esp->regs + reg * 16);
++}
++
++/* For pseudo DMA and PIO we need the virtual address
++ * so this address mapping is the identity mapping.
++ */
++
++static dma_addr_t mac_esp_map_single(struct esp *esp, void *buf,
++				     size_t sz, int dir)
++{
++	return (dma_addr_t)buf;
++}
++
++static int mac_esp_map_sg(struct esp *esp, struct scatterlist *sg,
++			  int num_sg, int dir)
++{
++	int i;
++
++	for (i = 0; i < num_sg; i++)
++		sg[i].dma_address = (u32)sg_virt(&sg[i]);
++	return num_sg;
++}
++
++static void mac_esp_unmap_single(struct esp *esp, dma_addr_t addr,
++				 size_t sz, int dir)
++{
++	/* Nothing to do. */
++}
++
++static void mac_esp_unmap_sg(struct esp *esp, struct scatterlist *sg,
++			     int num_sg, int dir)
++{
++	/* Nothing to do. */
++}
++
++static void mac_esp_reset_dma(struct esp *esp)
++{
++	/* Nothing to do. */
++}
++
++static void mac_esp_dma_drain(struct esp *esp)
++{
++	/* Nothing to do. */
++}
++
++static void mac_esp_dma_invalidate(struct esp *esp)
++{
++	/* Nothing to do. */
++}
++
++static int mac_esp_dma_error(struct esp *esp)
++{
++	return MAC_ESP_GET_PRIV(esp)->error;
++}
++
++static inline int mac_esp_wait_for_empty_fifo(struct esp *esp)
++{
++	struct mac_esp_priv *mep = MAC_ESP_GET_PRIV(esp);
++	int i = 500000;
++
++	do {
++		if (!(esp_read8(ESP_FFLAGS) & ESP_FF_FBYTES))
++			return 0;
++
++		if (esp_read8(ESP_STATUS) & ESP_STAT_INTR)
++			return 1;
++
++		udelay(2);
++	} while (--i);
++
++	printk(KERN_ERR PFX "FIFO is not empty (sreg %02x)\n",
++	       esp_read8(ESP_STATUS));
++	mep->error = 1;
++	return 1;
++}
++
++static inline int mac_esp_wait_for_dreq(struct esp *esp)
++{
++	struct mac_esp_priv *mep = MAC_ESP_GET_PRIV(esp);
++	int i = 500000;
++
++	do {
++		if (mep->pdma_regs == NULL) {
++			if (mac_irq_pending(IRQ_MAC_SCSIDRQ))
++				return 0;
++		} else {
++			if (nubus_readl(mep->pdma_regs) & 0x200)
++				return 0;
++		}
++
++		if (esp_read8(ESP_STATUS) & ESP_STAT_INTR)
++			return 1;
++
++		udelay(2);
++	} while (--i);
++
++	printk(KERN_ERR PFX "PDMA timeout (sreg %02x)\n",
++	       esp_read8(ESP_STATUS));
++	mep->error = 1;
++	return 1;
++}
++
++#define MAC_ESP_PDMA_LOOP(operands) \
++	asm volatile ( \
++	     "       tstw %2                   \n" \
++	     "       jbeq 20f                  \n" \
++	     "1:     movew " operands "        \n" \
++	     "2:     movew " operands "        \n" \
++	     "3:     movew " operands "        \n" \
++	     "4:     movew " operands "        \n" \
++	     "5:     movew " operands "        \n" \
++	     "6:     movew " operands "        \n" \
++	     "7:     movew " operands "        \n" \
++	     "8:     movew " operands "        \n" \
++	     "9:     movew " operands "        \n" \
++	     "10:    movew " operands "        \n" \
++	     "11:    movew " operands "        \n" \
++	     "12:    movew " operands "        \n" \
++	     "13:    movew " operands "        \n" \
++	     "14:    movew " operands "        \n" \
++	     "15:    movew " operands "        \n" \
++	     "16:    movew " operands "        \n" \
++	     "       subqw #1,%2               \n" \
++	     "       jbne 1b                   \n" \
++	     "20:    tstw %3                   \n" \
++	     "       jbeq 30f                  \n" \
++	     "21:    movew " operands "        \n" \
++	     "       subqw #1,%3               \n" \
++	     "       jbne 21b                  \n" \
++	     "30:    tstw %4                   \n" \
++	     "       jbeq 40f                  \n" \
++	     "31:    moveb " operands "        \n" \
++	     "32:    nop                       \n" \
++	     "40:                              \n" \
++	     "                                 \n" \
++	     "       .section __ex_table,\"a\" \n" \
++	     "       .align  4                 \n" \
++	     "       .long   1b,40b            \n" \
++	     "       .long   2b,40b            \n" \
++	     "       .long   3b,40b            \n" \
++	     "       .long   4b,40b            \n" \
++	     "       .long   5b,40b            \n" \
++	     "       .long   6b,40b            \n" \
++	     "       .long   7b,40b            \n" \
++	     "       .long   8b,40b            \n" \
++	     "       .long   9b,40b            \n" \
++	     "       .long  10b,40b            \n" \
++	     "       .long  11b,40b            \n" \
++	     "       .long  12b,40b            \n" \
++	     "       .long  13b,40b            \n" \
++	     "       .long  14b,40b            \n" \
++	     "       .long  15b,40b            \n" \
++	     "       .long  16b,40b            \n" \
++	     "       .long  21b,40b            \n" \
++	     "       .long  31b,40b            \n" \
++	     "       .long  32b,40b            \n" \
++	     "       .previous                 \n" \
++	     : "+a" (addr) \
++	     : "a" (mep->pdma_io), "r" (count32), "r" (count2), "g" (esp_count))
++
++static void mac_esp_send_pdma_cmd(struct esp *esp, u32 addr, u32 esp_count,
++				  u32 dma_count, int write, u8 cmd)
++{
++	struct mac_esp_priv *mep = MAC_ESP_GET_PRIV(esp);
++	unsigned long flags;
++
++	local_irq_save(flags);
++
++	mep->error = 0;
++
++	if (!write)
++		scsi_esp_cmd(esp, ESP_CMD_FLUSH);
++
++	esp_write8((esp_count >> 0) & 0xFF, ESP_TCLOW);
++	esp_write8((esp_count >> 8) & 0xFF, ESP_TCMED);
++
++	scsi_esp_cmd(esp, cmd);
++
++	do {
++		unsigned int count32 = esp_count >> 5;
++		unsigned int count2 = (esp_count & 0x1F) >> 1;
++		unsigned int start_addr = addr;
++
++		if (mac_esp_wait_for_dreq(esp))
++			break;
++
++		if (write) {
++			MAC_ESP_PDMA_LOOP("%1@,%0 at +");
++
++			esp_count -= addr - start_addr;
++		} else {
++			unsigned int n;
++
++			MAC_ESP_PDMA_LOOP("%0 at +,%1@");
++
++			if (mac_esp_wait_for_empty_fifo(esp))
++				break;
++
++			n = (esp_read8(ESP_TCMED) << 8) + esp_read8(ESP_TCLOW);
++			addr = start_addr + esp_count - n;
++			esp_count = n;
++		}
++	} while (esp_count);
++
++	local_irq_restore(flags);
++}
++
++/*
++ * Programmed IO routines follow.
++ */
++
++static inline int mac_esp_wait_for_fifo(struct esp *esp)
++{
++	int i = 500000;
++
++	do {
++		if (esp_read8(ESP_FFLAGS) & ESP_FF_FBYTES)
++			return 0;
++
++		udelay(2);
++	} while (--i);
++
++	printk(KERN_ERR PFX "FIFO is empty (sreg %02x)\n",
++	       esp_read8(ESP_STATUS));
++	return 1;
++}
++
++static inline int mac_esp_wait_for_intr(struct esp *esp)
++{
++	int i = 500000;
++
++	do {
++		esp->sreg = esp_read8(ESP_STATUS);
++		if (esp->sreg & ESP_STAT_INTR)
++			return 0;
++
++		udelay(2);
++	} while (--i);
++
++	printk(KERN_ERR PFX "IRQ timeout (sreg %02x)\n", esp->sreg);
++	return 1;
++}
++
++#define MAC_ESP_PIO_LOOP(operands, reg1) \
++	asm volatile ( \
++	     "1:     moveb " operands " \n" \
++	     "       subqw #1,%1        \n" \
++	     "       jbne 1b            \n" \
++	     : "+a" (addr), "+r" (reg1) \
++	     : "a" (fifo))
++
++#define MAC_ESP_PIO_FILL(operands, reg1) \
++	asm volatile ( \
++	     "       moveb " operands " \n" \
++	     "       moveb " operands " \n" \
++	     "       moveb " operands " \n" \
++	     "       moveb " operands " \n" \
++	     "       moveb " operands " \n" \
++	     "       moveb " operands " \n" \
++	     "       moveb " operands " \n" \
++	     "       moveb " operands " \n" \
++	     "       moveb " operands " \n" \
++	     "       moveb " operands " \n" \
++	     "       moveb " operands " \n" \
++	     "       moveb " operands " \n" \
++	     "       moveb " operands " \n" \
++	     "       moveb " operands " \n" \
++	     "       moveb " operands " \n" \
++	     "       moveb " operands " \n" \
++	     "       subqw #8,%1        \n" \
++	     "       subqw #8,%1        \n" \
++	     : "+a" (addr), "+r" (reg1) \
++	     : "a" (fifo))
++
++#define MAC_ESP_FIFO_SIZE 16
++
++static void mac_esp_send_pio_cmd(struct esp *esp, u32 addr, u32 esp_count,
++				 u32 dma_count, int write, u8 cmd)
++{
++	unsigned long flags;
++	struct mac_esp_priv *mep = MAC_ESP_GET_PRIV(esp);
++	u8 *fifo = esp->regs + ESP_FDATA * 16;
++
++	local_irq_save(flags);
++
++	cmd &= ~ESP_CMD_DMA;
++	mep->error = 0;
++
++	if (write) {
++		scsi_esp_cmd(esp, cmd);
++
++		if (!mac_esp_wait_for_intr(esp)) {
++			if (mac_esp_wait_for_fifo(esp))
++				esp_count = 0;
++		} else {
++			esp_count = 0;
++		}
++	} else {
++		scsi_esp_cmd(esp, ESP_CMD_FLUSH);
++
++		if (esp_count >= MAC_ESP_FIFO_SIZE)
++			MAC_ESP_PIO_FILL("%0 at +,%2@", esp_count);
++		else
++			MAC_ESP_PIO_LOOP("%0 at +,%2@", esp_count);
++
++		scsi_esp_cmd(esp, cmd);
++	}
++
++	while (esp_count) {
++		unsigned int n;
++
++		if (mac_esp_wait_for_intr(esp)) {
++			mep->error = 1;
++			break;
++		}
++
++		if (esp->sreg & ESP_STAT_SPAM) {
++			printk(KERN_ERR PFX "gross error\n");
++			mep->error = 1;
++			break;
++		}
++
++		n = esp_read8(ESP_FFLAGS) & ESP_FF_FBYTES;
++
++		if (write) {
++			if (n > esp_count)
++				n = esp_count;
++			esp_count -= n;
++
++			MAC_ESP_PIO_LOOP("%2@,%0 at +", n);
++
++			if ((esp->sreg & ESP_STAT_PMASK) == ESP_STATP)
++				break;
++
++			if (esp_count) {
++				esp->ireg = esp_read8(ESP_INTRPT);
++				if (esp->ireg & ESP_INTR_DC)
++					break;
++
++				scsi_esp_cmd(esp, ESP_CMD_TI);
++			}
++		} else {
++			esp->ireg = esp_read8(ESP_INTRPT);
++			if (esp->ireg & ESP_INTR_DC)
++				break;
++
++			n = MAC_ESP_FIFO_SIZE - n;
++			if (n > esp_count)
++				n = esp_count;
++
++			if (n == MAC_ESP_FIFO_SIZE) {
++				MAC_ESP_PIO_FILL("%0 at +,%2@", esp_count);
++			} else {
++				esp_count -= n;
++				MAC_ESP_PIO_LOOP("%0 at +,%2@", n);
++			}
++
++			scsi_esp_cmd(esp, ESP_CMD_TI);
++		}
++	}
++
++	local_irq_restore(flags);
++}
++
++static int mac_esp_irq_pending(struct esp *esp)
++{
++	if (esp_read8(ESP_STATUS) & ESP_STAT_INTR)
++		return 1;
++	return 0;
++}
++
++static u32 mac_esp_dma_length_limit(struct esp *esp, u32 dma_addr, u32 dma_len)
++{
++	return dma_len > 0xFFFF ? 0xFFFF : dma_len;
++}
++
++static struct esp_driver_ops mac_esp_ops = {
++	.esp_write8       = mac_esp_write8,
++	.esp_read8        = mac_esp_read8,
++	.map_single       = mac_esp_map_single,
++	.map_sg           = mac_esp_map_sg,
++	.unmap_single     = mac_esp_unmap_single,
++	.unmap_sg         = mac_esp_unmap_sg,
++	.irq_pending      = mac_esp_irq_pending,
++	.dma_length_limit = mac_esp_dma_length_limit,
++	.reset_dma        = mac_esp_reset_dma,
++	.dma_drain        = mac_esp_dma_drain,
++	.dma_invalidate   = mac_esp_dma_invalidate,
++	.send_dma_cmd     = mac_esp_send_pdma_cmd,
++	.dma_error        = mac_esp_dma_error,
++};
++
++static int __devinit esp_mac_probe(struct platform_device *dev)
++{
++	struct scsi_host_template *tpnt = &scsi_esp_template;
++	struct Scsi_Host *host;
++	struct esp *esp;
++	int err;
++	int chips_present;
++	struct mac_esp_priv *mep;
++
++	if (!MACH_IS_MAC)
++		return -ENODEV;
++
++	switch (macintosh_config->scsi_type) {
++	case MAC_SCSI_QUADRA:
++	case MAC_SCSI_QUADRA3:
++		chips_present = 1;
++		break;
++	case MAC_SCSI_QUADRA2:
++		if ((macintosh_config->ident == MAC_MODEL_Q900) ||
++		    (macintosh_config->ident == MAC_MODEL_Q950))
++			chips_present = 2;
++		else
++			chips_present = 1;
++		break;
++	default:
++		chips_present = 0;
++	}
++
++	if (dev->id + 1 > chips_present)
++		return -ENODEV;
++
++	host = scsi_host_alloc(tpnt, sizeof(struct esp));
++
++	err = -ENOMEM;
++	if (!host)
++		goto fail;
++
++	host->max_id = 8;
++	host->use_clustering = DISABLE_CLUSTERING;
++	esp = shost_priv(host);
++
++	esp->host = host;
++	esp->dev = dev;
++
++	esp->command_block = kzalloc(16, GFP_KERNEL);
++	if (!esp->command_block)
++		goto fail_unlink;
++	esp->command_block_dma = (dma_addr_t)esp->command_block;
++
++	esp->scsi_id = 7;
++	host->this_id = esp->scsi_id;
++	esp->scsi_id_mask = 1 << esp->scsi_id;
++
++	mep = kzalloc(sizeof(struct mac_esp_priv), GFP_KERNEL);
++	if (!mep)
++		goto fail_free_command_block;
++	mep->esp = esp;
++	platform_set_drvdata(dev, mep);
++
++	switch (macintosh_config->scsi_type) {
++	case MAC_SCSI_QUADRA:
++		esp->cfreq     = 16500000;
++		esp->regs      = (void __iomem *)MAC_ESP_REGS_QUADRA;
++		mep->pdma_io   = esp->regs + MAC_ESP_PDMA_IO_OFFSET;
++		mep->pdma_regs = NULL;
++		break;
++	case MAC_SCSI_QUADRA2:
++		esp->cfreq     = 25000000;
++		esp->regs      = (void __iomem *)(MAC_ESP_REGS_QUADRA2 +
++				 dev->id * MAC_ESP_REGS_SPACING);
++		mep->pdma_io   = esp->regs + MAC_ESP_PDMA_IO_OFFSET;
++		mep->pdma_regs = (void __iomem *)(MAC_ESP_PDMA_REG +
++				 dev->id * MAC_ESP_PDMA_REG_SPACING);
++		nubus_writel(0x1d1, mep->pdma_regs);
++		break;
++	case MAC_SCSI_QUADRA3:
++		/* These quadras have a real DMA controller (the PSC) but we
++		 * don't know how to drive it so we must use PIO instead.
++		 */
++		esp->cfreq     = 25000000;
++		esp->regs      = (void __iomem *)MAC_ESP_REGS_QUADRA3;
++		mep->pdma_io   = NULL;
++		mep->pdma_regs = NULL;
++		break;
++	}
++
++	esp->ops = &mac_esp_ops;
++	if (mep->pdma_io == NULL) {
++		printk(KERN_INFO PFX "using PIO for controller %d\n", dev->id);
++		esp_write8(0, ESP_TCLOW);
++		esp_write8(0, ESP_TCMED);
++		esp->flags = ESP_FLAG_DISABLE_SYNC;
++		mac_esp_ops.send_dma_cmd = mac_esp_send_pio_cmd;
++	} else {
++		printk(KERN_INFO PFX "using PDMA for controller %d\n", dev->id);
++	}
++
++	host->irq = IRQ_MAC_SCSI;
++	err = request_irq(host->irq, scsi_esp_intr, IRQF_SHARED, "Mac ESP",
++			  esp);
++	if (err < 0)
++		goto fail_free_priv;
++
++	err = scsi_esp_register(esp, &dev->dev);
++	if (err)
++		goto fail_free_irq;
++
++	return 0;
++
++fail_free_irq:
++	free_irq(host->irq, esp);
++fail_free_priv:
++	kfree(mep);
++fail_free_command_block:
++	kfree(esp->command_block);
++fail_unlink:
++	scsi_host_put(host);
++fail:
++	return err;
++}
++
++static int __devexit esp_mac_remove(struct platform_device *dev)
++{
++	struct mac_esp_priv *mep = platform_get_drvdata(dev);
++	struct esp *esp = mep->esp;
++	unsigned int irq = esp->host->irq;
++
++	scsi_esp_unregister(esp);
++
++	free_irq(irq, esp);
++
++	kfree(mep);
++
++	kfree(esp->command_block);
++
++	scsi_host_put(esp->host);
++
++	return 0;
++}
++
++static struct platform_driver esp_mac_driver = {
++	.probe    = esp_mac_probe,
++	.remove   = __devexit_p(esp_mac_remove),
++	.driver   = {
++		.name     = DRV_MODULE_NAME,
++	},
++};
++
++static int __init mac_esp_init(void)
++{
++	int err;
++
++	err = platform_driver_register(&esp_mac_driver);
++	if (err)
++		return err;
++
++	internal_esp = platform_device_alloc(DRV_MODULE_NAME, 0);
++	if (internal_esp && platform_device_add(internal_esp)) {
++		platform_device_put(internal_esp);
++		internal_esp = NULL;
++	}
++
++	external_esp = platform_device_alloc(DRV_MODULE_NAME, 1);
++	if (external_esp && platform_device_add(external_esp)) {
++		platform_device_put(external_esp);
++		external_esp = NULL;
++	}
++
++	if (internal_esp || external_esp) {
++		return 0;
++	} else {
++		platform_driver_unregister(&esp_mac_driver);
++		return -ENOMEM;
++	}
++}
++
++static void __exit mac_esp_exit(void)
++{
++	platform_driver_unregister(&esp_mac_driver);
++
++	if (internal_esp) {
++		platform_device_unregister(internal_esp);
++		internal_esp = NULL;
++	}
++	if (external_esp) {
++		platform_device_unregister(external_esp);
++		external_esp = NULL;
++	}
++}
++
++MODULE_DESCRIPTION("Mac ESP SCSI driver");
++MODULE_AUTHOR("Finn Thain <fthain at telegraphics.com.au>");
++MODULE_LICENSE("GPLv2");
++MODULE_VERSION(DRV_VERSION);
++
++module_init(mac_esp_init);
++module_exit(mac_esp_exit);

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-noswap-linux-swap-h-needs-linux-pagemap-h.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-noswap-linux-swap-h-needs-linux-pagemap-h.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,46 @@
+Subject: [PATCH] CONFIG_SWAP=n: include/linux/swap.h needs <linux/pagemap.h>
+
+When compiling a m68k kernel with CONFIG_SWAP=n, I get:
+
+    include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
+    include/asm-generic/tlb.h:76: error: implicit declaration of function 'release_pages'
+    include/asm-generic/tlb.h: In function 'tlb_remove_page':
+    include/asm-generic/tlb.h:105: error: implicit declaration of function 'page_cache_release'
+
+because include/linux/swap.h defines free_page_and_swap_cache() and
+free_pages_and_swap_cache() to page_cache_release() resp. release_pages()
+without including <linux/pagemap.h>.
+
+As the comment in include/linux/swap.h says it cannot include <linux/pagemap.h>
+on sparc, 
+
+---
+ include/asm-generic/tlb.h |    5 +++++
+ include/linux/swap.h      |    2 ++
+ 2 files changed, 7 insertions(+)
+
+--- a/include/asm-generic/tlb.h
++++ b/include/asm-generic/tlb.h
+@@ -14,6 +14,11 @@
+ #define _ASM_GENERIC__TLB_H
+ 
+ #include <linux/swap.h>
++
++#ifndef CONFIG_SWAP
++#include <linux/pagemap.h>
++#endif
++
+ #include <asm/pgalloc.h>
+ #include <asm/tlbflush.h>
+ 
+--- a/include/linux/swap.h
++++ b/include/linux/swap.h
+@@ -279,6 +279,8 @@ static inline void disable_swap_token(vo
+ 
+ #else /* CONFIG_SWAP */
+ 
++//#include <linux/pagemap.h>
++
+ #define total_swap_pages			0
+ #define total_swapcache_pages			0UL
+ 

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-q40-floppy-is-broken.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-q40-floppy-is-broken.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,28 @@
+Subject: [PATCH] m68k: Q40/Q60 floppy support is broken
+
+From: Geert Uytterhoeven <geert at linux-m68k.org>
+
+Mark Q40/Q60 floppy support broken:
+
+    arch/m68k/q40/q40ints.c: In function 'q40_irq_handler':
+    arch/m68k/q40/q40ints.c:214: error: implicit declaration of function 'floppy_hardint'
+
+Including <asm/floppy.h> doesn't help, as it causes a lot of additional error
+messages (cfr. Sun 3x).
+
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ arch/m68k/Kconfig |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/m68k/Kconfig
++++ b/arch/m68k/Kconfig
+@@ -44,7 +44,7 @@ config GENERIC_IOMAP
+ 
+ config ARCH_MAY_HAVE_PC_FDC
+ 	bool
+-	depends on Q40 || (BROKEN && SUN3X)
++	depends on BROKEN && (Q40 || SUN3X)
+ 	default y
+ 
+ config NO_IOPORT

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-remove-old-mac_esp-cruft.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-remove-old-mac_esp-cruft.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,106 @@
+Subject: [PATCH] m68k: remove old mac_esp cruft
+
+From: Finn Thain <fthain at telegraphics.com.au>
+
+Remove the rest of the old mac_esp driver. Also ditch the rest of the 
+machw mechanism, it needs to be replaced by a fake openfirmware tree.
+
+Signed-off-by: Finn Thain <fthain at telegraphics.com.au>
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ Documentation/kernel-parameters.txt |    3 ---
+ arch/m68k/mac/config.c              |   24 ------------------------
+ include/asm-m68k/machw.h            |   30 ------------------------------
+ 3 files changed, 57 deletions(-)
+
+--- a/Documentation/kernel-parameters.txt
++++ b/Documentation/kernel-parameters.txt
+@@ -1092,9 +1092,6 @@ and is between 256 and 4096 characters. 
+ 	mac5380=	[HW,SCSI] Format:
+ 			<can_queue>,<cmd_per_lun>,<sg_tablesize>,<hostid>,<use_tags>
+ 
+-	mac53c9x=	[HW,SCSI] Format:
+-			<num_esps>,<disconnect>,<nosync>,<can_queue>,<cmd_per_lun>,<sg_tablesize>,<hostid>,<use_tags>
+-
+ 	machvec=	[IA64] Force the use of a particular machine-vector
+ 			(machvec) in a generic kernel.
+ 			Example: machvec=hpzx1_swiotlb
+--- a/arch/m68k/mac/config.c
++++ b/arch/m68k/mac/config.c
+@@ -48,9 +48,6 @@
+ struct mac_booter_data mac_bi_data;
+ int mac_bisize = sizeof mac_bi_data;
+ 
+-struct mac_hw_present mac_hw_present;
+-EXPORT_SYMBOL(mac_hw_present);
+-
+ /* New m68k bootinfo stuff and videobase */
+ 
+ extern int m68k_num_memory;
+@@ -817,27 +814,6 @@ void __init mac_identify(void)
+ 		m68k_ramdisk.addr, m68k_ramdisk.size);
+ #endif
+ 
+-	/*
+-	 * TODO: set the various fields in macintosh_config->hw_present here!
+-	 */
+-	switch (macintosh_config->scsi_type) {
+-	case MAC_SCSI_OLD:
+-		MACHW_SET(MAC_SCSI_80);
+-		break;
+-	case MAC_SCSI_QUADRA:
+-	case MAC_SCSI_QUADRA2:
+-	case MAC_SCSI_QUADRA3:
+-		MACHW_SET(MAC_SCSI_96);
+-		if ((macintosh_config->ident == MAC_MODEL_Q900) ||
+-		    (macintosh_config->ident == MAC_MODEL_Q950))
+-			MACHW_SET(MAC_SCSI_96_2);
+-		break;
+-	default:
+-		printk(KERN_WARNING "config.c: wtf: unknown scsi, using 53c80\n");
+-		MACHW_SET(MAC_SCSI_80);
+-		break;
+-	}
+-
+ 	iop_init();
+ 	via_init();
+ 	oss_init();
+--- a/include/asm-m68k/machw.h
++++ b/include/asm-m68k/machw.h
+@@ -66,36 +66,6 @@ struct MAC_SCC
+ # define mac_scc ((*(volatile struct SCC*)MAC_SCC_BAS))
+ #endif
+ 
+-/* hardware stuff */
+-
+-#define MACHW_DECLARE(name)	unsigned name : 1
+-#define MACHW_SET(name)		(mac_hw_present.name = 1)
+-#define MACHW_PRESENT(name)	(mac_hw_present.name)
+-
+-struct mac_hw_present {
+-  /* video hardware */
+-  /* sound hardware */
+-  /* disk storage interfaces */
+-  MACHW_DECLARE(MAC_SCSI_80);     /* Directly mapped NCR5380 */
+-  MACHW_DECLARE(MAC_SCSI_96);     /* 53c9[46] */
+-  MACHW_DECLARE(MAC_SCSI_96_2);   /* 2nd 53c9[46] Q900 and Q950 */
+-  MACHW_DECLARE(IDE);             /* IDE Interface */
+-  /* other I/O hardware */
+-  MACHW_DECLARE(SCC);             /* Serial Communications Contr. */
+-  /* DMA */
+-  MACHW_DECLARE(SCSI_DMA);        /* DMA for the NCR5380 */
+-  /* real time clocks */
+-  MACHW_DECLARE(RTC_CLK);         /* clock chip */
+-  /* supporting hardware */
+-  MACHW_DECLARE(VIA1);            /* Versatile Interface Ad. 1 */
+-  MACHW_DECLARE(VIA2);            /* Versatile Interface Ad. 2 */
+-  MACHW_DECLARE(RBV);             /* Versatile Interface Ad. 2+ */
+-  /* NUBUS */
+-  MACHW_DECLARE(NUBUS);           /* NUBUS */
+-};
+-
+-extern struct mac_hw_present mac_hw_present;
+-
+ #endif /* __ASSEMBLY__ */
+ 
+ #endif /* linux/machw.h */

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-remove-traditional.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-remove-traditional.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,76 @@
+From mathieu.desnoyers at polymtl.ca Tue Apr 22 20:33:37 2008
+Date: Tue, 22 Apr 2008 13:24:08 -0400
+From: Mathieu Desnoyers <mathieu.desnoyers at polymtl.ca>
+To: Sam Ravnborg <sam at ravnborg.org>, akpm at linux-foundation.org, Ingo Molnar <mingo at elte.hu>, linux-kernel at vger.kernel.org
+Cc: Mathieu Desnoyers <mathieu.desnoyers at polymtl.ca>, geert at linux-m68k.org, zippel at linux-m68k.org, linux-m68k at vger.kernel.org
+Subject: [RFC patch 4/9] M68K remove -traditional
+
+Subject: [RFC patch 4/9] Re: [PATCH] Stringify support commas
+ > This is a no-no for those archs that still use -traditional.
+ > > I dunno if this is a problem for you at the moment and the
+ > > right fix is anyway to nuke -traditional.
+ > > 
+ > >     Sam
+
+(cross-compile test ok)
+
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at polymtl.ca>
+CC: Sam Ravnborg <sam at ravnborg.org>
+CC: geert at linux-m68k.org
+CC: zippel at linux-m68k.org
+CC: linux-m68k at lists.linux-m68k.org
+---
+ arch/m68k/fpsp040/Makefile  |    1 -
+ arch/m68k/ifpsp060/Makefile |    1 -
+ arch/m68k/kernel/Makefile   |    2 --
+ arch/m68k/lib/Makefile      |    2 --
+ arch/m68k/math-emu/Makefile |    2 --
+ 5 files changed, 8 deletions(-)
+
+--- a/arch/m68k/fpsp040/Makefile
++++ b/arch/m68k/fpsp040/Makefile
+@@ -10,7 +10,6 @@ obj-y    := bindec.o binstr.o decbin.o d
+ 	    x_bsun.o x_fline.o x_operr.o x_ovfl.o x_snan.o x_store.o \
+ 	    x_unfl.o x_unimp.o x_unsupp.o bugfix.o skeleton.o
+ 
+-EXTRA_AFLAGS := -traditional
+ EXTRA_LDFLAGS := -x
+ 
+ $(OS_OBJS): fpsp.h
+--- a/arch/m68k/ifpsp060/Makefile
++++ b/arch/m68k/ifpsp060/Makefile
+@@ -6,5 +6,4 @@
+ 
+ obj-y := fskeleton.o iskeleton.o os.o
+ 
+-EXTRA_AFLAGS := -traditional
+ EXTRA_LDFLAGS := -x
+--- a/arch/m68k/kernel/Makefile
++++ b/arch/m68k/kernel/Makefile
+@@ -16,5 +16,3 @@ devres-y = ../../../kernel/irq/devres.o
+ 
+ obj-$(CONFIG_PCI)	+= bios32.o
+ obj-y$(CONFIG_MMU_SUN3) += dma.o	# no, it's not a typo
+-
+-EXTRA_AFLAGS := -traditional
+--- a/arch/m68k/lib/Makefile
++++ b/arch/m68k/lib/Makefile
+@@ -2,7 +2,5 @@
+ # Makefile for m68k-specific library files..
+ #
+ 
+-EXTRA_AFLAGS := -traditional
+-
+ lib-y	:= ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \
+ 	   checksum.o string.o uaccess.o
+--- a/arch/m68k/math-emu/Makefile
++++ b/arch/m68k/math-emu/Makefile
+@@ -2,8 +2,6 @@
+ # Makefile for the linux kernel.
+ #
+ 
+-EXTRA_AFLAGS := -traditional
+-
+ #EXTRA_AFLAGS += -DFPU_EMU_DEBUG
+ #EXTRA_CFLAGS += -DFPU_EMU_DEBUG
+ 

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-replace-linux-68k-by-linux-m68k.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-replace-linux-68k-by-linux-m68k.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,603 @@
+Subject: [PATCH] m68k: Replace `Linux/68k' by `Linux/m68k'
+
+From: Geert Uytterhoeven <geert at linux-m68k.org>
+
+m68k: Replace `Linux/68k' by `Linux/m68k'
+
+We switched to `Linux/m68k' a very long time ago
+
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ CREDITS                                 |    6 +++---
+ Documentation/crypto/descore-readme.txt |    2 +-
+ Documentation/devices.txt               |   10 +++++-----
+ Documentation/m68k/kernel-options.txt   |    2 +-
+ arch/m68k/Kconfig                       |    2 +-
+ arch/m68k/ifpsp060/iskeleton.S          |    6 +++---
+ arch/m68k/ifpsp060/os.S                 |    4 ++--
+ arch/m68k/kernel/head.S                 |    4 ++--
+ arch/m68knommu/Kconfig                  |    4 ++--
+ arch/m68knommu/platform/68328/ints.c    |    2 +-
+ drivers/char/ser_a2232fw.ax             |    2 +-
+ drivers/macintosh/via-cuda.c            |    2 +-
+ drivers/macintosh/via-pmu68k.c          |    8 ++++----
+ drivers/net/a2065.c                     |    4 ++--
+ drivers/net/a2065.h                     |    4 ++--
+ drivers/net/apne.c                      |    2 +-
+ drivers/net/lib8390.c                   |    2 +-
+ drivers/net/macmace.c                   |    4 ++--
+ drivers/net/pcmcia/axnet_cs.c           |    2 +-
+ drivers/net/sonic.h                     |    2 +-
+ drivers/scsi/NCR5380.c                  |    2 +-
+ drivers/scsi/atari_NCR5380.c            |    2 +-
+ drivers/scsi/sun3_NCR5380.c             |    2 +-
+ drivers/serial/68360serial.c            |    2 +-
+ drivers/video/macfb.c                   |    4 ++--
+ drivers/video/valkyriefb.c              |    2 +-
+ drivers/video/valkyriefb.h              |    2 +-
+ fs/affs/Changes                         |    2 +-
+ include/asm-m68k/elf.h                  |    2 +-
+ include/asm-m68knommu/bootstd.h         |    2 +-
+ include/asm-m68knommu/delay.h           |    2 +-
+ include/asm-m68knommu/elf.h             |    2 +-
+ include/asm-m68knommu/entry.h           |    2 +-
+ include/asm-m68knommu/processor.h       |    2 +-
+ include/asm-xtensa/bootparam.h          |    2 +-
+ include/linux/major.h                   |    2 +-
+ include/linux/pmu.h                     |    4 ++--
+ 37 files changed, 56 insertions(+), 56 deletions(-)
+
+--- a/CREDITS
++++ b/CREDITS
+@@ -174,7 +174,7 @@ N: Ralf Baechle
+ E: ralf at gnu.org
+ P: 1024/AF7B30C1 CF 97 C2 CC 6D AE A7 FE  C8 BA 9C FC 88 DE 32 C3
+ D: Linux/MIPS port
+-D: Linux/68k hacker
++D: Linux/m68k hacker
+ S: Hauptstrasse 19
+ S: 79837 St. Blasien
+ S: Germany
+@@ -1546,7 +1546,7 @@ E: dhd at eradicator.org
+ E: dhd at cepstral.com
+ D: PA-RISC port
+ D: Nubus subsystem
+-D: Generic 68k Macintosh framebuffer driver
++D: Generic m68k Macintosh framebuffer driver
+ D: STI framebuffer tweaks
+ D: LTPC driver tweaks
+ S: 110 S. 12th St., Apt. A
+@@ -2130,7 +2130,7 @@ D: dv1394
+ 
+ N: Hamish Macdonald
+ E: hamishm at lucent.com
+-D: Linux/68k port
++D: Linux/m68k port
+ S: 32 Clydesdale Avenue
+ S: Kanata, Ontario
+ S: Canada K2M-2G7
+--- a/Documentation/crypto/descore-readme.txt
++++ b/Documentation/crypto/descore-readme.txt
+@@ -249,7 +249,7 @@ b) the compiler may be too stupid to rea
+ 
+ i assume that indexing is cheaper or equivalent to auto increment/decrement,
+ where the index is 7 bits unsigned or smaller.
+-this assumption is reversed for 68k and vax.
++this assumption is reversed for m68k and vax.
+ 
+ i assume that addresses can be cheaply formed from two registers,
+ or from a register and a small constant.
+--- a/Documentation/devices.txt
++++ b/Documentation/devices.txt
+@@ -19,8 +19,8 @@ The LaTeX version of this document is no
+ This document is included by reference into the Filesystem Hierarchy
+ Standard (FHS).	 The FHS is available from http://www.pathname.com/fhs/.
+ 
+-Allocations marked (68k/Amiga) apply to Linux/68k on the Amiga
+-platform only.	Allocations marked (68k/Atari) apply to Linux/68k on
++Allocations marked (m68k/Amiga) apply to Linux/m68k on the Amiga
++platform only.	Allocations marked (m68k/Atari) apply to Linux/m68k on
+ the Atari platform only.
+ 
+ The symbol {2.6} means the allocation is obsolete and scheduled for
+@@ -328,7 +328,7 @@ Your cooperation is appreciated.
+ 		  2 = /dev/inportbm	Microsoft Inport bus mouse
+ 		  3 = /dev/atibm	ATI XL bus mouse
+ 		  4 = /dev/jbm		J-mouse
+-		  4 = /dev/amigamouse	Amiga mouse (68k/Amiga)
++		  4 = /dev/amigamouse	Amiga mouse (m68k/Amiga)
+ 		  5 = /dev/atarimouse	Atari mouse
+ 		  6 = /dev/sunmouse	Sun mouse
+ 		  7 = /dev/amigamouse1	Second Amiga mouse
+@@ -691,7 +691,7 @@ Your cooperation is appreciated.
+ 		  2 = /dev/staliomem2	Third Stallion card I/O memory
+ 		  3 = /dev/staliomem3	Fourth Stallion card I/O memory
+ 
+- 28 char	Atari SLM ACSI laser printer (68k/Atari)
++ 28 char	Atari SLM ACSI laser printer (m68k/Atari)
+ 		  0 = /dev/slm0		First SLM laser printer
+ 		  1 = /dev/slm1		Second SLM laser printer
+ 		    ...
+@@ -701,7 +701,7 @@ Your cooperation is appreciated.
+ 		  2 = /dev/sbpcd14	Panasonic CD-ROM controller 3 unit 2
+ 		  3 = /dev/sbpcd15	Panasonic CD-ROM controller 3 unit 3
+ 
+- 28 block	ACSI disk (68k/Atari)
++ 28 block	ACSI disk (m68k/Atari)
+ 		  0 = /dev/ada		First ACSI disk whole disk
+ 		 16 = /dev/adb		Second ACSI disk whole disk
+ 		 32 = /dev/adc		Third ACSI disk whole disk
+--- a/Documentation/m68k/kernel-options.txt
++++ b/Documentation/m68k/kernel-options.txt
+@@ -852,7 +852,7 @@ use of this option is now highly unrecom
+   Incorrect use can lead to unpredictable behavior, so please only use
+ this option if you *know* what you are doing and have a reason to do
+ so. In any case if you experience problems and need to use this
+-option, please inform us about it by mailing to the Linux/68k kernel
++option, please inform us about it by mailing to the Linux/m68k kernel
+ mailing list.
+ 
+   The address mask set by this option specifies which addresses are
+--- a/arch/m68k/Kconfig
++++ b/arch/m68k/Kconfig
+@@ -60,7 +60,7 @@ config HZ
+ 	int
+ 	default 100
+ 
+-mainmenu "Linux/68k Kernel Configuration"
++mainmenu "Linux/m68k Kernel Configuration"
+ 
+ source "init/Kconfig"
+ 
+--- a/arch/m68k/ifpsp060/iskeleton.S
++++ b/arch/m68k/ifpsp060/iskeleton.S
+@@ -65,7 +65,7 @@
+ | To simply continue execution at the next instruction, just
+ | do an "rte".
+ |
+-| Linux/68k: If returning to user space, check for needed reselections.
++| Linux/m68k: If returning to user space, check for needed reselections.
+ 
+ 	.global		_060_isp_done
+ _060_isp_done:
+@@ -87,7 +87,7 @@ _060_isp_done:
+ | a CHK exception stack frame from the Unimplemented Integer Instrcution
+ | stack frame and branches to this routine.
+ |
+-| Linux/68k: commented out test for tracing
++| Linux/m68k: commented out test for tracing
+ 
+ 	.global		_060_real_chk
+ _060_real_chk:
+@@ -127,7 +127,7 @@ real_chk_end:
+ | then it create a Trace exception stack frame from the "chk" exception
+ | stack frame and branches to the _real_trace() entry point.
+ |
+-| Linux/68k: commented out test for tracing
++| Linux/m68k: commented out test for tracing
+ 
+ 	.global		_060_real_divbyzero
+ _060_real_divbyzero:
+--- a/arch/m68k/ifpsp060/os.S
++++ b/arch/m68k/ifpsp060/os.S
+@@ -65,7 +65,7 @@
+ | The result is that Unix processes are allowed to sleep as a consequence
+ | of a page fault during a _copyout.
+ |
+-| Linux/68k: The _060_[id]mem_{read,write}_{byte,word,long} functions
++| Linux/m68k: The _060_[id]mem_{read,write}_{byte,word,long} functions
+ | (i.e. all the known length <= 4) are implemented by single moves
+ | statements instead of (more expensive) copy{in,out} calls, if
+ | working in user space
+@@ -305,7 +305,7 @@ dmwls:	move.l		%d0,(%a0)		| store super 
+ | Assumes that D0/D1/A0/A1 are scratch registers. The _copyin/_copyout
+ | below assume that the SFC/DFC have been set previously.
+ |
+-| Linux/68k: These are basically non-inlined versions of
++| Linux/m68k: These are basically non-inlined versions of
+ | memcpy_{to,from}fs, but without long-transfer optimization
+ | Note: Assumed that SFC/DFC are pointing correctly to user data
+ | space... Should be right, or are there any exceptions?
+--- a/arch/m68k/kernel/head.S
++++ b/arch/m68k/kernel/head.S
+@@ -1,7 +1,7 @@
+ /* -*- mode: asm -*-
+ **
+ ** head.S -- This file contains the initial boot code for the
+-**	     Linux/68k kernel.
++**	     Linux/m68k kernel.
+ **
+ ** Copyright 1993 by Hamish Macdonald
+ **
+@@ -1568,7 +1568,7 @@ func_return	get_bi_record
+ /*
+  *	MMU Initialization Begins Here
+  *
+- *	The structure of the MMU tables on the 68k machines
++ *	The structure of the MMU tables on the m68k machines
+  *	is thus:
+  *	Root Table
+  *		Logical addresses are translated through
+--- a/arch/m68knommu/Kconfig
++++ b/arch/m68knommu/Kconfig
+@@ -3,7 +3,7 @@
+ # see Documentation/kbuild/kconfig-language.txt.
+ #
+ 
+-mainmenu "uClinux/68k (w/o MMU) Kernel Configuration"
++mainmenu "uClinux/m68k (w/o MMU) Kernel Configuration"
+ 
+ config M68K
+ 	bool
+@@ -174,7 +174,7 @@ config CLOCK_SET
+ 	help
+ 	  On some CPU's you do not need to know what the core CPU clock
+ 	  frequency is. On these you can disable clock setting. On some
+-	  traditional 68K parts, and on all ColdFire parts you need to set
++	  traditional m68k parts, and on all ColdFire parts you need to set
+ 	  the appropriate CPU clock frequency. On these devices many of the
+ 	  onboard peripherals derive their timing from the master CPU clock
+ 	  frequency.
+--- a/arch/m68knommu/platform/68328/ints.c
++++ b/arch/m68knommu/platform/68328/ints.c
+@@ -101,7 +101,7 @@ void __init init_vectors(void)
+ 	IMR = ~0;
+ }
+ 
+-/* The 68k family did not have a good way to determine the source
++/* The m68k family did not have a good way to determine the source
+  * of interrupts until later in the family.  The EC000 core does
+  * not provide the vector number on the stack, we vector everything
+  * into one vector and look in the blasted mask register...
+--- a/drivers/char/ser_a2232fw.ax
++++ b/drivers/char/ser_a2232fw.ax
+@@ -462,7 +462,7 @@ Speedy2		lda	ACIA0+A_SR	; read status			
+ 		beq	Speedy2		; not yet, wait more		;
+ 		stx	CIA+C_CTRLA	; stop the timer		;
+ 					;				;
+-		lda	CIA+C_TAL	; copy timer value for 68k	;
++		lda	CIA+C_TAL	; copy timer value for m68k	;
+ 		sta	TimerL		;				;
+ 		lda	CIA+C_TAH	;				;
+ 		sta	TimerH		;				;
+--- a/drivers/macintosh/via-cuda.c
++++ b/drivers/macintosh/via-cuda.c
+@@ -158,7 +158,7 @@ int __init find_via_cuda(void)
+ 	return 0;
+     }
+ 
+-    /* Clear and enable interrupts, but only on PPC. On 68K it's done  */
++    /* Clear and enable interrupts, but only on PPC. On m68k it's done  */
+     /* for us by the main VIA driver in arch/m68k/mac/via.c        */
+ 
+     out_8(&via[IFR], 0x7f);	/* clear interrupts by writing 1s */
+--- a/drivers/macintosh/via-pmu68k.c
++++ b/drivers/macintosh/via-pmu68k.c
+@@ -1,5 +1,5 @@
+ /*
+- * Device driver for the PMU on 68K-based Apple PowerBooks
++ * Device driver for the PMU on m68k-based Apple PowerBooks
+  *
+  * The VIA (versatile interface adapter) interfaces to the PMU,
+  * a 6805 microprocessor core whose primary function is to control
+@@ -8,7 +8,7 @@
+  * to the keyboard and mouse, as well as the non-volatile RAM
+  * and the RTC (real time clock) chip.
+  *
+- * Adapted for 68K PMU by Joshua M. Thompson
++ * Adapted for m68k PMU by Joshua M. Thompson
+  *
+  * Based largely on the PowerMac PMU code by Paul Mackerras and
+  * Fabio Riccardi.
+@@ -122,7 +122,7 @@ static void pmu_enable_backlight(int on)
+ static void pmu_set_brightness(int level);
+ 
+ struct adb_driver via_pmu_driver = {
+-	"68K PMU",
++	"m68k PMU",
+ 	pmu_probe,
+ 	pmu_init,
+ 	pmu_send_request,
+@@ -260,7 +260,7 @@ pmu_init(void)
+ 	/* Enable backlight */
+ 	pmu_enable_backlight(1);
+ 
+-	printk("adb: PMU 68K driver v0.5 for Unified ADB.\n");
++	printk("adb: PMU m68k driver v0.5 for Unified ADB.\n");
+ 
+ 	return 0;
+ }
+--- a/drivers/net/a2065.c
++++ b/drivers/net/a2065.c
+@@ -1,5 +1,5 @@
+ /*
+- * Amiga Linux/68k A2065 Ethernet Driver
++ * Amiga Linux/m68k A2065 Ethernet Driver
+  *
+  * (C) Copyright 1995-2003 by Geert Uytterhoeven <geert at linux-m68k.org>
+  *
+@@ -12,7 +12,7 @@
+  *
+  * This program is based on
+  *
+- *	ariadne.?:	Amiga Linux/68k Ariadne Ethernet Driver
++ *	ariadne.?:	Amiga Linux/m68k Ariadne Ethernet Driver
+  *			(C) Copyright 1995 by Geert Uytterhoeven,
+  *                                            Peter De Schrijver
+  *
+--- a/drivers/net/a2065.h
++++ b/drivers/net/a2065.h
+@@ -1,5 +1,5 @@
+ /*
+- * Amiga Linux/68k A2065 Ethernet Driver
++ * Amiga Linux/m68k A2065 Ethernet Driver
+  *
+  * (C) Copyright 1995 by Geert Uytterhoeven <geert at linux-m68k.org>
+  *
+@@ -7,7 +7,7 @@
+  *
+  * This program is based on
+  *
+- *	ariadne.?:	Amiga Linux/68k Ariadne Ethernet Driver
++ *	ariadne.?:	Amiga Linux/m68k Ariadne Ethernet Driver
+  *			(C) Copyright 1995 by Geert Uytterhoeven,
+  *			Peter De Schrijver
+  *
+--- a/drivers/net/apne.c
++++ b/drivers/net/apne.c
+@@ -1,5 +1,5 @@
+ /*
+- * Amiga Linux/68k 8390 based PCMCIA Ethernet Driver for the Amiga 1200
++ * Amiga Linux/m68k 8390 based PCMCIA Ethernet Driver for the Amiga 1200
+  *
+  * (C) Copyright 1997 Alain Malek
+  *                    (Alain.Malek at cryogen.com)
+--- a/drivers/net/lib8390.c
++++ b/drivers/net/lib8390.c
+@@ -36,7 +36,7 @@
+   Paul Gortmaker	: tweak ANK's above multicast changes a bit.
+   Paul Gortmaker	: update packet statistics for v2.1.x
+   Alan Cox		: support arbitary stupid port mappings on the
+-  			  68K Macintosh. Support >16bit I/O spaces
++  			  m68k Macintosh. Support >16bit I/O spaces
+   Paul Gortmaker	: add kmod support for auto-loading of the 8390
+ 			  module by all drivers that require it.
+   Alan Cox		: Spinlocking work, added 'BUG_83C690'
+--- a/drivers/net/macmace.c
++++ b/drivers/net/macmace.c
+@@ -1,5 +1,5 @@
+ /*
+- *	Driver for the Macintosh 68K onboard MACE controller with PSC
++ *	Driver for the Macintosh m68k onboard MACE controller with PSC
+  *	driven DMA. The MACE driver code is derived from mace.c. The
+  *	Mac68k theory of operation is courtesy of the MacBSD wizards.
+  *
+@@ -249,7 +249,7 @@ static int __devinit mace_probe(struct p
+ 	dev->set_multicast_list	= mace_set_multicast;
+ 	dev->set_mac_address	= mace_set_address;
+ 
+-	printk(KERN_INFO "%s: 68K MACE, hardware address %s\n",
++	printk(KERN_INFO "%s: m68k MACE, hardware address %s\n",
+ 	       dev->name, print_mac(mac, dev->dev_addr));
+ 
+ 	err = register_netdev(dev);
+--- a/drivers/net/pcmcia/axnet_cs.c
++++ b/drivers/net/pcmcia/axnet_cs.c
+@@ -855,7 +855,7 @@ module_exit(exit_axnet_cs);
+   Paul Gortmaker	: tweak ANK's above multicast changes a bit.
+   Paul Gortmaker	: update packet statistics for v2.1.x
+   Alan Cox		: support arbitary stupid port mappings on the
+-  			  68K Macintosh. Support >16bit I/O spaces
++  			  m68k Macintosh. Support >16bit I/O spaces
+   Paul Gortmaker	: add kmod support for auto-loading of the 8390
+ 			  module by all drivers that require it.
+   Alan Cox		: Spinlocking work, added 'BUG_83C690'
+--- a/drivers/net/sonic.h
++++ b/drivers/net/sonic.h
+@@ -9,7 +9,7 @@
+  * 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)
++ * 981229 MSch:	did just that for the m68k 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
+--- a/drivers/scsi/NCR5380.c
++++ b/drivers/scsi/NCR5380.c
+@@ -125,7 +125,7 @@
+  *
+  * This is a generic 5380 driver.  To use it on a different platform, 
+  * one simply writes appropriate system specific macros (ie, data
+- * transfer - some PC's will use the I/O bus, 68K's must use 
++ * transfer - some PC's will use the I/O bus, m68k's must use 
+  * memory mapped) and drops this file in their 'C' wrapper.
+  *
+  * (Note from hch:  unfortunately it was not enough for the different
+--- a/drivers/scsi/atari_NCR5380.c
++++ b/drivers/scsi/atari_NCR5380.c
+@@ -126,7 +126,7 @@
+  * This driver attempts to address these problems :
+  * This is a generic 5380 driver.  To use it on a different platform,
+  * one simply writes appropriate system specific macros (ie, data
+- * transfer - some PC's will use the I/O bus, 68K's must use
++ * transfer - some PC's will use the I/O bus, m68k's must use
+  * memory mapped) and drops this file in their 'C' wrapper.
+  *
+  * As far as command queueing, two queues are maintained for
+--- a/drivers/scsi/sun3_NCR5380.c
++++ b/drivers/scsi/sun3_NCR5380.c
+@@ -120,7 +120,7 @@
+  * This driver attempts to address these problems :
+  * This is a generic 5380 driver.  To use it on a different platform, 
+  * one simply writes appropriate system specific macros (ie, data
+- * transfer - some PC's will use the I/O bus, 68K's must use 
++ * transfer - some PC's will use the I/O bus, m68k's must use 
+  * memory mapped) and drops this file in their 'C' wrapper.
+  *
+  * As far as command queueing, two queues are maintained for 
+--- a/drivers/serial/68360serial.c
++++ b/drivers/serial/68360serial.c
+@@ -2811,7 +2811,7 @@ int serial_console_setup( struct console
+ 	volatile	struct uart_pram		*sup;
+ 
+ /* mleslie TODO:
+- * add something to the 68k bootloader to store a desired initial console baud rate */
++ * add something to the m68k bootloader to store a desired initial console baud rate */
+ 
+ /* 	bd_t						*bd; */ /* a board info struct used by EPPC-bug */
+ /* 	bd = (bd_t *)__res; */
+--- a/drivers/video/macfb.c
++++ b/drivers/video/macfb.c
+@@ -563,7 +563,7 @@ static int macfb_setcolreg(unsigned regn
+ 			}
+ 			break;
+ 			/* I'm pretty sure that one or the other of these
+-			   doesn't exist on 68k Macs */
++			   doesn't exist on m68k Macs */
+ 		case 24:
+ 			red   >>= 8;
+ 			green >>= 8;
+@@ -719,7 +719,7 @@ static int __init macfb_init(void)
+ 		break;
+ 	case 24:
+ 	case 32:
+-		/* XXX: have to test these... can any 68k Macs
++		/* XXX: have to test these... can any m68k Macs
+ 		   actually do this on internal video? */
+ 		macfb_defined.red.offset = 16;
+ 		macfb_defined.red.length = 8;
+--- a/drivers/video/valkyriefb.c
++++ b/drivers/video/valkyriefb.c
+@@ -332,7 +332,7 @@ int __init valkyriefb_init(void)
+ 	    || mac_bi_data.id == MAC_MODEL_P588))
+ 		return 0;
+ 
+-	/* Hardcoded addresses... welcome to 68k Macintosh country :-) */
++	/* Hardcoded addresses... welcome to m68k Macintosh country :-) */
+ 	frame_buffer_phys = 0xf9000000;
+ 	cmap_regs_phys = 0x50f24000;
+ 	flags = IOMAP_NOCACHE_SER; /* IOMAP_WRITETHROUGH?? */
+--- a/drivers/video/valkyriefb.h
++++ b/drivers/video/valkyriefb.h
+@@ -9,7 +9,7 @@
+  * 
+  * vmode 10 changed by Steven Borley <sjb at salix.demon.co.uk>, 14 mai 2000
+  *
+- * Ported to 68k Macintosh by David Huggins-Daines <dhd at debian.org>
++ * Ported to m68k Macintosh by David Huggins-Daines <dhd at debian.org>
+  *
+  * This program is free software; you can redistribute it and/or
+  * modify it under the terms of the GNU General Public License
+--- a/fs/affs/Changes
++++ b/fs/affs/Changes
+@@ -197,7 +197,7 @@ Version 3.6
+ - Fixed bug in add_entry(): When doing a sorted insert,
+   the pointer to the next entry in the hash chain wasn't
+   correctly byte-swapped. Since most of the users of the
+-  affs use it on a 68k, they didn't notice. But why did
++  affs use it on a m68k, they didn't notice. But why did
+   I not find this during my tests?
+ 
+ - Fixed some oversights (version wasn't updated on some
+--- a/include/asm-m68k/elf.h
++++ b/include/asm-m68k/elf.h
+@@ -9,7 +9,7 @@
+ #include <asm/user.h>
+ 
+ /*
+- * 68k ELF relocation types
++ * m68k ELF relocation types
+  */
+ #define R_68K_NONE	0
+ #define R_68K_32	1
+--- a/include/asm-m68knommu/bootstd.h
++++ b/include/asm-m68knommu/bootstd.h
+@@ -30,7 +30,7 @@
+ #define __BN_flash_erase_range		19
+ #define __BN_flash_write_range		20
+ 
+-/* Calling conventions compatible to (uC)linux/68k
++/* Calling conventions compatible to (uC)linux/m68k
+  * We use simmilar macros to call into the bootloader as for uClinux
+  */
+ 
+--- a/include/asm-m68knommu/delay.h
++++ b/include/asm-m68knommu/delay.h
+@@ -34,7 +34,7 @@ static inline void __delay(unsigned long
+ 
+ /*
+  *	Ideally we use a 32*32->64 multiply to calculate the number of
+- *	loop iterations, but the older standard 68k and ColdFire do not
++ *	loop iterations, but the older standard m68k and ColdFire do not
+  *	have this instruction. So for them we have a clsoe approximation
+  *	loop using 32*32->32 multiplies only. This calculation based on
+  *	the ARM version of delay.
+--- a/include/asm-m68knommu/elf.h
++++ b/include/asm-m68knommu/elf.h
+@@ -9,7 +9,7 @@
+ #include <asm/user.h>
+ 
+ /*
+- * 68k ELF relocation types
++ * m68k ELF relocation types
+  */
+ #define R_68K_NONE  0
+ #define R_68K_32    1
+--- a/include/asm-m68knommu/entry.h
++++ b/include/asm-m68knommu/entry.h
+@@ -152,7 +152,7 @@ LENOSYS = 38
+ #else /* !CONFIG_COLDFIRE */
+ 
+ /*
+- * Standard 68k interrupt entry and exit macros.
++ * Standard m68k interrupt entry and exit macros.
+  */
+ .macro SAVE_ALL
+ 	clrl	%sp at -			/* stkadj */
+--- a/include/asm-m68knommu/processor.h
++++ b/include/asm-m68knommu/processor.h
+@@ -80,7 +80,7 @@ struct thread_struct {
+ 
+ /*
+  * Coldfire stacks need to be re-aligned on trap exit, conventional
+- * 68k can handle this case cleanly.
++ * m68k can handle this case cleanly.
+  */
+ #if defined(CONFIG_COLDFIRE)
+ #define	reformat(_regs)		do { (_regs)->format = 0x4; } while(0)
+--- a/include/asm-xtensa/bootparam.h
++++ b/include/asm-xtensa/bootparam.h
+@@ -9,7 +9,7 @@
+  *
+  * Copyright (C) 2001 - 2005  Tensilica Inc.
+  *
+- * (Concept borrowed from the 68K port)
++ * (Concept borrowed from the m68k port)
+  */
+ 
+ #ifndef _XTENSA_BOOTPARAM_H
+--- a/include/linux/major.h
++++ b/include/linux/major.h
+@@ -53,7 +53,7 @@
+ #define STL_SIOMEMMAJOR		28
+ #define ACSI_MAJOR		28
+ #define AZTECH_CDROM_MAJOR	29
+-#define GRAPHDEV_MAJOR		29   /* SparcLinux & Linux/68k /dev/fb */
++#define GRAPHDEV_MAJOR		29   /* SparcLinux & Linux/m68k /dev/fb */
+ #define CM206_CDROM_MAJOR	32
+ #define IDE2_MAJOR		33
+ #define IDE3_MAJOR		34
+--- a/include/linux/pmu.h
++++ b/include/linux/pmu.h
+@@ -90,8 +90,8 @@ enum {
+ 	PMU_HEATHROW_BASED,	/* PowerBook G3 series */
+ 	PMU_PADDINGTON_BASED,	/* 1999 PowerBook G3 */
+ 	PMU_KEYLARGO_BASED,	/* Core99 motherboard (PMU99) */
+-	PMU_68K_V1,		/* 68K PMU, version 1 */
+-	PMU_68K_V2, 		/* 68K PMU, version 2 */
++	PMU_68K_V1,		/* m68k PMU, version 1 */
++	PMU_68K_V2,		/* m68k PMU, version 2 */
+ };
+ 
+ /* PMU PMU_POWER_EVENTS commands */

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-scsi-HOST_C-cleanup.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-scsi-HOST_C-cleanup.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,22 @@
+
+FIXME a few more to take care of
+FIXME merge include files that are included only once into the .c file
+
+git grep HOSTS_C
+
+---
+ drivers/scsi/mvme147.c |    3 ---
+ 1 file changed, 3 deletions(-)
+
+--- a/drivers/scsi/mvme147.c
++++ b/drivers/scsi/mvme147.c
+@@ -128,9 +128,6 @@ static int mvme147_bus_reset(struct scsi
+ 	return SUCCESS;
+ }
+ 
+-#define HOSTS_C
+-
+-#include "mvme147.h"
+ 
+ static struct scsi_host_template driver_template = {
+ 	.proc_name		= "MVME147",

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-silence-BUG-can-return-warnings.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-silence-BUG-can-return-warnings.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,33 @@
+Subject: [PATCH] m68k: Make gcc aware that BUG() does not return
+
+From: Geert Uytterhoeven <geert at linux-m68k.org>
+
+Use `__builtin_trap()' instead of `asm volatile("illegal")' in the m68k BUG()
+macros (as suggested by Andrew Pinski), to kill warnings in code that assumes
+BUG() does not return.
+
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ include/asm-m68k/bug.h |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/include/asm-m68k/bug.h
++++ b/include/asm-m68k/bug.h
+@@ -7,7 +7,7 @@
+ #ifndef CONFIG_SUN3
+ #define BUG() do { \
+ 	printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
+-	asm volatile("illegal"); \
++	__builtin_trap(); \
+ } while (0)
+ #else
+ #define BUG() do { \
+@@ -17,7 +17,7 @@
+ #endif
+ #else
+ #define BUG() do { \
+-	asm volatile("illegal"); \
++	__builtin_trap(); \
+ } while (0)
+ #endif
+ 

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-skip-writebacks-for-bus-errors.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-skip-writebacks-for-bus-errors.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,32 @@
+Subject: [PATCH] m68k: Skip writebacks for bus errors
+
+From: Roman Zippel <zippel at linux-m68k.org>
+
+When handling bus error exceptions, skip the writeback, as the fault has to be
+first fixed by the caller.
+---
+ arch/m68k/kernel/traps.c |   13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+--- a/arch/m68k/kernel/traps.c
++++ b/arch/m68k/kernel/traps.c
+@@ -474,9 +474,16 @@ static inline void access_error040(struc
+ 			if (fp->un.fmt7.wb2a == fp->un.fmt7.faddr)
+ 				fp->un.fmt7.wb2s &= ~WBV_040;
+ 		}
+-	} else if (send_fault_sig(&fp->ptregs) > 0) {
+-		printk("68040 access error, ssw=%x\n", ssw);
+-		trap_c(fp);
++	} else {
++		/* In case of a bus error we either kill the process or expect
++		 * the kernel to catch the fault, which then is also
++		 * responsible for cleaning up the mess, so skip writebacks.
++		 */
++		current->thread.signo = SIGBUS;
++		current->thread.faddr = fp->un.fmt7.faddr;
++		if (send_fault_sig(&fp->ptregs) > 0)
++			printk("68040 access error, ssw=%x\n", ssw);
++		return;
+ 	}
+ 
+ 	do_040writebacks(fp);

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-update-defconfig-latest.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-update-defconfig-latest.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,451 @@
+FIXME Do not build in all drivers in multi_defconfig!
+---
+ arch/m68k/configs/amiga_defconfig    |    4 -
+ arch/m68k/configs/apollo_defconfig   |    4 -
+ arch/m68k/configs/atari_defconfig    |    8 ++-
+ arch/m68k/configs/bvme6000_defconfig |    2 
+ arch/m68k/configs/hp300_defconfig    |    4 -
+ arch/m68k/configs/mac_defconfig      |    4 -
+ arch/m68k/configs/multi_defconfig    |   81 ++++++++++++++++++-----------------
+ arch/m68k/configs/mvme147_defconfig  |    2 
+ arch/m68k/configs/mvme16x_defconfig  |    2 
+ arch/m68k/configs/q40_defconfig      |    4 -
+ arch/m68k/configs/sun3_defconfig     |    4 -
+ arch/m68k/configs/sun3x_defconfig    |    4 -
+ 12 files changed, 65 insertions(+), 58 deletions(-)
+
+--- a/arch/m68k/configs/amiga_defconfig
++++ b/arch/m68k/configs/amiga_defconfig
+@@ -1,7 +1,7 @@
+ #
+ # Automatically generated make config: don't edit
+ # Linux kernel version: 2.6.25
+-# Wed Apr 23 22:51:57 2008
++# Wed Apr 23 09:28:30 2008
+ #
+ CONFIG_M68K=y
+ CONFIG_MMU=y
+@@ -793,7 +793,7 @@ CONFIG_FB_CFB_IMAGEBLIT=y
+ # CONFIG_FB_SYS_COPYAREA is not set
+ # CONFIG_FB_SYS_IMAGEBLIT is not set
+ # CONFIG_FB_SYS_FOPS is not set
+-CONFIG_FB_DEFERRED_IO=y
++# CONFIG_FB_DEFERRED_IO is not set
+ # CONFIG_FB_SVGALIB is not set
+ # CONFIG_FB_MACMODES is not set
+ # CONFIG_FB_BACKLIGHT is not set
+--- a/arch/m68k/configs/apollo_defconfig
++++ b/arch/m68k/configs/apollo_defconfig
+@@ -1,7 +1,7 @@
+ #
+ # Automatically generated make config: don't edit
+ # Linux kernel version: 2.6.25
+-# Wed Apr 23 22:52:44 2008
++# Wed Apr 23 09:28:34 2008
+ #
+ CONFIG_M68K=y
+ CONFIG_MMU=y
+@@ -694,7 +694,7 @@ CONFIG_FB_CFB_IMAGEBLIT=y
+ # CONFIG_FB_SYS_COPYAREA is not set
+ # CONFIG_FB_SYS_IMAGEBLIT is not set
+ # CONFIG_FB_SYS_FOPS is not set
+-CONFIG_FB_DEFERRED_IO=y
++# CONFIG_FB_DEFERRED_IO is not set
+ # CONFIG_FB_SVGALIB is not set
+ # CONFIG_FB_MACMODES is not set
+ # CONFIG_FB_BACKLIGHT is not set
+--- a/arch/m68k/configs/atari_defconfig
++++ b/arch/m68k/configs/atari_defconfig
+@@ -1,7 +1,7 @@
+ #
+ # Automatically generated make config: don't edit
+ # Linux kernel version: 2.6.25
+-# Wed Apr 23 22:47:46 2008
++# Wed Apr 23 09:28:36 2008
+ #
+ CONFIG_M68K=y
+ CONFIG_MMU=y
+@@ -113,12 +113,15 @@ CONFIG_CLASSIC_RCU=y
+ # CONFIG_SUN3 is not set
+ # CONFIG_AMIGA is not set
+ CONFIG_ATARI=y
++CONFIG_ATARI_ROM_ISA=y
+ # CONFIG_MAC is not set
+ # CONFIG_APOLLO is not set
+ # CONFIG_VME is not set
+ # CONFIG_HP300 is not set
+ # CONFIG_SUN3X is not set
+ # CONFIG_Q40 is not set
++CONFIG_NATFEAT=y
++CONFIG_NFETH=y
+ 
+ #
+ # Processor type
+@@ -560,6 +563,7 @@ CONFIG_VETH=m
+ CONFIG_NET_ETHERNET=y
+ CONFIG_MII=m
+ CONFIG_ATARILANCE=m
++CONFIG_ATARI_ETHERNEC=m
+ # CONFIG_IBM_NEW_EMAC_ZMII is not set
+ # CONFIG_IBM_NEW_EMAC_RGMII is not set
+ # CONFIG_IBM_NEW_EMAC_TAH is not set
+@@ -737,7 +741,7 @@ CONFIG_FB_CFB_IMAGEBLIT=y
+ # CONFIG_FB_SYS_COPYAREA is not set
+ # CONFIG_FB_SYS_IMAGEBLIT is not set
+ # CONFIG_FB_SYS_FOPS is not set
+-CONFIG_FB_DEFERRED_IO=y
++# CONFIG_FB_DEFERRED_IO is not set
+ # CONFIG_FB_SVGALIB is not set
+ # CONFIG_FB_MACMODES is not set
+ # CONFIG_FB_BACKLIGHT is not set
+--- a/arch/m68k/configs/bvme6000_defconfig
++++ b/arch/m68k/configs/bvme6000_defconfig
+@@ -1,7 +1,7 @@
+ #
+ # Automatically generated make config: don't edit
+ # Linux kernel version: 2.6.25
+-# Wed Apr 23 22:53:06 2008
++# Wed Apr 23 09:28:39 2008
+ #
+ CONFIG_M68K=y
+ CONFIG_MMU=y
+--- a/arch/m68k/configs/hp300_defconfig
++++ b/arch/m68k/configs/hp300_defconfig
+@@ -1,7 +1,7 @@
+ #
+ # Automatically generated make config: don't edit
+ # Linux kernel version: 2.6.25
+-# Wed Apr 23 22:53:36 2008
++# Wed Apr 23 09:28:41 2008
+ #
+ CONFIG_M68K=y
+ CONFIG_MMU=y
+@@ -703,7 +703,7 @@ CONFIG_FB_CFB_IMAGEBLIT=y
+ # CONFIG_FB_SYS_COPYAREA is not set
+ # CONFIG_FB_SYS_IMAGEBLIT is not set
+ # CONFIG_FB_SYS_FOPS is not set
+-CONFIG_FB_DEFERRED_IO=y
++# CONFIG_FB_DEFERRED_IO is not set
+ # CONFIG_FB_SVGALIB is not set
+ # CONFIG_FB_MACMODES is not set
+ # CONFIG_FB_BACKLIGHT is not set
+--- a/arch/m68k/configs/mac_defconfig
++++ b/arch/m68k/configs/mac_defconfig
+@@ -1,7 +1,7 @@
+ #
+ # Automatically generated make config: don't edit
+ # Linux kernel version: 2.6.25
+-# Wed Apr 23 22:54:06 2008
++# Wed Apr 23 09:28:44 2008
+ #
+ CONFIG_M68K=y
+ CONFIG_MMU=y
+@@ -736,7 +736,7 @@ CONFIG_FB_CFB_IMAGEBLIT=y
+ # CONFIG_FB_SYS_COPYAREA is not set
+ # CONFIG_FB_SYS_IMAGEBLIT is not set
+ # CONFIG_FB_SYS_FOPS is not set
+-CONFIG_FB_DEFERRED_IO=y
++# CONFIG_FB_DEFERRED_IO is not set
+ # CONFIG_FB_SVGALIB is not set
+ CONFIG_FB_MACMODES=y
+ # CONFIG_FB_BACKLIGHT is not set
+--- a/arch/m68k/configs/multi_defconfig
++++ b/arch/m68k/configs/multi_defconfig
+@@ -1,7 +1,7 @@
+ #
+ # Automatically generated make config: don't edit
+ # Linux kernel version: 2.6.25
+-# Wed Apr 23 22:39:35 2008
++# Wed Apr 23 22:43:51 2008
+ #
+ CONFIG_M68K=y
+ CONFIG_MMU=y
+@@ -24,7 +24,7 @@ CONFIG_DEFCONFIG_LIST="/lib/modules/$UNA
+ CONFIG_EXPERIMENTAL=y
+ CONFIG_BROKEN_ON_SMP=y
+ CONFIG_INIT_ENV_ARG_LIMIT=32
+-CONFIG_LOCALVERSION="-multi"
++CONFIG_LOCALVERSION="multi"
+ CONFIG_LOCALVERSION_AUTO=y
+ CONFIG_SWAP=y
+ CONFIG_SYSVIPC=y
+@@ -113,6 +113,7 @@ CONFIG_CLASSIC_RCU=y
+ # CONFIG_SUN3 is not set
+ CONFIG_AMIGA=y
+ CONFIG_ATARI=y
++CONFIG_ATARI_ROM_ISA=y
+ CONFIG_MAC=y
+ CONFIG_NUBUS=y
+ CONFIG_M68K_L2_CACHE=y
+@@ -125,6 +126,8 @@ CONFIG_HP300=y
+ CONFIG_DIO=y
+ CONFIG_SUN3X=y
+ CONFIG_Q40=y
++CONFIG_NATFEAT=y
++CONFIG_NFETH=y
+ 
+ #
+ # Processor type
+@@ -446,11 +449,11 @@ CONFIG_FW_LOADER=m
+ # CONFIG_SYS_HYPERVISOR is not set
+ CONFIG_CONNECTOR=m
+ # CONFIG_MTD is not set
+-CONFIG_PARPORT=m
++CONFIG_PARPORT=y
+ # CONFIG_PARPORT_PC is not set
+-CONFIG_PARPORT_AMIGA=m
+-CONFIG_PARPORT_MFC3=m
+-CONFIG_PARPORT_ATARI=m
++CONFIG_PARPORT_AMIGA=y
++CONFIG_PARPORT_MFC3=y
++CONFIG_PARPORT_ATARI=y
+ # CONFIG_PARPORT_GSC is not set
+ # CONFIG_PARPORT_AX88796 is not set
+ CONFIG_PARPORT_1284=y
+@@ -621,21 +624,22 @@ CONFIG_VETH=m
+ # CONFIG_ARCNET is not set
+ # CONFIG_PHYLIB is not set
+ CONFIG_NET_ETHERNET=y
+-CONFIG_MII=m
+-CONFIG_ARIADNE=m
+-CONFIG_A2065=m
+-CONFIG_HYDRA=m
+-CONFIG_ZORRO8390=m
+-CONFIG_APNE=m
++CONFIG_MII=y
++CONFIG_ARIADNE=y
++CONFIG_A2065=y
++CONFIG_HYDRA=y
++CONFIG_ZORRO8390=y
++CONFIG_APNE=y
+ CONFIG_APOLLO_ELPLUS=y
+ CONFIG_MAC8390=y
+-CONFIG_MAC89x0=m
+-CONFIG_MACSONIC=m
++CONFIG_MAC89x0=y
++CONFIG_MACSONIC=y
+ CONFIG_MACMACE=y
+ CONFIG_MVME147_NET=y
+ CONFIG_MVME16x_NET=y
+ CONFIG_BVME6000_NET=y
+-CONFIG_ATARILANCE=m
++CONFIG_ATARILANCE=y
++CONFIG_ATARI_ETHERNEC=y
+ CONFIG_SUN3LANCE=y
+ CONFIG_HPLANCE=y
+ # CONFIG_NET_VENDOR_3COM is not set
+@@ -729,14 +733,14 @@ CONFIG_MOUSE_PS2_SYNAPTICS=y
+ CONFIG_MOUSE_PS2_LIFEBOOK=y
+ CONFIG_MOUSE_PS2_TRACKPOINT=y
+ # CONFIG_MOUSE_PS2_TOUCHKIT is not set
+-CONFIG_MOUSE_SERIAL=m
++CONFIG_MOUSE_SERIAL=y
+ # CONFIG_MOUSE_INPORT is not set
+ # CONFIG_MOUSE_LOGIBM is not set
+ # CONFIG_MOUSE_PC110PAD is not set
+-CONFIG_MOUSE_AMIGA=m
+-CONFIG_MOUSE_ATARI=m
++CONFIG_MOUSE_AMIGA=y
++CONFIG_MOUSE_ATARI=y
+ # CONFIG_MOUSE_VSXXXAA is not set
+-CONFIG_MOUSE_HIL=m
++CONFIG_MOUSE_HIL=y
+ CONFIG_INPUT_JOYSTICK=y
+ # CONFIG_JOYSTICK_ANALOG is not set
+ # CONFIG_JOYSTICK_A3D is not set
+@@ -759,21 +763,21 @@ CONFIG_INPUT_JOYSTICK=y
+ # CONFIG_JOYSTICK_DB9 is not set
+ # CONFIG_JOYSTICK_GAMECON is not set
+ # CONFIG_JOYSTICK_TURBOGRAFX is not set
+-CONFIG_JOYSTICK_AMIGA=m
++CONFIG_JOYSTICK_AMIGA=y
+ # CONFIG_JOYSTICK_JOYDUMP is not set
+ # CONFIG_INPUT_TABLET is not set
+ # CONFIG_INPUT_TOUCHSCREEN is not set
+ CONFIG_INPUT_MISC=y
+-CONFIG_INPUT_M68K_BEEP=m
++CONFIG_INPUT_M68K_BEEP=y
+ # CONFIG_INPUT_UINPUT is not set
+-CONFIG_HP_SDC_RTC=m
++CONFIG_HP_SDC_RTC=y
+ 
+ #
+ # Hardware I/O ports
+ #
+ CONFIG_SERIO=y
+ # CONFIG_SERIO_SERPORT is not set
+-CONFIG_SERIO_Q40KBD=m
++CONFIG_SERIO_Q40KBD=y
+ # CONFIG_SERIO_PARKBD is not set
+ CONFIG_HP_SDC=y
+ CONFIG_HIL_MLC=y
+@@ -789,7 +793,7 @@ CONFIG_VT_CONSOLE=y
+ CONFIG_HW_CONSOLE=y
+ CONFIG_VT_HW_CONSOLE_BINDING=y
+ # CONFIG_SERIAL_NONSTANDARD is not set
+-CONFIG_A2232=m
++CONFIG_A2232=y
+ 
+ #
+ # Serial drivers
+@@ -802,13 +806,13 @@ CONFIG_A2232=m
+ CONFIG_UNIX98_PTYS=y
+ CONFIG_LEGACY_PTYS=y
+ CONFIG_LEGACY_PTY_COUNT=256
+-CONFIG_PRINTER=m
++CONFIG_PRINTER=y
+ # CONFIG_LP_CONSOLE is not set
+ # CONFIG_PPDEV is not set
+ # CONFIG_IPMI_HANDLER is not set
+ # CONFIG_HW_RANDOM is not set
+ CONFIG_NVRAM=y
+-CONFIG_GEN_RTC=m
++CONFIG_GEN_RTC=y
+ CONFIG_GEN_RTC_X=y
+ # CONFIG_DTLK is not set
+ # CONFIG_R3964 is not set
+@@ -862,7 +866,6 @@ CONFIG_FB_CFB_IMAGEBLIT=y
+ # CONFIG_FB_SYS_COPYAREA is not set
+ # CONFIG_FB_SYS_IMAGEBLIT is not set
+ # CONFIG_FB_SYS_FOPS is not set
+-CONFIG_FB_DEFERRED_IO=y
+ # CONFIG_FB_SVGALIB is not set
+ CONFIG_FB_MACMODES=y
+ # CONFIG_FB_BACKLIGHT is not set
+@@ -916,11 +919,11 @@ CONFIG_LOGO_MAC_CLUT224=y
+ #
+ # Sound
+ #
+-CONFIG_SOUND=m
+-CONFIG_DMASOUND_ATARI=m
+-CONFIG_DMASOUND_PAULA=m
+-CONFIG_DMASOUND_Q40=m
+-CONFIG_DMASOUND=m
++CONFIG_SOUND=y
++CONFIG_DMASOUND_ATARI=y
++CONFIG_DMASOUND_PAULA=y
++CONFIG_DMASOUND_Q40=y
++CONFIG_DMASOUND=y
+ CONFIG_HID_SUPPORT=y
+ CONFIG_HID=m
+ # CONFIG_HID_DEBUG is not set
+@@ -936,13 +939,13 @@ CONFIG_HIDRAW=y
+ #
+ # Character devices
+ #
+-CONFIG_ATARI_MFPSER=m
++CONFIG_ATARI_MFPSER=y
+ CONFIG_ATARI_SCC=y
+ CONFIG_ATARI_SCC_DMA=y
+-CONFIG_ATARI_MIDI=m
+-CONFIG_ATARI_DSP56K=m
++CONFIG_ATARI_MIDI=y
++CONFIG_ATARI_DSP56K=y
+ CONFIG_AMIGA_BUILTIN_SERIAL=y
+-CONFIG_MULTIFACE_III_TTY=m
++CONFIG_MULTIFACE_III_TTY=y
+ CONFIG_MAC_SCC=y
+ CONFIG_MAC_HID=y
+ CONFIG_MVME147_SCC=y
+@@ -977,8 +980,8 @@ CONFIG_XFS_FS=m
+ # CONFIG_XFS_POSIX_ACL is not set
+ # CONFIG_XFS_RT is not set
+ CONFIG_OCFS2_FS=m
+-CONFIG_OCFS2_FS_O2CB=m
+-CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m
++# CONFIG_OCFS2_FS_O2CB is not set
++# CONFIG_OCFS2_FS_USERSPACE_CLUSTER is not set
+ # CONFIG_OCFS2_DEBUG_MASKLOG is not set
+ # CONFIG_OCFS2_DEBUG_FS is not set
+ CONFIG_DNOTIFY=y
+@@ -1180,7 +1183,7 @@ CONFIG_CRYPTO_SEQIV=m
+ #
+ CONFIG_CRYPTO_CBC=y
+ CONFIG_CRYPTO_CTR=m
+-# CONFIG_CRYPTO_CTS is not set
++CONFIG_CRYPTO_CTS=m
+ CONFIG_CRYPTO_ECB=m
+ CONFIG_CRYPTO_LRW=m
+ CONFIG_CRYPTO_PCBC=m
+--- a/arch/m68k/configs/mvme147_defconfig
++++ b/arch/m68k/configs/mvme147_defconfig
+@@ -1,7 +1,7 @@
+ #
+ # Automatically generated make config: don't edit
+ # Linux kernel version: 2.6.25
+-# Wed Apr 23 22:54:29 2008
++# Wed Apr 23 09:28:50 2008
+ #
+ CONFIG_M68K=y
+ CONFIG_MMU=y
+--- a/arch/m68k/configs/mvme16x_defconfig
++++ b/arch/m68k/configs/mvme16x_defconfig
+@@ -1,7 +1,7 @@
+ #
+ # Automatically generated make config: don't edit
+ # Linux kernel version: 2.6.25
+-# Wed Apr 23 22:54:50 2008
++# Wed Apr 23 09:28:52 2008
+ #
+ CONFIG_M68K=y
+ CONFIG_MMU=y
+--- a/arch/m68k/configs/q40_defconfig
++++ b/arch/m68k/configs/q40_defconfig
+@@ -1,7 +1,7 @@
+ #
+ # Automatically generated make config: don't edit
+ # Linux kernel version: 2.6.25
+-# Wed Apr 23 22:55:49 2008
++# Wed Apr 23 09:28:54 2008
+ #
+ CONFIG_M68K=y
+ CONFIG_MMU=y
+@@ -748,7 +748,7 @@ CONFIG_FB_CFB_IMAGEBLIT=y
+ # CONFIG_FB_SYS_COPYAREA is not set
+ # CONFIG_FB_SYS_IMAGEBLIT is not set
+ # CONFIG_FB_SYS_FOPS is not set
+-CONFIG_FB_DEFERRED_IO=y
++# CONFIG_FB_DEFERRED_IO is not set
+ # CONFIG_FB_SVGALIB is not set
+ # CONFIG_FB_MACMODES is not set
+ # CONFIG_FB_BACKLIGHT is not set
+--- a/arch/m68k/configs/sun3_defconfig
++++ b/arch/m68k/configs/sun3_defconfig
+@@ -1,7 +1,7 @@
+ #
+ # Automatically generated make config: don't edit
+ # Linux kernel version: 2.6.25
+-# Wed Apr 23 22:56:22 2008
++# Wed Apr 23 09:28:57 2008
+ #
+ CONFIG_M68K=y
+ CONFIG_MMU=y
+@@ -684,7 +684,7 @@ CONFIG_FB=y
+ # CONFIG_FB_SYS_COPYAREA is not set
+ # CONFIG_FB_SYS_IMAGEBLIT is not set
+ # CONFIG_FB_SYS_FOPS is not set
+-CONFIG_FB_DEFERRED_IO=y
++# CONFIG_FB_DEFERRED_IO is not set
+ # CONFIG_FB_SVGALIB is not set
+ # CONFIG_FB_MACMODES is not set
+ # CONFIG_FB_BACKLIGHT is not set
+--- a/arch/m68k/configs/sun3x_defconfig
++++ b/arch/m68k/configs/sun3x_defconfig
+@@ -1,7 +1,7 @@
+ #
+ # Automatically generated make config: don't edit
+ # Linux kernel version: 2.6.25
+-# Wed Apr 23 22:56:41 2008
++# Wed Apr 23 09:28:59 2008
+ #
+ CONFIG_M68K=y
+ CONFIG_MMU=y
+@@ -694,7 +694,7 @@ CONFIG_FB=y
+ # CONFIG_FB_SYS_COPYAREA is not set
+ # CONFIG_FB_SYS_IMAGEBLIT is not set
+ # CONFIG_FB_SYS_FOPS is not set
+-CONFIG_FB_DEFERRED_IO=y
++# CONFIG_FB_DEFERRED_IO is not set
+ # CONFIG_FB_SVGALIB is not set
+ # CONFIG_FB_MACMODES is not set
+ # CONFIG_FB_BACKLIGHT is not set

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-update-defconfig.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-update-defconfig.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,2511 @@
+Subject: [PATCH] m68k: Update defconfigs
+
+From: Geert Uytterhoeven <geert at linux-m68k.org>
+
+Update the m68k defconfigs
+
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ arch/m68k/configs/amiga_defconfig    |  130 ++++++++++++++++++----------------
+ arch/m68k/configs/apollo_defconfig   |  112 ++++++++++++++++++-----------
+ arch/m68k/configs/atari_defconfig    |  115 ++++++++++++++++++------------
+ arch/m68k/configs/bvme6000_defconfig |  112 ++++++++++++++++++-----------
+ arch/m68k/configs/hp300_defconfig    |  114 ++++++++++++++++++------------
+ arch/m68k/configs/mac_defconfig      |  115 ++++++++++++++++++------------
+ arch/m68k/configs/mvme147_defconfig  |  112 ++++++++++++++++++-----------
+ arch/m68k/configs/mvme16x_defconfig  |  112 ++++++++++++++++++-----------
+ arch/m68k/configs/q40_defconfig      |  131 ++++++++++++++++++-----------------
+ arch/m68k/configs/sun3_defconfig     |  112 ++++++++++++++++++-----------
+ arch/m68k/configs/sun3x_defconfig    |  112 ++++++++++++++++++-----------
+ 11 files changed, 775 insertions(+), 502 deletions(-)
+
+--- a/arch/m68k/configs/amiga_defconfig
++++ b/arch/m68k/configs/amiga_defconfig
+@@ -1,7 +1,7 @@
+ #
+ # Automatically generated make config: don't edit
+-# Linux kernel version: 2.6.25-rc8
+-# Wed Apr  2 20:46:06 2008
++# Linux kernel version: 2.6.25
++# Wed Apr 23 22:51:57 2008
+ #
+ CONFIG_M68K=y
+ CONFIG_MMU=y
+@@ -222,8 +222,10 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=m
+ CONFIG_INET6_XFRM_MODE_BEET=m
+ CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
+ CONFIG_IPV6_SIT=m
++CONFIG_IPV6_NDISC_NODETYPE=y
+ CONFIG_IPV6_TUNNEL=m
+ # CONFIG_IPV6_MULTIPLE_TABLES is not set
++# CONFIG_IPV6_MROUTE is not set
+ # CONFIG_NETWORK_SECMARK is not set
+ CONFIG_NETFILTER=y
+ # CONFIG_NETFILTER_DEBUG is not set
+@@ -239,6 +241,7 @@ CONFIG_NF_CONNTRACK=m
+ CONFIG_NF_CT_ACCT=y
+ CONFIG_NF_CONNTRACK_MARK=y
+ # CONFIG_NF_CONNTRACK_EVENTS is not set
++# CONFIG_NF_CT_PROTO_DCCP is not set
+ CONFIG_NF_CT_PROTO_GRE=m
+ CONFIG_NF_CT_PROTO_SCTP=m
+ CONFIG_NF_CT_PROTO_UDPLITE=m
+@@ -317,6 +320,8 @@ CONFIG_IP_NF_TARGET_REDIRECT=m
+ CONFIG_IP_NF_TARGET_NETMAP=m
+ CONFIG_NF_NAT_SNMP_BASIC=m
+ CONFIG_NF_NAT_PROTO_GRE=m
++CONFIG_NF_NAT_PROTO_UDPLITE=m
++CONFIG_NF_NAT_PROTO_SCTP=m
+ CONFIG_NF_NAT_FTP=m
+ CONFIG_NF_NAT_IRC=m
+ CONFIG_NF_NAT_TFTP=m
+@@ -410,8 +415,6 @@ CONFIG_IEEE80211=m
+ CONFIG_IEEE80211_CRYPT_WEP=m
+ CONFIG_IEEE80211_CRYPT_CCMP=m
+ CONFIG_IEEE80211_CRYPT_TKIP=m
+-CONFIG_IEEE80211_SOFTMAC=m
+-# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+ # CONFIG_RFKILL is not set
+ # CONFIG_NET_9P is not set
+ 
+@@ -477,27 +480,12 @@ CONFIG_IDE_PROC_FS=y
+ #
+ # IDE chipset support/bugfixes
+ #
+-# CONFIG_IDE_GENERIC is not set
+ # CONFIG_BLK_DEV_PLATFORM is not set
+ CONFIG_BLK_DEV_GAYLE=y
+ CONFIG_BLK_DEV_IDEDOUBLER=y
+ CONFIG_BLK_DEV_BUDDHA=y
+-
+-#
+-# Other IDE chipsets support
+-#
+-
+-#
+-# Note: most of these also require special kernel boot parameters
+-#
+-# CONFIG_BLK_DEV_4DRIVES is not set
+-# CONFIG_BLK_DEV_ALI14XX is not set
+-# CONFIG_BLK_DEV_DTC2278 is not set
+-# CONFIG_BLK_DEV_HT6560B is not set
+-# CONFIG_BLK_DEV_QD65XX is not set
+-# CONFIG_BLK_DEV_UMC8672 is not set
+ # CONFIG_BLK_DEV_IDEDMA is not set
+-# CONFIG_IDE_ARCH_OBSOLETE_INIT is not set
++# CONFIG_BLK_DEV_HD_ONLY is not set
+ # CONFIG_BLK_DEV_HD is not set
+ 
+ #
+@@ -626,6 +614,7 @@ CONFIG_APNE=m
+ #
+ # CONFIG_WLAN_PRE80211 is not set
+ # CONFIG_WLAN_80211 is not set
++# CONFIG_IWLWIFI_LEDS is not set
+ # CONFIG_WAN is not set
+ # CONFIG_PLIP is not set
+ CONFIG_PPP=m
+@@ -779,6 +768,7 @@ CONFIG_SSB_POSSIBLE=y
+ # Multifunction device drivers
+ #
+ # CONFIG_MFD_SM501 is not set
++# CONFIG_HTC_PASIC3 is not set
+ 
+ #
+ # Multimedia devices
+@@ -861,17 +851,12 @@ CONFIG_HIDRAW=y
+ # CONFIG_NEW_LEDS is not set
+ # CONFIG_RTC_CLASS is not set
+ # CONFIG_AUXDISPLAY is not set
+-
+-#
+-# Userspace I/O
+-#
+ # CONFIG_UIO is not set
+ 
+ #
+ # Character devices
+ #
+ CONFIG_AMIGA_BUILTIN_SERIAL=y
+-# CONFIG_WHIPPET_SERIAL is not set
+ CONFIG_MULTIFACE_III_TTY=m
+ # CONFIG_SERIAL_CONSOLE is not set
+ 
+@@ -894,16 +879,14 @@ CONFIG_JFS_FS=m
+ # CONFIG_JFS_SECURITY is not set
+ # CONFIG_JFS_DEBUG is not set
+ # CONFIG_JFS_STATISTICS is not set
+-CONFIG_FS_POSIX_ACL=y
++# CONFIG_FS_POSIX_ACL is not set
+ CONFIG_XFS_FS=m
+ # CONFIG_XFS_QUOTA is not set
+-# CONFIG_XFS_SECURITY is not set
+ # CONFIG_XFS_POSIX_ACL is not set
+ # CONFIG_XFS_RT is not set
+-CONFIG_GFS2_FS=m
+-CONFIG_GFS2_FS_LOCKING_NOLOCK=m
+-CONFIG_GFS2_FS_LOCKING_DLM=m
+ CONFIG_OCFS2_FS=m
++# CONFIG_OCFS2_FS_O2CB is not set
++# CONFIG_OCFS2_FS_USERSPACE_CLUSTER is not set
+ # CONFIG_OCFS2_DEBUG_MASKLOG is not set
+ # CONFIG_OCFS2_DEBUG_FS is not set
+ CONFIG_DNOTIFY=y
+@@ -1073,53 +1056,82 @@ CONFIG_ASYNC_CORE=m
+ CONFIG_ASYNC_MEMCPY=m
+ CONFIG_ASYNC_XOR=m
+ CONFIG_CRYPTO=y
++
++#
++# Crypto core or helper
++#
+ CONFIG_CRYPTO_ALGAPI=y
+ CONFIG_CRYPTO_AEAD=m
+ CONFIG_CRYPTO_BLKCIPHER=m
+-CONFIG_CRYPTO_SEQIV=m
+ CONFIG_CRYPTO_HASH=y
+ CONFIG_CRYPTO_MANAGER=y
++CONFIG_CRYPTO_GF128MUL=m
++CONFIG_CRYPTO_NULL=m
++CONFIG_CRYPTO_CRYPTD=m
++CONFIG_CRYPTO_AUTHENC=m
++CONFIG_CRYPTO_TEST=m
++
++#
++# Authenticated Encryption with Associated Data
++#
++CONFIG_CRYPTO_CCM=m
++CONFIG_CRYPTO_GCM=m
++CONFIG_CRYPTO_SEQIV=m
++
++#
++# Block modes
++#
++CONFIG_CRYPTO_CBC=m
++CONFIG_CRYPTO_CTR=m
++CONFIG_CRYPTO_CTS=m
++CONFIG_CRYPTO_ECB=m
++CONFIG_CRYPTO_LRW=m
++CONFIG_CRYPTO_PCBC=m
++CONFIG_CRYPTO_XTS=m
++
++#
++# Hash modes
++#
+ CONFIG_CRYPTO_HMAC=y
+ CONFIG_CRYPTO_XCBC=m
+-CONFIG_CRYPTO_NULL=m
++
++#
++# Digest
++#
++CONFIG_CRYPTO_CRC32C=m
+ CONFIG_CRYPTO_MD4=m
+ CONFIG_CRYPTO_MD5=m
++CONFIG_CRYPTO_MICHAEL_MIC=m
+ CONFIG_CRYPTO_SHA1=m
+ CONFIG_CRYPTO_SHA256=m
+ CONFIG_CRYPTO_SHA512=m
+-CONFIG_CRYPTO_WP512=m
+ CONFIG_CRYPTO_TGR192=m
+-CONFIG_CRYPTO_GF128MUL=m
+-CONFIG_CRYPTO_ECB=m
+-CONFIG_CRYPTO_CBC=m
+-CONFIG_CRYPTO_PCBC=m
+-CONFIG_CRYPTO_LRW=m
+-CONFIG_CRYPTO_XTS=m
+-CONFIG_CRYPTO_CTR=m
+-CONFIG_CRYPTO_GCM=m
+-CONFIG_CRYPTO_CCM=m
+-CONFIG_CRYPTO_CRYPTD=m
+-CONFIG_CRYPTO_DES=m
+-CONFIG_CRYPTO_FCRYPT=m
+-CONFIG_CRYPTO_BLOWFISH=m
+-CONFIG_CRYPTO_TWOFISH=m
+-CONFIG_CRYPTO_TWOFISH_COMMON=m
+-CONFIG_CRYPTO_SERPENT=m
++CONFIG_CRYPTO_WP512=m
++
++#
++# Ciphers
++#
+ CONFIG_CRYPTO_AES=m
++CONFIG_CRYPTO_ANUBIS=m
++CONFIG_CRYPTO_ARC4=m
++CONFIG_CRYPTO_BLOWFISH=m
++CONFIG_CRYPTO_CAMELLIA=m
+ CONFIG_CRYPTO_CAST5=m
+ CONFIG_CRYPTO_CAST6=m
+-CONFIG_CRYPTO_TEA=m
+-CONFIG_CRYPTO_ARC4=m
++CONFIG_CRYPTO_DES=m
++CONFIG_CRYPTO_FCRYPT=m
+ CONFIG_CRYPTO_KHAZAD=m
+-CONFIG_CRYPTO_ANUBIS=m
+-CONFIG_CRYPTO_SEED=m
+ CONFIG_CRYPTO_SALSA20=m
++CONFIG_CRYPTO_SEED=m
++CONFIG_CRYPTO_SERPENT=m
++CONFIG_CRYPTO_TEA=m
++CONFIG_CRYPTO_TWOFISH=m
++CONFIG_CRYPTO_TWOFISH_COMMON=m
++
++#
++# Compression
++#
+ CONFIG_CRYPTO_DEFLATE=m
+-CONFIG_CRYPTO_MICHAEL_MIC=m
+-CONFIG_CRYPTO_CRC32C=m
+-CONFIG_CRYPTO_CAMELLIA=m
+-CONFIG_CRYPTO_TEST=m
+-CONFIG_CRYPTO_AUTHENC=m
+ CONFIG_CRYPTO_LZO=m
+ # CONFIG_CRYPTO_HW is not set
+ 
+@@ -1129,7 +1141,7 @@ CONFIG_CRYPTO_LZO=m
+ CONFIG_BITREVERSE=y
+ CONFIG_CRC_CCITT=m
+ CONFIG_CRC16=m
+-# CONFIG_CRC_ITU_T is not set
++CONFIG_CRC_ITU_T=m
+ CONFIG_CRC32=y
+ # CONFIG_CRC7 is not set
+ CONFIG_LIBCRC32C=m
+--- a/arch/m68k/configs/apollo_defconfig
++++ b/arch/m68k/configs/apollo_defconfig
+@@ -1,7 +1,7 @@
+ #
+ # Automatically generated make config: don't edit
+-# Linux kernel version: 2.6.25-rc8
+-# Wed Apr  2 20:46:07 2008
++# Linux kernel version: 2.6.25
++# Wed Apr 23 22:52:44 2008
+ #
+ CONFIG_M68K=y
+ CONFIG_MMU=y
+@@ -220,8 +220,10 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=m
+ CONFIG_INET6_XFRM_MODE_BEET=m
+ CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
+ CONFIG_IPV6_SIT=m
++CONFIG_IPV6_NDISC_NODETYPE=y
+ CONFIG_IPV6_TUNNEL=m
+ # CONFIG_IPV6_MULTIPLE_TABLES is not set
++# CONFIG_IPV6_MROUTE is not set
+ # CONFIG_NETWORK_SECMARK is not set
+ CONFIG_NETFILTER=y
+ # CONFIG_NETFILTER_DEBUG is not set
+@@ -237,6 +239,7 @@ CONFIG_NF_CONNTRACK=m
+ CONFIG_NF_CT_ACCT=y
+ CONFIG_NF_CONNTRACK_MARK=y
+ # CONFIG_NF_CONNTRACK_EVENTS is not set
++# CONFIG_NF_CT_PROTO_DCCP is not set
+ CONFIG_NF_CT_PROTO_GRE=m
+ CONFIG_NF_CT_PROTO_SCTP=m
+ CONFIG_NF_CT_PROTO_UDPLITE=m
+@@ -315,6 +318,8 @@ CONFIG_IP_NF_TARGET_REDIRECT=m
+ CONFIG_IP_NF_TARGET_NETMAP=m
+ CONFIG_NF_NAT_SNMP_BASIC=m
+ CONFIG_NF_NAT_PROTO_GRE=m
++CONFIG_NF_NAT_PROTO_UDPLITE=m
++CONFIG_NF_NAT_PROTO_SCTP=m
+ CONFIG_NF_NAT_FTP=m
+ CONFIG_NF_NAT_IRC=m
+ CONFIG_NF_NAT_TFTP=m
+@@ -408,8 +413,6 @@ CONFIG_IEEE80211=m
+ CONFIG_IEEE80211_CRYPT_WEP=m
+ CONFIG_IEEE80211_CRYPT_CCMP=m
+ CONFIG_IEEE80211_CRYPT_TKIP=m
+-CONFIG_IEEE80211_SOFTMAC=m
+-# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+ # CONFIG_RFKILL is not set
+ # CONFIG_NET_9P is not set
+ 
+@@ -539,6 +542,7 @@ CONFIG_APOLLO_ELPLUS=y
+ #
+ # CONFIG_WLAN_PRE80211 is not set
+ # CONFIG_WLAN_80211 is not set
++# CONFIG_IWLWIFI_LEDS is not set
+ # CONFIG_WAN is not set
+ CONFIG_PPP=m
+ # CONFIG_PPP_MULTILINK is not set
+@@ -665,6 +669,7 @@ CONFIG_SSB_POSSIBLE=y
+ # Multifunction device drivers
+ #
+ # CONFIG_MFD_SM501 is not set
++# CONFIG_HTC_PASIC3 is not set
+ 
+ #
+ # Multimedia devices
+@@ -738,10 +743,6 @@ CONFIG_HIDRAW=y
+ # CONFIG_MEMSTICK is not set
+ # CONFIG_NEW_LEDS is not set
+ # CONFIG_RTC_CLASS is not set
+-
+-#
+-# Userspace I/O
+-#
+ # CONFIG_UIO is not set
+ 
+ #
+@@ -769,16 +770,14 @@ CONFIG_JFS_FS=m
+ # CONFIG_JFS_SECURITY is not set
+ # CONFIG_JFS_DEBUG is not set
+ # CONFIG_JFS_STATISTICS is not set
+-CONFIG_FS_POSIX_ACL=y
++# CONFIG_FS_POSIX_ACL is not set
+ CONFIG_XFS_FS=m
+ # CONFIG_XFS_QUOTA is not set
+-# CONFIG_XFS_SECURITY is not set
+ # CONFIG_XFS_POSIX_ACL is not set
+ # CONFIG_XFS_RT is not set
+-CONFIG_GFS2_FS=m
+-CONFIG_GFS2_FS_LOCKING_NOLOCK=m
+-CONFIG_GFS2_FS_LOCKING_DLM=m
+ CONFIG_OCFS2_FS=m
++# CONFIG_OCFS2_FS_O2CB is not set
++# CONFIG_OCFS2_FS_USERSPACE_CLUSTER is not set
+ # CONFIG_OCFS2_DEBUG_MASKLOG is not set
+ # CONFIG_OCFS2_DEBUG_FS is not set
+ CONFIG_DNOTIFY=y
+@@ -948,53 +947,82 @@ CONFIG_ASYNC_CORE=m
+ CONFIG_ASYNC_MEMCPY=m
+ CONFIG_ASYNC_XOR=m
+ CONFIG_CRYPTO=y
++
++#
++# Crypto core or helper
++#
+ CONFIG_CRYPTO_ALGAPI=y
+ CONFIG_CRYPTO_AEAD=m
+ CONFIG_CRYPTO_BLKCIPHER=y
+-CONFIG_CRYPTO_SEQIV=m
+ CONFIG_CRYPTO_HASH=y
+ CONFIG_CRYPTO_MANAGER=y
++CONFIG_CRYPTO_GF128MUL=m
++CONFIG_CRYPTO_NULL=m
++CONFIG_CRYPTO_CRYPTD=m
++CONFIG_CRYPTO_AUTHENC=m
++CONFIG_CRYPTO_TEST=m
++
++#
++# Authenticated Encryption with Associated Data
++#
++CONFIG_CRYPTO_CCM=m
++CONFIG_CRYPTO_GCM=m
++CONFIG_CRYPTO_SEQIV=m
++
++#
++# Block modes
++#
++CONFIG_CRYPTO_CBC=y
++CONFIG_CRYPTO_CTR=m
++CONFIG_CRYPTO_CTS=m
++CONFIG_CRYPTO_ECB=m
++CONFIG_CRYPTO_LRW=m
++CONFIG_CRYPTO_PCBC=m
++CONFIG_CRYPTO_XTS=m
++
++#
++# Hash modes
++#
+ CONFIG_CRYPTO_HMAC=y
+ CONFIG_CRYPTO_XCBC=m
+-CONFIG_CRYPTO_NULL=m
++
++#
++# Digest
++#
++CONFIG_CRYPTO_CRC32C=m
+ CONFIG_CRYPTO_MD4=m
+ CONFIG_CRYPTO_MD5=y
++CONFIG_CRYPTO_MICHAEL_MIC=m
+ CONFIG_CRYPTO_SHA1=m
+ CONFIG_CRYPTO_SHA256=m
+ CONFIG_CRYPTO_SHA512=m
+-CONFIG_CRYPTO_WP512=m
+ CONFIG_CRYPTO_TGR192=m
+-CONFIG_CRYPTO_GF128MUL=m
+-CONFIG_CRYPTO_ECB=m
+-CONFIG_CRYPTO_CBC=y
+-CONFIG_CRYPTO_PCBC=m
+-CONFIG_CRYPTO_LRW=m
+-CONFIG_CRYPTO_XTS=m
+-CONFIG_CRYPTO_CTR=m
+-CONFIG_CRYPTO_GCM=m
+-CONFIG_CRYPTO_CCM=m
+-CONFIG_CRYPTO_CRYPTD=m
+-CONFIG_CRYPTO_DES=y
+-CONFIG_CRYPTO_FCRYPT=m
+-CONFIG_CRYPTO_BLOWFISH=m
+-CONFIG_CRYPTO_TWOFISH=m
+-CONFIG_CRYPTO_TWOFISH_COMMON=m
+-CONFIG_CRYPTO_SERPENT=m
++CONFIG_CRYPTO_WP512=m
++
++#
++# Ciphers
++#
+ CONFIG_CRYPTO_AES=m
++CONFIG_CRYPTO_ANUBIS=m
++CONFIG_CRYPTO_ARC4=m
++CONFIG_CRYPTO_BLOWFISH=m
++CONFIG_CRYPTO_CAMELLIA=m
+ CONFIG_CRYPTO_CAST5=m
+ CONFIG_CRYPTO_CAST6=m
+-CONFIG_CRYPTO_TEA=m
+-CONFIG_CRYPTO_ARC4=m
++CONFIG_CRYPTO_DES=y
++CONFIG_CRYPTO_FCRYPT=m
+ CONFIG_CRYPTO_KHAZAD=m
+-CONFIG_CRYPTO_ANUBIS=m
+-CONFIG_CRYPTO_SEED=m
+ CONFIG_CRYPTO_SALSA20=m
++CONFIG_CRYPTO_SEED=m
++CONFIG_CRYPTO_SERPENT=m
++CONFIG_CRYPTO_TEA=m
++CONFIG_CRYPTO_TWOFISH=m
++CONFIG_CRYPTO_TWOFISH_COMMON=m
++
++#
++# Compression
++#
+ CONFIG_CRYPTO_DEFLATE=m
+-CONFIG_CRYPTO_MICHAEL_MIC=m
+-CONFIG_CRYPTO_CRC32C=m
+-CONFIG_CRYPTO_CAMELLIA=m
+-CONFIG_CRYPTO_TEST=m
+-CONFIG_CRYPTO_AUTHENC=m
+ CONFIG_CRYPTO_LZO=m
+ # CONFIG_CRYPTO_HW is not set
+ 
+@@ -1004,7 +1032,7 @@ CONFIG_CRYPTO_LZO=m
+ CONFIG_BITREVERSE=y
+ CONFIG_CRC_CCITT=m
+ CONFIG_CRC16=m
+-# CONFIG_CRC_ITU_T is not set
++CONFIG_CRC_ITU_T=m
+ CONFIG_CRC32=y
+ # CONFIG_CRC7 is not set
+ CONFIG_LIBCRC32C=m
+--- a/arch/m68k/configs/atari_defconfig
++++ b/arch/m68k/configs/atari_defconfig
+@@ -1,7 +1,7 @@
+ #
+ # Automatically generated make config: don't edit
+-# Linux kernel version: 2.6.25-rc8
+-# Wed Apr  2 20:46:09 2008
++# Linux kernel version: 2.6.25
++# Wed Apr 23 22:47:46 2008
+ #
+ CONFIG_M68K=y
+ CONFIG_MMU=y
+@@ -218,8 +218,10 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=m
+ CONFIG_INET6_XFRM_MODE_BEET=m
+ CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
+ CONFIG_IPV6_SIT=m
++CONFIG_IPV6_NDISC_NODETYPE=y
+ CONFIG_IPV6_TUNNEL=m
+ # CONFIG_IPV6_MULTIPLE_TABLES is not set
++# CONFIG_IPV6_MROUTE is not set
+ # CONFIG_NETWORK_SECMARK is not set
+ CONFIG_NETFILTER=y
+ # CONFIG_NETFILTER_DEBUG is not set
+@@ -235,6 +237,7 @@ CONFIG_NF_CONNTRACK=m
+ CONFIG_NF_CT_ACCT=y
+ CONFIG_NF_CONNTRACK_MARK=y
+ # CONFIG_NF_CONNTRACK_EVENTS is not set
++# CONFIG_NF_CT_PROTO_DCCP is not set
+ CONFIG_NF_CT_PROTO_GRE=m
+ CONFIG_NF_CT_PROTO_SCTP=m
+ CONFIG_NF_CT_PROTO_UDPLITE=m
+@@ -313,6 +316,8 @@ CONFIG_IP_NF_TARGET_REDIRECT=m
+ CONFIG_IP_NF_TARGET_NETMAP=m
+ CONFIG_NF_NAT_SNMP_BASIC=m
+ CONFIG_NF_NAT_PROTO_GRE=m
++CONFIG_NF_NAT_PROTO_UDPLITE=m
++CONFIG_NF_NAT_PROTO_SCTP=m
+ CONFIG_NF_NAT_FTP=m
+ CONFIG_NF_NAT_IRC=m
+ CONFIG_NF_NAT_TFTP=m
+@@ -406,8 +411,6 @@ CONFIG_IEEE80211=m
+ CONFIG_IEEE80211_CRYPT_WEP=m
+ CONFIG_IEEE80211_CRYPT_CCMP=m
+ CONFIG_IEEE80211_CRYPT_TKIP=m
+-CONFIG_IEEE80211_SOFTMAC=m
+-# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+ # CONFIG_RFKILL is not set
+ # CONFIG_NET_9P is not set
+ 
+@@ -469,11 +472,10 @@ CONFIG_IDE_PROC_FS=y
+ #
+ # IDE chipset support/bugfixes
+ #
+-# CONFIG_IDE_GENERIC is not set
+ # CONFIG_BLK_DEV_PLATFORM is not set
+ CONFIG_BLK_DEV_FALCON_IDE=y
+ # CONFIG_BLK_DEV_IDEDMA is not set
+-# CONFIG_IDE_ARCH_OBSOLETE_INIT is not set
++# CONFIG_BLK_DEV_HD_ONLY is not set
+ # CONFIG_BLK_DEV_HD is not set
+ 
+ #
+@@ -572,6 +574,7 @@ CONFIG_ATARILANCE=m
+ #
+ # CONFIG_WLAN_PRE80211 is not set
+ # CONFIG_WLAN_80211 is not set
++# CONFIG_IWLWIFI_LEDS is not set
+ # CONFIG_WAN is not set
+ # CONFIG_PLIP is not set
+ CONFIG_PPP=m
+@@ -709,6 +712,7 @@ CONFIG_SSB_POSSIBLE=y
+ # Multifunction device drivers
+ #
+ # CONFIG_MFD_SM501 is not set
++# CONFIG_HTC_PASIC3 is not set
+ 
+ #
+ # Multimedia devices
+@@ -786,10 +790,6 @@ CONFIG_HIDRAW=y
+ # CONFIG_NEW_LEDS is not set
+ # CONFIG_RTC_CLASS is not set
+ # CONFIG_AUXDISPLAY is not set
+-
+-#
+-# Userspace I/O
+-#
+ # CONFIG_UIO is not set
+ 
+ #
+@@ -821,16 +821,14 @@ CONFIG_JFS_FS=m
+ # CONFIG_JFS_SECURITY is not set
+ # CONFIG_JFS_DEBUG is not set
+ # CONFIG_JFS_STATISTICS is not set
+-CONFIG_FS_POSIX_ACL=y
++# CONFIG_FS_POSIX_ACL is not set
+ CONFIG_XFS_FS=m
+ # CONFIG_XFS_QUOTA is not set
+-# CONFIG_XFS_SECURITY is not set
+ # CONFIG_XFS_POSIX_ACL is not set
+ # CONFIG_XFS_RT is not set
+-CONFIG_GFS2_FS=m
+-CONFIG_GFS2_FS_LOCKING_NOLOCK=m
+-CONFIG_GFS2_FS_LOCKING_DLM=m
+ CONFIG_OCFS2_FS=m
++# CONFIG_OCFS2_FS_O2CB is not set
++# CONFIG_OCFS2_FS_USERSPACE_CLUSTER is not set
+ # CONFIG_OCFS2_DEBUG_MASKLOG is not set
+ # CONFIG_OCFS2_DEBUG_FS is not set
+ CONFIG_DNOTIFY=y
+@@ -999,53 +997,82 @@ CONFIG_ASYNC_CORE=m
+ CONFIG_ASYNC_MEMCPY=m
+ CONFIG_ASYNC_XOR=m
+ CONFIG_CRYPTO=y
++
++#
++# Crypto core or helper
++#
+ CONFIG_CRYPTO_ALGAPI=y
+ CONFIG_CRYPTO_AEAD=m
+ CONFIG_CRYPTO_BLKCIPHER=m
+-CONFIG_CRYPTO_SEQIV=m
+ CONFIG_CRYPTO_HASH=y
+ CONFIG_CRYPTO_MANAGER=y
++CONFIG_CRYPTO_GF128MUL=m
++CONFIG_CRYPTO_NULL=m
++CONFIG_CRYPTO_CRYPTD=m
++CONFIG_CRYPTO_AUTHENC=m
++CONFIG_CRYPTO_TEST=m
++
++#
++# Authenticated Encryption with Associated Data
++#
++CONFIG_CRYPTO_CCM=m
++CONFIG_CRYPTO_GCM=m
++CONFIG_CRYPTO_SEQIV=m
++
++#
++# Block modes
++#
++CONFIG_CRYPTO_CBC=m
++CONFIG_CRYPTO_CTR=m
++CONFIG_CRYPTO_CTS=m
++CONFIG_CRYPTO_ECB=m
++CONFIG_CRYPTO_LRW=m
++CONFIG_CRYPTO_PCBC=m
++CONFIG_CRYPTO_XTS=m
++
++#
++# Hash modes
++#
+ CONFIG_CRYPTO_HMAC=y
+ CONFIG_CRYPTO_XCBC=m
+-CONFIG_CRYPTO_NULL=m
++
++#
++# Digest
++#
++CONFIG_CRYPTO_CRC32C=m
+ CONFIG_CRYPTO_MD4=m
+ CONFIG_CRYPTO_MD5=m
++CONFIG_CRYPTO_MICHAEL_MIC=m
+ CONFIG_CRYPTO_SHA1=m
+ CONFIG_CRYPTO_SHA256=m
+ CONFIG_CRYPTO_SHA512=m
+-CONFIG_CRYPTO_WP512=m
+ CONFIG_CRYPTO_TGR192=m
+-CONFIG_CRYPTO_GF128MUL=m
+-CONFIG_CRYPTO_ECB=m
+-CONFIG_CRYPTO_CBC=m
+-CONFIG_CRYPTO_PCBC=m
+-CONFIG_CRYPTO_LRW=m
+-CONFIG_CRYPTO_XTS=m
+-CONFIG_CRYPTO_CTR=m
+-CONFIG_CRYPTO_GCM=m
+-CONFIG_CRYPTO_CCM=m
+-CONFIG_CRYPTO_CRYPTD=m
+-CONFIG_CRYPTO_DES=m
+-CONFIG_CRYPTO_FCRYPT=m
+-CONFIG_CRYPTO_BLOWFISH=m
+-CONFIG_CRYPTO_TWOFISH=m
+-CONFIG_CRYPTO_TWOFISH_COMMON=m
+-CONFIG_CRYPTO_SERPENT=m
++CONFIG_CRYPTO_WP512=m
++
++#
++# Ciphers
++#
+ CONFIG_CRYPTO_AES=m
++CONFIG_CRYPTO_ANUBIS=m
++CONFIG_CRYPTO_ARC4=m
++CONFIG_CRYPTO_BLOWFISH=m
++CONFIG_CRYPTO_CAMELLIA=m
+ CONFIG_CRYPTO_CAST5=m
+ CONFIG_CRYPTO_CAST6=m
+-CONFIG_CRYPTO_TEA=m
+-CONFIG_CRYPTO_ARC4=m
++CONFIG_CRYPTO_DES=m
++CONFIG_CRYPTO_FCRYPT=m
+ CONFIG_CRYPTO_KHAZAD=m
+-CONFIG_CRYPTO_ANUBIS=m
+-CONFIG_CRYPTO_SEED=m
+ CONFIG_CRYPTO_SALSA20=m
++CONFIG_CRYPTO_SEED=m
++CONFIG_CRYPTO_SERPENT=m
++CONFIG_CRYPTO_TEA=m
++CONFIG_CRYPTO_TWOFISH=m
++CONFIG_CRYPTO_TWOFISH_COMMON=m
++
++#
++# Compression
++#
+ CONFIG_CRYPTO_DEFLATE=m
+-CONFIG_CRYPTO_MICHAEL_MIC=m
+-CONFIG_CRYPTO_CRC32C=m
+-CONFIG_CRYPTO_CAMELLIA=m
+-CONFIG_CRYPTO_TEST=m
+-CONFIG_CRYPTO_AUTHENC=m
+ CONFIG_CRYPTO_LZO=m
+ # CONFIG_CRYPTO_HW is not set
+ 
+@@ -1055,7 +1082,7 @@ CONFIG_CRYPTO_LZO=m
+ CONFIG_BITREVERSE=y
+ CONFIG_CRC_CCITT=m
+ CONFIG_CRC16=y
+-# CONFIG_CRC_ITU_T is not set
++CONFIG_CRC_ITU_T=m
+ CONFIG_CRC32=y
+ # CONFIG_CRC7 is not set
+ CONFIG_LIBCRC32C=m
+--- a/arch/m68k/configs/bvme6000_defconfig
++++ b/arch/m68k/configs/bvme6000_defconfig
+@@ -1,7 +1,7 @@
+ #
+ # Automatically generated make config: don't edit
+-# Linux kernel version: 2.6.25-rc8
+-# Wed Apr  2 20:46:10 2008
++# Linux kernel version: 2.6.25
++# Wed Apr 23 22:53:06 2008
+ #
+ CONFIG_M68K=y
+ CONFIG_MMU=y
+@@ -222,8 +222,10 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=m
+ CONFIG_INET6_XFRM_MODE_BEET=m
+ CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
+ CONFIG_IPV6_SIT=m
++CONFIG_IPV6_NDISC_NODETYPE=y
+ CONFIG_IPV6_TUNNEL=m
+ # CONFIG_IPV6_MULTIPLE_TABLES is not set
++# CONFIG_IPV6_MROUTE is not set
+ # CONFIG_NETWORK_SECMARK is not set
+ CONFIG_NETFILTER=y
+ # CONFIG_NETFILTER_DEBUG is not set
+@@ -239,6 +241,7 @@ CONFIG_NF_CONNTRACK=m
+ CONFIG_NF_CT_ACCT=y
+ CONFIG_NF_CONNTRACK_MARK=y
+ # CONFIG_NF_CONNTRACK_EVENTS is not set
++# CONFIG_NF_CT_PROTO_DCCP is not set
+ CONFIG_NF_CT_PROTO_GRE=m
+ CONFIG_NF_CT_PROTO_SCTP=m
+ CONFIG_NF_CT_PROTO_UDPLITE=m
+@@ -317,6 +320,8 @@ CONFIG_IP_NF_TARGET_REDIRECT=m
+ CONFIG_IP_NF_TARGET_NETMAP=m
+ CONFIG_NF_NAT_SNMP_BASIC=m
+ CONFIG_NF_NAT_PROTO_GRE=m
++CONFIG_NF_NAT_PROTO_UDPLITE=m
++CONFIG_NF_NAT_PROTO_SCTP=m
+ CONFIG_NF_NAT_FTP=m
+ CONFIG_NF_NAT_IRC=m
+ CONFIG_NF_NAT_TFTP=m
+@@ -410,8 +415,6 @@ CONFIG_IEEE80211=m
+ CONFIG_IEEE80211_CRYPT_WEP=m
+ CONFIG_IEEE80211_CRYPT_CCMP=m
+ CONFIG_IEEE80211_CRYPT_TKIP=m
+-CONFIG_IEEE80211_SOFTMAC=m
+-# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+ # CONFIG_RFKILL is not set
+ # CONFIG_NET_9P is not set
+ 
+@@ -543,6 +546,7 @@ CONFIG_BVME6000_NET=y
+ #
+ # CONFIG_WLAN_PRE80211 is not set
+ # CONFIG_WLAN_80211 is not set
++# CONFIG_IWLWIFI_LEDS is not set
+ # CONFIG_WAN is not set
+ CONFIG_PPP=m
+ # CONFIG_PPP_MULTILINK is not set
+@@ -669,6 +673,7 @@ CONFIG_SSB_POSSIBLE=y
+ # Multifunction device drivers
+ #
+ # CONFIG_MFD_SM501 is not set
++# CONFIG_HTC_PASIC3 is not set
+ 
+ #
+ # Multimedia devices
+@@ -708,10 +713,6 @@ CONFIG_HIDRAW=y
+ # CONFIG_MEMSTICK is not set
+ # CONFIG_NEW_LEDS is not set
+ # CONFIG_RTC_CLASS is not set
+-
+-#
+-# Userspace I/O
+-#
+ # CONFIG_UIO is not set
+ 
+ #
+@@ -739,16 +740,14 @@ CONFIG_JFS_FS=m
+ # CONFIG_JFS_SECURITY is not set
+ # CONFIG_JFS_DEBUG is not set
+ # CONFIG_JFS_STATISTICS is not set
+-CONFIG_FS_POSIX_ACL=y
++# CONFIG_FS_POSIX_ACL is not set
+ CONFIG_XFS_FS=m
+ # CONFIG_XFS_QUOTA is not set
+-# CONFIG_XFS_SECURITY is not set
+ # CONFIG_XFS_POSIX_ACL is not set
+ # CONFIG_XFS_RT is not set
+-CONFIG_GFS2_FS=m
+-CONFIG_GFS2_FS_LOCKING_NOLOCK=m
+-CONFIG_GFS2_FS_LOCKING_DLM=m
+ CONFIG_OCFS2_FS=m
++# CONFIG_OCFS2_FS_O2CB is not set
++# CONFIG_OCFS2_FS_USERSPACE_CLUSTER is not set
+ # CONFIG_OCFS2_DEBUG_MASKLOG is not set
+ # CONFIG_OCFS2_DEBUG_FS is not set
+ CONFIG_DNOTIFY=y
+@@ -919,53 +918,82 @@ CONFIG_ASYNC_CORE=m
+ CONFIG_ASYNC_MEMCPY=m
+ CONFIG_ASYNC_XOR=m
+ CONFIG_CRYPTO=y
++
++#
++# Crypto core or helper
++#
+ CONFIG_CRYPTO_ALGAPI=y
+ CONFIG_CRYPTO_AEAD=m
+ CONFIG_CRYPTO_BLKCIPHER=y
+-CONFIG_CRYPTO_SEQIV=m
+ CONFIG_CRYPTO_HASH=y
+ CONFIG_CRYPTO_MANAGER=y
++CONFIG_CRYPTO_GF128MUL=m
++CONFIG_CRYPTO_NULL=m
++CONFIG_CRYPTO_CRYPTD=m
++CONFIG_CRYPTO_AUTHENC=m
++CONFIG_CRYPTO_TEST=m
++
++#
++# Authenticated Encryption with Associated Data
++#
++CONFIG_CRYPTO_CCM=m
++CONFIG_CRYPTO_GCM=m
++CONFIG_CRYPTO_SEQIV=m
++
++#
++# Block modes
++#
++CONFIG_CRYPTO_CBC=y
++CONFIG_CRYPTO_CTR=m
++CONFIG_CRYPTO_CTS=m
++CONFIG_CRYPTO_ECB=m
++CONFIG_CRYPTO_LRW=m
++CONFIG_CRYPTO_PCBC=m
++CONFIG_CRYPTO_XTS=m
++
++#
++# Hash modes
++#
+ CONFIG_CRYPTO_HMAC=y
+ CONFIG_CRYPTO_XCBC=m
+-CONFIG_CRYPTO_NULL=m
++
++#
++# Digest
++#
++CONFIG_CRYPTO_CRC32C=m
+ CONFIG_CRYPTO_MD4=m
+ CONFIG_CRYPTO_MD5=y
++CONFIG_CRYPTO_MICHAEL_MIC=m
+ CONFIG_CRYPTO_SHA1=m
+ CONFIG_CRYPTO_SHA256=m
+ CONFIG_CRYPTO_SHA512=m
+-CONFIG_CRYPTO_WP512=m
+ CONFIG_CRYPTO_TGR192=m
+-CONFIG_CRYPTO_GF128MUL=m
+-CONFIG_CRYPTO_ECB=m
+-CONFIG_CRYPTO_CBC=y
+-CONFIG_CRYPTO_PCBC=m
+-CONFIG_CRYPTO_LRW=m
+-CONFIG_CRYPTO_XTS=m
+-CONFIG_CRYPTO_CTR=m
+-CONFIG_CRYPTO_GCM=m
+-CONFIG_CRYPTO_CCM=m
+-CONFIG_CRYPTO_CRYPTD=m
+-CONFIG_CRYPTO_DES=y
+-CONFIG_CRYPTO_FCRYPT=m
+-CONFIG_CRYPTO_BLOWFISH=m
+-CONFIG_CRYPTO_TWOFISH=m
+-CONFIG_CRYPTO_TWOFISH_COMMON=m
+-CONFIG_CRYPTO_SERPENT=m
++CONFIG_CRYPTO_WP512=m
++
++#
++# Ciphers
++#
+ CONFIG_CRYPTO_AES=m
++CONFIG_CRYPTO_ANUBIS=m
++CONFIG_CRYPTO_ARC4=m
++CONFIG_CRYPTO_BLOWFISH=m
++CONFIG_CRYPTO_CAMELLIA=m
+ CONFIG_CRYPTO_CAST5=m
+ CONFIG_CRYPTO_CAST6=m
+-CONFIG_CRYPTO_TEA=m
+-CONFIG_CRYPTO_ARC4=m
++CONFIG_CRYPTO_DES=y
++CONFIG_CRYPTO_FCRYPT=m
+ CONFIG_CRYPTO_KHAZAD=m
+-CONFIG_CRYPTO_ANUBIS=m
+-CONFIG_CRYPTO_SEED=m
+ CONFIG_CRYPTO_SALSA20=m
++CONFIG_CRYPTO_SEED=m
++CONFIG_CRYPTO_SERPENT=m
++CONFIG_CRYPTO_TEA=m
++CONFIG_CRYPTO_TWOFISH=m
++CONFIG_CRYPTO_TWOFISH_COMMON=m
++
++#
++# Compression
++#
+ CONFIG_CRYPTO_DEFLATE=m
+-CONFIG_CRYPTO_MICHAEL_MIC=m
+-CONFIG_CRYPTO_CRC32C=m
+-CONFIG_CRYPTO_CAMELLIA=m
+-CONFIG_CRYPTO_TEST=m
+-CONFIG_CRYPTO_AUTHENC=m
+ CONFIG_CRYPTO_LZO=m
+ # CONFIG_CRYPTO_HW is not set
+ 
+@@ -975,7 +1003,7 @@ CONFIG_CRYPTO_LZO=m
+ CONFIG_BITREVERSE=m
+ CONFIG_CRC_CCITT=m
+ CONFIG_CRC16=m
+-# CONFIG_CRC_ITU_T is not set
++CONFIG_CRC_ITU_T=m
+ CONFIG_CRC32=m
+ # CONFIG_CRC7 is not set
+ CONFIG_LIBCRC32C=m
+--- a/arch/m68k/configs/hp300_defconfig
++++ b/arch/m68k/configs/hp300_defconfig
+@@ -1,7 +1,7 @@
+ #
+ # Automatically generated make config: don't edit
+-# Linux kernel version: 2.6.25-rc8
+-# Wed Apr  2 20:46:12 2008
++# Linux kernel version: 2.6.25
++# Wed Apr 23 22:53:36 2008
+ #
+ CONFIG_M68K=y
+ CONFIG_MMU=y
+@@ -221,8 +221,10 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=m
+ CONFIG_INET6_XFRM_MODE_BEET=m
+ CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
+ CONFIG_IPV6_SIT=m
++CONFIG_IPV6_NDISC_NODETYPE=y
+ CONFIG_IPV6_TUNNEL=m
+ # CONFIG_IPV6_MULTIPLE_TABLES is not set
++# CONFIG_IPV6_MROUTE is not set
+ # CONFIG_NETWORK_SECMARK is not set
+ CONFIG_NETFILTER=y
+ # CONFIG_NETFILTER_DEBUG is not set
+@@ -238,6 +240,7 @@ CONFIG_NF_CONNTRACK=m
+ CONFIG_NF_CT_ACCT=y
+ CONFIG_NF_CONNTRACK_MARK=y
+ # CONFIG_NF_CONNTRACK_EVENTS is not set
++# CONFIG_NF_CT_PROTO_DCCP is not set
+ CONFIG_NF_CT_PROTO_GRE=m
+ CONFIG_NF_CT_PROTO_SCTP=m
+ CONFIG_NF_CT_PROTO_UDPLITE=m
+@@ -316,6 +319,8 @@ CONFIG_IP_NF_TARGET_REDIRECT=m
+ CONFIG_IP_NF_TARGET_NETMAP=m
+ CONFIG_NF_NAT_SNMP_BASIC=m
+ CONFIG_NF_NAT_PROTO_GRE=m
++CONFIG_NF_NAT_PROTO_UDPLITE=m
++CONFIG_NF_NAT_PROTO_SCTP=m
+ CONFIG_NF_NAT_FTP=m
+ CONFIG_NF_NAT_IRC=m
+ CONFIG_NF_NAT_TFTP=m
+@@ -409,8 +414,6 @@ CONFIG_IEEE80211=m
+ CONFIG_IEEE80211_CRYPT_WEP=m
+ CONFIG_IEEE80211_CRYPT_CCMP=m
+ CONFIG_IEEE80211_CRYPT_TKIP=m
+-CONFIG_IEEE80211_SOFTMAC=m
+-# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+ # CONFIG_RFKILL is not set
+ # CONFIG_NET_9P is not set
+ 
+@@ -540,6 +543,7 @@ CONFIG_HPLANCE=y
+ #
+ # CONFIG_WLAN_PRE80211 is not set
+ # CONFIG_WLAN_80211 is not set
++# CONFIG_IWLWIFI_LEDS is not set
+ # CONFIG_WAN is not set
+ CONFIG_PPP=m
+ # CONFIG_PPP_MULTILINK is not set
+@@ -674,6 +678,7 @@ CONFIG_SSB_POSSIBLE=y
+ # Multifunction device drivers
+ #
+ # CONFIG_MFD_SM501 is not set
++# CONFIG_HTC_PASIC3 is not set
+ 
+ #
+ # Multimedia devices
+@@ -690,7 +695,7 @@ CONFIG_SSB_POSSIBLE=y
+ CONFIG_FB=y
+ # CONFIG_FIRMWARE_EDID is not set
+ # CONFIG_FB_DDC is not set
+-CONFIG_FB_CFB_FILLRECT=y
++# CONFIG_FB_CFB_FILLRECT is not set
+ # CONFIG_FB_CFB_COPYAREA is not set
+ CONFIG_FB_CFB_IMAGEBLIT=y
+ # CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+@@ -747,10 +752,6 @@ CONFIG_HIDRAW=y
+ # CONFIG_MEMSTICK is not set
+ # CONFIG_NEW_LEDS is not set
+ # CONFIG_RTC_CLASS is not set
+-
+-#
+-# Userspace I/O
+-#
+ # CONFIG_UIO is not set
+ 
+ #
+@@ -776,16 +777,14 @@ CONFIG_JFS_FS=m
+ # CONFIG_JFS_SECURITY is not set
+ # CONFIG_JFS_DEBUG is not set
+ # CONFIG_JFS_STATISTICS is not set
+-CONFIG_FS_POSIX_ACL=y
++# CONFIG_FS_POSIX_ACL is not set
+ CONFIG_XFS_FS=m
+ # CONFIG_XFS_QUOTA is not set
+-# CONFIG_XFS_SECURITY is not set
+ # CONFIG_XFS_POSIX_ACL is not set
+ # CONFIG_XFS_RT is not set
+-CONFIG_GFS2_FS=m
+-CONFIG_GFS2_FS_LOCKING_NOLOCK=m
+-CONFIG_GFS2_FS_LOCKING_DLM=m
+ CONFIG_OCFS2_FS=m
++# CONFIG_OCFS2_FS_O2CB is not set
++# CONFIG_OCFS2_FS_USERSPACE_CLUSTER is not set
+ # CONFIG_OCFS2_DEBUG_MASKLOG is not set
+ # CONFIG_OCFS2_DEBUG_FS is not set
+ CONFIG_DNOTIFY=y
+@@ -955,53 +954,82 @@ CONFIG_ASYNC_CORE=m
+ CONFIG_ASYNC_MEMCPY=m
+ CONFIG_ASYNC_XOR=m
+ CONFIG_CRYPTO=y
++
++#
++# Crypto core or helper
++#
+ CONFIG_CRYPTO_ALGAPI=y
+ CONFIG_CRYPTO_AEAD=m
+ CONFIG_CRYPTO_BLKCIPHER=y
+-CONFIG_CRYPTO_SEQIV=m
+ CONFIG_CRYPTO_HASH=y
+ CONFIG_CRYPTO_MANAGER=y
++CONFIG_CRYPTO_GF128MUL=m
++CONFIG_CRYPTO_NULL=m
++CONFIG_CRYPTO_CRYPTD=m
++CONFIG_CRYPTO_AUTHENC=m
++CONFIG_CRYPTO_TEST=m
++
++#
++# Authenticated Encryption with Associated Data
++#
++CONFIG_CRYPTO_CCM=m
++CONFIG_CRYPTO_GCM=m
++CONFIG_CRYPTO_SEQIV=m
++
++#
++# Block modes
++#
++CONFIG_CRYPTO_CBC=y
++CONFIG_CRYPTO_CTR=m
++CONFIG_CRYPTO_CTS=m
++CONFIG_CRYPTO_ECB=m
++CONFIG_CRYPTO_LRW=m
++CONFIG_CRYPTO_PCBC=m
++CONFIG_CRYPTO_XTS=m
++
++#
++# Hash modes
++#
+ CONFIG_CRYPTO_HMAC=y
+ CONFIG_CRYPTO_XCBC=m
+-CONFIG_CRYPTO_NULL=m
++
++#
++# Digest
++#
++CONFIG_CRYPTO_CRC32C=m
+ CONFIG_CRYPTO_MD4=m
+ CONFIG_CRYPTO_MD5=y
++CONFIG_CRYPTO_MICHAEL_MIC=m
+ CONFIG_CRYPTO_SHA1=m
+ CONFIG_CRYPTO_SHA256=m
+ CONFIG_CRYPTO_SHA512=m
+-CONFIG_CRYPTO_WP512=m
+ CONFIG_CRYPTO_TGR192=m
+-CONFIG_CRYPTO_GF128MUL=m
+-CONFIG_CRYPTO_ECB=m
+-CONFIG_CRYPTO_CBC=y
+-CONFIG_CRYPTO_PCBC=m
+-CONFIG_CRYPTO_LRW=m
+-CONFIG_CRYPTO_XTS=m
+-CONFIG_CRYPTO_CTR=m
+-CONFIG_CRYPTO_GCM=m
+-CONFIG_CRYPTO_CCM=m
+-CONFIG_CRYPTO_CRYPTD=m
+-CONFIG_CRYPTO_DES=y
+-CONFIG_CRYPTO_FCRYPT=m
+-CONFIG_CRYPTO_BLOWFISH=m
+-CONFIG_CRYPTO_TWOFISH=m
+-CONFIG_CRYPTO_TWOFISH_COMMON=m
+-CONFIG_CRYPTO_SERPENT=m
++CONFIG_CRYPTO_WP512=m
++
++#
++# Ciphers
++#
+ CONFIG_CRYPTO_AES=m
++CONFIG_CRYPTO_ANUBIS=m
++CONFIG_CRYPTO_ARC4=m
++CONFIG_CRYPTO_BLOWFISH=m
++CONFIG_CRYPTO_CAMELLIA=m
+ CONFIG_CRYPTO_CAST5=m
+ CONFIG_CRYPTO_CAST6=m
+-CONFIG_CRYPTO_TEA=m
+-CONFIG_CRYPTO_ARC4=m
++CONFIG_CRYPTO_DES=y
++CONFIG_CRYPTO_FCRYPT=m
+ CONFIG_CRYPTO_KHAZAD=m
+-CONFIG_CRYPTO_ANUBIS=m
+-CONFIG_CRYPTO_SEED=m
+ CONFIG_CRYPTO_SALSA20=m
++CONFIG_CRYPTO_SEED=m
++CONFIG_CRYPTO_SERPENT=m
++CONFIG_CRYPTO_TEA=m
++CONFIG_CRYPTO_TWOFISH=m
++CONFIG_CRYPTO_TWOFISH_COMMON=m
++
++#
++# Compression
++#
+ CONFIG_CRYPTO_DEFLATE=m
+-CONFIG_CRYPTO_MICHAEL_MIC=m
+-CONFIG_CRYPTO_CRC32C=m
+-CONFIG_CRYPTO_CAMELLIA=m
+-CONFIG_CRYPTO_TEST=m
+-CONFIG_CRYPTO_AUTHENC=m
+ CONFIG_CRYPTO_LZO=m
+ # CONFIG_CRYPTO_HW is not set
+ 
+@@ -1011,7 +1039,7 @@ CONFIG_CRYPTO_LZO=m
+ CONFIG_BITREVERSE=y
+ CONFIG_CRC_CCITT=m
+ CONFIG_CRC16=m
+-# CONFIG_CRC_ITU_T is not set
++CONFIG_CRC_ITU_T=m
+ CONFIG_CRC32=y
+ # CONFIG_CRC7 is not set
+ CONFIG_LIBCRC32C=m
+--- a/arch/m68k/configs/mac_defconfig
++++ b/arch/m68k/configs/mac_defconfig
+@@ -1,7 +1,7 @@
+ #
+ # Automatically generated make config: don't edit
+-# Linux kernel version: 2.6.25-rc8
+-# Wed Apr  2 20:46:14 2008
++# Linux kernel version: 2.6.25
++# Wed Apr 23 22:54:06 2008
+ #
+ CONFIG_M68K=y
+ CONFIG_MMU=y
+@@ -219,8 +219,10 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=m
+ CONFIG_INET6_XFRM_MODE_BEET=m
+ CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
+ CONFIG_IPV6_SIT=m
++CONFIG_IPV6_NDISC_NODETYPE=y
+ CONFIG_IPV6_TUNNEL=m
+ # CONFIG_IPV6_MULTIPLE_TABLES is not set
++# CONFIG_IPV6_MROUTE is not set
+ # CONFIG_NETWORK_SECMARK is not set
+ CONFIG_NETFILTER=y
+ # CONFIG_NETFILTER_DEBUG is not set
+@@ -236,6 +238,7 @@ CONFIG_NF_CONNTRACK=m
+ CONFIG_NF_CT_ACCT=y
+ CONFIG_NF_CONNTRACK_MARK=y
+ # CONFIG_NF_CONNTRACK_EVENTS is not set
++# CONFIG_NF_CT_PROTO_DCCP is not set
+ CONFIG_NF_CT_PROTO_GRE=m
+ CONFIG_NF_CT_PROTO_SCTP=m
+ CONFIG_NF_CT_PROTO_UDPLITE=m
+@@ -314,6 +317,8 @@ CONFIG_IP_NF_TARGET_REDIRECT=m
+ CONFIG_IP_NF_TARGET_NETMAP=m
+ CONFIG_NF_NAT_SNMP_BASIC=m
+ CONFIG_NF_NAT_PROTO_GRE=m
++CONFIG_NF_NAT_PROTO_UDPLITE=m
++CONFIG_NF_NAT_PROTO_SCTP=m
+ CONFIG_NF_NAT_FTP=m
+ CONFIG_NF_NAT_IRC=m
+ CONFIG_NF_NAT_TFTP=m
+@@ -410,8 +415,6 @@ CONFIG_IEEE80211=m
+ CONFIG_IEEE80211_CRYPT_WEP=m
+ CONFIG_IEEE80211_CRYPT_CCMP=m
+ CONFIG_IEEE80211_CRYPT_TKIP=m
+-CONFIG_IEEE80211_SOFTMAC=m
+-# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+ # CONFIG_RFKILL is not set
+ # CONFIG_NET_9P is not set
+ 
+@@ -467,11 +470,10 @@ CONFIG_IDE_PROC_FS=y
+ #
+ # IDE chipset support/bugfixes
+ #
+-# CONFIG_IDE_GENERIC is not set
+ # CONFIG_BLK_DEV_PLATFORM is not set
+ CONFIG_BLK_DEV_MAC_IDE=y
+ # CONFIG_BLK_DEV_IDEDMA is not set
+-# CONFIG_IDE_ARCH_OBSOLETE_INIT is not set
++# CONFIG_BLK_DEV_HD_ONLY is not set
+ # CONFIG_BLK_DEV_HD is not set
+ 
+ #
+@@ -580,6 +582,7 @@ CONFIG_MACMACE=y
+ #
+ # CONFIG_WLAN_PRE80211 is not set
+ # CONFIG_WLAN_80211 is not set
++# CONFIG_IWLWIFI_LEDS is not set
+ # CONFIG_WAN is not set
+ CONFIG_PPP=m
+ # CONFIG_PPP_MULTILINK is not set
+@@ -708,6 +711,7 @@ CONFIG_SSB_POSSIBLE=y
+ # Multifunction device drivers
+ #
+ # CONFIG_MFD_SM501 is not set
++# CONFIG_HTC_PASIC3 is not set
+ 
+ #
+ # Multimedia devices
+@@ -784,10 +788,6 @@ CONFIG_HIDRAW=y
+ # CONFIG_MEMSTICK is not set
+ # CONFIG_NEW_LEDS is not set
+ # CONFIG_RTC_CLASS is not set
+-
+-#
+-# Userspace I/O
+-#
+ # CONFIG_UIO is not set
+ 
+ #
+@@ -816,16 +816,14 @@ CONFIG_JFS_FS=m
+ # CONFIG_JFS_SECURITY is not set
+ # CONFIG_JFS_DEBUG is not set
+ # CONFIG_JFS_STATISTICS is not set
+-CONFIG_FS_POSIX_ACL=y
++# CONFIG_FS_POSIX_ACL is not set
+ CONFIG_XFS_FS=m
+ # CONFIG_XFS_QUOTA is not set
+-# CONFIG_XFS_SECURITY is not set
+ # CONFIG_XFS_POSIX_ACL is not set
+ # CONFIG_XFS_RT is not set
+-CONFIG_GFS2_FS=m
+-CONFIG_GFS2_FS_LOCKING_NOLOCK=m
+-CONFIG_GFS2_FS_LOCKING_DLM=m
+ CONFIG_OCFS2_FS=m
++# CONFIG_OCFS2_FS_O2CB is not set
++# CONFIG_OCFS2_FS_USERSPACE_CLUSTER is not set
+ # CONFIG_OCFS2_DEBUG_MASKLOG is not set
+ # CONFIG_OCFS2_DEBUG_FS is not set
+ CONFIG_DNOTIFY=y
+@@ -995,53 +993,82 @@ CONFIG_ASYNC_CORE=m
+ CONFIG_ASYNC_MEMCPY=m
+ CONFIG_ASYNC_XOR=m
+ CONFIG_CRYPTO=y
++
++#
++# Crypto core or helper
++#
+ CONFIG_CRYPTO_ALGAPI=y
+ CONFIG_CRYPTO_AEAD=m
+ CONFIG_CRYPTO_BLKCIPHER=m
+-CONFIG_CRYPTO_SEQIV=m
+ CONFIG_CRYPTO_HASH=y
+ CONFIG_CRYPTO_MANAGER=y
++CONFIG_CRYPTO_GF128MUL=m
++CONFIG_CRYPTO_NULL=m
++CONFIG_CRYPTO_CRYPTD=m
++CONFIG_CRYPTO_AUTHENC=m
++CONFIG_CRYPTO_TEST=m
++
++#
++# Authenticated Encryption with Associated Data
++#
++CONFIG_CRYPTO_CCM=m
++CONFIG_CRYPTO_GCM=m
++CONFIG_CRYPTO_SEQIV=m
++
++#
++# Block modes
++#
++CONFIG_CRYPTO_CBC=m
++CONFIG_CRYPTO_CTR=m
++CONFIG_CRYPTO_CTS=m
++CONFIG_CRYPTO_ECB=m
++CONFIG_CRYPTO_LRW=m
++CONFIG_CRYPTO_PCBC=m
++CONFIG_CRYPTO_XTS=m
++
++#
++# Hash modes
++#
+ CONFIG_CRYPTO_HMAC=y
+ CONFIG_CRYPTO_XCBC=m
+-CONFIG_CRYPTO_NULL=m
++
++#
++# Digest
++#
++CONFIG_CRYPTO_CRC32C=m
+ CONFIG_CRYPTO_MD4=m
+ CONFIG_CRYPTO_MD5=m
++CONFIG_CRYPTO_MICHAEL_MIC=m
+ CONFIG_CRYPTO_SHA1=m
+ CONFIG_CRYPTO_SHA256=m
+ CONFIG_CRYPTO_SHA512=m
+-CONFIG_CRYPTO_WP512=m
+ CONFIG_CRYPTO_TGR192=m
+-CONFIG_CRYPTO_GF128MUL=m
+-CONFIG_CRYPTO_ECB=m
+-CONFIG_CRYPTO_CBC=m
+-CONFIG_CRYPTO_PCBC=m
+-CONFIG_CRYPTO_LRW=m
+-CONFIG_CRYPTO_XTS=m
+-CONFIG_CRYPTO_CTR=m
+-CONFIG_CRYPTO_GCM=m
+-CONFIG_CRYPTO_CCM=m
+-CONFIG_CRYPTO_CRYPTD=m
+-CONFIG_CRYPTO_DES=m
+-CONFIG_CRYPTO_FCRYPT=m
+-CONFIG_CRYPTO_BLOWFISH=m
+-CONFIG_CRYPTO_TWOFISH=m
+-CONFIG_CRYPTO_TWOFISH_COMMON=m
+-CONFIG_CRYPTO_SERPENT=m
++CONFIG_CRYPTO_WP512=m
++
++#
++# Ciphers
++#
+ CONFIG_CRYPTO_AES=m
++CONFIG_CRYPTO_ANUBIS=m
++CONFIG_CRYPTO_ARC4=m
++CONFIG_CRYPTO_BLOWFISH=m
++CONFIG_CRYPTO_CAMELLIA=m
+ CONFIG_CRYPTO_CAST5=m
+ CONFIG_CRYPTO_CAST6=m
+-CONFIG_CRYPTO_TEA=m
+-CONFIG_CRYPTO_ARC4=m
++CONFIG_CRYPTO_DES=m
++CONFIG_CRYPTO_FCRYPT=m
+ CONFIG_CRYPTO_KHAZAD=m
+-CONFIG_CRYPTO_ANUBIS=m
+-CONFIG_CRYPTO_SEED=m
+ CONFIG_CRYPTO_SALSA20=m
++CONFIG_CRYPTO_SEED=m
++CONFIG_CRYPTO_SERPENT=m
++CONFIG_CRYPTO_TEA=m
++CONFIG_CRYPTO_TWOFISH=m
++CONFIG_CRYPTO_TWOFISH_COMMON=m
++
++#
++# Compression
++#
+ CONFIG_CRYPTO_DEFLATE=m
+-CONFIG_CRYPTO_MICHAEL_MIC=m
+-CONFIG_CRYPTO_CRC32C=m
+-CONFIG_CRYPTO_CAMELLIA=m
+-CONFIG_CRYPTO_TEST=m
+-CONFIG_CRYPTO_AUTHENC=m
+ CONFIG_CRYPTO_LZO=m
+ # CONFIG_CRYPTO_HW is not set
+ 
+@@ -1051,7 +1078,7 @@ CONFIG_CRYPTO_LZO=m
+ CONFIG_BITREVERSE=y
+ CONFIG_CRC_CCITT=m
+ CONFIG_CRC16=m
+-# CONFIG_CRC_ITU_T is not set
++CONFIG_CRC_ITU_T=m
+ CONFIG_CRC32=y
+ # CONFIG_CRC7 is not set
+ CONFIG_LIBCRC32C=m
+--- a/arch/m68k/configs/mvme147_defconfig
++++ b/arch/m68k/configs/mvme147_defconfig
+@@ -1,7 +1,7 @@
+ #
+ # Automatically generated make config: don't edit
+-# Linux kernel version: 2.6.25-rc8
+-# Wed Apr  2 20:46:17 2008
++# Linux kernel version: 2.6.25
++# Wed Apr 23 22:54:29 2008
+ #
+ CONFIG_M68K=y
+ CONFIG_MMU=y
+@@ -222,8 +222,10 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=m
+ CONFIG_INET6_XFRM_MODE_BEET=m
+ CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
+ CONFIG_IPV6_SIT=m
++CONFIG_IPV6_NDISC_NODETYPE=y
+ CONFIG_IPV6_TUNNEL=m
+ # CONFIG_IPV6_MULTIPLE_TABLES is not set
++# CONFIG_IPV6_MROUTE is not set
+ # CONFIG_NETWORK_SECMARK is not set
+ CONFIG_NETFILTER=y
+ # CONFIG_NETFILTER_DEBUG is not set
+@@ -239,6 +241,7 @@ CONFIG_NF_CONNTRACK=m
+ CONFIG_NF_CT_ACCT=y
+ CONFIG_NF_CONNTRACK_MARK=y
+ # CONFIG_NF_CONNTRACK_EVENTS is not set
++# CONFIG_NF_CT_PROTO_DCCP is not set
+ CONFIG_NF_CT_PROTO_GRE=m
+ CONFIG_NF_CT_PROTO_SCTP=m
+ CONFIG_NF_CT_PROTO_UDPLITE=m
+@@ -317,6 +320,8 @@ CONFIG_IP_NF_TARGET_REDIRECT=m
+ CONFIG_IP_NF_TARGET_NETMAP=m
+ CONFIG_NF_NAT_SNMP_BASIC=m
+ CONFIG_NF_NAT_PROTO_GRE=m
++CONFIG_NF_NAT_PROTO_UDPLITE=m
++CONFIG_NF_NAT_PROTO_SCTP=m
+ CONFIG_NF_NAT_FTP=m
+ CONFIG_NF_NAT_IRC=m
+ CONFIG_NF_NAT_TFTP=m
+@@ -410,8 +415,6 @@ CONFIG_IEEE80211=m
+ CONFIG_IEEE80211_CRYPT_WEP=m
+ CONFIG_IEEE80211_CRYPT_CCMP=m
+ CONFIG_IEEE80211_CRYPT_TKIP=m
+-CONFIG_IEEE80211_SOFTMAC=m
+-# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+ # CONFIG_RFKILL is not set
+ # CONFIG_NET_9P is not set
+ 
+@@ -542,6 +545,7 @@ CONFIG_MVME147_NET=y
+ #
+ # CONFIG_WLAN_PRE80211 is not set
+ # CONFIG_WLAN_80211 is not set
++# CONFIG_IWLWIFI_LEDS is not set
+ # CONFIG_WAN is not set
+ CONFIG_PPP=m
+ # CONFIG_PPP_MULTILINK is not set
+@@ -668,6 +672,7 @@ CONFIG_SSB_POSSIBLE=y
+ # Multifunction device drivers
+ #
+ # CONFIG_MFD_SM501 is not set
++# CONFIG_HTC_PASIC3 is not set
+ 
+ #
+ # Multimedia devices
+@@ -707,10 +712,6 @@ CONFIG_HIDRAW=y
+ # CONFIG_MEMSTICK is not set
+ # CONFIG_NEW_LEDS is not set
+ # CONFIG_RTC_CLASS is not set
+-
+-#
+-# Userspace I/O
+-#
+ # CONFIG_UIO is not set
+ 
+ #
+@@ -738,16 +739,14 @@ CONFIG_JFS_FS=m
+ # CONFIG_JFS_SECURITY is not set
+ # CONFIG_JFS_DEBUG is not set
+ # CONFIG_JFS_STATISTICS is not set
+-CONFIG_FS_POSIX_ACL=y
++# CONFIG_FS_POSIX_ACL is not set
+ CONFIG_XFS_FS=m
+ # CONFIG_XFS_QUOTA is not set
+-# CONFIG_XFS_SECURITY is not set
+ # CONFIG_XFS_POSIX_ACL is not set
+ # CONFIG_XFS_RT is not set
+-CONFIG_GFS2_FS=m
+-CONFIG_GFS2_FS_LOCKING_NOLOCK=m
+-CONFIG_GFS2_FS_LOCKING_DLM=m
+ CONFIG_OCFS2_FS=m
++# CONFIG_OCFS2_FS_O2CB is not set
++# CONFIG_OCFS2_FS_USERSPACE_CLUSTER is not set
+ # CONFIG_OCFS2_DEBUG_MASKLOG is not set
+ # CONFIG_OCFS2_DEBUG_FS is not set
+ CONFIG_DNOTIFY=y
+@@ -918,53 +917,82 @@ CONFIG_ASYNC_CORE=m
+ CONFIG_ASYNC_MEMCPY=m
+ CONFIG_ASYNC_XOR=m
+ CONFIG_CRYPTO=y
++
++#
++# Crypto core or helper
++#
+ CONFIG_CRYPTO_ALGAPI=y
+ CONFIG_CRYPTO_AEAD=m
+ CONFIG_CRYPTO_BLKCIPHER=y
+-CONFIG_CRYPTO_SEQIV=m
+ CONFIG_CRYPTO_HASH=y
+ CONFIG_CRYPTO_MANAGER=y
++CONFIG_CRYPTO_GF128MUL=m
++CONFIG_CRYPTO_NULL=m
++CONFIG_CRYPTO_CRYPTD=m
++CONFIG_CRYPTO_AUTHENC=m
++CONFIG_CRYPTO_TEST=m
++
++#
++# Authenticated Encryption with Associated Data
++#
++CONFIG_CRYPTO_CCM=m
++CONFIG_CRYPTO_GCM=m
++CONFIG_CRYPTO_SEQIV=m
++
++#
++# Block modes
++#
++CONFIG_CRYPTO_CBC=y
++CONFIG_CRYPTO_CTR=m
++CONFIG_CRYPTO_CTS=m
++CONFIG_CRYPTO_ECB=m
++CONFIG_CRYPTO_LRW=m
++CONFIG_CRYPTO_PCBC=m
++CONFIG_CRYPTO_XTS=m
++
++#
++# Hash modes
++#
+ CONFIG_CRYPTO_HMAC=y
+ CONFIG_CRYPTO_XCBC=m
+-CONFIG_CRYPTO_NULL=m
++
++#
++# Digest
++#
++CONFIG_CRYPTO_CRC32C=m
+ CONFIG_CRYPTO_MD4=m
+ CONFIG_CRYPTO_MD5=y
++CONFIG_CRYPTO_MICHAEL_MIC=m
+ CONFIG_CRYPTO_SHA1=m
+ CONFIG_CRYPTO_SHA256=m
+ CONFIG_CRYPTO_SHA512=m
+-CONFIG_CRYPTO_WP512=m
+ CONFIG_CRYPTO_TGR192=m
+-CONFIG_CRYPTO_GF128MUL=m
+-CONFIG_CRYPTO_ECB=m
+-CONFIG_CRYPTO_CBC=y
+-CONFIG_CRYPTO_PCBC=m
+-CONFIG_CRYPTO_LRW=m
+-CONFIG_CRYPTO_XTS=m
+-CONFIG_CRYPTO_CTR=m
+-CONFIG_CRYPTO_GCM=m
+-CONFIG_CRYPTO_CCM=m
+-CONFIG_CRYPTO_CRYPTD=m
+-CONFIG_CRYPTO_DES=y
+-CONFIG_CRYPTO_FCRYPT=m
+-CONFIG_CRYPTO_BLOWFISH=m
+-CONFIG_CRYPTO_TWOFISH=m
+-CONFIG_CRYPTO_TWOFISH_COMMON=m
+-CONFIG_CRYPTO_SERPENT=m
++CONFIG_CRYPTO_WP512=m
++
++#
++# Ciphers
++#
+ CONFIG_CRYPTO_AES=m
++CONFIG_CRYPTO_ANUBIS=m
++CONFIG_CRYPTO_ARC4=m
++CONFIG_CRYPTO_BLOWFISH=m
++CONFIG_CRYPTO_CAMELLIA=m
+ CONFIG_CRYPTO_CAST5=m
+ CONFIG_CRYPTO_CAST6=m
+-CONFIG_CRYPTO_TEA=m
+-CONFIG_CRYPTO_ARC4=m
++CONFIG_CRYPTO_DES=y
++CONFIG_CRYPTO_FCRYPT=m
+ CONFIG_CRYPTO_KHAZAD=m
+-CONFIG_CRYPTO_ANUBIS=m
+-CONFIG_CRYPTO_SEED=m
+ CONFIG_CRYPTO_SALSA20=m
++CONFIG_CRYPTO_SEED=m
++CONFIG_CRYPTO_SERPENT=m
++CONFIG_CRYPTO_TEA=m
++CONFIG_CRYPTO_TWOFISH=m
++CONFIG_CRYPTO_TWOFISH_COMMON=m
++
++#
++# Compression
++#
+ CONFIG_CRYPTO_DEFLATE=m
+-CONFIG_CRYPTO_MICHAEL_MIC=m
+-CONFIG_CRYPTO_CRC32C=m
+-CONFIG_CRYPTO_CAMELLIA=m
+-CONFIG_CRYPTO_TEST=m
+-CONFIG_CRYPTO_AUTHENC=m
+ CONFIG_CRYPTO_LZO=m
+ # CONFIG_CRYPTO_HW is not set
+ 
+@@ -974,7 +1002,7 @@ CONFIG_CRYPTO_LZO=m
+ CONFIG_BITREVERSE=y
+ CONFIG_CRC_CCITT=m
+ CONFIG_CRC16=m
+-# CONFIG_CRC_ITU_T is not set
++CONFIG_CRC_ITU_T=m
+ CONFIG_CRC32=y
+ # CONFIG_CRC7 is not set
+ CONFIG_LIBCRC32C=m
+--- a/arch/m68k/configs/mvme16x_defconfig
++++ b/arch/m68k/configs/mvme16x_defconfig
+@@ -1,7 +1,7 @@
+ #
+ # Automatically generated make config: don't edit
+-# Linux kernel version: 2.6.25-rc8
+-# Wed Apr  2 20:46:19 2008
++# Linux kernel version: 2.6.25
++# Wed Apr 23 22:54:50 2008
+ #
+ CONFIG_M68K=y
+ CONFIG_MMU=y
+@@ -222,8 +222,10 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=m
+ CONFIG_INET6_XFRM_MODE_BEET=m
+ CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
+ CONFIG_IPV6_SIT=m
++CONFIG_IPV6_NDISC_NODETYPE=y
+ CONFIG_IPV6_TUNNEL=m
+ # CONFIG_IPV6_MULTIPLE_TABLES is not set
++# CONFIG_IPV6_MROUTE is not set
+ # CONFIG_NETWORK_SECMARK is not set
+ CONFIG_NETFILTER=y
+ # CONFIG_NETFILTER_DEBUG is not set
+@@ -239,6 +241,7 @@ CONFIG_NF_CONNTRACK=m
+ CONFIG_NF_CT_ACCT=y
+ CONFIG_NF_CONNTRACK_MARK=y
+ # CONFIG_NF_CONNTRACK_EVENTS is not set
++# CONFIG_NF_CT_PROTO_DCCP is not set
+ CONFIG_NF_CT_PROTO_GRE=m
+ CONFIG_NF_CT_PROTO_SCTP=m
+ CONFIG_NF_CT_PROTO_UDPLITE=m
+@@ -317,6 +320,8 @@ CONFIG_IP_NF_TARGET_REDIRECT=m
+ CONFIG_IP_NF_TARGET_NETMAP=m
+ CONFIG_NF_NAT_SNMP_BASIC=m
+ CONFIG_NF_NAT_PROTO_GRE=m
++CONFIG_NF_NAT_PROTO_UDPLITE=m
++CONFIG_NF_NAT_PROTO_SCTP=m
+ CONFIG_NF_NAT_FTP=m
+ CONFIG_NF_NAT_IRC=m
+ CONFIG_NF_NAT_TFTP=m
+@@ -410,8 +415,6 @@ CONFIG_IEEE80211=m
+ CONFIG_IEEE80211_CRYPT_WEP=m
+ CONFIG_IEEE80211_CRYPT_CCMP=m
+ CONFIG_IEEE80211_CRYPT_TKIP=m
+-CONFIG_IEEE80211_SOFTMAC=m
+-# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+ # CONFIG_RFKILL is not set
+ # CONFIG_NET_9P is not set
+ 
+@@ -543,6 +546,7 @@ CONFIG_MVME16x_NET=y
+ #
+ # CONFIG_WLAN_PRE80211 is not set
+ # CONFIG_WLAN_80211 is not set
++# CONFIG_IWLWIFI_LEDS is not set
+ # CONFIG_WAN is not set
+ CONFIG_PPP=m
+ # CONFIG_PPP_MULTILINK is not set
+@@ -669,6 +673,7 @@ CONFIG_SSB_POSSIBLE=y
+ # Multifunction device drivers
+ #
+ # CONFIG_MFD_SM501 is not set
++# CONFIG_HTC_PASIC3 is not set
+ 
+ #
+ # Multimedia devices
+@@ -708,10 +713,6 @@ CONFIG_HIDRAW=y
+ # CONFIG_MEMSTICK is not set
+ # CONFIG_NEW_LEDS is not set
+ # CONFIG_RTC_CLASS is not set
+-
+-#
+-# Userspace I/O
+-#
+ # CONFIG_UIO is not set
+ 
+ #
+@@ -740,16 +741,14 @@ CONFIG_JFS_FS=m
+ # CONFIG_JFS_SECURITY is not set
+ # CONFIG_JFS_DEBUG is not set
+ # CONFIG_JFS_STATISTICS is not set
+-CONFIG_FS_POSIX_ACL=y
++# CONFIG_FS_POSIX_ACL is not set
+ CONFIG_XFS_FS=m
+ # CONFIG_XFS_QUOTA is not set
+-# CONFIG_XFS_SECURITY is not set
+ # CONFIG_XFS_POSIX_ACL is not set
+ # CONFIG_XFS_RT is not set
+-CONFIG_GFS2_FS=m
+-CONFIG_GFS2_FS_LOCKING_NOLOCK=m
+-CONFIG_GFS2_FS_LOCKING_DLM=m
+ CONFIG_OCFS2_FS=m
++# CONFIG_OCFS2_FS_O2CB is not set
++# CONFIG_OCFS2_FS_USERSPACE_CLUSTER is not set
+ # CONFIG_OCFS2_DEBUG_MASKLOG is not set
+ # CONFIG_OCFS2_DEBUG_FS is not set
+ CONFIG_DNOTIFY=y
+@@ -920,53 +919,82 @@ CONFIG_ASYNC_CORE=m
+ CONFIG_ASYNC_MEMCPY=m
+ CONFIG_ASYNC_XOR=m
+ CONFIG_CRYPTO=y
++
++#
++# Crypto core or helper
++#
+ CONFIG_CRYPTO_ALGAPI=y
+ CONFIG_CRYPTO_AEAD=m
+ CONFIG_CRYPTO_BLKCIPHER=y
+-CONFIG_CRYPTO_SEQIV=m
+ CONFIG_CRYPTO_HASH=y
+ CONFIG_CRYPTO_MANAGER=y
++CONFIG_CRYPTO_GF128MUL=m
++CONFIG_CRYPTO_NULL=m
++CONFIG_CRYPTO_CRYPTD=m
++CONFIG_CRYPTO_AUTHENC=m
++CONFIG_CRYPTO_TEST=m
++
++#
++# Authenticated Encryption with Associated Data
++#
++CONFIG_CRYPTO_CCM=m
++CONFIG_CRYPTO_GCM=m
++CONFIG_CRYPTO_SEQIV=m
++
++#
++# Block modes
++#
++CONFIG_CRYPTO_CBC=y
++CONFIG_CRYPTO_CTR=m
++CONFIG_CRYPTO_CTS=m
++CONFIG_CRYPTO_ECB=m
++CONFIG_CRYPTO_LRW=m
++CONFIG_CRYPTO_PCBC=m
++CONFIG_CRYPTO_XTS=m
++
++#
++# Hash modes
++#
+ CONFIG_CRYPTO_HMAC=y
+ CONFIG_CRYPTO_XCBC=m
+-CONFIG_CRYPTO_NULL=m
++
++#
++# Digest
++#
++CONFIG_CRYPTO_CRC32C=m
+ CONFIG_CRYPTO_MD4=m
+ CONFIG_CRYPTO_MD5=y
++CONFIG_CRYPTO_MICHAEL_MIC=m
+ CONFIG_CRYPTO_SHA1=m
+ CONFIG_CRYPTO_SHA256=m
+ CONFIG_CRYPTO_SHA512=m
+-CONFIG_CRYPTO_WP512=m
+ CONFIG_CRYPTO_TGR192=m
+-CONFIG_CRYPTO_GF128MUL=m
+-CONFIG_CRYPTO_ECB=m
+-CONFIG_CRYPTO_CBC=y
+-CONFIG_CRYPTO_PCBC=m
+-CONFIG_CRYPTO_LRW=m
+-CONFIG_CRYPTO_XTS=m
+-CONFIG_CRYPTO_CTR=m
+-CONFIG_CRYPTO_GCM=m
+-CONFIG_CRYPTO_CCM=m
+-CONFIG_CRYPTO_CRYPTD=m
+-CONFIG_CRYPTO_DES=y
+-CONFIG_CRYPTO_FCRYPT=m
+-CONFIG_CRYPTO_BLOWFISH=m
+-CONFIG_CRYPTO_TWOFISH=m
+-CONFIG_CRYPTO_TWOFISH_COMMON=m
+-CONFIG_CRYPTO_SERPENT=m
++CONFIG_CRYPTO_WP512=m
++
++#
++# Ciphers
++#
+ CONFIG_CRYPTO_AES=m
++CONFIG_CRYPTO_ANUBIS=m
++CONFIG_CRYPTO_ARC4=m
++CONFIG_CRYPTO_BLOWFISH=m
++CONFIG_CRYPTO_CAMELLIA=m
+ CONFIG_CRYPTO_CAST5=m
+ CONFIG_CRYPTO_CAST6=m
+-CONFIG_CRYPTO_TEA=m
+-CONFIG_CRYPTO_ARC4=m
++CONFIG_CRYPTO_DES=y
++CONFIG_CRYPTO_FCRYPT=m
+ CONFIG_CRYPTO_KHAZAD=m
+-CONFIG_CRYPTO_ANUBIS=m
+-CONFIG_CRYPTO_SEED=m
+ CONFIG_CRYPTO_SALSA20=m
++CONFIG_CRYPTO_SEED=m
++CONFIG_CRYPTO_SERPENT=m
++CONFIG_CRYPTO_TEA=m
++CONFIG_CRYPTO_TWOFISH=m
++CONFIG_CRYPTO_TWOFISH_COMMON=m
++
++#
++# Compression
++#
+ CONFIG_CRYPTO_DEFLATE=m
+-CONFIG_CRYPTO_MICHAEL_MIC=m
+-CONFIG_CRYPTO_CRC32C=m
+-CONFIG_CRYPTO_CAMELLIA=m
+-CONFIG_CRYPTO_TEST=m
+-CONFIG_CRYPTO_AUTHENC=m
+ CONFIG_CRYPTO_LZO=m
+ # CONFIG_CRYPTO_HW is not set
+ 
+@@ -976,7 +1004,7 @@ CONFIG_CRYPTO_LZO=m
+ CONFIG_BITREVERSE=y
+ CONFIG_CRC_CCITT=m
+ CONFIG_CRC16=m
+-# CONFIG_CRC_ITU_T is not set
++CONFIG_CRC_ITU_T=m
+ CONFIG_CRC32=y
+ # CONFIG_CRC7 is not set
+ CONFIG_LIBCRC32C=m
+--- a/arch/m68k/configs/q40_defconfig
++++ b/arch/m68k/configs/q40_defconfig
+@@ -1,7 +1,7 @@
+ #
+ # Automatically generated make config: don't edit
+-# Linux kernel version: 2.6.25-rc8
+-# Wed Apr  2 20:46:20 2008
++# Linux kernel version: 2.6.25
++# Wed Apr 23 22:55:49 2008
+ #
+ CONFIG_M68K=y
+ CONFIG_MMU=y
+@@ -12,7 +12,6 @@ CONFIG_GENERIC_HWEIGHT=y
+ CONFIG_GENERIC_CALIBRATE_DELAY=y
+ CONFIG_TIME_LOW_RES=y
+ CONFIG_GENERIC_IOMAP=y
+-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+ CONFIG_NO_IOPORT=y
+ # CONFIG_NO_DMA is not set
+ CONFIG_ARCH_SUPPORTS_AOUT=y
+@@ -220,8 +219,10 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=m
+ CONFIG_INET6_XFRM_MODE_BEET=m
+ CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
+ CONFIG_IPV6_SIT=m
++CONFIG_IPV6_NDISC_NODETYPE=y
+ CONFIG_IPV6_TUNNEL=m
+ # CONFIG_IPV6_MULTIPLE_TABLES is not set
++# CONFIG_IPV6_MROUTE is not set
+ # CONFIG_NETWORK_SECMARK is not set
+ CONFIG_NETFILTER=y
+ # CONFIG_NETFILTER_DEBUG is not set
+@@ -237,6 +238,7 @@ CONFIG_NF_CONNTRACK=m
+ CONFIG_NF_CT_ACCT=y
+ CONFIG_NF_CONNTRACK_MARK=y
+ # CONFIG_NF_CONNTRACK_EVENTS is not set
++# CONFIG_NF_CT_PROTO_DCCP is not set
+ CONFIG_NF_CT_PROTO_GRE=m
+ CONFIG_NF_CT_PROTO_SCTP=m
+ CONFIG_NF_CT_PROTO_UDPLITE=m
+@@ -315,6 +317,8 @@ CONFIG_IP_NF_TARGET_REDIRECT=m
+ CONFIG_IP_NF_TARGET_NETMAP=m
+ CONFIG_NF_NAT_SNMP_BASIC=m
+ CONFIG_NF_NAT_PROTO_GRE=m
++CONFIG_NF_NAT_PROTO_UDPLITE=m
++CONFIG_NF_NAT_PROTO_SCTP=m
+ CONFIG_NF_NAT_FTP=m
+ CONFIG_NF_NAT_IRC=m
+ CONFIG_NF_NAT_TFTP=m
+@@ -408,8 +412,6 @@ CONFIG_IEEE80211=m
+ CONFIG_IEEE80211_CRYPT_WEP=m
+ CONFIG_IEEE80211_CRYPT_CCMP=m
+ CONFIG_IEEE80211_CRYPT_TKIP=m
+-CONFIG_IEEE80211_SOFTMAC=m
+-# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+ # CONFIG_RFKILL is not set
+ # CONFIG_NET_9P is not set
+ 
+@@ -430,7 +432,6 @@ CONFIG_CONNECTOR=m
+ # CONFIG_PARPORT is not set
+ # CONFIG_PNP is not set
+ CONFIG_BLK_DEV=y
+-# CONFIG_BLK_DEV_FD is not set
+ # CONFIG_BLK_DEV_COW_COMMON is not set
+ CONFIG_BLK_DEV_LOOP=y
+ CONFIG_BLK_DEV_CRYPTOLOOP=m
+@@ -467,25 +468,10 @@ CONFIG_IDE_PROC_FS=y
+ #
+ # IDE chipset support/bugfixes
+ #
+-# CONFIG_IDE_GENERIC is not set
+ # CONFIG_BLK_DEV_PLATFORM is not set
+ CONFIG_BLK_DEV_Q40IDE=y
+-
+-#
+-# Other IDE chipsets support
+-#
+-
+-#
+-# Note: most of these also require special kernel boot parameters
+-#
+-# CONFIG_BLK_DEV_4DRIVES is not set
+-# CONFIG_BLK_DEV_ALI14XX is not set
+-# CONFIG_BLK_DEV_DTC2278 is not set
+-# CONFIG_BLK_DEV_HT6560B is not set
+-# CONFIG_BLK_DEV_QD65XX is not set
+-# CONFIG_BLK_DEV_UMC8672 is not set
+ # CONFIG_BLK_DEV_IDEDMA is not set
+-# CONFIG_IDE_ARCH_OBSOLETE_INIT is not set
++# CONFIG_BLK_DEV_HD_ONLY is not set
+ # CONFIG_BLK_DEV_HD is not set
+ 
+ #
+@@ -603,6 +589,7 @@ CONFIG_NE2000=m
+ #
+ # CONFIG_WLAN_PRE80211 is not set
+ # CONFIG_WLAN_80211 is not set
++# CONFIG_IWLWIFI_LEDS is not set
+ # CONFIG_WAN is not set
+ CONFIG_PPP=m
+ # CONFIG_PPP_MULTILINK is not set
+@@ -736,6 +723,7 @@ CONFIG_SSB_POSSIBLE=y
+ # Multifunction device drivers
+ #
+ # CONFIG_MFD_SM501 is not set
++# CONFIG_HTC_PASIC3 is not set
+ 
+ #
+ # Multimedia devices
+@@ -811,10 +799,6 @@ CONFIG_HIDRAW=y
+ # CONFIG_MEMSTICK is not set
+ # CONFIG_NEW_LEDS is not set
+ # CONFIG_RTC_CLASS is not set
+-
+-#
+-# Userspace I/O
+-#
+ # CONFIG_UIO is not set
+ 
+ #
+@@ -840,16 +824,14 @@ CONFIG_JFS_FS=m
+ # CONFIG_JFS_SECURITY is not set
+ # CONFIG_JFS_DEBUG is not set
+ # CONFIG_JFS_STATISTICS is not set
+-CONFIG_FS_POSIX_ACL=y
++# CONFIG_FS_POSIX_ACL is not set
+ CONFIG_XFS_FS=m
+ # CONFIG_XFS_QUOTA is not set
+-# CONFIG_XFS_SECURITY is not set
+ # CONFIG_XFS_POSIX_ACL is not set
+ # CONFIG_XFS_RT is not set
+-CONFIG_GFS2_FS=m
+-CONFIG_GFS2_FS_LOCKING_NOLOCK=m
+-CONFIG_GFS2_FS_LOCKING_DLM=m
+ CONFIG_OCFS2_FS=m
++# CONFIG_OCFS2_FS_O2CB is not set
++# CONFIG_OCFS2_FS_USERSPACE_CLUSTER is not set
+ # CONFIG_OCFS2_DEBUG_MASKLOG is not set
+ # CONFIG_OCFS2_DEBUG_FS is not set
+ CONFIG_DNOTIFY=y
+@@ -1018,53 +1000,82 @@ CONFIG_ASYNC_CORE=m
+ CONFIG_ASYNC_MEMCPY=m
+ CONFIG_ASYNC_XOR=m
+ CONFIG_CRYPTO=y
++
++#
++# Crypto core or helper
++#
+ CONFIG_CRYPTO_ALGAPI=y
+ CONFIG_CRYPTO_AEAD=m
+ CONFIG_CRYPTO_BLKCIPHER=y
+-CONFIG_CRYPTO_SEQIV=m
+ CONFIG_CRYPTO_HASH=y
+ CONFIG_CRYPTO_MANAGER=y
++CONFIG_CRYPTO_GF128MUL=m
++CONFIG_CRYPTO_NULL=m
++CONFIG_CRYPTO_CRYPTD=m
++CONFIG_CRYPTO_AUTHENC=m
++CONFIG_CRYPTO_TEST=m
++
++#
++# Authenticated Encryption with Associated Data
++#
++CONFIG_CRYPTO_CCM=m
++CONFIG_CRYPTO_GCM=m
++CONFIG_CRYPTO_SEQIV=m
++
++#
++# Block modes
++#
++CONFIG_CRYPTO_CBC=y
++CONFIG_CRYPTO_CTR=m
++CONFIG_CRYPTO_CTS=m
++CONFIG_CRYPTO_ECB=m
++CONFIG_CRYPTO_LRW=m
++CONFIG_CRYPTO_PCBC=m
++CONFIG_CRYPTO_XTS=m
++
++#
++# Hash modes
++#
+ CONFIG_CRYPTO_HMAC=y
+ CONFIG_CRYPTO_XCBC=m
+-CONFIG_CRYPTO_NULL=m
++
++#
++# Digest
++#
++CONFIG_CRYPTO_CRC32C=m
+ CONFIG_CRYPTO_MD4=m
+ CONFIG_CRYPTO_MD5=y
++CONFIG_CRYPTO_MICHAEL_MIC=m
+ CONFIG_CRYPTO_SHA1=m
+ CONFIG_CRYPTO_SHA256=m
+ CONFIG_CRYPTO_SHA512=m
+-CONFIG_CRYPTO_WP512=m
+ CONFIG_CRYPTO_TGR192=m
+-CONFIG_CRYPTO_GF128MUL=m
+-CONFIG_CRYPTO_ECB=m
+-CONFIG_CRYPTO_CBC=y
+-CONFIG_CRYPTO_PCBC=m
+-CONFIG_CRYPTO_LRW=m
+-CONFIG_CRYPTO_XTS=m
+-CONFIG_CRYPTO_CTR=m
+-CONFIG_CRYPTO_GCM=m
+-CONFIG_CRYPTO_CCM=m
+-CONFIG_CRYPTO_CRYPTD=m
+-CONFIG_CRYPTO_DES=y
+-CONFIG_CRYPTO_FCRYPT=m
+-CONFIG_CRYPTO_BLOWFISH=m
+-CONFIG_CRYPTO_TWOFISH=m
+-CONFIG_CRYPTO_TWOFISH_COMMON=m
+-CONFIG_CRYPTO_SERPENT=m
++CONFIG_CRYPTO_WP512=m
++
++#
++# Ciphers
++#
+ CONFIG_CRYPTO_AES=m
++CONFIG_CRYPTO_ANUBIS=m
++CONFIG_CRYPTO_ARC4=m
++CONFIG_CRYPTO_BLOWFISH=m
++CONFIG_CRYPTO_CAMELLIA=m
+ CONFIG_CRYPTO_CAST5=m
+ CONFIG_CRYPTO_CAST6=m
+-CONFIG_CRYPTO_TEA=m
+-CONFIG_CRYPTO_ARC4=m
++CONFIG_CRYPTO_DES=y
++CONFIG_CRYPTO_FCRYPT=m
+ CONFIG_CRYPTO_KHAZAD=m
+-CONFIG_CRYPTO_ANUBIS=m
+-CONFIG_CRYPTO_SEED=m
+ CONFIG_CRYPTO_SALSA20=m
++CONFIG_CRYPTO_SEED=m
++CONFIG_CRYPTO_SERPENT=m
++CONFIG_CRYPTO_TEA=m
++CONFIG_CRYPTO_TWOFISH=m
++CONFIG_CRYPTO_TWOFISH_COMMON=m
++
++#
++# Compression
++#
+ CONFIG_CRYPTO_DEFLATE=m
+-CONFIG_CRYPTO_MICHAEL_MIC=m
+-CONFIG_CRYPTO_CRC32C=m
+-CONFIG_CRYPTO_CAMELLIA=m
+-CONFIG_CRYPTO_TEST=m
+-CONFIG_CRYPTO_AUTHENC=m
+ CONFIG_CRYPTO_LZO=m
+ # CONFIG_CRYPTO_HW is not set
+ 
+@@ -1074,7 +1085,7 @@ CONFIG_CRYPTO_LZO=m
+ CONFIG_BITREVERSE=y
+ CONFIG_CRC_CCITT=m
+ CONFIG_CRC16=m
+-# CONFIG_CRC_ITU_T is not set
++CONFIG_CRC_ITU_T=m
+ CONFIG_CRC32=y
+ # CONFIG_CRC7 is not set
+ CONFIG_LIBCRC32C=m
+--- a/arch/m68k/configs/sun3_defconfig
++++ b/arch/m68k/configs/sun3_defconfig
+@@ -1,7 +1,7 @@
+ #
+ # Automatically generated make config: don't edit
+-# Linux kernel version: 2.6.25-rc8
+-# Wed Apr  2 20:46:22 2008
++# Linux kernel version: 2.6.25
++# Wed Apr 23 22:56:22 2008
+ #
+ CONFIG_M68K=y
+ CONFIG_MMU=y
+@@ -208,8 +208,10 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=m
+ CONFIG_INET6_XFRM_MODE_BEET=m
+ CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
+ CONFIG_IPV6_SIT=m
++CONFIG_IPV6_NDISC_NODETYPE=y
+ CONFIG_IPV6_TUNNEL=m
+ # CONFIG_IPV6_MULTIPLE_TABLES is not set
++# CONFIG_IPV6_MROUTE is not set
+ # CONFIG_NETWORK_SECMARK is not set
+ CONFIG_NETFILTER=y
+ # CONFIG_NETFILTER_DEBUG is not set
+@@ -225,6 +227,7 @@ CONFIG_NF_CONNTRACK=m
+ CONFIG_NF_CT_ACCT=y
+ CONFIG_NF_CONNTRACK_MARK=y
+ # CONFIG_NF_CONNTRACK_EVENTS is not set
++# CONFIG_NF_CT_PROTO_DCCP is not set
+ CONFIG_NF_CT_PROTO_GRE=m
+ CONFIG_NF_CT_PROTO_SCTP=m
+ CONFIG_NF_CT_PROTO_UDPLITE=m
+@@ -303,6 +306,8 @@ CONFIG_IP_NF_TARGET_REDIRECT=m
+ CONFIG_IP_NF_TARGET_NETMAP=m
+ CONFIG_NF_NAT_SNMP_BASIC=m
+ CONFIG_NF_NAT_PROTO_GRE=m
++CONFIG_NF_NAT_PROTO_UDPLITE=m
++CONFIG_NF_NAT_PROTO_SCTP=m
+ CONFIG_NF_NAT_FTP=m
+ CONFIG_NF_NAT_IRC=m
+ CONFIG_NF_NAT_TFTP=m
+@@ -396,8 +401,6 @@ CONFIG_IEEE80211=m
+ CONFIG_IEEE80211_CRYPT_WEP=m
+ CONFIG_IEEE80211_CRYPT_CCMP=m
+ CONFIG_IEEE80211_CRYPT_TKIP=m
+-CONFIG_IEEE80211_SOFTMAC=m
+-# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+ # CONFIG_RFKILL is not set
+ # CONFIG_NET_9P is not set
+ 
+@@ -529,6 +532,7 @@ CONFIG_SUN3_82586=y
+ #
+ # CONFIG_WLAN_PRE80211 is not set
+ # CONFIG_WLAN_80211 is not set
++# CONFIG_IWLWIFI_LEDS is not set
+ # CONFIG_WAN is not set
+ CONFIG_PPP=m
+ # CONFIG_PPP_MULTILINK is not set
+@@ -655,6 +659,7 @@ CONFIG_SSB_POSSIBLE=y
+ # Multifunction device drivers
+ #
+ # CONFIG_MFD_SM501 is not set
++# CONFIG_HTC_PASIC3 is not set
+ 
+ #
+ # Multimedia devices
+@@ -727,10 +732,6 @@ CONFIG_HIDRAW=y
+ # CONFIG_MEMSTICK is not set
+ # CONFIG_NEW_LEDS is not set
+ # CONFIG_RTC_CLASS is not set
+-
+-#
+-# Userspace I/O
+-#
+ # CONFIG_UIO is not set
+ 
+ #
+@@ -756,16 +757,14 @@ CONFIG_JFS_FS=m
+ # CONFIG_JFS_SECURITY is not set
+ # CONFIG_JFS_DEBUG is not set
+ # CONFIG_JFS_STATISTICS is not set
+-CONFIG_FS_POSIX_ACL=y
++# CONFIG_FS_POSIX_ACL is not set
+ CONFIG_XFS_FS=m
+ # CONFIG_XFS_QUOTA is not set
+-# CONFIG_XFS_SECURITY is not set
+ # CONFIG_XFS_POSIX_ACL is not set
+ # CONFIG_XFS_RT is not set
+-CONFIG_GFS2_FS=m
+-CONFIG_GFS2_FS_LOCKING_NOLOCK=m
+-CONFIG_GFS2_FS_LOCKING_DLM=m
+ CONFIG_OCFS2_FS=m
++# CONFIG_OCFS2_FS_O2CB is not set
++# CONFIG_OCFS2_FS_USERSPACE_CLUSTER is not set
+ # CONFIG_OCFS2_DEBUG_MASKLOG is not set
+ # CONFIG_OCFS2_DEBUG_FS is not set
+ CONFIG_DNOTIFY=y
+@@ -936,53 +935,82 @@ CONFIG_ASYNC_CORE=m
+ CONFIG_ASYNC_MEMCPY=m
+ CONFIG_ASYNC_XOR=m
+ CONFIG_CRYPTO=y
++
++#
++# Crypto core or helper
++#
+ CONFIG_CRYPTO_ALGAPI=y
+ CONFIG_CRYPTO_AEAD=m
+ CONFIG_CRYPTO_BLKCIPHER=y
+-CONFIG_CRYPTO_SEQIV=m
+ CONFIG_CRYPTO_HASH=y
+ CONFIG_CRYPTO_MANAGER=y
++CONFIG_CRYPTO_GF128MUL=m
++CONFIG_CRYPTO_NULL=m
++CONFIG_CRYPTO_CRYPTD=m
++CONFIG_CRYPTO_AUTHENC=m
++CONFIG_CRYPTO_TEST=m
++
++#
++# Authenticated Encryption with Associated Data
++#
++CONFIG_CRYPTO_CCM=m
++CONFIG_CRYPTO_GCM=m
++CONFIG_CRYPTO_SEQIV=m
++
++#
++# Block modes
++#
++CONFIG_CRYPTO_CBC=y
++CONFIG_CRYPTO_CTR=m
++CONFIG_CRYPTO_CTS=m
++CONFIG_CRYPTO_ECB=m
++CONFIG_CRYPTO_LRW=m
++CONFIG_CRYPTO_PCBC=m
++CONFIG_CRYPTO_XTS=m
++
++#
++# Hash modes
++#
+ CONFIG_CRYPTO_HMAC=y
+ CONFIG_CRYPTO_XCBC=m
+-CONFIG_CRYPTO_NULL=m
++
++#
++# Digest
++#
++CONFIG_CRYPTO_CRC32C=m
+ CONFIG_CRYPTO_MD4=m
+ CONFIG_CRYPTO_MD5=y
++CONFIG_CRYPTO_MICHAEL_MIC=m
+ CONFIG_CRYPTO_SHA1=m
+ CONFIG_CRYPTO_SHA256=m
+ CONFIG_CRYPTO_SHA512=m
+-CONFIG_CRYPTO_WP512=m
+ CONFIG_CRYPTO_TGR192=m
+-CONFIG_CRYPTO_GF128MUL=m
+-CONFIG_CRYPTO_ECB=m
+-CONFIG_CRYPTO_CBC=y
+-CONFIG_CRYPTO_PCBC=m
+-CONFIG_CRYPTO_LRW=m
+-CONFIG_CRYPTO_XTS=m
+-CONFIG_CRYPTO_CTR=m
+-CONFIG_CRYPTO_GCM=m
+-CONFIG_CRYPTO_CCM=m
+-CONFIG_CRYPTO_CRYPTD=m
+-CONFIG_CRYPTO_DES=y
+-CONFIG_CRYPTO_FCRYPT=m
+-CONFIG_CRYPTO_BLOWFISH=m
+-CONFIG_CRYPTO_TWOFISH=m
+-CONFIG_CRYPTO_TWOFISH_COMMON=m
+-CONFIG_CRYPTO_SERPENT=m
++CONFIG_CRYPTO_WP512=m
++
++#
++# Ciphers
++#
+ CONFIG_CRYPTO_AES=m
++CONFIG_CRYPTO_ANUBIS=m
++CONFIG_CRYPTO_ARC4=m
++CONFIG_CRYPTO_BLOWFISH=m
++CONFIG_CRYPTO_CAMELLIA=m
+ CONFIG_CRYPTO_CAST5=m
+ CONFIG_CRYPTO_CAST6=m
+-CONFIG_CRYPTO_TEA=m
+-CONFIG_CRYPTO_ARC4=m
++CONFIG_CRYPTO_DES=y
++CONFIG_CRYPTO_FCRYPT=m
+ CONFIG_CRYPTO_KHAZAD=m
+-CONFIG_CRYPTO_ANUBIS=m
+-CONFIG_CRYPTO_SEED=m
+ CONFIG_CRYPTO_SALSA20=m
++CONFIG_CRYPTO_SEED=m
++CONFIG_CRYPTO_SERPENT=m
++CONFIG_CRYPTO_TEA=m
++CONFIG_CRYPTO_TWOFISH=m
++CONFIG_CRYPTO_TWOFISH_COMMON=m
++
++#
++# Compression
++#
+ CONFIG_CRYPTO_DEFLATE=m
+-CONFIG_CRYPTO_MICHAEL_MIC=m
+-CONFIG_CRYPTO_CRC32C=m
+-CONFIG_CRYPTO_CAMELLIA=m
+-CONFIG_CRYPTO_TEST=m
+-CONFIG_CRYPTO_AUTHENC=m
+ CONFIG_CRYPTO_LZO=m
+ # CONFIG_CRYPTO_HW is not set
+ 
+@@ -992,7 +1020,7 @@ CONFIG_CRYPTO_LZO=m
+ CONFIG_BITREVERSE=y
+ CONFIG_CRC_CCITT=m
+ CONFIG_CRC16=m
+-# CONFIG_CRC_ITU_T is not set
++CONFIG_CRC_ITU_T=m
+ CONFIG_CRC32=y
+ # CONFIG_CRC7 is not set
+ CONFIG_LIBCRC32C=m
+--- a/arch/m68k/configs/sun3x_defconfig
++++ b/arch/m68k/configs/sun3x_defconfig
+@@ -1,7 +1,7 @@
+ #
+ # Automatically generated make config: don't edit
+-# Linux kernel version: 2.6.25-rc8
+-# Wed Apr  2 20:46:23 2008
++# Linux kernel version: 2.6.25
++# Wed Apr 23 22:56:41 2008
+ #
+ CONFIG_M68K=y
+ CONFIG_MMU=y
+@@ -219,8 +219,10 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=m
+ CONFIG_INET6_XFRM_MODE_BEET=m
+ CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
+ CONFIG_IPV6_SIT=m
++CONFIG_IPV6_NDISC_NODETYPE=y
+ CONFIG_IPV6_TUNNEL=m
+ # CONFIG_IPV6_MULTIPLE_TABLES is not set
++# CONFIG_IPV6_MROUTE is not set
+ # CONFIG_NETWORK_SECMARK is not set
+ CONFIG_NETFILTER=y
+ # CONFIG_NETFILTER_DEBUG is not set
+@@ -236,6 +238,7 @@ CONFIG_NF_CONNTRACK=m
+ CONFIG_NF_CT_ACCT=y
+ CONFIG_NF_CONNTRACK_MARK=y
+ # CONFIG_NF_CONNTRACK_EVENTS is not set
++# CONFIG_NF_CT_PROTO_DCCP is not set
+ CONFIG_NF_CT_PROTO_GRE=m
+ CONFIG_NF_CT_PROTO_SCTP=m
+ CONFIG_NF_CT_PROTO_UDPLITE=m
+@@ -314,6 +317,8 @@ CONFIG_IP_NF_TARGET_REDIRECT=m
+ CONFIG_IP_NF_TARGET_NETMAP=m
+ CONFIG_NF_NAT_SNMP_BASIC=m
+ CONFIG_NF_NAT_PROTO_GRE=m
++CONFIG_NF_NAT_PROTO_UDPLITE=m
++CONFIG_NF_NAT_PROTO_SCTP=m
+ CONFIG_NF_NAT_FTP=m
+ CONFIG_NF_NAT_IRC=m
+ CONFIG_NF_NAT_TFTP=m
+@@ -407,8 +412,6 @@ CONFIG_IEEE80211=m
+ CONFIG_IEEE80211_CRYPT_WEP=m
+ CONFIG_IEEE80211_CRYPT_CCMP=m
+ CONFIG_IEEE80211_CRYPT_TKIP=m
+-CONFIG_IEEE80211_SOFTMAC=m
+-# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+ # CONFIG_RFKILL is not set
+ # CONFIG_NET_9P is not set
+ 
+@@ -539,6 +542,7 @@ CONFIG_SUN3LANCE=y
+ #
+ # CONFIG_WLAN_PRE80211 is not set
+ # CONFIG_WLAN_80211 is not set
++# CONFIG_IWLWIFI_LEDS is not set
+ # CONFIG_WAN is not set
+ CONFIG_PPP=m
+ # CONFIG_PPP_MULTILINK is not set
+@@ -665,6 +669,7 @@ CONFIG_SSB_POSSIBLE=y
+ # Multifunction device drivers
+ #
+ # CONFIG_MFD_SM501 is not set
++# CONFIG_HTC_PASIC3 is not set
+ 
+ #
+ # Multimedia devices
+@@ -737,10 +742,6 @@ CONFIG_HIDRAW=y
+ # CONFIG_MEMSTICK is not set
+ # CONFIG_NEW_LEDS is not set
+ # CONFIG_RTC_CLASS is not set
+-
+-#
+-# Userspace I/O
+-#
+ # CONFIG_UIO is not set
+ 
+ #
+@@ -766,16 +767,14 @@ CONFIG_JFS_FS=m
+ # CONFIG_JFS_SECURITY is not set
+ # CONFIG_JFS_DEBUG is not set
+ # CONFIG_JFS_STATISTICS is not set
+-CONFIG_FS_POSIX_ACL=y
++# CONFIG_FS_POSIX_ACL is not set
+ CONFIG_XFS_FS=m
+ # CONFIG_XFS_QUOTA is not set
+-# CONFIG_XFS_SECURITY is not set
+ # CONFIG_XFS_POSIX_ACL is not set
+ # CONFIG_XFS_RT is not set
+-CONFIG_GFS2_FS=m
+-CONFIG_GFS2_FS_LOCKING_NOLOCK=m
+-CONFIG_GFS2_FS_LOCKING_DLM=m
+ CONFIG_OCFS2_FS=m
++# CONFIG_OCFS2_FS_O2CB is not set
++# CONFIG_OCFS2_FS_USERSPACE_CLUSTER is not set
+ # CONFIG_OCFS2_DEBUG_MASKLOG is not set
+ # CONFIG_OCFS2_DEBUG_FS is not set
+ CONFIG_DNOTIFY=y
+@@ -946,53 +945,82 @@ CONFIG_ASYNC_CORE=m
+ CONFIG_ASYNC_MEMCPY=m
+ CONFIG_ASYNC_XOR=m
+ CONFIG_CRYPTO=y
++
++#
++# Crypto core or helper
++#
+ CONFIG_CRYPTO_ALGAPI=y
+ CONFIG_CRYPTO_AEAD=m
+ CONFIG_CRYPTO_BLKCIPHER=y
+-CONFIG_CRYPTO_SEQIV=m
+ CONFIG_CRYPTO_HASH=y
+ CONFIG_CRYPTO_MANAGER=y
++CONFIG_CRYPTO_GF128MUL=m
++CONFIG_CRYPTO_NULL=m
++CONFIG_CRYPTO_CRYPTD=m
++CONFIG_CRYPTO_AUTHENC=m
++CONFIG_CRYPTO_TEST=m
++
++#
++# Authenticated Encryption with Associated Data
++#
++CONFIG_CRYPTO_CCM=m
++CONFIG_CRYPTO_GCM=m
++CONFIG_CRYPTO_SEQIV=m
++
++#
++# Block modes
++#
++CONFIG_CRYPTO_CBC=y
++CONFIG_CRYPTO_CTR=m
++CONFIG_CRYPTO_CTS=m
++CONFIG_CRYPTO_ECB=m
++CONFIG_CRYPTO_LRW=m
++CONFIG_CRYPTO_PCBC=m
++CONFIG_CRYPTO_XTS=m
++
++#
++# Hash modes
++#
+ CONFIG_CRYPTO_HMAC=y
+ CONFIG_CRYPTO_XCBC=m
+-CONFIG_CRYPTO_NULL=m
++
++#
++# Digest
++#
++CONFIG_CRYPTO_CRC32C=m
+ CONFIG_CRYPTO_MD4=m
+ CONFIG_CRYPTO_MD5=y
++CONFIG_CRYPTO_MICHAEL_MIC=m
+ CONFIG_CRYPTO_SHA1=m
+ CONFIG_CRYPTO_SHA256=m
+ CONFIG_CRYPTO_SHA512=m
+-CONFIG_CRYPTO_WP512=m
+ CONFIG_CRYPTO_TGR192=m
+-CONFIG_CRYPTO_GF128MUL=m
+-CONFIG_CRYPTO_ECB=m
+-CONFIG_CRYPTO_CBC=y
+-CONFIG_CRYPTO_PCBC=m
+-CONFIG_CRYPTO_LRW=m
+-CONFIG_CRYPTO_XTS=m
+-CONFIG_CRYPTO_CTR=m
+-CONFIG_CRYPTO_GCM=m
+-CONFIG_CRYPTO_CCM=m
+-CONFIG_CRYPTO_CRYPTD=m
+-CONFIG_CRYPTO_DES=y
+-CONFIG_CRYPTO_FCRYPT=m
+-CONFIG_CRYPTO_BLOWFISH=m
+-CONFIG_CRYPTO_TWOFISH=m
+-CONFIG_CRYPTO_TWOFISH_COMMON=m
+-CONFIG_CRYPTO_SERPENT=m
++CONFIG_CRYPTO_WP512=m
++
++#
++# Ciphers
++#
+ CONFIG_CRYPTO_AES=m
++CONFIG_CRYPTO_ANUBIS=m
++CONFIG_CRYPTO_ARC4=m
++CONFIG_CRYPTO_BLOWFISH=m
++CONFIG_CRYPTO_CAMELLIA=m
+ CONFIG_CRYPTO_CAST5=m
+ CONFIG_CRYPTO_CAST6=m
+-CONFIG_CRYPTO_TEA=m
+-CONFIG_CRYPTO_ARC4=m
++CONFIG_CRYPTO_DES=y
++CONFIG_CRYPTO_FCRYPT=m
+ CONFIG_CRYPTO_KHAZAD=m
+-CONFIG_CRYPTO_ANUBIS=m
+-CONFIG_CRYPTO_SEED=m
+ CONFIG_CRYPTO_SALSA20=m
++CONFIG_CRYPTO_SEED=m
++CONFIG_CRYPTO_SERPENT=m
++CONFIG_CRYPTO_TEA=m
++CONFIG_CRYPTO_TWOFISH=m
++CONFIG_CRYPTO_TWOFISH_COMMON=m
++
++#
++# Compression
++#
+ CONFIG_CRYPTO_DEFLATE=m
+-CONFIG_CRYPTO_MICHAEL_MIC=m
+-CONFIG_CRYPTO_CRC32C=m
+-CONFIG_CRYPTO_CAMELLIA=m
+-CONFIG_CRYPTO_TEST=m
+-CONFIG_CRYPTO_AUTHENC=m
+ CONFIG_CRYPTO_LZO=m
+ # CONFIG_CRYPTO_HW is not set
+ 
+@@ -1002,7 +1030,7 @@ CONFIG_CRYPTO_LZO=m
+ CONFIG_BITREVERSE=y
+ CONFIG_CRC_CCITT=m
+ CONFIG_CRC16=m
+-# CONFIG_CRC_ITU_T is not set
++CONFIG_CRC_ITU_T=m
+ CONFIG_CRC32=y
+ # CONFIG_CRC7 is not set
+ CONFIG_LIBCRC32C=m

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-vme_scc-globals.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-vme_scc-globals.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,26 @@
+Subject: [PATCH] m68k vme_scc: avoid global namespace pollution
+
+From: Geert Uytterhoeven <geert at linux-m68k.org>
+
+m68k vme_scc:
+  - make scc_ports[] static
+  - kill unused global scc_initialized
+
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ drivers/char/vme_scc.c |    4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+--- a/drivers/char/vme_scc.c
++++ b/drivers/char/vme_scc.c
+@@ -89,9 +89,7 @@ static void scc_break_ctl(struct tty_str
+ 
+ static struct tty_driver *scc_driver;
+ 
+-struct scc_port scc_ports[2];
+-
+-int scc_initialized = 0;
++static struct scc_port scc_ports[2];
+ 
+ /*---------------------------------------------------------------------------
+  * Interface from generic_serial.c back here

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-vmlinux-std_sun3.lds.S_cleanup_use_PAGE_SIZE_macro.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-vmlinux-std_sun3.lds.S_cleanup_use_PAGE_SIZE_macro.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,70 @@
+Subject: m68k: vmlinux-std/sun3.lds.S cleanup - use PAGE_SIZE macro
+
+From: Cyrill Gorcunov <gorcunov at gmail.com>
+
+This patch includes page.h header into liker script that
+allow us to use PAGE_SIZE macro instead of numeric constant
+
+Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+
+WARNING: COMPLETELY UNTESTED !!!
+
+ arch/m68k/kernel/vmlinux-std.lds  |    3 ++-
+ arch/m68k/kernel/vmlinux-sun3.lds |    7 ++++---
+ 2 files changed, 6 insertions(+), 4 deletions(-)
+
+--- a/arch/m68k/kernel/vmlinux-std.lds
++++ b/arch/m68k/kernel/vmlinux-std.lds
+@@ -1,6 +1,7 @@
+ /* ld script to make m68k Linux kernel */
+ 
+ #include <asm-generic/vmlinux.lds.h>
++#include <asm/page.h>
+ 
+ OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k")
+ OUTPUT_ARCH(m68k)
+@@ -41,7 +42,7 @@ SECTIONS
+   _edata = .;			/* End of data section */
+ 
+   /* will be freed after init */
+-  . = ALIGN(4096);		/* Init code and data */
++  . = ALIGN(PAGE_SIZE);		/* Init code and data */
+   __init_begin = .;
+   .init.text : {
+ 	_sinittext = .;
+--- a/arch/m68k/kernel/vmlinux-sun3.lds
++++ b/arch/m68k/kernel/vmlinux-sun3.lds
+@@ -1,6 +1,7 @@
+ /* ld script to make m68k Linux kernel */
+ 
+ #include <asm-generic/vmlinux.lds.h>
++#include <asm/page.h>
+ 
+ OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k")
+ OUTPUT_ARCH(m68k)
+@@ -34,7 +35,7 @@ SECTIONS
+   _edata = .;
+ 
+   /* will be freed after init */
+-  . = ALIGN(8192);	/* Init code and data */
++  . = ALIGN(PAGE_SIZE);	/* Init code and data */
+ __init_begin = .;
+ 	.init.text : {
+ 		_sinittext = .;
+@@ -61,12 +62,12 @@ __init_begin = .;
+ 	}
+ 	SECURITY_INIT
+ #ifdef CONFIG_BLK_DEV_INITRD
+-	. = ALIGN(8192);
++	. = ALIGN(PAGE_SIZE);
+ 	__initramfs_start = .;
+ 	.init.ramfs : { *(.init.ramfs) }
+ 	__initramfs_end = .;
+ #endif
+-	. = ALIGN(8192);
++	. = ALIGN(PAGE_SIZE);
+ 	__init_end = .;
+ 	.data.init.task : { *(.data.init_task) }
+ 

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-whippet-serial-no-longer-exists.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/m68k-whippet-serial-no-longer-exists.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,28 @@
+Subject: [PATCH] m68k: Kill CONFIG_WHIPPET_SERIAL
+
+From: Geert Uytterhoeven <geert at linux-m68k.org>
+
+The Hisoft Whippet PCMCIA serial driver has been removed a long time ago, but
+it's Kconfig symbol still existed.
+
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ arch/m68k/Kconfig |    7 -------
+ 1 file changed, 7 deletions(-)
+
+--- a/arch/m68k/Kconfig
++++ b/arch/m68k/Kconfig
+@@ -539,13 +539,6 @@ config AMIGA_BUILTIN_SERIAL
+ 
+ 	  To compile this driver as a module, choose M here.
+ 
+-config WHIPPET_SERIAL
+-	tristate "Hisoft Whippet PCMCIA serial support"
+-	depends on AMIGA_PCMCIA
+-	help
+-	  HiSoft has a web page at <http://www.hisoft.co.uk/>, but there
+-	  is no listing for the Whippet in their Amiga section.
+-
+ config MULTIFACE_III_TTY
+ 	tristate "Multiface Card III serial support"
+ 	depends on AMIGA

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/mac-platform-device.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/mac-platform-device.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,20 @@
+drivers/scsi/mac_esp.c:	if (MACHW_PRESENT(MAC_SCSI_96)) {
+drivers/scsi/mac_esp.c:	if (MACHW_PRESENT(MAC_SCSI_96_2)) {
+include/asm-m68k/machw.h:#define MACHW_PRESENT(name)	(mac_hw_present.name)
+---
+ arch/m68k/mac/platform.c |   10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+--- /dev/null
++++ b/arch/m68k/mac/platform.c
+@@ -0,0 +1,10 @@
++/*
++ *  Copyright (C) 2007 Geert Uytterhoeven
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License.  See the file COPYING in the main directory of this archive
++ * for more details.
++ */
++
++#include <linux/platform_device.h>
++

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/net-b44-no-pci.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/net-b44-no-pci.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,26 @@
+---
+ drivers/net/b44.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/net/b44.c
++++ b/drivers/net/b44.c
+@@ -2233,7 +2233,9 @@ static void __devexit b44_remove_one(str
+ 	unregister_netdev(dev);
+ 	ssb_bus_may_powerdown(sdev->bus);
+ 	free_netdev(dev);
++#ifdef CONFIG_B44_PCI
+ 	ssb_pcihost_set_power_state(sdev, PCI_D3hot);
++#endif
+ 	ssb_set_drvdata(sdev, NULL);
+ }
+ 
+@@ -2262,7 +2264,9 @@ static int b44_suspend(struct ssb_device
+ 		b44_setup_wol(bp);
+ 	}
+ 
++#ifdef CONFIG_B44_PCI
+ 	ssb_pcihost_set_power_state(sdev, PCI_D3hot);
++#endif
+ 	return 0;
+ }
+ 

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/proc-switch-proc-bus-zorro-devices-to-seq_file-interface.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/proc-switch-proc-bus-zorro-devices-to-seq_file-interface.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,120 @@
+From akpm at linux-foundation.org Thu Apr 10 23:46:02 2008
+Date: Thu, 10 Apr 2008 14:34:41 -0700
+From: akpm at linux-foundation.org
+To: mm-commits at vger.kernel.org
+Cc: adobriyan at sw.ru, geert at linux-m68k.org, jsipek at fsl.cs.sunysb.edu
+Subject: [SPAM] + proc-switch-proc-bus-zorro-devices-to-seq_file-interface.patch added to -mm tree
+
+
+The patch titled
+     proc: switch /proc/bus/zorro/devices to seq_file interface
+has been added to the -mm tree.  Its filename is
+     proc-switch-proc-bus-zorro-devices-to-seq_file-interface.patch
+
+Before you just go and hit "reply", please:
+   a) Consider who else should be cc'ed
+   b) Prefer to cc a suitable mailing list as well
+   c) Ideally: find the original patch on the mailing list and do a
+      reply-to-all to that, adding suitable additional cc's
+
+---
+ drivers/zorro/proc.c |   70 +++++++++++++++++++++++++++++++++------------------
+ 1 file changed, 46 insertions(+), 24 deletions(-)
+
+--- a/drivers/zorro/proc.c
++++ b/drivers/zorro/proc.c
+@@ -13,6 +13,7 @@
+ #include <linux/types.h>
+ #include <linux/zorro.h>
+ #include <linux/proc_fs.h>
++#include <linux/seq_file.h>
+ #include <linux/init.h>
+ #include <linux/smp_lock.h>
+ #include <asm/uaccess.h>
+@@ -80,32 +81,53 @@ static const struct file_operations proc
+ 	.read		= proc_bus_zorro_read,
+ };
+ 
+-static int
+-get_zorro_dev_info(char *buf, char **start, off_t pos, int count)
++static void * zorro_seq_start(struct seq_file *m, loff_t *pos)
+ {
+-	u_int slot;
+-	off_t at = 0;
+-	int len, cnt;
++	return (*pos < zorro_num_autocon) ? pos : NULL;
++}
+ 
+-	for (slot = cnt = 0; slot < zorro_num_autocon && count > cnt; slot++) {
+-		struct zorro_dev *z = &zorro_autocon[slot];
+-		len = sprintf(buf, "%02x\t%08x\t%08lx\t%08lx\t%02x\n", slot,
+-			      z->id, (unsigned long)zorro_resource_start(z),
+-			      (unsigned long)zorro_resource_len(z),
+-			      z->rom.er_Type);
+-		at += len;
+-		if (at >= pos) {
+-			if (!*start) {
+-				*start = buf + (pos - (at - len));
+-				cnt = at - pos;
+-			} else
+-				cnt += len;
+-			buf += len;
+-		}
+-	}
+-	return (count > cnt) ? cnt : count;
++static void * zorro_seq_next(struct seq_file *m, void *v, loff_t *pos)
++{
++	(*pos)++;
++	return (*pos < zorro_num_autocon) ? pos : NULL;
++}
++
++static void zorro_seq_stop(struct seq_file *m, void *v)
++{
+ }
+ 
++static int zorro_seq_show(struct seq_file *m, void *v)
++{
++	u_int slot = *(loff_t *)v;
++	struct zorro_dev *z = &zorro_autocon[slot];
++
++	seq_printf(m, "%02x\t%08x\t%08lx\t%08lx\t%02x\n", slot, z->id,
++		   (unsigned long)zorro_resource_start(z),
++		   (unsigned long)zorro_resource_len(z),
++		   z->rom.er_Type);
++	return 0;
++}
++
++static const struct seq_operations zorro_devices_seq_ops = {
++	.start = zorro_seq_start,
++	.next  = zorro_seq_next,
++	.stop  = zorro_seq_stop,
++	.show  = zorro_seq_show,
++};
++
++static int zorro_devices_proc_open(struct inode *inode, struct file *file)
++{
++	return seq_open(file, &zorro_devices_seq_ops);
++}
++
++static const struct file_operations zorro_devices_proc_fops = {
++	.owner		= THIS_MODULE,
++	.open		= zorro_devices_proc_open,
++	.read		= seq_read,
++	.llseek		= seq_lseek,
++	.release	= seq_release,
++};
++
+ static struct proc_dir_entry *proc_bus_zorro_dir;
+ 
+ static int __init zorro_proc_attach_device(u_int slot)
+@@ -129,8 +151,8 @@ static int __init zorro_proc_init(void)
+ 
+ 	if (MACH_IS_AMIGA && AMIGAHW_PRESENT(ZORRO)) {
+ 		proc_bus_zorro_dir = proc_mkdir("zorro", proc_bus);
+-		create_proc_info_entry("devices", 0, proc_bus_zorro_dir,
+-				       get_zorro_dev_info);
++		proc_create("devices", 0, proc_bus_zorro_dir,
++			    &zorro_devices_proc_fops);
+ 		for (slot = 0; slot < zorro_num_autocon; slot++)
+ 			zorro_proc_attach_device(slot);
+ 	}

Added: dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/zorro-module-device-table.diff
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/m68k/2.6.25/zorro-module-device-table.diff	Sat May  3 09:45:38 2008
@@ -0,0 +1,238 @@
+Subject: [PATCH] Add Amiga Zorro bus modalias support
+
+Add Amiga Zorro bus modalias and uevent support
+
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ drivers/net/a2065.c             |    1 +
+ drivers/net/ariadne.c           |    1 +
+ drivers/net/hydra.c             |    1 +
+ drivers/net/zorro8390.c         |    1 +
+ drivers/scsi/zorro7xx.c         |    1 +
+ drivers/video/cirrusfb.c        |    1 +
+ drivers/video/fm2fb.c           |    1 +
+ drivers/zorro/zorro-driver.c    |   24 ++++++++++++++++++++++++
+ drivers/zorro/zorro-sysfs.c     |   11 +++++++++++
+ include/linux/mod_devicetable.h |   11 +++++++++++
+ include/linux/zorro.h           |   13 +------------
+ scripts/mod/file2alias.c        |   14 ++++++++++++++
+ 12 files changed, 68 insertions(+), 12 deletions(-)
+
+--- a/drivers/net/a2065.c
++++ b/drivers/net/a2065.c
+@@ -698,6 +698,7 @@ static struct zorro_device_id a2065_zorr
+ 	{ ZORRO_PROD_AMERISTAR_A2065 },
+ 	{ 0 }
+ };
++MODULE_DEVICE_TABLE(zorro, a2065_zorro_tbl);
+ 
+ static struct zorro_driver a2065_driver = {
+ 	.name		= "a2065",
+--- a/drivers/net/ariadne.c
++++ b/drivers/net/ariadne.c
+@@ -148,6 +148,7 @@ static struct zorro_device_id ariadne_zo
+     { ZORRO_PROD_VILLAGE_TRONIC_ARIADNE },
+     { 0 }
+ };
++MODULE_DEVICE_TABLE(zorro, ariadne_zorro_tbl);
+ 
+ static struct zorro_driver ariadne_driver = {
+     .name	= "ariadne",
+--- a/drivers/net/hydra.c
++++ b/drivers/net/hydra.c
+@@ -72,6 +72,7 @@ static struct zorro_device_id hydra_zorr
+     { ZORRO_PROD_HYDRA_SYSTEMS_AMIGANET },
+     { 0 }
+ };
++MODULE_DEVICE_TABLE(zorro, hydra_zorro_tbl);
+ 
+ static struct zorro_driver hydra_driver = {
+     .name	= "hydra",
+--- a/drivers/net/zorro8390.c
++++ b/drivers/net/zorro8390.c
+@@ -102,6 +102,7 @@ static struct zorro_device_id zorro8390_
+     { ZORRO_PROD_INDIVIDUAL_COMPUTERS_X_SURF, },
+     { 0 }
+ };
++MODULE_DEVICE_TABLE(zorro, zorro8390_zorro_tbl);
+ 
+ static struct zorro_driver zorro8390_driver = {
+     .name	= "zorro8390",
+--- a/drivers/scsi/zorro7xx.c
++++ b/drivers/scsi/zorro7xx.c
+@@ -68,6 +68,7 @@ static struct zorro_device_id zorro7xx_z
+ 	},
+ 	{ 0 }
+ };
++MODULE_DEVICE_TABLE(zorro, zorro7xx_zorro_tbl);
+ 
+ static int __devinit zorro7xx_init_one(struct zorro_dev *z,
+ 				       const struct zorro_device_id *ent)
+--- a/drivers/video/cirrusfb.c
++++ b/drivers/video/cirrusfb.c
+@@ -298,6 +298,7 @@ static const struct zorro_device_id cirr
+ 	},
+ 	{ 0 }
+ };
++MODULE_DEVICE_TABLE(zorro, cirrusfb_zorro_table);
+ 
+ static const struct {
+ 	zorro_id id2;
+--- a/drivers/video/fm2fb.c
++++ b/drivers/video/fm2fb.c
+@@ -219,6 +219,7 @@ static struct zorro_device_id fm2fb_devi
+ 	{ ZORRO_PROD_HELFRICH_RAINBOW_II },
+ 	{ 0 }
+ };
++MODULE_DEVICE_TABLE(zorro, fm2fb_devices);
+ 
+ static struct zorro_driver fm2fb_driver = {
+ 	.name		= "fm2fb",
+--- a/drivers/zorro/zorro-driver.c
++++ b/drivers/zorro/zorro-driver.c
+@@ -137,10 +137,34 @@ static int zorro_bus_match(struct device
+ 	return 0;
+ }
+ 
++static int zorro_uevent(struct device *dev, struct kobj_uevent_env *env)
++{
++#ifdef CONFIG_HOTPLUG
++	struct zorro_dev *z;
++
++	if (!dev)
++		return -ENODEV;
++
++	z = to_zorro_dev(dev);
++	if (!z)
++		return -ENODEV;
++
++	if (add_uevent_var(env, "ZORRO_ID=%08X", z->id) ||
++	    add_uevent_var(env, "ZORRO_SLOT_NAME=%s", z->dev.bus_id) ||
++	    add_uevent_var(env, "ZORRO_SLOT_ADDR=%04X", z->slotaddr) ||
++	    add_uevent_var(env, "MODALIAS=" ZORRO_DEVICE_MODALIAS_FMT, z->id))
++		return -ENOMEM;
++
++	return 0;
++#else /* !CONFIG_HOTPLUG */
++	return -ENODEV;
++#endif /* !CONFIG_HOTPLUG */
++}
+ 
+ struct bus_type zorro_bus_type = {
+ 	.name	= "zorro",
+ 	.match	= zorro_bus_match,
++	.uevent	= zorro_uevent,
+ 	.probe	= zorro_device_probe,
+ 	.remove	= zorro_device_remove,
+ };
+--- a/drivers/zorro/zorro-sysfs.c
++++ b/drivers/zorro/zorro-sysfs.c
+@@ -84,6 +84,16 @@ static struct bin_attribute zorro_config
+ 	.read = zorro_read_config,
+ };
+ 
++static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
++			     char *buf)
++{
++	struct zorro_dev *z = to_zorro_dev(dev);
++
++	return sprintf(buf, ZORRO_DEVICE_MODALIAS_FMT "\n", z->id);
++}
++
++static DEVICE_ATTR(modalias, S_IRUGO, modalias_show, NULL);
++
+ void zorro_create_sysfs_dev_files(struct zorro_dev *z)
+ {
+ 	struct device *dev = &z->dev;
+@@ -95,6 +105,7 @@ void zorro_create_sysfs_dev_files(struct
+ 	device_create_file(dev, &dev_attr_slotaddr);
+ 	device_create_file(dev, &dev_attr_slotsize);
+ 	device_create_file(dev, &dev_attr_resource);
++	device_create_file(dev, &dev_attr_modalias);
+ 	sysfs_create_bin_file(&dev->kobj, &zorro_config_attr);
+ }
+ 
+--- a/include/linux/mod_devicetable.h
++++ b/include/linux/mod_devicetable.h
+@@ -368,4 +368,15 @@ struct virtio_device_id {
+ };
+ #define VIRTIO_DEV_ANY_ID	0xffffffff
+ 
++
++struct zorro_device_id {
++	__u32 id;			/* Device ID or ZORRO_WILDCARD */
++	kernel_ulong_t driver_data;	/* Data private to the driver */
++};
++
++#define ZORRO_WILDCARD			(0xffffffff)	/* not official */
++
++#define ZORRO_DEVICE_MODALIAS_FMT	"zorro:i%08X"
++
++
+ #endif /* LINUX_MOD_DEVICETABLE_H */
+--- a/include/linux/zorro.h
++++ b/include/linux/zorro.h
+@@ -38,8 +38,6 @@
+ typedef __u32 zorro_id;
+ 
+ 
+-#define ZORRO_WILDCARD		(0xffffffff)	/* not official */
+-
+ /* Include the ID list */
+ #include <linux/zorro_ids.h>
+ 
+@@ -116,6 +114,7 @@ struct ConfigDev {
+ 
+ #include <linux/init.h>
+ #include <linux/ioport.h>
++#include <linux/mod_devicetable.h>
+ 
+ #include <asm/zorro.h>
+ 
+@@ -155,16 +154,6 @@ extern struct bus_type zorro_bus_type;
+ 
+ 
+     /*
+-     *  Zorro device IDs
+-     */
+-
+-struct zorro_device_id {
+-	zorro_id id;			/* Device ID or ZORRO_WILDCARD */
+-	unsigned long driver_data;	/* Data private to the driver */
+-};
+-
+-
+-    /*
+      *  Zorro device drivers
+      */
+ 
+--- a/scripts/mod/file2alias.c
++++ b/scripts/mod/file2alias.c
+@@ -576,6 +576,16 @@ static int do_virtio_entry(const char *f
+ 	return 1;
+ }
+ 
++/* Looks like: zorro:iN. */
++static int do_zorro_entry(const char *filename, struct zorro_device_id *id,
++			  char *alias)
++{
++	id->id = TO_NATIVE(id->id);
++	strcpy(alias, "zorro:");
++	ADD(alias, "i", id->id != ZORRO_WILDCARD, id->id);
++	return 1;
++}
++
+ /* Ignore any prefix, eg. v850 prepends _ */
+ static inline int sym_is(const char *symbol, const char *name)
+ {
+@@ -704,6 +714,10 @@ void handle_moddevtable(struct module *m
+ 		do_table(symval, sym->st_size,
+ 			 sizeof(struct virtio_device_id), "virtio",
+ 			 do_virtio_entry, mod);
++	else if (sym_is(symname, "__mod_zorro_device_table"))
++		do_table(symval, sym->st_size,
++			 sizeof(struct zorro_device_id), "zorro",
++			 do_zorro_entry, mod);
+ 	free(zeros);
+ }
+ 



More information about the Kernel-svn-changes mailing list