Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3916278rwb; Sat, 3 Dec 2022 13:35:31 -0800 (PST) X-Google-Smtp-Source: AA0mqf49JreiuwIAbu+8hrGzmeRb4fcjcf6ji5d61E7tYuZHp7Wkqj9TBVBc8OHZV+i6+/gWQFgg X-Received: by 2002:a17:90a:eac2:b0:219:484:e955 with SMTP id ev2-20020a17090aeac200b002190484e955mr45325891pjb.214.1670103331038; Sat, 03 Dec 2022 13:35:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670103331; cv=none; d=google.com; s=arc-20160816; b=pywzfglVav99PSO35aIluolu/6Sgf06aJRmjANfA9YHjHg1KksfrHRgAaXA293PS7D EeM+ZF8Yu4+QZrRYCCzBvQcxhr3eoPNoOHWldpPNc5EbdKZxmX1dF0ZE8h2Hw6NbAU2s cOljgvgUuiac+n+nvqpeD8ZdLP1/y6wPes/FM1m/gK5Ee49NxTrzf9mhCfGlgV+Yk4BD gDG5nBWNgElS/UbpJHcPs/BR7EqVX2SPE0VX2ABAnytp23T8VRxtJate3Z5475UVXI9E aszQGDREUgRXH1wCUw99FBrScji5SWToXja4Vo7evJuauXnWnzrAUeYTZDfjp/tXrJj2 YNkQ== 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=rPTn3eQfU4xquGlMEzeTTkP+ED6yH76zbYeY/hijclo=; b=EdJUm7Fb/z68Lnl/IqGHKXjCN7zlHVQEbBrqoOxK3web+LL2iLb3Eh/SvGn//I6U/5 ZJKnNQpRMKH1Q0W1wZzm46kOl/D2ncqxTZ/sM0W+2He6xIT/TTO5yQpPbis1CfZCqjDb +SAJ54GeeQ3W9puL03ccSGK0M7je/OwR+8lzuBcTCPgvAbd0fKqydBzKm+KW3LeNfwGO Fh6BNh8PmcXEhFSFrrAo+TtSGfb6v1u1zg8JI++Rn/olhUQyp0ZDL42BxR0G5tZNFcPl CZclTqSR4nkqT/wlbsaW4dvnlp55ocPXC2VRagEjRJRj3382BKJLX03ivywcf5tbX/oi dUmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=ULBFlNX0; 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 a6-20020aa78e86000000b0050d80e4935fsi10587184pfr.256.2022.12.03.13.35.20; Sat, 03 Dec 2022 13:35:31 -0800 (PST) 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=ULBFlNX0; 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 S229921AbiLCUiA (ORCPT + 82 others); Sat, 3 Dec 2022 15:38:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbiLCUh5 (ORCPT ); Sat, 3 Dec 2022 15:37:57 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4ABBEFD2A; Sat, 3 Dec 2022 12:37:54 -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=rPTn3eQfU4xquGlMEzeTTkP+ED6yH76zbYeY/hijclo=; b=ULBFlNX00q7GtyrusWgSAGgx/B 8I4+52OFIqQL4Q6VGdt/yffE0QToTqmAX7ZNUyLxXp6wbETr5yzbGrQ+vvbFqw9ceOyPP6x+VT6v1 JHi+nO9I3ToPhDr/mWMekf9k6CBJhKfv+tHckmfswn7v4WEidz8o2Wv4WPnu1dp2pd5k=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1p1ZFh-004Ho9-Vo; Sat, 03 Dec 2022 21:36:49 +0100 Date: Sat, 3 Dec 2022 21:36:49 +0100 From: Andrew Lunn To: Michael Walle Cc: Xu Liang , Heiner Kallweit , Russell King , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH net-next v1 4/4] net: phy: mxl-gpy: disable interrupts on GPY215 by default Message-ID: References: <20221202151204.3318592-1-michael@walle.cc> <20221202151204.3318592-5-michael@walle.cc> <69e0468cf192455fd2dc7fc93194a8ff@walle.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <69e0468cf192455fd2dc7fc93194a8ff@walle.cc> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS 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 > > > @@ -290,6 +291,10 @@ static int gpy_probe(struct phy_device *phydev) > > > phydev->priv = priv; > > > mutex_init(&priv->mbox_lock); > > > > > > + if (gpy_has_broken_mdint(phydev) && > > > + !device_property_present(dev, > > > "maxlinear,use-broken-interrupts")) > > > + phydev->irq = PHY_POLL; > > > + > > > > I'm not sure of ordering here. It could be phydev->irq is set after > > probe. The IRQ is requested as part of phy_connect_direct(), which is > > much later. > > I've did it that way, because phy_probe() also sets phydev->irq = PHY_POLL > in some cases and the phy driver .probe() is called right after it. Yes, it is a valid point to do this check, but on its own i don't think it is sufficient. > > I think a better place for this test is in gpy_config_intr(), return > > -EOPNOTSUPP. phy_enable_interrupts() failing should then cause > > phy_request_interrupt() to use polling. > > Which will then print a warning, which might be misleading. > Or we disable the warning if -EOPNOTSUPP is returned? Disabling the warning is the right thing to do. Andrew