From patchwork Tue Jun 23 19:54:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 223199 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 5C2E2C433DF for ; Tue, 23 Jun 2020 21:20:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 296712070E for ; Tue, 23 Jun 2020 21:20:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592947200; bh=7jOIZZUblMJrgVmQcUKFWYKtW7WTO++BGTCorcYKPMM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=frfyUw6REZJwV/RK/i9gZMzt8jGTg45ZFxOtNiZDCuQtkBqgr/fJR/0/VHjOTaSzt NjYO1UW3thk/RLuqZcuoJW+bK3DLIAPbzxP2G0NnNFxpmPg8gkA/4s4RSn/wDVeP4C ze8DcDRQsT/WFv/i/tkY1n2D1EX13ErVz6Bvo+/k= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389706AbgFWUYJ (ORCPT ); Tue, 23 Jun 2020 16:24:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:42512 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390382AbgFWUYI (ORCPT ); Tue, 23 Jun 2020 16:24:08 -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 4B28E2070E; Tue, 23 Jun 2020 20:24:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592943847; bh=7jOIZZUblMJrgVmQcUKFWYKtW7WTO++BGTCorcYKPMM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1RghiQoP8D2KV/NdfzYq/HgkOu8CuHXj7XVInwlnvn0glKzYmu1eUiX0LjNFHQ3NS 3t0yFoiivm3xiGD90GHSh5avZAFIKXC86MHVEtej/kpNVMPT24rZzEqY4HiK1Sg0QO GlhAQOsW4i0Urd+lbPh/VVexaeU1vu9jozVuDw1M= 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.4 075/314] net: dsa: lantiq_gswip: fix and improve the unsupported interface error Date: Tue, 23 Jun 2020 21:54:30 +0200 Message-Id: <20200623195342.426436190@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200623195338.770401005@linuxfoundation.org> References: <20200623195338.770401005@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 a69c9b9878b7d..636966e93517e 100644 --- a/drivers/net/dsa/lantiq_gswip.c +++ b/drivers/net/dsa/lantiq_gswip.c @@ -1451,7 +1451,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; }