ATH10K Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Norris <briannorris@chromium.org>
To: Carl Huang <cjhuang@codeaurora.org>
Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org
Subject: Re: [PATCH V2] ath10k: allocate small size dma memory in ath10k_pci_diag_write_mem
Date: Wed, 10 Oct 2018 11:20:25 -0700	[thread overview]
Message-ID: <20181010182023.GA26746@ban.mtv.corp.google.com> (raw)
In-Reply-To: <1539171269-23944-1-git-send-email-cjhuang@codeaurora.org>

Hi Carl,

On Wed, Oct 10, 2018 at 07:34:29PM +0800, Carl Huang wrote:
> --- a/drivers/net/wireless/ath/ath10k/pci.c
> +++ b/drivers/net/wireless/ath/ath10k/pci.c
> @@ -1071,10 +1071,9 @@ int ath10k_pci_diag_write_mem(struct ath10k *ar, u32 address,
>  	struct ath10k_ce *ce = ath10k_ce_priv(ar);
>  	int ret = 0;
>  	u32 *buf;
> -	unsigned int completed_nbytes, orig_nbytes, remaining_bytes;
> +	unsigned int completed_nbytes, alloc_nbytes, remaining_bytes;
>  	struct ath10k_ce_pipe *ce_diag;
>  	void *data_buf = NULL;
> -	u32 ce_data;	/* Host buffer address in CE space */
>  	dma_addr_t ce_data_base = 0;
>  	int i;
>  

...

> @@ -1128,7 +1127,7 @@ int ath10k_pci_diag_write_mem(struct ath10k *ar, u32 address,
>  		 * Request CE to send caller-supplied data that
>  		 * was copied to bounce buffer to Target(!) address.
>  		 */
> -		ret = ath10k_ce_send_nolock(ce_diag, NULL, (u32)ce_data,
> +		ret = ath10k_ce_send_nolock(ce_diag, NULL, (u32)ce_data_base,

The (u32) cast isn't necessary, is it? ath10k_ce_send_nolock() takes a
dma_addr_t for the 3rd argument.

Incidentally, that'd probably help if you start supporting PCI devices
with >32-bit addressing.

Brian

>  					    nbytes, 0, 0);
>  		if (ret != 0)
>  			goto done;
...

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

      reply	other threads:[~2018-10-10 18:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10 11:34 [PATCH V2] ath10k: allocate small size dma memory in ath10k_pci_diag_write_mem Carl Huang
2018-10-10 18:20 ` Brian Norris [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181010182023.GA26746@ban.mtv.corp.google.com \
    --to=briannorris@chromium.org \
    --cc=ath10k@lists.infradead.org \
    --cc=cjhuang@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox