Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2375801lqp; Sun, 24 Mar 2024 16:34:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXD8jr3/cTp5hyxojSM+7phm+9UzA6UY2ae4Fg/PRZUoA2HXjz6eIY9UFYgSq2mm/zZfjv2f9E52yDybHIjLomrsh0bbrVXHu9yDq2DGQ== X-Google-Smtp-Source: AGHT+IGiD1PEeSbES31Tg4vvnM2qCrHFJnKhrCpyuNT1OA58Np3orFKDmGHbY52jzY7z4gH03v07 X-Received: by 2002:ac2:5b85:0:b0:513:21a9:79a8 with SMTP id o5-20020ac25b85000000b0051321a979a8mr3796726lfn.62.1711323270331; Sun, 24 Mar 2024 16:34:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711323270; cv=pass; d=google.com; s=arc-20160816; b=scERT7aNNK9fAYWsqVBwmnThzKfVSlGqrBAmttEfY2VCKSgD4FLXkRRT1AvSkqey8d mi/e74cmjatQeibSwIWQNu59A1HzWUPZKXWjPBy6KsZBTpe5kRERmVrbCAhLrshPmVfE lf17uoF94fjWwKI9doS+cIXDIe7+2heTNFVLtNs22sxypigDRzcRxDMc0zJ8VVFsUfMM aZpRBi/HVbJNJ6a/XjSKewd2AlqW+MvrIL6JL6cPdxH1vxCuOFcRz+pcdNJ4DYXZ7AOs 6XBgByzXqy6H2AKI97KjEIh2OtL4hSS+Ya0T3sJqpZEN5uC9w1hAAP3Vv9ZnfuqxqAwd vs0A== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=/lDaS/5pHH660nzErtVj/ac118ax6VxiBAtUWZEeZDE=; fh=VkpNAQslyYhDEHRMpkRNHu8nGzV9eslPjJSb52VHu+A=; b=FCzdfWK/DTq2+meDSQwTeIpchY4aWknYfduW2pxEil3MfwCS5vbcMh2PJrLC4QwvIM ydJZkukiStsJpSHS2hgq9tLoL3q+dYeJCq+PZy3leHXxKy093VIa4nqKlrvkSMFeywUx FVn4OyZr21JrATROsCpGvw95KxUT4uxguM2pRyVZO1d8WyMUJ45Ql1jFiY41N5ZhNS6G O7WkxshuNyTwL3XvuzjaFTt0rbUqzEJRyccyb/yRs7cewMSVKtjmM79kmgJhzJGHpFVI P3cc6cPBuBdThOODQMuxEf0g//IaqDe5atNEbU5ips1K87TcZCOFy/TN3pICK16SGejS kP/Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LEYOH4jk; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113164-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113164-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id nb20-20020a1709071c9400b00a4746e4ac10si1646733ejc.902.2024.03.24.16.34.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 16:34:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113164-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LEYOH4jk; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113164-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113164-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 0ADAE1F21A4F for ; Sun, 24 Mar 2024 23:34:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 322301741DA; Sun, 24 Mar 2024 22:39:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LEYOH4jk" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 549B5172BD4; Sun, 24 Mar 2024 22:39:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711319966; cv=none; b=qzhIvtJwb7hbENtVts1VRJ7HkXvXCeU+NhfIP6sHtsNiZuJ/VucZKmh8csZQcTHIf+uOtgBKYI0CukyZIVusy2rsgy+xJXAl2XexCUxSGP93JfcketuxMImhFE55bLolnfqKfGVdSgdwsbiP5rX0dpWK0NqSwwuMzdBLDa6le48= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711319966; c=relaxed/simple; bh=G2nFSWvTjRA3LBCHCsROK0kX2JXbUoFgeHqE6piTCxw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XTejY1wTPw0UvMTaM0RiUOKb5Bhl8KWkoFPSS1nufimSPTNLuLnWQJ/EvTZsmvwYfEsejbXzxIRb+Te9TU1J1zBG83KmQOBN02WHAo0yBL4HkUjg6nqSfFKS+vUHVQNP7laHohhQLUZfvYXHUEoDaEyReK6wQURL404tZnG48GM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LEYOH4jk; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 886B4C43399; Sun, 24 Mar 2024 22:39:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711319966; bh=G2nFSWvTjRA3LBCHCsROK0kX2JXbUoFgeHqE6piTCxw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LEYOH4jkULON/ymCKVkFnWzG9/dMn68uoYWx0ShJSLxeuF5LAV8syMr/l0yVLk4Z0 5ed/MO9PaV2Vyec2VvBYsD4vytvfmRssKzxpbrZVFyGF4m73mZ6ZhD+/nJTBtxKEqX nhyUcXSOfIbHLYTbr7rDVyV1C/mb1zXB9j8vM8rFS6iXx2CA45TRXrcEFlqx98kj1i GkRlsPphAq5TCgF30ox5kWt35R3LRZxidE0FwSBnM5tPsn6CzctpxI5Z4zeApYPCq5 CiMVfQ7mPhK8pbNrvQzriF7P3Y/O9/eE6ftf9oC1Tx++euHjCR+LsTYtbKOLAeh3Me PtqUrBK016XJA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: "Rafael J. Wysocki" , Jonathan Cameron , Sasha Levin Subject: [PATCH 6.8 273/715] ACPI: scan: Fix device check notification handling Date: Sun, 24 Mar 2024 18:27:32 -0400 Message-ID: <20240324223455.1342824-274-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: "Rafael J. Wysocki" [ Upstream commit 793551c965116d9dfaf0550dacae1396a20efa69 ] 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 Reviewed-by: Jonathan Cameron Signed-off-by: Sasha Levin --- drivers/acpi/scan.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index e6ed1ba91e5c9..617f3e0e963d5 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -314,18 +314,14 @@ static int acpi_scan_device_check(struct acpi_device *adev) * 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); } -- 2.43.0