Bluetooth: btintel_pcie: Fold MAC_INIT into btintel_pcie_get_mac_access()
MAC_INIT and MAC_ACCESS_REQ are the function control register bits
required to acquire MAC access for target reads. Currently, MAC_INIT is
set separately by btintel_pcie_mac_init(), which is called right before
btintel_pcie_read_device_mem() in btintel_parse_mbox_tlv(),
btintel_pcie_read_hwexp() and btintel_pcie_dump_fwtrigger_event().
btintel_pcie_dump_traces() also reads device memory under MAC access,
but it never called btintel_pcie_mac_init(), so MAC_INIT was missing on
the coredump path.
Fold the MAC_INIT handling into btintel_pcie_get_mac_access() so that
every user of MAC access programs MAC_INIT. Set MAC_INIT and
MAC_ACCESS_REQ with a single register write when either bit is not
already set. Drop btintel_pcie_mac_init() along with its three call
sites. This also fixes btintel_pcie_dump_traces().
Fixes: 07e6bddb54b4 ("Bluetooth: btintel_pcie: Add support for device coredump")
Assisted-by: Copilot:Gemini 4 Argon
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Kiran K <kiran.k@intel.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
1 file changed