Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp151653rdb; Thu, 16 Nov 2023 14:54:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IHH7y6HMiLxCOqZj/4J8Flgiza3QK1nIHMW7kMtmml2Zq0nmJyz5szDwXGfKIkxxpgONC/4 X-Received: by 2002:a17:902:6b88:b0:1cc:2eda:bde8 with SMTP id p8-20020a1709026b8800b001cc2edabde8mr10075175plk.24.1700175265342; Thu, 16 Nov 2023 14:54:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700175265; cv=none; d=google.com; s=arc-20160816; b=BbvxsBRa/KqPdMbnjdS7bP9Bj7FgvmNdiubKcLlnaLTZ+98Znhw39f6mv2rHsYEBud i7235juHDPFU1239SKLmWcsLM56DP4k7Nh9PjuOTz0vxntn7me0I7XCOKXNUw45xle93 PlQfMeYpN6F/4nttP21BEuD5sImdu114qkbJufEtndWxAMqhpUh9IVCKb9Uc+8xTcHoE qc35HeYJUtl2Cd/owdFhNMmkrbhitynrT3Tn8FhNTkBNs9j11t/OEtpkx2t6lSOEWMzH nGegQGwEpbWrmkc+GlC+ZxjowYmIxeE/v0oq/7LPasH9CHYM3AeY3oCPos0Oatba1e0d gEvQ== 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=AB/zOObnjmn6/qxfJ4axAvR6RytRyEYQfSsVYOf8oNs=; fh=dBSj1Anongxm3AqEVsAoqej2eyguUa3eeydsriREnjo=; b=ENgcE9wYKCFO30ZWNBoa6jXtyC0fxqX3H+F7hAUHqdPftzw+sXvJ2Ev6LwC5QP25tO IxTsSfcMAj5GdFw+MdIN/MDOd058DFZVcIq9HVXU58bUTqE29qK19sIVVb7POo0VPmPP jrMs/vx8P9jCeiIsQsllnCYzzJQsXI0d1E/WXjtz66j+2xpp6jh5sEXBSsDXJlBFoEXv Gc5ti8k1K1gXmG9VqbiAhUKTSOE2fQS0HJhezJdcPa2aPTlJmAqpzThMreuviZXEI1I+ fpnxUPN2eaWWPQ+0xJg7MC63gXcdnN2cpA+gGRfDvhQ7u5rQmD5gx+FXM8K/Yu0xQbnK /KQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=gjgZDIOb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id q2-20020a170902edc200b001cdfbd8790esi411851plk.173.2023.11.16.14.54.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 14:54:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=gjgZDIOb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id EC50381A206D; Thu, 16 Nov 2023 14:54:22 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345532AbjKPWyQ (ORCPT + 99 others); Thu, 16 Nov 2023 17:54:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229790AbjKPWyO (ORCPT ); Thu, 16 Nov 2023 17:54:14 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC375131; Thu, 16 Nov 2023 14:54:11 -0800 (PST) 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=AB/zOObnjmn6/qxfJ4axAvR6RytRyEYQfSsVYOf8oNs=; b=gjgZDIObtC9FIFb+VX0j7YnCoa QNvxS3QscbVJIPn2MhcRk7ms12nzkAJWjWIZ+DCbFToa6JO89EQD2VNciFMWoHb4+0JK20v3spZzq ErXKXUj4/KaKfsYbzpHAU4dJ9t+2M0TiXo92+iKDV4GSkhaETAAD0d3l8xQRA6PsHnmQ=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1r3lFL-000OWE-0U; Thu, 16 Nov 2023 23:54:03 +0100 Date: Thu, 16 Nov 2023 23:54:02 +0100 From: Andrew Lunn To: Kory Maincent Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Luis Chamberlain , Russ Weight , Greg Kroah-Hartman , "Rafael J. Wysocki" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH net-next 9/9] net: pse-pd: Add PD692x0 PSE controller driver Message-ID: <2ff8bea5-5972-4d1a-a692-34ad27b05446@lunn.ch> References: <20231116-feature_poe-v1-0-be48044bf249@bootlin.com> <20231116-feature_poe-v1-9-be48044bf249@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231116-feature_poe-v1-9-be48044bf249@bootlin.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email 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 (lipwig.vger.email [0.0.0.0]); Thu, 16 Nov 2023 14:54:23 -0800 (PST) I'm reading this patch first, so this might be a dumb question... > +static int pd692x0_recv_msg(struct pd692x0_priv *priv, > + struct pd692x0_msg *msg, > + struct pd692x0_msg_content *buf) > +{ ... > + i2c_master_recv(client, (u8 *)buf, sizeof(*buf)); > + if (buf->key) > + goto out; > + > + msleep(10000); That is 10 seconds, right? > +static int pd692x0_sendrecv_msg(struct pd692x0_priv *priv, > + struct pd692x0_msg *msg, > + struct pd692x0_msg_content *buf) > +{ > + struct device *dev = &priv->client->dev; > + int ret; > + > + ret = pd692x0_send_msg(priv, msg); > + if (ret) > + return ret; > + > + ret = pd692x0_recv_msg(priv, msg, buf); So this function takes at least 10 seconds? > +static int pd692x0_ethtool_set_config(struct pse_controller_dev *pcdev, > + unsigned long id, > + struct netlink_ext_ack *extack, > + const struct pse_control_config *config) > +{ .... > + switch (config->admin_control) { > + case ETHTOOL_PSE_ADMIN_STATE_ENABLED: > + msg.content.data[0] = 0x1; > + break; > + case ETHTOOL_PSE_ADMIN_STATE_DISABLED: > + msg.content.data[0] = 0x0; > + break; > + default: > + return -EOPNOTSUPP; > + } > + > + msg.content.sub[2] = id; > + ret = pd692x0_sendrecv_msg(priv, &msg, &buf); So this is also 10 seconds? Given its name, it looks like this is called via ethtool? Is the ethtool core holding RTNL? It is generally considered bad to hold RTNL for that long. Andrew