From patchwork Fri Jul 8 13:14:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 588829 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A357C433EF for ; Fri, 8 Jul 2022 13:14:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231921AbiGHNOa (ORCPT ); Fri, 8 Jul 2022 09:14:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238044AbiGHNO2 (ORCPT ); Fri, 8 Jul 2022 09:14:28 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EA0B510CB for ; Fri, 8 Jul 2022 06:14:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657286065; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=xahRR/MGCN4opUKZtfERLy3MATM50vexXH0Q0OxZ6Kk=; b=QQE/vPHMRwFSKvenSXNGt7xWAKTQSTQ6jCZGArLhSzzkk27ls/CFD61vKCG3j1Pn1ezl+R Zm2r7x8HmMqwhnbvem73ppYJcAEIlU6YDrWumNQzZb3MH0EU5D/z3q55FNTZsPYH1qniYK VB4K0QMePo3+JGlhgoH9ad3IS8rU/cc= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-635-vFZrUz05PrOtVJI0C0VS3A-1; Fri, 08 Jul 2022 09:14:15 -0400 X-MC-Unique: vFZrUz05PrOtVJI0C0VS3A-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 64F2219705AB; Fri, 8 Jul 2022 13:14:14 +0000 (UTC) Received: from shalem.redhat.com (unknown [10.39.193.188]) by smtp.corp.redhat.com (Postfix) with ESMTP id B43461121314; Fri, 8 Jul 2022 13:14:12 +0000 (UTC) From: Hans de Goede To: "Rafael J . Wysocki" , Mika Westerberg , Dmitry Osipenko , Mark Gross , Andy Shevchenko , Ard Biesheuvel Cc: Hans de Goede , linux-acpi@vger.kernel.org, linux-pm@vger.kernel.org, platform-driver-x86@vger.kernel.org, x86@kernel.org, linux-efi@vger.kernel.org Subject: [PATCH 0/2] Fix 2 5.19 power-off regressions caused by sys-off-handler work Date: Fri, 8 Jul 2022 15:14:10 +0200 Message-Id: <20220708131412.81078-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Hi All, I noticed that my Lenovo Yoga Tablet 2 1050L was hanging on power-off again with 5.19, even though I had implemented a workaround for this in 5.17 . I quickly realized that this was caused by the recent sys-off-handler work and fixed this by switching the workaround over to register_sys_off_handler with a priority of SYS_OFF_PRIO_FIRMWARE + 1, so that the workaround runs before acpi_power_off() get a chance to run. This made me realize that the efi_power_off handler which sometimes is used in preference of acpi_power_off had the same problem, so the second patch in this series fixes that. I plan to include patch 1/2 in a fixes pull-req to Linus soon. Ard, if I can get your Ack for 2/2 then I can include this in the pull-req if you want; or you can send this to Linus yourself. Regards, Hans Hans de Goede (2): platform/x86: x86-android-tablets: Fix Lenovo Yoga Tablet 2 830/1050 poweroff again efi: Fix efi_power_off() not being run before acpi_power_off() when necessary drivers/firmware/efi/reboot.c | 21 +++++++++++---------- drivers/platform/x86/x86-android-tablets.c | 17 +++++++++++++---- 2 files changed, 24 insertions(+), 14 deletions(-)