Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933614Ab2EWOyD (ORCPT ); Wed, 23 May 2012 10:54:03 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:51753 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S932304Ab2EWOyA (ORCPT ); Wed, 23 May 2012 10:54:00 -0400 Date: Wed, 23 May 2012 10:53:59 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Lin Ming cc: Jens Axboe , , , Subject: Re: [RFC PATCH v3 3/4] block: implement runtime pm strategy In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 885 Lines: 24 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/