Skip to contentSkip to conversation

ibm_newemac: Fix problem with jumbo frame support and EMAC V4.patch

PATCH In review Benjamin Herrenschmidt 2 participants 2 messages Apr 22, 2008 – Apr 25, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/6 ibm_newemac: Fix problem with jumbo frame support and EMAC V4.patch

From: Stefan Roese <[email protected]>

This fixes the jumbo frame support on EMAC V4 systems. Now the correct bit is set depending on the EMAC version configured.

Tested on Kilauea (405EX) and Canyonlands (460EX).

---
 drivers/net/ibm_newemac/core.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/ibm_newemac/core.c +4 -1
index 0789802..486901f 100644
@@ -524,7 +524,10 @@ static int emac_configure(struct emac_instance *dev)
 		rx_size = dev->rx_fifo_size_gige;
 
 		if (dev->ndev->mtu > ETH_DATA_LEN) {
-			mr1 |= EMAC_MR1_JPSM;
+			if (emac_has_feature(dev, EMAC_FTR_EMAC4))
+				mr1 |= EMAC4_MR1_JPSM;
+			else
+				mr1 |= EMAC_MR1_JPSM;
 			dev->stop_timeout = STOP_TIMEOUT_1000_JUMBO;
 		} else
 			dev->stop_timeout = STOP_TIMEOUT_1000;
#1 lore raw
Quoted 20 lines · Benjamin Herrenschmidt

From: Stefan Roese <[email protected]>

This fixes the jumbo frame support on EMAC V4 systems. Now the correct bit is set depending on the EMAC version configured.

Tested on Kilauea (405EX) and Canyonlands (460EX).

---
 drivers/net/ibm_newemac/core.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/ibm_newemac/core.c +0 -0
index 0789802..486901f 100644
@@ -524,7 +524,10 @@ static int emac_configure(struct emac_instance *dev)
 		rx_size = dev->rx_fifo_size_gige;

drivers/net/ibm_newemac/core.c static int emac_configure(struct emac_instance *dev) · line 533

Quoted 10 lines
drivers/net/ibm_newemac/core.c +4 -1
 
 		if (dev->ndev->mtu > ETH_DATA_LEN) {
-			mr1 |= EMAC_MR1_JPSM;
+			if (emac_has_feature(dev, EMAC_FTR_EMAC4))
+				mr1 |= EMAC4_MR1_JPSM;
+			else
+				mr1 |= EMAC_MR1_JPSM;
 			dev->stop_timeout = STOP_TIMEOUT_1000_JUMBO;
 		} else
 			dev->stop_timeout = STOP_TIMEOUT_1000;

applied 1-6