diff -r --exclude=CVS -u uClinux/documentation/KernelModules ../113/uClinux/documentation/KernelModules
--- uClinux/documentation/KernelModules	2002-03-07 10:46:38.000000000 -0800
+++ uClinux/documentation/KernelModules	2002-10-30 16:18:45.000000000 -0800
@@ -1,6 +1,28 @@
 
 KernelModules:  Brecis Specific information about kernel loadable modules.
 
+
+IMPORTANT NOTE, regarding error messages of the form "local symbol <x>
+with index <y> exceeds local_symtab_size <z>" when loading modules:
+
+    The newer releases of the GNU tools that we are using seem to have
+    a "feature" where the assembler does not create ELF *.o files that
+    are compatible with insmod.  The linker/loader creates compatible
+    files, however.
+
+    When using the usual methods for making modules, this only affects
+    modules created from a single source file, because using "mips-ld
+    -r" to create the module from the component object (.o) files
+    creates a correct ELF .o file.
+
+    The fix is to run mips-ld -r on your module before using it.
+
+    For modules in the standard kernel tree, our makefiles complete
+    this step automatically when placing the modules in the process of
+    making the romdisk; look for "find root/lib/modules" in
+    ../romdisk/makefile for an example of how to do this.
+
+
 For the standard generic linux information about kernel modules, see
 uClinux/linux/Documentation/modules.txt elsewhere in this tree.
 
diff -r --exclude=CVS -u uClinux/linux/arch/mipsnommu/defconfig-brecis.freeswan ../113/uClinux/linux/arch/mipsnommu/defconfig-brecis.freeswan
--- uClinux/linux/arch/mipsnommu/defconfig-brecis.freeswan	2002-08-13 11:31:08.000000000 -0700
+++ uClinux/linux/arch/mipsnommu/defconfig-brecis.freeswan	2002-10-11 13:05:07.000000000 -0700
@@ -636,7 +636,7 @@
 #
 CONFIG_CROSSCOMPILE=y
 # CONFIG_MIPS_FPE_MODULE is not set
-CONFIG_REMOTE_DEBUG=y
+# CONFIG_REMOTE_DEBUG is not set
 # CONFIG_LL_DEBUG is not set
 # CONFIG_MAGIC_SYSRQ is not set
 # CONFIG_MIPS_UNCACHED is not set
diff -r --exclude=CVS -u uClinux/linux/drivers/brecis/brecis_sec.c ../113/uClinux/linux/drivers/brecis/brecis_sec.c
--- uClinux/linux/drivers/brecis/brecis_sec.c	2002-09-07 16:15:26.000000000 -0700
+++ uClinux/linux/drivers/brecis/brecis_sec.c	2002-10-28 18:53:33.000000000 -0800
@@ -1,5 +1,5 @@
 /*
-** $Header: /proj/software/pub/CVSROOT/uClinux/brecis/patches/Release112_to_113/patch112to113,v 1.3 2002/12/02 23:39:00 prakity Exp $
+** $Header: /proj/software/pub/CVSROOT/uClinux/brecis/patches/Release112_to_113/patch112to113,v 1.3 2002/12/02 23:39:00 prakity Exp $
 */
 
 /*
@@ -24,7 +24,7 @@
 #include "brecis/msp_sec_kern.h"
 
 extern void NanoDelay(int) ;
-#define NDTIME 500
+#define NDTIME 250
 
 /*------------------------------------------------------------
 ** Kernel interface debugging/testing
@@ -48,7 +48,7 @@
 ** Approximate speed of des and hash engines, to figure delays
 ** based on packet length.
 */
-#define DES_SPEED 200	/* in MBits/Sec */
+#define DES_SPEED 400	/* in MBits/Sec */
 #define DES_DLY(x) ( (8000 * (x)) / DES_SPEED )
 
 #define HASH_SPEED 340		/* in MBits/Sec */
