On Tue, 2006-06-13 at 00:50 +0900, Tejun Heo wrote: > > int ata_pci_device_resume(struct pci_dev *pdev) > { > + struct ata_host_set *first_hset = dev_get_drvdata(&pdev->dev); > + struct ata_host_set *host_set; > + int tmp, rc = 0; > + > pci_set_power_state(pdev, PCI_D0); > pci_restore_state(pdev); > pci_enable_device(pdev); > pci_set_master(pdev); > - return 0; > + > + for (host_set = first_hset; host_set; host_set = host_set->next) { > + tmp = ata_host_set_resume(host_set); > + if (tmp) > + rc = tmp; > + } > + > + return rc; > } > #endif /* CONFIG_PCI */ Similar here. Is it possible to introduce two controller-level callbacks, say ->pre_resume(), which is called before pci_set_power_state(), ->post_resume(), which is called after for() loop? This is needed by AHCI resume. Otherwise most code of ata_pci_device_resume() will be duplicated in ahci_pci_device_resume(). Another point is for AHCI resume we need to wait the resume operation of all ports to complete before calling ->post_resume(). Thanks, Forrest - : 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