Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rapidio: use default route value for CPS switches

Fix 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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Alexandre Bounine and committed by
Linus Torvalds
679395fd 7a88d628

+10 -8
+10 -8
drivers/rapidio/switches/idtcps.c
··· 15 15 #include <linux/rio_ids.h> 16 16 #include "../rio.h" 17 17 18 - #define CPS_NO_ROUTE 0xdf 18 + #define CPS_DEFAULT_ROUTE 0xde 19 + #define CPS_NO_ROUTE 0xdf 19 20 20 21 #define IDTCPS_RIO_DOMAIN 0xf20020 21 22 ··· 54 53 rio_mport_read_config_32(mport, destid, hopcount, 55 54 RIO_STD_RTE_CONF_PORT_SEL_CSR, &result); 56 55 57 - if (CPS_NO_ROUTE == (u8)result) 58 - result = RIO_INVALID_ROUTE; 59 - 60 - *route_port = (u8)result; 56 + if (CPS_DEFAULT_ROUTE == (u8)result || 57 + CPS_NO_ROUTE == (u8)result) 58 + *route_port = RIO_INVALID_ROUTE; 59 + else 60 + *route_port = (u8)result; 61 61 } 62 62 63 63 return 0; ··· 76 74 RIO_STD_RTE_CONF_DESTID_SEL_CSR, i); 77 75 rio_mport_write_config_32(mport, destid, hopcount, 78 76 RIO_STD_RTE_CONF_PORT_SEL_CSR, 79 - (RIO_INVALID_ROUTE << 24) | 80 - (RIO_INVALID_ROUTE << 16) | 81 - (RIO_INVALID_ROUTE << 8) | RIO_INVALID_ROUTE); 77 + (CPS_DEFAULT_ROUTE << 24) | 78 + (CPS_DEFAULT_ROUTE << 16) | 79 + (CPS_DEFAULT_ROUTE << 8) | CPS_DEFAULT_ROUTE); 82 80 i += 4; 83 81 } 84 82 }