## Automatically generated incremental diff
## From:   linux-2.2.7-pre4
## To:     linux-2.2.7
## Robot:  $Id: make-incremental-diff,v 1.5 2001/12/01 08:32:36 hpa Exp $

diff -urN linux-2.2.7-pre4/Documentation/filesystems/vfs.txt linux/Documentation/filesystems/vfs.txt
--- linux-2.2.7-pre4/Documentation/filesystems/vfs.txt	Sat Jun 27 00:11:52 1998
+++ linux/Documentation/filesystems/vfs.txt	Mon Dec  3 18:41:47 2001
@@ -4,7 +4,7 @@
 
 		Richard Gooch <rgooch@atnf.csiro.au>
 
-			      27-JUN-1998
+			      23-APR-1999
 
 
 Conventions used in this document                                     <section>
@@ -129,7 +129,7 @@
   name: the name of the filesystem type, such as "ext2", "iso9660",
 	"msdos" and so on
 
-  fs_flags: various flags (i.e. if it is a read-only FS)
+  fs_flags: various flags (i.e. FS_REQUIRES_DEV, FS_NO_DCACHE, etc.)
 
   read_super: the method to call when a new instance of this
 	filesystem should be mounted
diff -urN linux-2.2.7-pre4/arch/sparc/kernel/entry.S linux/arch/sparc/kernel/entry.S
--- linux-2.2.7-pre4/arch/sparc/kernel/entry.S	Wed Mar 10 16:53:36 1999
+++ linux/arch/sparc/kernel/entry.S	Mon Dec  3 18:41:47 2001
@@ -1,4 +1,4 @@
-/* $Id: entry.S,v 1.157 1999/01/19 07:54:32 davem Exp $
+/* $Id: entry.S,v 1.158 1999/04/27 14:35:07 davem Exp $
  * arch/sparc/kernel/entry.S:  Sparc trap low-level entry points.
  *
  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
@@ -874,7 +874,7 @@
 ! We want error in %l5, vaddr in %l6
 sun4c_fault:
 #ifdef CONFIG_SUN4
-	sethi	C_LABEL(sun4c_memerr_reg), %l4
+	sethi	%hi(C_LABEL(sun4c_memerr_reg)), %l4
 	ld	[%l4+%lo(C_LABEL(sun4c_memerr_reg))], %l4  ! memerr ctrl reg addr
 	ld	[%l4], %l6		! memerr ctrl reg
 	ld	[%l4 + 4], %l5		! memerr vaddr reg
@@ -956,7 +956,7 @@
 	sll     %l6, 2, %l6
 	ld      [%l4 + %l6], %l4
 #ifdef CONFIG_SUN4
-	sethi	PAGE_MASK, %l6
+	sethi	%hi(PAGE_MASK), %l6
 	andcc	%l4, %l6, %g0
 #else
 	andcc   %l4, PAGE_MASK, %g0
@@ -1117,7 +1117,7 @@
 #ifndef CONFIG_SUN4
 	and	%l4, PAGE_MASK, %l4
 #else
-	sethi	PAGE_MASK, %l6
+	sethi	%hi(PAGE_MASK), %l6
 	and	%l4, %l6, %l4
 #endif
 
diff -urN linux-2.2.7-pre4/arch/sparc/mm/srmmu.c linux/arch/sparc/mm/srmmu.c
--- linux-2.2.7-pre4/arch/sparc/mm/srmmu.c	Mon Dec  3 18:41:30 2001
+++ linux/arch/sparc/mm/srmmu.c	Mon Dec  3 18:41:47 2001
@@ -1,4 +1,4 @@
-/* $Id: srmmu.c,v 1.186 1999/04/13 14:17:19 jj Exp $
+/* $Id: srmmu.c,v 1.187 1999/04/28 17:00:45 davem Exp $
  * srmmu.c:  SRMMU specific routines for memory management.
  *
  * Copyright (C) 1995 David S. Miller  (davem@caip.rutgers.edu)
@@ -1949,12 +1949,13 @@
 		/* Find the number of contexts on the srmmu. */
 		cpunode = prom_getchild(prom_root_node);
 		num_contexts = 0;
-		while((cpunode = prom_getsibling(cpunode)) != 0) {
+		while(cpunode != 0) {
 			prom_getstring(cpunode, "device_type", node_str, sizeof(node_str));
 			if(!strcmp(node_str, "cpu")) {
 				num_contexts = prom_getintdefault(cpunode, "mmu-nctx", 0x8);
 				break;
 			}
+			cpunode = prom_getsibling(cpunode);
 		}
 	}
 
diff -urN linux-2.2.7-pre4/arch/sparc64/kernel/cpu.c linux/arch/sparc64/kernel/cpu.c
--- linux-2.2.7-pre4/arch/sparc64/kernel/cpu.c	Sun Mar 21 07:11:36 1999
+++ linux/arch/sparc64/kernel/cpu.c	Mon Dec  3 18:41:47 2001
@@ -69,7 +69,7 @@
 
 	fprs = fprs_read ();
 	fprs_write (FPRS_FEF);
-	__asm__ __volatile__ ("rdpr %%ver, %0; stx %%fsr, [%1]" : "=r" (ver) : "r" (&fpu_vers));
+	__asm__ __volatile__ ("rdpr %%ver, %0; stx %%fsr, [%1]" : "=&r" (ver) : "r" (&fpu_vers));
 	fprs_write (fprs);
 	
 	manuf = ((ver >> 48)&0xffff);
diff -urN linux-2.2.7-pre4/drivers/block/rd.c linux/drivers/block/rd.c
--- linux-2.2.7-pre4/drivers/block/rd.c	Fri Mar 26 13:57:41 1999
+++ linux/drivers/block/rd.c	Mon Dec  3 18:41:47 2001
@@ -295,6 +295,8 @@
 
 #ifdef MODULE
 
