From patchwork Sat May 21 08:01:31 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: 624727 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rBcx642Vnz9t5c for ; Sat, 21 May 2016 18:12:42 +1000 (AEST) Received: from localhost ([::1]:39297 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b421Y-00009k-AZ for incoming@patchwork.ozlabs.org; Sat, 21 May 2016 04:12:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37159) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b41qv-0006of-Fh for qemu-devel@nongnu.org; Sat, 21 May 2016 04:01:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b41qo-00030H-Gb for qemu-devel@nongnu.org; Sat, 21 May 2016 04:01:40 -0400 Received: from zose-mta05.web4all.fr ([185.49.20.50]:53513) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b41qo-00030C-BE for qemu-devel@nongnu.org; Sat, 21 May 2016 04:01:34 -0400 Received: from localhost (localhost [127.0.0.1]) by zose-mta05.web4all.fr (Postfix) with ESMTP id B29084058C; Sat, 21 May 2016 10:01:33 +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 q67usAiDl032; Sat, 21 May 2016 10:01:32 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zose-mta05.web4all.fr (Postfix) with ESMTP id 4C790405BB; Sat, 21 May 2016 10:01:32 +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 uNDJAwHLkHbU; Sat, 21 May 2016 10:01:32 +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 06C744058C; Sat, 21 May 2016 10:01:31 +0200 (CEST) From: Jean-Christophe Dubois To: qemu-devel@nongnu.org, peter.maydell@linaro.org, jasowang@redhat.com Date: Sat, 21 May 2016 10:01:31 +0200 Message-Id: <01aed21c690206e1615c77a0456694212278ee8c.1463816701.git.jcd@tribudubois.net> 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 v5 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 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 87e3c87..63fe20f 100644 --- a/hw/net/imx_fec.c +++ b/hw/net/imx_fec.c @@ -453,6 +453,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 */