From patchwork Tue Jan 12 18:38:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 8020171 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 15E599F716 for ; Tue, 12 Jan 2016 18:39:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 363C22040F for ; Tue, 12 Jan 2016 18:39:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3DF5E203F7 for ; Tue, 12 Jan 2016 18:39:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753002AbcALSjR (ORCPT ); Tue, 12 Jan 2016 13:39:17 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:47674 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752747AbcALSjQ (ORCPT ); Tue, 12 Jan 2016 13:39:16 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id u0CId1oi000640; Tue, 12 Jan 2016 12:39:01 -0600 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id u0CId0PH011377; Tue, 12 Jan 2016 12:39:00 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.224.2; Tue, 12 Jan 2016 12:39:00 -0600 Received: from [172.22.232.181] (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id u0CIcwHA004684; Tue, 12 Jan 2016 12:38:58 -0600 Subject: Re: [lkp] [PM / sleep] 013c074f86: [drm:intel_opregion_init [i915]] *ERROR* No ACPI video bus found To: kernel test robot , Grygorii Strashko , "Rafael J. Wysocki" , Dmitry Torokhov References: <871t9ub1l4.fsf@yhuang-dev.intel.com> CC: , LKML , Pavel Machek , Alan Stern , From: Grygorii Strashko Message-ID: <56954841.3080004@ti.com> Date: Tue, 12 Jan 2016 20:38:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <871t9ub1l4.fsf@yhuang-dev.intel.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi All, Cc: more people + linux-input@vger.kernel.org On 01/07/2016 03:49 AM, kernel test robot wrote: > FYI, we noticed the below changes on > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > commit 013c074f8642d8e815ad670601f8e27155a74b57 ("PM / sleep: prohibit devices probing during suspend/hibernation") > > <4>[ 33.021805] serio serio0: device_attach() failed for isa0060/serio0 (i8042 KBD port), error: -517 > <4>[ 33.021813] serio serio1: device_attach() failed for isa0060/serio1 (i8042 AUX port), error: -517 > <6>[ 33.021906] PM: resume of devices complete after 171.688 msecs > > To reproduce: > > git clone git://git.kernel.org/pub/scm/linux/kernel/git/wfg/lkp-tests.git > cd lkp-tests > bin/lkp install job.yaml # job file is attached in this email > bin/lkp run job.yaml I've done some investigation of the above log output: 1) Small introduction first: commit 013c074f8642 was created, because it was identified that it's unsafe to bind/probe drivers during suspend resume, mainly because this will cause changing of pointers on PM data structures on the fly for devices which already tracked by Suspend core. 2) above log prints can be generated by the below call chain (I've checked the code only): drivers/input/serio/serio.c serio_resume() - serio_queue_event(serio, NULL, SERIO_RECONNECT_PORT) - queue_work(system_long_wq, &serio_event_work); .... - serio_handle_event() - serio_reconnect_port() - serio_reconnect_driver() --- return <0 - serio_disconnect_port() - device_release_driver() --- unbind - serio_find_driver() error = device_attach(&serio->dev); if (error < 0) dev_warn(&serio->dev, "device_attach() failed for %s (%s), error: %d\n", serio->phys, serio->name, error); device_attach() will return -EPROBE_DEFER(-517) because the device probing is not allowed yet. As per my understanding (and it's not clear from issue description), above situation should not break functionality of the system - just device's probe will be delayed till the end of dpm_complete(). So, I propose consider the option - do not print above warnings if return code from device_attach() is -EPROBE_DEFER. [1] https://lkml.org/lkml/2015/9/11/554 diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c index 8f82897..1ca7f55 100644 --- a/drivers/input/serio/serio.c +++ b/drivers/input/serio/serio.c @@ -134,7 +134,7 @@ static void serio_find_driver(struct serio *serio) int error; error = device_attach(&serio->dev); - if (error < 0) + if (error < 0 && error != -EPROBE_DEFER) dev_warn(&serio->dev, "device_attach() failed for %s (%s), error: %d\n", serio->phys, serio->name, error);