[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20111207160826.158302123@clark.kroah.org>
Date: Wed, 07 Dec 2011 08:07:03 -0800
From: Greg KH <gregkh@...e.de>
To: <linux-kernel@...r.kernel.org>, <stable@...r.kernel.org>
Cc: <torvalds@...ux-foundation.org>, <akpm@...ux-foundation.org>,
<alan@...rguk.ukuu.org.uk>, Lars-Peter Clausen <lars@...afoo.de>,
Mike Frysinger <vapier@...too.org>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>
Subject: [43/80] firmware: Sigma: Skip header during CRC generation
3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lars-Peter Clausen <lars@...afoo.de>
commit c56935bdc0a8edf50237d3b0205133a5b0adc604 upstream.
The firmware header is not part of the CRC, so skip it. Otherwise the firmware
will be rejected due to non-matching CRCs.
Signed-off-by: Lars-Peter Clausen <lars@...afoo.de>
Acked-by: Mike Frysinger <vapier@...too.org>
Signed-off-by: Mark Brown <broonie@...nsource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
---
drivers/firmware/sigma.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/firmware/sigma.c
+++ b/drivers/firmware/sigma.c
@@ -130,7 +130,8 @@ int process_sigma_firmware(struct i2c_cl
if (memcmp(ssfw_head->magic, SIGMA_MAGIC, ARRAY_SIZE(ssfw_head->magic)))
goto done;
- crc = crc32(0, fw->data, fw->size);
+ crc = crc32(0, fw->data + sizeof(*ssfw_head),
+ fw->size - sizeof(*ssfw_head));
pr_debug("%s: crc=%x\n", __func__, crc);
if (crc != ssfw_head->crc)
goto done;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists