Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2561627lqp; Mon, 25 Mar 2024 02:39:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV96Bx8zQa/jw74Bf4pD+Ne297Z1SOCAWOkeO+HivfPEujjuzefjiNi3lwORz3/XBIQwrNxJOpSL+sPl+vxonVAccIT4g2QuvqiaXwmpQ== X-Google-Smtp-Source: AGHT+IFI9BaSprEisELFTsJy8V7HUHNLld46CGOjWN27aY96OaUXN0X8hiuEX+CapHvDwYSvc6Nh X-Received: by 2002:a17:907:7613:b0:a47:3766:cfec with SMTP id jx19-20020a170907761300b00a473766cfecmr4511725ejc.9.1711359583584; Mon, 25 Mar 2024 02:39:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711359583; cv=pass; d=google.com; s=arc-20160816; b=tKqXO05YYPtlsJkKb3kAopsWFSYODTBl9kSZPDjmMFQTGiHW+WDU6WU7AuCegm79IF fSeidYcrUnoG0YWdWYVDpmZCNe1mDqLTJ0Gm8lsbJUXUt1q954My7xXpI2PCymTS12Yn yKTehoDCGe2CwG829Wy1l7yqiuhqilwX7UISmxErKtG/DAKeWwhdq39CjV5hfdOnUzDo 6tYBLT19MbylX4gkVFoYwlaaZpTw3ke9GOko2cysYilw7+F+dbv05VZHZSrXeVoMKqpP jtK3wes95qTakktib382fXfGempenbK2oxC2guqtSNLKL/MOzk3/dAAjlOPsUspYNthB EtkQ== 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=Nvyv3q6XhzI63oKUm3XTuqdn1fdQK1SxFhIbugN6nKY=; fh=VkpNAQslyYhDEHRMpkRNHu8nGzV9eslPjJSb52VHu+A=; b=FvM8PpyohcWWzefCdiUe5C+58+NmezL40GoKDmEp3bCmRQs3XHNYsyEL4BM/NinLY7 l+78C9NSD4RtE2DutM/T4paDfe3Px+kz9QrJnw00x7AwytBH6pnS454O8Ed7fNf85h0p D0lP7xLSQFA/lhSrYP8PZ7yWCdZxDNCLRR1I3IZgKqSWNREVPhAIJKs157oJB4CV88vJ tUpAmy1Rq650D1zBNSsC+gI5GL56Bj5fmp8sbSigv0G66pc1uTbokhe/iEZ0SAr0sa1O wNpMS1GnWrVmunJnjfZfgeTK+lvRkjSDdFl9VgoMPLTFglGuGm+cquNasXhh1Fycu6ar IyuA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UwzKdkiS; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115885-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115885-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. [147.75.80.249]) by mx.google.com with ESMTPS id gf22-20020a170906e21600b00a473c31d30esi2387634ejb.932.2024.03.25.02.39.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 02:39:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-115885-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UwzKdkiS; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115885-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115885-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 44B471F37B40 for ; Mon, 25 Mar 2024 09:39:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 00BA222752F; Mon, 25 Mar 2024 03:02:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UwzKdkiS" 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 53C0E148315; Sun, 24 Mar 2024 23:15:08 +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=1711322108; cv=none; b=L5+blqR2FnnGnFyXtsUK1h74TTC1inEuvrjKZ9v++KoCtc8qK79jvbUXttPejT2ToLfbT2e/ZsDQxPGaphA0PPeRh2To2UvtOHYTMJKfI4KP/40AzuKp+y4GPBDLo1Y6iYENs/lwOlND9TRPEAb9b2d2Jq7y3fwHrNaoU2oxtXs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711322108; c=relaxed/simple; bh=s34dqxsBVuJEo+Uhd4PDQPvUNDoBzlzGIbyFisqBYbU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GbW8gTZqZMzKk0c/wpbHejmLdbBiDczBIly+ct8HKNFsEncDZjhv1sJodYMVY+MTFzNV2w1NY+gGXsEzp7wAPXq/zoT345o5OMMEpFrrEnTZlH5ApqEEPtaOlxuWm+vJlJ150htpE96HlIzUr8Qj1A8Gk50nzaTv324Pt6U6lqE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UwzKdkiS; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 89E6DC433C7; Sun, 24 Mar 2024 23:15:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711322108; bh=s34dqxsBVuJEo+Uhd4PDQPvUNDoBzlzGIbyFisqBYbU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UwzKdkiSWpYYGaofCtGKQIKs0Rjud+GfGz4pOK15LWP2dOE738BSzMW45bKn1xbMX yt4sduZtNuEmqOqu1RNFD4MnskVDHjtpWAct6biyXGN1YGcQCTkxvUs/nLObdACtsw wExaL51nFO3q7Hz1ZnEGQg1cf5vsXlVXfH3aept9jIH/wqetSL+H63vTC+xd1UFMiz GWzbgjA9WDdsu1WDO8ebs3yD0SKgci7HFkOFyCOovMwYBUgPn+Dggg21+rRzW/+KLy ka3eQ2gZQP63pjjS4XbxSeUjOmimscA+ImhSloPTCLjBvP1JwYpz5dyIQgOvzrXWKC rpVLejDRCTdsw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: "Rafael J. Wysocki" , Jonathan Cameron , Sasha Levin Subject: [PATCH 6.1 183/451] ACPI: scan: Fix device check notification handling Date: Sun, 24 Mar 2024 19:07:39 -0400 Message-ID: <20240324231207.1351418-184-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324231207.1351418-1-sashal@kernel.org> References: <20240324231207.1351418-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 94154a849a3ea..293cdf486fd81 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -315,18 +315,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_present(adev); } -- 2.43.0