Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp8277018rwd; Tue, 20 Jun 2023 12:45:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6WS5h/24w9gQLSy9OL0ZVRy6IUoCHNypyv0CLL/a+ExHrUZSwtpO8xUzOex4aEqoufaFKQ X-Received: by 2002:a17:902:d504:b0:1b6:69dc:44c9 with SMTP id b4-20020a170902d50400b001b669dc44c9mr5793893plg.62.1687290352763; Tue, 20 Jun 2023 12:45:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687290352; cv=none; d=google.com; s=arc-20160816; b=0FjNIVma9F90ZJlMnBN7FSGFT3dIKFU194dYWoBxj1Q8theBsh6mhJ4rmacmVostFn 4OAQz/aOhhNC69oikrjKkwpMNAGuL2s1wO8LhVCaNYw/tC7C4lFGUYsrgiVG1jm6HV7H 71hVTOnGRVSHWFt8uxQdn+5NEEkOue1sCc99+pZdFvZX5tsHtJD0ygDVyguZzCS+2UrD YYDhYY9umhQZ8xb0as1Fr9Baknrcy02Gk9xkRQflKvnHZEWzITOBYgkCQJ+xYuwkFJnt W6LOU6zLelcT8qTrw/ozHHeF/gIx/MUHSIuPkG8mskQbLV5f2ZFlOzPgIcEsEQppSgj1 Z8Vw== 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=fo/Ob0KLpIGN+a/RSOJyxjLCvbABz+sPt5T9bSGSNJs=; b=csN3DYm8mhibPDvjsj35ip4uwGsy4013rQjnUgXzWTBckw1ZFK21yNticFnkWC+H8T ia0+jzO8ReJ469szvRvldx/sEP97sBE/9jMpNCuUNm3F5b/tmJqK3DHP1PLp3JFZsMGO UieOKtigAjlyn4mHx0sIi9UzOGdFXtATGSL2R4Sk4RKlQxBK26Uhd2OODob4KuMXrp7Q bg3spXyeH1Mm1CEWXSPxwmFm5fi90MoTU6u3bf71roY/CTeTswmGOgi1olAUuZOdj2JU KMOxAAqRByO6V2Hqdpj0UsZ6jGjYv2iwq9oMnuvNQFxddlCgdmeofeaqVXXcnk0V1xcO Jb8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=zkcJHK3b; 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 n17-20020a170903111100b001b55b830553si2668465plh.193.2023.06.20.12.45.37; Tue, 20 Jun 2023 12:45:52 -0700 (PDT) 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=zkcJHK3b; 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 S230410AbjFTTd1 (ORCPT + 99 others); Tue, 20 Jun 2023 15:33:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229574AbjFTTd0 (ORCPT ); Tue, 20 Jun 2023 15:33:26 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D16B51704; Tue, 20 Jun 2023 12:33:25 -0700 (PDT) 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=fo/Ob0KLpIGN+a/RSOJyxjLCvbABz+sPt5T9bSGSNJs=; b=zkcJHK3bVcB6Jmw9PV+rGTplAy 66NnVtWzwKQZgvVe6VGDg16mALXivovFcINYRPTd5sSWcgLeVsFCtvtuw6uFh2chLVqhBE80Tve/2 aRLYSk8DzPVACiNLJdGl4UIho6psg974vtqDiwd2zRg8ebA/d+3vUwaEY2EcYg0H51Qc=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1qBh6K-00H3Fu-6T; Tue, 20 Jun 2023 21:33:16 +0200 Date: Tue, 20 Jun 2023 21:33:16 +0200 From: Andrew Lunn To: Oleksij Rempel Cc: Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH v1 1/1] net: phy: dp83td510: fix kernel stall during netboot in DP83TD510E PHY driver Message-ID: References: <20230620125505.2402497-1-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230620125505.2402497-1-o.rempel@pengutronix.de> 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, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Tue, Jun 20, 2023 at 02:55:05PM +0200, Oleksij Rempel wrote: > Fix an issue where the kernel would stall during netboot, showing the > "sched: RT throttling activated" message. This stall was triggered by > the behavior of the mii_interrupt bit (Bit 7 - DP83TD510E_STS_MII_INT) > in the DP83TD510E's PHY_STS Register (Address = 0x10). The DP83TD510E > datasheet (2020) states that the bit clears on write, however, in > practice, the bit clears on read. > > This discrepancy had significant implications on the driver's interrupt > handling. The PHY_STS Register was used by handle_interrupt() to check > for pending interrupts and by read_status() to get the current link > status. The call to read_status() was unintentionally clearing the > mii_interrupt status bit without deasserting the IRQ pin, causing > handle_interrupt() to miss other pending interrupts. This issue was most > apparent during netboot. > > The fix refrains from using the PHY_STS Register for interrupt handling. > Instead, we now solely rely on the INTERRUPT_REG_1 Register (Address = > 0x12) and INTERRUPT_REG_2 Register (Address = 0x13) for this purpose. > These registers directly influence the IRQ pin state and are latched > high until read. > > Note: The INTERRUPT_REG_2 Register (Address = 0x13) exists and can also > be used for interrupt handling, specifically for "Aneg page received > interrupt" and "Polarity change interrupt". However, these features are > currently not supported by this driver. > > Fixes: 165cd04fe253 ("net: phy: dp83td510: Add support for the DP83TD510 Ethernet PHY") > Signed-off-by: Oleksij Rempel It would be good to add a Cc: . It will probably get back ported with it, but the process does require it. Reviewed-by: Andrew Lunn Andrew