Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp241647rdb; Tue, 5 Dec 2023 04:23:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IGKKzz5t1ocwli6pQ6a3a9ProL7BEi14Z6uGKZXp1Gxh7iX2dWwXPN2PPbevAMDGnDLUGji X-Received: by 2002:a17:903:41c8:b0:1d0:80a7:2b51 with SMTP id u8-20020a17090341c800b001d080a72b51mr5780783ple.74.1701779006427; Tue, 05 Dec 2023 04:23:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701779006; cv=none; d=google.com; s=arc-20160816; b=tVhbZgCPR1gYz8kCiaSlKNnxzox7kAo3A7aaw7Yr19QGBbgGDHJTnHOu2Iiz7GMZwv xhcjh8lKDbxPIT1muHGacNzh/IKHP8qrLj2egJkfgWEBqxoyp5KLD/rOZc3oy0EAP2ab 0ovxN7Jk9rH6hV7k28suNfVsj1OBi4I6N6b7cuv41r4KSD160FPuxHVf8MqKf3HHm5dT Fk5lWfCQK4bAjGPd5SsIM2PA7L8Ueecbum9+jGBip7FeoYH4U+N0GGc9WofSbUWZrsAR kJ0a5+p1Jbe52UOKf2e3a9G08CxVHZfK1mTP+THl2vRfvEx0nx6/G+sVJXxZS7h7pDSr GpQw== 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=AMhBj0PFcNsp7ddu4+x1EUxsSq8BTDuggzzUZ8nA8Vo=; fh=uN3ocIkZZpR4w8rHU+bEt9agKQQkMOlALS3h0ovprww=; b=BxHbhxvHK+xUoJ8+nYR239xwxMNGqwweEqN7vCrss/7XhCE0Zc2uU6muJTwya2oetu LwnZNTU3K2R84fdq9poBL70mKA3KB2vJV1zGPg7YCYeNfh9iNVcu8cOsnc5FHPfdDWGM V5QDJZsYjnzjGWz1rpiKEvYCoIeImH/bdhiojGwBFpmP5SsOI6+JNFaSobMiJjQGCSPF aesfRn4tYFBvFjYCCs0Nzg51JzNcOZH/ernn/0Y3LWF51IW/P/onVcQLtRQZfds+qc+n pv0of/ydwUV7YzfJZdQAp5sv7nKuXNAKS4OEuwPLnXPWrWj+Dl00x4fV4P6HyTUzigpt 2q3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=hWHuxdWf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id e2-20020a170902d38200b001cf77931eb1si6051074pld.4.2023.12.05.04.23.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 04:23:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=hWHuxdWf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 3208C80C5903; Tue, 5 Dec 2023 04:23:25 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345056AbjLEMXP (ORCPT + 99 others); Tue, 5 Dec 2023 07:23:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344935AbjLEMXO (ORCPT ); Tue, 5 Dec 2023 07:23:14 -0500 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEAF9D7; Tue, 5 Dec 2023 04:23:20 -0800 (PST) Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a1ceae92ab6so28042166b.0; Tue, 05 Dec 2023 04:23:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701778999; x=1702383799; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=AMhBj0PFcNsp7ddu4+x1EUxsSq8BTDuggzzUZ8nA8Vo=; b=hWHuxdWf3f/v7yccbhzi0QVFphGHaxMpa3tU2F5P7baGvWpHw9GDrJMx20UpO8gK1o a64u9sk8CEhVuGANDFfc8ufTQBjacGaVS0K+SlhoOXhhiSHxvtrYu8sWSls4NnGAeyxq TTK+BnhvCMXNH4NfxzA9AYrj4vfH+9A5RbEt4o7aYbT1QUDImz+txYomn8xcasuHJcNz 1aR0LN7ug2Cy0uJkEvtmIB2kzkok2AwJ2Fzn636wiiHiiv1Kmq2yfn/35L9t36Zpq0j+ z5VFmvUgc1W/yZ1fAoQ6ALOPaMtpIG8MbPJVgb99zyA/ED30DVET/JkREJ+5kI1VhO/k U4Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701778999; x=1702383799; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=AMhBj0PFcNsp7ddu4+x1EUxsSq8BTDuggzzUZ8nA8Vo=; b=bbI98sX8lnP+mvwNMihOoF3w9LfheH/30a+IJBKIyI2dh00bKHtel3iUS41szaH9Rv 66uMPAJ24lFY0znWNXXUBJ1WYxbVUb0qmLxDDyv23w+TyhT0dORgBvpg+pIQZlZLNEM7 vFBKcQlg8tGa+KQtN+okfA4gA6LRxDeljRbnjagq/TW2GUfaedrn683tcPcUWpTOSuOl k5OLRxLLoIR8sSkKFd6JSMF064+xJ6NC/09wYhvsAtZdkeho3mJw4IMr+l/w2+Lga1+n zsce8FQ8oztxImL0RYfszA6oHWaLDTnbYan4lczWbNVHQc5DDUx1P9xVAK+6M9R7K4du fYvA== X-Gm-Message-State: AOJu0YwSVr/exAl47ph9hrSOkU6v3nknymBjG22IqsHz88hWuZjZP3LO B8cRB3WOPNTLpwRnxhLaQ/A= X-Received: by 2002:a17:906:3f5c:b0:a19:a1ba:da6a with SMTP id f28-20020a1709063f5c00b00a19a1bada6amr3859595ejj.145.1701778998985; Tue, 05 Dec 2023 04:23:18 -0800 (PST) Received: from skbuf ([188.27.185.68]) by smtp.gmail.com with ESMTPSA id k11-20020a170906128b00b009ff8f199f21sm6726467ejb.19.2023.12.05.04.23.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 04:23:18 -0800 (PST) Date: Tue, 5 Dec 2023 14:23:16 +0200 From: Vladimir Oltean To: Serge Semin Cc: Andrew Lunn , Heiner Kallweit , Russell King , Alexandre Torgue , Jose Abreu , Jose Abreu , Maxime Chevallier , Tomer Maimon , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , openbmc@lists.ozlabs.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 10/16] net: pcs: xpcs: Add generic DW XPCS MDIO-device support Message-ID: <20231205122316.ihhpklv222f5giz3@skbuf> References: <20231205103559.9605-1-fancer.lancer@gmail.com> <20231205103559.9605-11-fancer.lancer@gmail.com> <20231205111351.xjjuwpbf7kwg3vuh@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 05 Dec 2023 04:23:25 -0800 (PST) On Tue, Dec 05, 2023 at 02:35:46PM +0300, Serge Semin wrote: > Omg, thank you very much for testing the series straight away and > sorry for the immediate trouble it caused. I'll need some more time > for investigation. I'll get back to this topic a bit later on this > week. Don't worry, I got suspicious when I was CCed to review only a one-line change in patch 11/16. It's never about that one line, is it?) Anyway, the NULL dev->p is a symptom of device_add() not having been called, most likely from mdio_device_register(). I'll be honest and say that I still don't quite understand what you're trying to achieve. You're trying to bind the hardcoded mdio_devices created by xpcs_create() to a driver? That was attempted a while ago by Sean Anderson with the Lynx PCS. Are you aware of the fact that even in the good case in which binding the driver actually works, the user can then come along and unbind it from the PCS device, and phylink isn't prepared to handle that, so it will crash the kernel upon the next phylink_pcs call? The pcs-rzn1-miic.c driver puts a device_link to the MAC to at least tear down the whole thing when the PCS is unbound, which is saner than crashing the kernel. I don't see the equivalent protection mechanism here? Can't the xpcs continue to live without a bound driver? Having a compatible string in the OF description is perfectly fine though, and should absolutely not preclude that.