LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Russell McGuire" <rmcguire@videopresence.com>
To: "'Kim Phillips'" <kim.phillips@freescale.com>
Cc: linuxppc-embedded@ozlabs.org
Subject: Freescale UCC_GETH Half Duplex Patch
Date: Thu, 10 Jul 2008 17:23:31 -0700	[thread overview]
Message-ID: <2FE8E39946EE489FBAFC327EC9154EAF@absolutdaddy> (raw)

[-- Attachment #1: Type: text/plain, Size: 599 bytes --]

Kim, ALL

Here is a fix up for the UCC_GETH driver supporting half duplex mode for
some specific modes.

I have tested this quiet extensively and the link now comes up and works,
however not sure if there are other issues that need to be looked at, since
10BaseT connectivity provides VERY ERRATIC throughput, but at least it works
now with RGMII and GMII modes.

There was a lot more in my patch, but I removed a lot of the code for
submission. Let me know if for any reason this patch file is improperly
formatted.

Russell McGuire
Senior Systems Engineer
rmcguire@videopresence.com
503.888.0968


[-- Attachment #2: ucc_geth.patch --]
[-- Type: application/octet-stream, Size: 865 bytes --]

diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index 9a38dfe..5900847 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -1533,10 +1698,17 @@ static void adjust_link(struct net_device *dev)
 		 * If not, we operate in half-duplex mode. */
 		if (phydev->duplex != ugeth->oldduplex) {
 			new_state = 1;
-			if (!(phydev->duplex))
-				tempval &= ~(MACCFG2_FDX);
-			else
-				tempval |= MACCFG2_FDX;
+			/* Can only use half duplex for these two modes!! */
+			if ((ugeth->phy_interface == PHY_INTERFACE_MODE_MII) ||
+			  (ugeth->phy_interface == PHY_INTERFACE_MODE_RMII)) {	
+				if (!(phydev->duplex))
+					tempval &= ~(MACCFG2_FDX);
+				else
+					tempval |= MACCFG2_FDX;
+			} else {
+				/* Always set for other modes */
+				tempval |= MACCFG2_FDX; 
+			}
 			ugeth->oldduplex = phydev->duplex;
 		}

             reply	other threads:[~2008-07-11  0:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-11  0:23 Russell McGuire [this message]
2008-07-11 17:46 ` Freescale UCC_GETH Half Duplex Patch Kim Phillips
2008-07-17 17:01   ` Kim Phillips
2008-07-17 22:01     ` [PATCH]: Freescale UCC_GETH Half Duplex Russell McGuire

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2FE8E39946EE489FBAFC327EC9154EAF@absolutdaddy \
    --to=rmcguire@videopresence.com \
    --cc=kim.phillips@freescale.com \
    --cc=linuxppc-embedded@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox