qemu-trivial
[Top][All Lists]
Advanced

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

Re: [Qemu-trivial] [Qemu-devel] [PATCH] net: cadence_gem: Set initial MA


From: Jason Wang
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] net: cadence_gem: Set initial MAC address
Date: Wed, 14 Oct 2015 10:18:37 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0


On 10/12/2015 04:25 PM, Sebastian Huber wrote:
> Set initial MAC address to the one specified by the command line.
>
> Signed-off-by: Sebastian Huber <address@hidden>
> Reviewed-by: Jason Wang <address@hidden>
> Reviewed-by: Peter Crosthwaite <address@hidden>
> ---
>  hw/net/cadence_gem.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c
> index 1127223..3639fc1 100644
> --- a/hw/net/cadence_gem.c
> +++ b/hw/net/cadence_gem.c
> @@ -964,6 +964,7 @@ static void gem_reset(DeviceState *d)
>  {
>      int i;
>      CadenceGEMState *s = CADENCE_GEM(d);
> +    const uint8_t *a;
>  
>      DB_PRINT("\n");
>  
> @@ -982,6 +983,11 @@ static void gem_reset(DeviceState *d)
>      s->regs[GEM_DESCONF5] = 0x002f2145;
>      s->regs[GEM_DESCONF6] = 0x00000200;
>  
> +    /* Set MAC address */
> +    a = &s->conf.macaddr.a[0];
> +    s->regs[GEM_SPADDR1LO] = a[0] | (a[1] << 8) | (a[2] << 16) | (a[3] << 
> 24);
> +    s->regs[GEM_SPADDR1HI] = a[4] | (a[5] << 8);
> +
>      for (i = 0; i < 4; i++) {
>          s->sar_active[i] = false;
>      }

Applied in https://github.com/jasowang/qemu/commits/net

Thanks



reply via email to

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