On Tue, Apr 30, 2024 at 02:21:47PM -0700, Doug Anderson wrote:
On Tue, Apr 30, 2024 at 10:08 AM Johan Hovold johan+linaro@kernel.org wrote:
The default device address apparently comes from the NVM configuration file and can differ quite a bit between controllers.
Store the default address when parsing the configuration file and use it to determine whether the controller has been provisioned with an address.
This makes sure that devices without a unique address start as unconfigured unless a valid address has been provided in the devicetree.
Fixes: 00567f70051a ("Bluetooth: qca: fix invalid device address check") Cc: stable@vger.kernel.org # 6.5 Cc: Doug Anderson dianders@chromium.org Cc: Janaki Ramaiah Thota quic_janathot@quicinc.com Signed-off-by: Johan Hovold johan+linaro@kernel.org
I can confirm that my sc7180-trogdor-based devices manage to detect the default address after this series and thus still look to the device-tree for their address. Thus:
Tested-by: Douglas Anderson dianders@chromium.org
Thanks for testing, Doug.
I'll continue to note that I still wish that detecting the default address wasn't important for trogdor. I still feel that the fact that they have a valid BT address stored in their device tree (populated by firmware) should take precedence. ...but I won't insist.
When I can find the time, I'll look into at least dropping the BD_ADDR quirk in favour of always looking in the devicetree when we do not have a valid address. That may be a good time to revisit the question whether the devicetree should always override the controller's address too.
Johan