Date: Sun, 02 Jan 2005 21:07:14 -0700 (MST) From: "M. Warner Losh" <imp@bsdimp.com> To: nate@root.org Cc: freebsd-acpi@freebsd.org Subject: Re: ACPI C3 patch for atheros Message-ID: <20050102.210714.82100964.imp@bsdimp.com> In-Reply-To: <41D8C26A.8030105@root.org> References: <41D8B4D2.4050700@root.org> <41D8B6DF.7040703@errno.com> <41D8C26A.8030105@root.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <41D8C26A.8030105@root.org> Nate Lawson <nate@root.org> writes: : Sam Leffler wrote: : > Lots of old code here; at the time I cribbed the suspend-resume code I : > don't believe the pci registers were saved for drivers. : > : > Here's the code from which the change originated: : > : > > /* : > >> * Suspend/Resume resets the PCI configuration space, so we : > have to : > >> * re-disable the RETRY_TIMEOUT register (0x41) to keep : > >> * PCI Tx retries from interfering with C3 CPU state : > >> * : > >> * Code taken from ipw2100 driver - jg : > >> */ : > >> pci_read_config_dword(pdev, 0x40, &val); : > >> if ((val & 0x0000ff00) != 0) : > >> pci_write_config_dword(pdev, 0x40, val & 0xffff00ff); : > : > : > I was waiting for a reply from Warner about whether or not this belonged : > in the driver or if the pci layer should be handling this. : : If the comment is correct and the value is only lost due to : suspend/resume, this should already be covered by us saving/restoring : config registers although I believe we only save the normal registers : (first 64 bytes). Since RETRY_TIMEOUT is beyond that range, it's : probably not currently saved. Right. RETRY_LIMIT isn't standard. : In any case, I'd prefer we fix pci_cfg_save/restore() instead of doing : this in the driver. Overall, it would be useful to analyze and improve : coverage of what values we save and restore from config space. We : definitely need to cover type 1 and 2 (bridge) devices as well. We shouldn't, since it is non-standard. Type 1 can all be done in pcib, and type 2 can be done in cbb. Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050102.210714.82100964.imp>