Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2291540imu; Thu, 29 Nov 2018 02:39:21 -0800 (PST) X-Google-Smtp-Source: AFSGD/UohW7pgZm/yYuZwcOMYiI7Mex7d9AKER3VQw5zTkjZ9vWxcBzeNfaf7xJwkC3qpxqMOdOR X-Received: by 2002:a63:4342:: with SMTP id q63mr768543pga.63.1543487961682; Thu, 29 Nov 2018 02:39:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543487961; cv=none; d=google.com; s=arc-20160816; b=L3ZJFNGhr0K2p09tRH6zLdXffetatEXVtKZEsgxqGMO3FTZ0PuXm4opyzGsMziyHWg +gwmG+mvjxsqlKVu+kVdnUb2nW0jzUA4xHFdpB6l/ILg+/8NvInsGqcV9y/tUigNy7U9 JNLO/2KcNcSGeCep/TDxQXLbxSZRXrelbDkU8VfBks1n/i7PBdxYBUgdfWTbFDJNjqp0 7JXE33s2KEHQCN2kY116wx4+D7K7daCU9w0LwlLLRZTKzR0MdMwgCDIXuhXcpSGVs+R7 w8RMNALTG/FeFbtDI75gCoVkNqpYUhyCQbQyKKHlzs5OWj0E6ozck4svkx5L+KGWdlN0 pUxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=x1GTXlEQCcTQ31vfySIF+9crgTEQwA8rc1qwylhj7GM=; b=c0HQiSp9/6iRvR2uUKDOF7FgvHetqX3dMRucWajtnMhfNYOjQVCvmbIsVAjKDuPZml N8pA0dNKkoLM+7jZjCa7xaAGVzSBs7UA0kSNeg8ugPOuptKP15eJWen8PfyIHVZHKKQd 0gVQOHBCjcqa6eoOjcgt4lUEL2seKVECT5SO3mh4b2pJ2U20ZBh6eoqDYrnrrorRPsSv dDgTpaVqt6Dh6CGK7PcPMrYQHhe9DWCauxvysgteHYpsk1V6sF7caxavN9f0AEyOVj2j WqIcPvYwyAsRLUUyL8HAvGhpweO00mKbkPQKJrraK/7ci2E0HxPmQjVjVxKJFlXoLAuq D7Cg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l123si1671753pfc.187.2018.11.29.02.39.06; Thu, 29 Nov 2018 02:39:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727981AbeK2VnT (ORCPT + 99 others); Thu, 29 Nov 2018 16:43:19 -0500 Received: from mail-ot1-f66.google.com ([209.85.210.66]:42298 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726946AbeK2VnS (ORCPT ); Thu, 29 Nov 2018 16:43:18 -0500 Received: by mail-ot1-f66.google.com with SMTP id v23so1274996otk.9; Thu, 29 Nov 2018 02:38:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=x1GTXlEQCcTQ31vfySIF+9crgTEQwA8rc1qwylhj7GM=; b=jVTsgjkd2QBK697cSojL/d37TWmBTWi/nfM2hRmiLtJPyCzGdzyW1ZjLR9m/pZ0GHs ykONpbShj+hzzph62qr79JSIQ+yom2RZbTIq19ekcJg15vRjup8+VtfsP1YgM3ZQz4AX zeJ28T/xPrUXfyfjsI6TftkYkyaXlIOBK5oOrrmi0D6iZohgUTGc7vzRioPCKbGJ12a7 5jDUs2S2Hdi75cT2qsdBnxtozQlxc6h/6pHooYLsqlSS9en8sADyDhst4FIAUchiunue HpkHOBb/lVF0nKu91QxVHuw9M2VDlsu92FYfe91ShRPLYXXMgQU3JcKyIm3yIfV/tLx/ hzEA== X-Gm-Message-State: AA+aEWZGscKEDXhbp2Cm1OnKxMAkD7BYAOtHDsy1CSDzTPusteDCIXqd bzQ6nB1J6BInqD4JNLLmll+4TsiARCIEew4A56w= X-Received: by 2002:a9d:3662:: with SMTP id w89mr585055otb.55.1543487904097; Thu, 29 Nov 2018 02:38:24 -0800 (PST) MIME-Version: 1.0 References: <1542967157-8053-1-git-send-email-harini.katakam@xilinx.com> In-Reply-To: From: Harini Katakam Date: Thu, 29 Nov 2018 16:08:13 +0530 Message-ID: Subject: Re: [RFC PATCH] net: macb: Apply RXUBR workaround only to versions with errata To: Claudiu Beznea Cc: Harini Katakam , Nicolas Ferre , David Miller , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Michal Simek Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Claudiu, On Thu, Nov 29, 2018 at 3:51 PM wrote: > > > > On 23.11.2018 11:59, Harini Katakam wrote: > > - if (status & MACB_BIT(RXUBR)) { > > + if ((bp->errata & MACB_ERRATA_RXLOCKUP) && > > + (status & MACB_BIT(RXUBR))) { > > Just asking, did you manage to test this on other platforms that haven't > this issue? > SAMA5D2 datasheet [1] states this: > "When in packet buffer full store and forward mode, only good received > frames are written out of the DMA, so no > fragments will exist in the AHB buffers due to MAC receiver errors. There > is still the possibility of fragments due to > DMA errors, for example used bit read on the second buffer of a > multibuffer frame." > > But it is true that nowhere is presented that this must be special treated. > Yes, I tested it on ZynqMP which does NOT have this errata - did perf and ping flood and dint see any issues. Just FYI, the errata in the IP version in Zynq causes an RX lock up under high stress (when there is obviously multiple RXUBR interrupts). The RX reset is a pre-emptive workaround to *mostly* avoid the issue. Please see Answer record 52028 in https://www.xilinx.com/support/documentation/errata/en247.pdf > Moreover, if you do this only for MACB_ERRATA_RXLOCKUP and still have RXUBR > interrupt enabled every time it would not make sense to still enable it. > Or, if you want it enabled every time, you should clear it no matter the > MACB_ERRATA_RXLOCKUP is set or not, with something like this: > > if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE) > > queue_writel(queue, ISR, MACB_BIT(RXUBR)); > > Thanks for pointing this out - yes i'll move the WTC code outside the check. Regards, Harini