Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp2670446rdh; Sun, 26 Nov 2023 15:10:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IHMkEyGJOrTMmE2OTgaSJjxb2eVZvdBWMmzqCFmfEheepmfJFH3xtdSsdz5LNeg/JIVwYlx X-Received: by 2002:a05:6a20:d396:b0:189:a6b3:ef7b with SMTP id iq22-20020a056a20d39600b00189a6b3ef7bmr14532417pzb.20.1701040253631; Sun, 26 Nov 2023 15:10:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701040253; cv=none; d=google.com; s=arc-20160816; b=irQLnOUjE+K/11eGarxllR+FhK4KohOD7Z4pJAAREb8z6x2JHGrgft6hk8oaGu0bxY 0yvMkb3nrDUfKBFq7kXq96MBHC3o2ZB+9LFtxkNhwsP430Nvs5PmQhh3yUTVkAmqJCk9 lz25dh2yKw9XQgYDJBX/U3cIuKAwsKwibwsgjM4EwUosb+dEWAlqwDAFxSfTZdtgygSu F3bA2ly3Kr+AmNuddos6h2kuFxxBePorYky8B7d/oXI4uvUUrVBPQ52R+zUkew1Cj+qa zjTauWf6p60dJYwe++AziE2ePeOVg+5+6q2nfArEMvjFxXf4/dbQTmMSLF1l8sWzLzAS lXSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :cc:to:subject:from:date:feedback-id:dkim-signature:dkim-signature; bh=cP/OkNDOpdHrLMx5wzD4ZGMR+6u2K3gz78/e5rWmNaM=; fh=ZXtnqMLlJRC3RYXa8dY1u7RqvHAns/XKm2JO1saxxJY=; b=qshyoxcTa23/Sl+z1F4HzVbRu+5EtOIDVyFAa3SwY9XKyqgImIzfksswct2VV2eFZ6 6cL7LYQMQRfSifzv7chcCmhLnz5IK/GfoGTSpzCUr8jhMn+ehmIlDprcLokH3knvAofM gVIR0zFs6hmP2Lis/xwHkUqogo/9+Tdm80q3ZZhbydIbfA4L+GfpPLoLL0IyvDsAiwhH /hRUWo1RPqvD0Gt1LHcWKqIIRLoCR+r41alnKHTTihYPvxH2kHYi79zJGN3XwmkRgMDP 0Faa/0OyGzgNVuMyK5gZjY7wN2lWsWi0BXpSf6ranEec+rCXOznOvrEYkE9Mm5y7FJQ0 Fpcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ljones.dev header.s=fm2 header.b=DqF2C3oO; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b="eFv0i+/u"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id s18-20020a056a00195200b006cbbd597aa1si8635062pfk.242.2023.11.26.15.10.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Nov 2023 15:10:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@ljones.dev header.s=fm2 header.b=DqF2C3oO; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b="eFv0i+/u"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id C400E805FFC0; Sun, 26 Nov 2023 15:10:50 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229502AbjKZXKg (ORCPT + 99 others); Sun, 26 Nov 2023 18:10:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbjKZXKf (ORCPT ); Sun, 26 Nov 2023 18:10:35 -0500 Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C00DFB; Sun, 26 Nov 2023 15:10:41 -0800 (PST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 9361E3200A5C; Sun, 26 Nov 2023 18:10:40 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sun, 26 Nov 2023 18:10:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ljones.dev; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1701040240; x=1701126640; bh=cP /OkNDOpdHrLMx5wzD4ZGMR+6u2K3gz78/e5rWmNaM=; b=DqF2C3oOHIbZc+n3LK P/88Dt/JLZKZft++G+FJH7mAXHF0q62kLhnO3xkrJIclgI7R0E3G4EeKUCTz8ugQ gdcLl+UciBWd02VuK+ckxPJeNEAWGg7LzkHjxfbNzln03IZvdieZyY4tttolz9rY 9qT2YiTjh8I9p7wfocRzB7pZ0e/sDsfqPOoi1AfBOINAteERtvemdwsAQ94+ZTgz 8eMpnQm5EUQ8+XCzeaLFTO7MjGKi0c7+L+2zZBZ7s+sVKvJMs5QhbDRkOZSg/Lso UKLFZ01MYLbvTuuZzdkzTtoPdj4y/9NZ9I4ffyXsC98uSuT4U7WCSpYm2ry+ES5E 1vIQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1701040240; x=1701126640; bh=cP/OkNDOpdHrL Mx5wzD4ZGMR+6u2K3gz78/e5rWmNaM=; b=eFv0i+/ukXKX+3ARZAE5kfBv3YoYP VAMOKQbAXcQq2lK9Ulvjsrtxo8VlMRVXb0C/UKqP+7xnG7L+dxkj+lU18F8BWuzz IT4Gn85io2EEUQHGbyZxkxyGe2ZSO87E1UarS7QmFwy4QXbDW4787tT6ps4a2jml QpCAycxLYqfljsn1MLs5kqs/4uDx3XPGlZ3rpxlBT74qAQpmDbTX9Chjbp+gJPdJ pIDGa9mZ79QOpnpvL7DRC0gbFZqHvd6qVDm/+E+yC2KL4B0387hdAui9Ma+tcHRg mqcPrT0OvsgJU/aA1kfFP3o+94K0GVg23XA4drW8fRXhSh05KXQ8eaUYg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeitddgtdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffuvfevkfgjfhfogggtsehttd ertdertddvnecuhfhrohhmpefnuhhkvgculfhonhgvshcuoehluhhkvgeslhhjohhnvghs rdguvghvqeenucggtffrrghtthgvrhhnpedvueejgefgteeuueeigefggfdvjeeiueejue euudevleejhfeiudfhjeevleeikeenucffohhmrghinhepfhhrvggvuggvshhkthhophdr ohhrghdpkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomheplhhukhgvsehljhhonhgvshdruggvvh X-ME-Proxy: Feedback-ID: i5ec1447f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 26 Nov 2023 18:10:35 -0500 (EST) Date: Mon, 27 Nov 2023 12:10:21 +1300 From: Luke Jones Subject: Re: [PATCH v2 0/1] platform/x86: asus-wmi: disable USB0 hub on ROG Ally before suspend To: hdegoede@redhat.com Cc: ilpo.jarvinen@linux.intel.com, corentin.chary@gmail.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Message-Id: <917R4S.AJGL9DYX1IZ@ljones.dev> In-Reply-To: <20231126230521.125708-1-luke@ljones.dev> References: <20231126230521.125708-1-luke@ljones.dev> X-Mailer: geary/44.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Sun, 26 Nov 2023 15:10:51 -0800 (PST) On Mon, Nov 27 2023 at 12:05:20 PM +13:00:00, Luke D. Jones wrote: > This is a fix for the ROG Ally not being able to use the N-Key device > after a suspend/resume cycle. > > The root of the issue is that ASUS changed the MCU firmware to > dfisconnect the USB0 hub when the > screen is switched off during the s2idle suspend path. I tried many > many different tactics to try > and get this s2idle part to work but it seems there are races between > this and other subsystems. > > What has so far been reliable and consistent is a manual call to the > CSEE method that is called in > ACPI by the Microsoft DSM screen off path followed by a short sleep > in asus-wmi. The PM prepare > hook looks to be the earliest possible place. A sleep that is too > long ends up with USB subsystem > registering a disconnect, and thus on resume the device paths change. > Too short and it is unreliable. > > Some discussion regarding this mess is at > https://gitlab.freedesktop.org/drm/amd/-/issues/2719#note_2181402 > > Changelog: > - v2: > - Emit dev_err(), but don't return error codes > - Add check for MCU power save mode being enabled and disable if > active > - General cleanup and rename some vars/funcs > - v1: > https://lore.kernel.org/all/20231124082749.23353-1-luke@ljones.dev/ > > Luke D. Jones (1): > platform/x86: asus-wmi: disable USB0 hub on ROG Ally before suspend > > drivers/platform/x86/asus-wmi.c | 50 > ++++++++++++++++++++++ > include/linux/platform_data/x86/asus-wmi.h | 3 ++ > 2 files changed, 53 insertions(+) > > -- > 2.43.0 > Hans I omitted your review tag as I made more changes than requested.