]> git.ipfire.org Git - thirdparty/linux.git/commit
Bluetooth: btnxpuart: Revert baudrate change in nxp_shutdown
authorNeeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Thu, 3 Apr 2025 15:02:23 +0000 (20:32 +0530)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 10 Apr 2025 17:09:31 +0000 (13:09 -0400)
commit61a9c6e39c8dfe2fd56dee44f817cf2a1b3f3c71
treeb10e7d4b04a1776420b2096365c5c39327a7e571
parentc174cd0945ad3f1b7e48781e0d22b94f9e89b28b
Bluetooth: btnxpuart: Revert baudrate change in nxp_shutdown

This reverts the change baudrate logic in nxp_shutdown.

Earlier, when the driver was removed, it restored the controller
baudrate to fw_init_baudrate, so that on re-loading the driver, things
work fine.

However, if the driver was removed while hci0 interface is down, the
change baudrate vendor command could not be sent by the driver. When the
driver was re-loaded, host and controller baudrate would be mismatched
and hci initialization would fail. The only way to recover would be to
reboot the system.

This issue was fixed by moving the restore baudrate logic from
nxp_serdev_remove() to nxp_shutdown().

This fix however caused another issue with the command "hciconfig hci0
reset", which makes hci0 DOWN and UP immediately.

Running "bluetoothctl power off" and "bluetoothctl power on" in a tight
loop works fine.

To maintain support for "hciconfig reset" command, the above mentioned fix
is reverted.

Fixes: 6fca6781d19d ("Bluetooth: btnxpuart: Move vendor specific initialization to .post_init")
Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
drivers/bluetooth/btnxpuart.c