Re: [PATCH v5 0/7] ZPODD patches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 31 Aug 2012, Aaron Lu wrote:

> v5:
> Add may_power_off flag to scsi device.
> Alan Stern suggested that I should not mess runtime suspend with
> runtime power off, but the current zpodd implementation made it not
> easy to seperate. So I re-wrote the zpodd implementation, the end
> result is, normal ODD can also enter runtime suspended state, but
> their power won't be removed.

This looks good.  I noticed only a few things:

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?

In patch 1/7 you call both scsi_autopm_get_device() and 
scsi_autopm_put_device() twice in sr_check_events().  With a little 
rewriting it should be possible to call them only once.  Just replace
the "return events" lines with gotos.

What happens if you have an idle ZPODD with may_power_off clear?  A
regular ODD would get runtime-suspended.  In the same way, a ZPODD
should also be runtime-suspended but left at full power.  Does patch
7/7 work this way?  It seems to, but I can't tell for sure.

Alan Stern

--
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


[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux