Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2515781imm; Mon, 28 May 2018 09:32:54 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoUToBHFRHHNmnL88jHKqF6DjJpnXTuSvqwclo3Z+5eQTQXriysrsy5CRxA+NSN+CDmKfId X-Received: by 2002:a17:902:8a87:: with SMTP id p7-v6mr14112157plo.278.1527525174787; Mon, 28 May 2018 09:32:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527525174; cv=none; d=google.com; s=arc-20160816; b=GeM/PXKJTbgR41hDrLDIwbzvDM7NR5Dj/OiYZxlXPJm4A6lT8wRHor5u3xJ2hzfDJ9 Dgj8TRs7AFUs2Mx5BV7Ud8wKBxH6lYkYLeJqYxpFhjAcjB4uNONtNKaVS9awqj7YCmUm ri+Biw62d+GWgi7lakPRF7RFNXhExgvtHlHrB42oZmWYfOgmR9Uy1GWa0O/49C9clvEF JwJOZxTUne6pbOj2u0q5B2vMKukuBaOBelt6x+jmhG5PC2ljQDiBFUQP/QoDsvjluDA+ 9SJLWxreKngwzE++uwQMGSmBgLjVWsxb2VbPz527WmdRMTQ6jpArI/t0xTm86tGQOTeK V+mw== 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=+6PcfDow0MV5WYcCs+7DaLIHhhFz65RtdSiWkOxgc1A=; b=PlIDEuUhXnr6hTay4ZMU9Oxgf8DBSAgvoX4J/+wfsJJKAeHXyDL/K/NZCOtBU3cTN8 Xf7P3gGh51DxpOUd4EM/rgg3nfEfRmsg9x/cbkI6Zml3WyVhTXYJPygu3XbESkgTkLG2 24dWSOJdIZ/MQpSiM+I9DiPNRCU/dymoZnk6etdDLn5T3PUEJP/V6iJlxKGqZ2TAmx9K xaCHYSTjC1qkDeIm885fwOUiWDa0l3cft7jsKcHjSAa0HaiGFXs2Lu/Pf2lKf9xl2YT2 uJXxr86Fqn56kjfWv8VttbhZTVUsSvuWlXYDxegPtKwg0R6p9tSTzrGSYEWUB623z6Yu DDJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=B7P5/+IA; 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 g63-v6si1466849pfk.74.2018.05.28.09.32.40; Mon, 28 May 2018 09:32:54 -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=B7P5/+IA; 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 S1425372AbeE1QcM (ORCPT + 99 others); Mon, 28 May 2018 12:32:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:57480 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753342AbeE1KJW (ORCPT ); Mon, 28 May 2018 06:09:22 -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 D3375208AD; Mon, 28 May 2018 10:09:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527502161; bh=leRjD/VDwOyPLyUhr5P9wobpnkZGm+J33b7TlLKMFSw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B7P5/+IA5BW4/Fq7L0EFiFM5P4x6uHN6Hqxc1/d7TKjYZ1iZeiixelF9ESJr9pC5a ryDcX6Op6vU/cuJhfAnHcJK3evYfdda7fdJGigypbEI59EJx2UVDK6qEhGkMJyVo6U 7+bT5ImTOZUOWqv8eJFQOvIrXjeL1T4weHgEDljQ= 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 3.18 085/185] e1000e: Fix check_for_link return value with autoneg off Date: Mon, 28 May 2018 12:02:06 +0200 Message-Id: <20180528100057.825306933@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100050.700971285@linuxfoundation.org> References: <20180528100050.700971285@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 3.18-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 @@ -1441,7 +1441,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