[PATCH v7 4/8] ath10k: save firmware stack upon firmware crash

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


On 19 August 2014 10:23, Kalle Valo <kvalo at qca.qualcomm.com> wrote:
> From: Ben Greear <greearb at candelatech.com>
>
> Should help debug firmware crashes, and give users a way
> to provide some useful debug reports to firmware developers.
>
> Signed-off-by: Ben Greear <greearb at candelatech.com>
> Signed-off-by: Kalle Valo <kvalo at qca.qualcomm.com>
> ---
[...]
> +/* Save the main firmware stack */
> +static void ath10k_pci_dump_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->stack_buf,
> +                               hi_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