and changed files
[powerpc.git] / drivers / ata / pata_triflex.c
index a142971..349887b 100644 (file)
 #include <linux/libata.h>
 
 #define DRV_NAME "pata_triflex"
-#define DRV_VERSION "0.2.7"
+#define DRV_VERSION "0.2.8"
 
 /**
  *     triflex_prereset                -       probe begin
  *     @ap: ATA port
+ *     @deadline: deadline jiffies for the operation
  *
  *     Set up cable type and use generic probe init
  */
 
-static int triflex_prereset(struct ata_port *ap)
+static int triflex_prereset(struct ata_port *ap, unsigned long deadline)
 {
        static const struct pci_bits triflex_enable_bits[] = {
                { 0x80, 1, 0x01, 0x01 },
@@ -63,8 +64,8 @@ static int triflex_prereset(struct ata_port *ap)
 
        if (!pci_test_config_bits(pdev, &triflex_enable_bits[ap->port_no]))
                return -ENOENT;
-       ap->cbl = ATA_CBL_PATA40;
-       return ata_std_prereset(ap);
+
+       return ata_std_prereset(ap, deadline);
 }
 
 
@@ -193,8 +194,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 = {
@@ -212,6 +215,7 @@ static struct ata_port_operations triflex_port_ops = {
        .thaw           = ata_bmdma_thaw,
        .error_handler  = triflex_error_handler,
        .post_internal_cmd = ata_bmdma_post_internal_cmd,
+       .cable_detect   = ata_cable_40wire,
 
        .bmdma_setup    = ata_bmdma_setup,
        .bmdma_start    = triflex_bmdma_start,
@@ -221,14 +225,14 @@ static struct ata_port_operations triflex_port_ops = {
        .qc_prep        = ata_qc_prep,
        .qc_issue       = ata_qc_issue_prot,
 
-       .data_xfer      = ata_pio_data_xfer,
+       .data_xfer      = ata_data_xfer,
 
        .irq_handler    = ata_interrupt,
        .irq_clear      = ata_bmdma_irq_clear,
+       .irq_on         = ata_irq_on,
+       .irq_ack        = ata_irq_ack,
 
        .port_start     = ata_port_start,
-       .port_stop      = ata_port_stop,
-       .host_stop      = ata_host_stop
 };
 
 static int triflex_init_one(struct pci_dev *dev, const struct pci_device_id *id)
@@ -260,8 +264,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)