]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PATCH] PATA libata: suspend/resume simple cases
authorAlan <alan@lxorguk.ukuu.org.uk>
Wed, 22 Nov 2006 16:57:36 +0000 (16:57 +0000)
committerJeff Garzik <jeff@garzik.org>
Sat, 2 Dec 2006 03:46:49 +0000 (22:46 -0500)
This patch adds the suspend/resume callbacks for drivers which don't need
any additional help (beyond the pci resume quirk patch I posted earlier
anyway). Also bring version numbers back inline with master copies.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
15 files changed:
drivers/ata/ata_generic.c
drivers/ata/pata_atiixp.c
drivers/ata/pata_cs5535.c
drivers/ata/pata_cypress.c
drivers/ata/pata_efar.c
drivers/ata/pata_marvell.c
drivers/ata/pata_mpiix.c
drivers/ata/pata_netcell.c
drivers/ata/pata_ns87410.c
drivers/ata/pata_oldpiix.c
drivers/ata/pata_opti.c
drivers/ata/pata_optidma.c
drivers/ata/pata_radisys.c
drivers/ata/pata_sc1200.c
drivers/ata/pata_triflex.c

index 1b9ba4dfac655b2603aa68b48c3b2acca348907e..c7e8f033125d3eeaadd937cd02a6f86d9164cee6 100644 (file)
@@ -26,7 +26,7 @@
 #include <linux/libata.h>
 
 #define DRV_NAME "ata_generic"
-#define DRV_VERSION "0.2.7"
+#define DRV_VERSION "0.2.10"
 
 /*
  *     A generic parallel ATA driver using libata
@@ -118,6 +118,8 @@ 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,
+       .resume                 = ata_scsi_device_resume,
+       .suspend                = ata_scsi_device_suspend,
 };
 
 static struct ata_port_operations generic_port_ops = {
@@ -226,7 +228,9 @@ static struct pci_driver ata_generic_pci_driver = {
        .name           = DRV_NAME,
        .id_table       = ata_generic,
        .probe          = ata_generic_init_one,
-       .remove         = ata_pci_remove_one
+       .remove         = ata_pci_remove_one,
+       .suspend        = ata_pci_device_suspend,
+       .resume         = ata_pci_device_resume,
 };
 
 static int __init ata_generic_init(void)
index 4e1d3b59adbb54e0615755d2dc3b06a362e4a73b..7d9e391b0d18d276ff694d49e2b788be9efe8f4d 100644 (file)
@@ -22,7 +22,7 @@
 #include <linux/libata.h>
 
 #define DRV_NAME "pata_atiixp"
-#define DRV_VERSION "0.4.3"
+#define DRV_VERSION "0.4.4"
 
 enum {
        ATIIXP_IDE_PIO_TIMING   = 0x40,
@@ -218,6 +218,8 @@ 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,
+       .resume                 = ata_scsi_device_resume,
+       .suspend                = ata_scsi_device_suspend,
 };
 
 static struct ata_port_operations atiixp_port_ops = {
@@ -281,7 +283,9 @@ static struct pci_driver atiixp_pci_driver = {
        .name           = DRV_NAME,
        .id_table       = atiixp,
        .probe          = atiixp_init_one,
-       .remove         = ata_pci_remove_one
+       .remove         = ata_pci_remove_one,
+       .resume         = ata_pci_device_resume,
+       .suspend        = ata_pci_device_suspend,
 };
 
 static int __init atiixp_init(void)
index 8dafa4a49fdcb137d48de80293df69d669980883..38c00f6287614228c7f3c1a3a059ba7139113f8f 100644 (file)
@@ -39,7 +39,7 @@
 #include <asm/msr.h>
 
 #define DRV_NAME       "cs5535"
-#define DRV_VERSION    "0.2.10"
+#define DRV_VERSION    "0.2.11"
 
 /*
  *     The Geode (Aka Athlon GX now) uses an internal MSR based
@@ -186,6 +186,8 @@ 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,
+       .resume                 = ata_scsi_device_resume,
+       .suspend                = ata_scsi_device_suspend,
 };
 
 static struct ata_port_operations cs5535_port_ops = {
@@ -269,6 +271,8 @@ static struct pci_driver cs5535_pci_driver = {
        .id_table       = cs5535,
        .probe          = cs5535_init_one,
        .remove         = ata_pci_remove_one
+       .suspend        = ata_pci_device_suspend,
+       .resume         = ata_pci_device_resume,
 };
 
 static int __init cs5535_init(void)
index 5a0b811907ee82913dcf083daf4d052aab72019d..6352bc7df6033c78ae98e7e5bebb660f664b8572 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/libata.h>
 
 #define DRV_NAME "pata_cypress"
-#define DRV_VERSION "0.1.2"
+#define DRV_VERSION "0.1.4"
 
 /* here are the offset definitions for the registers */
 
