Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2676967pxj; Mon, 31 May 2021 08:03:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZdxV28ZdkllB8P7Cj0NnJ+VNB1oXWGk2YIKjVGXa2Nl32rkM24YOtlSA3F/bR2zIUf9M7 X-Received: by 2002:a17:906:b14f:: with SMTP id bt15mr24293704ejb.126.1622473385971; Mon, 31 May 2021 08:03:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622473385; cv=none; d=google.com; s=arc-20160816; b=xHOycePxekSkj9mf1jt5Iqm+Lm/OEZ0e5zTokBhIZCGtR9pSIIQ8z4XapLMrxWFVXz OBTYkL23rb6saDOUC+FpDYqboJ3cLqTb12Y4+3iFPkN5cXXdspR6HJKcr3uSyTD90VcI bvX1yLbYyYMp9DDHYpd9axjlqRzkwu90+x8Vo3JXfg4lHc7N58AfwnTAuT6NlYmlzDH2 S+75peGe8y7R4JH8hwVDGkUNguLfRvOqolZiOLBoGaGXzo8B/M4NazrqeGW77+sFqJBa nxFpaoPs/+TELzF16Z3DpvUULyZ4dQr7hk7/COtAX9XgVlTzhrxIG/2qYSwA3zeU7cUg 1ZnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=p8e2Ips59NucYwy8NZfY4HFcB5ufug0oJU0fcRhNJ/A=; b=q0+q97G8rJAo8eqr51lJ1Mip4P5h8A+5xerlBnd1hjdzMcUoUEYsoDHv3jMIgdoBJT Wg0miR3ExpHbTEeclhsTzB84mcujeMGAp+UssLdZZOV9WkbRMggWIV9ySPg+8pRxPs6s AUo+1CQBp0NsHblQO5wiHRcqUZaAwydIJ/UeauyrT26/uWsYu4UjLkBTmBCkgZpYmetC 2xjhy4gGq70eW0BcBzx7mXmu0m71kPE1K+xEpg2ZSeTWB51lvMSpydNIqFkC6Z2IM5Bk 7o6eH4YiNxc1NVBOsEAKNbrnaX4j+jsL1+vuYsS4L4WuwvNx2y+oQNE8m11mENbvhDME 98/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JwYXnjd3; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n7si12480207ejx.652.2021.05.31.08.02.27; Mon, 31 May 2021 08:03:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JwYXnjd3; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233578AbhEaPCk (ORCPT + 99 others); Mon, 31 May 2021 11:02:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:51030 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234142AbhEaPAj (ORCPT ); Mon, 31 May 2021 11:00:39 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4BD3460FEF; Mon, 31 May 2021 14:12:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622470351; bh=wkKztpo64XTQBWAnbxSKsTIGW62NyR1Cw1YrVMh3Z2s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JwYXnjd3T+Uk7jc/j3e+LtOttEOMKrNQ3Jhwc/jfMvZwIox3gh61RW790EEGQq97Z H6IYYS7WEHKkIdW3w6KJhwpWjGordesLIuoarJv/zWjz2MDLgvONdxt6lwXwWLQxna 3dHiLeYJFdnwbfAqM85Uoy2CTK4WyzpUI+hRBa5g= Date: Mon, 31 May 2021 15:21:54 +0200 From: Greg Kroah-Hartman To: Andre Przywara Cc: Ondrej Jirman , Chen-Yu Tsai , Maxime Ripard , Jernej =?utf-8?Q?=C5=A0krabec?= , Jiri Slaby , linux-serial@vger.kernel.org, Linux ARM Mailing List , Linux Kernel Mailing List , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , linux-bluetooth@vger.kernel.org, linux-sunxi@lists.linux.dev, Josh Triplett , tuxd3v@sapo.pt Subject: Re: sunxi: Bluetooth broken since 5.6-rc1 Message-ID: References: <20210530173454.5ab1dcf5@slackpad.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210530173454.5ab1dcf5@slackpad.fritz.box> Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On Sun, May 30, 2021 at 05:34:54PM +0100, Andre Przywara wrote: > Hi, > > as recently discovered via IRC discussions, Bluetooth (via UART) > seems to be broken on many (if not all) Allwinner devices using recent > mainline kernels. On *some* occasions it might work, but more often > than not the hci_bcm driver just times out: > .... > [ 5.046126] Bluetooth: HIDP socket layer initialized > ... > [ 7.809425] Bluetooth: hci0: command 0x0c03 tx timeout > [ 15.969286] Bluetooth: hci0: BCM: Reset failed (-110) > > After some guessing, trying, and bisecting I pinned the problem down to: > commit dc56ecb81a0aa46a7e127e916df5c8fdb8364f0b > Author: Josh Triplett > Date: Fri Jan 10 18:25:13 2020 -0800 > > serial: 8250: Support disabling mdelay-filled probes of 16550A variants > > This seemingly innocent commit shaved off some milliseconds during the > 8250 probe, which apparently lets the Bluetooth device trip. What do you mean by "trip"? And how are the different devices related? > An obvious easy hack-fix is to just define > CONFIG_SERIAL_8250_16550A_VARIANTS, which brings the delays back and > seems to avoid the problem for me. > Another hack which seems to mitigate the problem is to avoid switching > the baudrate to something faster than 115200. > > I observed this on a BananaPi-M64 (Allwinner A64 SoC with AP6212 WiFi/BT > chip), but others reported the same issue on a NanoPi Air (Allwinner H3 > with 6212), but also other SoCs and devices (at least one AP6210). > > Obviously those workarounds are not real solutions, and I was > wondering if anybody has an idea how to properly fix this? > What puzzles me is that the delay is happening during the *UART* > probe, so before we even start dealing with the Bluetooth device. What type of bluetooth device is this, and what does it have to do with the serial port? Is the SoC device using the same IP blocks for both? > I see that hci_bcm.c has some history with adding delays, also with > RTS/CTS lines, so does anyone have an idea what's going on here, > exactly, and how to properly fix this problem? No idea, sorry, as you have the hardware, you have the best chance of debugging this :( good luck! greg k-h