From patchwork Thu Dec 14 14:52:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrey Smirnov X-Patchwork-Id: 10112377 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A35D06019C for ; Thu, 14 Dec 2017 14:55:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 938C622A68 for ; Thu, 14 Dec 2017 14:55:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 85289237F1; Thu, 14 Dec 2017 14:55:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1078222A68 for ; Thu, 14 Dec 2017 14:55:14 +0000 (UTC) Received: from localhost ([::1]:41373 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePUun-0002u1-8G for patchwork-qemu-devel@patchwork.kernel.org; Thu, 14 Dec 2017 09:55:13 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55095) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePUt4-0001N6-KI for qemu-devel@nongnu.org; Thu, 14 Dec 2017 09:53:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ePUt3-0000Lf-PA for qemu-devel@nongnu.org; Thu, 14 Dec 2017 09:53:26 -0500 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]:44890) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ePUsy-0000BH-Rh; Thu, 14 Dec 2017 09:53:20 -0500 Received: by mail-pf0-x241.google.com with SMTP id m26so3756437pfj.11; Thu, 14 Dec 2017 06:53:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Xduqlof8RSbyi8r9qMPGqSAd4q4+/VM3I7uumoz45oU=; b=UCe1UDEyPqtI/IZSx+6+TiQ/bQSyBl1RPWoqc6FMVxODvqMSt3anSTehzAafvgijD+ xgavBfC9moNsAAT52nelutBe6Hxc3eT4Yqv3WgXxNoYeloI1RWfqHkRLmVsFflqoQxnZ rwg2AdtqWXKOYZ0DduMk0rA/ZlcBFrx4GgKfEuvh/Ko0L7r32v1J+v34t60caBwqLou8 ZkxthYQamG/raTAxTBHdY2YeabTjBKSo2e5r2e1zqTR+tnq381LFTO6zQk9wf/P2t7Ky buw4hcX0Mi11NfznEDwViRFu7W97Dx0J0KIesJm1VZn9QUEH3kvd3psN8W/fSJyEcu2t 6FIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Xduqlof8RSbyi8r9qMPGqSAd4q4+/VM3I7uumoz45oU=; b=CJPClYmS0xhYcgGq4lS2mK7HVybmqej3wxspm7wGRRimOqYrFu2OS3jJBaC3wEMDSM wXvDlHCqmjvwNqy3Z4IOZreDNqD6Ykh7iUingG7RIy/5JjuQEuA9b+rX0wBrq+Y4zuIQ X54KOxkVEvaS7gVHiPjMIy/yThLzeILdJaQeSSdVXw8sm0jaGEKJtwZdB9kur4xZr0HH QkH/I2rorWJNKKnkexx3EmXBhuqW9LWywMSw2l4WB0Yzm74GNPh46TDAZOg7Yp4AuuUy xbD/85q3cPrC0UjfSIhCqZDHAO0kwuGrW3cYwSyxjeBxmEUk5+aJdXSWcgIFq2kJY4w3 naCQ== X-Gm-Message-State: AKGB3mKR+bI7LzVy18zB71aBLwPAT0Uh58QIwsolGFmy7Jz3lnvqSKU3 7KMSoJJTHaIwbq/jf2cNfKI8ExOQ X-Google-Smtp-Source: ACJfBovGPhyg7oVSH+jKWnQBZKkgvIZN+A9IFZ2IQLPAbMv3R0WqfUiUwFGnYA0uu589V+bX2OSPVw== X-Received: by 10.99.7.8 with SMTP id 8mr8889808pgh.264.1513263199284; Thu, 14 Dec 2017 06:53:19 -0800 (PST) Received: from squirtle.lan (c-24-22-235-96.hsd1.wa.comcast.net. [24.22.235.96]) by smtp.gmail.com with ESMTPSA id e7sm8757439pfj.44.2017.12.14.06.53.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Dec 2017 06:53:18 -0800 (PST) From: Andrey Smirnov To: qemu-arm@nongnu.org Date: Thu, 14 Dec 2017 06:52:41 -0800 Message-Id: <20171214145255.31545-2-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20171214145255.31545-1-andrew.smirnov@gmail.com> References: <20171214145255.31545-1-andrew.smirnov@gmail.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::241 Subject: [Qemu-devel] [PATCH v2 01/15] imx_fec: Do not link to netdev 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 , Andrey Smirnov , Jason Wang , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, yurovsky@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Binding to a particular netdev doesn't seem to belong to this layer and should probably be done as a part of board or SoC specific code. Convert all of the users of this IP block to use qdev_set_nic_properties() instead. Cc: Peter Maydell Cc: Jason Wang Cc: Philippe Mathieu-Daudé Cc: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Cc: yurovsky@gmail.com Reviewed-by: Peter Maydell Signed-off-by: Andrey Smirnov --- hw/arm/fsl-imx6.c | 1 + hw/net/imx_fec.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/arm/fsl-imx6.c b/hw/arm/fsl-imx6.c index 26fd214004..2ed7146c52 100644 --- a/hw/arm/fsl-imx6.c +++ b/hw/arm/fsl-imx6.c @@ -385,6 +385,7 @@ static void fsl_imx6_realize(DeviceState *dev, Error **errp) spi_table[i].irq)); } + qdev_set_nic_properties(DEVICE(&s->eth), &nd_table[0]); object_property_set_bool(OBJECT(&s->eth), true, "realized", &err); if (err) { error_propagate(errp, err); diff --git a/hw/net/imx_fec.c b/hw/net/imx_fec.c index 90e6ee35ba..88b4b049d7 100644 --- a/hw/net/imx_fec.c +++ b/hw/net/imx_fec.c @@ -1171,8 +1171,6 @@ static void imx_eth_realize(DeviceState *dev, Error **errp) qemu_macaddr_default_if_unset(&s->conf.macaddr); - s->conf.peers.ncs[0] = nd_table[0].netdev; - s->nic = qemu_new_nic(&imx_eth_net_info, &s->conf, object_get_typename(OBJECT(dev)), DEVICE(dev)->id, s);