From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Walleij Subject: [PATCH net-next 2/5] net: gemini: Improve connection prints Date: Sat, 30 Jun 2018 18:18:03 +0200 Message-ID: <20180630161806.24312-2-linus.walleij@linaro.org> References: <20180630161806.24312-1-linus.walleij@linaro.org> Cc: Janos Laube , Paulius Zaleckas , linux-arm-kernel@lists.infradead.org, Hans Ulli Kroll , Florian Fainelli , Linus Walleij To: netdev@vger.kernel.org, "David S . Miller" , =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= Return-path: Received: from mail-lf0-f66.google.com ([209.85.215.66]:43655 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751246AbeF3QUc (ORCPT ); Sat, 30 Jun 2018 12:20:32 -0400 Received: by mail-lf0-f66.google.com with SMTP id m12-v6so8372972lfc.10 for ; Sat, 30 Jun 2018 09:20:31 -0700 (PDT) In-Reply-To: <20180630161806.24312-1-linus.walleij@linaro.org> Sender: netdev-owner@vger.kernel.org List-ID: Instead of just specify that a PHY is connected at some speed, also specify which one. This is helpful with several PHYs on the system. Signed-off-by: Linus Walleij --- drivers/net/ethernet/cortina/gemini.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/cortina/gemini.c b/drivers/net/ethernet/cortina/gemini.c index 8fc31723f700..b49ed8964026 100644 --- a/drivers/net/ethernet/cortina/gemini.c +++ b/drivers/net/ethernet/cortina/gemini.c @@ -300,23 +300,26 @@ static void gmac_speed_set(struct net_device *netdev) status.bits.speed = GMAC_SPEED_1000; if (phydev->interface == PHY_INTERFACE_MODE_RGMII) status.bits.mii_rmii = GMAC_PHY_RGMII_1000; - netdev_info(netdev, "connect to RGMII @ 1Gbit\n"); + netdev_info(netdev, "connect %s to RGMII @ 1Gbit\n", + phydev_name(phydev)); break; case 100: status.bits.speed = GMAC_SPEED_100; if (phydev->interface == PHY_INTERFACE_MODE_RGMII) status.bits.mii_rmii = GMAC_PHY_RGMII_100_10; - netdev_info(netdev, "connect to RGMII @ 100 Mbit\n"); + netdev_info(netdev, "connect %s to RGMII @ 100 Mbit\n", + phydev_name(phydev)); break; case 10: status.bits.speed = GMAC_SPEED_10; if (phydev->interface == PHY_INTERFACE_MODE_RGMII) status.bits.mii_rmii = GMAC_PHY_RGMII_100_10; - netdev_info(netdev, "connect to RGMII @ 10 Mbit\n"); + netdev_info(netdev, "connect %s to RGMII @ 10 Mbit\n", + phydev_name(phydev)); break; default: - netdev_warn(netdev, "Not supported PHY speed (%d)\n", - phydev->speed); + netdev_warn(netdev, "Unsupported PHY speed (%d) on %s\n", + phydev->speed, phydev_name(phydev)); } if (phydev->duplex == DUPLEX_FULL) { -- 2.17.1