From patchwork Wed Feb 4 13:57:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 44336 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B7B372029F for ; Wed, 4 Feb 2015 13:58:34 +0000 (UTC) Received: by mail-la0-f69.google.com with SMTP id gm9sf1475189lab.0 for ; Wed, 04 Feb 2015 05:58:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=Y3xQROj4AQI5rNWYJm8lAETuyGdELyg2l23+39bcB5E=; b=R4kxp7Wnvqjr+6EuloWBZkiAUPkwGLRLVd2LwWQNOBs8/EB/dZB5LvFm+Ki+NhBFwW Jj7ciydZdbbUFsWbYs6/qWD465eLzF4/GELGBaktAt9PHIadKWwLBx/nTGc0sNL2sO0I MrCEMPjocnowbWN3j4MmU784ujGAskNW6EPoVsftIFDULe2JRh3ngz5n6qceVrke5cYj /UbWMSYmgtGofyRbNQ44ZeNXcLb4XNWOGGBCswN8cYiWkeCouW3Guqg61hJt5HquA0ox EMFJdNplkgwKBYgB5dG37JHTsLP9dykerK70BnmTpSxGjC1f8Dp5/Dy1I0lj0b7UgK79 ct8Q== X-Gm-Message-State: ALoCoQlqm+6wqjoi0zvvqNgNra9Tfw6U3Keab1u/keEJAEwYqM/GnnsO/GRxT4ejlt+KCIBCjv1d X-Received: by 10.112.148.198 with SMTP id tu6mr3841757lbb.3.1423058313676; Wed, 04 Feb 2015 05:58:33 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.39 with SMTP id kv7ls33276lac.76.gmail; Wed, 04 Feb 2015 05:58:33 -0800 (PST) X-Received: by 10.152.6.37 with SMTP id x5mr30565950lax.44.1423058313434; Wed, 04 Feb 2015 05:58:33 -0800 (PST) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com. [209.85.217.177]) by mx.google.com with ESMTPS id k8si1421937lae.41.2015.02.04.05.58.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Feb 2015 05:58:33 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) client-ip=209.85.217.177; Received: by mail-lb0-f177.google.com with SMTP id p9so1592024lbv.8 for ; Wed, 04 Feb 2015 05:58:33 -0800 (PST) X-Received: by 10.152.7.229 with SMTP id m5mr30936096laa.80.1423058313126; Wed, 04 Feb 2015 05:58:33 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp502334lbj; Wed, 4 Feb 2015 05:58:32 -0800 (PST) X-Received: by 10.70.61.6 with SMTP id l6mr40021281pdr.113.1423058311405; Wed, 04 Feb 2015 05:58:31 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id sw2si2238336pab.121.2015.02.04.05.58.30; Wed, 04 Feb 2015 05:58:31 -0800 (PST) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755347AbbBDN6W (ORCPT + 29 others); Wed, 4 Feb 2015 08:58:22 -0500 Received: from mail-lb0-f172.google.com ([209.85.217.172]:57473 "EHLO mail-lb0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751062AbbBDN6U (ORCPT ); Wed, 4 Feb 2015 08:58:20 -0500 Received: by mail-lb0-f172.google.com with SMTP id l4so1620970lbv.3 for ; Wed, 04 Feb 2015 05:58:19 -0800 (PST) X-Received: by 10.112.132.67 with SMTP id os3mr30265671lbb.90.1423058299303; Wed, 04 Feb 2015 05:58:19 -0800 (PST) Received: from khorivan.itg.ti.com (152-172-94-178.pool.ukrtel.net. [178.94.172.152]) by mx.google.com with ESMTPSA id b6sm380857laa.14.2015.02.04.05.58.16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Feb 2015 05:58:18 -0800 (PST) From: Ivan Khoronzhuk To: linux-kernel@vger.kernel.org, matt.fleming@intel.com, ard.biesheuvel@linaro.org Cc: leif.lindholm@linaro.org, Ivan Khoronzhuk Subject: [Patch] firmware: dmi_scan: fix dmi scan to handle "End of Table" structure Date: Wed, 4 Feb 2015 15:57:45 +0200 Message-Id: <1423058265-23032-1-git-send-email-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ivan.khoronzhuk@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The dmi-sysfs should create "End of Table" entry, that is type 127. But after adding initial SMBIOS v3 support the 127-0 entry is not handled any more, as result it's not created in sysfs. This is important because the size of whole DMI table must correspond to sum of all DMI entry sizes. Of-course, it can be handled in newly introduced libdmifs by adding end entry virtually, but it's brake backward compatibility and don't correspond to SMBIOS DMI table size read from SMBIOS entry point structure. Signed-off-by: Ivan Khoronzhuk --- drivers/firmware/dmi_scan.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c index c5f7b4e..c63e5e5 100644 --- a/drivers/firmware/dmi_scan.c +++ b/drivers/firmware/dmi_scan.c @@ -93,12 +93,6 @@ static void dmi_table(u8 *buf, int len, int num, const struct dmi_header *dm = (const struct dmi_header *)data; /* - * 7.45 End-of-Table (Type 127) [SMBIOS reference spec v3.0.0] - */ - if (dm->type == DMI_ENTRY_END_OF_TABLE) - break; - - /* * We want to know the total length (formatted area and * strings) before decoding to make sure we won't run off the * table in dmi_decode or dmi_string