Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp174913imd; Wed, 31 Oct 2018 16:49:52 -0700 (PDT) X-Google-Smtp-Source: AJdET5e6PeqjWgaP/7r0FRxxlh5a7bJUscizP/c76gEpV1ccerr5tz0n+BLCPlX0fdeR/Q4oxtLS X-Received: by 2002:a63:d34f:: with SMTP id u15-v6mr5026517pgi.325.1541029792772; Wed, 31 Oct 2018 16:49:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541029792; cv=none; d=google.com; s=arc-20160816; b=AuTNoRzDu7glYHVOQO+x4Dq2vVbfds0bziTu01L2H3eP1Zgc+0fOj1jIU7QUTmbGd/ e4QGCoDFkhyjZw0n91+vU7lQjtGsJx/qIw2C7rHaCpYACeN9trOuDn5O2IRIgOxeN4pY XXdHyvIJLLGT5CSx0hD/Qa2PjTVNdkgLtjBUxixrEuKyNHMAL1zy4icCb7VXiw5CE+py KBEzEsRkJbsYO8ZaojHk5APhHYJDij3vUw2MODrgvIw7jWAyaU8T3QlVEtWUEXferj47 eePp3Rz0wsSZcMq0gPWqk3PnmIrEjPwD1SYCDNjnyO+imGBnqcFwTLPegivwJ0DtnLz2 vgSQ== 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; bh=XpLBbyLCPzsZEhkhiVAc2t5E58PJ7aNtK4zuUYuNap0=; b=wMXovVhisBi8IxtFOGFf3Hps/dG5/ZGagDmdmBy1pQQbTx4a/DGMGTaaQlrCj/1YLm yB7XD8ZUJsI9/+Uy0ZroE5xV2rEdN9klm1bBJGlLm0gzizcIiOzVhS5+tcgKik8Avg6W xgsk0c0UiSkQSd3LivtZmWmn4viqlTbEzv6+w1Vzj9sygNw+U4Dw0PkrQRpij36EPvdM aSkK6B7qIN3Jx9Lmteb6AFRJ+lcXrinp9OjRHrbtmpo9jay5n64bTi2+porpWs6fk2Lo +NVYbflLCOpEaTTRhJeo/0+pjsbrxH5hI44H/32HU/2XKxKQjryOGxZoWd1co0bZYF1t Iv4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pj0vioSv; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m7-v6si27635001pls.358.2018.10.31.16.49.38; Wed, 31 Oct 2018 16:49:52 -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=pj0vioSv; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728505AbeKAIHA (ORCPT + 99 others); Thu, 1 Nov 2018 04:07:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:54358 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728478AbeKAIG7 (ORCPT ); Thu, 1 Nov 2018 04:06:59 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6516820830; Wed, 31 Oct 2018 23:06:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541027209; bh=pn1eozHMEtFk1PH+V8gCs57KdFntLUYYwiaU5ci4Hqw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pj0vioSvhU3tVIDVzWCE5JcMjBjpKs1oBt5zHx4DegD7bql5Ho81Kfx8AFzLNbFye JZx6dKZuBUXDJzfachipHegnqV+ZLiOAWO+7nW16yFQ8AuuhHydFF6k0mJaEUIOFCk /Yase+WE9H8g4ykuqZeuwsZ1pHyFNDZVumMa6zHk= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andrew Lunn , "David S . Miller" , Sasha Levin Subject: [PATCH AUTOSEL 4.19 072/146] net: dsa: mv88e6xxx: Fix writing to a PHY page. Date: Wed, 31 Oct 2018 19:04:27 -0400 Message-Id: <20181031230541.28822-72-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181031230541.28822-1-sashal@kernel.org> References: <20181031230541.28822-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andrew Lunn [ Upstream commit c309b158090d788e96ee597444965cb79b040484 ] After changing to the needed page, actually write the value to the register! Fixes: 09cb7dfd3f14 ("net: dsa: mv88e6xxx: describe PHY page and SerDes") Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/dsa/mv88e6xxx/phy.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/dsa/mv88e6xxx/phy.c b/drivers/net/dsa/mv88e6xxx/phy.c index 46af8052e535..152a65d46e0b 100644 --- a/drivers/net/dsa/mv88e6xxx/phy.c +++ b/drivers/net/dsa/mv88e6xxx/phy.c @@ -110,6 +110,9 @@ int mv88e6xxx_phy_page_write(struct mv88e6xxx_chip *chip, int phy, err = mv88e6xxx_phy_page_get(chip, phy, page); if (!err) { err = mv88e6xxx_phy_write(chip, phy, MV88E6XXX_PHY_PAGE, page); + if (!err) + err = mv88e6xxx_phy_write(chip, phy, reg, val); + mv88e6xxx_phy_page_put(chip, phy); } -- 2.17.1