> 1) some drivers use pci_disable_device(), and pci_enable_device().
I generally don't do the former, and I would expect the late to be done
by pci_restore_state() for you. pci_disable_device(), last I looked,
only cleared the bus master bit though, which might be a good idea to
do.
People in ACPI/x86 land, are there more good reasons to do one or the
other ?
That reminds me that I volunteered to write a documentation on how
drivers should do all that stuff at KS and didn't get to actually doing
it yet. shame ... I'll try to start something asap.
Right, you need to do the save_state before the power down. You need to
avoid pretty much any access to the device after the save state other
than the pending set_power_state on resume.
On x86 desktop... might have surprises on others.
It's only really safe to access the PM register itself, though I suppose
you should be able to walk the capability chain to do that. But I
wouldnt recommend doing anything else.
Note that the network stack nowadays does a fair bit of cleaning up for
you before your suspend routine is called....
The above -might- not be needed any more, I have to check. I used to do
it too on my drivers.
Looks allright on a quick glance appart from the bits we already
discussed.
I think the network stack does that nowadays but we'll have to double
check, that's based on what DaveM told me at KS.
Ben.
-