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 E6EF9C433EF for ; Thu, 7 Apr 2022 04:57:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236962AbiDGE7n (ORCPT ); Thu, 7 Apr 2022 00:59:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236602AbiDGE7l (ORCPT ); Thu, 7 Apr 2022 00:59:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F257D1C42C2 for ; Wed, 6 Apr 2022 21:57:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8D89761ACE for ; Thu, 7 Apr 2022 04:57:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A29A1C385A4; Thu, 7 Apr 2022 04:57:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649307461; bh=dO8nfqMElDpxxeYXv/bKtudvj05VsLdiN32cRO8bkms=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=oH6YOgPnyl5CYaJtoeB1GvwSIpzAhbyOPzc1r8DXrYbAbfTLZY3NJnM+pQEwOHoWy 0eNy+qQD9ntslIoiMBspUg9V9yQFPP22cmoJIua9dG4SOPi+D3t46RlnGyCajDXFTH oswLnYSv3/OZTl4X7MlAnHavJrk1//jDPTps9HPSOcRm6BLQj/oorkmgQnLlCEygLK Qi0EnwWTuw7r0VZUPJopXtiyzZYLHyiRz48Vu7fjaswK3fTJzm0VNEG04IkwecZrVb wFCaO1V7DAujrY8csoi4IGlv0F4CAVjPvw+COlrOWeOu3oA4dHZI1uvt+sZhpwPxkL qWdd+Khe/7JsA== Date: Wed, 6 Apr 2022 21:57:40 -0700 From: Jakub Kicinski To: Marek Vasut Cc: netdev@vger.kernel.org, Andrew Lunn , "David S . Miller" , Heiner Kallweit , Oleksij Rempel , Paolo Abeni Subject: Re: [PATCH v2] net: phy: micrel: ksz9031/ksz9131: add cabletest support Message-ID: <20220406215740.24bfd957@kernel.org> In-Reply-To: <20220407020812.1095295-1-marex@denx.de> References: <20220407020812.1095295-1-marex@denx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, 7 Apr 2022 04:08:12 +0200 Marek Vasut wrote: > Add cable test support for Micrel KSZ9x31 PHYs. > > Tested on i.MX8M Mini with KSZ9131RNX in 100/Full mode with pairs shuffled > before magnetics: > (note: Cable test started/completed messages are omitted) > > mx8mm-ksz9131-a-d-connected$ ethtool --cable-test eth0 > Pair A code OK > Pair B code Short within Pair > Pair B, fault length: 0.80m > Pair C code Short within Pair > Pair C, fault length: 0.80m > Pair D code OK > > mx8mm-ksz9131-a-b-connected$ ethtool --cable-test eth0 > Pair A code OK > Pair B code OK > Pair C code Short within Pair > Pair C, fault length: 0.00m > Pair D code Short within Pair > Pair D, fault length: 0.00m > > Tested on R8A77951 Salvator-XS with KSZ9031RNX and all four pairs connected: > (note: Cable test started/completed messages are omitted) > > r8a7795-ksz9031-all-connected$ ethtool --cable-test eth0 > Pair A code OK > Pair B code OK > Pair C code OK > Pair D code OK > > The CTRL1000 CTL1000_ENABLE_MASTER and CTL1000_AS_MASTER bits are not > restored by calling phy_init_hw(), they must be manually cached in > ksz9x31_cable_test_start() and restored at the end of > ksz9x31_cable_test_get_status(). > > Signed-off-by: Marek Vasut It does not apply completely cleanly to net-next, could you rebase?