Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932798AbZGPRC4 (ORCPT ); Thu, 16 Jul 2009 13:02:56 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932781AbZGPRCz (ORCPT ); Thu, 16 Jul 2009 13:02:55 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:49668 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S932621AbZGPRCz (ORCPT ); Thu, 16 Jul 2009 13:02:55 -0400 Date: Thu, 16 Jul 2009 13:02:53 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Wu Zhangjin cc: linux-pm@lists.linux-foundation.org, , , , , Subject: Re: [linux-pm] [PATCH] [suspend] pci_raw_set_power_state: replace msleep by udelay in resuming procedure In-Reply-To: <1247759007-27411-1-git-send-email-wuzhangjin@gmail.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 791 Lines: 22 On Thu, 16 Jul 2009, Wu Zhangjin wrote: > we can not call msleep() when resuming from STR/Standby: if the > current_state of the pci device is PCI_D3hot, means we are in the > procedure of resuming, in this procedure, we can not re-schedule, > otherwise, there will be a deadlock. I don't understand. First of all, why does current_state == PCI_D3hot mean the system is resuming from sleep? Isn't it possible that the PCI device is going through a runtime resume? Secondly, why will scheduling during a resume cause a deadlock? 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/