From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Herrenschmidt Subject: Re: [PATCH 1/3] PM: Introduce new top level suspend and hibernation callbacks (rev. 8) Date: Mon, 14 Apr 2008 17:23:36 +1000 Message-ID: <1208157816.6958.133.camel@pasglop> References: <200804040111.15255.rjw@sisk.pl> <200804140309.22057.rjw@sisk.pl> <1208143380.6958.105.camel@pasglop> <200804140843.06088.oliver@neukum.org> Reply-To: benh@kernel.crashing.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200804140843.06088.oliver@neukum.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: Oliver Neukum Cc: Nigel Cunningham , LKML , Jesse Barnes , ACPI Devel Maling List , pm list , Alexey Starikovskiy , Andrew Morton List-Id: linux-acpi@vger.kernel.org On Mon, 2008-04-14 at 08:43 +0200, Oliver Neukum wrote: > > Which is the problem. Suspension is supposed to be transparent. > We cannot start returning error codes for operations which never > failed in practice (eg. switching configurations in USB), just because > the system is about to be suspended. Returning errors is better than crashing in any way. So what I meant here is that the problem is not as bad as it sounds. > If you want to request firmware in a PM callback, which makes a > certain > sense, as we should move to a comprehensive API, if we change the API > at all, we need a model with 3 callbacks. No. At this pace, we'll find reasons to have 98213674 callbacks and will still not be happy. Prepare() should be the right place to call request_firmware() and if that is a problem because of bugs in some USB things, then those bugs should be fixed. Ben. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759773AbYDNHYy (ORCPT ); Mon, 14 Apr 2008 03:24:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757541AbYDNHYn (ORCPT ); Mon, 14 Apr 2008 03:24:43 -0400 Received: from gate.crashing.org ([63.228.1.57]:46527 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756334AbYDNHYm (ORCPT ); Mon, 14 Apr 2008 03:24:42 -0400 Subject: Re: [PATCH 1/3] PM: Introduce new top level suspend and hibernation callbacks (rev. 8) From: Benjamin Herrenschmidt Reply-To: benh@kernel.crashing.org To: Oliver Neukum Cc: "Rafael J. Wysocki" , Greg KH , pm list , ACPI Devel Maling List , Alan Stern , Len Brown , LKML , Alexey Starikovskiy , David Brownell , Pavel Machek , Nigel Cunningham , Jesse Barnes , Andrew Morton In-Reply-To: <200804140843.06088.oliver@neukum.org> References: <200804040111.15255.rjw@sisk.pl> <200804140309.22057.rjw@sisk.pl> <1208143380.6958.105.camel@pasglop> <200804140843.06088.oliver@neukum.org> Content-Type: text/plain Date: Mon, 14 Apr 2008 17:23:36 +1000 Message-Id: <1208157816.6958.133.camel@pasglop> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2008-04-14 at 08:43 +0200, Oliver Neukum wrote: > > Which is the problem. Suspension is supposed to be transparent. > We cannot start returning error codes for operations which never > failed in practice (eg. switching configurations in USB), just because > the system is about to be suspended. Returning errors is better than crashing in any way. So what I meant here is that the problem is not as bad as it sounds. > If you want to request firmware in a PM callback, which makes a > certain > sense, as we should move to a comprehensive API, if we change the API > at all, we need a model with 3 callbacks. No. At this pace, we'll find reasons to have 98213674 callbacks and will still not be happy. Prepare() should be the right place to call request_firmware() and if that is a problem because of bugs in some USB things, then those bugs should be fixed. Ben.