Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp326604imu; Fri, 25 Jan 2019 03:05:14 -0800 (PST) X-Google-Smtp-Source: ALg8bN6mvNxyS60r37YDuPkbmsLnTn/pVJLxjlK9BcwqS6eubd+auwhfnll3dgtxoXW2XfnZH7Vo X-Received: by 2002:a63:89c2:: with SMTP id v185mr8844300pgd.97.1548414314757; Fri, 25 Jan 2019 03:05:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548414314; cv=none; d=google.com; s=arc-20160816; b=B4rjPuQCWQqZevPIkX2S7mac+GeFBsqxT2xGmp7yh99gGAPNtFdKzvL/yUl39Zuqtr XXXkwWyRyMvRoRyb+sOgQ0zG0jp+bnz90q3Www3mRKlLPDGgYMDrvWDB/czqDOM4DsQu WNu/LxUq3x2/+Wb5U7uIdpG9BqI+UFT2NH0JBL66RYXHkx+X2PaKqkiKRK9cbBOB8qGy PagCMishe8fniMm9Fn77IvYoHeJ0Ss/6nNDPCxYhrx9ohittcT2J9V81vZSs2MNAzTi+ v/q47vrwdXO+Sxg6bJ5kgA01jGg4hwIrXqF6PuGEWROwQn0whyTPwNuSMQs2Q9KRIzk9 iVcg== 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=EAYtSANcjPnHVnOE8j9yEak2CRFE8syD/5+aXmZ6tRc=; b=oTfYsot6nqVedQFuMmc/Pvjvl8v1o/LC4BpEfyfy2GNMQASiZ1WVUtzxVV32FtUACz 4+0JJCvQ6YZJkjvtewLeD94coC/xW+jGqEUaT8KX9MFyqCoYOCRC0NLPouCVwlEVFDe+ 3TWwrKoSIHTPanoUnsQ1PncePdYOS2dLvLg1OMEK6Pw9G6dQ3BxNYxgSbSjivFcAeJMJ ff8FFkNySyaeTl797GYQmYvu0iCiJUtNjXLNMjxm22Jrlj+0zRqe0DxHoDXE9s7xHXwE QYn5+9LtC7G9EytbBh426+Urfz8su+ONdor7BR7amGo8PsYQFRQMIwZefSsdZzo34Z8r ePTg== 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 o5si11144700plk.360.2019.01.25.03.04.59; Fri, 25 Jan 2019 03:05:14 -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 S1728283AbfAYLDR (ORCPT + 99 others); Fri, 25 Jan 2019 06:03:17 -0500 Received: from mail-ot1-f65.google.com ([209.85.210.65]:36525 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728076AbfAYLDO (ORCPT ); Fri, 25 Jan 2019 06:03:14 -0500 Received: by mail-ot1-f65.google.com with SMTP id k98so8165833otk.3; Fri, 25 Jan 2019 03:03:14 -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=EAYtSANcjPnHVnOE8j9yEak2CRFE8syD/5+aXmZ6tRc=; b=eGdf8rXf4aVN3qPd6wVMNtiiNsHrZqShNOs3Ih/bkQjBNpimU4r0Y9IYppuKoWu+6X FkufeFD+x65FYZPcsDqnve+yLE6Ypzz68d2HWpUPnoM4aJQGnHUUkT8aGZbZvPKu3L3m awjabKdr3yIjQG0NjRqGe8RwYWUNY9oLYmKm3AQMMXAPv5TqM7oykUtRWJrEF1lXtAZo gzaBRNFuTDBO6inD2pA893AVCH5rMNu+E6lYoo4SL3x2YnkyqNRbTQlRpT0gHK/yEbSL GuzdqkoP677zFpoRHYA7sFpMVxy0KOffDHGhXYINkQEGYwN7eG3bu2848PFwXxhVzZe7 eIAQ== X-Gm-Message-State: AJcUukdnWPEsaqrLEsCMCKfu04Mn8Ae4JBV7EMktEk0/D0PQEuCk09U+ gWe3k4doyagDUWM/6jvhVhYANcg7n+ko/YqGdsg= X-Received: by 2002:a9d:6c59:: with SMTP id g25mr7623348otq.55.1548414193802; Fri, 25 Jan 2019 03:03:13 -0800 (PST) MIME-Version: 1.0 References: <1548337111-31184-1-git-send-email-harini.katakam@xilinx.com> In-Reply-To: From: Harini Katakam Date: Fri, 25 Jan 2019 16:33:02 +0530 Message-ID: Subject: Re: [PATCH] net: macb: Apply RXUBR workaround only to versions with errata To: Nicolas Ferre Cc: Harini Katakam , David Miller , Claudiu Beznea , Brandon Streiff , 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 Nicolas, On Fri, Jan 25, 2019 at 3:58 PM wrote: > > On 24/01/2019 at 14:38, Harini Katakam wrote: > > The interrupt handler contains a workaround for RX hang applicable > > to Zynq and AT91 only. Subsequent versions do not need this > > AT91RM9200 only. It's not the case for other AT91 SoCs (reading errata > list for them). > > That being said I have to add a patch for making this perfectly clear in > the comment just above the flag's test. > > > workaround. This workaround unecessarily resets RX whenever RX used > > Typo: unnecessarily > > > bit read is observed, which can be often under heavy traffic. Hence > > introduce an CAPS mask and a check to enable this workaround. > > Nack for this one, see below... Thanks for the review. I dint realize it was AT91RM9200, hence I edited the wrong config structure. Will fix. > > if (status & MACB_BIT(RXUBR)) { > > - ctrl = macb_readl(bp, NCR); > > - macb_writel(bp, NCR, ctrl & ~MACB_BIT(RE)); > > - wmb(); > > - macb_writel(bp, NCR, ctrl | MACB_BIT(RE)); > > + if (bp->caps & MACB_CAPS_NEEDS_RSTONUBR) { > > + ctrl = macb_readl(bp, NCR); > > + macb_writel(bp, NCR, ctrl & ~MACB_BIT(RE)); > > + wmb(); > > + macb_writel(bp, NCR, ctrl | MACB_BIT(RE)); > > + } > > As this interrupt routine is not doing anything else than just being > called now, what about just removing the use of this status bit for > platforms which don't need this RX reset? OK, sure I'll try that. I left the interrupt enabled just in case there were other users performing an action/using this interrupt. Regards, Harini