From mboxrd@z Thu Jan 1 00:00:00 1970 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=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 7A8B1C48BE5 for ; Wed, 16 Jun 2021 06:20:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5BAEC613C2 for ; Wed, 16 Jun 2021 06:20:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231358AbhFPGWh (ORCPT ); Wed, 16 Jun 2021 02:22:37 -0400 Received: from esa.microchip.iphmx.com ([68.232.153.233]:36499 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230370AbhFPGWf (ORCPT ); Wed, 16 Jun 2021 02:22:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1623824430; x=1655360430; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=bkOozMexJwsJX12lhLsyLTka4UIj6XIfmvBgGcoA4G0=; b=SyWmyPDHkl1VuVqqv6sKYlNTk18zCeAoHs61rcc2BOriMfcsURHKTJNU a+5shCqLfx0VwheUjvzO5OEOVGKdQjsFuyMDA5DSq0w0LNss13kHVFR/M N5vyV2yK2sXT3z7hqrYWKqUT/McROBoKdUiMNIMKozX9i/4+yLxnAkZqr k8pNn1WRFJesEGZwJM+gAxDb5NlBjQMYaH8XfCkgzifG35OE1txfBqrZm oaDRpiZxhXzlMWbSnrVqG0N4sJGAxikOj3tom0AQwbLVGjINEKS+ZlH8F 83M6ncu7SmEpJo9mzX7Ze9p3jzVO2/GOWVzjOlihUgytmNV093vSgf7eK Q==; IronPort-SDR: 3AaM3vcf/OLT7vd2fBPALrBHvTvCPeLOIAMXvNRt2MWGp8Gk9KY1uo9wpI07yqytdzW+ZKnRCh hVW/QqXSH4k23Op/dbpFOiNTyGm30OaRizJeSq+NZoV3WsZAO7KuKL1IS6Yv8coJxbYUIZYw84 YTNI6wxx7p5CchkPmEdD4nsZWk/fcV0PqB6NQMJGlkvNowUqrpitU0HB+R9L3/lEa2LuiqoFQf 8A28LZOUG1KahNna09J08iA6DavE0f2nHjM+NvVzJXvGebj0PhDpg5LQ7QoHSKg4yv1WDatf28 2+Q= X-IronPort-AV: E=Sophos;i="5.83,277,1616482800"; d="scan'208";a="125472459" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 15 Jun 2021 23:20:29 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 15 Jun 2021 23:20:29 -0700 Received: from den-her-m31857h.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2176.2 via Frontend Transport; Tue, 15 Jun 2021 23:20:25 -0700 Message-ID: Subject: Re: [PATCH net-next v4 02/10] net: sparx5: add the basic sparx5 driver From: Steen Hegelund To: Philipp Zabel , "David S. Miller" , Jakub Kicinski CC: Andrew Lunn , Russell King , Microchip Linux Driver Support , "Alexandre Belloni" , Madalin Bucur , Mark Einon , "Masahiro Yamada" , Arnd Bergmann , Simon Horman , , , , Bjarni Jonasson , Lars Povlsen Date: Wed, 16 Jun 2021 08:20:24 +0200 In-Reply-To: <2800a872ff4260fc7a942f2f2ea1c9e3603b13d7.camel@pengutronix.de> References: <20210615085034.1262457-1-steen.hegelund@microchip.com> <20210615085034.1262457-3-steen.hegelund@microchip.com> <2800a872ff4260fc7a942f2f2ea1c9e3603b13d7.camel@pengutronix.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Philipp, Thanks for your comments, On Tue, 2021-06-15 at 15:22 +0200, Philipp Zabel wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > Hi Steen, > > On Tue, 2021-06-15 at 10:50 +0200, Steen Hegelund wrote: > > This adds the Sparx5 basic SwitchDev driver framework with IO range > > mapping, switch device detection and core clock configuration. > > > > Support for ports, phylink, netdev, mactable etc. are in the following > > patches. > > > > Signed-off-by: Steen Hegelund > > Signed-off-by: Bjarni Jonasson > > Signed-off-by: Lars Povlsen > [...] > > diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c > > b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c > > new file mode 100644 > > index 000000000000..892bbbaacbd6 > > --- /dev/null > > +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c > > @@ -0,0 +1,743 @@ > [...] > > +static int mchp_sparx5_probe(struct platform_device *pdev) > > +{ > [...] > > + /* Do switch core reset if available */ > > + reset = devm_reset_control_get_optional_shared(&pdev->dev, "switch"); > > Please don't ignore errors here. For example: > > if (IS_ERR(reset)) > return dev_err_probe(&pdev->dev, PTR_ERR(reset), > "Failed to get reset.\n"); > > > reset_control_reset(reset); Yes, I will add an error message. > > regards > Philipp -- BR Steen -=-=-=-=-=-=-=-=-=-=-=-=-=-= steen.hegelund@microchip.com From mboxrd@z Thu Jan 1 00:00:00 1970 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=-13.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 0C0B0C48BE5 for ; Wed, 16 Jun 2021 06:22:06 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BBA8B61369 for ; Wed, 16 Jun 2021 06:22:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BBA8B61369 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:CC:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gGyoFM12tDTubcm0pbXriYLxxt4SQ8rg/ywUgDINRQQ=; b=RbrHGAVLNSo1vb g1jo9sOYqbiBHfBuUMma6BC7WwGZ2tHMMpskNjMEkWNQns3PDRhq2IfF2GjV7wnh0zozWM2MvjfWs gwwULhE/9eUG5d+0gnPrusWmxzUzBoESgoh6c/z5/omx21lAkLeVnH4/vlJnm8b5AsBNDJOCxOdW2 DEMK2Fp4FrdSLHYXw2mdjiOV8iOj8VjenuNgsQru25XpbWXhvQoFNSA9c/RtG3PS2TMlQTl4C0Ncz UXboMrT0ujdMBj4YUvyX8Ew3woQXNM0uHZ7sOX1zDGKGks39cqD6fi53pSrXNvBqXuVSRPmjNs9ZU xcqgqoq0JCTcRqiAQ9Kg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltOuj-0050Ta-P5; Wed, 16 Jun 2021 06:20:37 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltOuf-0050ST-2x for linux-arm-kernel@lists.infradead.org; Wed, 16 Jun 2021 06:20:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1623824433; x=1655360433; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=bkOozMexJwsJX12lhLsyLTka4UIj6XIfmvBgGcoA4G0=; b=XmJJuhV6tc+CFmY0UjCHIR0MoqqTOmzEHGweCIYClIJjS9WziX5xifeM aiq76ZX9brScqYO9gsQ4CDQTpUgd5yMvntPxvJiG4QXrwnBn4pehjAIh7 aAaAWbi+fu1E/yp6KNcPecBaAMeNJ5wAMuTPZ+DwV6acYxZQn0PzUS0dd 6nwLUVseBwI3s7BiEy+7NhEEMeXwMtYLY3Vi3Qny63fy8ve3FPaNGX6Zg UhYCTBSiMo5RGFQXYDjm6ZIxRZeKon1MW08KmLll3D8JodLf8Pb3UJ+98 ZBCBVjRESCZBzKBFFfk8DT4AVcLiNujK7PEvqAERp7FRAlZ545VUd12sb w==; IronPort-SDR: 3AaM3vcf/OLT7vd2fBPALrBHvTvCPeLOIAMXvNRt2MWGp8Gk9KY1uo9wpI07yqytdzW+ZKnRCh hVW/QqXSH4k23Op/dbpFOiNTyGm30OaRizJeSq+NZoV3WsZAO7KuKL1IS6Yv8coJxbYUIZYw84 YTNI6wxx7p5CchkPmEdD4nsZWk/fcV0PqB6NQMJGlkvNowUqrpitU0HB+R9L3/lEa2LuiqoFQf 8A28LZOUG1KahNna09J08iA6DavE0f2nHjM+NvVzJXvGebj0PhDpg5LQ7QoHSKg4yv1WDatf28 2+Q= X-IronPort-AV: E=Sophos;i="5.83,277,1616482800"; d="scan'208";a="125472459" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 15 Jun 2021 23:20:29 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 15 Jun 2021 23:20:29 -0700 Received: from den-her-m31857h.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2176.2 via Frontend Transport; Tue, 15 Jun 2021 23:20:25 -0700 Message-ID: Subject: Re: [PATCH net-next v4 02/10] net: sparx5: add the basic sparx5 driver From: Steen Hegelund To: Philipp Zabel , "David S. Miller" , Jakub Kicinski CC: Andrew Lunn , Russell King , Microchip Linux Driver Support , "Alexandre Belloni" , Madalin Bucur , Mark Einon , "Masahiro Yamada" , Arnd Bergmann , Simon Horman , , , , Bjarni Jonasson , Lars Povlsen Date: Wed, 16 Jun 2021 08:20:24 +0200 In-Reply-To: <2800a872ff4260fc7a942f2f2ea1c9e3603b13d7.camel@pengutronix.de> References: <20210615085034.1262457-1-steen.hegelund@microchip.com> <20210615085034.1262457-3-steen.hegelund@microchip.com> <2800a872ff4260fc7a942f2f2ea1c9e3603b13d7.camel@pengutronix.de> User-Agent: Evolution 3.36.5-0ubuntu1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210615_232033_189525_EE2FB143 X-CRM114-Status: GOOD ( 20.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Philipp, Thanks for your comments, On Tue, 2021-06-15 at 15:22 +0200, Philipp Zabel wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > Hi Steen, > > On Tue, 2021-06-15 at 10:50 +0200, Steen Hegelund wrote: > > This adds the Sparx5 basic SwitchDev driver framework with IO range > > mapping, switch device detection and core clock configuration. > > > > Support for ports, phylink, netdev, mactable etc. are in the following > > patches. > > > > Signed-off-by: Steen Hegelund > > Signed-off-by: Bjarni Jonasson > > Signed-off-by: Lars Povlsen > [...] > > diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c > > b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c > > new file mode 100644 > > index 000000000000..892bbbaacbd6 > > --- /dev/null > > +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c > > @@ -0,0 +1,743 @@ > [...] > > +static int mchp_sparx5_probe(struct platform_device *pdev) > > +{ > [...] > > + /* Do switch core reset if available */ > > + reset = devm_reset_control_get_optional_shared(&pdev->dev, "switch"); > > Please don't ignore errors here. For example: > > if (IS_ERR(reset)) > return dev_err_probe(&pdev->dev, PTR_ERR(reset), > "Failed to get reset.\n"); > > > reset_control_reset(reset); Yes, I will add an error message. > > regards > Philipp -- BR Steen -=-=-=-=-=-=-=-=-=-=-=-=-=-= steen.hegelund@microchip.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel