libata fixes
PATCH 1/1 libata fixes
Notes:
1) The patches credited to me are really extractions of Alan's patches.
2) In particular, the 'change master/slave IDENTIFY order' has a wide (but hopefully not negative) impact, as mentioned in the thread. Since pata_* drivers are Officially(tm) considered more experimental than drivers/ide, and since most SATA devices are one-per-port (no slave), the biggest consideration is really master/slave on ata_piix.
3) Tejun's CONFIG_PM stuff might look like a cleanup, but IMO it is indeed a bug fix. As Nigel C noted in the related thread, this can probably be cleaned up further with some hopeful macros, but let's go ahead and get things compiling correctly.
Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git upstream-linus
to receive the following updates:
drivers/ata/ahci.c | 14 ++++++++++++++ drivers/ata/ata_generic.c | 4 ++++ drivers/ata/ata_piix.c | 4 ++++ drivers/ata/libata-core.c | 32 +++++++++++++++++++++++++++----- drivers/ata/libata-eh.c | 29 +++++++++++++++++++++++++++++ drivers/ata/libata-scsi.c | 2 ++ drivers/ata/pata_ali.c | 6 ++++++ drivers/ata/pata_amd.c | 6 ++++++ drivers/ata/pata_atiixp.c | 4 ++++ drivers/ata/pata_cmd64x.c | 8 +++++++- drivers/ata/pata_cs5520.c | 6 ++++++ drivers/ata/pata_cs5530.c | 6 ++++++ drivers/ata/pata_cs5535.c | 4 ++++ drivers/ata/pata_cypress.c | 4 ++++ drivers/ata/pata_efar.c | 4 ++++ drivers/ata/pata_hpt366.c | 7 ++++++- drivers/ata/pata_hpt3x3.c | 6 ++++++ drivers/ata/pata_it8213.c | 4 ++++ drivers/ata/pata_it821x.c | 6 ++++++ drivers/ata/pata_jmicron.c | 7 +++++++ drivers/ata/pata_legacy.c | 18 ++++++++++++++++++ drivers/ata/pata_marvell.c | 4 ++++ drivers/ata/pata_mpc52xx.c | 4 ++++ drivers/ata/pata_mpiix.c | 4 ++++ drivers/ata/pata_netcell.c | 4 ++++ drivers/ata/pata_ns87410.c | 4 ++++ drivers/ata/pata_oldpiix.c | 4 ++++ drivers/ata/pata_opti.c | 4 ++++ drivers/ata/pata_optidma.c | 4 ++++ drivers/ata/pata_pdc202xx_old.c | 4 ++++ drivers/ata/pata_qdi.c | 12 ++++++++---- drivers/ata/pata_radisys.c | 4 ++++ drivers/ata/pata_rz1000.c | 6 ++++++ drivers/ata/pata_sc1200.c | 7 +++++++ drivers/ata/pata_scc.c | 2 ++ drivers/ata/pata_serverworks.c | 6 ++++++ drivers/ata/pata_sil680.c | 8 ++++++++ drivers/ata/pata_sis.c | 4 ++++ drivers/ata/pata_sl82c105.c | 3 +++ drivers/ata/pata_triflex.c | 4 ++++ drivers/ata/pata_via.c | 6 ++++++ drivers/ata/sata_inic162x.c | 7 ++++++- drivers/ata/sata_nv.c | 16 ++++++++++++++++ drivers/ata/sata_sil.c | 2 ++ drivers/ata/sata_sil24.c | 2 ++ include/linux/libata.h | 7 +++++-- 46 files changed, 299 insertions(+), 14 deletions(-)
Alan Cox (2):
libata-core: Fix simplex handling
pata_qdi: Fix initialisation
Jeff Garzik (3):
[libata] change master/slave IDENTIFY order [libata] pata_{legacy,sc1200,sl82c105}: add missing hooks [libata] pata_cmd64x: fix driver description in comments
Tejun Heo (3):
libata: add missing PM callbacks
libata: add missing CONFIG_PM in LLDs
libata: add CONFIG_PM to libata core layer
drivers/ata/ahci.c +14 -0
@@ -219,10 +219,12 @@ static void ahci_thaw(struct ata_port *ap);static void ahci_error_handler (struct ata_port *ap);static void ahci_vt8251_error_handler (struct ata_port *ap);static void ahci_post_internal_cmd (struct ata_queued_cmd *qc); +#ifdef CONFIG_PM static int ahci_port_suspend (struct ata_port *ap,pm_message_t mesg);static int ahci_port_resume (struct ata_port *ap);static int ahci_pci_device_suspend (struct pci_dev *pdev,pm_message_t mesg);static int ahci_pci_device_resume (struct pci_dev *pdev); +#endif static struct scsi_host_template ahci_sht = { .module =THIS_MODULE ,
@@ -241,8 +243,10 @@ static struct scsi_host_template ahci_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .suspend = ata_scsi_device_suspend, .resume = ata_scsi_device_resume, +#endif }; static const struct ata_port_operations ahci_ops = {
@@ -271,8 +275,10 @@ static const struct ata_port_operations ahci_ops = { .error_handler = ahci_error_handler, .post_internal_cmd = ahci_post_internal_cmd, +#ifdef CONFIG_PM .port_suspend = ahci_port_suspend, .port_resume = ahci_port_resume, +#endif .port_start = ahci_port_start, .port_stop = ahci_port_stop,
@@ -304,8 +310,10 @@ static const struct ata_port_operations ahci_vt8251_ops = { .error_handler = ahci_vt8251_error_handler, .post_internal_cmd = ahci_post_internal_cmd, +#ifdef CONFIG_PM .port_suspend = ahci_port_suspend, .port_resume = ahci_port_resume, +#endif .port_start = ahci_port_start, .port_stop = ahci_port_stop,
@@ -436,8 +444,10 @@ static struct pci_driver ahci_pci_driver = { .id_table = ahci_pci_tbl, .probe = ahci_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ahci_pci_device_suspend, .resume = ahci_pci_device_resume, +#endif };
@@ -577,6 +587,7 @@ static void ahci_power_up(void __iomem *port_mmio, u32 cap)writel (cmd |PORT_CMD_ICC_ACTIVE , port_mmio +PORT_CMD ); } +#ifdef CONFIG_PM static void ahci_power_down (void __iomem *port_mmio,u32 cap) {u32 cmd, scontrol;
@@ -594,6 +605,7 @@ static void ahci_power_down(void __iomem *port_mmio, u32 cap) cmd &= ~PORT_CMD_SPIN_UP ; writel(cmd, port_mmio + PORT_CMD); } +#endif static void ahci_init_port (void __iomem *port_mmio,u32 cap,dma_addr_t cmd_slot_dma,dma_addr_t rx_fis_dma)
@@ -1335,6 +1347,7 @@ static void ahci_post_internal_cmd(struct ata_queued_cmd *qc) } } +#ifdef CONFIG_PM static int ahci_port_suspend (struct ata_port *ap,pm_message_t mesg) {struct ahci_host_priv *hpriv = ap->host->private_data;
@@ -1413,6 +1426,7 @@ static int ahci_pci_device_resume(struct pci_dev *pdev) return 0; } +#endif static int ahci_port_start (struct ata_port *ap) {
drivers/ata/ata_generic.c +4 -0
@@ -119,8 +119,10 @@ static struct scsi_host_template generic_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations generic_port_ops = {
@@ -230,8 +232,10 @@ static struct pci_driver ata_generic_pci_driver = { .id_table = ata_generic, .probe = ata_generic_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init ata_generic_init (void )
drivers/ata/ata_piix.c +4 -0
@@ -253,8 +253,10 @@ static struct pci_driver piix_pci_driver = { .id_table = piix_pci_tbl, .probe = piix_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif }; static struct scsi_host_template piix_sht = {
@@ -273,8 +275,10 @@ static struct scsi_host_template piix_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static const struct ata_port_operations piix_pata_ops = {
drivers/ata/libata-core.c +27 -5
@@ -1850,8 +1850,11 @@ int ata_bus_probe(struct ata_port *ap)for (i =0 ; i <ATA_MAX_DEVICES ; i++) ap->device[i].pio_mode =XFER_PIO_0 ; -/* read IDENTIFY page and configure devices */ -for (i =0 ; i <ATA_MAX_DEVICES ; i++) { +/* read IDENTIFY page and configure devices. We have to do the identify +specific sequence bass-ackwards so that PDIAG- is released by +the slave device */ + +for (i =ATA_MAX_DEVICES -1 ; i >=0 ; i--) { dev = &ap->device[i];if (tries[i])
@@ -1864,6 +1867,15 @@ int ata_bus_probe(struct ata_port *ap) dev->id);if (rc) goto fail; + } + +/* After the identify sequence we can now set up the devices. We do +this in the normal order so that the user doesn't get confused */ + +for (i =0 ; i <ATA_MAX_DEVICES ; i++) { + dev = &ap->device[i]; +if (!ata_dev_enabled (dev)) +continue ; ap->eh_context.i.flags |=ATA_EHI_PRINTINFO ; rc =ata_dev_configure (dev);
@@ -2556,12 +2568,11 @@ int ata_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev)* host channels are not permitted to do so. */ if (used_dma && (ap->host->flags &ATA_HOST_SIMPLEX )) - ap->host->simplex_claimed =1 ; + ap->host->simplex_claimed = ap;/* step5: chip specific finalisation */ if (ap->ops->post_set_mode) ap->ops->post_set_mode (ap); - out:if (rc) *r_failed_dev = dev;
@@ -3444,7 +3455,7 @@ static void ata_dev_xfermask(struct ata_device *dev) "device is on DMA blacklist, disabling DMA\n"); } -if ((host->flags &ATA_HOST_SIMPLEX ) && host->simplex_claimed) { +if ((host->flags &ATA_HOST_SIMPLEX ) && host->simplex_claimed != ap) { xfer_mask &= ~(ATA_MASK_MWDMA |ATA_MASK_UDMA );ata_dev_printk (dev,KERN_WARNING ,"simplex DMA is claimed by " "other device, disabling DMA\n" );
@@ -5343,6 +5354,7 @@ int ata_flush_cache(struct ata_device *dev)return 0 ; } +#ifdef CONFIG_PM static int ata_host_request_pm (struct ata_host *host,pm_message_t mesg,unsigned int action,unsigned int ehi_flags,int wait)
@@ -5458,6 +5470,7 @@ void ata_host_resume(struct ata_host *host) ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET, 0); host->dev->power.power_state = PMSG_ON; } +#endif /** * ata_port_start - Set port up for dma.
@@ -6093,6 +6106,7 @@ int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits)return (tmp == bits->val) ?1 :0 ; } +#ifdef CONFIG_PM void ata_pci_device_do_suspend (struct pci_dev *pdev,pm_message_t mesg) {pci_save_state (pdev);
@@ -6144,6 +6158,8 @@ int ata_pci_device_resume(struct pci_dev *pdev)ata_host_resume (host);return rc; } +#endif /* CONFIG_PM */ +#endif /* CONFIG_PCI */
@@ -6352,8 +6368,10 @@ EXPORT_SYMBOL_GPL(sata_scr_write);EXPORT_SYMBOL_GPL (sata_scr_write_flush);EXPORT_SYMBOL_GPL (ata_port_online);EXPORT_SYMBOL_GPL (ata_port_offline); +#ifdef CONFIG_PM EXPORT_SYMBOL_GPL (ata_host_suspend);EXPORT_SYMBOL_GPL (ata_host_resume); +#endif /* CONFIG_PM */ EXPORT_SYMBOL_GPL (ata_id_string);EXPORT_SYMBOL_GPL (ata_id_c_string);EXPORT_SYMBOL_GPL (ata_id_to_dma_mode);
@@ -6369,16 +6387,20 @@ EXPORT_SYMBOL_GPL(pci_test_config_bits);EXPORT_SYMBOL_GPL (ata_pci_init_native_mode);EXPORT_SYMBOL_GPL (ata_pci_init_one);EXPORT_SYMBOL_GPL (ata_pci_remove_one); +#ifdef CONFIG_PM EXPORT_SYMBOL_GPL (ata_pci_device_do_suspend);EXPORT_SYMBOL_GPL (ata_pci_device_do_resume);EXPORT_SYMBOL_GPL (ata_pci_device_suspend);EXPORT_SYMBOL_GPL (ata_pci_device_resume); +#endif /* CONFIG_PM */ EXPORT_SYMBOL_GPL (ata_pci_default_filter);EXPORT_SYMBOL_GPL (ata_pci_clear_simplex);#endif /* CONFIG_PCI */ +#ifdef CONFIG_PM EXPORT_SYMBOL_GPL (ata_scsi_device_suspend);EXPORT_SYMBOL_GPL (ata_scsi_device_resume); +#endif /* CONFIG_PM */ EXPORT_SYMBOL_GPL (ata_eng_timeout);EXPORT_SYMBOL_GPL (ata_port_schedule_eh);
drivers/ata/libata-eh.c +29 -0
@@ -52,8 +52,33 @@ enum {static void __ata_port_freeze (struct ata_port *ap);static void ata_eh_finish (struct ata_port *ap); +#ifdef CONFIG_PM static void ata_eh_handle_port_suspend (struct ata_port *ap);static void ata_eh_handle_port_resume (struct ata_port *ap); +static int ata_eh_suspend (struct ata_port *ap, +struct ata_device **r_failed_dev); +static void ata_eh_prep_resume (struct ata_port *ap); +static int ata_eh_resume (struct ata_port *ap,struct ata_device **r_failed_dev); +#else /* CONFIG_PM */ +static void ata_eh_handle_port_suspend (struct ata_port *ap) +{ } + +static void ata_eh_handle_port_resume (struct ata_port *ap) +{ } + +static int ata_eh_suspend (struct ata_port *ap,struct ata_device **r_failed_dev) +{ +return 0 ; +} + +static void ata_eh_prep_resume (struct ata_port *ap) +{ } + +static int ata_eh_resume (struct ata_port *ap,struct ata_device **r_failed_dev) +{ +return 0 ; +} +#endif /* CONFIG_PM */ static void ata_ering_record (struct ata_ering *ering,int is_io,unsigned int err_mask)
@@ -1790,6 +1815,7 @@ static int ata_eh_revalidate_and_attach(struct ata_port *ap,return rc; } +#ifdef CONFIG_PM /** * ata_eh_suspend - handle suspend EH action * @ap: target host port
@@ -1947,6 +1973,7 @@ static int ata_eh_resume(struct ata_port *ap, struct ata_device **r_failed_dev)DPRINTK ("EXIT\n" ); return 0; } +#endif /* CONFIG_PM */ static int ata_port_nr_enabled (struct ata_port *ap) {
@@ -2249,6 +2276,7 @@ void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset,ata_eh_finish (ap); } +#ifdef CONFIG_PM /** * ata_eh_handle_port_suspend - perform port suspend operation * @ap: port to suspend
@@ -2364,3 +2392,4 @@ static void ata_eh_handle_port_resume(struct ata_port *ap) }spin_unlock_irqrestore (ap->lock, flags); } +#endif /* CONFIG_PM */
drivers/ata/libata-scsi.c +2 -0
@@ -510,6 +510,7 @@ static void ata_dump_status(unsigned id, struct ata_taskfile *tf) } } +#ifdef CONFIG_PM /** * ata_scsi_device_suspend - suspend ATA device associated with sdev * @sdev: the SCSI device to suspend
@@ -634,6 +635,7 @@ int ata_scsi_device_resume(struct scsi_device *sdev) sdev->sdev_gendev.power.power_state =PMSG_ON ; return 0; } +#endif /* CONFIG_PM */ /** * ata_to_sense_error - convert ATA error to SCSI error
drivers/ata/pata_ali.c +6 -0
@@ -345,8 +345,10 @@ static struct scsi_host_template ali_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif };/*
@@ -667,11 +669,13 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)return ata_pci_init_one (pdev, port_info,2 ); } +#ifdef CONFIG_PM static int ali_reinit_one (struct pci_dev *pdev) {ali_init_chipset (pdev);return ata_pci_device_resume (pdev); } +#endif static const struct pci_device_id ali[] = { {PCI_VDEVICE (AL ,PCI_DEVICE_ID_AL_M5228 ), },
@@ -685,8 +689,10 @@ static struct pci_driver ali_pci_driver = { .id_table = ali, .probe = ali_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ali_reinit_one, +#endif };static int __init ali_init (void )
drivers/ata/pata_amd.c +6 -0
@@ -334,8 +334,10 @@ static struct scsi_host_template amd_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations amd33_port_ops = {
@@ -663,6 +665,7 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)return ata_pci_init_one (pdev, port_info,2 ); } +#ifdef CONFIG_PM static int amd_reinit_one (struct pci_dev *pdev) {if (pdev->vendor ==PCI_VENDOR_ID_AMD ) {
@@ -679,6 +682,7 @@ static int amd_reinit_one(struct pci_dev *pdev) }return ata_pci_device_resume (pdev); } +#endif static const struct pci_device_id amd[] = { {PCI_VDEVICE (AMD ,PCI_DEVICE_ID_AMD_COBRA_7401 ),0 },
@@ -708,8 +712,10 @@ static struct pci_driver amd_pci_driver = { .id_table = amd, .probe = amd_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = amd_reinit_one, +#endif };static int __init amd_init (void )
drivers/ata/pata_atiixp.c +4 -0
@@ -224,8 +224,10 @@ static struct scsi_host_template atiixp_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations atiixp_port_ops = {
@@ -290,8 +292,10 @@ static struct pci_driver atiixp_pci_driver = { .id_table = atiixp, .probe = atiixp_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .resume = ata_pci_device_resume, .suspend = ata_pci_device_suspend, +#endif };static int __init atiixp_init (void )
drivers/ata/pata_cmd64x.c +7 -1
@@ -1,5 +1,5 @@/* -* pata_cmd64x.c - ATI PATA for new ATA layer +* pata_cmd64x.c - CMD64x PATA for new ATA layer * (C) 2005 Red Hat Inc * Alan Cox <[email protected]> *
@@ -285,8 +285,10 @@ static struct scsi_host_template cmd64x_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations cmd64x_port_ops = {
@@ -479,6 +481,7 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)return ata_pci_init_one (pdev, port_info,2 ); } +#ifdef CONFIG_PM static int cmd64x_reinit_one (struct pci_dev *pdev) {u8 mrdmode;
@@ -492,6 +495,7 @@ static int cmd64x_reinit_one(struct pci_dev *pdev)#endif return ata_pci_device_resume (pdev); } +#endif static const struct pci_device_id cmd64x[] = { {PCI_VDEVICE (CMD ,PCI_DEVICE_ID_CMD_643 ),0 },
@@ -507,8 +511,10 @@ static struct pci_driver cmd64x_pci_driver = { .id_table = cmd64x, .probe = cmd64x_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = cmd64x_reinit_one, +#endif };static int __init cmd64x_init (void )
drivers/ata/pata_cs5520.c +6 -0
@@ -167,8 +167,10 @@ static struct scsi_host_template cs5520_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations cs5520_port_ops = {
@@ -308,6 +310,7 @@ static void __devexit cs5520_remove_one(struct pci_dev *pdev)ata_host_detach (host); } +#ifdef CONFIG_PM /** * cs5520_reinit_one - device resume * @pdev: PCI device
@@ -347,6 +350,7 @@ static int cs5520_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)pci_save_state (pdev); return 0; } +#endif /* CONFIG_PM */ /* For now keep DMA off. We can set it for all but A rev CS5510 once the core ATA code can handle it */
@@ -363,8 +367,10 @@ static struct pci_driver cs5520_pci_driver = { .id_table = pata_cs5520, .probe = cs5520_init_one, .remove = cs5520_remove_one, +#ifdef CONFIG_PM .suspend = cs5520_pci_device_suspend, .resume = cs5520_reinit_one, +#endif };static int __init cs5520_init (void )
drivers/ata/pata_cs5530.c +6 -0
@@ -188,8 +188,10 @@ static struct scsi_host_template cs5530_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations cs5530_port_ops = {
@@ -376,6 +378,7 @@ static int cs5530_init_one(struct pci_dev *pdev, const struct pci_device_id *id)return ata_pci_init_one (pdev, port_info,2 ); } +#ifdef CONFIG_PM static int cs5530_reinit_one (struct pci_dev *pdev) {/* If we fail on resume we are doomed */
@@ -383,6 +386,7 @@ static int cs5530_reinit_one(struct pci_dev *pdev)BUG ();return ata_pci_device_resume (pdev); } +#endif /* CONFIG_PM */ static const struct pci_device_id cs5530[] = { {PCI_VDEVICE (CYRIX ,PCI_DEVICE_ID_CYRIX_5530_IDE ), },
@@ -395,8 +399,10 @@ static struct pci_driver cs5530_pci_driver = { .id_table = cs5530, .probe = cs5530_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = cs5530_reinit_one, +#endif };static int __init cs5530_init (void )
drivers/ata/pata_cs5535.c +4 -0
@@ -185,8 +185,10 @@ static struct scsi_host_template cs5535_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations cs5535_port_ops = {
@@ -270,8 +272,10 @@ static struct pci_driver cs5535_pci_driver = { .id_table = cs5535, .probe = cs5535_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init cs5535_init (void )
drivers/ata/pata_cypress.c +4 -0
@@ -136,8 +136,10 @@ static struct scsi_host_template cy82c693_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations cy82c693_port_ops = {
@@ -206,8 +208,10 @@ static struct pci_driver cy82c693_pci_driver = { .id_table = cy82c693, .probe = cy82c693_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init cy82c693_init (void )
drivers/ata/pata_efar.c +4 -0
@@ -234,8 +234,10 @@ static struct scsi_host_template efar_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static const struct ata_port_operations efar_ops = {
@@ -317,8 +319,10 @@ static struct pci_driver efar_pci_driver = { .id_table = efar_pci_tbl, .probe = efar_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init efar_init (void )
drivers/ata/pata_hpt366.c +6 -1
@@ -328,8 +328,10 @@ static struct scsi_host_template hpt36x_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif };/*
@@ -457,12 +459,13 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id)return ata_pci_init_one (dev, port_info,2 ); } +#ifdef CONFIG_PM static int hpt36x_reinit_one (struct pci_dev *dev) {hpt36x_init_chipset (dev);return ata_pci_device_resume (dev); } - +#endif static const struct pci_device_id hpt36x[] = { {PCI_VDEVICE (TTI ,PCI_DEVICE_ID_TTI_HPT366 ), },
@@ -474,8 +477,10 @@ static struct pci_driver hpt36x_pci_driver = { .id_table = hpt36x, .probe = hpt36x_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = hpt36x_reinit_one, +#endif };static int __init hpt36x_init (void )
drivers/ata/pata_hpt3x3.c +6 -0
@@ -119,8 +119,10 @@ static struct scsi_host_template hpt3x3_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations hpt3x3_port_ops = {
@@ -206,11 +208,13 @@ static int hpt3x3_init_one(struct pci_dev *dev, const struct pci_device_id *id)return ata_pci_init_one (dev, port_info,2 ); } +#ifdef CONFIG_PM static int hpt3x3_reinit_one (struct pci_dev *dev) {hpt3x3_init_chipset (dev);return ata_pci_device_resume (dev); } +#endif static const struct pci_device_id hpt3x3[] = { {PCI_VDEVICE (TTI ,PCI_DEVICE_ID_TTI_HPT343 ), },
@@ -223,8 +227,10 @@ static struct pci_driver hpt3x3_pci_driver = { .id_table = hpt3x3, .probe = hpt3x3_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = hpt3x3_reinit_one, +#endif };static int __init hpt3x3_init (void )
drivers/ata/pata_it8213.c +4 -0
@@ -246,8 +246,10 @@ static struct scsi_host_template it8213_sht = { .dma_boundary = ATA_DMA_BOUNDARY, .slave_configure = ata_scsi_slave_config, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static const struct ata_port_operations it8213_ops = {
@@ -330,8 +332,10 @@ static struct pci_driver it8213_pci_driver = { .id_table = it8213_pci_tbl, .probe = it8213_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init it8213_init (void )
drivers/ata/pata_it821x.c +6 -0
@@ -646,8 +646,10 @@ static struct scsi_host_template it821x_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations it821x_smart_port_ops = {
@@ -780,6 +782,7 @@ static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)return ata_pci_init_one (pdev, port_info,2 ); } +#ifdef CONFIG_PM static int it821x_reinit_one (struct pci_dev *pdev) {/* Resume - turn raid back off if need be */
@@ -787,6 +790,7 @@ static int it821x_reinit_one(struct pci_dev *pdev)it821x_disable_raid (pdev);return ata_pci_device_resume (pdev); } +#endif static const struct pci_device_id it821x[] = { {PCI_VDEVICE (ITE ,PCI_DEVICE_ID_ITE_8211 ), },
@@ -800,8 +804,10 @@ static struct pci_driver it821x_pci_driver = { .id_table = it821x, .probe = it821x_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = it821x_reinit_one, +#endif };static int __init it821x_init (void )
drivers/ata/pata_jmicron.c +7 -0
@@ -137,6 +137,10 @@ static struct scsi_host_template jmicron_sht = { .slave_destroy = ata_scsi_slave_destroy,/* Use standard CHS mapping rules */ .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM + .suspend = ata_scsi_device_suspend, + .resume = ata_scsi_device_resume, +#endif }; static const struct ata_port_operations jmicron_ops = {
@@ -225,8 +229,10 @@ static struct pci_driver jmicron_pci_driver = { .id_table = jmicron_pci_tbl, .probe = jmicron_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init jmicron_init (void )
@@ -238,6 +244,7 @@ static void __exit jmicron_exit(void) {pci_unregister_driver (&jmicron_pci_driver); } +#endif module_init (jmicron_init);module_exit (jmicron_exit);
drivers/ata/pata_legacy.c +18 -0
@@ -186,7 +186,10 @@ static struct ata_port_operations legacy_port_ops = { .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .freeze = ata_bmdma_freeze, + .thaw = ata_bmdma_thaw, .error_handler = ata_bmdma_error_handler, + .post_internal_cmd = ata_bmdma_post_internal_cmd, .qc_prep = ata_qc_prep, .qc_issue = ata_qc_issue_prot,
@@ -298,7 +301,10 @@ static struct ata_port_operations pdc20230_port_ops = { .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .freeze = ata_bmdma_freeze, + .thaw = ata_bmdma_thaw, .error_handler = ata_bmdma_error_handler, + .post_internal_cmd = ata_bmdma_post_internal_cmd, .qc_prep = ata_qc_prep, .qc_issue = ata_qc_issue_prot,
@@ -350,7 +356,10 @@ static struct ata_port_operations ht6560a_port_ops = { .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .freeze = ata_bmdma_freeze, + .thaw = ata_bmdma_thaw, .error_handler = ata_bmdma_error_handler, + .post_internal_cmd = ata_bmdma_post_internal_cmd, .qc_prep = ata_qc_prep, .qc_issue = ata_qc_issue_prot,
@@ -413,7 +422,10 @@ static struct ata_port_operations ht6560b_port_ops = { .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .freeze = ata_bmdma_freeze, + .thaw = ata_bmdma_thaw, .error_handler = ata_bmdma_error_handler, + .post_internal_cmd = ata_bmdma_post_internal_cmd, .qc_prep = ata_qc_prep, .qc_issue = ata_qc_issue_prot,
@@ -531,7 +543,10 @@ static struct ata_port_operations opti82c611a_port_ops = { .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .freeze = ata_bmdma_freeze, + .thaw = ata_bmdma_thaw, .error_handler = ata_bmdma_error_handler, + .post_internal_cmd = ata_bmdma_post_internal_cmd, .qc_prep = ata_qc_prep, .qc_issue = ata_qc_issue_prot,
@@ -661,7 +676,10 @@ static struct ata_port_operations opti82c46x_port_ops = { .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .freeze = ata_bmdma_freeze, + .thaw = ata_bmdma_thaw, .error_handler = ata_bmdma_error_handler, + .post_internal_cmd = ata_bmdma_post_internal_cmd, .qc_prep = ata_qc_prep, .qc_issue = opti82c46x_qc_issue_prot,
drivers/ata/pata_marvell.c +4 -0
@@ -103,8 +103,10 @@ static struct scsi_host_template marvell_sht = { .slave_destroy = ata_scsi_slave_destroy,/* Use standard CHS mapping rules */ .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static const struct ata_port_operations marvell_ops = {
@@ -199,8 +201,10 @@ static struct pci_driver marvell_pci_driver = { .id_table = marvell_pci_tbl, .probe = marvell_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init marvell_init (void )
drivers/ata/pata_mpc52xx.c +4 -0
@@ -280,6 +280,10 @@ static struct scsi_host_template mpc52xx_ata_sht = { .dma_boundary = ATA_DMA_BOUNDARY, .slave_configure = ata_scsi_slave_config, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM + .suspend = ata_scsi_device_suspend, + .resume = ata_scsi_device_resume, +#endif }; static struct ata_port_operations mpc52xx_ata_port_ops = {
drivers/ata/pata_mpiix.c +4 -0
@@ -165,8 +165,10 @@ static struct scsi_host_template mpiix_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations mpiix_port_ops = {
@@ -270,8 +272,10 @@ static struct pci_driver mpiix_pci_driver = { .id_table = mpiix, .probe = mpiix_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init mpiix_init (void )
drivers/ata/pata_netcell.c +4 -0
@@ -63,8 +63,10 @@ static struct scsi_host_template netcell_sht = { .slave_destroy = ata_scsi_slave_destroy,/* Use standard CHS mapping rules */ .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static const struct ata_port_operations netcell_ops = {
@@ -153,8 +155,10 @@ static struct pci_driver netcell_pci_driver = { .id_table = netcell_pci_tbl, .probe = netcell_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init netcell_init (void )
drivers/ata/pata_ns87410.c +4 -0
@@ -157,8 +157,10 @@ static struct scsi_host_template ns87410_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations ns87410_port_ops = {
@@ -212,8 +214,10 @@ static struct pci_driver ns87410_pci_driver = { .id_table = ns87410, .probe = ns87410_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init ns87410_init (void )
drivers/ata/pata_oldpiix.c +4 -0
@@ -233,8 +233,10 @@ static struct scsi_host_template oldpiix_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static const struct ata_port_operations oldpiix_pata_ops = {
@@ -316,8 +318,10 @@ static struct pci_driver oldpiix_pci_driver = { .id_table = oldpiix_pci_tbl, .probe = oldpiix_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init oldpiix_init (void )
drivers/ata/pata_opti.c +4 -0
@@ -179,8 +179,10 @@ static struct scsi_host_template opti_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations opti_port_ops = {
@@ -244,8 +246,10 @@ static struct pci_driver opti_pci_driver = { .id_table = opti, .probe = opti_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init opti_init (void )
drivers/ata/pata_optidma.c +4 -0
@@ -360,8 +360,10 @@ static struct scsi_host_template optidma_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations optidma_port_ops = {
@@ -524,8 +526,10 @@ static struct pci_driver optidma_pci_driver = { .id_table = optidma, .probe = optidma_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init optidma_init (void )
drivers/ata/pata_pdc202xx_old.c +4 -0
@@ -267,8 +267,10 @@ static struct scsi_host_template pdc202xx_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations pdc2024x_port_ops = {
@@ -399,8 +401,10 @@ static struct pci_driver pdc202xx_pci_driver = { .id_table = pdc202xx, .probe = pdc202xx_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init pdc202xx_init (void )
drivers/ata/pata_qdi.c +8 -4
@@ -363,7 +363,8 @@ static __init int qdi_init(void)release_region (port,2 );continue ; } - ct +=qdi_init_one (port,6500 , ide_port[r &0x01 ], ide_irq[r &0x01 ], r &0x04 ); +if (qdi_init_one (port,6500 , ide_port[r &0x01 ], ide_irq[r &0x01 ], r &0x04 ) ==0 ) + ct++; }if (((r &0xF0 ) ==0xA0 ) || (r &0xF0 ) ==0x50 ) {/* QD6580: dual channel */
@@ -375,11 +376,14 @@ static __init int qdi_init(void) res =inb (port +3 );if (res &1 ) {/* Single channel mode */ - ct +=qdi_init_one (port,6580 , ide_port[r &0x01 ], ide_irq[r &0x01 ], r &0x04 ); +if (qdi_init_one (port,6580 , ide_port[r &0x01 ], ide_irq[r &0x01 ], r &0x04 )) + ct++; }else {/* Dual channel mode */ - ct +=qdi_init_one (port,6580 ,0x1F0 ,14 , r &0x04 ); - ct +=qdi_init_one (port +2 ,6580 ,0x170 ,15 , r &0x04 ); +if (qdi_init_one (port,6580 ,0x1F0 ,14 , r &0x04 ) ==0 ) + ct++; +if (qdi_init_one (port +2 ,6580 ,0x170 ,15 , r &0x04 ) ==0 ) + ct++; } } }
drivers/ata/pata_radisys.c +4 -0
@@ -228,8 +228,10 @@ static struct scsi_host_template radisys_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static const struct ata_port_operations radisys_pata_ops = {
@@ -312,8 +314,10 @@ static struct pci_driver radisys_pci_driver = { .id_table = radisys_pci_tbl, .probe = radisys_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init radisys_init (void )
drivers/ata/pata_rz1000.c +6 -0
@@ -94,8 +94,10 @@ static struct scsi_host_template rz1000_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations rz1000_port_ops = {
@@ -178,6 +180,7 @@ static int rz1000_init_one (struct pci_dev *pdev, const struct pci_device_id *enreturn -ENODEV ; } +#ifdef CONFIG_PM static int rz1000_reinit_one (struct pci_dev *pdev) {/* If this fails on resume (which is a "cant happen" case), we
@@ -186,6 +189,7 @@ static int rz1000_reinit_one(struct pci_dev *pdev)panic ("rz1000 fifo" );return ata_pci_device_resume (pdev); } +#endif static const struct pci_device_id pata_rz1000[] = { {PCI_VDEVICE (PCTECH ,PCI_DEVICE_ID_PCTECH_RZ1000 ), },
@@ -199,8 +203,10 @@ static struct pci_driver rz1000_pci_driver = { .id_table = pata_rz1000, .probe = rz1000_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = rz1000_reinit_one, +#endif };static int __init rz1000_init (void )
drivers/ata/pata_sc1200.c +7 -0
@@ -194,8 +194,10 @@ static struct scsi_host_template sc1200_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations sc1200_port_ops = {
@@ -210,7 +212,10 @@ static struct ata_port_operations sc1200_port_ops = { .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .freeze = ata_bmdma_freeze, + .thaw = ata_bmdma_thaw, .error_handler = ata_bmdma_error_handler, + .post_internal_cmd = ata_bmdma_post_internal_cmd, .bmdma_setup = ata_bmdma_setup, .bmdma_start = ata_bmdma_start,
@@ -266,8 +271,10 @@ static struct pci_driver sc1200_pci_driver = { .id_table = sc1200, .probe = sc1200_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init sc1200_init (void )
drivers/ata/pata_scc.c +2 -0
@@ -984,8 +984,10 @@ static struct scsi_host_template scc_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static const struct ata_port_operations scc_pata_ops = {
drivers/ata/pata_serverworks.c +6 -0
@@ -319,8 +319,10 @@ static struct scsi_host_template serverworks_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations serverworks_osb4_port_ops = {
@@ -548,6 +550,7 @@ static int serverworks_init_one(struct pci_dev *pdev, const struct pci_device_idreturn ata_pci_init_one (pdev, port_info, ports); } +#ifdef CONFIG_PM static int serverworks_reinit_one (struct pci_dev *pdev) {/* Force master latency timer to 64 PCI clocks */
@@ -571,6 +574,7 @@ static int serverworks_reinit_one(struct pci_dev *pdev) }return ata_pci_device_resume (pdev); } +#endif static const struct pci_device_id serverworks[] = { {PCI_VDEVICE (SERVERWORKS ,PCI_DEVICE_ID_SERVERWORKS_OSB4IDE ),0 },
@@ -587,8 +591,10 @@ static struct pci_driver serverworks_pci_driver = { .id_table = serverworks, .probe = serverworks_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = serverworks_reinit_one, +#endif };static int __init serverworks_init (void )
drivers/ata/pata_sil680.c +8 -0
@@ -236,6 +236,10 @@ static struct scsi_host_template sil680_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM + .suspend = ata_scsi_device_suspend, + .resume = ata_scsi_device_resume, +#endif }; static struct ata_port_operations sil680_port_ops = {
@@ -377,11 +381,13 @@ static int sil680_init_one(struct pci_dev *pdev, const struct pci_device_id *id)return ata_pci_init_one (pdev, port_info,2 ); } +#ifdef CONFIG_PM static int sil680_reinit_one (struct pci_dev *pdev) {sil680_init_chip (pdev);return ata_pci_device_resume (pdev); } +#endif static const struct pci_device_id sil680[] = { {PCI_VDEVICE (CMD ,PCI_DEVICE_ID_SII_680 ), },
@@ -394,8 +400,10 @@ static struct pci_driver sil680_pci_driver = { .id_table = sil680, .probe = sil680_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = sil680_reinit_one, +#endif };static int __init sil680_init (void )
drivers/ata/pata_sis.c +4 -0
@@ -575,8 +575,10 @@ static struct scsi_host_template sis_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static const struct ata_port_operations sis_133_ops = {
@@ -1032,8 +1034,10 @@ static struct pci_driver sis_pci_driver = { .id_table = sis_pci_tbl, .probe = sis_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init sis_init (void )
drivers/ata/pata_sl82c105.c +3 -0
@@ -234,7 +234,10 @@ static struct ata_port_operations sl82c105_port_ops = { .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .freeze = ata_bmdma_freeze, + .thaw = ata_bmdma_thaw, .error_handler = sl82c105_error_handler, + .post_internal_cmd = ata_bmdma_post_internal_cmd, .bmdma_setup = ata_bmdma_setup, .bmdma_start = sl82c105_bmdma_start,
drivers/ata/pata_triflex.c +4 -0
@@ -193,8 +193,10 @@ static struct scsi_host_template triflex_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations triflex_port_ops = {
@@ -260,8 +262,10 @@ static struct pci_driver triflex_pci_driver = { .id_table = triflex, .probe = triflex_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init triflex_init (void )
drivers/ata/pata_via.c +6 -0
@@ -305,8 +305,10 @@ static struct scsi_host_template via_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations via_port_ops = {
@@ -560,6 +562,7 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)return ata_pci_init_one (pdev, port_info,2 ); } +#ifdef CONFIG_PM /** * via_reinit_one - reinit after resume * @pdev; PCI device
@@ -592,6 +595,7 @@ static int via_reinit_one(struct pci_dev *pdev) }return ata_pci_device_resume (pdev); } +#endif static const struct pci_device_id via[] = { {PCI_VDEVICE (VIA ,PCI_DEVICE_ID_VIA_82C576_1 ), },
@@ -607,8 +611,10 @@ static struct pci_driver via_pci_driver = { .id_table = via, .probe = via_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = via_reinit_one, +#endif };static int __init via_init (void )
drivers/ata/sata_inic162x.c +6 -1
@@ -135,8 +135,10 @@ static struct scsi_host_template inic_sht = { .slave_configure = inic_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .suspend = ata_scsi_device_suspend, .resume = ata_scsi_device_resume, +#endif }; static const int scr_map[] = {
@@ -632,6 +634,7 @@ static int init_controller(void __iomem *mmio_base, u16 hctl)return 0 ; } +#ifdef CONFIG_PM static int inic_pci_device_resume (struct pci_dev *pdev) {struct ata_host *host =dev_get_drvdata (&pdev->dev);
@@ -642,7 +645,6 @@ static int inic_pci_device_resume(struct pci_dev *pdev)ata_pci_device_do_resume (pdev);if (pdev->dev.power.power_state.event ==PM_EVENT_SUSPEND ) { -printk ("XXX\n" ); rc =init_controller (mmio_base, hpriv->cached_hctl);if (rc)return rc;
@@ -652,6 +654,7 @@ static int inic_pci_device_resume(struct pci_dev *pdev) return 0; } +#endif static int inic_init_one (struct pci_dev *pdev,const struct pci_device_id *ent) {
@@ -755,8 +758,10 @@ static const struct pci_device_id inic_pci_tbl[] = {static struct pci_driver inic_pci_driver = { .name =DRV_NAME , .id_table = inic_pci_tbl, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = inic_pci_device_resume, +#endif .probe = inic_init_one, .remove = ata_pci_remove_one, };
drivers/ata/sata_nv.c +16 -0
@@ -230,7 +230,9 @@ struct nv_host_priv {static int nv_init_one (struct pci_dev *pdev,const struct pci_device_id *ent);static void nv_remove_one (struct pci_dev *pdev); +#ifdef CONFIG_PM static int nv_pci_device_resume (struct pci_dev *pdev); +#endif static void nv_ck804_host_stop (struct ata_host *host);static irqreturn_t nv_generic_interrupt (int irq,void *dev_instance);static irqreturn_t nv_nf2_interrupt (int irq,void *dev_instance);
@@ -251,8 +253,10 @@ static irqreturn_t nv_adma_interrupt(int irq, void *dev_instance);static void nv_adma_irq_clear (struct ata_port *ap);static int nv_adma_port_start (struct ata_port *ap);static void nv_adma_port_stop (struct ata_port *ap); +#ifdef CONFIG_PM static int nv_adma_port_suspend (struct ata_port *ap,pm_message_t mesg);static int nv_adma_port_resume (struct ata_port *ap); +#endif static void nv_adma_error_handler (struct ata_port *ap);static void nv_adma_host_stop (struct ata_host *host);static void nv_adma_post_internal_cmd (struct ata_queued_cmd *qc);
@@ -295,8 +299,10 @@ static struct pci_driver nv_pci_driver = { .name = DRV_NAME, .id_table = nv_pci_tbl, .probe = nv_init_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = nv_pci_device_resume, +#endif .remove = nv_remove_one, };
@@ -316,8 +322,10 @@ static struct scsi_host_template nv_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .suspend = ata_scsi_device_suspend, .resume = ata_scsi_device_resume, +#endif }; static struct scsi_host_template nv_adma_sht = {
@@ -336,8 +344,10 @@ static struct scsi_host_template nv_adma_sht = { .slave_configure = nv_adma_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .suspend = ata_scsi_device_suspend, .resume = ata_scsi_device_resume, +#endif }; static const struct ata_port_operations nv_generic_ops = {
@@ -449,8 +459,10 @@ static const struct ata_port_operations nv_adma_ops = { .scr_write = nv_scr_write, .port_start = nv_adma_port_start, .port_stop = nv_adma_port_stop, +#ifdef CONFIG_PM .port_suspend = nv_adma_port_suspend, .port_resume = nv_adma_port_resume, +#endif .host_stop = nv_adma_host_stop, };
@@ -1003,6 +1015,7 @@ static void nv_adma_port_stop(struct ata_port *ap)writew (0 , mmio +NV_ADMA_CTL ); } +#ifdef CONFIG_PM static int nv_adma_port_suspend (struct ata_port *ap,pm_message_t mesg) {struct nv_adma_port_priv *pp = ap->private_data;
@@ -1053,6 +1066,7 @@ static int nv_adma_port_resume(struct ata_port *ap) return 0; } +#endif static void nv_adma_setup_port (struct ata_probe_ent *probe_ent,unsigned int port) {
@@ -1555,6 +1569,7 @@ static void nv_remove_one (struct pci_dev *pdev)kfree (hpriv); } +#ifdef CONFIG_PM static int nv_pci_device_resume (struct pci_dev *pdev) {struct ata_host *host =dev_get_drvdata (&pdev->dev);
@@ -1602,6 +1617,7 @@ static int nv_pci_device_resume(struct pci_dev *pdev) return 0; } +#endif static void nv_ck804_host_stop (struct ata_host *host) {
drivers/ata/sata_sil.c +2 -0
@@ -183,8 +183,10 @@ static struct scsi_host_template sil_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .suspend = ata_scsi_device_suspend, .resume = ata_scsi_device_resume, +#endif }; static const struct ata_port_operations sil_ops = {
drivers/ata/sata_sil24.c +2 -0
@@ -380,8 +380,10 @@ static struct scsi_host_template sil24_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .suspend = ata_scsi_device_suspend, .resume = ata_scsi_device_resume, +#endif }; static const struct ata_port_operations sil24_ops = {
include/linux/libata.h +5 -2
@@ -403,8 +403,7 @@ struct ata_host {void *private_data;const struct ata_port_operations *ops;unsigned long flags; -int simplex_claimed;/* Keep seperate in case we -ever need to do this locked */ +struct ata_port *simplex_claimed;/* channel owning the DMA */ struct ata_port *ports[0 ]; };
@@ -719,10 +718,12 @@ extern void ata_std_ports(struct ata_ioports *ioaddr);extern int ata_pci_init_one (struct pci_dev *pdev,struct ata_port_info **port_info,unsigned int n_ports);extern void ata_pci_remove_one (struct pci_dev *pdev); +#ifdef CONFIG_PM extern void ata_pci_device_do_suspend (struct pci_dev *pdev,pm_message_t mesg);extern int __must_check ata_pci_device_do_resume (struct pci_dev *pdev);extern int ata_pci_device_suspend (struct pci_dev *pdev,pm_message_t mesg);extern int ata_pci_device_resume (struct pci_dev *pdev); +#endif extern int ata_pci_clear_simplex (struct pci_dev *pdev);#endif /* CONFIG_PCI */ extern int ata_device_add (const struct ata_probe_ent *ent);
@@ -748,10 +749,12 @@ extern int sata_scr_write(struct ata_port *ap, int reg, u32 val);extern int sata_scr_write_flush (struct ata_port *ap,int reg,u32 val);extern int ata_port_online (struct ata_port *ap);extern int ata_port_offline (struct ata_port *ap); +#ifdef CONFIG_PM extern int ata_scsi_device_resume (struct scsi_device *);extern int ata_scsi_device_suspend (struct scsi_device *,pm_message_t mesg);extern int ata_host_suspend (struct ata_host *host,pm_message_t mesg);extern void ata_host_resume (struct ata_host *host); +#endif extern int ata_ratelimit (void );extern int ata_busy_sleep (struct ata_port *ap,unsigned long timeout_pat,unsigned long timeout);
Hello,
Applied this on top of 2.6.21-rc1 and your previous patch (see my previous mail).
Still booting, no more the weird error I've reported minutes ago.
pata_jmicron still unable to detect my DVD-RW :
scsi8 : pata_jmicron
ata9.00: ATAPI, max UDMA/66
ata9.00: qc timeout (cmd 0xef)
ata9.00: failed to set xfermode (err_mask=0x4) ata9.00: limiting speed to UDMA/44
ata9: failed to recover some devices, retrying in 5 secs ata9.00: qc timeout (cmd 0xef)
ata9.00: failed to set xfermode (err_mask=0x4) ata9.00: limiting speed to PIO0
ata9: failed to recover some devices, retrying in 5 secs ata9.00: qc timeout (cmd 0xef)
ata9.00: failed to set xfermode (err_mask=0x4) ata9.00: disabled
scsi9 : pata_jmicron
ATA: abnormal status 0x7F on port 0x0000000000019807
Will now try some more patches, including the one concerning the IDENTIFY sent by Alan and the one introducing ata_wait_idle_quiet by Tejun.
Regards,
Paul
Paul Rolland, rol(at)as2917.net
ex-AS2917 Network administrator and Peering Coordinator
--
Please no HTML, I'm not a browser - Pas d'HTML, je ne suis pas un navigateur "Some people dream of success... while others wake up and work hard at it"
"I worry about my child and the Internet all the time, even though she's too young to have logged on yet. Here's what I worry about. I worry that 10 or 15 years from now, she will come to me and say 'Daddy, where were you when they took freedom of the press away from the Internet?'"
--Mike Godwin, Electronic Frontier Foundation
Quoted 1,912 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Jeff Garzik
Sent: Saturday, March 03, 2007 2:46 AM
To: Andrew Morton; Linus Torvalds
Cc: [email protected]; LKML
Subject: [git patches] libata fixesNotes:
1) The patches credited to me are really extractions of Alan's patches.2) In particular, the 'change master/slave IDENTIFY order' has a wide (but hopefully not negative) impact, as mentioned in the thread. Since
pata_* drivers are Officially(tm) considered more experimental thandrivers/ide, and since most SATA devices are one-per-port (no slave), the biggest consideration is really master/slave onata_piix.3) Tejun's
CONFIG_PMstuff might look like a cleanup, but IMO it is indeed a bug fix. As Nigel C noted in the related thread, this can probably be cleaned up further with some hopeful macros, but let's go ahead and get things compiling correctly.Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev .git upstream-linus
to receive the following updates:
drivers/ata/ahci.c | 14 ++++++++++++++ drivers/ata/ata_generic.c | 4 ++++ drivers/ata/ata_piix.c | 4 ++++ drivers/ata/libata-core.c | 32 +++++++++++++++++++++++++++----- drivers/ata/libata-eh.c | 29 +++++++++++++++++++++++++++++ drivers/ata/libata-scsi.c | 2 ++ drivers/ata/pata_ali.c | 6 ++++++ drivers/ata/pata_amd.c | 6 ++++++ drivers/ata/pata_atiixp.c | 4 ++++ drivers/ata/pata_cmd64x.c | 8 +++++++- drivers/ata/pata_cs5520.c | 6 ++++++ drivers/ata/pata_cs5530.c | 6 ++++++ drivers/ata/pata_cs5535.c | 4 ++++ drivers/ata/pata_cypress.c | 4 ++++ drivers/ata/pata_efar.c | 4 ++++ drivers/ata/pata_hpt366.c | 7 ++++++- drivers/ata/pata_hpt3x3.c | 6 ++++++ drivers/ata/pata_it8213.c | 4 ++++ drivers/ata/pata_it821x.c | 6 ++++++ drivers/ata/pata_jmicron.c | 7 +++++++ drivers/ata/pata_legacy.c | 18 ++++++++++++++++++ drivers/ata/pata_marvell.c | 4 ++++ drivers/ata/pata_mpc52xx.c | 4 ++++ drivers/ata/pata_mpiix.c | 4 ++++ drivers/ata/pata_netcell.c | 4 ++++ drivers/ata/pata_ns87410.c | 4 ++++ drivers/ata/pata_oldpiix.c | 4 ++++ drivers/ata/pata_opti.c | 4 ++++ drivers/ata/pata_optidma.c | 4 ++++ drivers/ata/pata_pdc202xx_old.c | 4 ++++ drivers/ata/pata_qdi.c | 12 ++++++++---- drivers/ata/pata_radisys.c | 4 ++++ drivers/ata/pata_rz1000.c | 6 ++++++ drivers/ata/pata_sc1200.c | 7 +++++++ drivers/ata/pata_scc.c | 2 ++ drivers/ata/pata_serverworks.c | 6 ++++++ drivers/ata/pata_sil680.c | 8 ++++++++ drivers/ata/pata_sis.c | 4 ++++ drivers/ata/pata_sl82c105.c | 3 +++ drivers/ata/pata_triflex.c | 4 ++++ drivers/ata/pata_via.c | 6 ++++++ drivers/ata/sata_inic162x.c | 7 ++++++- drivers/ata/sata_nv.c | 16 ++++++++++++++++ drivers/ata/sata_sil.c | 2 ++ drivers/ata/sata_sil24.c | 2 ++ include/linux/libata.h | 7 +++++-- 46 files changed, 299 insertions(+), 14 deletions(-)Alan Cox (2):
libata-core: Fix simplex handling
pata_qdi: Fix initialisationJeff Garzik (3):
[libata] change master/slave IDENTIFY order [libata] pata_{legacy,sc1200,sl82c105}: add missing hooks [libata]pata_cmd64x: fix driver description in commentsTejun Heo (3):
libata: add missing PM callbacks
libata: add missingCONFIG_PMin LLDs
libata: addCONFIG_PMto libata core layerdrivers/ata/ahci.c +2
-0@@ -219,10 +219,12 @@ static void ahci_thaw(struct ata_port *ap);static void ahci_error_handler (struct ata_port *ap);static void ahci_vt8251_error_handler (struct ata_port *ap);static void ahci_post_internal_cmd (struct ata_queued_cmd *qc); +#ifdef CONFIG_PM static int ahci_port_suspend (struct ata_port *ap,pm_message_t mesg);static int ahci_port_resume (struct ata_port *ap);static int ahci_pci_device_suspend (struct pci_dev *pdev,pm_message_t mesg);static int ahci_pci_device_resume (struct pci_dev *pdev); +#endif static struct scsi_host_template ahci_sht = {drivers/ata/ahci.c +4
-0.module = THIS_MODULE,@@ -241,8 +243,10 @@ static struct scsi_host_template ahci_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .suspend = ata_scsi_device_suspend, .resume = ata_scsi_device_resume, +#endif }; static const struct ata_port_operations ahci_ops = {@@ -271,8 +275,10 @@ static const struct ata_port_operations ahci_ops = { .error_handler = ahci_error_handler, .post_internal_cmd = ahci_post_internal_cmd, +#ifdef CONFIG_PM .port_suspend = ahci_port_suspend, .port_resume = ahci_port_resume, +#endif .port_start = ahci_port_start,drivers/ata/ahci.c +2
-0.port_stop = ahci_port_stop,@@ -304,8 +310,10 @@ static const struct ata_port_operations ahci_vt8251_ops = { .error_handler = ahci_vt8251_error_handler, .post_internal_cmd = ahci_post_internal_cmd, +#ifdef CONFIG_PM .port_suspend = ahci_port_suspend, .port_resume = ahci_port_resume, +#endif .port_start = ahci_port_start,drivers/ata/ahci.c +3
-0.port_stop = ahci_port_stop,@@ -436,8 +444,10 @@ static struct pci_driver ahci_pci_driver = { .id_table = ahci_pci_tbl, .probe = ahci_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ahci_pci_device_suspend, .resume = ahci_pci_device_resume, +#endif };@@ -577,6 +587,7 @@ static void ahci_power_up(void __iomem *port_mmio, u32 cap)writel (cmd |PORT_CMD_ICC_ACTIVE , port_mmio +PORT_CMD ); } +#ifdef CONFIG_PM static void ahci_power_down (void __iomem *port_mmio,u32 cap) {drivers/ata/ahci.c +1
-0u32 cmd, scontrol;@@ -594,6 +605,7 @@ static void ahci_power_down(void __iomem *port_mmio, u32 cap) cmd &= ~PORT_CMD_SPIN_UP ;writel (cmd, port_mmio +PORT_CMD ); } +#endif static void ahci_init_port(void __iomem *port_mmio, u32 cap,
dma_addr_tcmd_slot_dma,dma_addr_trx_fis_dma)drivers/ata/ahci.c +1
-0@@ -1335,6 +1347,7 @@ static void ahci_post_internal_cmd(struct ata_queued_cmd *qc) } } +#ifdef CONFIG_PM static int ahci_port_suspend (struct ata_port *ap,pm_message_t mesg) {drivers/ata/ahci.c +1
-0struct ahci_host_priv *hpriv = ap->host->private_data;@@ -1413,6 +1426,7 @@ static int ahci_pci_device_resume(struct pci_dev *pdev) return 0; } +#endif static int ahci_port_start (struct ata_port *ap){
drivers/ata/ata_generic.c +4
-0@@ -119,8 +119,10 @@ static struct scsi_host_template generic_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations generic_port_ops = {@@ -230,8 +232,10 @@ static struct pci_driver ata_generic_pci_driver = { .id_table = ata_generic, .probe = ata_generic_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int
__initata_generic_init(void)drivers/ata/ata_piix.c +4
-0@@ -253,8 +253,10 @@ static struct pci_driver piix_pci_driver = { .id_table = piix_pci_tbl, .probe = piix_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif }; static struct scsi_host_template piix_sht = {@@ -273,8 +275,10 @@ static struct scsi_host_template piix_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static const struct ata_port_operations piix_pata_ops = {drivers/ata/libata-core.c +1
-2@@ -1850,8 +1850,11 @@ int ata_bus_probe(struct ata_port *ap)for (i =0 ; i <ATA_MAX_DEVICES ; i++) ap->device[i].pio_mode =XFER_PIO_0 ; -/* read IDENTIFY page and configure devices */ -for (i =0 ; i <ATA_MAX_DEVICES ; i++) { +/* read IDENTIFY page and configure devices. We have to do the identify
drivers/ata/libata-core.c +7
-0+specific sequence bass-ackwards so that PDIAG- is released by +the slave device */ + +for (i =ATA_MAX_DEVICES -1 ; i >=0 ; i--) { dev = &ap->device[i];if (tries[i])@@ -1864,6 +1867,15 @@ int ata_bus_probe(struct ata_port *ap) dev->id);if (rc) goto fail; + } + +/* After the identify sequence we can now set up the devices. We do
drivers/ata/libata-core.c +1
-0+ this in the normal order so that the user doesn'tget confused */
drivers/ata/libata-core.c +6
-2+ +for (i =0 ; i <ATA_MAX_DEVICES ; i++) { + dev = &ap->device[i]; +if (!ata_dev_enabled (dev)) +continue ; ap->eh_context.i.flags |=ATA_EHI_PRINTINFO ; rc =ata_dev_configure (dev);@@ -2556,12 +2568,11 @@ int ata_set_mode(struct ata_port *ap,struct ata_device **r_failed_dev) * host channels are not permitted to do so. */ if (used_dma && (ap->host->flags &ATA_HOST_SIMPLEX )) - ap->host->simplex_claimed =1 ; + ap->host->simplex_claimed = ap;/* step5: chip specific finalisation */ if (ap->ops->post_set_mode) ap->ops->post_set_mode (ap); - out:if (rc)drivers/ata/libata-core.c +1
-1*r_failed_dev = dev;@@ -3444,7 +3455,7 @@ static void ata_dev_xfermask(struct ata_device *dev) "device is on DMA blacklist, disabling DMA\n"); } -if ((host->flags &ATA_HOST_SIMPLEX ) && host->simplex_claimed) { +if ((host->flags &ATA_HOST_SIMPLEX ) && host->simplex_claimed != ap) {drivers/ata/libata-core.c +0
-0xfer_mask &= ~(ATA_MASK_MWDMA |ATA_MASK_UDMA ); ata_dev_printk(dev, KERN_WARNING, "simplex DMAis claimed by "
drivers/ata/libata-core.c +1
-0"other device, disabling DMA\n");@@ -5343,6 +5354,7 @@ int ata_flush_cache(struct ata_device *dev)return 0 ; } +#ifdef CONFIG_PM static int ata_host_request_pm (struct ata_host *host,pm_message_t mesg, unsigned int action, unsignedint
ehi_flags,drivers/ata/libata-core.c +2
-0int wait)@@ -5458,6 +5470,7 @@ void ata_host_resume(struct ata_host *host) ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET, 0); host->dev->power.power_state = PMSG_ON; } +#endif /** * ata_port_start - Set port up for dma. @@ -6093,6 +6106,7 @@ int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits)return (tmp == bits->val) ?1 :0 ; } +#ifdef CONFIG_PM void ata_pci_device_do_suspend (struct pci_dev *pdev,pm_message_t mesg){
drivers/ata/libata-core.c +8
-0pci_save_state (pdev);@@ -6144,6 +6158,8 @@ int ata_pci_device_resume(struct pci_dev *pdev)ata_host_resume (host);return rc; } +#endif /* CONFIG_PM */ +#endif /* CONFIG_PCI */ @@ -6352,8 +6368,10 @@ EXPORT_SYMBOL_GPL(sata_scr_write);EXPORT_SYMBOL_GPL (sata_scr_write_flush);EXPORT_SYMBOL_GPL (ata_port_online);EXPORT_SYMBOL_GPL (ata_port_offline); +#ifdef CONFIG_PM EXPORT_SYMBOL_GPL (ata_host_suspend);EXPORT_SYMBOL_GPL (ata_host_resume); +#endif /* CONFIG_PM */ EXPORT_SYMBOL_GPL (ata_id_string);EXPORT_SYMBOL_GPL (ata_id_c_string);EXPORT_SYMBOL_GPL (ata_id_to_dma_mode);@@ -6369,16 +6387,20 @@ EXPORT_SYMBOL_GPL(pci_test_config_bits);EXPORT_SYMBOL_GPL (ata_pci_init_native_mode);EXPORT_SYMBOL_GPL (ata_pci_init_one);EXPORT_SYMBOL_GPL (ata_pci_remove_one); +#ifdef CONFIG_PM EXPORT_SYMBOL_GPL (ata_pci_device_do_suspend);EXPORT_SYMBOL_GPL (ata_pci_device_do_resume);EXPORT_SYMBOL_GPL (ata_pci_device_suspend);EXPORT_SYMBOL_GPL (ata_pci_device_resume); +#endif /* CONFIG_PM */ EXPORT_SYMBOL_GPL (ata_pci_default_filter);EXPORT_SYMBOL_GPL (ata_pci_clear_simplex);#endif /* CONFIG_PCI */ +#ifdef CONFIG_PM EXPORT_SYMBOL_GPL (ata_scsi_device_suspend);EXPORT_SYMBOL_GPL (ata_scsi_device_resume); +#endif /* CONFIG_PM */ EXPORT_SYMBOL_GPL (ata_eng_timeout);EXPORT_SYMBOL_GPL (ata_port_schedule_eh);drivers/ata/libata-eh.c +25
-0@@ -52,8 +52,33 @@ enum {static void __ata_port_freeze (struct ata_port *ap);static void ata_eh_finish (struct ata_port *ap); +#ifdef CONFIG_PM static void ata_eh_handle_port_suspend (struct ata_port *ap);static void ata_eh_handle_port_resume (struct ata_port *ap); +static int ata_eh_suspend (struct ata_port *ap, +struct ata_device **r_failed_dev); +static void ata_eh_prep_resume (struct ata_port *ap); +static int ata_eh_resume (struct ata_port *ap,struct ata_device **r_failed_dev); +#else /* CONFIG_PM */ +static void ata_eh_handle_port_suspend (struct ata_port *ap) +{ } + +static void ata_eh_handle_port_resume (struct ata_port *ap) +{ } + +static int ata_eh_suspend (struct ata_port *ap,struct ata_device **r_failed_dev) +{ +return 0 ; +} + +static void ata_eh_prep_resume (struct ata_port *ap) +{ } + +static int ata_eh_resume (struct ata_port *ap,struct ata_device **r_failed_dev) +{ +return 0 ; +} +#endif /* CONFIG_PM */ static void ata_ering_record(struct
ata_ering*ering, intis_io,drivers/ata/libata-eh.c +1
-0unsigned int err_mask)@@ -1790,6 +1815,7 @@ static int ata_eh_revalidate_and_attach(struct ata_port *ap, return rc; } +#ifdef CONFIG_PM /** * ata_eh_suspend - handle suspend EH action * @ap: target host port
drivers/ata/libata-eh.c +1
-0@@ -1947,6 +1973,7 @@ static int ata_eh_resume(struct ata_port *ap, struct ata_device **r_failed_dev) DPRINTK("EXIT\n"); return 0; } +#endif /* CONFIG_PM */ static int ata_port_nr_enabled (struct ata_port *ap){
drivers/ata/libata-eh.c +1
-0@@ -2249,6 +2276,7 @@ void ata_do_eh(struct ata_port *ap,ata_prereset_fn_t prereset,ata_eh_finish (ap ); } +#ifdef CONFIG_PM /** * ata_eh_handle_port_suspend - perform port suspend operation * @ap: port to suspend
drivers/ata/libata-eh.c +1
-0@@ -2364,3 +2392,4 @@ static void ata_eh_handle_port_resume(struct ata_port *ap) } spin_unlock_irqrestore(ap->lock, flags); } +#endif /* CONFIG_PM */ drivers/ata/libata-scsi.c +1
-0@@ -510,6 +510,7 @@ static void ata_dump_status(unsigned id, struct ata_taskfile *tf) } } +#ifdef CONFIG_PM /** * ata_scsi_device_suspend - suspend ATA device associated with sdev
* @sdev: the SCSI device to suspenddrivers/ata/libata-scsi.c +1
-0@@ -634,6 +635,7 @@ int ata_scsi_device_resume(struct scsi_device *sdev) sdev->sdev_gendev.power.power_state = PMSG_ON; return 0; } +#endif /* CONFIG_PM */ /** *
ata_to_sense_error- convert ATA error to SCSI errordrivers/ata/pata_ali.c +4
-0@@ -345,8 +345,10 @@ static struct scsi_host_template ali_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif };/* @@ -667,11 +669,13 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)return ata_pci_init_one (pdev, port_info,2 ); } +#ifdef CONFIG_PM static int ali_reinit_one (struct pci_dev *pdev) {ali_init_chipset (pdev);return ata_pci_device_resume (pdev); } +#endif static const struct pci_device_id ali[] = {drivers/ata/pata_ali.c +2
-0{ PCI_VDEVICE(AL, PCI_DEVICE_ID_AL_M5228), },@@ -685,8 +689,10 @@ static struct pci_driver ali_pci_driver = { .id_table = ali, .probe = ali_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ali_reinit_one, +#endif };static int __init ali_init (void )drivers/ata/pata_amd.c +3
-0@@ -334,8 +334,10 @@ static struct scsi_host_template amd_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations amd33_port_ops = {@@ -663,6 +665,7 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)return ata_pci_init_one (pdev, port_info,2 ); } +#ifdef CONFIG_PM static int amd_reinit_one (struct pci_dev *pdev) {drivers/ata/pata_amd.c +1
-0if (pdev->vendor ==PCI_VENDOR_ID_AMD ) {@@ -679,6 +682,7 @@ static int amd_reinit_one(struct pci_dev *pdev) }return ata_pci_device_resume (pdev); } +#endif static const struct pci_device_id amd[] = { {PCI_VDEVICE (AMD ,PCI_DEVICE_ID_AMD_COBRA_7401 ),0 },drivers/ata/pata_amd.c +2
-0@@ -708,8 +712,10 @@ static struct pci_driver amd_pci_driver = { .id_table = amd, .probe = amd_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = amd_reinit_one, +#endif };static int __init amd_init (void )drivers/ata/pata_atiixp.c +4
-0@@ -224,8 +224,10 @@ static struct scsi_host_template atiixp_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations atiixp_port_ops = {@@ -290,8 +292,10 @@ static struct pci_driver atiixp_pci_driver = { .id_table = atiixp, .probe = atiixp_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .resume = ata_pci_device_resume, .suspend = ata_pci_device_suspend, +#endif };static int __init atiixp_init (void )drivers/ata/pata_cmd64x.c +4
-1@@ -1,5 +1,5 @@/* -* pata_cmd64x.c - ATI PATA for new ATA layer +* pata_cmd64x.c - CMD64x PATA for new ATA layer * (C) 2005 Red Hat Inc * Alan Cox <[email protected]> * @@ -285,8 +285,10 @@ static struct scsi_host_template cmd64x_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations cmd64x_port_ops = {@@ -479,6 +481,7 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)return ata_pci_init_one (pdev, port_info,2 ); } +#ifdef CONFIG_PM static int cmd64x_reinit_one (struct pci_dev *pdev) {drivers/ata/pata_cmd64x.c +3
-0u8 mrdmode;@@ -492,6 +495,7 @@ static int cmd64x_reinit_one(struct pci_dev *pdev)#endif return ata_pci_device_resume (pdev); } +#endif static const struct pci_device_id cmd64x[] = { {PCI_VDEVICE (CMD ,PCI_DEVICE_ID_CMD_643 ),0 },@@ -507,8 +511,10 @@ static struct pci_driver cmd64x_pci_driver = { .id_table = cmd64x, .probe = cmd64x_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = cmd64x_reinit_one, +#endif };static int __init cmd64x_init (void )drivers/ata/pata_cs5520.c +3
-0@@ -167,8 +167,10 @@ static struct scsi_host_template cs5520_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations cs5520_port_ops = {@@ -308,6 +310,7 @@ static void __devexit cs5520_remove_one(struct pci_dev *pdev)ata_host_detach (host); } +#ifdef CONFIG_PM /** * cs5520_reinit_one - device resume * @pdev: PCI device
drivers/ata/pata_cs5520.c +1
-0@@ -347,6 +350,7 @@ static int cs5520_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)pci_save_state (pdev); return 0; } +#endif /* CONFIG_PM */ /* For now keep DMA off. We can set it for all but A rev CS5510 once the
core ATA code can handle it */drivers/ata/pata_cs5520.c +2
-0@@ -363,8 +367,10 @@ static struct pci_driver cs5520_pci_driver = { .id_table = pata_cs5520, .probe = cs5520_init_one, .remove = cs5520_remove_one, +#ifdef CONFIG_PM .suspend = cs5520_pci_device_suspend, .resume = cs5520_reinit_one, +#endif };static int __init cs5520_init (void )drivers/ata/pata_cs5530.c +3
-0@@ -188,8 +188,10 @@ static struct scsi_host_template cs5530_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations cs5530_port_ops = {@@ -376,6 +378,7 @@ static int cs5530_init_one(struct pci_dev *pdev, const struct pci_device_id *id)return ata_pci_init_one (pdev, port_info,2 ); } +#ifdef CONFIG_PM static int cs5530_reinit_one (struct pci_dev *pdev) {drivers/ata/pata_cs5530.c +3
-0/* If we fail on resume we are doomed */ @@ -383,6 +386,7 @@ static int cs5530_reinit_one(struct pci_dev *pdev)BUG ();return ata_pci_device_resume (pdev); } +#endif /* CONFIG_PM */ static const struct pci_device_id cs5530[] = { {PCI_VDEVICE (CYRIX ,PCI_DEVICE_ID_CYRIX_5530_IDE ), },@@ -395,8 +399,10 @@ static struct pci_driver cs5530_pci_driver = { .id_table = cs5530, .probe = cs5530_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = cs5530_reinit_one, +#endif };static int __init cs5530_init (void )drivers/ata/pata_cs5535.c +4
-0@@ -185,8 +185,10 @@ static struct scsi_host_template cs5535_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations cs5535_port_ops = {@@ -270,8 +272,10 @@ static struct pci_driver cs5535_pci_driver = { .id_table = cs5535, .probe = cs5535_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init cs5535_init (void )drivers/ata/pata_cypress.c +4
-0@@ -136,8 +136,10 @@ static struct scsi_host_template cy82c693_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations cy82c693_port_ops = {@@ -206,8 +208,10 @@ static struct pci_driver cy82c693_pci_driver = { .id_table = cy82c693, .probe = cy82c693_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init cy82c693_init (void )drivers/ata/pata_efar.c +4
-0@@ -234,8 +234,10 @@ static struct scsi_host_template efar_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static const struct ata_port_operations efar_ops = {@@ -317,8 +319,10 @@ static struct pci_driver efar_pci_driver = { .id_table = efar_pci_tbl, .probe = efar_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init efar_init (void )drivers/ata/pata_hpt366.c +4
-1@@ -328,8 +328,10 @@ static struct scsi_host_template hpt36x_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif };/* @@ -457,12 +459,13 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id) return ata_pci_init_one(dev, port_info, 2); } +#ifdef CONFIG_PM static int hpt36x_reinit_one (struct pci_dev *dev) {hpt36x_init_chipset (dev);return ata_pci_device_resume (dev); } - +#endif static const struct pci_device_id hpt36x[] = {drivers/ata/pata_hpt366.c +2
-0{ PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT366), },@@ -474,8 +477,10 @@ static struct pci_driver hpt36x_pci_driver = { .id_table = hpt36x, .probe = hpt36x_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = hpt36x_reinit_one, +#endif };static int __init hpt36x_init (void )drivers/ata/pata_hpt3x3.c +4
-0@@ -119,8 +119,10 @@ static struct scsi_host_template hpt3x3_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations hpt3x3_port_ops = {@@ -206,11 +208,13 @@ static int hpt3x3_init_one(struct pci_dev *dev, const struct pci_device_id *id) return ata_pci_init_one(dev, port_info, 2); } +#ifdef CONFIG_PM static int hpt3x3_reinit_one (struct pci_dev *dev) {hpt3x3_init_chipset (dev);return ata_pci_device_resume (dev); } +#endif static const struct pci_device_id hpt3x3[] = {drivers/ata/pata_hpt3x3.c +2
-0{ PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT343), },@@ -223,8 +227,10 @@ static struct pci_driver hpt3x3_pci_driver = { .id_table = hpt3x3, .probe = hpt3x3_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = hpt3x3_reinit_one, +#endif };static int __init hpt3x3_init (void )drivers/ata/pata_it8213.c +4
-0@@ -246,8 +246,10 @@ static struct scsi_host_template it8213_sht = { .dma_boundary = ATA_DMA_BOUNDARY, .slave_configure = ata_scsi_slave_config, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static const struct ata_port_operations it8213_ops = {@@ -330,8 +332,10 @@ static struct pci_driver it8213_pci_driver = { .id_table = it8213_pci_tbl, .probe = it8213_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init it8213_init (void )drivers/ata/pata_it821x.c +3
-0@@ -646,8 +646,10 @@ static struct scsi_host_template it821x_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations it821x_smart_port_ops = {@@ -780,6 +782,7 @@ static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)return ata_pci_init_one (pdev, port_info,2 ); } +#ifdef CONFIG_PM static int it821x_reinit_one (struct pci_dev *pdev) {drivers/ata/pata_it821x.c +3
-0/* Resume - turn raid back off if need be */ @@ -787,6 +790,7 @@ static int it821x_reinit_one(struct pci_dev *pdev)it821x_disable_raid (pdev);return ata_pci_device_resume (pdev); } +#endif static const struct pci_device_id it821x[] = { {PCI_VDEVICE (ITE ,PCI_DEVICE_ID_ITE_8211 ), },@@ -800,8 +804,10 @@ static struct pci_driver it821x_pci_driver = { .id_table = it821x, .probe = it821x_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = it821x_reinit_one, +#endif };static int __init it821x_init (void )drivers/ata/pata_jmicron.c +7
-0@@ -137,6 +137,10 @@ static struct scsi_host_template jmicron_sht = { .slave_destroy = ata_scsi_slave_destroy,/* Use standard CHS mapping rules */ .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM + .suspend = ata_scsi_device_suspend, + .resume = ata_scsi_device_resume, +#endif }; static const struct ata_port_operations jmicron_ops = {@@ -225,8 +229,10 @@ static struct pci_driver jmicron_pci_driver = { .id_table = jmicron_pci_tbl, .probe = jmicron_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init jmicron_init (void )@@ -238,6 +244,7 @@ static void __exit jmicron_exit(void) {pci_unregister_driver (&jmicron_pci_driver); } +#endif module_init (jmicron_init);module_exit (jmicron_exit);drivers/ata/pata_legacy.c +3
-0@@ -186,7 +186,10 @@ static struct ata_port_operations legacy_port_ops = { .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .freeze = ata_bmdma_freeze, + .thaw = ata_bmdma_thaw, .error_handler = ata_bmdma_error_handler, + .post_internal_cmd = ata_bmdma_post_internal_cmd, .qc_prep = ata_qc_prep,drivers/ata/pata_legacy.c +3
-0.qc_issue = ata_qc_issue_prot,@@ -298,7 +301,10 @@ static struct ata_port_operations pdc20230_port_ops = { .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .freeze = ata_bmdma_freeze, + .thaw = ata_bmdma_thaw, .error_handler = ata_bmdma_error_handler, + .post_internal_cmd = ata_bmdma_post_internal_cmd, .qc_prep = ata_qc_prep,drivers/ata/pata_legacy.c +3
-0.qc_issue = ata_qc_issue_prot,@@ -350,7 +356,10 @@ static struct ata_port_operations ht6560a_port_ops = { .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .freeze = ata_bmdma_freeze, + .thaw = ata_bmdma_thaw, .error_handler = ata_bmdma_error_handler, + .post_internal_cmd = ata_bmdma_post_internal_cmd, .qc_prep = ata_qc_prep,drivers/ata/pata_legacy.c +3
-0.qc_issue = ata_qc_issue_prot,@@ -413,7 +422,10 @@ static struct ata_port_operations ht6560b_port_ops = { .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .freeze = ata_bmdma_freeze, + .thaw = ata_bmdma_thaw, .error_handler = ata_bmdma_error_handler, + .post_internal_cmd = ata_bmdma_post_internal_cmd, .qc_prep = ata_qc_prep,drivers/ata/pata_legacy.c +3
-0.qc_issue = ata_qc_issue_prot,@@ -531,7 +543,10 @@ static struct ata_port_operations opti82c611a_port_ops = { .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .freeze = ata_bmdma_freeze, + .thaw = ata_bmdma_thaw, .error_handler = ata_bmdma_error_handler, + .post_internal_cmd = ata_bmdma_post_internal_cmd, .qc_prep = ata_qc_prep,drivers/ata/pata_legacy.c +3
-0.qc_issue = ata_qc_issue_prot,@@ -661,7 +676,10 @@ static struct ata_port_operations opti82c46x_port_ops = { .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .freeze = ata_bmdma_freeze, + .thaw = ata_bmdma_thaw, .error_handler = ata_bmdma_error_handler, + .post_internal_cmd = ata_bmdma_post_internal_cmd, .qc_prep = ata_qc_prep,drivers/ata/pata_legacy.c +0
-0.qc_issue = opti82c46x_qc_issue_prot,drivers/ata/pata_marvell.c +4
-0@@ -103,8 +103,10 @@ static struct scsi_host_template marvell_sht = { .slave_destroy = ata_scsi_slave_destroy,/* Use standard CHS mapping rules */ .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static const struct ata_port_operations marvell_ops = {@@ -199,8 +201,10 @@ static struct pci_driver marvell_pci_driver = { .id_table = marvell_pci_tbl, .probe = marvell_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init marvell_init (void )drivers/ata/pata_mpc52xx.c +4
-0@@ -280,6 +280,10 @@ static struct scsi_host_template mpc52xx_ata_sht = { .dma_boundary = ATA_DMA_BOUNDARY, .slave_configure = ata_scsi_slave_config, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM + .suspend = ata_scsi_device_suspend, + .resume = ata_scsi_device_resume, +#endif };static struct
ata_port_operationsmpc52xx_ata_port_ops= {drivers/ata/pata_mpiix.c +4
-0@@ -165,8 +165,10 @@ static struct scsi_host_template mpiix_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations mpiix_port_ops = {@@ -270,8 +272,10 @@ static struct pci_driver mpiix_pci_driver = { .id_table = mpiix, .probe = mpiix_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init mpiix_init (void )drivers/ata/pata_netcell.c +4
-0@@ -63,8 +63,10 @@ static struct scsi_host_template netcell_sht = { .slave_destroy = ata_scsi_slave_destroy,/* Use standard CHS mapping rules */ .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static const struct ata_port_operations netcell_ops = {@@ -153,8 +155,10 @@ static struct pci_driver netcell_pci_driver = { .id_table = netcell_pci_tbl, .probe = netcell_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init netcell_init (void )drivers/ata/pata_ns87410.c +4
-0@@ -157,8 +157,10 @@ static struct scsi_host_template ns87410_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations ns87410_port_ops = {@@ -212,8 +214,10 @@ static struct pci_driver ns87410_pci_driver = { .id_table = ns87410, .probe = ns87410_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init ns87410_init (void )drivers/ata/pata_oldpiix.c +4
-0@@ -233,8 +233,10 @@ static struct scsi_host_template oldpiix_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static const struct ata_port_operations oldpiix_pata_ops = {@@ -316,8 +318,10 @@ static struct pci_driver oldpiix_pci_driver = { .id_table = oldpiix_pci_tbl, .probe = oldpiix_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init oldpiix_init (void )drivers/ata/pata_opti.c +4
-0@@ -179,8 +179,10 @@ static struct scsi_host_template opti_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations opti_port_ops = {@@ -244,8 +246,10 @@ static struct pci_driver opti_pci_driver = { .id_table = opti, .probe = opti_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init opti_init (void )drivers/ata/pata_optidma.c +4
-0@@ -360,8 +360,10 @@ static struct scsi_host_template optidma_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations optidma_port_ops = {@@ -524,8 +526,10 @@ static struct pci_driver optidma_pci_driver = { .id_table = optidma, .probe = optidma_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init optidma_init (void )drivers/ata/pata_pdc202xx_old.c +4
-0@@ -267,8 +267,10 @@ static struct scsi_host_template pdc202xx_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations pdc2024x_port_ops = {@@ -399,8 +401,10 @@ static struct pci_driver pdc202xx_pci_driver = { .id_table = pdc202xx, .probe = pdc202xx_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init pdc202xx_init (void )drivers/ata/pata_qdi.c +2
-1@@ -363,7 +363,8 @@ static __init int qdi_init(void)release_region (port,2 );continue ; } - ct +=qdi_init_one (port,6500 , ide_port[r & 0x01], ide_irq[r & 0x01], r & 0x04); +if (qdi_init_one (port,6500 , ide_port[r &0x01 ], ide_irq[r &0x01 ], r &0x04 ) ==0 ) + ct++; }if (((r &
0xF0) ==0xA0) || (r &0xF0)
==0x50) {drivers/ata/pata_qdi.c +0
-1/* QD6580: dual channel */ @@ -375,11 +376,14 @@ static __init int qdi_init(void) res =inb (port +3 );if (res &1 ) {/* Single channel mode */ - ct +=
qdi_init_one(port, 6580, ide_port[r & 0x01], ide_irq[r & 0x01], r & 0x04);drivers/ata/pata_qdi.c +1
-0+ if (qdi_init_one(port,6580, ide_port[r &
0x01], ide_irq[r &0x01], r &0x04))drivers/ata/pata_qdi.c +1
-1+ ct++; }else {/* Dual channel mode */ - ct +=
qdi_init_one(port, 6580, 0x1F0, 14, r & 0x04);drivers/ata/pata_qdi.c +2
-1- ct += qdi_init_one(port + 2, 6580, 0x170, 15, r & 0x04); + if (qdi_init_one(port,6580,
0x1F0, 14, r &0x04) == 0)drivers/ata/pata_qdi.c +2
-0+ ct++; + if (qdi_init_one(port +2, 6580,
0x170, 15, r &0x04) == 0)drivers/ata/pata_qdi.c +1
-0+ ct++; } } }drivers/ata/pata_radisys.c +4
-0@@ -228,8 +228,10 @@ static struct scsi_host_template radisys_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static const struct ata_port_operations radisys_pata_ops = {@@ -312,8 +314,10 @@ static struct pci_driver radisys_pci_driver = { .id_table = radisys_pci_tbl, .probe = radisys_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init radisys_init (void )drivers/ata/pata_rz1000.c +2
-0@@ -94,8 +94,10 @@ static struct scsi_host_template rz1000_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations rz1000_port_ops = {@@ -178,6 +180,7 @@ static int rz1000_init_one (struct
pci_dev*pdev, const structpci_device_id*endrivers/ata/pata_rz1000.c +4
-0return -ENODEV ; } +#ifdef CONFIG_PM static int rz1000_reinit_one (struct pci_dev *pdev) {/* If this fails on resume (which is a "cant happen" case), we @@ -186,6 +189,7 @@ static int rz1000_reinit_one(struct pci_dev *pdev)panic ("rz1000 fifo" );return ata_pci_device_resume (pdev); } +#endif static const struct pci_device_id pata_rz1000[] = { {PCI_VDEVICE (PCTECH ,PCI_DEVICE_ID_PCTECH_RZ1000 ), },@@ -199,8 +203,10 @@ static struct pci_driver rz1000_pci_driver = { .id_table = pata_rz1000, .probe = rz1000_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = rz1000_reinit_one, +#endif };static int __init rz1000_init (void )drivers/ata/pata_sc1200.c +5
-0@@ -194,8 +194,10 @@ static struct scsi_host_template sc1200_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations sc1200_port_ops = {@@ -210,7 +212,10 @@ static struct ata_port_operations sc1200_port_ops = { .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .freeze = ata_bmdma_freeze, + .thaw = ata_bmdma_thaw, .error_handler = ata_bmdma_error_handler, + .post_internal_cmd = ata_bmdma_post_internal_cmd, .bmdma_setup = ata_bmdma_setup,drivers/ata/pata_sc1200.c +2
-0.bmdma_start = ata_bmdma_start,@@ -266,8 +271,10 @@ static struct pci_driver sc1200_pci_driver = { .id_table = sc1200, .probe = sc1200_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init sc1200_init (void )drivers/ata/pata_scc.c +2
-0@@ -984,8 +984,10 @@ static struct scsi_host_template scc_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static const struct ata_port_operations scc_pata_ops = {drivers/ata/pata_serverworks.c +2
-0@@ -319,8 +319,10 @@ static struct scsi_host_template serverworks_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif };static struct
ata_port_operationsserverworks_osb4_port_ops= {drivers/ata/pata_serverworks.c +0
-0@@ -548,6 +550,7 @@ static int serverworks_init_one(struct
pci_dev*pdev, const structpci_device_iddrivers/ata/pata_serverworks.c +2
-0return ata_pci_init_one (pdev, port_info, ports); } +#ifdef CONFIG_PM static int serverworks_reinit_one (struct pci_dev *pdev) {/* Force master latency timer to 64 PCI clocks */ @@ -571,6 +574,7 @@ static int serverworks_reinit_one(struct pci_dev *pdev) }return ata_pci_device_resume (pdev); } +#endif static const struct pci_device_id serverworks[] = {{ PCI_VDEVICE(SERVERWORKS,
PCI_DEVICE_ID_SERVERWORKS_OSB4IDE), 0},drivers/ata/pata_serverworks.c +2
-0@@ -587,8 +591,10 @@ static struct pci_driver serverworks_pci_driver = { .id_table = serverworks, .probe = serverworks_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = serverworks_reinit_one, +#endif };static int
__initserverworks_init(void)drivers/ata/pata_sil680.c +6
-0@@ -236,6 +236,10 @@ static struct scsi_host_template sil680_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM + .suspend = ata_scsi_device_suspend, + .resume = ata_scsi_device_resume, +#endif }; static struct ata_port_operations sil680_port_ops = {@@ -377,11 +381,13 @@ static int sil680_init_one(struct pci_dev *pdev, const struct pci_device_id *id) return ata_pci_init_one(pdev, port_info, 2); } +#ifdef CONFIG_PM static int sil680_reinit_one (struct pci_dev *pdev) {sil680_init_chip (pdev);return ata_pci_device_resume (pdev); } +#endif static const struct pci_device_id sil680[] = {drivers/ata/pata_sil680.c +2
-0{ PCI_VDEVICE(CMD, PCI_DEVICE_ID_SII_680), },@@ -394,8 +400,10 @@ static struct pci_driver sil680_pci_driver = { .id_table = sil680, .probe = sil680_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = sil680_reinit_one, +#endif };static int __init sil680_init (void )drivers/ata/pata_sis.c +4
-0@@ -575,8 +575,10 @@ static struct scsi_host_template sis_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static const struct ata_port_operations sis_133_ops = {@@ -1032,8 +1034,10 @@ static struct pci_driver sis_pci_driver = { .id_table = sis_pci_tbl, .probe = sis_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init sis_init (void )drivers/ata/pata_sl82c105.c +3
-0@@ -234,7 +234,10 @@ static struct ata_port_operations sl82c105_port_ops = { .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .freeze = ata_bmdma_freeze, + .thaw = ata_bmdma_thaw, .error_handler = sl82c105_error_handler, + .post_internal_cmd = ata_bmdma_post_internal_cmd, .bmdma_setup = ata_bmdma_setup,drivers/ata/pata_sl82c105.c +0
-0.bmdma_start = sl82c105_bmdma_start,drivers/ata/pata_triflex.c +4
-0@@ -193,8 +193,10 @@ static struct scsi_host_template triflex_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations triflex_port_ops = {@@ -260,8 +262,10 @@ static struct pci_driver triflex_pci_driver = { .id_table = triflex, .probe = triflex_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init triflex_init (void )drivers/ata/pata_via.c +3
-0@@ -305,8 +305,10 @@ static struct scsi_host_template via_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations via_port_ops = {@@ -560,6 +562,7 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)return ata_pci_init_one (pdev, port_info,2 ); } +#ifdef CONFIG_PM /** * via_reinit_one - reinit after resume * @pdev; PCI device
drivers/ata/pata_via.c +3
-0@@ -592,6 +595,7 @@ static int via_reinit_one(struct pci_dev *pdev) }return ata_pci_device_resume (pdev); } +#endif static const struct pci_device_id via[] = { {PCI_VDEVICE (VIA ,PCI_DEVICE_ID_VIA_82C576_1 ), },@@ -607,8 +611,10 @@ static struct pci_driver via_pci_driver = { .id_table = via, .probe = via_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = via_reinit_one, +#endif };static int __init via_init (void )drivers/ata/sata_inic162x.c +3
-0@@ -135,8 +135,10 @@ static struct scsi_host_template inic_sht = { .slave_configure = inic_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .suspend = ata_scsi_device_suspend, .resume = ata_scsi_device_resume, +#endif }; static const int scr_map[] = {@@ -632,6 +634,7 @@ static int init_controller(void __iomem *mmio_base, u16 hctl)return 0 ; } +#ifdef CONFIG_PM static int inic_pci_device_resume (struct pci_dev *pdev) {drivers/ata/sata_inic162x.c +0
-1struct ata_host *host =dev_get_drvdata (&pdev->dev);@@ -642,7 +645,6 @@ static int inic_pci_device_resume(struct pci_dev *pdev)ata_pci_device_do_resume (pdev );if (pdev->dev.power.power_state.event ==PM_EVENT_SUSPEND ) { -printk ("XXX\n" ); rc =init_controller (mmio_base, hpriv->cached_hctl);if (rc)drivers/ata/sata_inic162x.c +1
-0return rc;@@ -652,6 +654,7 @@ static int inic_pci_device_resume(struct pci_dev *pdev)return 0 ; } +#endif static int inic_init_one(struct pci_dev *pdev, const struct
pci_device_id*ent)
{drivers/ata/sata_inic162x.c +2
-0@@ -755,8 +758,10 @@ static const struct pci_device_id inic_pci_tbl[] = {static struct pci_driver inic_pci_driver = { .name =DRV_NAME , .id_table = inic_pci_tbl, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = inic_pci_device_resume, +#endif .probe = inic_init_one, .remove = ata_pci_remove_one,};
drivers/ata/sata_nv.c +2
-0@@ -230,7 +230,9 @@ struct nv_host_priv {static int nv_init_one (struct pci_dev *pdev,const struct pci_device_id *ent);static void nv_remove_one (struct pci_dev *pdev); +#ifdef CONFIG_PM static int nv_pci_device_resume (struct pci_dev *pdev); +#endif static void nv_ck804_host_stop (struct ata_host *host);static irqreturn_t nv_generic_interrupt (int irq,void *dev_instance);static
irqreturn_tnv_nf2_interrupt(int irq, void *dev_instance);drivers/ata/sata_nv.c +2
-0@@ -251,8 +253,10 @@ static irqreturn_t nv_adma_interrupt(int irq, void *dev_instance);static void nv_adma_irq_clear (struct ata_port *ap);static int nv_adma_port_start (struct ata_port *ap);static void nv_adma_port_stop (struct ata_port *ap); +#ifdef CONFIG_PM static int nv_adma_port_suspend (struct ata_port *ap,pm_message_t mesg);static int nv_adma_port_resume (struct ata_port *ap); +#endif static void nv_adma_error_handler (struct ata_port *ap);static void
nv_adma_host_stop(struct ata_host *host); static voidnv_adma_post_internal_cmd(struct ata_queued_cmd *qc);drivers/ata/sata_nv.c +9
-0@@ -295,8 +299,10 @@ static struct pci_driver nv_pci_driver = { .name = DRV_NAME, .id_table = nv_pci_tbl, .probe = nv_init_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = nv_pci_device_resume, +#endif .remove = nv_remove_one, };@@ -316,8 +322,10 @@ static struct scsi_host_template nv_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .suspend = ata_scsi_device_suspend, .resume = ata_scsi_device_resume, +#endif }; static struct scsi_host_template nv_adma_sht = {@@ -336,8 +344,10 @@ static struct scsi_host_template nv_adma_sht = { .slave_configure = nv_adma_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .suspend = ata_scsi_device_suspend, .resume = ata_scsi_device_resume, +#endif }; static const struct ata_port_operations nv_generic_ops = {@@ -449,8 +459,10 @@ static const struct ata_port_operations nv_adma_ops = { .scr_write = nv_scr_write, .port_start = nv_adma_port_start, .port_stop = nv_adma_port_stop, +#ifdef CONFIG_PM .port_suspend = nv_adma_port_suspend, .port_resume = nv_adma_port_resume, +#endif .host_stop = nv_adma_host_stop, };@@ -1003,6 +1015,7 @@ static void nv_adma_port_stop(struct ata_port *ap) writew(0, mmio + NV_ADMA_CTL); } +#ifdef CONFIG_PM static int nv_adma_port_suspend (struct ata_port *ap,pm_message_t mesg){
drivers/ata/sata_nv.c +1
-0struct nv_adma_port_priv *pp = ap->private_data;@@ -1053,6 +1066,7 @@ static int nv_adma_port_resume(struct ata_port *ap)return 0 ; } +#endif static void nv_adma_setup_port(struct ata_probe_ent
*probe_ent, unsigned int port)
{drivers/ata/sata_nv.c +2
-0@@ -1555,6 +1569,7 @@ static void nv_remove_one (struct pci_dev *pdev)kfree (hpriv); } +#ifdef CONFIG_PM static int nv_pci_device_resume (struct pci_dev *pdev) {struct ata_host *host =dev_get_drvdata (&pdev->dev);@@ -1602,6 +1617,7 @@ static int nv_pci_device_resume(struct pci_dev *pdev) return 0; } +#endif static void nv_ck804_host_stop (struct ata_host *host){
drivers/ata/sata_sil.c +2
-0@@ -183,8 +183,10 @@ static struct scsi_host_template sil_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .suspend = ata_scsi_device_suspend, .resume = ata_scsi_device_resume, +#endif }; static const struct ata_port_operations sil_ops = {drivers/ata/sata_sil24.c +2
-0@@ -380,8 +380,10 @@ static struct scsi_host_template sil24_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .suspend = ata_scsi_device_suspend, .resume = ata_scsi_device_resume, +#endif }; static const struct ata_port_operations sil24_ops = {include/linux/libata.h +0
-1@@ -403,8 +403,7 @@ struct ata_host {void *private_data;const struct ata_port_operations *ops;unsigned long flags; -int simplex_claimed;/* Keep seperate in case we
include/linux/libata.h +0
-1- everneed to do this locked */
include/linux/libata.h +1
-0+struct ata_port *simplex_claimed;/* channel owning the DMA */
include/linux/libata.h +1
-0struct ata_port *ports[0 ]; };@@ -719,10 +718,12 @@ extern void ata_std_ports(struct ata_ioports *ioaddr);extern int ata_pci_init_one (struct pci_dev *pdev,struct ata_port_info **port_info,unsigned int n_ports);extern void ata_pci_remove_one (struct pci_dev *pdev); +#ifdef CONFIG_PM extern void ata_pci_device_do_suspend (struct pci_dev *pdev,pm_message_t mesg);extern int __must_check ata_pci_device_do_resume (struct pci_dev *pdev); extern int ata_pci_device_suspend(struct pci_dev *pdev,
pm_message_tmesg);
extern intata_pci_device_resume(struct pci_dev *pdev);include/linux/libata.h +3
-0+#endif extern int ata_pci_clear_simplex (struct pci_dev *pdev);#endif /* CONFIG_PCI */ extern int ata_device_add (const struct ata_probe_ent *ent);@@ -748,10 +749,12 @@ extern int sata_scr_write(struct ata_port *ap, int reg, u32 val);extern int sata_scr_write_flush (struct ata_port *ap,int reg,u32 val);extern int ata_port_online (struct ata_port *ap);extern int ata_port_offline (struct ata_port *ap); +#ifdef CONFIG_PM extern int ata_scsi_device_resume (struct scsi_device *);extern int ata_scsi_device_suspend (struct scsi_device *,pm_message_t mesg);extern int ata_host_suspend (struct ata_host *host,pm_message_t mesg);extern void ata_host_resume (struct ata_host *host); +#endif extern int ata_ratelimit (void );extern int ata_busy_sleep (struct ata_port *ap, unsigned long timeout_pat, unsignedlong timeout);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Hmmmm... Too fast :(
Just got that in my logs :
ata3.00: exception Emask 0x2 SAct 0x38000040 SErr 0x0 action 0x2 frozen ata3.00: (spurious completions during NCQ issue=0x0 SAct=0x38000040 FIS=004040a1:04000000)
ata3.00: cmd 60/04:30:5f:00:00/00:00:00:00:00/40 tag 6 cdb 0x0 data 2048 in
res 40/00:e8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata3.00: cmd 60/04:d8:bb:00:00/00:00:00:00:00/40 tag 27 cdb 0x0 data 2048 in
res 40/00:e8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata3.00: cmd 60/04:e0:bf:00:00/00:00:00:00:00/40 tag 28 cdb 0x0 data 2048 in
res 40/00:e8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata3.00: cmd 60/04:e8:c3:00:00/00:00:00:00:00/40 tag 29 cdb 0x0 data 2048 in
res 40/00:e8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)ata3: soft resetting port
ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata3.00: configured for UDMA/133
ata3: EH complete
SCSI device sdc: 490234752 512-byte hdwr sectors (251000 MB)
sdc: Write Protect is off
sdc: Mode Sense: 00 3a 00 00
SCSI device sdc: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Strange enough, there is no reason for any request being sent to this disk as there is no partition mounted from it :
3 [20:32] rol@riri:~> df -a
Filesystem 1K-blocks Used Available Use% Mounted on/dev/sde1 20200708 5261444 13913116 28% /
proc 0 0 0 - /proc /sys 0 0 0 - /sys procbususb 0 0 0 - /proc/bus/usb devpts 0 0 0 - /dev/pts devshm 128 0 128 0% /dev/shm /dev/sde6 20644348 131500 19464272 1% /usr/local
/dev/sde3 8254272 1125252 6709724 15% /var
4 [20:32] rol@riri:~> grep swap /etc/fstab/dev/sde5 none swap sw 0 0
Or maybe it is some hal(d*) stuff talking to every piece of hardware it can find ?
Paul
Paul Rolland, rol(at)as2917.net
ex-AS2917 Network administrator and Peering Coordinator
--
Please no HTML, I'm not a browser - Pas d'HTML, je ne suis pas un navigateur "Some people dream of success... while others wake up and work hard at it"
"I worry about my child and the Internet all the time, even though she's too young to have logged on yet. Here's what I worry about. I worry that 10 or 15 years from now, she will come to me and say 'Daddy, where were you when they took freedom of the press away from the Internet?'"
--Mike Godwin, Electronic Frontier Foundation
Quoted 2,007 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Paul Rolland
Sent: Saturday, March 03, 2007 7:55 PM
To: 'Jeff Garzik'; 'Andrew Morton'; 'Linus Torvalds'
Cc: [email protected]; 'LKML'
Subject: RE: [git patches] libata fixesHello,
Applied this on top of 2.6.21-rc1 and your previous patch (see my previous
mail).
Still booting, no more the weird error I've reported minutes ago.
pata_jmicronstill unable to detect my DVD-RW :
scsi8 :pata_jmicron
ata9.00: ATAPI, max UDMA/66
ata9.00: qc timeout (cmd0xef)
ata9.00: failed to set xfermode (err_mask=0x4) ata9.00: limiting speed to UDMA/44
ata9: failed to recover some devices, retrying in 5 secs ata9.00: qc timeout (cmd0xef)
ata9.00: failed to set xfermode (err_mask=0x4) ata9.00: limiting speed to PIO0
ata9: failed to recover some devices, retrying in 5 secs ata9.00: qc timeout (cmd0xef)
ata9.00: failed to set xfermode (err_mask=0x4) ata9.00: disabled
scsi9 :pata_jmicron
ATA: abnormal status0x7Fon port0x0000000000019807Will now try some more patches, including the one concerning the IDENTIFY
sent by Alan and the one introducingata_wait_idle_quietby Tejun.Regards,
PaulPaul Rolland, rol(at)as2917.net
ex-AS2917 Network administrator and Peering Coordinator--
Please no HTML, I'm not a browser - Pas d'HTML, je ne suis pas un navigateur
"Some people dream of success... while others wake up and work hard at it""I worry about my child and the Internet all the time, even though she's too
young to have logged on yet. Here's what I worry about. I worry that 10 or 15
years from now, she will come to me and say 'Daddy, where were you when they
took freedom of the press away from the Internet?'" --Mike Godwin, Electronic Frontier FoundationQuoted 9 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Jeff Garzik
Sent: Saturday, March 03, 2007 2:46 AM
To: Andrew Morton; Linus Torvalds
Cc: [email protected]; LKML
Subject: [git patches] libata fixesQuoted 5 lines
Notes:
1) The patches credited to me are really extractions of Alan's patches.2) In particular, the 'change master/slave IDENTIFY order'
has a wide
Quoted 4 lines
(but hopefully not negative) impact, as mentioned in the thread. Since
pata_* drivers are Officially(tm) considered more experimental thandrivers/ide, and since most SATA devices are one-per-port(no slave),
Quoted 5 lines
the biggest consideration is really master/slave on
ata_piix.3) Tejun's
CONFIG_PMstuff might look like a cleanup, but IMO it is indeed a bug fix. As Nigel C noted in the related thread, this can probably be cleaned up further with some hopeful macros,but let's go
Quoted 6 lines
ahead and get things compiling correctly.
Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev .git upstream-linus
Quoted 8 lines
to receive the following updates:
drivers/ata/ahci.c | 14 ++++++++++++++ drivers/ata/ata_generic.c | 4 ++++ drivers/ata/ata_piix.c | 4 ++++ drivers/ata/libata-core.c | 32 +++++++++++++++++++++++++++----- drivers/ata/libata-eh.c | 29+++++++++++++++++++++++++++++
Quoted 62 lines
drivers/ata/libata-scsi.c | 2 ++ drivers/ata/pata_ali.c | 6 ++++++ drivers/ata/pata_amd.c | 6 ++++++ drivers/ata/pata_atiixp.c | 4 ++++ drivers/ata/pata_cmd64x.c | 8 +++++++- drivers/ata/pata_cs5520.c | 6 ++++++ drivers/ata/pata_cs5530.c | 6 ++++++ drivers/ata/pata_cs5535.c | 4 ++++ drivers/ata/pata_cypress.c | 4 ++++ drivers/ata/pata_efar.c | 4 ++++ drivers/ata/pata_hpt366.c | 7 ++++++- drivers/ata/pata_hpt3x3.c | 6 ++++++ drivers/ata/pata_it8213.c | 4 ++++ drivers/ata/pata_it821x.c | 6 ++++++ drivers/ata/pata_jmicron.c | 7 +++++++ drivers/ata/pata_legacy.c | 18 ++++++++++++++++++ drivers/ata/pata_marvell.c | 4 ++++ drivers/ata/pata_mpc52xx.c | 4 ++++ drivers/ata/pata_mpiix.c | 4 ++++ drivers/ata/pata_netcell.c | 4 ++++ drivers/ata/pata_ns87410.c | 4 ++++ drivers/ata/pata_oldpiix.c | 4 ++++ drivers/ata/pata_opti.c | 4 ++++ drivers/ata/pata_optidma.c | 4 ++++ drivers/ata/pata_pdc202xx_old.c | 4 ++++ drivers/ata/pata_qdi.c | 12 ++++++++---- drivers/ata/pata_radisys.c | 4 ++++ drivers/ata/pata_rz1000.c | 6 ++++++ drivers/ata/pata_sc1200.c | 7 +++++++ drivers/ata/pata_scc.c | 2 ++ drivers/ata/pata_serverworks.c | 6 ++++++ drivers/ata/pata_sil680.c | 8 ++++++++ drivers/ata/pata_sis.c | 4 ++++ drivers/ata/pata_sl82c105.c | 3 +++ drivers/ata/pata_triflex.c | 4 ++++ drivers/ata/pata_via.c | 6 ++++++ drivers/ata/sata_inic162x.c | 7 ++++++- drivers/ata/sata_nv.c | 16 ++++++++++++++++ drivers/ata/sata_sil.c | 2 ++ drivers/ata/sata_sil24.c | 2 ++ include/linux/libata.h | 7 +++++-- 46 files changed, 299 insertions(+), 14 deletions(-)Alan Cox (2):
libata-core: Fix simplex handling
pata_qdi: Fix initialisationJeff Garzik (3):
[libata] change master/slave IDENTIFY order [libata] pata_{legacy,sc1200,sl82c105}: add missing hooks [libata]pata_cmd64x: fix driver description in commentsTejun Heo (3):
libata: add missing PM callbacks
libata: add missingCONFIG_PMin LLDs
libata: addCONFIG_PMto libata core layerdrivers/ata/ahci.c +0
-0drivers/ata/ahci.c static void ahci_thaw(struct ata_port *ap); · line 223
Quoted 5 lines
drivers/ata/ahci.c +1
-0@@ -219,10 +219,12 @@ static void ahci_thaw(struct ata_port *ap);static void ahci_error_handler (struct ata_port *ap);static void ahci_vt8251_error_handler (struct ata_port *ap);static void ahci_post_internal_cmd (struct ata_queued_cmd *qc); +#ifdef CONFIG_PM static int ahci_port_suspend(struct ata_port *ap,
pm_message_tmesg);Quoted 74 lines
drivers/ata/ahci.c +1
-0static int ahci_port_resume (struct ata_port *ap);static int ahci_pci_device_suspend (struct pci_dev *pdev,pm_message_t mesg);static int ahci_pci_device_resume (struct pci_dev *pdev); +#endif static struct scsi_host_template ahci_sht = {drivers/ata/ahci.c +4
-0.module = THIS_MODULE,@@ -241,8 +243,10 @@ static struct scsi_host_template ahci_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .suspend = ata_scsi_device_suspend, .resume = ata_scsi_device_resume, +#endif }; static const struct ata_port_operations ahci_ops = {@@ -271,8 +275,10 @@ static const struct ata_port_operations ahci_ops = { .error_handler = ahci_error_handler, .post_internal_cmd = ahci_post_internal_cmd, +#ifdef CONFIG_PM .port_suspend = ahci_port_suspend, .port_resume = ahci_port_resume, +#endif .port_start = ahci_port_start,drivers/ata/ahci.c +2
-0.port_stop = ahci_port_stop,@@ -304,8 +310,10 @@ static const struct ata_port_operations ahci_vt8251_ops = { .error_handler = ahci_vt8251_error_handler, .post_internal_cmd = ahci_post_internal_cmd, +#ifdef CONFIG_PM .port_suspend = ahci_port_suspend, .port_resume = ahci_port_resume, +#endif .port_start = ahci_port_start,drivers/ata/ahci.c +3
-0.port_stop = ahci_port_stop,@@ -436,8 +444,10 @@ static struct pci_driver ahci_pci_driver = { .id_table = ahci_pci_tbl, .probe = ahci_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ahci_pci_device_suspend, .resume = ahci_pci_device_resume, +#endif };@@ -577,6 +587,7 @@ static void ahci_power_up(void __iomem *port_mmio, u32 cap)writel (cmd |PORT_CMD_ICC_ACTIVE , port_mmio +PORT_CMD ); } +#ifdef CONFIG_PM static void ahci_power_down (void __iomem *port_mmio,u32 cap) {drivers/ata/ahci.c +1
-0u32 cmd, scontrol;@@ -594,6 +605,7 @@ static void ahci_power_down(void __iomem *port_mmio, u32 cap) cmd &= ~PORT_CMD_SPIN_UP ;writel (cmd, port_mmio +PORT_CMD ); } +#endif static void ahci_init_port(void __iomem *port_mmio, u32 cap,
dma_addr_tcmd_slot_dma,dma_addr_trx_fis_dma)drivers/ata/ahci.c static void · line 1352
Quoted 6 lines
drivers/ata/ahci.c +1
-0@@ -1335,6 +1347,7 @@ static void ahci_post_internal_cmd(struct ata_queued_cmd *qc) } } +#ifdef CONFIG_PM static int ahci_port_suspend(struct ata_port *ap,
pm_message_tmesg)drivers/ata/ata_generic.c static struct scsi_host_template
Quoted 16 lines
drivers/ata/ahci.c +0
-0{drivers/ata/ahci.c +1
-0struct ahci_host_priv *hpriv = ap->host->private_data;@@ -1413,6 +1426,7 @@ static int ahci_pci_device_resume(struct pci_dev *pdev) return 0; } +#endif static int ahci_port_start (struct ata_port *ap){
drivers/ata/ata_generic.c +0
-0@@ -119,8 +119,10 @@ static struct scsi_host_template
generic_sht= {drivers/ata/libata-core.c int ata_pci_device_resume(struct
Quoted 142 lines
drivers/ata/ata_generic.c +4
-0.slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations generic_port_ops = {@@ -230,8 +232,10 @@ static struct pci_driver ata_generic_pci_driver = { .id_table = ata_generic, .probe = ata_generic_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int
__initata_generic_init(void)drivers/ata/ata_piix.c +4
-0@@ -253,8 +253,10 @@ static struct pci_driver piix_pci_driver = { .id_table = piix_pci_tbl, .probe = piix_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif }; static struct scsi_host_template piix_sht = {@@ -273,8 +275,10 @@ static struct scsi_host_template piix_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static const struct ata_port_operations piix_pata_ops = {drivers/ata/libata-core.c +1
-2@@ -1850,8 +1850,11 @@ int ata_bus_probe(struct ata_port *ap)for (i =0 ; i <ATA_MAX_DEVICES ; i++) ap->device[i].pio_mode =XFER_PIO_0 ; -/* read IDENTIFY page and configure devices */ -for (i =0 ; i <ATA_MAX_DEVICES ; i++) { +/* read IDENTIFY page and configure devices. We have to do the identify
drivers/ata/libata-core.c +7
-0+specific sequence bass-ackwards so that PDIAG- is released by +the slave device */ + +for (i =ATA_MAX_DEVICES -1 ; i >=0 ; i--) { dev = &ap->device[i];if (tries[i])@@ -1864,6 +1867,15 @@ int ata_bus_probe(struct ata_port *ap) dev->id);if (rc) goto fail; + } + +/* After the identify sequence we can now set up the devices. We do
drivers/ata/libata-core.c +1
-0+ this in the normal order so that the user doesn'tget confused */
drivers/ata/libata-core.c +6
-2+ +for (i =0 ; i <ATA_MAX_DEVICES ; i++) { + dev = &ap->device[i]; +if (!ata_dev_enabled (dev)) +continue ; ap->eh_context.i.flags |=ATA_EHI_PRINTINFO ; rc =ata_dev_configure (dev);@@ -2556,12 +2568,11 @@ int ata_set_mode(struct ata_port *ap,struct ata_device **r_failed_dev) * host channels are not permitted to do so. */ if (used_dma && (ap->host->flags &ATA_HOST_SIMPLEX )) - ap->host->simplex_claimed =1 ; + ap->host->simplex_claimed = ap;/* step5: chip specific finalisation */ if (ap->ops->post_set_mode) ap->ops->post_set_mode (ap); - out:if (rc)drivers/ata/libata-core.c +1
-1*r_failed_dev = dev;@@ -3444,7 +3455,7 @@ static void ata_dev_xfermask(struct ata_device *dev) "device is on DMA blacklist, disabling DMA\n"); } -if ((host->flags &ATA_HOST_SIMPLEX ) && host->simplex_claimed) { +if ((host->flags &ATA_HOST_SIMPLEX ) && host->simplex_claimed != ap) {drivers/ata/libata-core.c +0
-0xfer_mask &= ~(ATA_MASK_MWDMA |ATA_MASK_UDMA ); ata_dev_printk(dev, KERN_WARNING, "simplex DMAis claimed by "
drivers/ata/libata-core.c +1
-0"other device, disabling DMA\n");@@ -5343,6 +5354,7 @@ int ata_flush_cache(struct ata_device *dev)return 0 ; } +#ifdef CONFIG_PM static int ata_host_request_pm (struct ata_host *host,pm_message_t mesg, unsigned int action, unsignedint
ehi_flags,drivers/ata/libata-core.c +2
-0int wait)@@ -5458,6 +5470,7 @@ void ata_host_resume(struct ata_host *host) ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET, 0); host->dev->power.power_state = PMSG_ON; } +#endif /** * ata_port_start - Set port up for dma. @@ -6093,6 +6106,7 @@ int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits)return (tmp == bits->val) ?1 :0 ; } +#ifdef CONFIG_PM void ata_pci_device_do_suspend (struct pci_dev *pdev,pm_message_t mesg){
drivers/ata/libata-core.c +0
-0pci_save_state (pdev);@@ -6144,6 +6158,8 @@ int ata_pci_device_resume(struct
pci_dev*pdev)drivers/ata/pata_cmd64x.c static int cmd64x_reinit_one(struct
Quoted 280 lines
drivers/ata/libata-core.c +8
-0ata_host_resume (host);return rc; } +#endif /* CONFIG_PM */ +#endif /* CONFIG_PCI */ @@ -6352,8 +6368,10 @@ EXPORT_SYMBOL_GPL(sata_scr_write);EXPORT_SYMBOL_GPL (sata_scr_write_flush);EXPORT_SYMBOL_GPL (ata_port_online);EXPORT_SYMBOL_GPL (ata_port_offline); +#ifdef CONFIG_PM EXPORT_SYMBOL_GPL (ata_host_suspend);EXPORT_SYMBOL_GPL (ata_host_resume); +#endif /* CONFIG_PM */ EXPORT_SYMBOL_GPL (ata_id_string);EXPORT_SYMBOL_GPL (ata_id_c_string);EXPORT_SYMBOL_GPL (ata_id_to_dma_mode);@@ -6369,16 +6387,20 @@ EXPORT_SYMBOL_GPL(pci_test_config_bits);EXPORT_SYMBOL_GPL (ata_pci_init_native_mode);EXPORT_SYMBOL_GPL (ata_pci_init_one);EXPORT_SYMBOL_GPL (ata_pci_remove_one); +#ifdef CONFIG_PM EXPORT_SYMBOL_GPL (ata_pci_device_do_suspend);EXPORT_SYMBOL_GPL (ata_pci_device_do_resume);EXPORT_SYMBOL_GPL (ata_pci_device_suspend);EXPORT_SYMBOL_GPL (ata_pci_device_resume); +#endif /* CONFIG_PM */ EXPORT_SYMBOL_GPL (ata_pci_default_filter);EXPORT_SYMBOL_GPL (ata_pci_clear_simplex);#endif /* CONFIG_PCI */ +#ifdef CONFIG_PM EXPORT_SYMBOL_GPL (ata_scsi_device_suspend);EXPORT_SYMBOL_GPL (ata_scsi_device_resume); +#endif /* CONFIG_PM */ EXPORT_SYMBOL_GPL (ata_eng_timeout);EXPORT_SYMBOL_GPL (ata_port_schedule_eh);drivers/ata/libata-eh.c +25
-0@@ -52,8 +52,33 @@ enum {static void __ata_port_freeze (struct ata_port *ap);static void ata_eh_finish (struct ata_port *ap); +#ifdef CONFIG_PM static void ata_eh_handle_port_suspend (struct ata_port *ap);static void ata_eh_handle_port_resume (struct ata_port *ap); +static int ata_eh_suspend (struct ata_port *ap, +struct ata_device **r_failed_dev); +static void ata_eh_prep_resume (struct ata_port *ap); +static int ata_eh_resume (struct ata_port *ap,struct ata_device **r_failed_dev); +#else /* CONFIG_PM */ +static void ata_eh_handle_port_suspend (struct ata_port *ap) +{ } + +static void ata_eh_handle_port_resume (struct ata_port *ap) +{ } + +static int ata_eh_suspend (struct ata_port *ap,struct ata_device **r_failed_dev) +{ +return 0 ; +} + +static void ata_eh_prep_resume (struct ata_port *ap) +{ } + +static int ata_eh_resume (struct ata_port *ap,struct ata_device **r_failed_dev) +{ +return 0 ; +} +#endif /* CONFIG_PM */ static void ata_ering_record(struct
ata_ering*ering, intis_io,drivers/ata/libata-eh.c +1
-0unsigned int err_mask)@@ -1790,6 +1815,7 @@ static int ata_eh_revalidate_and_attach(struct ata_port *ap, return rc; } +#ifdef CONFIG_PM /** * ata_eh_suspend - handle suspend EH action * @ap: target host port
drivers/ata/libata-eh.c +1
-0@@ -1947,6 +1973,7 @@ static int ata_eh_resume(struct ata_port *ap, struct ata_device **r_failed_dev) DPRINTK("EXIT\n"); return 0; } +#endif /* CONFIG_PM */ static int ata_port_nr_enabled (struct ata_port *ap){
drivers/ata/libata-eh.c +1
-0@@ -2249,6 +2276,7 @@ void ata_do_eh(struct ata_port *ap,ata_prereset_fn_t prereset,ata_eh_finish (ap ); } +#ifdef CONFIG_PM /** * ata_eh_handle_port_suspend - perform port suspend operation * @ap: port to suspend
drivers/ata/libata-eh.c +1
-0@@ -2364,3 +2392,4 @@ static void ata_eh_handle_port_resume(struct ata_port *ap) } spin_unlock_irqrestore(ap->lock, flags); } +#endif /* CONFIG_PM */ drivers/ata/libata-scsi.c +1
-0@@ -510,6 +510,7 @@ static void ata_dump_status(unsigned id, struct ata_taskfile *tf) } } +#ifdef CONFIG_PM /** * ata_scsi_device_suspend - suspend ATA device associated with sdev
* @sdev: the SCSI device to suspenddrivers/ata/libata-scsi.c +1
-0@@ -634,6 +635,7 @@ int ata_scsi_device_resume(struct scsi_device *sdev) sdev->sdev_gendev.power.power_state = PMSG_ON; return 0; } +#endif /* CONFIG_PM */ /** *
ata_to_sense_error- convert ATA error to SCSI errordrivers/ata/pata_ali.c +4
-0@@ -345,8 +345,10 @@ static struct scsi_host_template ali_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif };/* @@ -667,11 +669,13 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)return ata_pci_init_one (pdev, port_info,2 ); } +#ifdef CONFIG_PM static int ali_reinit_one (struct pci_dev *pdev) {ali_init_chipset (pdev);return ata_pci_device_resume (pdev); } +#endif static const struct pci_device_id ali[] = {drivers/ata/pata_ali.c +2
-0{ PCI_VDEVICE(AL, PCI_DEVICE_ID_AL_M5228), },@@ -685,8 +689,10 @@ static struct pci_driver ali_pci_driver = { .id_table = ali, .probe = ali_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ali_reinit_one, +#endif };static int __init ali_init (void )drivers/ata/pata_amd.c +3
-0@@ -334,8 +334,10 @@ static struct scsi_host_template amd_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations amd33_port_ops = {@@ -663,6 +665,7 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)return ata_pci_init_one (pdev, port_info,2 ); } +#ifdef CONFIG_PM static int amd_reinit_one (struct pci_dev *pdev) {drivers/ata/pata_amd.c +1
-0if (pdev->vendor ==PCI_VENDOR_ID_AMD ) {@@ -679,6 +682,7 @@ static int amd_reinit_one(struct pci_dev *pdev) }return ata_pci_device_resume (pdev); } +#endif static const struct pci_device_id amd[] = { {PCI_VDEVICE (AMD ,PCI_DEVICE_ID_AMD_COBRA_7401 ),0 },drivers/ata/pata_amd.c +2
-0@@ -708,8 +712,10 @@ static struct pci_driver amd_pci_driver = { .id_table = amd, .probe = amd_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = amd_reinit_one, +#endif };static int __init amd_init (void )drivers/ata/pata_atiixp.c +4
-0@@ -224,8 +224,10 @@ static struct scsi_host_template atiixp_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations atiixp_port_ops = {@@ -290,8 +292,10 @@ static struct pci_driver atiixp_pci_driver = { .id_table = atiixp, .probe = atiixp_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .resume = ata_pci_device_resume, .suspend = ata_pci_device_suspend, +#endif };static int __init atiixp_init (void )drivers/ata/pata_cmd64x.c +4
-1@@ -1,5 +1,5 @@/* -* pata_cmd64x.c - ATI PATA for new ATA layer +* pata_cmd64x.c - CMD64x PATA for new ATA layer * (C) 2005 Red Hat Inc * Alan Cox <[email protected]> * @@ -285,8 +285,10 @@ static struct scsi_host_template cmd64x_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations cmd64x_port_ops = {@@ -479,6 +481,7 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)return ata_pci_init_one (pdev, port_info,2 ); } +#ifdef CONFIG_PM static int cmd64x_reinit_one (struct pci_dev *pdev) {drivers/ata/pata_cmd64x.c +0
-0u8 mrdmode;@@ -492,6 +495,7 @@ static int cmd64x_reinit_one(struct
pci_dev*pdev)drivers/ata/pata_cs5530.c static int cs5530_reinit_one(struct
Quoted 88 lines
drivers/ata/pata_cmd64x.c +3
-0#endif return ata_pci_device_resume (pdev); } +#endif static const struct pci_device_id cmd64x[] = { {PCI_VDEVICE (CMD ,PCI_DEVICE_ID_CMD_643 ),0 },@@ -507,8 +511,10 @@ static struct pci_driver cmd64x_pci_driver = { .id_table = cmd64x, .probe = cmd64x_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = cmd64x_reinit_one, +#endif };static int __init cmd64x_init (void )drivers/ata/pata_cs5520.c +3
-0@@ -167,8 +167,10 @@ static struct scsi_host_template cs5520_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations cs5520_port_ops = {@@ -308,6 +310,7 @@ static void __devexit cs5520_remove_one(struct pci_dev *pdev)ata_host_detach (host); } +#ifdef CONFIG_PM /** * cs5520_reinit_one - device resume * @pdev: PCI device
drivers/ata/pata_cs5520.c +1
-0@@ -347,6 +350,7 @@ static int cs5520_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)pci_save_state (pdev); return 0; } +#endif /* CONFIG_PM */ /* For now keep DMA off. We can set it for all but A rev CS5510 once the
core ATA code can handle it */drivers/ata/pata_cs5520.c +2
-0@@ -363,8 +367,10 @@ static struct pci_driver cs5520_pci_driver = { .id_table = pata_cs5520, .probe = cs5520_init_one, .remove = cs5520_remove_one, +#ifdef CONFIG_PM .suspend = cs5520_pci_device_suspend, .resume = cs5520_reinit_one, +#endif };static int __init cs5520_init (void )drivers/ata/pata_cs5530.c +3
-0@@ -188,8 +188,10 @@ static struct scsi_host_template cs5530_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations cs5530_port_ops = {@@ -376,6 +378,7 @@ static int cs5530_init_one(struct pci_dev *pdev, const struct pci_device_id *id)return ata_pci_init_one (pdev, port_info,2 ); } +#ifdef CONFIG_PM static int cs5530_reinit_one (struct pci_dev *pdev) {drivers/ata/pata_cs5530.c +0
-0/* If we fail on resume we are doomed */ @@ -383,6 +386,7 @@ static int cs5530_reinit_one(struct
pci_dev*pdev)drivers/ata/pata_cypress.c static struct scsi_host_template
Quoted 49 lines
drivers/ata/pata_cs5530.c +3
-0BUG ();return ata_pci_device_resume (pdev); } +#endif /* CONFIG_PM */ static const struct pci_device_id cs5530[] = { {PCI_VDEVICE (CYRIX ,PCI_DEVICE_ID_CYRIX_5530_IDE ), },@@ -395,8 +399,10 @@ static struct pci_driver cs5530_pci_driver = { .id_table = cs5530, .probe = cs5530_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = cs5530_reinit_one, +#endif };static int __init cs5530_init (void )drivers/ata/pata_cs5535.c +4
-0@@ -185,8 +185,10 @@ static struct scsi_host_template cs5535_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations cs5535_port_ops = {@@ -270,8 +272,10 @@ static struct pci_driver cs5535_pci_driver = { .id_table = cs5535, .probe = cs5535_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init cs5535_init (void )drivers/ata/pata_cypress.c +0
-0@@ -136,8 +136,10 @@ static struct scsi_host_template
cy82c693_sht= {drivers/ata/pata_cypress.c static struct pci_driver
Quoted 11 lines
drivers/ata/pata_cypress.c +2
-0.slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations cy82c693_port_ops = {@@ -206,8 +208,10 @@ static struct pci_driver
cy82c693_pci_driver= {drivers/ata/pata_it821x.c static int it821x_reinit_one(struct
Quoted 170 lines
drivers/ata/pata_cypress.c +2
-0.id_table = cy82c693, .probe = cy82c693_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init cy82c693_init (void )drivers/ata/pata_efar.c +4
-0@@ -234,8 +234,10 @@ static struct scsi_host_template efar_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static const struct ata_port_operations efar_ops = {@@ -317,8 +319,10 @@ static struct pci_driver efar_pci_driver = { .id_table = efar_pci_tbl, .probe = efar_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init efar_init (void )drivers/ata/pata_hpt366.c +4
-1@@ -328,8 +328,10 @@ static struct scsi_host_template hpt36x_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif };/* @@ -457,12 +459,13 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id) return ata_pci_init_one(dev, port_info, 2); } +#ifdef CONFIG_PM static int hpt36x_reinit_one (struct pci_dev *dev) {hpt36x_init_chipset (dev);return ata_pci_device_resume (dev); } - +#endif static const struct pci_device_id hpt36x[] = {drivers/ata/pata_hpt366.c +2
-0{ PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT366), },@@ -474,8 +477,10 @@ static struct pci_driver hpt36x_pci_driver = { .id_table = hpt36x, .probe = hpt36x_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = hpt36x_reinit_one, +#endif };static int __init hpt36x_init (void )drivers/ata/pata_hpt3x3.c +4
-0@@ -119,8 +119,10 @@ static struct scsi_host_template hpt3x3_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations hpt3x3_port_ops = {@@ -206,11 +208,13 @@ static int hpt3x3_init_one(struct pci_dev *dev, const struct pci_device_id *id) return ata_pci_init_one(dev, port_info, 2); } +#ifdef CONFIG_PM static int hpt3x3_reinit_one (struct pci_dev *dev) {hpt3x3_init_chipset (dev);return ata_pci_device_resume (dev); } +#endif static const struct pci_device_id hpt3x3[] = {drivers/ata/pata_hpt3x3.c +2
-0{ PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT343), },@@ -223,8 +227,10 @@ static struct pci_driver hpt3x3_pci_driver = { .id_table = hpt3x3, .probe = hpt3x3_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = hpt3x3_reinit_one, +#endif };static int __init hpt3x3_init (void )drivers/ata/pata_it8213.c +4
-0@@ -246,8 +246,10 @@ static struct scsi_host_template it8213_sht = { .dma_boundary = ATA_DMA_BOUNDARY, .slave_configure = ata_scsi_slave_config, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static const struct ata_port_operations it8213_ops = {@@ -330,8 +332,10 @@ static struct pci_driver it8213_pci_driver = { .id_table = it8213_pci_tbl, .probe = it8213_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init it8213_init (void )drivers/ata/pata_it821x.c +3
-0@@ -646,8 +646,10 @@ static struct scsi_host_template it821x_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations it821x_smart_port_ops = {@@ -780,6 +782,7 @@ static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)return ata_pci_init_one (pdev, port_info,2 ); } +#ifdef CONFIG_PM static int it821x_reinit_one (struct pci_dev *pdev) {drivers/ata/pata_it821x.c +0
-0/* Resume - turn raid back off if need be */ @@ -787,6 +790,7 @@ static int it821x_reinit_one(struct
pci_dev*pdev)drivers/ata/pata_jmicron.c static struct scsi_host_template
Quoted 23 lines
drivers/ata/pata_it821x.c +3
-0it821x_disable_raid (pdev);return ata_pci_device_resume (pdev); } +#endif static const struct pci_device_id it821x[] = { {PCI_VDEVICE (ITE ,PCI_DEVICE_ID_ITE_8211 ), },@@ -800,8 +804,10 @@ static struct pci_driver it821x_pci_driver = { .id_table = it821x, .probe = it821x_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = it821x_reinit_one, +#endif };static int __init it821x_init (void )drivers/ata/pata_jmicron.c +0
-0@@ -137,6 +137,10 @@ static struct scsi_host_template
jmicron_sht= {drivers/ata/pata_marvell.c static struct scsi_host_template
Quoted 110 lines
drivers/ata/pata_jmicron.c +7
-0.slave_destroy = ata_scsi_slave_destroy,/* Use standard CHS mapping rules */ .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM + .suspend = ata_scsi_device_suspend, + .resume = ata_scsi_device_resume, +#endif }; static const struct ata_port_operations jmicron_ops = {@@ -225,8 +229,10 @@ static struct pci_driver jmicron_pci_driver = { .id_table = jmicron_pci_tbl, .probe = jmicron_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init jmicron_init (void )@@ -238,6 +244,7 @@ static void __exit jmicron_exit(void) {pci_unregister_driver (&jmicron_pci_driver); } +#endif module_init (jmicron_init);module_exit (jmicron_exit);drivers/ata/pata_legacy.c +3
-0@@ -186,7 +186,10 @@ static struct ata_port_operations legacy_port_ops = { .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .freeze = ata_bmdma_freeze, + .thaw = ata_bmdma_thaw, .error_handler = ata_bmdma_error_handler, + .post_internal_cmd = ata_bmdma_post_internal_cmd, .qc_prep = ata_qc_prep,drivers/ata/pata_legacy.c +3
-0.qc_issue = ata_qc_issue_prot,@@ -298,7 +301,10 @@ static struct ata_port_operations pdc20230_port_ops = { .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .freeze = ata_bmdma_freeze, + .thaw = ata_bmdma_thaw, .error_handler = ata_bmdma_error_handler, + .post_internal_cmd = ata_bmdma_post_internal_cmd, .qc_prep = ata_qc_prep,drivers/ata/pata_legacy.c +3
-0.qc_issue = ata_qc_issue_prot,@@ -350,7 +356,10 @@ static struct ata_port_operations ht6560a_port_ops = { .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .freeze = ata_bmdma_freeze, + .thaw = ata_bmdma_thaw, .error_handler = ata_bmdma_error_handler, + .post_internal_cmd = ata_bmdma_post_internal_cmd, .qc_prep = ata_qc_prep,drivers/ata/pata_legacy.c +3
-0.qc_issue = ata_qc_issue_prot,@@ -413,7 +422,10 @@ static struct ata_port_operations ht6560b_port_ops = { .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .freeze = ata_bmdma_freeze, + .thaw = ata_bmdma_thaw, .error_handler = ata_bmdma_error_handler, + .post_internal_cmd = ata_bmdma_post_internal_cmd, .qc_prep = ata_qc_prep,drivers/ata/pata_legacy.c +3
-0.qc_issue = ata_qc_issue_prot,@@ -531,7 +543,10 @@ static struct ata_port_operations opti82c611a_port_ops = { .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .freeze = ata_bmdma_freeze, + .thaw = ata_bmdma_thaw, .error_handler = ata_bmdma_error_handler, + .post_internal_cmd = ata_bmdma_post_internal_cmd, .qc_prep = ata_qc_prep,drivers/ata/pata_legacy.c +3
-0.qc_issue = ata_qc_issue_prot,@@ -661,7 +676,10 @@ static struct ata_port_operations opti82c46x_port_ops = { .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .freeze = ata_bmdma_freeze, + .thaw = ata_bmdma_thaw, .error_handler = ata_bmdma_error_handler, + .post_internal_cmd = ata_bmdma_post_internal_cmd, .qc_prep = ata_qc_prep,drivers/ata/pata_legacy.c +0
-0.qc_issue = opti82c46x_qc_issue_prot,drivers/ata/pata_marvell.c +0
-0@@ -103,8 +103,10 @@ static struct scsi_host_template
marvell_sht= {drivers/ata/pata_ns87410.c static struct scsi_host_template
Quoted 94 lines
drivers/ata/pata_marvell.c +4
-0.slave_destroy = ata_scsi_slave_destroy,/* Use standard CHS mapping rules */ .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static const struct ata_port_operations marvell_ops = {@@ -199,8 +201,10 @@ static struct pci_driver marvell_pci_driver = { .id_table = marvell_pci_tbl, .probe = marvell_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init marvell_init (void )drivers/ata/pata_mpc52xx.c +4
-0@@ -280,6 +280,10 @@ static struct scsi_host_template mpc52xx_ata_sht = { .dma_boundary = ATA_DMA_BOUNDARY, .slave_configure = ata_scsi_slave_config, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM + .suspend = ata_scsi_device_suspend, + .resume = ata_scsi_device_resume, +#endif };static struct
ata_port_operationsmpc52xx_ata_port_ops= {drivers/ata/pata_mpiix.c +4
-0@@ -165,8 +165,10 @@ static struct scsi_host_template mpiix_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations mpiix_port_ops = {@@ -270,8 +272,10 @@ static struct pci_driver mpiix_pci_driver = { .id_table = mpiix, .probe = mpiix_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init mpiix_init (void )drivers/ata/pata_netcell.c +4
-0@@ -63,8 +63,10 @@ static struct scsi_host_template netcell_sht = { .slave_destroy = ata_scsi_slave_destroy,/* Use standard CHS mapping rules */ .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static const struct ata_port_operations netcell_ops = {@@ -153,8 +155,10 @@ static struct pci_driver netcell_pci_driver = { .id_table = netcell_pci_tbl, .probe = netcell_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init netcell_init (void )drivers/ata/pata_ns87410.c +0
-0@@ -157,8 +157,10 @@ static struct scsi_host_template
ns87410_sht= {drivers/ata/pata_oldpiix.c static struct scsi_host_template
Quoted 26 lines
drivers/ata/pata_ns87410.c +4
-0.slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations ns87410_port_ops = {@@ -212,8 +214,10 @@ static struct pci_driver ns87410_pci_driver = { .id_table = ns87410, .probe = ns87410_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init ns87410_init (void )drivers/ata/pata_oldpiix.c +0
-0@@ -233,8 +233,10 @@ static struct scsi_host_template
oldpiix_sht= {drivers/ata/pata_optidma.c static struct scsi_host_template
Quoted 52 lines
drivers/ata/pata_oldpiix.c +4
-0.slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static const struct ata_port_operations oldpiix_pata_ops = {@@ -316,8 +318,10 @@ static struct pci_driver oldpiix_pci_driver = { .id_table = oldpiix_pci_tbl, .probe = oldpiix_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init oldpiix_init (void )drivers/ata/pata_opti.c +4
-0@@ -179,8 +179,10 @@ static struct scsi_host_template opti_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations opti_port_ops = {@@ -244,8 +246,10 @@ static struct pci_driver opti_pci_driver = { .id_table = opti, .probe = opti_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init opti_init (void )drivers/ata/pata_optidma.c +0
-0@@ -360,8 +360,10 @@ static struct scsi_host_template
optidma_sht= {drivers/ata/pata_pdc202xx_old.c static struct scsi_host_template
Quoted 27 lines
drivers/ata/pata_optidma.c +4
-0.slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations optidma_port_ops = {@@ -524,8 +526,10 @@ static struct pci_driver optidma_pci_driver = { .id_table = optidma, .probe = optidma_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init optidma_init (void )drivers/ata/pata_pdc202xx_old.c +0
-0@@ -267,8 +267,10 @@ static struct scsi_host_template
pdc202xx_sht= {drivers/ata/pata_pdc202xx_old.c static struct pci_driver
Quoted 11 lines
drivers/ata/pata_pdc202xx_old.c +2
-0.slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations pdc2024x_port_ops = {@@ -399,8 +401,10 @@ static struct pci_driver
pdc202xx_pci_driver= {drivers/ata/pata_radisys.c static struct scsi_host_template
Quoted 57 lines
drivers/ata/pata_pdc202xx_old.c +2
-0.id_table = pdc202xx, .probe = pdc202xx_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init pdc202xx_init (void )drivers/ata/pata_qdi.c +2
-1@@ -363,7 +363,8 @@ static __init int qdi_init(void)release_region (port,2 );continue ; } - ct +=qdi_init_one (port,6500 , ide_port[r & 0x01], ide_irq[r & 0x01], r & 0x04); +if (qdi_init_one (port,6500 , ide_port[r &0x01 ], ide_irq[r &0x01 ], r &0x04 ) ==0 ) + ct++; }if (((r &
0xF0) ==0xA0) || (r &0xF0)
==0x50) {drivers/ata/pata_qdi.c +0
-1/* QD6580: dual channel */ @@ -375,11 +376,14 @@ static __init int qdi_init(void) res =inb (port +3 );if (res &1 ) {/* Single channel mode */ - ct +=
qdi_init_one(port, 6580, ide_port[r & 0x01], ide_irq[r & 0x01], r & 0x04);drivers/ata/pata_qdi.c +1
-0+ if (qdi_init_one(port,6580, ide_port[r &
0x01], ide_irq[r &0x01], r &0x04))drivers/ata/pata_qdi.c +1
-1+ ct++; }else {/* Dual channel mode */ - ct +=
qdi_init_one(port, 6580, 0x1F0, 14, r & 0x04);drivers/ata/pata_qdi.c +2
-1- ct += qdi_init_one(port + 2, 6580, 0x170, 15, r & 0x04); + if (qdi_init_one(port,6580,
0x1F0, 14, r &0x04) == 0)drivers/ata/pata_qdi.c +2
-0+ ct++; + if (qdi_init_one(port +2, 6580,
0x170, 15, r &0x04) == 0)drivers/ata/pata_qdi.c +1
-0+ ct++; } } }drivers/ata/pata_radisys.c +0
-0@@ -228,8 +228,10 @@ static struct scsi_host_template
radisys_sht= {drivers/ata/pata_rz1000.c static int rz1000_reinit_one(struct
Quoted 46 lines
drivers/ata/pata_radisys.c +4
-0.slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static const struct ata_port_operations radisys_pata_ops = {@@ -312,8 +314,10 @@ static struct pci_driver radisys_pci_driver = { .id_table = radisys_pci_tbl, .probe = radisys_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init radisys_init (void )drivers/ata/pata_rz1000.c +2
-0@@ -94,8 +94,10 @@ static struct scsi_host_template rz1000_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations rz1000_port_ops = {@@ -178,6 +180,7 @@ static int rz1000_init_one (struct
pci_dev*pdev, const structpci_device_id*endrivers/ata/pata_rz1000.c +1
-0return -ENODEV ; } +#ifdef CONFIG_PM static int rz1000_reinit_one (struct pci_dev *pdev) {/* If this fails on resume (which is a "cant happen" case), we @@ -186,6 +189,7 @@ static int rz1000_reinit_one(struct
pci_dev*pdev)Review
Quoted 187 lines
drivers/ata/pata_rz1000.c +3
-0panic ("rz1000 fifo" );return ata_pci_device_resume (pdev); } +#endif static const struct pci_device_id pata_rz1000[] = { {PCI_VDEVICE (PCTECH ,PCI_DEVICE_ID_PCTECH_RZ1000 ), },@@ -199,8 +203,10 @@ static struct pci_driver rz1000_pci_driver = { .id_table = pata_rz1000, .probe = rz1000_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = rz1000_reinit_one, +#endif };static int __init rz1000_init (void )drivers/ata/pata_sc1200.c +5
-0@@ -194,8 +194,10 @@ static struct scsi_host_template sc1200_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations sc1200_port_ops = {@@ -210,7 +212,10 @@ static struct ata_port_operations sc1200_port_ops = { .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .freeze = ata_bmdma_freeze, + .thaw = ata_bmdma_thaw, .error_handler = ata_bmdma_error_handler, + .post_internal_cmd = ata_bmdma_post_internal_cmd, .bmdma_setup = ata_bmdma_setup,drivers/ata/pata_sc1200.c +2
-0.bmdma_start = ata_bmdma_start,@@ -266,8 +271,10 @@ static struct pci_driver sc1200_pci_driver = { .id_table = sc1200, .probe = sc1200_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init sc1200_init (void )drivers/ata/pata_scc.c +2
-0@@ -984,8 +984,10 @@ static struct scsi_host_template scc_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static const struct ata_port_operations scc_pata_ops = {drivers/ata/pata_serverworks.c +2
-0@@ -319,8 +319,10 @@ static struct scsi_host_template serverworks_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif };static struct
ata_port_operationsserverworks_osb4_port_ops= {drivers/ata/pata_serverworks.c +0
-0@@ -548,6 +550,7 @@ static int serverworks_init_one(struct
pci_dev*pdev, const structpci_device_iddrivers/ata/pata_serverworks.c +2
-0return ata_pci_init_one (pdev, port_info, ports); } +#ifdef CONFIG_PM static int serverworks_reinit_one (struct pci_dev *pdev) {/* Force master latency timer to 64 PCI clocks */ @@ -571,6 +574,7 @@ static int serverworks_reinit_one(struct pci_dev *pdev) }return ata_pci_device_resume (pdev); } +#endif static const struct pci_device_id serverworks[] = {{ PCI_VDEVICE(SERVERWORKS,
PCI_DEVICE_ID_SERVERWORKS_OSB4IDE), 0},drivers/ata/pata_serverworks.c +2
-0@@ -587,8 +591,10 @@ static struct pci_driver serverworks_pci_driver = { .id_table = serverworks, .probe = serverworks_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = serverworks_reinit_one, +#endif };static int
__initserverworks_init(void)drivers/ata/pata_sil680.c +6
-0@@ -236,6 +236,10 @@ static struct scsi_host_template sil680_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM + .suspend = ata_scsi_device_suspend, + .resume = ata_scsi_device_resume, +#endif }; static struct ata_port_operations sil680_port_ops = {@@ -377,11 +381,13 @@ static int sil680_init_one(struct pci_dev *pdev, const struct pci_device_id *id) return ata_pci_init_one(pdev, port_info, 2); } +#ifdef CONFIG_PM static int sil680_reinit_one (struct pci_dev *pdev) {sil680_init_chip (pdev);return ata_pci_device_resume (pdev); } +#endif static const struct pci_device_id sil680[] = {drivers/ata/pata_sil680.c +2
-0{ PCI_VDEVICE(CMD, PCI_DEVICE_ID_SII_680), },@@ -394,8 +400,10 @@ static struct pci_driver sil680_pci_driver = { .id_table = sil680, .probe = sil680_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = sil680_reinit_one, +#endif };static int __init sil680_init (void )drivers/ata/pata_sis.c +4
-0@@ -575,8 +575,10 @@ static struct scsi_host_template sis_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static const struct ata_port_operations sis_133_ops = {@@ -1032,8 +1034,10 @@ static struct pci_driver sis_pci_driver = { .id_table = sis_pci_tbl, .probe = sis_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init sis_init (void )(quoted diff) +0
-0
b/drivers/ata/pata_sl82c105.cdrivers/ata/pata_triflex.c static struct scsi_host_template
Quoted 20 lines
index 13e81f0..b681441 100644
drivers/ata/pata_sl82c105.c +3
-0@@ -234,7 +234,10 @@ static struct ata_port_operations sl82c105_port_ops = { .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .freeze = ata_bmdma_freeze, + .thaw = ata_bmdma_thaw, .error_handler = sl82c105_error_handler, + .post_internal_cmd = ata_bmdma_post_internal_cmd, .bmdma_setup = ata_bmdma_setup,drivers/ata/pata_sl82c105.c +0
-0.bmdma_start = sl82c105_bmdma_start,drivers/ata/pata_triflex.c +0
-0@@ -193,8 +193,10 @@ static struct scsi_host_template
triflex_sht= {Review
Quoted 65 lines
drivers/ata/pata_triflex.c +4
-0.slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations triflex_port_ops = {@@ -260,8 +262,10 @@ static struct pci_driver triflex_pci_driver = { .id_table = triflex, .probe = triflex_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, +#endif };static int __init triflex_init (void )drivers/ata/pata_via.c +3
-0@@ -305,8 +305,10 @@ static struct scsi_host_template via_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, +#endif }; static struct ata_port_operations via_port_ops = {@@ -560,6 +562,7 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)return ata_pci_init_one (pdev, port_info,2 ); } +#ifdef CONFIG_PM /** * via_reinit_one - reinit after resume * @pdev; PCI device
drivers/ata/pata_via.c +3
-0@@ -592,6 +595,7 @@ static int via_reinit_one(struct pci_dev *pdev) }return ata_pci_device_resume (pdev); } +#endif static const struct pci_device_id via[] = { {PCI_VDEVICE (VIA ,PCI_DEVICE_ID_VIA_82C576_1 ), },@@ -607,8 +611,10 @@ static struct pci_driver via_pci_driver = { .id_table = via, .probe = via_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = via_reinit_one, +#endif };static int __init via_init (void )(quoted diff) +0
-0
b/drivers/ata/sata_inic162x.cQuoted 59 lines
index 31b636f..3193a60 100644
drivers/ata/sata_inic162x.c +3
-0@@ -135,8 +135,10 @@ static struct scsi_host_template inic_sht = { .slave_configure = inic_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .suspend = ata_scsi_device_suspend, .resume = ata_scsi_device_resume, +#endif }; static const int scr_map[] = {@@ -632,6 +634,7 @@ static int init_controller(void __iomem *mmio_base, u16 hctl)return 0 ; } +#ifdef CONFIG_PM static int inic_pci_device_resume (struct pci_dev *pdev) {drivers/ata/sata_inic162x.c +0
-1struct ata_host *host =dev_get_drvdata (&pdev->dev);@@ -642,7 +645,6 @@ static int inic_pci_device_resume(struct pci_dev *pdev)ata_pci_device_do_resume (pdev );if (pdev->dev.power.power_state.event ==PM_EVENT_SUSPEND ) { -printk ("XXX\n" ); rc =init_controller (mmio_base, hpriv->cached_hctl);if (rc)drivers/ata/sata_inic162x.c +1
-0return rc;@@ -652,6 +654,7 @@ static int inic_pci_device_resume(struct pci_dev *pdev)return 0 ; } +#endif static int inic_init_one(struct pci_dev *pdev, const struct
pci_device_id*ent)
{drivers/ata/sata_inic162x.c +2
-0@@ -755,8 +758,10 @@ static const struct pci_device_id inic_pci_tbl[] = {static struct pci_driver inic_pci_driver = { .name =DRV_NAME , .id_table = inic_pci_tbl, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = inic_pci_device_resume, +#endif .probe = inic_init_one, .remove = ata_pci_remove_one,};
drivers/ata/sata_nv.c +0
-0drivers/ata/sata_nv.c struct nv_host_priv { · line 238
Quoted 9 lines
drivers/ata/sata_nv.c +2
-0@@ -230,7 +230,9 @@ struct nv_host_priv {static int nv_init_one (struct pci_dev *pdev,const struct pci_device_id *ent);static void nv_remove_one (struct pci_dev *pdev); +#ifdef CONFIG_PM static int nv_pci_device_resume (struct pci_dev *pdev); +#endif static void nv_ck804_host_stop (struct ata_host *host); static irqreturn_t nv_generic_interrupt(int irq, void
*dev_instance);drivers/ata/sata_nv.c static struct scsi_host_template
Quoted 37 lines
static
irqreturn_tnv_nf2_interrupt(int irq, void *dev_instance);drivers/ata/sata_nv.c +2
-0@@ -251,8 +253,10 @@ static irqreturn_t nv_adma_interrupt(int irq, void *dev_instance);static void nv_adma_irq_clear (struct ata_port *ap);static int nv_adma_port_start (struct ata_port *ap);static void nv_adma_port_stop (struct ata_port *ap); +#ifdef CONFIG_PM static int nv_adma_port_suspend (struct ata_port *ap,pm_message_t mesg);static int nv_adma_port_resume (struct ata_port *ap); +#endif static void nv_adma_error_handler (struct ata_port *ap);static void
nv_adma_host_stop(struct ata_host *host); static voidnv_adma_post_internal_cmd(struct ata_queued_cmd *qc);drivers/ata/sata_nv.c +4
-0@@ -295,8 +299,10 @@ static struct pci_driver nv_pci_driver = { .name = DRV_NAME, .id_table = nv_pci_tbl, .probe = nv_init_one, +#ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = nv_pci_device_resume, +#endif .remove = nv_remove_one, };@@ -316,8 +322,10 @@ static struct scsi_host_template nv_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .suspend = ata_scsi_device_suspend, .resume = ata_scsi_device_resume, +#endif }; static struct scsi_host_template nv_adma_sht = {@@ -336,8 +344,10 @@ static struct scsi_host_template
nv_adma_sht= {drivers/ata/sata_nv.c static void nv_remove_one (struct
Quoted 43 lines
drivers/ata/sata_nv.c +5
-0.slave_configure = nv_adma_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .suspend = ata_scsi_device_suspend, .resume = ata_scsi_device_resume, +#endif }; static const struct ata_port_operations nv_generic_ops = {@@ -449,8 +459,10 @@ static const struct ata_port_operations nv_adma_ops = { .scr_write = nv_scr_write, .port_start = nv_adma_port_start, .port_stop = nv_adma_port_stop, +#ifdef CONFIG_PM .port_suspend = nv_adma_port_suspend, .port_resume = nv_adma_port_resume, +#endif .host_stop = nv_adma_host_stop, };@@ -1003,6 +1015,7 @@ static void nv_adma_port_stop(struct ata_port *ap) writew(0, mmio + NV_ADMA_CTL); } +#ifdef CONFIG_PM static int nv_adma_port_suspend (struct ata_port *ap,pm_message_t mesg){
drivers/ata/sata_nv.c +1
-0struct nv_adma_port_priv *pp = ap->private_data;@@ -1053,6 +1066,7 @@ static int nv_adma_port_resume(struct ata_port *ap)return 0 ; } +#endif static void nv_adma_setup_port(struct ata_probe_ent
*probe_ent, unsigned int port)
{drivers/ata/sata_nv.c +0
-0@@ -1555,6 +1569,7 @@ static void nv_remove_one (struct
pci_dev*pdev)Quoted 98 lines
drivers/ata/sata_nv.c +2
-0kfree (hpriv); } +#ifdef CONFIG_PM static int nv_pci_device_resume (struct pci_dev *pdev) {struct ata_host *host =dev_get_drvdata (&pdev->dev);@@ -1602,6 +1617,7 @@ static int nv_pci_device_resume(struct pci_dev *pdev) return 0; } +#endif static void nv_ck804_host_stop (struct ata_host *host){
drivers/ata/sata_sil.c +2
-0@@ -183,8 +183,10 @@ static struct scsi_host_template sil_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .suspend = ata_scsi_device_suspend, .resume = ata_scsi_device_resume, +#endif }; static const struct ata_port_operations sil_ops = {drivers/ata/sata_sil24.c +2
-0@@ -380,8 +380,10 @@ static struct scsi_host_template sil24_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM .suspend = ata_scsi_device_suspend, .resume = ata_scsi_device_resume, +#endif }; static const struct ata_port_operations sil24_ops = {include/linux/libata.h +0
-1@@ -403,8 +403,7 @@ struct ata_host {void *private_data;const struct ata_port_operations *ops;unsigned long flags; -int simplex_claimed;/* Keep seperate in case we
include/linux/libata.h +0
-1- everneed to do this locked */
include/linux/libata.h +1
-0+struct ata_port *simplex_claimed;/* channel owning the DMA */
include/linux/libata.h +1
-0struct ata_port *ports[0 ]; };@@ -719,10 +718,12 @@ extern void ata_std_ports(struct ata_ioports *ioaddr);extern int ata_pci_init_one (struct pci_dev *pdev,struct ata_port_info **port_info,unsigned int n_ports);extern void ata_pci_remove_one (struct pci_dev *pdev); +#ifdef CONFIG_PM extern void ata_pci_device_do_suspend (struct pci_dev *pdev,pm_message_t mesg);extern int __must_check ata_pci_device_do_resume (struct pci_dev *pdev); extern int ata_pci_device_suspend(struct pci_dev *pdev,
pm_message_tmesg);
extern intata_pci_device_resume(struct pci_dev *pdev);include/linux/libata.h +3
-0+#endif extern int ata_pci_clear_simplex (struct pci_dev *pdev);#endif /* CONFIG_PCI */ extern int ata_device_add (const struct ata_probe_ent *ent);@@ -748,10 +749,12 @@ extern int sata_scr_write(struct ata_port *ap, int reg, u32 val);extern int sata_scr_write_flush (struct ata_port *ap,int reg,u32 val);extern int ata_port_online (struct ata_port *ap);extern int ata_port_offline (struct ata_port *ap); +#ifdef CONFIG_PM extern int ata_scsi_device_resume (struct scsi_device *);extern int ata_scsi_device_suspend (struct scsi_device *,pm_message_t mesg);extern int ata_host_suspend (struct ata_host *host,pm_message_t mesg);extern void ata_host_resume (struct ata_host *host); +#endif extern int ata_ratelimit (void );extern int ata_busy_sleep (struct ata_port *ap, unsigned long timeout_pat, unsignedQuoted 8 lines
long timeout);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Hello,
Quoted 6 lines · Paul Rolland
Hello,
Applied this on top of 2.6.21-rc1 and your previous patch (see my previous mail).
Still booting, no more the weird error I've reported minutes ago.
Quoted 16 lines
pata_jmicronstill unable to detect my DVD-RW :
scsi8 :pata_jmicron
ata9.00: ATAPI, max UDMA/66
ata9.00: qc timeout (cmd0xef)
ata9.00: failed to set xfermode (err_mask=0x4) ata9.00: limiting speed to UDMA/44
ata9: failed to recover some devices, retrying in 5 secs ata9.00: qc timeout (cmd0xef)
ata9.00: failed to set xfermode (err_mask=0x4) ata9.00: limiting speed to PIO0
ata9: failed to recover some devices, retrying in 5 secs ata9.00: qc timeout (cmd0xef)
ata9.00: failed to set xfermode (err_mask=0x4) ata9.00: disabled
scsi9 :pata_jmicron
ATA: abnormal status0x7Fon port0x0000000000019807
1. Has it ever worked with the previous kernels?
2. If you connect a harddisk to pata_jmicron, does it work?
3. Does applying the attached patch fix your problem?
Signature · 1 line
tejun
drivers/ata/pata_jmicron.c +2 -1
@@ -196,7 +196,8 @@ static int jmicron_init_one (struct pci_dev *pdev, const struct pci_device_id *i {static struct ata_port_info info = { .sht = &jmicron_sht, - .flags =ATA_FLAG_SLAVE_POSS |ATA_FLAG_SRST , + .flags =ATA_FLAG_SLAVE_POSS |ATA_FLAG_SRST | +ATA_FLAG_SETXFER_POLLING , .pio_mask =0x1f , .mwdma_mask =0x07 ,
Hello,
Quoted 1 line
1. Has it ever worked with the previous kernels?
I can't tell, this machine is new, and it never booted something that was not a 2.6.20 or 2.6.21.
Quoted 3 lines
2. If you connect a harddisk to
pata_jmicron, does it work?3. Does applying the attached patch fix your problem?
Will do these two tonite when back home.
Thanks,
Paul