From patchwork Mon Jun 26 08:01:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 106316 Delivered-To: patch@linaro.org Received: by 10.140.101.48 with SMTP id t45csp103232qge; Mon, 26 Jun 2017 01:02:00 -0700 (PDT) X-Received: by 10.101.88.13 with SMTP id g13mr20043131pgr.180.1498464120750; Mon, 26 Jun 2017 01:02:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498464120; cv=none; d=google.com; s=arc-20160816; b=yKtoHKs2kwNtgB+RG26oGFprqimEuvS4PFZmMxclix+R++QsBa+PVOxuMzs8n+jpsC cNSlP3fhY5Ar7hnjSt3Ribk/S1Z++VUL87dwC31aiErYZtku3BtSAezRL1LE18YdTXUT ECkVkfUobiT+smsgRTn2Bmk5PRIMfyQJA7eBeGl54rqLYUTpkhJYRWAdBXmH4HPk8hxS gwq37DhNZm0v0rbXQd3ZBnax3DAStbnwvlkEaxboqCruN7yXB4/ocrQhQSiGb5cCE8Wc Qt/xxL9hDA8XMz6DB5rCAIqSBL8ne5ihSHORYie9iraYnlP9evMNQ5UX4jqRlxO2xSmP PbPQ== 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=5PIAAvqHSmNOvesCESAH3YIh5T/ueYUywOa+EHgnm54=; b=e1Vl0xdAXGw6QN9IFh5ofCzFwW1WwVuaOh46Ju+ri3OadHKk9Clhx2Fe2ap4FaMjKX xwEE6BSLyErhMhFevYWII+bEVEncehkFFWinxWz7S5NadomDfpN3L4xqB4hz+Ntrt/fT 8kQUnFh3+cob54zgVBjrFxI017A9257Fm+Xzg4c5cA7vSYFO69LIy507oeBGFSDHlH7s yTZvhe545tnSsql2C3CpPgPzrejFY0QKyCix4LmfaAlzhkDT+UO8xizKLj+W8aOH/SdI izjJ0Hpd/Qxo24YQt/eUUO1BbZoZPx6g0DJ/N93nmlQr8FkfHlAyYx27LDRwrhZQDhRv mfKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=guUgv93c; 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 102si8959663pld.125.2017.06.26.01.02.00; Mon, 26 Jun 2017 01:02:00 -0700 (PDT) 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.b=guUgv93c; 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 S1751406AbdFZICA (ORCPT + 6 others); Mon, 26 Jun 2017 04:02:00 -0400 Received: from mail-pf0-f182.google.com ([209.85.192.182]:34777 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751353AbdFZIB7 (ORCPT ); Mon, 26 Jun 2017 04:01:59 -0400 Received: by mail-pf0-f182.google.com with SMTP id s66so51370913pfs.1 for ; Mon, 26 Jun 2017 01:01:59 -0700 (PDT) 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=5PIAAvqHSmNOvesCESAH3YIh5T/ueYUywOa+EHgnm54=; b=guUgv93cV9zyMtwSBeA8HvC/bwW+fRvjibaJHzW8Wd6MI4bjNLPjQR5mXDiJqfEOa6 /EAgxU4WJvu1HO/uZTfUYZ9AnO4yG63So3tZ2St96cFAHIuVg11fSxTHaXYbI91xGSUk LHQp+sxUWdZr+xqM0c44exgvCtPEsDhXHSaBs= 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=5PIAAvqHSmNOvesCESAH3YIh5T/ueYUywOa+EHgnm54=; b=k4ZtcWQaeN4YUT2P+d+VPrfzIVieBmejzrj2eFbwl1iSHi8ijHKArbp0QPXPL6NARZ ypx/TlnKxkQujhL6vaCqHc35T8ssq/EU2RIaBzEt/p5ZnLA/agr9P7fYXf8gv0WtKE2e G+XHRHhmEYpoynfGzwZv0+hlLO/ABw7mU4bQc+1MYPpntNIPWP59o4GPi6dLQqlC9o/E X8fbfYRRWIRKVr9OVsYsqgwbBi54hTyRTuAYyY8NaPbDcg6lpbl2aWFOPnGiGeNS+lKy 5vgCwSV650eA4fM3zDLLjYwaD4UgqAoRHK43erAg9MeBc8zpNW1FN4+KWwwmCgisSYf8 Prnw== X-Gm-Message-State: AKS2vOxvmYblD7ZbaVAirOgemEkbRQLh8YUe30dpY2bMGS669LUIxzoA H171jlPM7884XqCk X-Received: by 10.99.125.25 with SMTP id y25mr20403159pgc.38.1498464117823; Mon, 26 Jun 2017 01:01:57 -0700 (PDT) Received: from localhost.localdomain ([106.51.139.251]) by smtp.gmail.com with ESMTPSA id 67sm23673640pfa.83.2017.06.26.01.01.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 26 Jun 2017 01:01:56 -0700 (PDT) From: Amit Pundir To: Greg KH Cc: Stable , Russell King , "David S . Miller" Subject: [PATCH for-4.9 7/7] net: phy: fix marvell phy status reading Date: Mon, 26 Jun 2017 13:31:31 +0530 Message-Id: <1498464091-26753-8-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498464091-26753-1-git-send-email-amit.pundir@linaro.org> References: <1498464091-26753-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: Russell King commit 898805e0cdf7fd860ec21bf661d3a0285a3defbd upstream. The Marvell driver incorrectly provides phydev->lp_advertising as the logical and of the link partner's advert and our advert. This is incorrect - this field is supposed to store the link parter's unmodified advertisment. This allows ethtool to report the correct link partner auto-negotiation status. Fixes: be937f1f89ca ("Marvell PHY m88e1111 driver fix") Signed-off-by: Russell King Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller Signed-off-by: Amit Pundir --- drivers/net/phy/marvell.c | 2 -- 1 file changed, 2 deletions(-) -- 2.7.4 diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index d6a541bde331..2f70f80de27f 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -1114,8 +1114,6 @@ static int marvell_read_status_page(struct phy_device *phydev, int page) if (adv < 0) return adv; - lpa &= adv; - if (status & MII_M1011_PHY_STATUS_FULLDUPLEX) phydev->duplex = DUPLEX_FULL; else