## Automatically generated incremental diff
## From:   linux-2.4.22-pre7
## To:     linux-2.4.22-pre8
## Robot:  $Id: make-incremental-diff,v 1.11 2002/02/20 02:59:33 hpa Exp $

diff -urN linux-2.4.22-pre7/MAINTAINERS linux-2.4.22-pre8/MAINTAINERS
--- linux-2.4.22-pre7/MAINTAINERS	2003-07-24 13:19:14.000000000 -0700
+++ linux-2.4.22-pre8/MAINTAINERS	2003-07-24 13:19:18.000000000 -0700
@@ -456,8 +456,8 @@
 S:     Supported
 
 COMX/MULTIGATE SYNC SERIAL DRIVERS
-P:	Gergely Madarasz
-M:	Gergely Madarasz <gorgo@itc.hu>
+P:	Pasztor Szilard
+M:	Pasztor Szilard <don@itc.hu>
 S:	Supported
 
 CONFIGURE, MENUCONFIG, XCONFIG
diff -urN linux-2.4.22-pre7/Makefile linux-2.4.22-pre8/Makefile
--- linux-2.4.22-pre7/Makefile	2003-07-24 13:19:14.000000000 -0700
+++ linux-2.4.22-pre8/Makefile	2003-07-24 13:19:18.000000000 -0700
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 22
-EXTRAVERSION = -pre7
+EXTRAVERSION = -pre8
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
diff -urN linux-2.4.22-pre7/arch/alpha/config.in linux-2.4.22-pre8/arch/alpha/config.in
--- linux-2.4.22-pre7/arch/alpha/config.in	2003-07-24 13:19:14.000000000 -0700
+++ linux-2.4.22-pre8/arch/alpha/config.in	2003-07-24 13:19:18.000000000 -0700
@@ -367,7 +367,7 @@
   bool 'Network device support' CONFIG_NETDEVICES
   if [ "$CONFIG_NETDEVICES" = "y" ]; then
     source drivers/net/Config.in
-    if [ "$CONFIG_ATM" != "n" ]; then
+    if [ "$CONFIG_ATM" = "y" -o "$CONFIG_ATM" = "m" ]; then
       source drivers/atm/Config.in
     fi
   fi
diff -urN linux-2.4.22-pre7/arch/cris/config.in linux-2.4.22-pre8/arch/cris/config.in
--- linux-2.4.22-pre7/arch/cris/config.in	2003-07-24 13:19:14.000000000 -0700
+++ linux-2.4.22-pre8/arch/cris/config.in	2003-07-24 13:19:18.000000000 -0700
@@ -210,7 +210,7 @@
   bool 'Network device support' CONFIG_NETDEVICES
   if [ "$CONFIG_NETDEVICES" = "y" ]; then
     source drivers/net/Config.in
-      if [ "$CONFIG_ATM" != "n" ]; then
+      if [ "$CONFIG_ATM" = "y" -o "$CONFIG_ATM" = "m" ]; then
          source drivers/atm/Config.in
       fi
   fi
diff -urN linux-2.4.22-pre7/arch/i386/config.in linux-2.4.22-pre8/arch/i386/config.in
--- linux-2.4.22-pre7/arch/i386/config.in	2003-07-24 13:19:14.000000000 -0700
+++ linux-2.4.22-pre8/arch/i386/config.in	2003-07-24 13:19:18.000000000 -0700
@@ -393,7 +393,7 @@
    bool 'Network device support' CONFIG_NETDEVICES
    if [ "$CONFIG_NETDEVICES" = "y" ]; then
       source drivers/net/Config.in
-      if [ "$CONFIG_ATM" != "n" ]; then
+      if [ "$CONFIG_ATM" = "y" -o "$CONFIG_ATM" = "m" ]; then
          source drivers/atm/Config.in
       fi
    fi
diff -urN linux-2.4.22-pre7/arch/ia64/config.in linux-2.4.22-pre8/arch/ia64/config.in
--- linux-2.4.22-pre7/arch/ia64/config.in	2003-07-24 13:19:14.000000000 -0700
+++ linux-2.4.22-pre8/arch/ia64/config.in	2003-07-24 13:19:18.000000000 -0700
@@ -179,7 +179,7 @@
     bool 'Network device support' CONFIG_NETDEVICES
     if [ "$CONFIG_NETDEVICES" = "y" ]; then
       source drivers/net/Config.in
-      if [ "$CONFIG_ATM" != "n" ]; then
+      if [ "$CONFIG_ATM" = "y" -o "$CONFIG_ATM" = "m" ]; then
          source drivers/atm/Config.in
       fi
     fi
diff -urN linux-2.4.22-pre7/arch/mips/config-shared.in linux-2.4.22-pre8/arch/mips/config-shared.in
--- linux-2.4.22-pre7/arch/mips/config-shared.in	2003-07-24 13:19:14.000000000 -0700
+++ linux-2.4.22-pre8/arch/mips/config-shared.in	2003-07-24 13:19:18.000000000 -0700
@@ -686,7 +686,7 @@
    bool 'Network device support' CONFIG_NETDEVICES
    if [ "$CONFIG_NETDEVICES" = "y" ]; then
       source drivers/net/Config.in
-      if [ "$CONFIG_ATM" = "y" ]; then
+      if [ "$CONFIG_ATM" = "y" -o "$CONFIG_ATM" = "m" ]; then
 	 source drivers/atm/Config.in
       fi
    fi
diff -urN linux-2.4.22-pre7/arch/parisc/config.in linux-2.4.22-pre8/arch/parisc/config.in
--- linux-2.4.22-pre7/arch/parisc/config.in	2003-07-24 13:19:14.000000000 -0700
+++ linux-2.4.22-pre8/arch/parisc/config.in	2003-07-24 13:19:18.000000000 -0700
@@ -136,7 +136,7 @@
 
    if [ "$CONFIG_NETDEVICES" = "y" ]; then
       source drivers/net/Config.in
-      if [ "$CONFIG_ATM" != "n" ]; then
+      if [ "$CONFIG_ATM" = "y" -o "$CONFIG_ATM" = "m" ]; then
          source drivers/atm/Config.in
       fi
    fi
diff -urN linux-2.4.22-pre7/arch/ppc/config.in linux-2.4.22-pre8/arch/ppc/config.in
--- linux-2.4.22-pre7/arch/ppc/config.in	2003-07-24 13:19:14.000000000 -0700
+++ linux-2.4.22-pre8/arch/ppc/config.in	2003-07-24 13:19:19.000000000 -0700
@@ -323,7 +323,7 @@
   bool 'Network device support' CONFIG_NETDEVICES
   if [ "$CONFIG_NETDEVICES" = "y" ]; then
     source drivers/net/Config.in
-    if [ "$CONFIG_ATM" != "n" ]; then
+    if [ "$CONFIG_ATM" = "y" -o "$CONFIG_ATM" = "m" ]; then
       source drivers/atm/Config.in
     fi
   fi
diff -urN linux-2.4.22-pre7/arch/ppc64/config.in linux-2.4.22-pre8/arch/ppc64/config.in
--- linux-2.4.22-pre7/arch/ppc64/config.in	2003-07-24 13:19:14.000000000 -0700
+++ linux-2.4.22-pre8/arch/ppc64/config.in	2003-07-24 13:19:19.000000000 -0700
@@ -141,7 +141,7 @@
    bool 'Network device support' CONFIG_NETDEVICES
    if [ "$CONFIG_NETDEVICES" = "y" ]; then
       source drivers/net/Config.in
-      if [ "$CONFIG_ATM" != "n" ]; then
+      if [ "$CONFIG_ATM" = "y" -o "$CONFIG_ATM" = "m" ]; then
          source drivers/atm/Config.in
       fi
    fi
diff -urN linux-2.4.22-pre7/arch/sh/config.in linux-2.4.22-pre8/arch/sh/config.in
--- linux-2.4.22-pre7/arch/sh/config.in	2003-07-24 13:19:14.000000000 -0700
+++ linux-2.4.22-pre8/arch/sh/config.in	2003-07-24 13:19:19.000000000 -0700
@@ -311,7 +311,7 @@
    bool 'Network device support' CONFIG_NETDEVICES
    if [ "$CONFIG_NETDEVICES" = "y" ]; then
       source drivers/net/Config.in
-      if [ "$CONFIG_ATM" = "y" ]; then
+      if [ "$CONFIG_ATM" = "y" -o "$CONFIG_ATM" = "m" ]; then
          source drivers/atm/Config.in
       fi
    fi
diff -urN linux-2.4.22-pre7/arch/sh64/config.in linux-2.4.22-pre8/arch/sh64/config.in
--- linux-2.4.22-pre7/arch/sh64/config.in	2003-07-24 13:19:14.000000000 -0700
+++ linux-2.4.22-pre8/arch/sh64/config.in	2003-07-24 13:19:19.000000000 -0700
@@ -198,7 +198,7 @@
    bool 'Network device support' CONFIG_NETDEVICES
    if [ "$CONFIG_NETDEVICES" = "y" ]; then
       source drivers/net/Config.in
-      if [ "$CONFIG_ATM" != "n" ]; then
+      if [ "$CONFIG_ATM" = "y" -o "$CONFIG_ATM" = "m" ]; then
          source drivers/atm/Config.in
       fi
    fi
diff -urN linux-2.4.22-pre7/arch/sparc/config.in linux-2.4.22-pre8/arch/sparc/config.in
--- linux-2.4.22-pre7/arch/sparc/config.in	2003-07-24 13:19:14.000000000 -0700
+++ linux-2.4.22-pre8/arch/sparc/config.in	2003-07-24 13:19:19.000000000 -0700
@@ -209,8 +209,8 @@
         dep_tristate '  PPP BSD-Compress compression' CONFIG_PPP_BSDCOMP m
 	if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
 	  dep_tristate '  PPP over Ethernet (EXPERIMENTAL)' CONFIG_PPPOE $CONFIG_PPP
-	  if [ "$CONFIG_ATM" != "n" ]; then
-	    dep_tristate '  PPP over ATM (EXPERIMENTAL)' CONFIG_PPPOATM $CONFIG_PPP
+	  if [ "$CONFIG_ATM" = "y" -o "$CONFIG_ATM" = "m" ]; then
+	    dep_tristate '  PPP over ATM (EXPERIMENTAL)' CONFIG_PPPOATM $CONFIG_PPP $CONFIG_ATM
 	  fi
 	fi
       fi
diff -urN linux-2.4.22-pre7/arch/sparc64/config.in linux-2.4.22-pre8/arch/sparc64/config.in
--- linux-2.4.22-pre7/arch/sparc64/config.in	2003-07-24 13:19:14.000000000 -0700
+++ linux-2.4.22-pre8/arch/sparc64/config.in	2003-07-24 13:19:19.000000000 -0700
@@ -234,7 +234,7 @@
    bool 'Network device support' CONFIG_NETDEVICES
    if [ "$CONFIG_NETDEVICES" = "y" ]; then
       source drivers/net/Config.in
-      if [ "$CONFIG_ATM" != "n" ]; then
+      if [ "$CONFIG_ATM" = "y" -o "$CONFIG_ATM" = "m" ]; then
 	source drivers/atm/Config.in
       fi
    fi
diff -urN linux-2.4.22-pre7/arch/sparc64/kernel/pci_sabre.c linux-2.4.22-pre8/arch/sparc64/kernel/pci_sabre.c
--- linux-2.4.22-pre7/arch/sparc64/kernel/pci_sabre.c	2002-08-02 17:39:43.000000000 -0700
+++ linux-2.4.22-pre8/arch/sparc64/kernel/pci_sabre.c	2003-07-24 13:19:19.000000000 -0700
@@ -1543,6 +1543,7 @@
 	u32 busrange[2];
 	u32 vdma[2];
 	u32 upa_portid, dma_mask;
+	u64 clear_irq;
 	int bus;
 
 	hummingbird_p = 0;
@@ -1619,6 +1620,16 @@
 	printk("PCI: Found SABRE, main regs at %016lx, wsync at %016lx\n",
 	       p->controller_regs, pci_dma_wsync);
 
