Index: c/src/lib/libbsp/m68k/uC5282/ChangeLog
===================================================================
--- c/src/lib/libbsp/m68k/uC5282/ChangeLog	(revision ce4f46651f27c23498d9f1b8e7c987a1292dd898)
+++ c/src/lib/libbsp/m68k/uC5282/ChangeLog	(revision 1bf40dc84c16e2461832a1ffc51c741065d903e3)
@@ -1,2 +1,7 @@
+2007-01-21  Eric Norum <norume@aps.anl.gov>
+
+	* network/network.c: Add capability to lock at 10-half.
+                         Expand report to include auto/fixed status.
+
 2006-12-18	Till Straumann <strauman@slac.stanford.edu>
 
Index: c/src/lib/libbsp/m68k/uC5282/README
===================================================================
--- c/src/lib/libbsp/m68k/uC5282/README	(revision ce4f46651f27c23498d9f1b8e7c987a1292dd898)
+++ c/src/lib/libbsp/m68k/uC5282/README	(revision 1bf40dc84c16e2461832a1ffc51c741065d903e3)
@@ -86,5 +86,7 @@
    locked at full duplex you'll have to find another port!
    The RTEMS network driver can be forced to 100 Mbs/full-duplex by setting
-   the bootstrap environment variable IPADDR0_100FULL to Y.
+   the bootstrap environment variable IPADDR0_100FULL to Y.  The driver can
+   be forced to 10 Mbs/half-duplex by setting the bootstrap environment
+   variable IPADDR0_10HALF to Y.
 
 4) Run 'tftp' on your host machine:
Index: c/src/lib/libbsp/m68k/uC5282/network/network.c
===================================================================
--- c/src/lib/libbsp/m68k/uC5282/network/network.c	(revision ce4f46651f27c23498d9f1b8e7c987a1292dd898)
+++ c/src/lib/libbsp/m68k/uC5282/network/network.c	(revision 1bf40dc84c16e2461832a1ffc51c741065d903e3)
@@ -119,5 +119,6 @@
      * Link parameters
      */
-    int             force100Full;
+    enum            { link_auto, link_100Full, link_10Half } link;
+    uint16_t        mii_cr;
     uint16_t        mii_sr2;
 };
@@ -281,8 +282,11 @@
     /*
      * Set up Transmit Control Register:
-     *   Full duplex
+     *   Full or half duplex
      *   No heartbeat
      */
-    MCF5282_FEC_TCR = MCF5282_FEC_TCR_FDEN;
+    if (sc->link == link_10Half)
+        MCF5282_FEC_TCR = 0;
+    else
+        MCF5282_FEC_TCR = MCF5282_FEC_TCR_FDEN;
 
     /*
@@ -308,15 +312,36 @@
      *  Advertise 100 Mb/s, full-duplex, IEEE-802.3
      *  Turn off auto-negotiate
-     *  Enable speed-change, duplex-change and link-status-change interrupts
-     *  Set 100/full and perhaps auto-negotiate
+     *  Cleaer status
      */
     setMII(1, 20, 0x42F2);
     setMII(1,  4, 0x0181);
-    setMII(1,  0, 0x2100);
+    setMII(1,  0, 0x0);
     rtems_task_wake_after(2);
     sc->mii_sr2 = getMII(1, 17);
-    setMII(1, 18, 0x0072);
-    if (!sc->force100Full)
+    switch (sc->link) {
+    case link_auto:
+        /*
+         * Enable speed-change, duplex-change and link-status-change interrupts
+         * Enable auto-negotiate (start at 100/FULL)
+         */
+        setMII(1, 18, 0x0072);
         setMII(1, 0, 0x3100);
+        break;
+
+    case link_10Half:
+        /*
+         * Force 10/HALF
+         */
+        setMII(1, 0, 0x0);
+        break;
+
+    case link_100Full:
+        /*
+         * Force 100/FULL
+         */
+        setMII(1, 0, 0x2100);
+        break;
+    }
+    sc->mii_cr = getMII(1, 0);
 
     /*
@@ -800,7 +825,21 @@
     }
     else {
-        printf("Link speed %d Mb/s, %s-duplex.\n",
-                                    sc->mii_sr2  & 0x4000 ? 100 : 10,
-                                    sc->mii_sr2 & 0x200 ? "full" : "half");
+        int speed;
+        int full;
+        int fixed;
+        if (sc->mii_cr & 0x1000) {
+            fixed = 0;
+            speed = sc->mii_sr2 & 0x4000 ? 100 : 10;
+            full = sc->mii_sr2 & 0x200 ? 1 : 0;
+        }
+        else {
+            fixed = 1;
+            speed = sc->mii_cr & 0x2000 ? 100 : 10;
+            full = sc->mii_cr & 0x100 ? "full" : "half";
+        }
+        printf("Link %s %d Mb/s, %s-duplex.\n",
+                                            fixed ? "fixed" : "auto-negotiate",
+                                            speed,
+                                            full ? "full" : "half"); 
     }
     printf(" EIR:%8.8lx  ",  MCF5282_FEC_EIR);
@@ -968,5 +1007,10 @@
     if (((env = bsp_getbenv("IPADDR0_100FULL")) != NULL)
      && ((*env == 'y') || (*env == 'Y')))
-        sc->force100Full = 1;
+        sc->link = link_100Full;
+    else if (((env = bsp_getbenv("IPADDR0_10HALF")) != NULL)
+     && ((*env == 'y') || (*env == 'Y')))
+        sc->link = link_10Half;
+    else
+        sc->link = link_auto;
 
     /*
