Message ID | 20230225080458.1342359-1-W_Armin@gmx.de |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1380805wrd; Sat, 25 Feb 2023 00:12:21 -0800 (PST) X-Google-Smtp-Source: AK7set92ob5BnT04gTniIqFhwQ5cPzUzb5NzItW1zFNe5EEVSWi6hsc1Iv/2bLvXLLFeVCBTdTGX X-Received: by 2002:a17:906:fb8c:b0:8b1:7f2a:b6b7 with SMTP id lr12-20020a170906fb8c00b008b17f2ab6b7mr29703384ejb.41.1677312740765; Sat, 25 Feb 2023 00:12:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677312740; cv=none; d=google.com; s=arc-20160816; b=oi63ypfdRQh9jO8uRWrNb+7n8YsxVkCpps7fRblBxkA+DtehMfZHPN0vti0mf+EEpg yRKm69uI3I5mj+dYWaqEDz5MunwaoBH3g2wzvO01Aw+BGRNJj+hjaOSCqa6OyThpDgeA 54F8wg5t909Xv5kkCOjzSQQEyJ3pgSM4xnd8H01gas+AmVQu1/XN1JxYEvAIW1dE740H /KA7Vh5nRBrYH5NVZhu4znBFHP2iAhhrTmUEjoCynLvJgTgxa7IxjpyGIsffBwq/A3yF ijHYjmqcaPFYEpCrCdIsAH7zEDbATEyHtizjUvGhzW8+9+YKiV3yWxkn4oSI1+uvtTli FHMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=klBMiy6pdncFxY2xtz/mLy02d0GxO2xKT1pVs5y473c=; b=mhQ5UJ8oHrTiHucmx7opAsISUdLqQiyOXO450Ho4P50GaBmGGadR2HNrz4LQ0agwPg gc3wvFeavkF3rlGV0oMGO8nHOXrFnGwCM3zhEOznHvYrtKPX9tWQ7H+IriMCQfxOsQN5 xYS98slyG3mEXKYWHxXW9vXREDM7uGR1Ic5HwvPDYyGgXbgxOttgI6rsOzzHfUmMuMfl cHYNJ4rZIq/I6ZzFnnOeVjjFc034P+DiXZyCaYS8BWryPqs1ZrPzVNEb4iYIWZSS2iG6 XZwQME03eOeZ5zAiD8cQrXxM4OYEeZ+vX/cK5DBCjtuHRNQr9jBskQw/UhViIsY7CCdo 4SKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=Gy883kf5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mr30-20020a170907829e00b008e10c06e919si1456616ejc.190.2023.02.25.00.11.57; Sat, 25 Feb 2023 00:12:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=Gy883kf5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229617AbjBYIFu (ORCPT <rfc822;guoshuai5156@gmail.com> + 99 others); Sat, 25 Feb 2023 03:05:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229473AbjBYIFs (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 25 Feb 2023 03:05:48 -0500 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 175CF1ABC6; Sat, 25 Feb 2023 00:05:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1677312340; i=w_armin@gmx.de; bh=bm2fa0tt9qyMUaRQTF7KSIVtPPB8KCnphI14dT6GRRA=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=Gy883kf56GpzmrTeHbqc2IcVwtvlkdncfWBOr2XcjmHG91xAFYWH2CX4bQEqeB6mG lJS39idQfgAE6x6Lccu98lqxT1+olvxxz8yP5+Iz7yYdKwdEY6An/uh3MqHSkuRAKD tVlEFrj+HJ+tKuTucGb2RkpaM9Kcf/JJg4w2LHWtg7WQDTU3QffT2JGmGQpF/SqOVr 845U45M7z4Y+FSI4msHBY0IVspnsWluuLAjM/nA941goP4ps1eJoVEAUV+0Lm6Sc8w lQyqcZjyCqGjLJgJNIwdy0i+3mUrJgm4L1V/lUyAHqbBKmN0XW2vGnBio9egPhog2Y m98sVPLd+i7WQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from esprimo-mx.users.agdsn.de ([141.30.226.129]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MIMbO-1pJmsK17jw-00EIzq; Sat, 25 Feb 2023 09:05:40 +0100 From: Armin Wolf <W_Armin@gmx.de> To: rafael@kernel.org, lenb@kernel.org Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/4] ACPI: SBS: Fix various issues Date: Sat, 25 Feb 2023 09:04:54 +0100 Message-Id: <20230225080458.1342359-1-W_Armin@gmx.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:EE9+SqiyvCZxz+X9STR8mEs0tW1Ns2DidhA/BGs2d2TNIxwrWEl BsvZGHJN65vu72uba+u9ovsu3SpvXHvNPnAKdtcsQSC7y2tE8B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4+1vD03eeF8ToHo+5ce5RVz8ZQdkmXIwqElFZT79UgWvXA3l85GRtruOI6z+t0ZVtku TnCnvO5gCVx0MucaJycVGaI9S8w= X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758789884322329713?= X-GMAIL-MSGID: =?utf-8?q?1758789884322329713?= |
Series | ACPI: SBS: Fix various issues | |
Message
Armin Wolf
Feb. 25, 2023, 8:04 a.m. UTC
On my Acer Travelmate 4002WLMi, the system locks up upon suspend/shutdown. After a lot of research, it turned out that the sbs module was the culprit. The driver would not correctly mask out the value used to select a battery using the "Smart Battery Selector" (subset of the "Smart Battery Manager"). This accidentally caused a invalid power source to be selected, which was automatically corrected by the selector. Upon notifing the host about the corrected power source, some batteries would be selected for re-reading, causing a endless loop. This would lead to some workqueues filling up, which caused the lockup upon suspend/shutdown. The first three patches fix a stacktrace on module removal caused by some locking issues. The last patch finally fixes the suspend/shutdown issues. As a side note: This was the first machine on which i installed Linux, to finally fixing this took ~5 years of tinkering. Armin Wolf (4): ACPI: EC: Add query notifier support ACPI: sbshc: Use ec query notifier call chain ACPI: EC: Make query handlers private ACPI: SBS: Fix handling of Smart Battery Selectors drivers/acpi/ec.c | 44 ++++++++++++++++++++-------------------- drivers/acpi/internal.h | 10 ++++----- drivers/acpi/sbs.c | 27 ++++++++++++++++--------- drivers/acpi/sbshc.c | 45 ++++++++++++++++++++++++++--------------- 4 files changed, 74 insertions(+), 52 deletions(-) -- 2.30.2