lkml.org 
[lkml]   [2013]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 4/4] sd: change to auto suspend mode
On Mon, 28 Jan 2013, Aaron Lu wrote:

> > Someone just asked about the default autosuspend delay, and I realized
> > your patch series doesn't set one. Since we don't know the properties
> > of the disk drive at this point (or even whether the device is a disk
> > drive), the only safe course is to call
> >
> > pm_runtime_set_autosuspend_delay(&sdev->sdev_gendev, -1);
> >
> > before calling blk_pm_runtime_init(). Then autosuspends will be
> > prevented until userspace writes a non-negative value into the device's
> > control/autosuspend_delay_ms file.
>
> Shall we do it inside blk_pm_runtime_init? This way, we do not need to
> do it for every driver. And for drivers that do know a proper value for
> autosuspend delay, they can call pm_runtime_set_autosuspend_delay
> somewhere after blk_pm_runtime_init.

Yes, that seems like a good approach. Be sure to mention it in the
kerneldoc.

Alan Stern



\
 
 \ /
  Last update: 2013-01-28 16:42    [W:0.047 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site