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=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 EDE40C433E0 for ; Tue, 23 Jun 2020 14:54:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CAA6F20723 for ; Tue, 23 Jun 2020 14:54:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732925AbgFWOyz (ORCPT ); Tue, 23 Jun 2020 10:54:55 -0400 Received: from netrider.rowland.org ([192.131.102.5]:57017 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1732821AbgFWOyy (ORCPT ); Tue, 23 Jun 2020 10:54:54 -0400 Received: (qmail 179264 invoked by uid 1000); 23 Jun 2020 10:54:53 -0400 Date: Tue, 23 Jun 2020 10:54:53 -0400 From: Alan Stern To: Martin Kepplinger Cc: "mathias.nyman@intel.com" , "gregkh@linuxfoundation.org" , Felipe Balbi , "p.zabel@pengutronix.de" , nicolas.ferre@microchip.com, ludovic.desroches@microchip.com, cristian.birsan@microchip.com, iain.galloway@nxp.com, "linux-usb@vger.kernel.org" , "kernel@puri.sm" , "linux-arm-kernel@lists.infradead.org" Subject: Re: Microchip USB2642 Hub not resuming from USB autosuspend Message-ID: <20200623145453.GA178927@rowland.harvard.edu> References: <8738e4d3-62b1-0144-107d-ff42000ed6c6@puri.sm> <021b18e4-343d-76d2-5d35-817d576f503e@puri.sm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <021b18e4-343d-76d2-5d35-817d576f503e@puri.sm> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Tue, Jun 23, 2020 at 03:48:01PM +0200, Martin Kepplinger wrote: > We've resolved this issue too. When scsi (sd) runtime pm is not enabled > by default, it needs to be enabled of course and events_dfl_poll_msecs > for the block layer set to 0. Actually that last step isn't needed. But if you don't do it, the device will wake up from runtime suspend every time the block layer polls it. So you probably do want to either turn off polling or increase the polling interval significantly. > scsi sd has until now incomplete support for runtime pm and this > addition makes it work, i.e. suspend when not mounted: > https://lore.kernel.org/linux-scsi/20200623111018.31954-1-martin.kepplinger@puri.sm/T/ > the whole USB path is suspended as a consequence - and woken up if opened. I don't understand this. As far as I know, runtime-PM support in the SCSI and block layers has been complete for many years. If you have to do anything extra (like applying the patch in the email you mentioned) then something is broken. The device should be able to go into runtime suspend just fine with the current code -- even when a file system is mounted. Alan Stern 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=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 12C69C433DF for ; Tue, 23 Jun 2020 15:03:50 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D23BC20776 for ; Tue, 23 Jun 2020 15:03:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="0gYYYUv/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D23BC20776 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=rowland.harvard.edu Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ADzWeHMbRn4ey1I/fIWUs4cZuZ5BgRnAMFBtvc7CUws=; b=0gYYYUv/4W4ieShB9eeE6v+rE 1pMFUPWU8rwINuC6YAYCciBjKG8ShjlFcSOUwkWUWhZ99AlgpKedYQVPOfjx2VxEWxGgjHC+sXsBW rTpC9SLB/FtkDSQAjqFFQwqrVe8c42pDEYLm8Bc/MA7NbJWRuszOwaE0w0gcvOGM/Ttqh4E4vO9RE AqOMUrdiA9RfMvsC+mnsKvfhzRxdZtd5+yyHuUk5EpsyLr1710gXlgaAAEjPmkWtGyMEZqfdHDdBn x4MIZ6cP58T1/QYHI/4D3gAiUIFX2mLF3DRgYCltjpm7sWcmPlNoOLMqNVRgUUrTHm25HCgfLbu/y sP0sxhQiw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnkQk-0004u5-0W; Tue, 23 Jun 2020 15:01:46 +0000 Received: from netrider.rowland.org ([192.131.102.5]) by merlin.infradead.org with smtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnkQe-0004oG-K2 for linux-arm-kernel@lists.infradead.org; Tue, 23 Jun 2020 15:01:41 +0000 Received: (qmail 179264 invoked by uid 1000); 23 Jun 2020 10:54:53 -0400 Date: Tue, 23 Jun 2020 10:54:53 -0400 From: Alan Stern To: Martin Kepplinger Subject: Re: Microchip USB2642 Hub not resuming from USB autosuspend Message-ID: <20200623145453.GA178927@rowland.harvard.edu> References: <8738e4d3-62b1-0144-107d-ff42000ed6c6@puri.sm> <021b18e4-343d-76d2-5d35-817d576f503e@puri.sm> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <021b18e4-343d-76d2-5d35-817d576f503e@puri.sm> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Felipe Balbi , "kernel@puri.sm" , "mathias.nyman@intel.com" , "gregkh@linuxfoundation.org" , "linux-usb@vger.kernel.org" , ludovic.desroches@microchip.com, "linux-arm-kernel@lists.infradead.org" , "p.zabel@pengutronix.de" , iain.galloway@nxp.com, cristian.birsan@microchip.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jun 23, 2020 at 03:48:01PM +0200, Martin Kepplinger wrote: > We've resolved this issue too. When scsi (sd) runtime pm is not enabled > by default, it needs to be enabled of course and events_dfl_poll_msecs > for the block layer set to 0. Actually that last step isn't needed. But if you don't do it, the device will wake up from runtime suspend every time the block layer polls it. So you probably do want to either turn off polling or increase the polling interval significantly. > scsi sd has until now incomplete support for runtime pm and this > addition makes it work, i.e. suspend when not mounted: > https://lore.kernel.org/linux-scsi/20200623111018.31954-1-martin.kepplinger@puri.sm/T/ > the whole USB path is suspended as a consequence - and woken up if opened. I don't understand this. As far as I know, runtime-PM support in the SCSI and block layers has been complete for many years. If you have to do anything extra (like applying the patch in the email you mentioned) then something is broken. The device should be able to go into runtime suspend just fine with the current code -- even when a file system is mounted. Alan Stern _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel