diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index ed88db5..6213328 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -25,6 +25,11 @@
       2.0 Suraj Iyer, Sharath Kumar, Ajay Singh - Completed for TI BCG
       3.0 Anant Gole - Modified and ported for DaVinci
       4.0 Kevin Hilman, Anant Gole - Linuxification of the driver
+      4.? Paul Bartholomew - Use PHY_DUPLEX_* constants instead 
+                             of hard-coded numbers.  Also, fixed
+                             EMAC_IOCTL_READ_PHY_REG in emac_control() -
+                             the phy_num and reg_addr args were swapped
+                             in call to emac_mdio_read().
  */
 
 /*
@@ -81,6 +86,8 @@ #include <asm/page.h>
 #include <asm/arch/memory.h>
 #include <asm/arch/hardware.h>
 
+#include "davinci_emac_phy.h"
+
 /* ---------------------------------------------------------------
  * linux module options
  * --------------------------------------------------------------- */
@@ -1967,7 +1974,8 @@ static int emac_control_cb(emac_dev_t * 
 				    ((status->
 				      phy_speed == 100) ? 100000000 : 10000000);
 				dev->link_mode =
-				    ((status->phy_duplex == 3) ? 3 : 2);
+				    ((status->phy_duplex == PHY_DUPLEX_FULL) ? 
+					PHY_DUPLEX_FULL : PHY_DUPLEX_HALF);
 
 				/* reactivate the transmit queue if it
 				 * is stopped */
@@ -1996,7 +2004,7 @@ static int emac_control_cb(emac_dev_t * 
 				DBG("%s, PhyNum %d,  %s, %s, %s\n",
 				    ((struct net_device *)dev->owner)->name,
 				    status->phy_num,
-				    ((status->phy_duplex == 3) ?
+				    ((status->phy_duplex == PHY_DUPLEX_FULL) ?
 				     "Full Duplex" : "Half Duplex"),
 				    ((status->phy_speed == 100) ?
 				     "100 Mbps" : "10 Mbps"),
@@ -2198,26 +2206,26 @@ #define EMAC_TOKEN_GET_HEX     simple_st
 	if (speed == CONFIG_EMAC_NOPHY) {
 		i_cfg->phy_mode = SNWAY_NOPHY;
 	} else {
-		if ((speed == 0) && (duplex == 0)) {
+		if ((speed == 0) && (duplex == PHY_DUPLEX_AUTO)) {
 			i_cfg->phy_mode = SNWAY_AUTOALL;
 		} else if (speed == 10) {
-			if (duplex == 2) {
+			if (duplex == PHY_DUPLEX_HALF) {
 				i_cfg->phy_mode = SNWAY_HD10;
-			} else if (duplex == 3) {
+			} else if (duplex == PHY_DUPLEX_FULL) {
 				i_cfg->phy_mode = SNWAY_FD10;
 			} else {
 				i_cfg->phy_mode = SNWAY_HD10 | SNWAY_FD10;
 			}
 		} else if (speed == 100) {
-			if (duplex == 2) {
+			if (duplex == PHY_DUPLEX_HALF) {
 				i_cfg->phy_mode = SNWAY_HD100;
-			} else if (duplex == 3) {
+			} else if (duplex == PHY_DUPLEX_FULL) {
 				i_cfg->phy_mode = SNWAY_FD100;
 			} else {
 				i_cfg->phy_mode = SNWAY_HD100 | SNWAY_FD100;
 			}
 		} else {
-			if (duplex == 3) {
+			if (duplex == PHY_DUPLEX_FULL) {
 				i_cfg->phy_mode = SNWAY_FD10 | SNWAY_FD100;
 			} else {
 				i_cfg->phy_mode = SNWAY_HD10 | SNWAY_HD100;
@@ -3773,7 +3781,8 @@ static int emac_ioctl(struct net_device 
 
 				local_params.eth_duplex_status =
 				    ((dev->link_mode ==
-				      3) ? MIB2_FULL_DUPLEX : MIB2_HALF_DUPLEX);
+				      PHY_DUPLEX_FULL) ? 
+					MIB2_FULL_DUPLEX : MIB2_HALF_DUPLEX);
 
 				/* now copy the counters to the user data */
 				if (copy_to_user
@@ -3972,7 +3981,7 @@ static int emac_update_phy_status(emac_d
 		/*  no phy condition, always linked */
 		dev->status.phy_linked = 1;
 		dev->status.phy_speed = 100;
-		dev->status.phy_duplex = 1;
+		dev->status.phy_duplex = PHY_DUPLEX_FULL;
 		dev->status.phy_num = 0xFFFFFFFF;	/* no phy */
 		dev->mac_control |= (1 << EMAC_MACCONTROL_FULLDUPLEXEN_SHIFT);
 
@@ -3995,7 +4004,7 @@ static int emac_update_phy_status(emac_d
 	if (dev->status.phy_linked) {
 		/*  retreive duplex and speed and the phy number  */
 		if (set_phy_mode & SNWAY_LPBK) {
-			dev->status.phy_duplex = 1;
+			dev->status.phy_duplex = PHY_DUPLEX_FULL;
 		} else {
 			dev->status.phy_duplex = emac_mdio_get_duplex();
 		}
@@ -4003,7 +4012,7 @@ static int emac_update_phy_status(emac_d
 		dev->status.phy_num = emac_mdio_get_phy_num();
 
 		/* set the duplex bit in maccontrol */
-		if (dev->status.phy_duplex) {
+		if (dev->status.phy_duplex == PHY_DUPLEX_FULL) {
 			dev->mac_control |=
 			    (1 << EMAC_MACCONTROL_FULLDUPLEXEN_SHIFT);
 		} else {
@@ -4021,7 +4030,7 @@ static int emac_update_phy_status(emac_d
 	       "MacControl=%08X, Status: Phy=%d, Speed=%s, Duplex=%s",
 	       dev->mac_control, dev->status.phy_num,
 	       (dev->status.phy_speed == 100) ? "100" : "10",
-	       (dev->status.phy_duplex == 3) ? "Full" : "Half");
+	       (dev->status.phy_duplex == PHY_DUPLEX_FULL) ? "Full" : "Half");
 	LOGMSG(EMAC_DEBUG_BUSY_FUNCTION_EXIT, "");
 
 	return (EMAC_SUCCESS);
@@ -4667,8 +4676,8 @@ static int emac_control(emac_dev_t * _de
 			emac_phy_params *phy_params =
 			    (emac_phy_params *) cmd_arg;
 
-			phy_params->data = emac_mdio_read(phy_params->reg_addr,
-							  phy_params->phy_num);
+			phy_params->data = emac_mdio_read(phy_params->phy_num,
+							  phy_params->reg_addr);
 		}
 		break;
 
diff --git a/drivers/net/davinci_emac_phy.c b/drivers/net/davinci_emac_phy.c
index e3a71ed..e434037 100644
--- a/drivers/net/davinci_emac_phy.c
+++ b/drivers/net/davinci_emac_phy.c
@@ -26,6 +26,8 @@
  *  Date      	Modifier         		Notes
  *  2001/02 	Denis, Bill, Michael    Original
  *  14Feb2006	Anant Gole 				Re-written for linux
+ *  07Dec2006	Paul Bartholomew		Fix half-duplex, 
+ *           					use PHY_DUPLEX_* constants
  */
 #include <linux/kernel.h>
 
@@ -184,7 +186,7 @@ int emac_mdio_init(unsigned int mdio_bas
 	emac_phy->state = PHY_INIT;
 	emac_phy->debug_mode = verbose;
 	emac_phy->speed = 10;
-	emac_phy->duplex = 2;	/* Half duplex */
+	emac_phy->duplex = PHY_DUPLEX_HALF;	/* Half duplex */
 
 	if (mdio_clock_freq & mdio_bus_freq) {
 		clk_div = ((mdio_bus_freq / mdio_clock_freq) - 1);
@@ -574,7 +576,8 @@ void emac_mdio_nwaywait_state(void)
 		emac_phy->speed =
 		    (neg_mode & (MII_NWAY_FD100 | MII_NWAY_HD100)) ? 100 : 10;
 		emac_phy->duplex =
-		    (neg_mode & (MII_NWAY_FD100 | MII_NWAY_FD10)) ? 3 : 2;
+		    (neg_mode & (MII_NWAY_FD100 | MII_NWAY_FD10)) ? 
+				PHY_DUPLEX_FULL : PHY_DUPLEX_HALF;
 
 	} else {
 
diff --git a/drivers/net/davinci_emac_phy.h b/drivers/net/davinci_emac_phy.h
index c9e5eab..3d5ba73 100644
--- a/drivers/net/davinci_emac_phy.h
+++ b/drivers/net/davinci_emac_phy.h
@@ -25,8 +25,10 @@
  * Modifications:
  *  HISTORY:
  *  Date      Modifier         Ver    Notes
+ *  01Jan01 Denis, Bill             Original
  *  27Mar02 Michael Hanrahan Original (modified from emacmdio.h)
- *  04Apr02 Michael Hanrahan Added Interrupt Support *  01Jan01 Denis, Bill             Original
+ *  04Apr02 Michael Hanrahan Added Interrupt Support
+ *  07Dec06 Paul Bartholomew Added PHY_DUPLEX_* defines
  */
 #ifndef _DAVINCI_EMAC_PHY_H_
 #define _DAVINCI_EMAC_PHY_H_
@@ -43,6 +45,12 @@ #define NWAY_FD10           (1<<6)
 #define NWAY_HD10           (1<<5)
 #define NWAY_AUTO           (1<<0)
 
+/* phy duplex values */
+#define	PHY_DUPLEX_AUTO		0	/* Auto Negotiate */
+#define	PHY_DUPLEX_UNKNOWN	1	/* Unknown */
+#define	PHY_DUPLEX_HALF		2	/* Half Duplex */
+#define	PHY_DUPLEX_FULL		3	/* Full Duplex */
+
 /*
  *    Tic() return values
  */
