From patchwork Tue Jun 23 19:51:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 223058 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.0 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 03A14C433E0 for ; Tue, 23 Jun 2020 21:42:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C5F942078A for ; Tue, 23 Jun 2020 21:42:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592948539; bh=zEPhArf7Bibyzv1Cx7hX5ix69EQLDU8ENiyIWeeyXtM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=kuzryuPdPnQm4mYt3gSY4v67pJ4OVvVYvHMRhYzGPB5FdcqKfH7XqJeuT7rnVuW/7 lv7CDIWjF8Cdw+IGXSwGqdqRSut8GaZFkvcqsrnx16fDcS2wxwJKKFkoe5358vHQCn omDLorOYUPTrD9WIpyY6hxMMjSTUTrpOIo42HPSc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387763AbgFWUE6 (ORCPT ); Tue, 23 Jun 2020 16:04:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:43914 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388268AbgFWUE5 (ORCPT ); Tue, 23 Jun 2020 16:04:57 -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 94EF520DD4; Tue, 23 Jun 2020 20:04:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592942696; bh=zEPhArf7Bibyzv1Cx7hX5ix69EQLDU8ENiyIWeeyXtM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i5O8fYUgRgB4ox+f53H7sfN4KcAgcEgyNRWxlcuJjekehN6g42KuKo8X36HZ+fsc3 JwXVWyQtDamb5/dcISGdQP4kn0z+cQSBh2vhGv67m4O7BFiDOUL0/IQEeugUeoVRKZ 78Us77r7OVBBtxVIoedvRz9sp7zNGbsqkWS211Jg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Martin Blumenstingl , Hauke Mehrtens , "David S. Miller" , Sasha Levin Subject: [PATCH 5.7 098/477] net: dsa: lantiq_gswip: fix and improve the unsupported interface error Date: Tue, 23 Jun 2020 21:51:35 +0200 Message-Id: <20200623195412.234492730@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200623195407.572062007@linuxfoundation.org> References: <20200623195407.572062007@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Martin Blumenstingl [ Upstream commit 4d3da2d8d91f66988a829a18a0ce59945e8ae4fb ] While trying to use the lantiq_gswip driver on one of my boards I made a mistake when specifying the phy-mode (because the out-of-tree driver wants phy-mode "gmii" or "mii" for the internal PHYs). In this case the following error is printed multiple times: Unsupported interface: 3 While it gives at least a hint at what may be wrong it is not very user friendly. Print the human readable phy-mode and also which port is configured incorrectly (this hardware supports ports 0..6) to improve the cases where someone made a mistake. Fixes: 14fceff4771e51 ("net: dsa: Add Lantiq / Intel DSA driver for vrx200") Signed-off-by: Martin Blumenstingl Acked-by: Hauke Mehrtens Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/dsa/lantiq_gswip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c index cf6fa8fede334..521ebc072903b 100644 --- a/drivers/net/dsa/lantiq_gswip.c +++ b/drivers/net/dsa/lantiq_gswip.c @@ -1452,7 +1452,8 @@ static void gswip_phylink_validate(struct dsa_switch *ds, int port, unsupported: bitmap_zero(supported, __ETHTOOL_LINK_MODE_MASK_NBITS); - dev_err(ds->dev, "Unsupported interface: %d\n", state->interface); + dev_err(ds->dev, "Unsupported interface '%s' for port %d\n", + phy_modes(state->interface), port); return; }