Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Feb 2007 13:05:47 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        Scott Long <scottl@samsco.org>
Cc:        freebsd-current@freebsd.org, Andrew Gallatin <gallatin@cs.duke.edu>
Subject:   Re: restoring PCI config space
Message-ID:  <200702071305.48190.jhb@freebsd.org>
In-Reply-To: <45CA1273.8080205@samsco.org>
References:  <17855.30388.764471.322562@grasshopper.cs.duke.edu> <200702071212.06578.jhb@freebsd.org> <45CA1273.8080205@samsco.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 07 February 2007 12:54, Scott Long wrote:
> John Baldwin wrote:
> > On Wednesday 31 January 2007 12:08, Scott Long wrote:
> >> Andrew Gallatin wrote:
> >>> Scott Long writes:
> >>>  > I need to do the same thing, and I concluded that pci_cfg_restore 
needs
> >>>  > to be exported out via a DEVMETHOD.  It might also be useful to 
export
> >>>
> >>> Hurray!  Do you plan to do this soon?
> >>>
> >>>  > a pci_cfg_save function.
> >>>
> >>> Doesn't the config space get saved in pci_add_child?
> >>>
> >>> Drew
> >> Wouldn't you want to preserve driver-local changes that are made to the
> >> config space?  Things like the busmaster enable bit comes to mind.
> > 
> > If you use 'pci_enable_busmaster()' then that updates the copy in the 
dinfo.
> > 
> 
> Do changes to the MSI/MSIX config space registers also get preserved?

I currently cache MSI (but not MSI-X yet) and they are restored on resume via 
pci_cfg_restore().  That should all be transparent to the driver though as 
the driver shouldn't be touching those directly, but just via the 
pci_*_msi[x]() calls.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702071305.48190.jhb>