Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2615835rwb; Fri, 20 Jan 2023 05:22:50 -0800 (PST) X-Google-Smtp-Source: AMrXdXsr/R9hROURTol8Eclh723AOiCfSszjVyqQ4R9CW4Bm7Y0s/1EOapvSeKXxZXvBDQgseHV0 X-Received: by 2002:a17:906:22da:b0:7ac:2db9:6f4d with SMTP id q26-20020a17090622da00b007ac2db96f4dmr27694317eja.8.1674220970385; Fri, 20 Jan 2023 05:22:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674220970; cv=none; d=google.com; s=arc-20160816; b=yX8xnGwXp/3rZYvIPnA/qYOfM1sQYK3vB+gNQ7tmUrAEE8kC0AMxvuIipxsYVZMJcu zPXIoHM9O7Lgm4JabXTVOcidisDIuhjMwF5QYEZ2T0lpECEfbccqPZC2Ca8jbSrpYaeq /7idr11eNnqrUQXfWS8Ip3gqvhhVlk6N7qbD5UMIh9hayqTgcW9J2kQ4bkXAzEpWSoJ3 MGrJ/drhiF9XFG1FQDga8ttAvRl3+giqnRnYYRkrpw4iy6l3BQii9x9etf06lKT1GWT3 UabuDh4cH576uAaAb5b7MNGOVg7NMr1V9m7xMn3VQIgPRtnM6z/nWdrz9kc5eJJzRxUM g7iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=9MqGu8hi9/YK3xF1xXh7zT7bIkhkypGqQtL5JC0dJp0=; b=ghIckAMA8QkkBWOfC6VulfPL0H8ooMRYgP0twpg76sHSD9N2sGl0D8OPJ+yyIjdGZm cruhje99lXl318XwRjps+vF4bUQ95cIBoqbmcInrTzFvHc+aKKUcsIQV3/CNt5ujMk0m ocb69lsYYZ2+wLf+jO44jye6GCtcbqvvZv5f6VdEfo4QiE3al7iBgxp2hf0w6VZGZ6j0 zWWyIhXdoU6FxDfb6+J8Z5M9W5p/NtQ+leoX4JJ/vw8ut0PruJfuIxaan3XJ+sXYpE1+ plidlLkSMNQbyivOByWiCgc9FaMkaDyGMQZtAQWPtm0N76jxGo5QfSLYXdd9wqTdVSDD 0PwQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sy23-20020a1709076f1700b008778924dd93si2963820ejc.918.2023.01.20.05.22.37; Fri, 20 Jan 2023 05:22:50 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230517AbjATNTB (ORCPT + 49 others); Fri, 20 Jan 2023 08:19:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230468AbjATNSh (ORCPT ); Fri, 20 Jan 2023 08:18:37 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D63ECC41FF for ; Fri, 20 Jan 2023 05:15:38 -0800 (PST) Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[127.0.0.1]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1pIrEo-0003Ao-A6; Fri, 20 Jan 2023 14:15:22 +0100 Message-ID: Date: Fri, 20 Jan 2023 14:15:18 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH net] net: dsa: microchip: fix probe of I2C-connected KSZ8563 Content-Language: en-US To: Andrew Lunn Cc: Arun.Ramadoss@microchip.com, olteanv@gmail.com, UNGLinuxDriver@microchip.com, f.fainelli@gmail.com, kuba@kernel.org, Woojung.Huh@microchip.com, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, pabeni@redhat.com, ore@pengutronix.de, edumazet@google.com References: <20230119131014.1228773-1-a.fatoum@pengutronix.de> <64af7536214a55f3edb30d5f7ec54184cac1048c.camel@microchip.com> From: Ahmad Fatoum In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: a.fatoum@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Hello Andrew, On 20.01.23 14:08, Andrew Lunn wrote: > On Fri, Jan 20, 2023 at 08:57:03AM +0100, Ahmad Fatoum wrote: >> Hello Arun, >> >> On 20.01.23 08:01, Arun.Ramadoss@microchip.com wrote: >>> Hi Ahmad, >>> On Thu, 2023-01-19 at 14:10 +0100, Ahmad Fatoum wrote: >>>> [You don't often get email from a.fatoum@pengutronix.de. Learn why >>>> this is important at https://aka.ms/LearnAboutSenderIdentification ] >>>> >>>> EXTERNAL EMAIL: Do not click links or open attachments unless you >>>> know the content is safe >>>> >>>> Starting with commit eee16b147121 ("net: dsa: microchip: perform the >>>> compatibility check for dev probed"), the KSZ switch driver now bails >>>> out if it thinks the DT compatible doesn't match the actual chip: >>>> >>>> ksz9477-switch 1-005f: Device tree specifies chip KSZ9893 but found >>>> KSZ8563, please fix it! >>>> >>>> Problem is that the "microchip,ksz8563" compatible is associated >>>> with ksz_switch_chips[KSZ9893]. Same issue also affected the SPI >>>> driver >>>> for the same switch chip and was fixed in commit b44908095612 >>>> ("net: dsa: microchip: add separate struct ksz_chip_data for KSZ8563 >>>> chip"). >>>> >>>> Reuse ksz_switch_chips[KSZ8563] introduced in aforementioned commit >>>> to get I2C-connected KSZ8563 probing again. >>>> >>>> Fixes: eee16b147121 ("net: dsa: microchip: perform the compatibility >>>> check for dev probed") >>> >>> In this commit, there is no KSZ8563 member in struct ksz_switch_chips. >>> Whether the fixes should be to this commit "net: dsa: microchip: add >>> separate struct ksz_chip_data for KSZ8563" where the member is >>> introduced. >> >> I disagree. eee16b147121 introduced the check that made my device >> not probe anymore, so that's what's referenced in Fixes:. Commit >> b44908095612 should have had a Fixes: pointing at eee16b147121 >> as well, so users don't miss it. But if they miss it, they >> will notice this at build-time anyway. > > So it sounds like two different fixes are needed? For recent kernels > this fix alone is sufficient. But for older kernels additional changes > are needed. Is it sufficient to backport existing patches, or are new > patches needed? > > Please start fixing the current kernel. Once that is merged you can > post a fix for older kernels, referencing the merged fix. I misunderstood the issue. It's indeed a single commit that broke it. I just sent a v2 with a revised commit message and the correct Fixes:. The fix can be cherry-picked on its own to any kernel that contains the offending commit without any prerequisite patches. Cheers, Ahmad > > Andrew > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |