Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2801535imm; Mon, 13 Aug 2018 00:13:05 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzJW210b872vafygHEwdO9CVUu5G+FuOSTh1CIHFx4vCtvU2MKGO++Mkz3N5NBWqfFk3Fhl X-Received: by 2002:a63:1a20:: with SMTP id a32-v6mr15805098pga.446.1534144385211; Mon, 13 Aug 2018 00:13:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534144385; cv=none; d=google.com; s=arc-20160816; b=xj/FjrBFGtWyNkpThFKwzxU6eUeFXQuL1DFzOCnpnhWy3KlLSnYXxloXxneQgjfuzz mxxm6835lvLsTnstgcdNNNh2UtNP16d+REWVCHpqd26hnnKeZeKfpTVDNyQVUfUZQDNz 84onT/xiwyciTtnfzAB5/e8SGiaBNOTMwZGtUvyb3CRqXqj4MLs0WQiogbOJzntKj7hC wrM5EGC9+f8lFPrNSJT+tTD5sSbAoRtrMLcXKtmvkyXjIACgB59JfX3MJYjvGbbBpAU/ w/y3HYGWg9RpZUJAzL20VeU0070C/9OD3ff9U5yswkcJWwLI2wpc9shoUxoxETxGOFwF MjbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=XOsQhwAXSVal2OWSCRJBP3tZFvovYiEU6whIeAF95Bs=; b=HQ9wr6qVgWD/FxsjCcddeIjrklqnPCIbFBo+myaEY3MBx5r5+n5kh3gp2XMQ+M+510 mnCJWIJt9JQvUIvqY2BBSW4wRx1znF8R54Fdu8w5bKETwS0WxQzMgSSteNFnAp+3tRP4 Nh3rBShUmK18orTFFCU4whzrKYBKHGqBsnagnFPLd/PzdbDjoRcuruGq7w2O8I6mCoVj z6P9oVSFIi31IJ/7vytwrCUyiTmuWT5CF/3aSlTCuNoe9G/viqWHNxkh7fyR7FCiyl6m WkN5+rJ9lGzPiT7+NX3/0yyYDxi6h/kdU5mTE4RnUIhEyiX4Q7BrapC96m5XyZby8zAV 9snQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m24-v6si18945062pfk.56.2018.08.13.00.12.47; Mon, 13 Aug 2018 00:13:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728371AbeHMJ2x (ORCPT + 99 others); Mon, 13 Aug 2018 05:28:53 -0400 Received: from mga14.intel.com ([192.55.52.115]:14040 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726345AbeHMJ2x (ORCPT ); Mon, 13 Aug 2018 05:28:53 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Aug 2018 23:48:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,232,1531810800"; d="scan'208";a="65678858" Received: from anshuma1-pnp-server.iind.intel.com ([10.223.107.119]) by orsmga006.jf.intel.com with ESMTP; 12 Aug 2018 23:48:00 -0700 From: Anshuman Gupta To: linux-usb@vger.kernel.org Cc: linux-kernel@vger.kernel.org, anshuman.gupta@intel.com Subject: [Query] USB device autosuspend and its runtime usage count. Date: Mon, 13 Aug 2018 12:15:58 +0530 Message-Id: <1534142758-387-1-git-send-email-anshuman.gupta@intel.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi , I need to test a functionality with USB autosuspend with latest kernel Linux 4.18-rc8. I am trying to autosuspend a USB key board, i enabled its autosuspend by doing echo "auto" to its "control" attributes. I am expecting USB keyboard to go to autosuspend after autosuspend_delay_ms. But USB key board is not going to autosuspend because its runtime usage count is not equal to zero. Below are the log snippets: root@intel-Kabylake-Client-platform:# cat /sys/bus/usb/devices/1-5/power/runtime_enabled enabled root@intel-Kabylake-Client-platform:# cat /sys/bus/usb/devices/1-5/power/control auto root@intel-Kabylake-Client-platform:# cat /sys/bus/usb/devices/1-5/power/autosuspend_delay_ms 2000 root@intel-Kabylake-Client-platform:# cat /sys/bus/usb/devices/1-5/power/runtime_status active root@intel-Kabylake-Client-platform:# cat /sys/bus/usb/devices/1-5/power/runtime_usage 1 root@intel-Kabylake-Client-platform:# sleep 60; cat /sys/bus/usb/devices/1-5/power/runtime_usage 1 My USB keyboard runtime usage reference count is not decreasing to zero. Here am i missing something regarding runtime usage count or is it some issue with my kernel or OS? Thanks, Anshuman Gupta.