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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 152FEC433EF for ; Sat, 18 Jun 2022 08:22:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231146AbiFRIWW (ORCPT ); Sat, 18 Jun 2022 04:22:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbiFRIWU (ORCPT ); Sat, 18 Jun 2022 04:22:20 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6FC42E08F; Sat, 18 Jun 2022 01:22:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=SzEjeSGXZFEaqB9vXXzQNKk9zN7fQH9ukpLvS0OVS2M=; b=vA9STYCQoTjYq+AGGChv+hbWj0 PdygWIlFSBPOLYaALXcAleTGSGilqne+tGwXUbC924aYUZi6JM7z64hek4o1oG4HwV22H5DmD2VNi 6pKSqOq2cb91/DiSEWzQBm0tSqbVAKBOF7m8jcM8nx8RobrXs2D0YMX2E54LzI01Z+ufZfNBGTPtb nx7NUaKDVyqhdi2eMeS465ROROJX61peARkfEDy6djRlig4q3thlgCCxMklhPWdjqTRff2oRWn8Xl pxdd1ndlGanNQuYh2y2IwFxk6NPZMsBy4e1Le2AucZokH5LZ+CU5UXqXy/VT2wXTih1P7Xm6x0E0X cZNvlHzQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:32912) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1o2Tib-00046R-KM; Sat, 18 Jun 2022 09:22:09 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1o2TiX-0002ly-TU; Sat, 18 Jun 2022 09:22:05 +0100 Date: Sat, 18 Jun 2022 09:22:05 +0100 From: "Russell King (Oracle)" To: Sean Anderson Cc: "David S . Miller" , Jakub Kicinski , Madalin Bucur , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Paolo Abeni , Eric Dumazet Subject: Re: [PATCH net-next 25/28] [RFC] net: dpaa: Convert to phylink Message-ID: References: <20220617203312.3799646-1-sean.anderson@seco.com> <20220617203312.3799646-26-sean.anderson@seco.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 17, 2022 at 08:45:38PM -0400, Sean Anderson wrote: > Hi Russell, > > Thanks for the quick response. >... > Yes, I've been using the debug prints in phylink extensively as part of > debugging :) > > In this case, I added a debug statement to phylink_resolve printing out > cur_link_state, link_state.link, and pl->phy_state.link. I could see that > the phy link state was up and the mac (pcs) state was down. By inspecting > the PCS's registers, I determined that this was because AN had not completed > (in particular, the link was up in BMSR). I believe that forcing in-band-status > (by setting ovr_an_inband) shouldn't be necessary, but I was unable to get a link > up on any interface without it. In particular, the pre-phylink implementation > disabled PCS AN only for fixed links (which you can see in patch 23). I notice that prior to patch 23, the advertisment register was set to 0x4001, but in phylink_mii_c22_pcs_encode_advertisement() we set it to 0x0001 (bit 14 being the acknowledge bit from the PCS to the PHY, which is normally managed by hardware. It may be worth testing whether setting bit 14 changes the behaviour. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id AC2FCC43334 for ; Sat, 18 Jun 2022 08:23:53 +0000 (UTC) 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=bI8hZUncCDtrQak8/0An7du2qGzbgd22S1/efnKmecA=; b=2H5aFpUZLh0/xU h9C/YxD09POgYW3ezlrvReu72qULYuDikNwdkDg7asXtJ7TjPmn3ze/wWSr8rixokLFy3MZdX1Knk wJ3Gz6VjEkiVuIWAJCfjaakDmDtdst+vZwTFrwwyPh4nR/OUHYbNTa4busM1ssgnHY4DPTpBmzEyh aj0ihQraLltmXTQ7of43y5rw6Q7Xp5500b8bh7R4yh/Gmsnzah7ANUtbQmZurKiGrTmAnjZO08R8P 6KkkbGMuFCqwy9J9vucqwmbdrLsAzV4SH60PkXTeHYWhlZHNfGUBhT6SzjLdGW9w6gkzDt9wFijxE x8JHGCDZwXj9oqkvkLdQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o2Tit-00AjV4-NQ; Sat, 18 Jun 2022 08:22:27 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o2Tio-00AjSi-UN for linux-arm-kernel@lists.infradead.org; Sat, 18 Jun 2022 08:22:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=SzEjeSGXZFEaqB9vXXzQNKk9zN7fQH9ukpLvS0OVS2M=; b=vA9STYCQoTjYq+AGGChv+hbWj0 PdygWIlFSBPOLYaALXcAleTGSGilqne+tGwXUbC924aYUZi6JM7z64hek4o1oG4HwV22H5DmD2VNi 6pKSqOq2cb91/DiSEWzQBm0tSqbVAKBOF7m8jcM8nx8RobrXs2D0YMX2E54LzI01Z+ufZfNBGTPtb nx7NUaKDVyqhdi2eMeS465ROROJX61peARkfEDy6djRlig4q3thlgCCxMklhPWdjqTRff2oRWn8Xl pxdd1ndlGanNQuYh2y2IwFxk6NPZMsBy4e1Le2AucZokH5LZ+CU5UXqXy/VT2wXTih1P7Xm6x0E0X cZNvlHzQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:32912) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1o2Tib-00046R-KM; Sat, 18 Jun 2022 09:22:09 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1o2TiX-0002ly-TU; Sat, 18 Jun 2022 09:22:05 +0100 Date: Sat, 18 Jun 2022 09:22:05 +0100 From: "Russell King (Oracle)" To: Sean Anderson Cc: "David S . Miller" , Jakub Kicinski , Madalin Bucur , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Paolo Abeni , Eric Dumazet Subject: Re: [PATCH net-next 25/28] [RFC] net: dpaa: Convert to phylink Message-ID: References: <20220617203312.3799646-1-sean.anderson@seco.com> <20220617203312.3799646-26-sean.anderson@seco.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220618_012223_020007_AF15F5C2 X-CRM114-Status: GOOD ( 14.55 ) 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 On Fri, Jun 17, 2022 at 08:45:38PM -0400, Sean Anderson wrote: > Hi Russell, > > Thanks for the quick response. >... > Yes, I've been using the debug prints in phylink extensively as part of > debugging :) > > In this case, I added a debug statement to phylink_resolve printing out > cur_link_state, link_state.link, and pl->phy_state.link. I could see that > the phy link state was up and the mac (pcs) state was down. By inspecting > the PCS's registers, I determined that this was because AN had not completed > (in particular, the link was up in BMSR). I believe that forcing in-band-status > (by setting ovr_an_inband) shouldn't be necessary, but I was unable to get a link > up on any interface without it. In particular, the pre-phylink implementation > disabled PCS AN only for fixed links (which you can see in patch 23). I notice that prior to patch 23, the advertisment register was set to 0x4001, but in phylink_mii_c22_pcs_encode_advertisement() we set it to 0x0001 (bit 14 being the acknowledge bit from the PCS to the PHY, which is normally managed by hardware. It may be worth testing whether setting bit 14 changes the behaviour. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel