libata-sff: ap->[last_]ctl are SFF specific
[safe/jmp/linux-2.6] / drivers / ata / pata_hpt3x3.c
index 1c9016e..727a81c 100644 (file)
@@ -96,7 +96,7 @@ static void hpt3x3_set_dmamode(struct ata_port *ap, struct ata_device *adev)
  *     writing to the control register or the chip will hang
  */
 
-static int hpt3x3_freeze(struct ata_port *ap)
+static void hpt3x3_freeze(struct ata_port *ap)
 {
        void __iomem *mmio = ap->ioaddr.bmdma_addr;
 
@@ -180,7 +180,7 @@ static void hpt3x3_init_chipset(struct pci_dev *dev)
  *     @id: Entry in match table
  *
  *     Perform basic initialisation. We set the device up so we access all
- *     ports via BAR4. This is neccessary to work around errata.
+ *     ports via BAR4. This is necessary to work around errata.
  */
 
 static int hpt3x3_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
@@ -188,11 +188,11 @@ static int hpt3x3_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
        static int printed_version;
        static const struct ata_port_info info = {
                .flags = ATA_FLAG_SLAVE_POSS,
-               .pio_mask = 0x1f,
+               .pio_mask = ATA_PIO4,
 #if defined(CONFIG_PATA_HPT3X3_DMA)
                /* Further debug needed */
-               .mwdma_mask = 0x07,
-               .udma_mask = 0x07,
+               .mwdma_mask = ATA_MWDMA2,
+               .udma_mask = ATA_UDMA2,
 #endif
                .port_ops = &hpt3x3_port_ops
        };
@@ -255,8 +255,17 @@ static int hpt3x3_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 #ifdef CONFIG_PM
 static int hpt3x3_reinit_one(struct pci_dev *dev)
 {
+       struct ata_host *host = dev_get_drvdata(&dev->dev);
+       int rc;
+
+       rc = ata_pci_device_do_resume(dev);
+       if (rc)
+               return rc;
+
        hpt3x3_init_chipset(dev);
-       return ata_pci_device_resume(dev);
+
+       ata_host_resume(host);
+       return 0;
 }
 #endif
 
@@ -296,4 +305,4 @@ MODULE_DEVICE_TABLE(pci, hpt3x3);
 MODULE_VERSION(DRV_VERSION);
 
 module_init(hpt3x3_init);
-module_exit(hpt3x3_exit);
\ No newline at end of file
+module_exit(hpt3x3_exit);