+	/* Clear interrupts */
+
+	/* PCI first */
+	for (clear_irq = SABRE_ICLR_A_SLOT0; clear_irq < SABRE_ICLR_B_SLOT0 + 0x80; clear_irq += 8)
+		sabre_write(p->controller_regs + clear_irq, 0x0UL);
+
+	/* Then OBIO */
+	for (clear_irq = SABRE_ICLR_SCSI; clear_irq < SABRE_ICLR_SCSI + 0x80; clear_irq += 8)
+		sabre_write(p->controller_regs + clear_irq, 0x0UL);
+
 	/* Error interrupts are enabled later after the bus scan. */
 	sabre_write(p->controller_regs + SABRE_PCICTRL,
 		    (SABRE_PCICTRL_MRLEN   | SABRE_PCICTRL_SERR |
diff -urN linux-2.4.22-pre7/arch/x86_64/config.in linux-2.4.22-pre8/arch/x86_64/config.in
--- linux-2.4.22-pre7/arch/x86_64/config.in	2003-07-24 13:19:14.000000000 -0700
+++ linux-2.4.22-pre8/arch/x86_64/config.in	2003-07-24 13:19:19.000000000 -0700
@@ -168,7 +168,7 @@
    if [ "$CONFIG_NETDEVICES" = "y" ]; then
       source drivers/net/Config.in
 # seems to be largely not 64bit safe	   
-#      if [ "$CONFIG_ATM" != "n" ]; then
+#      if [ "$CONFIG_ATM" = "y" -o "$CONFIG_ATM" = "m" ]; then
 #         source drivers/atm/Config.in
 #      fi
    fi
diff -urN linux-2.4.22-pre7/drivers/char/sh-sci.c linux-2.4.22-pre8/drivers/char/sh-sci.c
--- linux-2.4.22-pre7/drivers/char/sh-sci.c	2003-07-24 13:19:15.000000000 -0700
+++ linux-2.4.22-pre8/drivers/char/sh-sci.c	2003-07-24 13:19:19.000000000 -0700
@@ -400,7 +400,7 @@
 	if (cflag & CRTSCTS) {
 		fcr_val |= SCFCR_MCE;
 	} else {
-		ctrl_outw(0x0080, SCSPTR2); /* Set RTS = 1 */
+		sci_out(port, SCSPTR, 0x0080); /* Set RTS = 1 */
 	}
 	sci_out(port, SCFCR, fcr_val);
 }
@@ -1026,7 +1026,7 @@
 static int sci_open(struct tty_struct * tty, struct file * filp)
 {
 	struct sci_port *port;
-	int retval, line;
+	int retval = 0, line;
 
 	line = MINOR(tty->device) - SCI_MINOR_START;
 
@@ -1035,6 +1035,14 @@
 
 	port = &sci_ports[line];
 
+#if defined(CONFIG_CPU_SUBTYPE_SH5_101) || defined(CONFIG_CPU_SUBTYPE_SH5_103)
+	if (port->base == 0) {
+		port->base = onchip_remap(SCIF_ADDR_SH5, 1024, "SCIF");
+		if (!port->base)
+			goto failed_1;
+	}
+#endif
+
 	tty->driver_data = port;
 	port->gs.tty = tty;
 	port->gs.count++;
@@ -1456,6 +1464,12 @@
 
 	sercons_port = &sci_ports[co->index];
 
+#if defined(CONFIG_CPU_SUBTYPE_SH5_101) || defined(CONFIG_CPU_SUBTYPE_SH5_103)
+	sercons_port->base = onchip_remap(SCIF_ADDR_SH5, 1024, "SCIF");
+	if (!sercons_port->base)
+		return -EINVAL;
+#endif
+
 	if (options) {
 		baud = simple_strtoul(options, NULL, 10);
 		s = options;
diff -urN linux-2.4.22-pre7/drivers/char/sh-sci.h linux-2.4.22-pre8/drivers/char/sh-sci.h
--- linux-2.4.22-pre7/drivers/char/sh-sci.h	2003-07-24 13:19:15.000000000 -0700
+++ linux-2.4.22-pre8/drivers/char/sh-sci.h	2003-07-24 13:19:19.000000000 -0700
@@ -27,6 +27,7 @@
 #define SH3_IRDA_IRQS { 52,  53,  55,  54 }
 #define SH4_SCIF_IRQS { 40,  41,  43,  42 }
 #define STB1_SCIF1_IRQS {23, 24,  26,  25 }
+#define SH5_SCIF_IRQS  { 39, 40, 42 }
 #define SH7300_SCIF0_IRQS {80,  80,  80,  80 }
 
 #if defined(CONFIG_CPU_SUBTYPE_SH7708)
@@ -82,6 +83,25 @@
 # define SCIF_ORER 0x0001   /* overrun error bit */
 # define SCSCR_INIT(port)          0x38 /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
 # define SCIF_ONLY
+
+#elif defined(CONFIG_CPU_SUBTYPE_SH5_101) || defined(CONFIG_CPU_SUBTYPE_SH5_103)
+# include <asm/hardware.h>
+# define SCIF_BASE_ADDR    0x01030000 
+# define SCIF_ADDR_SH5     PHYS_PERIPHERAL_BLOCK+SCIF_BASE_ADDR
+# define SCIF_PTR2_OFFS    0x0000020
+# define SCIF_LSR2_OFFS    0x0000024
+# define SCI_NPORTS 1
+# define SCI_INIT { \
+  { {}, PORT_SCIF, 0, \
+     SH5_SCIF_IRQS, sci_init_pins_scif }  \
+}
+# define SCSPTR2           (SCIF_ADDR_SH5+SCIF_PTR2_OFFS) /* 16 bit SCIF */
+# define SCLSR2            (SCIF_ADDR_SH5+SCIF_LSR2_OFFS) /* 16 bit SCIF */
+# define SCSCR_INIT(port)  0x38                           /* TIE=0,RIE=0,
+							     TE=1,RE=1,REIE=1 */
+# define SCIF_ONLY
+
+
 #else
 # error CPU subtype not defined
 #endif
@@ -318,6 +338,7 @@
 SCIx_FNS(SCxRDR, 0x0a,  8, 0x14,  8, 0x0A,  8, 0x14,  8)
 SCIF_FNS(SCFCR,                      0x0c,  8, 0x18, 16)
 SCIF_FNS(SCFDR,                      0x0e, 16, 0x1C, 16)
+SCIF_FNS(SCSPTR,			0,  0, 0x20, 16)
 SCIF_FNS(SCLSR,                         0,  0, 0x24, 16)
 #endif
 
@@ -371,6 +392,12 @@
 		return ctrl_inw(SCSPTR2)&0x0001 ? 1 : 0; /* SCIF */
 
 }
+#elif defined(CONFIG_CPU_SUBTYPE_SH5_101) || defined(CONFIG_CPU_SUBTYPE_SH5_103)
+static inline int sci_rxd_in(struct sci_port *port)
+{
+         return sci_in(port, SCSPTR)&0x0001 ? 1 : 0; /* SCIF */
+}
+
 #endif
 
 /*
diff -urN linux-2.4.22-pre7/drivers/ieee1394/amdtp.c linux-2.4.22-pre8/drivers/ieee1394/amdtp.c
--- linux-2.4.22-pre7/drivers/ieee1394/amdtp.c	2003-07-24 13:19:15.000000000 -0700
+++ linux-2.4.22-pre8/drivers/ieee1394/amdtp.c	2003-07-24 13:19:19.000000000 -0700
@@ -62,6 +62,12 @@
  * - Maybe make an ALSA interface, that is, create a file_ops
  *   implementation that recognizes ALSA ioctls and uses defaults for
  *   things that can't be controlled through ALSA (iso channel).
+ *
+ *   Changes:
+ *
+ * - Audit copy_from_user in amdtp_write.
+ *                           Daniele Bellucci <bellucda@tiscali.it>
+ *
  */
 
 #include <linux/module.h>
@@ -1112,7 +1118,8 @@
 
 	for (i = 0; i < count; i += length) {
 		p = buffer_put_bytes(s->input, count - i, &length);
-		copy_from_user(p, buffer + i, length);
+		if (copy_from_user(p, buffer + i, length))
+			return -EFAULT;
 		if (s->input->length < s->input->size)
 			continue;
 		
diff -urN linux-2.4.22-pre7/drivers/ieee1394/csr.c linux-2.4.22-pre8/drivers/ieee1394/csr.c
--- linux-2.4.22-pre7/drivers/ieee1394/csr.c	2003-06-13 07:51:34.000000000 -0700
+++ linux-2.4.22-pre8/drivers/ieee1394/csr.c	2003-07-24 13:19:19.000000000 -0700
@@ -408,7 +408,7 @@
 		 * eventually. */
 		HPSB_WARN("Node [" NODE_BUS_FMT "] wants to release "
 			  "broadcast channel 31.  Ignoring.",
-			  NODE_BUS_ARGS(nodeid));
+			  NODE_BUS_ARGS(host, nodeid));
 
 		data &= ~0x1;	/* keep broadcast channel allocated */
 	}
@@ -554,7 +554,7 @@
                  * eventually. */
 		HPSB_WARN("Node [" NODE_BUS_FMT "] wants to release "
 			  "broadcast channel 31.  Ignoring.",
-			  NODE_BUS_ARGS(nodeid));
+			  NODE_BUS_ARGS(host, nodeid));
 
 		data &= ~0x100000000ULL;	/* keep broadcast channel allocated */
 	}
diff -urN linux-2.4.22-pre7/drivers/ieee1394/dma.c linux-2.4.22-pre8/drivers/ieee1394/dma.c
--- linux-2.4.22-pre7/drivers/ieee1394/dma.c	2003-07-24 13:19:15.000000000 -0700
+++ linux-2.4.22-pre8/drivers/ieee1394/dma.c	2003-07-24 13:19:19.000000000 -0700
@@ -10,6 +10,7 @@
 #include <linux/module.h>
 #include <linux/vmalloc.h>
 #include <linux/slab.h>
+#include <linux/mm.h>
 #include "dma.h"
 
 /* dma_prog_region */
@@ -156,7 +157,10 @@
 		off -= sg_dma_len(&dma->sglist[i]);
 	}
 
-	panic("dma_region_find: offset %lu beyond end of DMA mapping\n", offset);
+	printk("dma_region_find: offset %lu beyond end of DMA mapping\n", offset);
+	BUG();
+
+	return -ENOENT;
 }
 
 dma_addr_t dma_region_offset_to_bus(struct dma_region *dma, unsigned long offset)
diff -urN linux-2.4.22-pre7/drivers/ieee1394/eth1394.c linux-2.4.22-pre8/drivers/ieee1394/eth1394.c
--- linux-2.4.22-pre7/drivers/ieee1394/eth1394.c	2003-07-24 13:19:15.000000000 -0700
+++ linux-2.4.22-pre8/drivers/ieee1394/eth1394.c	2003-07-24 13:19:19.000000000 -0700
@@ -1,7 +1,7 @@
 /*
  * eth1394.c -- Ethernet driver for Linux IEEE-1394 Subsystem
  * 
- * Copyright (C) 2001 Ben Collins <bcollins@debian.org>
+ * Copyright (C) 2001-2003 Ben Collins <bcollins@debian.org>
  *               2000 Bonin Franck <boninf@free.fr>
  *               2003 Steve Kinneberg <kinnebergsteve@acmsystems.com>
  *
@@ -33,7 +33,7 @@
  * - Add MCAP. Limited Multicast exists only to 224.0.0.1 and 224.0.0.2.
  *
  * Non-RFC 2734 related:
- * - Fix bug related to fragmented broadcast datagrams
+ * - Handle fragmented skb's coming from the networking layer.
  * - Move generic GASP reception to core 1394 code
  * - Convert kmalloc/kfree for link fragments to use kmem_cache_* instead
  * - Stability improvements
@@ -89,7 +89,7 @@
 #define TRACE() printk(KERN_ERR "%s:%s[%d] ---- TRACE\n", driver_name, __FUNCTION__, __LINE__)
 
 static char version[] __devinitdata =
-	"$Rev: 970 $ Ben Collins <bcollins@debian.org>";
+	"$Rev: 1010 $ Ben Collins <bcollins@debian.org>";
 
 struct fragment_info {
 	struct list_head list;
@@ -122,6 +122,12 @@
 	sizeof (struct eth1394_sf_hdr)
 };
 
+/* Change this to IEEE1394_SPEED_S100 to make testing easier */
+#define ETH1394_SPEED_DEF	IEEE1394_SPEED_MAX
+
+/* For now, this needs to be 1500, so that XP works with us */
+#define ETH1394_DATA_LEN	ETH_DATA_LEN
+
 static const u16 eth1394_speedto_maxpayload[] = {
 /*     S100, S200, S400, S800, S1600, S3200 */
 	512, 1024, 2048, 4096,  8192, 16384
@@ -167,7 +173,8 @@
 	priv->bc_state = ETHER1394_BC_CLOSED;
 
 	if (priv->iso != NULL) {
-		hpsb_iso_shutdown(priv->iso);
+		if (!in_interrupt())
+			hpsb_iso_shutdown(priv->iso);
 		priv->iso = NULL;
 	}
 }
@@ -192,8 +199,7 @@
 				      "Error BROADCAST_CHANNEL register valid "
 				      "bit not set, can't send IP traffic\n");
 
-			if (!in_interrupt())
-				eth1394_iso_shutdown(priv);
+			eth1394_iso_shutdown(priv);
 
 			return -EAGAIN;
 		}
@@ -202,11 +208,11 @@
 			 * the IEEE 1394 spec changes regarding broadcast
 			 * channels in the future. */
 
+			eth1394_iso_shutdown(priv);
+
 			if (in_interrupt())
 				return -EAGAIN;
 
-			eth1394_iso_shutdown(priv);
-
 			priv->broadcast_channel = bc & 0x3f;
 			ETH1394_PRINT(KERN_INFO, dev->name,
 				      "Changing to broadcast channel %d...\n",
@@ -226,8 +232,7 @@
 			ETH1394_PRINT(KERN_ERR, dev->name,
 				      "Could not start data stream reception\n");
 
-			if (!in_interrupt())
-				eth1394_iso_shutdown(priv);
+			eth1394_iso_shutdown(priv);
 
 			return -EAGAIN;
 		}
@@ -244,8 +249,10 @@
 	unsigned long flags;
 	int ret;
 
-	/* Set the spinlock before grabbing IRQ! */
-	priv->lock = SPIN_LOCK_UNLOCKED;
+	/* Something bad happened, don't even try */
+	if (priv->bc_state == ETHER1394_BC_CLOSED)
+		return -EAGAIN;
+
 	spin_lock_irqsave(&priv->lock, flags);
 	ret = ether1394_init_bc(dev);
 	spin_unlock_irqrestore(&priv->lock, flags);
@@ -287,9 +294,8 @@
 	struct eth1394_priv *priv = (struct eth1394_priv *)dev->priv;
 	int phy_id = NODEID_TO_NODE(priv->host->node_id);
 
-	if ((new_mtu < 68) || (new_mtu > MIN(ETH_DATA_LEN, (priv->maxpayload[phy_id] -
-					  (sizeof(union eth1394_hdr) +
-					   ETHER1394_GASP_OVERHEAD)))))
+	if ((new_mtu < 68) || (new_mtu > min(ETH1394_DATA_LEN, (int)(priv->maxpayload[phy_id] -
+					     (sizeof(union eth1394_hdr) + ETHER1394_GASP_OVERHEAD)))))
 		return -EINVAL;
 	dev->mtu = new_mtu;
 	return 0;
@@ -322,8 +328,7 @@
 	struct eth1394_priv *priv = (struct eth1394_priv *)dev->priv;
 	struct hpsb_host *host = priv->host;
 	int phy_id = NODEID_TO_NODE(host->node_id);
-	u64 guid = (u64)(((u64)be32_to_cpu(host->csr.rom[3]) << 32) |
-			  be32_to_cpu(host->csr.rom[4]));
+	u64 guid = *((u64*)&(host->csr.rom[3]));
 	u16 maxpayload = 1 << (((be32_to_cpu(host->csr.rom[2]) >> 12) & 0xf) + 1);
 
 	spin_lock_irqsave (&priv->lock, flags);
@@ -333,15 +338,8 @@
 	memset (priv->sspd, 0, sizeof (priv->sspd));
 	memset (priv->fifo, 0, sizeof (priv->fifo));
 
-#if 1
-/* Compile this out to make testing of fragmented broadcast datagrams
- * easier. */
-	priv->sspd[ALL_NODES] = IEEE1394_SPEED_MAX;
-	priv->maxpayload[ALL_NODES] = eth1394_speedto_maxpayload[IEEE1394_SPEED_MAX];
-#else
-	priv->sspd[ALL_NODES] = IEEE1394_SPEED_100;
-	priv->maxpayload[ALL_NODES] = eth1394_speedto_maxpayload[IEEE1394_SPEED_100];
-#endif
+	priv->sspd[ALL_NODES] = ETH1394_SPEED_DEF;
+	priv->maxpayload[ALL_NODES] = eth1394_speedto_maxpayload[priv->sspd[ALL_NODES]];
 
 	priv->bc_state = ETHER1394_BC_CHECK;
 
