Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4123329yba; Tue, 7 May 2019 12:30:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqyTBZbiT6ZdIDCXk/+RsmuMTRyq87lwPoUfcTJu09INSRpoEVrtoIiLrwE5UEVxVR78xoeu X-Received: by 2002:a63:5964:: with SMTP id j36mr19613679pgm.384.1557257405475; Tue, 07 May 2019 12:30:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557257405; cv=none; d=google.com; s=arc-20160816; b=lfPnzBQKEqJmg9kgrd1BX0DqWrbN21JlRoNamWtGGV9GiRxSSfU1sxxiITWuujvUpY x7iwVgMQDMVwMpmNVHUB6s6cV/n6K7wqTHCGcB5nisYq4Sdl9+Umq4he4T7/Q08kXX0L Qs8TBAh2syd2T7zHOP7+fRgK9uV0FaoxJiDbEEfpSrZzFx5cr5u9TGpk/igIW15uDdlv kg75S4XsbGP9aMd9T0ackaetTVhL53B6ZjsYf16TfSodDblkaxOAWhPrUW0PZd7ApZC9 k7i2wTPysDJ807w7H130unUTmi9FX8QRgcd3FpPyEhLhsIRvJW/RrjEltdpnkwsGn58x kU8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=yw529B0FujJO4zjL8x90DGHXHEDB0j3opTY0tngoORY=; b=Q9OWthW7eLpTBFvn/Ut06txmGwMr6MXt7zdtS0oiMGcuOXvqzYh/F+HU6b6GB3lWX+ SDsM1EnsIjWTG7zldXJrV2cLEQ8rjmoC8bRiOxMJupBqqBrfAK2Lk3B7Xb4BZiGTKzP2 RDqueo0zMHTi4kk1rLjwN81r2JbqkkygAyHH+4l8/3hFIT2Td2vwWG8sL2mfO4znXPEW XHYT4z5GR3640oIgdmA3hpOGrY2VNhkhB9A/mrA6cYMqLHtT7RNY6dAn8yTY/wdaDP5z imDGLd4EEV0IOZAAMKGfBjkE9A2Eil9cIFwYO/R9t39rVUt3j4F3nh59lV5hYMc/FVRD MeMw== 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 b15si20932472pfb.231.2019.05.07.12.29.49; Tue, 07 May 2019 12:30:05 -0700 (PDT) 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 S1726575AbfEGT2v (ORCPT + 99 others); Tue, 7 May 2019 15:28:51 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:33308 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726000AbfEGT2v (ORCPT ); Tue, 7 May 2019 15:28:51 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::3d8]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 9A69014B79718; Tue, 7 May 2019 12:28:50 -0700 (PDT) Date: Tue, 07 May 2019 12:28:49 -0700 (PDT) Message-Id: <20190507.122849.1270099594432351727.davem@davemloft.net> To: harini.katakam@xilinx.com Cc: nicolas.ferre@microchip.com, rafalo@cadence.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, michal.simek@xilinx.com, harinikatakamlinux@gmail.com Subject: Re: [PATCH] net: macb: Change interrupt and napi enable order in open From: David Miller In-Reply-To: <1557239350-4760-1-git-send-email-harini.katakam@xilinx.com> References: <1557239350-4760-1-git-send-email-harini.katakam@xilinx.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 07 May 2019 12:28:50 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Harini Katakam Date: Tue, 7 May 2019 19:59:10 +0530 > Current order in open: > -> Enable interrupts (macb_init_hw) > -> Enable NAPI > -> Start PHY > > Sequence of RX handling: > -> RX interrupt occurs > -> Interrupt is cleared and interrupt bits disabled in handler > -> NAPI is scheduled > -> In NAPI, RX budget is processed and RX interrupts are re-enabled > > With the above, on QEMU or fixed link setups (where PHY state doesn't > matter), there's a chance macb RX interrupt occurs before NAPI is > enabled. This will result in NAPI being scheduled before it is enabled. > Fix this macb open by changing the order. > > Fixes: ae1f2a56d273 ("net: macb: Added support for many RX queues") > Signed-off-by: Harini Katakam Applied and queued up for -stable.