From patchwork Mon May 30 17:26:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Christophe Dubois X-Patchwork-Id: 9141873 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 E8CD060777 for ; Mon, 30 May 2016 17:34:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA8D227BEF for ; Mon, 30 May 2016 17:34:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CAE8C27DA9; Mon, 30 May 2016 17:34:33 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 4085427BEF for ; Mon, 30 May 2016 17:34:32 +0000 (UTC) Received: from localhost ([::1]:60734 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7R5D-00044O-PQ for patchwork-qemu-devel@patchwork.kernel.org; Mon, 30 May 2016 13:34:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7Qx3-0004UB-OG for qemu-devel@nongnu.org; Mon, 30 May 2016 13:26:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b7Qx0-0003aU-Ip for qemu-devel@nongnu.org; Mon, 30 May 2016 13:26:05 -0400 Received: from zose-mta05.web4all.fr ([185.49.20.50]:41989) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7Qx0-0003aP-CM for qemu-devel@nongnu.org; Mon, 30 May 2016 13:26:02 -0400 Received: from localhost (localhost [127.0.0.1]) by zose-mta05.web4all.fr (Postfix) with ESMTP id E8BF241648; Mon, 30 May 2016 19:26:01 +0200 (CEST) Received: from zose-mta05.web4all.fr ([127.0.0.1]) by localhost (zose-mta05.web4all.fr [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id OqugSaAHzdyT; Mon, 30 May 2016 19:26:01 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zose-mta05.web4all.fr (Postfix) with ESMTP id 8F9934164B; Mon, 30 May 2016 19:26:01 +0200 (CEST) X-Virus-Scanned: amavisd-new at zose-mta-05.w4a.fr Received: from zose-mta05.web4all.fr ([127.0.0.1]) by localhost (zose-mta05.web4all.fr [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 2lb8amHMSjhq; Mon, 30 May 2016 19:26:01 +0200 (CEST) Received: from localhost.localdomain (smm49-1-78-235-240-156.fbx.proxad.net [78.235.240.156]) by zose-mta05.web4all.fr (Postfix) with ESMTPSA id 4969941648; Mon, 30 May 2016 19:26:01 +0200 (CEST) From: Jean-Christophe Dubois To: qemu-devel@nongnu.org, peter.maydell@linaro.org, jasowang@redhat.com Date: Mon, 30 May 2016 19:26:00 +0200 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 185.49.20.50 Subject: [Qemu-devel] [PATCH v6 06/10] i.MX: reset TX/RX descriptors when FEC is disabled. 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: Jean-Christophe Dubois Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP According to the FEC chapter of i.MX25 reference manual RX adn TX descriptors are reseted when the FEC device is disabled through ECR. Signed-off-by: Jean-Christophe Dubois --- Changes since v1: * Not present on v1 Changes since v2: * Not present on v2 Changes since v3: * Not present on v3 Changes since v4: * Not present on v4 Changes since v5: * None hw/net/imx_fec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/net/imx_fec.c b/hw/net/imx_fec.c index 768181e..7369cfa 100644 --- a/hw/net/imx_fec.c +++ b/hw/net/imx_fec.c @@ -454,6 +454,8 @@ static void imx_fec_write(void *opaque, hwaddr addr, } if ((s->ecr & FEC_EN) == 0) { s->rx_enabled = 0; + s->rx_descriptor = s->erdsr; + s->tx_descriptor = s->etdsr; } break; case 0x040: /* MMFR */