Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1910678rdb; Mon, 8 Jan 2024 14:46:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IElHHsmwJ5tagYX3iFaDpv0adv3jyWVmvPOGRvy3lJzZOgamZlPFJyqHEWSnacesM/eXWpn X-Received: by 2002:a50:8759:0:b0:557:cda:20c7 with SMTP id 25-20020a508759000000b005570cda20c7mr1424211edv.37.1704754002007; Mon, 08 Jan 2024 14:46:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704754001; cv=none; d=google.com; s=arc-20160816; b=k1n94//zIlQ9SCF3xnkqV+9yZwedDiWZiAF3wM09Q1Mtb6j3SOHLusPfI4TV5KGOXz 4eZsDoCCDX9u8GhsF4jNSgaGqyAiaZJoFpcO1lVa7favE22MSKISC3tld/Cq+j/xBwie 1grRX0PK2bCuBW74LQZvxVnaGJS93vupcrF3T/WTZb+LsDGtydXDBooa0l1W9G629ib3 bfRQHjzZBj/aDxP9BRPqSMJOmFP20mC2oXElDzyaf9PBUmlkFeEeL9IpjIjgebXRMN6I pJ/NDrOf/x2a+/q19aOSXuTh9hqhQOxD+KcXRDHBEFhDNLncascEtcRYdNZ8wJWYxbMb 0lFA== 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=LKV51wn+IL8CPxLsJ/0lioPThSAUvSREtRyqgEwsJ1Y=; fh=3AqDzvZy8BuFcn015+g5AB3sGQnZc/edyFwniXfpO+U=; b=JtvOMEyfyKwfBfrhkikfAh7EqRnzsnNXXXl4av4w1rzViT7w122d90lWLW92Pyv2uz 4o0DQ5G+UU5rxGHkEizM9Xidjnwrfp5L5xlkAnczhbuNXtfmpaFefiqCPeyCRYfaXw8I aYFquHrnHkdN0xy3C8oqoeNoNdR17/3K1FokFMuMap80h6kREH96Hudi31QBxdMwXC/Y 3ICbQb77qYAnL3haFXzSTOOeMaXYwuScMpEQsp3Tgylt4n9sZNt9gzYZRvivzYjfuQea rCHM2VMNfE098a4VrcI+CCGbhWbDF45p+IqECxR+pB+oS2tsil/cJ4Ofsy2sNwPrbIdZ qx5A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth+bounces-978-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-978-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id y16-20020a056402271000b005558e0f997esi271648edd.676.2024.01.08.14.46.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 14:46:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-978-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth+bounces-978-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-978-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 am.mirrors.kernel.org (Postfix) with ESMTPS id C032C1F23679 for ; Mon, 8 Jan 2024 22:46:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4FEF055C08; Mon, 8 Jan 2024 22:46:30 +0000 (UTC) X-Original-To: linux-bluetooth@vger.kernel.org Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [80.241.56.151]) (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 C6B791DDDC; Mon, 8 Jan 2024 22:46:27 +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 smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (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-101.mailbox.org (Postfix) with ESMTPS id 4T88LR4mJnz9sWf; Mon, 8 Jan 2024 23:46:23 +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 v3 0/4] Bluetooth: Improve retrying of connection attempts Date: Mon, 8 Jan 2024 23:46:05 +0100 Message-ID: <20240108224614.56900-1-verdre@v0yd.nl> Precedence: bulk X-Mailing-List: linux-bluetooth@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: 4T88LR4mJnz9sWf Since commit 4c67bc74f016 ("[Bluetooth] Support concurrent connect requests"), 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 refactores the handling of concurrent connection requests by serializing all "Create Connection" commands for ACL connections similar to how we do it for LE connections. --- v1: https://lore.kernel.org/linux-bluetooth/20240102185933.64179-1-verdre@v0yd.nl/ v2: https://lore.kernel.org/linux-bluetooth/20240108183938.468426-1-verdre@v0yd.nl/ v3: - Move the new sync function to hci_sync.c as requested by review - Abort connection on failure using hci_abort_conn_sync() instead of hci_abort_conn() - Make the last commit message a bit more precise regarding the meaning of BT_CONNECT2 state Jonas Dreßler (4): Bluetooth: Remove superfluous call to hci_conn_check_pending() Bluetooth: hci_event: Use HCI error defines instead of magic values Bluetooth: hci_conn: Only do ACL connections sequentially Bluetooth: Remove pending ACL connection attempts include/net/bluetooth/hci.h | 3 ++ include/net/bluetooth/hci_core.h | 1 - include/net/bluetooth/hci_sync.h | 3 ++ net/bluetooth/hci_conn.c | 83 +++----------------------------- net/bluetooth/hci_event.c | 29 +++-------- net/bluetooth/hci_sync.c | 72 +++++++++++++++++++++++++++ 6 files changed, 93 insertions(+), 98 deletions(-) -- 2.43.0