lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87092878-9296-4609-b744-a6e914316e52@molgen.mpg.de>
Date: Thu, 27 Mar 2025 22:52:42 +0100
From: Paul Menzel <pmenzel@...gen.mpg.de>
To: Neeraj Sanjay Kale <neeraj.sanjaykale@....com>
Cc: marcel@...tmann.org, luiz.dentz@...il.com,
 linux-bluetooth@...r.kernel.org, linux-kernel@...r.kernel.org,
 amitkumar.karwar@....com, sherry.sun@....com
Subject: Re: [PATCH v1 1/2] Bluetooth: btnxpuart: Add msleep() after changing
 the baudrate

Dear Neeraj,


Thank you for your patch. For the summary/title, I suggest:

Sleep 100 ms after baud rate change

Am 27.03.25 um 19:25 schrieb Neeraj Sanjay Kale:
> This adds a 100 millisec sleep after change baudrate vendor command.
> 
> It is observed that when the baudrate change command changes the
> baudrate from 3000000 to 115200, any immediate HCI command returns an
> error -22 (Device Busy).

Really 3 million?

Is this happening with every change, or only decreasing the baud rate 
with the values you listed?

> Adding a small delay after the change baudrate command complete event is
> received helps fix the issue.

100 ms is not small to me. Is this issue documented in the hardware 
documentation? Are there other ways like polling, if the command succeeded?

> Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@....com>
> ---
>   drivers/bluetooth/btnxpuart.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c
> index 5091dea762a0..e26fabe8fb3d 100644
> --- a/drivers/bluetooth/btnxpuart.c
> +++ b/drivers/bluetooth/btnxpuart.c
> @@ -1238,6 +1238,8 @@ static int nxp_set_baudrate_cmd(struct hci_dev *hdev, void *data)
>   		if (*status == 0) {
>   			serdev_device_set_baudrate(nxpdev->serdev, nxpdev->new_baudrate);
>   			nxpdev->current_baudrate = nxpdev->new_baudrate;
> +			/* Allow sufficiant time for chip to switch to new baudrate */

Please add the datasheet section.
sufficient

> +			sleep(100);
>   		}
>   		bt_dev_dbg(hdev, "Set baudrate response: status=%d, baudrate=%d",
>   			   *status, nxpdev->new_baudrate);


Kind regards,

Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