From: "Sascha Hauer" <s.hauer@pengutronix.de>
To: "Michael McAllister" <me@michaelmcallister.org>
Cc: markus.probst@posteo.de, luiz.dentz@gmail.com,
marcel@holtmann.org, linux-bluetooth@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] Bluetooth: hci_mrvl: Leave the serdev port lifetime to hci_serdev
Date: Tue, 17 Nov 2026 12:36:57 +0000 [thread overview]
Message-ID: <d7104aac-2efc-4e82-bd12-669ed7fd47fc@pengutronix.de> (raw)
In-Reply-To: <179467295519.97469.5747232754111917783.marvell-serdev-v1-1@michaelmcallister.org>
On 2026-11-14 16:15, Michael McAllister wrote:
> hci_uart_register_device_priv() opens the port before calling mrvl_open(),
> so Marvell opens it twice. Likewise, mrvl_close() closes it before the
> transport closes it again during unregister or registration error cleanup.
>
> Remove the extra calls and let hci_serdev own the port lifetime. This also
> avoids failing probe when serdev rejects a second open with -EALREADY.
>
> Fixes: be70e5e774a6 ("Bluetooth: hci_mrvl: Add serdev support")
> Reported-by: Markus Probst <markus.probst@posteo.de>
> Closes: https://lore.kernel.org/341e56b1ff7d8a5b109e26e30dfed61faa54d603.camel@posteo.de/
> Assisted-by: LLM
> Signed-off-by: Michael McAllister <me@michaelmcallister.org>
I don't have hardware anymore to test this on, but LGTM
Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha
> ---
> drivers/bluetooth/hci_mrvl.c | 14 --------------
> 1 file changed, 14 deletions(-)
>
> diff --git a/drivers/bluetooth/hci_mrvl.c b/drivers/bluetooth/hci_mrvl.c
> index 5798a8db0..def19907c 100644
> --- a/drivers/bluetooth/hci_mrvl.c
> +++ b/drivers/bluetooth/hci_mrvl.c
> @@ -57,7 +57,6 @@ struct hci_mrvl_pkt {
> static int mrvl_open(struct hci_uart *hu)
> {
> struct mrvl_data *mrvl;
> - int ret;
>
> BT_DBG("hu %p", hu);
>
> @@ -75,17 +74,7 @@ static int mrvl_open(struct hci_uart *hu)
>
> hu->priv = mrvl;
>
> - if (hu->serdev) {
> - ret = serdev_device_open(hu->serdev);
> - if (ret)
> - goto err;
> - }
> -
> return 0;
> -err:
> - kfree(mrvl);
> -
> - return ret;
> }
>
> static int mrvl_close(struct hci_uart *hu)
> @@ -94,9 +83,6 @@ static int mrvl_close(struct hci_uart *hu)
>
> BT_DBG("hu %p", hu);
>
> - if (hu->serdev)
> - serdev_device_close(hu->serdev);
> -
> skb_queue_purge(&mrvl->txq);
> skb_queue_purge(&mrvl->rawq);
> kfree_skb(mrvl->rx_skb);
> --
> 2.39.5
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2026-11-17 12:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 22:34 [PATCH 0/4] Bluetooth: qca: Fix WCN3950 power-off Michael McAllister
2026-10-28 22:34 ` [PATCH 3/4] Bluetooth: qca: Power off after unregistering the HCI device Michael McAllister
2026-10-28 22:34 ` [PATCH 1/4] Bluetooth: qca: Restore flow control after a failed power pulse Michael McAllister
2026-10-28 22:34 ` [PATCH 2/4] Bluetooth: hci_serdev: Track whether the serial port is open Michael McAllister
2026-11-12 18:56 ` Markus Probst
2026-11-14 16:15 ` [PATCH 0/1] Bluetooth: hci_mrvl: Fix duplicate serdev open/close Michael McAllister
2026-11-14 16:15 ` [PATCH 1/1] Bluetooth: hci_mrvl: Leave the serdev port lifetime to hci_serdev Michael McAllister
2026-11-16 16:35 ` [PATCH v2] " Michael McAllister
2026-11-16 16:41 ` Loic Poulain
2026-11-17 12:36 ` Sascha Hauer [this message]
2026-11-14 17:06 ` [PATCH 0/1] Bluetooth: hci_mrvl: Fix duplicate serdev open/close Markus Probst
2026-10-28 22:34 ` [PATCH 4/4] Bluetooth: qca: Power off WCN3950 Michael McAllister
2026-11-14 18:39 ` [PATCH v2 0/4] " Michael McAllister
2026-11-14 18:39 ` [PATCH v2 4/4] " Michael McAllister
2026-11-14 18:39 ` [PATCH v2 1/4] Bluetooth: hci_serdev: Track whether the serial port is open Michael McAllister
2026-11-14 18:39 ` [PATCH v2 3/4] Bluetooth: qca: Handle failed power-pulse writes Michael McAllister
2026-11-14 18:39 ` [PATCH v2 2/4] Bluetooth: qca: Power off after unregistering the HCI device Michael McAllister
2026-11-16 8:38 ` Zhao Li
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=d7104aac-2efc-4e82-bd12-669ed7fd47fc@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=markus.probst@posteo.de \
--cc=me@michaelmcallister.org \
/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
all inboxes | Powered by JetHome®