Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp767896rwb; Sat, 5 Aug 2023 00:11:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFz5VqkBqt5YquaaXLmdhP607KPU0PSbGCq10KzSxlQ6FYNbIkQ1VQXQhE/LHKgM3KCczpQ X-Received: by 2002:a17:903:485:b0:1b8:475d:ebf6 with SMTP id jj5-20020a170903048500b001b8475debf6mr4210238plb.0.1691219491668; Sat, 05 Aug 2023 00:11:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691219491; cv=none; d=google.com; s=arc-20160816; b=xVv4JjglbYHlQ52f797PlzKkKGO8U6Dx/sC+zSTSczS15Mk+pwDmCyTjbH9rNcGc7z Wc7falTw3bQC0cVka2Eym8X60tRDKc95f5opXu67djMTwpnvGY2WzXeZfBrqdyVyCkiV DF9jBNPvwAkHm6w717AlowGHnrnazr1SMqUftcV4hF3kXBUVXCflDQL+1Of6+TUX1OLY dbycPq+6DE9gHJoUr98jwuIghO0DVjFA5sAcHReN7CWk9p8PTemKGfeJKXXdjyGxBw2c JgPvRqGPkMym+yrOeqGA+7IUQvWn3oZJGB32sxA5tGtR8sv4+912jyAHPIWz/UfS1L4l m49w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=MzuIUE4dAyNI/9puD5m3erQkj7sXAAK5ZQfiS6oDIQg=; fh=mb/wKBSXaMnCPcpKivVpbkJlr4y+lXu/QNTlXvuVx8M=; b=xUFJ+cyW0/d0zSyJhj9Wp2X45y+CZ6CdpeFnOxd4GG2lEha7dlVgieQeoi6Ystz9GP bNol5jyDMZE0pmrmCho8Y9V+uxU1lAL6MmNbYeh6GBUwSFa0cBroRvN//Upask51GLg+ YDoWxqMGodRmMTaugh28RSKwbdCgcywHi/kMmzPLTbzIqIyvDKh8VUjVb0n3L1piBXfa 60uEsqh0DbDrFtdzKdNsId6hwl2ap6I0bDJsKvis5B2VvuTc9AwGBMHpvMdN1k6dfbpD g0DrdDd8ubN+TJZ/U0yBRFVOTixVYeoU2TxovLngri3peer+aiBjLKQVHFpWIY5Bkojy IuUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=gl2caWxR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l14-20020a170903244e00b001b9ffdd9488si2894771pls.624.2023.08.05.00.11.20; Sat, 05 Aug 2023 00:11:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=gl2caWxR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229761AbjHEGqD (ORCPT + 99 others); Sat, 5 Aug 2023 02:46:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbjHEGqC (ORCPT ); Sat, 5 Aug 2023 02:46:02 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 538F3E72; Fri, 4 Aug 2023 23:45:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=MzuIUE4dAyNI/9puD5m3erQkj7sXAAK5ZQfiS6oDIQg=; b=gl2caWxRTz/6U4PiMCjjKpXfyA asb3CKqwHiqMAZFcUF7H+1AkB/UglMSdMob/zzh44cD762TRYkuaPBwgMUC0m+M43H+OVZ1qz7bQP jrwCl7AFqMfGbzsE01/SMEjqOJpxuDhr3RSzjcs9r2zX4hPYm0xrRGH3RlOf2alSdPKo=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1qSB2i-003AWH-HG; Sat, 05 Aug 2023 08:45:40 +0200 Date: Sat, 5 Aug 2023 08:45:40 +0200 From: Andrew Lunn To: "Hawkins, Nick" Cc: "christophe.jaillet@wanadoo.fr" , "simon.horman@corigine.com" , "Verdun, Jean-Marie" , "davem@davemloft.net" , "edumazet@google.com" , "kuba@kernel.org" , "pabeni@redhat.com" , "robh+dt@kernel.org" , "krzysztof.kozlowski+dt@linaro.org" , "conor+dt@kernel.org" , "netdev@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2 4/5] net: hpe: Add GXP UMAC Driver Message-ID: <61c541c9-be30-4a43-aa85-53816d5848f9@lunn.ch> References: <20230802201824.3683-1-nick.hawkins@hpe.com> <20230802201824.3683-5-nick.hawkins@hpe.com> <933D6861-A193-4145-9533-A7EE8E6DD32F@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <933D6861-A193-4145-9533-A7EE8E6DD32F@hpe.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 04, 2023 at 08:55:58PM +0000, Hawkins, Nick wrote: > Greetings Andrew, > > For some reason I do not see your replies for v1 of this patch or > the mdio driver on lore.kernel. Apologies as I did not intend to > not address your previous review comments. My mistake. > > >> +static int umac_int_phy_init(struct umac_priv *umac) > >> +{ > >> + struct phy_device *phy_dev = umac->int_phy_dev; > >> + unsigned int value; > >> + > >> + value = phy_read(phy_dev, 0); > >> + if (value & 0x4000) > >> + pr_info("Internal PHY loopback is enabled - clearing\n"); > > > How is the PHY getting into loopback mode? The MAC driver should never > > touch the PHY, because you have no idea what the PHY actually is, > > unless it is internal. > > It would only be in loopback mode if it was previously configured > that way. I will remove it. The PHY is internal to the ASIC > and is always the same. Given that information is it acceptable Hi Nick So what you call a PHY is probably a PCS. Please look at the API used in driver/net/pcs/. The real PHYs are external. Given that this is a BMC, you probably have lots of i2c busses. So you can support an SFP on the SERDES. So it would be better if you used the phylink interface, not phylib. This should also solve your interface mode switching. Andrew