From patchwork Tue Aug 24 09:41:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 501794 Delivered-To: patch@linaro.org Received: by 2002:a02:6f15:0:0:0:0:0 with SMTP id x21csp2979300jab; Tue, 24 Aug 2021 02:41:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQelKdueoznnVL8ypP7/RMaATHR4xkMjGwHeCfESIqTxzdu5sPATOQTWFlyBUDFSzIi5uM X-Received: by 2002:a6b:c8c7:: with SMTP id y190mr24148123iof.210.1629798081056; Tue, 24 Aug 2021 02:41:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629798081; cv=none; d=google.com; s=arc-20160816; b=Ug+jMi1HsMmiRRtrAtWnomKM0QoMXVEwexwNpCFjT5xXk5ddDDOCxN6r7DqMqfWNl2 n8v/7obS/jG9B9zbR+lHJT7qHTSMOn1jec+Pl7VbM396TvnXDcBOUAT4Br8dmXJHoimo BpnDhRtxtYZiadkyZ6NKwRczZADTYAyWzkj6Qt2zzAfUIuIfQLA4yZUBN7Fah9lMnFbt prb4YAKsYRho+gJV2ZbQjr6xVaZh+7oXMdJN0kX9YoLToKoFsa0DjbI7SXT0SGiZSQxl EaP8aOOHFkAxZNRzD+nVivaBQuRSsCmaLGSyRuhjzmQprBfYVabKXkuN/7doYyDaJ1BU lUlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=BPsqm7LMjNetVdv0Z1pUwtnOmfuM+EFlH6yhG6DqTmI=; b=oxTqBJfgZM9yRoTGdPD4znnpFZZpQWVyvuNCtMAwYjzlfgc5wR65CcIklrzzgMX08U PyujcOYFZm9t3mR8m86xodhSbWHiq1Cg1RFbn7FU4z5WAEMUY6qsegZeLo8ATJZRWV4r ny4edDw//kL0cOLRobgifbgNxfjaHWSzyP2IAuOjSoEefO8howlCFgKFz3yqBm2KWyyX Ce1kNY0mJRonazAgqClBS03fgQhxh6bur0ht1puy3FsSd9iRizo/I1rVHpc+C5xPY2wh 2em0AyS2JzHfPT2FoCdtP7mxipRxggSz6cA8LrqrZi8AzzfOAznKOE9HzltUlFSJEB0K Lbyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jH485jhx; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c4si16178571iok.10.2021.08.24.02.41.20; Tue, 24 Aug 2021 02:41:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jH485jhx; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235583AbhHXJmD (ORCPT + 16 others); Tue, 24 Aug 2021 05:42:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:44834 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235566AbhHXJmD (ORCPT ); Tue, 24 Aug 2021 05:42:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A6DF06108F; Tue, 24 Aug 2021 09:41:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629798079; bh=gFIclmSjmiJh/ormPzj/mq5h+yqt+1OnN3tuT5TqpHw=; h=From:To:Cc:Subject:Date:From; b=jH485jhxhmWnB9jCuN7EaTzM7RzLserft47okor9m+iCNSJWRd/mj4zRH/kbG6ofR zXvs/YW8tHWaviQAr41bTIkBS9uSILaE1+On235GRBizH/75MyCRjZz0uSH68nGqrD Hty42tlTjz08KsWYuMdXkkkOkLskkU6S2vQ8zPXOTXtLIvGgRhK4FQgtRA2Pklynsj 3+kOe9RTg3o69vwhU2Sz0eZDfDZyq0JbQwUEIX+pJcaUjV+RjLS7ZrxGcdjMYx8Ge7 5T+Nruy089lM0kwha2U+1mBRlLo0/gfGZf6a3Yenlt9GBIsRv+ch4h8RSraI9kktew sfW7BZfRUcOMg== From: Shawn Guo To: Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org, Shawn Guo Subject: [PATCH] soc: qcom: mdt_loader: Drop PT_LOAD check on hash segment Date: Tue, 24 Aug 2021 17:41:09 +0800 Message-Id: <20210824094109.7272-1-shawnguo@kernel.org> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Shawn Guo It's been observed on Sony Xperia M4 Aqua phone, that wcnss firmware has the type of the second segment holding hashes just be PT_LOAD. So drop the check on phdrs[1].p_type to get it go on that phone. Signed-off-by: Shawn Guo --- drivers/soc/qcom/mdt_loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/soc/qcom/mdt_loader.c b/drivers/soc/qcom/mdt_loader.c index eba7f76f9d61..6034cd8992b0 100644 --- a/drivers/soc/qcom/mdt_loader.c +++ b/drivers/soc/qcom/mdt_loader.c @@ -98,7 +98,7 @@ void *qcom_mdt_read_metadata(const struct firmware *fw, size_t *data_len) if (ehdr->e_phnum < 2) return ERR_PTR(-EINVAL); - if (phdrs[0].p_type == PT_LOAD || phdrs[1].p_type == PT_LOAD) + if (phdrs[0].p_type == PT_LOAD) return ERR_PTR(-EINVAL); if ((phdrs[1].p_flags & QCOM_MDT_TYPE_MASK) != QCOM_MDT_TYPE_HASH)