From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f172.google.com (mail-dy1-f172.google.com [74.125.82.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 352593E1688 for ; Fri, 9 Oct 2026 12:14:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791548077; cv=none; b=gFMHBWyTxH3GfEFoh5yOIw46vJP8MgHT0My/Goc7iJko8lZZV9WLDVD5Ok5T3iMsuVcyBev3Us7EN4aP0qGEqvAL9D+0XtN9LeplLmZoDqyQTmA4JdUmgr7668IuYakS0MwJZFLKwSC+2UKP5W2DNeHOxsOFWlOmABGl9hyvUeQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791548077; c=relaxed/simple; bh=0wp4vMpTTbKxmOcrBbd4LZZUzPZPjqMgHGJhHKYOOwI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BhM+47QvMjqVGsV57+fv2FMOgrnq2AkP9zEGAzAbmGSI/2mOnBPuxqakA2ksnr4wEpn4CeQZ5JcSOdONGPQpGS9SBn9dEJgffMWW3/dn0hBPCOsyazMXqK/2grsYN9ia4KtvQMquzFgA//TBQyin9K5Ug9Ypv+gKnmiRliTCYCk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Z9nmZpe4; arc=none smtp.client-ip=74.125.82.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Z9nmZpe4" Received: by mail-dy1-f172.google.com with SMTP id 5a478bee46e88-3515f9a5d25so3043246eec.0 for ; Fri, 09 Oct 2026 05:14:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1791548067; x=1792152867; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=a1/r00KwLC71l7qD8SlMXbKms6f/x3lGEnJZwDjSrz8=; b=Z9nmZpe4CrdMXiwTD8nj+ROgWtOqY0nySjUqKYHV10R6zGopaxoyIgPED7KYucoePl xaM6O8nyG2MsLaFaeXXX7HQICqDHsx1XzlavOp51nPPMwP1JQCr355/nYaaC70heC9FC vNm2jpr3KJl55hrZCmL8YDkz4MhiMhYaPA2aw2E7nFqWVIUg290H3XyGFlvjcxVdhn5Y eQAnuNyVNMkmsRksYbjr97vIQCPg5WSRzO9XBYdGyIGd+lHZ7uA0/SSKZ75q4aFGgc8r nsfv/lm4kuE8MF7WjhdikAk6AU3U0RN+hOGQmAzPhDYWd/PZtQn0E9t7i4Qw55ms5bDP urQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791548067; x=1792152867; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=a1/r00KwLC71l7qD8SlMXbKms6f/x3lGEnJZwDjSrz8=; b=YBQwZ/QkQAG43fpPSrGRrhc2MEw8+wQgAH2gYM0zl74My4hbNtBMwi5dqLxfH9hJ2S cKbjAmLAeOre8qFTMRmn2OsMcVzeNHO9Q/oSl5vHdBmaaGa/waukGZFB1T1B0ZzFXDyU 9lmC6RnvNgVZ8wLiJEbySADbkpU1Sk/CvKQNcha/cyvdNs4s8yOwAYZCjua7SgxBZpDX eGFb/n9zkFXaRdX7SixGNsKcqX4iKrIXxu3S6SfHvX4jKrlTuAnQiuTw90b5iPWP3KsM Os1Yg5VnkuB2ShcXZlMxalln2NGV4hQdd/AiXl5ASk2AY5+9P16n7NsH1jXQuRjw3FO7 UGGQ== X-Forwarded-Encrypted: i=1; AKwUvByk4CWzwYiZTReJGznuyMhwdGkER2hRjIEW64a8YHHSyIuDHCbytgh9qu/sfzSKpWVYGWUOzj7vYYw=@vger.kernel.org X-Gm-Message-State: AFuF++nm8qwplNM4frFcL9o27yxMTYYmaThzsiDpddavPho4HuIjEhLm ekX0Fm8YpXOv8qjPAZO5y/PqpAM/J3cQyKYEA5pswkAjVcqiaI/FXevN X-Gm-Gg: AYBFou1kMXqlQXp+rILSOL0RHcMmfDUUgONQeXWSSvp5JQ6azz41w8myDz+eJVmocUt 0XBkWk/Ps9y6kM6wVXjf4SnqOWBZjGyRob1n+Q9Gnz5pVP8pM1NATvX796uUQtbe0ZchqQYP9vE ehzYkFU43/liJLWC00CJEFplAG8L4iApNSKPrFoZgH3p73szhosCFfHhKXV22RpH4GN7/6wYY5x moUlkthdQIc0+Id9BKEUCueq/XyqicBoMGbtrgtFLD4GpvM/jPO2rC3oCWwXxLCawE/uygHsqk7 cW0nRDvUT9gAj4nzUwxkLZ9IGQoqETzN8NwdN1gJRTzF5HD5mYTDiFa1LYI8IvbFNzHJ45ZdO5b cWavBkn2y2Uq/ujGlhyU8JS1WnreIYy4NOG30wb9jP4ilk615WzfJZ8ThncT3ILMhvOJ0DrhrTk 73Xa9yCtyMW0rrondYixJI9FSVkcIMfuocEKduq2YNlNUcRmmOIG9ReC9AzpUGqGhiiDdaG9Gne wTo5gIp X-Received: by 2002:a05:7301:4b09:b0:351:2958:1740 with SMTP id 5a478bee46e88-3537e088bf1mr2376765eec.37.1791548066814; Fri, 09 Oct 2026 05:14:26 -0700 (PDT) Received: from maclinux ([2803:c600:9110:8ba5:1c75:eeaa:b22f:20dc]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3537ca1ba7esm6895458eec.7.2026.10.09.05.14.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Oct 2026 05:14:26 -0700 (PDT) From: =?UTF-8?q?Francisco=20Beltr=C3=A1n=20Millal=C3=A9n?= To: mjg59@srcf.ucam.org Cc: helgaas@kernel.org, rafael@kernel.org, bhelgaas@google.com, linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, lenb@kernel.org, linux-kernel@vger.kernel.org, d@rrell.co, andreas.noever@gmail.com, westeri@kernel.org, YehezkelShB@gmail.com, lukas@wunner.de, linux-usb@vger.kernel.org Subject: Re: [PATCH] ACPI: PCI: take native PME control on Apple machines Date: Fri, 9 Oct 2026 09:14:13 -0300 Message-ID: <20261009121413.23538-1-fbeltranmillalen@gmail.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi Matthew, Thanks for going back that far, and for the explanation. On Fri, Oct 09, 2026 at 01:23:08AM -0700, Matthew Garrett wrote: > I /think/ this was the set of parameters that my machine would hand over > via _OSC if we hadn't called _OSI("Darwin") - but it was over a decade > ago so I can't promise that's the case. I think this probably needs to > be tested on some older machines as well just to ensure there's no weird > breakage as a result, but if PME is actually hooked up and there's no > SMM managing it instead I think that's fine. On the MacBookPro14,3 both conditions seem to hold. With the patch, the root port takes the PME interrupt as soon as a device is plugged in, and the controller is resumed in the same second. Without it, nothing picks the event up: the controller stays suspended for over a minute with PME_Status set, the GPE the firmware declares for those two xHCI controllers never fires, and its handler doesn't notify them anyway. I can't look at SMM directly, but if the firmware were handling the event itself, the controller would have been woken without the patch, and it never was. Darrell saw the same fix on his MacBookPro14,3. You're right that older Macs should be tested, and I don't have any: the patch has only run on my machine and Darrell's, both MacBookPro14,3. Two things make me think the risk is small. Handling PME natively doesn't turn off the firmware's own wake path, so if an older Mac does use a GPE for this, that keeps working. The only side effect I would expect is the PME driver logging "Spurious native interrupt". And on these machines the kernel already takes over hotplug and AER without asking the firmware, so PME would be treated the same way as the rest. If anyone on Cc has an older Mac and can try it, I'd be glad to hear how it goes. Thanks again, Francisco