From: Mika Westerberg Date: Tue, 6 Jun 2017 12:25:03 +0000 (+0300) Subject: thunderbolt: Do not fail if DROM data CRC32 is invalid X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=390229455535d75a9bdd19437054413d677fc7b0;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git thunderbolt: Do not fail if DROM data CRC32 is invalid There are devices out there where CRC32 of the DROM is not correct. One reason for this is that the ICM firmware does not validate it and it seems that neither does the Apple driver. To be able to support such devices we continue parsing the DROM contents regardless of whether CRC32 failed or not. We still keep the warning there. Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat Reviewed-by: Michael Jamet Reviewed-by: Andy Shevchenko Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/thunderbolt/eeprom.c b/drivers/thunderbolt/eeprom.c index 7e485e3ef27e..e2c1f8a45522 100644 --- a/drivers/thunderbolt/eeprom.c +++ b/drivers/thunderbolt/eeprom.c @@ -485,9 +485,8 @@ parse: crc = tb_crc32(sw->drom + TB_DROM_DATA_START, header->data_len); if (crc != header->data_crc32) { tb_sw_warn(sw, - "drom data crc32 mismatch (expected: %#x, got: %#x), aborting\n", + "drom data crc32 mismatch (expected: %#x, got: %#x), continuing\n", header->data_crc32, crc); - goto err; } if (header->device_rom_revision > 2)