Re: [PATCH v5] Bluetooth: Keep MSFT ext info throughout a hci_dev's life cycle

From: Marcel Holtmann
Date: Mon Aug 30 2021 - 11:02:28 EST


Hi Manish,

> This moves msft_do_close() from hci_dev_do_close() to
> hci_unregister_dev() to avoid clearing MSFT extension info. This also
> re-reads MSFT info upon every msft_do_open() even if MSFT extension has
> been initialized.
>
> The following test steps were performed.
> (1) boot the test device and verify the MSFT support debug log in syslog
> (2) restart bluetoothd and verify msft_do_close() doesn't get invoked
> and msft_do_open re-reads the MSFT support.

so tell me how this can be correct. The msft_do_close does cleanup of instances. If we close the device via power down I would expect that these instances are cleared. Do they survive a HCI Reset command?

I think it would be better to introduce an additional msft_register / msft_unregister pair if this needs to be more complex.

Regards

Marcel