[RFC PATCH 1/3] ath10k: ignore diagnose pipes in ath10k_pci_ce_recv_data()/_send_done()

Michal Kazior michal.kazior at tieto.com
Fri Sep 12 00:53:08 PDT 2014


On 11 September 2014 22:31, Kalle Valo <kvalo at qca.qualcomm.com> wrote:
> As ath10k_pci_diag_read_mem() uses polling to receive data from CE, the CE callbacks
> have to ignore the pipe used for diagnose reads. Otherwise ath10k crashes due
> to NULL dereference and polling reads timeout.
>
> Signed-off-by: Kalle Valo <kvalo at qca.qualcomm.com>
> ---
>  drivers/net/wireless/ath/ath10k/pci.c |    6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
> index baeb98e78b1f..154451ab3e3c 100644
> --- a/drivers/net/wireless/ath/ath10k/pci.c
> +++ b/drivers/net/wireless/ath/ath10k/pci.c
> @@ -819,6 +819,9 @@ static void ath10k_pci_ce_send_done(struct ath10k_ce_pipe *ce_state)
>         unsigned int nbytes;
>         unsigned int transfer_id;
>
> +       if (ce_state->id == 7)
> +               return;

I think you can check it in a saner way: (ce_state == ar_pci->ce_diag).

Another approach is to prevent this from happening in the first place
by never unmasking the diagnostic window copy engine pipe in
ath10k_ce_enable_interrupts() and preventing
ath10k_ce_per_engine_service() from being called in
ath10k_pci_hif_send_complete_check() for the diagnostic ce pipe.


Michał



More information about the ath10k mailing list