Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1293147ybg; Fri, 18 Oct 2019 15:20:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqxt5nRRydVktrZZlyRI4iRr7l+A+NPafQM+iZMGBGcWBN/34xwY82SNkXfgQHmpaLq4tTOj X-Received: by 2002:a05:6402:213:: with SMTP id t19mr519909edv.7.1571437246004; Fri, 18 Oct 2019 15:20:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571437245; cv=none; d=google.com; s=arc-20160816; b=pI40nAoEYZ8Xy7qhJV+SJGfPrcL2zDMuI/alDDpPUdWH58cjvPNQDmXgtBdO9B+SZS XVwfmc44DkqqjvreO+wVoZWZE1KX+wBQ5aG9dNZ/LbZLyOU/1Q3NBn3QxwJHeQ2q0+sW MBIfJLAC8ENTT61AYnfNa4X0ojfPTUB8eG9A8Y/vv+S77sYmG2XTWk+WL48WyqRyD8TL Kkv5RQz/Lo/gz6Cq/PL7l4NeKM4EzyUStu7eT4vHu+txa2cSD09yn08FQM7dl0KXcvW4 arQzJKj+fdNM4Q93WdOr9qqgsONaXLaBMxcVhOCkNTWytr3gJdBfu+h5aScgKNWVeK8H SagQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=h/bBHRGusj98Ie+f89J7SFLKi2fjMoUyMTs7iY5sfPs=; b=jM1Fv1L7sWAH5gQzbq/dSZ8LCIIaF8F9N3skqL775NOVwv81szctUbb3DJ0VPhNKOI X+/Tt3ayIpG16iTRcuZe7Unu4jXXI5F90QlyOx63ef9OyozpSYP2h4mYjcgjqddBSCXB erciPuWPj1kvN6NEVp6STz75erN8ErrDS+tMVCEXIuFMJ3vk2LUyV1B03gdLZ9luJp8a r6b5mEkwDUNtaqUddTlnIWgkQMBoXDCldtcYYvre4jBZx78VfVZdhvNhRE3XX6Zxscds wpWpZUuaodq4Svo/4oME3Q+yktgmDzzn2sGZVMYk/vdsrQq2vZNHiTaQPh2s+tdr2Ci0 IVYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pek2pn2Q; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m7si1104202eda.192.2019.10.18.15.20.22; Fri, 18 Oct 2019 15:20:45 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pek2pn2Q; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2441533AbfJQVaK (ORCPT + 99 others); Thu, 17 Oct 2019 17:30:10 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:38707 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732322AbfJQVaK (ORCPT ); Thu, 17 Oct 2019 17:30:10 -0400 Received: by mail-pg1-f194.google.com with SMTP id w3so2087423pgt.5; Thu, 17 Oct 2019 14:30:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=h/bBHRGusj98Ie+f89J7SFLKi2fjMoUyMTs7iY5sfPs=; b=pek2pn2QOW42nThx78gpJ5eiILVpMLYfOI2e8D3iR7iPQEXoh5JdfF1Qu0FK+lGCHM rhfvKLT4pa4vyKPCXuC6ecbmlRgJ2DH0ExZpiTPGHFMzCxwIPx8rSFDC6a/nTc8U03EU RSqVFnQjyyHLm8AfXh4B4IWcgdXPwx0CwLwXZ/hksT3qm9lntnIDOo9Ng6cqVcPFJhUw zhZ4K5ms0I/s4cvJNumxUpuDMNz/dO4PSh0qADEHotDYexzHpDuUk+2AwM9S2b4MbP2H xolo2psfzeukidI6shOdZtzIfta+BsGZA8faGmCVcxjXbSVVbFzMpzlWMR4E9holJ3GS 2EmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=h/bBHRGusj98Ie+f89J7SFLKi2fjMoUyMTs7iY5sfPs=; b=oKpuBNtIzHQcR+wOMfl67oEDoQl5vFHiI43HzOUW14j8xCqZ2mNETK7b6bOLIQB464 HAe8xcV9AmENbIJ1xqD/irj+8v9aH3FIjUiyd6fQy5lw8Qj5womFVCxMxixDMLOthZlJ JK50TLk79jE+tyyI7v/rEgSN0t3c3UX4EEsGiKY6r1y/Lsy/+ct8o4O+HbQ6HVhhUkag TIwUxDilq/RaPKScHSHgp75aOiNRsQedIsrvQm5YGFpZYdAzUyhBaihbiaWLpdzGzr/g YbK/mEzpHezNwfyxsX7I1VruwrYubDj0nlp+30JEP23DaxFWgR8QsnTdO6Z8ZFj0KX+9 +MwQ== X-Gm-Message-State: APjAAAVffWPSXpeoAsoii0Lc/WBZy7ji5SGclms1OVeMPGFo/wObFo4B NfDCWTKfakYKp16eie8ZWMc= X-Received: by 2002:a17:90a:1b49:: with SMTP id q67mr7023570pjq.115.1571347809693; Thu, 17 Oct 2019 14:30:09 -0700 (PDT) Received: from aw-bldr-10.qualcomm.com (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id w6sm4297898pfw.84.2019.10.17.14.30.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Oct 2019 14:30:09 -0700 (PDT) From: Jeffrey Hugo To: marcel@holtmann.org, johan.hedberg@gmail.com, c-hbandi@codeaurora.org, bgodavar@codeaurora.org Cc: linux-bluetooth@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Jeffrey Hugo Subject: [PATCH] Bluetooth: hci_qca: Add delay for wcn3990 stability Date: Thu, 17 Oct 2019 14:29:55 -0700 Message-Id: <20191017212955.6266-1-jeffrey.l.hugo@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On the msm8998 mtp, the response to the baudrate change command is never received. On the Lenovo Miix 630, the response to the baudrate change command is corrupted - "Frame reassembly failed (-84)". Adding a 50ms delay before re-enabling flow to receive the baudrate change command response from the wcn3990 addesses both issues, and allows bluetooth to become functional. Signed-off-by: Jeffrey Hugo --- drivers/bluetooth/hci_qca.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c index e3164c200eac..265fc60c3850 100644 --- a/drivers/bluetooth/hci_qca.c +++ b/drivers/bluetooth/hci_qca.c @@ -1156,8 +1156,10 @@ static int qca_set_speed(struct hci_uart *hu, enum qca_speed_type speed_type) host_set_baudrate(hu, speed); error: - if (qca_is_wcn399x(soc_type)) + if (qca_is_wcn399x(soc_type)) { + msleep(50); hci_uart_set_flow_control(hu, false); + } if (soc_type == QCA_WCN3990) { /* Wait for the controller to send the vendor event -- 2.17.1