From owner-freebsd-current@FreeBSD.ORG Wed Jun 11 21:57:16 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1A36D37B401; Wed, 11 Jun 2003 21:57:16 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4887C43F93; Wed, 11 Jun 2003 21:57:07 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.8/8.12.3) with ESMTP id h5C4v4kA026519; Wed, 11 Jun 2003 22:57:04 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 11 Jun 2003 22:56:50 -0600 (MDT) Message-Id: <20030611.225650.132415238.imp@bsdimp.com> To: orion@freebsd.org From: "M. Warner Losh" In-Reply-To: <200306101644.h5AGiawR066527@puma.icir.org> References: <20030609035127.GA36909@laptop.6bone.nl> <200306101644.h5AGiawR066527@puma.icir.org> X-Mailer: Mew version 2.1 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: current@freebsd.org Subject: Re: Correct PCI suspend and resume operations X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2003 04:57:16 -0000 In message: <200306101644.h5AGiawR066527@puma.icir.org> Orion Hodson writes: : It looks like the pci configuration space state has been lost during : the suspend and resume. This may be because the bus has removed power : from the devices attached to it on suspend. During a suspend, devices are typically set into D3 state. Transition from D3 -> D0 resets the most of the config space. : I've been through a cross section of drivers this morning and some : explicitly save and restore the PCI configuration state space and : others don't. The former seems like the safest path in most cases. : AFAICT, we don't common code for handling this and maybe there should : be some rather than have each driver replicate this behaviour. This should be saved in the pci bus layer. I have some very imperfect patches in my p4 tree that I'm working on. Warner