@@ -352,9 +350,8 @@
 
 	/* We'll use our maxpayload as the default mtu */
 	if (set_mtu) {
-		dev->mtu = MIN(ETH_DATA_LEN, priv->maxpayload[phy_id] -
-					     (sizeof(union eth1394_hdr) +
-					     ETHER1394_GASP_OVERHEAD));
+		dev->mtu = min(ETH1394_DATA_LEN, (int)(priv->maxpayload[phy_id] -
+			       (sizeof(union eth1394_hdr) + ETHER1394_GASP_OVERHEAD)));
 
 		/* Set our hardware address while we're at it */
 		*(u64*)dev->dev_addr = guid;
@@ -400,9 +397,7 @@
 	/* Some constants */
 	dev->watchdog_timeo	= ETHER1394_TIMEOUT;
 	dev->flags		= IFF_BROADCAST | IFF_MULTICAST;
-        /* !! If data corruption or untrackable kernel panics occur, try
-         * removing NETIF_F_FRAGLIST !! */
-	dev->features		= NETIF_F_HIGHDMA | NETIF_F_FRAGLIST;
+	dev->features		= NETIF_F_HIGHDMA;
 	dev->addr_len		= ETH1394_ALEN;
 	dev->hard_header_len 	= ETH1394_HLEN;
 	dev->type		= ARPHRD_IEEE1394;
@@ -446,8 +441,8 @@
 
 	priv = (struct eth1394_priv *)dev->priv;
 
-	priv->host = host;
 	spin_lock_init(&priv->lock);
+	priv->host = host;
 
 	for (i = 0; i < ALL_NODES; i++) {
                 spin_lock_init(&priv->pdg[i].lock);
@@ -503,7 +498,6 @@
 	if (hi != NULL) {
 		struct eth1394_priv *priv = (struct eth1394_priv *)hi->dev->priv;
 
-		priv->bc_state = ETHER1394_BC_CLOSED;
 		eth1394_iso_shutdown(priv);
 
 		if (hi->dev) {
@@ -1291,7 +1285,7 @@
 
 	if (hpsb_get_tlabel(p, !in_interrupt())) {
 		ETH1394_PRINT_G(KERN_ERR, "No more tlabels left while sending "
-				"to node " NODE_BUS_FMT "\n", NODE_BUS_ARGS(node));
+				"to node " NODE_BUS_FMT "\n", NODE_BUS_ARGS(host, node));
 		return -1;
 	}		
 	p->header[0] = (p->node_id << 16) | (p->tlabel << 10)
@@ -1382,17 +1376,15 @@
         unsigned long flags;
 		
 	/* Statistics */
+	spin_lock_irqsave(&priv->lock, flags);
 	if (fail) {
-		spin_lock_irqsave(&priv->lock, flags);
 		priv->stats.tx_dropped++;
 		priv->stats.tx_errors++;
-		spin_unlock_irqrestore(&priv->lock, flags);
 	} else {
-		spin_lock_irqsave(&priv->lock, flags);
 		priv->stats.tx_bytes += skb->len;
 		priv->stats.tx_packets++;
-		spin_unlock_irqrestore(&priv->lock, flags);
 	}
+	spin_unlock_irqrestore(&priv->lock, flags);
 
 	dev_kfree_skb_any(skb);
 	kmem_cache_free(packet_task_cache, ptask);
@@ -1462,11 +1454,9 @@
 		goto fail;
 	}
 
-	if (priv->bc_state == ETHER1394_BC_CHECK) {
-		if (ether1394_init_bc(dev)) {
-			spin_unlock_irqrestore (&priv->lock, flags);
-			goto fail;
-		}
+	if ((ret = ether1394_init_bc(dev))) {
+		spin_unlock_irqrestore (&priv->lock, flags);
+		goto fail;
 	}
 
 	spin_unlock_irqrestore (&priv->lock, flags);
@@ -1610,7 +1600,7 @@
 		case ETHTOOL_GDRVINFO: {
 			struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO };
 			strcpy (info.driver, driver_name);
-			strcpy (info.version, "$Rev: 970 $");
+			strcpy (info.version, "$Rev: 1010 $");
 			/* FIXME XXX provide sane businfo */
 			strcpy (info.bus_info, "ieee1394");
 			if (copy_to_user (useraddr, &info, sizeof (info)))
diff -urN linux-2.4.22-pre7/drivers/ieee1394/hosts.h linux-2.4.22-pre8/drivers/ieee1394/hosts.h
--- linux-2.4.22-pre7/drivers/ieee1394/hosts.h	2003-06-13 07:51:34.000000000 -0700
+++ linux-2.4.22-pre8/drivers/ieee1394/hosts.h	2003-07-24 13:19:19.000000000 -0700
@@ -110,6 +110,7 @@
 
 enum isoctl_cmd {
 	/* rawiso API - see iso.h for the meanings of these commands
+	   (they correspond exactly to the hpsb_iso_* API functions)
 	 * INIT = allocate resources
 	 * START = begin transmission/reception
 	 * STOP = halt transmission/reception
@@ -131,6 +132,7 @@
 	RECV_STOP,
 	RECV_RELEASE,
 	RECV_SHUTDOWN,
+	RECV_FLUSH
 };
 
 enum reset_types {
diff -urN linux-2.4.22-pre7/drivers/ieee1394/ieee1394-ioctl.h linux-2.4.22-pre8/drivers/ieee1394/ieee1394-ioctl.h
--- linux-2.4.22-pre7/drivers/ieee1394/ieee1394-ioctl.h	2003-06-13 07:51:34.000000000 -0700
+++ linux-2.4.22-pre8/drivers/ieee1394/ieee1394-ioctl.h	2003-07-24 13:19:19.000000000 -0700
@@ -100,6 +100,8 @@
 	_IOW ('#', 0x27, struct raw1394_iso_packets)
 #define RAW1394_IOC_ISO_XMIT_SYNC		\
 	_IO  ('#', 0x28)
+#define RAW1394_IOC_ISO_RECV_FLUSH              \
+	_IO  ('#', 0x29)
 
 
 #endif /* __IEEE1394_IOCTL_H */
diff -urN linux-2.4.22-pre7/drivers/ieee1394/ieee1394_core.c linux-2.4.22-pre8/drivers/ieee1394/ieee1394_core.c
--- linux-2.4.22-pre7/drivers/ieee1394/ieee1394_core.c	2003-07-24 13:19:15.000000000 -0700
+++ linux-2.4.22-pre8/drivers/ieee1394/ieee1394_core.c	2003-07-24 13:19:19.000000000 -0700
@@ -381,8 +381,10 @@
                 } else {
                         HPSB_NOTICE("Stopping out-of-control reset loop");
                         HPSB_NOTICE("Warning - topology map and speed map will not be valid");
+			host->reset_retries = 0;
                 }
         } else {
+		host->reset_retries = 0;
                 build_speed_map(host, host->node_count);
         }
 
@@ -1208,7 +1210,7 @@
 #ifdef CONFIG_PROC_FS
 	/* Must be done before we start everything else, since the drivers
 	 * may use it.  */
-	ieee1394_procfs_entry = proc_mkdir( "ieee1394", proc_bus);
+	ieee1394_procfs_entry = proc_mkdir("ieee1394", proc_bus);
 	if (ieee1394_procfs_entry == NULL) {
 		HPSB_ERR("unable to create /proc/bus/ieee1394\n");
 		unregister_chrdev(IEEE1394_MAJOR, "ieee1394");
@@ -1356,3 +1358,4 @@
 EXPORT_SYMBOL(hpsb_iso_packet_sent);
 EXPORT_SYMBOL(hpsb_iso_packet_received);
 EXPORT_SYMBOL(hpsb_iso_wake);
+EXPORT_SYMBOL(hpsb_iso_recv_flush);
diff -urN linux-2.4.22-pre7/drivers/ieee1394/ieee1394_types.h linux-2.4.22-pre8/drivers/ieee1394/ieee1394_types.h
--- linux-2.4.22-pre7/drivers/ieee1394/ieee1394_types.h	2003-07-24 13:19:15.000000000 -0700
+++ linux-2.4.22-pre8/drivers/ieee1394/ieee1394_types.h	2003-07-24 13:19:19.000000000 -0700
@@ -66,8 +66,9 @@
 #define NODEID_TO_NODE(nodeid)	(nodeid & NODE_MASK)
 
 /* Can be used to consistently print a node/bus ID. */
-#define NODE_BUS_FMT		"%02d:%04d"
-#define NODE_BUS_ARGS(nodeid)	NODEID_TO_NODE(nodeid), NODEID_TO_BUS(nodeid)
+#define NODE_BUS_FMT		"%d-%02d:%04d"
+#define NODE_BUS_ARGS(__host, __nodeid)	\
+	__host->id, NODEID_TO_NODE(__nodeid), NODEID_TO_BUS(__nodeid)
 
 #define HPSB_PRINT(level, fmt, args...) printk(level "ieee1394: " fmt "\n" , ## args)
 
diff -urN linux-2.4.22-pre7/drivers/ieee1394/iso.c linux-2.4.22-pre8/drivers/ieee1394/iso.c
--- linux-2.4.22-pre7/drivers/ieee1394/iso.c	2003-07-24 13:19:15.000000000 -0700
+++ linux-2.4.22-pre8/drivers/ieee1394/iso.c	2003-07-24 13:19:19.000000000 -0700
@@ -200,6 +200,13 @@
 	return iso->host->driver->isoctl(iso, RECV_SET_CHANNEL_MASK, (unsigned long) &mask);
 }
 
+int hpsb_iso_recv_flush(struct hpsb_iso *iso)
+{
+	if (iso->type != HPSB_ISO_RECV)
+		return -EINVAL;
+	return iso->host->driver->isoctl(iso, RECV_FLUSH, 0);
+}
+
 static int do_iso_xmit_start(struct hpsb_iso *iso, int cycle)
 {
 	int retval = iso->host->driver->isoctl(iso, XMIT_START, cycle);
diff -urN linux-2.4.22-pre7/drivers/ieee1394/iso.h linux-2.4.22-pre8/drivers/ieee1394/iso.h
--- linux-2.4.22-pre7/drivers/ieee1394/iso.h	2003-07-24 13:19:15.000000000 -0700
+++ linux-2.4.22-pre8/drivers/ieee1394/iso.h	2003-07-24 13:19:19.000000000 -0700
@@ -165,6 +165,10 @@
 /* N packets have been read out of the buffer, re-use the buffer space */
 int  hpsb_iso_recv_release_packets(struct hpsb_iso *recv, unsigned int n_packets);
 
+/* check for arrival of new packets immediately (even if irq_interval
+   has not yet been reached) */
+int hpsb_iso_recv_flush(struct hpsb_iso *iso);
+
 /* returns # of packets ready to send or receive */
 int hpsb_iso_n_ready(struct hpsb_iso *iso);
 
diff -urN linux-2.4.22-pre7/drivers/ieee1394/nodemgr.c linux-2.4.22-pre8/drivers/ieee1394/nodemgr.c
--- linux-2.4.22-pre7/drivers/ieee1394/nodemgr.c	2003-07-24 13:19:15.000000000 -0700
+++ linux-2.4.22-pre8/drivers/ieee1394/nodemgr.c	2003-07-24 13:19:19.000000000 -0700
@@ -125,7 +125,7 @@
 			continue;
 
 		PUTF("Node[" NODE_BUS_FMT "]  GUID[%016Lx]:\n",
-		     NODE_BUS_ARGS(ne->nodeid), (unsigned long long)ne->guid);
+		     NODE_BUS_ARGS(ne->host, ne->nodeid), (unsigned long long)ne->guid);
 
 		/* Generic Node information */
 		PUTF("  Vendor ID: `%s' [0x%06x]\n",
@@ -146,9 +146,9 @@
 			PUTF("    Nodes active    : %d\n", ne->host->nodes_active);
 			PUTF("    SelfIDs received: %d\n", ne->host->selfid_count);
 			PUTF("    Irm ID          : [" NODE_BUS_FMT "]\n",
-			     NODE_BUS_ARGS(ne->host->irm_id));
+			     NODE_BUS_ARGS(ne->host, ne->host->irm_id));
 			PUTF("    BusMgr ID       : [" NODE_BUS_FMT "]\n",
-			     NODE_BUS_ARGS(ne->host->busmgr_id));
+			     NODE_BUS_ARGS(ne->host, ne->host->busmgr_id));
 			PUTF("    In Bus Reset    : %s\n", ne->host->in_bus_reset ? "yes" : "no");
 			PUTF("    Root            : %s\n", ne->host->is_root ? "yes" : "no");
 			PUTF("    Cycle Master    : %s\n", ne->host->is_cycmst ? "yes" : "no");
@@ -382,10 +382,9 @@
 
 	nodemgr_process_config_rom (ne, busoptions);
 
-	HPSB_DEBUG("%s added: Node[" NODE_BUS_FMT "]  GUID[%016Lx]  [%s]",
-		   (host->node_id == nodeid) ? "Host" : "Device",
-		   NODE_BUS_ARGS(nodeid), (unsigned long long)guid,
-		   ne->vendor_name ?: "Unknown");
+	HPSB_DEBUG("%s added: ID:BUS[" NODE_BUS_FMT "]  GUID[%016Lx]",
+		   (host->node_id == nodeid) ? "Host" : "Node",
+		   NODE_BUS_ARGS(host, nodeid), (unsigned long long)guid);
 
         return ne;
 }
@@ -533,8 +532,10 @@
 	ud->ne = ne;
 	ud->address = address;
 
-	if (parent != NULL)
+	if (parent) {
+		ud->flags |= UNIT_DIRECTORY_LUN_DIRECTORY;
 		ud->parent = parent;
+	}
 
 	if (nodemgr_read_quadlet(ne->host, ne->nodeid, ne->generation,
 				 address, &quad))
@@ -611,35 +612,36 @@
 			break;
 
 		case CONFIG_ROM_LOGICAL_UNIT_DIRECTORY:
+			ud->flags |= UNIT_DIRECTORY_HAS_LUN_DIRECTORY;
 			ud_temp = nodemgr_process_unit_directory(ne, address + value * 4, ud);
 
+			if (ud_temp == NULL)
+				break;
+
 			/* inherit unspecified values */
-			if (ud_temp != NULL)
+			if ((ud->flags & UNIT_DIRECTORY_VENDOR_ID) &&
+				!(ud_temp->flags & UNIT_DIRECTORY_VENDOR_ID))
 			{
-				if ((ud->flags & UNIT_DIRECTORY_VENDOR_ID) &&
-					!(ud_temp->flags & UNIT_DIRECTORY_VENDOR_ID))
-				{
-					ud_temp->flags |=  UNIT_DIRECTORY_VENDOR_ID;
-					ud_temp->vendor_id = ud->vendor_id;
-				}
-				if ((ud->flags & UNIT_DIRECTORY_MODEL_ID) &&
-					!(ud_temp->flags & UNIT_DIRECTORY_MODEL_ID))
-				{
-					ud_temp->flags |=  UNIT_DIRECTORY_MODEL_ID;
-					ud_temp->model_id = ud->model_id;
-				}
-				if ((ud->flags & UNIT_DIRECTORY_SPECIFIER_ID) &&
-					!(ud_temp->flags & UNIT_DIRECTORY_SPECIFIER_ID))
-				{
-					ud_temp->flags |=  UNIT_DIRECTORY_SPECIFIER_ID;
-					ud_temp->specifier_id = ud->specifier_id;
-				}
-				if ((ud->flags & UNIT_DIRECTORY_VERSION) &&
-					!(ud_temp->flags & UNIT_DIRECTORY_VERSION))
-				{
-					ud_temp->flags |=  UNIT_DIRECTORY_VERSION;
-					ud_temp->version = ud->version;
-				}
+				ud_temp->flags |=  UNIT_DIRECTORY_VENDOR_ID;
+				ud_temp->vendor_id = ud->vendor_id;
+			}
+			if ((ud->flags & UNIT_DIRECTORY_MODEL_ID) &&
+				!(ud_temp->flags & UNIT_DIRECTORY_MODEL_ID))
+			{
+				ud_temp->flags |=  UNIT_DIRECTORY_MODEL_ID;
+				ud_temp->model_id = ud->model_id;
+			}
+			if ((ud->flags & UNIT_DIRECTORY_SPECIFIER_ID) &&
+				!(ud_temp->flags & UNIT_DIRECTORY_SPECIFIER_ID))
+			{
+				ud_temp->flags |=  UNIT_DIRECTORY_SPECIFIER_ID;
+				ud_temp->specifier_id = ud->specifier_id;
+			}
+			if ((ud->flags & UNIT_DIRECTORY_VERSION) &&
+				!(ud_temp->flags & UNIT_DIRECTORY_VERSION))
+			{
+				ud_temp->flags |=  UNIT_DIRECTORY_VERSION;
+				ud_temp->version = ud->version;
 			}
 
 			break;
@@ -1025,8 +1027,9 @@
 	struct unit_directory *ud;
 
 	if (ne->nodeid != nodeid) {
-		HPSB_DEBUG("Node " NODE_BUS_FMT " changed to " NODE_BUS_FMT,
-			   NODE_BUS_ARGS(ne->nodeid), NODE_BUS_ARGS(nodeid));
+		HPSB_DEBUG("Node changed: " NODE_BUS_FMT " -> " NODE_BUS_FMT,
+			   NODE_BUS_ARGS(ne->host, ne->nodeid),
+			   NODE_BUS_ARGS(ne->host, nodeid));
 		ne->nodeid = nodeid;
 	}
 
@@ -1057,7 +1060,7 @@
 
 #ifdef CONFIG_IEEE1394_VERBOSEDEBUG
 	HPSB_INFO("Initiating ConfigROM request for node " NODE_BUS_FMT,
-		  NODE_BUS_ARGS(nodeid));
+		  NODE_BUS_ARGS(host, nodeid));
 #endif
 	/* 
 	 * Must retry a few times if config rom read returns zero (how long?). Will
@@ -1070,7 +1073,7 @@
 		if (nodemgr_read_quadlet(host, nodeid, generation,
 					 addr, &buffer[0]) < 0) {
 			HPSB_ERR("ConfigROM quadlet transaction error for node "
-				 NODE_BUS_FMT, NODE_BUS_ARGS(nodeid));
+				 NODE_BUS_FMT, NODE_BUS_ARGS(host, nodeid));
 			return -1;
 		}
 		if (buffer[0])
@@ -1087,14 +1090,14 @@
 	if (header_size == 1) {
 		HPSB_INFO("Node " NODE_BUS_FMT " has a minimal ROM.  "
 			  "Vendor is %08x",
-			  NODE_BUS_ARGS(nodeid), buffer[0] & 0x00ffffff);
+			  NODE_BUS_ARGS(host, nodeid), buffer[0] & 0x00ffffff);
 		return -1;
 	}
 
 	if (header_size < 4) {
 		HPSB_INFO("Node " NODE_BUS_FMT " has non-standard ROM "
 			  "format (%d quads), cannot parse",
-			  NODE_BUS_ARGS(nodeid), header_size);
+			  NODE_BUS_ARGS(host, nodeid), header_size);
 		return -1;
 	}
 
@@ -1103,7 +1106,7 @@
 					 addr, &buffer[i]) < 0) {
 			HPSB_ERR("ConfigROM quadlet transaction "
 				 "error for node " NODE_BUS_FMT,
-				 NODE_BUS_ARGS(nodeid));
+				 NODE_BUS_ARGS(host, nodeid));
 			return -1;
 		}
 	}
@@ -1113,10 +1116,8 @@
 
 static void nodemgr_remove_node(struct node_entry *ne)
 {
-	HPSB_DEBUG("%s removed: Node[" NODE_BUS_FMT "]  GUID[%016Lx]  [%s]",
-		   (ne->host->node_id == ne->nodeid) ? "Host" : "Device",
-		   NODE_BUS_ARGS(ne->nodeid), (unsigned long long)ne->guid,
-		   ne->vendor_name ?: "Unknown");
+	HPSB_DEBUG("Node removed: ID:BUS[" NODE_BUS_FMT "]  GUID[%016Lx]",
+		   NODE_BUS_ARGS(ne->host, ne->nodeid), (unsigned long long)ne->guid);
 
 	nodemgr_free_unit_directories(ne);
 	list_del(&ne->list);
@@ -1151,7 +1152,7 @@
 		 * shouldn't be held responsible, so we'll allow it with a
 		 * warning.  */
 		HPSB_WARN("Node " NODE_BUS_FMT " has invalid busID magic [0x%08x]",
-			 NODE_BUS_ARGS(nodeid), buffer[1]);
+			 NODE_BUS_ARGS(host, nodeid), buffer[1]);
 	}
 
 	guid = ((u64)buffer[3] << 32) | buffer[4];