@@ -137,6 +137,8 @@ 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,
+       .resume                 = ata_scsi_device_resume,
+       .suspend                = ata_scsi_device_suspend,
 };
 
 static struct ata_port_operations cy82c693_port_ops = {
@@ -204,7 +206,9 @@ static struct pci_driver cy82c693_pci_driver = {
        .name           = DRV_NAME,
        .id_table       = cy82c693,
        .probe          = cy82c693_init_one,
-       .remove         = ata_pci_remove_one
+       .remove         = ata_pci_remove_one,
+       .suspend        = ata_pci_device_suspend,
+       .resume         = ata_pci_device_resume,
 };
 
 static int __init cy82c693_init(void)
index 755f79279de3078393151ec2bf61094a77689bff..56589834483d481a7761fb75210bde2180ab22ad 100644 (file)
@@ -22,7 +22,7 @@
 #include <linux/ata.h>
 
 #define DRV_NAME       "pata_efar"
-#define DRV_VERSION    "0.4.2"
+#define DRV_VERSION    "0.4.3"
 
 /**
  *     efar_pre_reset  -       check for 40/80 pin
@@ -235,6 +235,8 @@ 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,
+       .resume                 = ata_scsi_device_resume,
+       .suspend                = ata_scsi_device_suspend,
 };
 
 static const struct ata_port_operations efar_ops = {
@@ -316,6 +318,8 @@ static struct pci_driver efar_pci_driver = {
        .id_table               = efar_pci_tbl,
        .probe                  = efar_init_one,
        .remove                 = ata_pci_remove_one,
+       .suspend                = ata_pci_device_suspend,
+       .resume                 = ata_pci_device_resume,
 };
 
 static int __init efar_init(void)
index 1ea64075c783169534eacbadd1bc70b30759f6e1..a5953c389264e6ea9e952e8956652e73221caa85 100644 (file)
@@ -20,7 +20,7 @@
 #include <linux/ata.h>
 
 #define DRV_NAME       "pata_marvell"
-#define DRV_VERSION    "0.0.5u"
+#define DRV_VERSION    "0.1.1"
 
 /**
  *     marvell_pre_reset       -       check for 40/80 pin
@@ -103,6 +103,8 @@ static struct scsi_host_template marvell_sht = {
        .slave_configure        = ata_scsi_slave_config,
        /* Use standard CHS mapping rules */
        .bios_param             = ata_std_bios_param,
+       .resume                 = ata_scsi_device_resume,
+       .suspend                = ata_scsi_device_suspend,
 };
 
 static const struct ata_port_operations marvell_ops = {
@@ -197,6 +199,8 @@ static struct pci_driver marvell_pci_driver = {
        .id_table               = marvell_pci_tbl,
        .probe                  = marvell_init_one,
        .remove                 = ata_pci_remove_one,
+       .suspend                = ata_pci_device_suspend,
+       .resume                 = ata_pci_device_resume,
 };
 
 static int __init marvell_init(void)
index e00d406bfdf57c90d7300755070a5f4055ebd7b2..752a7418ed51ed199e8332f6539c72262a64141b 100644 (file)
@@ -35,7 +35,7 @@
 #include <linux/libata.h>
 
 #define DRV_NAME "pata_mpiix"
-#define DRV_VERSION "0.7.2"
+#define DRV_VERSION "0.7.3"
 
 enum {
        IDETIM = 0x6C,          /* IDE control register */
@@ -168,6 +168,8 @@ 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,
+       .resume                 = ata_scsi_device_resume,
+       .suspend                = ata_scsi_device_suspend,
 };
 
 static struct ata_port_operations mpiix_port_ops = {
@@ -285,7 +287,9 @@ static struct pci_driver mpiix_pci_driver = {
        .name           = DRV_NAME,
        .id_table       = mpiix,
        .probe          = mpiix_init_one,
-       .remove         = mpiix_remove_one
+       .remove         = mpiix_remove_one,
+       .suspend        = ata_pci_device_suspend,
+       .resume         = ata_pci_device_resume,
 };
 
 static int __init mpiix_init(void)
index 1963a4d358736c998940468cf10924237abebf53..956616789ba1497b8f8678b2a36a97538a56a72c 100644 (file)
@@ -16,7 +16,7 @@
 #include <linux/ata.h>
 
 #define DRV_NAME       "pata_netcell"
-#define DRV_VERSION    "0.1.5"
+#define DRV_VERSION    "0.1.6"
 
 /**
  *     netcell_probe_init      -       check for 40/80 pin
@@ -65,6 +65,8 @@ static struct scsi_host_template netcell_sht = {
        .slave_destroy          = ata_scsi_slave_destroy,
        /* Use standard CHS mapping rules */
        .bios_param             = ata_std_bios_param,
+       .resume                 = ata_scsi_device_resume,
+       .suspend                = ata_scsi_device_suspend,
 };
 
 static const struct ata_port_operations netcell_ops = {
@@ -153,6 +155,8 @@ static struct pci_driver netcell_pci_driver = {
        .id_table               = netcell_pci_tbl,
        .probe                  = netcell_init_one,
        .remove                 = ata_pci_remove_one,
+       .suspend                = ata_pci_device_suspend,
+       .resume                 = ata_pci_device_resume,
 };
 
 static int __init netcell_init(void)
index 7ec800f00ec8904d1a7f6cf87ce9ee8e68f428b7..428e6b511a2f31180895d3859c23c70208e46836 100644 (file)
@@ -28,7 +28,7 @@
 #include <linux/libata.h>
 
 #define DRV_NAME "pata_ns87410"
-#define DRV_VERSION "0.4.2"
+#define DRV_VERSION "0.4.3"
 
 /**
  *     ns87410_pre_reset               -       probe begin
@@ -158,6 +158,8 @@ 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,
+       .resume                 = ata_scsi_device_resume,
+       .suspend                = ata_scsi_device_suspend,
 };
 
 static struct ata_port_operations ns87410_port_ops = {
@@ -210,7 +212,9 @@ static struct pci_driver ns87410_pci_driver = {
        .name           = DRV_NAME,
        .id_table       = ns87410,
        .probe          = ns87410_init_one,
-       .remove         = ata_pci_remove_one
+       .remove         = ata_pci_remove_one,
+       .suspend        = ata_pci_device_suspend,
+       .resume         = ata_pci_device_resume,
 };
 
 static int __init ns87410_init(void)
index 8837256632e926f49d2064a2549c60b47756de1e..1283fb71bd5dceeb4057f2b68a2d79fc2d9b8160 100644 (file)
@@ -233,6 +233,8 @@ 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,
+       .resume                 = ata_scsi_device_resume,
+       .suspend                = ata_scsi_device_suspend,
 };
 
 static const struct ata_port_operations oldpiix_pata_ops = {
@@ -314,6 +316,8 @@ static struct pci_driver oldpiix_pci_driver = {
        .id_table               = oldpiix_pci_tbl,
        .probe                  = oldpiix_init_one,
        .remove                 = ata_pci_remove_one,
+       .suspend                = ata_pci_device_suspend,
+       .resume                 = ata_pci_device_resume,
 };
 
 static int __init oldpiix_init(void)
index c6319cf50de4d83d87844ee8d3615852da9bc807..66f561db2ab1e4c265459250e3afdd93e2744f86 100644 (file)
@@ -34,7 +34,7 @@
 #include <linux/libata.h>
 
 #define DRV_NAME "pata_opti"
-#define DRV_VERSION "0.2.5"
+#define DRV_VERSION "0.2.7"
 
 enum {
        READ_REG        = 0,    /* index of Read cycle timing register */
@@ -109,30 +109,6 @@ static void opti_write_reg(struct ata_port *ap, u8 val, int reg)
        outb(0x83, regio + 2);
 }
 
-#if 0
-/**
- *     opti_read_reg           -       control register read
- *     @ap: ATA port
- *     @reg: control register number
- *
- *     The Opti uses magic 'trapdoor' register accesses to do configuration
- *     rather than using PCI space as other controllers do. The double inw
- *     on the error register activates configuration mode. We can then read
- *     the control register
- */
-
-static u8 opti_read_reg(struct ata_port *ap, int reg)
-{
-       unsigned long regio = ap->ioaddr.cmd_addr;
-       u8 ret;
-       inw(regio + 1);
-       inw(regio + 1);
-       outb(3, regio + 2);
-       ret = inb(regio + reg);
-       outb(0x83, regio + 2);
-}
-#endif
-
 /**
  *     opti_set_piomode        -       set initial PIO mode data
  *     @ap: ATA interface
@@ -204,12 +180,13 @@ 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,
+       .resume                 = ata_scsi_device_resume,
+       .suspend                = ata_scsi_device_suspend,
 };
 
 static struct ata_port_operations opti_port_ops = {
        .port_disable   = ata_port_disable,
        .set_piomode    = opti_set_piomode,
-/*     .set_dmamode    = opti_set_dmamode, */
        .tf_load        = ata_tf_load,
        .tf_read        = ata_tf_read,
        .check_status   = ata_check_status,
@@ -267,7 +244,9 @@ static struct pci_driver opti_pci_driver = {
        .name           = DRV_NAME,
        .id_table       = opti,
        .probe          = opti_init_one,
-       .remove         = ata_pci_remove_one
+       .remove         = ata_pci_remove_one,
+       .suspend        = ata_pci_device_suspend,
+       .resume         = ata_pci_device_resume,
 };
 
 static int __init opti_init(void)
index 2f4770cce04e45c450496a9da75f9fc7cc145719..d898e42f99e8655dd6433c7fee91b7af5fcc4258 100644 (file)
@@ -33,7 +33,7 @@
 #include <linux/libata.h>
 
 #define DRV_NAME "pata_optidma"
-#define DRV_VERSION "0.2.2"
+#define DRV_VERSION "0.2.3"
 
 enum {
        READ_REG        = 0,    /* index of Read cycle timing register */
@@ -361,6 +361,8 @@ 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,
+       .resume                 = ata_scsi_device_resume,
+       .suspend                = ata_scsi_device_suspend,
 };
 
 static struct ata_port_operations optidma_port_ops = {
@@ -522,7 +524,9 @@ static struct pci_driver optidma_pci_driver = {
        .name           = DRV_NAME,
        .id_table       = optidma,
        .probe          = optidma_init_one,
-       .remove         = ata_pci_remove_one
+       .remove         = ata_pci_remove_one,
+       .suspend        = ata_pci_device_suspend,
+       .resume         = ata_pci_device_resume,
 };
 
 static int __init optidma_init(void)
index 048c2bb21ef1b72dfdd5a13ad503b88d7b7d8a6c..5fe7ffce5284d4735ba341468597b7cce993f839 100644 (file)
@@ -229,6 +229,8 @@ 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,
+       .resume                 = ata_scsi_device_resume,
+       .suspend                = ata_scsi_device_suspend,
 };
 
 static const struct ata_port_operations radisys_pata_ops = {
@@ -311,6 +313,8 @@ static struct pci_driver radisys_pci_driver = {
        .id_table               = radisys_pci_tbl,
        .probe                  = radisys_init_one,
        .remove                 = ata_pci_remove_one,
+       .suspend                = ata_pci_device_suspend,
+       .resume                 = ata_pci_device_resume,
 };
 
 static int __init radisys_init(void)
index 0c75dae74764aa7f8d0021d06d194a1310facd4f..0c5393a73970e15ebfcef54b0d8296cf88a7c2bb 100644 (file)
@@ -40,7 +40,7 @@
 #include <linux/libata.h>
 
 #define DRV_NAME       "sc1200"
-#define DRV_VERSION    "0.2.3"
+#define DRV_VERSION    "0.2.4"
 
 #define SC1200_REV_A   0x00
 #define SC1200_REV_B1  0x01
@@ -195,6 +195,8 @@ 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,
+       .resume                 = ata_scsi_device_resume,
+       .suspend                = ata_scsi_device_suspend,
 };
 
 static struct ata_port_operations sc1200_port_ops = {
@@ -264,7 +266,9 @@ static struct pci_driver sc1200_pci_driver = {
        .name           = DRV_NAME,
        .id_table       = sc1200,
        .probe          = sc1200_init_one,
-       .remove         = ata_pci_remove_one
+       .remove         = ata_pci_remove_one,
+       .suspend        = ata_pci_device_suspend,
+       .resume         = ata_pci_device_resume,
 };
 
 static int __init sc1200_init(void)
index bfda1f7e760abcb7d12fcd9f75d8529e8f41d5ef..ece9cb7c2f4d0003c320f7cca61c91b31f0ba019 100644 (file)
@@ -43,7 +43,7 @@
 #include <linux/libata.h>
 
 #define DRV_NAME "pata_triflex"
-#define DRV_VERSION "0.2.5"
+#define DRV_VERSION "0.2.7"
 
 /**
  *     triflex_prereset                -       probe begin
@@ -194,6 +194,8 @@ 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,
+       .resume                 = ata_scsi_device_resume,
+       .suspend                = ata_scsi_device_suspend,
 };
 
 static struct ata_port_operations triflex_port_ops = {
@@ -258,7 +260,9 @@ static struct pci_driver triflex_pci_driver = {
        .name           = DRV_NAME,
        .id_table       = triflex,
        .probe          = triflex_init_one,
-       .remove         = ata_pci_remove_one
+       .remove         = ata_pci_remove_one,
+       .suspend        = ata_pci_device_suspend,
+       .resume         = ata_pci_device_resume,
 };
 
 static int __init triflex_init(void)