Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2613757rwb; Fri, 20 Jan 2023 05:21:16 -0800 (PST) X-Google-Smtp-Source: AMrXdXshclVpRmmspAp9kTRr5EGNmdOg33tt+3HsgUrqPriXu+fc6AkTy7L1vTbpBzgr6z+jojiU X-Received: by 2002:a05:6402:4447:b0:497:c96b:4dea with SMTP id o7-20020a056402444700b00497c96b4deamr15743778edb.5.1674220876473; Fri, 20 Jan 2023 05:21:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674220876; cv=none; d=google.com; s=arc-20160816; b=BtryxjEXFxY8ZepaQu16FpPVeaYunL0x5VC8evcMs8+kKJkOcET119/KHR2UG7V3mc XluxhVFeGdlyT7VKcSgb62D6jYQEuiPK7TAIsjVZTc5SkjIMvqYeeMHPR8ZOYd5B8sho wa7XQHA8XGdelUPUBWig1YnJEoJLQSoiwtH732bKhRjYtCaACKd7TxHHt2Bp08UHR6iU LxXhOVWb/q61JkfFOY6BE6H67GX6JnHPb8EZ/BIa/+ukBUeuveeZzFa8B226W6aYYLga 7breTvidveTid9+f6almAZ7LcjYEAxnuCkUqGXzbxDv9PdGmWkbFqW+niI406T3MA70k X8iQ== 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=p+e/NvIB7bmxQDi/oo2C4pZKqRcCnYcGddLLRMbPNm0=; b=h1VFvCZOmIWJh3D6G/u5ZNE31VpSr8XCF2WxlWNd+UKM9q9jipE6hxdsU//Mtzwgz4 cRdHpnBEShbUx0nnsLIfDvnQawYGPBySsVKsLSupuGd8BdPh9YHZ+hosTGIE1X8LUn3/ LYjgM4wTJIktNLWsowQe/80qIgZNFN0YKdShSFm3OUNpf8IORrzf6q6YNviUFWN25HUh fOGlt/20xt+sdBQRyZ27DYU4xHoeHmr+Oz8AH+Q2FDrnZ0d690NsaVRLC2EH0oyWQk/+ JnBneaFOoiWXuHwzXAS61wRffrhRNfVUqQpj3qs/+K/VozSsrLxAtUCfXv2SszTb9EH8 uVTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=o3XvFdO1; 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 hw9-20020a170907a0c900b008775e580cd8si8156979ejc.298.2023.01.20.05.21.04; Fri, 20 Jan 2023 05:21:16 -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=o3XvFdO1; 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 S230131AbjATNIg (ORCPT + 49 others); Fri, 20 Jan 2023 08:08:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229568AbjATNId (ORCPT ); Fri, 20 Jan 2023 08:08:33 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56DA710A9C; Fri, 20 Jan 2023 05:08:29 -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=p+e/NvIB7bmxQDi/oo2C4pZKqRcCnYcGddLLRMbPNm0=; b=o3XvFdO198H87a5YtpwX4jhfou SZ9wJsRChLelf8MapxHfkTJFhY8SYUJnK29xE+5NodAKqAF083/aS5r2DBdJLuagJu4C/uS9y03a/ ZcTvleA9q2wPL1CYknJKFfGN6nbKiw0UakETAMDohpKtedhzkKgwNhFii8VEoGmON0rc=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1pIr7w-002j4N-VV; Fri, 20 Jan 2023 14:08:16 +0100 Date: Fri, 20 Jan 2023 14:08:16 +0100 From: Andrew Lunn To: Ahmad Fatoum 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 Subject: Re: [PATCH net] net: dsa: microchip: fix probe of I2C-connected KSZ8563 Message-ID: References: <20230119131014.1228773-1-a.fatoum@pengutronix.de> <64af7536214a55f3edb30d5f7ec54184cac1048c.camel@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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, 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. Andrew