From patchwork Mon Sep 7 10:12:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Barker X-Patchwork-Id: 261441 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46FC9C433E2 for ; Mon, 7 Sep 2020 10:12:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 072F421473 for ; Mon, 7 Sep 2020 10:12:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=konsulko.com header.i=@konsulko.com header.b="SNTV8BHa" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728601AbgIGKMo (ORCPT ); Mon, 7 Sep 2020 06:12:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728409AbgIGKMV (ORCPT ); Mon, 7 Sep 2020 06:12:21 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 733C6C061755 for ; Mon, 7 Sep 2020 03:12:21 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id y15so1011272wmi.0 for ; Mon, 07 Sep 2020 03:12:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aIuHXFTT8iNlPReahxS4AxVZc+AV0svGQsmfuvJB638=; b=SNTV8BHaruyvyyhiibjlyWpTha0xScucliRh0jRwUFtVM3zSePtusSkCCUYgh9u6Oh MGZsqBtC7pSaftd4V6pNSJMJZo/767RnEpqeicNPitCD89VR+KzXs5RBBMNCeVsK02xa itVDCRVNDSYd5MBqJ9zPqcb4WI0zsqr6ky3JY= 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:mime-version:content-transfer-encoding; bh=aIuHXFTT8iNlPReahxS4AxVZc+AV0svGQsmfuvJB638=; b=uQIXB852QFeqd9wDDxz7YZr2ftR8hOz1RePZM/d0N2ji8u2REc5Nc50+5RkBZDZqeo b8hIteZRByuN1USxkGKBW6AjOz7j5alFTcCEYic2IOvPhIHkA92qJqVYEJajE2Ig5vAY 4tbwU1b7o5Gfin/2WrouFWufjlOE0mR5gN6j9uP9eKVhS2NO7Hgiqk2nPgmwu+UVD+C7 6cQi6yUcXIEJrqlo+O/Z3Fvolpwvm5y5vM54jmHhsX81imPEuxDrV8M7LOJIvhBnVbK6 oumlgFR7oytJSMdCkp23WX/V1Nq7mIE3wTOLGeu/B3bHmZKXh6la6lj24Yssjxlb+FIN XqbA== X-Gm-Message-State: AOAM531eSb8I0HLziagjHrRSDcIzEf0EcnIYZdttXZJHEhFmbJwZcUqq O24XUqS0aCUaJDKwfmH0WPIDiw== X-Google-Smtp-Source: ABdhPJzrBd06xztwhsQa6CrjESbvkiuY7MO0bb9in6tdBtfv/dcZIuPN3mFHpGLsCcDQ8eTeyjwA0A== X-Received: by 2002:a1c:9883:: with SMTP id a125mr21056219wme.133.1599473540003; Mon, 07 Sep 2020 03:12:20 -0700 (PDT) Received: from ar2.home.b5net.uk ([213.48.11.149]) by smtp.gmail.com with ESMTPSA id i16sm24173748wrq.73.2020.09.07.03.12.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Sep 2020 03:12:19 -0700 (PDT) From: Paul Barker To: Woojung Huh , Microchip Linux Driver Support , Andrew Lunn , Vivien Didelot , Florian Fainelli , "David S . Miller" Cc: Paul Barker , netdev@vger.kernel.org Subject: [PATCH v2 3/4] net: dsa: microchip: Disable RGMII in-band status on KSZ9893 Date: Mon, 7 Sep 2020 11:12:07 +0100 Message-Id: <20200907101208.1223-4-pbarker@konsulko.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200907101208.1223-1-pbarker@konsulko.com> References: <20200907101208.1223-1-pbarker@konsulko.com> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org We can't assume that the link partner supports the in-band status reporting which is enabled by default on the KSZ9893 when using RGMII for the upstream port. Signed-off-by: Paul Barker Reviewed-by: Andrew Lunn --- drivers/net/dsa/microchip/ksz9477.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/dsa/microchip/ksz9477.c b/drivers/net/dsa/microchip/ksz9477.c index 9513af057793..f379ea8242e0 100644 --- a/drivers/net/dsa/microchip/ksz9477.c +++ b/drivers/net/dsa/microchip/ksz9477.c @@ -1235,6 +1235,9 @@ static void ksz9477_port_setup(struct ksz_device *dev, int port, bool cpu_port) if (dev->interface == PHY_INTERFACE_MODE_RGMII_ID || dev->interface == PHY_INTERFACE_MODE_RGMII_TXID) data8 |= PORT_RGMII_ID_EG_ENABLE; + /* On KSZ9893, disable RGMII in-band status support */ + if (dev->features & IS_9893) + data8 &= ~PORT_MII_MAC_MODE; p->phydev.speed = SPEED_1000; break; }