All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Guenter Roeck <linux@roeck-us.net>
Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org, Greg Kurz <groug@kaod.org>
Subject: Re: [PATCH] hw: ppc: sam460ex: Disable Ethernet devicetree nodes
Date: Mon, 16 Aug 2021 15:41:11 +1000	[thread overview]
Message-ID: <YRn6d/Vb10JTmZ18@yekko> (raw)
In-Reply-To: <20210816025915.213093-1-linux@roeck-us.net>

[-- Attachment #1: Type: text/plain, Size: 1562 bytes --]

On Sun, Aug 15, 2021 at 07:59:15PM -0700, Guenter Roeck wrote:
> IBM EMAC Ethernet controllers are not emulated by qemu. If they are
> enabled in devicetree files, they are instantiated in Linux but
> obviously won't work. Disable associated devicetree nodes to prevent
> unpredictable behavior.
> 
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>

I'll wait for Zoltan's opinion on this, but this sort of thing is why
I was always pretty dubious about qemu *loading* a dtb file, rather
than generating a dt internally.

> ---
>  hw/ppc/sam460ex.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c
> index 0737234d66..feb356e625 100644
> --- a/hw/ppc/sam460ex.c
> +++ b/hw/ppc/sam460ex.c
> @@ -194,6 +194,14 @@ static int sam460ex_load_device_tree(hwaddr addr,
>          _FDT(fdt_nop_node(fdt, offset));
>      }
>  
> +    /* Ethernet interfaces are not emulated */
> +    offset = fdt_node_offset_by_compatible(fdt, -1, "ibm,emac-460ex");
> +    while (offset >= 0) {
> +        _FDT(fdt_setprop_string(fdt, offset, "status", "disabled"));
> +        offset = fdt_node_offset_by_compatible(fdt, offset, "ibm,emac-460ex");
> +    }
> +
> +
>      /* set serial port clocks */
>      offset = fdt_node_offset_by_compatible(fdt, -1, "ns16550");
>      while (offset >= 0) {

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-08-16  5:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-16  2:59 [PATCH] hw: ppc: sam460ex: Disable Ethernet devicetree nodes Guenter Roeck
2021-08-16  5:41 ` David Gibson [this message]
2021-08-16 10:11   ` Philippe Mathieu-Daudé
2021-08-16 15:13     ` Guenter Roeck
2021-08-16 10:21   ` BALATON Zoltan
2021-08-17  3:06     ` David Gibson
2021-08-17  9:24       ` BALATON Zoltan
2021-08-17  9:42         ` Peter Maydell
2021-08-16 10:26   ` Peter Maydell
2021-08-16 10:58     ` Philippe Mathieu-Daudé
2021-08-16 11:58       ` BALATON Zoltan
2021-08-17  3:09         ` David Gibson
2021-08-16 13:59     ` Guenter Roeck
2021-08-16 14:03       ` Peter Maydell
2021-08-16 14:11         ` Guenter Roeck
2021-08-16 14:19           ` Peter Maydell
2021-08-16 14:57             ` Guenter Roeck

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=YRn6d/Vb10JTmZ18@yekko \
    --to=david@gibson.dropbear.id.au \
    --cc=groug@kaod.org \
    --cc=linux@roeck-us.net \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.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.