Received: by 2002:ab2:644:0:b0:1ec:cbc4:63fb with SMTP id 4csp1141231lqn; Mon, 26 Feb 2024 08:48:28 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXOis5JDNrWyUMOijxkwdzwAHeSb/LfwdWC9N951q0dF7wXk0OaDYHwpVUrcDgrpXjsgmLn5X439AiRHGVa8vrOKbfA/ZaTgkN2ph7s/A== X-Google-Smtp-Source: AGHT+IGAUa3QI/EVA71jH61lOayYVoCLXEbBVAXDbJ3CHv0sqSiZZe3duyQkztCuHM9Lk+wpPhrW X-Received: by 2002:aa7:db5a:0:b0:566:2be1:5277 with SMTP id n26-20020aa7db5a000000b005662be15277mr88288edt.30.1708966108654; Mon, 26 Feb 2024 08:48:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708966108; cv=pass; d=google.com; s=arc-20160816; b=tIcZGS9C2lvEmF7u9QQPMMcnJRnb7MqdkUQMmUqCs/U2J1MI5R9o+iobz+nm4mVK1T fJ7xwP6jDjxkKf7Vq/fJL+M5lhKoLxL+wfsw+qFjuPflW2WZ1Z8yzk4jDTB57cHTtLYf jS//232m8BkunYMPOmct16j43ZWNl6H7V2MYSv1UXvgyBaF5WYvooFJNqIYp6FU95Ke4 +Zt9oGDtdygI6tlgYpdpedNl0IsxnFyd4eTaRFVRtb646WTNzBpHdM/Rcw9YmWcfREWX cnRXG44zj2zd5JZVPKcuJ9IN8LbBQO5tmGgAyVEl3Td0xlCbMaUA2++t/zQeCTDWVVr3 d3WQ== 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; bh=NQuOj0hlUdHDqHNupxytkXFMuRFJrbUDjSm2y06hW6s=; fh=s5Fc0MEg8Xcp85xwyejK4S4zs7msQB7g1OY0X3YpOJg=; b=pA0jb+H2pf/PN56sKXrnvfRYtVspjdyPlwFMTerSV02AAXxxL6yG6icZbLA5hMrLlO SgADNlEc4ARJtbXmZ8jmtTQ2gXBIoKFnhyvk6EnZXA6BUTXLUeAnCNxyZaCCge3mAvhL w1mpUwT5y8uN+x3KRwe9UBMQ7wrqB9W8foAPQM/h/bprNA2qH/AkEvCm5WV5sS9i04Xk NBDShj2Opm1RUbezsHpsjaDeFrxUTcrVhLAsTYksfynL0OxWOI2M2vC/gW8mSIVavsf1 fckOqvowkUow89HuN5KhVXWtGi6k1glOVABrXXiXpYNzQH2GDtv+wcddzjsnhVF7/gFm uFaw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=rjwysocki.net); spf=pass (google.com: domain of linux-kernel+bounces-81933-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81933-linux.lists.archive=gmail.com@vger.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 bf11-20020a0564021a4b00b00565d73c3fd9si1326324edb.93.2024.02.26.08.48.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 08:48:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81933-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; arc=pass (i=1 spf=pass spfdomain=rjwysocki.net); spf=pass (google.com: domain of linux-kernel+bounces-81933-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81933-linux.lists.archive=gmail.com@vger.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 37A321F2E189 for ; Mon, 26 Feb 2024 16:47:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DB99112D742; Mon, 26 Feb 2024 16:47:10 +0000 (UTC) Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) (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 C3F9012CD9D; Mon, 26 Feb 2024 16:47:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=79.96.170.134 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708966029; cv=none; b=p6iyCw4FnbxOSHYnhAcjDbN9Tmf32vAlBzvm9zi/XJ241Qr8y48DIdydPtnnpV3Rl9HAqoelNje7Pn/gLfvXpDiuaF1SYrSl+szOPy+x3fWup6Iz2Fdss/dguC1Ana+LUIkMz/AKpFl1efeZ71U+HRf6Yvx5OJm7gMZffIqnz4w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708966029; c=relaxed/simple; bh=PFacI6m4BV3rHxOR399FTPDr5BTzRgPrKVoC8SRi458=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ZeW3yFRYYP7k+85JqQwqyr/iuXEqRgbRr/0MNYe84os4WAaSqtEXidrqZIno7Kg5uLcJu8ybGxNQirVQnr7kKWsloxctHJSylkvXnDX9mq3zvKEJcDPS27HBoISKu4oWYXvSYd5JItj+eYKoAJD1CLfYWFsyUSWsA0a3+SI8FO8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rjwysocki.net; spf=pass smtp.mailfrom=rjwysocki.net; arc=none smtp.client-ip=79.96.170.134 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rjwysocki.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rjwysocki.net Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 5.4.0) id 3e4fcb9c8cea8f7c; Mon, 26 Feb 2024 17:46:57 +0100 Received: from kreacher.localnet (unknown [195.136.19.94]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by cloudserver094114.home.pl (Postfix) with ESMTPSA id AA54166A4D4; Mon, 26 Feb 2024 17:46:56 +0100 (CET) From: "Rafael J. Wysocki" To: Linux ACPI , Jonathan Cameron Cc: LKML , Mika Westerberg , "Rafael J. Wysocki" , "Russell King (Oracle)" Subject: [PATCH v2 1/5] ACPI: scan: Fix device check notification handling Date: Mon, 26 Feb 2024 17:35:27 +0100 Message-ID: <4872492.GXAFRqVoOG@kreacher> In-Reply-To: <6021126.lOV4Wx5bFT@kreacher> References: <6021126.lOV4Wx5bFT@kreacher> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 195.136.19.94 X-CLIENT-HOSTNAME: 195.136.19.94 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvledrgedvgdeltdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefufffkjghfggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpedvffeuiedtgfdvtddugeeujedtffetteegfeekffdvfedttddtuefhgeefvdejhfenucfkphepudelhedrudefiedrudelrdelgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduleehrddufeeirdduledrleegpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeeipdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepjhhonhgrthhhrghnrdgtrghmvghrohhnsehhuhgrfigvihdrtghomhdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehmihhkrgdrfigvshhtvghrsggvrhhgsehlihhnuhigrdhinhhtvghl rdgtohhmpdhrtghpthhtoheprhgrfhgrvghlsehkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigsegrrhhmlhhinhhugidrohhrghdruhhk X-DCC--Metrics: v370.home.net.pl 1024; Body=6 Fuz1=6 Fuz2=6 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 --- v1 -> v2: Add R-by from Jonathan. --- 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); }