From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261879AbUE0Jow (ORCPT ); Thu, 27 May 2004 05:44:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261880AbUE0Jow (ORCPT ); Thu, 27 May 2004 05:44:52 -0400 Received: from cantor.suse.de ([195.135.220.2]:40637 "EHLO Cantor.suse.de") by vger.kernel.org with ESMTP id S261879AbUE0Jov (ORCPT ); Thu, 27 May 2004 05:44:51 -0400 Date: Thu, 27 May 2004 11:44:49 +0200 Message-ID: From: Takashi Iwai To: Arjan van de Ven Cc: greg@kroah.com, linux-kernel@vger.kernel.org Subject: Re: Resume enhancement: restore pci config space In-Reply-To: <20040526203524.GF2057@devserv.devel.redhat.com> References: <20040526203524.GF2057@devserv.devel.redhat.com> User-Agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 MULE XEmacs/21.4 (patch 13) (Rational FORTRAN) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Hi Arjan, At Wed, 26 May 2004 22:35:26 +0200, Arjan van de Ven wrote: > > Hi, > > The patch below enhances the PCI layer with 2 things > 1) enable and busmaster state are stored in the pci device struct > 2) pci config space is stored to the pci device struct > > with that, it is possible to make a generic pci resume method that restores > config space and reenables the device, including busmaster when appropriate. > > One can rightfully argue that the driver resume method should do this, and > yes that is right. So the patch only does it for devices that don't have a > resume method. Like the main PCI bridge on my testbox of which the bios so > nicely forgets to restore the bus master bit during resume.. With this patch > my testbox resumes just fine while it, well, wasn't all too happy as you can > imagine without a busmaster pci bridge. Nice to have save_config_space[] in pci_dev even for the driver with resume/suspend callbacks. I already added bunch of such an array in the ALSA driver codes with ifdef CONFIG_PM, but now they all can be removed again :) -- Takashi Iwai ALSA Developer - www.alsa-project.org