From patchwork Wed Jan 17 21:49:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Duyck, Alexander H" X-Patchwork-Id: 862613 X-Patchwork-Delegate: jeffrey.t.kirsher@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=osuosl.org (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zMLTg0pD2z9t5Y for ; Thu, 18 Jan 2018 08:54:30 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id DB4F386F1D; Wed, 17 Jan 2018 21:54:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g8ZTXjWlze50; Wed, 17 Jan 2018 21:54:26 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id DC63486423; Wed, 17 Jan 2018 21:54:26 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 3758D1C219A for ; Wed, 17 Jan 2018 21:54:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 0504B893DB for ; Wed, 17 Jan 2018 21:54:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jdWGixiL5NYL for ; Wed, 17 Jan 2018 21:54:11 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by hemlock.osuosl.org (Postfix) with ESMTPS id C051789269 for ; Wed, 17 Jan 2018 21:54:11 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jan 2018 13:54:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,374,1511856000"; d="scan'208";a="11394852" Received: from ahduyck-green-test.jf.intel.com ([10.166.244.140]) by orsmga006.jf.intel.com with ESMTP; 17 Jan 2018 13:54:11 -0800 From: Alexander Duyck To: intel-wired-lan@lists.osuosl.org Date: Wed, 17 Jan 2018 16:49:10 -0500 Message-ID: <20180117214910.56422.26379.stgit@ahduyck-green-test.jf.intel.com> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Subject: [Intel-wired-lan] [net-queue PATCH] e1000e: Workaround for VMware emulated 82574 setting of LSC X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" This patch is meant to address the fact that after the patch for addressing receive overrun interrupt bursts VMware emulated versions of the 82574 were no longer able to bring up link. I believe this is due to the fact that the emulation was based more on the driver implementation then on the actual hardware behavior. In order to resolve this we will need to modify the fix so that we only force the LSC checks when the receiver overrun bit is set in the ICR register. By doing this we can maintain the legacy behavior needed to keep the emulated interfaces going while also addressing the issues with the RXO interrupt cause seen with the physical hardware. Fixes: 4aea7a5c5e94 ("e1000e: Avoid receiver overrun interrupt bursts") Signed-off-by: Alexander Duyck Acked-by: Sasha Neftin Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> --- drivers/net/ethernet/intel/e1000e/netdev.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index 1298b69..74d5352 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -1927,8 +1927,15 @@ static irqreturn_t e1000_msix_other(int __always_unused irq, void *data) adapter->total_rx_packets = 0; __napi_schedule(&adapter->napi); } - } - if (icr & E1000_ICR_LSC) { + if (icr & E1000_ICR_LSC) + goto update_link; + } else { + /* We assume if the RXO bit is not set that this is a + * link status change event. This is needed due to emulated + * versions of the device that may not correctly populate + * the LSC bit. + */ +update_link: ew32(ICR, E1000_ICR_LSC); hw->mac.get_link_status = true; /* guard against interrupt when we're going down */