All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Finn Thain <fthain@telegraphics.com.au>
Cc: "David S. Miller" <davem@davemloft.net>,
	linux-m68k <linux-m68k@vger.kernel.org>,
	netdev <netdev@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net] macmace: Set platform device coherent_dma_mask
Date: Thu, 3 May 2018 09:25:56 +0200	[thread overview]
Message-ID: <CAMuHMdUAxmVZLekekvVrnMbbL18oyY86sF9QX087idSqcKMiPQ@mail.gmail.com> (raw)
In-Reply-To: <S1751632AbeECEYA/20180503042400Z+254@vger.kernel.org>

Hi Finn,

On Thu, May 3, 2018 at 6:23 AM, Finn Thain <fthain@telegraphics.com.au> wrote:
> Set the device's coherent_dma_mask to avoid a WARNING splat.
> Please see commit 205e1b7f51e4 ("dma-mapping: warn when there is
> no coherent_dma_mask").
>
> Cc: linux-m68k@lists.linux-m68k.org
> Tested-by: Stan Johnson <userm57@yahoo.com>
> Signed-off-by: Finn Thain <fthain@telegraphics.com.au>

Thanks for your patch!

> --- a/drivers/net/ethernet/apple/macmace.c
> +++ b/drivers/net/ethernet/apple/macmace.c
> @@ -203,6 +203,10 @@ static int mace_probe(struct platform_device *pdev)
>         unsigned char checksum = 0;
>         int err;
>
> +       err = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
> +       if (err)
> +               return err;
> +
>         dev = alloc_etherdev(PRIV_BYTES);
>         if (!dev)
>                 return -ENOMEM;

Shouldn't this be handled in the platform code that instantiates the device,
i.e. in arch/m68k/mac/config.c:mac_platform_init()?

Cfr. commit f61e64310b75733d ("m68k: set dma and coherent masks for platform
FEC ethernets").

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

WARNING: multiple messages have this Message-ID (diff)
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Finn Thain <fthain@telegraphics.com.au>
Cc: "David S. Miller" <davem@davemloft.net>,
	linux-m68k <linux-m68k@lists.linux-m68k.org>,
	netdev <netdev@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net] macmace: Set platform device coherent_dma_mask
Date: Thu, 3 May 2018 09:25:56 +0200	[thread overview]
Message-ID: <CAMuHMdUAxmVZLekekvVrnMbbL18oyY86sF9QX087idSqcKMiPQ@mail.gmail.com> (raw)
In-Reply-To: <S1751632AbeECEYA/20180503042400Z+254@vger.kernel.org>

Hi Finn,

On Thu, May 3, 2018 at 6:23 AM, Finn Thain <fthain@telegraphics.com.au> wrote:
> Set the device's coherent_dma_mask to avoid a WARNING splat.
> Please see commit 205e1b7f51e4 ("dma-mapping: warn when there is
> no coherent_dma_mask").
>
> Cc: linux-m68k@lists.linux-m68k.org
> Tested-by: Stan Johnson <userm57@yahoo.com>
> Signed-off-by: Finn Thain <fthain@telegraphics.com.au>

Thanks for your patch!

> --- a/drivers/net/ethernet/apple/macmace.c
> +++ b/drivers/net/ethernet/apple/macmace.c
> @@ -203,6 +203,10 @@ static int mace_probe(struct platform_device *pdev)
>         unsigned char checksum = 0;
>         int err;
>
> +       err = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
> +       if (err)
> +               return err;
> +
>         dev = alloc_etherdev(PRIV_BYTES);
>         if (!dev)
>                 return -ENOMEM;

Shouldn't this be handled in the platform code that instantiates the device,
i.e. in arch/m68k/mac/config.c:mac_platform_init()?

Cfr. commit f61e64310b75733d ("m68k: set dma and coherent masks for platform
FEC ethernets").

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

       reply	other threads:[~2018-05-03  7:26 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <S1751632AbeECEYA/20180503042400Z+254@vger.kernel.org>
2018-05-03  7:25 ` Geert Uytterhoeven [this message]
2018-05-03  7:25   ` [PATCH net] macmace: Set platform device coherent_dma_mask Geert Uytterhoeven
2018-05-03  8:38   ` Finn Thain
2018-05-03  8:38     ` Finn Thain
2018-05-03  8:46     ` Geert Uytterhoeven
2018-05-03  8:46       ` Geert Uytterhoeven
2018-05-03  8:51       ` Christoph Hellwig
2018-05-03  8:51         ` Christoph Hellwig
2018-05-03 20:24         ` Michael Schmitz
2018-05-03 20:24           ` Michael Schmitz
2018-05-04  7:24           ` Geert Uytterhoeven
2018-05-04  7:24             ` Geert Uytterhoeven
2018-05-04  8:16             ` Michael Schmitz
2018-05-04  8:16               ` Michael Schmitz
2018-05-10  1:25         ` Finn Thain
2018-05-10  1:25           ` Finn Thain
2018-05-10  1:25       ` Finn Thain
2018-05-10  1:25         ` Finn Thain
2018-05-10 20:27         ` Michael Schmitz
2018-05-10 20:27           ` Michael Schmitz
2018-05-10 23:55           ` Finn Thain
2018-05-10 23:55             ` Finn Thain
2018-05-11  2:11             ` Michael Schmitz
2018-05-11  2:11               ` Michael Schmitz
2018-05-11  3:28               ` Finn Thain
2018-05-11  3:28                 ` Finn Thain
2018-05-11  4:18                 ` Michael Schmitz
2018-05-11  4:18                   ` Michael Schmitz
2018-05-11  5:28                   ` Finn Thain
2018-05-11  5:28                     ` Finn Thain
2018-05-11  9:30                     ` Michael Schmitz
2018-05-11  9:30                       ` Michael Schmitz
2018-05-11 10:06                       ` Finn Thain
2018-05-11 10:06                         ` Finn Thain
2018-05-11 22:02                         ` Michael Schmitz
2018-05-11 22:02                           ` Michael Schmitz
2018-05-03  4:23 Finn Thain
  -- strict thread matches above, loose matches on Subject: below --
2018-05-03  4:23 Finn Thain
2018-05-03  4:23 Finn Thain
2018-05-03  4:23 Finn Thain
2018-05-03  4:23 Finn Thain

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=CAMuHMdUAxmVZLekekvVrnMbbL18oyY86sF9QX087idSqcKMiPQ@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=davem@davemloft.net \
    --cc=fthain@telegraphics.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=netdev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.