Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5973617ybe; Tue, 10 Sep 2019 11:34:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqwON52/BImt1ELfO8KpIrAYlnuNOaQoavXfFqccucwNWv8TvSPjgJSzf56vtHdbXaSii6/Z X-Received: by 2002:a17:906:6403:: with SMTP id d3mr16875090ejm.99.1568140442710; Tue, 10 Sep 2019 11:34:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568140442; cv=none; d=google.com; s=arc-20160816; b=FWmWm8FlLdE7n0xHc3wdpE2faLQIy3MRF/BILnWHuUMhmit0pMGqzxd8+4IUgkmHiT B4PGbHIdDG9dy2c0AZ79TelC0iEjwHCQr0/1ySDWdTtHEUP95voSpoQeUGUPt+pXlHB/ rBdzUT+sRzlSAJbPMGjc/IQDbfe7WMsfbp+3zpX02kozZew1U2CQLHa60apwQjLYvW8H AcZYQwp4HK4j+qz5kAVupGDAGFVKe3xOKAp2Mdtw/8M2DRoTXPR9dpm7Cu7jI30y12oH Gixi2azX/Njz3VwchorqNbp7+F/lmwjA+G1NfO4kT4mkP9CafqVGlkIbOdmCEdjeAWaz RHTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=MKRKebMQp8+SbILfMU8ecMqIsBhud1/TN1PMbu5EjjI=; b=rbvPpMai7idRgYYodX+JPKvhJFHwvZ2y/t7WM67+qB1GqZrpoHPEW1DUCnKdFWiCkK QyKo0u0hdUAOCx8CJosCjUf6O8hAhOb/T+yvQdvoQTjLIXgue1TiAldTM2SDKwGpPo/J pwTtyoK/hcre8x3JRibLyKjVV7V7y4KpSWJSZ0a5VJE7HAQmTckkrWvqLwWDKOhLWYWt u57sp+HVMjf5Tay8HtobhBE4oq6BBqMZBYPMoJSIY+gEK3DY5C1DuJX/Zzhqs8a0+ChG FVYGFA5pZBAoOEIwRdlC5JxCTECkuFElzXbgYki0sS2T7Djgt6oLpfiRRt1G3KBsG3hq aRSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=imxIhVk5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h91si1612865edd.270.2019.09.10.11.33.35; Tue, 10 Sep 2019 11:34:02 -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=@chromium.org header.s=google header.b=imxIhVk5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387626AbfIIQOG (ORCPT + 99 others); Mon, 9 Sep 2019 12:14:06 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:40906 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726472AbfIIQOF (ORCPT ); Mon, 9 Sep 2019 12:14:05 -0400 Received: by mail-pf1-f196.google.com with SMTP id x127so9455761pfb.7 for ; Mon, 09 Sep 2019 09:14:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=MKRKebMQp8+SbILfMU8ecMqIsBhud1/TN1PMbu5EjjI=; b=imxIhVk5aoekCjb3KrtkWUiDJG9zxpKIE771OqRjLKCUU5dIADhAa6wXm0FY6+YtDF VCz/+iFQxpMJz/eejN+BtKQWxzSBWU5Xq6jCCo3dlJRkvDYeCw80LJoyhXngUTW1Ltz7 F4PEOrXFIgE8XECGTNyTooYBhKEHd1LlHLq1Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=MKRKebMQp8+SbILfMU8ecMqIsBhud1/TN1PMbu5EjjI=; b=apz0akoU1yRNflG3ABTSXuO09wyORpp+sU5Bn53P6qeM1I1InFrcobfIL7ivEdkxWh 08pVjdcbcrHOKxHSiWVOTbaiaZ6O2aPK0ZwSp8YDuEH7HdDiu1K+FKjpQE6bDxSLmP2S d+bBYnvRi/JG1hvwShESrhj2It49rxoe1sW/mvB7uFNeZmdGrUF1h3I0lKJxuTdPi5wk HMh7wtejEKxKZDuiFKs3aAkTHhnF28bvFIeShtSpokdkXO/EYGIprjzstpS7cyyj5uGk ofCuRwzrNkFIz/5OB0IC1YOuw7OZKntqN/WvCTe4aiYQzrqkaAYBc7V2+IHRjvjsnGnn gH0g== X-Gm-Message-State: APjAAAX7JV/fyLNuixyqbCCSIxyCsLoFDgsbJOhcanX8XF1BHRqJNHLE aTC6EyoGOABjEXXGoNxzEy7U4rV882M= X-Received: by 2002:a63:3281:: with SMTP id y123mr21806450pgy.72.1568045643654; Mon, 09 Sep 2019 09:14:03 -0700 (PDT) Received: from localhost ([2620:15c:202:1:75a:3f6e:21d:9374]) by smtp.gmail.com with ESMTPSA id j1sm14982164pgl.12.2019.09.09.09.14.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Sep 2019 09:14:02 -0700 (PDT) Date: Mon, 9 Sep 2019 09:13:59 -0700 From: Matthias Kaehlcke To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Marcel Holtmann , Sasha Levin Subject: Re: [PATCH 4.14 04/40] Bluetooth: btqca: Add a short delay before downloading the NVM Message-ID: <20190909161359.GE133864@google.com> References: <20190908121114.260662089@linuxfoundation.org> <20190908121115.297090022@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190908121115.297090022@linuxfoundation.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Sep 08, 2019 at 01:41:37PM +0100, Greg Kroah-Hartman wrote: > [ Upstream commit 8059ba0bd0e4694e51c2ee6438a77b325f06c0d5 ] > > On WCN3990 downloading the NVM sometimes fails with a "TLV response > size mismatch" error: > > [ 174.949955] Bluetooth: btqca.c:qca_download_firmware() hci0: QCA Downloading qca/crnv21.bin > [ 174.958718] Bluetooth: btqca.c:qca_tlv_send_segment() hci0: QCA TLV response size mismatch WC3990 support was only added in 4.19, so this shouldn't be needed in older kernels, but it shouldn't do any harm either ;-) > It seems the controller needs a short time after downloading the > firmware before it is ready for the NVM. A delay as short as 1 ms > seems sufficient, make it 10 ms just in case. No event is received > during the delay, hence we don't just silently drop an extra event. > > Signed-off-by: Matthias Kaehlcke > Signed-off-by: Marcel Holtmann > Signed-off-by: Sasha Levin > --- > drivers/bluetooth/btqca.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c > index 0bbdfcef2aa84..a48a61f22f823 100644 > --- a/drivers/bluetooth/btqca.c > +++ b/drivers/bluetooth/btqca.c > @@ -363,6 +363,9 @@ int qca_uart_setup_rome(struct hci_dev *hdev, uint8_t baudrate) > return err; > } > > + /* Give the controller some time to get ready to receive the NVM */ > + msleep(10); > + > /* Download NVM configuration */ > config.type = TLV_TYPE_NVM; > snprintf(config.fwname, sizeof(config.fwname), "qca/nvm_%08x.bin",