@@ -1309,11 +1310,12 @@
 	 * happens when we get a bus reset. */
 	while (!down_interruptible(&hi->reset_sem) &&
 	       !down_interruptible(&nodemgr_serialize)) {
-		unsigned int generation;
+		unsigned int generation = 0;
 		int i;
 
-		/* Pause for 1/4 second, to make sure things settle down. */
-		for (i = HZ/4; i > 0; i-= HZ/16) {
+		/* Pause for 1/4 second in 1/16 second intervals,
+		 * to make sure things settle down. */
+		for (i = 0; i < 4 ; i++) {
 			set_current_state(TASK_INTERRUPTIBLE);
 			if (schedule_timeout(HZ/16))
 				goto caught_signal;
@@ -1328,7 +1330,7 @@
 			/* If we get a reset before we are done waiting, then
 			 * start the the waiting over again */
 			while (!down_trylock(&hi->reset_sem))
-				i = HZ/4;
+				i = 0;
 		}
 
 		if (!nodemgr_check_irm_capability(host, reset_cycles++)) {
@@ -1464,7 +1466,7 @@
 
 	if (hi != NULL) {
 #ifdef CONFIG_IEEE1394_VERBOSEDEBUG
-		HPSB_DEBUG ("NodeMgr: Processing host reset for %s", host->driver->name);
+		HPSB_DEBUG ("NodeMgr: Processing host reset for %s", hi->daemon_name);
 #endif
 		up(&hi->reset_sem);
 	} else
diff -urN linux-2.4.22-pre7/drivers/ieee1394/nodemgr.h linux-2.4.22-pre8/drivers/ieee1394/nodemgr.h
--- linux-2.4.22-pre7/drivers/ieee1394/nodemgr.h	2003-07-24 13:19:15.000000000 -0700
+++ linux-2.4.22-pre8/drivers/ieee1394/nodemgr.h	2003-07-24 13:19:19.000000000 -0700
@@ -80,12 +80,14 @@
 	u16	max_rec;	/* Maximum packet size node can receive */
 };
 
-#define UNIT_DIRECTORY_VENDOR_ID	0x01
-#define UNIT_DIRECTORY_MODEL_ID		0x02
-#define UNIT_DIRECTORY_SPECIFIER_ID	0x04
-#define UNIT_DIRECTORY_VERSION		0x08
-#define UNIT_DIRECTORY_VENDOR_TEXT	0x10
-#define UNIT_DIRECTORY_MODEL_TEXT	0x20
+#define UNIT_DIRECTORY_VENDOR_ID		0x01
+#define UNIT_DIRECTORY_MODEL_ID			0x02
+#define UNIT_DIRECTORY_SPECIFIER_ID		0x04
+#define UNIT_DIRECTORY_VERSION			0x08
+#define UNIT_DIRECTORY_VENDOR_TEXT		0x10
+#define UNIT_DIRECTORY_MODEL_TEXT		0x20
+#define UNIT_DIRECTORY_HAS_LUN_DIRECTORY	0x40
+#define UNIT_DIRECTORY_LUN_DIRECTORY		0x80
 
 /*
  * A unit directory corresponds to a protocol supported by the
diff -urN linux-2.4.22-pre7/drivers/ieee1394/ohci1394.c linux-2.4.22-pre8/drivers/ieee1394/ohci1394.c
--- linux-2.4.22-pre7/drivers/ieee1394/ohci1394.c	2003-07-24 13:19:15.000000000 -0700
+++ linux-2.4.22-pre8/drivers/ieee1394/ohci1394.c	2003-07-24 13:19:20.000000000 -0700
@@ -97,6 +97,7 @@
 #include <linux/pci.h>
 #include <linux/fs.h>
 #include <linux/poll.h>
+#include <linux/irq.h>
 #include <asm/byteorder.h>
 #include <asm/atomic.h>
 #include <asm/uaccess.h>
@@ -164,7 +165,7 @@
 printk(level "%s_%d: " fmt "\n" , OHCI1394_DRIVER_NAME, card , ## args)
 
 static char version[] __devinitdata =
-	"$Rev: 952 $ Ben Collins <bcollins@debian.org>";
+	"$Rev: 1010 $ Ben Collins <bcollins@debian.org>";
 
 /* Module Parameters */
 MODULE_PARM(phys_dma,"i");
@@ -502,6 +503,7 @@
 /* Global initialization */
 static void ohci_initialize(struct ti_ohci *ohci)
 {
+	char irq_buf[16];
 	quadlet_t buf;
 
 	spin_lock_init(&ohci->phy_reg_lock);
@@ -601,10 +603,15 @@
 	reg_write(ohci, OHCI1394_HCControlSet, OHCI1394_HCControl_linkEnable);
 
 	buf = reg_read(ohci, OHCI1394_Version);
-	PRINT(KERN_INFO, ohci->id, "OHCI-1394 %d.%d (PCI): IRQ=[%d]  "
+#ifndef __sparc__
+	sprintf (irq_buf, "%d", ohci->dev->irq);
+#else
+	sprintf (irq_buf, "%s", __irq_itoa(ohci->dev->irq));
+#endif
+	PRINT(KERN_INFO, ohci->id, "OHCI-1394 %d.%d (PCI): IRQ=[%s]  "
 	      "MMIO=[%lx-%lx]  Max Packet=[%d]",
 	      ((((buf) >> 16) & 0xf) + (((buf) >> 20) & 0xf) * 10),
-	      ((((buf) >> 4) & 0xf) + ((buf) & 0xf) * 10), ohci->dev->irq,
+	      ((((buf) >> 4) & 0xf) + ((buf) & 0xf) * 10), irq_buf,
 	      pci_resource_start(ohci->dev, 0),
 	      pci_resource_start(ohci->dev, 0) + OHCI1394_REGISTER_SIZE - 1,
 	      ohci->max_packet_size);
@@ -625,7 +632,7 @@
 
 	DBGMSG(ohci->id, "Inserting packet for node " NODE_BUS_FMT
 	       ", tlabel=%d, tcode=0x%x, speed=%d",
-	       NODE_BUS_ARGS(packet->node_id), packet->tlabel,
+	       NODE_BUS_ARGS(ohci->host, packet->node_id), packet->tlabel,
 	       packet->tcode, packet->speed_code);
 
 	d->prg_cpu[idx]->begin.address = 0;
@@ -650,8 +657,8 @@
 
                 if (packet->type == hpsb_raw) {
 			d->prg_cpu[idx]->data[0] = cpu_to_le32(OHCI1394_TCODE_PHY<<4);
-                        d->prg_cpu[idx]->data[1] = packet->header[0];
-                        d->prg_cpu[idx]->data[2] = packet->header[1];
+                        d->prg_cpu[idx]->data[1] = cpu_to_le32(packet->header[0]);
+                        d->prg_cpu[idx]->data[2] = cpu_to_le32(packet->header[1]);
                 } else {
                         d->prg_cpu[idx]->data[0] = packet->speed_code<<16 |
                                 (packet->header[0] & 0xFFFF);
@@ -810,8 +817,7 @@
 	}
 
 	if (d->free_prgs == 0)
-		PRINT(KERN_INFO, ohci->id, 
-		      "Transmit DMA FIFO ctx=%d is full... waiting",d->ctx);
+		DBGMSG(ohci->id, "Transmit DMA FIFO ctx=%d is full... waiting", d->ctx);
 
 	/* Is the context running ? (should be unless it is 
 	   the first packet to be sent in this context) */
@@ -1156,8 +1162,7 @@
 	u32 ContextMatch;
 };
 
-static void ohci_iso_recv_bufferfill_task(unsigned long data);
-static void ohci_iso_recv_packetperbuf_task(unsigned long data);
+static void ohci_iso_recv_task(unsigned long data);
 static void ohci_iso_recv_stop(struct hpsb_iso *iso);
 static void ohci_iso_recv_shutdown(struct hpsb_iso *iso);
 static int  ohci_iso_recv_start(struct hpsb_iso *iso, int cycle, int tag_mask, int sync);
@@ -1247,10 +1252,7 @@
 	ohci1394_init_iso_tasklet(&recv->task,
 				  iso->channel == -1 ? OHCI_ISO_MULTICHANNEL_RECEIVE :
 				                       OHCI_ISO_RECEIVE,
-				  recv->dma_mode == BUFFER_FILL_MODE ?
-				  ohci_iso_recv_bufferfill_task :
-				  ohci_iso_recv_packetperbuf_task,
-				  (unsigned long) iso);
+				  ohci_iso_recv_task, (unsigned long) iso);
 
 	if (ohci1394_register_iso_tasklet(recv->ohci, &recv->task) < 0)
 		goto err;
@@ -1675,18 +1677,14 @@
 		hpsb_iso_wake(iso);
 }
 
-static void ohci_iso_recv_bufferfill_task(unsigned long data)
+static void ohci_iso_recv_bufferfill_task(struct hpsb_iso *iso, struct ohci_iso_recv *recv)
 {
-	struct hpsb_iso *iso = (struct hpsb_iso*) data;
-	struct ohci_iso_recv *recv = iso->hostdata;
-
 	int loop;
 
 	/* loop over all blocks */
 	for (loop = 0; loop < recv->nblocks; loop++) {
 		
 		/* check block_dma to see if it's done */
-		
 		struct dma_cmd *im = &recv->block[recv->block_dma];
 		
 		/* check the DMA descriptor for new writes to xferStatus */
@@ -1736,10 +1734,8 @@
 	ohci_iso_recv_bufferfill_parse(iso, recv);
 }
 
-static void ohci_iso_recv_packetperbuf_task(unsigned long data)
+static void ohci_iso_recv_packetperbuf_task(struct hpsb_iso *iso, struct ohci_iso_recv *recv)
 {
-	struct hpsb_iso *iso = (struct hpsb_iso*) data;
-	struct ohci_iso_recv *recv = iso->hostdata;
 	int count;
 	int wake = 0;
 	
@@ -1813,6 +1809,16 @@
 		hpsb_iso_wake(iso);
 }
 
+static void ohci_iso_recv_task(unsigned long data)
+{
+	struct hpsb_iso *iso = (struct hpsb_iso*) data;
+	struct ohci_iso_recv *recv = iso->hostdata;
+
+	if (recv->dma_mode == BUFFER_FILL_MODE)
+		ohci_iso_recv_bufferfill_task(iso, recv);
+	else
+		ohci_iso_recv_packetperbuf_task(iso, recv);
+}
 
 /***********************************
  * rawiso ISO transmission         *
@@ -2135,6 +2141,9 @@
 	case RECV_RELEASE:
 		ohci_iso_recv_release(iso, (struct hpsb_iso_packet_info*) arg);
 		return 0;
+	case RECV_FLUSH:
+		ohci_iso_recv_task((unsigned long) iso);
+		return 0;
 	case RECV_SHUTDOWN:
 		ohci_iso_recv_shutdown(iso);
 		return 0;
@@ -3477,7 +3486,31 @@
 	case OHCI_INIT_DONE:
 		hpsb_remove_host(ohci->host);
 
+		/* Clear out BUS Options */
+		reg_write(ohci, OHCI1394_ConfigROMhdr, 0);
+		reg_write(ohci, OHCI1394_BusOptions,
+			  (reg_read(ohci, OHCI1394_BusOptions) & 0x0000f007) |
+			  0x00ff0000);
+		memset(ohci->csr_config_rom_cpu, 0, OHCI_CONFIG_ROM_LEN);
+
 	case OHCI_INIT_HAVE_IRQ:
+		/* Clear interrupt registers */
+		reg_write(ohci, OHCI1394_IntMaskClear, 0xffffffff);
+		reg_write(ohci, OHCI1394_IntEventClear, 0xffffffff);
+		reg_write(ohci, OHCI1394_IsoXmitIntMaskClear, 0xffffffff);
+		reg_write(ohci, OHCI1394_IsoXmitIntEventClear, 0xffffffff);
+		reg_write(ohci, OHCI1394_IsoRecvIntMaskClear, 0xffffffff);
+		reg_write(ohci, OHCI1394_IsoRecvIntEventClear, 0xffffffff);
+
+		/* Disable IRM Contender */
+		set_phy_reg(ohci, 4, ~0xc0 & get_phy_reg(ohci, 4));
+		
+		/* Clear link control register */
+		reg_write(ohci, OHCI1394_LinkControlClear, 0xffffffff);
+
+		/* Let all other nodes know to ignore us */
+		ohci_devctl(ohci->host, RESET_BUS, LONG_RESET_NO_FORCE_ROOT);
+
 		/* Soft reset before we start - this disables
 		 * interrupts and clears linkEnable and LPS. */
 		ohci_soft_reset(ohci);
diff -urN linux-2.4.22-pre7/drivers/ieee1394/pcilynx.c linux-2.4.22-pre8/drivers/ieee1394/pcilynx.c
--- linux-2.4.22-pre7/drivers/ieee1394/pcilynx.c	2003-06-13 07:51:34.000000000 -0700
+++ linux-2.4.22-pre8/drivers/ieee1394/pcilynx.c	2003-07-24 13:19:20.000000000 -0700
@@ -41,6 +41,7 @@
 #include <linux/pci.h>
 #include <linux/fs.h>
 #include <linux/poll.h>
+#include <linux/irq.h>
 #include <asm/byteorder.h>
 #include <asm/atomic.h>
 #include <asm/io.h>
@@ -1459,6 +1460,14 @@
         case have_intr:
                 reg_write(lynx, PCI_INT_ENABLE, 0);
                 free_irq(lynx->dev->irq, lynx);
+
+		/* Disable IRM Contender */
+		if (lynx->phyic.reg_1394a)
+			set_phy_reg(lynx, 4, ~0xc0 & get_phy_reg(lynx, 4));
+
+		/* Let all other nodes know to ignore us */
+		lynx_devctl(lynx->host, RESET_BUS, LONG_RESET_NO_FORCE_ROOT);
+
         case have_iomappings:
                 reg_set_bits(lynx, MISC_CONTROL, MISC_CONTROL_SWRESET);
                 /* Fix buggy cards with autoboot pin not tied low: */
@@ -1506,6 +1515,7 @@
         return error; \
         } while (0)
 
+	char irq_buf[16];
 	struct hpsb_host *host;
         struct ti_lynx *lynx; /* shortcut to currently handled device */
         struct ti_pcl pcl;
@@ -1605,12 +1615,18 @@
         /* Fix buggy cards with autoboot pin not tied low: */
         reg_write(lynx, DMA0_CHAN_CTRL, 0);
 
+#ifndef __sparc__
+	sprintf (irq_buf, "%d", dev->irq);
+#else
+	sprintf (irq_buf, "%s", __irq_itoa(dev->irq));
+#endif
+
         if (!request_irq(dev->irq, lynx_irq_handler, SA_SHIRQ,
                          PCILYNX_DRIVER_NAME, lynx)) {
-                PRINT(KERN_INFO, lynx->id, "allocated interrupt %d", dev->irq);
+                PRINT(KERN_INFO, lynx->id, "allocated interrupt %s", irq_buf);
                 lynx->state = have_intr;
         } else {
-                FAIL("failed to allocate shared interrupt %d", dev->irq);
+                FAIL("failed to allocate shared interrupt %s", irq_buf);
         }
 
         /* alloc_pcl return values are not checked, it is expected that the
diff -urN linux-2.4.22-pre7/drivers/ieee1394/raw1394.c linux-2.4.22-pre8/drivers/ieee1394/raw1394.c
--- linux-2.4.22-pre7/drivers/ieee1394/raw1394.c	2003-07-24 13:19:15.000000000 -0700
+++ linux-2.4.22-pre8/drivers/ieee1394/raw1394.c	2003-07-24 13:19:20.000000000 -0700
@@ -1567,8 +1567,8 @@
               req->req.length, ((req->req.misc >> 8) & 0xFF),
               (req->req.misc & 0xFF),((req->req.misc >> 16) & 0xFFFF));
         /* check addressrange */
-        if ((((req->req.address) & ~(0xFFFFFFFFFFFF)) != 0) ||
-                (((req->req.address + req->req.length) & ~(0xFFFFFFFFFFFF)) != 0)) {
+        if ((((req->req.address) & ~((u64)0xFFFFFFFFFFFFLL)) != 0) ||
+                (((req->req.address + req->req.length) & ~((u64)0xFFFFFFFFFFFFLL)) != 0)) {
                 req->req.length = 0;
                 return (-EINVAL);
         }
@@ -2274,6 +2274,8 @@
 			return raw1394_iso_recv_packets(fi, (void*) arg);
 		case RAW1394_IOC_ISO_RECV_RELEASE_PACKETS:
 			return hpsb_iso_recv_release_packets(fi->iso_handle, arg);
+		case RAW1394_IOC_ISO_RECV_FLUSH:
+			return hpsb_iso_recv_flush(fi->iso_handle);
 		case RAW1394_IOC_ISO_SHUTDOWN:
 			raw1394_iso_shutdown(fi);
 			return 0;
diff -urN linux-2.4.22-pre7/drivers/ieee1394/sbp2.c linux-2.4.22-pre8/drivers/ieee1394/sbp2.c
--- linux-2.4.22-pre7/drivers/ieee1394/sbp2.c	2003-07-24 13:19:15.000000000 -0700
+++ linux-2.4.22-pre8/drivers/ieee1394/sbp2.c	2003-07-24 13:19:20.000000000 -0700
@@ -57,6 +57,8 @@
 #include <linux/blk.h>
 #include <linux/smp_lock.h>
 #include <linux/init.h>
+#include <linux/pci.h>
+
 #include <asm/current.h>
 #include <asm/uaccess.h>
 #include <asm/io.h>
@@ -87,7 +89,7 @@
 #include "sbp2.h"
 
 static char version[] __devinitdata =
-	"$Rev: 953 $ Ben Collins <bcollins@debian.org>";
+	"$Rev: 1010 $ Ben Collins <bcollins@debian.org>";
 
 /*
  * Module load parameter definitions
@@ -636,7 +638,14 @@
 {
 	struct sbp2scsi_host_info *hi;
 
-	SBP2_DEBUG("sbp2_probe");
+	SBP2_DEBUG(__FUNCTION__);
+
+	/* Don't probe UD's that have the LUN flag. We'll probe the LUN(s)
+	 * instead. */
+	if (ud->flags & UNIT_DIRECTORY_HAS_LUN_DIRECTORY)
+		return -1;
+
+	/* This will only add it if it doesn't exist */
 	hi = sbp2_add_host(ud->ne->host);
 
 	if (!hi)
@@ -1161,7 +1170,7 @@
 
 	SBP2_DEBUG("sbp2_query_logins: orb byte-swapped");
 
-	sbp2util_packet_dump(scsi_id->query_logins_orb, sizeof(stuct sbp2_query_logins_orb),
+	sbp2util_packet_dump(scsi_id->query_logins_orb, sizeof(struct sbp2_query_logins_orb),
 			     "sbp2 query logins orb", scsi_id->query_logins_orb_dma);
 
 	memset(scsi_id->query_logins_response, 0, sizeof(struct sbp2_query_logins_response));
@@ -1645,7 +1654,7 @@
 			SBP2_128KB_BROKEN_FIRMWARE &&
 			(sbp2_max_sectors * 512) > (128 * 1024)) {
 		SBP2_WARN("Node " NODE_BUS_FMT ": Bridge only supports 128KB max transfer size.",
-				NODE_BUS_ARGS(ud->ne->nodeid));
+				NODE_BUS_ARGS(ud->ne->host, ud->ne->nodeid));
 		SBP2_WARN("WARNING: Current sbp2_max_sectors setting is larger than 128KB (%d sectors)!",
 				sbp2_max_sectors);
 		workarounds |= SBP2_BREAKAGE_128K_MAX_TRANSFER;
@@ -1658,36 +1667,42 @@
 		if ((firmware_revision & 0xffff00) ==
 				sbp2_broken_inquiry_list[i]) {
 			SBP2_WARN("Node " NODE_BUS_FMT ": Using 36byte inquiry workaround",
-					NODE_BUS_ARGS(ud->ne->nodeid));
+					NODE_BUS_ARGS(ud->ne->host, ud->ne->nodeid));
 			workarounds |= SBP2_BREAKAGE_INQUIRY_HACK;
 			break; /* No need to continue. */
 		}
 	}
 
