[PATCH] emac: add support for platform-specific unsupported PHY features

STALE7709d

4 messages, 3 authors, 2005-08-11 · open the first message on its own page

[PATCH] emac: add support for platform-specific unsupported PHY features

From: Wade Farnsworth <hidden>
Date: 2005-08-05 23:32:05

Hello,

This patch adds support to the ibm_emac driver for platform-specific
unsupported PHY features.

The patch attempts to determine the highest speed and duplex when
autonegotiation is unsupported.

-Wade Farnsworth

Signed-off-by: Wade Farnsworth <redacted>

Re: [PATCH] emac: add support for platform-specific unsupported PHY features

From: Eugene Surovegin <hidden>
Date: 2005-08-06 00:05:16

On Fri, Aug 05, 2005 at 04:32:05PM -0700, Wade Farnsworth wrote:
Hello,

This patch adds support to the ibm_emac driver for platform-specific
unsupported PHY features.

The patch attempts to determine the highest speed and duplex when
autonegotiation is unsupported.
Looks good.
-Wade Farnsworth

Signed-off-by: Wade Farnsworth <redacted>
quoted hunk
diff -upr linux-2.6/drivers/net/ibm_emac/ibm_emac_core.c linux-2.6-dev/drivers/net/ibm_emac/ibm_emac_core.c
--- linux-2.6/drivers/net/ibm_emac/ibm_emac_core.c	2005-08-03 13:33:42.000000000 -0700
+++ linux-2.6-dev/drivers/net/ibm_emac/ibm_emac_core.c	2005-08-02 10:42:59.000000000 -0700
@@ -1876,6 +1876,9 @@ static int emac_init_device(struct ocp_d
 		rc = -ENODEV;
 		goto bail;
 	}
+	
+	/* Disable any PHY features not supported by the platform */
+	ep->phy_mii.def->features &= ~emacdata->feat_unsupp;
 
 	/* Setup initial PHY config & startup aneg */
 	if (ep->phy_mii.def->ops->init)
@@ -1883,6 +1886,38 @@ static int emac_init_device(struct ocp_d
 	netif_carrier_off(ndev);
 	if (ep->phy_mii.def->features & SUPPORTED_Autoneg)
 		ep->want_autoneg = 1;
+	else {
+		ep->want_autoneg = 0;
+		
+		/* Select highest supported speed/duplex */
+		if (ep->phy_mii.def->features & SUPPORTED_10000baseT_Full) {
+			ep->phy_mii.speed = SPEED_10000;
+			ep->phy_mii.duplex = DUPLEX_FULL;
I think you are being too optimistic here :). EMAC doesn't support 10G 
Ethernet and will never will (at least sanely) given it's 
brain-damaged design. So I think it's safe to drop 
SUPPORTED_10000baseT_Full test.

I'll update my NAPI tree with similar code.

-- 
Eugene

Re: [PATCH] emac: add support for platform-specific unsupported PHY features

From: Jeff Garzik <hidden>
Date: 2005-08-11 04:03:49

Wade Farnsworth wrote:
Hello,

This patch adds support to the ibm_emac driver for platform-specific
unsupported PHY features.

The patch attempts to determine the highest speed and duplex when
autonegotiation is unsupported.

-Wade Farnsworth

Signed-off-by: Wade Farnsworth <redacted>
Can you update this patch RE Eugene's comments?

	Jeff

Re: [PATCH] emac: add support for platform-specific unsupported PHY features

From: Wade Farnsworth <hidden>
Date: 2005-08-11 20:39:05

On Wed, 2005-08-10 at 21:03, Jeff Garzik wrote:
Wade Farnsworth wrote:
quoted
Hello,

This patch adds support to the ibm_emac driver for platform-specific
unsupported PHY features.

The patch attempts to determine the highest speed and duplex when
autonegotiation is unsupported.

-Wade Farnsworth

Signed-off-by: Wade Farnsworth <redacted>
Can you update this patch RE Eugene's comments?

	Jeff
Sorry for the delay.  Here is the updated patch.

-Wade Farnsworth

Signed-off-by: Wade Farnsworth <redacted>

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help