diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/arch/mips/brcm-boards/common/brcmserial.c stblinux-2.6.12/arch/mips/brcm-boards/common/brcmserial.c
--- stblinux-2.6.12.org/arch/mips/brcm-boards/common/brcmserial.c	2007-02-03 05:41:15.000000000 +0900
+++ stblinux-2.6.12/arch/mips/brcm-boards/common/brcmserial.c	2008-05-28 13:51:27.000000000 +0900
@@ -1101,7 +1101,7 @@ static void change_speed(struct async_st
 /* Determine divisor based on baud rate */
 	baud = tty_get_baud_rate(info->tty);
 	if (!baud)
-		baud = 115200;	/* B0 transition handled in rs_set_termios */
+		baud = 38400;	/* B0 transition handled in rs_set_termios */
 	baud_base = info->state->baud_base;
 	
 	/* If the quotient is zero refuse the change */
@@ -1110,13 +1110,13 @@ static void change_speed(struct async_st
 		info->tty->termios->c_cflag |= (old_termios->c_cflag & CBAUD);
 		baud = tty_get_baud_rate(info->tty);
 		if (!baud)
-			baud = 115200;
+			baud = 38400;
 		else if (baud)
 			quot = baud_base / baud;
 	}
-	/* As a last resort, if the quotient is zero, default to 115200 bps */
+	/* As a last resort, if the quotient is zero, default to 38400 bps */
 	if (!quot)
-		quot = baud_base / 115200;
+		quot = baud_base / 38400;
 	
 	info->quot = quot;
 	info->timeout = ((HZ*bits*quot) / baud_base);
@@ -2520,7 +2520,7 @@ static int __init rs_init(void)
 	serial_driver.subtype = SERIAL_TYPE_NORMAL;
 	serial_driver.init_termios = tty_std_termios;
 	serial_driver.init_termios.c_cflag =
-		B115200 | CS8 | CREAD | CLOCAL;
+		B38400 | CS8 | CREAD | CLOCAL;
 	serial_driver.flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS;
 	serial_driver.refcount = &serial_refcount;
 	serial_driver.table = serial_table;
@@ -2791,7 +2791,7 @@ static int __init brcm_serial_console_se
 	static struct async_struct *info;
 	struct serial_state *state;
 	unsigned cval = (UART_TE|UART_RE);
-	int	baud = 115200;
+	int	baud = 38400;
 	int	bits = 8;
 	int	parity = 'n';
 	int	cflag = CREAD | CLOCAL;
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/arch/mips/brcmstb/brcm97401c0/bchip.c stblinux-2.6.12/arch/mips/brcmstb/brcm97401c0/bchip.c
--- stblinux-2.6.12.org/arch/mips/brcmstb/brcm97401c0/bchip.c	2007-02-03 05:41:20.000000000 +0900
+++ stblinux-2.6.12/arch/mips/brcmstb/brcm97401c0/bchip.c	2008-05-28 13:51:32.000000000 +0900
@@ -24,11 +24,14 @@ int rac_setting(int value)
 	unsigned long	rac_value;
 	char 	msg[256];
 
+#ifdef KERNEL_BOOT_LOG_ON
+
     sprintf(msg, "before init RAC 0x%08x\t0x%08x\n", 
             *((volatile unsigned long *)RAC_CONFIGURATION_REGISTER), 
             *((volatile unsigned long *)RAC_ADDRESS_RANGE_REGISTER));    
 
     uart_puts(msg);            
+#endif
 
 	switch(value) {
 		case 0:		/* RAC disabled, PF_D='0'b, PF_I='0'b, RAC_D='0'b, RAC_I='0'b */
@@ -60,10 +63,10 @@ int rac_setting(int value)
 	*((volatile unsigned long *)RAC_ADDRESS_RANGE_REGISTER) = par_val2;  /* 0x04000000; 64M for 7401c0 */
 	*((volatile unsigned long *)RAC_CONFIGURATION_REGISTER) |= rac_value;
 
-
+#ifdef KERNEL_BOOT_LOG_ON
 	sprintf(msg, "after init RAC 0x%08x\t0x%08x\n", 
 			*((volatile unsigned long *)RAC_CONFIGURATION_REGISTER), 
 			*((volatile unsigned long *)RAC_ADDRESS_RANGE_REGISTER));
-
 	uart_puts(msg);
+#endif
 }
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/arch/mips/brcmstb/brcm97401c0/bcm_uart.c stblinux-2.6.12/arch/mips/brcmstb/brcm97401c0/bcm_uart.c
--- stblinux-2.6.12.org/arch/mips/brcmstb/brcm97401c0/bcm_uart.c	2007-02-03 05:41:20.000000000 +0900
+++ stblinux-2.6.12/arch/mips/brcmstb/brcm97401c0/bcm_uart.c	2008-05-28 13:51:32.000000000 +0900
@@ -29,7 +29,7 @@
 051011	tht	Original coding
  ------------------------------------------------------------------------- */
 
-#define DFLT_BAUDRATE   115200
+#define DFLT_BAUDRATE   38400
 
 /*
  * On the 7401C0, UARTB is the default, with UARTC being the 2nd serial port.  UARTA is not used,
@@ -55,7 +55,7 @@ typedef struct {
 #define UART7401_UARTB_BASE		0xb04001a0  
 #define stUart ((volatile Uart7401 * const) UART7401_UARTB_BASE)
 
-#define DFLT_BAUDRATE   115200
+#define DFLT_BAUDRATE   38400
 
 /* --------------------------------------------------------------------------
     Name: PutChar
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/arch/mips/brcmstb/brcm97401c0/board.c stblinux-2.6.12/arch/mips/brcmstb/brcm97401c0/board.c
--- stblinux-2.6.12.org/arch/mips/brcmstb/brcm97401c0/board.c	2007-02-03 05:41:20.000000000 +0900
+++ stblinux-2.6.12/arch/mips/brcmstb/brcm97401c0/board.c	2008-05-28 13:51:32.000000000 +0900
@@ -104,7 +104,9 @@ board_init_once(void)
 
 	board_strap = (regval & STRAP_DDR_CONFIGURATION_MASK) >> STRAP_DDR_CONFIGURATION_SHIFT;
 	pci_memwin_size = (regval & STRAP_PCI_MEMWIN_SIZE_MASK) >> STRAP_PCI_MEMWIN_SIZE_SHIFT;
-printk("board_init_once: regval=%08x, ddr_strap=%x, %d chips, pci_size=%x\n", regval, board_strap, NUM_DDR, pci_memwin_size);
+#ifdef KERNEL_BOOT_LOG_ON
+	printk("board_init_once: regval=%08x, ddr_strap=%x, %d chips, pci_size=%x\n", regval, board_strap, NUM_DDR, pci_memwin_size);
+#endif
 
 	switch (board_strap & 4) {
 	case 0:
@@ -141,8 +143,10 @@ printk("board_init_once: regval=%08x, dd
 			memSize = 0;
 			printk("board_init_once: Invalid strapping option read %08x\n", regval);
 	}
-	
+
+#ifdef KERNEL_BOOT_LOG_ON	
 	printk("Detected %d MB on board\n", (memSize >>20));
+#endif
 
 
 #if 0
@@ -169,9 +173,11 @@ get_RAM_size(void)
 	if (!once) {
 		once++;
 		dramSize = board_init_once();
+#ifdef KERNEL_BOOT_LOG_ON
 		if (dramSize != DRAM_SIZE) {
 			printk("Board strapped at %d MB, default is %d MB\n", (dramSize>>20), (DRAM_SIZE>>20));
 		}
+#endif
 	}
 #endif
     if (dramSize)
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/arch/mips/brcmstb/brcm97401c0/irq.c stblinux-2.6.12/arch/mips/brcmstb/brcm97401c0/irq.c
--- stblinux-2.6.12.org/arch/mips/brcmstb/brcm97401c0/irq.c	2007-02-03 05:41:20.000000000 +0900
+++ stblinux-2.6.12/arch/mips/brcmstb/brcm97401c0/irq.c	2008-05-28 13:51:32.000000000 +0900
@@ -677,7 +677,9 @@ void __init brcm_irq_setup(void)
 	extern asmlinkage void brcmIRQ(void);
 	extern int noirqdebug;
 
-printk("timer irq %d end %d\n",BCM_LINUX_SYSTIMER_IRQ, BCHP_HIF_CPU_INTR1_INTR_W0_STATUS_reserved0_SHIFT+32);
+#ifdef KERNEL_BOOT_LOG_ON
+	printk("timer irq %d end %d\n",BCM_LINUX_SYSTIMER_IRQ, BCHP_HIF_CPU_INTR1_INTR_W0_STATUS_reserved0_SHIFT+32);
+#endif
 	//INTC->IrqMask = 0UL;
 	//INTC->IrqStatus = 0UL;
 	CPUINT1C->IntrW0MaskSet = 0xffffffff;
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/arch/mips/brcmstb/brcm97401c0/uart_8250.c stblinux-2.6.12/arch/mips/brcmstb/brcm97401c0/uart_8250.c
--- stblinux-2.6.12.org/arch/mips/brcmstb/brcm97401c0/uart_8250.c	2007-02-03 05:41:20.000000000 +0900
+++ stblinux-2.6.12/arch/mips/brcmstb/brcm97401c0/uart_8250.c	2008-05-28 13:51:32.000000000 +0900
@@ -28,7 +28,7 @@ when	who what
 051011	tht	Original coding
  ------------------------------------------------------------------------- */
 
-#define DFLT_BAUDRATE   115200
+#define DFLT_BAUDRATE   38400
 
 
 
@@ -87,9 +87,12 @@ static unsigned long serial_8250_init(in
 		// Disable FIFO
 		writel(0, uartBaseAddr + (UART_FCR << shift));
 
+#ifdef KERNEL_BOOT_LOG_ON
 		sprintf(msg, "Done initializing UARTC at %08x\n", (u32) uartBaseAddr);
 		uart_puts(msg);
 		uartB_puts(msg);
+#endif
+
 	}
 	return (uartBaseAddr);
 }
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/arch/mips/brcmstb/common/bootflash.c stblinux-2.6.12/arch/mips/brcmstb/common/bootflash.c
--- stblinux-2.6.12.org/arch/mips/brcmstb/common/bootflash.c	2007-02-03 05:41:16.000000000 +0900
+++ stblinux-2.6.12/arch/mips/brcmstb/common/bootflash.c	2008-05-28 13:45:52.000000000 +0900
@@ -119,7 +119,8 @@
 #elif defined(CONFIG_MIPS_BCM7401) || defined(CONFIG_MIPS_BCM7402) \
                                    || defined(CONFIG_MIPS_BCM7403)
 #include <asm/brcmstb/common/brcmstb.h>
-#define WINDOW_ADDR 0x1e000000
+//#define WINDOW_ADDR 0x1e000000 //nwpf
+#define WINDOW_ADDR 0x1f000000
 
 #elif defined(CONFIG_MIPS_BCM7440)
 #include <asm/brcmstb/common/brcmstb.h>
@@ -185,8 +186,10 @@ determineBootFromFlashOrRom(void)
 	*(volatile unsigned short *)(BOOT_LOADER_ENTRY | (0x55 << 1)) = 0xFFFF;
 
 #if (!defined( CONFIG_MIPS_BCM7110 ) || defined( CONFIG_MIPS_BCM7110_DSG))
-sprintf(msg, "gFlashSize=%08x, query[0]=%04x, [1]=%04x, [2]=%04x\n", gFlashSize, query[0], query[1], query[2]);
-uart_puts(msg);
+#ifdef KERNEL_BOOT_LOG_ON
+	sprintf(msg, "gFlashSize=%08x, query[0]=%04x, [1]=%04x, [2]=%04x\n", gFlashSize, query[0], query[1], query[2]);
+	uart_puts(msg);
+#endif
 	if ( query[0] == 0x51 &&     /* Q */
 	   	query[1] == 0x52 &&     /* R */
 	   	query[2] == 0x59  )    /* Y */
@@ -205,8 +208,10 @@ uart_puts(msg);
 
 		/* Go back to read-array mode */
 		*(volatile unsigned short *)(BOOT_LOADER_ENTRY | (0x55 << 1)) = 0xFFFF;
-sprintf(msg, "gFlashSize=%08x, cquery[0]=%04x, [1]=%04x, [2]=%04x\n", gFlashSize, cquery[0], cquery[1], cquery[2]);
-uart_puts(msg);
+#ifdef KERNEL_BOOT_LOG_ON
+		sprintf(msg, "gFlashSize=%08x, cquery[0]=%04x, [1]=%04x, [2]=%04x\n", gFlashSize, cquery[0], cquery[1], cquery[2]);
+		uart_puts(msg);
+#endif
 		if ( cquery[0] == 0x51 &&     /* Q */
 		   	cquery[1] == 0x52 &&     /* R */
 		   	cquery[2] == 0x59  )    /* Y */	
@@ -240,15 +245,19 @@ uart_puts(msg);
        	else {
             		RT_PHYS_FLASH_BASE = (0x20000000 - (gFlashSize << 20));
         	}
+#ifdef KERNEL_BOOT_LOG_ON
 		sprintf(msg, "**********BOOTEDFROMFLASH, Base=%08lx\n", RT_PHYS_FLASH_BASE);
 		uart_puts(msg);
+#endif
 	
 	} else {
 
 		
 		RT_PHYS_FLASH_BASE = ROM_FLASH_BASE;
+#ifdef KERNEL_BOOT_LOG_ON
 		sprintf(msg, "**********BOOTEDFROMROM, Base=%08lx\n", RT_PHYS_FLASH_BASE);
 		uart_puts(msg);
+#endif
 	}
 #endif // if PCI slave
 
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/arch/mips/brcmstb/common/cfe_call.c stblinux-2.6.12/arch/mips/brcmstb/common/cfe_call.c
--- stblinux-2.6.12.org/arch/mips/brcmstb/common/cfe_call.c	2007-02-03 05:41:16.000000000 +0900
+++ stblinux-2.6.12/arch/mips/brcmstb/common/cfe_call.c	2008-05-28 13:51:34.000000000 +0900
@@ -78,9 +78,11 @@ char msg[CFE_CMDLINE_BUFLEN+12];
 	//cfe_arg = &cfeparam;
 {
 
-sprintf(msg, "Before: firmhandl=%08x, firmentry=%08x, seal=%08x,bootParmsAddr=%08x\n",
-firmhandl, firmentry, cfe_seal, (unsigned int) cfeparam.plist.xiocb_envbuf.val_ptr);
-uart_puts(msg);
+#ifdef KERNEL_BOOT_LOG_ON
+	sprintf(msg, "Before: firmhandl=%08x, firmentry=%08x, seal=%08x,bootParmsAddr=%08x\n",
+			firmhandl, firmentry, cfe_seal, (unsigned int) cfeparam.plist.xiocb_envbuf.val_ptr);
+	uart_puts(msg);
+#endif
 
 	if (cfe_seal == CFE_SEAL) {
 		res = cfe_call(&cfeparam);
@@ -110,10 +112,12 @@ uart_puts(msg);
 					break;
 				}
 			}
-		}	
+		}
+#ifdef KERNEL_BOOT_LOG_ON	
 		uart_puts("The cmdline args were:\n");
 		sprintf(msg, "@%08x=%s\n", (unsigned int) bootParms,bootParms);
 		uart_puts(msg);
+#endif
 		res = 0;
 	}
 }
@@ -122,9 +126,12 @@ uart_puts(msg);
 if (ethHwAddrs != NULL) {
 	unsigned char eth0HwAddr[ETH_HWADDR_LEN];
 	int i, j, k;
-sprintf(msg, "Before: firmhandl=%08x, firmentry=%08x, seal=%08x,bootParmsAddr=%08x\n",
-firmhandl, firmentry, cfe_seal, (unsigned int) cfeparam.plist.xiocb_envbuf.val_ptr);
-uart_puts(msg);
+	The cmdline args were:
+#ifdef KERNEL_BOOT_LOG_ON
+	sprintf(msg, "Before: firmhandl=%08x, firmentry=%08x, seal=%08x,bootParmsAddr=%08x\n",
+			firmhandl, firmentry, cfe_seal, (unsigned int) cfeparam.plist.xiocb_envbuf.val_ptr);
+	uart_puts(msg);
+#endif
 
 
 
@@ -161,10 +168,12 @@ uart_puts(msg);
 			uart_puts(msg);
 			
 			eth0HwAddr[ETH_HWADDR_LEN-1] = '\0';
-		}	
+		}
+#ifdef KERNEL_BOOT_LOG_ON	
 		uart_puts("ETH0_HWADDR:\n");
 		sprintf(msg, "@%08x=%s\n", (unsigned int) eth0HwAddr, eth0HwAddr);
 		uart_puts(msg);
+#endif
 
 		/*
 		 * Convert to binary format
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/arch/mips/brcmstb/common/prom.c stblinux-2.6.12/arch/mips/brcmstb/common/prom.c
--- stblinux-2.6.12.org/arch/mips/brcmstb/common/prom.c	2007-02-03 05:41:16.000000000 +0900
+++ stblinux-2.6.12/arch/mips/brcmstb/common/prom.c	2008-05-28 13:51:34.000000000 +0900
@@ -79,16 +79,16 @@ unsigned long g_board_RAM_size = 0;	//Up
 
 
 #if defined( CONFIG_MIPS_BCM7400 )
-#define CONSOLE_KARGS " console=uart,mmio,0x10400b00,115200n8"
+#define CONSOLE_KARGS " console=uart,mmio,0x10400b00,38400n8"
 
 #elif defined( CONFIG_MIPS_BCM7440 )
-#define CONSOLE_KARGS " console=uart,mmio,0x10400b40,115200n8"
+#define CONSOLE_KARGS " console=uart,mmio,0x10400b40,38400n8"
 
 //#elif defined( CONFIG_MIPS_BCM7401B0 )
 //#define DEFAULT_KARGS " rw console=ttyS0,115200 console=uart,mmio,0x10400b00,115200n8"
 
 #else
-#define CONSOLE_KARGS " console=ttyS0,115200"
+#define CONSOLE_KARGS " console=ttyS0,38400"
 #endif
 
 #define RW_KARGS " rw"
@@ -215,7 +215,9 @@ void __init prom_init(void)
 #else
 	uart_init(27000000);
 #endif
+#ifdef KERNEL_BOOT_LOG_ON
 	uart_puts("HI WORLD!!!\n");
+#endif
 
 #ifdef CONFIG_MIPS_BCM7315_BBX
 	*(volatile unsigned long *)(0xfffe7008) = 0x1b800000;
@@ -367,8 +369,10 @@ void __init prom_init(void)
 		*pMemMap = 0x264;
 		// Enable Split Mode
 		*pSplit = 1;
+#ifdef KERNEL_BOOT_LOG_ON
 		sprintf(msg, "gathering mode: 0x%08x at 0x0xb000040c\nsplit mode: 0x%08x at 0xb0000410\n", *pMemMap, *pSplit);
 		uart_puts(msg);
+#endif
 	}
 #endif
 
@@ -413,8 +417,10 @@ void __init prom_init(void)
 	  char	str1[32], str2[32] = "0x";
 	  char *cp, *sp;
 
+#ifdef KERNEL_BOOT_LOG_ON
 	  sprintf(msg, "cfeBootParms ===> %s\n", cfeBootParms);
 	  uart_puts(msg);
+#endif
 	  cp = strstr( cfeBootParms, "bcmrac=" );
 	  if( cp ) { 
 		if ( strchr(cfeBootParms, ',') ) {
@@ -551,10 +557,12 @@ void __init prom_init(void)
 		strcpy(arcs_cmdline, CONFIG_CMDLINE);
 		appendConsoleNeeded = 0;
 #endif
-		
+
+#ifdef KERNEL_BOOT_LOG_ON		
 		uart_puts("Default command line = \n");
 		uart_puts(CONFIG_CMDLINE);
 		uart_puts("\n");
+#endif
 		p = &arcs_cmdline[0];
 		while (p != NULL && *p != '\0') {
 			if (!isspace(*p))
@@ -582,9 +590,11 @@ void __init prom_init(void)
 
 	} /* End else no root= option is specified */
 
+#ifdef KERNEL_BOOT_LOG_ON
 	uart_puts("Kernel boot options: ");
 	uart_puts(arcs_cmdline);
 	uart_puts("\r\n");
+#endif
 
 	// THT: PR21410 Implement memory hole in init_bootmem, now just record the memory size.
 	{
@@ -621,22 +631,26 @@ void __init prom_init(void)
                         int cp022;
 
                         cp022 = __read_32bit_c0_register($22, 5);
+#ifdef KERNEL_BOOT_LOG_ON
                         sprintf(msg, "Initial CP0 22 value : 0x%08x\n", cp022);   
                         uart_puts(msg);
-
+#endif
                         if ( cp022 & 0x00010000 ) {     // RYH - cp0 reg 22, sel 5, bit[16]
                                 cp022 &= 0xfffeffff;
                                 __write_32bit_c0_register($22, 5, cp022);
 
                                 cp022 = __read_32bit_c0_register($22, 5);
+#ifdef KERNEL_BOOT_LOG_ON
                                 sprintf(msg, "Updated CP0 22 value : 0x%08x\n", cp022);
                                 uart_puts(msg);
+#endif
                         }
                     }
                     if(read_c0_diag4() & 0x400000)
                     {
                         int     val=read_c0_diag4();
                         write_c0_diag4(val & ~0x400000);
+#ifdef KERNEL_BOOT_LOG_ON
                         sprintf(msg, "CP0 reg 22 sel 0 to 5: 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x\n",
                                         read_c0_diag(),
                                         read_c0_diag1(),
@@ -645,6 +659,7 @@ void __init prom_init(void)
                                         read_c0_diag4(),
                                         read_c0_diag5());
                         uart_puts(msg);
+#endif
                     }
 
                     break;
@@ -665,8 +680,10 @@ void __init prom_init(void)
                                 __write_32bit_c0_register($22, 0, cp022);
 
                                 cp022 = __read_32bit_c0_register($22, 0);
+#ifdef KERNEL_BOOT_LOG_ON
                                 sprintf(msg, "Updated CP0 22 value : 0x%08x\n", cp022);
                                 uart_puts(msg);
+#endif
                         }
                     }
 
@@ -675,6 +692,7 @@ void __init prom_init(void)
 		    {
 			int	val=read_c0_diag4();
 			write_c0_diag4(val & ~0x400000);
+#ifdef KERNEL_BOOT_LOG_ON
 			sprintf(msg, "CP0 reg 22 sel 0 to 5: 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x\n",
 					read_c0_diag(), 
 					read_c0_diag1(), 
@@ -683,6 +701,7 @@ void __init prom_init(void)
 					read_c0_diag4(), 
 					read_c0_diag5());
 			uart_puts(msg);
+#endif
 		    }
                	    break;
 
@@ -698,20 +717,26 @@ void __init prom_init(void)
 		if(chipId == 0x7401)
 		{
 			bcm7401Cx_rev = (*(volatile unsigned long*) 0xb0404004) & 0xFFFF;
+#ifdef KERNEL_BOOT_LOG_ON
 			sprintf(msg, "Sundry 0x%08x, chipId 0x%08x, bcm7401Cx %d\n",  pSundryRev, chipId, bcm7401Cx_rev);
 			uart_puts(msg);
+#endif
 		}
 		else if(chipId == 0x7118)
 		{
 			bcm7118Ax_rev = (*(volatile unsigned long*) 0xb0404004) & 0xFFFF;
+#ifdef KERNEL_BOOT_LOG_ON
 			sprintf(msg, "Sundry 0x%08x, chipId 0x%08x, bcm7118Ax %d\n",  pSundryRev, chipId, bcm7118Ax_rev);
 			uart_puts(msg);
+#endif
 		}
 		else if(chipId == 0x7403)
 		{
 			bcm7403Ax_rev = (*pSundryRev) & 0xFF;
+#ifdef KERNEL_BOOT_LOG_ON
 			sprintf(msg, "Sundry 0x%08x, chipId 0x%08x, bcm7403Ax %d\n",  pSundryRev, chipId, bcm7403Ax_rev);
 			uart_puts(msg);
+#endif
 		}
 
 	}
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/arch/mips/brcmstb/common/setup.c stblinux-2.6.12/arch/mips/brcmstb/common/setup.c
--- stblinux-2.6.12.org/arch/mips/brcmstb/common/setup.c	2007-02-03 05:41:16.000000000 +0900
+++ stblinux-2.6.12/arch/mips/brcmstb/common/setup.c	2008-05-28 13:51:34.000000000 +0900
@@ -324,9 +324,11 @@ static __init void brcm_time_init(void)
 	countValue = GetMIPSFreq(); // Taken over 1/8 sec.
 	mips_hpt_frequency = countValue * 8;
     mipsFreq4Display = (mips_hpt_frequency/1000000) * 1000000;
+#ifdef KERNEL_BOOT_LOG_ON
     sprintf(msg, "mips_counter_frequency = %d from Calibration, = %d from header(CPU_MHz/2)\n", 
 	mipsFreq4Display, CPU_CLOCK_RATE/2);
 	uart_puts(msg);
+#endif
 }
 
 static __init void brcm_timer_setup(struct irqaction *irq)
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/arch/mips/configs/bcm97401c0_defconfig stblinux-2.6.12/arch/mips/configs/bcm97401c0_defconfig
--- stblinux-2.6.12.org/arch/mips/configs/bcm97401c0_defconfig	2007-02-03 05:41:03.000000000 +0900
+++ stblinux-2.6.12/arch/mips/configs/bcm97401c0_defconfig	2008-05-28 13:51:47.000000000 +0900
@@ -202,9 +202,7 @@ CONFIG_CPU_HAS_SYNC=y
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
 CONFIG_HW_HAS_PCI=y
-CONFIG_PCI=y
-CONFIG_PCI_LEGACY_PROC=y
-# CONFIG_PCI_NAMES is not set
+# CONFIG_PCI is not set
 CONFIG_MMU=y
 
 #
@@ -215,7 +213,6 @@ CONFIG_MMU=y
 #
 # PCI Hotplug Support
 #
-# CONFIG_HOTPLUG_PCI is not set
 
 #
 # Executable file formats
@@ -266,14 +263,14 @@ CONFIG_MTD_CFI_NOSWAP=y
 # CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
 # CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
 CONFIG_MTD_CFI_GEOMETRY=y
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
+# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set
 CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set
 # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
 # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
 # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
 CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I2 is not set
 # CONFIG_MTD_CFI_I4 is not set
 # CONFIG_MTD_CFI_I8 is not set
 # CONFIG_MTD_OTP is not set
@@ -292,13 +289,11 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y
 # CONFIG_MTD_PHYSMAP is not set
 CONFIG_MTD_BCM7XXX=y
 # CONFIG_MTD_MULTI_PHYSMAP is not set
-# CONFIG_MTD_PCI is not set
 # CONFIG_MTD_PLATRAM is not set
 
 #
 # Self-contained MTD device drivers
 #
-# CONFIG_MTD_PMC551 is not set
 # CONFIG_MTD_SLRAM is not set
 # CONFIG_MTD_PHRAM is not set
 # CONFIG_MTD_MTDRAM is not set
@@ -341,15 +336,9 @@ CONFIG_MTD_BCM7XXX=y
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_CPQ_DA is not set
-# CONFIG_BLK_CPQ_CISS_DA is not set
-# CONFIG_BLK_DEV_DAC960 is not set
-# CONFIG_BLK_DEV_UMEM is not set
-# CONFIG_BLK_DEV_COW_COMMON is not set
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
-# CONFIG_BLK_DEV_SX8 is not set
 # CONFIG_BLK_DEV_UB is not set
 # CONFIG_BLK_DEV_RAM is not set
 CONFIG_BLK_DEV_RAM_COUNT=16
@@ -369,59 +358,7 @@ CONFIG_IOSCHED_CFQ=y
 #
 # ATA/ATAPI/MFM/RLL support
 #
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-CONFIG_BLK_DEV_IDE_SATA=y
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECD=y
-# CONFIG_BLK_DEV_IDETAPE is not set
-# CONFIG_BLK_DEV_IDEFLOPPY is not set
-# CONFIG_BLK_DEV_IDESCSI is not set
-# CONFIG_IDE_TASK_IOCTL is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-CONFIG_BLK_DEV_IDEPCI=y
-# CONFIG_IDEPCI_SHARE_IRQ is not set
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-# CONFIG_BLK_DEV_AEC62XX is not set
-# CONFIG_BLK_DEV_ALI15X3 is not set
-# CONFIG_BLK_DEV_AMD74XX is not set
-# CONFIG_BLK_DEV_CMD64X is not set
-# CONFIG_BLK_DEV_TRIFLEX is not set
-# CONFIG_BLK_DEV_CY82C693 is not set
-# CONFIG_BLK_DEV_CS5520 is not set
-# CONFIG_BLK_DEV_CS5530 is not set
-# CONFIG_BLK_DEV_HPT34X is not set
-# CONFIG_BLK_DEV_HPT366 is not set
-# CONFIG_BLK_DEV_SC1200 is not set
-# CONFIG_BLK_DEV_PIIX is not set
-# CONFIG_BLK_DEV_NS87415 is not set
-# CONFIG_BLK_DEV_PDC202XX_OLD is not set
-# CONFIG_BLK_DEV_PDC202XX_NEW is not set
-CONFIG_BLK_DEV_SVWKS=y
-# CONFIG_BLK_DEV_SIIMAGE is not set
-# CONFIG_BLK_DEV_SLC90E66 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-# CONFIG_BLK_DEV_VIA82CXXX is not set
-# CONFIG_IDE_ARM is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
+# CONFIG_IDE is not set
 
 #
 # SCSI device support
@@ -456,36 +393,7 @@ CONFIG_CHR_DEV_SG=m
 #
 # SCSI low-level drivers
 #
-# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-# CONFIG_SCSI_3W_9XXX is not set
-# CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AACRAID is not set
-# CONFIG_SCSI_AIC7XXX is not set
-# CONFIG_SCSI_AIC7XXX_OLD is not set
-# CONFIG_SCSI_AIC79XX is not set
-# CONFIG_SCSI_DPT_I2O is not set
-# CONFIG_MEGARAID_NEWGEN is not set
-# CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_SCSI_SATA is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-# CONFIG_SCSI_IPS is not set
-# CONFIG_SCSI_INITIO is not set
-# CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_SYM53C8XX_2 is not set
-# CONFIG_SCSI_IPR is not set
-# CONFIG_SCSI_QLOGIC_FC is not set
-# CONFIG_SCSI_QLOGIC_1280 is not set
-CONFIG_SCSI_QLA2XXX=m
-# CONFIG_SCSI_QLA21XX is not set
-# CONFIG_SCSI_QLA22XX is not set
-# CONFIG_SCSI_QLA2300 is not set
-# CONFIG_SCSI_QLA2322 is not set
-# CONFIG_SCSI_QLA6312 is not set
-# CONFIG_SCSI_LPFC is not set
-# CONFIG_SCSI_DC395x is not set
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_NSP32 is not set
 # CONFIG_SCSI_DEBUG is not set
 
 #
@@ -496,17 +404,14 @@ CONFIG_SCSI_QLA2XXX=m
 #
 # Fusion MPT device support
 #
-# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
 #
-# CONFIG_IEEE1394 is not set
 
 #
 # I2O device support
 #
-# CONFIG_I2O is not set
 
 #
 # Networking support
@@ -537,9 +442,81 @@ CONFIG_IP_PNP_RARP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_TUNNEL is not set
 CONFIG_IP_TCPDIAG=y
-# CONFIG_IP_TCPDIAG_IPV6 is not set
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
+CONFIG_IP_TCPDIAG_IPV6=y
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=y
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_IPV6_TUNNEL is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_CONNTRACK=y
+# CONFIG_IP_NF_CT_ACCT is not set
+# CONFIG_IP_NF_CONNTRACK_MARK is not set
+# CONFIG_IP_NF_CT_PROTO_SCTP is not set
+CONFIG_IP_NF_FTP=y
+CONFIG_IP_NF_IRC=y
+CONFIG_IP_NF_TFTP=y
+# CONFIG_IP_NF_AMANDA is not set
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=y
+# CONFIG_IP_NF_MATCH_LIMIT is not set
+# CONFIG_IP_NF_MATCH_IPRANGE is not set
+# CONFIG_IP_NF_MATCH_MAC is not set
+# CONFIG_IP_NF_MATCH_PKTTYPE is not set
+# CONFIG_IP_NF_MATCH_MARK is not set
+# CONFIG_IP_NF_MATCH_MULTIPORT is not set
+# CONFIG_IP_NF_MATCH_TOS is not set
+# CONFIG_IP_NF_MATCH_RECENT is not set
+# CONFIG_IP_NF_MATCH_ECN is not set
+# CONFIG_IP_NF_MATCH_DSCP is not set
+# CONFIG_IP_NF_MATCH_AH_ESP is not set
+# CONFIG_IP_NF_MATCH_LENGTH is not set
+# CONFIG_IP_NF_MATCH_TTL is not set
+# CONFIG_IP_NF_MATCH_TCPMSS is not set
+# CONFIG_IP_NF_MATCH_HELPER is not set
+# CONFIG_IP_NF_MATCH_STATE is not set
+# CONFIG_IP_NF_MATCH_CONNTRACK is not set
+# CONFIG_IP_NF_MATCH_OWNER is not set
+# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
+# CONFIG_IP_NF_MATCH_REALM is not set
+# CONFIG_IP_NF_MATCH_SCTP is not set
+# CONFIG_IP_NF_MATCH_COMMENT is not set
+# CONFIG_IP_NF_MATCH_HASHLIMIT is not set
+# CONFIG_IP_NF_FILTER is not set
+# CONFIG_IP_NF_TARGET_LOG is not set
+# CONFIG_IP_NF_TARGET_ULOG is not set
+# CONFIG_IP_NF_TARGET_TCPMSS is not set
+CONFIG_IP_NF_NAT=y
+CONFIG_IP_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=y
+# CONFIG_IP_NF_TARGET_REDIRECT is not set
+# CONFIG_IP_NF_TARGET_NETMAP is not set
+# CONFIG_IP_NF_TARGET_SAME is not set
+# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
+CONFIG_IP_NF_NAT_IRC=y
+CONFIG_IP_NF_NAT_FTP=y
+CONFIG_IP_NF_NAT_TFTP=y
+# CONFIG_IP_NF_MANGLE is not set
+# CONFIG_IP_NF_RAW is not set
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
 
 #
 # SCTP Configuration (EXPERIMENTAL)
@@ -581,51 +558,23 @@ CONFIG_NETIF_DMA=y
 # CONFIG_TUN is not set
 
 #
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
 CONFIG_MII=y
 CONFIG_BCMINTEMAC_7038=y
-# CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNGEM is not set
-# CONFIG_NET_VENDOR_3COM is not set
-
-#
-# Tulip family network device support
-#
-# CONFIG_NET_TULIP is not set
-# CONFIG_HP100 is not set
-# CONFIG_NET_PCI is not set
 
 #
 # Ethernet (1000 Mbit)
 #
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_E1000 is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_R8169 is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_TIGON3 is not set
-# CONFIG_BNX2 is not set
 
 #
 # Ethernet (10000 Mbit)
 #
-# CONFIG_IXGB is not set
-# CONFIG_S2IO is not set
 
 #
 # Token Ring devices
 #
-# CONFIG_TR is not set
 
 #
 # Wireless LAN (non-hamradio)
@@ -636,15 +585,11 @@ CONFIG_BCMINTEMAC_7038=y
 # Wan interfaces
 #
 # CONFIG_WAN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
-# CONFIG_NET_FC is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 
-#
 # ISDN subsystem
 #
 # CONFIG_ISDN is not set
@@ -685,7 +630,6 @@ CONFIG_SERIAL_8250_NR_UARTS=0
 #
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
-# CONFIG_SERIAL_JSM is not set
 CONFIG_UNIX98_PTYS=y
 # CONFIG_LEGACY_PTYS is not set
 
@@ -702,7 +646,6 @@ CONFIG_UNIX98_PTYS=y
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
 
 #
 # Ftape, the floppy tape device driver
@@ -713,7 +656,6 @@ CONFIG_UNIX98_PTYS=y
 #
 # TPM devices
 #
-# CONFIG_TCG_TPM is not set
 
 #
 # I2C support
@@ -771,10 +713,7 @@ CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 # CONFIG_USB_EHCI_SPLIT_ISO is not set
 # CONFIG_USB_EHCI_ROOT_HUB_TT is not set
-CONFIG_USB_OHCI_HCD=y
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-# CONFIG_USB_UHCI_HCD is not set
+# CONFIG_USB_OHCI_HCD is not set
 # CONFIG_USB_SL811_HCD is not set
 CONFIG_USB_BRCM=y
 # CONFIG_USB_BRCM_EXT_XTAL is not set
@@ -793,7 +732,6 @@ CONFIG_USB_STORAGE=m
 # CONFIG_USB_STORAGE_DEBUG is not set
 # CONFIG_USB_STORAGE_DATAFAB is not set
 # CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
 # CONFIG_USB_STORAGE_DPCM is not set
 # CONFIG_USB_STORAGE_USBAT is not set
 # CONFIG_USB_STORAGE_SDDR09 is not set
@@ -829,8 +767,8 @@ CONFIG_USB_STORAGE=m
 #
 # CONFIG_USB_CATC is not set
 # CONFIG_USB_KAWETH is not set
-CONFIG_USB_PEGASUS=y
-CONFIG_USB_RTL8150=y
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
 CONFIG_USB_USBNET=y
 
 #
@@ -850,7 +788,7 @@ CONFIG_USB_PL2301=y
 # CONFIG_USB_ARMLINUX is not set
 # CONFIG_USB_EPSON2888 is not set
 # CONFIG_USB_ZAURUS is not set
-CONFIG_USB_CDCETHER=y
+# CONFIG_USB_CDCETHER is not set
 
 #
 # USB Network Adapters
@@ -1017,21 +955,8 @@ CONFIG_CRAMFS=y
 #
 # Network File Systems
 #
-CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
-# CONFIG_NFS_V4 is not set
-# CONFIG_NFS_DIRECTIO is not set
-CONFIG_NFSD=m
-CONFIG_NFSD_V3=y
-# CONFIG_NFSD_V4 is not set
-# CONFIG_NFSD_TCP is not set
-CONFIG_ROOT_NFS=y
-CONFIG_LOCKD=y
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_SUNRPC=y
-# CONFIG_RPCSEC_GSS_KRB5 is not set
-# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_NFS_FS is not set
+# CONFIG_NFSD is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
@@ -1041,22 +966,8 @@ CONFIG_SUNRPC=y
 #
 # Partition Types
 #
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-# CONFIG_OSF_PARTITION is not set
-# CONFIG_AMIGA_PARTITION is not set
-# CONFIG_ATARI_PARTITION is not set
-# CONFIG_MAC_PARTITION is not set
+# CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-# CONFIG_BSD_DISKLABEL is not set
-# CONFIG_MINIX_SUBPARTITION is not set
-# CONFIG_SOLARIS_X86_PARTITION is not set
-# CONFIG_UNIXWARE_DISKLABEL is not set
-# CONFIG_LDM_PARTITION is not set
-# CONFIG_SGI_PARTITION is not set
-# CONFIG_ULTRIX_PARTITION is not set
-# CONFIG_SUN_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
 
 #
 # Native Language Support
@@ -1127,6 +1038,7 @@ CONFIG_CMDLINE="root=/dev/hda1 rw consol
 #
 # CONFIG_CRYPTO is not set
 
+
 #
 # Hardware crypto devices
 #
@@ -1136,7 +1048,7 @@ CONFIG_CMDLINE="root=/dev/hda1 rw consol
 #
 # CONFIG_CRC_CCITT is not set
 CONFIG_CRC32=y
-# CONFIG_LIBCRC32C is not set
+CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
 CONFIG_GENERIC_HARDIRQS=y
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/arch/mips/configs/bcm97401c0_initrd_defconfig stblinux-2.6.12/arch/mips/configs/bcm97401c0_initrd_defconfig
--- stblinux-2.6.12.org/arch/mips/configs/bcm97401c0_initrd_defconfig	2007-02-03 05:14:39.000000000 +0900
+++ stblinux-2.6.12/arch/mips/configs/bcm97401c0_initrd_defconfig	2008-05-28 13:51:47.000000000 +0900
@@ -202,9 +202,7 @@ CONFIG_CPU_HAS_SYNC=y
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
 CONFIG_HW_HAS_PCI=y
-CONFIG_PCI=y
-CONFIG_PCI_LEGACY_PROC=y
-# CONFIG_PCI_NAMES is not set
+# CONFIG_PCI is not set
 CONFIG_MMU=y
 
 #
@@ -215,7 +213,6 @@ CONFIG_MMU=y
 #
 # PCI Hotplug Support
 #
-# CONFIG_HOTPLUG_PCI is not set
 
 #
 # Executable file formats
@@ -266,14 +263,14 @@ CONFIG_MTD_CFI_NOSWAP=y
 # CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
 # CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
 CONFIG_MTD_CFI_GEOMETRY=y
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
+# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set
 CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set
 # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
 # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
 # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
 CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I2 is not set
 # CONFIG_MTD_CFI_I4 is not set
 # CONFIG_MTD_CFI_I8 is not set
 # CONFIG_MTD_OTP is not set
@@ -292,13 +289,11 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y
 # CONFIG_MTD_PHYSMAP is not set
 CONFIG_MTD_BCM7XXX=y
 # CONFIG_MTD_MULTI_PHYSMAP is not set
-# CONFIG_MTD_PCI is not set
 # CONFIG_MTD_PLATRAM is not set
 
 #
 # Self-contained MTD device drivers
 #
-# CONFIG_MTD_PMC551 is not set
 # CONFIG_MTD_SLRAM is not set
 # CONFIG_MTD_PHRAM is not set
 # CONFIG_MTD_MTDRAM is not set
@@ -337,6 +332,7 @@ CONFIG_MTD_BCM7XXX=y
 # Plug and Play support
 #
 
+
 #
 # Block devices
 #
@@ -360,7 +356,6 @@ CONFIG_INITRAMFS_ROOT_UID=0
 CONFIG_INITRAMFS_ROOT_GID=0
 # CONFIG_LBD is not set
 # CONFIG_CDROM_PKTCDVD is not set
-
 #
 # IO Schedulers
 #
@@ -373,59 +368,7 @@ CONFIG_IOSCHED_CFQ=y
 #
 # ATA/ATAPI/MFM/RLL support
 #
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-CONFIG_BLK_DEV_IDE_SATA=y
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECD=y
-# CONFIG_BLK_DEV_IDETAPE is not set
-# CONFIG_BLK_DEV_IDEFLOPPY is not set
-# CONFIG_BLK_DEV_IDESCSI is not set
-# CONFIG_IDE_TASK_IOCTL is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-CONFIG_BLK_DEV_IDEPCI=y
-# CONFIG_IDEPCI_SHARE_IRQ is not set
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-# CONFIG_BLK_DEV_AEC62XX is not set
-# CONFIG_BLK_DEV_ALI15X3 is not set
-# CONFIG_BLK_DEV_AMD74XX is not set
-# CONFIG_BLK_DEV_CMD64X is not set
-# CONFIG_BLK_DEV_TRIFLEX is not set
-# CONFIG_BLK_DEV_CY82C693 is not set
-# CONFIG_BLK_DEV_CS5520 is not set
-# CONFIG_BLK_DEV_CS5530 is not set
-# CONFIG_BLK_DEV_HPT34X is not set
-# CONFIG_BLK_DEV_HPT366 is not set
-# CONFIG_BLK_DEV_SC1200 is not set
-# CONFIG_BLK_DEV_PIIX is not set
-# CONFIG_BLK_DEV_NS87415 is not set
-# CONFIG_BLK_DEV_PDC202XX_OLD is not set
-# CONFIG_BLK_DEV_PDC202XX_NEW is not set
-CONFIG_BLK_DEV_SVWKS=y
-# CONFIG_BLK_DEV_SIIMAGE is not set
-# CONFIG_BLK_DEV_SLC90E66 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-# CONFIG_BLK_DEV_VIA82CXXX is not set
-# CONFIG_IDE_ARM is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
+# CONFIG_IDE is not set
 
 #
 # SCSI device support
@@ -460,36 +403,7 @@ CONFIG_CHR_DEV_SG=m
 #
 # SCSI low-level drivers
 #
-# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-# CONFIG_SCSI_3W_9XXX is not set
-# CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AACRAID is not set
-# CONFIG_SCSI_AIC7XXX is not set
-# CONFIG_SCSI_AIC7XXX_OLD is not set
-# CONFIG_SCSI_AIC79XX is not set
-# CONFIG_SCSI_DPT_I2O is not set
-# CONFIG_MEGARAID_NEWGEN is not set
-# CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_SCSI_SATA is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-# CONFIG_SCSI_IPS is not set
-# CONFIG_SCSI_INITIO is not set
-# CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_SYM53C8XX_2 is not set
-# CONFIG_SCSI_IPR is not set
-# CONFIG_SCSI_QLOGIC_FC is not set
-# CONFIG_SCSI_QLOGIC_1280 is not set
-CONFIG_SCSI_QLA2XXX=m
-# CONFIG_SCSI_QLA21XX is not set
-# CONFIG_SCSI_QLA22XX is not set
-# CONFIG_SCSI_QLA2300 is not set
-# CONFIG_SCSI_QLA2322 is not set
-# CONFIG_SCSI_QLA6312 is not set
-# CONFIG_SCSI_LPFC is not set
-# CONFIG_SCSI_DC395x is not set
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_NSP32 is not set
 # CONFIG_SCSI_DEBUG is not set
 
 #
@@ -500,17 +414,14 @@ CONFIG_SCSI_QLA2XXX=m
 #
 # Fusion MPT device support
 #
-# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
 #
-# CONFIG_IEEE1394 is not set
 
 #
 # I2O device support
 #
-# CONFIG_I2O is not set
 
 #
 # Networking support
@@ -541,9 +452,81 @@ CONFIG_IP_PNP_RARP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_TUNNEL is not set
 CONFIG_IP_TCPDIAG=y
-# CONFIG_IP_TCPDIAG_IPV6 is not set
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
+CONFIG_IP_TCPDIAG_IPV6=y
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=y
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_IPV6_TUNNEL is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_CONNTRACK=y
+# CONFIG_IP_NF_CT_ACCT is not set
+# CONFIG_IP_NF_CONNTRACK_MARK is not set
+# CONFIG_IP_NF_CT_PROTO_SCTP is not set
+CONFIG_IP_NF_FTP=y
+CONFIG_IP_NF_IRC=y
+CONFIG_IP_NF_TFTP=y
+# CONFIG_IP_NF_AMANDA is not set
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=y
+# CONFIG_IP_NF_MATCH_LIMIT is not set
+# CONFIG_IP_NF_MATCH_IPRANGE is not set
+# CONFIG_IP_NF_MATCH_MAC is not set
+# CONFIG_IP_NF_MATCH_PKTTYPE is not set
+# CONFIG_IP_NF_MATCH_MARK is not set
+# CONFIG_IP_NF_MATCH_MULTIPORT is not set
+# CONFIG_IP_NF_MATCH_TOS is not set
+# CONFIG_IP_NF_MATCH_RECENT is not set
+# CONFIG_IP_NF_MATCH_ECN is not set
+# CONFIG_IP_NF_MATCH_DSCP is not set
+# CONFIG_IP_NF_MATCH_AH_ESP is not set
+# CONFIG_IP_NF_MATCH_LENGTH is not set
+# CONFIG_IP_NF_MATCH_TTL is not set
+# CONFIG_IP_NF_MATCH_TCPMSS is not set
+# CONFIG_IP_NF_MATCH_HELPER is not set
+# CONFIG_IP_NF_MATCH_STATE is not set
+# CONFIG_IP_NF_MATCH_CONNTRACK is not set
+# CONFIG_IP_NF_MATCH_OWNER is not set
+# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
+# CONFIG_IP_NF_MATCH_REALM is not set
+# CONFIG_IP_NF_MATCH_SCTP is not set
+# CONFIG_IP_NF_MATCH_COMMENT is not set
+# CONFIG_IP_NF_MATCH_HASHLIMIT is not set
+# CONFIG_IP_NF_FILTER is not set
+# CONFIG_IP_NF_TARGET_LOG is not set
+# CONFIG_IP_NF_TARGET_ULOG is not set
+# CONFIG_IP_NF_TARGET_TCPMSS is not set
+CONFIG_IP_NF_NAT=y
+CONFIG_IP_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=y
+# CONFIG_IP_NF_TARGET_REDIRECT is not set
+# CONFIG_IP_NF_TARGET_NETMAP is not set
+# CONFIG_IP_NF_TARGET_SAME is not set
+# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
+CONFIG_IP_NF_NAT_IRC=y
+CONFIG_IP_NF_NAT_FTP=y
+CONFIG_IP_NF_NAT_TFTP=y
+# CONFIG_IP_NF_MANGLE is not set
+# CONFIG_IP_NF_RAW is not set
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
 
 #
 # SCTP Configuration (EXPERIMENTAL)
@@ -585,51 +568,23 @@ CONFIG_NETIF_DMA=y
 # CONFIG_TUN is not set
 
 #
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
 CONFIG_MII=y
 CONFIG_BCMINTEMAC_7038=y
-# CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNGEM is not set
-# CONFIG_NET_VENDOR_3COM is not set
-
-#
-# Tulip family network device support
-#
-# CONFIG_NET_TULIP is not set
-# CONFIG_HP100 is not set
-# CONFIG_NET_PCI is not set
 
 #
 # Ethernet (1000 Mbit)
 #
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_E1000 is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_R8169 is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_TIGON3 is not set
-# CONFIG_BNX2 is not set
 
 #
 # Ethernet (10000 Mbit)
 #
-# CONFIG_IXGB is not set
-# CONFIG_S2IO is not set
 
 #
 # Token Ring devices
 #
-# CONFIG_TR is not set
 
 #
 # Wireless LAN (non-hamradio)
@@ -640,11 +595,8 @@ CONFIG_BCMINTEMAC_7038=y
 # Wan interfaces
 #
 # CONFIG_WAN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
-# CONFIG_NET_FC is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 
@@ -689,7 +641,6 @@ CONFIG_SERIAL_8250_NR_UARTS=0
 #
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
-# CONFIG_SERIAL_JSM is not set
 CONFIG_UNIX98_PTYS=y
 # CONFIG_LEGACY_PTYS is not set
 
@@ -706,7 +657,6 @@ CONFIG_UNIX98_PTYS=y
 # CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
 
 #
 # Ftape, the floppy tape device driver
@@ -717,7 +667,6 @@ CONFIG_UNIX98_PTYS=y
 #
 # TPM devices
 #
-# CONFIG_TCG_TPM is not set
 
 #
 # I2C support
@@ -775,10 +724,7 @@ CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 # CONFIG_USB_EHCI_SPLIT_ISO is not set
 # CONFIG_USB_EHCI_ROOT_HUB_TT is not set
-CONFIG_USB_OHCI_HCD=y
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-# CONFIG_USB_UHCI_HCD is not set
+# CONFIG_USB_OHCI_HCD is not set
 # CONFIG_USB_SL811_HCD is not set
 CONFIG_USB_BRCM=y
 # CONFIG_USB_BRCM_EXT_XTAL is not set
@@ -797,7 +743,6 @@ CONFIG_USB_STORAGE=m
 # CONFIG_USB_STORAGE_DEBUG is not set
 # CONFIG_USB_STORAGE_DATAFAB is not set
 # CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
 # CONFIG_USB_STORAGE_DPCM is not set
 # CONFIG_USB_STORAGE_USBAT is not set
 # CONFIG_USB_STORAGE_SDDR09 is not set
@@ -833,8 +778,8 @@ CONFIG_USB_STORAGE=m
 #
 # CONFIG_USB_CATC is not set
 # CONFIG_USB_KAWETH is not set
-CONFIG_USB_PEGASUS=y
-CONFIG_USB_RTL8150=y
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
 CONFIG_USB_USBNET=y
 
 #
@@ -854,7 +799,7 @@ CONFIG_USB_PL2301=y
 # CONFIG_USB_ARMLINUX is not set
 # CONFIG_USB_EPSON2888 is not set
 # CONFIG_USB_ZAURUS is not set
-CONFIG_USB_CDCETHER=y
+# CONFIG_USB_CDCETHER is not set
 
 #
 # USB Network Adapters
@@ -1021,21 +966,8 @@ CONFIG_CRAMFS=y
 #
 # Network File Systems
 #
-CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
-# CONFIG_NFS_V4 is not set
-# CONFIG_NFS_DIRECTIO is not set
-CONFIG_NFSD=m
-CONFIG_NFSD_V3=y
-# CONFIG_NFSD_V4 is not set
-# CONFIG_NFSD_TCP is not set
-CONFIG_ROOT_NFS=y
-CONFIG_LOCKD=y
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_SUNRPC=y
-# CONFIG_RPCSEC_GSS_KRB5 is not set
-# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_NFS_FS is not set
+# CONFIG_NFSD is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
@@ -1045,22 +977,8 @@ CONFIG_SUNRPC=y
 #
 # Partition Types
 #
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-# CONFIG_OSF_PARTITION is not set
-# CONFIG_AMIGA_PARTITION is not set
-# CONFIG_ATARI_PARTITION is not set
-# CONFIG_MAC_PARTITION is not set
+# CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-# CONFIG_BSD_DISKLABEL is not set
-# CONFIG_MINIX_SUBPARTITION is not set
-# CONFIG_SOLARIS_X86_PARTITION is not set
-# CONFIG_UNIXWARE_DISKLABEL is not set
-# CONFIG_LDM_PARTITION is not set
-# CONFIG_SGI_PARTITION is not set
-# CONFIG_ULTRIX_PARTITION is not set
-# CONFIG_SUN_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
 
 #
 # Native Language Support
@@ -1118,7 +1036,7 @@ CONFIG_NLS_ISO8859_1=m
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_CROSSCOMPILE=y
-CONFIG_CMDLINE="rw console=ttyS0,115200"
+CONFIG_CMDLINE="root=/dev/hda1 rw console=tty0 console=ttyS0,115200"
 
 #
 # Security options
@@ -1131,6 +1049,7 @@ CONFIG_CMDLINE="rw console=ttyS0,115200"
 #
 # CONFIG_CRYPTO is not set
 
+
 #
 # Hardware crypto devices
 #
@@ -1140,7 +1059,7 @@ CONFIG_CMDLINE="rw console=ttyS0,115200"
 #
 # CONFIG_CRC_CCITT is not set
 CONFIG_CRC32=y
-# CONFIG_LIBCRC32C is not set
+CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
 CONFIG_GENERIC_HARDIRQS=y
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/arch/mips/configs/bcm97402c0_defconfig stblinux-2.6.12/arch/mips/configs/bcm97402c0_defconfig
--- stblinux-2.6.12.org/arch/mips/configs/bcm97402c0_defconfig	2007-02-03 05:41:03.000000000 +0900
+++ stblinux-2.6.12/arch/mips/configs/bcm97402c0_defconfig	2008-05-28 13:45:51.000000000 +0900
@@ -265,14 +265,14 @@ CONFIG_MTD_CFI_NOSWAP=y
 # CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
 # CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
 CONFIG_MTD_CFI_GEOMETRY=y
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
+# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set
 CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set
 # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
 # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
 # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
 CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I2 is not set
 # CONFIG_MTD_CFI_I4 is not set
 # CONFIG_MTD_CFI_I8 is not set
 # CONFIG_MTD_OTP is not set
@@ -287,10 +287,11 @@ CONFIG_MTD_CFI_UTIL=y
 #
 # Mapping drivers for chip access
 #
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_COMPLEX_MAPPINGS=y
 # CONFIG_MTD_PHYSMAP is not set
 CONFIG_MTD_BCM7XXX=y
 # CONFIG_MTD_MULTI_PHYSMAP is not set
+# CONFIG_MTD_PCI is not set
 # CONFIG_MTD_PLATRAM is not set
 
 #
@@ -372,18 +373,18 @@ CONFIG_IOSCHED_CFQ=y
 #
 # SCSI device support
 #
-CONFIG_SCSI=m
+# CONFIG_SCSI is not set
 # CONFIG_SCSI_PROC_FS is not set
 
 #
 # SCSI support type (disk, tape, CD-ROM)
 #
-CONFIG_BLK_DEV_SD=m
+# CONFIG_BLK_DEV_SD is not set
 # CONFIG_CHR_DEV_ST is not set
 # CONFIG_CHR_DEV_OSST is not set
-CONFIG_BLK_DEV_SR=m
+# CONFIG_BLK_DEV_SR is not set
 # CONFIG_BLK_DEV_SR_VENDOR is not set
-CONFIG_CHR_DEV_SG=m
+# CONFIG_CHR_DEV_SG is not set
 
 #
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
@@ -422,7 +423,7 @@ CONFIG_CHR_DEV_SG=m
 # CONFIG_SCSI_IPR is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
-CONFIG_SCSI_QLA2XXX=m
+# CONFIG_SCSI_QLA2XXX is not set
 # CONFIG_SCSI_QLA21XX is not set
 # CONFIG_SCSI_QLA22XX is not set
 # CONFIG_SCSI_QLA2300 is not set
@@ -469,10 +470,10 @@ CONFIG_UNIX=y
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
 # CONFIG_IP_ADVANCED_ROUTER is not set
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-CONFIG_IP_PNP_BOOTP=y
-CONFIG_IP_PNP_RARP=y
+# CONFIG_IP_PNP is not set
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
 # CONFIG_NET_IPIP is not set
 # CONFIG_NET_IPGRE is not set
 # CONFIG_IP_MROUTE is not set
@@ -483,9 +484,82 @@ CONFIG_IP_PNP_RARP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_TUNNEL is not set
 CONFIG_IP_TCPDIAG=y
-# CONFIG_IP_TCPDIAG_IPV6 is not set
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
+CONFIG_IP_TCPDIAG_IPV6=y
+
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=y
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_IPV6_TUNNEL is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_CONNTRACK=y
+# CONFIG_IP_NF_CT_ACCT is not set
+# CONFIG_IP_NF_CONNTRACK_MARK is not set
+# CONFIG_IP_NF_CT_PROTO_SCTP is not set
+CONFIG_IP_NF_FTP=y
+CONFIG_IP_NF_IRC=y
+CONFIG_IP_NF_TFTP=y
+# CONFIG_IP_NF_AMANDA is not set
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=y
+# CONFIG_IP_NF_MATCH_LIMIT is not set
+# CONFIG_IP_NF_MATCH_IPRANGE is not set
+# CONFIG_IP_NF_MATCH_MAC is not set
+# CONFIG_IP_NF_MATCH_PKTTYPE is not set
+# CONFIG_IP_NF_MATCH_MARK is not set
+# CONFIG_IP_NF_MATCH_MULTIPORT is not set
+# CONFIG_IP_NF_MATCH_TOS is not set
+# CONFIG_IP_NF_MATCH_RECENT is not set
+# CONFIG_IP_NF_MATCH_ECN is not set
+# CONFIG_IP_NF_MATCH_DSCP is not set
+# CONFIG_IP_NF_MATCH_AH_ESP is not set
+# CONFIG_IP_NF_MATCH_LENGTH is not set
+# CONFIG_IP_NF_MATCH_TTL is not set
+# CONFIG_IP_NF_MATCH_TCPMSS is not set
+# CONFIG_IP_NF_MATCH_HELPER is not set
+# CONFIG_IP_NF_MATCH_STATE is not set
+# CONFIG_IP_NF_MATCH_CONNTRACK is not set
+# CONFIG_IP_NF_MATCH_OWNER is not set
+# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
+# CONFIG_IP_NF_MATCH_REALM is not set
+# CONFIG_IP_NF_MATCH_SCTP is not set
+# CONFIG_IP_NF_MATCH_COMMENT is not set
+# CONFIG_IP_NF_MATCH_HASHLIMIT is not set
+# CONFIG_IP_NF_FILTER is not set
+# CONFIG_IP_NF_TARGET_LOG is not set
+# CONFIG_IP_NF_TARGET_ULOG is not set
+# CONFIG_IP_NF_TARGET_TCPMSS is not set
+CONFIG_IP_NF_NAT=y
+CONFIG_IP_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=y
+# CONFIG_IP_NF_TARGET_REDIRECT is not set
+# CONFIG_IP_NF_TARGET_NETMAP is not set
+# CONFIG_IP_NF_TARGET_SAME is not set
+# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
+CONFIG_IP_NF_NAT_IRC=y
+CONFIG_IP_NF_NAT_FTP=y
+CONFIG_IP_NF_NAT_TFTP=y
+# CONFIG_IP_NF_MANGLE is not set
+# CONFIG_IP_NF_RAW is not set
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
 
 #
 # SCTP Configuration (EXPERIMENTAL)
@@ -546,7 +620,30 @@ CONFIG_BCMINTEMAC_7038=y
 #
 # CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
-# CONFIG_NET_PCI is not set
+CONFIG_NET_PCI=y
+# CONFIG_PCNET32 is not set
+# CONFIG_AMD8111_ETH is not set
+# CONFIG_ADAPTEC_STARFIRE is not set
+# CONFIG_B44 is not set
+# CONFIG_FORCEDETH is not set
+# CONFIG_DGRS is not set
+# CONFIG_EEPRO100 is not set
+# CONFIG_E100 is not set
+# CONFIG_FEALNX is not set
+# CONFIG_NATSEMI is not set
+# CONFIG_NE2K_PCI is not set
+# CONFIG_8139CP is not set
+CONFIG_8139TOO=y
+# CONFIG_8139TOO_PIO is not set
+# CONFIG_8139TOO_TUNE_TWISTER is not set
+CONFIG_8139TOO_8129=y
+# CONFIG_8139_OLD_RX_RESET is not set
+# CONFIG_SIS900 is not set
+# CONFIG_EPIC100 is not set
+# CONFIG_SUNDANCE is not set
+# CONFIG_TLAN is not set
+# CONFIG_VIA_RHINE is not set
+# CONFIG_LAN_SAA9730 is not set
 
 #
 # Ethernet (1000 Mbit)
@@ -559,6 +656,7 @@ CONFIG_BCMINTEMAC_7038=y
 # CONFIG_YELLOWFIN is not set
 # CONFIG_R8169 is not set
 # CONFIG_SK98LIN is not set
+# CONFIG_VIA_VELOCITY is not set
 # CONFIG_TIGON3 is not set
 # CONFIG_BNX2 is not set
 
@@ -698,9 +796,9 @@ CONFIG_UNIX98_PTYS=y
 #
 # USB support
 #
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB=y
+# CONFIG_USB_ARCH_HAS_HCD is not set
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB is not set
 # CONFIG_USB_DEBUG is not set
 
 #
@@ -714,15 +812,15 @@ CONFIG_USB=y
 #
 # USB Host Controller Drivers
 #
-CONFIG_USB_EHCI_HCD=y
+# CONFIG_USB_EHCI_HCD is not set
 # CONFIG_USB_EHCI_SPLIT_ISO is not set
 # CONFIG_USB_EHCI_ROOT_HUB_TT is not set
-CONFIG_USB_OHCI_HCD=y
+# CONFIG_USB_OHCI_HCD is not set
 # CONFIG_USB_OHCI_BIG_ENDIAN is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+# CONFIG_USB_OHCI_LITTLE_ENDIAN is not set
 # CONFIG_USB_UHCI_HCD is not set
 # CONFIG_USB_SL811_HCD is not set
-CONFIG_USB_BRCM=y
+# CONFIG_USB_BRCM is not set
 # CONFIG_USB_BRCM_EXT_XTAL is not set
 
 #
@@ -735,7 +833,7 @@ CONFIG_USB_BRCM=y
 #
 # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
 #
-CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE is not set
 # CONFIG_USB_STORAGE_DEBUG is not set
 # CONFIG_USB_STORAGE_DATAFAB is not set
 # CONFIG_USB_STORAGE_FREECOM is not set
@@ -774,9 +872,9 @@ CONFIG_USB_STORAGE=m
 #
 # CONFIG_USB_CATC is not set
 # CONFIG_USB_KAWETH is not set
-CONFIG_USB_PEGASUS=y
-CONFIG_USB_RTL8150=y
-CONFIG_USB_USBNET=y
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET is not set
 
 #
 # USB Host-to-Host Cables
@@ -786,7 +884,7 @@ CONFIG_USB_USBNET=y
 # CONFIG_USB_BELKIN is not set
 # CONFIG_USB_GENESYS is not set
 # CONFIG_USB_NET1080 is not set
-CONFIG_USB_PL2301=y
+# CONFIG_USB_PL2301 is not set
 # CONFIG_USB_KC2190 is not set
 
 #
@@ -795,13 +893,13 @@ CONFIG_USB_PL2301=y
 # CONFIG_USB_ARMLINUX is not set
 # CONFIG_USB_EPSON2888 is not set
 # CONFIG_USB_ZAURUS is not set
-CONFIG_USB_CDCETHER=y
+# CONFIG_USB_CDCETHER is not set
 
 #
 # USB Network Adapters
 #
-CONFIG_USB_AX8817X=y
-CONFIG_USB_MON=y
+# CONFIG_USB_AX8817X is not set
+# CONFIG_USB_MON is not set
 
 #
 # USB port drivers
@@ -810,10 +908,10 @@ CONFIG_USB_MON=y
 #
 # USB Serial Converter support
 #
-CONFIG_USB_SERIAL=m
+# CONFIG_USB_SERIAL is not set
 # CONFIG_USB_SERIAL_GENERIC is not set
 # CONFIG_USB_SERIAL_AIRPRIME is not set
-CONFIG_USB_SERIAL_BELKIN=m
+# CONFIG_USB_SERIAL_BELKIN is not set
 # CONFIG_USB_SERIAL_WHITEHEAT is not set
 # CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
 # CONFIG_USB_SERIAL_CP2101 is not set
@@ -832,7 +930,7 @@ CONFIG_USB_SERIAL_BELKIN=m
 # CONFIG_USB_SERIAL_KLSI is not set
 # CONFIG_USB_SERIAL_KOBIL_SCT is not set
 # CONFIG_USB_SERIAL_MCT_U232 is not set
-CONFIG_USB_SERIAL_PL2303=m
+# CONFIG_USB_SERIAL_PL2303 is not set
 # CONFIG_USB_SERIAL_HP4X is not set
 # CONFIG_USB_SERIAL_SAFE is not set
 # CONFIG_USB_SERIAL_TI is not set
@@ -878,11 +976,11 @@ CONFIG_USB_SERIAL_PL2303=m
 #
 # File systems
 #
-CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS is not set
 # CONFIG_EXT2_FS_XATTR is not set
-CONFIG_EXT3_FS=y
+# CONFIG_EXT3_FS is not set
 # CONFIG_EXT3_FS_XATTR is not set
-CONFIG_JBD=y
+# CONFIG_JBD is not set
 # CONFIG_JBD_DEBUG is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
@@ -901,20 +999,20 @@ CONFIG_JBD=y
 #
 # CD-ROM/DVD Filesystems
 #
-CONFIG_ISO9660_FS=m
+# CONFIG_ISO9660_FS is not set
 # CONFIG_JOLIET is not set
 # CONFIG_ZISOFS is not set
-CONFIG_UDF_FS=m
-CONFIG_UDF_NLS=y
+# CONFIG_UDF_FS is not set
+# CONFIG_UDF_NLS is not set
 
 #
 # DOS/FAT/NT Filesystems
 #
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_FAT_DEFAULT_CODEPAGE=437
-CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_FAT_FS is not set
+# CONFIG_MSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_FAT_DEFAULT_CODEPAGE=437
+# CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 # CONFIG_NTFS_FS is not set
 
 #
@@ -941,16 +1039,16 @@ CONFIG_RAMFS=y
 # CONFIG_BFS_FS is not set
 # CONFIG_EFS_FS is not set
 # CONFIG_JFFS_FS is not set
-CONFIG_JFFS2_FS=y
-CONFIG_JFFS2_FS_DEBUG=0
-CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS is not set
+# CONFIG_JFFS2_FS_DEBUG is not set
+# CONFIG_JFFS2_FS_WRITEBUFFER is not set
 # CONFIG_JFFS2_SUMMARY is not set
-CONFIG_JFFS2_COMPRESSION_OPTIONS=y
-CONFIG_JFFS2_ZLIB=y
-CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+# CONFIG_JFFS2_ZLIB is not set
+# CONFIG_JFFS2_RTIME is not set
 # CONFIG_JFFS2_RUBIN is not set
 # CONFIG_JFFS2_CMODE_NONE is not set
-CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_PRIORITY is not set
 # CONFIG_JFFS2_CMODE_SIZE is not set
 CONFIG_CRAMFS=y
 # CONFIG_VXFS_FS is not set
@@ -962,19 +1060,19 @@ CONFIG_CRAMFS=y
 #
 # Network File Systems
 #
-CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
+# CONFIG_NFS_FS is not set
+# CONFIG_NFS_V3 is not set
 # CONFIG_NFS_V4 is not set
 # CONFIG_NFS_DIRECTIO is not set
-CONFIG_NFSD=m
-CONFIG_NFSD_V3=y
+# CONFIG_NFSD is not set
+# CONFIG_NFSD_V3 is not set
 # CONFIG_NFSD_V4 is not set
 # CONFIG_NFSD_TCP is not set
-CONFIG_ROOT_NFS=y
-CONFIG_LOCKD=y
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_SUNRPC=y
+# CONFIG_ROOT_NFS is not set
+# CONFIG_LOCKD is not set
+# CONFIG_LOCKD_V4 is not set
+# CONFIG_EXPORTFS is not set
+# CONFIG_SUNRPC is not set
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
@@ -986,13 +1084,13 @@ CONFIG_SUNRPC=y
 #
 # Partition Types
 #
-CONFIG_PARTITION_ADVANCED=y
+# CONFIG_PARTITION_ADVANCED is not set
 # CONFIG_ACORN_PARTITION is not set
 # CONFIG_OSF_PARTITION is not set
 # CONFIG_AMIGA_PARTITION is not set
 # CONFIG_ATARI_PARTITION is not set
 # CONFIG_MAC_PARTITION is not set
-CONFIG_MSDOS_PARTITION=y
+# CONFIG_MSDOS_PARTITION is not set
 # CONFIG_BSD_DISKLABEL is not set
 # CONFIG_MINIX_SUBPARTITION is not set
 # CONFIG_SOLARIS_X86_PARTITION is not set
@@ -1006,9 +1104,9 @@ CONFIG_MSDOS_PARTITION=y
 #
 # Native Language Support
 #
-CONFIG_NLS=m
-CONFIG_NLS_DEFAULT="iso8859-1"
-CONFIG_NLS_CODEPAGE_437=m
+# CONFIG_NLS is not set
+# CONFIG_NLS_DEFAULT="iso8859-1"
+# CONFIG_NLS_CODEPAGE_437 is not set
 # CONFIG_NLS_CODEPAGE_737 is not set
 # CONFIG_NLS_CODEPAGE_775 is not set
 # CONFIG_NLS_CODEPAGE_850 is not set
@@ -1032,7 +1130,7 @@ CONFIG_NLS_CODEPAGE_437=m
 # CONFIG_NLS_CODEPAGE_1250 is not set
 # CONFIG_NLS_CODEPAGE_1251 is not set
 # CONFIG_NLS_ASCII is not set
-CONFIG_NLS_ISO8859_1=m
+# CONFIG_NLS_ISO8859_1 is not set
 # CONFIG_NLS_ISO8859_2 is not set
 # CONFIG_NLS_ISO8859_3 is not set
 # CONFIG_NLS_ISO8859_4 is not set
@@ -1080,9 +1178,9 @@ CONFIG_CMDLINE="root=/dev/mtdblock0 r0 c
 # Library routines
 #
 # CONFIG_CRC_CCITT is not set
-CONFIG_CRC32=y
+# CONFIG_CRC32 is not set
 # CONFIG_LIBCRC32C is not set
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=y
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
+# CONFIG_ZLIB_INFLATE is not set
+# CONFIG_ZLIB_DEFLATE is not set
+# CONFIG_GENERIC_HARDIRQS is not set
+# CONFIG_GENERIC_IRQ_PROBE is not set
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/arch/mips/configs/bcm97402c0_initrd_defconfig stblinux-2.6.12/arch/mips/configs/bcm97402c0_initrd_defconfig
--- stblinux-2.6.12.org/arch/mips/configs/bcm97402c0_initrd_defconfig	2007-02-03 05:14:39.000000000 +0900
+++ stblinux-2.6.12/arch/mips/configs/bcm97402c0_initrd_defconfig	2008-05-28 13:45:51.000000000 +0900
@@ -265,14 +265,14 @@ CONFIG_MTD_CFI_NOSWAP=y
 # CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
 # CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
 CONFIG_MTD_CFI_GEOMETRY=y
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
+# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set
 CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set
 # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
 # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
 # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
 CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I2 is not set
 # CONFIG_MTD_CFI_I4 is not set
 # CONFIG_MTD_CFI_I8 is not set
 # CONFIG_MTD_OTP is not set
@@ -287,10 +287,11 @@ CONFIG_MTD_CFI_UTIL=y
 #
 # Mapping drivers for chip access
 #
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_COMPLEX_MAPPINGS=y
 # CONFIG_MTD_PHYSMAP is not set
 CONFIG_MTD_BCM7XXX=y
 # CONFIG_MTD_MULTI_PHYSMAP is not set
+# CONFIG_MTD_PCI is not set
 # CONFIG_MTD_PLATRAM is not set
 
 #
@@ -426,7 +427,7 @@ CONFIG_CHR_DEV_SG=m
 # CONFIG_SCSI_IPR is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
-CONFIG_SCSI_QLA2XXX=m
+# CONFIG_SCSI_QLA2XXX is not set
 # CONFIG_SCSI_QLA21XX is not set
 # CONFIG_SCSI_QLA22XX is not set
 # CONFIG_SCSI_QLA2300 is not set
@@ -487,9 +488,81 @@ CONFIG_IP_PNP_RARP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_TUNNEL is not set
 CONFIG_IP_TCPDIAG=y
-# CONFIG_IP_TCPDIAG_IPV6 is not set
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
+CONFIG_IP_TCPDIAG_IPV6=y
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=y
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_IPV6_TUNNEL is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_CONNTRACK=y
+# CONFIG_IP_NF_CT_ACCT is not set
+# CONFIG_IP_NF_CONNTRACK_MARK is not set
+# CONFIG_IP_NF_CT_PROTO_SCTP is not set
+CONFIG_IP_NF_FTP=y
+CONFIG_IP_NF_IRC=y
+CONFIG_IP_NF_TFTP=y
+# CONFIG_IP_NF_AMANDA is not set
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=y
+# CONFIG_IP_NF_MATCH_LIMIT is not set
+# CONFIG_IP_NF_MATCH_IPRANGE is not set
+# CONFIG_IP_NF_MATCH_MAC is not set
+# CONFIG_IP_NF_MATCH_PKTTYPE is not set
+# CONFIG_IP_NF_MATCH_MARK is not set
+# CONFIG_IP_NF_MATCH_MULTIPORT is not set
+# CONFIG_IP_NF_MATCH_TOS is not set
+# CONFIG_IP_NF_MATCH_RECENT is not set
+# CONFIG_IP_NF_MATCH_ECN is not set
+# CONFIG_IP_NF_MATCH_DSCP is not set
+# CONFIG_IP_NF_MATCH_AH_ESP is not set
+# CONFIG_IP_NF_MATCH_LENGTH is not set
+# CONFIG_IP_NF_MATCH_TTL is not set
+# CONFIG_IP_NF_MATCH_TCPMSS is not set
+# CONFIG_IP_NF_MATCH_HELPER is not set
+# CONFIG_IP_NF_MATCH_STATE is not set
+# CONFIG_IP_NF_MATCH_CONNTRACK is not set
+# CONFIG_IP_NF_MATCH_OWNER is not set
+# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
+# CONFIG_IP_NF_MATCH_REALM is not set
+# CONFIG_IP_NF_MATCH_SCTP is not set
+# CONFIG_IP_NF_MATCH_COMMENT is not set
+# CONFIG_IP_NF_MATCH_HASHLIMIT is not set
+# CONFIG_IP_NF_FILTER is not set
+# CONFIG_IP_NF_TARGET_LOG is not set
+# CONFIG_IP_NF_TARGET_ULOG is not set
+# CONFIG_IP_NF_TARGET_TCPMSS is not set
+CONFIG_IP_NF_NAT=y
+CONFIG_IP_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=y
+# CONFIG_IP_NF_TARGET_REDIRECT is not set
+# CONFIG_IP_NF_TARGET_NETMAP is not set
+# CONFIG_IP_NF_TARGET_SAME is not set
+# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
+CONFIG_IP_NF_NAT_IRC=y
+CONFIG_IP_NF_NAT_FTP=y
+CONFIG_IP_NF_NAT_TFTP=y
+# CONFIG_IP_NF_MANGLE is not set
+# CONFIG_IP_NF_RAW is not set
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
 
 #
 # SCTP Configuration (EXPERIMENTAL)
@@ -550,7 +623,30 @@ CONFIG_BCMINTEMAC_7038=y
 #
 # CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
-# CONFIG_NET_PCI is not set
+CONFIG_NET_PCI=y
+# CONFIG_PCNET32 is not set
+# CONFIG_AMD8111_ETH is not set
+# CONFIG_ADAPTEC_STARFIRE is not set
+# CONFIG_B44 is not set
+# CONFIG_FORCEDETH is not set
+# CONFIG_DGRS is not set
+# CONFIG_EEPRO100 is not set
+# CONFIG_E100 is not set
+# CONFIG_FEALNX is not set
+# CONFIG_NATSEMI is not set
+# CONFIG_NE2K_PCI is not set
+# CONFIG_8139CP is not set
+CONFIG_8139TOO=y
+# CONFIG_8139TOO_PIO is not set
+# CONFIG_8139TOO_TUNE_TWISTER is not set
+CONFIG_8139TOO_8129=y
+# CONFIG_8139_OLD_RX_RESET is not set
+# CONFIG_SIS900 is not set
+# CONFIG_EPIC100 is not set
+# CONFIG_SUNDANCE is not set
+# CONFIG_TLAN is not set
+# CONFIG_VIA_RHINE is not set
+# CONFIG_LAN_SAA9730 is not set
 
 #
 # Ethernet (1000 Mbit)
@@ -563,6 +659,7 @@ CONFIG_BCMINTEMAC_7038=y
 # CONFIG_YELLOWFIN is not set
 # CONFIG_R8169 is not set
 # CONFIG_SK98LIN is not set
+# CONFIG_VIA_VELOCITY is not set
 # CONFIG_TIGON3 is not set
 # CONFIG_BNX2 is not set
 
@@ -721,9 +818,9 @@ CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 # CONFIG_USB_EHCI_SPLIT_ISO is not set
 # CONFIG_USB_EHCI_ROOT_HUB_TT is not set
-CONFIG_USB_OHCI_HCD=y
+# CONFIG_USB_OHCI_HCD is not set
 # CONFIG_USB_OHCI_BIG_ENDIAN is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+# CONFIG_USB_OHCI_LITTLE_ENDIAN is not set
 # CONFIG_USB_UHCI_HCD is not set
 # CONFIG_USB_SL811_HCD is not set
 CONFIG_USB_BRCM=y
@@ -778,8 +875,8 @@ CONFIG_USB_STORAGE=m
 #
 # CONFIG_USB_CATC is not set
 # CONFIG_USB_KAWETH is not set
-CONFIG_USB_PEGASUS=y
-CONFIG_USB_RTL8150=y
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
 CONFIG_USB_USBNET=y
 
 #
@@ -799,7 +896,7 @@ CONFIG_USB_PL2301=y
 # CONFIG_USB_ARMLINUX is not set
 # CONFIG_USB_EPSON2888 is not set
 # CONFIG_USB_ZAURUS is not set
-CONFIG_USB_CDCETHER=y
+# CONFIG_USB_CDCETHER is not set
 
 #
 # USB Network Adapters
@@ -966,19 +1063,19 @@ CONFIG_CRAMFS=y
 #
 # Network File Systems
 #
-CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
+# CONFIG_NFS_FS is not set
+# CONFIG_NFS_V3 is not set
 # CONFIG_NFS_V4 is not set
 # CONFIG_NFS_DIRECTIO is not set
-CONFIG_NFSD=m
-CONFIG_NFSD_V3=y
+# CONFIG_NFSD is not set
+# CONFIG_NFSD_V3 is not set
 # CONFIG_NFSD_V4 is not set
 # CONFIG_NFSD_TCP is not set
-CONFIG_ROOT_NFS=y
-CONFIG_LOCKD=y
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_SUNRPC=y
+# CONFIG_ROOT_NFS is not set
+# CONFIG_LOCKD is not set
+# CONFIG_LOCKD_V4 is not set
+# CONFIG_EXPORTFS is not set
+# CONFIG_SUNRPC is not set
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
@@ -990,7 +1087,7 @@ CONFIG_SUNRPC=y
 #
 # Partition Types
 #
-CONFIG_PARTITION_ADVANCED=y
+# CONFIG_PARTITION_ADVANCED is not set
 # CONFIG_ACORN_PARTITION is not set
 # CONFIG_OSF_PARTITION is not set
 # CONFIG_AMIGA_PARTITION is not set
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/arch/mips/kernel/branch.c stblinux-2.6.12/arch/mips/kernel/branch.c
--- stblinux-2.6.12.org/arch/mips/kernel/branch.c	2007-02-03 05:41:06.000000000 +0900
+++ stblinux-2.6.12/arch/mips/kernel/branch.c	2008-05-28 13:51:26.000000000 +0900
@@ -35,7 +35,28 @@ int __compute_return_epc(struct pt_regs 
 	 */
 	addr = (unsigned int *) epc;
 	if (__get_user(insn.word, addr)) {
+#if defined(DEBUG_ON_ERROR_SIGNAL) 
+		snprintf(dbglasterr_buf, sizeof(dbglasterr_buf),
+				 "__compute_return_epc: sending SIGSEGV to %s "
+				 "(epc == 0x%08lx, ra == 0x%08lx, PID == %d)\n",
+				 current->comm,
+				 (unsigned long) regs->cp0_epc,
+				 (unsigned long) regs->regs[31],
+				 current->pid);
+		printk("%s", dbglasterr_buf);
+		
+		if (!embed_break(regs)) {
+			siginfo_t info;
+			info.si_code = SEGV_MAPERR;
+			info.si_signo = SIGSEGV;
+			info.si_errno = 0;
+			info.si_addr = (void *)regs->cp0_epc;
+			
+			force_sig_info(SIGSEGV, &info, current);
+		}
+#else /* defined(DEBUG_ON_ERROR_SIGNAL) */
 		force_sig(SIGSEGV, current);
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
 		return -EFAULT;
 	}
 
@@ -208,13 +229,40 @@ int __compute_return_epc(struct pt_regs 
 
 	return 0;
 
+
+#if defined(DEBUG_ON_ERROR_SIGNAL) 
+unaligned:
+sigill:
+	snprintf(dbglasterr_buf, sizeof(dbglasterr_buf),
+			 "__compute_return_epc: sending SIGBUS to %s "
+			 "(epc == 0x%08lx, ra == 0x%08lx, PID == %d)\n",
+			 current->comm,
+			 (unsigned long) regs->cp0_epc,
+			 (unsigned long) regs->regs[31],
+			 current->pid);
+	printk("%s", dbglasterr_buf);
+	
+	if (!embed_break(regs)) {
+		siginfo_t info;
+		info.si_code = BUS_ADRALN;
+		info.si_signo = SIGBUS;
+		info.si_errno = 0;
+		info.si_addr = (void *)regs->cp0_epc;
+			
+		force_sig_info(SIGBUS, &info, current);
+	}
+	return -EFAULT;
+#else /* defined(DEBUG_ON_ERROR_SIGNAL) */
 unaligned:
 	printk("%s: unaligned epc - sending SIGBUS.\n", current->comm);
 	force_sig(SIGBUS, current);
 	return -EFAULT;
-
 sigill:
 	printk("%s: DSP branch but not DSP ASE - sending SIGBUS.\n", current->comm);
 	force_sig(SIGBUS, current);
 	return -EFAULT;
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
+
+
+
 }
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/arch/mips/kernel/cpu-probe.c stblinux-2.6.12/arch/mips/kernel/cpu-probe.c
--- stblinux-2.6.12.org/arch/mips/kernel/cpu-probe.c	2007-02-03 05:41:06.000000000 +0900
+++ stblinux-2.6.12/arch/mips/kernel/cpu-probe.c	2008-05-28 13:51:26.000000000 +0900
@@ -649,20 +649,26 @@ static inline void cpu_probe_brcm(struct
 	case PRID_IMP_BCM3560:
                 c->cputype = CPU_BCM3560;
                 c->tlbsize = 32;
+#ifdef KERNEL_BOOT_LOG_ON
                 printk("MIPs 3560 id = %x\n", c->processor_id);
+#endif
                 break;
 #endif
 #ifdef CONFIG_MIPS_BCM7112
         case PRID_IMP_BCM7112:
                 c->cputype = CPU_BCM7112;
                 c->tlbsize = 32;
+#ifdef KERNEL_BOOT_LOG_ON
                 printk("MIPs 7112 id = %x\n", c->processor_id);
+#endif
                 break;
 #elif defined( CONFIG_MIPS_BCM7115 )
         case PRID_IMP_BCM7115:
                 c->cputype = CPU_BCM7115;
                 c->tlbsize = 32;
+#ifdef KERNEL_BOOT_LOG_ON
                 printk("MIPs 7115 id = %x\n", c->processor_id);
+#endif
                 break;
 #endif
 
@@ -670,14 +676,18 @@ static inline void cpu_probe_brcm(struct
 	case PRID_IMP_BCM7110:
                 c->cputype = CPU_BCM7110;
                 c->tlbsize = 32;
+#ifdef KERNEL_BOOT_LOG_ON
                 printk("MIPs 7110 id = %x\n", c->processor_id);
+#endif
                 break;
 #endif
 #ifdef CONFIG_MIPS_BCM7111
 	case PRID_IMP_BCM7111:
                 c->cputype = CPU_BCM7111;
                 c->tlbsize = 32;
+#ifdef KERNEL_BOOT_LOG_ON
                 printk("MIPs 7111 id = %x\n", c->processor_id);
+#endif
                 break;
 #endif
 #ifdef CONFIG_MIPS_BCM7118
@@ -685,70 +695,90 @@ static inline void cpu_probe_brcm(struct
 	case PRID_IMP_BCM7118:
                 c->cputype = CPU_BCM7118;
                 c->tlbsize = 32;
+#ifdef KERNEL_BOOT_LOG_ON
                 printk("MIPs 7118 id = %x\n", c->processor_id);
+#endif
                 break;
 #endif
 #ifdef CONFIG_MIPS_BCM7312
 	case PRID_IMP_BCM7312:
                c->cputype = CPU_BCM7312;
                c->tlbsize = 32;
+#ifdef KERNEL_BOOT_LOG_ON
                printk("MIPs 7312 id = %x\n", c->processor_id);
+#endif
                break;
 #endif
 #ifdef CONFIG_MIPS_BCM7315
 	case PRID_IMP_BCM7315:
                c->cputype = CPU_BCM7315;
                c->tlbsize = 32;
+#ifdef KERNEL_BOOT_LOG_ON
                printk("MIPs 7315 id = %x\n", c->processor_id);
+#endif
                break;
 #endif
 #ifdef CONFIG_MIPS_BCM7314
 	case PRID_IMP_BCM7314:
                c->cputype = CPU_BCM7314;
                c->tlbsize = 32;
+#ifdef KERNEL_BOOT_LOG_ON
                printk("MIPs 7314 id = %x\n", c->processor_id);
+#endif
                break;
 #endif
 #ifdef CONFIG_MIPS_BCM7317
 	case PRID_IMP_BCM7317:
                c->cputype = CPU_BCM7317;
                c->tlbsize = 32;
+#ifdef KERNEL_BOOT_LOG_ON
                printk("MIPs 7317 id = %x\n", c->processor_id);
+#endif
                break;
 #endif
 #ifdef CONFIG_MIPS_BCM7318
 	case PRID_IMP_BCM7318:
                c->cputype = CPU_BCM7318;
                c->tlbsize = 32;
+#ifdef KERNEL_BOOT_LOG_ON
                printk("MIPs 7318 id = %x\n", c->processor_id);
+#endif
                break;
 #endif
 #ifdef CONFIG_MIPS_BCM7327
 	case PRID_IMP_BCM7327:
                c->cputype = CPU_BCM7327;
                c->tlbsize = 32;
+#ifdef KERNEL_BOOT_LOG_ON
                printk("MIPs 7327 id = %x\n", c->processor_id);
+#endif
                break;
 #endif
 #ifdef CONFIG_MIPS_BCM7329
 	case PRID_IMP_BCM7329:
                c->cputype = CPU_BCM7329;
                c->tlbsize = 32;
+#ifdef KERNEL_BOOT_LOG_ON
                printk("MIPs 7329 id = %x\n", c->processor_id);
+#endif
                break;
 #endif
 #if defined( CONFIG_MIPS_BCM7401 ) || defined( CONFIG_MIPS_BCM7402 )
 	case PRID_IMP_BCM7401:
                 c->cputype = CPU_BCM7401;
                 c->tlbsize = 32;
+#ifdef KERNEL_BOOT_LOG_ON
                 printk("MIPs 7401 id = %x\n", c->processor_id);
+#endif
                 break;
 #endif
 #if defined( CONFIG_MIPS_BCM7403 )
 	case PRID_IMP_BCM7403 :
 		c->cputype = CPU_BCM7403;
 		c->tlbsize = 32;
+#ifdef KERNEL_BOOT_LOG_ON
 		printk("MIPs 7403 id = %x\n", c->processor_id);
+#endif
 		break;
 #endif
 
@@ -756,14 +786,18 @@ static inline void cpu_probe_brcm(struct
 	case PRID_IMP_BCM7400:
                 c->cputype = CPU_BCM7400;
                 c->tlbsize = 32;
+#ifdef KERNEL_BOOT_LOG_ON
                 printk("MIPs 7400 id = %x\n", c->processor_id);
+#endif
                 break;
 #endif
 #ifdef CONFIG_MIPS_BCM7440
 	case PRID_IMP_BCM7440:
                 c->cputype = CPU_BCM7440;
                 c->tlbsize = 32;
+#ifdef KERNEL_BOOT_LOG_ON
                 printk("MIPs 7440 id = %x\n", c->processor_id);
+#endif
                 break;
 #endif
 /* No 7320 here */
@@ -786,7 +820,9 @@ __init void cpu_probe(void)
 
 	c->processor_id = read_c0_prid();
 
-printk("c->processor_id == %08x\n", c->processor_id);
+#ifdef KERNEL_BOOT_LOG_ON
+	printk("c->processor_id == %08x\n", c->processor_id);
+#endif
 
 	switch (c->processor_id & 0xff0000) {
 	case PRID_COMP_LEGACY:
@@ -829,7 +865,10 @@ __init void cpu_report(void)
 {
 	struct cpuinfo_mips *c = &current_cpu_data;
 
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("CPU revision is: %08x\n", c->processor_id);
+#endif
+
 	if (c->options & MIPS_CPU_FPU)
 		printk("FPU revision is: %08x\n", c->fpu_id);
 }
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/arch/mips/kernel/setup.c stblinux-2.6.12/arch/mips/kernel/setup.c
--- stblinux-2.6.12.org/arch/mips/kernel/setup.c	2007-02-03 05:41:07.000000000 +0900
+++ stblinux-2.6.12/arch/mips/kernel/setup.c	2008-05-28 13:51:26.000000000 +0900
@@ -129,22 +129,32 @@ static void __init print_memory_map(void
 	const int field = 2 * sizeof(unsigned long);
 
 	for (i = 0; i < boot_mem_map.nr_map; i++) {
+#ifdef KERNEL_BOOT_LOG_ON
 		printk(" memory: %0*Lx @ %0*Lx ",
 		       field, (unsigned long long) boot_mem_map.map[i].size,
 		       field, (unsigned long long) boot_mem_map.map[i].addr);
+#endif
 
 		switch (boot_mem_map.map[i].type) {
 		case BOOT_MEM_RAM:
+#ifdef KERNEL_BOOT_LOG_ON
 			printk("(usable)\n");
+#endif
 			break;
 		case BOOT_MEM_ROM_DATA:
+#ifdef KERNEL_BOOT_LOG_ON
 			printk("(ROM data)\n");
+#endif
 			break;
 		case BOOT_MEM_RESERVED:
+#ifdef KERNEL_BOOT_LOG_ON
 			printk("(reserved)\n");
+#endif
 			break;
 		default:
+#ifdef KERNEL_BOOT_LOG_ON
 			printk("type %lu\n", boot_mem_map.map[i].type);
+#endif
 			break;
 		}
 	}
@@ -346,8 +356,10 @@ static int  brcm_walk_print(unsigned lon
 {
 	char* msg = (char*) data;
 	
+#ifdef KERNEL_BOOT_LOG_ON
 	sprintf(msg, "node [%08x, %08x: %s]\n", addr, size, type==BOOT_MEM_RAM ? "RAM" : "RSVD");
 	uart_puts(msg);
+#endif
 	return 0;  // Next node please
 }
 
@@ -388,8 +400,10 @@ static inline void brcm_default_boot_mem
 		size = 32;
 #endif
 	}
+#ifdef KERNEL_BOOT_LOG_ON
 	sprintf(msg, "Using %dMB for memory, overwrite by passing mem=xx\n", size);
 	uart_puts(msg);
+#endif
 	brcm_insert_ram_node(0, size<<20, BOOT_MEM_RAM);
 }
 
@@ -426,9 +440,11 @@ static void inline brcm_reserve_bootmem_
 			if (upper_memory < brcm_mmap.map[i].addr) {
 				upper_memory = brcm_mmap.map[i].addr;
 			}
+#ifdef KERNEL_BOOT_LOG_ON
 			printk(KERN_NOTICE "Reserving %ld MB upper memory starting at %08x\n", 
 				brcm_mmap.map[i].size >> 20,
 				brcm_mmap.map[i].addr);
+#endif
 		}
 		else {
 #ifndef CONFIG_DISCONTIGMEM
@@ -436,10 +452,12 @@ static void inline brcm_reserve_bootmem_
 #else
 			reserve_bootmem_node(NODE_DATA(1), brcm_mmap.map[i].addr, 
 				brcm_mmap.map[i].size);	
+#ifdef KERNEL_BOOT_LOG_ON
 			printk(KERN_NOTICE "Reserving %ld MB upper memory starting at %08x\n", 
 				brcm_mmap.map[i].size >> 20,
 				brcm_mmap.map[i].addr);
 #endif
+#endif
 		}
 
 	}
@@ -474,7 +492,9 @@ static inline void parse_cmdline_early(v
 	int len = 0;
 	int usermem = 0;
 
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("Determined physical RAM map:\n");
+#endif
 	print_memory_map();
 
     brcm_init_memory_map();
@@ -539,7 +559,9 @@ static inline void parse_cmdline_early(v
 		brcm_default_boot_mem();
 	}
 
-    	printk("User-defined physical RAM map:\n");
+#ifdef KERNEL_BOOT_LOG_ON
+	printk("User-defined physical RAM map:\n");
+#endif
 	brcm_print_memory_map();
 
 }
@@ -800,8 +822,10 @@ static inline void bootmem_init(void)
 	initrd_below_start_ok = 1;
 	if (initrd_start) {
 		unsigned long initrd_size = ((unsigned char *)initrd_end) - ((unsigned char *)initrd_start);
+#ifdef KERNEL_BOOT_LOG_ON
 		printk("Initial ramdisk at: 0x%p (%lu bytes)\n",
 		       (void *)initrd_start, initrd_size);
+#endif
 
 		if (CPHYSADDR(initrd_end) > PFN_PHYS(max_low_pfn)) {
 			printk("initrd extends beyond end of memory "
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/arch/mips/kernel/signal.c stblinux-2.6.12/arch/mips/kernel/signal.c
--- stblinux-2.6.12.org/arch/mips/kernel/signal.c	2007-02-03 05:41:07.000000000 +0900
+++ stblinux-2.6.12/arch/mips/kernel/signal.c	2008-05-28 13:51:26.000000000 +0900
@@ -230,7 +230,28 @@ _sys_sigreturn(nabi_no_regargs struct pt
 	/* Unreached */
 
 badframe:
+#if defined(DEBUG_ON_ERROR_SIGNAL) 
+	snprintf(dbglasterr_buf, sizeof(dbglasterr_buf),
+			 "_sys_sigreturn: sending SIGSEGV to %s "
+	       "(epc == 0x%08lx, ra == 0x%08lx, PID == %d)\n",
+	       current->comm,
+	       (unsigned long) regs.cp0_epc,
+	       (unsigned long) regs.regs[31],
+	       current->pid);
+	printk("%s", dbglasterr_buf);
+
+	if (!embed_break(&regs)) {
+		siginfo_t info;
+		info.si_code = SEGV_ACCERR;
+		info.si_signo = SIGSEGV;
+		info.si_errno = 0;
+		info.si_addr = (void *)regs.cp0_epc;
+			
+		force_sig_info(SIGSEGV, &info, current);
+	}
+#else /* defined(DEBUG_ON_ERROR_SIGNAL) */
 	force_sig(SIGSEGV, current);
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
 }
 #endif /* CONFIG_TRAD_SIGNALS */
 
@@ -274,7 +295,28 @@ _sys_rt_sigreturn(nabi_no_regargs struct
 	/* Unreached */
 
 badframe:
+#if defined(DEBUG_ON_ERROR_SIGNAL)
+	snprintf(dbglasterr_buf, sizeof(dbglasterr_buf),
+			 "sys_rt_sigreturn: sending SIGSEGV to %s "
+			 "(epc == 0x%08lx, ra == 0x%08lx, PID == %d)\n",
+			 current->comm,
+			 (unsigned long) regs.cp0_epc,
+			 (unsigned long) regs.regs[31],
+			 current->pid);
+	printk("%s", dbglasterr_buf);
+
+	if (!embed_break(&regs)) {
+		siginfo_t info;
+		info.si_code = SEGV_ACCERR;
+		info.si_signo = SIGSEGV;
+		info.si_errno = 0;
+		info.si_addr = (void *)regs.cp0_epc;
+		
+		force_sig_info(SIGSEGV, &info, current);
+	}
+#else /* defined(DEBUG_ON_ERROR_SIGNAL) */
 	force_sig(SIGSEGV, current);
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
 }
 
 #ifdef CONFIG_TRAD_SIGNALS
@@ -320,7 +362,31 @@ void setup_frame(struct k_sigaction * ka
         return;
 
 give_sigsegv:
+#if defined(DEBUG_ON_ERROR_SIGNAL) 
+	if (signr == SIGSEGV)
+		ka->sa.sa_handler = SIG_DFL;
+
+	snprintf(dbglasterr_buf, sizeof(dbglasterr_buf),
+			 "setup_frame: sending SIGSEGV to %s "
+			 "(epc == 0x%08lx, ra == 0x%08lx, PID == %d)\n",
+			 current->comm,
+			 (unsigned long) regs->cp0_epc,
+			 (unsigned long) regs->regs[31],
+			 current->pid);
+	printk("%s", dbglasterr_buf);
+
+	if (!embed_break(regs)) {
+		siginfo_t info;
+		info.si_code = SEGV_ACCERR;
+		info.si_signo = SIGSEGV;
+		info.si_errno = 0;
+		info.si_addr = (void *)regs->cp0_epc;
+			
+		force_sig_info(SIGSEGV, &info, current);
+	}
+#else /* defined(DEBUG_ON_ERROR_SIGNAL) */
 	force_sigsegv(signr, current);
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
 }
 #endif
 
@@ -379,7 +445,31 @@ void setup_rt_frame(struct k_sigaction *
 	return;
 
 give_sigsegv:
+#if defined(DEBUG_ON_ERROR_SIGNAL) 
+	if (signr == SIGSEGV)
+		ka->sa.sa_handler = SIG_DFL;
+
+	snprintf(dbglasterr_buf, sizeof(dbglasterr_buf),
+			 "setup_rt_frame: sending SIGSEGV to %s "
+			 "(epc == 0x%08lx, ra == 0x%08lx, PID == %d)\n",
+			 current->comm,
+			 (unsigned long) regs->cp0_epc,
+			 (unsigned long) regs->regs[31],
+			 current->pid);
+	printk("%s", dbglasterr_buf);
+
+	if (!embed_break(regs)) {
+		siginfo_t info;
+		info.si_code = SEGV_ACCERR;
+		info.si_signo = SIGSEGV;
+		info.si_errno = 0;
+		info.si_addr = (void *)regs->cp0_epc;
+			
+		force_sig_info(SIGSEGV, &info, current);
+	}
+#else /* defined(DEBUG_ON_ERROR_SIGNAL) */
 	force_sigsegv(signr, current);
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
 }
 
 extern void setup_rt_frame_n32(struct k_sigaction * ka,
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/arch/mips/kernel/time.c stblinux-2.6.12/arch/mips/kernel/time.c
--- stblinux-2.6.12.org/arch/mips/kernel/time.c	2007-02-03 05:41:07.000000000 +0900
+++ stblinux-2.6.12/arch/mips/kernel/time.c	2008-05-28 13:51:26.000000000 +0900
@@ -671,9 +671,11 @@ void __init time_init(void)
 			    mips_hpt_frequency);
 
 		/* Report the high precision timer rate for a reference.  */
+#ifdef KERNEL_BOOT_LOG_ON
 		printk("Using %u.%03u MHz high precision timer.\n",
 		       ((mips_hpt_frequency + 500) / 1000) / 1000,
 		       ((mips_hpt_frequency + 500) / 1000) % 1000);
+#endif
 	}
 
 	if (!mips_timer_ack)
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/arch/mips/kernel/traps.c stblinux-2.6.12/arch/mips/kernel/traps.c
--- stblinux-2.6.12.org/arch/mips/kernel/traps.c	2007-02-03 05:41:07.000000000 +0900
+++ stblinux-2.6.12/arch/mips/kernel/traps.c	2008-05-28 13:51:26.000000000 +0900
@@ -369,11 +369,37 @@ asmlinkage void do_be(struct pt_regs *re
 	/*
 	 * Assume it would be too dangerous to continue ...
 	 */
+#if defined(DEBUG_ON_ERROR_SIGNAL)
+	snprintf(dbglasterr_buf, sizeof(dbglasterr_buf),
+			 "do_be: sending SIGBUS to %s for illegal %s access "
+	       "(epc == 0x%08lx, ra == 0x%08lx, PID == %d)\n",
+	       current->comm,
+	       data ? "data" : "instruction",
+	       (unsigned long) regs->cp0_epc,
+	       (unsigned long) regs->regs[31],
+	       current->pid);
+	printk("%s", dbglasterr_buf);
+#else /* Original code */
 	printk(KERN_ALERT "%s bus error, epc == %0*lx, ra == %0*lx\n",
 	       data ? "Data" : "Instruction",
 	       field, regs->cp0_epc, field, regs->regs[31]);
+#endif /* !defined(DEBUG_ON_ERROR_SIGNAL) */
+
 	die_if_kernel("Oops", regs);
+
+#if defined(DEBUG_ON_ERROR_SIGNAL)
+	if (!embed_break(regs)) {
+		siginfo_t info;
+		info.si_code = BUS_ADRALN;
+		info.si_signo = SIGBUS;
+		info.si_errno = 0;
+		info.si_addr = (void *)regs->cp0_epc;
+			
+		force_sig_info(SIGBUS, &info, current);
+	}
+#else /* defined(DEBUG_ON_ERROR_SIGNAL) */
 	force_sig(SIGBUS, current);
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
 }
 
 static inline int get_insn_opcode(struct pt_regs *regs, unsigned int *opcode)
@@ -385,7 +411,28 @@ static inline int get_insn_opcode(struct
 	if (!get_user(*opcode, epc))
 		return 0;
 
+#if defined(DEBUG_ON_ERROR_SIGNAL)
+	snprintf(dbglasterr_buf, sizeof(dbglasterr_buf),
+			 "get_insn_opcode: sending SIGSEGV to %s "
+	       "(epc == 0x%08lx, ra == 0x%08lx, PID == %d)\n",
+	       current->comm,
+	       (unsigned long) regs->cp0_epc,
+	       (unsigned long) regs->regs[31],
+	       current->pid);
+	printk("%s", dbglasterr_buf);
+
+	if (!embed_break(regs)) {
+		siginfo_t info;
+		info.si_code = SEGV_MAPERR;
+		info.si_signo = SIGSEGV;
+		info.si_errno = 0;
+		info.si_addr = (void *)regs->cp0_epc;
+			
+		force_sig_info(SIGSEGV, &info, current);
+	}
+#else
 	force_sig(SIGSEGV, current);
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
 	return 1;
 }
 
@@ -418,6 +465,10 @@ static inline void simulate_ll(struct pt
 	long offset;
 	int signal = 0;
 
+#if defined(DEBUG_ON_ERROR_SIGNAL) 
+	siginfo_t info;
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
+
 	/*
 	 * analyse the ll instruction that just caused a ri exception
 	 * and put the referenced address to addr.
@@ -432,10 +483,18 @@ static inline void simulate_ll(struct pt
 	        ((unsigned long)(regs->regs[(opcode & BASE) >> 21]) + offset);
 
 	if ((unsigned long)vaddr & 3) {
+#if defined(DEBUG_ON_ERROR_SIGNAL) 
+		info.si_code = BUS_ADRALN;
+		info.si_signo = SIGBUS;
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
 		signal = SIGBUS;
 		goto sig;
 	}
 	if (get_user(value, vaddr)) {
+#if defined(DEBUG_ON_ERROR_SIGNAL) 
+		info.si_code = SEGV_ACCERR;
+		info.si_signo = SIGSEGV;
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
 		signal = SIGSEGV;
 		goto sig;
 	}
@@ -458,7 +517,26 @@ static inline void simulate_ll(struct pt
 	return;
 
 sig:
+#if defined(DEBUG_ON_ERROR_SIGNAL) 
+	snprintf(dbglasterr_buf, sizeof(dbglasterr_buf),
+			 "simulate_ll: sending %s to %s "
+	       "(epc == 0x%08lx, ra == 0x%08lx, PID == %d)\n",
+	       signal == SIGSEGV ? "SIGSEGV" : "SIGBUS",
+	       current->comm,
+	       (unsigned long) regs->cp0_epc,
+			 (unsigned long) regs->regs[31],
+			 current->pid);
+	printk("%s", dbglasterr_buf);
+	
+	if (!embed_break(regs)) {
+		info.si_errno = 0;
+		info.si_addr = (void *)regs->cp0_epc;
+
+		force_sig_info(signal, &info, current);
+	}
+#else /* defined(DEBUG_ON_ERROR_SIGNAL) */
 	force_sig(signal, current);
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
 }
 
 static inline void simulate_sc(struct pt_regs *regs, unsigned int opcode)
@@ -468,6 +546,10 @@ static inline void simulate_sc(struct pt
 	long offset;
 	int signal = 0;
 
+#if defined(DEBUG_ON_ERROR_SIGNAL) 
+	siginfo_t info;
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
+
 	/*
 	 * analyse the sc instruction that just caused a ri exception
 	 * and put the referenced address to addr.
@@ -483,6 +565,10 @@ static inline void simulate_sc(struct pt
 	reg = (opcode & RT) >> 16;
 
 	if ((unsigned long)vaddr & 3) {
+#if defined(DEBUG_ON_ERROR_SIGNAL) 
+		info.si_code = BUS_ADRALN;
+		info.si_signo = SIGBUS;
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
 		signal = SIGBUS;
 		goto sig;
 	}
@@ -499,6 +585,10 @@ static inline void simulate_sc(struct pt
 	preempt_enable();
 
 	if (put_user(regs->regs[reg], vaddr)) {
+#if defined(DEBUG_ON_ERROR_SIGNAL) 
+		info.si_code = SEGV_ACCERR;
+		info.si_signo = SIGSEGV;
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
 		signal = SIGSEGV;
 		goto sig;
 	}
@@ -509,7 +599,26 @@ static inline void simulate_sc(struct pt
 	return;
 
 sig:
+#if defined(DEBUG_ON_ERROR_SIGNAL) 
+	snprintf(dbglasterr_buf, sizeof(dbglasterr_buf),
+			 "simulate_sc: sending %s to %s "
+	       "(epc == 0x%08lx, ra == 0x%08lx, PID == %d)\n",
+	       signal == SIGSEGV ? "SIGSEGV" : "SIGBUS",
+	       current->comm,
+	       (unsigned long) regs->cp0_epc,
+	       (unsigned long) regs->regs[31],
+	       current->pid);
+	printk("%s", dbglasterr_buf);
+	
+	if (!embed_break(regs)) {
+		info.si_errno = 0;
+		info.si_addr = (void *)regs->cp0_epc;
+		
+		force_sig_info(signal, &info, current);
+	}
+#else
 	force_sig(signal, current);
+#endif 
 }
 
 /*
@@ -577,7 +686,22 @@ asmlinkage void do_ov(struct pt_regs *re
 	info.si_signo = SIGFPE;
 	info.si_errno = 0;
 	info.si_addr = (void __user *) regs->cp0_epc;
+#if defined(DEBUG_ON_ERROR_SIGNAL)
+	snprintf(dbglasterr_buf, sizeof(dbglasterr_buf),
+			 "do_ov: sending SIGFPE to %s "
+			 "(epc == 0x%08lx, ra == 0x%08lx, PID == %d)\n",
+			 current->comm,
+			 (unsigned long) regs->cp0_epc,
+			 (unsigned long) regs->regs[31],
+			 current->pid);
+	printk("%s", dbglasterr_buf);
+
+	if (!embed_break(regs)) {
+		force_sig_info(SIGFPE, &info, current);
+	}
+#else
 	force_sig_info(SIGFPE, &info, current);
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
 }
 
 /*
@@ -634,12 +758,69 @@ asmlinkage void do_fpe(struct pt_regs *r
 
 		/* If something went wrong, signal */
 		if (sig)
-			force_sig(sig, current);
+#if defined(DEBUG_ON_ERROR_SIGNAL)
+		{
+			snprintf(dbglasterr_buf, sizeof(dbglasterr_buf),
+					 "do_fpe: sending SIGNAL #%d to %s "
+					 "(epc == 0x%08lx, ra == 0x%08lx, PID == %d)\n",
+					 sig,
+					 current->comm,
+					 (unsigned long) regs->cp0_epc,
+					 (unsigned long) regs->regs[31],
+					 current->pid);
+			printk("%s", dbglasterr_buf);
 
+			if (!embed_break(regs)) {
+				force_sig(sig, current);
+			}
+		}
+#else			
+		{
+			force_sig(sig, current);
+		}
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
 		return;
 	}
-
+#if defined(DEBUG_ON_ERROR_SIGNAL)
+	snprintf(dbglasterr_buf, sizeof(dbglasterr_buf),
+			 "do_fpe: sending SIGFPE to %s "
+			 "(epc == 0x%08lx, ra == 0x%08lx, PID == %d)\n",
+			 current->comm,
+			 (unsigned long) regs->cp0_epc,
+			 (unsigned long) regs->regs[31],
+			 current->pid);
+	printk("%s", dbglasterr_buf);
+
+	if (!embed_break(regs)) {
+		siginfo_t info;
+		
+		if (fcr31 & FPU_CSR_INV_X) {
+			info.si_code = FPE_FLTINV;
+		}
+		else if (fcr31 & FPU_CSR_DIV_X) {
+			info.si_code = FPE_FLTDIV;
+		}
+		else if (fcr31 & FPU_CSR_OVF_X) {
+			info.si_code = FPE_FLTOVF;
+		}
+		else if (fcr31 & FPU_CSR_UDF_X) {
+			info.si_code = FPE_FLTUND;
+		}
+		else if (fcr31 & FPU_CSR_INE_X) {
+			info.si_code = FPE_FLTRES;
+		}
+		else {
+			info.si_code = 0;
+		}
+		info.si_signo = SIGFPE;
+		info.si_errno = 0;
+		info.si_addr = (void *)regs->cp0_epc;
+		
+		force_sig_info(SIGFPE, &info, current);
+	}
+#else
 	force_sig(SIGFPE, current);
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
 }
 
 asmlinkage void do_bp(struct pt_regs *regs)
@@ -678,10 +859,41 @@ asmlinkage void do_bp(struct pt_regs *re
 		info.si_signo = SIGFPE;
 		info.si_errno = 0;
 		info.si_addr = (void __user *) regs->cp0_epc;
+#if defined(DEBUG_ON_ERROR_SIGNAL)
+		snprintf(dbglasterr_buf, sizeof(dbglasterr_buf),
+				 "do_bp: sending SIGFPE (%s) to %s "
+				 "(epc == 0x%08lx, ra == 0x%08lx, PID == %d)\n",
+				 bcode == (BRK_DIVZERO << 10) ? "INTDIV" : "INTOVF",
+				 current->comm,
+				 (unsigned long) regs->cp0_epc,
+				 (unsigned long) regs->regs[31],
+				 current->pid);
+		printk("%s", dbglasterr_buf);
+		
+		if (!embed_break(regs)) {
+			force_sig_info(SIGFPE, &info, current);
+		}
+#else
 		force_sig_info(SIGFPE, &info, current);
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
 		break;
 	default:
+#if defined(DEBUG_ON_ERROR_SIGNAL) 
+		snprintf(dbglasterr_buf, sizeof(dbglasterr_buf),
+				 "do_bp: sending SIGTRAP to %s "
+				 "(epc == 0x%08lx, ra == 0x%08lx, PID == %d)\n",
+				 current->comm,
+				 (unsigned long) regs->cp0_epc,
+				 (unsigned long) regs->regs[31],
+				 current->pid);
+		printk("%s", dbglasterr_buf);
+
+		if (!embed_break(regs)) {
+			force_sig(SIGTRAP, current);
+		}
+#else
 		force_sig(SIGTRAP, current);
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
 	}
 }
 
@@ -715,10 +927,41 @@ asmlinkage void do_tr(struct pt_regs *re
 		info.si_signo = SIGFPE;
 		info.si_errno = 0;
 		info.si_addr = (void __user *) regs->cp0_epc;
+#if defined(DEBUG_ON_ERROR_SIGNAL) 
+		snprintf(dbglasterr_buf, sizeof(dbglasterr_buf),
+				 "do_tr: sending SIGFPE (%s) to %s "
+				 "(epc == 0x%08lx, ra == 0x%08lx, PID == %d)\n",
+				 tcode == FPE_INTDIV ? "INTDIV" : "INTOVF",
+				 current->comm,
+				 (unsigned long) regs->cp0_epc,
+				 (unsigned long) regs->regs[31],
+				 current->pid);
+		printk("%s", dbglasterr_buf);
+		
+		if (!embed_break(regs)) {
+			force_sig_info(SIGFPE, &info, current);
+		}
+#else
 		force_sig_info(SIGFPE, &info, current);
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
 		break;
 	default:
+#if defined(DEBUG_ON_ERROR_SIGNAL) 
+		snprintf(dbglasterr_buf, sizeof(dbglasterr_buf),
+				 "do_tr: sending SIGTRAP to %s "
+				 "(epc == 0x%08lx, ra == 0x%08lx, PID == %d)\n",
+				 current->comm,
+				 (unsigned long) regs->cp0_epc,
+				 (unsigned long) regs->regs[31],
+				 current->pid);
+		printk("%s", dbglasterr_buf);
+
+		if (!embed_break(regs)) {
+			force_sig(SIGTRAP, current);
+		}
+#else
 		force_sig(SIGTRAP, current);
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
 	}
 }
 
@@ -732,8 +975,28 @@ asmlinkage void do_ri(struct pt_regs *re
 
 	if (!simulate_rdhwr(regs))
 		return;
+#if defined(DEBUG_ON_ERROR_SIGNAL) 
+	snprintf(dbglasterr_buf, sizeof(dbglasterr_buf),
+			 "do_ri: sending SIGILL to %s "
+			 "(epc == 0x%08lx, ra == 0x%08lx, PID == %d)\n",
+			 current->comm,
+			 (unsigned long) regs->cp0_epc,
+			 (unsigned long) regs->regs[31],
+			 current->pid);
+	printk("%s", dbglasterr_buf);
+
+	if (!embed_break(regs)) {
+		siginfo_t info;
+		info.si_code = ILL_ILLOPC;
+		info.si_signo = SIGILL;
+		info.si_errno = 0;
+		info.si_addr = (void *)regs->cp0_epc;
 
+		force_sig_info(SIGILL, &info, current);
+	}
+#else
 	force_sig(SIGILL, current);
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
 }
 
 asmlinkage void do_cpu(struct pt_regs *regs)
@@ -772,7 +1035,25 @@ asmlinkage void do_cpu(struct pt_regs *r
 			int sig = fpu_emulator_cop1Handler(0, regs,
 						&current->thread.fpu.soft);
 			if (sig)
-				force_sig(sig, current);
+#if defined(DEBUG_ON_ERROR_SIGNAL)
+			{
+				snprintf(dbglasterr_buf, sizeof(dbglasterr_buf),
+						 "do_cpu: sending SIGNAL #%d to %s "
+						 "(epc == 0x%08lx, ra == 0x%08lx, PID == %d)\n",
+						 sig,
+						 current->comm,
+						 (unsigned long) regs->cp0_epc,
+						 (unsigned long) regs->regs[31],
+						 current->pid);
+				printk("%s", dbglasterr_buf);
+
+				if (!embed_break(regs)) {
+					force_sig(sig, current);
+				}
+			}
+#else
+			force_sig(sig, current);
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
 		}
 
 		return;
@@ -781,13 +1062,55 @@ asmlinkage void do_cpu(struct pt_regs *r
 	case 3:
 		break;
 	}
+#if defined(DEBUG_ON_ERROR_SIGNAL)
+	snprintf(dbglasterr_buf, sizeof(dbglasterr_buf),
+			 "do_cpu: sending SIGILL to %s "
+			 "(epc == 0x%08lx, ra == 0x%08lx, PID == %d)\n",
+			 current->comm,
+			 (unsigned long) regs->cp0_epc,
+			 (unsigned long) regs->regs[31],
+			 current->pid);
+	printk("%s", dbglasterr_buf);
+
+	if (!embed_break(regs)) {
+		siginfo_t info;
+		info.si_code = ILL_ILLOPC;
+		info.si_signo = SIGILL;
+		info.si_errno = 0;
+		info.si_addr = (void *)regs->cp0_epc;
 
+		force_sig_info(SIGILL, &info, current);
+	}
+#else
 	force_sig(SIGILL, current);
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
+
 }
 
 asmlinkage void do_mdmx(struct pt_regs *regs)
 {
+#if defined(DEBUG_ON_ERROR_SIGNAL)
+	snprintf(dbglasterr_buf, sizeof(dbglasterr_buf),
+			 "do_mdmx: sending SIGILL to %s "
+			 "(epc == 0x%08lx, ra == 0x%08lx, PID == %d)\n",
+			 current->comm,
+			 (unsigned long) regs->cp0_epc,
+			 (unsigned long) regs->regs[31],
+			 current->pid);
+	printk("%s", dbglasterr_buf);
+
+	if (!embed_break(regs)) {
+		siginfo_t info;
+		info.si_code = ILL_ILLOPC;
+		info.si_signo = SIGILL;
+		info.si_errno = 0;
+		info.si_addr = (void *)regs->cp0_epc;
+
+		force_sig_info(SIGILL, &info, current);
+	}
+#else
 	force_sig(SIGILL, current);
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
 }
 
 asmlinkage void do_watch(struct pt_regs *regs)
@@ -819,7 +1142,28 @@ asmlinkage void do_dsp(struct pt_regs *r
 	if (cpu_has_dsp)
 		panic("Unexpected DSP exception\n");
 
+#if defined(DEBUG_ON_ERROR_SIGNAL) 
+	snprintf(dbglasterr_buf, sizeof(dbglasterr_buf),
+			 "do_dsp: sending SIGILL to %s "
+			 "(epc == 0x%08lx, ra == 0x%08lx, PID == %d)\n",
+			 current->comm,
+			 (unsigned long) regs->cp0_epc,
+			 (unsigned long) regs->regs[31],
+			 current->pid);
+	printk("%s", dbglasterr_buf);
+
+	if (!embed_break(regs)) {
+		siginfo_t info;
+		info.si_code = ILL_ILLOPC;
+		info.si_signo = SIGILL;
+		info.si_errno = 0;
+		info.si_addr = (void *)regs->cp0_epc;
+
+		force_sig_info(SIGILL, &info, current);
+	}
+#else
 	force_sig(SIGILL, current);
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
 }
 
 asmlinkage void do_reserved(struct pt_regs *regs)
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/arch/mips/kernel/unaligned.c stblinux-2.6.12/arch/mips/kernel/unaligned.c
--- stblinux-2.6.12.org/arch/mips/kernel/unaligned.c	2007-02-03 05:41:07.000000000 +0900
+++ stblinux-2.6.12/arch/mips/kernel/unaligned.c	2008-05-28 13:51:26.000000000 +0900
@@ -473,20 +473,93 @@ fault:
 		return 1;
 
 	die_if_kernel ("Unhandled kernel unaligned access", regs);
+#if defined(DEBUG_ON_ERROR_SIGNAL) 
+	snprintf(dbglasterr_buf, sizeof(dbglasterr_buf),
+			 "emulate_load_store_insn: sending SIGSEGV to %s "
+			 "(epc == 0x%08lx, ra == 0x%08lx, PID == %d)\n",
+			 current->comm,
+			 (unsigned long) regs->cp0_epc,
+			 (unsigned long) regs->regs[31],
+			 current->pid);
+	printk("%s", dbglasterr_buf);
+
+	if (embed_break(regs)) {
+		if (!delay_slot(regs)) {
+			regs->cp0_epc -= 4;
+		}
+	} else {
+		siginfo_t info;
+		info.si_code = SEGV_MAPERR;
+		info.si_signo = SIGSEGV;
+		info.si_errno = 0;
+		info.si_addr = (void *)regs->cp0_epc;
+		
+		send_sig_info(SIGSEGV, &info, current);
+	}
+#else /* defined(DEBUG_ON_ERROR_SIGNAL) */
 	send_sig(SIGSEGV, current, 1);
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
 
-	return 0;
+	return 0; 
 
 sigbus:
 	die_if_kernel("Unhandled kernel unaligned access", regs);
+#if defined(DEBUG_ON_ERROR_SIGNAL) 
+	snprintf(dbglasterr_buf, sizeof(dbglasterr_buf),
+			 "emulate_load_store_insn: sending SIGBUS to %s "
+			 "(epc == 0x%08lx, ra == 0x%08lx, PID == %d)\n",
+			 current->comm,
+			 (unsigned long) regs->cp0_epc,
+			 (unsigned long) regs->regs[31],
+			 current->pid);
+	printk("%s", dbglasterr_buf);
+	
+	if (embed_break(regs)) {
+		if (!delay_slot(regs)) {
+			regs->cp0_epc -= 4;
+		}
+	} else {
+		siginfo_t info;
+		info.si_code = BUS_ADRALN;
+		info.si_signo = SIGBUS;
+		info.si_errno = 0;
+		info.si_addr = (void *)regs->cp0_epc;
+		
+		send_sig_info(SIGBUS, &info, current);
+	}
+#else /* defined(DEBUG_ON_ERROR_SIGNAL) */	
 	send_sig(SIGBUS, current, 1);
-
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
 	return 0;
 
 sigill:
 	die_if_kernel("Unhandled kernel unaligned access or invalid instruction", regs);
-	send_sig(SIGILL, current, 1);
+#if defined(DEBUG_ON_ERROR_SIGNAL) 
+	snprintf(dbglasterr_buf, sizeof(dbglasterr_buf),
+			 "emulate_load_store_insn: sending SIGILL to %s "
+			 "(epc == 0x%08lx, ra == 0x%08lx, PID == %d)\n",
+			 current->comm,
+			 (unsigned long) regs->cp0_epc,
+			 (unsigned long) regs->regs[31],
+			 current->pid);
+	printk("%s", dbglasterr_buf);
+
+	if (embed_break(regs)) {
+		if (!delay_slot(regs)) {
+			regs->cp0_epc -= 4;
+		}
+	} else {
+		siginfo_t info;
+		info.si_code = ILL_ILLOPC;
+		info.si_signo = SIGILL;
+		info.si_errno = 0;
+		info.si_addr = (void *)regs->cp0_epc;
 
+		send_sig_info(SIGILL, &info, current);
+	}
+#else /* defined(DEBUG_ON_ERROR_SIGNAL) */
+	send_sig(SIGILL, current, 1);
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
 	return 0;
 }
 
@@ -542,7 +615,28 @@ asmlinkage void do_ade(struct pt_regs *r
 
 sigbus:
 	die_if_kernel("Kernel unaligned instruction access", regs);
+#if defined(DEBUG_ON_ERROR_SIGNAL) 
+	snprintf(dbglasterr_buf, sizeof(dbglasterr_buf),
+			 "do_abe: sending SIGBUS to %s "
+			 "(epc == 0x%08lx, ra == 0x%08lx, PID == %d)\n",
+			 current->comm,
+			 (unsigned long) regs->cp0_epc,
+			 (unsigned long) regs->regs[31],
+			 current->pid);
+	printk("%s", dbglasterr_buf);
+	
+	if (!embed_break(regs)) {
+		siginfo_t info;
+		info.si_code = BUS_ADRALN;
+		info.si_signo = SIGBUS;
+		info.si_errno = 0;
+		info.si_addr = (void *)regs->cp0_epc;
+			
+		force_sig_info(SIGBUS, &info, current);
+	}
+#else/* defined(DEBUG_ON_ERROR_SIGNAL) */
 	force_sig(SIGBUS, current);
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
 
 	/*
 	 * XXX On return from the signal handler we should advance the epc
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/arch/mips/lib/memcpy.S stblinux-2.6.12/arch/mips/lib/memcpy.S
--- stblinux-2.6.12.org/arch/mips/lib/memcpy.S	2007-02-03 05:41:08.000000000 +0900
+++ stblinux-2.6.12/arch/mips/lib/memcpy.S	2008-05-28 13:51:38.000000000 +0900
@@ -170,9 +170,143 @@
  * memcpy sets v0 to dst.
  */
 	.align	5
+
+#if defined(CONFIG_MIPS_BRCM97XXX)
+
+/* replace memcpy but not __copy_user */
+
+#if !defined(CONFIG_CPU_LITTLE_ENDIAN)
+#  define LWHI	lwl		/* high part is left in big-endian	*/
+#  define SWHI	swl		/* high part is left in big-endian	*/
+#  define LWLO	lwr		/* low part is right in big-endian	*/
+#  define SWLO	swr		/* low part is right in big-endian	*/
+#else
+#  define LWHI	lwr		/* high part is right in little-endian	*/
+#  define SWHI	swr		/* high part is right in little-endian	*/
+#  define LWLO	lwl		/* low part is left in little-endian	*/
+#  define SWLO	swl		/* low part is left in little-endian	*/
+#endif
+
+#define L(x) __memcpy_##x
+
+LEAF(memcpy)					/* a0=dst a1=src a2=len */
+__memcpy:
+	slti	t0, a2, 8		# Less than 8?
+	bne	t0, zero, L(last8)
+	move	v0, a0			# Setup exit value before too late
+
+	xor	t0, a1, a0		# Find a0/a1 displacement
+	andi	t0, 0x3
+	bne	t0, zero, L(shift)	# Go handle the unaligned case
+	subu	t1, zero, a1
+	andi	t1, 0x3			# a0/a1 are aligned, but are we
+	beq	t1, zero, L(chk8w)	#  starting in the middle of a word?
+	subu	a2, t1
+	LWHI	t0, 0(a1)		# Yes we are... take care of that
+	addu	a1, t1
+	SWHI	t0, 0(a0)
+	addu	a0, t1
+
+L(chk8w):	
+	andi	t0, a2, 0x1f		# 32 or more bytes left?
+	beq	t0, a2, L(chk1w)
+	subu	a3, a2, t0		# Yes
+
+	addu	a3, a0			# a3 = end address of loop
+	subu    a3, a3, 0x10
+	.align 4
+	move	a2, t0			# a2 = what will be left after loop
+
+    	lw	t0,  0(a1)		# Loop taking 8 words at a time
+	sw	t0,  0(a0)
+L(lop8w):	
+
+	lw	t1,  0x10(a1)
+#if ! defined(CONFIG_MIPS_BCM7400B0)
+	/* pref usage on 7400B0 is TBD */
+    	pref    31,  0x10(a0)
+#endif
+	lw	t2,  0x4(a1)
+	lw	t3,  0x8(a1)
+	lw	t4, 0xc(a1)
+	sw	t1,  0x10(a0)
+	sw	t2,  0x4(a0)
+	sw	t3,  0x8(a0)
+	sw	t4, 0xc(a0)
+	add     a0, a0, 0x10
+	bne	a0, a3, L(lop8w)
+        add     a1, a1, 0x10
+        lw      t2,  0x4(a1)
+        lw      t3,  0x8(a1)
+        lw      t4, 0xc(a1)
+        sw      t2,  0x4(a0)
+        sw      t3,  0x8(a0)
+        sw      t4, 0xc(a0)
+	add	a1, a1, 0x10
+	add	a0, a0, 0x10
+
+L(chk1w):	
+	andi	t0, a2, 0x3		# 4 or more bytes left?
+	beq	t0, a2, L(last8)
+	subu	a3, a2, t0		# Yes, handle them one word at a time
+	addu	a3, a1			# a3 again end address
+	move	a2, t0
+L(lop1w):	
+	lw	t0, 0(a1)
+	addiu	a0, 4
+	addiu	a1, 4
+	bne	a1, a3, L(lop1w)
+	sw	t0, -4(a0)
+
+L(last8):	
+	blez	a2, L(lst8e)		# Handle last 8 bytes, one at a time
+	addu	a3, a2, a1
+L(lst8l):	
+	lb	t0, 0(a1)
+	addiu	a0, 1
+	addiu	a1, 1
+	bne	a1, a3, L(lst8l)
+	sb	t0, -1(a0)
+L(lst8e):	
+	jr	ra			# Bye, bye
+	nop
+
+L(shift):	
+	subu	a3, zero, a0		# Src and Dest unaligned 
+	andi	a3, 0x3			#  (unoptimized case...)
+	beq	a3, zero, L(shft1)
+	subu	a2, a3			# a2 = bytes left
+	LWHI	t0, 0(a1)		# Take care of first odd part
+	LWLO	t0, 3(a1)
+	addu	a1, a3
+	SWHI	t0, 0(a0)
+	addu	a0, a3
+L(shft1):	
+	andi	t0, a2, 0x3
+	subu	a3, a2, t0
+	addu	a3, a1
+L(shfth):	
+	LWHI	t1, 0(a1)		# Limp through, word by word
+	LWLO	t1, 3(a1)
+	addiu	a0, 4
+	addiu	a1, 4
+	bne	a1, a3, L(shfth)
+	sw	t1, -4(a0)
+	b	L(last8)		# Handle anything which may be left
+	move	a2, t0
+
+#undef PREF
+#define PREF(x, y)
+
+	.align	4
+
+#else /* CONFIG_MIPS_BRCM97XXX */
+
 LEAF(memcpy)					/* a0=dst a1=src a2=len */
 	move	v0, dst				/* return value */
 __memcpy:
+
+#endif /* CONFIG_MIPS_BRCM97XXX */
 FEXPORT(__copy_user)
 	/*
 	 * Note: dst & src may be unaligned, len may be 0
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/arch/mips/math-emu/dsemul.c stblinux-2.6.12/arch/mips/math-emu/dsemul.c
--- stblinux-2.6.12.org/arch/mips/math-emu/dsemul.c	2007-02-03 05:41:08.000000000 +0900
+++ stblinux-2.6.12/arch/mips/math-emu/dsemul.c	2008-05-28 13:51:52.000000000 +0900
@@ -157,8 +157,28 @@ int do_dsemulret(struct pt_regs *xcp)
 #endif
 	if (__get_user(epc, &fr->epc)) {		/* Saved EPC */
 		/* This is not a good situation to be in */
-		force_sig(SIGBUS, current);
+#if defined(DEBUG_ON_ERROR_SIGNAL)
+		snprintf(dbglasterr_buf, sizeof(dbglasterr_buf),
+				 "do_dsemulret: sending SIGBUS to %s"
+				 "(epc == 0x%08lx, ra == 0x%08lx, PID == %d)\n",
+				 current->comm,
+				 (unsigned long) xcp->cp0_epc,
+				 (unsigned long) xcp->regs[31],
+				 current->pid);
+		printk("%s", dbglasterr_buf);
 
+		if (!embed_break(xcp)) {
+			siginfo_t info;
+			info.si_code = BUS_ADRERR;
+			info.si_signo = SIGBUS;
+			info.si_errno = 0;
+			info.si_addr = (void *)xcp->cp0_epc;
+			
+			force_sig_info(SIGBUS, &info, current);
+		}
+#else
+		force_sig(SIGBUS, current);
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */ 
 		return 0;
 	}
 
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/arch/mips/mm/c-r4k.c stblinux-2.6.12/arch/mips/mm/c-r4k.c
--- stblinux-2.6.12.org/arch/mips/mm/c-r4k.c	2007-02-03 05:41:09.000000000 +0900
+++ stblinux-2.6.12/arch/mips/mm/c-r4k.c	2008-05-28 13:51:50.000000000 +0900
@@ -1290,6 +1290,7 @@ static void __init probe_pcache(void)
 		break;
 	}
 
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("Primary instruction cache %ldkB, %s, %s, linesize %d bytes.\n",
 	       icache_size >> 10,
 	       cpu_has_vtag_icache ? "virtually tagged" : "physically tagged",
@@ -1297,6 +1298,7 @@ static void __init probe_pcache(void)
 
 	printk("Primary data cache %ldkB, %s, linesize %d bytes.\n",
 	       dcache_size >> 10, way_string[c->dcache.ways], c->dcache.linesz);
+#endif
 }
 
 /*
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/arch/mips/mm/fault.c stblinux-2.6.12/arch/mips/mm/fault.c
--- stblinux-2.6.12.org/arch/mips/mm/fault.c	2007-02-03 05:41:10.000000000 +0900
+++ stblinux-2.6.12/arch/mips/mm/fault.c	2008-05-28 13:51:50.000000000 +0900
@@ -142,7 +142,28 @@ bad_area_nosemaphore:
 		info.si_errno = 0;
 		/* info.si_code has been set above */
 		info.si_addr = (void __user *) address;
+
+#if defined(DEBUG_ON_ERROR_SIGNAL)
+		snprintf(dbglasterr_buf, sizeof(dbglasterr_buf),
+				 "do_page_fault: sending SIGSEGV to %s"
+				 " for illegal %s 0x%08lx\n"
+				 "(epc == 0x%08lx, ra == 0x%08lx, PID == %d)\n",
+				 tsk->comm,
+				 write ? "write access to" : "read access from",
+				 address,
+				 (unsigned long) regs->cp0_epc,
+				 (unsigned long) regs->regs[31],
+				 tsk->pid);
+		printk("%s", dbglasterr_buf);
+
+		info.si_addr = (void *)regs->cp0_epc;
+
+		if (!embed_break(regs)) {
+			force_sig_info(SIGSEGV, &info, tsk);
+		}
+#else
 		force_sig_info(SIGSEGV, &info, tsk);
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
 		return;
 	}
 
@@ -198,8 +219,25 @@ do_sigbus:
 	info.si_errno = 0;
 	info.si_code = BUS_ADRERR;
 	info.si_addr = (void __user *) address;
+#if defined(DEBUG_ON_ERROR_SIGNAL)
+	snprintf(dbglasterr_buf, sizeof(dbglasterr_buf),
+			 "do_page_fault: sending SIGBUS to %s"
+			 " for illegal %s 0x%08lx\n"
+			 "(epc == 0x%08lx, ra == 0x%08lx, PID == %d)\n",
+			 tsk->comm,
+			 write ? "write access to" : "read access from",
+			 address,
+			 (unsigned long) regs->cp0_epc,
+			 (unsigned long) regs->regs[31],
+			 tsk->pid);
+	printk("%s", dbglasterr_buf);
+	info.si_addr = regs->cp0_epc;
+	if (!embed_break(regs)) {
+		force_sig_info(SIGBUS, &info, tsk);
+	}
+#else
 	force_sig_info(SIGBUS, &info, tsk);
-
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
 	return;
 
 vmalloc_fault:
@@ -241,3 +279,14 @@ vmalloc_fault:
 		return;
 	}
 }
+
+#if defined(DEBUG_ON_ERROR_SIGNAL) 
+
+unsigned char dbglasterr_buf[1024];
+
+int embed_break(struct pt_regs *regs)
+{ /* for dummy  */
+	return 0;
+}
+
+#endif /* defined(DEBUG_ON_ERROR_SIGNAL) */
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/arch/mips/mm/tlb-r4k.c stblinux-2.6.12/arch/mips/mm/tlb-r4k.c
--- stblinux-2.6.12.org/arch/mips/mm/tlb-r4k.c	2007-02-03 05:41:10.000000000 +0900
+++ stblinux-2.6.12/arch/mips/mm/tlb-r4k.c	2008-05-28 13:51:50.000000000 +0900
@@ -742,17 +742,27 @@ void __init tlb_init(void)
 #ifdef CONFIG_MIPS_BCM3560A0
 	// do a pci config read for USB only on A0 chip.
 	*((volatile unsigned long *)0xf0600004) = PCI_ENABLE+PCI_IDSEL(PCI_DEVICE_ID_USB)+PCI_FNCSEL(0); 
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("$$$$$$$$$$usb fn0 dev id %08x\n", *((volatile unsigned long *)0xf0600008));
+#endif
 	*((volatile unsigned long *)0xf0600004) = PCI_ENABLE+PCI_IDSEL(PCI_DEVICE_ID_USB)+PCI_FNCSEL(1); 
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("$$$$$$$$$$usb fn1 dev id %08x\n", *((volatile unsigned long *)0xf0600008));
+#endif
 	*((volatile unsigned long *)0xf0600004) = PCI_ENABLE+PCI_IDSEL(PCI_DEVICE_ID_USB)+PCI_FNCSEL(2); 
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("$$$$$$$$$$usb fn2 dev id %08x\n", *((volatile unsigned long *)0xf0600008));
 #endif
+#endif
 	
 	*((volatile unsigned long *)0xf0600004) = PCI_ENABLE+PCI_IDSEL(PCI_DEVICE_ID_1394)+PCI_FNCSEL(0); 
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("$$$$$$$$$$1394 dev id %08x\n", *((volatile unsigned long *)0xf0600008));
+#endif
 	*((volatile unsigned long *)0xf0600004) = PCI_ENABLE+PCI_IDSEL(PCI_DEVICE_ID_EXT)+PCI_FNCSEL(0);
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("$$$$$$$$$$external dev id %08x\n", *((volatile unsigned long *)0xf0600008));
+#endif
 }
 
 #elif defined( CONFIG_MIPS_BCM7038A0 ) 
@@ -792,11 +802,17 @@ void __init tlb_init(void)
 
 	// do a pci config read.
 	*((volatile unsigned long *)0xe0600004) = PCI_DEV_NUM_7041;
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("$$$$$$$$$$7041 dev id %08x\n", *((volatile unsigned long *)0xe0600008));
+#endif
 	*((volatile unsigned long *)0xe0600004) = PCI_DEV_NUM_3250;
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("$$$$$$$$$$3250 dev id %08x\n", *((volatile unsigned long *)0xe0600008));
+#endif
 	*((volatile unsigned long *)0xe0600004) = PCI_DEV_NUM_SATA;
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("$$$$$$$$$$SATA dev id %08x\n", *((volatile unsigned long *)0xe0600008));
+#endif
 
 #elif defined( CONFIG_MIPS_BCM7038B0)
 	local_init_tlb();
@@ -836,13 +852,21 @@ void __init tlb_init(void)
 
 	// do a pci config read.
 	*((volatile unsigned long *)0xf0600004) = PCI_DEV_NUM_7041;
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("$$$$$$$$$$7041 dev id %08x\n", *((volatile unsigned long *)0xf0600008));
+#endif
 	*((volatile unsigned long *)0xf0600004) = PCI_DEV_NUM_3250;
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("$$$$$$$$$$3250 dev id %08x\n", *((volatile unsigned long *)0xf0600008));
+#endif
 	*((volatile unsigned long *)0xf0600004) = PCI_DEV_NUM_SATA;
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("$$$$$$$$$$SATA dev id %08x\n", *((volatile unsigned long *)0xf0600008));
+#endif
 	*((volatile unsigned long *)0xf0600004) = PCI_DEV_NUM_EXT;
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("$$$$$$$$$$external dev id %08x\n", *((volatile unsigned long *)0xf0600008));
+#endif
 
 #elif defined( CONFIG_MIPS_BCM7038C0)
 	local_init_tlb();
@@ -882,11 +906,17 @@ void __init tlb_init(void)
 
 	// do a pci config read.
 	*((volatile unsigned long *)0xf0600004) = PCI_DEV_NUM_7041;
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("$$$$$$$$$$7041 dev id %08x\n", *((volatile unsigned long *)0xf0600008));
+#endif
 	*((volatile unsigned long *)0xf0600004) = PCI_DEV_NUM_3250;
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("$$$$$$$$$$3250 dev id %08x\n", *((volatile unsigned long *)0xf0600008));
+#endif
 	*((volatile unsigned long *)0xf0600004) = PCI_DEV_NUM_EXT;
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("$$$$$$$$$$external dev id %08x\n", *((volatile unsigned long *)0xf0600008));
+#endif
 
 /* 2nd PCI Bridge for SATA on 7038C0 */
 /*
@@ -955,7 +985,9 @@ void __init tlb_init(void)
 
 		// do a pci config read.
 	*((volatile unsigned long *)0xb0500204) = PCI_DEV_NUM_SATA;
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("$$$$$$$$$$SATA dev id %08x\n", *((volatile unsigned long *)0xb0500208));
+#endif
 
 
 #elif defined (CONFIG_MIPS_BCM7329)
@@ -1071,11 +1103,17 @@ printk("$$$PBus stat after %08x\n", *((v
 
 	// do a pci config read.
 	*((volatile unsigned long *)0xf0600004) = PCI_DEV_NUM_1394;
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("$$$$$$$$$$ 1394 dev id %08x\n", *((volatile unsigned long *)0xf0600008));
+#endif
 	*((volatile unsigned long *)0xf0600004) = PCI_DEV_NUM_MINI;
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("$$$$$$$$$$ mini slot dev id %08x\n", *((volatile unsigned long *)0xf0600008));
+#endif
 	*((volatile unsigned long *)0xf0600004) = PCI_DEV_NUM_EXT;
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("$$$$$$$$$$ external dev id %08x\n", *((volatile unsigned long *)0xf0600008));
+#endif
 
 /* 2nd PCI Bridge for SATA on 7038C0 */
 /*
@@ -1144,7 +1182,9 @@ printk("$$$PBus stat after %08x\n", *((v
 
 		// do a pci config read.
 	*((volatile unsigned long *)0xb0500204) = PCI_DEV_NUM_SATA;
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("$$$$$$$$$$SATA dev id %08x\n", *((volatile unsigned long *)0xb0500208));
+#endif
 	
 
 #elif ((defined( CONFIG_MIPS_BCM7401) || defined( CONFIG_MIPS_BCM7402A0) \
@@ -1187,11 +1227,17 @@ printk("$$$PBus stat after %08x\n", *((v
 
 	// do a pci config read.
 	*((volatile unsigned long *)0xf0600004) = PCI_DEV_NUM_1394;
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("$$$$$$$$$$ 1394 dev id %08x\n", *((volatile unsigned long *)0xf0600008));
+#endif
 	*((volatile unsigned long *)0xf0600004) = PCI_DEV_NUM_MINI;
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("$$$$$$$$$$ mini slot dev id %08x\n", *((volatile unsigned long *)0xf0600008));
+#endif
 	*((volatile unsigned long *)0xf0600004) = PCI_DEV_NUM_EXT;
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("$$$$$$$$$$ external dev id %08x\n", *((volatile unsigned long *)0xf0600008));
+#endif
 
 /* 2nd PCI Bridge for SATA on 7038C0 */
 /*
@@ -1261,7 +1307,9 @@ printk("$$$PBus stat after %08x\n", *((v
 
 		// do a pci config read.
 	*((volatile unsigned long *)0xb0500204) = PCI_DEV_NUM_SATA;
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("$$$$$$$$$$SATA dev id %08x\n", *((volatile unsigned long *)0xb0500208));
+#endif
 
   #endif /* !7402 */
 #endif /* 7401 */
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/arch/mips/mm/tlbex.c stblinux-2.6.12/arch/mips/mm/tlbex.c
--- stblinux-2.6.12.org/arch/mips/mm/tlbex.c	2007-02-03 05:41:10.000000000 +0900
+++ stblinux-2.6.12/arch/mips/mm/tlbex.c	2008-05-28 13:51:50.000000000 +0900
@@ -731,8 +731,11 @@ static void __init build_r3000_tlb_refil
 	if (p > tlb_handler + 32)
 		panic("TLB refill handler space exceeded");
 
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("Synthesized TLB refill handler (%u instructions).\n",
 	       (unsigned int)(p - tlb_handler));
+#endif
+
 #ifdef DEBUG_TLB
 	{
 		int i;
@@ -1238,8 +1241,10 @@ static void __init build_r4000_tlb_refil
 #endif /* CONFIG_MIPS64 */
 
 	resolve_relocs(relocs, labels);
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("Synthesized TLB refill handler (%u instructions).\n",
 	       final_len);
+#endif
 
 #ifdef DEBUG_TLB
 	{
@@ -1508,8 +1513,10 @@ static void __init build_r3000_tlb_load_
 		panic("TLB load handler fastpath space exceeded");
 
 	resolve_relocs(relocs, labels);
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("Synthesized TLB load handler fastpath (%u instructions).\n",
 	       (unsigned int)(p - handle_tlbl));
+#endif
 
 #ifdef DEBUG_TLB
 	{
@@ -1548,8 +1555,10 @@ static void __init build_r3000_tlb_store
 		panic("TLB store handler fastpath space exceeded");
 
 	resolve_relocs(relocs, labels);
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("Synthesized TLB store handler fastpath (%u instructions).\n",
 	       (unsigned int)(p - handle_tlbs));
+#endif
 
 #ifdef DEBUG_TLB
 	{
@@ -1588,8 +1597,10 @@ static void __init build_r3000_tlb_modif
 		panic("TLB modify handler fastpath space exceeded");
 
 	resolve_relocs(relocs, labels);
+//#ifdef KERNEL_BOOT_LOG_ON
 	printk("Synthesized TLB modify handler fastpath (%u instructions).\n",
 	       (unsigned int)(p - handle_tlbm));
+//#endif
 
 #ifdef DEBUG_TLB
 	{
@@ -1680,8 +1691,10 @@ static void __init build_r4000_tlb_load_
 		panic("TLB load handler fastpath space exceeded");
 
 	resolve_relocs(relocs, labels);
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("Synthesized TLB load handler fastpath (%u instructions).\n",
 	       (unsigned int)(p - handle_tlbl));
+#endif
 
 #ifdef DEBUG_TLB
 	{
@@ -1719,8 +1732,10 @@ static void __init build_r4000_tlb_store
 		panic("TLB store handler fastpath space exceeded");
 
 	resolve_relocs(relocs, labels);
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("Synthesized TLB store handler fastpath (%u instructions).\n",
 	       (unsigned int)(p - handle_tlbs));
+#endif
 
 #ifdef DEBUG_TLB
 	{
@@ -1759,8 +1774,10 @@ static void __init build_r4000_tlb_modif
 		panic("TLB modify handler fastpath space exceeded");
 
 	resolve_relocs(relocs, labels);
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("Synthesized TLB modify handler fastpath (%u instructions).\n",
 	       (unsigned int)(p - handle_tlbm));
+#endif
 
 #ifdef DEBUG_TLB
 	{
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/drivers/char/brcmserial.c stblinux-2.6.12/drivers/char/brcmserial.c
--- stblinux-2.6.12.org/drivers/char/brcmserial.c	2007-02-03 05:42:11.000000000 +0900
+++ stblinux-2.6.12/drivers/char/brcmserial.c	2008-05-28 13:53:07.000000000 +0900
@@ -590,7 +590,7 @@ static _INLINE_ void receive_chars(struc
                 }
                 if (ch == 0xb) /* CTRL-K breakpoint */
                 {
-                   printk("\nkgdb enter> Please Start a Gdb Session To UART-B With 115200");
+                   printk("\nkgdb enter> Please Start a Gdb Session To UART-B With 38400");
 		           if ( kgdb_detached ) {
 			           kgdb_detached = 0;
 			           set_debug_traps();
@@ -1278,7 +1278,7 @@ static void change_speed(struct async_st
 /* Determine divisor based on baud rate */
 	baud = tty_get_baud_rate(info->tty);
 	if (!baud)
-		baud = 115200;	/* B0 transition handled in rs_set_termios */
+		baud = 38400;	/* B0 transition handled in rs_set_termios */
 	baud_base = info->state->baud_base;
 	
 	quot = baud_base / baud;	/* RYH */
@@ -1290,14 +1290,14 @@ static void change_speed(struct async_st
 		info->tty->termios->c_cflag |= (old_termios->c_cflag & CBAUD);
 		baud = tty_get_baud_rate(info->tty);
 		if (!baud)
-			baud = 115200;
+			baud = 38400;
 		else if (baud)
 			quot = baud_base / baud;
 	}
 
-	/* As a last resort, if the quotient is zero, default to 115200 bps */
+	/* As a last resort, if the quotient is zero, default to 38400 bps */
 	if (!quot)
-		quot = baud_base / 115200;
+		quot = baud_base / 38400;
 	
 /* printk("BAUD : %d      QUOT : %d\n", baud, quot);  RYH */
 
@@ -2731,7 +2731,7 @@ static int __init rs_init(void)
 	serial_driver->subtype = SERIAL_TYPE_NORMAL;
 	serial_driver->init_termios = tty_std_termios;
 	serial_driver->init_termios.c_cflag =
-		B115200 | CS8 | CREAD | CLOCAL;
+		B38400 | CS8 | CREAD | CLOCAL;
 	serial_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS;
 	serial_driver->refcount = 0;
 	serial_driver->ttys = serial_table;
@@ -3031,7 +3031,7 @@ static int __init brcm_serial_console_se
 	static struct async_struct *info;
 	struct serial_state *state;
 	unsigned cval = (UART_TE|UART_RE);
-	int	baud = 115200;
+	int	baud = 38400;
 	int	bits = 8;
 	int	parity = 'n';
 	int	cflag = CREAD | CLOCAL;
@@ -3172,11 +3172,12 @@ static int __init brcm_serial_console_in
 {
 	unsigned long flags;
 // printk will do the right thing even with console unitialized.	
-printk("################## brcm_serial_console_init, sercon=%p\n", &sercons);
-	
+#ifdef KERNEL_BOOT_LOG_ON
+	printk("################## brcm_serial_console_init, sercon=%p\n", &sercons);
+#endif	
 	register_console(&sercons);
 	// New in 2.6.8: Without this we will get /dev/tty0 instead.
-	add_preferred_console(sercons.name, 0, "115200");
+	add_preferred_console(sercons.name, 0, "38400");
 
 
 #if 0 //defined( CONFIG_MIPS_BCM7401B0 ) && defined(  CONFIG_SERIAL_8250 )
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/drivers/mtd/maps/bcm9xxxx-flash.c stblinux-2.6.12/drivers/mtd/maps/bcm9xxxx-flash.c
--- stblinux-2.6.12.org/drivers/mtd/maps/bcm9xxxx-flash.c	2007-02-03 05:43:44.000000000 +0900
+++ stblinux-2.6.12/drivers/mtd/maps/bcm9xxxx-flash.c	2008-05-28 13:45:52.000000000 +0900
@@ -217,12 +217,37 @@ static struct mtd_partition bcm9XXXX_par
       defined( CONFIG_MIPS_BCM7401 ) || defined( CONFIG_MIPS_BCM7402 ) || \
       defined( CONFIG_MIPS_BCM7403 ) || defined( CONFIG_MIPS_BCM7118 ) 
 	
-#define DEFAULT_SIZE_MB 32 /* 32MB flash */
-	{ name: "rootfs",	offset: 0,		    size: 28*1024*1024 },
-	{ name: "cfe",	        offset: 0x01C00000, size: 512*1024 },
-	{ name: "vmlinux",	offset: 0x01C80000, size: 3582*1024 },
-	{ name: "config",	offset: 0x01FFF800,	size: 144 },
-	{ name: "nvram",	offset: 0x01FFF890,	size: 1904 },
+#define DEFAULT_SIZE_MB 16 /* 32MB flash */
+#if 1
+	{ name: "cfe",		offset: 0,			size:  256 * 1024 },	/* mtd0 */
+	{ name: "param",	offset: 0x00040000, size:  128 * 1024 },	/* mtd1 */
+	{ name: "user",		offset: 0x00060000, size:  512 * 1024 },	/* mtd2 */
+	{ name: "kernel0",	offset: 0x000E0000, size: 1408 * 1024 },	/* mtd3 */
+	{ name: "kernel1",	offset: 0x00240000, size: 1408 * 1024 },	/* mtd4 */
+	{ name: "rfs0",		offset: 0x003A0000, size: 5120 * 1024 },	/* mtd5 */
+	{ name: "log0",		offset: 0x008A0000, size:  128 * 1024 },	/* mtd6 */
+	{ name: "log1",		offset: 0x008C0000, size:  128 * 1024 },	/* mtd7 */
+	{ name: "rfs1",		offset: 0x008E0000, size: 5120 * 1024 },	/* mtd8 */
+	{ name: "log2",		offset: 0x00DE0000, size:  128 * 1024 },	/* mtd9 */
+	{ name: "log3",		offset: 0x00E00000, size:  128 * 1024 },	/* mtd10 */
+	{ name: "vupkernel",offset: 0x00E20000, size: 1536 * 1024 },	/* mtd11 */
+	{ name: "log4",		offset: 0x00FA0000, size:  128 * 1024 },	/* mtd12 */
+	{ name: "log5",		offset: 0x00FC0000, size:  128 * 1024 },	/* mtd13 */
+	{ name: "log6",		offset: 0x00FE0000, size:  128 * 1024 },	/* mtd14 */
+#else
+/* For SD Version Up */
+    { name: "cfe",      offset: 0,          size: 256 * 1024 },
+    { name: "param",    offset: 0x00040000, size: 128 * 1024 },
+    { name: "user",     offset: 0x00060000, size: 512 * 1024 },
+    { name: "kernel0",  offset: 0x000E0000, size: 1408 * 1024 },
+    { name: "kernel1",  offset: 0x00240000, size: 1408 * 1024 },
+    { name: "rfs0",     offset: 0x003A0000, size: 5376 * 1024 },
+    { name: "rfs1",     offset: 0x008E0000, size: 5376 * 1024 },
+    { name: "vupkernel",offset: 0x00E20000, size: 1664 * 1024 },
+    { name: "log0",     offset: 0x00FC0000, size: 128 * 1024 },
+    { name: "log1",     offset: 0x00FE0000, size: 128 * 1024 },
+
+#endif
 
 #elif defined( CONFIG_MIPS_BCM7440 )
 
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/drivers/net/brcmint7038/bcmemac.c stblinux-2.6.12/drivers/net/brcmint7038/bcmemac.c
--- stblinux-2.6.12.org/drivers/net/brcmint7038/bcmemac.c	2007-02-03 05:42:59.000000000 +0900
+++ stblinux-2.6.12/drivers/net/brcmint7038/bcmemac.c	2008-08-20 19:28:48.000000000 +0900
@@ -67,6 +67,8 @@
 #include <linux/etherdevice.h>
 #include <linux/skbuff.h>
 
+#include <linux/ethtool.h>
+
 #include <asm/mipsregs.h>
 
 #if defined( CONFIG_BCMINTEMAC_7038 ) || defined( CONFIG_BCMINTEMAC_7038_MODULE )
@@ -75,7 +77,8 @@
 
 #if 1
 /* 5/24/06: Regardless of flash size, the offset of the MAC-addr is always the same */
-#define FLASH_MACADDR_ADDR 0xBFFFF824
+/* #define FLASH_MACADDR_ADDR 0xBFFFF824 */
+#define FLASH_MACADDR_ADDR 0xBF040000 /* for cfe_ip1j_1116.bin */
 #else
 
   #ifdef CONFIG_MIPS_BCM7318
@@ -84,9 +87,13 @@
   #define FLASH_MACADDR_OFFSET 0x00FFF824
   
   #elif defined(CONFIG_MIPS_BCM7038) || defined(CONFIG_MIPS_BCM7400) || \
-        defined(CONFIG_MIPS_BCM7401) || defined(CONFIG_MIPS_BCM7403)  
+        defined(CONFIG_MIPS_BCM7401) || defined(CONFIG_MIPS_BCM7403) || \
+        defined(CONFIG_MIPS_BCM7452) || defined(CONFIG_MIPS_BCM7405)
   /* 32MB Flash */
   #define FLASH_MACADDR_OFFSET 0x01FFF824
+  /* 16M Flash */
+  /* cfe_1113 */
+  /*  #define FLASH_MACADDR_OFFSET 0x00040024 */ 
 
   #else
   #error "Unknown platform, FLASH_MACADDR_OFFSET must be defined\n"
@@ -130,6 +137,12 @@ int bcmIsEnetUp(uint32 uPhyAddr);
 #define EPHY_100MBIT                    0x2000
 #define EPHY_FULLDUPLEX                 0x0100
 #define EPHY_RESTART_AUTONEGOTIATION    0x0200
+/* MII advertisement */
+#define EPHY_100M_FULL					0x0100
+#define EPHY_100M_HALF					0x0080
+#define EPHY_10M_FULL					0x0040
+#define EPHY_10M_HALF					0x0020
+
 /* MII STATUS */
 #define EPHY_AUTONEGOTIATION_COMPLETE   0x0020
 /* MII Auxiliary Mode 2 */
@@ -155,6 +168,7 @@ typedef enum {
 #define skb_dataref(x)   skb_datarefp(x)
 #endif
 
+static int miiLock = 1;
 
 /*
  * IP Header Optimization, on 7401B0 and on-wards
@@ -199,13 +213,15 @@ static inline int haveIPHdrOptimization(
 #define FIXED_REV	0x74010010	/****** 7401B0 is first chip with the fix *********/
 								/* Should also work with a true 7402 chip */
 		volatile unsigned long* pSundryRev = (volatile unsigned long*) 0xb0404000;
-#elif defined(CONFIG_MIPS_BCM7403 )
+#elif defined(CONFIG_MIPS_BCM7403 ) || defined(CONFIG_MIPS_BCM7452)
 #define FIXED_REV       0x74010010
                 volatile unsigned long* pSundryRev = (volatile unsigned long*) 0xb0404000;
 
 #elif defined( CONFIG_MIPS_BCM7440 )
 #define FIXED_REV 0
-
+		volatile unsigned long* pSundryRev = (volatile unsigned long*) 0xb0404000;
+#elif defined( CONFIG_MIPS_BCM7405 )
+#define FIXED_REV 0
 		volatile unsigned long* pSundryRev = (volatile unsigned long*) 0xb0404000;
 #else
   #error "Unsupported platform"
@@ -332,6 +348,11 @@ static void bcmemac_link_change_task(Bcm
 static BcmEnet_devctrl *pDevContext = NULL;
 
 /* --------------------------------------------------------------------------
+* structure to save current configurations
+-------------------------------------------------------------------------- */
+static struct ethtool_cmd current_ecmd;
+
+/* --------------------------------------------------------------------------
     Name: bcmemac_get_free_txdesc
  Purpose: Get Current Available TX desc count
 -------------------------------------------------------------------------- */
@@ -652,6 +673,7 @@ static void tx_reclaim_timer(unsigned lo
     int bdfilled;
     int linkState;
     static int counter = 0;
+    unsigned long flags;
 
     if (atomic_read(&pDevCtrl->rxDmaRefill) != 0) {
         atomic_set(&pDevCtrl->rxDmaRefill, 0);
@@ -666,9 +688,16 @@ static void tx_reclaim_timer(unsigned lo
     /* Reclaim transmit Frames which have been sent out */
     bcmemac_net_xmit(NULL, pDevCtrl->dev);
 
-    if ( counter++ >= HZ/TIMEOUT_10MS ) {
+//printk(KERN_CRIT "tx_reclaim_timer() counter = %d \r\n", counter);
+
+//    if ( counter++ >= HZ/TIMEOUT_10MS ) {
+	
+    if (counter++ >= HZ/TIMEOUT_10MS ) {
         counter = 0;
+      if(miiLock) {
+	spin_lock_irqsave(&pDevCtrl->lock, flags);
         linkState = bcmIsEnetUp(pDevCtrl->phyAddr);
+	spin_unlock_irqrestore(&pDevCtrl->lock, flags);
         if (linkState != pDevCtrl->linkState) {
             pDevCtrl->linkState = linkState;
 #ifdef CONFIG_BCMINTEMAC_NETLINK
@@ -689,6 +718,7 @@ static void tx_reclaim_timer(unsigned lo
                 printk((KERN_CRIT "%s Link DOWN.\n"),pDevCtrl->dev->name);
 #endif
         }
+	  }
     }
 
     pDevCtrl->timer.expires = jiffies + TIMEOUT_10MS;
@@ -698,6 +728,7 @@ static void tx_reclaim_timer(unsigned lo
 #ifdef CONFIG_BCMINTEMAC_NETLINK
 static void bcmemac_link_change_task(BcmEnet_devctrl *pDevCtrl)
 {
+ch3eck
 	if(!pDevCtrl) {
 		printk("pDevCtrl is NULL\n");
 		return;
@@ -876,13 +907,14 @@ static int bcmemac_net_xmit(struct sk_bu
 
 
     if (skb == NULL) {
-            netif_wake_queue(dev);
+        netif_wake_queue(dev);
         spin_unlock_irqrestore(&pDevCtrl->lock, flags);
         return 0;
     }
 
 
- TRACE(("bcmemac_net_xmit, txCfg=%08x, txIntStat=%08x\n", pDevCtrl->txDma->cfg, pDevCtrl->txDma->intStat));
+    TRACE(("bcmemac_net_xmit, txCfg=%08x, txIntStat=%08x\n", 
+             pDevCtrl->txDma->cfg, pDevCtrl->txDma->intStat));
     if (txCBPtr == NULL) {
         txCBPtr = txCb_deq(pDevCtrl);
     }
@@ -952,8 +984,6 @@ static int bcmemac_net_xmit(struct sk_bu
 
 //bcmemac_dump(pDevCtrl);
 
-    /* Enable DMA for this channel */
-    pDevCtrl->txDma->cfg |= DMA_ENABLE;
 
     /* Decrement total BD count */
     pDevCtrl->txFreeBds -= txCBPtr->nrBds;
@@ -976,6 +1006,9 @@ static int bcmemac_net_xmit(struct sk_bu
         pDevCtrl->txCbPtrTail = txCBPtr;
     }
 
+    /* Enable DMA for this channel */
+    pDevCtrl->txDma->cfg |= DMA_ENABLE;
+
     /* update stats */
     pDevCtrl->stats.tx_bytes += ((skb->len < ETH_ZLEN) ? ETH_ZLEN : skb->len);
     pDevCtrl->stats.tx_bytes += 4;
@@ -1101,6 +1134,8 @@ int bcmemac_xmit_fragment( int ch, unsig
     return 0;
 }
 
+EXPORT_SYMBOL(bcmemac_xmit_fragment);
+
 /* --------------------------------------------------------------------------
     Name: bcmemac_xmit_multibuf
  Purpose: Send ethernet traffic in multi buffers (hdr, buf, tail)
@@ -1458,13 +1493,15 @@ gLastDmaFlag = dmaFlag; 
        pBuf = (unsigned char *)(KSEG0ADDR(EMAC_SWAP32(pDevCtrl->rxBdReadPtr->address)));
 TRACE(("bcmemac_rx: pBuf=%08p from %08x\n", pBuf, (unsigned int)pDevCtrl->rxBdReadPtr));
 
-#if defined( CONFIG_BCMINTEMAC_7038 ) || defined( CONFIG_BCMINTEMAC_7038_MODULE ) \
+#if defined(CONFIG_BCMINTEMAC_7038) || defined(CONFIG_BCMINTEMAC_7038_MODULE)
+#if !defined (CONFIG_MIPS_BCM7440B0)
 	/*
 	  * THT: Invalidate the RAC cache again, since someone may have read near the vicinity
 	  * of the buffer.  This is necessary because the RAC cache is much larger than the CPU cache
 	  */
 	bcm_inv_rac_all();
 #endif
+#endif
 
         len = ((EMAC_SWAP32(pDevCtrl->rxBdReadPtr->length_status))>>16);
         /* Null the BD field to prevent reuse */
@@ -1484,6 +1521,11 @@ gLastDmaFlag = dmaFlag;
         
         dev = pDevCtrl->dev;
 
+#ifdef CONFIG_MIPS_BCM7440B0
+        // MIPS 24K require a sync instruction for all IO completion before data can be accessed
+        dma_cache_wback_inv((unsigned long)skb->data, len);
+#endif
+
 #ifdef DUMP_DATA
         printk("bcmemac_rx :");
         dumpHexData(skb->data, 32);
@@ -2011,26 +2053,45 @@ static MII_CONFIG mii_GetConfig(BcmEnet_
  */
 static MII_CONFIG mii_AutoConfigure(BcmEnet_devctrl *pDevCtrl)
 {
-    int i;
+    int i,linkState;
     uint32 uData;
     MII_CONFIG eConfig;
 
     TRACE(("mii_AutoConfigure\n"));
 
+#if 1
+    soft_reset(pDevCtrl->phyAddr);
+#endif
+
     /* enable and restart autonegotiation */
     uData = mii_read(pDevCtrl->phyAddr, 0) & 0x0000FFFF;
     uData |= (EPHY_RESTART_AUTONEGOTIATION | EPHY_AUTONEGOTIATE);
     mii_write(pDevCtrl->phyAddr, 0x00, uData);
 
+	miiLock = 0;
     /* wait for it to finish */
     for (i = 0; i < 1000; i++) {
         mdelay(1);
         uData = mii_read(pDevCtrl->phyAddr, 0x01);
+        linkState = (uData & 0x4)>>2;
+        if (linkState != pDevCtrl->linkState) {
+            pDevCtrl->linkState = linkState;
+            if ( linkState ) {
+                printk((KERN_CRIT "%s Link UP.\n"),pDevCtrl->dev->name);
+	    	}
+            else {
+                printk((KERN_CRIT "%s Link DOWN.\n"),pDevCtrl->dev->name);
+	    	}
+		}
+
+//		printk("mii_AutoConfigure i = %d uData = 0x%x \r\n", i, uData);
         if (uData & EPHY_AUTONEGOTIATION_COMPLETE) {
             break;
         }
     }
 
+	miiLock = 1;
+
     eConfig = mii_GetConfig(pDevCtrl);
     if (uData & EPHY_AUTONEGOTIATION_COMPLETE) {
         eConfig |= MII_AUTONEG;
@@ -2049,7 +2110,7 @@ static void mii_write(uint32 uPhyAddr, u
     d = 0x50020000 | (uPhyAddr << 23) | (uRegAddr << 18) | data;
     EMAC->mdioData = d;
     mdelay(1);
-    while ( ! (EMAC->intStatus & 0x1) );
+    while ( ! (EMAC->intStatus & 0x1)  );
     EMAC->intStatus = 0x1;
 }
 
@@ -2058,12 +2119,74 @@ static void mii_write(uint32 uPhyAddr, u
  */
 static uint32 mii_read(uint32 uPhyAddr, uint32 uRegAddr) 
 {
+    volatile uint32       *status;
+
     EMAC->mdioData = 0x60020000 | (uPhyAddr << 23) | (uRegAddr << 18);
     mdelay(1);
-    while ( ! (EMAC->intStatus & 0x00000001) );
+#if 0
+    while ( ! ( EMAC->intStatus & 0x00000001) );
     EMAC->intStatus = 0x1;
     return EMAC->mdioData;
+#else
+	int timeout=1000;
+    status = (uint32 *)&EMAC->intStatus;
+    while ( !(*status & 0x00000001))
+	{
+		mdelay(2);
+		timeout--;
+		if (timeout < 0) 
+		{
+			//printk(" mii_read timeout \n");
+			break;
+		}
+	}
+	*status = 0x1;
+    return EMAC->mdioData;
+#endif
+}
+
+#if 0
+static void mii_SetAutoNegotiation(BcmEnet_devctrl *pDevCtrl, int enable) {
+    uint32 uData;
+
+    uData = mii_read(pDevCtrl->phyAddr, 0) & 0x0000FFFF;
+	if (enable) {
+    	uData |= EPHY_AUTONEGOTIATE;
+	}
+	else {
+    	uData &= ~EPHY_AUTONEGOTIATE;
+	}
+
+    mii_write(pDevCtrl->phyAddr, 0x00, uData);
+}
+
+static void mii_SetSpeed(BcmEnet_devctrl *pDevCtrl, int speed) {
+    uint32 uData;
+
+    uData = mii_read(pDevCtrl->phyAddr, 0x00) & 0xffff;
+	if (speed) { //100M
+    	uData |= EPHY_100MBIT;
+	}
+	else { //10M
+    	uData &= ~EPHY_100MBIT;
+	}
+
+    mii_write(pDevCtrl->phyAddr, 0x00, uData);
+}
+
+static void mii_SetDuplex(BcmEnet_devctrl *pDevCtrl, int duplex) {
+    uint32 uData;
+
+    uData = mii_read(pDevCtrl->phyAddr, 0x00) & 0xffff;
+	if (duplex) { //Full
+    	uData |= EPHY_FULLDUPLEX;
+	}
+	else { //Half
+    	uData &= ~EPHY_FULLDUPLEX;
+	}
+    mii_write(pDevCtrl->phyAddr, 0x00, uData);
 }
+#endif //0
 
 /*
  * soft_reset: Reset the MII
@@ -2133,6 +2256,7 @@ static void init_emac(BcmEnet_devctrl *p
         EMAC->mdioFreq = EMAC_MII_PRE_EN | 0x01F;
         soft_reset(pDevCtrl->phyAddr);
 
+#ifdef NWP_AUTONEG // Autoconfiguer Skip
         eMiiConfig = mii_AutoConfigure(pDevCtrl);
 
         if (! (eMiiConfig & MII_AUTONEG)) {
@@ -2158,6 +2282,13 @@ static void init_emac(BcmEnet_devctrl *p
         if (eMiiConfig & MII_FULLDUPLEX) {
             EMAC->txControl = EMAC_FD;  /* FULL DUPLEX */
         }
+#else  // NWP_AUTONEG
+#ifdef PHY_LOOPBACK
+        /* Enable PHY loopback */
+        mii_Loopback(pDevCtrl);
+#endif
+//        EMAC->txControl = EMAC_FD;  /* FULL DUPLEX */
+#endif // NWP_AUTONEG
     }
 
     /* Initialize emac registers */
@@ -2228,6 +2359,11 @@ static void init_IUdma(BcmEnet_devctrl *
     pDevCtrl->dmaRegs->flowctl_ch1_thresh_hi = PAUSE_HI_THRESHOLD;
     //pDevCtrl->dmaRegs->flowctl_ch1_alloc = 0;
 
+#ifdef CONFIG_MIPS_BCM7405
+    /* connect emac0 to the phy */
+    pDevCtrl->dmaRegs->enet_iudma_tstctl |= 0x2000;
+#endif
+
     // transmit
     pDevCtrl->txDma->cfg = 0;       /* initialize first (will enable later) */
     pDevCtrl->txDma->maxBurst = DMA_MAX_BURST_LENGTH;  // THT per David F, to allow 256B burst, was 8; /*DMA_MAX_BURST_LENGTH;*/
@@ -2474,6 +2610,12 @@ static int bcmemac_init_dev(BcmEnet_devc
 	}
 #endif	
 
+/* initialise the configuration data */
+	memset((void *) &current_ecmd, 0, sizeof (current_ecmd));
+	current_ecmd.autoneg = AUTONEG_ENABLE;
+	current_ecmd.phy_address = pDevCtrl->phyAddr;
+	current_ecmd.advertising |= ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full | ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full;
+
     /* if we reach this point, we've init'ed successfully */
     return 0;
 }
@@ -3083,7 +3225,8 @@ static void bcmemac_dev_setup(struct net
 #if defined( CONFIG_MIPS_BCM7038 )  || defined(CONFIG_MIPS_BCM7400) || \
     defined(CONFIG_MIPS_BCM7401)    || defined( CONFIG_MIPS_BCM7402 ) || \
     defined( CONFIG_MIPS_BCM7402S ) || defined( CONFIG_MIPS_BCM7440 ) || \
-    defined(CONFIG_MIPS_BCM7403)  
+    defined(CONFIG_MIPS_BCM7403)    || defined( CONFIG_MIPS_BCM7452 ) || \
+    defined(CONFIG_MIPS_BCM7405)
 		/* Read PCI Config Regs */
         pDevContext->chipId  = (*((volatile unsigned long*)0xb0000200) & 0xFFFF0000) >> 16;
         pDevContext->chipRev = (*((volatile unsigned long*)0xb0000208) & 0xFF);
@@ -3105,6 +3248,7 @@ static void bcmemac_dev_setup(struct net
 		case 0x7438:
 		case 0x7440:
 		case 0x7403:
+		case 0x7405:
 		break;
 	default:
 		printk(KERN_DEBUG CARDNAME" not found\n");
@@ -3179,11 +3323,12 @@ static void bcmemac_dev_setup(struct net
        pDevContext->timer.data = (unsigned long)pDevContext;
        pDevContext->timer.function = tx_reclaim_timer;
 
-#ifdef DUMP_DATA
+#if defined( DUMP_DATA ) && !defined( CONFIG_MIPS_BCM7440B0 )
             printk(KERN_INFO CARDNAME ": CPO BRCMCONFIG: %08X\n", read_c0_diag(/*$22*/));
             printk(KERN_INFO CARDNAME ": CPO MIPSCONFIG: %08X\n", read_c0_config(/*$16*/));
             printk(KERN_INFO CARDNAME ": CPO MIPSSTATUS: %08X\n", read_c0_status(/*$12*/));
 #endif	
+	ether_setup(dev);
 	dev->irq                	= pDevContext->rxIrq;
 	dev->base_addr          	= ENET_MAC_ADR_BASE;
 	dev->open               	= bcmemac_net_open;
@@ -3213,7 +3358,6 @@ static void bcmemac_dev_setup(struct net
 
 	// These are default settings
 	write_mac_address(dev);
-	ether_setup(dev);
 	
 	// Let boot setup info overwrite default settings.
 	netdev_boot_setup_check(dev);
@@ -3310,7 +3454,7 @@ int bcmIsEnetUp(uint32 uPhyAddr)
             sem = 1;
         value = (unsigned short)(mii_read(uPhyAddr,0x1) & 0xffff);
 
-        if (value & 0x20)
+        if (value & 0x4)
             linkState = 1;
         else
             linkState = 0;
@@ -3421,13 +3565,16 @@ static int bcmemac_enet_ioctl(struct net
     BcmEnet_devctrl *pDevCtrl = (BcmEnet_devctrl *)dev->priv;
     int *data=(int*)rq->ifr_data;
     int status;
+    unsigned long flags;
 
+    spin_lock_irqsave(&pDevCtrl->lock, flags);
     /* we can add sub-command in ifr_data if we need to in the future */
     switch (cmd)
     {
     case SIOCGLINKSTATE:
         status = bcmIsEnetUp(((BcmEnet_devctrl *)dev->priv)->phyAddr);
         if (copy_to_user((void*)data, (void*)&status, sizeof(int))) {
+            spin_unlock_irqrestore(&pDevCtrl->lock, flags);
             return -EFAULT;
         }
         break;
@@ -3436,10 +3583,205 @@ static int bcmemac_enet_ioctl(struct net
         ASSERT(pDevCtrl != NULL);
         memset(&pDevCtrl->stats, 0, sizeof(struct net_device_stats));
         break;
+
+    case SIOCETHTOOL:
+//        printk(KERN_CRIT "bcmemac_enet_ioctl before \r\n");
+		netdev_ethtool_ioctl(dev, (void *) rq);
+
     }
+    spin_unlock_irqrestore(&pDevCtrl->lock, flags);
     return 0;
 }
 
+
+static void dump_mii(struct net_device *dev) {
+    BcmEnet_devctrl *pDevCtrl = netdev_priv(dev);
+    uint32 uData;
+
+	uData = mii_read(pDevCtrl->phyAddr, 0) & 0x0000FFFF;
+	printk(KERN_CRIT "MII register 0: 0x%x \r\n", uData);
+	uData = mii_read(pDevCtrl->phyAddr, 1) & 0x0000FFFF;
+	printk(KERN_CRIT "MII register 1: 0x%x \r\n", uData);
+	uData = mii_read(pDevCtrl->phyAddr, 4) & 0x0000FFFF;
+	printk(KERN_CRIT "MII register 4: 0x%x \r\n", uData);
+	uData = mii_read(pDevCtrl->phyAddr, 5) & 0x0000FFFF;
+	printk(KERN_CRIT "MII register 5: 0x%x \r\n", uData);
+}
+
+static int netdev_ethtool_ioctl(struct net_device *dev, struct ifreq *ifr)
+{
+    BcmEnet_devctrl *pDevCtrl = netdev_priv(dev);
+    u32 ethcmd;
+	void *useraddr = (void *) ifr->ifr_data;
+	struct ethtool_cmd ecmd;
+    uint32 uData;
+    MII_CONFIG eConfig;
+	int i;
+	struct ethtool_value edata;
+   
+#ifdef VPORTS
+    if (is_vport(dev)) {
+        pDevCtrl = netdev_priv(vnet_dev[0]);
+    }
+#endif
+
+    ASSERT(pDevCtrl != NULL);
+
+    if (copy_from_user(&ethcmd, useraddr, sizeof(ethcmd)))
+        return -EFAULT;
+   
+
+    switch (ethcmd) {
+    /* get driver-specific version/etc. info */
+    case ETHTOOL_GDRVINFO: {
+        struct ethtool_drvinfo info = {ETHTOOL_GDRVINFO};
+
+        strncpy(info.driver, CARDNAME, sizeof(info.driver)-1);
+        strncpy(info.version, VERSION, sizeof(info.version)-1);
+        if (copy_to_user(useraddr, &info, sizeof(info)))
+            return -EFAULT;
+        return 0;
+        }
+		break;
+
+	case ETHTOOL_GLINK: {
+		memset((void *) &edata, 0, sizeof (struct ethtool_value));
+        uData = mii_read(pDevCtrl->phyAddr, 0x01);
+        if (uData & EPHY_ACT_LINK_LED) {
+    //    printk(KERN_CRIT "ETHTOOL_GLINK  link up\r\n");
+			edata.data = 1;
+		}
+		else {
+    //    	printk(KERN_CRIT "ETHTOOL_GLINK  link down\r\n");
+			edata.data = 0;
+		}
+        if (copy_to_user(useraddr, &edata, sizeof(edata)))
+			{
+	        printk("-EFAULT\n");
+            return -EFAULT;
+			}
+        return 0;
+	}
+	break;
+
+	case ETHTOOL_GSET: {
+			memset((void *) &ecmd, 0, sizeof(ecmd));
+			if (current_ecmd.autoneg == AUTONEG_ENABLE) {
+    			eConfig = mii_GetConfig(pDevCtrl);
+				ecmd.speed = (eConfig & MII_100MBIT) != 0 ?  SPEED_100 : SPEED_10;  
+				ecmd.duplex = (eConfig & MII_FULLDUPLEX) != 0 ? DUPLEX_FULL : DUPLEX_HALF;
+			}
+			else {
+				ecmd.speed = current_ecmd.speed;
+				ecmd.duplex = current_ecmd.duplex;
+				ecmd.autoneg = current_ecmd.autoneg;
+			}
+
+			ecmd.supported =
+			  SUPPORTED_Autoneg | SUPPORTED_TP | SUPPORTED_MII |
+			  SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full |
+			  SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full;
+			ecmd.port = current_ecmd.port;
+			ecmd.transceiver = XCVR_INTERNAL;
+			ecmd.phy_address = pDevCtrl->phyAddr;
+			ecmd.advertising = ADVERTISED_TP;
+			if (current_ecmd.autoneg == AUTONEG_ENABLE)
+				ecmd.advertising |= ADVERTISED_Autoneg;
+			else {
+				ecmd.advertising &= ~ADVERTISED_Autoneg;
+				ecmd.advertising |=
+				  ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full |
+				  ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full;
+				if (current_ecmd.speed == 10)
+					ecmd.advertising &= ~(ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full);
+				else if (current_ecmd.speed == 100)
+					ecmd.advertising &= ~(ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full);
+				if (current_ecmd.duplex == DUPLEX_HALF)
+					ecmd.advertising &= ~(ADVERTISED_10baseT_Full | ADVERTISED_100baseT_Full);
+				else if (current_ecmd.duplex == DUPLEX_FULL)
+					ecmd.advertising &= ~(ADVERTISED_10baseT_Half | ADVERTISED_100baseT_Half);
+			}
+			ecmd.autoneg = current_ecmd.autoneg;
+			if (copy_to_user(ifr->ifr_data, &ecmd, sizeof(ecmd)))
+				return -EFAULT;
+		}
+		return 0;
+
+	case ETHTOOL_SSET:
+		if (copy_from_user(&ecmd, ifr->ifr_data, sizeof(ecmd)))
+			return -EFAULT;
+
+//        printk(KERN_CRIT "netdev_ethtool_ioctl ethtool_sset \r\n");
+		current_ecmd.port = ecmd.port;
+		current_ecmd.speed = ecmd.speed;
+		current_ecmd.duplex = ecmd.duplex;
+		current_ecmd.autoneg = ecmd.autoneg;
+
+		if (ecmd.autoneg == AUTONEG_ENABLE) {
+	        //printk(KERN_CRIT "netdev_ethtool_ioctl ethtool_sset enable auto neg\r\n");
+        	mii_AutoConfigure(pDevCtrl);
+		} else {
+	        //printk(KERN_CRIT "netdev_ethtool_ioctl ethtool_sset disable auto neg, setting speed %d duplex %d\r\n", ecmd.speed , ecmd.duplex);
+//			dump_mii(dev);
+
+			uData = mii_read(pDevCtrl->phyAddr, 4) & 0x0000FFFF;
+			if (ecmd.speed == SPEED_100) { //100M
+   				uData |= (EPHY_100M_FULL | EPHY_100M_HALF);
+   				uData &= ~(EPHY_10M_FULL | EPHY_10M_HALF);
+				if (ecmd.duplex == DUPLEX_FULL) { //Full
+	   				uData &= ~EPHY_100M_HALF;
+				}
+				else { //Half
+	   				uData &= ~EPHY_100M_FULL;
+				}
+			}
+			else { //10M
+   				uData |= (EPHY_10M_FULL | EPHY_10M_HALF);
+   				uData &= ~(EPHY_100M_FULL | EPHY_100M_HALF);
+				if (ecmd.duplex == DUPLEX_FULL) { //Full
+	   				uData &= ~EPHY_10M_HALF;
+				}
+				else { //Half
+	   				uData &= ~EPHY_10M_FULL;
+				}
+			}
+
+		    mii_write(pDevCtrl->phyAddr, 0x04, uData);			
+
+        	//soft_reset(pDevCtrl->phyAddr);
+		
+    		uData = mii_read(pDevCtrl->phyAddr, 0x00) & 0xffff;
+			if (ecmd.speed == SPEED_100) { //100M
+   				 	uData |= EPHY_100MBIT;
+			}
+			else { //10M
+   				 	uData &= ~EPHY_100MBIT;
+			}
+			if (ecmd.duplex == DUPLEX_FULL) { //Full
+   				 	uData |= EPHY_FULLDUPLEX;
+			}
+			else { //Half
+		    	uData &= ~EPHY_FULLDUPLEX;
+			}
+
+			uData |= EPHY_AUTONEGOTIATE | EPHY_RESTART_AUTONEGOTIATION;
+/*	    	uData &= ~EPHY_AUTONEGOTIATE*/
+//			uData |= EPHY_RESTART_AUTONEGOTIATION;
+		    mii_write(pDevCtrl->phyAddr, 0x00, uData);
+
+//			mdelay(5);
+//			dump_mii(dev);
+		}
+		return 0;
+
+    default:
+        break;
+    }
+
+    return -EOPNOTSUPP;
+}  
+
+
 int __init bcmemac_module_init(void)
 {
     int status;
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/drivers/usb/net/Makefile stblinux-2.6.12/drivers/usb/net/Makefile
--- stblinux-2.6.12.org/drivers/usb/net/Makefile	2007-02-04 01:54:48.000000000 +0900
+++ stblinux-2.6.12/drivers/usb/net/Makefile	2008-05-28 13:53:37.000000000 +0900
@@ -7,7 +7,7 @@ obj-$(CONFIG_USB_KAWETH)	+= kaweth.o
 obj-$(CONFIG_USB_PEGASUS)	+= pegasus.o
 obj-$(CONFIG_USB_RTL8150)	+= rtl8150.o
 obj-$(CONFIG_USB_USBNET)	+= usbnet.o
-obj-$(CONFIG_USB_USBNET)	+= asix.o
+#obj-$(CONFIG_USB_USBNET)	+= asix.o
 obj-$(CONFIG_USB_ZD1201)	+= zd1201.o
 
 CFLAGS_zd1201.o = -Idrivers/net/wireless/
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/drivers/usb/net/usbnet.c stblinux-2.6.12/drivers/usb/net/usbnet.c
--- stblinux-2.6.12.org/drivers/usb/net/usbnet.c	2007-02-04 01:54:49.000000000 +0900
+++ stblinux-2.6.12/drivers/usb/net/usbnet.c	2008-05-28 13:53:37.000000000 +0900
@@ -1,7 +1,10 @@
 /*
- * USB Network driver infrastructure
- * Copyright (C) 2000-2005 by David Brownell
+ * USB Networking Links
+ * Copyright (C) 2000-2005 by David Brownell <dbrownell@users.sourceforge.net>
+ * Copyright (C) 2002 Pavel Machek <pavel@ucw.cz>
  * Copyright (C) 2003-2005 David Hollis <dhollis@davehollis.com>
+ * Copyright (C) 2005 Phil Chang <pchang23@sbcglobal.net>
+ * Copyright (c) 2002-2003 TiVo Inc.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,32 +23,122 @@
 
 /*
  * This is a generic "USB networking" framework that works with several
- * kinds of full and high speed networking devices:  host-to-host cables,
- * smart usb peripherals, and actual Ethernet adapters.
+ * kinds of full and high speed networking devices:
  *
- * These devices usually differ in terms of control protocols (if they
- * even have one!) and sometimes they define new framing to wrap or batch
- * Ethernet packets.  Otherwise, they talk to USB pretty much the same,
- * so interface (un)binding, endpoint I/O queues, fault handling, and other
- * issues can usefully be addressed by this framework.
- */
+ *   + USB host-to-host "network cables", used for IP-over-USB links.
+ *     These are often used for Laplink style connectivity products.
+ *	- AnchorChip 2720
+ *	- Belkin, eTEK (interops with Win32 drivers)
+ *	- GeneSys GL620USB-A
+ *	- NetChip 1080 (interoperates with NetChip Win32 drivers)
+ *	- Prolific PL-2301/2302 (replaces "plusb" driver)
+ *	- KC Technology KC2190
+ *
+ *   + Smart USB devices can support such links directly, using Internet
+ *     standard protocols instead of proprietary host-to-device links.
+ *	- Linux PDAs like iPaq, Yopy, and Zaurus
+ *	- The BLOB boot loader (for diskless booting)
+ *	- Linux "gadgets", perhaps using PXA-2xx or Net2280 controllers
+ *	- Devices using EPSON's sample USB firmware
+ *	- CDC-Ethernet class devices, such as many cable modems
+ *
+ *   + Adapters to networks such as Ethernet.
+ *	- AX8817X based USB 2.0 products
+ *
+ * Links to these devices can be bridged using Linux Ethernet bridging.
+ * With minor exceptions, these all use similar USB framing for network
+ * traffic, but need different protocols for control traffic.
+ *
+ * USB devices can implement their side of this protocol at the cost
+ * of two bulk endpoints; it's not restricted to "cable" applications.
+ * See the SA1110, Zaurus, or EPSON device/client support in this driver;
+ * slave/target drivers such as "usb-eth" (on most SA-1100 PDAs) or
+ * "g_ether" (in the Linux "gadget" framework) implement that behavior
+ * within devices.
+ *
+ *
+ * CHANGELOG:
+ *
+ * 13-sep-2000	experimental, new
+ * 10-oct-2000	usb_device_id table created. 
+ * 28-oct-2000	misc fixes; mostly, discard more TTL-mangled rx packets.
+ * 01-nov-2000	usb_device_id table and probing api update by
+ *		Adam J. Richter <adam@yggdrasil.com>.
+ * 18-dec-2000	(db) tx watchdog, "net1080" renaming to "usbnet", device_info
+ *		and prolific support, isolate net1080-specific bits, cleanup.
+ *		fix unlink_urbs oops in D3 PM resume code path.
+ *
+ * 02-feb-2001	(db) fix tx skb sharing, packet length, match_flags, ...
+ * 08-feb-2001	stubbed in "linuxdev", maybe the SA-1100 folk can use it;
+ *		AnchorChips 2720 support (from spec) for testing;
+ *		fix bit-ordering problem with ethernet multicast addr
+ * 19-feb-2001  Support for clearing halt conditions. SA1100 UDC support
+ *		updates. Oleg Drokin (green@iXcelerator.com)
+ * 25-mar-2001	More SA-1100 updates, including workaround for ip problem
+ *		expecting cleared skb->cb and framing change to match latest
+ *		handhelds.org version (Oleg).  Enable device IDs from the
+ *		Win32 Belkin driver; other cleanups (db).
+ * 16-jul-2001	Bugfixes for uhci oops-on-unplug, Belkin support, various
+ *		cleanups for problems not yet seen in the field. (db)
+ * 17-oct-2001	Handle "Advance USBNET" product, like Belkin/eTEK devices,
+ *		from Ioannis Mavroukakis <i.mavroukakis@btinternet.com>;
+ *		rx unlinks somehow weren't async; minor cleanup.
+ * 03-nov-2001	Merged GeneSys driver; original code from Jiun-Jie Huang
+ *		<huangjj@genesyslogic.com.tw>, updated by Stanislav Brabec
+ *		<utx@penguin.cz>.  Made framing options (NetChip/GeneSys)
+ *		tie mostly to (sub)driver info.  Workaround some PL-2302
+ *		chips that seem to reject SET_INTERFACE requests.
+ *
+ * 06-apr-2002	Added ethtool support, based on a patch from Brad Hards.
+ *		Level of diagnostics is more configurable; they use device
+ *		location (usb_device->devpath) instead of address (2.5).
+ *		For tx_fixup, memflags can't be NOIO.
+ * 07-may-2002	Generalize/cleanup keventd support, handling rx stalls (mostly
+ *		for USB 2.0 TTs) and memory shortages (potential) too. (db)
+ *		Use "locally assigned" IEEE802 address space. (Brad Hards)
+ * 18-oct-2002	Support for Zaurus (Pavel Machek), related cleanup (db).
+ * 14-dec-2002	Remove Zaurus-private crc32 code (Pavel); 2.5 oops fix,
+ * 		cleanups and stubbed PXA-250 support (db), fix for framing
+ * 		issues on Z, net1080, and gl620a (Toby Milne)
+ *
+ * 31-mar-2003	Use endpoint descriptors:  high speed support, simpler sa1100
+ * 		vs pxa25x, and CDC Ethernet.  Throttle down log floods on
+ * 		disconnect; other cleanups. (db)  Flush net1080 fifos
+ * 		after several sequential framing errors. (Johannes Erdfelt)
+ * 22-aug-2003	AX8817X support (Dave Hollis).
+ * 14-jun-2004  Trivial patch for AX8817X based Buffalo LUA-U2-KTX in Japan
+ *		(Neil Bortnak)
+ * 03-nov-2004	Trivial patch for KC2190 (KC-190) chip. (Jonathan McDowell)
+ *
+ * 01-feb-2005	AX88772 support (Phil Chang & Dave Hollis)
+ *-------------------------------------------------------------------------*/
 
 // #define	DEBUG			// error path messages, extra info
 // #define	VERBOSE			// more; success messages
 
+#include <linux/config.h>
+#ifdef	CONFIG_USB_DEBUG
+#   define DEBUG
+#endif
 #include <linux/module.h>
+#include <linux/kmod.h>
 #include <linux/sched.h>
 #include <linux/init.h>
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
+#include <linux/random.h>
 #include <linux/ethtool.h>
 #include <linux/workqueue.h>
 #include <linux/mii.h>
+#include <asm/uaccess.h>
+#include <asm/unaligned.h>
 #include <linux/usb.h>
+#include <asm/io.h>
+#include <asm/scatterlist.h>
+#include <linux/mm.h>
+#include <linux/dma-mapping.h>
 
-#include "usbnet.h"
-
-#define DRIVER_VERSION		"22-Aug-2005"
+#define DRIVER_VERSION		"03-Nov-2004"
 
 
 /*-------------------------------------------------------------------------*/
@@ -56,14 +149,15 @@
  * One maximum size Ethernet packet takes twenty four of them.
  * For high speed, each frame comfortably fits almost 36 max size
  * Ethernet packets (so queues should be bigger).
- *
- * REVISIT qlens should be members of 'struct usbnet'; the goal is to
- * let the USB host controller be busy for 5msec or more before an irq
- * is required, under load.  Jumbograms change the equation.
  */
 #define	RX_QLEN(dev) (((dev)->udev->speed == USB_SPEED_HIGH) ? 60 : 4)
 #define	TX_QLEN(dev) (((dev)->udev->speed == USB_SPEED_HIGH) ? 60 : 4)
 
+// packets are always ethernet inside
+// ... except they can be bigger (limit of 64K with NetChip framing)
+#define MIN_PACKET	sizeof(struct ethhdr)
+#define MAX_PACKET	32768
+
 // reawaken network queue this soon after stopping; else watchdog barks
 #define TX_TIMEOUT_JIFFIES	(5*HZ)
 
@@ -71,150 +165,2698 @@
 // us (it polls at HZ/4 usually) before we report too many false errors.
 #define THROTTLE_JIFFIES	(HZ/8)
 
+// for vendor-specific control operations
+#define	CONTROL_TIMEOUT_MS	500
+
 // between wakeups
 #define UNLINK_TIMEOUT_MS	3
 
-/*-------------------------------------------------------------------------*/
+/*-------------------------------------------------------------------------*/
+
+// randomly generated ethernet address
+static u8	node_id [ETH_ALEN];
+
+// state we keep for each device we handle
+struct usbnet {
+	// housekeeping
+	struct usb_device	*udev;
+	struct driver_info	*driver_info;
+	wait_queue_head_t	*wait;
+
+	// i/o info: pipes etc
+	unsigned		in, out;
+	struct usb_host_endpoint *status;
+	unsigned		maxpacket;
+	struct timer_list	delay;
+
+	// protocol/interface state
+	struct net_device	*net;
+	struct net_device_stats	stats;
+	int			msg_enable;
+	unsigned long		data [5];
+
+	struct mii_if_info	mii;
+
+	// various kinds of pending driver work
+	struct sk_buff_head	rxq;
+	struct sk_buff_head	txq;
+	struct sk_buff_head	done;
+	struct urb		*interrupt;
+	struct tasklet_struct	bh;
+
+	struct work_struct	kevent;
+	unsigned long		flags;
+#		define EVENT_TX_HALT	0
+#		define EVENT_RX_HALT	1
+#		define EVENT_RX_MEMORY	2
+#		define EVENT_STS_SPLIT	3
+#		define EVENT_LINK_RESET	4
+};
+
+// device-specific info used by the driver
+struct driver_info {
+	char		*description;
+
+	int		flags;
+/* framing is CDC Ethernet, not writing ZLPs (hw issues), or optionally: */
+#define FLAG_FRAMING_NC	0x0001		/* guard against device dropouts */ 
+#define FLAG_FRAMING_GL	0x0002		/* genelink batches packets */
+#define FLAG_FRAMING_Z	0x0004		/* zaurus adds a trailer */
+#define FLAG_FRAMING_RN	0x0008		/* RNDIS batches, plus huge header */
+
+#define FLAG_NO_SETINT	0x0010		/* device can't set_interface() */
+#define FLAG_ETHER	0x0020		/* maybe use "eth%d" names */
+
+#define FLAG_FRAMING_AX 0x0040          /* AX88772/178 packets */
+
+	/* init device ... can sleep, or cause probe() failure */
+	int	(*bind)(struct usbnet *, struct usb_interface *);
+
+	/* cleanup device ... can sleep, but can't fail */
+	void	(*unbind)(struct usbnet *, struct usb_interface *);
+
+	/* reset device ... can sleep */
+	int	(*reset)(struct usbnet *);
+
+	/* see if peer is connected ... can sleep */
+	int	(*check_connect)(struct usbnet *);
+
+	/* for status polling */
+	void	(*status)(struct usbnet *, struct urb *);
+
+	/* link reset handling, called from defer_kevent */
+	int	(*link_reset)(struct usbnet *);
+
+	/* fixup rx packet (strip framing) */
+	int	(*rx_fixup)(struct usbnet *dev, struct sk_buff *skb);
+
+	/* fixup tx packet (add framing) */
+	struct sk_buff	*(*tx_fixup)(struct usbnet *dev,
+				struct sk_buff *skb, int flags);
+
+	// FIXME -- also an interrupt mechanism
+	// useful for at least PL2301/2302 and GL620USB-A
+	// and CDC use them to report 'is it connected' changes
+
+	/* for new devices, use the descriptor-reading code instead */
+	int		in;		/* rx endpoint */
+	int		out;		/* tx endpoint */
+
+	unsigned long	data;		/* Misc driver specific data */
+};
+
+// we record the state for each of our queued skbs
+enum skb_state {
+	illegal = 0,
+	tx_start, tx_done,
+	rx_start, rx_done, rx_cleanup
+};
+
+struct skb_data {	// skb->cb is one of these
+	struct urb		*urb;
+	struct usbnet		*dev;
+	enum skb_state		state;
+	size_t			length;
+};
+
+static const char driver_name [] = "usbnet";
+
+/* use ethtool to change the level for any given device */
+static int msg_level = -1;
+module_param (msg_level, int, 0);
+MODULE_PARM_DESC (msg_level, "Override default message level");
+
+
+#ifdef DEBUG
+#define devdbg(usbnet, fmt, arg...) \
+	printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , ## arg)
+#else
+#define devdbg(usbnet, fmt, arg...) do {} while(0)
+#endif
+
+#define deverr(usbnet, fmt, arg...) \
+	printk(KERN_ERR "%s: " fmt "\n" , (usbnet)->net->name , ## arg)
+#define devwarn(usbnet, fmt, arg...) \
+	printk(KERN_WARNING "%s: " fmt "\n" , (usbnet)->net->name , ## arg)
+
+#define devinfo(usbnet, fmt, arg...) \
+	printk(KERN_INFO "%s: " fmt "\n" , (usbnet)->net->name , ## arg); \
+
+/*-------------------------------------------------------------------------*/
+
+static void usbnet_get_drvinfo (struct net_device *, struct ethtool_drvinfo *);
+static u32 usbnet_get_link (struct net_device *);
+static u32 usbnet_get_msglevel (struct net_device *);
+static void usbnet_set_msglevel (struct net_device *, u32);
+static void defer_kevent (struct usbnet *, int);
+
+/* mostly for PDA style devices, which are always connected if present */
+static int always_connected (struct usbnet *dev)
+{
+	return 0;
+}
+
+/* handles CDC Ethernet and many other network "bulk data" interfaces */
+static int
+get_endpoints (struct usbnet *dev, struct usb_interface *intf)
+{
+	int				tmp;
+	struct usb_host_interface	*alt = NULL;
+	struct usb_host_endpoint	*in = NULL, *out = NULL;
+	struct usb_host_endpoint	*status = NULL;
+
+	for (tmp = 0; tmp < intf->num_altsetting; tmp++) {
+		unsigned	ep;
+
+		in = out = status = NULL;
+		alt = intf->altsetting + tmp;
+
+		/* take the first altsetting with in-bulk + out-bulk;
+		 * remember any status endpoint, just in case;
+		 * ignore other endpoints and altsetttings.
+		 */
+		for (ep = 0; ep < alt->desc.bNumEndpoints; ep++) {
+			struct usb_host_endpoint	*e;
+			int				intr = 0;
+
+			e = alt->endpoint + ep;
+			switch (e->desc.bmAttributes) {
+			case USB_ENDPOINT_XFER_INT:
+				if (!(e->desc.bEndpointAddress & USB_DIR_IN))
+					continue;
+				intr = 1;
+				/* FALLTHROUGH */
+			case USB_ENDPOINT_XFER_BULK:
+				break;
+			default:
+				continue;
+			}
+			if (e->desc.bEndpointAddress & USB_DIR_IN) {
+				if (!intr && !in)
+					in = e;
+				else if (intr && !status)
+					status = e;
+			} else {
+				if (!out)
+					out = e;
+			}
+		}
+		if (in && out)
+			break;
+	}
+	if (!alt || !in || !out)
+		return -EINVAL;
+
+	if (alt->desc.bAlternateSetting != 0
+			|| !(dev->driver_info->flags & FLAG_NO_SETINT)) {
+		tmp = usb_set_interface (dev->udev, alt->desc.bInterfaceNumber,
+				alt->desc.bAlternateSetting);
+		if (tmp < 0)
+			return tmp;
+	}
+	
+	dev->in = usb_rcvbulkpipe (dev->udev,
+			in->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK);
+	dev->out = usb_sndbulkpipe (dev->udev,
+			out->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK);
+	dev->status = status;
+	return 0;
+}
+
+static void intr_complete (struct urb *urb, struct pt_regs *regs);
+
+static int init_status (struct usbnet *dev, struct usb_interface *intf)
+{
+	char		*buf = NULL;
+	unsigned	pipe = 0;
+	unsigned	maxp;
+	unsigned	period;
+
+	if (!dev->driver_info->status)
+		return 0;
+
+	pipe = usb_rcvintpipe (dev->udev,
+			dev->status->desc.bEndpointAddress
+				& USB_ENDPOINT_NUMBER_MASK);
+	maxp = usb_maxpacket (dev->udev, pipe, 0);
+
+	/* avoid 1 msec chatter:  min 8 msec poll rate */
+	period = max ((int) dev->status->desc.bInterval,
+		(dev->udev->speed == USB_SPEED_HIGH) ? 7 : 3);
+
+	buf = kmalloc (maxp, SLAB_KERNEL);
+	if (buf) {
+		dev->interrupt = usb_alloc_urb (0, SLAB_KERNEL);
+		if (!dev->interrupt) {
+			kfree (buf);
+			return -ENOMEM;
+		} else {
+			usb_fill_int_urb(dev->interrupt, dev->udev, pipe,
+				buf, maxp, intr_complete, dev, period);
+			dev_dbg(&intf->dev,
+				"status ep%din, %d bytes period %d\n",
+				usb_pipeendpoint(pipe), maxp, period);
+		}
+	}
+	return  0;
+}
+
+static void skb_return (struct usbnet *dev, struct sk_buff *skb)
+{
+	int	status;
+
+	skb->dev = dev->net;
+	skb->protocol = eth_type_trans (skb, dev->net);
+	dev->stats.rx_packets++;
+	dev->stats.rx_bytes += skb->len;
+
+	if (netif_msg_rx_status (dev))
+		devdbg (dev, "< rx, len %zu, type 0x%x",
+			skb->len + sizeof (struct ethhdr), skb->protocol);
+	memset (skb->cb, 0, sizeof (struct skb_data));
+	status = netif_rx (skb);
+	if (status != NET_RX_SUCCESS && netif_msg_rx_err (dev))
+		devdbg (dev, "netif_rx status %d", status);
+}
+
+
+#ifdef	CONFIG_USB_ALI_M5632
+#define	HAVE_HARDWARE
+
+/*-------------------------------------------------------------------------
+ *
+ * ALi M5632 driver ... does high speed
+ *
+ *-------------------------------------------------------------------------*/
+
+static const struct driver_info	ali_m5632_info = {
+	.description =	"ALi M5632",
+};
+
+
+#endif
+
+
+#ifdef	CONFIG_USB_AN2720
+#define	HAVE_HARDWARE
+
+/*-------------------------------------------------------------------------
+ *
+ * AnchorChips 2720 driver ... http://www.cypress.com
+ *
+ * This doesn't seem to have a way to detect whether the peer is
+ * connected, or need any reset handshaking.  It's got pretty big
+ * internal buffers (handles most of a frame's worth of data).
+ * Chip data sheets don't describe any vendor control messages.
+ *
+ *-------------------------------------------------------------------------*/
+
+static const struct driver_info	an2720_info = {
+	.description =	"AnchorChips/Cypress 2720",
+	// no reset available!
+	// no check_connect available!
+
+	.in = 2, .out = 2,		// direction distinguishes these
+};
+
+#endif	/* CONFIG_USB_AN2720 */
+
+
+#ifdef CONFIG_USB_AX8817X
+/* ASIX AX8817X based USB 2.0 Ethernet Devices */
+
+#define HAVE_HARDWARE
+#define NEED_MII
+
+#include <linux/crc32.h>
+
+#define AX_CMD_SET_SW_MII		0x06
+#define AX_CMD_READ_MII_REG		0x07
+#define AX_CMD_WRITE_MII_REG		0x08
+#define AX_CMD_SET_HW_MII		0x0a
+#define AX_CMD_READ_EEPROM		0x0b
+#define AX_CMD_WRITE_EEPROM		0x0c
+#define AX_CMD_WRITE_ENABLE		0x0d
+#define AX_CMD_WRITE_DISABLE		0x0e
+#define AX_CMD_WRITE_RX_CTL		0x10
+#define AX_CMD_READ_IPG012		0x11
+#define AX_CMD_WRITE_IPG0		0x12
+#define AX_CMD_WRITE_IPG1		0x13
+#define AX_CMD_WRITE_IPG2		0x14
+#define AX_CMD_WRITE_MULTI_FILTER	0x16
+#define AX_CMD_READ_NODE_ID		0x17
+#define AX_CMD_READ_PHY_ID		0x19
+#define AX_CMD_READ_MEDIUM_STATUS	0x1a
+#define AX_CMD_WRITE_MEDIUM_MODE	0x1b
+#define AX_CMD_READ_MONITOR_MODE	0x1c
+#define AX_CMD_WRITE_MONITOR_MODE	0x1d
+#define AX_CMD_WRITE_GPIOS		0x1f
+#define AX_CMD_SW_RESET			0x20
+#define AX_CMD_SW_PHY_STATUS		0x21
+#define AX_CMD_SW_PHY_SELECT		0x22
+#define AX88772_CMD_READ_NODE_ID	0x13
+
+#define AX_MONITOR_MODE			0x01
+#define AX_MONITOR_LINK			0x02
+#define AX_MONITOR_MAGIC		0x04
+#define AX_MONITOR_HSFS			0x10
+
+/* AX88172 Medium Status Register values */
+#define AX_MEDIUM_FULL_DUPLEX		0x02
+#define AX_MEDIUM_TX_ABORT_ALLOW	0x04
+#define AX_MEDIUM_FLOW_CONTROL_EN	0x10
+
+#define AX_MCAST_FILTER_SIZE		8
+#define AX_MAX_MCAST			64
+
+#define AX_EEPROM_LEN			0x40
+
+#define AX_SWRESET_CLEAR		0x00
+#define AX_SWRESET_RR			0x01
+#define AX_SWRESET_RT			0x02
+#define AX_SWRESET_PRTE			0x04
+#define AX_SWRESET_PRL			0x08
+#define AX_SWRESET_BZ			0x10
+#define AX_SWRESET_IPRL			0x20
+#define AX_SWRESET_IPPD			0x40
+
+#define AX88772_IPG0_DEFAULT		0x15
+#define AX88772_IPG1_DEFAULT		0x0c
+#define AX88772_IPG2_DEFAULT		0x12
+
+#define AX88772_MEDIUM_FULL_DUPLEX	0x0002
+#define AX88772_MEDIUM_RESERVED		0x0004
+#define AX88772_MEDIUM_RX_FC_ENABLE	0x0010
+#define AX88772_MEDIUM_TX_FC_ENABLE	0x0020
+#define AX88772_MEDIUM_PAUSE_FORMAT	0x0080
+#define AX88772_MEDIUM_RX_ENABLE	0x0100
+#define AX88772_MEDIUM_100MB		0x0200
+#define AX88772_MEDIUM_DEFAULT	\
+	(AX88772_MEDIUM_FULL_DUPLEX | AX88772_MEDIUM_RX_FC_ENABLE | \
+	 AX88772_MEDIUM_TX_FC_ENABLE | AX88772_MEDIUM_100MB | \
+	 AX88772_MEDIUM_RESERVED | AX88772_MEDIUM_RX_ENABLE )
+
+#define AX_EEPROM_MAGIC			0xdeadbeef
+
+/* This structure cannot exceed sizeof(unsigned long [5]) AKA 20 bytes */
+struct ax8817x_data {
+	u8 multi_filter[AX_MCAST_FILTER_SIZE];
+};
+
+struct ax88172_int_data {
+	u16 res1;
+	u8 link;
+	u16 res2;
+	u8 status;
+	u16 res3;
+} __attribute__ ((packed));
+
+static int ax8817x_read_cmd(struct usbnet *dev, u8 cmd, u16 value, u16 index,
+			    u16 size, void *data)
+{
+	return usb_control_msg(
+		dev->udev,
+		usb_rcvctrlpipe(dev->udev, 0),
+		cmd,
+		USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+		value,
+		index,
+		data,
+		size,
+		CONTROL_TIMEOUT_MS);
+}
+
+static int ax8817x_write_cmd(struct usbnet *dev, u8 cmd, u16 value, u16 index,
+			     u16 size, void *data)
+{
+	return usb_control_msg(
+		dev->udev,
+		usb_sndctrlpipe(dev->udev, 0),
+		cmd,
+		USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+		value,
+		index,
+		data,
+		size,
+		CONTROL_TIMEOUT_MS);
+}
+
+static void ax8817x_async_cmd_callback(struct urb *urb, struct pt_regs *regs)
+{
+	struct usb_ctrlrequest *req = (struct usb_ctrlrequest *)urb->context;
+
+	if (urb->status < 0)
+		printk(KERN_DEBUG "ax8817x_async_cmd_callback() failed with %d",
+			urb->status);
+
+	kfree(req);
+	usb_free_urb(urb);
+}
+
+static void ax8817x_status(struct usbnet *dev, struct urb *urb)
+{
+	struct ax88172_int_data *event;
+	int link;
+
+	if (urb->actual_length < 8)
+		return;
+
+	event = urb->transfer_buffer;
+	link = event->link & 0x01;
+	if (netif_carrier_ok(dev->net) != link) {
+		if (link) {
+			netif_carrier_on(dev->net);
+			defer_kevent (dev, EVENT_LINK_RESET );
+		} else
+			netif_carrier_off(dev->net);
+		devdbg(dev, "ax8817x - Link Status is: %d", link);
+	}
+}
+
+static void ax8817x_write_cmd_async(struct usbnet *dev, u8 cmd, u16 value, u16 index,
+				    u16 size, void *data)
+{
+	struct usb_ctrlrequest *req;
+	int status;
+	struct urb *urb;
+
+	if ((urb = usb_alloc_urb(0, GFP_ATOMIC)) == NULL) {
+		devdbg(dev, "Error allocating URB in write_cmd_async!");
+		return;
+	}
+
+	if ((req = kmalloc(sizeof(struct usb_ctrlrequest), GFP_ATOMIC)) == NULL) {
+		deverr(dev, "Failed to allocate memory for control request");
+		usb_free_urb(urb);
+		return;
+	}
+
+	req->bRequestType = USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE;
+	req->bRequest = cmd;
+	req->wValue = cpu_to_le16(value);
+	req->wIndex = cpu_to_le16(index); 
+	req->wLength = cpu_to_le16(size);
+
+	usb_fill_control_urb(urb, dev->udev,
+			     usb_sndctrlpipe(dev->udev, 0),
+			     (void *)req, data, size,
+			     ax8817x_async_cmd_callback, req);
+
+	if((status = usb_submit_urb(urb, GFP_ATOMIC)) < 0) {
+		deverr(dev, "Error submitting the control message: status=%d", status);
+		kfree(req);
+		usb_free_urb(urb);
+	}
+}
+
+static void ax8817x_set_multicast(struct net_device *net)
+{
+	struct usbnet *dev = netdev_priv(net);
+	struct ax8817x_data *data = (struct ax8817x_data *)&dev->data;
+	u8 rx_ctl = 0x8c;
+
+	if (net->flags & IFF_PROMISC) {
+		rx_ctl |= 0x01;
+	} else if (net->flags & IFF_ALLMULTI
+		   || net->mc_count > AX_MAX_MCAST) {
+		rx_ctl |= 0x02;
+	} else if (net->mc_count == 0) {
+		/* just broadcast and directed */
+	} else {
+		/* We use the 20 byte dev->data
+		 * for our 8 byte filter buffer
+		 * to avoid allocating memory that
+		 * is tricky to free later */
+		struct dev_mc_list *mc_list = net->mc_list;
+		u32 crc_bits;
+		int i;
+
+		memset(data->multi_filter, 0, AX_MCAST_FILTER_SIZE);
+
+		/* Build the multicast hash filter. */
+		for (i = 0; i < net->mc_count; i++) {
+			crc_bits =
+			    ether_crc(ETH_ALEN,
+				      mc_list->dmi_addr) >> 26;
+			data->multi_filter[crc_bits >> 3] |=
+			    1 << (crc_bits & 7);
+			mc_list = mc_list->next;
+		}
+
+		ax8817x_write_cmd_async(dev, AX_CMD_WRITE_MULTI_FILTER, 0, 0,
+				   AX_MCAST_FILTER_SIZE, data->multi_filter);
+
+		rx_ctl |= 0x10;
+	}
+
+	ax8817x_write_cmd_async(dev, AX_CMD_WRITE_RX_CTL, rx_ctl, 0, 0, NULL);
+}
+
+static int ax8817x_mdio_read(struct net_device *netdev, int phy_id, int loc)
+{
+	struct usbnet *dev = netdev_priv(netdev);
+	u16 res;
+	u8 buf[1];
+
+	ax8817x_write_cmd(dev, AX_CMD_SET_SW_MII, 0, 0, 0, &buf);
+	ax8817x_read_cmd(dev, AX_CMD_READ_MII_REG, phy_id, (__u16)loc, 2, (u16 *)&res);
+	ax8817x_write_cmd(dev, AX_CMD_SET_HW_MII, 0, 0, 0, &buf);
+
+	return res & 0xffff;
+}
+
+static void ax8817x_mdio_write(struct net_device *netdev, int phy_id, int loc, int val)
+{
+	struct usbnet *dev = netdev_priv(netdev);
+	u16 res = val;
+	u8 buf[1];
+
+	ax8817x_write_cmd(dev, AX_CMD_SET_SW_MII, 0, 0, 0, &buf);
+	ax8817x_write_cmd(dev, AX_CMD_WRITE_MII_REG, phy_id, (__u16)loc, 2, (u16 *)&res);
+	ax8817x_write_cmd(dev, AX_CMD_SET_HW_MII, 0, 0, 0, &buf);
+}
+
+static int ax88172_link_reset(struct usbnet *dev)
+{
+	u16 lpa;
+	u8 mode;
+
+	mode = AX_MEDIUM_TX_ABORT_ALLOW | AX_MEDIUM_FLOW_CONTROL_EN;
+	lpa = ax8817x_mdio_read(dev->net, dev->mii.phy_id, MII_LPA);
+	if (lpa & LPA_DUPLEX)
+		mode |= AX_MEDIUM_FULL_DUPLEX;
+	ax8817x_write_cmd(dev, AX_CMD_WRITE_MEDIUM_MODE, mode, 0, 0, NULL);
+
+	return 0;
+}
+
+static void ax8817x_get_wol(struct net_device *net, struct ethtool_wolinfo *wolinfo)
+{
+	struct usbnet *dev = netdev_priv(net);
+	u8 opt;
+
+	if (ax8817x_read_cmd(dev, AX_CMD_READ_MONITOR_MODE, 0, 0, 1, &opt) < 0) {
+		wolinfo->supported = 0;
+		wolinfo->wolopts = 0;
+		return;
+	}
+	wolinfo->supported = WAKE_PHY | WAKE_MAGIC;
+	wolinfo->wolopts = 0;
+	if (opt & AX_MONITOR_MODE) {
+		if (opt & AX_MONITOR_LINK)
+			wolinfo->wolopts |= WAKE_PHY;
+		if (opt & AX_MONITOR_MAGIC)
+			wolinfo->wolopts |= WAKE_MAGIC;
+	}
+}
+
+static int ax8817x_set_wol(struct net_device *net, struct ethtool_wolinfo *wolinfo)
+{
+	struct usbnet *dev = netdev_priv(net);
+	u8 opt = 0;
+	u8 buf[1];
+
+	if (wolinfo->wolopts & WAKE_PHY)
+		opt |= AX_MONITOR_LINK;
+	if (wolinfo->wolopts & WAKE_MAGIC)
+		opt |= AX_MONITOR_MAGIC;
+	if (opt != 0)
+		opt |= AX_MONITOR_MODE;
+
+	if (ax8817x_write_cmd(dev, AX_CMD_WRITE_MONITOR_MODE,
+			      opt, 0, 0, &buf) < 0)
+		return -EINVAL;
+
+	return 0;
+}
+
+static int ax8817x_get_eeprom_len(struct net_device *net)
+{
+	return AX_EEPROM_LEN;
+}
+
+static int ax8817x_get_eeprom(struct net_device *net,
+			      struct ethtool_eeprom *eeprom, u8 *data)
+{
+	struct usbnet *dev = netdev_priv(net);
+	u16 *ebuf = (u16 *)data;
+	int i;
+
+	/* Crude hack to ensure that we don't overwrite memory
+	 * if an odd length is supplied
+	 */
+	if (eeprom->len % 2)
+		return -EINVAL;
+
+	eeprom->magic = AX_EEPROM_MAGIC;
+
+	/* ax8817x returns 2 bytes from eeprom on read */
+	for (i=0; i < eeprom->len / 2; i++) {
+		if (ax8817x_read_cmd(dev, AX_CMD_READ_EEPROM, 
+			eeprom->offset + i, 0, 2, &ebuf[i]) < 0)
+			return -EINVAL;
+	}
+	return 0;
+}
+
+static void ax8817x_get_drvinfo (struct net_device *net,
+				 struct ethtool_drvinfo *info)
+{
+	/* Inherit standard device info */
+	usbnet_get_drvinfo(net, info);
+	info->eedump_len = 0x3e;
+}
+
+static int ax8817x_get_settings(struct net_device *net, struct ethtool_cmd *cmd)
+{
+	struct usbnet *dev = netdev_priv(net);
+
+	return mii_ethtool_gset(&dev->mii,cmd);
+}
+
+static int ax8817x_set_settings(struct net_device *net, struct ethtool_cmd *cmd)
+{
+	struct usbnet *dev = netdev_priv(net);
+
+	return mii_ethtool_sset(&dev->mii,cmd);
+}
+
+/* We need to override some ethtool_ops so we require our
+   own structure so we don't interfere with other usbnet
+   devices that may be connected at the same time. */
+static struct ethtool_ops ax8817x_ethtool_ops = {
+	.get_drvinfo		= ax8817x_get_drvinfo,
+	.get_link		= ethtool_op_get_link,
+	.get_msglevel		= usbnet_get_msglevel,
+	.set_msglevel		= usbnet_set_msglevel,
+	.get_wol		= ax8817x_get_wol,
+	.set_wol		= ax8817x_set_wol,
+	.get_eeprom_len		= ax8817x_get_eeprom_len,
+	.get_eeprom		= ax8817x_get_eeprom,
+	.get_settings		= ax8817x_get_settings,
+	.set_settings		= ax8817x_set_settings,
+};
+
+static int ax8817x_bind(struct usbnet *dev, struct usb_interface *intf)
+{
+	int ret = 0;
+	void *buf;
+	int i;
+	unsigned long gpio_bits = dev->driver_info->data;
+
+	get_endpoints(dev,intf);
+
+	buf = kmalloc(ETH_ALEN, GFP_KERNEL);
+	if(!buf) {
+		ret = -ENOMEM;
+		goto out1;
+	}
+
+	/* Toggle the GPIOs in a manufacturer/model specific way */
+	for (i = 2; i >= 0; i--) {
+		if ((ret = ax8817x_write_cmd(dev, AX_CMD_WRITE_GPIOS,
+					(gpio_bits >> (i * 8)) & 0xff, 0, 0,
+					buf)) < 0)
+			goto out2;
+		msleep(5);
+	}
+
+	if ((ret = ax8817x_write_cmd(dev, AX_CMD_WRITE_RX_CTL, 0x80, 0, 0, buf)) < 0) {
+		dbg("send AX_CMD_WRITE_RX_CTL failed: %d", ret);
+		goto out2;
+	}
+
+	/* Get the MAC address */
+	memset(buf, 0, ETH_ALEN);
+	if ((ret = ax8817x_read_cmd(dev, AX_CMD_READ_NODE_ID, 0, 0, 6, buf)) < 0) {
+		dbg("read AX_CMD_READ_NODE_ID failed: %d", ret);
+		goto out2;
+	}
+	memcpy(dev->net->dev_addr, buf, ETH_ALEN);
+
+	/* Get the PHY id */
+	if ((ret = ax8817x_read_cmd(dev, AX_CMD_READ_PHY_ID, 0, 0, 2, buf)) < 0) {
+		dbg("error on read AX_CMD_READ_PHY_ID: %02x", ret);
+		goto out2;
+	} else if (ret < 2) {
+		/* this should always return 2 bytes */
+		dbg("AX_CMD_READ_PHY_ID returned less than 2 bytes: ret=%02x", ret);
+		ret = -EIO;
+		goto out2;
+	}
+
+	/* Initialize MII structure */
+	dev->mii.dev = dev->net;
+	dev->mii.mdio_read = ax8817x_mdio_read;
+	dev->mii.mdio_write = ax8817x_mdio_write;
+	dev->mii.phy_id_mask = 0x3f;
+	dev->mii.reg_num_mask = 0x1f;
+	dev->mii.phy_id = *((u8 *)buf + 1);
+
+	dev->net->set_multicast_list = ax8817x_set_multicast;
+	dev->net->ethtool_ops = &ax8817x_ethtool_ops;
+
+	ax8817x_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR, BMCR_RESET);
+	ax8817x_mdio_write(dev->net, dev->mii.phy_id, MII_ADVERTISE,
+		ADVERTISE_ALL | ADVERTISE_CSMA | ADVERTISE_PAUSE_CAP);
+	mii_nway_restart(&dev->mii);
+
+	return 0;
+out2:
+	kfree(buf);
+out1:
+	return ret;
+}
+
+static struct ethtool_ops ax88772_ethtool_ops = {
+	.get_drvinfo		= ax8817x_get_drvinfo,
+	.get_link		= ethtool_op_get_link,
+	.get_msglevel		= usbnet_get_msglevel,
+	.set_msglevel		= usbnet_set_msglevel,
+	.get_wol		= ax8817x_get_wol,
+	.set_wol		= ax8817x_set_wol,
+	.get_eeprom_len		= ax8817x_get_eeprom_len,
+	.get_eeprom		= ax8817x_get_eeprom,
+	.get_settings		= ax8817x_get_settings,
+	.set_settings		= ax8817x_set_settings,
+};
+
+static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf)
+{
+	int ret;
+	void *buf;
+
+	get_endpoints(dev,intf);
+
+	buf = kmalloc(6, GFP_KERNEL);
+	if(!buf) {
+		dbg ("Cannot allocate memory for buffer");
+		ret = -ENOMEM;
+		goto out1;
+	}
+
+	if ((ret = ax8817x_write_cmd(dev, AX_CMD_WRITE_GPIOS,
+				     0x00B0, 0, 0, buf)) < 0)
+		goto out2;
+
+	msleep(5);
+	if ((ret = ax8817x_write_cmd(dev, AX_CMD_SW_PHY_SELECT, 0x0001, 0, 0, buf)) < 0) {
+		dbg("Select PHY #1 failed: %d", ret);
+		goto out2;
+	}
+
+	if ((ret =
+	     ax8817x_write_cmd(dev, AX_CMD_SW_RESET, AX_SWRESET_IPPD, 0, 0, buf)) < 0) {
+		dbg("Failed to power down internal PHY: %d", ret);
+		goto out2;
+	}
+
+	msleep(150);
+	if ((ret =
+	     ax8817x_write_cmd(dev, AX_CMD_SW_RESET, AX_SWRESET_CLEAR, 0, 0, buf)) < 0) {
+		dbg("Failed to perform software reset: %d", ret);
+		goto out2;
+	}
+
+	msleep(150);
+	if ((ret =
+	     ax8817x_write_cmd(dev, AX_CMD_SW_RESET, AX_SWRESET_IPRL | AX_SWRESET_PRL, 0, 0, buf)) < 0) {
+		dbg("Failed to set Internal/External PHY reset control: %d", ret);
+		goto out2;
+	}
+
+	msleep(150);
+	if ((ret =
+	     ax8817x_write_cmd(dev, AX_CMD_WRITE_RX_CTL, 0x0000, 0, 0,
+			       buf)) < 0) {
+		dbg("Failed to reset RX_CTL: %d", ret);
+		goto out2;
+	}
+
+	/* Get the MAC address */
+	memset(buf, 0, ETH_ALEN);
+	if ((ret = ax8817x_read_cmd(dev, AX88772_CMD_READ_NODE_ID, 0, 0, ETH_ALEN, buf)) < 0) {
+		dbg("Failed to read MAC address: %d", ret);
+		goto out2;
+	}
+	memcpy(dev->net->dev_addr, buf, ETH_ALEN);
+
+	if ((ret = ax8817x_write_cmd(dev, AX_CMD_SET_SW_MII, 0, 0, 0, buf)) < 0) {
+		dbg("Enabling software MII failed: %d", ret);
+		goto out2;
+	}
+
+	if (((ret =
+	      ax8817x_read_cmd(dev, AX_CMD_READ_MII_REG, 0x0010, 2, 2, buf)) < 0)
+	    || (*((u16 *)buf) != 0x003b)) {
+		dbg("Read PHY register 2 must be 0x3b00: %d", ret);
+		goto out2;
+	}
+
+	/* Initialize MII structure */
+	dev->mii.dev = dev->net;
+	dev->mii.mdio_read = ax8817x_mdio_read;
+	dev->mii.mdio_write = ax8817x_mdio_write;
+	dev->mii.phy_id_mask = 0xff;
+	dev->mii.reg_num_mask = 0xff;
+
+	/* Get the PHY id */
+	if ((ret = ax8817x_read_cmd(dev, AX_CMD_READ_PHY_ID, 0, 0, 2, buf)) < 0) {
+		dbg("Error reading PHY ID: %02x", ret);
+		goto out2;
+	} else if (ret < 2) {
+		/* this should always return 2 bytes */
+		dbg("AX_CMD_READ_PHY_ID returned less than 2 bytes: ret=%02x",
+		    ret);
+		ret = -EIO;
+		goto out2;
+	}
+	dev->mii.phy_id = *((u8 *)buf + 1);
+
+	if ((ret =
+	     ax8817x_write_cmd(dev, AX_CMD_SW_RESET, AX_SWRESET_PRL, 0, 0, buf)) < 0) {
+		dbg("Set external PHY reset pin level: %d", ret);
+		goto out2;
+	}
+	msleep(150);
+	if ((ret =
+	     ax8817x_write_cmd(dev, AX_CMD_SW_RESET, AX_SWRESET_IPRL | AX_SWRESET_PRL, 0, 0, buf)) < 0) {
+		dbg("Set Internal/External PHY reset control: %d", ret);
+		goto out2;
+	}
+	msleep(150);
+
+
+	dev->net->set_multicast_list = ax8817x_set_multicast;
+	dev->net->ethtool_ops = &ax88772_ethtool_ops;
+
+	ax8817x_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR, BMCR_RESET);
+	ax8817x_mdio_write(dev->net, dev->mii.phy_id, MII_ADVERTISE,
+			ADVERTISE_ALL | ADVERTISE_CSMA);
+	mii_nway_restart(&dev->mii);
+
+	if ((ret = ax8817x_write_cmd(dev, AX_CMD_WRITE_MEDIUM_MODE, AX88772_MEDIUM_DEFAULT, 0, 0, buf)) < 0) {
+		dbg("Write medium mode register: %d", ret);
+		goto out2;
+	}
+
+	if ((ret = ax8817x_write_cmd(dev, AX_CMD_WRITE_IPG0, AX88772_IPG0_DEFAULT | AX88772_IPG1_DEFAULT,AX88772_IPG2_DEFAULT, 0, buf)) < 0) {
+		dbg("Write IPG,IPG1,IPG2 failed: %d", ret);
+		goto out2;
+	}
+	if ((ret =
+	     ax8817x_write_cmd(dev, AX_CMD_SET_HW_MII, 0, 0, 0, &buf)) < 0) {
+		dbg("Failed to set hardware MII: %02x", ret);
+		goto out2;
+	}
+
+	/* Set RX_CTL to default values with 2k buffer, and enable cactus */
+	if ((ret =
+	     ax8817x_write_cmd(dev, AX_CMD_WRITE_RX_CTL, 0x0088, 0, 0,
+			       buf)) < 0) {
+		dbg("Reset RX_CTL failed: %d", ret);
+		goto out2;
+	}
+
+	kfree(buf);
+
+	return 0;
+
+out2:
+	kfree(buf);
+out1:
+	return ret;
+}
+
+static int ax88772_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
+{
+	u32 *header;
+	char *packet;
+	struct sk_buff *ax_skb;
+	u16 size;
+
+	header = (u32 *) skb->data;
+	le32_to_cpus(header);
+	packet = (char *)(header + 1);
+
+	skb_pull(skb, 4);
+
+	while (skb->len > 0) {
+		if ((short)(*header & 0x0000ffff) !=
+		    ~((short)((*header & 0xffff0000) >> 16))) {
+			devdbg(dev,"header length data is error");
+		}
+		/* get the packet length */
+		size = (u16) (*header & 0x0000ffff);
+
+		if ((skb->len) - ((size + 1) & 0xfffe) == 0)
+			return 2;
+		if (size > ETH_FRAME_LEN) {
+			devdbg(dev,"invalid rx length %d", size);
+			return 0;
+		}
+		ax_skb = skb_clone(skb, GFP_ATOMIC);
+		if (ax_skb) {
+			ax_skb->len = size;
+			ax_skb->data = packet;
+			ax_skb->tail = packet + size;
+			skb_return(dev, ax_skb);
+		} else {
+			return 0;
+		}
+
+		skb_pull(skb, (size + 1) & 0xfffe);
+
+		if (skb->len == 0)
+			break;
+
+		header = (u32 *) skb->data;
+		le32_to_cpus(header);
+		packet = (char *)(header + 1);
+		skb_pull(skb, 4);
+	}
+
+	if (skb->len < 0) {
+		devdbg(dev,"invalid rx length %d", skb->len);
+		return 0;
+	}
+	return 1;
+}
+
+static struct sk_buff *ax88772_tx_fixup(struct usbnet *dev, struct sk_buff *skb,
+					int flags)
+{
+	int padlen;
+	int headroom = skb_headroom(skb);
+	int tailroom = skb_tailroom(skb);
+	u32 *packet_len;
+	u32 *padbytes_ptr;
+
+	padlen = ((skb->len + 4) % 512) ? 0 : 4;
+
+	if ((!skb_cloned(skb))
+	    && ((headroom + tailroom) >= (4 + padlen))) {
+		if ((headroom < 4) || (tailroom < padlen)) {
+			skb->data = memmove(skb->head + 4, skb->data, skb->len);
+			skb->tail = skb->data + skb->len;
+		}
+	} else {
+		struct sk_buff *skb2;
+		skb2 = skb_copy_expand(skb, 4, padlen, flags);
+		dev_kfree_skb_any(skb);
+		skb = skb2;
+		if (!skb)
+			return NULL;
+	}
+
+	packet_len = (u32 *) skb_push(skb, 4);
+
+	packet_len = (u32 *) skb->data;
+	*packet_len = (((skb->len - 4) ^ 0x0000ffff) << 16) + (skb->len - 4);
+
+	if ((skb->len % 512) == 0) {
+		padbytes_ptr = (u32 *) skb->tail;
+		*padbytes_ptr = 0xffff0000;
+		skb_put(skb, padlen);
+	}
+	return skb;
+}
+
+static int ax88772_link_reset(struct usbnet *dev)
+{
+	u16 lpa;
+	u16 mode;
+
+	mode = AX88772_MEDIUM_DEFAULT;
+	lpa = ax8817x_mdio_read(dev->net, dev->mii.phy_id, MII_LPA);
+
+	if ((lpa & LPA_DUPLEX) == 0)
+		mode &= ~AX88772_MEDIUM_FULL_DUPLEX;
+	if ((lpa & LPA_100) == 0)
+		mode &= ~AX88772_MEDIUM_100MB;
+	ax8817x_write_cmd(dev, AX_CMD_WRITE_MEDIUM_MODE, mode, 0, 0, NULL);
+
+	return 0;
+}
+
+static const struct driver_info ax8817x_info = {
+	.description = "ASIX AX8817x USB 2.0 Ethernet",
+	.bind = ax8817x_bind,
+	.status = ax8817x_status,
+	.link_reset = ax88172_link_reset,
+	.reset = ax88172_link_reset,
+	.flags =  FLAG_ETHER,
+	.data = 0x00130103,
+};
+
+static const struct driver_info dlink_dub_e100_info = {
+	.description = "DLink DUB-E100 USB Ethernet",
+	.bind = ax8817x_bind,
+	.status = ax8817x_status,
+	.link_reset = ax88172_link_reset,
+	.reset = ax88172_link_reset,
+	.flags =  FLAG_ETHER,
+	.data = 0x009f9d9f,
+};
+
+static const struct driver_info netgear_fa120_info = {
+	.description = "Netgear FA-120 USB Ethernet",
+	.bind = ax8817x_bind,
+	.status = ax8817x_status,
+	.link_reset = ax88172_link_reset,
+	.reset = ax88172_link_reset,
+	.flags =  FLAG_ETHER,
+	.data = 0x00130103,
+};
+
+static const struct driver_info hawking_uf200_info = {
+	.description = "Hawking UF200 USB Ethernet",
+	.bind = ax8817x_bind,
+	.status = ax8817x_status,
+	.link_reset = ax88172_link_reset,
+	.reset = ax88172_link_reset,
+	.flags =  FLAG_ETHER,
+	.data = 0x001f1d1f,
+};
+
+static const struct driver_info ax88772_info = {
+	.description = "ASIX AX88772 USB 2.0 Ethernet",
+	.bind = ax88772_bind,
+	.status = ax8817x_status,
+	.link_reset = ax88772_link_reset,
+	.reset = ax88772_link_reset,
+	.flags = FLAG_ETHER | FLAG_FRAMING_AX,
+	.rx_fixup = ax88772_rx_fixup,
+	.tx_fixup = ax88772_tx_fixup,
+	.data = 0x00130103,
+};
+
+#endif /* CONFIG_USB_AX8817X */
+
+
+
+#ifdef	CONFIG_USB_BELKIN
+#define	HAVE_HARDWARE
+
+/*-------------------------------------------------------------------------
+ *
+ * Belkin F5U104 ... two NetChip 2280 devices + Atmel microcontroller
+ *
+ * ... also two eTEK designs, including one sold as "Advance USBNET"
+ *
+ *-------------------------------------------------------------------------*/
+
+static const struct driver_info	belkin_info = {
+	.description =	"Belkin, eTEK, or compatible",
+};
+
+#endif	/* CONFIG_USB_BELKIN */
+
+
+
+/*-------------------------------------------------------------------------
+ *
+ * Communications Device Class declarations.
+ * Used by CDC Ethernet, and some CDC variants
+ *
+ *-------------------------------------------------------------------------*/
+
+#ifdef	CONFIG_USB_CDCETHER
+#define NEED_GENERIC_CDC
+#endif
+
+#ifdef	CONFIG_USB_ZAURUS
+/* Ethernet variant uses funky framing, broken ethernet addressing */
+#define NEED_GENERIC_CDC
+#endif
+
+#ifdef	CONFIG_USB_RNDIS
+/* ACM variant uses even funkier framing, complex control RPC scheme */
+#define NEED_GENERIC_CDC
+#endif
+
+
+#ifdef	NEED_GENERIC_CDC
+
+#include <linux/usb_cdc.h>
+
+struct cdc_state {
+	struct usb_cdc_header_desc	*header;
+	struct usb_cdc_union_desc	*u;
+	struct usb_cdc_ether_desc	*ether;
+	struct usb_interface		*control;
+	struct usb_interface		*data;
+};
+
+static struct usb_driver usbnet_driver;
+
+/*
+ * probes control interface, claims data interface, collects the bulk
+ * endpoints, activates data interface (if needed), maybe sets MTU.
+ * all pure cdc, except for certain firmware workarounds.
+ */
+static int generic_cdc_bind (struct usbnet *dev, struct usb_interface *intf)
+{
+	u8				*buf = intf->cur_altsetting->extra;
+	int				len = intf->cur_altsetting->extralen;
+	struct usb_interface_descriptor	*d;
+	struct cdc_state		*info = (void *) &dev->data;
+	int				status;
+	int				rndis;
+
+	if (sizeof dev->data < sizeof *info)
+		return -EDOM;
+
+	/* expect strict spec conformance for the descriptors, but
+	 * cope with firmware which stores them in the wrong place
+	 */
+	if (len == 0 && dev->udev->actconfig->extralen) {
+		/* Motorola SB4100 (and others: Brad Hards says it's
+		 * from a Broadcom design) put CDC descriptors here
+		 */
+		buf = dev->udev->actconfig->extra;
+		len = dev->udev->actconfig->extralen;
+		if (len)
+			dev_dbg (&intf->dev,
+				"CDC descriptors on config\n");
+	}
+
+	/* this assumes that if there's a non-RNDIS vendor variant
+	 * of cdc-acm, it'll fail RNDIS requests cleanly.
+	 */
+	rndis = (intf->cur_altsetting->desc.bInterfaceProtocol == 0xff);
+
+	memset (info, 0, sizeof *info);
+	info->control = intf;
+	while (len > 3) {
+		if (buf [1] != USB_DT_CS_INTERFACE)
+			goto next_desc;
+
+		/* use bDescriptorSubType to identify the CDC descriptors.
+		 * We expect devices with CDC header and union descriptors.
+		 * For CDC Ethernet we need the ethernet descriptor.
+		 * For RNDIS, ignore two (pointless) CDC modem descriptors
+		 * in favor of a complicated OID-based RPC scheme doing what
+		 * CDC Ethernet achieves with a simple descriptor.
+		 */
+		switch (buf [2]) {
+		case USB_CDC_HEADER_TYPE:
+			if (info->header) {
+				dev_dbg (&intf->dev, "extra CDC header\n");
+				goto bad_desc;
+			}
+			info->header = (void *) buf;
+			if (info->header->bLength != sizeof *info->header) {
+				dev_dbg (&intf->dev, "CDC header len %u\n",
+					info->header->bLength);
+				goto bad_desc;
+			}
+			break;
+		case USB_CDC_UNION_TYPE:
+			if (info->u) {
+				dev_dbg (&intf->dev, "extra CDC union\n");
+				goto bad_desc;
+			}
+			info->u = (void *) buf;
+			if (info->u->bLength != sizeof *info->u) {
+				dev_dbg (&intf->dev, "CDC union len %u\n",
+					info->u->bLength);
+				goto bad_desc;
+			}
+
+			/* we need a master/control interface (what we're
+			 * probed with) and a slave/data interface; union
+			 * descriptors sort this all out.
+			 */
+			info->control = usb_ifnum_to_if(dev->udev,
+						info->u->bMasterInterface0);
+			info->data = usb_ifnum_to_if(dev->udev,
+						info->u->bSlaveInterface0);
+			if (!info->control || !info->data) {
+				dev_dbg (&intf->dev,
+					"master #%u/%p slave #%u/%p\n",
+					info->u->bMasterInterface0,
+					info->control,
+					info->u->bSlaveInterface0,
+					info->data);
+				goto bad_desc;
+			}
+			if (info->control != intf) {
+				dev_dbg (&intf->dev, "bogus CDC Union\n");
+				/* Ambit USB Cable Modem (and maybe others)
+				 * interchanges master and slave interface.
+				 */
+				if (info->data == intf) {
+					info->data = info->control;
+					info->control = intf;
+				} else
+					goto bad_desc;
+			}
+
+			/* a data interface altsetting does the real i/o */
+			d = &info->data->cur_altsetting->desc;
+			if (d->bInterfaceClass != USB_CLASS_CDC_DATA) {
+				dev_dbg (&intf->dev, "slave class %u\n",
+					d->bInterfaceClass);
+				goto bad_desc;
+			}
+			break;
+		case USB_CDC_ETHERNET_TYPE:
+			if (info->ether) {
+				dev_dbg (&intf->dev, "extra CDC ether\n");
+				goto bad_desc;
+			}
+			info->ether = (void *) buf;
+			if (info->ether->bLength != sizeof *info->ether) {
+				dev_dbg (&intf->dev, "CDC ether len %u\n",
+					info->u->bLength);
+				goto bad_desc;
+			}
+			dev->net->mtu = le16_to_cpup (
+						&info->ether->wMaxSegmentSize)
+					- ETH_HLEN;
+			/* because of Zaurus, we may be ignoring the host
+			 * side link address we were given.
+			 */
+			break;
+		}
+next_desc:
+		len -= buf [0];	/* bLength */
+		buf += buf [0];
+	}
+
+	if (!info->header || !info->u || (!rndis && !info->ether)) {
+		dev_dbg (&intf->dev, "missing cdc %s%s%sdescriptor\n",
+			info->header ? "" : "header ",
+			info->u ? "" : "union ",
+			info->ether ? "" : "ether ");
+		goto bad_desc;
+	}
+
+	/* claim data interface and set it up ... with side effects.
+	 * network traffic can't flow until an altsetting is enabled.
+	 */
+	status = usb_driver_claim_interface (&usbnet_driver, info->data, dev);
+	if (status < 0)
+		return status;
+	status = get_endpoints (dev, info->data);
+	if (status < 0) {
+		/* ensure immediate exit from usbnet_disconnect */
+		usb_set_intfdata(info->data, NULL);
+		usb_driver_release_interface (&usbnet_driver, info->data);
+		return status;
+	}
+
+	/* status endpoint: optional for CDC Ethernet, not RNDIS (or ACM) */
+	dev->status = NULL;
+	if (info->control->cur_altsetting->desc.bNumEndpoints == 1) {
+		struct usb_endpoint_descriptor	*desc;
+
+		dev->status = &info->control->cur_altsetting->endpoint [0];
+		desc = &dev->status->desc;
+		if (desc->bmAttributes != USB_ENDPOINT_XFER_INT
+				|| !(desc->bEndpointAddress & USB_DIR_IN)
+				|| (le16_to_cpu(desc->wMaxPacketSize)
+					< sizeof (struct usb_cdc_notification))
+				|| !desc->bInterval) {
+			dev_dbg (&intf->dev, "bad notification endpoint\n");
+			dev->status = NULL;
+		}
+	}
+	if (rndis && !dev->status) {
+		dev_dbg (&intf->dev, "missing RNDIS status endpoint\n");
+		usb_set_intfdata(info->data, NULL);
+		usb_driver_release_interface (&usbnet_driver, info->data);
+		return -ENODEV;
+	}
+	return 0;
+
+bad_desc:
+	dev_info (&dev->udev->dev, "bad CDC descriptors\n");
+	return -ENODEV;
+}
+
+static void cdc_unbind (struct usbnet *dev, struct usb_interface *intf)
+{
+	struct cdc_state		*info = (void *) &dev->data;
+
+	/* disconnect master --> disconnect slave */
+	if (intf == info->control && info->data) {
+		/* ensure immediate exit from usbnet_disconnect */
+		usb_set_intfdata(info->data, NULL);
+		usb_driver_release_interface (&usbnet_driver, info->data);
+		info->data = NULL;
+	}
+
+	/* and vice versa (just in case) */
+	else if (intf == info->data && info->control) {
+		/* ensure immediate exit from usbnet_disconnect */
+		usb_set_intfdata(info->control, NULL);
+		usb_driver_release_interface (&usbnet_driver, info->control);
+		info->control = NULL;
+	}
+}
+
+#endif	/* NEED_GENERIC_CDC */
+
+
+#ifdef	CONFIG_USB_CDCETHER
+#define	HAVE_HARDWARE
+
+/*-------------------------------------------------------------------------
+ *
+ * Communications Device Class, Ethernet Control model
+ *
+ * Takes two interfaces.  The DATA interface is inactive till an altsetting
+ * is selected.  Configuration data includes class descriptors.
+ *
+ * This should interop with whatever the 2.4 "CDCEther.c" driver
+ * (by Brad Hards) talked with.
+ *
+ *-------------------------------------------------------------------------*/
+
+#include <linux/ctype.h>
+
+
+static void dumpspeed (struct usbnet *dev, __le32 *speeds)
+{
+	if (netif_msg_timer (dev))
+		devinfo (dev, "link speeds: %u kbps up, %u kbps down",
+			__le32_to_cpu(speeds[0]) / 1000,
+		__le32_to_cpu(speeds[1]) / 1000);
+}
+
+static void cdc_status (struct usbnet *dev, struct urb *urb)
+{
+	struct usb_cdc_notification	*event;
+
+	if (urb->actual_length < sizeof *event)
+		return;
+	
+	/* SPEED_CHANGE can get split into two 8-byte packets */
+	if (test_and_clear_bit (EVENT_STS_SPLIT, &dev->flags)) {
+		dumpspeed (dev, (__le32 *) urb->transfer_buffer);
+		return;
+	}
+
+	event = urb->transfer_buffer;
+	switch (event->bNotificationType) {
+	case USB_CDC_NOTIFY_NETWORK_CONNECTION:
+		if (netif_msg_timer (dev))
+			devdbg (dev, "CDC: carrier %s",
+					event->wValue ? "on" : "off");
+		if (event->wValue)
+			netif_carrier_on(dev->net);
+		else
+			netif_carrier_off(dev->net);
+		break;
+	case USB_CDC_NOTIFY_SPEED_CHANGE:	/* tx/rx rates */
+		if (netif_msg_timer (dev))
+			devdbg (dev, "CDC: speed change (len %d)",
+					urb->actual_length);
+		if (urb->actual_length != (sizeof *event + 8))
+			set_bit (EVENT_STS_SPLIT, &dev->flags);
+		else
+			dumpspeed (dev, (__le32 *) &event[1]);
+		break;
+	// case USB_CDC_NOTIFY_RESPONSE_AVAILABLE:	/* RNDIS; or unsolicited */
+	default:
+		deverr (dev, "CDC: unexpected notification %02x!",
+				 event->bNotificationType);
+		break;
+	}
+}
+
+static u8 nibble (unsigned char c)
+{
+	if (likely (isdigit (c)))
+		return c - '0';
+	c = toupper (c);
+	if (likely (isxdigit (c)))
+		return 10 + c - 'A';
+	return 0;
+}
+
+static inline int
+get_ethernet_addr (struct usbnet *dev, struct usb_cdc_ether_desc *e)
+{
+	int 		tmp, i;
+	unsigned char	buf [13];
+
+	tmp = usb_string (dev->udev, e->iMACAddress, buf, sizeof buf);
+	if (tmp != 12) {
+		dev_dbg (&dev->udev->dev,
+			"bad MAC string %d fetch, %d\n", e->iMACAddress, tmp);
+		if (tmp >= 0)
+			tmp = -EINVAL;
+		return tmp;
+	}
+	for (i = tmp = 0; i < 6; i++, tmp += 2)
+		dev->net->dev_addr [i] =
+			 (nibble (buf [tmp]) << 4) + nibble (buf [tmp + 1]);
+	return 0;
+}
+
+static int cdc_bind (struct usbnet *dev, struct usb_interface *intf)
+{
+	int				status;
+	struct cdc_state		*info = (void *) &dev->data;
+
+	status = generic_cdc_bind (dev, intf);
+	if (status < 0)
+		return status;
+
+	status = get_ethernet_addr (dev, info->ether);
+	if (status < 0) {
+		usb_set_intfdata(info->data, NULL);
+		usb_driver_release_interface (&usbnet_driver, info->data);
+		return status;
+	}
+
+	/* FIXME cdc-ether has some multicast code too, though it complains
+	 * in routine cases.  info->ether describes the multicast support.
+	 */
+	return 0;
+}
+
+static const struct driver_info	cdc_info = {
+	.description =	"CDC Ethernet Device",
+	.flags =	FLAG_ETHER,
+	// .check_connect = cdc_check_connect,
+	.bind =		cdc_bind,
+	.unbind =	cdc_unbind,
+	.status =	cdc_status,
+};
+
+#endif	/* CONFIG_USB_CDCETHER */
+
+
+
+#ifdef	CONFIG_USB_EPSON2888
+#define	HAVE_HARDWARE
+
+/*-------------------------------------------------------------------------
+ *
+ * EPSON USB clients
+ *
+ * This is the same idea as Linux PDAs (below) except the firmware in the
+ * device might not be Tux-powered.  Epson provides reference firmware that
+ * implements this interface.  Product developers can reuse or modify that
+ * code, such as by using their own product and vendor codes.
+ *
+ * Support was from Juro Bystricky <bystricky.juro@erd.epson.com>
+ *
+ *-------------------------------------------------------------------------*/
+
+static const struct driver_info	epson2888_info = {
+	.description =	"Epson USB Device",
+	.check_connect = always_connected,
+
+	.in = 4, .out = 3,
+};
+
+#endif	/* CONFIG_USB_EPSON2888 */
+
+
+#ifdef CONFIG_USB_GENESYS
+#define	HAVE_HARDWARE
+
+/*-------------------------------------------------------------------------
+ *
+ * GeneSys GL620USB-A (www.genesyslogic.com.tw)
+ *
+ * ... should partially interop with the Win32 driver for this hardware
+ * The GeneSys docs imply there's some NDIS issue motivating this framing.
+ *
+ * Some info from GeneSys:
+ *  - GL620USB-A is full duplex; GL620USB is only half duplex for bulk.
+ *    (Some cables, like the BAFO-100c, use the half duplex version.)
+ *  - For the full duplex model, the low bit of the version code says
+ *    which side is which ("left/right").
+ *  - For the half duplex type, a control/interrupt handshake settles
+ *    the transfer direction.  (That's disabled here, partially coded.)
+ *    A control URB would block until other side writes an interrupt.
+ *
+ * Original code from Jiun-Jie Huang <huangjj@genesyslogic.com.tw>
+ * and merged into "usbnet" by Stanislav Brabec <utx@penguin.cz>.
+ *
+ *-------------------------------------------------------------------------*/
+
+// control msg write command
+#define GENELINK_CONNECT_WRITE			0xF0
+// interrupt pipe index
+#define GENELINK_INTERRUPT_PIPE			0x03
+// interrupt read buffer size
+#define INTERRUPT_BUFSIZE			0x08
+// interrupt pipe interval value
+#define GENELINK_INTERRUPT_INTERVAL		0x10
+// max transmit packet number per transmit
+#define GL_MAX_TRANSMIT_PACKETS			32
+// max packet length
+#define GL_MAX_PACKET_LEN			1514
+// max receive buffer size 
+#define GL_RCV_BUF_SIZE		\
+	(((GL_MAX_PACKET_LEN + 4) * GL_MAX_TRANSMIT_PACKETS) + 4)
+
+struct gl_packet {
+	u32		packet_length;
+	char		packet_data [1];
+};
+
+struct gl_header {
+	u32			packet_count;
+	struct gl_packet	packets;
+};
+
+#ifdef	GENELINK_ACK
+
+// FIXME:  this code is incomplete, not debugged; it doesn't
+// handle interrupts correctly.  interrupts should be generic
+// code like all other device I/O, anyway.
+
+struct gl_priv { 
+	struct urb	*irq_urb;
+	char		irq_buf [INTERRUPT_BUFSIZE];
+};
+
+static inline int gl_control_write (struct usbnet *dev, u8 request, u16 value)
+{
+	int retval;
+
+	retval = usb_control_msg (dev->udev,
+		      usb_sndctrlpipe (dev->udev, 0),
+		      request,
+		      USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
+		      value, 
+		      0,			// index
+		      0,			// data buffer
+		      0,			// size
+		      CONTROL_TIMEOUT_MS);
+	return retval;
+}
+
+static void gl_interrupt_complete (struct urb *urb, struct pt_regs *regs)
+{
+	int status = urb->status;
+	
+	switch (status) {
+	case 0:
+		/* success */
+		break;
+	case -ECONNRESET:
+	case -ENOENT:
+	case -ESHUTDOWN:
+		/* this urb is terminated, clean up */
+		dbg("%s - urb shutting down with status: %d",
+				__FUNCTION__, status);
+		return;
+	default:
+		dbg("%s - nonzero urb status received: %d",
+				__FUNCTION__, urb->status);
+	}
+
+	status = usb_submit_urb (urb, GFP_ATOMIC);
+	if (status)
+		err ("%s - usb_submit_urb failed with result %d",
+		     __FUNCTION__, status);
+}
+
+static int gl_interrupt_read (struct usbnet *dev)
+{
+	struct gl_priv	*priv = dev->priv_data;
+	int		retval;
+
+	// issue usb interrupt read
+	if (priv && priv->irq_urb) {
+		// submit urb
+		if ((retval = usb_submit_urb (priv->irq_urb, GFP_KERNEL)) != 0)
+			dbg ("gl_interrupt_read: submit fail - %X...", retval);
+		else
+			dbg ("gl_interrupt_read: submit success...");
+	}
+
+	return 0;
+}
+
+// check whether another side is connected
+static int genelink_check_connect (struct usbnet *dev)
+{
+	int			retval;
+
+	dbg ("genelink_check_connect...");
+
+	// detect whether another side is connected
+	if ((retval = gl_control_write (dev, GENELINK_CONNECT_WRITE, 0)) != 0) {
+		dbg ("%s: genelink_check_connect write fail - %X",
+			dev->net->name, retval);
+		return retval;
+	}
+
+	// usb interrupt read to ack another side 
+	if ((retval = gl_interrupt_read (dev)) != 0) {
+		dbg ("%s: genelink_check_connect read fail - %X",
+			dev->net->name, retval);
+		return retval;
+	}
+
+	dbg ("%s: genelink_check_connect read success", dev->net->name);
+	return 0;
+}
+
+// allocate and initialize the private data for genelink
+static int genelink_init (struct usbnet *dev)
+{
+	struct gl_priv *priv;
+
+	// allocate the private data structure
+	if ((priv = kmalloc (sizeof *priv, GFP_KERNEL)) == 0) {
+		dbg ("%s: cannot allocate private data per device",
+			dev->net->name);
+		return -ENOMEM;
+	}
+
+	// allocate irq urb
+	if ((priv->irq_urb = usb_alloc_urb (0, GFP_KERNEL)) == 0) {
+		dbg ("%s: cannot allocate private irq urb per device",
+			dev->net->name);
+		kfree (priv);
+		return -ENOMEM;
+	}
+
+	// fill irq urb
+	usb_fill_int_urb (priv->irq_urb, dev->udev,
+		usb_rcvintpipe (dev->udev, GENELINK_INTERRUPT_PIPE),
+		priv->irq_buf, INTERRUPT_BUFSIZE,
+		gl_interrupt_complete, 0,
+		GENELINK_INTERRUPT_INTERVAL);
+
+	// set private data pointer
+	dev->priv_data = priv;
+
+	return 0;
+}
+
+// release the private data
+static int genelink_free (struct usbnet *dev)
+{
+	struct gl_priv	*priv = dev->priv_data;
+
+	if (!priv) 
+		return 0;
+
+// FIXME:  can't cancel here; it's synchronous, and
+// should have happened earlier in any case (interrupt
+// handling needs to be generic)
+
+	// cancel irq urb first
+	usb_kill_urb (priv->irq_urb);
+
+	// free irq urb
+	usb_free_urb (priv->irq_urb);
+
+	// free the private data structure
+	kfree (priv);
+
+	return 0;
+}
+
+#endif
+
+static int genelink_rx_fixup (struct usbnet *dev, struct sk_buff *skb)
+{
+	struct gl_header	*header;
+	struct gl_packet	*packet;
+	struct sk_buff		*gl_skb;
+	u32			size;
+
+	header = (struct gl_header *) skb->data;
+
+	// get the packet count of the received skb
+	le32_to_cpus (&header->packet_count);
+	if ((header->packet_count > GL_MAX_TRANSMIT_PACKETS)
+			|| (header->packet_count < 0)) {
+		dbg ("genelink: invalid received packet count %d",
+			header->packet_count);
+		return 0;
+	}
+
+	// set the current packet pointer to the first packet
+	packet = &header->packets;
+
+	// decrement the length for the packet count size 4 bytes
+	skb_pull (skb, 4);
+
+	while (header->packet_count > 1) {
+		// get the packet length
+		size = packet->packet_length;
+
+		// this may be a broken packet
+		if (size > GL_MAX_PACKET_LEN) {
+			dbg ("genelink: invalid rx length %d", size);
+			return 0;
+		}
+
+		// allocate the skb for the individual packet
+		gl_skb = alloc_skb (size, GFP_ATOMIC);
+		if (gl_skb) {
+
+			// copy the packet data to the new skb
+			memcpy(skb_put(gl_skb, size), packet->packet_data, size);
+			skb_return (dev, skb);
+		}
+
+		// advance to the next packet
+		packet = (struct gl_packet *)
+			&packet->packet_data [size];
+		header->packet_count--;
+
+		// shift the data pointer to the next gl_packet
+		skb_pull (skb, size + 4);
+	}
+
+	// skip the packet length field 4 bytes
+	skb_pull (skb, 4);
+
+	if (skb->len > GL_MAX_PACKET_LEN) {
+		dbg ("genelink: invalid rx length %d", skb->len);
+		return 0;
+	}
+	return 1;
+}
+
+static struct sk_buff *
+genelink_tx_fixup (struct usbnet *dev, struct sk_buff *skb, int flags)
+{
+	int 	padlen;
+	int	length = skb->len;
+	int	headroom = skb_headroom (skb);
+	int	tailroom = skb_tailroom (skb);
+	u32	*packet_count;
+	u32	*packet_len;
+
+	// FIXME:  magic numbers, bleech
+	padlen = ((skb->len + (4 + 4*1)) % 64) ? 0 : 1;
+
+	if ((!skb_cloned (skb))
+			&& ((headroom + tailroom) >= (padlen + (4 + 4*1)))) {
+		if ((headroom < (4 + 4*1)) || (tailroom < padlen)) {
+			skb->data = memmove (skb->head + (4 + 4*1),
+					     skb->data, skb->len);
+			skb->tail = skb->data + skb->len;
+		}
+	} else {
+		struct sk_buff	*skb2;
+		skb2 = skb_copy_expand (skb, (4 + 4*1) , padlen, flags);
+		dev_kfree_skb_any (skb);
+		skb = skb2;
+		if (!skb)
+			return NULL;
+	}
+
+	// attach the packet count to the header
+	packet_count = (u32 *) skb_push (skb, (4 + 4*1));
+	packet_len = packet_count + 1;
+
+	// FIXME little endian?
+	*packet_count = 1;
+	*packet_len = length;
+
+	// add padding byte
+	if ((skb->len % dev->maxpacket) == 0)
+		skb_put (skb, 1);
+
+	return skb;
+}
+
+static const struct driver_info	genelink_info = {
+	.description =	"Genesys GeneLink",
+	.flags =	FLAG_FRAMING_GL | FLAG_NO_SETINT,
+	.rx_fixup =	genelink_rx_fixup,
+	.tx_fixup =	genelink_tx_fixup,
+
+	.in = 1, .out = 2,
+
+#ifdef	GENELINK_ACK
+	.check_connect =genelink_check_connect,
+#endif
+};
+
+#endif /* CONFIG_USB_GENESYS */
+
+
+
+#ifdef	CONFIG_USB_NET1080
+#define	HAVE_HARDWARE
+
+/*-------------------------------------------------------------------------
+ *
+ * Netchip 1080 driver ... http://www.netchip.com
+ * Used in LapLink cables
+ *
+ *-------------------------------------------------------------------------*/
+
+#define dev_packet_id	data[0]
+#define frame_errors	data[1]
+
+/*
+ * NetChip framing of ethernet packets, supporting additional error
+ * checks for links that may drop bulk packets from inside messages.
+ * Odd USB length == always short read for last usb packet.
+ *	- nc_header
+ *	- Ethernet header (14 bytes)
+ *	- payload
+ *	- (optional padding byte, if needed so length becomes odd)
+ *	- nc_trailer
+ *
+ * This framing is to be avoided for non-NetChip devices.
+ */
+
+struct nc_header {		// packed:
+	__le16	hdr_len;		// sizeof nc_header (LE, all)
+	__le16	packet_len;		// payload size (including ethhdr)
+	__le16	packet_id;		// detects dropped packets
+#define MIN_HEADER	6
+
+	// all else is optional, and must start with:
+	// u16	vendorId;		// from usb-if
+	// u16	productId;
+} __attribute__((__packed__));
+
+#define	PAD_BYTE	((unsigned char)0xAC)
+
+struct nc_trailer {
+	__le16	packet_id;
+} __attribute__((__packed__));
+
+// packets may use FLAG_FRAMING_NC and optional pad
+#define FRAMED_SIZE(mtu) (sizeof (struct nc_header) \
+				+ sizeof (struct ethhdr) \
+				+ (mtu) \
+				+ 1 \
+				+ sizeof (struct nc_trailer))
+
+#define MIN_FRAMED	FRAMED_SIZE(0)
+
+
+/*
+ * Zero means no timeout; else, how long a 64 byte bulk packet may be queued
+ * before the hardware drops it.  If that's done, the driver will need to
+ * frame network packets to guard against the dropped USB packets.  The win32
+ * driver sets this for both sides of the link.
+ */
+#define	NC_READ_TTL_MS	((u8)255)	// ms
+
+/*
+ * We ignore most registers and EEPROM contents.
+ */
+#define	REG_USBCTL	((u8)0x04)
+#define REG_TTL		((u8)0x10)
+#define REG_STATUS	((u8)0x11)
+
+/*
+ * Vendor specific requests to read/write data
+ */
+#define	REQUEST_REGISTER	((u8)0x10)
+#define	REQUEST_EEPROM		((u8)0x11)
+
+static int
+nc_vendor_read (struct usbnet *dev, u8 req, u8 regnum, u16 *retval_ptr)
+{
+	int status = usb_control_msg (dev->udev,
+		usb_rcvctrlpipe (dev->udev, 0),
+		req,
+		USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+		0, regnum,
+		retval_ptr, sizeof *retval_ptr,
+		CONTROL_TIMEOUT_MS);
+	if (status > 0)
+		status = 0;
+	if (!status)
+		le16_to_cpus (retval_ptr);
+	return status;
+}
+
+static inline int
+nc_register_read (struct usbnet *dev, u8 regnum, u16 *retval_ptr)
+{
+	return nc_vendor_read (dev, REQUEST_REGISTER, regnum, retval_ptr);
+}
+
+// no retval ... can become async, usable in_interrupt()
+static void
+nc_vendor_write (struct usbnet *dev, u8 req, u8 regnum, u16 value)
+{
+	usb_control_msg (dev->udev,
+		usb_sndctrlpipe (dev->udev, 0),
+		req,
+		USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+		value, regnum,
+		NULL, 0,			// data is in setup packet
+		CONTROL_TIMEOUT_MS);
+}
+
+static inline void
+nc_register_write (struct usbnet *dev, u8 regnum, u16 value)
+{
+	nc_vendor_write (dev, REQUEST_REGISTER, regnum, value);
+}
+
+
+#if 0
+static void nc_dump_registers (struct usbnet *dev)
+{
+	u8	reg;
+	u16	*vp = kmalloc (sizeof (u16));
+
+	if (!vp) {
+		dbg ("no memory?");
+		return;
+	}
+
+	dbg ("%s registers:", dev->net->name);
+	for (reg = 0; reg < 0x20; reg++) {
+		int retval;
+
+		// reading some registers is trouble
+		if (reg >= 0x08 && reg <= 0xf)
+			continue;
+		if (reg >= 0x12 && reg <= 0x1e)
+			continue;
+
+		retval = nc_register_read (dev, reg, vp);
+		if (retval < 0)
+			dbg ("%s reg [0x%x] ==> error %d",
+				dev->net->name, reg, retval);
+		else
+			dbg ("%s reg [0x%x] = 0x%x",
+				dev->net->name, reg, *vp);
+	}
+	kfree (vp);
+}
+#endif
+
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * Control register
+ */
+
+#define	USBCTL_WRITABLE_MASK	0x1f0f
+// bits 15-13 reserved, r/o
+#define	USBCTL_ENABLE_LANG	(1 << 12)
+#define	USBCTL_ENABLE_MFGR	(1 << 11)
+#define	USBCTL_ENABLE_PROD	(1 << 10)
+#define	USBCTL_ENABLE_SERIAL	(1 << 9)
+#define	USBCTL_ENABLE_DEFAULTS	(1 << 8)
+// bits 7-4 reserved, r/o
+#define	USBCTL_FLUSH_OTHER	(1 << 3)
+#define	USBCTL_FLUSH_THIS	(1 << 2)
+#define	USBCTL_DISCONN_OTHER	(1 << 1)
+#define	USBCTL_DISCONN_THIS	(1 << 0)
+
+static inline void nc_dump_usbctl (struct usbnet *dev, u16 usbctl)
+{
+	if (!netif_msg_link (dev))
+		return;
+	devdbg (dev, "net1080 %s-%s usbctl 0x%x:%s%s%s%s%s;"
+			" this%s%s;"
+			" other%s%s; r/o 0x%x",
+		dev->udev->bus->bus_name, dev->udev->devpath,
+		usbctl,
+		(usbctl & USBCTL_ENABLE_LANG) ? " lang" : "",
+		(usbctl & USBCTL_ENABLE_MFGR) ? " mfgr" : "",
+		(usbctl & USBCTL_ENABLE_PROD) ? " prod" : "",
+		(usbctl & USBCTL_ENABLE_SERIAL) ? " serial" : "",
+		(usbctl & USBCTL_ENABLE_DEFAULTS) ? " defaults" : "",
+
+		(usbctl & USBCTL_FLUSH_OTHER) ? " FLUSH" : "",
+		(usbctl & USBCTL_DISCONN_OTHER) ? " DIS" : "",
+		(usbctl & USBCTL_FLUSH_THIS) ? " FLUSH" : "",
+		(usbctl & USBCTL_DISCONN_THIS) ? " DIS" : "",
+		usbctl & ~USBCTL_WRITABLE_MASK
+		);
+}
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * Status register
+ */
+
+#define	STATUS_PORT_A		(1 << 15)
+
+#define	STATUS_CONN_OTHER	(1 << 14)
+#define	STATUS_SUSPEND_OTHER	(1 << 13)
+#define	STATUS_MAILBOX_OTHER	(1 << 12)
+#define	STATUS_PACKETS_OTHER(n)	(((n) >> 8) && 0x03)
+
+#define	STATUS_CONN_THIS	(1 << 6)
+#define	STATUS_SUSPEND_THIS	(1 << 5)
+#define	STATUS_MAILBOX_THIS	(1 << 4)
+#define	STATUS_PACKETS_THIS(n)	(((n) >> 0) && 0x03)
+
+#define	STATUS_UNSPEC_MASK	0x0c8c
+#define	STATUS_NOISE_MASK 	((u16)~(0x0303|STATUS_UNSPEC_MASK))
+
+
+static inline void nc_dump_status (struct usbnet *dev, u16 status)
+{
+	if (!netif_msg_link (dev))
+		return;
+	devdbg (dev, "net1080 %s-%s status 0x%x:"
+			" this (%c) PKT=%d%s%s%s;"
+			" other PKT=%d%s%s%s; unspec 0x%x",
+		dev->udev->bus->bus_name, dev->udev->devpath,
+		status,
+
+		// XXX the packet counts don't seem right
+		// (1 at reset, not 0); maybe UNSPEC too
+
+		(status & STATUS_PORT_A) ? 'A' : 'B',
+		STATUS_PACKETS_THIS (status),
+		(status & STATUS_CONN_THIS) ? " CON" : "",
+		(status & STATUS_SUSPEND_THIS) ? " SUS" : "",
+		(status & STATUS_MAILBOX_THIS) ? " MBOX" : "",
+
+		STATUS_PACKETS_OTHER (status),
+		(status & STATUS_CONN_OTHER) ? " CON" : "",
+		(status & STATUS_SUSPEND_OTHER) ? " SUS" : "",
+		(status & STATUS_MAILBOX_OTHER) ? " MBOX" : "",
+
+		status & STATUS_UNSPEC_MASK
+		);
+}
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * TTL register
+ */
+
+#define	TTL_THIS(ttl)	(0x00ff & ttl)
+#define	TTL_OTHER(ttl)	(0x00ff & (ttl >> 8))
+#define MK_TTL(this,other)	((u16)(((other)<<8)|(0x00ff&(this))))
+
+static inline void nc_dump_ttl (struct usbnet *dev, u16 ttl)
+{
+	if (netif_msg_link (dev))
+		devdbg (dev, "net1080 %s-%s ttl 0x%x this = %d, other = %d",
+			dev->udev->bus->bus_name, dev->udev->devpath,
+			ttl, TTL_THIS (ttl), TTL_OTHER (ttl));
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int net1080_reset (struct usbnet *dev)
+{
+	u16		usbctl, status, ttl;
+	u16		*vp = kmalloc (sizeof (u16), GFP_KERNEL);
+	int		retval;
+
+	if (!vp)
+		return -ENOMEM;
+
+	// nc_dump_registers (dev);
+
+	if ((retval = nc_register_read (dev, REG_STATUS, vp)) < 0) {
+		dbg ("can't read %s-%s status: %d",
+			dev->udev->bus->bus_name, dev->udev->devpath, retval);
+		goto done;
+	}
+	status = *vp;
+	nc_dump_status (dev, status);
+
+	if ((retval = nc_register_read (dev, REG_USBCTL, vp)) < 0) {
+		dbg ("can't read USBCTL, %d", retval);
+		goto done;
+	}
+	usbctl = *vp;
+	nc_dump_usbctl (dev, usbctl);
+
+	nc_register_write (dev, REG_USBCTL,
+			USBCTL_FLUSH_THIS | USBCTL_FLUSH_OTHER);
+
+	if ((retval = nc_register_read (dev, REG_TTL, vp)) < 0) {
+		dbg ("can't read TTL, %d", retval);
+		goto done;
+	}
+	ttl = *vp;
+	// nc_dump_ttl (dev, ttl);
+
+	nc_register_write (dev, REG_TTL,
+			MK_TTL (NC_READ_TTL_MS, TTL_OTHER (ttl)) );
+	dbg ("%s: assigned TTL, %d ms", dev->net->name, NC_READ_TTL_MS);
+
+	if (netif_msg_link (dev))
+		devinfo (dev, "port %c, peer %sconnected",
+			(status & STATUS_PORT_A) ? 'A' : 'B',
+			(status & STATUS_CONN_OTHER) ? "" : "dis"
+			);
+	retval = 0;
+
+done:
+	kfree (vp);
+	return retval;
+}
+
+static int net1080_check_connect (struct usbnet *dev)
+{
+	int			retval;
+	u16			status;
+	u16			*vp = kmalloc (sizeof (u16), GFP_KERNEL);
+
+	if (!vp)
+		return -ENOMEM;
+	retval = nc_register_read (dev, REG_STATUS, vp);
+	status = *vp;
+	kfree (vp);
+	if (retval != 0) {
+		dbg ("%s net1080_check_conn read - %d", dev->net->name, retval);
+		return retval;
+	}
+	if ((status & STATUS_CONN_OTHER) != STATUS_CONN_OTHER)
+		return -ENOLINK;
+	return 0;
+}
+
+static void nc_flush_complete (struct urb *urb, struct pt_regs *regs)
+{
+	kfree (urb->context);
+	usb_free_urb(urb);
+}
+
+static void nc_ensure_sync (struct usbnet *dev)
+{
+	dev->frame_errors++;
+	if (dev->frame_errors > 5) {
+		struct urb		*urb;
+		struct usb_ctrlrequest	*req;
+		int			status;
+
+		/* Send a flush */
+		urb = usb_alloc_urb (0, SLAB_ATOMIC);
+		if (!urb)
+			return;
+
+		req = kmalloc (sizeof *req, GFP_ATOMIC);
+		if (!req) {
+			usb_free_urb (urb);
+			return;
+		}
+
+		req->bRequestType = USB_DIR_OUT
+			| USB_TYPE_VENDOR
+			| USB_RECIP_DEVICE;
+		req->bRequest = REQUEST_REGISTER;
+		req->wValue = cpu_to_le16 (USBCTL_FLUSH_THIS
+				| USBCTL_FLUSH_OTHER);
+		req->wIndex = cpu_to_le16 (REG_USBCTL);
+		req->wLength = cpu_to_le16 (0);
+
+		/* queue an async control request, we don't need
+		 * to do anything when it finishes except clean up.
+		 */
+		usb_fill_control_urb (urb, dev->udev,
+			usb_sndctrlpipe (dev->udev, 0),
+			(unsigned char *) req,
+			NULL, 0,
+			nc_flush_complete, req);
+		status = usb_submit_urb (urb, GFP_ATOMIC);
+		if (status) {
+			kfree (req);
+			usb_free_urb (urb);
+			return;
+		}
+
+		if (netif_msg_rx_err (dev))
+			devdbg (dev, "flush net1080; too many framing errors");
+		dev->frame_errors = 0;
+	}
+}
+
+static int net1080_rx_fixup (struct usbnet *dev, struct sk_buff *skb)
+{
+	struct nc_header	*header;
+	struct nc_trailer	*trailer;
+	u16			hdr_len, packet_len;
+
+	if (!(skb->len & 0x01)
+			|| MIN_FRAMED > skb->len
+			|| skb->len > FRAMED_SIZE (dev->net->mtu)) {
+		dev->stats.rx_frame_errors++;
+		dbg ("rx framesize %d range %d..%d mtu %d", skb->len,
+			(int)MIN_FRAMED, (int)FRAMED_SIZE (dev->net->mtu),
+			dev->net->mtu);
+		nc_ensure_sync (dev);
+		return 0;
+	}
+
+	header = (struct nc_header *) skb->data;
+	hdr_len = le16_to_cpup (&header->hdr_len);
+	packet_len = le16_to_cpup (&header->packet_len);
+	if (FRAMED_SIZE (packet_len) > MAX_PACKET) {
+		dev->stats.rx_frame_errors++;
+		dbg ("packet too big, %d", packet_len);
+		nc_ensure_sync (dev);
+		return 0;
+	} else if (hdr_len < MIN_HEADER) {
+		dev->stats.rx_frame_errors++;
+		dbg ("header too short, %d", hdr_len);
+		nc_ensure_sync (dev);
+		return 0;
+	} else if (hdr_len > MIN_HEADER) {
+		// out of band data for us?
+		dbg ("header OOB, %d bytes", hdr_len - MIN_HEADER);
+		nc_ensure_sync (dev);
+		// switch (vendor/product ids) { ... }
+	}
+	skb_pull (skb, hdr_len);
+
+	trailer = (struct nc_trailer *)
+		(skb->data + skb->len - sizeof *trailer);
+	skb_trim (skb, skb->len - sizeof *trailer);
+
+	if ((packet_len & 0x01) == 0) {
+		if (skb->data [packet_len] != PAD_BYTE) {
+			dev->stats.rx_frame_errors++;
+			dbg ("bad pad");
+			return 0;
+		}
+		skb_trim (skb, skb->len - 1);
+	}
+	if (skb->len != packet_len) {
+		dev->stats.rx_frame_errors++;
+		dbg ("bad packet len %d (expected %d)",
+			skb->len, packet_len);
+		nc_ensure_sync (dev);
+		return 0;
+	}
+	if (header->packet_id != get_unaligned (&trailer->packet_id)) {
+		dev->stats.rx_fifo_errors++;
+		dbg ("(2+ dropped) rx packet_id mismatch 0x%x 0x%x",
+			le16_to_cpu (header->packet_id),
+			le16_to_cpu (trailer->packet_id));
+		return 0;
+	}
+#if 0
+	devdbg (dev, "frame <rx h %d p %d id %d", header->hdr_len,
+		header->packet_len, header->packet_id);
+#endif
+	dev->frame_errors = 0;
+	return 1;
+}
+
+static struct sk_buff *
+net1080_tx_fixup (struct usbnet *dev, struct sk_buff *skb, int flags)
+{
+	int			padlen;
+	struct sk_buff		*skb2;
+
+	padlen = ((skb->len + sizeof (struct nc_header)
+			+ sizeof (struct nc_trailer)) & 0x01) ? 0 : 1;
+	if (!skb_cloned (skb)) {
+		int	headroom = skb_headroom (skb);
+		int	tailroom = skb_tailroom (skb);
+
+		if ((padlen + sizeof (struct nc_trailer)) <= tailroom
+			    && sizeof (struct nc_header) <= headroom)
+			/* There's enough head and tail room */
+			return skb;
+
+		if ((sizeof (struct nc_header) + padlen
+					+ sizeof (struct nc_trailer)) <
+				(headroom + tailroom)) {
+			/* There's enough total room, so just readjust */
+			skb->data = memmove (skb->head
+						+ sizeof (struct nc_header),
+					    skb->data, skb->len);
+			skb->tail = skb->data + skb->len;
+			return skb;
+		}
+	}
+
+	/* Create a new skb to use with the correct size */
+	skb2 = skb_copy_expand (skb,
+				sizeof (struct nc_header),
+				sizeof (struct nc_trailer) + padlen,
+				flags);
+	dev_kfree_skb_any (skb);
+	return skb2;
+}
+
+static const struct driver_info	net1080_info = {
+	.description =	"NetChip TurboCONNECT",
+	.flags =	FLAG_FRAMING_NC,
+	.reset =	net1080_reset,
+	.check_connect =net1080_check_connect,
+	.rx_fixup =	net1080_rx_fixup,
+	.tx_fixup =	net1080_tx_fixup,
+};
+
+#endif /* CONFIG_USB_NET1080 */
+
+
+
+#ifdef CONFIG_USB_PL2301
+#define	HAVE_HARDWARE
+
+/*-------------------------------------------------------------------------
+ *
+ * Prolific PL-2301/PL-2302 driver ... http://www.prolifictech.com
+ *
+ * The protocol and handshaking used here should be bug-compatible
+ * with the Linux 2.2 "plusb" driver, by Deti Fliegl.
+ *
+ *-------------------------------------------------------------------------*/
+
+/*
+ * Bits 0-4 can be used for software handshaking; they're set from
+ * one end, cleared from the other, "read" with the interrupt byte.
+ */
+#define	PL_S_EN		(1<<7)		/* (feature only) suspend enable */
+/* reserved bit -- rx ready (6) ? */
+#define	PL_TX_READY	(1<<5)		/* (interrupt only) transmit ready */
+#define	PL_RESET_OUT	(1<<4)		/* reset output pipe */
+#define	PL_RESET_IN	(1<<3)		/* reset input pipe */
+#define	PL_TX_C		(1<<2)		/* transmission complete */
+#define	PL_TX_REQ	(1<<1)		/* transmission received */
+#define	PL_PEER_E	(1<<0)		/* peer exists */
+
+static inline int
+pl_vendor_req (struct usbnet *dev, u8 req, u8 val, u8 index)
+{
+	return usb_control_msg (dev->udev,
+		usb_rcvctrlpipe (dev->udev, 0),
+		req,
+		USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+		val, index,
+		NULL, 0,
+		CONTROL_TIMEOUT_MS);
+}
+
+static inline int
+pl_clear_QuickLink_features (struct usbnet *dev, int val)
+{
+	return pl_vendor_req (dev, 1, (u8) val, 0);
+}
+
+static inline int
+pl_set_QuickLink_features (struct usbnet *dev, int val)
+{
+	return pl_vendor_req (dev, 3, (u8) val, 0);
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int pl_reset (struct usbnet *dev)
+{
+	/* some units seem to need this reset, others reject it utterly.
+	 * FIXME be more like "naplink" or windows drivers.
+	 */
+	(void) pl_set_QuickLink_features (dev,
+		PL_S_EN|PL_RESET_OUT|PL_RESET_IN|PL_PEER_E);
+	return 0;
+}
+
+static const struct driver_info	prolific_info = {
+	.description =	"Prolific PL-2301/PL-2302",
+	.flags =	FLAG_NO_SETINT,
+		/* some PL-2302 versions seem to fail usb_set_interface() */
+	.reset =	pl_reset,
+};
+
+#endif /* CONFIG_USB_PL2301 */
+
+
+#ifdef CONFIG_USB_KC2190
+#define HAVE_HARDWARE
+static const struct driver_info kc2190_info = {
+	.description =  "KC Technology KC-190",
+};
+#endif /* CONFIG_USB_KC2190 */
+
+
+#ifdef	CONFIG_USB_ARMLINUX
+#define	HAVE_HARDWARE
+
+/*-------------------------------------------------------------------------
+ *
+ * Intel's SA-1100 chip integrates basic USB support, and is used
+ * in PDAs like some iPaqs, the Yopy, some Zaurus models, and more.
+ * When they run Linux, arch/arm/mach-sa1100/usb-eth.c may be used to
+ * network using minimal USB framing data.
+ *
+ * This describes the driver currently in standard ARM Linux kernels.
+ * The Zaurus uses a different driver (see later).
+ *
+ * PXA25x and PXA210 use XScale cores (ARM v5TE) with better USB support
+ * and different USB endpoint numbering than the SA1100 devices.  The
+ * mach-pxa/usb-eth.c driver re-uses the device ids from mach-sa1100
+ * so we rely on the endpoint descriptors.
+ *
+ *-------------------------------------------------------------------------*/
+
+static const struct driver_info	linuxdev_info = {
+	.description =	"Linux Device",
+	.check_connect = always_connected,
+};
+
+static const struct driver_info	yopy_info = {
+	.description =	"Yopy",
+	.check_connect = always_connected,
+};
+
+static const struct driver_info	blob_info = {
+	.description =	"Boot Loader OBject",
+	.check_connect = always_connected,
+};
+
+#endif	/* CONFIG_USB_ARMLINUX */
+
+
+#ifdef CONFIG_USB_ZAURUS
+#define	HAVE_HARDWARE
+
+#include <linux/crc32.h>
+
+/*-------------------------------------------------------------------------
+ *
+ * Zaurus is also a SA-1110 based PDA, but one using a different driver
+ * (and framing) for its USB slave/gadget controller than the case above.
+ *
+ * For the current version of that driver, the main way that framing is
+ * nonstandard (also from perspective of the CDC ethernet model!) is a
+ * crc32, added to help detect when some sa1100 usb-to-memory DMA errata
+ * haven't been fully worked around.  Also, all Zaurii use the same
+ * default Ethernet address.
+ *
+ * PXA based models use the same framing, and also can't implement
+ * set_interface properly.
+ *
+ * All known Zaurii lie about their standards conformance.  Most lie by
+ * saying they support CDC Ethernet.  Some lie and say they support CDC
+ * MDLM (as if for access to cell phone modems).  Someone, please beat 
+ * on Sharp (and other such vendors) for a while with a cluestick.
+ *
+ *-------------------------------------------------------------------------*/
+
+static struct sk_buff *
+zaurus_tx_fixup (struct usbnet *dev, struct sk_buff *skb, int flags)
+{
+	int			padlen;
+	struct sk_buff		*skb2;
+
+	padlen = 2;
+	if (!skb_cloned (skb)) {
+		int	tailroom = skb_tailroom (skb);
+		if ((padlen + 4) <= tailroom)
+			goto done;
+	}
+	skb2 = skb_copy_expand (skb, 0, 4 + padlen, flags);
+	dev_kfree_skb_any (skb);
+	skb = skb2;
+	if (skb) {
+		u32		fcs;
+done:
+		fcs = crc32_le (~0, skb->data, skb->len);
+		fcs = ~fcs;
 
-// randomly generated ethernet address
-static u8	node_id [ETH_ALEN];
+		*skb_put (skb, 1) = fcs       & 0xff;
+		*skb_put (skb, 1) = (fcs>> 8) & 0xff;
+		*skb_put (skb, 1) = (fcs>>16) & 0xff;
+		*skb_put (skb, 1) = (fcs>>24) & 0xff;
+	}
+	return skb;
+}
 
-static const char driver_name [] = "usbnet";
+static const struct driver_info	zaurus_sl5x00_info = {
+	.description =	"Sharp Zaurus SL-5x00",
+	.flags =	FLAG_FRAMING_Z,
+	.check_connect = always_connected,
+	.bind =		generic_cdc_bind,
+	.unbind =	cdc_unbind,
+	.tx_fixup = 	zaurus_tx_fixup,
+};
+#define	ZAURUS_STRONGARM_INFO	((unsigned long)&zaurus_sl5x00_info)
 
-/* use ethtool to change the level for any given device */
-static int msg_level = -1;
-module_param (msg_level, int, 0);
-MODULE_PARM_DESC (msg_level, "Override default message level");
+static const struct driver_info	zaurus_pxa_info = {
+	.description =	"Sharp Zaurus, PXA-2xx based",
+	.flags =	FLAG_FRAMING_Z,
+	.check_connect = always_connected,
+	.bind =		generic_cdc_bind,
+	.unbind =	cdc_unbind,
+	.tx_fixup = 	zaurus_tx_fixup,
+};
+#define	ZAURUS_PXA_INFO		((unsigned long)&zaurus_pxa_info)
 
-/*-------------------------------------------------------------------------*/
+static const struct driver_info	olympus_mxl_info = {
+	.description =	"Olympus R1000",
+	.flags =	FLAG_FRAMING_Z,
+	.check_connect = always_connected,
+	.bind =		generic_cdc_bind,
+	.unbind =	cdc_unbind,
+	.tx_fixup = 	zaurus_tx_fixup,
+};
+#define	OLYMPUS_MXL_INFO	((unsigned long)&olympus_mxl_info)
 
-/* handles CDC Ethernet and many other network "bulk data" interfaces */
-int usbnet_get_endpoints(struct usbnet *dev, struct usb_interface *intf)
-{
-	int				tmp;
-	struct usb_host_interface	*alt = NULL;
-	struct usb_host_endpoint	*in = NULL, *out = NULL;
-	struct usb_host_endpoint	*status = NULL;
 
-	for (tmp = 0; tmp < intf->num_altsetting; tmp++) {
-		unsigned	ep;
+/* Some more recent products using Lineo/Belcarra code will wrongly claim
+ * CDC MDLM conformance.  They aren't conformant:  data endpoints live
+ * in the control interface, there's no data interface, and it's not used
+ * to talk to a cell phone radio.  But at least we can detect these two
+ * pseudo-classes, rather than growing this product list with entries for
+ * each new nonconformant product (sigh).
+ */
+static const u8 safe_guid[16] = {
+	0x5d, 0x34, 0xcf, 0x66, 0x11, 0x18, 0x11, 0xd6,
+	0xa2, 0x1a, 0x00, 0x01, 0x02, 0xca, 0x9a, 0x7f,
+};
+static const u8 blan_guid[16] = {
+	0x74, 0xf0, 0x3d, 0xbd, 0x1e, 0xc1, 0x44, 0x70,
+	0xa3, 0x67, 0x71, 0x34, 0xc9, 0xf5, 0x54, 0x37,
+};
 
-		in = out = status = NULL;
-		alt = intf->altsetting + tmp;
+static int blan_mdlm_bind (struct usbnet *dev, struct usb_interface *intf)
+{
+	u8				*buf = intf->cur_altsetting->extra;
+	int				len = intf->cur_altsetting->extralen;
+	struct usb_cdc_mdlm_desc	*desc = NULL;
+	struct usb_cdc_mdlm_detail_desc	*detail = NULL;
+
+	while (len > 3) {
+		if (buf [1] != USB_DT_CS_INTERFACE)
+			goto next_desc;
 
-		/* take the first altsetting with in-bulk + out-bulk;
-		 * remember any status endpoint, just in case;
-		 * ignore other endpoints and altsetttings.
+		/* use bDescriptorSubType, and just verify that we get a
+		 * "BLAN" (or "SAFE") descriptor.
 		 */
-		for (ep = 0; ep < alt->desc.bNumEndpoints; ep++) {
-			struct usb_host_endpoint	*e;
-			int				intr = 0;
-
-			e = alt->endpoint + ep;
-			switch (e->desc.bmAttributes) {
-			case USB_ENDPOINT_XFER_INT:
-				if (!(e->desc.bEndpointAddress & USB_DIR_IN))
-					continue;
-				intr = 1;
-				/* FALLTHROUGH */
-			case USB_ENDPOINT_XFER_BULK:
+		switch (buf [2]) {
+		case USB_CDC_MDLM_TYPE:
+			if (desc) {
+				dev_dbg (&intf->dev, "extra MDLM\n");
+				goto bad_desc;
+			}
+			desc = (void *) buf;
+			if (desc->bLength != sizeof *desc) {
+				dev_dbg (&intf->dev, "MDLM len %u\n",
+					desc->bLength);
+				goto bad_desc;
+			}
+			/* expect bcdVersion 1.0, ignore */
+			if (memcmp(&desc->bGUID, blan_guid, 16)
+				    && memcmp(&desc->bGUID, safe_guid, 16) ) {
+				/* hey, this one might _really_ be MDLM! */
+				dev_dbg (&intf->dev, "MDLM guid\n");
+				goto bad_desc;
+			}
+			break;
+		case USB_CDC_MDLM_DETAIL_TYPE:
+			if (detail) {
+				dev_dbg (&intf->dev, "extra MDLM detail\n");
+				goto bad_desc;
+			}
+			detail = (void *) buf;
+			switch (detail->bGuidDescriptorType) {
+			case 0:			/* "SAFE" */
+				if (detail->bLength != (sizeof *detail + 2))
+					goto bad_detail;
+				break;
+			case 1:			/* "BLAN" */
+				if (detail->bLength != (sizeof *detail + 3))
+					goto bad_detail;
 				break;
 			default:
-				continue;
+				goto bad_detail;
 			}
-			if (e->desc.bEndpointAddress & USB_DIR_IN) {
-				if (!intr && !in)
-					in = e;
-				else if (intr && !status)
-					status = e;
-			} else {
-				if (!out)
-					out = e;
+
+			/* assuming we either noticed BLAN already, or will
+			 * find it soon, there are some data bytes here:
+			 *  - bmNetworkCapabilities (unused)
+			 *  - bmDataCapabilities (bits, see below)
+			 *  - bPad (ignored, for PADAFTER -- BLAN-only)
+			 * bits are:
+			 *  - 0x01 -- Zaurus framing (add CRC)
+			 *  - 0x02 -- PADBEFORE (CRC includes some padding)
+			 *  - 0x04 -- PADAFTER (some padding after CRC)
+			 *  - 0x08 -- "fermat" packet mangling (for hw bugs)
+			 * the PADBEFORE appears not to matter; we interop
+			 * with devices that use it and those that don't.
+			 */
+			if ((detail->bDetailData[1] & ~02) != 0x01) {
+				/* bmDataCapabilites == 0 would be fine too,
+				 * but framing is minidriver-coupled for now.
+				 */
+bad_detail:
+				dev_dbg (&intf->dev,
+						"bad MDLM detail, %d %d %d\n",
+						detail->bLength,
+						detail->bDetailData[0],
+						detail->bDetailData[2]);
+				goto bad_desc;
 			}
-		}
-		if (in && out)
 			break;
+		}
+next_desc:
+		len -= buf [0];	/* bLength */
+		buf += buf [0];
 	}
-	if (!alt || !in || !out)
-		return -EINVAL;
 
-	if (alt->desc.bAlternateSetting != 0
-			|| !(dev->driver_info->flags & FLAG_NO_SETINT)) {
-		tmp = usb_set_interface (dev->udev, alt->desc.bInterfaceNumber,
-				alt->desc.bAlternateSetting);
-		if (tmp < 0)
-			return tmp;
+	if (!desc || !detail) {
+		dev_dbg (&intf->dev, "missing cdc mdlm %s%sdescriptor\n",
+			desc ? "" : "func ",
+			detail ? "" : "detail ");
+		goto bad_desc;
 	}
-	
-	dev->in = usb_rcvbulkpipe (dev->udev,
-			in->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK);
-	dev->out = usb_sndbulkpipe (dev->udev,
-			out->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK);
-	dev->status = status;
-	return 0;
-}
-EXPORT_SYMBOL_GPL(usbnet_get_endpoints);
-
-static void intr_complete (struct urb *urb, struct pt_regs *regs);
-
-static int init_status (struct usbnet *dev, struct usb_interface *intf)
-{
-	char		*buf = NULL;
-	unsigned	pipe = 0;
-	unsigned	maxp;
-	unsigned	period;
-
-	if (!dev->driver_info->status)
-		return 0;
-
-	pipe = usb_rcvintpipe (dev->udev,
-			dev->status->desc.bEndpointAddress
-				& USB_ENDPOINT_NUMBER_MASK);
-	maxp = usb_maxpacket (dev->udev, pipe, 0);
 
-	/* avoid 1 msec chatter:  min 8 msec poll rate */
-	period = max ((int) dev->status->desc.bInterval,
-		(dev->udev->speed == USB_SPEED_HIGH) ? 7 : 3);
+	/* There's probably a CDC Ethernet descriptor there, but we can't
+	 * rely on the Ethernet address it provides since not all vendors
+	 * bother to make it unique.  Likewise there's no point in tracking
+	 * of the CDC event notifications.
+	 */
+	return get_endpoints (dev, intf);
 
-	buf = kmalloc (maxp, SLAB_KERNEL);
-	if (buf) {
-		dev->interrupt = usb_alloc_urb (0, SLAB_KERNEL);
-		if (!dev->interrupt) {
-			kfree (buf);
-			return -ENOMEM;
-		} else {
-			usb_fill_int_urb(dev->interrupt, dev->udev, pipe,
-				buf, maxp, intr_complete, dev, period);
-			dev_dbg(&intf->dev,
-				"status ep%din, %d bytes period %d\n",
-				usb_pipeendpoint(pipe), maxp, period);
-		}
-	}
-	return  0;
+bad_desc:
+	dev_info (&dev->udev->dev, "unsupported MDLM descriptors\n");
+	return -ENODEV;
 }
 
-/* Passes this packet up the stack, updating its accounting.
- * Some link protocols batch packets, so their rx_fixup paths
- * can return clones as well as just modify the original skb.
- */
-void usbnet_skb_return (struct usbnet *dev, struct sk_buff *skb)
-{
-	int	status;
+static const struct driver_info	bogus_mdlm_info = {
+	.description =	"pseudo-MDLM (BLAN) device",
+	.flags =	FLAG_FRAMING_Z,
+	.check_connect = always_connected,
+	.tx_fixup = 	zaurus_tx_fixup,
+	.bind =		blan_mdlm_bind,
+};
 
-	skb->dev = dev->net;
-	skb->protocol = eth_type_trans (skb, dev->net);
-	dev->stats.rx_packets++;
-	dev->stats.rx_bytes += skb->len;
+#else
 
-	if (netif_msg_rx_status (dev))
-		devdbg (dev, "< rx, len %zu, type 0x%x",
-			skb->len + sizeof (struct ethhdr), skb->protocol);
-	memset (skb->cb, 0, sizeof (struct skb_data));
-	status = netif_rx (skb);
-	if (status != NET_RX_SUCCESS && netif_msg_rx_err (dev))
-		devdbg (dev, "netif_rx status %d", status);
-}
-EXPORT_SYMBOL_GPL(usbnet_skb_return);
+/* blacklist all those devices */
+#define	ZAURUS_STRONGARM_INFO	0
+#define	ZAURUS_PXA_INFO		0
+#define	OLYMPUS_MXL_INFO	0
+
+#endif
 
 
 /*-------------------------------------------------------------------------
@@ -226,12 +2868,22 @@ EXPORT_SYMBOL_GPL(usbnet_skb_return);
 static int usbnet_change_mtu (struct net_device *net, int new_mtu)
 {
 	struct usbnet	*dev = netdev_priv(net);
-	int		ll_mtu = new_mtu + net->hard_header_len;
 
-	if (new_mtu <= 0 || ll_mtu > dev->hard_mtu)
+	if (new_mtu <= MIN_PACKET || new_mtu > MAX_PACKET)
+		return -EINVAL;
+#ifdef	CONFIG_USB_NET1080
+	if (((dev->driver_info->flags) & FLAG_FRAMING_NC)) {
+		if (FRAMED_SIZE (new_mtu) > MAX_PACKET)
+			return -EINVAL;
+	}
+#endif
+#ifdef	CONFIG_USB_GENESYS
+	if (((dev->driver_info->flags) & FLAG_FRAMING_GL)
+			&& new_mtu > GL_MAX_PACKET_LEN)
 		return -EINVAL;
+#endif
 	// no second zero-length packet read wanted after mtu-sized packets
-	if ((ll_mtu % dev->maxpacket) == 0)
+	if (((new_mtu + sizeof (struct ethhdr)) % dev->maxpacket) == 0)
 		return -EDOM;
 	net->mtu = new_mtu;
 	return 0;
@@ -251,18 +2903,19 @@ static struct net_device_stats *usbnet_g
  * completion callbacks.  2.5 should have fixed those bugs...
  */
 
-static void defer_bh(struct usbnet *dev, struct sk_buff *skb, struct sk_buff_head *list)
+static void defer_bh (struct usbnet *dev, struct sk_buff *skb)
 {
+	struct sk_buff_head	*list = skb->list;
 	unsigned long		flags;
 
-	spin_lock_irqsave(&list->lock, flags);
-	__skb_unlink(skb, list);
-	spin_unlock(&list->lock);
-	spin_lock(&dev->done.lock);
-	__skb_queue_tail(&dev->done, skb);
+	spin_lock_irqsave (&list->lock, flags);
+	__skb_unlink (skb, list);
+	spin_unlock (&list->lock);
+	spin_lock (&dev->done.lock);
+	__skb_queue_tail (&dev->done, skb);
 	if (dev->done.qlen == 1)
-		tasklet_schedule(&dev->bh);
-	spin_unlock_irqrestore(&dev->done.lock, flags);
+		tasklet_schedule (&dev->bh);
+	spin_unlock_irqrestore (&dev->done.lock, flags);
 }
 
 /* some work can't be done in tasklets, so we use keventd
@@ -270,7 +2923,7 @@ static void defer_bh(struct usbnet *dev,
  * NOTE:  annoying asymmetry:  if it's active, schedule_work() fails,
  * but tasklet_schedule() doesn't.  hope the failure is rare.
  */
-void usbnet_defer_kevent (struct usbnet *dev, int work)
+static void defer_kevent (struct usbnet *dev, int work)
 {
 	set_bit (work, &dev->flags);
 	if (!schedule_work (&dev->kevent))
@@ -278,7 +2931,6 @@ void usbnet_defer_kevent (struct usbnet 
 	else
 		devdbg (dev, "kevent %d scheduled", work);
 }
-EXPORT_SYMBOL_GPL(usbnet_defer_kevent);
 
 /*-------------------------------------------------------------------------*/
 
@@ -290,12 +2942,39 @@ static void rx_submit (struct usbnet *de
 	struct skb_data		*entry;
 	int			retval = 0;
 	unsigned long		lockflags;
-	size_t			size = dev->rx_urb_size;
+	size_t			size;
+
+#ifdef CONFIG_USB_NET1080
+	if (dev->driver_info->flags & FLAG_FRAMING_NC)
+		size = FRAMED_SIZE (dev->net->mtu);
+	else
+#endif
+#ifdef CONFIG_USB_GENESYS
+	if (dev->driver_info->flags & FLAG_FRAMING_GL)
+		size = GL_RCV_BUF_SIZE;
+	else
+#endif
+#ifdef CONFIG_USB_ZAURUS
+	if (dev->driver_info->flags & FLAG_FRAMING_Z)
+		size = 6 + (sizeof (struct ethhdr) + dev->net->mtu);
+	else
+#endif
+#ifdef CONFIG_USB_RNDIS
+	if (dev->driver_info->flags & FLAG_FRAMING_RN)
+		size = RNDIS_MAX_TRANSFER;
+	else
+#endif
+#ifdef CONFIG_USB_AX8817X
+	if (dev->driver_info->flags & FLAG_FRAMING_AX)
+		size = 2048;
+	else
+#endif
+		size = (sizeof (struct ethhdr) + dev->net->mtu);
 
 	if ((skb = alloc_skb (size + NET_IP_ALIGN, flags)) == NULL) {
 		if (netif_msg_rx_err (dev))
 			devdbg (dev, "no rx skb");
-		usbnet_defer_kevent (dev, EVENT_RX_MEMORY);
+		defer_kevent (dev, EVENT_RX_MEMORY);
 		usb_free_urb (urb);
 		return;
 	}
@@ -309,6 +2988,7 @@ static void rx_submit (struct usbnet *de
 
 	usb_fill_bulk_urb (urb, dev->udev, dev->in,
 		skb->data, size, rx_complete, skb);
+	urb->transfer_flags |= URB_ASYNC_UNLINK;
 
 	spin_lock_irqsave (&dev->rxq.lock, lockflags);
 
@@ -317,10 +2997,10 @@ static void rx_submit (struct usbnet *de
 			&& !test_bit (EVENT_RX_HALT, &dev->flags)) {
 		switch (retval = usb_submit_urb (urb, GFP_ATOMIC)){ 
 		case -EPIPE:
-			usbnet_defer_kevent (dev, EVENT_RX_HALT);
+			defer_kevent (dev, EVENT_RX_HALT);
 			break;
 		case -ENOMEM:
-			usbnet_defer_kevent (dev, EVENT_RX_MEMORY);
+			defer_kevent (dev, EVENT_RX_MEMORY);
 			break;
 		case -ENODEV:
 			if (netif_msg_ifdown (dev))
@@ -358,7 +3038,7 @@ static inline void rx_process (struct us
 	// else network stack removes extra byte if we forced a short packet
 
 	if (skb->len)
-		usbnet_skb_return (dev, skb);
+		skb_return (dev, skb);
 	else {
 		if (netif_msg_rx_err (dev))
 			devdbg (dev, "drop");
@@ -384,7 +3064,7 @@ static void rx_complete (struct urb *urb
 	switch (urb_status) {
 	    // success
 	    case 0:
-		if (skb->len < dev->net->hard_header_len) {
+		if (MIN_PACKET > skb->len || skb->len > MAX_PACKET) {
 			entry->state = rx_cleanup;
 			dev->stats.rx_errors++;
 			dev->stats.rx_length_errors++;
@@ -399,7 +3079,7 @@ static void rx_complete (struct urb *urb
 	    // storm, recovering as needed.
 	    case -EPIPE:
 		dev->stats.rx_errors++;
-		usbnet_defer_kevent (dev, EVENT_RX_HALT);
+		defer_kevent (dev, EVENT_RX_HALT);
 		// FALLTHROUGH
 
 	    // software-driven interface shutdown
@@ -440,7 +3120,7 @@ block:
 		break;
 	}
 
-	defer_bh(dev, skb, &dev->rxq);
+	defer_bh (dev, skb);
 
 	if (urb) {
 		if (netif_running (dev->net)
@@ -547,9 +3227,9 @@ static int usbnet_stop (struct net_devic
 	temp = unlink_urbs (dev, &dev->txq) + unlink_urbs (dev, &dev->rxq);
 
 	// maybe wait for deletions to finish.
-	while (!skb_queue_empty(&dev->rxq) &&
-	       !skb_queue_empty(&dev->txq) &&
-	       !skb_queue_empty(&dev->done)) {
+	while (skb_queue_len (&dev->rxq)
+			&& skb_queue_len (&dev->txq)
+			&& skb_queue_len (&dev->done)) {
 		msleep(UNLINK_TIMEOUT_MS);
 		if (netif_msg_ifdown (dev))
 			devdbg (dev, "waited for %d urb completions", temp);
@@ -641,58 +3321,55 @@ done:
 
 /*-------------------------------------------------------------------------*/
 
-/* ethtool methods; minidrivers may need to add some more, but
- * they'll probably want to use this base set.
- */
-
-void usbnet_get_drvinfo (struct net_device *net, struct ethtool_drvinfo *info)
+static void usbnet_get_drvinfo (struct net_device *net, struct ethtool_drvinfo *info)
 {
 	struct usbnet *dev = netdev_priv(net);
 
-	/* REVISIT don't always return "usbnet" */
 	strncpy (info->driver, driver_name, sizeof info->driver);
 	strncpy (info->version, DRIVER_VERSION, sizeof info->version);
 	strncpy (info->fw_version, dev->driver_info->description,
 		sizeof info->fw_version);
 	usb_make_path (dev->udev, info->bus_info, sizeof info->bus_info);
 }
-EXPORT_SYMBOL_GPL(usbnet_get_drvinfo);
 
 static u32 usbnet_get_link (struct net_device *net)
 {
 	struct usbnet *dev = netdev_priv(net);
 
-	/* If a check_connect is defined, return its result */
+	/* If a check_connect is defined, return it's results */
 	if (dev->driver_info->check_connect)
 		return dev->driver_info->check_connect (dev) == 0;
 
-	/* Otherwise, say we're up (to avoid breaking scripts) */
+	/* Otherwise, we're up to avoid breaking scripts */
 	return 1;
 }
 
-u32 usbnet_get_msglevel (struct net_device *net)
+static u32 usbnet_get_msglevel (struct net_device *net)
 {
 	struct usbnet *dev = netdev_priv(net);
 
 	return dev->msg_enable;
 }
-EXPORT_SYMBOL_GPL(usbnet_get_msglevel);
 
-void usbnet_set_msglevel (struct net_device *net, u32 level)
+static void usbnet_set_msglevel (struct net_device *net, u32 level)
 {
 	struct usbnet *dev = netdev_priv(net);
 
 	dev->msg_enable = level;
 }
-EXPORT_SYMBOL_GPL(usbnet_set_msglevel);
 
-/* drivers may override default ethtool_ops in their bind() routine */
-static struct ethtool_ops usbnet_ethtool_ops = {
-	.get_drvinfo		= usbnet_get_drvinfo,
-	.get_link		= usbnet_get_link,
-	.get_msglevel		= usbnet_get_msglevel,
-	.set_msglevel		= usbnet_set_msglevel,
-};
+static int usbnet_ioctl (struct net_device *net, struct ifreq *rq, int cmd)
+{
+#ifdef NEED_MII
+	{
+	struct usbnet *dev = netdev_priv(net);
+
+	if (dev->mii.mdio_read != NULL && dev->mii.mdio_write != NULL)
+		return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL);
+	}
+#endif
+	return -EOPNOTSUPP;
+}
 
 /*-------------------------------------------------------------------------*/
 
@@ -711,24 +3388,19 @@ kevent (void *data)
 	if (test_bit (EVENT_TX_HALT, &dev->flags)) {
 		unlink_urbs (dev, &dev->txq);
 		status = usb_clear_halt (dev->udev, dev->out);
-		if (status < 0
-				&& status != -EPIPE
-				&& status != -ESHUTDOWN) {
+		if (status < 0 && status != -EPIPE) {
 			if (netif_msg_tx_err (dev))
 				deverr (dev, "can't clear tx halt, status %d",
 					status);
 		} else {
 			clear_bit (EVENT_TX_HALT, &dev->flags);
-			if (status != -ESHUTDOWN)
-				netif_wake_queue (dev->net);
+			netif_wake_queue (dev->net);
 		}
 	}
 	if (test_bit (EVENT_RX_HALT, &dev->flags)) {
 		unlink_urbs (dev, &dev->rxq);
 		status = usb_clear_halt (dev->udev, dev->in);
-		if (status < 0
-				&& status != -EPIPE
-				&& status != -ESHUTDOWN) {
+		if (status < 0 && status != -EPIPE) {
 			if (netif_msg_rx_err (dev))
 				deverr (dev, "can't clear rx halt, status %d",
 					status);
@@ -787,7 +3459,7 @@ static void tx_complete (struct urb *urb
 
 		switch (urb->status) {
 		case -EPIPE:
-			usbnet_defer_kevent (dev, EVENT_TX_HALT);
+			defer_kevent (dev, EVENT_TX_HALT);
 			break;
 
 		/* software-driven interface shutdown */
@@ -818,7 +3490,7 @@ static void tx_complete (struct urb *urb
 
 	urb->dev = NULL;
 	entry->state = tx_done;
-	defer_bh(dev, skb, &dev->txq);
+	defer_bh (dev, skb);
 }
 
 /*-------------------------------------------------------------------------*/
@@ -844,6 +3516,10 @@ static int usbnet_start_xmit (struct sk_
 	struct skb_data		*entry;
 	struct driver_info	*info = dev->driver_info;
 	unsigned long		flags;
+#ifdef	CONFIG_USB_NET1080
+	struct nc_header	*header = NULL;
+	struct nc_trailer	*trailer = NULL;
+#endif	/* CONFIG_USB_NET1080 */
 
 	// some devices want funky USB-level framing, for
 	// win32 driver (usually) and/or hardware quirks
@@ -869,8 +3545,24 @@ static int usbnet_start_xmit (struct sk_
 	entry->state = tx_start;
 	entry->length = length;
 
+	// FIXME: reorganize a bit, so that fixup() fills out NetChip
+	// framing too. (Packet ID update needs the spinlock...)
+	// [ BETTER:  we already own net->xmit_lock, that's enough ]
+
+#ifdef	CONFIG_USB_NET1080
+	if (info->flags & FLAG_FRAMING_NC) {
+		header = (struct nc_header *) skb_push (skb, sizeof *header);
+		header->hdr_len = cpu_to_le16 (sizeof (*header));
+		header->packet_len = cpu_to_le16 (length);
+		if (!((skb->len + sizeof *trailer) & 0x01))
+			*skb_put (skb, 1) = PAD_BYTE;
+		trailer = (struct nc_trailer *) skb_put (skb, sizeof *trailer);
+	}
+#endif	/* CONFIG_USB_NET1080 */
+
 	usb_fill_bulk_urb (urb, dev->udev, dev->out,
 			skb->data, skb->len, tx_complete, skb);
+	urb->transfer_flags |= URB_ASYNC_UNLINK;
 
 	/* don't assume the hardware handles USB_ZERO_PACKET
 	 * NOTE:  strictly conforming cdc-ether devices should expect
@@ -883,10 +3575,22 @@ static int usbnet_start_xmit (struct sk_
 
 	spin_lock_irqsave (&dev->txq.lock, flags);
 
+#ifdef	CONFIG_USB_NET1080
+	if (info->flags & FLAG_FRAMING_NC) {
+		header->packet_id = cpu_to_le16 ((u16)dev->dev_packet_id++);
+		put_unaligned (header->packet_id, &trailer->packet_id);
+#if 0
+		devdbg (dev, "frame >tx h %d p %d id %d",
+			header->hdr_len, header->packet_len,
+			header->packet_id);
+#endif
+	}
+#endif	/* CONFIG_USB_NET1080 */
+
 	switch ((retval = usb_submit_urb (urb, GFP_ATOMIC))) {
 	case -EPIPE:
 		netif_stop_queue (net);
-		usbnet_defer_kevent (dev, EVENT_TX_HALT);
+		defer_kevent (dev, EVENT_TX_HALT);
 		break;
 	default:
 		if (netif_msg_tx_err (dev))
@@ -989,7 +3693,7 @@ static void usbnet_bh (unsigned long par
  
 // precondition: never called in_interrupt
 
-void usbnet_disconnect (struct usb_interface *intf)
+static void usbnet_disconnect (struct usb_interface *intf)
 {
 	struct usbnet		*dev;
 	struct usb_device	*xdev;
@@ -1003,8 +3707,7 @@ void usbnet_disconnect (struct usb_inter
 	xdev = interface_to_usbdev (intf);
 
 	if (netif_msg_probe (dev))
-		devinfo (dev, "unregister '%s' usb-%s-%s, %s",
-			intf->dev.driver->name,
+		devinfo (dev, "unregister usbnet usb-%s-%s, %s",
 			xdev->bus->bus_name, xdev->devpath,
 			dev->driver_info->description);
 	
@@ -1020,14 +3723,15 @@ void usbnet_disconnect (struct usb_inter
 	free_netdev(net);
 	usb_put_dev (xdev);
 }
-EXPORT_SYMBOL_GPL(usbnet_disconnect);
 
 
 /*-------------------------------------------------------------------------*/
 
+static struct ethtool_ops usbnet_ethtool_ops;
+
 // precondition: never called in_interrupt
 
-int
+static int
 usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
 {
 	struct usbnet			*dev;
@@ -1076,10 +3780,6 @@ usbnet_probe (struct usb_interface *udev
 	strcpy (net->name, "usb%d");
 	memcpy (net->dev_addr, node_id, sizeof node_id);
 
-	/* rx and tx sides can use different message sizes;
-	 * bind() should set rx_urb_size in that case.
-	 */
-	dev->hard_mtu = net->mtu + net->hard_header_len;
 #if 0
 // dma_supported() is deeply broken on almost all architectures
 	// possible with some EHCI controllers
@@ -1094,6 +3794,7 @@ usbnet_probe (struct usb_interface *udev
 	net->stop = usbnet_stop;
 	net->watchdog_timeo = TX_TIMEOUT_JIFFIES;
 	net->tx_timeout = usbnet_tx_timeout;
+	net->do_ioctl = usbnet_ioctl;
 	net->ethtool_ops = &usbnet_ethtool_ops;
 
 	// allow device-specific bind/init procedures
@@ -1105,13 +3806,9 @@ usbnet_probe (struct usb_interface *udev
 		// can rename the link if it knows better.
 		if ((dev->driver_info->flags & FLAG_ETHER) != 0
 				&& (net->dev_addr [0] & 0x02) == 0)
-			strcpy (net->name, "eth%d");
-
-		/* maybe the remote can't receive an Ethernet MTU */
-		if (net->mtu > (dev->hard_mtu - net->hard_header_len))
-			net->mtu = dev->hard_mtu - net->hard_header_len;
-	} else if (!info->in || !info->out)
-		status = usbnet_get_endpoints (dev, udev);
+			strcpy (net->name, "usb%d");
+	} else if (!info->in || info->out)
+		status = get_endpoints (dev, udev);
 	else {
 		dev->in = usb_rcvbulkpipe (xdev, info->in);
 		dev->out = usb_sndbulkpipe (xdev, info->out);
@@ -1123,13 +3820,12 @@ usbnet_probe (struct usb_interface *udev
 			status = 0;
 
 	}
+
 	if (status == 0 && dev->status)
 		status = init_status (dev, udev);
 	if (status < 0)
 		goto out1;
 
-	if (!dev->rx_urb_size)
-		dev->rx_urb_size = dev->hard_mtu;
 	dev->maxpacket = usb_maxpacket (dev->udev, dev->out, 1);
 	
 	SET_NETDEV_DEV(net, &udev->dev);
@@ -1137,9 +3833,8 @@ usbnet_probe (struct usb_interface *udev
 	if (status)
 		goto out3;
 	if (netif_msg_probe (dev))
-		devinfo (dev, "register '%s' at usb-%s-%s, %s, "
+		devinfo (dev, "register usbnet at usb-%s-%s, %s, "
 				"%02x:%02x:%02x:%02x:%02x:%02x",
-			udev->dev.driver->name,
 			xdev->bus->bus_name, xdev->devpath,
 			dev->driver_info->description,
 			net->dev_addr [0], net->dev_addr [1],
@@ -1163,15 +3858,12 @@ out:
 	usb_put_dev(xdev);
 	return status;
 }
-EXPORT_SYMBOL_GPL(usbnet_probe);
 
 /*-------------------------------------------------------------------------*/
 
-/* FIXME these suspend/resume methods assume non-CDC style
- * devices, with only one interface.
- */
+#ifdef	CONFIG_PM
 
-int usbnet_suspend (struct usb_interface *intf, pm_message_t message)
+static int usbnet_suspend (struct usb_interface *intf, pm_message_t message)
 {
 	struct usbnet		*dev = usb_get_intfdata(intf);
 	
@@ -1181,39 +3873,373 @@ int usbnet_suspend (struct usb_interface
 	netif_device_detach (dev->net);
 	(void) unlink_urbs (dev, &dev->rxq);
 	(void) unlink_urbs (dev, &dev->txq);
+	intf->dev.power.power_state = PMSG_SUSPEND;
 	return 0;
 }
-EXPORT_SYMBOL_GPL(usbnet_suspend);
 
-int usbnet_resume (struct usb_interface *intf)
+static int usbnet_resume (struct usb_interface *intf)
 {
 	struct usbnet		*dev = usb_get_intfdata(intf);
 
+	intf->dev.power.power_state = PMSG_ON;
 	netif_device_attach (dev->net);
 	tasklet_schedule (&dev->bh);
 	return 0;
 }
-EXPORT_SYMBOL_GPL(usbnet_resume);
 
+#else	/* !CONFIG_PM */
+
+#define	usbnet_suspend	NULL
+#define	usbnet_resume	NULL
+
+#endif	/* CONFIG_PM */
+
+/*-------------------------------------------------------------------------*/
+
+#ifndef	HAVE_HARDWARE
+#error You need to configure some hardware for this driver
+#endif
+
+/*
+ * chip vendor names won't normally be on the cables, and
+ * may not be on the device.
+ */
+
+static const struct usb_device_id	products [] = {
+
+#ifdef	CONFIG_USB_ALI_M5632
+{
+	USB_DEVICE (0x0402, 0x5632),	// ALi defaults
+	.driver_info =	(unsigned long) &ali_m5632_info,
+},
+#endif
+
+#ifdef	CONFIG_USB_AN2720
+{
+	USB_DEVICE (0x0547, 0x2720),	// AnchorChips defaults
+	.driver_info =	(unsigned long) &an2720_info,
+}, {
+	USB_DEVICE (0x0547, 0x2727),	// Xircom PGUNET
+	.driver_info =	(unsigned long) &an2720_info,
+},
+#endif
+
+#ifdef	CONFIG_USB_BELKIN
+{
+	USB_DEVICE (0x050d, 0x0004),	// Belkin
+	.driver_info =	(unsigned long) &belkin_info,
+}, {
+	USB_DEVICE (0x056c, 0x8100),	// eTEK
+	.driver_info =	(unsigned long) &belkin_info,
+}, {
+	USB_DEVICE (0x0525, 0x9901),	// Advance USBNET (eTEK)
+	.driver_info =	(unsigned long) &belkin_info,
+},
+#endif
+
+#ifdef CONFIG_USB_AX8817X
+{
+	// Linksys USB200M
+	USB_DEVICE (0x077b, 0x2226),
+	.driver_info =	(unsigned long) &ax8817x_info,
+}, {
+	// Netgear FA120
+	USB_DEVICE (0x0846, 0x1040),
+	.driver_info =  (unsigned long) &netgear_fa120_info,
+}, {
+	// DLink DUB-E100
+	USB_DEVICE (0x2001, 0x1a00),
+	.driver_info =  (unsigned long) &dlink_dub_e100_info,
+}, {
+	// Intellinet, ST Lab USB Ethernet
+	USB_DEVICE (0x0b95, 0x1720),
+	.driver_info =  (unsigned long) &ax8817x_info,
+}, {
+	// Hawking UF200, TrendNet TU2-ET100
+	USB_DEVICE (0x07b8, 0x420a),
+	.driver_info =  (unsigned long) &hawking_uf200_info,
+}, {
+        // Billionton Systems, USB2AR 
+        USB_DEVICE (0x08dd, 0x90ff),
+        .driver_info =  (unsigned long) &ax8817x_info,
+}, {
+	// ATEN UC210T
+	USB_DEVICE (0x0557, 0x2009),
+	.driver_info =  (unsigned long) &ax8817x_info,
+}, {
+	// Buffalo LUA-U2-KTX
+	USB_DEVICE (0x0411, 0x003d),
+	.driver_info =  (unsigned long) &ax8817x_info,
+}, {
+	// Sitecom LN-029 "USB 2.0 10/100 Ethernet adapter"
+	USB_DEVICE (0x6189, 0x182d),
+	.driver_info =  (unsigned long) &ax8817x_info,
+}, {
+	// corega FEther USB2-TX
+	USB_DEVICE (0x07aa, 0x0017),
+	.driver_info =  (unsigned long) &ax8817x_info,
+}, {
+	// Surecom EP-1427X-2
+	USB_DEVICE (0x1189, 0x0893),
+	.driver_info = (unsigned long) &ax8817x_info,
+}, {
+	// goodway corp usb gwusb2e
+	USB_DEVICE (0x1631, 0x6200),
+	.driver_info = (unsigned long) &ax8817x_info,
+}, {
+	// ASIX AX88772 10/100
+        USB_DEVICE (0x0b95, 0x7720),
+        .driver_info = (unsigned long) &ax88772_info,
+},
+#endif
+
+#ifdef	CONFIG_USB_EPSON2888
+{
+	USB_DEVICE (0x0525, 0x2888),	// EPSON USB client
+	.driver_info	= (unsigned long) &epson2888_info,
+},
+#endif
+
+#ifdef	CONFIG_USB_GENESYS
+{
+	USB_DEVICE (0x05e3, 0x0502),	// GL620USB-A
+	.driver_info =	(unsigned long) &genelink_info,
+},
+	/* NOT: USB_DEVICE (0x05e3, 0x0501),	// GL620USB
+	 * that's half duplex, not currently supported
+	 */
+#endif
+
+#ifdef	CONFIG_USB_NET1080
+{
+	USB_DEVICE (0x0525, 0x1080),	// NetChip ref design
+	.driver_info =	(unsigned long) &net1080_info,
+}, {
+	USB_DEVICE (0x06D0, 0x0622),	// Laplink Gold
+	.driver_info =	(unsigned long) &net1080_info,
+},
+#endif
+
+#ifdef CONFIG_USB_PL2301
+{
+	USB_DEVICE (0x067b, 0x0000),	// PL-2301
+	.driver_info =	(unsigned long) &prolific_info,
+}, {
+	USB_DEVICE (0x067b, 0x0001),	// PL-2302
+	.driver_info =	(unsigned long) &prolific_info,
+}, {
+	USB_DEVICE (0x067b, 0x2502),	// PL-2502
+	.driver_info =	(unsigned long) &prolific_info,
+},
+#endif
+
+#ifdef CONFIG_USB_KC2190
+{
+	USB_DEVICE (0x050f, 0x0190),	// KC-190
+	.driver_info =	(unsigned long) &kc2190_info,
+},
+#endif
+
+#ifdef	CONFIG_USB_RNDIS
+{
+	/* RNDIS is MSFT's un-official variant of CDC ACM */
+	USB_INTERFACE_INFO (USB_CLASS_COMM, 2 /* ACM */, 0x0ff),
+	.driver_info = (unsigned long) &rndis_info,
+},
+#endif
+
+#ifdef	CONFIG_USB_ARMLINUX
+/*
+ * SA-1100 using standard ARM Linux kernels, or compatible.
+ * Often used when talking to Linux PDAs (iPaq, Yopy, etc).
+ * The sa-1100 "usb-eth" driver handles the basic framing.
+ *
+ * PXA25x or PXA210 ...  these use a "usb-eth" driver much like
+ * the sa1100 one, but hardware uses different endpoint numbers.
+ *
+ * Or the Linux "Ethernet" gadget on hardware that can't talk
+ * CDC Ethernet (e.g., no altsettings), in either of two modes:
+ *  - acting just like the old "usb-eth" firmware, though
+ *    the implementation is different 
+ *  - supporting RNDIS as the first/default configuration for
+ *    MS-Windows interop; Linux needs to use the other config
+ */
+{
+	// 1183 = 0x049F, both used as hex values?
+	// Compaq "Itsy" vendor/product id
+	USB_DEVICE (0x049F, 0x505A),	// usb-eth, or compatible
+	.driver_info =	(unsigned long) &linuxdev_info,
+}, {
+	USB_DEVICE (0x0E7E, 0x1001),	// G.Mate "Yopy"
+	.driver_info =	(unsigned long) &yopy_info,
+}, {
+	USB_DEVICE (0x8086, 0x07d3),	// "blob" bootloader
+	.driver_info =	(unsigned long) &blob_info,
+}, {
+	// Linux Ethernet/RNDIS gadget on pxa210/25x/26x
+	// e.g. Gumstix, current OpenZaurus, ...
+	USB_DEVICE_VER (0x0525, 0xa4a2, 0x0203, 0x0203),
+	.driver_info =	(unsigned long) &linuxdev_info,
+}, 
+#endif
+
+#if	defined(CONFIG_USB_ZAURUS) || defined(CONFIG_USB_CDCETHER)
+/*
+ * SA-1100 based Sharp Zaurus ("collie"), or compatible.
+ * Same idea as above, but different framing.
+ *
+ * PXA-2xx based models are also lying-about-cdc.
+ * Some models don't even tell the same lies ...
+ *
+ * NOTE:  OpenZaurus versions with 2.6 kernels won't use these entries,
+ * unlike the older ones with 2.4 "embedix" kernels.
+ *
+ * NOTE:  These entries do double-duty, serving as blacklist entries
+ * whenever Zaurus support isn't enabled, but CDC Ethernet is.
+ */
+#define	ZAURUS_MASTER_INTERFACE \
+	.bInterfaceClass	= USB_CLASS_COMM, \
+	.bInterfaceSubClass	= USB_CDC_SUBCLASS_ETHERNET, \
+	.bInterfaceProtocol	= USB_CDC_PROTO_NONE
+{
+	.match_flags	=   USB_DEVICE_ID_MATCH_INT_INFO
+			  | USB_DEVICE_ID_MATCH_DEVICE, 
+	.idVendor		= 0x04DD,
+	.idProduct		= 0x8004,
+	ZAURUS_MASTER_INTERFACE,
+	.driver_info = ZAURUS_STRONGARM_INFO,
+}, {
+	.match_flags	=   USB_DEVICE_ID_MATCH_INT_INFO
+			  | USB_DEVICE_ID_MATCH_DEVICE, 
+	.idVendor		= 0x04DD,
+	.idProduct		= 0x8005,	/* A-300 */
+	ZAURUS_MASTER_INTERFACE,
+	.driver_info = ZAURUS_PXA_INFO,
+}, {
+	.match_flags	=   USB_DEVICE_ID_MATCH_INT_INFO
+			  | USB_DEVICE_ID_MATCH_DEVICE, 
+	.idVendor		= 0x04DD,
+	.idProduct		= 0x8006,	/* B-500/SL-5600 */
+	ZAURUS_MASTER_INTERFACE,
+	.driver_info = ZAURUS_PXA_INFO,
+}, {
+	.match_flags    =   USB_DEVICE_ID_MATCH_INT_INFO
+	          | USB_DEVICE_ID_MATCH_DEVICE,
+	.idVendor		= 0x04DD,
+	.idProduct		= 0x8007,	/* C-700 */
+	ZAURUS_MASTER_INTERFACE,
+	.driver_info = ZAURUS_PXA_INFO,
+}, {
+	.match_flags    =   USB_DEVICE_ID_MATCH_INT_INFO
+		 | USB_DEVICE_ID_MATCH_DEVICE,
+	.idVendor               = 0x04DD,
+	.idProduct              = 0x9031,	/* C-750 C-760 */
+	ZAURUS_MASTER_INTERFACE,
+	.driver_info = ZAURUS_PXA_INFO,
+}, {
+	.match_flags    =   USB_DEVICE_ID_MATCH_INT_INFO
+		 | USB_DEVICE_ID_MATCH_DEVICE,
+	.idVendor               = 0x04DD,
+	.idProduct              = 0x9032,	/* SL-6000 */
+	ZAURUS_MASTER_INTERFACE,
+	.driver_info = ZAURUS_PXA_INFO,
+}, {
+	.match_flags    =   USB_DEVICE_ID_MATCH_INT_INFO
+		 | USB_DEVICE_ID_MATCH_DEVICE,
+	.idVendor               = 0x04DD,
+	/* reported with some C860 units */
+	.idProduct              = 0x9050,	/* C-860 */
+	ZAURUS_MASTER_INTERFACE,
+	.driver_info = ZAURUS_PXA_INFO,
+},
+
+#ifdef	CONFIG_USB_ZAURUS
+	/* At least some (reports vary) PXA units have very different lies
+	 * about their standards support:  they claim to be cell phones with
+	 * direct access to their radios.  (They don't conform to CDC MDLM.)
+	 */
+{
+	USB_INTERFACE_INFO (USB_CLASS_COMM, USB_CDC_SUBCLASS_MDLM,
+			USB_CDC_PROTO_NONE),
+	.driver_info = (unsigned long) &bogus_mdlm_info,
+},
+#endif
+
+/* Olympus has some models with a Zaurus-compatible option.
+ * R-1000 uses a FreeScale i.MXL cpu (ARMv4T)
+ */
+{
+	.match_flags    =   USB_DEVICE_ID_MATCH_INT_INFO
+		 | USB_DEVICE_ID_MATCH_DEVICE,
+	.idVendor               = 0x07B4,
+	.idProduct              = 0x0F02,	/* R-1000 */
+	ZAURUS_MASTER_INTERFACE,
+	.driver_info = OLYMPUS_MXL_INFO,
+},
+#endif
+
+#ifdef	CONFIG_USB_CDCETHER
+{
+	/* CDC Ether uses two interfaces, not necessarily consecutive.
+	 * We match the main interface, ignoring the optional device
+	 * class so we could handle devices that aren't exclusively
+	 * CDC ether.
+	 *
+	 * NOTE:  this match must come AFTER entries working around
+	 * bugs/quirks in a given product (like Zaurus, above).
+	 */
+	USB_INTERFACE_INFO (USB_CLASS_COMM, USB_CDC_SUBCLASS_ETHERNET,
+			USB_CDC_PROTO_NONE),
+	.driver_info = (unsigned long) &cdc_info,
+},
+#endif
+
+	{ },		// END
+};
+MODULE_DEVICE_TABLE (usb, products);
+
+static struct usb_driver usbnet_driver = {
+	.owner =	THIS_MODULE,
+	.name =		driver_name,
+	.id_table =	products,
+	.probe =	usbnet_probe,
+	.disconnect =	usbnet_disconnect,
+	.suspend =	usbnet_suspend,
+	.resume =	usbnet_resume,
+};
+
+/* Default ethtool_ops assigned.  Devices can override in their bind() routine */
+static struct ethtool_ops usbnet_ethtool_ops = {
+	.get_drvinfo		= usbnet_get_drvinfo,
+	.get_link		= usbnet_get_link,
+	.get_msglevel		= usbnet_get_msglevel,
+	.set_msglevel		= usbnet_set_msglevel,
+};
 
 /*-------------------------------------------------------------------------*/
 
-static int __init usbnet_init(void)
+static int __init usbnet_init (void)
 {
-	/* compiler should optimize this out */
+	// compiler should optimize these out
 	BUG_ON (sizeof (((struct sk_buff *)0)->cb)
 			< sizeof (struct skb_data));
+#ifdef	CONFIG_USB_CDCETHER
+	BUG_ON ((sizeof (((struct usbnet *)0)->data)
+			< sizeof (struct cdc_state)));
+#endif
 
 	random_ether_addr(node_id);
- 	return 0;
+
+ 	return usb_register(&usbnet_driver);
 }
-module_init(usbnet_init);
+module_init (usbnet_init);
 
-static void __exit usbnet_exit(void)
+static void __exit usbnet_exit (void)
 {
+ 	usb_deregister (&usbnet_driver);
 }
-module_exit(usbnet_exit);
+module_exit (usbnet_exit);
 
-MODULE_AUTHOR("David Brownell");
-MODULE_DESCRIPTION("USB network driver framework");
-MODULE_LICENSE("GPL");
+MODULE_AUTHOR ("David Brownell <dbrownell@users.sourceforge.net>");
+MODULE_DESCRIPTION ("USB Host-to-Host Link Drivers (numerous vendors)");
+MODULE_LICENSE ("GPL");
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/include/linux/signal.h stblinux-2.6.12/include/linux/signal.h
--- stblinux-2.6.12.org/include/linux/signal.h	2007-02-03 05:45:39.000000000 +0900
+++ stblinux-2.6.12/include/linux/signal.h	2008-05-28 13:47:52.000000000 +0900
@@ -234,6 +234,14 @@ extern int sigprocmask(int, sigset_t *, 
 struct pt_regs;
 extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie);
 
+/* for debug (by SHARP) */
+#define DEBUG_ON_ERROR_SIGNAL
+
+#if defined(DEBUG_ON_ERROR_SIGNAL)
+extern unsigned char dbglasterr_buf[1024];
+extern int embed_break(struct pt_regs *);
+#endif
+
 #endif /* __KERNEL__ */
 
 #endif /* _LINUX_SIGNAL_H */
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/include/linux/sysctl.h stblinux-2.6.12/include/linux/sysctl.h
--- stblinux-2.6.12.org/include/linux/sysctl.h	2007-02-03 05:45:39.000000000 +0900
+++ stblinux-2.6.12/include/linux/sysctl.h	2008-05-28 13:47:52.000000000 +0900
@@ -136,6 +136,9 @@ enum
 	KERN_UNKNOWN_NMI_PANIC=66, /* int: unknown nmi panic flag */
 	KERN_BOOTLOADER_TYPE=67, /* int: boot loader type */
 	KERN_RANDOMIZE=68, /* int: randomize virtual address space */
+#ifdef DEBUG_ON_ERROR_SIGNAL
+	KERN_DBGLASTERR=99,    /* string: dbglasterr */
+#endif
 };
 
 
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/init/main.c stblinux-2.6.12/init/main.c
--- stblinux-2.6.12.org/init/main.c	2007-02-03 05:46:35.000000000 +0900
+++ stblinux-2.6.12/init/main.c	2008-05-28 13:48:50.000000000 +0900
@@ -431,8 +431,10 @@ asmlinkage void __init start_kernel(void
  */
 	lock_kernel();
 	page_address_init();
+#ifdef KERNEL_BOOT_LOG_ON
 	printk(KERN_NOTICE);
 	printk(linux_banner);
+#endif
 	setup_arch(&command_line);
 	setup_per_cpu_areas();
 
@@ -455,7 +457,9 @@ asmlinkage void __init start_kernel(void
 	preempt_disable();
 	build_all_zonelists();
 	page_alloc_init();
+#ifdef KERNEL_BOOT_LOG_ON
 	printk(KERN_NOTICE "Kernel command line: %s\n", saved_command_line);
+#endif
 	parse_early_param();
 	parse_args("Booting kernel", command_line, __start___param,
 		   __stop___param - __start___param,
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/kernel/pid.c stblinux-2.6.12/kernel/pid.c
--- stblinux-2.6.12.org/kernel/pid.c	2007-02-03 05:46:37.000000000 +0900
+++ stblinux-2.6.12/kernel/pid.c	2008-05-28 13:45:56.000000000 +0900
@@ -266,9 +266,11 @@ void __init pidhash_init(void)
 	pidhash_shift = min(12, pidhash_shift);
 	pidhash_size = 1 << pidhash_shift;
 
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("PID hash table entries: %d (order: %d, %Zd bytes)\n",
 		pidhash_size, pidhash_shift,
 		PIDTYPE_MAX * pidhash_size * sizeof(struct hlist_head));
+#endif
 
 	for (i = 0; i < PIDTYPE_MAX; i++) {
 		pid_hash[i] = alloc_bootmem(pidhash_size *
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/kernel/sysctl.c stblinux-2.6.12/kernel/sysctl.c
--- stblinux-2.6.12.org/kernel/sysctl.c	2007-02-03 05:46:38.000000000 +0900
+++ stblinux-2.6.12/kernel/sysctl.c	2008-05-28 13:45:56.000000000 +0900
@@ -395,8 +395,8 @@ static ctl_table kern_table[] = {
 		.procname	= "hotplug",
 		.data		= &hotplug_path,
 		.maxlen		= HOTPLUG_PATH_LEN,
-		.mode		= 0644,
-		.proc_handler	= &proc_dostring,
+		.mode		  = 0644,
+		.proc_handler = &proc_dostring,
 		.strategy	= &sysctl_string,
 	},
 #endif
@@ -642,6 +642,17 @@ static ctl_table kern_table[] = {
 		.mode		= 0644,
 		.proc_handler	= &proc_dointvec,
 	},
+#ifdef DEBUG_ON_ERROR_SIGNAL 
+	{
+		.ctl_name	= KERN_DBGLASTERR,
+		.procname	= "dbglasterr", 
+		.data		= dbglasterr_buf,
+		.maxlen	    = sizeof(dbglasterr_buf),
+		.mode		  = 0444,
+		.proc_handler = &proc_dostring, 
+		.strategy	= 	&sysctl_string,
+	},
+#endif /* DEBUG_ON_ERROR_SIGNAL */
 
 	{ .ctl_name = 0 }
 };
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/mm/page_alloc.c stblinux-2.6.12/mm/page_alloc.c
--- stblinux-2.6.12.org/mm/page_alloc.c	2007-02-03 05:46:42.000000000 +0900
+++ stblinux-2.6.12/mm/page_alloc.c	2008-05-28 13:49:45.000000000 +0900
@@ -1512,7 +1512,9 @@ void __init build_all_zonelists(void)
 
 	for_each_online_node(i)
 		build_zonelists(NODE_DATA(i));
+#ifdef KERNEL_BOOT_LOG_ON
 	printk("Built %i zonelists\n", num_online_nodes());
+#endif
 	cpuset_init_current_mems_allowed();
 }
 
@@ -1575,7 +1577,9 @@ static void __init calculate_zone_totalp
 		for (i = 0; i < MAX_NR_ZONES; i++)
 			realtotalpages -= zholes_size[i];
 	pgdat->node_present_pages = realtotalpages;
+#ifdef KERNEL_BOOT_LOG_ON
 	printk(KERN_DEBUG "On node %d totalpages: %lu\n", pgdat->node_id, realtotalpages);
+#endif
 }
 
 
@@ -1705,8 +1709,10 @@ static void __init free_area_init_core(s
 			pcp->batch = 1 * batch;
 			INIT_LIST_HEAD(&pcp->list);
 		}
+#ifdef KERNEL_BOOT_LOG_ON
 		printk(KERN_DEBUG "  %s zone: %lu pages, LIFO batch:%lu\n",
 				zone_names[j], realsize, batch);
+#endif
 		INIT_LIST_HEAD(&zone->active_list);
 		INIT_LIST_HEAD(&zone->inactive_list);
 		zone->nr_scan_active = 0;
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/net/ipv4/tcp_ipv4.c stblinux-2.6.12/net/ipv4/tcp_ipv4.c
--- stblinux-2.6.12.org/net/ipv4/tcp_ipv4.c	2007-02-03 05:46:55.000000000 +0900
+++ stblinux-2.6.12/net/ipv4/tcp_ipv4.c	2008-05-28 13:48:20.000000000 +0900
@@ -216,8 +216,11 @@ static int tcp_v4_get_port(struct sock *
 
 	local_bh_disable();
 	if (!snum) {
+//070202
 		int low = sysctl_local_port_range[0];
-		int high = sysctl_local_port_range[1];
+//		int high = sysctl_local_port_range[1];
+		int high = ( sysctl_local_port_range[0] + sysctl_local_port_range[1] ) / 2 - 1;
+//070202
 		int remaining = (high - low) + 1;
 		int rover;
 
@@ -643,7 +646,7 @@ static inline u32 connect_port_offset(co
 {
 	const struct inet_sock *inet = inet_sk(sk);
 
-	return secure_tcp_port_ephemeral(inet->rcv_saddr, inet->daddr, 
+	return secure_tcp_port_ephemeral(inet->rcv_saddr, inet->daddr,
 					 inet->dport);
 }
 
@@ -658,19 +661,35 @@ static inline int tcp_v4_hash_connect(st
 	int ret;
 
  	if (!snum) {
- 		int low = sysctl_local_port_range[0];
- 		int high = sysctl_local_port_range[1];
+// 070202
+		int low = sysctl_local_port_range[0];
+//		int high = sysctl_local_port_range[1];
+		int high = ( sysctl_local_port_range[0] + sysctl_local_port_range[1] ) / 2 - 1;
 		int range = high - low;
  		int i;
 		int port;
 		static u32 hint;
-		u32 offset = hint + connect_port_offset(sk);
+//		u32 offset = hint + connect_port_offset(sk);
+		static u32 port_offset;
+		static u32 port_offset_seed;
+		u32 port_offset_new;
+		u32 offset;
+		port_offset_new = connect_port_offset(sk);
+		if(port_offset != port_offset_new)
+		{
+			port_offset_seed += (port_offset_new & 0x1ff);
+			port_offset = port_offset_new;
+		}
+		offset = hint + port_offset_seed;
+// 070202
 		struct hlist_node *node;
  		struct tcp_tw_bucket *tw = NULL;
 
  		local_bh_disable();
 		for (i = 1; i <= range; i++) {
 			port = low + (i + offset) % range;
+//printk(KERN_INFO "IPv4 port=0x%x(%d)  i=%d offset=0x%x hint= 0x%x(%d)  port_offset=0x%x(%d) seed=0x%x",port,port,i,offset,hint,hint,port_offset,port_offset,port_offset_seed);
+
  			head = &tcp_bhash[tcp_bhashfn(port)];
  			spin_lock(&head->lock);
 
@@ -681,12 +700,16 @@ static inline int tcp_v4_hash_connect(st
 			tb_for_each(tb, node, &head->chain) {
  				if (tb->port == port) {
  					BUG_TRAP(!hlist_empty(&tb->owners));
- 					if (tb->fastreuse >= 0)
+ 					if (tb->fastreuse >= 0){
  						goto next_port;
+					}
  					if (!__tcp_v4_check_established(sk,
 									port,
 									&tw))
+					{
+//						printk(" ok1");
  						goto ok;
+					}
  					goto next_port;
  				}
  			}
@@ -697,9 +720,11 @@ static inline int tcp_v4_hash_connect(st
  				break;
  			}
  			tb->fastreuse = -1;
+//			printk(" ok2 ");
  			goto ok;
 
  		next_port:
+//printk(" next_port ");
  			spin_unlock(&head->lock);
  		}
  		local_bh_enable();
@@ -707,14 +732,19 @@ static inline int tcp_v4_hash_connect(st
  		return -EADDRNOTAVAIL;
 
 ok:
+//printk(" ok ");
 		hint += i;
 
+//printk(" sport=%d \n", ntohs(inet_sk(sk)->sport));
  		/* Head lock still held and bh's disabled */
  		tcp_bind_hash(sk, tb, port);
+//printk(" sport0=%d \n", ntohs(inet_sk(sk)->sport));
 		if (sk_unhashed(sk)) {
+//printk(" sport1=%d \n", ntohs(inet_sk(sk)->sport));
  			inet_sk(sk)->sport = htons(port);
  			__tcp_v4_hash(sk, 0);
  		}
+//printk(" sport2=%d \n", ntohs(inet_sk(sk)->sport));
  		spin_unlock(&head->lock);
 
  		if (tw) {
@@ -738,6 +768,8 @@ ok:
 		/* No definite answer... Walk to established hash table */
 		ret = __tcp_v4_check_established(sk, snum, NULL);
 out:
+//printk(" out ");
+//printk(" sport3=%d \n", ntohs(inet_sk(sk)->sport));
 		local_bh_enable();
 		return ret;
 	}
@@ -843,7 +875,9 @@ int tcp_v4_connect(struct sock *sk, stru
 
 	inet->id = tp->write_seq ^ jiffies;
 
+//printk(" tcp_connect in sport=%d \n", ntohs(inet_sk(sk)->sport));
 	err = tcp_connect(sk);
+//printk(" tcp_connect in sport=%d \n", ntohs(inet_sk(sk)->sport));
 	rt = NULL;
 	if (err)
 		goto failure;
@@ -1931,7 +1965,7 @@ int tcp_v4_rebuild_header(struct sock *s
 				    .uli_u = { .ports =
 					       { .sport = inet->sport,
 						 .dport = inet->dport } } };
-						
+
 		err = ip_route_output_flow(&rt, &fl, sk, 0);
 	}
 	if (!err) {
@@ -2304,7 +2338,7 @@ static void *established_get_idx(struct 
 	while (rc && pos) {
 		rc = established_get_next(seq, rc);
 		--pos;
-	}		
+	}
 	return rc;
 }
 
@@ -2434,7 +2468,7 @@ int tcp_proc_register(struct tcp_seq_afi
 	afinfo->seq_fops->read		= seq_read;
 	afinfo->seq_fops->llseek	= seq_lseek;
 	afinfo->seq_fops->release	= seq_release_private;
-	
+
 	p = proc_net_fops_create(afinfo->name, S_IRUGO, afinfo->seq_fops);
 	if (p)
 		p->data = afinfo;
@@ -2448,7 +2482,7 @@ void tcp_proc_unregister(struct tcp_seq_
 	if (!afinfo)
 		return;
 	proc_net_remove(afinfo->name);
-	memset(afinfo->seq_fops, 0, sizeof(*afinfo->seq_fops)); 
+	memset(afinfo->seq_fops, 0, sizeof(*afinfo->seq_fops));
 }
 
 static void get_openreq4(struct sock *sk, struct open_request *req,
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/net/ipv6/tcp_ipv6.c stblinux-2.6.12/net/ipv6/tcp_ipv6.c
--- stblinux-2.6.12.org/net/ipv6/tcp_ipv6.c	2007-02-03 05:46:59.000000000 +0900
+++ stblinux-2.6.12/net/ipv6/tcp_ipv6.c	2008-09-01 09:32:35.000000000 +0900
@@ -1,13 +1,13 @@
 /*
  *	TCP over IPv6
- *	Linux INET6 implementation 
+ *	Linux INET6 implementation
  *
  *	Authors:
- *	Pedro Roque		<roque@di.fc.ul.pt>	
+ *	Pedro Roque		<roque@di.fc.ul.pt>
  *
  *	$Id: tcp_ipv6.c,v 1.144 2002/02/01 22:01:04 davem Exp $
  *
- *	Based on: 
+ *	Based on:
  *	linux/net/ipv4/tcp.c
  *	linux/net/ipv4/tcp_input.c
  *	linux/net/ipv4/tcp_output.c
@@ -66,7 +66,7 @@
 
 static void	tcp_v6_send_reset(struct sk_buff *skb);
 static void	tcp_v6_or_send_ack(struct sk_buff *skb, struct open_request *req);
-static void	tcp_v6_send_check(struct sock *sk, struct tcphdr *th, int len, 
+static void	tcp_v6_send_check(struct sock *sk, struct tcphdr *th, int len,
 				  struct sk_buff *skb);
 
 static int	tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb);
@@ -133,8 +133,11 @@ static int tcp_v6_get_port(struct sock *
 
 	local_bh_disable();
 	if (snum == 0) {
-		int low = sysctl_local_port_range[0];
+// 070202
+//		int low = sysctl_local_port_range[0];
+		int low = ( sysctl_local_port_range[1] + sysctl_local_port_range[0] ) / 2 + 1;
 		int high = sysctl_local_port_range[1];
+// 070202
 		int remaining = (high - low) + 1;
 		int rover;
 
@@ -262,7 +265,7 @@ static struct sock *tcp_v6_lookup_listen
 	sk_for_each(sk, node, &tcp_listening_hash[tcp_lhashfn(hnum)]) {
 		if (inet_sk(sk)->num == hnum && sk->sk_family == PF_INET6) {
 			struct ipv6_pinfo *np = inet6_sk(sk);
-			
+
 			score = 1;
 			if (!ipv6_addr_any(&np->rcv_saddr)) {
 				if (!ipv6_addr_equal(&np->rcv_saddr, daddr))
@@ -402,7 +405,7 @@ static struct open_request *tcp_v6_searc
 					      int iif)
 {
 	struct tcp_listen_opt *lopt = tp->listen_opt;
-	struct open_request *req, **prev;  
+	struct open_request *req, **prev;
 
 	for (prev = &lopt->syn_table[tcp_v6_synq_hash(raddr, rport, lopt->hash_rnd)];
 	     (req = *prev) != NULL;
@@ -422,8 +425,8 @@ static struct open_request *tcp_v6_searc
 }
 
 static __inline__ u16 tcp_v6_check(struct tcphdr *th, int len,
-				   struct in6_addr *saddr, 
-				   struct in6_addr *daddr, 
+				   struct in6_addr *saddr,
+				   struct in6_addr *daddr,
 				   unsigned long base)
 {
 	return csum_ipv6_magic(saddr, daddr, len, IPPROTO_TCP, base);
@@ -474,7 +477,7 @@ static int __tcp_v6_check_established(st
 
 			if (tw->tw_ts_recent_stamp &&
 			    (!twp || (sysctl_tcp_tw_reuse &&
-				      xtime.tv_sec - 
+				      xtime.tv_sec -
 				      tw->tw_ts_recent_stamp > 1))) {
 				/* See comment in tcp_ipv4.c */
 				tp->write_seq = tw->tw_snd_nxt + 65535 + 2;
@@ -538,19 +541,35 @@ static int tcp_v6_hash_connect(struct so
 	int ret;
 
  	if (!snum) {
- 		int low = sysctl_local_port_range[0];
- 		int high = sysctl_local_port_range[1];
+// 070202
+//		int low = sysctl_local_port_range[0];
+		int low = ( sysctl_local_port_range[1] + sysctl_local_port_range[0] ) / 2 + 1;
+		int high = sysctl_local_port_range[1];
 		int range = high - low;
  		int i;
 		int port;
 		static u32 hint;
-		u32 offset = hint + tcpv6_port_offset(sk);
+//		u32 offset = hint + tcpv6_port_offset(sk);
+		static u32 port_offset;
+		static u32 port_offset_seed;
+		u32 port_offset_new;
+		u32 offset;
+		port_offset_new = tcpv6_port_offset(sk);
+		if(port_offset != port_offset_new)
+		{
+			port_offset_seed += (port_offset_new & 0x1ff);
+			port_offset = port_offset_new;
+		}
+		offset = hint + port_offset_seed;
+// 070202
 		struct hlist_node *node;
- 		struct tcp_tw_bucket *tw = NULL;
+		struct tcp_tw_bucket *tw = NULL;
 
- 		local_bh_disable();
+		local_bh_disable();
 		for (i = 1; i <= range; i++) {
 			port = low + (i + offset) % range;
+
+//printk(KERN_INFO "IPv6 port=0x%x(%d)  i=%d offset=0x%x hint= 0x%x(%d)  port_offset=0x%x(%d) seed=0x%x",port,port,i,offset,hint,hint,port_offset,port_offset,port_offset_seed);
  			head = &tcp_bhash[tcp_bhashfn(port)];
  			spin_lock(&head->lock);
 
@@ -560,13 +579,16 @@ static int tcp_v6_hash_connect(struct so
  			 */
 			tb_for_each(tb, node, &head->chain) {
  				if (tb->port == port) {
- 					BUG_TRAP(!hlist_empty(&tb->owners));
- 					if (tb->fastreuse >= 0)
- 						goto next_port;
- 					if (!__tcp_v6_check_established(sk,
-									port,
-									&tw))
- 						goto ok;
+// 					BUG_TRAP(!hlist_empty(&tb->owners));
+// 					if (tb->fastreuse >= 0)
+// 						goto next_port;
+// 					if (!__tcp_v6_check_established(sk,
+//									port,
+//									&tw))
+//					{
+//						printk(" ok1 ");
+// 						goto ok;
+//					}
  					goto next_port;
  				}
  			}
@@ -577,9 +599,11 @@ static int tcp_v6_hash_connect(struct so
  				break;
  			}
  			tb->fastreuse = -1;
+//			printk(" ok2 ");
  			goto ok;
 
  		next_port:
+//printk(" next_port ");
  			spin_unlock(&head->lock);
  		}
  		local_bh_enable();
@@ -587,14 +611,20 @@ static int tcp_v6_hash_connect(struct so
  		return -EADDRNOTAVAIL;
 
 ok:
+//printk(" ok ");
 		hint += i;
 
+//printk(" sport=%d \n", ntohs(inet_sk(sk)->sport));
  		/* Head lock still held and bh's disabled */
  		tcp_bind_hash(sk, tb, port);
+//printk("tb-port=%d:%d",tb->port,port);
+//printk(" sport0=%d \n", ntohs(inet_sk(sk)->sport));
 		if (sk_unhashed(sk)) {
+//printk(" sport1=%d \n", ntohs(inet_sk(sk)->sport));
  			inet_sk(sk)->sport = htons(port);
  			__tcp_v6_hash(sk);
  		}
+//printk(" sport2=%d \n", ntohs(inet_sk(sk)->sport));
  		spin_unlock(&head->lock);
 
  		if (tw) {
@@ -619,6 +649,8 @@ ok:
 		/* No definite answer... Walk to established hash table */
 		ret = __tcp_v6_check_established(sk, snum, NULL);
 out:
+//printk(" out ");
+//printk(" sport3=%d \n", ntohs(inet_sk(sk)->sport));
 		local_bh_enable();
 		return ret;
 	}
@@ -629,7 +661,7 @@ static __inline__ int tcp_v6_iif(struct 
 	return IP6CB(skb)->iif;
 }
 
-static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr, 
+static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr,
 			  int addr_len)
 {
 	struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr;
@@ -642,10 +674,10 @@ static int tcp_v6_connect(struct sock *s
 	int addr_type;
 	int err;
 
-	if (addr_len < SIN6_LEN_RFC2133) 
+	if (addr_len < SIN6_LEN_RFC2133)
 		return -EINVAL;
 
-	if (usin->sin6_family != AF_INET6) 
+	if (usin->sin6_family != AF_INET6)
 		return(-EAFNOSUPPORT);
 
 	memset(&fl, 0, sizeof(fl));
@@ -666,9 +698,9 @@ static int tcp_v6_connect(struct sock *s
 	/*
   	 *	connect() to INADDR_ANY means loopback (BSD'ism).
   	 */
-  	
+
   	if(ipv6_addr_any(&usin->sin6_addr))
-		usin->sin6_addr.s6_addr[15] = 0x1; 
+		usin->sin6_addr.s6_addr[15] = 0x1;
 
 	addr_type = ipv6_addr_type(&usin->sin6_addr);
 
@@ -801,7 +833,9 @@ static int tcp_v6_connect(struct sock *s
 							     inet->sport,
 							     inet->dport);
 
+//        printk(" tcp_connect in sport=%d \n", ntohs(inet_sk(sk)->sport));
 	err = tcp_connect(sk);
+//        printk(" tcp_connect out sport=%d \n", ntohs(inet_sk(sk)->sport));
 	if (err)
 		goto late_failure;
 
@@ -824,7 +858,7 @@ static void tcp_v6_err(struct sk_buff *s
 	struct ipv6_pinfo *np;
 	struct sock *sk;
 	int err;
-	struct tcp_sock *tp; 
+	struct tcp_sock *tp;
 	__u32 seq;
 
 	sk = tcp_v6_lookup(&hdr->daddr, th->dest, &hdr->saddr, th->source, skb->dev->ifindex);
@@ -847,7 +881,7 @@ static void tcp_v6_err(struct sk_buff *s
 		goto out;
 
 	tp = tcp_sk(sk);
-	seq = ntohl(th->seq); 
+	seq = ntohl(th->seq);
 	if (sk->sk_state != TCP_LISTEN &&
 	    !between(seq, tp->snd_una, tp->snd_nxt)) {
 		NET_INC_STATS_BH(LINUX_MIB_OUTOFWINDOWICMPS);
@@ -933,7 +967,7 @@ static void tcp_v6_err(struct sk_buff *s
 
 	case TCP_SYN_SENT:
 	case TCP_SYN_RECV:  /* Cannot happen.
-			       It can, it SYNs are crossed. --ANK */ 
+			       It can, it SYNs are crossed. --ANK */
 		if (!sock_owned_by_user(sk)) {
 			TCP_INC_STATS_BH(TCP_MIB_ATTEMPTFAILS);
 			sk->sk_err = err;
@@ -1055,7 +1089,7 @@ static int ipv6_opt_accepted(struct sock
 }
 
 
-static void tcp_v6_send_check(struct sock *sk, struct tcphdr *th, int len, 
+static void tcp_v6_send_check(struct sock *sk, struct tcphdr *th, int len,
 			      struct sk_buff *skb)
 {
 	struct ipv6_pinfo *np = inet6_sk(sk);
@@ -1064,8 +1098,8 @@ static void tcp_v6_send_check(struct soc
 		th->check = ~csum_ipv6_magic(&np->saddr, &np->daddr, len, IPPROTO_TCP,  0);
 		skb->csum = offsetof(struct tcphdr, check);
 	} else {
-		th->check = csum_ipv6_magic(&np->saddr, &np->daddr, len, IPPROTO_TCP, 
-					    csum_partial((char *)th, th->doff<<2, 
+		th->check = csum_ipv6_magic(&np->saddr, &np->daddr, len, IPPROTO_TCP,
+					    csum_partial((char *)th, th->doff<<2,
 							 skb->csum));
 	}
 }
@@ -1073,7 +1107,7 @@ static void tcp_v6_send_check(struct soc
 
 static void tcp_v6_send_reset(struct sk_buff *skb)
 {
-	struct tcphdr *th = skb->h.th, *t1; 
+	struct tcphdr *th = skb->h.th, *t1;
 	struct sk_buff *buff;
 	struct flowi fl;
 
@@ -1081,7 +1115,7 @@ static void tcp_v6_send_reset(struct sk_
 		return;
 
 	if (!ipv6_unicast_destination(skb))
-		return; 
+		return;
 
 	/*
 	 * We need to grab some memory, and put together an RST,
@@ -1090,7 +1124,7 @@ static void tcp_v6_send_reset(struct sk_
 
 	buff = alloc_skb(MAX_HEADER + sizeof(struct ipv6hdr) + sizeof(struct tcphdr),
 			 GFP_ATOMIC);
-	if (buff == NULL) 
+	if (buff == NULL)
 	  	return;
 
 	skb_reserve(buff, MAX_HEADER + sizeof(struct ipv6hdr) + sizeof(struct tcphdr));
@@ -1103,7 +1137,7 @@ static void tcp_v6_send_reset(struct sk_
 	t1->source = th->dest;
 	t1->doff = sizeof(*t1)/4;
 	t1->rst = 1;
-  
+
 	if(th->ack) {
 	  	t1->seq = th->ack_seq;
 	} else {
@@ -1172,7 +1206,7 @@ static void tcp_v6_send_ack(struct sk_bu
 	t1->ack_seq = htonl(ack);
 	t1->ack = 1;
 	t1->window = htons(win);
-	
+
 	if (ts) {
 		u32 *ptr = (u32*)(t1 + 1);
 		*ptr++ = htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) |
@@ -1294,15 +1328,15 @@ static int tcp_v6_conn_request(struct so
 		return tcp_v4_conn_request(sk, skb);
 
 	if (!ipv6_unicast_destination(skb))
-		goto drop; 
+		goto drop;
 
 	/*
-	 *	There are no SYN attacks on IPv6, yet...	
+	 *	There are no SYN attacks on IPv6, yet...
 	 */
 	if (tcp_synq_is_full(sk) && !isn) {
 		if (net_ratelimit())
 			printk(KERN_INFO "TCPv6: dropping request, synflood is possible\n");
-		goto drop;		
+		goto drop;
 	}
 
 	if (sk_acceptq_is_full(sk) && tcp_synq_young(sk) > 1)
@@ -1339,7 +1373,7 @@ static int tcp_v6_conn_request(struct so
 	    ipv6_addr_type(&req->af.v6_req.rmt_addr) & IPV6_ADDR_LINKLOCAL)
 		req->af.v6_req.iif = tcp_v6_iif(skb);
 
-	if (isn == 0) 
+	if (isn == 0)
 		isn = tcp_v6_init_sequence(sk,skb);
 
 	req->snt_isn = isn;
@@ -1377,7 +1411,7 @@ static struct sock * tcp_v6_syn_recv_soc
 
 		newsk = tcp_v4_syn_recv_sock(sk, skb, req, dst);
 
-		if (newsk == NULL) 
+		if (newsk == NULL)
 			return NULL;
 
 		newtcp6sk = (struct tcp6_sock *)newsk;
@@ -1458,7 +1492,7 @@ static struct sock * tcp_v6_syn_recv_soc
 
 		if ((xfrm_lookup(&dst, &fl, sk, 0)) < 0)
 			goto out;
-	} 
+	}
 
 	newsk = tcp_create_openreq_child(sk, req, skb);
 	if (newsk == NULL)
@@ -1487,7 +1521,7 @@ static struct sock * tcp_v6_syn_recv_soc
 	ipv6_addr_copy(&newnp->rcv_saddr, &req->af.v6_req.loc_addr);
 	newsk->sk_bound_dev_if = req->af.v6_req.iif;
 
-	/* Now IPv6 options... 
+	/* Now IPv6 options...
 
 	   First: no IPv4 options.
 	 */
@@ -1631,7 +1665,7 @@ static int tcp_v6_do_rcv(struct sock *sk
 	if (skb->len < (skb->h.th->doff<<2) || tcp_checksum_complete(skb))
 		goto csum_err;
 
-	if (sk->sk_state == TCP_LISTEN) { 
+	if (sk->sk_state == TCP_LISTEN) {
 		struct sock *nsk = tcp_v6_hnd_req(sk, skb);
 		if (!nsk)
 			goto discard;
@@ -1702,7 +1736,7 @@ ipv6_pktoptions:
 static int tcp_v6_rcv(struct sk_buff **pskb, unsigned int *nhoffp)
 {
 	struct sk_buff *skb = *pskb;
-	struct tcphdr *th;	
+	struct tcphdr *th;
 	struct sock *sk;
 	int ret;
 
@@ -2049,7 +2083,7 @@ static int tcp_v6_destroy_sock(struct so
 }
 
 /* Proc filesystem TCPv6 sock list dumping. */
-static void get_openreq6(struct seq_file *seq, 
+static void get_openreq6(struct seq_file *seq,
 			 struct sock *sk, struct open_request *req, int i, int uid)
 {
 	struct in6_addr *dest, *src;
@@ -2072,11 +2106,11 @@ static void get_openreq6(struct seq_file
 		   ntohs(req->rmt_port),
 		   TCP_SYN_RECV,
 		   0,0, /* could print option size, but that is af dependent. */
-		   1,   /* timers active (only the expire timer) */  
-		   jiffies_to_clock_t(ttd), 
+		   1,   /* timers active (only the expire timer) */
+		   jiffies_to_clock_t(ttd),
 		   req->retrans,
 		   uid,
-		   0,  /* non standard timer */  
+		   0,  /* non standard timer */
 		   0, /* open_requests have no inode */
 		   0, req);
 }
@@ -2117,7 +2151,7 @@ static void get_tcp6_sock(struct seq_fil
 		   src->s6_addr32[2], src->s6_addr32[3], srcp,
 		   dest->s6_addr32[0], dest->s6_addr32[1],
 		   dest->s6_addr32[2], dest->s6_addr32[3], destp,
-		   sp->sk_state, 
+		   sp->sk_state,
 		   tp->write_seq-tp->snd_una, tp->rcv_nxt-tp->copied_seq,
 		   timer_active,
 		   jiffies_to_clock_t(timer_expires - jiffies),
@@ -2131,7 +2165,7 @@ static void get_tcp6_sock(struct seq_fil
 		   );
 }
 
-static void get_timewait6_sock(struct seq_file *seq, 
+static void get_timewait6_sock(struct seq_file *seq,
 			       struct tcp_tw_bucket *tw, int i)
 {
 	struct in6_addr *dest, *src;
diff -uprN -X stblinux-2.6.12/Documentation/dontdiff stblinux-2.6.12.org/net/ipv6/udp.c stblinux-2.6.12/net/ipv6/udp.c
--- stblinux-2.6.12.org/net/ipv6/udp.c	2007-02-03 05:46:59.000000000 +0900
+++ stblinux-2.6.12/net/ipv6/udp.c	2008-05-28 13:48:22.000000000 +0900
@@ -479,7 +479,7 @@ static int udpv6_rcv(struct sk_buff **ps
 		 */
 		LIMIT_NETDEBUG(
 			printk(KERN_INFO "IPv6: udp checksum is 0\n"));
-		goto discard;
+//		goto discard; 070514
 	}
 
 	if (ulen < skb->len) {
