Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753344AbbEEJ6k (ORCPT ); Tue, 5 May 2015 05:58:40 -0400 Received: from mail-ob0-f180.google.com ([209.85.214.180]:36335 "EHLO mail-ob0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751114AbbEEJ6b (ORCPT ); Tue, 5 May 2015 05:58:31 -0400 MIME-Version: 1.0 In-Reply-To: <55b3c89b3549c61d62b8440636516fd572870842.1430817941.git.michal.simek@xilinx.com> References: <7fb84f65a61bbe0fdb4b61a871cf4d4f7910955d.1430817941.git.michal.simek@xilinx.com> <55b3c89b3549c61d62b8440636516fd572870842.1430817941.git.michal.simek@xilinx.com> Date: Tue, 5 May 2015 15:28:30 +0530 Message-ID: Subject: Re: [PATCH 02/12] net: axienet: Handle 0 packet receive gracefully From: Shubhrajyoti Datta To: Michal Simek Cc: netdev@vger.kernel.org, Peter Crosthwaite , Linux Kernel Mailing List , monstr@monstr.eu, "linux-arm-kernel@lists.infradead.org" , Anirudha Sarangi , John Linn , =?UTF-8?Q?S=C3=B6ren_Brinkmann?= Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1728 Lines: 38 On Tue, May 5, 2015 at 2:55 PM, Michal Simek wrote: > From: Peter Crosthwaite > > The AXI-DMA rx-delay interrupt can sometimes be triggered > when there are 0 outstanding packets received. This is due > to the fact that the receive function will greedily consume > as many packets as possible on interrupt. So if two packets > (with a very particular timing) arrive in succession they > will each cause the rx-delay interrupt, but the first interrupt > will consume both packets. > This means the second interrupt is a 0 packet receive. > > This is mostly OK, except that the tail pointer register is > updated unconditionally on receive. Currently the tail pointer > is always set to the current bd-ring descriptor under > the assumption that the hardware has moved onto the next > descriptor. What this means for length 0 recv is the current > descriptor that the hardware is potentially yet to use will > be marked as the tail. This causes the hardware to think > its run out of descriptors deadlocking the whole rx path. > Should it marked to stable ? > Fixed by updating the tail pointer to the most recent > successfully consumed descriptor. > > Reported-by: Wendy Liang > Signed-off-by: Peter Crosthwaite > Tested-by: Jason Wu > Acked-by: Michal Simek > Signed-off-by: Michal Simek > --- > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/