From nobody Thu Nov 6 01:12:42 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1538142757417573.2414815066757; Fri, 28 Sep 2018 06:52:37 -0700 (PDT) Received: from localhost ([::1]:43505 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g5tC7-0005Wy-3L for importer@patchew.org; Fri, 28 Sep 2018 09:52:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55906) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g5tA7-0004Tp-Gw for qemu-devel@nongnu.org; Fri, 28 Sep 2018 09:50:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g5tA3-0006uH-Cx for qemu-devel@nongnu.org; Fri, 28 Sep 2018 09:50:31 -0400 Received: from 17.mo6.mail-out.ovh.net ([46.105.36.150]:35566) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g5tA1-0006oZ-Av for qemu-devel@nongnu.org; Fri, 28 Sep 2018 09:50:26 -0400 Received: from player691.ha.ovh.net (unknown [10.109.143.232]) by mo6.mail-out.ovh.net (Postfix) with ESMTP id 97A6418540F for ; Fri, 28 Sep 2018 15:50:22 +0200 (CEST) Received: from zorba.kaod.org.com (LFbn-1-10605-110.w90-89.abo.wanadoo.fr [90.89.196.110]) (Authenticated sender: clg@kaod.org) by player691.ha.ovh.net (Postfix) with ESMTPSA id 4CD382600C3; Fri, 28 Sep 2018 15:50:17 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Jason Wang , qemu-devel@nongnu.org Date: Fri, 28 Sep 2018 15:49:54 +0200 Message-Id: <20180928135003.8650-3-clg@kaod.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180928135003.8650-1-clg@kaod.org> References: <20180928135003.8650-1-clg@kaod.org> MIME-Version: 1.0 X-Ovh-Tracer-Id: 3575295154637933567 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtjedruddtledgjedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 46.105.36.150 Subject: [Qemu-devel] [PATCH 02/11] net: etraxfs_eth: add a reset method X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , "Edgar E . Iglesias" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Edgar E. Iglesias Signed-off-by: C=C3=A9dric Le Goater --- hw/net/etraxfs_eth.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/net/etraxfs_eth.c b/hw/net/etraxfs_eth.c index 64ab3df1ae38..552a18c7c730 100644 --- a/hw/net/etraxfs_eth.c +++ b/hw/net/etraxfs_eth.c @@ -585,6 +585,13 @@ static NetClientInfo net_etraxfs_info =3D { .link_status_changed =3D eth_set_link, }; =20 +static void etraxfs_eth_reset(DeviceState *dev) +{ + ETRAXFSEthState *s =3D ETRAX_FS_ETH(dev); + + tdk_init(&s->phy); +} + static void etraxfs_eth_realize(DeviceState *dev, Error **errp) { SysBusDevice *sbd =3D SYS_BUS_DEVICE(dev); @@ -609,8 +616,6 @@ static void etraxfs_eth_realize(DeviceState *dev, Error= **errp) object_get_typename(OBJECT(s)), dev->id, s); qemu_format_nic_info_str(qemu_get_queue(s->nic), s->conf.macaddr.a); =20 - - tdk_init(&s->phy); mdio_attach(&s->mdio_bus, &s->phy, s->phyaddr); } =20 @@ -627,6 +632,7 @@ static void etraxfs_eth_class_init(ObjectClass *klass, = void *data) DeviceClass *dc =3D DEVICE_CLASS(klass); =20 dc->realize =3D etraxfs_eth_realize; + dc->reset =3D etraxfs_eth_reset; dc->props =3D etraxfs_eth_properties; /* Reason: pointer properties "dma_out", "dma_in" */ dc->user_creatable =3D false; --=20 2.17.1