From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z056J-0004iw-G6 for qemu-devel@nongnu.org; Wed, 03 Jun 2015 05:36:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z056G-00023a-97 for qemu-devel@nongnu.org; Wed, 03 Jun 2015 05:36:43 -0400 Received: from host-82-135-62-35.customer.m-online.net ([82.135.62.35]:29306 helo=mail.embedded-brains.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z056F-000220-Mk for qemu-devel@nongnu.org; Wed, 03 Jun 2015 05:36:40 -0400 Message-ID: <556EC148.7010503@embedded-brains.de> Date: Wed, 03 Jun 2015 10:56:40 +0200 From: Sebastian Huber MIME-Version: 1.0 References: <1422596933-11282-1-git-send-email-sebastian.huber@embedded-brains.de> In-Reply-To: Content-Type: multipart/mixed; boundary="------------020408030201020403070406" Subject: Re: [Qemu-devel] [PATCH v2] net: cadence_gem: Set initial MAC address List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: Jason Wang , "qemu-devel@nongnu.org Developers" This is a multi-part message in MIME format. --------------020408030201020403070406 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Ping. Attached is a rebased version. On 30/01/15 18:56, Peter Crosthwaite wrote: > On Thu, Jan 29, 2015 at 9:48 PM, Sebastian Huber > wrote: >> Set initial MAC address to the one specified by the command line. >> >> Signed-off-by: Sebastian Huber >> Reviewed-by: Jason Wang >> >> v2: Remove superfluous whitespace change. > The inter-spin change-logs should not go into commit messages. This > should be below the ---. With this removed (placed below the ---): > > Reviewed-by: Peter Crosthwaite > >> --- > Change-logs go here. > > Regards, > Peter > >> 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 de26609..f9a7af1 100644 >> --- a/hw/net/cadence_gem.c >> +++ b/hw/net/cadence_gem.c >> @@ -1005,6 +1005,7 @@ static void gem_reset(DeviceState *d) >> { >> int i; >> GemState *s =3D GEM(d); >> + const uint8_t *a; >> >> DB_PRINT("\n"); >> >> @@ -1023,6 +1024,11 @@ static void gem_reset(DeviceState *d) >> s->regs[GEM_DESCONF5] =3D 0x002f2145; >> s->regs[GEM_DESCONF6] =3D 0x00000200; >> >> + /* Set MAC address */ >> + a =3D &s->conf.macaddr.a[0]; >> + s->regs[GEM_SPADDR1LO] =3D a[0] | (a[1] << 8) | (a[2] << 16) | (a= [3] << 24); >> + s->regs[GEM_SPADDR1HI] =3D a[4] | (a[5] << 8); >> + >> for (i =3D 0; i < 4; i++) { >> s->sar_active[i] =3D false; >> } >> -- >> 1.8.4.5 >> >> --=20 Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.huber@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine gesch=C3=A4ftliche Mitteilung im Sinne des EHUG= . --------------020408030201020403070406 Content-Type: text/x-patch; name="0001-net-cadence_gem-Set-initial-MAC-address.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-net-cadence_gem-Set-initial-MAC-address.patch" >>From bcc808023daa8192ab782bb8cda8940c26858704 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 29 Jan 2015 13:55:33 +0100 Subject: [PATCH] net: cadence_gem: Set initial MAC address Set initial MAC address to the one specified by the command line. Signed-off-by: Sebastian Huber Reviewed-by: Jason Wang Reviewed-by: Peter Crosthwaite --- 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 dafe914..c6ff89f 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; } -- 1.8.4.5 --------------020408030201020403070406--