-	/* If our list is empty, add a base scsi_id (happens in a normal
-	 * case where there is no logical_unit_number entry */
-	if (list_empty(&scsi_group->scsi_id_list)) {
-		scsi_id = kmalloc(sizeof(*scsi_id), GFP_KERNEL);
-		if (!scsi_id) {
-			SBP2_ERR("Out of memory adding scsi_id");
-			return;
-		}
-		memset(scsi_id, 0, sizeof(*scsi_id));
-
-		scsi_id->sbp2_device_type_and_lun = SBP2_DEVICE_TYPE_LUN_UNINITIALIZED;
-		list_add_tail(&scsi_id->list, &scsi_group->scsi_id_list);
-	}
+	/* If this is a logical unit directory entry, process the parent
+	 * to get the common values. */
+	if (ud->flags & UNIT_DIRECTORY_LUN_DIRECTORY) {
+		sbp2_parse_unit_directory(scsi_group, ud->parent);
+	} else {
+		/* If our list is empty, add a base scsi_id (happens in a normal
+		 * case where there is no logical_unit_number entry */
+		if (list_empty(&scsi_group->scsi_id_list)) {
+			scsi_id = kmalloc(sizeof(*scsi_id), GFP_KERNEL);
+			if (!scsi_id) {
+				SBP2_ERR("Out of memory adding scsi_id");
+				return;
+			}
+			memset(scsi_id, 0, sizeof(*scsi_id));
 
-	/* Update the generic fields in all the LUN's */
-	list_for_each (lh, &scsi_group->scsi_id_list) {
-		scsi_id = list_entry(lh, struct scsi_id_instance_data, list);
+			scsi_id->sbp2_device_type_and_lun = SBP2_DEVICE_TYPE_LUN_UNINITIALIZED;
+			list_add_tail(&scsi_id->list, &scsi_group->scsi_id_list);
+		}
 
-		scsi_id->sbp2_management_agent_addr = management_agent_addr;
-		scsi_id->sbp2_command_set_spec_id = command_set_spec_id;
-		scsi_id->sbp2_command_set = command_set;
-		scsi_id->sbp2_unit_characteristics = unit_characteristics;
-		scsi_id->sbp2_firmware_revision = firmware_revision;
-		scsi_id->workarounds = workarounds;
+		/* Update the generic fields in all the LUN's */
+		list_for_each (lh, &scsi_group->scsi_id_list) {
+			scsi_id = list_entry(lh, struct scsi_id_instance_data, list);
+
+			scsi_id->sbp2_management_agent_addr = management_agent_addr;
+			scsi_id->sbp2_command_set_spec_id = command_set_spec_id;
+			scsi_id->sbp2_command_set = command_set;
+			scsi_id->sbp2_unit_characteristics = unit_characteristics;
+			scsi_id->sbp2_firmware_revision = firmware_revision;
+			scsi_id->workarounds = workarounds;
+		}
 	}
 }
 
@@ -1722,8 +1737,9 @@
 	scsi_id->max_payload_size = min(sbp2_speedto_max_payload[scsi_id->speed_code],
 					(u8)(((be32_to_cpu(hi->host->csr.rom[2]) >> 12) & 0xf) - 1));
 
-	SBP2_ERR("Node[" NODE_BUS_FMT "]: Max speed [%s] - Max payload [%u]",
-		 NODE_BUS_ARGS(scsi_id->ne->nodeid), hpsb_speedto_str[scsi_id->speed_code],
+	SBP2_ERR("Node " NODE_BUS_FMT ": Max speed [%s] - Max payload [%u]",
+		 NODE_BUS_ARGS(hi->host, scsi_id->ne->nodeid),
+		 hpsb_speedto_str[scsi_id->speed_code],
 		 1 << ((u32)scsi_id->max_payload_size + 2));
 
 	return(0);
@@ -2899,7 +2915,6 @@
 
 	SPRINTF("Host scsi%d             : SBP-2 IEEE-1394 (%s)\n", hostno,
 		host->driver->name);
-	SPRINTF("Driver version         : %s\n", version);
 
 	SPRINTF("\nModule options         :\n");
 	SPRINTF("  max_speed            : %s\n", hpsb_speedto_str[sbp2_max_speed]);
@@ -2974,6 +2989,8 @@
 {
 	SBP2_DEBUG("sbp2_module_init");
 
+	printk(KERN_INFO "sbp2: %s\n", version);
+
 	/* Module load debug option to force one command at a time (serializing I/O) */
 	if (sbp2_serialize_io) {
 		SBP2_ERR("Driver forced to serialize I/O (serialize_io = 1)");
diff -urN linux-2.4.22-pre7/drivers/net/Config.in linux-2.4.22-pre8/drivers/net/Config.in
--- linux-2.4.22-pre7/drivers/net/Config.in	2003-07-24 13:19:15.000000000 -0700
+++ linux-2.4.22-pre8/drivers/net/Config.in	2003-07-24 13:19:20.000000000 -0700
@@ -311,8 +311,8 @@
    if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
       dep_tristate '  PPP over Ethernet (EXPERIMENTAL)' CONFIG_PPPOE $CONFIG_PPP
    fi
-   if [ ! "$CONFIG_ATM" = "n" ]; then
-      dep_tristate '  PPP over ATM (EXPERIMENTAL)' CONFIG_PPPOATM $CONFIG_PPP $CONFIG_EXPERIMENTAL $CONFIG_ATM
+   if [ "$CONFIG_ATM" = "y" -o "$CONFIG_ATM" = "m" ]; then
+      dep_tristate '  PPP over ATM (EXPERIMENTAL)' CONFIG_PPPOATM $CONFIG_PPP $CONFIG_ATM
    fi
 fi
 
diff -urN linux-2.4.22-pre7/drivers/net/e100/e100_main.c linux-2.4.22-pre8/drivers/net/e100/e100_main.c
--- linux-2.4.22-pre7/drivers/net/e100/e100_main.c	2003-07-24 13:19:15.000000000 -0700
+++ linux-2.4.22-pre8/drivers/net/e100/e100_main.c	2003-07-24 13:19:20.000000000 -0700
@@ -46,6 +46,13 @@
 
 /* Change Log
  * 
+ * 2.3.18       07/08/03
+ * o Bug fix: read skb->len after freeing skb
+ *   [Andrew Morton] akpm@zip.com.au
+ * o Bug fix: 82557 (with National PHY) timeout during init
+ *   [Adam Kropelin] akropel1@rochester.rr.com
+ * o Feature add: allow to change Wake On LAN when EEPROM disabled
+ * 
  * 2.3.13       05/08/03
  * o Feature remove: /proc/net/PRO_LAN_Adapters support gone completely
  * o Feature remove: IDIAG support (use ethtool -t instead)
@@ -65,20 +72,6 @@
  * o Bug fix: statistic command failure would stop statistic collection.
  * 
  * 2.2.21	02/11/03
- * o Removed marketing brand strings. Instead, Using generic string 
- *   "Intel(R) PRO/100 Network Connection" for all adapters.
- * o Implemented ethtool -S option
- * o Strip /proc/net/PRO_LAN_Adapters files for kernel driver
- * o Bug fix: Read wrong byte in EEPROM when offset is odd number
- * o Bug fix: PHY loopback test fails on ICH devices
- * o Bug fix: System panic on e100_close when repeating Hot Remove and 
- *   Add in a team
- * o Bug fix: Linux Bonding driver claims adapter's link loss because of
- *   not updating last_rx field
- * o Bug fix: e100 does not check validity of MAC address
- * o New feature: added ICH5 support
- * 
- * 2.1.27	11/20/02
  */
  
 #include <linux/config.h>
@@ -144,7 +137,7 @@
 static inline void e100_tx_skb_free(struct e100_private *bdp, tcb_t *tcb);
 /* Global Data structures and variables */
 char e100_copyright[] __devinitdata = "Copyright (c) 2003 Intel Corporation";
-char e100_driver_version[]="2.3.13-k1";
+char e100_driver_version[]="2.3.18-k1";
 const char *e100_full_driver_name = "Intel(R) PRO/100 Network Driver";
 char e100_short_driver_name[] = "e100";
 static int e100nics = 0;
@@ -688,17 +681,16 @@
 
 	bdp->wolsupported = 0;
 	bdp->wolopts = 0;
+	if (bdp->rev_id >= D101A4_REV_ID)
+		bdp->wolsupported = WAKE_PHY | WAKE_MAGIC;
+	if (bdp->rev_id >= D101MA_REV_ID)
+		bdp->wolsupported |= WAKE_UCAST | WAKE_ARP;
 	
 	/* Check if WoL is enabled on EEPROM */
 	if (e100_eeprom_read(bdp, EEPROM_ID_WORD) & BIT_5) {
 		/* Magic Packet WoL is enabled on device by default */
 		/* if EEPROM WoL bit is TRUE                        */
-		bdp->wolsupported = WAKE_MAGIC;
 		bdp->wolopts = WAKE_MAGIC;
-		if (bdp->rev_id >= D101A4_REV_ID)
-			bdp->wolsupported = WAKE_PHY | WAKE_MAGIC;
-		if (bdp->rev_id >= D101MA_REV_ID)
-			bdp->wolsupported |= WAKE_UCAST | WAKE_ARP;
 	}
 
 	printk(KERN_NOTICE "\n");
@@ -1084,10 +1076,10 @@
 		goto exit1;
 	}
 
-	e100_prepare_xmit_buff(bdp, skb);
-
 	bdp->drv_stats.net_stats.tx_bytes += skb->len;
 
+	e100_prepare_xmit_buff(bdp, skb);
+
 	dev->trans_start = jiffies;
 
 exit1:
@@ -2066,13 +2058,14 @@
 			skb->ip_summed = CHECKSUM_NONE;
 		}
 
+		bdp->drv_stats.net_stats.rx_bytes += skb->len;
+
 		if(bdp->vlgrp && (rfd_status & CB_STATUS_VLAN)) {
 			vlan_hwaccel_rx(skb, bdp->vlgrp, be16_to_cpu(rfd->vlanid));
 		} else {
 			netif_rx(skb);
 		}
 		dev->last_rx = jiffies;
-		bdp->drv_stats.net_stats.rx_bytes += skb->len;
 		
 		rfd_cnt++;
 	}			/* end of rfd loop */
