Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp4115103rwe; Tue, 30 Aug 2022 05:04:00 -0700 (PDT) X-Google-Smtp-Source: AA6agR4/87Mz7H5i+u3KqXHiGyKkBtErybUnG+KbqvmA3JpgjBYz91QYyrFpUHdptgmHe8Lrppds X-Received: by 2002:a05:6a02:281:b0:42b:748e:5d90 with SMTP id bk1-20020a056a02028100b0042b748e5d90mr16654925pgb.422.1661861039807; Tue, 30 Aug 2022 05:03:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661861039; cv=none; d=google.com; s=arc-20160816; b=UJxfaaq1yl6BbVfFloNDh3snUZXOH6SJn5vE/Vw4dHXIELVh72SZsHVOMFx4HT86mY V879NkUew5vFgg+7ac3EwGOFqheDig/c026ZfdENkURU1cVLPbH7nxXPI5hKu1F3PRxM 8A7SFmBNHTl3z2B3gzCAKlt8bIRnFffLUe9wV2rD9zwVCe4BNpcev+VSp8yvRkvleKSF w5FlL1R1Dyz+gr64hxgk2MPmwUFmbPZnBY75Vogd6Qz5Kg+pwn1SaXOWpVhBVc7EKNze m7H9hMQEOB2Ef/ybM4+7W3fB+Mf4d1IRYSzj/crmJcNvKyKRJqsP2hnMyrVyHGYZ9T9b bivw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PDm4CS+d3TEzVN3RfMYIEm8la5mbkwV+TixUxTpSbBk=; b=kCT503cO1pCYgSWRpN9KiA8Xs6+CXX3ICgWEoz/4MgT0c6JMmb89c2nuHsxYfCEpiU xkbmHA6na8tgqiOJX7MnY98YS1eb/ca9KtSbUmG2/0YfYdv3DovRqqPj2KYtVgd+rcBp LZgBlQINx4qXmsUmhbzf4atRT6RZ0lk/ad09SBZJY4Trouq3LyO77gBLJvYH9SAmzx6p 7CiwcmGJXqZIhZ1t2eEvQvvwLbR+V8h0AHgzBWLHKxtqBpNrMMkZEt5D0BrPbN1zR8OZ V1Jb7nkkFyZGiG6rB22W3L2oIB5fOojwC+zUPx9/ocD/KWJcBRHABRzIDIlE0DmdtcNc lxWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w4Cmbu+f; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m16-20020a170902db1000b001729146e418si3125150plx.388.2022.08.30.05.03.47; Tue, 30 Aug 2022 05:03:59 -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=@linaro.org header.s=google header.b=w4Cmbu+f; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230123AbiH3Lno (ORCPT + 99 others); Tue, 30 Aug 2022 07:43:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230438AbiH3LnW (ORCPT ); Tue, 30 Aug 2022 07:43:22 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 844381A394 for ; Tue, 30 Aug 2022 04:41:53 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id q7so15112106lfu.5 for ; Tue, 30 Aug 2022 04:41:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=PDm4CS+d3TEzVN3RfMYIEm8la5mbkwV+TixUxTpSbBk=; b=w4Cmbu+fAEL1Kt+9VlmpNmDTQ20cWAN+cKiJsYvp0WZ5nNswwvSfZSTPvk/38TOZw7 HlkcEQriD+Kcfhizg4FzDQIUCp6davqWYa3PDBteiXORxFuT30zyOeYBw0Etj64fuXFQ wMmFFxqVqZFeXCsISzO3vZ7XFzzHBAxwuX+ColpVKwYmL1fl5ohl9vddVeqJpL5QlZbj YxNqEN8CC2aEhOFy6MzM0+IYXo6WODt+s8ikUBGcDlfokfEINExBAVcI8+iOJMQ1YcJf GE/H8fjCdp4eCMC0c2Wnt//fUmXKbDlHWQA9wlQL/KXlruwaUoAWGv3ZiFvqvIT8NcDq pAmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=PDm4CS+d3TEzVN3RfMYIEm8la5mbkwV+TixUxTpSbBk=; b=XeekJTRaWeCu3wWHlQE+YUpG/5geRL4ikVzyeE8V+nlgdGAz4IR3V6PhZqKVQTO9Z3 A2r9o/68J6k7ygCXVBD9bV/2pOZnpcc3C1ODSmjWIiWqf7wyJoBwpLF71Uai9N5IPv+S /eBiF4f5lkXb3xDgrAjF4a+YnkO/1//vLHBGSGvQtG8l5vZGn8b+/AJkMc0CDdNqj8SH BFKdfr/Ss5ZE/ROzdP/MPyWYH7xFC/2v5KrXUASx+k69vR7RMTiTpUG2ZjpyDrXs1H2I g1j+8YRrqu2WFgl8+jn0PacffgaZgdTAZluLpN7May89lP4x0a8ldcfFzC68ZT6rv1ZZ lbxQ== X-Gm-Message-State: ACgBeo2a0DMYrkLxaBZWPLSZmPSdTs1xQxcjyVXKw19a8qjgW/rlUIrh 3kte5NWJSISf7JK+ks8HdVjFHA== X-Received: by 2002:a05:6512:b89:b0:492:e4bf:adcf with SMTP id b9-20020a0565120b8900b00492e4bfadcfmr7317851lfv.203.1661859711050; Tue, 30 Aug 2022 04:41:51 -0700 (PDT) Received: from localhost.localdomain (c-fdcc225c.014-348-6c756e10.bbcust.telenor.se. [92.34.204.253]) by smtp.gmail.com with ESMTPSA id f9-20020a0565123b0900b00492e570e036sm1586569lfv.54.2022.08.30.04.41.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Aug 2022 04:41:50 -0700 (PDT) From: Linus Walleij To: Greg Kroah-Hartman , "Rafael J . Wysocki" , Russell King , Ulf Hansson , Marek Szyprowski , Tomeu Vizoso Cc: "Isaac J . Manjarres" , stable@vger.kernel.org, Saravana Kannan , Guenter Roeck , kernel-team@android.com, linux-kernel@vger.kernel.org, Linus Walleij Subject: Re: [PATCH v3] driver core: Don't probe devices after bus_type.match() probe deferral Date: Tue, 30 Aug 2022 13:39:40 +0200 Message-Id: <20220830113940.331931-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220817184026.3468620-1-isaacmanjarres@google.com> References: <20220817184026.3468620-1-isaacmanjarres@google.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 > Both __device_attach_driver() and __driver_attach() check the return > code of the bus_type.match() function to see if the device needs to be > added to the deferred probe list. After adding the device to the list, > the logic attempts to bind the device to the driver anyway, as if the > device had matched with the driver, which is not correct. > > If __device_attach_driver() detects that the device in question is not > ready to match with a driver on the bus, then it doesn't make sense for > the device to attempt to bind with the current driver or continue > attempting to match with any of the other drivers on the bus. So, update > the logic in __device_attach_driver() to reflect this. > > If __driver_attach() detects that a driver tried to match with a device > that is not ready to match yet, then the driver should not attempt to bind > with the device. However, the driver can still attempt to match and bind > with other devices on the bus, as drivers can be bound to multiple > devices. So, update the logic in __driver_attach() to reflect this. > > Cc: stable@vger.kernel.org > Cc: Saravana Kannan > Fixes: 656b8035b0ee ("ARM: 8524/1: driver cohandle -EPROBE_DEFER from bus_type.match()") > Reported-by: Guenter Roeck > Signed-off-by: Isaac J. Manjarres > Tested-by: Guenter Roeck > Reviewed-by: Saravana Kannan This fixes a QEMU regression for me: Tested-by: Linus Walleij Yours, Linus Walleij