From 6f913160fa8e8de5ea2746a2f6b1d65c67e092b0 Mon Sep 17 00:00:00 2001 From: Timur Tabi Date: Mon, 3 Mar 2008 11:11:30 -0600 Subject: [POWERPC] QE: Fix QE firmware uploading limit Fix a typo in qe_upload_firmware() that prevented uploading firmware on systems with more than one RISC core. Signed-off-by: Timur Tabi Signed-off-by: Kumar Gala --- arch/powerpc/sysdev/qe_lib/qe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/powerpc/sysdev') diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c index 6efbd5e5bb1..f963fbf21ef 100644 --- a/arch/powerpc/sysdev/qe_lib/qe.c +++ b/arch/powerpc/sysdev/qe_lib/qe.c @@ -509,7 +509,7 @@ int qe_upload_firmware(const struct qe_firmware *firmware) } /* Validate some of the fields */ - if ((firmware->count < 1) || (firmware->count >= MAX_QE_RISC)) { + if ((firmware->count < 1) || (firmware->count > MAX_QE_RISC)) { printk(KERN_ERR "qe-firmware: invalid data\n"); return -EINVAL; } -- cgit v1.2.3-70-g09d2 From 86f4e5d4335556191b436b41b0ad2f719c4a98d4 Mon Sep 17 00:00:00 2001 From: Ionut Nicu Date: Fri, 7 Mar 2008 19:27:59 +0200 Subject: [POWERPC] QE: Make qe_get_firmware_info reentrant The function was returning NULL the second time it was called if the firmware was uploaded from the boot loader or the first time it was called if the firmware was uploaded from the kernel. Signed-off-by: Ionut Nicu Acked-By: Timur Tabi Signed-off-by: Kumar Gala --- arch/powerpc/sysdev/qe_lib/qe.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'arch/powerpc/sysdev') diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c index f963fbf21ef..cc81fd1141b 100644 --- a/arch/powerpc/sysdev/qe_lib/qe.c +++ b/arch/powerpc/sysdev/qe_lib/qe.c @@ -609,7 +609,10 @@ struct qe_firmware_info *qe_get_firmware_info(void) * If we haven't checked yet, and a driver hasn't uploaded a firmware * yet, then check the device tree for information. */ - if (initialized || qe_firmware_uploaded) + if (qe_firmware_uploaded) + return &qe_firmware_info; + + if (initialized) return NULL; initialized = 1; -- cgit v1.2.3-70-g09d2