Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp496354yba; Mon, 1 Apr 2019 10:27:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqxMUGTcWxnD56J88DYJqf0hhlL3HaWwHyXWZqSZg8H/MbKuE5sTAGdR7caiEOWH70e6+NwJ X-Received: by 2002:a62:4553:: with SMTP id s80mr62990448pfa.141.1554139677444; Mon, 01 Apr 2019 10:27:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554139677; cv=none; d=google.com; s=arc-20160816; b=nTEJOguL7X+Vj859OEzoY2pVjfBr/HEf1Dd7Fr+iP9Qs5F0G7hSEG/wqHdNTwxBiBW 6mPoUlXk53LGLu5eK53Xoghtd1Gs+D0OqCWAgMiKnYT43wtb7Y791rje6yZ20pq/jSYx Msh3SWsReEPi5Vnmpe1PHcTYLMnkzaFABCdb3foK3g21ogHno6SYN1XnBV1xaHwVrwRA nqZeqwtlHjN9D7BTrWxbRgnfabCx4cMin6AbAoE+pGH8+KdjSh0pl4XMqKqPK7YRAqBN Z+yWKFq0BwEVW9QrLgvyIGJV4VWDHJ5qRL/YkqUzCimIUCMo6Z+1r2lSOfxF+UZ0KBnd qu2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=KTeJBjG8j3w3d5dUktCcfePtIfHkbXV9GMiE1i0RsKE=; b=nBaZZrIDqndDjJoT24Q8OF7JY5aIyVjyaKisKNrRAJzIYIkJjlzGqdVhQfHPdcnJl8 qK4g+2xkL/PYn/pcGud4zEKkCFq8GdWyhAofYXlAt/RcwkHWaMKkRNmAVqsSW7KLeHRD 7FtJWDqbf0xXfb/PrKHzXVRkhVyYeXAbLJadcJ0OXUPcUO4dI8taT+uulV7v0Vdz+jUk RLK+TtjYHQqOPUJdKhZb2uuU0KamKg1ufEq7kSarTPbHul94yY1q/FPNuvVlIlBgn42Q VoxhstMhZ3eYiUW4ztjYu6aQ7LM3tauWnauI+7q9EMr0QKWAzLIhXVFnnkYV6gpmRfMr fqsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lwBDqdLc; 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 q61si9625411plb.252.2019.04.01.10.27.42; Mon, 01 Apr 2019 10:27:57 -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=lwBDqdLc; 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 S1732633AbfDAR1G (ORCPT + 99 others); Mon, 1 Apr 2019 13:27:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:59646 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732188AbfDAR1F (ORCPT ); Mon, 1 Apr 2019 13:27:05 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 F364920880; Mon, 1 Apr 2019 17:27:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554139624; bh=ZuXFjDiDUUsk1csMJDpKUhEwPxLeFkeoo0FEcOmDSpE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lwBDqdLcQetyKANh16dlDt7teG87xE46rTCdbHtPG73W0wrFcE3EDU34GhIcKNFxY NQDOhoyGrhHIAspZqwHTAuSppeKyiKW4F17w82Zv4gW8suM1X1aFoi5vx7VH5+2qj9 KWdYmSjUZ+Zf1WW6qefNLWW3bYlsv3W9PhcJft+Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christian Lamparter , "David S. Miller" Subject: [PATCH 4.9 22/56] net: dsa: qca8k: remove leftover phy accessors Date: Mon, 1 Apr 2019 19:02:38 +0200 Message-Id: <20190401170105.204171413@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190401170103.398401360@linuxfoundation.org> References: <20190401170103.398401360@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Christian Lamparter commit 1eec7151ae0e134bd42e3f128066b2ff8da21393 upstream. This belated patch implements Andrew Lunn's request of "remove the phy_read() and phy_write() functions." While seemingly harmless, this causes the switch's user port PHYs to get registered twice. This is because the DSA subsystem will create a slave mdio-bus not knowing that the qca8k_phy_(read|write) accessors operate on the external mdio-bus. So the same "bus" gets effectively duplicated. Cc: stable@vger.kernel.org Fixes: 6b93fb46480a ("net-next: dsa: add new driver for qca8xxx family") Signed-off-by: Christian Lamparter Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/dsa/qca8k.c | 18 ------------------ 1 file changed, 18 deletions(-) --- a/drivers/net/dsa/qca8k.c +++ b/drivers/net/dsa/qca8k.c @@ -630,22 +630,6 @@ qca8k_adjust_link(struct dsa_switch *ds, qca8k_port_set_status(priv, port, 1); } -static int -qca8k_phy_read(struct dsa_switch *ds, int phy, int regnum) -{ - struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv; - - return mdiobus_read(priv->bus, phy, regnum); -} - -static int -qca8k_phy_write(struct dsa_switch *ds, int phy, int regnum, u16 val) -{ - struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv; - - return mdiobus_write(priv->bus, phy, regnum, val); -} - static void qca8k_get_strings(struct dsa_switch *ds, int port, uint8_t *data) { @@ -961,8 +945,6 @@ static struct dsa_switch_ops qca8k_switc .setup = qca8k_setup, .adjust_link = qca8k_adjust_link, .get_strings = qca8k_get_strings, - .phy_read = qca8k_phy_read, - .phy_write = qca8k_phy_write, .get_ethtool_stats = qca8k_get_ethtool_stats, .get_sset_count = qca8k_get_sset_count, .get_eee = qca8k_get_eee,