[PATCH v7 5/8] ath10k: dump exception stack contents on firmware crash

Michal Kazior michal.kazior at tieto.com
Tue Aug 19 02:38:10 PDT 2014


On 19 August 2014 10:23, Kalle Valo <kvalo at qca.qualcomm.com> wrote:
> From: Ben Greear <greearb at candelatech.com>
>
> Firmware developers can decode this and maybe figure out
> why the firmware crashed.
>
> Signed-off-by: Ben Greear <greearb at candelatech.com>
> Signed-off-by: Kalle Valo <kvalo at qca.qualcomm.com>
> ---
[...]
> +/* Save the firmware exception stack */
> +static void ath10k_pci_dump_exc_stack(struct ath10k *ar,
> +                                     struct ath10k_fw_crash_data *crash_data)
> +{
> +       lockdep_assert_held(&ar->data_lock);
> +
> +       BUILD_BUG_ON(ATH10K_FW_STACK_SIZE % 4);
> +
> +       ath10k_pci_diag_read_hi(ar, crash_data->exc_stack_buf,
> +                               hi_err_stack, ATH10K_FW_STACK_SIZE);

Current master tree performs an implicit byte swap so the stack read
from target will be in host endianess. IOW on big-endian host you'll
messed up data and there's no indication of endianess anymore.


Michał



More information about the ath10k mailing list