netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: "Jonas Dreßler" <verdre@v0yd.nl>
Cc: Marcel Holtmann <marcel@holtmann.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH 1/5] Bluetooth: Remove superfluous call to hci_conn_check_pending()
Date: Thu, 4 Jan 2024 20:52:51 +0000	[thread overview]
Message-ID: <20240104205251.GO31813@kernel.org> (raw)
In-Reply-To: <20240102185933.64179-2-verdre@v0yd.nl>

On Tue, Jan 02, 2024 at 07:59:28PM +0100, Jonas Dreßler wrote:
> The "pending connections" feature was originally introduced with commit
> 4c67bc74f016b0d360b8573e18969c0ff7926974 and
> 6bd57416127e92d35e6798925502c84e14a3a966 to handle controllers supporting
> only a single connection request at a time. Later things were extended to
> also cancel ongoing inquiries on connect() with commit
> 89e65975fea5c25706e8cc3a89f9f97b20fc45ad.
> 
> With commit a9de9248064bfc8eb0a183a6a951a4e7b5ca10a4,
> hci_conn_check_pending() was introduced as a helper to consolidate a few
> places where we check for pending connections (indicated by the
> BT_CONNECT2 flag) and then try to connect.
> 
> This refactoring commit also snuck in two more calls to
> hci_conn_check_pending():
> 
> - One is in the failure callback of hci_cs_inquiry(), this one probably
> makes sense: If we send an "HCI Inquiry" command and then immediately
> after a "Create Connection" command, the "Create Connection" command might
> fail before the "HCI Inquiry" command, and then we want to retry the
> "Create Connection" on failure of the "HCI Inquiry".
> 
> - The other added call to hci_conn_check_pending() is in the event handler
> for the "Remote Name" event, this seems unrelated and is possibly a
> copy-paste error, so remove that one.
> 
> Fixes: a9de9248064bfc8eb0a183a6a951a4e7b5ca10a4
> Signed-off-by: Jonas Dreßler <verdre@v0yd.nl>

Nit: a correct format for the fixes tag is

Fixes: a9de9248064b ("[Bluetooth] Switch from OGF+OCF to using only opcodes")

Likewise, in the patch description, it is usual to cite patches
using a similar format.

e.g. introduced in commit
     4c67bc74f016 ("[Bluetooth] Support concurrent connect requests")

Note it is usual to use a hash of at least 12 characters
(and not much more than that).

...

  reply	other threads:[~2024-01-04 20:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-02 18:59 [PATCH 0/5] Bluetooth: Improve retrying of connection attempts Jonas Dreßler
2024-01-02 18:59 ` [PATCH 1/5] Bluetooth: Remove superfluous call to hci_conn_check_pending() Jonas Dreßler
2024-01-04 20:52   ` Simon Horman [this message]
2024-01-02 18:59 ` [PATCH 2/5] Bluetooth: hci_event: Use HCI error defines instead of magic values Jonas Dreßler
2024-01-02 18:59 ` [PATCH 3/5] Bluetooth: hci_event: Remove limit of 2 reconnection attempts Jonas Dreßler
2024-01-03 16:05   ` Luiz Augusto von Dentz
2024-01-05 15:54     ` Jonas Dreßler
2024-01-05 16:05       ` Luiz Augusto von Dentz
2024-01-07 22:20         ` Jonas Dreßler
2024-01-07 23:53           ` Luiz Augusto von Dentz
2024-01-02 18:59 ` [PATCH 4/5] Bluetooth: hci_event: Do sanity checks before retrying to connect Jonas Dreßler
2024-01-02 18:59 ` [PATCH 5/5] Bluetooth: hci_event: Try reconnecting on more kinds of errors Jonas Dreßler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240104205251.GO31813@kernel.org \
    --to=horms@kernel.org \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=netdev@vger.kernel.org \
    --cc=verdre@v0yd.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).