Messages in this thread | ![/](/images/icornerl.gif) | | Date | Mon, 31 May 2004 15:38:34 +0200 | From | Arjan van de Ven <> | Subject | Re: Resume enhancement: restore pci config space |
| |
On Sun, May 30, 2004 at 08:40:31PM +0200, Pavel Machek wrote: > Hi! > > > One can rightfully argue that the driver resume method should do this, and > > yes that is right. So the patch only does it for devices that don't have a > > resume method. Like the main PCI bridge on my testbox of which the bios so > > nicely forgets to restore the bus master bit during resume.. With this patch > > my testbox resumes just fine while it, well, wasn't all too happy as you can > > imagine without a busmaster pci bridge. > ... > > +/* > > + * Default resume method for devices that have no driver provided resume, > > + * or not even a driver at all. > > + */ > > +static void pci_default_resume(struct pci_dev *pci_dev) > > +{ > > Perhaps this should not be static so that drivers don't > need to duplicate this?
I wonder if that is useful, can you see cases where it would be? I mean, all it does is provide a default handler for places that don't have one. All this is info drivers already have, if a driver chooses to implement it's resume handler I think they can do better than this (and thus don't need this helper). But... if you can come up with a reasonable use I don't oppose it. I do like to see a sane user first though before adding this to the driver API... [unhandled content-type:application/pgp-signature] | ![\](/images/icornerr.gif) |