On Fri, 31 Aug 2012, Aaron Lu wrote:

> > In patch 5/7, your implementation of may_power_off is written in such a
> > way that if the drive is already powered off when userspace clears the
> > flag, the drive is not automatically powered back on.  Maybe this is
> > what you want?
> 
> No, actually I didn't consider this.
> 
> What about I do this when may_power_off is set to 0:
> In its store function, if the device is runtime suspended(which means it
> is in powered off state since may_power_off was 1 before this store call)
> I'll set the flag to 0 and then runtime resume this device.

You might also want to runtime resume the device if may_power_off is
changed from 0 to 1.  Then it will power down when it suspends again
instead of just remaining powered up.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to