[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1203301021140.1280-100000@iolanthe.rowland.org>
Date: Fri, 30 Mar 2012 10:28:23 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Aaron Lu <aaron.lu@....com>
cc: Lin Ming <ming.m.lin@...el.com>, Zhang Rui <rui.zhang@...el.com>,
Jeff Garzik <jgarzik@...ox.com>,
"Rafael J. Wysocki" <rjw@...k.pl>, Tejun Heo <tj@...nel.org>,
<linux-kernel@...r.kernel.org>, <linux-ide@...r.kernel.org>,
<linux-scsi@...r.kernel.org>, <linux-pm@...r.kernel.org>,
linux-acpi <linux-acpi@...r.kernel.org>
Subject: Re: [PATCH v3 7/7] [SCSI] sr: adds Zero-power ODD support
On Fri, 30 Mar 2012, Aaron Lu wrote:
> > > For the ODD to be put into suspend state, the conditions should be:
> > > 1 tray closed
> > > 2 no media inside
> > > I think we missed the condition 1 check now.
> > >
> > > And if we follow the two conditions, the events can be safely ignored.
> >
> > No, they can't. Otherwise the device won't power back up when the user
> > inserts a new disc.
> >
>
> The ODD is put to zero power state, so it can't react to the eject
> button without being powered up back first ;-)
> On current implementation, ACPI is used to power back up the ODD like this:
> 1 User press the eject button;
> 2 A gpe event fired, and ACPI interrupt, and the corresponding gpe
> handler runs and the ODD's ACPI handle is notified about DEVICE_WAKE_UP;
> 3 In ODD's acpi notify handler, we power back up it by scsi_autopm_get_device.
> This is handled in the following Lin Ming's patch:
> [PATCH v3 2/7] libata-acpi: add ata port runtime D3Cold support
I see. Then you are right; it's not necessary to check for events
while the drive is at zero power.
> When the ODD is put to zero power state, it will not be able to handle
> commands like CDROMEJECT. We have to power it up first and then handle
> the ioctl request. Currently, we only power back up the ODD when user
> press the eject button as explained above.
Then you may want to avoid going to zero-power while a program is
holding the device file open. After all, the program might issue a
CDROMEJECT ioctl.
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists