From patchwork Mon Jun 12 08:21:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 13275824 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FE4DC7EE23 for ; Mon, 12 Jun 2023 08:53:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233651AbjFLIxb (ORCPT ); Mon, 12 Jun 2023 04:53:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233345AbjFLIxA (ORCPT ); Mon, 12 Jun 2023 04:53:00 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C34361FDB for ; Mon, 12 Jun 2023 01:52:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686559942; x=1718095942; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=nvTw/GZuY+NyXCnGB2Z1yYs3/CsVd3QAeUEWzLQSEEQ=; b=PqDRgbCUr8DdxoTVDMZasx1oJjg1933AEwmZfahvmZVqBHnDLF92WftZ Ni5qpa7uVTWez69E0e6l/2JoC23ntAviE/TC8FYKY03p7Bmgxdxm/SzTW UT9tbkrN+Ae5pdHfiH/8k0NI/O/RxDizOtKMsmhlW3PU0DmvWzlB4QT0l v6+5fI7h3DHmGshnDfSG8p6IK12CGpDAS2UlN8c6jfYZecgbMYba+3nKk ccn1GuLlGL0PGtS1Mo0rXRWUDkezhd67aN8GonQtIVyFtDNpp2n5eDdbW xPi9JiBF3q1/JXOoE6epVq94h+rMxHIY8f++jyHcJq46e6ziMY8nte1VX A==; X-IronPort-AV: E=McAfee;i="6600,9927,10738"; a="347627245" X-IronPort-AV: E=Sophos;i="6.00,236,1681196400"; d="scan'208";a="347627245" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2023 01:21:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10738"; a="744247723" X-IronPort-AV: E=Sophos;i="6.00,236,1681196400"; d="scan'208";a="744247723" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga001.jf.intel.com with ESMTP; 12 Jun 2023 01:21:37 -0700 Received: by black.fi.intel.com (Postfix, from userid 1001) id 52FD434C; Mon, 12 Jun 2023 11:21:45 +0300 (EEST) From: Mika Westerberg To: linux-usb@vger.kernel.org Cc: Gil Fine , Yehezkel Bernat , Michael Jamet , Lukas Wunner , Andreas Noever , Mika Westerberg Subject: [PATCH v2 01/20] thunderbolt: Ignore data CRC mismatch for USB4 routers Date: Mon, 12 Jun 2023 11:21:26 +0300 Message-Id: <20230612082145.62218-2-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230612082145.62218-1-mika.westerberg@linux.intel.com> References: <20230612082145.62218-1-mika.westerberg@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org This is also something not always updated after the DROM contents itself so issue warning but continue parsing it as we do for pre-USB4 DROMs too. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/eeprom.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/thunderbolt/eeprom.c b/drivers/thunderbolt/eeprom.c index 0f6099c18a94..eb241b270f79 100644 --- a/drivers/thunderbolt/eeprom.c +++ b/drivers/thunderbolt/eeprom.c @@ -605,9 +605,8 @@ static int usb4_drom_parse(struct tb_switch *sw) 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); - return -EINVAL; } return tb_drom_parse_entries(sw, USB4_DROM_HEADER_SIZE);