Re: [RFC PATCH v3 3/4] block: implement runtime pm strategy

From: Alan Stern
Date: Wed May 23 2012 - 10:53:58 EST


On Wed, 23 May 2012, Lin Ming wrote:

> >> +             /* Only PM request is allowed to go if the queue is suspended */
> >> +             if (q->rpm_status != RPM_ACTIVE && !(rq->cmd_flags & REQ_PM)) {
> >> +                     rq = NULL;
> >> +                     break;
> >> +             }
> >
> > Not even PM requests should be allowed to go if the status is
> > RPM_SUSPENDED.
>
> PM requests are used to wake up the device.
> If they are not allowed to go, then how to wake up the device?

When blk_pre_runtime_resume runs, the status is changed to
RPM_RESUMING. _Then_ PM requests are allowed to go. Not before.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/