lkml.org 
[lkml]   [2018]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.14 435/496] soc: qcom: wcnss_ctrl: Fix increment in NV upload
    Date
    4.14-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Bjorn Andersson <bjorn.andersson@linaro.org>

    [ 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 <will.newton@gmail.com>
    Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
    Signed-off-by: Andy Gross <andy.gross@linaro.org>
    Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    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);


    \
     
     \ /
      Last update: 2018-05-28 14:26    [W:4.446 / U:0.064 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site