From patchwork Mon Nov 27 12:53:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 119699 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp240734qgn; Mon, 27 Nov 2017 05:08:03 -0800 (PST) X-Google-Smtp-Source: AGs4zMaqSZ/cuCRc1FJZZtimCMtKV9FuWNncVaffcmx8Xra8+UyE1CVLNf6UwjEZNSPW2ojjDurD X-Received: by 10.98.82.3 with SMTP id g3mr37003847pfb.189.1511788083587; Mon, 27 Nov 2017 05:08:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511788083; cv=none; d=google.com; s=arc-20160816; b=tZW5zZZuqn3ADIprVFeB8vOX75NAauRR8HOzIJ94b0ek1D56HtIHoRlTfzt2tV1GGQ 4c28gtG/8WC40pTZNpS0lzSlMK90C1c07/Gr/vbOl8W0+650CV/fA2Xht0u/4EulT8R+ YxedwvxbZAwbnnAHeYemrYF8E+Ofbp2coW+ZORIXaxG/EflVNlU97mvlhknMWOJOWjd3 LYTMRg/ABJ6Wm4Q5tLYPRYX562EmD792C03Dsq0OCVFvwSHrHsJM912nDYDTB3139F84 bEC/rpe6jmUQ5apaGEk9x8uICO5GtuXKmWxgVmeAeLLldqdX+1gZNdbWLw40A62LjG0c EBmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=MoYneZZK/xEg0zwwaqpKopAccKI2ZORma5krOQc8C8k=; b=VRTQa6AKH+NE5BKkB8+itvdyEhSZV088/XvMWkkqhueZVmPymDcizgr538BbEqKuQh vBGgH6klcH+iioghbevbVFdsGH5mpf8L7CKtKCkTmTQwg2Y2hWA/sHgG1sJWjPC5cWvE eigiBfsQgQlOQSomk4Qz8QSuTQKyG5772Yq3ZFkuHewm/ZHBMyVNUFA+Q1t1toMTF6Yn 5wPKW6EUIl9AIMJ4KVOiFcCJ6K51dMWd8GTi56X2ybLnxpavIgVz46YIkyrWBRKUIDXW LOubjVqE8Eo67fjGg9LXwx7QRF3jTbqmMXqzyeFo6JxVYeO8NItM3ZB/NzMh6g1dA71m v6ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XGE2Goqz; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j21si23013162pga.622.2017.11.27.05.08.03; Mon, 27 Nov 2017 05:08:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=@linaro.org header.s=google header.b=XGE2Goqz; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752325AbdK0NIA (ORCPT + 9 others); Mon, 27 Nov 2017 08:08:00 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:45532 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752165AbdK0Mxt (ORCPT ); Mon, 27 Nov 2017 07:53:49 -0500 Received: by mail-pg0-f66.google.com with SMTP id 207so18639746pgc.12 for ; Mon, 27 Nov 2017 04:53:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MoYneZZK/xEg0zwwaqpKopAccKI2ZORma5krOQc8C8k=; b=XGE2GoqzrEGwBzywMuAJ+7GFr4scHVIr/XsfepGO5eIcC8SxCfbekc0f7kAfbHtg5n ztw2cXIVAcvaYJKLnegcPZ9SCdaBerKy2uqpM9YFwm5Xy4v8xbGgX9qdjyswqBsTSt2y 4JzcAoD2y/oa4uRKc2qnJiXCAkaxIOPrNiHoQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MoYneZZK/xEg0zwwaqpKopAccKI2ZORma5krOQc8C8k=; b=RYrrTzem9oQLEp7LjSeioFJrUWCkLdPTjmFrc+GhawNVHIVWE0WK3BM6D9Zbt23+Ny /fmlNkLsphfQUHL1FFSrItp6Z5JFZaYW9uWuzUKzZiCYXfYlOMf71rmfDTMZB79h63yF 3VhVKDI210k1rQgXPWeVM1TQJYDIco/VGWhUNu4V078LyNuXRMqPiwGHTxu+GXsYrDQn dk+NTM7Wqzqm33V9PU5WEZGW5INmnZlNeYVXbOO8fvCh5BOdKP5aa4cimPS4YjFdRTUo hQ2i6RBCOEuOQ1x0K5IOpfvgRXyxj9ga/ibA3rY5iVCg33kAArT8hPKws+E/NmBeIeyW TioA== X-Gm-Message-State: AJaThX4GaB6QFesBB21DkVC+otKlofTmHPOOLVztlPfjKqXWBPV7ewtf GezwujUDEx2sLMjp5xA9+0Hfcw== X-Received: by 10.98.30.198 with SMTP id e189mr22491523pfe.232.1511787228520; Mon, 27 Nov 2017 04:53:48 -0800 (PST) Received: from localhost.localdomain ([106.51.17.194]) by smtp.gmail.com with ESMTPSA id i187sm51792658pfc.96.2017.11.27.04.53.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Nov 2017 04:53:47 -0800 (PST) From: Amit Pundir To: Greg KH Cc: Benjamin Poirier , Sasha Neftin , Stable , Jeff Kirsher Subject: [PATCH for-4.14.y 2/5] e1000e: Fix return value test Date: Mon, 27 Nov 2017 18:23:34 +0530 Message-Id: <1511787217-10987-3-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511787217-10987-1-git-send-email-amit.pundir@linaro.org> References: <1511787217-10987-1-git-send-email-amit.pundir@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Benjamin Poirier commit d3509f8bc7b0560044c15f0e3ecfde1d9af757a6 upstream. All the helpers return -E1000_ERR_PHY. Signed-off-by: Benjamin Poirier Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher Signed-off-by: Amit Pundir --- drivers/net/ethernet/intel/e1000e/netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index 327dfe5bedc0..764a6bd958ac 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -5099,7 +5099,7 @@ static bool e1000e_has_link(struct e1000_adapter *adapter) break; } - if ((ret_val == E1000_ERR_PHY) && (hw->phy.type == e1000_phy_igp_3) && + if ((ret_val == -E1000_ERR_PHY) && (hw->phy.type == e1000_phy_igp_3) && (er32(CTRL) & E1000_PHY_CTRL_GBE_DISABLE)) { /* See e1000_kmrn_lock_loss_workaround_ich8lan() */ e_info("Gigabit has been disabled, downgrading speed\n");