+MODULE_PARM (rd_size, "1i");
+
 int init_module(void)
 {
 	int error = rd_init();
diff -urN linux-2.2.7-pre4/drivers/net/ppp.c linux/drivers/net/ppp.c
--- linux-2.2.7-pre4/drivers/net/ppp.c	Wed Mar 10 16:51:35 1999
+++ linux/drivers/net/ppp.c	Mon Dec  3 18:41:47 2001
@@ -4,7 +4,7 @@
  *  Al Longyear <longyear@netcom.com>
  *  Extensively rewritten by Paul Mackerras <paulus@cs.anu.edu.au>
  *
- *  ==FILEVERSION 990114==
+ *  ==FILEVERSION 990331==
  *
  *  NOTE TO MAINTAINERS:
  *     If you modify this file at all, please set the number above to the
@@ -45,9 +45,8 @@
 
 #define PPP_MAX_RCV_QLEN	32	/* max # frames we queue up for pppd */
 
-/* $Id: ppp.c,v 1.19 1998/07/07 04:27:37 paulus Exp $ */
+/* $Id: ppp.c,v 1.24 1999/03/31 06:07:57 paulus Exp $ */
 
-#include <linux/version.h>
 #include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
@@ -61,6 +60,7 @@
 #include <linux/malloc.h>
 #include <linux/tty.h>
 #include <linux/errno.h>
+#include <linux/sched.h>	/* to get the struct task_struct */
 #include <linux/string.h>	/* used in new tty drivers */
 #include <linux/signal.h>	/* used in new tty drivers */
 #include <asm/system.h>
@@ -90,6 +90,9 @@
 #include <linux/kmod.h>
 #endif
 
+typedef ssize_t		rw_ret_t;
+typedef size_t		rw_count_t;
+
 /*
  * Local functions
  */
@@ -101,9 +104,11 @@
 
 static void ppp_async_init(struct ppp *ppp);
 static void ppp_async_release(struct ppp *ppp);
+static int ppp_tty_sync_push(struct ppp *ppp);
 static int ppp_tty_push(struct ppp *ppp);
 static int ppp_async_encode(struct ppp *ppp);
 static int ppp_async_send(struct ppp *, struct sk_buff *);
+static int ppp_sync_send(struct ppp *, struct sk_buff *);
 
 static int ppp_ioctl(struct ppp *, unsigned int, unsigned long);
 static int ppp_set_compression (struct ppp *ppp, struct ppp_option_data *odp);
@@ -186,10 +191,10 @@
  * TTY callbacks
  */
 
-static ssize_t ppp_tty_read(struct tty_struct *, struct file *, __u8 *,
-			    size_t);
-static ssize_t ppp_tty_write(struct tty_struct *, struct file *, const __u8 *,
-			     size_t);
+static rw_ret_t ppp_tty_read(struct tty_struct *, struct file *, __u8 *,
+			     rw_count_t);
+static rw_ret_t ppp_tty_write(struct tty_struct *, struct file *, const __u8 *,
+			      rw_count_t);
 static int ppp_tty_ioctl(struct tty_struct *, struct file *, unsigned int,
 			 unsigned long);
 static unsigned int ppp_tty_poll(struct tty_struct *tty, struct file *filp,
@@ -236,7 +241,6 @@
 	0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,
 	0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
 };
-EXPORT_SYMBOL(ppp_crc16_table);
 
 #ifdef CHECK_CHARACTERS
 static __u32 paritytab[8] =
@@ -458,13 +462,13 @@
  * Read a PPP frame from the rcv_q list,
  * waiting if necessary
  */
-static ssize_t
+static rw_ret_t
 ppp_tty_read(struct tty_struct *tty, struct file *file, __u8 * buf,
-	     size_t nr)
+	     rw_count_t nr)
 {
 	struct ppp *ppp = tty2ppp (tty);
 	struct sk_buff *skb;
-	ssize_t len, err;
+	rw_ret_t len, err;
 
 	/*
 	 * Validate the pointers
@@ -546,9 +550,9 @@
  * Writing to a tty in ppp line discipline sends a PPP frame.
  * Used by pppd to send control packets (LCP, etc.).
  */
-static ssize_t
+static rw_ret_t
 ppp_tty_write(struct tty_struct *tty, struct file *file, const __u8 * data,
-	      size_t count)
+	      rw_count_t count)
 {
 	struct ppp *ppp = tty2ppp (tty);
 	__u8 *new_data;
@@ -600,7 +604,7 @@
 	 */
 	ppp_send_ctrl(ppp, skb);
 
-	return (ssize_t) count;
+	return (rw_ret_t) count;
 }
 
 /*
@@ -799,6 +803,135 @@
 }
 
 /*
+ * Send a packet to the peer over a synchronous tty line.
+ * All encoding and FCS are handled by hardware.
+ * Addr/Ctrl and Protocol field compression implemented.
+ * Returns -1 iff the packet could not be accepted at present,
+ * 0 if the packet was accepted but we can't accept another yet, or
+ * 1 if we can accept another packet immediately.
+ * If this procedure returns 0, ppp_output_wakeup will be called
+ * exactly once.
+ */
+static int
+ppp_sync_send(struct ppp *ppp, struct sk_buff *skb)
+{
+	unsigned char *data;
+	int islcp;
+	
+	CHECK_PPP(0);
+
+	if (ppp->tpkt != NULL)
+		return -1;
+	ppp->tpkt = skb;
+
+	data = ppp->tpkt->data;
+	
+	/*
+	 * LCP packets with code values between 1 (configure-reqest)
+	 * and 7 (code-reject) must be sent as though no options
+	 * had been negotiated.
+	 */
+	islcp = PPP_PROTOCOL(data) == PPP_LCP
+		&& 1 <= data[PPP_HDRLEN] && data[PPP_HDRLEN] <= 7;
+
+	/* only reset idle time for data packets */
+	if (PPP_PROTOCOL(data) < 0x8000)
+		ppp->last_xmit = jiffies;
+	++ppp->stats.ppp_opackets;
+	ppp->stats.ppp_ooctects += ppp->tpkt->len;
+
+	if ( !(data[2]) && (ppp->flags & SC_COMP_PROT) ) {
+		/* compress protocol field */
+		data[2] = data[1];
+		data[1] = data[0];
+		skb_pull(ppp->tpkt,1);
+		data = ppp->tpkt->data;
+	}
+	
+	/*
+	 * Do address/control compression
+	 */
+	if ((ppp->flags & SC_COMP_AC) && !islcp
+	    && PPP_ADDRESS(data) == PPP_ALLSTATIONS
+	    && PPP_CONTROL(data) == PPP_UI) {
+		/* strip addr and control field */
+		skb_pull(ppp->tpkt,2);
+	}
+
+	return ppp_tty_sync_push(ppp);
+}
+
+/*
+ * Push a synchronous frame out to the tty.
+ * Returns 1 if frame accepted (or discarded), 0 otherwise.
+ */
+static int
+ppp_tty_sync_push(struct ppp *ppp)
+{
+	int sent;
+	struct tty_struct *tty = ppp2tty(ppp);
+	unsigned long flags;
+		
+	CHECK_PPP(0);
+
+	if (ppp->tpkt == NULL)
+		return 0;
+		
+	/* prevent reentrancy with tty_pushing flag */		
+	save_flags(flags);
+	cli();
+	if (ppp->tty_pushing) {
+		/* record wakeup attempt so we don't loose */
+		/* a wakeup call while doing push processing */
+		ppp->woke_up=1;
+		restore_flags(flags);
+		return 0;
+	}
+	ppp->tty_pushing = 1;
+	restore_flags(flags);
+	
+	if (tty == NULL || tty->disc_data != (void *) ppp)
+		goto flush;
+		
+	for(;;){
+		ppp->woke_up=0;
+		
+		/* Note: Sync driver accepts complete frame or nothing */
+		tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
+		sent = tty->driver.write(tty, 0, ppp->tpkt->data, ppp->tpkt->len);
+		if (sent < 0) {
+			/* write error (possible loss of CD) */
+			/* record error and discard current packet */
+			ppp->stats.ppp_oerrors++;
+			break;
+		}
+		ppp->stats.ppp_obytes += sent;
+		if (sent < ppp->tpkt->len) {
+			/* driver unable to accept frame just yet */
+			save_flags(flags);
+			cli();
+			if (ppp->woke_up) {
+				/* wake up called while processing */
+				/* try to send the frame again */
+				restore_flags(flags);
+				continue;
+			}
+			/* wait for wakeup callback to try send again */
+			ppp->tty_pushing = 0;
+			restore_flags(flags);
+			return 0;
+		}
+		break;
+	}
+flush:	
+	/* done with current packet (sent or discarded) */
+	kfree_skb(ppp->tpkt);
+	ppp->tpkt = 0;
+	ppp->tty_pushing = 0;
+	return 1;
+}
+
+/*
  * Send a packet to the peer over an async tty line.
  * Returns -1 iff the packet could not be accepted at present,
  * 0 if the packet was accepted but we can't accept another yet, or
@@ -830,6 +963,9 @@
 {
 	int avail, sent, done = 0;
 	struct tty_struct *tty = ppp2tty(ppp);
+	
+	if ( ppp->flags & SC_SYNC ) 
+		return ppp_tty_sync_push(ppp);
 
 	CHECK_PPP(0);
 	if (ppp->tty_pushing)
@@ -1028,6 +1164,73 @@
 
 	ppp->stats.ppp_ibytes += count;
 	skb = ppp->rpkt;
+	
+	if ( ppp->flags & SC_SYNC ) {
+		/* synchronous mode */
+		
+		if (ppp->toss==0xE0) {
+			/* this is the 1st frame, reset vj comp */
+			ppp_receive_error(ppp);
+			ppp->toss = 0;
+		}
+		
+		/*
+		 * Allocate an skbuff for frame.
+		 * The 128 is room for VJ header expansion.
+		 */
+		
+		if (skb == NULL)
+			skb = dev_alloc_skb(ppp->mru + 128 + PPP_HDRLEN);
+			
+		if (skb == NULL) {
+			if (ppp->flags & SC_DEBUG)
+				printk(KERN_DEBUG "couldn't "
+				       "alloc skb for recv\n");
+		} else {
+			/*
+			 * Decompress A/C and protocol compression here.
+			 */
+			p = skb_put(skb, 2);
+			p[0] = PPP_ALLSTATIONS;
+			p[1] = PPP_UI;
+			if (*data == PPP_ALLSTATIONS) {
+				data += 2;
+				count -= 2;
+			}
+			if ((*data & 1) != 0) {
+				p = skb_put(skb, 1);
+				p[0] = 0;
+			}
+
+			/* copy frame to socket buffer */
+			p = skb_put(skb, count);
+			memcpy(p,data,count);
+			
+			/*
+			 * Check if we've overflowed the MRU
+			 */
+			if (skb->len >= ppp->mru + PPP_HDRLEN + 2
+			    || skb_tailroom(skb) <= 0) {
+				++ppp->estats.rx_length_errors;
+				if (ppp->flags & SC_DEBUG)
+					printk(KERN_DEBUG "rcv frame too long: "
+					       "len=%d mru=%d hroom=%d troom=%d\n",
+					       skb->len, ppp->mru, skb_headroom(skb),
+					       skb_tailroom(skb));
+			} else {
+				if (!ppp_receive_frame(ppp, skb)) {
+					kfree_skb(skb);
+					ppp_receive_error(ppp);
+				}
+			}
+		
+			/* Reset for the next frame */
+			skb = NULL;
+		}
+		ppp->rpkt = skb;
+		return;
+	}
+	
 	while (count-- > 0) {
 		/*
 		 * Collect the character and error condition for the character.
@@ -1291,9 +1494,6 @@
 
 	CHECK_PPP_MAGIC(ppp);
 
-	/* ppp_dev_close may be called with tbusy==1 so we must set it to 0 */
-	dev->tbusy=0;
-
 	MOD_DEC_USE_COUNT;
 
 	return 0;
@@ -1850,23 +2050,25 @@
 		return 0;
 	}
 
