From patchwork Mon Oct 23 20:10:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrey Smirnov X-Patchwork-Id: 10023011 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 89E2D603D7 for ; Mon, 23 Oct 2017 20:13:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B40B28932 for ; Mon, 23 Oct 2017 20:13:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F5EF2893C; Mon, 23 Oct 2017 20:13:32 +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 DB5F328932 for ; Mon, 23 Oct 2017 20:13:31 +0000 (UTC) Received: from localhost ([::1]:40378 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6j6I-0000vD-P9 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 23 Oct 2017 16:13:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46078) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6j4D-00007e-W2 for qemu-devel@nongnu.org; Mon, 23 Oct 2017 16:11:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6j4D-0002SW-3j for qemu-devel@nongnu.org; Mon, 23 Oct 2017 16:11:21 -0400 Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]:44180) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e6j49-0002PZ-6q; Mon, 23 Oct 2017 16:11:17 -0400 Received: by mail-pg0-x241.google.com with SMTP id j3so12638186pga.1; Mon, 23 Oct 2017 13:11:17 -0700 (PDT) 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=ct2ZJk0A9rN8ofw6AzCbtpKLE3HqyItSlHs4nOD0zaw=; b=QMsE0UfkAVks8Jv1hZM2Y2hDop5NzC51+MSmyMaAVxe2XFIlGrVOWHfnIi0q6UZJgy 9DVoMzxaqJVPZj7UtjDtFXgm02Pzlwi4nTvweRXwiqVWRudKu6mgJTerccaYN0qBMdFs ITr+hJEGtoMvPv2xvGea2+icf7vfZM0H+n72vMV4JEgRY3VKULiaiwKcPNYNRA5uimq7 elXUVOwrN3XUvY1PD6RqOtWWLjTb3eBkF3LVGRhKo43XCwv70y7IPLYdZAvc3xzMDU9h k6gLkB8EhX15PCH9OQmiNegEGyPngy5VaMdDXvJNaibaUy6cmOAiyuxZ0CblMg090/3f cDvA== 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=ct2ZJk0A9rN8ofw6AzCbtpKLE3HqyItSlHs4nOD0zaw=; b=MFT3/Z/AF6kN7hC2jCxWqvu27Jw38bB0BkedsWHrCz1bWA9AyTuX2+cI0CMilp7Div 2jUtqYYmLQGL/Qwg9hX+kxRHxSRNguoSVn2hzkTjrMhX70ap3xz4eu6aHos+1rXV3FUV NrIjYIW3GK38IO86g5+X6f0Q0qaJJU992JvGQQe/uvrzOipeHxKvKu9fTghcRlBS86lu nLXlZ1/LoedKVEP5156i2eTKit/i7jZqFYxWOWNErXGtFLtRip/JZAEJxykXflImun3Z oe8Gydz1w/1tAtWU1AQTMVYjAcwIhl96eE459METGe8ElfzPS3O7DJly4I2gzq/fetsb rEdQ== X-Gm-Message-State: AMCzsaV6UNBwofNWVeO4X3o+KTnqkvnwT96MTIP+bthYRye3d93wYNxr n+/3LdHUJsHJDgDEU28Ka9CndXid X-Google-Smtp-Source: ABhQp+S4KOjdqt7SJYejAjA6kq5/LakG3FOJdc8Pp9SGOhFl7m+a5tr/Nuf4A9CZIMs3NCYgHiSXoQ== X-Received: by 10.84.248.133 with SMTP id q5mr11025471pll.419.1508789476055; Mon, 23 Oct 2017 13:11:16 -0700 (PDT) Received: from squirtle.westlake.spaceflightindustries.com ([173.226.206.194]) by smtp.gmail.com with ESMTPSA id j1sm15181623pfj.108.2017.10.23.13.11.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Oct 2017 13:11:15 -0700 (PDT) From: Andrey Smirnov To: qemu-arm@nongnu.org Date: Mon, 23 Oct 2017 13:10:29 -0700 Message-Id: <20171023201055.21973-2-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20171023201055.21973-1-andrew.smirnov@gmail.com> References: <20171023201055.21973-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:c05::241 Subject: [Qemu-devel] [PATCH v2 01/27] 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);