The patch titled
     hpt36x: Suspend/resume support
has been added to the -mm tree.  Its filename is
     hpt36x-suspend-resume-support.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: hpt36x: Suspend/resume support
From: Alan Cox <[EMAIL PROTECTED]>

Another chipset which needs some reconfiguration after a resume.  All the chip
setup is moved to a new function called in both setup and resume.

Signed-off-by: Alan Cox <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---

 drivers/ata/pata_hpt366.c |   49 +++++++++++++++++++++++++-----------
 1 files changed, 35 insertions(+), 14 deletions(-)

diff -puN drivers/ata/pata_hpt366.c~hpt36x-suspend-resume-support 
drivers/ata/pata_hpt366.c
--- a/drivers/ata/pata_hpt366.c~hpt36x-suspend-resume-support
+++ a/drivers/ata/pata_hpt366.c
@@ -27,7 +27,7 @@
 #include <linux/libata.h>
 
 #define DRV_NAME       "pata_hpt366"
-#define DRV_VERSION    "0.5.1"
+#define DRV_VERSION    "0.5.3"
 
 struct hpt_clock {
        u8      xfer_speed;
@@ -338,6 +338,8 @@ static struct scsi_host_template hpt36x_
        .dma_boundary           = ATA_DMA_BOUNDARY,
        .slave_configure        = ata_scsi_slave_config,
        .bios_param             = ata_std_bios_param,
+       .resume                 = ata_scsi_device_resume,
+       .suspend                = ata_scsi_device_suspend,
 };
 
 /*
@@ -380,6 +382,27 @@ static struct ata_port_operations hpt366
 };
 
 /**
+ *     hpt36x_init_chipset     -       common chip setup
+ *     @dev: PCI device
+ *
+ *     Perform the chip setup work that must be done at both init and
+ *     resume time
+ */
+
+static void hpt36x_init_chipset(struct pci_dev *dev)
+{
+       u8 drive_fast;
+       pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, (L1_CACHE_BYTES / 4));
+       pci_write_config_byte(dev, PCI_LATENCY_TIMER, 0x78);
+       pci_write_config_byte(dev, PCI_MIN_GNT, 0x08);
+       pci_write_config_byte(dev, PCI_MAX_LAT, 0x08);
+
+       pci_read_config_byte(dev, 0x51, &drive_fast);
+       if (drive_fast & 0x80)
+               pci_write_config_byte(dev, 0x51, drive_fast & ~0x80);
+}
+
+/**
  *     hpt36x_init_one         -       Initialise an HPT366/368
  *     @dev: PCI device
  *     @id: Entry in match table
@@ -414,7 +437,6 @@ static int hpt36x_init_one(struct pci_de
 
        u32 class_rev;
        u32 reg1;
-       u8 drive_fast;
 
        pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev);
        class_rev &= 0xFF;
@@ -424,14 +446,7 @@ static int hpt36x_init_one(struct pci_de
        if (class_rev > 2)
                        return -ENODEV;
 
-       pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, (L1_CACHE_BYTES / 4));
-       pci_write_config_byte(dev, PCI_LATENCY_TIMER, 0x78);
-       pci_write_config_byte(dev, PCI_MIN_GNT, 0x08);
-       pci_write_config_byte(dev, PCI_MAX_LAT, 0x08);
-
-       pci_read_config_byte(dev, 0x51, &drive_fast);
-       if (drive_fast & 0x80)
-               pci_write_config_byte(dev, 0x51, drive_fast & ~0x80);
+       hpt36x_init_chipset(dev);
 
        pci_read_config_dword(dev, 0x40,  &reg1);
 
@@ -452,9 +467,15 @@ static int hpt36x_init_one(struct pci_de
        return ata_pci_init_one(dev, port_info, 2);
 }
 
+static int hpt36x_reinit_one(struct pci_dev *dev)
+{
+       hpt36x_init_chipset(dev);
+       return ata_pci_device_resume(dev);
+}
+
+
 static const struct pci_device_id hpt36x[] = {
        { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT366), },
-
        { },
 };
 
@@ -462,7 +483,9 @@ static struct pci_driver hpt36x_pci_driv
        .name           = DRV_NAME,
        .id_table       = hpt36x,
        .probe          = hpt36x_init_one,
-       .remove         = ata_pci_remove_one
+       .remove         = ata_pci_remove_one,
+       .suspend        = ata_pci_device_suspend,
+       .resume         = hpt36x_reinit_one,
 };
 
 static int __init hpt36x_init(void)
@@ -470,13 +493,11 @@ static int __init hpt36x_init(void)
        return pci_register_driver(&hpt36x_pci_driver);
 }
 
-
 static void __exit hpt36x_exit(void)
 {
        pci_unregister_driver(&hpt36x_pci_driver);
 }
 
-
 MODULE_AUTHOR("Alan Cox");
 MODULE_DESCRIPTION("low-level driver for the Highpoint HPT366/368");
 MODULE_LICENSE("GPL");
_

Patches currently in -mm which might be from [EMAIL PROTECTED] are

git-libata-all.patch
pata_hpt366-more-enable-bits.patch
pci-move-pci_vdevice-from-libata-to-core.patch
pata-libata-suspend-resume-simple-cases.patch
pata-libata-suspend-resume-simple-cases-fix.patch
pata_cmd64x-suspend-resume.patch
pata_cs5520-resume-support.patch
pata_jmicron-fix-jmb368-support-add-suspend-resume.patch
pata_cs5530-suspend-resume-support.patch
pata_cs5530-suspend-resume-support-tweak.patch
pata_rz1000-force-readahead-off-on-resume.patch
pata_ali-suspend-resume-support.patch
pata_sil680-suspend-resume.patch
pata_sil680-suspend-resume-tidy.patch
pata_it821x-suspend-resume-support.patch
pata_serverworks-suspend-resume.patch
pata_via-suspend-resume-support.patch
pata_amd-suspend-resume.patch
hpt36x-suspend-resume-support.patch
pata_hpt3x3-suspend-resume-support.patch
pata-more-drivers-that-need-only-standard-suspend-and.patch
pata_marvell-merge-mandriva-patches.patch
git-mtd.patch
git-netdev-all.patch
resend-iphase-64bit-cleanup.patch
pci-introduce-pci_find_present.patch
pci-fix-multiple-problems-with-via-hardware.patch
pci-fix-multiple-problems-with-via-hardware-warning-fix.patch
pci_module_init-convertion-in-tmscsimc.patch
x86_64-smpboot-remove-unused-variable.patch
alpha-switch-to-pci_get-api.patch
ioremap-balanced-with-iounmap-for-drivers-char-rio-rio_linuxc.patch
ioremap-balanced-with-iounmap-for-drivers-char-moxac.patch
ioremap-balanced-with-iounmap-for-drivers-char-istallionc.patch
ide-complete-switch-to-pci_get.patch
remove-drivers-pci-searchcpci_find_device_reverse.patch
via82cxxx-handle-error-condition-properly.patch
hz-300hz-support.patch
tty-signal-tty-locking.patch
tty-signal-tty-locking-3270-fix.patch
pci-mxser-pci-refcounts.patch
tty-preparatory-structures-for-termios-revamp.patch
tty-preparatory-structures-for-termios-revamp-strip-fix.patch
tty-switch-to-ktermios-and-new-framework.patch
tty-switch-to-ktermios-and-new-framework-warning-fix.patch
tty-switch-to-ktermios-and-new-framework-irda-fix.patch
tty-switch-to-ktermios.patch
tty-switch-to-ktermios-nozomi-fix.patch
tty-switch-to-ktermios-sclp-fix.patch
tty-switch-to-ktermios-powerpc-fix.patch
tty-switch-to-ktermios-uml-fix-2.patch
tty_ioctl-use-termios-for-the-old-structure-and-termios2.patch
tty_ioctl-use-termios-for-the-old-structure-and-termios2-fix.patch
tty_ioctl-use-termios-for-the-old-structure-and-termios2-update.patch
termios-enable-new-style-termios-ioctls-on-x86-64.patch
char-isicom-expand-function.patch
char-isicom-rename-init-function.patch
char-isicom-remove-isa-code.patch
char-isicom-remove-unneeded-memset.patch
char-isicom-move-to-tty_register_device.patch
char-isicom-use-pci_request_region.patch
char-isicom-check-kmalloc-retval.patch
drivers-isdn-trivial-vsnprintf-conversion.patch
ide-more-conversion-to-pci_get-apis.patch
igafb-switch-to-pci_get-api.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to