All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: linuxppc-embedded@ozlabs.org
Cc: p_gortmaker@yahoo.com
Subject: [PATCH 5/5] Updates for WRS SBC82xx boards
Date: Thu, 25 May 2006 14:32:32 -0400	[thread overview]
Message-ID: <20060525183231.GG679@windriver.com> (raw)


patch5: fcc_enet-mac-addr.diff1
	- restore proper collection of mac addr data in obsolete FCC
	  driver by replacing mix of #ifdef and if() with case

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>



--- linux-2.6.16_rc5/arch/ppc/8260_io/fcc_enet.c.orig	2006-01-02 22:21:10.000000000 -0500
+++ linux-2.6.16_rc5/arch/ppc/8260_io/fcc_enet.c	2006-02-27 18:01:45.000000000 -0500
@@ -1962,32 +1962,30 @@
 	 * non-static part of the address.
 	 */
 	eap = (unsigned char *)&(ep->fen_paddrh);
-	for (i=5; i>=0; i--) {
 
 /*
  * The EP8260 only uses FCC3, so we can safely give it the real
  * MAC address.
  */
+	for (i=5; i>=0; i--) switch(i) {
+		case 5:
 #ifdef CONFIG_SBC82xx
-		if (i == 5) {
 			/* bd->bi_enetaddr holds the SCC0 address; the FCC
 			   devices count up from there */
 			dev->dev_addr[i] = bd->bi_enetaddr[i] & ~3;
 			dev->dev_addr[i] += 1 + fip->fc_fccnum;
 			*eap++ = dev->dev_addr[i];
-		}
-#else
-#ifndef CONFIG_RPX8260
-		if (i == 3) {
+			break;
+#endif
+		case 3:
+#if !defined(CONFIG_RPX8260) && !defined(CONFIG_SBC82xx)
 			dev->dev_addr[i] = bd->bi_enetaddr[i];
 			dev->dev_addr[i] |= (1 << (7 - fip->fc_fccnum));
 			*eap++ = dev->dev_addr[i];
-		} else
+			break;
 #endif
-		{
+		default:
 			*eap++ = dev->dev_addr[i] = bd->bi_enetaddr[i];
-		}
-#endif
 	}
 
 	ep->fen_taddrh = 0;

             reply	other threads:[~2006-05-25 18:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-25 18:32 Paul Gortmaker [this message]
2006-05-25 21:39 ` [PATCH 5/5] Updates for WRS SBC82xx boards Vitaly Bordug

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=20060525183231.GG679@windriver.com \
    --to=paul.gortmaker@windriver.com \
    --cc=linuxppc-embedded@ozlabs.org \
    --cc=p_gortmaker@yahoo.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.