- To: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [RFC PATCH 2/6] ACPI: Reference devices in ACPI Power Resource
- From: Lin Ming <ming.m.lin@xxxxxxxxx>
- Date: Tue, 21 Feb 2012 22:07:35 +0800
- Cc: "Zhang, Rui" <rui.zhang@xxxxxxxxx>, "Rafael J. Wysocki" <rjw@xxxxxxx>, Jeff Garzik <jgarzik@xxxxxxxxx>, Tejun Heo <tj@xxxxxxxxxx>, Len Brown <lenb@xxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, "linux-ide@xxxxxxxxxxxxxxx" <linux-ide@xxxxxxxxxxxxxxx>, "linux-scsi@xxxxxxxxxxxxxxx" <linux-scsi@xxxxxxxxxxxxxxx>, "linux-pm@xxxxxxxxxxxxxxx" <linux-pm@xxxxxxxxxxxxxxx>
- In-reply-to: <Pine.LNX.4.44L0.1202171003060.1350-100000@iolanthe.rowland.org>
- List-id: <linux-ide.vger.kernel.org>
On Fri, Feb 17, 2012 at 11:07 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> On Fri, 17 Feb 2012, Zhang, Rui wrote:
>
>> > Do you basically want
>> > the ZPODD always to be suspended and resumed along with the ATA port,
>>
>> No. ZPODD suspends itself, which put ZPODD to a SCSI low power state (NOT power off/D3_COLD).
>> And then it is the "Runtime PM core" that suspends ATA port after ZPODD being suspended.
>> And the .runtime_suspend callback for ATA port actually turns off the ZPODD power.
>>
>> During resume, ATA port is resumed first because of the ACPI wakeup event.
>> But in fact, this wakeup event should be read as "ZPODD remote wakeup signal", thus runtime resume request is sent to ZPODD, done by Patch 3/6.
>>
>> > or should it be possible to suspend the ZPODD while the port remains
>> > running?
>> >
>> Sure, but the power is still on at this time.
>
> Then maybe you can use pm_runtime_no_callbacks() for the ZPODD device.
> It's explained in Documentation/power/runtime_pm.txt, and I use it for
> USB interfaces.
If pm_runtime_no_callbacks() is used, runtime PM sysfs attributes
won't be created.
Then how to disable ZPODD feature in userspace?
Currently, I use "control" file of scsi device to enable/disable
ZPODD, for example
echo auto > /sys/devices/pci0000:00/0000:00:1f.2/ata0/host1/target1:0:0/1:0:0:0/power/control
echo on > /sys/devices/pci0000:00/0000:00:1f.2/ata0/host1/target1:0:0/1:0:0:0/power/control
>
> The idea is that the ZPODD will never receive any runtime PM callbacks
> from the PM core. Instead the ATA port callback routines will be
> responsible for power management of the ZPODD device.
Does the ATA port callback also responsible to resume its child?
For example,
/sys/devices/pci0000:00/0000:00:1f.2/ata0/host1/target1:0:0/1:0:0:0/
ata0 is resumed.
Then who will be responsible to resume host1, target1:0:0 and 1:0:0:0?
Or do you mean that we don't need to resume these devices at all?
host1 and target1:0:0 are logical devices, but I think 1:0:0:0 is not.
Thanks,
Lin Ming
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux Filesystems]
[Linux SCSI]
[Linux RAID]
[Git]
[Kernel Newbies]
[Linux Newbie]
[Share Photos]
[Security]
[Netfilter]
[Bugtraq]
[Photo]
[Yosemite]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Samba]
[Video 4 Linux]
[Device Mapper]
[Linux Resources]