public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Tom Lendacky <thomas.lendacky@amd•com>
To: <netdev@vger•kernel.org>
Cc: <davem@davemloft•net>
Subject: Re: [PATCH net-next 1/2] amd-xgbe: Use dma_set_mask_and_coherent to set DMA mask
Date: Tue, 5 Aug 2014 13:15:00 -0500	[thread overview]
Message-ID: <53E11F24.9070204@amd.com> (raw)
In-Reply-To: <20140805162119.28088.36709.stgit@tlendack-t1.amdoffice.net>

On 08/05/2014 11:21 AM, Tom Lendacky wrote:
> Use the dma_set_mask_and_coherent function to set the DMA mask rather
> than setting the DMA mask fields directly.  This was originally done
> to work around a bug in the arm64 DMA support when RAM started above
> the 4GB boundary which has since been fixed.
>
> Signed-off-by: Tom Lendacky <thomas.lendacky@amd•com>
> ---
>   drivers/net/ethernet/amd/xgbe/xgbe-main.c |    3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-main.c b/drivers/net/ethernet/amd/xgbe/xgbe-main.c
> index ec977d3..9991bc7 100644
> --- a/drivers/net/ethernet/amd/xgbe/xgbe-main.c
> +++ b/drivers/net/ethernet/amd/xgbe/xgbe-main.c
> @@ -303,8 +303,7 @@ static int xgbe_probe(struct platform_device *pdev)
>   	/* Set the DMA mask */
>   	if (!dev->dma_mask)
>   		dev->dma_mask = &dev->coherent_dma_mask;
> -	*(dev->dma_mask) = DMA_BIT_MASK(40);
> -	dev->coherent_dma_mask = DMA_BIT_MASK(40);
> +	dma_set_mask_and_coherent(dev, DMA_BIT_MASK(40));

Forgot to check the return value of this call, v2 to follow.

Thanks,
Tom

>
>   	if (of_property_read_bool(dev->of_node, "dma-coherent")) {
>   		pdata->axdomain = XGBE_DMA_OS_AXDOMAIN;
>

  reply	other threads:[~2014-08-05 18:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-05 16:21 [PATCH net-next 0/2] amd-xgbe: AMD XGBE driver update 2014-08-05 Tom Lendacky
2014-08-05 16:21 ` [PATCH net-next 1/2] amd-xgbe: Use dma_set_mask_and_coherent to set DMA mask Tom Lendacky
2014-08-05 18:15   ` Tom Lendacky [this message]
2014-08-05 16:21 ` [PATCH net-next 2/2] amd-xgbe: Perform phy connect/disconnect at dev open/stop Tom Lendacky

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=53E11F24.9070204@amd.com \
    --to=thomas.lendacky@amd$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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