From patchwork Sat Sep 5 14:03:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Barker X-Patchwork-Id: 261475 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=-10.3 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, UNWANTED_LANGUAGE_BODY,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 3B014C433E2 for ; Sat, 5 Sep 2020 14:04:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F0E392072D for ; Sat, 5 Sep 2020 14:04:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=konsulko.com header.i=@konsulko.com header.b="rKKa95lT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728580AbgIEOER (ORCPT ); Sat, 5 Sep 2020 10:04:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728248AbgIEODk (ORCPT ); Sat, 5 Sep 2020 10:03:40 -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 45911C061246 for ; Sat, 5 Sep 2020 07:03:40 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id q9so9268711wmj.2 for ; Sat, 05 Sep 2020 07:03:40 -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=4w7lhVa/MMPsgT7b8Dk5gygQuJ2oI28kmOPvPbKnNtQ=; b=rKKa95lTC/NwFSilHI5K806RdAZ1nCITObAY5H6oTNuWplGZx/UZZNik1ItluQBR7j VzdTOHhAgFMqbxSFP1g7tcoT+qdVMxaIsumTx4SKgSEzjx8obeRE55Og5ewC992PiqV/ +9e2uzmoo4NIzCU6gAbmhl9TT4h9LAcXMhpJ0= 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=4w7lhVa/MMPsgT7b8Dk5gygQuJ2oI28kmOPvPbKnNtQ=; b=KoZon0rfSsfgr9Et1PjgJldPrhPoAU1oB8nRqVcrk5VkOT6URyNAprkr5o/bHR5Tiu MOwWgmN5jSKRY6RcyvHXxZeYWWpxMyPfmE5R3SVthgaNtZ5TYk0Lb43PKUSGfxPyG8As jRl/q4/23e1EpRyM5QKNpvy84C04xhLDl8HX6z7G/8EQerqeE22EjSQ0Lx+GEsNRqH9M xrDeA6wdmvneq5NpW9H8aOMjvakzGJuNHlvCupOWTYwIkV+IHUSSdyQNzsYBRyACYr7q hou0eP2/ThMj0u8M+gMVVUZQEX2kR/6MyL5YHZzBkE/wD91t9seL8HfxpuDai+W6QH+C sphw== X-Gm-Message-State: AOAM531u0lS/019g3Kc5+bfOeY/TpAqljtQzaB16bbeE6AD+g+pVIvvA JE1OKRcrDOBC48b/A3UNDfXtzQ== X-Google-Smtp-Source: ABdhPJw+AGxdclglSjnRVVYZt9ow7mnE7/5Pnzcz+8M9/W6ga0toIESbMCUri8//unEWRXNS0LVGrw== X-Received: by 2002:a1c:408a:: with SMTP id n132mr11692019wma.45.1599314618546; Sat, 05 Sep 2020 07:03:38 -0700 (PDT) Received: from ar2.home.b5net.uk ([213.48.11.149]) by smtp.gmail.com with ESMTPSA id b2sm17390369wmh.47.2020.09.05.07.03.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Sep 2020 07:03:38 -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 2/4] net: dsa: microchip: Add debug print for XMII port mode Date: Sat, 5 Sep 2020 15:03:23 +0100 Message-Id: <20200905140325.108846-3-pbarker@konsulko.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200905140325.108846-1-pbarker@konsulko.com> References: <20200905140325.108846-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 When debug is enabled for this driver, this allows users to confirm that the correct port mode is in use. Signed-off-by: Paul Barker --- drivers/net/dsa/microchip/ksz9477.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/dsa/microchip/ksz9477.c b/drivers/net/dsa/microchip/ksz9477.c index a48f5edab561..3e36aa628c9f 100644 --- a/drivers/net/dsa/microchip/ksz9477.c +++ b/drivers/net/dsa/microchip/ksz9477.c @@ -1211,21 +1211,25 @@ static void ksz9477_port_setup(struct ksz_device *dev, int port, bool cpu_port) ksz_pread8(dev, port, REG_PORT_XMII_CTRL_1, &data8); switch (dev->interface) { case PHY_INTERFACE_MODE_MII: + dev_dbg(dev->dev, "Port%d: MII mode\n", port); ksz9477_set_xmii(dev, 0, &data8); ksz9477_set_gbit(dev, false, &data8); p->phydev.speed = SPEED_100; break; case PHY_INTERFACE_MODE_RMII: + dev_dbg(dev->dev, "Port%d: RMII mode\n", port); ksz9477_set_xmii(dev, 1, &data8); ksz9477_set_gbit(dev, false, &data8); p->phydev.speed = SPEED_100; break; case PHY_INTERFACE_MODE_GMII: + dev_dbg(dev->dev, "Port%d: GMII mode\n", port); ksz9477_set_xmii(dev, 2, &data8); ksz9477_set_gbit(dev, true, &data8); p->phydev.speed = SPEED_1000; break; default: + dev_dbg(dev->dev, "Port%d: RGMII mode\n", port); ksz9477_set_xmii(dev, 3, &data8); ksz9477_set_gbit(dev, true, &data8); data8 &= ~PORT_RGMII_ID_IG_ENABLE;