Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2287562imm; Mon, 28 May 2018 05:26:45 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqYOWaNduco47MxCRLZUVE9cEd/UmWgYRXOSPS84E/HPU9Wz1aRlXUs+Su7zekn0KezqZxr X-Received: by 2002:a62:3889:: with SMTP id f131-v6mr13330982pfa.173.1527510405413; Mon, 28 May 2018 05:26:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527510405; cv=none; d=google.com; s=arc-20160816; b=kMdMyh0rY/tfGbBF1QCZAg2AyTGogaarHQ3eIw6CAWOl1/rJ+oS2h7R+Ay9OUfM/XN roIOBay4HXe/ADlLh0agtLuRA9iPjlAPUEpkm1ZQpMKv9EADAufSvc+LSrcp4WrhnKhY DLUOqddCEzYq3RrSfKGFyY1+FRg5aVyEFPDDtSfmaUapR/vpMBLO9D6msJjT+LmYVHVg NDUDRpTJmh0VraQHKjrUZh/YN9yEGZAT2DjvnpUI2yass60UG3zIb8n+N9Ap3TqNPYhr rrap4dwY85jA+ODZSsN++mZplCOSlPUUVdgKDVxBZgwwm2GuqDyO+6MutCk5NFdEKTUR DFNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=Xonisi/x6E/5jQd00+lMUucWTjH42cOO5PgtW2bRbqY=; b=e4hOBaLozHLVcgaPFTRjxZ9HHMbT6VicdwTqCGCT6LOxWAJfqmNVDgWySm3gHhQbXt KSG9ejNN2ROivbzJ00kfM4VETj+vn2x7fynbN1TuwVf8498cj4MfPx/NYv2LBy70TCxr n7YzvsNkIbnXow8V0m1MZ2S0Br7khUMbWfE38XQhhMzIP/Cm7jBUITqjCLqDqqnRmg8y Wt/N18UH3uqgFv6QQLjj2usMlJNIR1hXKDELz/VbJwU6EmJ9F8GGof+SP5QgCWyhnGtA BwKKUF7fAhi+n0+h5Ht3uQwF86Q+H9SsvMWS1YspgsV4S2mJ/q9g02XBSd06ghYZSBPM 1spQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CmEVzUXf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b17-v6si29494559plz.480.2018.05.28.05.26.30; Mon, 28 May 2018 05:26:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CmEVzUXf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423540AbeE1MZw (ORCPT + 99 others); Mon, 28 May 2018 08:25:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:48640 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422720AbeE1LBD (ORCPT ); Mon, 28 May 2018 07:01:03 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 836A6206B7; Mon, 28 May 2018 11:01:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527505263; bh=gT3GZE10dRFW0Ik2zLXvhRfN8LqHVgrp4x8fr9NemNU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CmEVzUXfTp2Rf7I9GfgB4l6I44X0HvB9iEi/CUbUpSonYkg2FJcaVRZ6zG/DDx9wh 3Jcmiw9hoia6OiNxYk6uB4ypDyuNeX0cpHTG3WjBF24jlwBpx9tUdyerLSl+XZar1z sqA965cy/AX7y37PO/UCGep6gfQfWqAo+wNu1xA8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Will Newton , Bjorn Andersson , Andy Gross , Sasha Levin Subject: [PATCH 4.14 435/496] soc: qcom: wcnss_ctrl: Fix increment in NV upload Date: Mon, 28 May 2018 12:03:40 +0200 Message-Id: <20180528100338.057023280@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100319.498712256@linuxfoundation.org> References: <20180528100319.498712256@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Bjorn Andersson [ Upstream commit 90c29ed7627b6b4aeb603ee197650173c8434512 ] hdr.len includes both the size of the header and the fragment, so using this when stepping through the firmware causes us to skip 16 bytes every chunk of 3072 bytes; causing only the first fragment to actually be valid data. Instead use fragment size steps through the firmware blob. Fixes: ea7a1f275cf0 ("soc: qcom: Introduce WCNSS_CTRL SMD client") Reported-by: Will Newton Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/soc/qcom/wcnss_ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/soc/qcom/wcnss_ctrl.c +++ b/drivers/soc/qcom/wcnss_ctrl.c @@ -249,7 +249,7 @@ static int wcnss_download_nv(struct wcns /* Increment for next fragment */ req->seq++; - data += req->hdr.len; + data += NV_FRAGMENT_SIZE; left -= NV_FRAGMENT_SIZE; } while (left > 0);