From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47477) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRZfH-0006nb-8C for qemu-devel@nongnu.org; Sat, 09 Jun 2018 04:56:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRZfG-0006n9-IT for qemu-devel@nongnu.org; Sat, 09 Jun 2018 04:56:03 -0400 References: <20180608200558.386-1-laurent@vivier.eu> <20180608200558.386-14-laurent@vivier.eu> From: =?UTF-8?Q?Herv=c3=a9_Poussineau?= Message-ID: <484ec115-91b9-8fce-d62a-0dc80e1a03be@reactos.org> Date: Sat, 9 Jun 2018 10:55:55 +0200 MIME-Version: 1.0 In-Reply-To: <20180608200558.386-14-laurent@vivier.eu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [RFC 13/13] dp8393x: fix receiving buffer exhaustion List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Vivier , qemu-devel@nongnu.org Cc: Aurelien Jarno , qemu-block@nongnu.org, Gerd Hoffmann , "Dr. David Alan Gilbert" , =?UTF-8?Q?Andreas_F=c3=a4rber?= , Jason Wang , Paolo Bonzini , Yongbok Kim , Fam Zheng , Max Reitz , Kevin Wolf Le 08/06/2018 à 22:05, Laurent Vivier a écrit : > The card is not able to exit from exhaustion state, because > while the drive consumes the buffers, the RRP is incremented > (when the driver clears the ISR RBE bit), so it stays equal > to RWP, and while RRP == RWP, the card thinks it is always > in exhaustion state. So the driver consumes all the buffers, > but the card cannot receive new ones. > > This patch fixes the problem by not incrementing RRP when > the driver clears the ISR RBE bit. > > Signed-off-by: Laurent Vivier > --- > hw/net/dp8393x.c | 31 ++++++++++++++++--------------- > 1 file changed, 16 insertions(+), 15 deletions(-) > Works OK on NetBSD 5.1/arc on MIPS Magnum. Tested-by: Hervé Poussineau