Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2203386imm; Mon, 28 May 2018 03:53:07 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrmR/QgKSthy/+591uJTuZc7xiFt4Hb1vwZcu5s7biwZ33Apa9iGdfI7Au7PkzgxX9m7oG7 X-Received: by 2002:a17:902:a60e:: with SMTP id u14-v6mr13019064plq.233.1527504787574; Mon, 28 May 2018 03:53:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527504787; cv=none; d=google.com; s=arc-20160816; b=kN4qF8l/3BH+/38JcphErOE4AJ5EGpYq6r3BpjZq/9GBGnVgGIB29G0zcwsPCJR8iq 3rdmFVsGcH1QsWTSBLKKyV4J8aJb6nTJsAQ4GKk7rRMJmUdlCDzEBvguqAC0ipvZ0SoG nj6wXGdOLgY3vmx66FmsjsmTmxkWu+2o5zuShFAGMvuTClloM2fzVC5MzVBDn/lwH4lw cGGCXWzd92nJkki9cyJF1uCxIMWRdxvdhl3J1v0QazauGinNiy5OMGEohzos5WNiRB6r tTRRy8EEvZgJewnlcbA79UiG9o6lX6/nJMM24RsPImMyHjL3OkDJpmtJ2gkPSqkwn9nl XKPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=uwMfDyZ0Ht+Q03K1ENjh7MjR57ihrAdMx2NosXaAaRo=; b=iOWYTsAA4zUE7tix6v3xXkq4EFsT4WEYgyXFb3KQC+oTDKNy69s9ySFXW5D5hPzyNp P7H0ySHagyFJ3N9r7slO+TVMYpeeZhPbdDjMAZ61NOMcN3Xy0vZ8y0mwlZOJDuVs+VOi VCpXvQStWQsgakeA95xY4nt0sbREHZvptLLMw014zUOYa3Qd+hhQ2XbqcenDwUhwX9m1 5Mo9LmofaXIuCCajersM57es6f5ti2sAAnUf/9N3wBoETwpi3hQt3EZdaIw1QR2zH9cb mXAbAlRLgyvwF69USxjuLcIKzghu6zAvFNCLXeOHDtkOx03tNRHcYBJEFmwUsGS+8ba3 dBKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iCQH/4cG; 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 h89-v6si10182708pld.378.2018.05.28.03.52.52; Mon, 28 May 2018 03:53:07 -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; dkim=pass header.i=@kernel.org header.s=default header.b=iCQH/4cG; 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 S1164008AbeE1Kwe (ORCPT + 99 others); Mon, 28 May 2018 06:52:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:41772 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163542AbeE1Kw2 (ORCPT ); Mon, 28 May 2018 06:52:28 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 81B5020883; Mon, 28 May 2018 10:52:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527504748; bh=4WTnH9qfu3V6/7TlnCjiS9EKd/m8sylJ0BNcECw1ysc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iCQH/4cG4lk6i+4MdGIsOp7Bg/oJxeCVBO0M9zRwVd3FuElj3g10yefzVPo8Cr1Ya xCzPZxIfvdhTczhe9BblY4gIXtXsCb/rc6XCnhC0R9srkRHr3nr7DKq63Dzfw6xzGH D97ztZkB2Ui6hTzREDRAjQs9V5WxBSjFc4ifZPHw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Benjamin Poirier , Sasha Neftin , Aaron Brown , Jeff Kirsher , Sasha Levin Subject: [PATCH 4.14 217/496] e1000e: Fix check_for_link return value with autoneg off Date: Mon, 28 May 2018 12:00:02 +0200 Message-Id: <20180528100329.069837869@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100319.498712256@linuxfoundation.org> References: <20180528100319.498712256@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 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 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Benjamin Poirier [ Upstream commit 4e7dc08e57c95673d2edaba8983c3de4dd1f65f5 ] 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: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- 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 @@ -1602,7 +1602,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