Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2255785imm; Thu, 7 Jun 2018 07:47:36 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJBpuskF5me/aqZQc/HOstm0Q0zFKOVZ5CFTEmMRsLRXsESaggPn4ubSxEG7POQ7YHXDibT X-Received: by 2002:a17:902:6686:: with SMTP id e6-v6mr2357630plk.35.1528382856640; Thu, 07 Jun 2018 07:47:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528382856; cv=none; d=google.com; s=arc-20160816; b=DURM19eH3XfnEVfhBKOSlrMNpu7dQ1gZZNG8ekm/oq+KEEMBRmzs68Ie0mNC2G32LD TbazXonmdh7NzUIjoQXk1zgJR0wcyJLiKpH5g6NwQt0R1NqmgmnVfITeNQUI6o+d+b/d nPE3bfXg0u7bDf/jlSZ/RTcC9ThNtty7hyzcNt1ALzS8z3QOkDp0XXpWbkdLsIMuiwsh 6YhTlXoRlsUjl3AyFQ19dveIP6CnAZRiBg4BDyR84uBZi458gLoRZUUKFw07IhxKW+aq snf+5GO4XE3q+rujMdQo7K3O5P/UsQE+GiDlgAAoJCp/RjBIphqpykBSvMg73wPqHEQ/ ycyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=lbMPLjDRNUu8T8XkO2kLGDRRrf6814wVNrbVIf4LpXE=; b=Dfi58QjlK1vuLme+RoseTkQIWudTMKCoquEKl3v4f5VUcUU1sHKUjp22w7ylLzOgB0 mRvcXdtrEGRshkGFRUHIg7DeJUpw6Lu5vb/3geax5o2yE1T2tgb0zha1ttsSnuUXO21p YAR4i5cdnwX75W4QPDoScWD3WTEbxtI8/5CK35514IK8vcOEW6S/zSkZqDHBBs6dUost BIqxpX4hhCYY0RnNo1deM4WgNFRNjf8QaI12GVMqO/BUVfMt0AVHv5WcoRXAaw93fpyN 8BAUCx0KusHZOzeXS8ILNNfIWICJyAkizbiWnGAzpawHwtINYfmUGH4BpdpdLc++tviJ 2mCw== 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 k186-v6si28153481pge.375.2018.06.07.07.47.22; Thu, 07 Jun 2018 07:47:36 -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 S934981AbeFGOq2 (ORCPT + 99 others); Thu, 7 Jun 2018 10:46:28 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:40766 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934083AbeFGOqZ (ORCPT ); Thu, 7 Jun 2018 10:46:25 -0400 Received: from [148.252.241.226] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1fQvbU-0005Zw-2y; Thu, 07 Jun 2018 15:09:28 +0100 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1fQvbB-0003BN-Ez; Thu, 07 Jun 2018 15:09:09 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Aaron Brown" , "Benjamin Poirier" , "Jeff Kirsher" , "Sasha Neftin" Date: Thu, 07 Jun 2018 15:05:21 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 321/410] e1000e: Fix check_for_link return value with autoneg off In-Reply-To: X-SA-Exim-Connect-IP: 148.252.241.226 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.57-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Benjamin Poirier commit 4e7dc08e57c95673d2edaba8983c3de4dd1f65f5 upstream. When autoneg is off, the .check_for_link callback functions clear the get_link_status flag and systematically return a "pseudo-error". This means that the link is not detected as up until the next execution of the e1000_watchdog_task() 2 seconds later. Fixes: 19110cfbb34d ("e1000e: Separate signaling for link check/link up") Signed-off-by: Benjamin Poirier Acked-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher Signed-off-by: Ben Hutchings --- drivers/net/ethernet/intel/e1000e/ich8lan.c | 2 +- drivers/net/ethernet/intel/e1000e/mac.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- a/drivers/net/ethernet/intel/e1000e/ich8lan.c +++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c @@ -1442,7 +1442,7 @@ static s32 e1000_check_for_copper_link_i * we have already determined whether we have link or not. */ if (!mac->autoneg) - return -E1000_ERR_CONFIG; + return 1; /* Auto-Neg is enabled. Auto Speed Detection takes care * of MAC speed/duplex configuration. So we only need to --- a/drivers/net/ethernet/intel/e1000e/mac.c +++ b/drivers/net/ethernet/intel/e1000e/mac.c @@ -450,7 +450,7 @@ s32 e1000e_check_for_copper_link(struct * we have already determined whether we have link or not. */ if (!mac->autoneg) - return -E1000_ERR_CONFIG; + return 1; /* Auto-Neg is enabled. Auto Speed Detection takes care * of MAC speed/duplex configuration. So we only need to