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=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED 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 ED76FC10F0E for ; Fri, 12 Apr 2019 14:21:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C241120818 for ; Fri, 12 Apr 2019 14:21:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726768AbfDLOVl (ORCPT ); Fri, 12 Apr 2019 10:21:41 -0400 Received: from bastet.se.axis.com ([195.60.68.11]:38886 "EHLO bastet.se.axis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726327AbfDLOVl (ORCPT ); Fri, 12 Apr 2019 10:21:41 -0400 Received: from localhost (localhost [127.0.0.1]) by bastet.se.axis.com (Postfix) with ESMTP id AD9E618338; Fri, 12 Apr 2019 16:21:38 +0200 (CEST) X-Axis-User: NO X-Axis-NonUser: YES X-Virus-Scanned: Debian amavisd-new at bastet.se.axis.com Received: from bastet.se.axis.com ([IPv6:::ffff:127.0.0.1]) by localhost (bastet.se.axis.com [::ffff:127.0.0.1]) (amavisd-new, port 10024) with LMTP id aNz8-5tSUJno; Fri, 12 Apr 2019 16:21:37 +0200 (CEST) Received: from boulder02.se.axis.com (boulder02.se.axis.com [10.0.8.16]) by bastet.se.axis.com (Postfix) with ESMTPS id B2B8E182B2; Fri, 12 Apr 2019 16:21:37 +0200 (CEST) Received: from boulder02.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 96C631A070; Fri, 12 Apr 2019 16:21:37 +0200 (CEST) Received: from boulder02.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8B3711A06D; Fri, 12 Apr 2019 16:21:37 +0200 (CEST) Received: from thoth.se.axis.com (unknown [10.0.2.173]) by boulder02.se.axis.com (Postfix) with ESMTP; Fri, 12 Apr 2019 16:21:37 +0200 (CEST) Received: from XBOX04.axis.com (xbox04.axis.com [10.0.5.18]) by thoth.se.axis.com (Postfix) with ESMTP id 7E868D05; Fri, 12 Apr 2019 16:21:37 +0200 (CEST) Received: from [10.88.41.2] (10.0.5.60) by XBOX04.axis.com (10.0.5.18) with Microsoft SMTP Server (TLS) id 15.0.1365.1; Fri, 12 Apr 2019 16:21:37 +0200 Subject: Re: [PATCH stable 4.9] net: stmmac: Set dma ring length before enabling the DMA To: Sasha Levin , Lars Persson CC: , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu References: <20190412111705.20982-1-larper@axis.com> <20190412141654.GQ11568@sasha-vm> From: Lars Persson Message-ID: Date: Fri, 12 Apr 2019 16:21:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190412141654.GQ11568@sasha-vm> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: sv Content-Transfer-Encoding: 7bit X-ClientProxiedBy: XBOX04.axis.com (10.0.5.18) To XBOX04.axis.com (10.0.5.18) X-TM-AS-GCONF: 00 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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. -Lars