Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2581283rwb; Fri, 2 Dec 2022 11:48:23 -0800 (PST) X-Google-Smtp-Source: AA0mqf5u8RUVnbEeiqjiBaS62LYWSOMkdeTaApapd51bKhs98MYooBjXL3R9w/GnZMbBfrpJKzvt X-Received: by 2002:a05:6402:2318:b0:469:10b2:df98 with SMTP id l24-20020a056402231800b0046910b2df98mr61262514eda.115.1670010503114; Fri, 02 Dec 2022 11:48:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670010503; cv=none; d=google.com; s=arc-20160816; b=H+1L8YZPWb6LxOURV1s3WwH9kTZU0+xsS2eEbGovJW7qOiYoe5uhguIIePb6Nr2bMV xIMHY6eBguSy/XC9CDHc8h/rThji1glgaiC/LsPrudAMd+Pz0ySOK67rREF3lZJ/husD wnQn6jU70l6djKuwgpMT+msYNbN90xh/MtyP+jBUbQBGcy2LfvgjnSOY6Q18mmiM0BGE Hti0WH/Jl2prr4NzHqjwt/N8yjZEJGKssIrmXwz4GasNIL4HItavt3hEwQUAnwPMkYOi zV95j6SKVnvBuDQfoDr8kEfDl02eIScSdpkH15p3CF53dkIdkLYdoZwk1Ijqq/C3OsmT s5wg== 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=wYScWJRTbZ+Jo4q46g59cBC6C79TnJL57TW21p2LlK8=; b=Qx8mcQvgqYYVT3uqBKLERKnygDkcCjQHZEuCl9gZOFjlIHZtDhPBPpR1ydFiIOhDnp nMQiepSK5Oo9ztTb088YSgkpLuMqR3KZYE3C3nYlMxM+/hQ2ofGq2OFKx5iNs1fwa2Fu +wJ1qE4lXJjyDx29YIZUf5axu232A6xFhOVestkBj4FIIrl+3RjMpXSutHcUo224Yyui 38m1r8Eno2ibU90/hjtA/+SgiwiS2pgEuGawq8+kYa4Znn1M2gWMG272wW/zJwtPJ/sB lkfRkB5EHFAseYKWiPnbcW2RiNIIQOD5A7bo5luXdXwB0ldYH9ENKaE3RqFH/BxKnEGa SjHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=XCrX21p1; 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 k12-20020a170906680c00b007a1d4f0e7fcsi5756644ejr.655.2022.12.02.11.48.03; Fri, 02 Dec 2022 11:48:23 -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=XCrX21p1; 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 S234550AbiLBSoj (ORCPT + 82 others); Fri, 2 Dec 2022 13:44:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234477AbiLBSnq (ORCPT ); Fri, 2 Dec 2022 13:43:46 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E32F9E2ABF; Fri, 2 Dec 2022 10:42:26 -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=wYScWJRTbZ+Jo4q46g59cBC6C79TnJL57TW21p2LlK8=; b=XCrX21p1lFdgoWEka+Vo2zvWh2 hv/4fOJtdJzFhbx4LVzVHc6UuOoMb3yFAcXdYusVQm06cH6/RxdZTWG482md+6crHUDhph/ElmTWp Hg1TArPDttvVQ4Xs/y0NTiSAcB5rKHw8TpTxO2gbopkIRb/3VR+xAXDHHDL+JlmmMjso=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1p1AzJ-004Cu4-3m; Fri, 02 Dec 2022 19:42:17 +0100 Date: Fri, 2 Dec 2022 19:42:17 +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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221202151204.3318592-5-michael@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 On Fri, Dec 02, 2022 at 04:12:04PM +0100, Michael Walle wrote: > The interrupts on the GPY215B and GPY215C are broken and the only viable > fix is to disable them altogether. There is still the possibilty to > opt-in via the device tree. > > Signed-off-by: Michael Walle > --- > drivers/net/phy/mxl-gpy.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/net/phy/mxl-gpy.c b/drivers/net/phy/mxl-gpy.c > index 20e610dda891..edb8cd8313b0 100644 > --- a/drivers/net/phy/mxl-gpy.c > +++ b/drivers/net/phy/mxl-gpy.c > @@ -12,6 +12,7 @@ > #include > #include > #include > +#include > #include > > /* PHY ID */ > @@ -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 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. Andrew