From owner-freebsd-current@FreeBSD.ORG Tue Jun 10 09:44:45 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 F2DDF37B401 for ; Tue, 10 Jun 2003 09:44:44 -0700 (PDT) Received: from puma.icir.org (puma.icir.org [192.150.187.73]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D91B43F85 for ; Tue, 10 Jun 2003 09:44:44 -0700 (PDT) (envelope-from hodson@puma.icir.org) Received: from puma.icir.org (localhost [127.0.0.1]) by puma.icir.org (8.12.8p1/8.12.3) with ESMTP id h5AGiawR066527; Tue, 10 Jun 2003 09:44:40 -0700 (PDT) (envelope-from hodson@puma.icir.org) Message-Id: <200306101644.h5AGiawR066527@puma.icir.org> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.3 To: Mark Santcroos From: Orion Hodson In-Reply-To: Your message of "Mon, 09 Jun 2003 05:51:27 +0200." <20030609035127.GA36909@laptop.6bone.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 10 Jun 2003 09:44:36 -0700 Sender: hodson@icir.org cc: current@freebsd.org Subject: Correct PCI suspend and resume operations [ was Re: cirrus ich3 doesn't work after suspend to disk ] 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: Tue, 10 Jun 2003 16:44:45 -0000 /-- Mark Santcroos wrote: | | I did some checking with pciconf before and after suspend and come up with | the following "fix": | | # set nambar | pciconf -w -b pci0:31:5 0x11 0xd8 | # set nabmbar: | pciconf -w -b pci0:31:5 0x14 0x81 | pciconf -w -b pci0:31:5 0x15 0xdc | # set pcicmd: | pciconf -w -b pci0:31:5 0x4 0x5 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. 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. - Orion