Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp648661pxp; Wed, 16 Mar 2022 13:25:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYUFoHLegf1jhPnmrfOsypM+MN69BZGpc+JRhInBa3oYJKcH1M2SxPjMEhzrjZZLGZbHPT X-Received: by 2002:a17:90b:3143:b0:1bf:8187:3689 with SMTP id ip3-20020a17090b314300b001bf81873689mr1532107pjb.184.1647462342844; Wed, 16 Mar 2022 13:25:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647462342; cv=none; d=google.com; s=arc-20160816; b=vqG8JpCwHhv6Fi+xrwzDr8+k8U92cyChQ3YH2ljQS53Fr324bU6P+2ZYNR3zTyVnUW u+9beo3F4jxPRVT+ZBokKY5H2R/8FQ6RwSOD8kGkWc1FXCkEMVMCoOUzT5iaYB0PmVnQ XderXdZHmwb0Da3LWmv4sxNNIYg7rplq82VUBMYP2M/PtH1xAJGXPZQV1UVNqjleT+cE fk3Wk8b1P1nxNPBNxl5Gr3sEVD4VRrg7NJSP9hTwm7vZSm1w3mgHCbZa+Nvec4iaO7yQ 7SzmX7DXkzsW267kP6ff2LUBj1HIspkwTP2xcszDItYedOR1tKEwtvwkqz5c127pQsG4 9yYw== 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=YeKeOpimjizaz2RTQVu2Yj768QKFlAn4kgzQDtym8QY=; b=jMqXTlwPEZwsFeyzmz69t2blQCFIYXXK1JNQoGHwkT2UQ6iQ3QW0QCUdvYkvyVCX8l /RyPeCuaMoD3NSV3Y+2TcllyCr3Nm8O8EwCVVJJ5wAKiHIyQDxzFuTfELFBt/AnNeK6r VXEHNmFP4P9Jwhp4RQtctUgbfwYf7uN6yHuAieTXAo8Xp+Cz/oH8ziEFF3AjkPGPc/gu lNgE3r2xNEZoIHsakdFnEpKMZk/Aqj5qUr4Mg0AdyAqoQR+x0KUe+5ieOapCcnZMBr3Y nVHs+gN9Dz0b0HbSpieoXe61fomxZYp1OO8Ej9LOs/MF/kbvIv5itapigfBlX4CrQG8X wkrQ== 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 c127-20020a624e85000000b004f6d695c355si2676246pfb.295.2022.03.16.13.25.28; Wed, 16 Mar 2022 13:25:42 -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; 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 S242929AbiCOFoB (ORCPT + 99 others); Tue, 15 Mar 2022 01:44:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236070AbiCOFoA (ORCPT ); Tue, 15 Mar 2022 01:44:00 -0400 Received: from wp530.webpack.hosteurope.de (wp530.webpack.hosteurope.de [IPv6:2a01:488:42:1000:50ed:8234::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31AF542EC8 for ; Mon, 14 Mar 2022 22:42:44 -0700 (PDT) Received: from ip4d144895.dynamic.kabel-deutschland.de ([77.20.72.149] helo=[192.168.66.200]); authenticated by wp530.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1nTzx9-00020F-RU; Tue, 15 Mar 2022 06:42:39 +0100 Message-ID: Date: Tue, 15 Mar 2022 06:42:39 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: Linux 5.17-rc8 Content-Language: en-US To: Linus Torvalds , Marcelo Roberto Jimenez Cc: Guenter Roeck , Thierry Reding , Linus Walleij , Vidya Sagar , Edmond Chung , Andrew Chant , Will McVicker , Linux Kernel Mailing List , Bartosz Golaszewski , "regressions@lists.linux.dev" , Michael Walle References: <20220314192522.GA3031157@roeck-us.net> From: Thorsten Leemhuis In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de;linux@leemhuis.info;1647322964;af7b6a34; X-HE-SMSGID: 1nTzx9-00020F-RU X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 [CCing regressions list and Michael Walle] FWIW, I was a bit surprised to see this, I had assumed the revert that causing trouble (fc328a7d1fcc) would go in the next merge window. Seems my regression tracking work did more harm then good here. :-/ Whatever: On 15.03.22 02:47, Linus Torvalds wrote: > On Mon, Mar 14, 2022 at 5:45 PM Marcelo Roberto Jimenez > wrote: >> >> At a certain point, I tried Thorsten's suggestion to add a gpio-ranges >> property in a way similar to another patch, but the kernel went into >> an EPROBE_DEFER deadlock. Thierry Reding made some comments about this >> in the sequence. > > Hmm. The problem does sound like that particular driver doesn't use > the pin_ranges thing, so then the tests for an empty pin_ranges will > always be true. > > [...] > > IOW, it looks like either a gpio controller has to implement that > 'add_pin_ranges()' function (only tegra), or it needs to always add > the pin ranges at probe time. > > Am I guessing right that the driver that you use does neither? > > LinusW/Bartoz - this all really sounds strange to me. Maybe I'm > misreading the situation entirely. Should there be some sanity-test > that any gpio/pinctrl driver that uses gpiochip_generic_request() > would either have to have that add_pin_ranges() callback, or a > successful probe needs to always populate that 'gpiodev->pin_ranges' > list? > > Or maybe I'm misreading the situation entirely. I don't know the code > - I'm just grepping for things and trying to make sense of how that > '->pin_ranges' list is supposed to work. > > But for now, I think that patch has to be reverted. There is a another reason to do so: Michael Walle reported that the revert is causing a regression for him: https://lore.kernel.org/stable/20220314155509.552218-1-michael@walle.cc/ To quote: ``` > This breaks the pinctrl-microchip-sgpio driver as far as I can see. > > I tried to debug it and this is what I have discovered so far: > (1) the sgpio driver will use the gpio_stub_drv for its child nodes. > Looks like a workaround, see [1]. > (2) these will have an empty gpio range > (3) with the changes of this patch, pinctrl_gpio_request() will now > be called and will fail with -EPROBE_DEFER. > > I'm not exactly sure what to do here. Saravana Kannan once suggested > to use devm_of_platform_populate() to probe the child nodes [2]. But > I haven't found any other driver doing that. > > Also, I'm not sure if there are any other other driver which get > broken by this. I.e. ones falling into the gpio_stub_drv category. > > [1] https://lore.kernel.org/lkml/20210122193600.1415639-1-saravanak@google.com/ > [2] https://lore.kernel.org/lkml/CAGETcx9PiX==mLxB9PO8Myyk6u2vhPVwTMsA5NkD-ywH5xhusw@mail.gmail.com/ > > -michael > > NB. this patch doesn't contain a Fixes tag. Was this on purpose? ``` Ciao, Thorsten