@@ -4255,13 +4248,13 @@
 static int
 e100_notify_reboot(struct notifier_block *nb, unsigned long event, void *p)
 {
-        struct pci_dev *pdev;
+        struct pci_dev *pdev = NULL;
 	
         switch(event) {
         case SYS_DOWN:
         case SYS_HALT:
         case SYS_POWER_OFF:
-                pci_for_each_dev(pdev) {
+		while ((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL) {
                         if(pci_dev_driver(pdev) == &e100_driver) {
 				/* If net_device struct is allocated? */
                                 if (pci_get_drvdata(pdev))
diff -urN linux-2.4.22-pre7/drivers/net/e100/e100_phy.c linux-2.4.22-pre8/drivers/net/e100/e100_phy.c
--- linux-2.4.22-pre7/drivers/net/e100/e100_phy.c	2003-07-24 13:19:15.000000000 -0700
+++ linux-2.4.22-pre8/drivers/net/e100/e100_phy.c	2003-07-24 13:19:20.000000000 -0700
@@ -919,6 +919,7 @@
 unsigned char __devinit
 e100_phy_init(struct e100_private *bdp)
 {
+	e100_phy_reset(bdp);
 	e100_phy_address_detect(bdp);
 	e100_phy_isolate(bdp);
 	e100_phy_id_detect(bdp);
@@ -930,7 +931,6 @@
 	bdp->PhyDelay = 0;
 	bdp->zlock_state = ZLOCK_INITIAL;
 
-	e100_phy_reset(bdp);
 	e100_phy_set_speed_duplex(bdp, false);
 	e100_fix_polarity(bdp);
 
diff -urN linux-2.4.22-pre7/drivers/net/e1000/e1000.h linux-2.4.22-pre8/drivers/net/e1000/e1000.h
--- linux-2.4.22-pre7/drivers/net/e1000/e1000.h	2003-07-24 13:19:15.000000000 -0700
+++ linux-2.4.22-pre8/drivers/net/e1000/e1000.h	2003-07-24 13:19:20.000000000 -0700
@@ -224,6 +224,5 @@
 
 
 	uint32_t pci_state[16];
-	char ifname[IFNAMSIZ];
 };
 #endif /* _E1000_H_ */
diff -urN linux-2.4.22-pre7/drivers/net/e1000/e1000_ethtool.c linux-2.4.22-pre8/drivers/net/e1000/e1000_ethtool.c
--- linux-2.4.22-pre7/drivers/net/e1000/e1000_ethtool.c	2003-07-24 13:19:15.000000000 -0700
+++ linux-2.4.22-pre8/drivers/net/e1000/e1000_ethtool.c	2003-07-24 13:19:20.000000000 -0700
@@ -1112,8 +1112,9 @@
 
 		if(if_running)
 			e1000_down(adapter);
-
-		e1000_reset(adapter);
+		else
+			e1000_reset(adapter);
+		
 		if(e1000_reg_test(adapter, &data[0]))
 			eth_test->flags |= ETH_TEST_FL_FAILED;
 
diff -urN linux-2.4.22-pre7/drivers/net/e1000/e1000_hw.c linux-2.4.22-pre8/drivers/net/e1000/e1000_hw.c
--- linux-2.4.22-pre7/drivers/net/e1000/e1000_hw.c	2003-07-24 13:19:15.000000000 -0700
+++ linux-2.4.22-pre8/drivers/net/e1000/e1000_hw.c	2003-07-24 13:19:20.000000000 -0700
@@ -135,6 +135,41 @@
 
         e1000_write_phy_reg(hw,IGP01E1000_PHY_PAGE_SELECT,0x0000);
         e1000_write_phy_reg(hw,0x0000,0x3300);
+
+
+        if(hw->mac_type == e1000_82547) {
+            uint16_t fused, fine, coarse;
+
+            /* Move to analog registers page */
+            e1000_write_phy_reg(hw, IGP01E1000_PHY_PAGE_SELECT, 
+                                IGP01E1000_ANALOG_REGS_PAGE);
+
+            e1000_read_phy_reg(hw, IGP01E1000_ANALOG_SPARE_FUSE_STATUS, &fused);
+
+            if(!(fused & IGP01E1000_ANALOG_SPARE_FUSE_ENABLED)) {
+                e1000_read_phy_reg(hw, IGP01E1000_ANALOG_FUSE_STATUS, &fused);
+
+                fine = fused & IGP01E1000_ANALOG_FUSE_FINE_MASK;
+                coarse = fused & IGP01E1000_ANALOG_FUSE_COARSE_MASK;
+
+                if(coarse > IGP01E1000_ANALOG_FUSE_COARSE_THRESH) {
+                    coarse -= IGP01E1000_ANALOG_FUSE_COARSE_10;
+                    fine -= IGP01E1000_ANALOG_FUSE_FINE_1;
+                } else if(coarse == IGP01E1000_ANALOG_FUSE_COARSE_THRESH)
+                    fine -= IGP01E1000_ANALOG_FUSE_FINE_10;
+
+                fused = (fused & IGP01E1000_ANALOG_FUSE_POLY_MASK) | 
+                        (fine & IGP01E1000_ANALOG_FUSE_FINE_MASK) | 
+                        (coarse & IGP01E1000_ANALOG_FUSE_COARSE_MASK);
+
+                e1000_write_phy_reg(hw, IGP01E1000_ANALOG_FUSE_CONTROL, fused);
+                e1000_write_phy_reg(hw, IGP01E1000_ANALOG_FUSE_BYPASS, 
+                                    IGP01E1000_ANALOG_FUSE_ENABLE_SW_CONTROL);
+            }
+            /* Return to first page of registers */
+            e1000_write_phy_reg(hw, IGP01E1000_PHY_PAGE_SELECT,
+                                IGP01E1000_IEEE_REGS_PAGE);
+        }
     }
 }
 
@@ -259,10 +294,20 @@
 	msec_delay(5);
     }
 
-    if(hw->mac_type > e1000_82543)
-        E1000_WRITE_REG_IO(hw, CTRL, (ctrl | E1000_CTRL_RST));
-    else
-        E1000_WRITE_REG(hw, CTRL, (ctrl | E1000_CTRL_RST));
+    switch(hw->mac_type) {
+        case e1000_82544:
+        case e1000_82540:
+        case e1000_82545:
+        case e1000_82546:
+        case e1000_82541:
+            /* These controllers can't ack the 64-bit write when issuing the
+             * reset, so use IO-mapping as a workaround to issue the reset */
+            E1000_WRITE_REG_IO(hw, CTRL, (ctrl | E1000_CTRL_RST));
+            break;
+        default:
+            E1000_WRITE_REG(hw, CTRL, (ctrl | E1000_CTRL_RST));
+            break;
+    }
 
     /* Force a reload from the EEPROM if necessary */
     if(hw->mac_type < e1000_82540) {
@@ -687,7 +732,8 @@
 static int32_t
 e1000_setup_copper_link(struct e1000_hw *hw)
 {
-    uint32_t ctrl, led_ctrl;
+    uint32_t ctrl;
+    uint32_t led_ctrl;
     int32_t ret_val;
     uint16_t i;
     uint16_t phy_data;
@@ -2249,7 +2295,8 @@
 void
 e1000_phy_hw_reset(struct e1000_hw *hw)
 {
-    uint32_t ctrl, ctrl_ext, led_ctrl;
+    uint32_t ctrl, ctrl_ext;
+    uint32_t led_ctrl;
 
     DEBUGFUNC("e1000_phy_hw_reset");
 
diff -urN linux-2.4.22-pre7/drivers/net/e1000/e1000_hw.h linux-2.4.22-pre8/drivers/net/e1000/e1000_hw.h
--- linux-2.4.22-pre7/drivers/net/e1000/e1000_hw.h	2003-07-24 13:19:15.000000000 -0700
+++ linux-2.4.22-pre8/drivers/net/e1000/e1000_hw.h	2003-07-24 13:19:20.000000000 -0700
@@ -1668,6 +1668,7 @@
 #define M88E1000_EXT_PHY_SPEC_CTRL 0x14  /* Extended PHY Specific Control */
 #define M88E1000_RX_ERR_CNTR       0x15  /* Receive Error Counter */
 
+#define IGP01E1000_IEEE_REGS_PAGE  0x0000
 /* IGP01E1000 Specific Registers */
 #define IGP01E1000_PHY_PORT_CONFIG 0x10 /* PHY Specific Port Config Register */
 #define IGP01E1000_PHY_PORT_STATUS 0x11 /* PHY Specific Status Register */
@@ -1690,6 +1691,7 @@
  * speed = 1000 Mbps. */
 #define IGP01E1000_PHY_PCS_INIT_REG  0x00B4
 
+#define IGP01E1000_ANALOG_REGS_PAGE  0x20C0
 
 #define MAX_PHY_REG_ADDRESS 0x1F        /* 5 bit address bus (0-0x1F) */
 
@@ -1980,6 +1982,22 @@
 #define IGP01E1000_GMII_FLEX_SPD               0x10 /* Enable flexible speed
                                                      * on Link-Up */
 #define IGP01E1000_GMII_SPD                    0x20 /* Enable SPD */
+/* IGP01E1000 Analog Register */
+#define IGP01E1000_ANALOG_SPARE_FUSE_STATUS         0x0011
+#define IGP01E1000_ANALOG_FUSE_STATUS               0x0010
+#define IGP01E1000_ANALOG_FUSE_CONTROL              0x001C
+#define IGP01E1000_ANALOG_FUSE_BYPASS               0x001E
+
+#define IGP01E1000_ANALOG_FUSE_POLY_MASK            0xF000
+#define IGP01E1000_ANALOG_FUSE_FINE_MASK            0x0F80
+#define IGP01E1000_ANALOG_FUSE_COARSE_MASK          0x0070
+#define IGP01E1000_ANALOG_SPARE_FUSE_ENABLED        0x0100
+#define IGP01E1000_ANALOG_FUSE_ENABLE_SW_CONTROL    0x0002
+
+#define IGP01E1000_ANALOG_FUSE_COARSE_THRESH        0x0040
+#define IGP01E1000_ANALOG_FUSE_COARSE_10            0x0010
+#define IGP01E1000_ANALOG_FUSE_FINE_1               0x0080
+#define IGP01E1000_ANALOG_FUSE_FINE_10              0x0500
 
 /* Bit definitions for valid PHY IDs. */
 #define M88E1000_E_PHY_ID  0x01410C50
diff -urN linux-2.4.22-pre7/drivers/net/e1000/e1000_main.c linux-2.4.22-pre8/drivers/net/e1000/e1000_main.c
--- linux-2.4.22-pre7/drivers/net/e1000/e1000_main.c	2003-07-24 13:19:15.000000000 -0700
+++ linux-2.4.22-pre8/drivers/net/e1000/e1000_main.c	2003-07-24 13:19:20.000000000 -0700
@@ -30,6 +30,14 @@
 
 /* Change Log
  *
+ * 5.1.13	5/28/03
+ *   o Bug fix: request_irq() failure resulted in freeing resources twice!
+ *     [Don Fry (brazilnut@us.ibm.com)]
+ *   o Bug fix: fix VLAN support on ppc64 [Mark Rakes (mrakes@vivato.net)]
+ *   o Bug fix: missing Tx cleanup opportunities during interrupt handling.
+ *   o Bug fix: alloc_etherdev failure didn't cleanup regions in probe.
+ *   o Cleanup: s/int/unsigned int/ for descriptor ring indexes.
+ *   
  * 5.1.11	5/6/03
  *   o Feature: Added support for 82546EB (Quad-port) hardware.
  *   o Feature: Added support for Diagnostics through Ethtool.
@@ -38,26 +46,11 @@
  *   o Bug fix: TSO bug fixes.
  *
  * 5.0.42	3/5/03
- *   o Feature: Added support for 82541 and 82547 hardware.
- *   o Feature: Added support for Intel Gigabit PHY (IGP) and a variety of
- *   eeproms.
- *   o Feature: Added support for TCP Segmentation Offload (TSO).
- *   o Feature: Added MII ioctl.
- *   o Feature: Added support for statistics reporting through ethtool.
- *   o Cleanup: Removed proprietary hooks for ANS.
- *   o Cleanup: Miscellaneous code changes to improve CPU utilization.
- *   	- Replaced "%" with conditionals and "+-" operators.
- *   	- Implemented dynamic Interrupt Throttle Rate (ITR).
- *   	- Reduced expensive PCI reads of ICR in interrupt.
- *   o Bug fix: Request IRQ after descriptor ring setup to avoid panic in
- *   shared interrupt instances.
- *
- * 4.4.18       11/27/02
  */
 
 char e1000_driver_name[] = "e1000";
 char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver";
-char e1000_driver_version[] = "5.1.11-k1";
+char e1000_driver_version[] = "5.1.13-k1";
 char e1000_copyright[] = "Copyright (c) 1999-2003 Intel Corporation.";
 
 /* e1000_pci_tbl - PCI Device ID Table
@@ -128,6 +121,7 @@
 static inline void e1000_irq_disable(struct e1000_adapter *adapter);
 static inline void e1000_irq_enable(struct e1000_adapter *adapter);
 static void e1000_intr(int irq, void *data, struct pt_regs *regs);
+static boolean_t e1000_clean_tx_irq(struct e1000_adapter *adapter);
 #ifdef CONFIG_E1000_NAPI
 static int e1000_clean(struct net_device *netdev, int *budget);
 static boolean_t e1000_clean_rx_irq(struct e1000_adapter *adapter,
@@ -135,7 +129,6 @@
 #else
 static boolean_t e1000_clean_rx_irq(struct e1000_adapter *adapter);
 #endif
-static boolean_t e1000_clean_tx_irq(struct e1000_adapter *adapter);
 static void e1000_alloc_rx_buffers(struct e1000_adapter *adapter);
 static int e1000_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd);
 static int e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr,
@@ -248,12 +241,8 @@
 	e1000_alloc_rx_buffers(adapter);
 
 	if(request_irq(netdev->irq, &e1000_intr, SA_SHIRQ | SA_SAMPLE_RANDOM,
-		       netdev->name, netdev)) {
-		e1000_reset_hw(&adapter->hw);
-		e1000_free_tx_resources(adapter);
-		e1000_free_rx_resources(adapter);
+		       netdev->name, netdev))
 		return -1;
-	}
 
 	mod_timer(&adapter->watchdog_timer, jiffies);
 	e1000_irq_enable(adapter);
@@ -503,9 +492,9 @@
 err_eeprom:
 	iounmap(adapter->hw.hw_addr);
 err_ioremap:
-	pci_release_regions(pdev);
 	kfree(netdev);
 err_alloc_etherdev:
+	pci_release_regions(pdev);
 	return -ENOMEM;
 }
 
@@ -980,35 +969,38 @@
 static void
 e1000_clean_tx_ring(struct e1000_adapter *adapter)
 {
+	struct e1000_desc_ring *tx_ring = &adapter->tx_ring;
+	struct e1000_buffer *buffer_info;
 	struct pci_dev *pdev = adapter->pdev;
 	unsigned long size;
-	int i;
+	unsigned int i;
 
 	/* Free all the Tx ring sk_buffs */
 
-	for(i = 0; i < adapter->tx_ring.count; i++) {
-		if(adapter->tx_ring.buffer_info[i].skb) {
+	for(i = 0; i < tx_ring->count; i++) {
+		buffer_info = &tx_ring->buffer_info[i];
+		if(buffer_info->skb) {
 
 			pci_unmap_page(pdev,
-			               adapter->tx_ring.buffer_info[i].dma,
-			               adapter->tx_ring.buffer_info[i].length,
+			               buffer_info->dma,
+			               buffer_info->length,
 			               PCI_DMA_TODEVICE);
 
-			dev_kfree_skb(adapter->tx_ring.buffer_info[i].skb);
+			dev_kfree_skb(buffer_info->skb);
 
-			adapter->tx_ring.buffer_info[i].skb = NULL;
+			buffer_info->skb = NULL;
 		}
 	}
 
-	size = sizeof(struct e1000_buffer) * adapter->tx_ring.count;
-	memset(adapter->tx_ring.buffer_info, 0, size);
+	size = sizeof(struct e1000_buffer) * tx_ring->count;
+	memset(tx_ring->buffer_info, 0, size);
 
 	/* Zero out the descriptor ring */
 
-	memset(adapter->tx_ring.desc, 0, adapter->tx_ring.size);
+	memset(tx_ring->desc, 0, tx_ring->size);
 
-	adapter->tx_ring.next_to_use = 0;
-	adapter->tx_ring.next_to_clean = 0;
+	tx_ring->next_to_use = 0;
+	tx_ring->next_to_clean = 0;
 
 	E1000_WRITE_REG(&adapter->hw, TDH, 0);
 	E1000_WRITE_REG(&adapter->hw, TDT, 0);
@@ -1024,17 +1016,17 @@
 static void
 e1000_free_rx_resources(struct e1000_adapter *adapter)
 {
+	struct e1000_desc_ring *rx_ring = &adapter->rx_ring;
 	struct pci_dev *pdev = adapter->pdev;
 
 	e1000_clean_rx_ring(adapter);
 
-	kfree(adapter->rx_ring.buffer_info);
-	adapter->rx_ring.buffer_info = NULL;
+	kfree(rx_ring->buffer_info);
+	rx_ring->buffer_info = NULL;
 
-	pci_free_consistent(pdev, adapter->rx_ring.size,
-	                    adapter->rx_ring.desc, adapter->rx_ring.dma);
+	pci_free_consistent(pdev, rx_ring->size, rx_ring->desc, rx_ring->dma);
 
-	adapter->rx_ring.desc = NULL;
+	rx_ring->desc = NULL;
 }
 
 /**
@@ -1045,35 +1037,38 @@
 static void
 e1000_clean_rx_ring(struct e1000_adapter *adapter)
 {
+	struct e1000_desc_ring *rx_ring = &adapter->rx_ring;
+	struct e1000_buffer *buffer_info;
 	struct pci_dev *pdev = adapter->pdev;
 	unsigned long size;
-	int i;
+	unsigned int i;
 
 	/* Free all the Rx ring sk_buffs */
 
-	for(i = 0; i < adapter->rx_ring.count; i++) {
-		if(adapter->rx_ring.buffer_info[i].skb) {
+	for(i = 0; i < rx_ring->count; i++) {
+		buffer_info = &rx_ring->buffer_info[i];
+		if(buffer_info->skb) {
 
 			pci_unmap_single(pdev,
-			                 adapter->rx_ring.buffer_info[i].dma,
-			                 adapter->rx_ring.buffer_info[i].length,
+			                 buffer_info->dma,
+			                 buffer_info->length,
 			                 PCI_DMA_FROMDEVICE);
 
-			dev_kfree_skb(adapter->rx_ring.buffer_info[i].skb);
+			dev_kfree_skb(buffer_info->skb);
 
-			adapter->rx_ring.buffer_info[i].skb = NULL;
+			buffer_info->skb = NULL;
 		}
 	}
 
-	size = sizeof(struct e1000_buffer) * adapter->rx_ring.count;
-	memset(adapter->rx_ring.buffer_info, 0, size);
+	size = sizeof(struct e1000_buffer) * rx_ring->count;
+	memset(rx_ring->buffer_info, 0, size);
 
 	/* Zero out the descriptor ring */
 
-	memset(adapter->rx_ring.desc, 0, adapter->rx_ring.size);
+	memset(rx_ring->desc, 0, rx_ring->size);
 
-	adapter->rx_ring.next_to_clean = 0;
-	adapter->rx_ring.next_to_use = 0;
+	rx_ring->next_to_clean = 0;
+	rx_ring->next_to_use = 0;
 
 	E1000_WRITE_REG(&adapter->hw, RDH, 0);
 	E1000_WRITE_REG(&adapter->hw, RDT, 0);
@@ -1323,7 +1318,7 @@
 	struct e1000_adapter *adapter = (struct e1000_adapter *) data;
 	struct net_device *netdev = adapter->netdev;
 	struct e1000_desc_ring *txdr = &adapter->tx_ring;
-	int i;
+	unsigned int i;
 
 	e1000_check_for_link(&adapter->hw);
 
@@ -1409,7 +1404,7 @@
 {
 #ifdef NETIF_F_TSO
 	struct e1000_context_desc *context_desc;
-	int i;
+	unsigned int i;
 	uint8_t ipcss, ipcso, tucss, tucso, hdr_len;
 	uint16_t ipcse, tucse, mss;
 
@@ -1460,7 +1455,7 @@
 e1000_tx_csum(struct e1000_adapter *adapter, struct sk_buff *skb)
 {
 	struct e1000_context_desc *context_desc;
-	int i;
+	unsigned int i;
 	uint8_t css, cso;
 
 	if(skb->ip_summed == CHECKSUM_HW) {
@@ -1493,18 +1488,21 @@
 	unsigned int first)
 {
 	struct e1000_desc_ring *tx_ring = &adapter->tx_ring;
-	int len = skb->len, offset = 0, size, count = 0, i;
+	struct e1000_buffer *buffer_info;
+	int len = skb->len;
+	unsigned int offset = 0, size, count = 0, i;
 
 #ifdef NETIF_F_TSO
-	int tso = skb_shinfo(skb)->tso_size;
+	unsigned int tso = skb_shinfo(skb)->tso_size;
 #endif
-	int nr_frags = skb_shinfo(skb)->nr_frags;
-	int f;
+	unsigned int nr_frags = skb_shinfo(skb)->nr_frags;
+	unsigned int f;
 	len -= skb->data_len;
 
 	i = tx_ring->next_to_use;
 
 	while(len) {
+		buffer_info = &tx_ring->buffer_info[i];
 		size = min(len, E1000_MAX_DATA_PER_TXD);
 #ifdef NETIF_F_TSO
 		/* Workaround for premature desc write-backs
@@ -1512,13 +1510,13 @@
 		if(tso && !nr_frags && size == len && size > 4)
 			size -= 4;
 #endif
-		tx_ring->buffer_info[i].length = size;
-		tx_ring->buffer_info[i].dma =
+		buffer_info->length = size;
+		buffer_info->dma =
 			pci_map_single(adapter->pdev,
 				skb->data + offset,
 				size,
 				PCI_DMA_TODEVICE);
-		tx_ring->buffer_info[i].time_stamp = jiffies;
+		buffer_info->time_stamp = jiffies;
 
 		len -= size;
 		offset += size;
@@ -1534,6 +1532,7 @@
 		offset = 0;
 
 		while(len) {
+			buffer_info = &tx_ring->buffer_info[i];
 			size = min(len, E1000_MAX_DATA_PER_TXD);
 #ifdef NETIF_F_TSO
 			/* Workaround for premature desc write-backs
@@ -1541,14 +1540,14 @@
 			if(tso && f == (nr_frags-1) && size == len && size > 4)
 				size -= 4;
 #endif
-			tx_ring->buffer_info[i].length = size;
-			tx_ring->buffer_info[i].dma =
+			buffer_info->length = size;
+			buffer_info->dma =
 				pci_map_page(adapter->pdev,
 					frag->page,
 					frag->page_offset + offset,
 					size,
 					PCI_DMA_TODEVICE);
-			tx_ring->buffer_info[i].time_stamp = jiffies;
+			buffer_info->time_stamp = jiffies;
 
 			len -= size;
 			offset += size;
@@ -1556,7 +1555,7 @@
 			if(++i == tx_ring->count) i = 0;
 		}
 	}
-	if(--i < 0) i = tx_ring->count - 1;
+	i = (i == 0) ? tx_ring->count - 1 : i - 1;
 	tx_ring->buffer_info[i].skb = skb;
 	tx_ring->buffer_info[first].next_to_watch = i;
 
@@ -1568,8 +1567,9 @@
 {
 	struct e1000_desc_ring *tx_ring = &adapter->tx_ring;
 	struct e1000_tx_desc *tx_desc = NULL;
+	struct e1000_buffer *buffer_info;
 	uint32_t txd_upper = 0, txd_lower = E1000_TXD_CMD_IFCS;
-	int i;
+	unsigned int i;
 
 	if(tx_flags & E1000_TX_FLAGS_TSO) {
 		txd_lower |= E1000_TXD_CMD_DEXT | E1000_TXD_DTYP_D |
@@ -1590,10 +1590,11 @@
 	i = tx_ring->next_to_use;
 
 	while(count--) {
+		buffer_info = &tx_ring->buffer_info[i];
 		tx_desc = E1000_TX_DESC(*tx_ring, i);
-		tx_desc->buffer_addr = cpu_to_le64(tx_ring->buffer_info[i].dma);
+		tx_desc->buffer_addr = cpu_to_le64(buffer_info->dma);
 		tx_desc->lower.data =
-			cpu_to_le32(txd_lower | tx_ring->buffer_info[i].length);
+			cpu_to_le32(txd_lower | buffer_info->length);
 		tx_desc->upper.data = cpu_to_le32(txd_upper);
 		if(++i == tx_ring->count) i = 0;
 	}
@@ -1659,7 +1660,7 @@
 {
 	struct e1000_adapter *adapter = netdev->priv;
 	unsigned int first;
-	int tx_flags = 0;
+	unsigned int tx_flags = 0;
 
 	if(skb->len <= 0) {
 		dev_kfree_skb_any(skb);
@@ -1971,7 +1972,7 @@
 	struct e1000_adapter *adapter = netdev->priv;
 	uint32_t icr = E1000_READ_REG(&adapter->hw, ICR);
 #ifndef CONFIG_E1000_NAPI
-	int i;
+	unsigned int i;
 #endif
 
 	if(!icr)
@@ -1995,7 +1996,7 @@
 	}
 #else
 	for(i = 0; i < E1000_MAX_INTR; i++)
-		if(!e1000_clean_rx_irq(adapter) &&
+		if(!e1000_clean_rx_irq(adapter) &
 		   !e1000_clean_tx_irq(adapter))
 			break;
 #endif
@@ -2042,7 +2043,8 @@
 	struct pci_dev *pdev = adapter->pdev;
 	struct e1000_tx_desc *tx_desc, *eop_desc;
 	struct e1000_buffer *buffer_info;
-	int i, eop, cleaned = FALSE;
+	unsigned int i, eop;
+	boolean_t cleaned = FALSE;
 
 	i = tx_ring->next_to_clean;
 	eop = tx_ring->buffer_info[i].next_to_watch;
@@ -2108,16 +2110,19 @@
 	struct net_device *netdev = adapter->netdev;
 	struct pci_dev *pdev = adapter->pdev;
 	struct e1000_rx_desc *rx_desc;
+	struct e1000_buffer *buffer_info;
 	struct sk_buff *skb;
 	unsigned long flags;
 	uint32_t length;
 	uint8_t last_byte;
-	int i, cleaned = FALSE;
+	unsigned int i;
+	boolean_t cleaned = FALSE;
 
 	i = rx_ring->next_to_clean;
 	rx_desc = E1000_RX_DESC(*rx_ring, i);
 
 	while(rx_desc->status & E1000_RXD_STAT_DD) {
+		buffer_info = &rx_ring->buffer_info[i];
 
 #ifdef CONFIG_E1000_NAPI
 		if(*work_done >= work_to_do)
@@ -2129,11 +2134,11 @@
 		cleaned = TRUE;
 
 		pci_unmap_single(pdev,
-		                 rx_ring->buffer_info[i].dma,
-		                 rx_ring->buffer_info[i].length,
+		                 buffer_info->dma,
+		                 buffer_info->length,
 		                 PCI_DMA_FROMDEVICE);
 
-		skb = rx_ring->buffer_info[i].skb;
+		skb = buffer_info->skb;
 		length = le16_to_cpu(rx_desc->length);
 
 		if(!(rx_desc->status & E1000_RXD_STAT_EOP)) {
@@ -2144,7 +2149,7 @@
 
 			dev_kfree_skb_irq(skb);
 			rx_desc->status = 0;
-			rx_ring->buffer_info[i].skb = NULL;
+			buffer_info->skb = NULL;
 
 			if(++i == rx_ring->count) i = 0;
 
@@ -2172,7 +2177,7 @@
 
 				dev_kfree_skb_irq(skb);
 				rx_desc->status = 0;
-				rx_ring->buffer_info[i].skb = NULL;
+				buffer_info->skb = NULL;
 
 				if(++i == rx_ring->count) i = 0;
 
@@ -2191,14 +2196,16 @@
 #ifdef CONFIG_E1000_NAPI
 		if(adapter->vlgrp && (rx_desc->status & E1000_RXD_STAT_VP)) {
 			vlan_hwaccel_receive_skb(skb, adapter->vlgrp,
-				(rx_desc->special & E1000_RXD_SPC_VLAN_MASK));
+				le16_to_cpu(rx_desc->special &
+					E1000_RXD_SPC_VLAN_MASK));
 		} else {
 			netif_receive_skb(skb);
 		}
 #else /* CONFIG_E1000_NAPI */
 		if(adapter->vlgrp && (rx_desc->status & E1000_RXD_STAT_VP)) {
 			vlan_hwaccel_rx(skb, adapter->vlgrp,
-				(rx_desc->special & E1000_RXD_SPC_VLAN_MASK));
+				le16_to_cpu(rx_desc->special &
+					E1000_RXD_SPC_VLAN_MASK));
 		} else {
 			netif_rx(skb);
 		}
@@ -2206,7 +2213,7 @@
 		netdev->last_rx = jiffies;
 
 		rx_desc->status = 0;
-		rx_ring->buffer_info[i].skb = NULL;
+		buffer_info->skb = NULL;
 
 		if(++i == rx_ring->count) i = 0;
 
@@ -2232,13 +2239,15 @@
 	struct net_device *netdev = adapter->netdev;
 	struct pci_dev *pdev = adapter->pdev;
 	struct e1000_rx_desc *rx_desc;
+	struct e1000_buffer *buffer_info;
 	struct sk_buff *skb;
 	int reserve_len = 2;
-	int i;
+	unsigned int i;
 
 	i = rx_ring->next_to_use;
+	buffer_info = &rx_ring->buffer_info[i];
 
-	while(!rx_ring->buffer_info[i].skb) {
+	while(!buffer_info->skb) {
 		rx_desc = E1000_RX_DESC(*rx_ring, i);
 
 		skb = dev_alloc_skb(adapter->rx_buffer_len + reserve_len);
@@ -2256,15 +2265,15 @@
 
 		skb->dev = netdev;
 
-		rx_ring->buffer_info[i].skb = skb;
-		rx_ring->buffer_info[i].length = adapter->rx_buffer_len;
-		rx_ring->buffer_info[i].dma =
+		buffer_info->skb = skb;
+		buffer_info->length = adapter->rx_buffer_len;
+		buffer_info->dma =
 			pci_map_single(pdev,
 			               skb->data,
 			               adapter->rx_buffer_len,
 			               PCI_DMA_FROMDEVICE);
 
-		rx_desc->buffer_addr = cpu_to_le64(rx_ring->buffer_info[i].dma);
+		rx_desc->buffer_addr = cpu_to_le64(buffer_info->dma);
 
 		if((i & ~(E1000_RX_BUFFER_WRITE - 1)) == i) {
 			/* Force memory writes to complete before letting h/w
@@ -2277,6 +2286,7 @@
 		}
 
 		if(++i == rx_ring->count) i = 0;
+		buffer_info = &rx_ring->buffer_info[i];
 	}
 
 	rx_ring->next_to_use = i;
diff -urN linux-2.4.22-pre7/drivers/net/ne2k-pci.c linux-2.4.22-pre8/drivers/net/ne2k-pci.c
--- linux-2.4.22-pre7/drivers/net/ne2k-pci.c	2002-08-02 17:39:44.000000000 -0700
+++ linux-2.4.22-pre8/drivers/net/ne2k-pci.c	2003-07-24 13:19:20.000000000 -0700
@@ -634,6 +634,7 @@
 
 	unregister_netdev(dev);
 	release_region(dev->base_addr, NE_IO_EXTENT);
+	kfree(dev->priv);
 	kfree(dev);
 	pci_set_drvdata(pdev, NULL);
 }
diff -urN linux-2.4.22-pre7/drivers/net/via-rhine.c linux-2.4.22-pre8/drivers/net/via-rhine.c
--- linux-2.4.22-pre7/drivers/net/via-rhine.c	2003-07-24 13:19:15.000000000 -0700
+++ linux-2.4.22-pre8/drivers/net/via-rhine.c	2003-07-24 13:19:20.000000000 -0700
@@ -122,11 +122,14 @@
 	- No filtering multicast in promisc mode (Edward Peng)
 	- Fix for Rhine-I Tx timeouts
 
+	LK1.1.19 (Roger Luethi)
+	- Increase Tx threshold for unspecified errors
+
 */
 
 #define DRV_NAME	"via-rhine"
-#define DRV_VERSION	"1.1.18"
-#define DRV_RELDATE	"July-4-2003"
+#define DRV_VERSION	"1.1.19"
+#define DRV_RELDATE	"July-12-2003"
 
 
 /* A few user-configurable values.
@@ -1659,9 +1662,13 @@
 	}
 	if ((intr_status & IntrTxError) && ~( IntrTxAborted | IntrTxUnderrun |
 										   IntrTxDescRace )) {
-		if (debug > 2)
-			printk(KERN_INFO "%s: Unspecified error.\n",
-				   dev->name);
+		if (np->tx_thresh < 0xE0) {
+			writeb(np->tx_thresh += 0x20, ioaddr + TxConfig);
+		}
+		if (debug > 1)
+			printk(KERN_INFO "%s: Unspecified error. Tx "
+				   "threshold now %2.2x.\n",
+				   dev->name, np->tx_thresh);
 	}
 	if (intr_status & ( IntrTxAborted | IntrTxUnderrun | IntrTxDescRace |
 						IntrTxError ))
diff -urN linux-2.4.22-pre7/drivers/scsi/aha152x.c linux-2.4.22-pre8/drivers/scsi/aha152x.c
--- linux-2.4.22-pre7/drivers/scsi/aha152x.c	2003-06-13 07:51:36.000000000 -0700
+++ linux-2.4.22-pre8/drivers/scsi/aha152x.c	2003-07-24 13:19:20.000000000 -0700
@@ -1930,12 +1930,30 @@
 static void intr(int irqno, void *dev_id, struct pt_regs *regs)
 {
 	struct Scsi_Host *shpnt = lookup_irq(irqno);
+	unsigned char rev, dmacntrl0;
 
 	if (!shpnt) {
 		printk(KERN_ERR "aha152x: catched interrupt %d for unknown controller.\n", irqno);
 		return;
 	}
 
+	/*
+	 * Read a couple of registers that are known to not be all 1's. If
+	 * we read all 1's (-1), that means that either:
+	 * a. The host adapter chip has gone bad, and we cannot control it,
+	 * OR
+	 * b. The host adapter is a PCMCIA card that has been ejected
+	 * In either case, we cannot do anything with the host adapter at
+	 * this point in time. So just ignore the interrupt and return.
+	 * In the latter case, the interrupt might actually be meant for
+	 * someone else sharing this IRQ, and that driver will handle it
+	 */
+	rev = GETPORT(REV);
+	dmacntrl0 = GETPORT(DMACNTRL0);
+	if ((rev == 0xFF) && (dmacntrl0 == 0xFF)) {
+		return;
+	}
+
 	/* no more interrupts from the controller, while we're busy.
 	   INTEN is restored by the BH handler */
 	CLRBITS(DMACNTRL0, INTEN);
diff -urN linux-2.4.22-pre7/drivers/scsi/pcmcia/aha152x_stub.c linux-2.4.22-pre8/drivers/scsi/pcmcia/aha152x_stub.c
--- linux-2.4.22-pre7/drivers/scsi/pcmcia/aha152x_stub.c	2001-12-21 09:41:55.000000000 -0800
+++ linux-2.4.22-pre8/drivers/scsi/pcmcia/aha152x_stub.c	2003-07-24 13:19:20.000000000 -0700
@@ -40,7 +40,6 @@
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/string.h>
-#include <linux/timer.h>
 #include <linux/ioport.h>
 #include <scsi/scsi.h>
 #include <linux/major.h>
@@ -139,8 +138,6 @@
     if (!info) return NULL;
     memset(info, 0, sizeof(*info));
     link = &info->link; link->priv = info;
-    link->release.function = &aha152x_release_cs;
-    link->release.data = (u_long)link;
 
     link->io.NumPorts1 = 0x20;
     link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
@@ -193,7 +190,6 @@
     if (*linkp == NULL)
 	return;
 
-    del_timer(&link->release);
     if (link->state & DEV_CONFIG) {
 	aha152x_release_cs((u_long)link);
 	if (link->state & DEV_STALE_CONFIG) {
@@ -383,7 +379,7 @@
     case CS_EVENT_CARD_REMOVAL:
 	link->state &= ~DEV_PRESENT;
 	if (link->state & DEV_CONFIG)
-	    mod_timer(&link->release, jiffies + HZ/20);
+	    aha152x_release_cs((u_long)link);
 	break;
     case CS_EVENT_CARD_INSERTION:
 	link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
diff -urN linux-2.4.22-pre7/drivers/scsi/pcmcia/fdomain_stub.c linux-2.4.22-pre8/drivers/scsi/pcmcia/fdomain_stub.c
--- linux-2.4.22-pre7/drivers/scsi/pcmcia/fdomain_stub.c	2001-12-21 09:41:55.000000000 -0800
+++ linux-2.4.22-pre8/drivers/scsi/pcmcia/fdomain_stub.c	2003-07-24 13:19:20.000000000 -0700
@@ -37,7 +37,6 @@
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/string.h>
-#include <linux/timer.h>
 #include <linux/ioport.h>
 #include <scsi/scsi.h>
 #include <linux/major.h>
@@ -125,8 +124,6 @@
     if (!info) return NULL;
     memset(info, 0, sizeof(*info));
     link = &info->link; link->priv = info;
-    link->release.function = &fdomain_release;
-    link->release.data = (u_long)link;
 
     link->io.NumPorts1 = 0x10;
     link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
@@ -179,7 +176,6 @@
     if (*linkp == NULL)
 	return;
 
-    del_timer(&link->release);
     if (link->state & DEV_CONFIG) {
 	fdomain_release((u_long)link);
 	if (link->state & DEV_STALE_CONFIG) {
@@ -350,7 +346,7 @@
     case CS_EVENT_CARD_REMOVAL:
 	link->state &= ~DEV_PRESENT;
 	if (link->state & DEV_CONFIG)
-	    mod_timer(&link->release, jiffies + HZ/20);
+	    fdomain_release((u_long)link);
 	break;
     case CS_EVENT_CARD_INSERTION:
 	link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
diff -urN linux-2.4.22-pre7/drivers/scsi/pcmcia/nsp_cs.c linux-2.4.22-pre8/drivers/scsi/pcmcia/nsp_cs.c
--- linux-2.4.22-pre7/drivers/scsi/pcmcia/nsp_cs.c	2003-06-13 07:51:36.000000000 -0700
+++ linux-2.4.22-pre8/drivers/scsi/pcmcia/nsp_cs.c	2003-07-24 13:19:20.000000000 -0700
@@ -36,7 +36,6 @@
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/string.h>
-#include <linux/timer.h>
 #include <linux/ioport.h>
 #include <linux/delay.h>
 #include <linux/tqueue.h>
@@ -1341,10 +1340,6 @@
 	link = &info->link;
 	link->priv = info;
 
-	/* Initialize the dev_link_t structure */
-	link->release.function	 = &nsp_cs_release;
-	link->release.data	 = (u_long)link;
-
 	/* The io structure describes IO port mapping */
 	link->io.NumPorts1	 = 0x10;
 	link->io.Attributes1	 = IO_DATA_PATH_WIDTH_AUTO;
@@ -1415,7 +1410,6 @@
 		return;
 	}
 
-	del_timer(&link->release);
 	if (link->state & DEV_CONFIG) {
 		nsp_cs_release((u_long)link);
 		if (link->state & DEV_STALE_CONFIG) {
@@ -1660,7 +1654,7 @@
 		link->state &= ~DEV_PRESENT;
 		if (link->state & DEV_CONFIG) {
 			((scsi_info_t *)link->priv)->stop = 1;
-			mod_timer(&link->release, jiffies + HZ/20);
+			nsp_cs_release((u_long)link);
 		}
 		break;
 
diff -urN linux-2.4.22-pre7/drivers/scsi/pcmcia/qlogic_stub.c linux-2.4.22-pre8/drivers/scsi/pcmcia/qlogic_stub.c
--- linux-2.4.22-pre7/drivers/scsi/pcmcia/qlogic_stub.c	2001-12-21 09:41:55.000000000 -0800
+++ linux-2.4.22-pre8/drivers/scsi/pcmcia/qlogic_stub.c	2003-07-24 13:19:20.000000000 -0700
@@ -37,7 +37,6 @@
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/string.h>
-#include <linux/timer.h>
 #include <linux/ioport.h>
 #include <asm/io.h>
 #include <asm/byteorder.h>
@@ -132,8 +131,6 @@
     if (!info) return NULL;
     memset(info, 0, sizeof(*info));
     link = &info->link; link->priv = info;
-    link->release.function = &qlogic_release;
-    link->release.data = (u_long)link;
 
     link->io.NumPorts1 = 16;
     link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
@@ -186,7 +183,6 @@
     if (*linkp == NULL)
 	return;
 
-    del_timer(&link->release);
     if (link->state & DEV_CONFIG) {
 	qlogic_release((u_long)link);
 	if (link->state & DEV_STALE_CONFIG) {
@@ -371,7 +367,7 @@
     case CS_EVENT_CARD_REMOVAL:
 	link->state &= ~DEV_PRESENT;
 	if (link->state & DEV_CONFIG)
-	    mod_timer(&link->release, jiffies + HZ/20);
+	    qlogic_release((u_long)link);
 	break;
     case CS_EVENT_CARD_INSERTION:
 	link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
diff -urN linux-2.4.22-pre7/drivers/usb/Config.in linux-2.4.22-pre8/drivers/usb/Config.in
--- linux-2.4.22-pre7/drivers/usb/Config.in	2003-07-24 13:19:16.000000000 -0700
+++ linux-2.4.22-pre8/drivers/usb/Config.in	2003-07-24 13:19:20.000000000 -0700
@@ -106,6 +106,8 @@
    dep_tristate '  Texas Instruments Graph Link USB (aka SilverLink) cable support' CONFIG_USB_TIGL $CONFIG_USB
    dep_tristate '  Tieman Voyager USB Braille display support (EXPERIMENTAL)' CONFIG_USB_BRLVGER $CONFIG_USB $CONFIG_EXPERIMENTAL
    dep_tristate '  USB LCD device support' CONFIG_USB_LCD $CONFIG_USB
-   dep_tristate '  Alcatel Speedtouch USB support' CONFIG_USB_SPEEDTOUCH $CONFIG_ATM $CONFIG_USB
+   if [ "$CONFIG_ATM" = "y" -o "$CONFIG_ATM" = "m" ]; then
+      dep_tristate '  Alcatel Speedtouch USB support' CONFIG_USB_SPEEDTOUCH $CONFIG_ATM $CONFIG_USB
+   fi
 fi
 endmenu
diff -urN linux-2.4.22-pre7/fs/binfmt_elf.c linux-2.4.22-pre8/fs/binfmt_elf.c
--- linux-2.4.22-pre7/fs/binfmt_elf.c	2003-07-24 13:19:16.000000000 -0700
+++ linux-2.4.22-pre8/fs/binfmt_elf.c	2003-07-24 13:19:20.000000000 -0700
@@ -798,6 +798,9 @@
 		send_sig(SIGTRAP, current, 0);
 	retval = 0;
 out:
+	if (!retval)
+		steal_locks(files, current->files);
+
 	return retval;
 
 	/* error cleanup */
diff -urN linux-2.4.22-pre7/fs/exec.c linux-2.4.22-pre8/fs/exec.c
--- linux-2.4.22-pre7/fs/exec.c	2003-07-24 13:19:16.000000000 -0700
+++ linux-2.4.22-pre8/fs/exec.c	2003-07-24 13:19:20.000000000 -0700
@@ -582,6 +582,7 @@
 	retval = unshare_files();
 	if(retval)
 		goto flush_failed;
+	steal_locks(files, current->files);
 	put_files_struct(files);
 	
 	/* 
diff -urN linux-2.4.22-pre7/fs/jbd/journal.c linux-2.4.22-pre8/fs/jbd/journal.c
--- linux-2.4.22-pre7/fs/jbd/journal.c	2003-06-13 07:51:37.000000000 -0700
+++ linux-2.4.22-pre8/fs/jbd/journal.c	2003-07-24 13:19:20.000000000 -0700
@@ -912,7 +912,7 @@
 		__brelse(bh);
 	}
 
-	sync_dev(journal->j_dev);
+	fsync_no_super(journal->j_dev);
 	jbd_debug(1, "JBD: journal cleared.\n");
 
 	/* OK, fill in the initial static fields in the new superblock */
diff -urN linux-2.4.22-pre7/fs/locks.c linux-2.4.22-pre8/fs/locks.c
--- linux-2.4.22-pre7/fs/locks.c	2003-06-13 07:51:37.000000000 -0700
+++ linux-2.4.22-pre8/fs/locks.c	2003-07-24 13:19:20.000000000 -0700
@@ -1937,6 +1937,23 @@
 	return length;
 }
 
+void steal_locks(fl_owner_t from, fl_owner_t to)
+{
+	struct list_head *tmp;
+
+	if (from == to)
+		return;
+
+	lock_kernel();
+	list_for_each(tmp, &file_lock_list) {
+		struct file_lock *fl = list_entry(tmp, struct file_lock,
+						  fl_link);
+		if (fl->fl_owner == from)
+			fl->fl_owner = to;
+	}
+	unlock_kernel();
+}
+
 #ifdef MSNFS
 /**
  *	lock_may_read - checks that the region is free of locks
diff -urN linux-2.4.22-pre7/include/linux/ethtool.h linux-2.4.22-pre8/include/linux/ethtool.h
--- linux-2.4.22-pre7/include/linux/ethtool.h	2003-07-24 13:19:17.000000000 -0700
+++ linux-2.4.22-pre8/include/linux/ethtool.h	2003-07-24 13:19:21.000000000 -0700
@@ -281,6 +281,8 @@
 #define ETHTOOL_GSTRINGS	0x0000001b /* get specified string set */
 #define ETHTOOL_PHYS_ID		0x0000001c /* identify the NIC */
 #define ETHTOOL_GSTATS		0x0000001d /* get NIC-specific statistics */
+#define ETHTOOL_GTSO		0x0000001e /* Get TSO enable (ethtool_value) */
+#define ETHTOOL_STSO		0x0000001f /* Set TSO enable (ethtool_value) */
 
 /* compatibility with older code */
 #define SPARC_ETH_GSET		ETHTOOL_GSET
diff -urN linux-2.4.22-pre7/include/linux/fs.h linux-2.4.22-pre8/include/linux/fs.h
--- linux-2.4.22-pre7/include/linux/fs.h	2003-07-24 13:19:17.000000000 -0700
+++ linux-2.4.22-pre8/include/linux/fs.h	2003-07-24 13:19:21.000000000 -0700
@@ -673,6 +673,7 @@
 extern time_t lease_get_mtime(struct inode *);
 extern int lock_may_read(struct inode *, loff_t start, unsigned long count);
 extern int lock_may_write(struct inode *, loff_t start, unsigned long count);
+extern void steal_locks(fl_owner_t from, fl_owner_t to);
 
 struct fasync_struct {
 	int	magic;
diff -urN linux-2.4.22-pre7/net/Config.in linux-2.4.22-pre8/net/Config.in
--- linux-2.4.22-pre7/net/Config.in	2003-07-24 13:19:17.000000000 -0700
+++ linux-2.4.22-pre8/net/Config.in	2003-07-24 13:19:21.000000000 -0700
@@ -32,7 +32,7 @@
 fi
 if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
    tristate 'Asynchronous Transfer Mode (ATM) (EXPERIMENTAL)' CONFIG_ATM
-   if [ "$CONFIG_ATM" != "n" ]; then
+   if [ "$CONFIG_ATM" = "y" -o "$CONFIG_ATM" = "m" ]; then
       if [ "$CONFIG_INET" = "y" ]; then
 	 dep_tristate '  Classical IP over ATM' CONFIG_ATM_CLIP $CONFIG_ATM
 	 if [ "$CONFIG_ATM_CLIP" != "n" ]; then
diff -urN linux-2.4.22-pre7/net/sched/Config.in linux-2.4.22-pre8/net/sched/Config.in
--- linux-2.4.22-pre7/net/sched/Config.in	2003-07-24 13:19:17.000000000 -0700
+++ linux-2.4.22-pre8/net/sched/Config.in	2003-07-24 13:19:21.000000000 -0700
@@ -6,7 +6,7 @@
 tristate '  CSZ packet scheduler' CONFIG_NET_SCH_CSZ
 #tristate '  H-PFQ packet scheduler' CONFIG_NET_SCH_HPFQ
 #tristate '  H-FSC packet scheduler' CONFIG_NET_SCH_HFCS
-if [ "$CONFIG_ATM" != "n" ]; then
+if [ "$CONFIG_ATM" = "y" -o "$CONFIG_ATM" = "m" ]; then
    dep_tristate '  ATM pseudo-scheduler' CONFIG_NET_SCH_ATM $CONFIG_ATM
 fi
 tristate '  The simplest PRIO pseudoscheduler' CONFIG_NET_SCH_PRIO
diff -urN linux-2.4.22-pre7/net/sunrpc/svcsock.c linux-2.4.22-pre8/net/sunrpc/svcsock.c
--- linux-2.4.22-pre7/net/sunrpc/svcsock.c	2003-07-24 13:19:17.000000000 -0700
+++ linux-2.4.22-pre8/net/sunrpc/svcsock.c	2003-07-24 13:19:21.000000000 -0700
@@ -1244,7 +1244,8 @@
 		return error;
 
 	if (sin != NULL) {
-		sock->sk->reuse = 1; /* allow address reuse */
+		if (type == SOCK_STREAM)
+			sock->sk->reuse = 1; /* allow address reuse */
 		error = sock->ops->bind(sock, (struct sockaddr *) sin,
 						sizeof(*sin));
 		if (error < 0)
