Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1192917ybe; Thu, 5 Sep 2019 11:43:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqwgfa84cZYHRNj/wKBsFouuusioJQC0emWok1Etpmh4jJRihBnUgqQ+91AGOKrMh2EmAvvw X-Received: by 2002:a17:90a:9505:: with SMTP id t5mr5477585pjo.77.1567709010525; Thu, 05 Sep 2019 11:43:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567709010; cv=none; d=google.com; s=arc-20160816; b=LvTMtAsbvTRQdfSwGrkFcecCCb0Fdc1MzDVHkhUuq2MY3cJPCN114Oq/NpJJkl8QgE QMmbRz10iC0QU8A9VbU/ZpCZcZAT97khtH+moUAZlwI54chtECytiT1ibv5XvZuUd0Bt IaCco7lqTAPv1UNSEpzTBBcbqMSFyKVyw2QDVCm7VKU13xnrnlTIl48fWzMa1bN3Xnyv O7XgBQp5R3pAAsrXbKel8uEAJUipLoJxZmkvhogiQYVU1/+u+q95OZahUrfHBBPXAk58 dwZsa7LtWx/Lu0/C9PyULPXOBjWMhnfLMWk8xwzJKCPxjvxU9HBnazpV1SnbukLOFsiK Av2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=8RrqW2ETHACihEwJBK0LvJ661RvNRhdtbyHal4cMZo4=; b=EEn11fTGk1m0AIOVU3m2O+m0uXrKLwiH68JNJVzAUqy/xpjOX0bjsFv2we09jXmS2l VsMCWWXOuPLr8PCLECqyunx0wnjm/U2QipD6keVT4Rez+7W6h7f4Vxdmpqoco8p3BbLI /2J7YB8+2VZIFLkYWNmTdd+jpYT7wXQxvStZLbSObd7ys7/67gtLQBjlIAy5xh28edM1 BvfLV7izsSHXrP39iTf7holuwaVk0TehMTlDOTd/NpLGCcxPCiSJEszsyUGidyazyiTF C6NsTzgsTAA0huXw2E9WZN/5kzcO5mMBsnHf03HXzCgzYXuxlhnnHUk0r1VRlCFkvSHb 6EWg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-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 h64si2409089pge.208.2019.09.05.11.43.03; Thu, 05 Sep 2019 11:43:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390463AbfIEP3L (ORCPT + 99 others); Thu, 5 Sep 2019 11:29:11 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:52552 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388218AbfIEP3L (ORCPT ); Thu, 5 Sep 2019 11:29:11 -0400 Received: from marcel-macbook.fritz.box (p4FEFC197.dip0.t-ipconnect.de [79.239.193.151]) by mail.holtmann.org (Postfix) with ESMTPSA id 9692CCECD1; Thu, 5 Sep 2019 17:37:57 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: [PATCH v2] Bluetooth: btrtl: Fix an issue that failing to download the FW which size is over 32K bytes From: Marcel Holtmann In-Reply-To: <20190905052157.2052-1-max.chou@realtek.com> Date: Thu, 5 Sep 2019 17:29:09 +0200 Cc: Johan Hedberg , linux-bluetooth , LKML , alex_lu@realsil.com.cn Content-Transfer-Encoding: 7bit Message-Id: <49091C5B-1211-45DC-8249-715340CD6314@holtmann.org> References: <20190905052157.2052-1-max.chou@realtek.com> To: Max Chou X-Mailer: Apple Mail (2.3445.104.11) Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Max, > Fix the issue that when the FW size is 32K+, it will fail for the download > process because of the incorrect index. > > When firmware patch length is over 32K, "dl_cmd->index" may >= 0x80. It > will be thought as "data end" that download process will not complete. > However, driver should recount the index from 1. > > Signed-off-by: Max Chou > --- > Changes in v2: > - Added the comment for commit message > - Remove the extra variable > > drivers/bluetooth/btrtl.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) patch has been applied to bluetooth-next tree. Regards Marcel