mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexandre Bounine <alexandre.bounine@idt.com>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org,
	Alexandre Bounine <alexandre.bounine@idt.com>,
	Matt Porter <mporter@kernel.crashing.org>,
	Li Yang <leoli@freescale.com>,
	Kumar Gala <galak@kernel.crashing.org>,
	Thomas Moll <thomas.moll@sysgo.com>
Subject: [PATCH -mm 5/5] RapidIO: Use default route value for CPS switches
Date: Mon,  3 May 2010 11:45:58 -0400	[thread overview]
Message-ID: <1272901558-9292-6-git-send-email-alexandre.bounine@idt.com> (raw)
In-Reply-To: <1272901558-9292-1-git-send-email-alexandre.bounine@idt.com>

Fixed to use correct default value for routing table entries. 

Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Li Yang <leoli@freescale.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Thomas Moll <thomas.moll@sysgo.com>
---
 drivers/rapidio/switches/idtcps.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/rapidio/switches/idtcps.c b/drivers/rapidio/switches/idtcps.c
index 73c3677..2c790c1 100644
--- a/drivers/rapidio/switches/idtcps.c
+++ b/drivers/rapidio/switches/idtcps.c
@@ -15,7 +15,8 @@
 #include <linux/rio_ids.h>
 #include "../rio.h"
 
-#define CPS_NO_ROUTE 0xdf
+#define CPS_DEFAULT_ROUTE	0xde
+#define CPS_NO_ROUTE		0xdf
 
 #define IDTCPS_RIO_DOMAIN 0xf20020
 
@@ -53,10 +54,11 @@ idtcps_route_get_entry(struct rio_mport *mport, u16 destid, u8 hopcount,
 		rio_mport_read_config_32(mport, destid, hopcount,
 				RIO_STD_RTE_CONF_PORT_SEL_CSR, &result);
 
-		if (CPS_NO_ROUTE == (u8)result)
-			result = RIO_INVALID_ROUTE;
-
-		*route_port = (u8)result;
+		if (CPS_DEFAULT_ROUTE == (u8)result ||
+		    CPS_NO_ROUTE == (u8)result)
+			*route_port = RIO_INVALID_ROUTE;
+		else
+			*route_port = (u8)result;
 	}
 
 	return 0;
@@ -74,9 +76,9 @@ idtcps_route_clr_table(struct rio_mport *mport, u16 destid, u8 hopcount,
 				RIO_STD_RTE_CONF_DESTID_SEL_CSR, i);
 			rio_mport_write_config_32(mport, destid, hopcount,
 				RIO_STD_RTE_CONF_PORT_SEL_CSR,
-				(RIO_INVALID_ROUTE << 24) |
-				(RIO_INVALID_ROUTE << 16) |
-				(RIO_INVALID_ROUTE << 8) | RIO_INVALID_ROUTE);
+				(CPS_DEFAULT_ROUTE << 24) |
+				(CPS_DEFAULT_ROUTE << 16) |
+				(CPS_DEFAULT_ROUTE << 8) | CPS_DEFAULT_ROUTE);
 			i += 4;
 		}
 	}
-- 
1.7.0.5


  parent reply	other threads:[~2010-05-03 15:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-03 15:45 [PATCH -mm 0/5] RapidIO: Set of patches to current -mm tree Alexandre Bounine
2010-05-03 15:45 ` [PATCH -mm 1/5] RapidIO: Fixed typos and minor edits Alexandre Bounine
2010-05-03 15:45 ` [PATCH -mm 2/5] RapidIO: Add debug configuration option Alexandre Bounine
2010-05-03 15:45 ` [PATCH -mm 3/5] RapidIO: Modify initialization of switch operations Alexandre Bounine
2010-05-03 15:45 ` [PATCH -mm 4/5] RapidIO: Add switch domain routines Alexandre Bounine
2010-05-04 23:24   ` Andrew Morton
2010-05-05 12:24     ` Bounine, Alexandre
2010-05-03 15:45 ` Alexandre Bounine [this message]
2010-05-18  6:28 ` [PATCH 0/1] RapidIO: Fix maintenance access to higher memory areas Thomas Moll

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=1272901558-9292-6-git-send-email-alexandre.bounine@idt.com \
    --to=alexandre.bounine@idt.com \
    --cc=akpm@linux-foundation.org \
    --cc=galak@kernel.crashing.org \
    --cc=leoli@freescale.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mporter@kernel.crashing.org \
    --cc=thomas.moll@sysgo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®