From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [PATCH v9 07/10] block: add a new interface to block events Date: Mon, 19 Nov 2012 06:50:09 -0800 Message-ID: <20121119145009.GA15971@htj.dyndns.org> References: <20121118233531.GC25790@mtj.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-scsi-owner@vger.kernel.org To: Alan Stern Cc: Aaron Lu , Jeff Garzik , James Bottomley , "Rafael J. Wysocki" , Jeff Wu , Aaron Lu , linux-ide@vger.kernel.org, linux-pm@vger.kernel.org, linux-scsi@vger.kernel.org, linux-acpi@vger.kernel.org List-Id: linux-acpi@vger.kernel.org On Sun, Nov 18, 2012 at 09:07:22PM -0500, Alan Stern wrote: > Hey... Hey, again. :P > > So, at least for SATA, I think what autopm can do is... > > > > * Trigger zpodd if possible. > > > > * Trigger suspend iff polling isn't happening on the device. > > That sums it up nicely. Of course, the PM core is unaware of details > such as media polling. What we can do is have the SATA runtime-idle > method return -EBUSY if the device isn't a ZPODD and if polling is > enabled. Unfortunately I don't think there's any way currently to > trigger autopm when the user turns off polling. Maybe something could > be added to the appropriate sysfs handler. Given that genhd event polling and PM are likely to interact with each other, I think it would be a good idea to implement a proper way for the two to communicate. Dunno what it should be tho. The tricky part would be mapping the block device to the underlying hardware one. Thanks. -- tejun