From: Aaron Lu Subject: Re: [PATCH v13 1/9] scsi: sr: support runtime pm Date: Mon, 21 Jan 2013 16:14:17 +0800 Message-ID: <20130121081417.GB6904@aaronlu.sh.intel.com> References: <50FA5F67.4080102@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mga01.intel.com ([192.55.52.88]:5778 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751365Ab3AUINe (ORCPT ); Mon, 21 Jan 2013 03:13:34 -0500 Content-Disposition: inline In-Reply-To: Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Julian Calaby Cc: Alan Stern , Oliver Neukum , James Bottomley , Jeff Garzik , "Rafael J. Wysocki" , Tejun Heo , Aaron Lu , Jeff Wu , linux-ide@vger.kernel.org, linux-pm@vger.kernel.org, linux-scsi@vger.kernel.org, linux-acpi@vger.kernel.org On Mon, Jan 21, 2013 at 02:31:50PM +1100, Julian Calaby wrote: > Hi Alan, > > On Sun, Jan 20, 2013 at 5:46 AM, Alan Stern wrote: > > On Sat, 19 Jan 2013, Aaron Lu wrote: > >> > closed. Do we want to drop support for that kind of behavior? > >> > >> I don't think we should drop such support. > >> And the safest way to avoid such break is we refine the suspend > >> condition for ODD, and using what ZPODD defined condition isn't that > >> bad to me: > >> - for tray type, no media inside and tray close; > >> - for slot type, no media inside. > >> While whether tray is closed or not may not be that important, but at > >> least we should make sure there is no media inside. > >> > >> Thoughts? > > > > That sounds reasonable to me, at least as a first step. If people want > > their CD drive to suspend, they can eject the disc. > > Stupid question: does the kernel know if a CD has audio tracks? Yes, cdrom module knows that, but the block driver(e.g. sr) doesn't. See cdrom_count_tracks in cdrom.c. May I know if you have an use case that you want to runtime suspend the cd drive with a disc inside? That would help us to refine the runtime suspend condition. Thanks, Aaron