From d4aba0f611f3457a37bfe5d01983e421a7a8b739 Mon Sep 17 00:00:00 2001 From: "Jayachandran C." Date: Thu, 24 Jan 2013 15:23:01 +0000 Subject: [PATCH] Fix credit configuration on Broadcom XLP CMS The CMS output queue credit configuration register is 64 bit, so use a 64 bit variable while updating it. Obtained from: Venkatesh J V --- sys/mips/nlm/hal/fmn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/mips/nlm/hal/fmn.c b/sys/mips/nlm/hal/fmn.c index 6d401343ab5d..8ebc7537ac35 100644 --- a/sys/mips/nlm/hal/fmn.c +++ b/sys/mips/nlm/hal/fmn.c @@ -138,9 +138,9 @@ uint32_t nlm_cms_total_stations = 18 * 4 /*xlp_num_nodes*/; void nlm_cms_setup_credits(uint64_t base, int destid, int srcid, int credit) { - uint32_t val; + uint64_t val; - val = ((credit << 24) | (destid << 12) | (srcid << 0)); + val = (((uint64_t)credit << 24) | (destid << 12) | (srcid << 0)); nlm_write_cms_reg(base, CMS_OUTPUTQ_CREDIT_CFG, val); }