-	/*
-	 * Verify the FCS of the frame and discard the FCS characters
-	 * from the end of the buffer.
-	 */
-	if (ppp->rfcs != PPP_GOODFCS) {
-		if (ppp->flags & SC_DEBUG) {
-			printk(KERN_DEBUG
-			       "ppp: frame with bad fcs, length = %d\n",
-			       count);
-			ppp_print_buffer("bad frame", data, count);
+	if ( !(ppp->flags & SC_SYNC) ) { 
+		/*
+		 * Verify the FCS of the frame and discard the FCS characters
+		 * from the end of the buffer.
+		 */
+		if (ppp->rfcs != PPP_GOODFCS) {
+			if (ppp->flags & SC_DEBUG) {
+				printk(KERN_DEBUG
+				       "ppp: frame with bad fcs, length = %d\n",
+				       count);
+				ppp_print_buffer("bad frame", data, count);
+			}
+			++ppp->estats.rx_crc_errors;
+			return 0;
 		}
-		++ppp->estats.rx_crc_errors;
-		return 0;
+		count -= 2;		/* ignore the fcs characters */
+		skb_trim(skb, count);
 	}
-	count -= 2;		/* ignore the fcs characters */
-	skb_trim(skb, count);
-
+	
 	/*
 	 * Process the active decompressor.
 	 */
@@ -2055,7 +2257,7 @@
 		return 0;
 	new_count = slhc_uncompress(ppp->slcomp, skb->data + PPP_HDRLEN,
 				    skb->len - PPP_HDRLEN);
-	if (new_count<=0) {
+	if (new_count <= 0) {
 		if (ppp->flags & SC_DEBUG)
 			printk(KERN_NOTICE
 			       "ppp: error in VJ decompression\n");
@@ -2234,7 +2436,10 @@
 	/*
 	 * Send the frame
 	 */
-	ret = ppp_async_send(ppp, skb);
+	if ( ppp->flags & SC_SYNC ) 
+		ret = ppp_sync_send(ppp, skb);
+	else
+		ret = ppp_async_send(ppp, skb);
 	if (ret > 0) {
 		/* we can release the lock */
 		ppp->xmit_busy = 0;
diff -urN linux-2.2.7-pre4/drivers/sbus/audio/cs4231.c linux/drivers/sbus/audio/cs4231.c
--- linux-2.2.7-pre4/drivers/sbus/audio/cs4231.c	Mon Dec  3 18:41:30 2001
+++ linux/drivers/sbus/audio/cs4231.c	Mon Dec  3 18:41:48 2001
@@ -2183,7 +2183,6 @@
                    sizeof(struct linux_ebus_dma));
     release_region((unsigned long)cs4231_chip->eb2p, 
                    sizeof(struct linux_ebus_dma));
-  cleanup:
     kfree(drv->private);
     return -EIO;
   }
diff -urN linux-2.2.7-pre4/drivers/sbus/char/pcikbd.c linux/drivers/sbus/char/pcikbd.c
--- linux-2.2.7-pre4/drivers/sbus/char/pcikbd.c	Mon Dec  3 18:41:30 2001
+++ linux/drivers/sbus/char/pcikbd.c	Mon Dec  3 18:41:48 2001
@@ -1,4 +1,4 @@
-/* $Id: pcikbd.c,v 1.25 1999/02/08 07:01:48 ecd Exp $
+/* $Id: pcikbd.c,v 1.26 1999/04/28 11:55:42 davem Exp $
  * pcikbd.c: Ultra/AX PC keyboard support.
  *
  * Copyright (C) 1997  Eddie C. Dost  (ecd@skynet.be)
@@ -227,8 +227,6 @@
 	"230\177\000\000\213\214\000\000\000\000\000\000\000\000\000\000" /* 0x50 - 0x5f */
 	"\r\000/";					/* 0x60 - 0x6f */
 #endif
-
-static unsigned int prev_scancode = 0;
 
 int pcikbd_setkeycode(unsigned int scancode, unsigned int keycode)
 {
diff -urN linux-2.2.7-pre4/drivers/usb/Config.in linux/drivers/usb/Config.in
--- linux-2.2.7-pre4/drivers/usb/Config.in	Mon Dec  3 18:41:30 2001
+++ linux/drivers/usb/Config.in	Mon Dec  3 18:41:48 2001
@@ -12,13 +12,14 @@
 comment 'USB drivers - not for the faint of heart'
 
 if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-  bool 'Support for USB (EXPERIMENTAL!)' CONFIG_USB
-  if [ "$CONFIG_USB" = "y" ]; then
+  tristate 'Support for USB (EXPERIMENTAL!)' CONFIG_USB
+  if [ ! "$CONFIG_USB" = "n" ]; then
     bool 'UHCI (intel PIIX4 and others) support?' CONFIG_USB_UHCI
     bool 'OHCI (compaq and some others) support?' CONFIG_USB_OHCI
 
     bool 'USB mouse support' CONFIG_USB_MOUSE
     bool 'USB keyboard support' CONFIG_USB_KBD
+    bool 'USB audio parsing support' CONFIG_USB_AUDIO
   fi
 fi
 
diff -urN linux-2.2.7-pre4/drivers/usb/Makefile linux/drivers/usb/Makefile
--- linux-2.2.7-pre4/drivers/usb/Makefile	Mon Dec  3 18:41:30 2001
+++ linux/drivers/usb/Makefile	Mon Dec  3 18:41:48 2001
@@ -16,44 +16,60 @@
 
 L_TARGET := usb.a
 M_OBJS   :=
-L_OBJS   := usb.o hub.o usb-debug.o
+L_OBJS   :=
 LX_OBJS  :=
+USBX_OBJS := usb.o hub.o usb-debug.o
 
-ifeq ($(CONFIG_USB_UHCI),y)
-  L_OBJS += uhci.o uhci-debug.o
-else
-  ifeq ($(CONFIG_USB_UHCI),m)
-    MX_OBJS += usb-uhci.o uhci-debug.o
-  endif
+ifeq ($(CONFIG_USB_MOUSE),y)
+  USBX_OBJS += mouse.o
 endif
 
-ifeq ($(CONFIG_USB_OHCI),y)
-  L_OBJS += ohci.o ohci-debug.o
-else
-  ifeq ($(CONFIG_USB_UHCI),m)
-    MX_OBJS += ohci.o ohci-debug.o
-  endif
+ifeq ($(CONFIG_USB_KBD),y)
+  USBX_OBJS += keyboard.o keymap.o
 endif
 
-ifeq ($(CONFIG_USB_MOUSE),y)
-  L_OBJS += mouse.o
-else
-  ifeq ($(CONFIG_USB_UHCI),m)
-    MX_OBJS += mouse.o
+ifeq ($(CONFIG_USB_AUDIO),y)
+  USBX_OBJS += audio.o
+endif
+
+ifeq ($(CONFIG_USB), y)
+  L_OBJS += $(USBX_OBJS)
+endif
+
+ifeq ($(CONFIG_USB_UHCI),y)
+  ifeq ($(CONFIG_USB), y)
+    L_OBJS += uhci.o uhci-debug.o
+  else
+    ifeq ($(CONFIG_USB),m)
+      M_OBJS += usb-uhci.o
+      MIX_OBJS += $(USBX_OBJS)
+    endif
   endif
 endif
 
-ifeq ($(CONFIG_USB_KBD),y)
-  L_OBJS += keyboard.o keymap.o
-else
-  ifeq ($(CONFIG_USB_UHCI),m)
-    MX_OBJS += keyboard.o
+ifeq ($(CONFIG_USB_OHCI),y)
+  ifeq ($(CONFIG_USB), y)
+    L_OBJS += ohci.o ohci-debug.o
+  else
+    ifeq ($(CONFIG_USB),m)
+      USBO_OBJS += ohci.o ohci-debug.o
+      M_OBJS += usb-ohci.o
+      MIX_OBJS += $(USBX_OBJS)
+    endif
   endif
 endif
 
+
 include $(TOPDIR)/Rules.make
 
 keymap.o: keymap.c
 
 keymap.c: maps/serial.map maps/usb.map maps/fixup.map
 	./mkmap > $@
+
+usb-uhci.o: uhci.o uhci-debug.o $(USBX_OBJS)
+	$(LD) $(LD_RFLAG) -r -o $@  uhci.o uhci-debug.o $(USBX_OBJS)
+
+usb-ohci.o: ohci.o ohci-debug.o $(USBX_OBJS)
+	$(LD) $(LD_RFLAG) -r -o $@ ohci.o ohci-debug.o $(USBX_OBJS)
+
diff -urN linux-2.2.7-pre4/drivers/usb/audio.c linux/drivers/usb/audio.c
--- linux-2.2.7-pre4/drivers/usb/audio.c	Wed Dec 31 16:00:00 1969
+++ linux/drivers/usb/audio.c	Mon Dec  3 18:41:48 2001
@@ -0,0 +1,126 @@
+#include <linux/kernel.h>
+#include <linux/malloc.h>
+#include <linux/string.h>
+#include <linux/timer.h>
+#include <linux/sched.h>
+#include "usb.h"
+
+static int usb_audio_probe(struct usb_device *dev);
+static void usb_audio_disconnect(struct usb_device *dev);
+static LIST_HEAD(usb_audio_list);
+
+struct usb_audio
+{
+	struct usb_device *dev;
+	struct list_head list;
+};
+
+static struct usb_driver usb_audio_driver =
+{
+	"audio",
+	usb_audio_probe,
+	usb_audio_disconnect,
+	{NULL, NULL}
+};
+
+
+static int usb_audio_irq(int state, void *buffer, void *dev_id)
+{
+	struct usb_audio *aud = (struct usb_audio*) dev_id;
+	return 1;
+}
+
+static int usb_audio_probe(struct usb_device *dev)
+{
+	struct usb_interface_descriptor *interface;
+	struct usb_endpoint_descriptor *endpoint;
+	struct usb_audio *aud;
+
+	int i;
+	int na=0;
+	
+	interface = &dev->config[0].interface[0];
+
+	for(i=0;i<dev->config[0].bNumInterfaces;i++)
+	{
+		int x;
+		
+		endpoint = &interface->endpoint[i];
+
+		if(interface->bInterfaceClass != 1) 
+	        	continue;
+
+		printk(KERN_INFO "USB audio device detected.\n");
+	
+		switch(interface->bInterfaceSubClass)
+		{
+			case 0x01:
+				printk(KERN_INFO "audio: Control device.\n");
+				break;
+			case 0x02:
+				printk(KERN_INFO "audio: streaming.\n");
+				break;
+			case 0x03:
+				printk(KERN_INFO "audio: nonstreaming.\n");
+				break;
+		}
+		na++;
+	}
+	
+	if(na==0)
+		return -1;
+
+	aud = kmalloc(sizeof(struct usb_audio), GFP_KERNEL);
+	if(aud)
+	{
+        	memset(aud, 0, sizeof(*aud));
+        	aud->dev = dev;
+        	dev->private = aud;
+
+		endpoint = &interface->endpoint[0];
+
+//        	usb_set_configuration(dev, dev->config[0].bConfigurationValue);
+//        	usb_set_protocol(dev, 0);
+//        	usb_set_idle(dev, 0, 0);
+        
+        	usb_request_irq(dev,
+                        usb_rcvctrlpipe(dev, endpoint->bEndpointAddress),
+                        usb_audio_irq,
+                        endpoint->bInterval,
+                        aud);
+
+		list_add(&aud->list, &usb_audio_list);
+	}
+	return 0;
+}
+
+static void usb_audio_disconnect(struct usb_device *dev)
+{
+	struct usb_audio *aud = (struct usb_audio*) dev->private;
+	if(aud)
+	{
+        	dev->private = NULL;
+        	list_del(&aud->list);
+        	kfree(aud);
+	}
+	printk(KERN_INFO "USB audio driver removed.\n");
+}
+
+int usb_audio_init(void)
+{
+	usb_register(&usb_audio_driver);
+	return 0;
+}
+
+/*
+ *	Support functions for parsing
+ */
+ 
+void usb_audio_interface(struct usb_interface_descriptor *interface, u8 *data)
+{
+}
+
+void usb_audio_endpoint(struct usb_endpoint_descriptor *interface, u8 *data)
+{
+}
+
diff -urN linux-2.2.7-pre4/drivers/usb/inits.h linux/drivers/usb/inits.h
--- linux-2.2.7-pre4/drivers/usb/inits.h	Mon Dec  3 18:41:30 2001
+++ linux/drivers/usb/inits.h	Mon Dec  3 18:41:48 2001
@@ -1,3 +1,4 @@
 int bp_mouse_init(void);
 int usb_kbd_init(void);
+int usb_audio_init(void);
 int hub_init(void);
diff -urN linux-2.2.7-pre4/drivers/usb/uhci.c linux/drivers/usb/uhci.c
--- linux-2.2.7-pre4/drivers/usb/uhci.c	Mon Dec  3 18:41:30 2001
+++ linux/drivers/usb/uhci.c	Mon Dec  3 18:41:48 2001
@@ -1182,9 +1182,16 @@
 		if (retval < 0)
 			continue;
 
+#ifdef CONFIG_USB_MOUSE
 		usb_mouse_init();
+#endif
+#ifdef CONFIG_USB_KBD		
 		usb_kbd_init();
+#endif		
 		hub_init();
+#ifdef CONFIG_USB_AUDIO		
+		usb_audio_init();
+#endif		
 #ifdef CONFIG_APM
 		apm_register_callback(&handle_apm_event);
 #endif
diff -urN linux-2.2.7-pre4/drivers/usb/uhci.h linux/drivers/usb/uhci.h
--- linux-2.2.7-pre4/drivers/usb/uhci.h	Mon Dec  3 18:41:30 2001
+++ linux/drivers/usb/uhci.h	Mon Dec  3 18:41:48 2001
@@ -102,7 +102,7 @@
  */
 struct uhci;
 
-#define UHCI_MAXTD 32
+#define UHCI_MAXTD 64
 
 #define UHCI_MAXQH	16
 
diff -urN linux-2.2.7-pre4/drivers/usb/usb.c linux/drivers/usb/usb.c
--- linux-2.2.7-pre4/drivers/usb/usb.c	Mon Dec  3 18:41:30 2001
+++ linux/drivers/usb/usb.c	Mon Dec  3 18:41:48 2001
@@ -101,43 +101,93 @@
 static int usb_expect_descriptor(unsigned char *ptr, int len, unsigned char desctype, unsigned char descindex)
 {
 	int parsed = 0;
+	int n_len;
+	unsigned short n_desc;
 
 	for (;;) {
-		unsigned short n_desc;
-		int n_len, i;
+		int i;
 
 		if (len < descindex)
 			return -1;
 		n_desc = *(unsigned short *)ptr;
+		n_len = n_desc & 0xff;
+
 		if (n_desc == ((desctype << 8) + descindex))
-			return parsed;
+			break;
+
+		if (((n_desc >> 8)&0xFF) == desctype &&
+			n_len > descindex)
+		{
+			printk("bug: oversized descriptor.\n");
+			break;
+		}
+			
+		if (n_len < 2 || n_len > len)
+		{
+			printk("Short descriptor.\n");
+			return -1;
+		}
 		printk(
 		"Expected descriptor %02X/%02X, got %02X/%02X - skipping\n",
 			desctype, descindex,
 			(n_desc >> 8) & 0xFF, n_desc & 0xFF);
-		n_len = n_desc & 0xff;
-		if (n_len < 2 || n_len > len)
-			return -1;
 		for (i = 0 ; i < n_len; i++)
 			printk("   %d %02x\n", i, ptr[i]);
 		len -= n_len;
 		ptr += n_len;
 		parsed += n_len;
 	}
+	
+	printk("Found %02X:%02X\n",
+		desctype, descindex);
+	return parsed;
 }
 
-static int usb_parse_endpoint(struct usb_endpoint_descriptor *endpoint, unsigned char *ptr, int len)
+/*
+ * Parse the even more incomprehensible mess made of the USB spec
+ * by USB audio having private magic to go with it.
+ */
+ 
+static int usb_check_descriptor(unsigned char *ptr, int len, unsigned char desctype)
+{
+	int n_len = ptr[0];
+
+	if (n_len < 2 || n_len > len)
+	{
+		printk("Short descriptor.\n");
+		return -1;
+	}
+
+	if (ptr[1] == desctype)
+		return 0;
+		
+	return -1;
+}
+
+
+static int usb_parse_endpoint(struct usb_device *dev, struct usb_endpoint_descriptor *endpoint, unsigned char *ptr, int len)
 {
 	int parsed = usb_expect_descriptor(ptr, len, USB_DT_ENDPOINT, 7);
+	int i;
 
 	if (parsed < 0)
 		return parsed;
+	memcpy(endpoint, ptr + parsed, ptr[parsed]);
 
-	memcpy(endpoint, ptr + parsed, 7);
-	return parsed + 7;
+	parsed += ptr[parsed];
+	len -= ptr[parsed];
+
+	while((i = usb_check_descriptor(ptr+parsed, len, 0x25))>=0)
+	{
+		usb_audio_endpoint(endpoint, ptr+parsed+i);
+		len -= ptr[parsed+i];
+		parsed += ptr[parsed+i];
+	}
+	
+	return parsed;// + ptr[parsed];
 }
 
-static int usb_parse_interface(struct usb_interface_descriptor *interface, unsigned char *ptr, int len)
+static int usb_parse_interface(struct usb_device *dev, struct usb_interface_descriptor *interface, unsigned char *ptr, int len)
 {
 	int i;
 	int parsed = usb_expect_descriptor(ptr, len, USB_DT_INTERFACE, 9);
@@ -146,19 +196,29 @@
 	if (parsed < 0)
 		return parsed;
 
-	memcpy(interface, ptr + parsed, 9);
-	len -= 9;
-	parsed += 9;
-
+	memcpy(interface, ptr + parsed, *ptr);
+	len -= ptr[parsed];
+	parsed += ptr[parsed];
+
+	while((i=usb_check_descriptor(ptr+parsed, len, 0x24))>=0)
+	{
+		usb_audio_interface(interface, ptr+parsed+i);
+		len -= ptr[parsed+i];
+		parsed += ptr[parsed+i];
+	}
+	
 	if (interface->bNumEndpoints > USB_MAXENDPOINTS)
+	{
+		printk(KERN_WARNING "usb: too many endpoints.\n");
 		return -1;
+	}
 
 	for (i = 0; i < interface->bNumEndpoints; i++) {
-		if(((USB_DT_HID << 8) | 9) == *(unsigned short*)(ptr + parsed)) {
-			parsed += 9;	/* skip over the HID descriptor for now */
-			len -= 9;
-		}
-		retval = usb_parse_endpoint(interface->endpoint + i, ptr + parsed, len);
+//		if(((USB_DT_HID << 8) | 9) == *(unsigned short*)(ptr + parsed)) {
+//			parsed += 9;	/* skip over the HID descriptor for now */
+//			len -= 9;
+//		}
+		retval = usb_parse_endpoint(dev, interface->endpoint + i, ptr + parsed, len);
 		if (retval < 0) return retval;
 		parsed += retval;
 		len -= retval;
@@ -166,7 +226,7 @@
 	return parsed;
 }
 
-static int usb_parse_config(struct usb_config_descriptor *config, unsigned char *ptr, int len)
+static int usb_parse_config(struct usb_device *dev, struct usb_config_descriptor *config, unsigned char *ptr, int len)
 {
 	int i;
 	int parsed = usb_expect_descriptor(ptr, len, USB_DT_CONFIG, 9);
@@ -174,17 +234,21 @@
 	if (parsed < 0)
 		return parsed;
 
-	memcpy(config, ptr + parsed, 9);
-	len -= 9;
-	parsed += 9;
+	memcpy(config, ptr + parsed, *ptr);
+	len -= *ptr;
+	parsed += *ptr;
 
 	if (config->bNumInterfaces > USB_MAXINTERFACES)
+	{
+		printk(KERN_WARNING "usb: too many interfaces.\n");
 		return -1;
+	}
 
 	for (i = 0; i < config->bNumInterfaces; i++) {
-		int retval = usb_parse_interface(config->interface + i, ptr + parsed, len);
+		int retval = usb_parse_interface(dev, config->interface + i, ptr + parsed, len);
 		if (retval < 0)
-			return retval;
+			return parsed; // HACK
+//			return retval;
 		parsed += retval;
 		len -= retval;
 	}
@@ -197,10 +261,13 @@
 	unsigned char *ptr = __buf;
 
 	if (dev->descriptor.bNumConfigurations > USB_MAXCONFIG)
+	{
+		printk(KERN_WARNING "usb: too many configurations.\n");
 		return -1;
+	}
 
 	for (i = 0; i < dev->descriptor.bNumConfigurations; i++) {
-		int retval = usb_parse_config(dev->config + i, ptr, bytes);
+		int retval = usb_parse_config(dev, dev->config + i, ptr, bytes);
 		if (retval < 0)
 			return retval;
 		ptr += retval;
@@ -451,7 +518,7 @@
 int usb_get_configuration(struct usb_device *dev)
 {
 	unsigned int size;
-	unsigned char buffer[128];
+	unsigned char buffer[400];
 
 	/* Get the first 8 bytes - guaranteed */
 	if (usb_get_descriptor(dev, USB_DT_CONFIG, 0, buffer, 8))
@@ -460,7 +527,10 @@
 	/* Get the full buffer */
 	size = *(unsigned short *)(buffer+2);
 	if (size > sizeof(buffer))
+	{
+		printk(KERN_INFO "usb: truncated DT_CONFIG (want %d).\n", size);
 		size = sizeof(buffer);
+	}
 
 	if (usb_get_descriptor(dev, USB_DT_CONFIG, 0, buffer, size))
 		return -1;
diff -urN linux-2.2.7-pre4/drivers/usb/usb.h linux/drivers/usb/usb.h
--- linux-2.2.7-pre4/drivers/usb/usb.h	Mon Dec  3 18:41:30 2001
+++ linux/drivers/usb/usb.h	Mon Dec  3 18:41:48 2001
@@ -107,9 +107,9 @@
  * I'm not proud. I just want this dang
  * thing to start working.
  */
-#define USB_MAXCONFIG		1
-#define USB_MAXINTERFACES	3
-#define USB_MAXENDPOINTS	3
+#define USB_MAXCONFIG		2
+#define USB_MAXINTERFACES	8
+#define USB_MAXENDPOINTS	4
 
 struct usb_device_descriptor {
 	__u8  bLength;
@@ -354,6 +354,18 @@
 void usb_show_endpoint_descriptor(struct usb_endpoint_descriptor *);
 void usb_show_hub_descriptor(struct usb_hub_descriptor *);
 void usb_show_device(struct usb_device *);
+
+/*
+ * Audio parsing helpers
+ */
+
+#ifdef CONFIG_USB_AUDIO
+void usb_audio_interface(struct usb_interface_descriptor *, u8 *);
+void usb_audio_endpoint(struct usb_endpoint_descriptor *, u8 *);
+#else
+extern inline void usb_audio_interface(struct usb_interface_descriptor *, u8 *) {}
+extern inline void usb_audio_endpoint(struct usb_endpoint_descriptor *, u8 *) {}
+#endif
 
 #endif
 
diff -urN linux-2.2.7-pre4/drivers/video/fbcon-cfb2.c linux/drivers/video/fbcon-cfb2.c
--- linux-2.2.7-pre4/drivers/video/fbcon-cfb2.c	Thu Feb 25 10:02:12 1999
+++ linux/drivers/video/fbcon-cfb2.c	Mon Dec  3 18:41:48 2001
@@ -50,7 +50,7 @@
 
 void fbcon_cfb2_setup(struct display *p)
 {
-    p->next_line = p->var.xres_virtual>>2;
+    p->next_line = p->line_length ? p->line_length : p->var.xres_virtual>>2;
     p->next_plane = 0;
 }
 
diff -urN linux-2.2.7-pre4/drivers/video/fbcon-cfb4.c linux/drivers/video/fbcon-cfb4.c
--- linux-2.2.7-pre4/drivers/video/fbcon-cfb4.c	Thu Feb 25 10:02:12 1999
+++ linux/drivers/video/fbcon-cfb4.c	Mon Dec  3 18:41:48 2001
@@ -50,7 +50,7 @@
 
 void fbcon_cfb4_setup(struct display *p)
 {
-    p->next_line = p->var.xres_virtual>>1;
+    p->next_line = p->line_length ? p->line_length : p->var.xres_virtual>>1;
     p->next_plane = 0;
 }
 
diff -urN linux-2.2.7-pre4/fs/proc/openpromfs.c linux/fs/proc/openpromfs.c
--- linux-2.2.7-pre4/fs/proc/openpromfs.c	Mon Dec  3 18:41:30 2001
+++ linux/fs/proc/openpromfs.c	Mon Dec  3 18:41:48 2001
@@ -1,4 +1,4 @@
-/* $Id: openpromfs.c,v 1.32 1998/11/18 06:15:20 davem Exp $
+/* $Id: openpromfs.c,v 1.33 1999/04/28 11:57:33 davem Exp $
  * openpromfs.c: /proc/openprom handling routines
  *
  * Copyright (C) 1996-1998 Jakub Jelinek  (jj@sunsite.mff.cuni.cz)
@@ -59,7 +59,7 @@
 
 static int openpromfs_create (struct inode *, struct dentry *, int);
 static int openpromfs_readdir(struct file *, void *, filldir_t);
-static int openpromfs_lookup(struct inode *, struct dentry *dentry);
+static struct dentry *openpromfs_lookup(struct inode *, struct dentry *dentry);
 static int openpromfs_unlink (struct inode *, struct dentry *dentry);
 
 static ssize_t nodenum_read(struct file *file, char *buf,
@@ -685,7 +685,7 @@
 	return 0;
 }
 
-static int openpromfs_lookup(struct inode * dir, struct dentry *dentry)
+static struct dentry *openpromfs_lookup(struct inode * dir, struct dentry *dentry)
 {
 	int ino = 0;
 #define OPFSL_DIR	0
@@ -776,11 +776,11 @@
 		if (ino)
 			type = OPFSL_DIR;
 		else
-			return -ENOENT;
+			return ERR_PTR(-ENOENT);
 	}
 	inode = proc_get_inode (dir->i_sb, ino, 0);
 	if (!inode)
-		return -EINVAL;
+		return ERR_PTR(-EINVAL);
 	switch (type) {
 	case OPFSL_DIR:
 		inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO;
@@ -827,7 +827,7 @@
 	inode->i_uid = 0;
 
 	d_add(dentry, inode);
-	return 0;
+	return NULL;
 }
 
 static int openpromfs_readdir(struct file * filp, void * dirent, filldir_t filldir)
diff -urN linux-2.2.7-pre4/fs/proc/root.c linux/fs/proc/root.c
--- linux-2.2.7-pre4/fs/proc/root.c	Mon Dec  3 18:41:30 2001
+++ linux/fs/proc/root.c	Mon Dec  3 18:41:48 2001
@@ -181,14 +181,14 @@
 #if defined(CONFIG_SUN_OPENPROMFS) || defined(CONFIG_SUN_OPENPROMFS_MODULE)
 
 static int (*proc_openprom_defreaddir_ptr)(struct file *, void *, filldir_t);
-static int (*proc_openprom_deflookup_ptr)(struct inode *, struct dentry *);
+static struct dentry * (*proc_openprom_deflookup_ptr)(struct inode *, struct dentry *);
 void (*proc_openprom_use)(struct inode *, int) = 0;
 static struct openpromfs_dev *proc_openprom_devices = NULL;
 static ino_t proc_openpromdev_ino = PROC_OPENPROMD_FIRST;
 
 struct inode_operations *
 proc_openprom_register(int (*readdir)(struct file *, void *, filldir_t),
-		       int (*lookup)(struct inode *, struct dentry *),
+		       struct dentry * (*lookup)(struct inode *, struct dentry *),
 		       void (*use)(struct inode *, int),
 		       struct openpromfs_dev ***devices)
 {
@@ -250,7 +250,7 @@
 }
 #define OPENPROM_DEFREADDIR proc_openprom_defreaddir
 
-static int 
+static struct dentry *
 proc_openprom_deflookup(struct inode * dir, struct dentry *dentry)
 {
 	request_module("openpromfs");
@@ -258,7 +258,7 @@
 	    proc_openprom_deflookup)
 		return proc_openprom_inode_operations.lookup 
 				(dir, dentry);
-	return -ENOENT;
+	return ERR_PTR(-ENOENT);
 }
 #define OPENPROM_DEFLOOKUP proc_openprom_deflookup
 #else
diff -urN linux-2.2.7-pre4/include/asm-alpha/siginfo.h linux/include/asm-alpha/siginfo.h
--- linux-2.2.7-pre4/include/asm-alpha/siginfo.h	Wed Aug 19 13:24:43 1998
+++ linux/include/asm-alpha/siginfo.h	Mon Dec  3 18:41:48 2001
@@ -138,7 +138,7 @@
  */
 #define TRAP_BRKPT	1	/* process breakpoint */
 #define TRAP_TRACE	2	/* process trace trap */
-#define NSIGTRAP
+#define NSIGTRAP	2
 
 /*
  * SIGCHLD si_codes
diff -urN linux-2.2.7-pre4/include/asm-arm/siginfo.h linux/include/asm-arm/siginfo.h
--- linux-2.2.7-pre4/include/asm-arm/siginfo.h	Wed Aug 19 13:24:43 1998
+++ linux/include/asm-arm/siginfo.h	Mon Dec  3 18:41:48 2001
@@ -138,7 +138,7 @@
  */
 #define TRAP_BRKPT	1	/* process breakpoint */
 #define TRAP_TRACE	2	/* process trace trap */
-#define NSIGTRAP
+#define NSIGTRAP	2
 
 /*
  * SIGCHLD si_codes
diff -urN linux-2.2.7-pre4/include/asm-i386/siginfo.h linux/include/asm-i386/siginfo.h
--- linux-2.2.7-pre4/include/asm-i386/siginfo.h	Sun Dec 27 22:18:28 1998
+++ linux/include/asm-i386/siginfo.h	Mon Dec  3 18:41:48 2001
@@ -138,7 +138,7 @@
  */
 #define TRAP_BRKPT	1	/* process breakpoint */
 #define TRAP_TRACE	2	/* process trace trap */
-#define NSIGTRAP
+#define NSIGTRAP	2
 
 /*
  * SIGCHLD si_codes
diff -urN linux-2.2.7-pre4/include/asm-mips/siginfo.h linux/include/asm-mips/siginfo.h
--- linux-2.2.7-pre4/include/asm-mips/siginfo.h	Tue Oct 20 13:52:54 1998
+++ linux/include/asm-mips/siginfo.h	Mon Dec  3 18:41:48 2001
@@ -146,7 +146,7 @@
  */
 #define TRAP_BRKPT	1	/* process breakpoint */
 #define TRAP_TRACE	2	/* process trace trap */
-#define NSIGTRAP
+#define NSIGTRAP	2
 
 /*
  * SIGCHLD si_codes
diff -urN linux-2.2.7-pre4/include/asm-ppc/siginfo.h linux/include/asm-ppc/siginfo.h
--- linux-2.2.7-pre4/include/asm-ppc/siginfo.h	Wed Aug 19 13:24:44 1998
+++ linux/include/asm-ppc/siginfo.h	Mon Dec  3 18:41:48 2001
@@ -138,7 +138,7 @@
  */
 #define TRAP_BRKPT	1	/* process breakpoint */
 #define TRAP_TRACE	2	/* process trace trap */
-#define NSIGTRAP
+#define NSIGTRAP	2
 
 /*
  * SIGCHLD si_codes
diff -urN linux-2.2.7-pre4/include/asm-sparc/asmmacro.h linux/include/asm-sparc/asmmacro.h
--- linux-2.2.7-pre4/include/asm-sparc/asmmacro.h	Tue Apr 14 17:44:23 1998
+++ linux/include/asm-sparc/asmmacro.h	Mon Dec  3 18:41:48 2001
@@ -26,7 +26,7 @@
 
 #define GET_PROCESSOR_MID(reg, tmp) \
 	rd	%tbr, %reg; \
-	sethi	C_LABEL(mid_xlate), %tmp; \
+	sethi	%hi(C_LABEL(mid_xlate)), %tmp; \
 	srl	%reg, 12, %reg; \
 	or	%tmp, %lo(C_LABEL(mid_xlate)), %tmp; \
 	and	%reg, 3, %reg; \
@@ -34,7 +34,7 @@
 
 #define GET_PROCESSOR_OFFSET(reg, tmp) \
 	GET_PROCESSOR_ID(reg) \
-	sethi	C_LABEL(cpu_offset), %tmp; \
+	sethi	%hi(C_LABEL(cpu_offset)), %tmp; \
 	sll	%reg, 2, %reg; \
 	or	%tmp, %lo(C_LABEL(cpu_offset)), %tmp; \
 	ld	[%tmp + %reg], %reg;
diff -urN linux-2.2.7-pre4/include/asm-sparc/keyboard.h linux/include/asm-sparc/keyboard.h
--- linux-2.2.7-pre4/include/asm-sparc/keyboard.h	Mon Dec  3 18:41:30 2001
+++ linux/include/asm-sparc/keyboard.h	Mon Dec  3 18:41:48 2001
@@ -1,4 +1,4 @@
-/* $Id: keyboard.h,v 1.1 1998/09/22 05:54:42 jj Exp $
+/* $Id: keyboard.h,v 1.2 1999/04/28 11:59:07 davem Exp $
  * linux/include/asm-sparc/keyboard.h
  *
  * sparc64 Created Aug 29 1997 by Eddie C. Dost (ecd@skynet.be)
diff -urN linux-2.2.7-pre4/include/asm-sparc/siginfo.h linux/include/asm-sparc/siginfo.h
--- linux-2.2.7-pre4/include/asm-sparc/siginfo.h	Sun Oct  4 10:22:44 1998
+++ linux/include/asm-sparc/siginfo.h	Mon Dec  3 18:41:48 2001
@@ -142,7 +142,7 @@
  */
 #define TRAP_BRKPT	1	/* process breakpoint */
 #define TRAP_TRACE	2	/* process trace trap */
-#define NSIGTRAP
+#define NSIGTRAP	2
 
 /*
  * SIGCHLD si_codes
diff -urN linux-2.2.7-pre4/include/asm-sparc64/keyboard.h linux/include/asm-sparc64/keyboard.h
--- linux-2.2.7-pre4/include/asm-sparc64/keyboard.h	Mon Dec  3 18:41:30 2001
+++ linux/include/asm-sparc64/keyboard.h	Mon Dec  3 18:41:48 2001
@@ -1,4 +1,4 @@
-/* $Id: keyboard.h,v 1.2 1997/09/07 15:40:49 ecd Exp $
+/* $Id: keyboard.h,v 1.3 1999/04/28 11:59:12 davem Exp $
  * linux/include/asm-sparc64/keyboard.h
  *
  * Created Aug 29 1997 by Eddie C. Dost (ecd@skynet.be)
diff -urN linux-2.2.7-pre4/include/asm-sparc64/siginfo.h linux/include/asm-sparc64/siginfo.h
--- linux-2.2.7-pre4/include/asm-sparc64/siginfo.h	Wed Aug 19 13:24:44 1998
+++ linux/include/asm-sparc64/siginfo.h	Mon Dec  3 18:41:48 2001
@@ -201,7 +201,7 @@
  */
 #define TRAP_BRKPT	1	/* process breakpoint */
 #define TRAP_TRACE	2	/* process trace trap */
-#define NSIGTRAP
+#define NSIGTRAP	2
 
 /*
  * SIGCHLD si_codes
diff -urN linux-2.2.7-pre4/include/linux/if_ppp.h linux/include/linux/if_ppp.h
--- linux-2.2.7-pre4/include/linux/if_ppp.h	Fri Jul 10 14:02:00 1998
+++ linux/include/linux/if_ppp.h	Mon Dec  3 18:41:48 2001
@@ -1,4 +1,4 @@
-/*	$Id: if_ppp.h,v 1.14 1998/07/07 04:27:33 paulus Exp $	*/
+/*	$Id: if_ppp.h,v 1.19 1999/03/31 06:07:57 paulus Exp $	*/
 
 /*
  * if_ppp.h - Point-to-Point Protocol definitions.
@@ -21,7 +21,7 @@
  */
 
 /*
- *  ==FILEVERSION 980704==
+ *  ==FILEVERSION 990331==
  *
  *  NOTE TO MAINTAINERS:
  *     If you modify this file at all, please set the above date.
@@ -35,19 +35,13 @@
 #ifndef _IF_PPP_H_
 #define _IF_PPP_H_
 
-#if defined(__linux__)
-#include <linux/if.h>
-#include <linux/ioctl.h>
-#include <linux/ppp_defs.h>
-#endif
-
 /*
  * Packet sizes
  */
 
 #define	PPP_MTU		1500	/* Default MTU (size of Info field) */
 #define PPP_MAXMRU	65000	/* Largest MRU we allow */
-#define PPP_VERSION	"2.3.3"
+#define PPP_VERSION	"2.3.7"
 #define PPP_MAGIC	0x5002	/* Magic value for the ppp structure */
 #define PROTO_IPX	0x002b	/* protocol numbers */
 #define PROTO_DNA_RT    0x0027  /* DNA Routing */
@@ -73,7 +67,8 @@
 #define SC_LOG_OUTPKT	0x00040000	/* log contents of pkts sent */
 #define SC_LOG_RAWIN	0x00080000	/* log all chars received */
 #define SC_LOG_FLUSH	0x00100000	/* log all chars flushed */
-#define	SC_MASK		0x0f0000ff	/* bits that user can change */
+#define	SC_SYNC		0x00200000	/* synchronous serial mode */
+#define	SC_MASK		0x0f2000ff	/* bits that user can change */
 
 /* state bits */
 #define SC_XMIT_BUSY	0x10000000	/* (used by isdn_ppp?) */
diff -urN linux-2.2.7-pre4/include/linux/if_pppvar.h linux/include/linux/if_pppvar.h
--- linux-2.2.7-pre4/include/linux/if_pppvar.h	Thu Jan 14 22:56:06 1999
+++ linux/include/linux/if_pppvar.h	Mon Dec  3 18:41:48 2001
@@ -42,7 +42,7 @@
  */
 
 /*
- *  ==FILEVERSION 990114==
+ *  ==FILEVERSION 990325==
  *
  *  NOTE TO MAINTAINERS:
  *   If you modify this file at all, please set the above date.
@@ -89,6 +89,7 @@
 	__u8		escape;		/* 0x20 if prev char was PPP_ESC */
 	__u8		toss;		/* toss this frame		*/
 	volatile __u8	tty_pushing;	/* internal state flag		*/
+	volatile __u8	woke_up;	/* internal state flag		*/
 	__u32		xmit_async_map[8]; /* 1 bit means that given control 
 					   character is quoted on output*/
 	__u32		recv_async_map; /* 1 bit means that given control 
diff -urN linux-2.2.7-pre4/include/linux/proc_fs.h linux/include/linux/proc_fs.h
--- linux-2.2.7-pre4/include/linux/proc_fs.h	Mon Dec  3 18:41:30 2001
+++ linux/include/linux/proc_fs.h	Mon Dec  3 18:41:48 2001
@@ -394,7 +394,7 @@
 };
 extern struct inode_operations *
 proc_openprom_register(int (*readdir)(struct file *, void *, filldir_t),
-		       int (*lookup)(struct inode *, struct dentry *),
+		       struct dentry * (*lookup)(struct inode *, struct dentry *),
 		       void (*use)(struct inode *, int),
 		       struct openpromfs_dev ***);
 extern void proc_openprom_deregister(void);
diff -urN linux-2.2.7-pre4/include/net/tcp.h linux/include/net/tcp.h
--- linux-2.2.7-pre4/include/net/tcp.h	Mon Dec  3 18:41:30 2001
+++ linux/include/net/tcp.h	Mon Dec  3 18:41:48 2001
@@ -716,6 +716,14 @@
 	return (new_win && (new_win > (cur_win << 1)));
 }
 
+/* TCP timestamps are only 32-bits, this causes a slight
+ * complication on 64-bit systems since we store a snapshot
+ * of jiffies in the buffer control blocks below.  We decidely
+ * only use of the low 32-bits of jiffies and hide the ugly
+ * casts with the following macro.
+ */
+#define tcp_time_stamp		((__u32)(jiffies))
+
 /* This is what the send packet queueing engine uses to pass
  * TCP per-packet control information to the transmission
  * code.  We also store the host-order sequence numbers in
@@ -732,7 +740,7 @@
 	} header;	/* For incoming frames		*/
 	__u32		seq;		/* Starting sequence number	*/
 	__u32		end_seq;	/* SEQ + FIN + SYN + datalen	*/
-	unsigned long	when;		/* used to compute rtt's	*/
+	__u32		when;		/* used to compute rtt's	*/
 	__u8		flags;		/* TCP header flags.		*/
 
 	/* NOTE: These must match up to the flags byte in a
diff -urN linux-2.2.7-pre4/net/ipv4/tcp_input.c linux/net/ipv4/tcp_input.c
--- linux-2.2.7-pre4/net/ipv4/tcp_input.c	Mon Dec  3 18:41:30 2001
+++ linux/net/ipv4/tcp_input.c	Mon Dec  3 18:41:48 2001
@@ -5,7 +5,7 @@
  *
  *		Implementation of the Transmission Control Protocol(TCP).
  *
- * Version:	$Id: tcp_input.c,v 1.162 1999/04/24 00:27:16 davem Exp $
+ * Version:	$Id: tcp_input.c,v 1.163 1999/04/28 16:08:05 davem Exp $
  *
  * Authors:	Ross Biro, <bir7@leland.Stanford.Edu>
  *		Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -97,7 +97,7 @@
 static void tcp_delack_estimator(struct tcp_opt *tp)
 {
 	if(tp->ato == 0) {
-		tp->lrcvtime = jiffies;
+		tp->lrcvtime = tcp_time_stamp;
 
 		/* Help sender leave slow start quickly,
 		 * and also makes sure we do not take this
@@ -106,9 +106,9 @@
 		tp->ato = 1;
 		tcp_enter_quickack_mode(tp);
 	} else {
-		int m = jiffies - tp->lrcvtime;
+		int m = tcp_time_stamp - tp->lrcvtime;
 
-		tp->lrcvtime = jiffies;
+		tp->lrcvtime = tcp_time_stamp;
 		if(m <= 0)
 			m = 1;
 		if(m > tp->rto)
@@ -231,7 +231,7 @@
 		 */
 		if((s32)(tp->rcv_tsval - tp->ts_recent) >= 0) {
 			tp->ts_recent = tp->rcv_tsval;
-			tp->ts_recent_stamp = jiffies;
+			tp->ts_recent_stamp = tcp_time_stamp;
 		}
 	}
 }
@@ -241,7 +241,7 @@
 extern __inline__ int tcp_paws_discard(struct tcp_opt *tp, struct tcphdr *th, unsigned len)
 {
 	/* ts_recent must be younger than 24 days */
-	return (((s32)(jiffies - tp->ts_recent_stamp) >= PAWS_24DAYS) ||
+	return (((s32)(tcp_time_stamp - tp->ts_recent_stamp) >= PAWS_24DAYS) ||
 		(((s32)(tp->rcv_tsval - tp->ts_recent) < 0) &&
 		 /* Sorry, PAWS as specified is broken wrt. pure-ACKs -DaveM */
 		 (len != (th->doff * 4))));
@@ -609,7 +609,7 @@
 {
 	struct tcp_opt *tp = &(sk->tp_pinfo.af_tcp);
 	struct sk_buff *skb;
-	unsigned long now = jiffies;
+	__u32 now = tcp_time_stamp;
 	int acked = 0;
 
 	/* If we are retransmitting, and this ACK clears up to
@@ -725,7 +725,7 @@
 	if (!(flag & FLAG_DATA_ACKED))
 		return;
 
-	seq_rtt = jiffies-tp->rcv_tsecr;
+	seq_rtt = tcp_time_stamp - tp->rcv_tsecr;
 	tcp_rtt_estimator(tp, seq_rtt);
 	if (tp->retransmits) {
 		if (tp->packets_out == 0) {
@@ -749,7 +749,7 @@
 static __inline__ void tcp_ack_packets_out(struct sock *sk, struct tcp_opt *tp)
 {
 	struct sk_buff *skb = skb_peek(&sk->write_queue);
-	long when = tp->rto - (jiffies - TCP_SKB_CB(skb)->when);
+	__u32 when = tp->rto - (tcp_time_stamp - TCP_SKB_CB(skb)->when);
 
 	/* Some data was ACK'd, if still retransmitting (due to a
 	 * timeout), resend more of the retransmit queue.  The
@@ -778,7 +778,7 @@
 	if (tp->pending == TIME_KEEPOPEN)
 	  	tp->probes_out = 0;
 
-	tp->rcv_tstamp = jiffies;
+	tp->rcv_tstamp = tcp_time_stamp;
 
 	/* If the ack is newer than sent or older than previous acks
 	 * then we can probably ignore it.
@@ -2112,7 +2112,7 @@
 				tp->tcp_header_len = sizeof(struct tcphdr);
 			if (tp->saw_tstamp) {
 				tp->ts_recent = tp->rcv_tsval;
-				tp->ts_recent_stamp = jiffies;
+				tp->ts_recent_stamp = tcp_time_stamp;
 			}
 
 			/* Can't be earlier, doff would be wrong. */
@@ -2136,7 +2136,7 @@
 				tcp_parse_options(sk, th, tp, 0);
 				if (tp->saw_tstamp) {
 					tp->ts_recent = tp->rcv_tsval;
-					tp->ts_recent_stamp = jiffies;
+					tp->ts_recent_stamp = tcp_time_stamp;
 				}
 				
 				tp->rcv_nxt = TCP_SKB_CB(skb)->seq + 1;
diff -urN linux-2.2.7-pre4/net/ipv4/tcp_ipv4.c linux/net/ipv4/tcp_ipv4.c
--- linux-2.2.7-pre4/net/ipv4/tcp_ipv4.c	Mon Dec  3 18:41:30 2001
+++ linux/net/ipv4/tcp_ipv4.c	Mon Dec  3 18:41:48 2001
@@ -5,7 +5,7 @@
  *
  *		Implementation of the Transmission Control Protocol(TCP).
  *
- * Version:	$Id: tcp_ipv4.c,v 1.173 1999/04/24 00:27:07 davem Exp $
+ * Version:	$Id: tcp_ipv4.c,v 1.174 1999/04/28 16:08:19 davem Exp $
  *
  *		IPv4 specific functions
  *
@@ -1430,7 +1430,7 @@
 		}
 		if (newtp->tstamp_ok) {
 			newtp->ts_recent = req->ts_recent;
-			newtp->ts_recent_stamp = jiffies;
+			newtp->ts_recent_stamp = tcp_time_stamp;
 			newtp->tcp_header_len = sizeof(struct tcphdr) + TCPOLEN_TSTAMP_ALIGNED;
 		} else {
 			newtp->tcp_header_len = sizeof(struct tcphdr);
diff -urN linux-2.2.7-pre4/net/ipv4/tcp_output.c linux/net/ipv4/tcp_output.c
--- linux-2.2.7-pre4/net/ipv4/tcp_output.c	Thu Mar 11 23:24:45 1999
+++ linux/net/ipv4/tcp_output.c	Mon Dec  3 18:41:48 2001
@@ -5,7 +5,7 @@
  *
  *		Implementation of the Transmission Control Protocol(TCP).
  *
- * Version:	$Id: tcp_output.c,v 1.106 1999/03/12 03:43:51 davem Exp $
+ * Version:	$Id: tcp_output.c,v 1.107 1999/04/28 16:08:12 davem Exp $
  *
  * Authors:	Ross Biro, <bir7@leland.Stanford.Edu>
  *		Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -167,7 +167,7 @@
 
 	if (!force_queue && tp->send_head == NULL && tcp_snd_test(sk, skb)) {
 		/* Send it out now. */
-		TCP_SKB_CB(skb)->when = jiffies;
+		TCP_SKB_CB(skb)->when = tcp_time_stamp;
 		tp->snd_nxt = TCP_SKB_CB(skb)->end_seq;
 		tp->packets_out++;
 		tcp_transmit_skb(sk, skb_clone(skb, GFP_KERNEL));
@@ -344,7 +344,7 @@
 
 			/* Advance the send_head.  This one is going out. */
 			update_send_head(sk);
-			TCP_SKB_CB(skb)->when = jiffies;
+			TCP_SKB_CB(skb)->when = tcp_time_stamp;
 			tp->snd_nxt = TCP_SKB_CB(skb)->end_seq;
 			tp->packets_out++;
 			tcp_transmit_skb(sk, skb_clone(skb, GFP_ATOMIC));
@@ -600,7 +600,7 @@
 	/* Make a copy, if the first transmission SKB clone we made
 	 * is still in somebody's hands, else make a clone.
 	 */
-	TCP_SKB_CB(skb)->when = jiffies;
+	TCP_SKB_CB(skb)->when = tcp_time_stamp;
 	if(skb_cloned(skb))
 		skb = skb_copy(skb, GFP_ATOMIC);
 	else
@@ -723,7 +723,7 @@
 		   tp->packets_out &&
 		   !(TCP_SKB_CB(skb)->flags & TCPCB_FLAG_URG)) {
 			update_send_head(sk);
-			TCP_SKB_CB(skb)->when = jiffies;
+			TCP_SKB_CB(skb)->when = tcp_time_stamp;
 			tp->snd_nxt = TCP_SKB_CB(skb)->end_seq;
 			tp->packets_out++;
 			tcp_transmit_skb(sk, skb_clone(skb, GFP_ATOMIC));
@@ -778,7 +778,7 @@
 	/* Send it off. */
 	TCP_SKB_CB(skb)->seq = tp->write_seq;
 	TCP_SKB_CB(skb)->end_seq = TCP_SKB_CB(skb)->seq;
-	TCP_SKB_CB(skb)->when = jiffies;
+	TCP_SKB_CB(skb)->when = tcp_time_stamp;
 	tcp_transmit_skb(sk, skb);
 }
 
@@ -808,7 +808,7 @@
 	TCP_SKB_CB(skb)->seq = tp->snd_una;
 	TCP_SKB_CB(skb)->end_seq = TCP_SKB_CB(skb)->seq + 1;
 	__skb_queue_tail(&sk->write_queue, skb);
-	TCP_SKB_CB(skb)->when = jiffies;
+	TCP_SKB_CB(skb)->when = tcp_time_stamp;
 	tp->packets_out++;
 	tcp_transmit_skb(sk, skb_clone(skb, GFP_ATOMIC));
 	return 0;
@@ -875,7 +875,7 @@
 	/* RFC1323: The window in SYN & SYN/ACK segments is never scaled. */
 	th->window = htons(req->rcv_wnd);
 
-	TCP_SKB_CB(skb)->when = jiffies;
+	TCP_SKB_CB(skb)->when = tcp_time_stamp;
 	tcp_syn_build_options((__u32 *)(th + 1), req->mss, req->tstamp_ok,
 			      req->sack_ok, req->wscale_ok, req->rcv_wscale,
 			      TCP_SKB_CB(skb)->when,
@@ -963,7 +963,7 @@
 
 	/* Send it off. */
 	__skb_queue_tail(&sk->write_queue, buff);
-	TCP_SKB_CB(buff)->when = jiffies;
+	TCP_SKB_CB(buff)->when = tcp_time_stamp;
 	tp->packets_out++;
 	tcp_transmit_skb(sk, skb_clone(buff, GFP_KERNEL));
 	tcp_statistics.TcpActiveOpens++;
@@ -1037,7 +1037,7 @@
 
 		/* Send it off, this clears delayed acks for us. */
 		TCP_SKB_CB(buff)->seq = TCP_SKB_CB(buff)->end_seq = tp->snd_nxt;
-		TCP_SKB_CB(buff)->when = jiffies;
+		TCP_SKB_CB(buff)->when = tcp_time_stamp;
 		tcp_transmit_skb(sk, buff);
 	}
 }
@@ -1075,7 +1075,7 @@
 					return; /* Let a retransmit get it. */
 			}
 			update_send_head(sk);
-			TCP_SKB_CB(skb)->when = jiffies;
+			TCP_SKB_CB(skb)->when = tcp_time_stamp;
 			tp->snd_nxt = TCP_SKB_CB(skb)->end_seq;
 			tp->packets_out++;
 			tcp_transmit_skb(sk, skb_clone(skb, GFP_ATOMIC));
@@ -1101,7 +1101,7 @@
 			 */
 			TCP_SKB_CB(skb)->seq = tp->snd_nxt - 1;
 			TCP_SKB_CB(skb)->end_seq = TCP_SKB_CB(skb)->seq;
-			TCP_SKB_CB(skb)->when = jiffies;
+			TCP_SKB_CB(skb)->when = tcp_time_stamp;
 			tcp_transmit_skb(sk, skb);
 		}
 	}
diff -urN linux-2.2.7-pre4/net/ipv4/tcp_timer.c linux/net/ipv4/tcp_timer.c
--- linux-2.2.7-pre4/net/ipv4/tcp_timer.c	Tue Mar 23 13:20:34 1999
+++ linux/net/ipv4/tcp_timer.c	Mon Dec  3 18:41:48 2001
@@ -5,7 +5,7 @@
  *
  *		Implementation of the Transmission Control Protocol(TCP).
  *
- * Version:	$Id: tcp_timer.c,v 1.59 1999/03/23 21:21:09 davem Exp $
+ * Version:	$Id: tcp_timer.c,v 1.60 1999/04/28 16:08:21 davem Exp $
  *
  * Authors:	Ross Biro, <bir7@leland.Stanford.Edu>
  *		Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -224,7 +224,7 @@
 
 	if ((1<<sk->state) & (TCPF_ESTABLISHED|TCPF_CLOSE_WAIT|TCPF_FIN_WAIT2)) {
 		struct tcp_opt *tp = &sk->tp_pinfo.af_tcp;
-		__u32 elapsed = jiffies - tp->rcv_tstamp;
+		__u32 elapsed = tcp_time_stamp - tp->rcv_tstamp;
 
 		if (elapsed >= sysctl_tcp_keepalive_time) {
 			if (tp->probes_out > sysctl_tcp_keepalive_probes) {
@@ -561,7 +561,7 @@
 						if (!tp->syn_wait_queue)
 							break;
 					} else {
-						__u32 timeo;
+						unsigned long timeo;
 						struct open_request *op; 
 
 						(*conn->class->rtx_syn_ack)(sk, conn);
