From: Aaron Lu <aaron.lu@intel.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: James Bottomley <James.Bottomley@hansenpartnership.com>,
Alan Stern <stern@rowland.harvard.edu>,
Oliver Neukum <oliver@neukum.org>,
Jeff Garzik <jgarzik@pobox.com>,
linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org,
linux-acpi@vger.kernel.org, linux-pm@vger.kernel.org,
Aaron Lu <aaron.lwe@gmail.com>
Subject: Re: [PATCH v7 0/6] ZPODD patches
Date: Fri, 21 Sep 2012 13:48:44 +0800 [thread overview]
Message-ID: <20120921054844.GB2987@mint-spring.sh.intel.com> (raw)
In-Reply-To: <201209202200.51303.rjw@sisk.pl>
On Thu, Sep 20, 2012 at 10:00:51PM +0200, Rafael J. Wysocki wrote:
> On Wednesday, September 19, 2012, Aaron Lu wrote:
> > Thanks Rafael, and if there is any question/problem,
> > please kindly let me know.
>
> Well, unfortunately my initial review indicates that the patchset is not
> quite ready to go upstream yet.
>
> I'll send comments in replies to the individual patches, but overall I can
> say that at this stage of development, when I look at the patches, it should
> be clear to me not only what is being changed, but _why_ it is being changed
> in the first place and, secondly, why it is being changed in this particular
> way. It's far from that, though.
I'm adding zero power support for optical disk drive(ZPODD), which is
made possible with the newly defined device attention(DA) pin introduced
in SATA 3.1 spec.
The idea here is to use runtime pm to achieve this, so I basically did 2
things:
1 Add runtime pm support for ODD;
2 Add power off support for ODD after it is runtime suspended.
Patch 2 is runtime pm support for ODD, the reason it is done this way is
discussed here:
http://www.spinics.net/lists/linux-scsi/msg61551.html
The basic idea is, the ODD will be runtime suspended as long as there is
nobody using it, that is, no programs opening the block device.
The ODD will be polled periodically, so it will be runtime resumed
before checking if there is any events pending and suspended when done.
The only exception is, if we found a disc is just inserted, we will not
idle it immediately at the end of the poll, reason explained in another
mail.
This is the rational I wrote patch 2, and patch 1 is used by patch 2.
Patch 3 is adding power off support for ODD after it is runtime
suspended, the condition is specified in section 15:
ftp://ftp.seagate.com/sff/INF-8090.PDF
That is, for tray type ODD: no media inside and door closed; for slot
type ODD: no media inside.
The is the reason sr_suspend is written, for non-ZPODD capable devices,
it does nothing; for ZPODD devices, it will check the above condition to
see if it is ready to be powered off. The ready_to_power_off flag will be
used by ATA layer to decide if power can be removed.
When in powered off state, if user presses the eject button or insert a
disc, an ACPI event will be generated and our acpi wake handler will
pm_runtime_resume the ODD. And if it is a tray type ODD, its tray should
be ejected(need_eject flag) after powered on. This is patch 3.
And patch 4-6 introduces a new sysfs file may_power_off to give user a
chance to disable the power off of the device due to various reasons
like the ODD claims support of device attention while actually it is
broken.
I hope it makes more sense to you now.
Thanks,
Aaron
>
> The first patch in the series doesn't even have a changelog. How the changelog
> of the second patch is related to it's actual contents is more than quite
> unclear to me. Etc.
>
> Thanks,
> Rafael
next prev parent reply other threads:[~2012-09-21 5:48 UTC|newest]
Thread overview: 85+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-12 8:29 [PATCH v7 0/6] ZPODD patches Aaron Lu
2012-09-12 8:29 ` [PATCH v7 1/6] block: genhd: add an interface to set disk poll interval Aaron Lu
2012-09-20 20:35 ` Rafael J. Wysocki
2012-09-12 8:29 ` [PATCH v7 2/6] scsi: sr: support runtime pm Aaron Lu
2012-09-20 20:48 ` Rafael J. Wysocki
2012-09-20 20:54 ` Alan Stern
2012-09-21 1:02 ` Aaron Lu
2012-09-21 20:49 ` Rafael J. Wysocki
2012-09-24 1:20 ` Aaron Lu
2012-09-24 12:55 ` Rafael J. Wysocki
2012-09-24 14:52 ` Aaron Lu
2012-09-24 21:40 ` Rafael J. Wysocki
2012-09-25 8:01 ` Aaron Lu
2012-09-25 11:47 ` Rafael J. Wysocki
2012-09-25 14:20 ` Aaron Lu
2012-09-25 14:23 ` Oliver Neukum
2012-09-25 14:46 ` Aaron Lu
2012-09-25 21:45 ` Rafael J. Wysocki
2012-09-26 1:03 ` Aaron Lu
2012-09-26 11:18 ` Rafael J. Wysocki
2012-09-26 14:52 ` Aaron Lu
2012-09-26 7:20 ` Oliver Neukum
2012-09-27 10:46 ` Oliver Neukum
2012-09-28 8:20 ` Aaron Lu
2012-09-12 8:29 ` [PATCH v7 3/6] scsi: sr: support zero power ODD(ZPODD) Aaron Lu
2012-09-20 22:07 ` Rafael J. Wysocki
2012-09-21 1:39 ` Aaron Lu
2012-09-21 21:02 ` Rafael J. Wysocki
2012-09-27 9:26 ` Aaron Lu
2012-09-27 14:42 ` Alan Stern
2012-09-27 14:55 ` Aaron Lu
2012-09-27 23:29 ` Rafael J. Wysocki
2012-09-24 21:55 ` Jeff Garzik
2012-09-12 8:29 ` [PATCH v7 4/6] scsi: pm: add may_power_off flag Aaron Lu
2012-09-12 8:29 ` [PATCH v7 5/6] scsi: sr: use may_power_off Aaron Lu
2012-09-12 8:29 ` [PATCH v7 6/6] libata: acpi: respect may_power_off flag Aaron Lu
2012-09-24 21:55 ` Jeff Garzik
2012-09-19 8:03 ` [PATCH v7 0/6] ZPODD patches Aaron Lu
2012-09-19 12:27 ` James Bottomley
2012-09-19 12:50 ` Rafael J. Wysocki
2012-09-19 14:19 ` Aaron Lu
2012-09-20 20:00 ` Rafael J. Wysocki
2012-09-21 5:48 ` Aaron Lu [this message]
2012-09-21 21:18 ` Rafael J. Wysocki
2012-09-22 7:32 ` Oliver Neukum
2012-09-22 11:28 ` Rafael J. Wysocki
2012-09-22 15:38 ` Alan Stern
2012-09-22 19:46 ` Rafael J. Wysocki
2012-09-22 20:23 ` Alan Stern
2012-09-22 21:48 ` Rafael J. Wysocki
2012-09-24 2:55 ` Aaron Lu
2012-09-24 13:06 ` Rafael J. Wysocki
2012-09-24 15:04 ` Aaron Lu
2012-09-24 21:46 ` Rafael J. Wysocki
2012-09-25 8:18 ` Aaron Lu
2012-09-25 11:02 ` James Bottomley
2012-09-25 13:56 ` Aaron Lu
2012-09-27 9:43 ` Aaron Lu
2012-09-24 15:47 ` Alan Stern
2012-09-19 14:52 ` James Bottomley
2012-09-20 21:46 ` Rafael J. Wysocki
2012-09-19 13:05 ` Oliver Neukum
2012-09-19 15:19 ` David Woodhouse
2012-09-20 0:34 ` Jack Wang
[not found] ` <201209280115.06964.rjw@sisk.pl>
[not found] ` <5064FA08.6030005@intel.com>
[not found] ` <201209282346.15872.rjw@sisk.pl>
2012-09-29 2:10 ` [PATCH v7 2/6] scsi: sr: support runtime pm Aaron Lu
2012-09-29 14:29 ` Alan Stern
2012-09-29 15:03 ` Aaron Lu
2012-09-29 22:44 ` Rafael J. Wysocki
2012-09-30 12:32 ` Aaron Lu
2012-09-30 14:47 ` Alan Stern
2012-09-30 15:39 ` Aaron Lu
2012-09-30 19:15 ` Jeff Garzik
2012-09-30 19:08 ` Jeff Garzik
2012-09-29 22:31 ` Rafael J. Wysocki
2012-09-30 19:03 ` Jeff Garzik
2012-09-30 19:43 ` Alan Stern
2012-10-01 4:57 ` Jeff Garzik
2012-10-08 9:27 ` Aaron Lu
2012-10-08 10:21 ` James Bottomley
2012-10-09 7:20 ` Aaron Lu
2012-10-09 14:58 ` James Bottomley
2012-10-11 7:49 ` Aaron Lu
2012-10-09 23:26 ` Rafael J. Wysocki
2012-09-29 22:27 ` Rafael J. Wysocki
2012-09-30 12:38 ` Aaron Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120921054844.GB2987@mint-spring.sh.intel.com \
--to=aaron.lu@intel.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=aaron.lwe@gmail.com \
--cc=jgarzik@pobox.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=oliver@neukum.org \
--cc=rjw@sisk.pl \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.