From owner-cvs-all@FreeBSD.ORG Mon May 24 10:06:45 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C06DD16A4CF for ; Mon, 24 May 2004 10:06:45 -0700 (PDT) Received: from root.org (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 800EF43D1F for ; Mon, 24 May 2004 10:06:45 -0700 (PDT) (envelope-from nate@root.org) Received: (qmail 70651 invoked by uid 1000); 24 May 2004 17:06:01 -0000 Date: Mon, 24 May 2004 10:06:00 -0700 (PDT) From: Nate Lawson To: Warner Losh In-Reply-To: <20040524155332.505A016A548@hub.freebsd.org> Message-ID: <20040524100528.A70614@root.org> References: <20040524155332.505A016A548@hub.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/pci pci.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 May 2004 17:06:45 -0000 On Mon, 24 May 2004, Warner Losh wrote: > imp 2004/05/24 08:52:57 PDT > > FreeBSD src repository > > Modified files: > sys/dev/pci pci.c > Log: > Do not write to those config registers that are unambiguously defined > in the various pci specifications as readonly. vendor, subvendor, > device and subdevice are required to be loaded in hardware by some > means that isn't the system BIOS or other system software (although > some devices do have ways of accomplishing this). class and subclass > are defined to be read-only in section 6.2.1 (v2.2). Apart from the > status register, which we weren't touching, these are the only > read-only registers I could find in the 2.2 spec. > > progif is also defined as being read-only in section 6.2.1. However, > the PCI IDE programming document specifically states that some of the > bits are read/write. Since we may have to restore registers before we > have a driver attached, go ahead and restore this one byte when > transitioning between D3 and D0. > > The PCI spec also says that writes to reserved and unimplemented > registers must be completed normally. It makes no statements about > writes to read-only registers, so be as conservative as possible, > while covering the exception to the rule that is documented in a > subpart of the standard. > > Requested by: socttl > > Revision Changes Path > 1.260 +0 -19 src/sys/dev/pci/pci.c Excellent, I think this is the right way to go. -Nate