Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp555563rdb; Thu, 22 Feb 2024 11:47:25 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU+w3kKLPMsfZ2KDAwy0zJOtXqDa7mbBLu6YdErtdgrXzogA5xcbwhhQbw4QoUNNnSbT3M8rfNY09nJkQEhzyMgCa2fzNEQHEoY4XdcEQ== X-Google-Smtp-Source: AGHT+IHXoafBxat/5O33hKk3N6j3SGTuDWLf2akXBwPCc4oWjTclJRlwwbwDZwj9LeEHjbGD9FMV X-Received: by 2002:a17:902:d48e:b0:1dc:1e7c:6dd4 with SMTP id c14-20020a170902d48e00b001dc1e7c6dd4mr10446782plg.68.1708631245437; Thu, 22 Feb 2024 11:47:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708631245; cv=pass; d=google.com; s=arc-20160816; b=kOqkimKjC/X2LmTcdaQuekO4ZwphPHLauRUSBM3Isg6j8m0cnu7f3L/MVxUhpHw7IK JR1uKu3pIbDKMjPtjTMoLpLJ/2RN3WG5wsukuuSQfdq0YAZL9YHXuNvbIThn2ex5uv0e Hff6PC7yF1K2Z1xG49WGbej0K1cgb2dGm3E9GkF4v0gUNG2j/RVlo5YUjvKOEGf2zpsn BO/wF0lblIvlRt4CQHRFdVRCcwxGd7GlbPQadslifSmIJprb0iKd3pEds7dc2ecOZEgY BFLS8MN+RMmWwuUD6u0cwgHMA3nIY6DKPY0j7D2Svg+6jgz8CF2YQOLnZTiQHbjDLKr/ UmJw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date; bh=zkCmhzSHfUGzNuz/PIwzD/ZiZ2V+zbr5uEIW0aNPuEk=; fh=qca6Lao8FW7Clj+3Gs90PIlM0S5qGE+Ig2lyYgPloPw=; b=cumDlhZLSuGKCbLibI6SaMURoGCd09mzRKaS9ohED0G4QS0UYyYCSxqfeSPl7+d8SP k5KMojZHE8c6v+qWB+0Mop6vfud5W746xmT/jtdhO30tvjAqh361HEu8k3Sp7EhVN3ew sSVL3OQkQBbn+JCgOUbuMxHTS6FTCg4e7Pu9eNijkPvYcTCbKo2utpvAoe/zwoz3Cw1G P/av2exA1qVAzDIwb7q58MnJUrRz3uOyCJrQHFvDeiLWetXFWPYLt9PPMtyRMRvhpb8N 6m33DsYU4GKT8sNGBMW6Sy60IeJolLLr/54X1rsoJ76jMiS+qCaLEvi3gIrL1m0StD4D N0OA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-77203-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77203-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id b9-20020a170902d50900b001db7d1afd64si10988170plg.342.2024.02.22.11.47.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 11:47:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77203-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-77203-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77203-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 7E49EB2D226 for ; Thu, 22 Feb 2024 18:56:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 33C7512D205; Thu, 22 Feb 2024 18:51:07 +0000 (UTC) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8843512D1FB; Thu, 22 Feb 2024 18:51:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708627866; cv=none; b=RX0qEcM1XA4PD5iRTCrjKVVvzRYi3wJ2dCZ+JV7Dg7btBGVKwaZF4uoK68rSeC8qUQ4B8BI3yMkdWyB1jfokuPVxq/RKsVRzMImupNzvMerFnMZwIrNJlF87UpJVz2mudObXenCCN+nHy1Xle86QjYU4Xlt5xZyVhrto84Lny7A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708627866; c=relaxed/simple; bh=uF8n5frPiummjo0/NnhXvolUhAv0sKOfCyhG9BGm5qg=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=t6eF6+kYRfrXZtdqwM/VZk86Jcc6TwFT7BvKFSW9snXyhdnjcUigcWUWvSGM0iL3X1Mu/oXLLFg2rTKeuPT+0lMQ6V1w9ulE88WuI3FuYqah4bbEuA7FPAfkJ35dl2aaGzw3vY+O9Pk6S80+E7WHsrCOaadKENODm5RHjYwt8xg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Tghvv6sT0z6K8pZ; Fri, 23 Feb 2024 02:47:23 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id CAE851412EB; Fri, 23 Feb 2024 02:51:01 +0800 (CST) Received: from localhost (10.195.247.94) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 22 Feb 2024 18:51:01 +0000 Date: Thu, 22 Feb 2024 18:50:59 +0000 From: Jonathan Cameron To: "Rafael J. Wysocki" CC: Linux ACPI , LKML , Mika Westerberg , "Rafael J. Wysocki" , "Russell King (Oracle)" Subject: Re: [PATCH v1 1/4] ACPI: scan: Fix device check notification handling Message-ID: <20240222185059.00005f40@Huawei.com> In-Reply-To: <4886572.GXAFRqVoOG@kreacher> References: <4562925.LvFx2qVVIh@kreacher> <4886572.GXAFRqVoOG@kreacher> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml100005.china.huawei.com (7.191.160.25) To lhrpeml500005.china.huawei.com (7.191.163.240) On Wed, 21 Feb 2024 21:01:02 +0100 "Rafael J. Wysocki" wrote: > From: Rafael J. Wysocki > > It is generally invalid to fail a Device Check notification if the scan > handler has not been attached to the given device after a bus rescan, > because there may be valid reasons for the scan handler to refuse > attaching to the device (for example, the device is not ready). > > For this reason, modify acpi_scan_device_check() to return 0 in that > case without printing a warning. > > While at it, reduce the log level of the "already enumerated" message > in the same function, because it is only interesting when debugging > notification handling > > Fixes: 443fc8202272 ("ACPI / hotplug: Rework generic code to handle suprise removals") > Signed-off-by: Rafael J. Wysocki Seems reasonable to me. Not sure it fixes any bugs anyone has seen in the wild though. I'd not give it a fixes tag without such a known case, but your subsystem so fair enough! Thanks for resolving how to handle the processor case. Reviewed-by: Jonathan Cameron > --- > drivers/acpi/scan.c | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > > Index: linux-pm/drivers/acpi/scan.c > =================================================================== > --- linux-pm.orig/drivers/acpi/scan.c > +++ linux-pm/drivers/acpi/scan.c > @@ -314,18 +314,14 @@ static int acpi_scan_device_check(struct > * again). > */ > if (adev->handler) { > - dev_warn(&adev->dev, "Already enumerated\n"); > - return -EALREADY; > + dev_dbg(&adev->dev, "Already enumerated\n"); > + return 0; > } > error = acpi_bus_scan(adev->handle); > if (error) { > dev_warn(&adev->dev, "Namespace scan failure\n"); > return error; > } > - if (!adev->handler) { > - dev_warn(&adev->dev, "Enumeration failure\n"); > - error = -ENODEV; > - } > } else { > error = acpi_scan_device_not_enumerated(adev); > } > > >