public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [BUG] Erratic behavior in btnxpuart on v6.18-rc2 - and a possible solution
@ 2025-10-21 20:53 Francesco Valla
  2025-10-21 21:20 ` Calvin Owens
  0 siblings, 1 reply; 7+ messages in thread
From: Francesco Valla @ 2025-10-21 20:53 UTC (permalink / raw)
  To: Calvin Owens, Marcel Holtmann, Luiz Augusto von Dentz,
	Paul Menzel
  Cc: linux-bluetooth, linux-kernel

Hello,

while testing Bluetooth on my NXP i.MX93 FRDM, which is equipped with an IW612
Bluetooth chipset from NXP, I encountered an erratic bug during initialization.

While the firmware download always completed without errors, subsequent HCI
communication would fail most of the time with:

    Frame reassembly failed (-84)

After some debug, I found the culprit to be this patch that was integrated as
part of the current (v6.18) cycle:

    93f06f8f0daf Bluetooth: remove duplicate h4_recv_buf() in header [1]

The reason is simple: the h4_recv_buf() function from hci_h4.c, which is now
used instead the "duplicated" one in the (now removed) h4_recv_buf.h, assumes
that the private drvdata for the input struct hci_dev is a pointer to a
struct hci_uart, but that's not the case for the btnxpuart driver. In this
case, the information about padding and alignment are pretty random and
depend on the content of the data that was incorrectly casted as a
struct hci_uart.

The bug should impact also the other platforms that were touched by the
same patch. 

For the time being, I'd then propose to revert the commit.

Thank you

Regards,
Francesco Valla

[1] https://lore.kernel.org/linux-bluetooth/be8edf7f8ba8dea6c61272b02fb20a4ac7e1c5a5.1756179634.git.calvin@wbinvd.org/



 




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-10-23 18:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-21 20:53 [BUG] Erratic behavior in btnxpuart on v6.18-rc2 - and a possible solution Francesco Valla
2025-10-21 21:20 ` Calvin Owens
2025-10-21 21:29   ` Calvin Owens
2025-10-21 22:07     ` Francesco Valla
2025-10-22 16:12       ` Calvin Owens
2025-10-22 20:35         ` Francesco Valla
2025-10-23 18:38           ` Calvin Owens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox