qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 29/47] hw/arm/stellaris: use qemu_find_nic_info()


From: David Woodhouse
Subject: Re: [PATCH v4 29/47] hw/arm/stellaris: use qemu_find_nic_info()
Date: Wed, 31 Jan 2024 06:13:31 -0800
User-agent: Evolution 3.44.4-0ubuntu2

On Wed, 2024-01-31 at 13:13 +0100, Thomas Huth wrote:
> 
> >        qdev_prop_set_uint32(ssys_dev, "user0",
> > -                         macaddr[0] | (macaddr[1] << 8) | (macaddr[2] << 
> > 16));
> > +                         mac.a[0] | (mac.a[1] << 8) | (mac.a[2] << 16));
> >        qdev_prop_set_uint32(ssys_dev, "user1",
> > -                         macaddr[3] | (macaddr[4] << 8) | (macaddr[5] << 
> > 16));
> > +                         mac.a[3] | (mac.a[4] << 8) | (mac.a[5] << 16));
> 
> Out of scope of your patch, but I wonder why we didn't use 
> qdev_prop_set_macaddr() with an according MAC address property for this 
> device...?

Yeah. I suppose it could have done. But strictly speaking, it *isn't* a
MAC address on the underlying PROM device; it's just two 32-bit
registers. Which each happen to contain 24 bits of the MAC address.

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]