LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Rune Torgersen" <runet@innovsys.com>
To: "Stefan Nickl" <Stefan.Nickl@kontron.com>
Cc: Tom Rini <trini@kernel.crashing.org>,
	linuxppc-embedded <linuxppc-embedded@ozlabs.org>
Subject: RE: [PATCH] RE: FCC Ethernet startup crash
Date: Mon, 11 Apr 2005 09:40:24 -0500	[thread overview]
Message-ID: <DCEAAC0833DD314AB0B58112AD99B93B859355@ismail.innsys.innovsys.com> (raw)

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

Found a soulution.
Still have no idea about the cause.

The part that had to be called twice toget the ethernet to work was 

	/* Enable transmit/receive */
	fccp->fcc_gfmr |= FCC_GFMR_ENR | FCC_GFMR_ENT;

So I added that to the end of init_fcc_startup(), and kept the rest of
the patch the same as v1 (or v2)
None of the interrupts are enabled at this time, so any spurious packets
will not get reported up to IP layer anyways.

This works on my hardware. (tested with ping -f)

Signed-off-by: Rune Torgersen <runet@innovsys.com>

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

===== arch/ppc/8260_io/fcc_enet.c 1.24 vs edited =====
--- 1.24/arch/ppc/8260_io/fcc_enet.c	2005-03-18 14:51:31 -06:00
+++ edited/arch/ppc/8260_io/fcc_enet.c	2005-04-11 09:34:10 -05:00
@@ -2159,15 +2159,8 @@
 	*(volatile uint *)(BCSR_ADDR + 12) |=  BCSR3_FETH2_RST;
 #endif
 
-#if defined(CONFIG_USE_MDIO) || defined(CONFIG_TQM8260)
-	/* start in full duplex mode, and negotiate speed
-	 */
-	fcc_restart (dev, 1);
-#else
-	/* start in half duplex mode
-	 */
-	fcc_restart (dev, 0);
-#endif
+	/* Enable transmit/receive */
+	fccp->fcc_gfmr |= FCC_GFMR_ENR | FCC_GFMR_ENT;
 }
 
 #ifdef	CONFIG_USE_MDIO
@@ -2372,24 +2365,28 @@
 	fep->sequence_done = 0;
 	fep->link = 0;
 
-	if (fep->phy) {
-		fcc_restart(dev, 0);	/* always start in half-duplex */
-		mii_do_cmd(dev, fep->phy->ack_int);
-		mii_do_cmd(dev, fep->phy->config);
-		mii_do_cmd(dev, phy_cmd_config);  /* display configuration */
-		while(!fep->sequence_done)
-			schedule();
-
-		mii_do_cmd(dev, fep->phy->startup);
-		netif_start_queue(dev);
-		return 0;		/* Success */
-	}
-	return -ENODEV;		/* No PHY we understand */
+	if (!fep->phy)
+		return -ENODEV;		/* No PHY we understand */
+
+	mii_do_cmd(dev, fep->phy->ack_int);
+	mii_do_cmd(dev, fep->phy->config);
+	mii_do_cmd(dev, phy_cmd_config);  /* display configuration */
+	while(!fep->sequence_done)
+		schedule();
+
+	mii_do_cmd(dev, fep->phy->startup);
 #else
 	fep->link = 1;
-	fcc_restart(dev, 0);	/* always start in half-duplex */
-	netif_start_queue(dev);
-	return 0;					/* Always succeed */
 #endif	/* CONFIG_USE_MDIO */
+
+	netif_start_queue(dev);
+
+#if defined(CONFIG_USE_MDIO) || defined(CONFIG_TQM8260)
+	fcc_restart (dev, 1);	/* start in full duplex mode */
+#else
+	fcc_restart (dev, 0);	/* start in half duplex mode */
+#endif
+
+	return 0;		/* Always succeed */
 }
 

             reply	other threads:[~2005-04-11 14:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-11 14:40 Rune Torgersen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-04-11 13:51 [PATCH] RE: FCC Ethernet startup crash Rune Torgersen
2005-04-08 14:39 Rune Torgersen
2005-04-11  9:19 ` [PATCH] " Stefan Nickl

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=DCEAAC0833DD314AB0B58112AD99B93B859355@ismail.innsys.innovsys.com \
    --to=runet@innovsys.com \
    --cc=Stefan.Nickl@kontron.com \
    --cc=linuxppc-embedded@ozlabs.org \
    --cc=trini@kernel.crashing.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