From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761456AbYDAVi0 (ORCPT ); Tue, 1 Apr 2008 17:38:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760987AbYDAVhn (ORCPT ); Tue, 1 Apr 2008 17:37:43 -0400 Received: from mail.crca.org.au ([67.207.131.56]:37792 "EHLO crca.org.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760241AbYDAVhl (ORCPT ); Tue, 1 Apr 2008 17:37:41 -0400 X-Bogosity: Ham, spamicity=0.000000 Subject: Re: [RFC][PATCH] PM: Introduce new top level suspend and hibernation callbacks (rev. 6) From: Nigel Cunningham To: Alan Stern Cc: "Rafael J. Wysocki" , pm list , ACPI Devel Maling List , Greg KH , Len Brown , LKML , Alexey Starikovskiy , David Brownell , Pavel Machek , Benjamin Herrenschmidt , Oliver Neukum In-Reply-To: References: Content-Type: text/plain Organization: Christian Reformed Churches of Australia Date: Wed, 02 Apr 2008 08:38:06 +1100 Message-Id: <1207085886.23143.114.camel@nigel-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.22.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi. On Tue, 2008-04-01 at 16:56 -0400, Alan Stern wrote: > On Tue, 1 Apr 2008, Rafael J. Wysocki wrote: > > > > Does ..._ext_... mean extended? (external?) If 'extended' (or if not), > > > does that imply that they're mutually exclusive alternatives for drivers > > > to use? > > > > 'ext' means 'extended'. The idea is that the 'extended' version will be used > > by bus types / driver types that don't need to implement the _noirq callbacks. > > Something's wrong here. This seems to say that the "extended" version > has _fewer_ method pointers -- in which case it should be called > "restricted" instead. Agreed. > > > So drivers can never validly fail to resume. That sounds fair enough. If > > > the hardware has gone away while in lower power mode (USB, say), should > > > the driver then just printk an error and return success? > > > > I think so. > > > > IMO, an error code returned by a driver's ->resume() should mean "the device > > hasn't resumed and is presumably dead". Otherwise, ->resume() should return > > success. > > If the device is gone, it doesn't much matter what resume() returns. What if the same driver is handling multiple instances and only some of them fail to resume? Regards, Nigel