From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS, URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26473C10F0E for ; Fri, 12 Apr 2019 17:32:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E83CB218A3 for ; Fri, 12 Apr 2019 17:32:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555090348; bh=ZPvy+RY24bawWUFhUwjtinTrenZNR8w7oS1klsN0GrM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=gR0B68HQl+IQhChYxSQX4TlnAGTdcBd0XN2DkksPxeejGQPiRTFGiosR70bNdtsM5 Z1F/9ogZ9olBJkZiAgUa38V+31gwabUu7gcRmRsC6tNt65PaavMp8BsQmDWFIQKS1p fzRpY/+rnrEhBOCsWCbr9i4AkteDz94UdI39OBRQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726798AbfDLRc1 (ORCPT ); Fri, 12 Apr 2019 13:32:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:42018 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726765AbfDLRc1 (ORCPT ); Fri, 12 Apr 2019 13:32:27 -0400 Received: from localhost (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 46F3A2171F; Fri, 12 Apr 2019 17:32:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555090346; bh=ZPvy+RY24bawWUFhUwjtinTrenZNR8w7oS1klsN0GrM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VqIDuv+FmBjN2Zv2hr70TmQkhiNfbwyeFGBgabQLPIMZ48ue7drgkZjPlTPxpThOn Sz4U3gRZ9D5R+ggFxnpiFDF93HhNDbDQCm/u2lkxed0kAHg+q77EV0kMk3Orl12dx3 arPvBHhZ53nt43XQOXXuAGqaZvOumvlaZKlgG8MA= Date: Fri, 12 Apr 2019 13:32:25 -0400 From: Sasha Levin To: Lars Persson Cc: Lars Persson , stable@vger.kernel.org, Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu Subject: Re: [PATCH stable 4.9] net: stmmac: Set dma ring length before enabling the DMA Message-ID: <20190412173225.GS11568@sasha-vm> References: <20190412111705.20982-1-larper@axis.com> <20190412141654.GQ11568@sasha-vm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Fri, Apr 12, 2019 at 04:21:31PM +0200, Lars Persson wrote: > > >On 4/12/19 4:16 PM, Sasha Levin wrote: >>On Fri, Apr 12, 2019 at 01:17:05PM +0200, Lars Persson wrote: >>>This was fixed in upstream by commit 7d9e6c5afab6 ("net: stmmac: Integrate >>>XGMAC into main driver flow") that is a new feature commit. >>> >>>We found a race condition in the DMA init sequence that hits if the >>>PHY already has link up during stmmac_hw_setup. Since the ring length >>>was programmed after enabling the RX path, we might receive a packet >>>before the correct ring length is programmed. When that happened we >>>could not get reliable interrupts for DMA RX and the MTL complained >>>about RX FIFO overrun. >>> >>>The correct init sequence according to the data book for DWC Ethernet >>>QoS 4.10 is: >>>1. Write Ring length >>>2. Write Descriptor list base address >>>3. Start the DMA. >>> >>>Signed-off-by: Lars Persson >>>Cc: stable@vger.kernel.org # 4.9.x >>>Cc: Giuseppe Cavallaro >>>Cc: Alexandre Torgue >>>Cc: Jose Abreu >> >>What about 4.14? 7d9e6c5afab6 isn't in it either. >> > >I will send a separate patch for 4.14 in some days. Okay. I can't merge this one until we have the 4.14 as well (otherwise, people who upgrade from 4.9 to 4.14 will see a regression), so when it's posted I can do both. -- Thanks, Sasha