Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6722273rdb; Tue, 2 Jan 2024 10:59:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IE1vvlLaWs3zTnYWF4BBe5dL6Xr2sq2LMZXWoRbscvqnKcMkPK23WgpipQnJycaKLJlggBZ X-Received: by 2002:a25:918c:0:b0:db7:dacf:6fbe with SMTP id w12-20020a25918c000000b00db7dacf6fbemr9283910ybl.70.1704221996016; Tue, 02 Jan 2024 10:59:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704221996; cv=none; d=google.com; s=arc-20160816; b=vM1ITz3uH/9u7JclJ24ZjWQ9ihv3oKaM59kfgu2XqLpW/gE2IpWA2PZy1KwTzpCEff DHL7XMsKjwuQdDWhJBJNHMn481GDjZ2U8qsXbC1cijHRlU9VIed9qqdJVuEZQQjBiQhZ gXSJDbXc3CCkdSAgb6UGrh9Vgw0e06MalffrfkbKCjtXlwRqsEmx1LqdyHxyN1eYUmU5 eA634oJU11fvMQFqjioSR0EOlXW5zTYfxQvfaCTA+kfVM1cbvOwDCEfXULlycS61nIb0 d8QWPKFrMIGz7FhDgTRncroPZr/pbRL/0WODSe8pRCOdaTVKy5TVY6NmCCTMipIU5etl E1oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=CtSlQbl/HHG32tCEDl7RTc4AYBfU5eoD2U3oKTYQXM0=; fh=3AqDzvZy8BuFcn015+g5AB3sGQnZc/edyFwniXfpO+U=; b=jxTeSZWcdH+UJhtM62zAYFU+ghMO8k5ZLTB+CydyakaVRJcEmkfVXZoyCLRKvUjBSu k4dW8qrpFeATqLG/gKc58ETfuwBhdCsbGGS76KTR6FYIJ0s6PEhcoFaqEEsmngjy60+C 1g8oR0AkfVD0GdgAdQ9jnCbAFuGqyJ5vdYVO8xCjmsmNgrUuZ15zvCubKVu4jbS0IqcY HKgNfcowzxy2Lzm6N4HHLnOTcnDBMQqviak4fKZIWbu443oAn8KTrVLe200nvndnn6J1 gV14YLyU9V6I9+6c1G/rRjGgNedeqj/ioyeXP0tZvv4GrkpgzQim6F4E5IZwo/IBDdNH wTyQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-14750-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14750-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id p20-20020a05622a049400b00425f0a73de7si27811492qtx.472.2024.01.02.10.59.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 10:59:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-14750-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-14750-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14750-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 2A8911C2294F for ; Tue, 2 Jan 2024 18:59:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2EF2015AF1; Tue, 2 Jan 2024 18:59:42 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [80.241.56.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A7F0D15AC7; Tue, 2 Jan 2024 18:59:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=v0yd.nl Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=v0yd.nl Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4T4MbW62Cxz9smm; Tue, 2 Jan 2024 19:59:35 +0100 (CET) From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= To: Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz Cc: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 0/5] Bluetooth: Improve retrying of connection attempts Date: Tue, 2 Jan 2024 19:59:27 +0100 Message-ID: <20240102185933.64179-1-verdre@v0yd.nl> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4T4MbW62Cxz9smm Since commit 4c67bc74f016b0d360b8573e18969c0ff7926974, the kernel supports trying to connect again in case the bluetooth card is busy and fails to connect. The logic that should handle this became a bit spotty over time, and also cards these days appear to fail with more errors than just "Command Disallowed". This series tries to improve the logic for retrying "HCI Create Connection" and adds support for two more errors that can indicate the hardware being busy. Jonas Dreßler (5): Bluetooth: Remove superfluous call to hci_conn_check_pending() Bluetooth: hci_event: Use HCI error defines instead of magic values Bluetooth: hci_event: Remove limit of 2 reconnection attempts Bluetooth: hci_event: Do sanity checks before retrying to connect Bluetooth: hci_event: Try reconnecting on more kinds of errors include/net/bluetooth/hci.h | 3 ++ net/bluetooth/hci_event.c | 57 +++++++++++++++++++++++++++++++------ 2 files changed, 51 insertions(+), 9 deletions(-) -- 2.43.0