Subject: spufs: fix message count for wbox_info From: Dwayne Grant McConnell The stat register holds the number of empty slots for wbox, not the number of elements present. Signed-off-by: Dwayne Grant McConnell Signed-off-by: Arnd Bergmann --- Dwayne Grant McConnell Lotus Notes Mail: Dwayne McConnell [Mail]/Austin/IBM@IBMUS Lotus Notes Calendar: Dwayne McConnell [Calendar]/Austin/IBM@IBMUS Index: linux-2.6/arch/powerpc/platforms/cell/spufs/file.c =================================================================== --- linux-2.6.orig/arch/powerpc/platforms/cell/spufs/file.c +++ linux-2.6/arch/powerpc/platforms/cell/spufs/file.c @@ -1636,7 +1636,7 @@ static ssize_t spufs_wbox_info_read(stru spu_acquire_saved(ctx); spin_lock(&ctx->csa.register_lock); wbox_stat = ctx->csa.prob.mb_stat_R; - cnt = (wbox_stat & 0x00ff00) >> 8; + cnt = 4 - ((wbox_stat & 0x00ff00) >> 8); for (i = 0; i < cnt; i++) { data[i] = ctx->csa.spu_mailbox_data[i]; }