From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AIpwx48LEcxsfgcj4gAO9SZTLoOpW2wV1CFC8kZdudsb0pa52GrRDzdvi+BjHq2IblQwcgk2CgET ARC-Seal: i=1; a=rsa-sha256; t=1522346786; cv=none; d=google.com; s=arc-20160816; b=ZfUTB8fh0gBq9dPyO7eyf8us/umTT++F21hWGzmC7fEiOUYfmfUzIYkqVpE5y3wl0N QWYWuFvZO8WJ5mwgMJMB9ddwI5IXOOKrISpfKWTB3g8X7WQAnUPnJeX0KV5PrfGedQcW lW5+UPVZdrD6kLfQJ2SzwTURczgf0r0uL8Ck6Irj7Aw2mIod+ox7DWoTWOb//hGq8kNT 8UAqX0DDsiaRn1fLCX1vllrSFPpWJB441rM0udMaZy/EH2CTUjR/78O6OvaBOgFmEqNt 5kv3QdCwk/UOd1N7QtRwKOv009OZhpq7ccFhqM8l5PBAnvnz/HdW42+ROt88W3hBpq+o 74wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=458jVModZx/iFI7+puEymbXvTofl6ACNWCiyLRgEsbQ=; b=U3IKb7INAk68IdrtkhsIHvzyMlWN09Pz4mT9ngJfA7hBRQrsSfCk74IesBsdSx9qoE 6xk5+s6s5Krv6CPcPdnnWkQuu4tJVKBd8zoFPNS2XO1eBw+7Q+hPe/iuk0Yte9ADn7K7 JE8ArRVI/ZJTOmSgHuLbtopXPURaRpvJUq/LmQnw88RAAsqPJaSnmXeT6jVhaTgLdBaI w254o+3dmM2xv8g7wj24b39oKNFol2RAr4CVM3Us4HA3ZJvth4O+yyE8ZeeogCekrAPj szQteS7JcI2PRUSjbVvTs3GTB5RUH/0fQx+JL7ujEce9K1eKzoz0vfVVxsjngsPgpG5M IaHw== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.61.202 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.61.202 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Holsety=20Chen=20 ?= , =?UTF-8?q?SZ=20Lin=20 ?= , Schuyler Patton , Grygorii Strashko , "David S. Miller" Subject: [PATCH 4.9 14/28] net: ethernet: ti: cpsw: add check for in-band mode setting with RGMII PHY interface Date: Thu, 29 Mar 2018 20:00:33 +0200 Message-Id: <20180329175735.118000328@linuxfoundation.org> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180329175733.447823703@linuxfoundation.org> References: <20180329175733.447823703@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-LABELS: =?utf-8?b?IlxcU2VudCI=?= X-GMAIL-THRID: =?utf-8?q?1596296104396396575?= X-GMAIL-MSGID: =?utf-8?q?1596296304228408067?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: "SZ Lin (林上智)" [ Upstream commit f9db50691db4a7d860fce985f080bb3fc23a7ede ] According to AM335x TRM[1] 14.3.6.2, AM437x TRM[2] 15.3.6.2 and DRA7 TRM[3] 24.11.4.8.7.3.3, in-band mode in EXT_EN(bit18) register is only available when PHY is configured in RGMII mode with 10Mbps speed. It will cause some networking issues without RGMII mode, such as carrier sense errors and low throughput. TI also mentioned this issue in their forum[4]. This patch adds the check mechanism for PHY interface with RGMII interface type, the in-band mode can only be set in RGMII mode with 10Mbps speed. References: [1]: https://www.ti.com/lit/ug/spruh73p/spruh73p.pdf [2]: http://www.ti.com/lit/ug/spruhl7h/spruhl7h.pdf [3]: http://www.ti.com/lit/ug/spruic2b/spruic2b.pdf [4]: https://e2e.ti.com/support/arm/sitara_arm/f/791/p/640765/2392155 Suggested-by: Holsety Chen (陳憲輝) Signed-off-by: SZ Lin (林上智) Signed-off-by: Schuyler Patton Reviewed-by: Grygorii Strashko Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/ti/cpsw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -901,7 +901,8 @@ static void _cpsw_adjust_link(struct cps /* set speed_in input in case RMII mode is used in 100Mbps */ if (phy->speed == 100) mac_control |= BIT(15); - else if (phy->speed == 10) + /* in band mode only works in 10Mbps RGMII mode */ + else if ((phy->speed == 10) && phy_interface_is_rgmii(phy)) mac_control |= BIT(18); /* In Band mode */ if (priv->rx_pause)