From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66B8FC433EF for ; Fri, 10 Sep 2021 12:07:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3FE12611BF for ; Fri, 10 Sep 2021 12:07:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232956AbhIJMId (ORCPT ); Fri, 10 Sep 2021 08:08:33 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:39314 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232982AbhIJMIc (ORCPT ); Fri, 10 Sep 2021 08:08:32 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 52C8420061; Fri, 10 Sep 2021 12:07:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1631275641; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=S5Pv6VWsWqrpuZQR5MUOYXLwsbsIJ9muMeUBJvRcfeI=; b=jLbCxpcO5K8MjopF/oBxAO9nadcpNbNtU8NuiEhkKgTfXKcOXUMFDiU6MjEj3ozYm6mvUb 467z1qoYoaYmWyKQbdLUTtmwvwWB/34A8xd9ZRkXRoStxoG4t3gxh9rzmdePuA7w6AN+WV UfmKVoA3WOTGEHmsCDm2jFUEdXduQk4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1631275641; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=S5Pv6VWsWqrpuZQR5MUOYXLwsbsIJ9muMeUBJvRcfeI=; b=ZeAsH6LXG6XLHBpbM24T/5ZpwqDlFvCzovLGMnk4pXa468oINSXpvfZZu39fGECGHgEtdr 93K0fQJx+ypwAfBw== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id 4BB66A3BA2; Fri, 10 Sep 2021 12:07:21 +0000 (UTC) Date: Fri, 10 Sep 2021 14:07:21 +0200 Message-ID: From: Takashi Iwai To: Fabio Estevam Cc: Dmitry Torokhov , linux-input@vger.kernel.org Subject: Re: Delaying i8042 probe? In-Reply-To: References: User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org On Fri, 10 Sep 2021 13:07:17 +0200, Fabio Estevam wrote: > > Hi Takashi, > > On Fri, Sep 10, 2021 at 7:50 AM Takashi Iwai wrote: > > > > Hi, > > > > we've received a bug report about the missing keyboard on ASUS Zenbook > > 14 with AMD Ryzen: > > https://bugzilla.suse.com/show_bug.cgi?id=1190256 > > > > In short, PS2 keyboard couldn't be probed at the cold boot, while it > > could be detected fine at the warm boot. The failure appears like: > > > > [ 0.512668] i8042: PNP: PS/2 Controller [PNP0303:PS2K] at 0x60,0x64 irq 1 > > [ 0.512672] i8042: PNP: PS/2 appears to have AUX port disabled, if this is incorrect please boot with i8042.nopnp > > [ 1.033609] i8042: Can't read CTR while initializing i8042 > > [ 1.033632] i8042: probe of i8042 failed with error -5 > > > > As openSUSE kernel builds PS2 drivers as built-in, and the probe at > > the early boot failed. Meanwhile, when we rebuilt the kernel with > > those drivers as modules, it starts working magically. So, this is > > likely a timing problem. > > > > A possibly workaround I can think of would be to allow re-probing the > > device at a later point. Do we have a good way for that, or a better > > alternative solution? > > Would probe defer help here? > > Something like this: > > --- a/drivers/input/serio/i8042.c > +++ b/drivers/input/serio/i8042.c > @@ -1549,7 +1549,7 @@ static int __init i8042_probe(struct platform_device *dev) > > error = i8042_controller_init(); > if (error) > - return error; > + return -EPROBE_DEFER; > > #ifdef CONFIG_X86 > Thanks, I'll try to build a test kernel and let you know the result. Although we'd need some more restriction (as we don't want to repeat endlessly for all devices), it's good to know whether the standard deferred probe works or not in the first place. Takashi