Page MenuHomeFreeBSD

ng_ubt_intel: Ignore unexpected HCI events
ClosedPublic

Authored by wulf on Sep 21 2024, 1:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 7, 12:34 AM
Unknown Object (File)
Thu, Nov 7, 12:34 AM
Unknown Object (File)
Fri, Oct 25, 5:53 PM
Unknown Object (File)
Oct 14 2024, 9:39 AM
Unknown Object (File)
Sep 25 2024, 11:08 PM
Unknown Object (File)
Sep 22 2024, 7:23 PM
Unknown Object (File)
Sep 22 2024, 7:20 PM
Unknown Object (File)
Sep 22 2024, 4:49 PM

Details

Summary

If Intel firmware is already in operational mode at boot that takes
place at warm boot, BT adaptor can generate extra HCI events which
interferes with firmware mode detection logic. Ignore them.

Sponsored by: Future Crew LLC
MFC after: 1 month

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

wulf requested review of this revision.Sep 21 2024, 1:57 PM
sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
577

space after if; can do before commit; no need for a new revision here.

864

see comment below

873

Here and above you man do a partial usbd_copy_out but then skipping the remainder. Is that save or will that confuse some other logic in case of a failing condition + "goto"? Should you do all the conditional checks first and then do the usbd_copy_out() all together?

sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
873

I can't do any checks before data has been copied out of DMA-ble page cache. So I prefetch header to private on-stack memory to not thrash caller-supplied buffer on negative case, than do all the checks and than copy out all data to the buffer on success.

This revision is now accepted and ready to land.Mon, Oct 28, 1:55 PM
This revision was automatically updated to reflect the committed changes.