diff -r --exclude=CVS -u uClinux/linux/drivers/net/brecismspeth.c ../113/uClinux/linux/drivers/net/brecismspeth.c
--- uClinux/linux/drivers/net/brecismspeth.c	2002-09-06 07:16:38.000000000 -0700
+++ uClinux/linux/drivers/net/brecismspeth.c	2002-11-06 03:48:22.000000000 -0800
@@ -1,5 +1,5 @@
  /*
- $Header: /proj/software/pub/CVSROOT/uClinux/brecis/patches/Release112_to_113/patch112to113,v 1.3 2002/12/02 23:39:00 prakity Exp $ 
+ $Header: /proj/software/pub/CVSROOT/uClinux/brecis/patches/Release112_to_113/patch112to113,v 1.3 2002/12/02 23:39:00 prakity Exp $ 
  */
 
 
@@ -1076,6 +1076,18 @@
 {
 	ND	dev = pDrvCtrl->netdevice;
 
+#if 0
+	/* 
+	 *	if you have a switch you will need to add code here to work around
+	 *	the problem that a switch cannot be configured automatically at
+	 *	this time.  
+	 */
+#define	MAC_NUMBER_THAT_SWITCH_IS_ON	(2)		/* for example */
+
+	if (pDrvCtrl->unit == MAC_NUMBER_THAT_SWITCH_IS_ON)
+		pDrvCtrl->phyType = PHYTYPE_NONE;
+#endif
+
 	switch(pDrvCtrl->phyType)
 	{
 		case PHYTYPE_NONE:
@@ -1093,6 +1105,13 @@
 
 	MSPEthSetDuplex(pDrvCtrl, pDrvCtrl->duplexMode);
 
+	if (pDrvCtrl->phyType == PHYTYPE_KENDINSWITCH
+	||  pDrvCtrl->phyType == PHYTYPE_NONE)
+	{
+		/* a SWITCH ALWAYS has carrier */
+		return MSP_SUCCESS;
+	}
+
 	/*
 	 * tell upper layer our carrier status
 	 */
@@ -2085,13 +2104,20 @@
 			if (TxFDInUse(fdbd) && MACOwnsTxFD(fdbd) &&
 			    ((jiffies - priv->last_freed_tx) > 
 			     dev->watchdog_timeo))
-			    {
+			{
 				/* tx packet timed out */
-				
 				brecis_eth_reload(dev);
 				continue;
-			    }
+			}
 
+			if (priv->phyType == PHYTYPE_KENDINSWITCH
+			||  priv->phyType == PHYTYPE_NONE)
+			{
+			
+				/* A switch always HAS carrier */
+				continue;
+			}
+			
 			if (MSPPHYGCheckCable(priv) != 0)
 			{
 				/* we have a carrier */
diff -r --exclude=CVS -u uClinux/linux/drivers/net/brecismspeth.h ../113/uClinux/linux/drivers/net/brecismspeth.h
--- uClinux/linux/drivers/net/brecismspeth.h	2002-09-06 07:16:38.000000000 -0700
+++ uClinux/linux/drivers/net/brecismspeth.h	2002-10-01 14:42:41.000000000 -0700
@@ -1,5 +1,5 @@
 /*
-$Header: /proj/software/pub/CVSROOT/uClinux/brecis/patches/Release112_to_113/patch112to113,v 1.3 2002/12/02 23:39:00 prakity Exp $
+$Header: /proj/software/pub/CVSROOT/uClinux/brecis/patches/Release112_to_113/patch112to113,v 1.3 2002/12/02 23:39:00 prakity Exp $
  */
 
 #ifndef __mspEthDefH__
@@ -365,6 +365,7 @@
 #define MD_CA_Wr		0x0400	/* Set to Write - clear for read */
 #define MD_CA_BUSY_BIT 	0x0800
 #define MD_CA_PreSup	0x1000	/* Suppress Preamble sent to Phy */
+#define MD_MAX_PHY	32	/* maximum number of PHY per MII */
 
 #define MSP_TRACE(x, y)			printk(KERN_INFO y)
 
diff -r --exclude=CVS -u uClinux/linux/drivers/net/phy8721.c ../113/uClinux/linux/drivers/net/phy8721.c
--- uClinux/linux/drivers/net/phy8721.c	2002-03-17 17:29:05.000000000 -0800
+++ uClinux/linux/drivers/net/phy8721.c	2002-10-01 14:42:42.000000000 -0700
@@ -1,5 +1,5 @@
 /*
- $Header: /proj/software/pub/CVSROOT/uClinux/brecis/patches/Release112_to_113/patch112to113,v 1.3 2002/12/02 23:39:00 prakity Exp $
+ $Header: /proj/software/pub/CVSROOT/uClinux/brecis/patches/Release112_to_113/patch112to113,v 1.3 2002/12/02 23:39:00 prakity Exp $
  */
 
 
@@ -27,7 +27,8 @@
 {
     int i;
 
-    WriteMacRegister(pDrvCtrl, MD_CA, (MD_CA_BUSY_BIT | value));
+    WriteMacRegister(pDrvCtrl, MD_CA,
+		     (pDrvCtrl->macPhyId | MD_CA_BUSY_BIT | value));
 
     i = 0;
     do
diff -r --exclude=CVS -u uClinux/linux/drivers/net/phyethgeneric.c ../113/uClinux/linux/drivers/net/phyethgeneric.c
--- uClinux/linux/drivers/net/phyethgeneric.c	2002-08-11 21:50:06.000000000 -0700
+++ uClinux/linux/drivers/net/phyethgeneric.c	2002-10-01 14:42:42.000000000 -0700
@@ -1,5 +1,5 @@
 /*
- $Header: /proj/software/pub/CVSROOT/uClinux/brecis/patches/Release112_to_113/patch112to113,v 1.3 2002/12/02 23:39:00 prakity Exp $
+ $Header: /proj/software/pub/CVSROOT/uClinux/brecis/patches/Release112_to_113/patch112to113,v 1.3 2002/12/02 23:39:00 prakity Exp $
  */
 
 /******************************************************************/
@@ -245,7 +245,7 @@
 **************************************************************************/
 void MSPPHYGReset (MSP_DEVICE *pDrvCtrl) 
 {
-	U32 i;
+	U32	i;
 	U32	data;
 
 	printk(KERN_INFO "Entering MSPPHYGReset() for MAC#: %d\n", pDrvCtrl->unit);
@@ -276,7 +276,7 @@
 	WriteMacRegister(pDrvCtrl, MD_DATA, PHYGb_CONTROL_RESET);
    	if (waitForPhyNotBusy(pDrvCtrl, (MD_CA_Wr | PHYG_CONTROL)) )
 	{
-		printk(KERN_INFO "MSPPHYGSetup():  PHY BUSY After Sending Reset CMD\n");
+		printk(KERN_INFO "MSPPHYGReset():  PHY BUSY After Sending Reset CMD\n");
 		return;
 	}
 
@@ -291,7 +291,7 @@
 	{
 		if (waitForPhyNotBusy(pDrvCtrl, PHYG_CONTROL) )
 		{
-			printk(KERN_INFO "MSPPHYGSetup(): PHY Busy after Read for Reset \n");
+			printk(KERN_INFO "MSPPHYGReset(): PHY Busy after Read for Reset \n");
 			return;
 		}
 
@@ -321,8 +321,52 @@
 **************************************************************************/
 void MSPPHYGSetup (MSP_DEVICE *pDrvCtrl) 
 {
+	U32	i;
+	U32	data;
+	U32	reg1;	
+
 	printk(KERN_INFO "Entering MSPPHYGSetup() for MAC#: %d\n", pDrvCtrl->unit);
 
+	/* 
+	 * Wait for Phy to come out of reset.  
+	 * Should already be there when we are here, but wait in case
+	 */
+	i = 0;
+	while(((data = ReadMacRegister(pDrvCtrl, MD_CA))) & MD_CA_BUSY_BIT)
+	{
+		udelay(MD_REGISTER_UDELAY);
+		i += MD_REGISTER_UDELAY;
+		if(i >= PHYG_MAX_UDELAY_FOR_EXIT_RESET)
+		{
+			printk(KERN_INFO "1. PHY BUSY After Start Up\n");
+			return;
+		}
+	}
+
+	/*
+	 * determine PHY address
+	 */
+	for (i = 0; i < MD_MAX_PHY; i++)
+	{
+		pDrvCtrl->macPhyId = i << MD_CA_PhyShift;
+
+		if (waitForPhyNotBusy(pDrvCtrl, PHYG_STATUS_REG_ONE))
+			continue;			/* No PHY responding */
+
+		reg1 = ReadMacRegister(pDrvCtrl, MD_DATA);
+
+		if (reg1 != 0 && reg1 != 0xffff && (reg1 & PHYGb_MEDIAMASK) != 0)
+			break;			/* PHY present */
+	}
+
+	if (i == MD_MAX_PHY) 
+	{
+		printk(KERN_INFO "MSPPHYGReset(): no PHY address found, using default\n");
+		pDrvCtrl->macPhyId = 0 << MD_CA_PhyShift;
+	}
+
+	PRINTK(KERN_INFO "MSPPHYGReset(): using PHY address %x\n", (unsigned int) pDrvCtrl->macPhyId);
+
 	/*
 	 * Loopback=disabled
 	 * Speed = 100/10
diff -r --exclude=CVS -u uClinux/linux/drivers/net/phyethgeneric.h ../113/uClinux/linux/drivers/net/phyethgeneric.h
--- uClinux/linux/drivers/net/phyethgeneric.h	2002-08-11 21:50:06.000000000 -0700
+++ uClinux/linux/drivers/net/phyethgeneric.h	2002-10-01 14:42:42.000000000 -0700
@@ -1,5 +1,5 @@
 /*
- $Header: /proj/software/pub/CVSROOT/uClinux/brecis/patches/Release112_to_113/patch112to113,v 1.3 2002/12/02 23:39:00 prakity Exp $
+ $Header: /proj/software/pub/CVSROOT/uClinux/brecis/patches/Release112_to_113/patch112to113,v 1.3 2002/12/02 23:39:00 prakity Exp $
  */
 
 /******************************************************************/
@@ -64,6 +64,14 @@
 #define PHYGb_STATUS_REG_ONE_JABBER_DETECT		0x0002
 #define PHYGb_STATUS_REG_ONE_EXT_CAPABILITY		0x0001
 
+#define PHYGb_MEDIAMASK							  \
+		(PHYGb_STATUS_REG_ONE_100BASE_T4_OK		| \
+		PHYGb_STATUS_REG_ONE_100BASE_TX_FULL	| \
+		PHYGb_STATUS_REG_ONE_100BASE_TX_HALF	| \
+		PHYGb_STATUS_REG_ONE_10BASE_T_FULL		| \
+		PHYGb_STATUS_REG_ONE_10BASE_T_HALF		| \
+		PHYGb_STATUS_REG_ONE_AUTO_NEG_ABILITY)
+
 /* Bit Defines for PHYG_AUTO_NEG_ADVERTISING 	*/
 /* -------------------------------------------- */
 #define PHYGb_AUTO_NEG_ADVERT_NEXT_PAGE			0x8000
@@ -108,7 +116,7 @@
 #define MAX_TIME_TO_WAIT_FOR_LINK		(3)	/* seconds */
 
 /*
- $Header: /proj/software/pub/CVSROOT/uClinux/brecis/patches/Release112_to_113/patch112to113,v 1.3 2002/12/02 23:39:00 prakity Exp $
+ $Header: /proj/software/pub/CVSROOT/uClinux/brecis/patches/Release112_to_113/patch112to113,v 1.3 2002/12/02 23:39:00 prakity Exp $
  */
 
 /******************************************************************/
diff -r --exclude=CVS -u uClinux/linux/net/ipsec/ipsec_tunnel.c ../113/uClinux/linux/net/ipsec/ipsec_tunnel.c
--- uClinux/linux/net/ipsec/ipsec_tunnel.c	2002-08-13 10:59:14.000000000 -0700
+++ uClinux/linux/net/ipsec/ipsec_tunnel.c	2002-10-30 09:24:37.000000000 -0800
@@ -14,7 +14,7 @@
  * for more details.
  */
 
-char ipsec_tunnel_c_version[] = "RCSID $Id: patch112to113,v 1.3 2002/12/02 23:39:00 prakity Exp $";
+char ipsec_tunnel_c_version[] = "RCSID $Id: patch112to113,v 1.3 2002/12/02 23:39:00 prakity Exp $";
 
 #define __NO_VERSION__
 #include <linux/module.h>
@@ -1734,7 +1734,7 @@
 #else /* ! NO_BRECIS_HW_HMAC */
 					hd[0].ioctl.status    = 0 ;
 					hd[0].ioctl.type      = MSP_SEC_HMAC ;
-					hd[0].ioctl.mode      = HMC_SHA1 ;
+					hd[0].ioctl.mode      = HMC_MD5 ;
 					hd[0].ioctl.options   = MSP_SEC_DO_PADDING;
 					hd[0].ioctl.buflen = tdbp->tdb_key_a_size ;
 					hd[0].ioctl.srcaddr = tdbp->tdb_key_a ;
@@ -3184,6 +3184,11 @@
 
 /*
  * $Log: patch112to113,v $
  * Revision 1.3  2002/12/02 23:39:00  prakity
  *
  * modify patch via diff command to work -- cvs rtag patch did not work
  *
+ * Revision 1.3.2.1  2002/10/30 17:24:37  prakity
+ *
+ * When we are supposed to do MD5, *DO* MD5, not SHA1, stupid!
+ * (comment from main-line trunk)
+ *
  * Revision 1.3  2002/08/13 17:59:14  swahl
  * use brecis hardware/driver HMAC function
  *
diff -r --exclude=CVS -u uClinux/README ../113/uClinux/README
--- uClinux/README	2002-08-15 13:37:29.000000000 -0700
+++ uClinux/README	2002-11-05 14:13:56.000000000 -0800
@@ -1,4 +1,4 @@
-BRECIS uClinux Release 1.1
+BRECIS uClinux Release 1.1.3
 
 
 INTRODUCTION:
diff -r --exclude=CVS -u uClinux/romdisk/Makefile ../113/uClinux/romdisk/Makefile
--- uClinux/romdisk/Makefile	2002-09-10 18:32:50.000000000 -0700
+++ uClinux/romdisk/Makefile	2002-10-30 12:41:46.000000000 -0800
@@ -80,6 +80,10 @@
 		ln -s newbusybox root/bin/egrep ;\
 		rm -f root/bin/ls ; \
 		ln -s newbusybox root/bin/ls ;\
+		rm -f root/bin/sed ; \
+		ln -s newbusybox root/bin/sed ;\
+		rm -f root/bin/tr ; \
+		ln -s newbusybox root/bin/tr ;\
 	fi
 
 #	if [ -x ../brecis/init/init ] ; then cp ../brecis/init/init root/sbin/init ; fi
Binary files uClinux/romdisk/romdisk.tgz and ../113/uClinux/romdisk/romdisk.tgz differ
diff -r --exclude=CVS -u uClinux/uC-src/real/freeswan/freeswan-1.97/klips/net/ipsec/ipsec_tunnel.c ../113/uClinux/uC-src/real/freeswan/freeswan-1.97/klips/net/ipsec/ipsec_tunnel.c
--- uClinux/uC-src/real/freeswan/freeswan-1.97/klips/net/ipsec/ipsec_tunnel.c	2002-08-13 10:59:14.000000000 -0700
+++ uClinux/uC-src/real/freeswan/freeswan-1.97/klips/net/ipsec/ipsec_tunnel.c	2002-10-30 09:24:37.000000000 -0800
@@ -14,7 +14,7 @@
  * for more details.
  */
 
-char ipsec_tunnel_c_version[] = "RCSID $Id: patch112to113,v 1.3 2002/12/02 23:39:00 prakity Exp $";
+char ipsec_tunnel_c_version[] = "RCSID $Id: patch112to113,v 1.3 2002/12/02 23:39:00 prakity Exp $";
 
 #define __NO_VERSION__
 #include <linux/module.h>
@@ -1734,7 +1734,7 @@
 #else /* ! NO_BRECIS_HW_HMAC */
 					hd[0].ioctl.status    = 0 ;
 					hd[0].ioctl.type      = MSP_SEC_HMAC ;
-					hd[0].ioctl.mode      = HMC_SHA1 ;
+					hd[0].ioctl.mode      = HMC_MD5 ;
 					hd[0].ioctl.options   = MSP_SEC_DO_PADDING;
 					hd[0].ioctl.buflen = tdbp->tdb_key_a_size ;
 					hd[0].ioctl.srcaddr = tdbp->tdb_key_a ;
@@ -3184,6 +3184,11 @@
 
 /*
  * $Log: patch112to113,v $
  * Revision 1.3  2002/12/02 23:39:00  prakity
  *
  * modify patch via diff command to work -- cvs rtag patch did not work
  *
+ * Revision 1.3.2.1  2002/10/30 17:24:37  prakity
+ *
+ * When we are supposed to do MD5, *DO* MD5, not SHA1, stupid!
+ * (comment from main-line trunk)
+ *
  * Revision 1.3  2002/08/13 17:59:14  swahl
  * use brecis hardware/driver HMAC function
  *
diff -r --exclude=CVS -u uClinux/uC-src/real/freeswan/freeswan-1.97/pluto/Makefile ../113/uClinux/uC-src/real/freeswan/freeswan-1.97/pluto/Makefile
--- uClinux/uC-src/real/freeswan/freeswan-1.97/pluto/Makefile	2002-07-15 13:42:01.000000000 -0700
+++ uClinux/uC-src/real/freeswan/freeswan-1.97/pluto/Makefile	2002-11-06 23:45:24.000000000 -0800
@@ -12,7 +12,7 @@
 # or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 # for more details.
 #
-# RCSID $Id: patch112to113,v 1.3 2002/12/02 23:39:00 prakity Exp $
+# RCSID $Id: patch112to113,v 1.3 2002/12/02 23:39:00 prakity Exp $
 
 
 
@@ -32,7 +32,7 @@
 
 # -O on Linux makes gcc coredump when compiling sha1.c
 # -Wundef is nice but RHL5.2 compiler doesn't support it
-CFLAGS += -g -Wall -W -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast \
+CFLAGS += -Wall -W -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast \
 	-Wcast-qual -Wmissing-declarations -Wwrite-strings \
 	-Wstrict-prototypes -Wno-error -O0 # -Wundef
 
diff -r --exclude=CVS -u uClinux/utilities/dhcpd/dhcpd.c ../113/uClinux/utilities/dhcpd/dhcpd.c
--- uClinux/utilities/dhcpd/dhcpd.c	2001-10-16 00:08:41.000000000 -0700
+++ uClinux/utilities/dhcpd/dhcpd.c	2001-10-16 00:08:41.000000000 -0700
@@ -48,7 +48,7 @@
 static char copyright[] =
 "Copyright 1995, 1996 The Internet Software Consortium.";
 static char arr [] = "All rights reserved.";
-static char message [] = "Internet Software Consortium DHCPD $Name: TAG_RELEASE_2_5_BETA_TWO $";
+static char message [] = "Internet Software Consortium DHCPD $Name: TAG_RELEASE_2_5_BETA_TWO $";
 
 #include "dhcpd.h"
 
