zhao, forrest wrote:
Is it possible to add a callback in ata_pci_device_suspend() to do controller-level operation before calling pci_save_state()......? One possible solution is to put this callback into a structure together with host_set. Otherwise user-defined ahci_pci_device_suspend() will duplicate most code of ata_pci_device_suspend().
If a LLD wants to do controller specific things, define its own device_suspend/resume() routines and call ata_pci_device_*() from those functions after doing controller-specific stuff. Please read how sil_pci_device_resume() and sil24_pci_device_resume() are defined later in this patchset.
If ata_pci_device_suspend/resume() do things incorrect for a controller(), export ata_host_set_suspend/resume() and call those from LLD's suspend/resume() routines.
-- tejun - : send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html