]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ata/pata_jmicron.c
[BNX2]: Fix default WoL setting.
[linux-2.6-omap-h63xx.git] / drivers / ata / pata_jmicron.c
index 033319e8b6cf867433bf1fb15d2bc28c2ddb3cf7..4d67f238eee25ddf5f0e6ee917f7b8b0141de9b3 100644 (file)
@@ -19,7 +19,7 @@
 #include <linux/ata.h>
 
 #define DRV_NAME       "pata_jmicron"
-#define DRV_VERSION    "0.1.4"
+#define DRV_VERSION    "0.1.5"
 
 typedef enum {
        PORT_PATA0 = 0,
@@ -30,16 +30,17 @@ typedef enum {
 /**
  *     jmicron_pre_reset       -       check for 40/80 pin
  *     @ap: Port
+ *     @deadline: deadline jiffies for the operation
  *
  *     Perform the PATA port setup we need.
-
+ *
  *     On the Jmicron 361/363 there is a single PATA port that can be mapped
  *     either as primary or secondary (or neither). We don't do any policy
  *     and setup here. We assume that has been done by init_one and the
  *     BIOS.
  */
 
-static int jmicron_pre_reset(struct ata_port *ap)
+static int jmicron_pre_reset(struct ata_port *ap, unsigned long deadline)
 {
        struct pci_dev *pdev = to_pci_dev(ap->host->dev);
        u32 control;
@@ -102,7 +103,7 @@ static int jmicron_pre_reset(struct ata_port *ap)
                ap->cbl = ATA_CBL_SATA;
                break;
        }
-       return ata_std_prereset(ap);
+       return ata_std_prereset(ap, deadline);
 }
 
 /**
@@ -137,10 +138,6 @@ 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 = {
@@ -194,19 +191,19 @@ static const struct ata_port_operations jmicron_ops = {
 
 static int jmicron_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
 {
-       static struct ata_port_info info = {
+       static const struct ata_port_info info = {
                .sht            = &jmicron_sht,
-               .flags  = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+               .flags  = ATA_FLAG_SLAVE_POSS,
 
                .pio_mask       = 0x1f,
                .mwdma_mask     = 0x07,
-               .udma_mask      = 0x3f,
+               .udma_mask      = ATA_UDMA5,
 
                .port_ops       = &jmicron_ops,
        };
-       struct ata_port_info *port_info[2] = { &info, &info };
+       const struct ata_port_info *ppi[] = { &info, NULL };
 
-       return ata_pci_init_one(pdev, port_info, 2);
+       return ata_pci_init_one(pdev, ppi);
 }
 
 static const struct pci_device_id jmicron_pci_tbl[] = {
@@ -244,7 +241,6 @@ static void __exit jmicron_exit(void)
 {
        pci_unregister_driver(&jmicron_pci_driver);
 }
-#endif
 
 module_init(jmicron_init);
 module_exit(jmicron_exit);