libata: add deadline support to prereset and reset methods
[powerpc.git] / drivers / ata / pata_oldpiix.c
index da68cd1..4d75d32 100644 (file)
 #include <linux/ata.h>
 
 #define DRV_NAME       "pata_oldpiix"
-#define DRV_VERSION    "0.5.4"
+#define DRV_VERSION    "0.5.5"
 
 /**
  *     oldpiix_pre_reset               -       probe begin
  *     @ap: ATA port
+ *     @deadline: deadline jiffies for the operation
  *
  *     Set up cable type and use generic probe init
  */
 
-static int oldpiix_pre_reset(struct ata_port *ap)
+static int oldpiix_pre_reset(struct ata_port *ap, unsigned long deadline)
 {
        struct pci_dev *pdev = to_pci_dev(ap->host->dev);
        static const struct pci_bits oldpiix_enable_bits[] = {
@@ -44,8 +45,8 @@ static int oldpiix_pre_reset(struct ata_port *ap)
 
        if (!pci_test_config_bits(pdev, &oldpiix_enable_bits[ap->port_no]))
                return -ENOENT;
-       ap->cbl = ATA_CBL_PATA40;
-       return ata_std_prereset(ap);
+
+       return ata_std_prereset(ap, deadline);
 }
 
 /**
@@ -65,7 +66,7 @@ static void oldpiix_pata_error_handler(struct ata_port *ap)
 /**
  *     oldpiix_set_piomode - Initialize host controller PATA PIO timings
  *     @ap: Port whose timings we are configuring
- *     @adev: um
+ *     @adev: Device whose timings we are configuring
  *
  *     Set PIO mode for device, in host controller PCI config space.
  *
@@ -255,6 +256,7 @@ static const struct ata_port_operations oldpiix_pata_ops = {
        .thaw                   = ata_bmdma_thaw,
        .error_handler          = oldpiix_pata_error_handler,
        .post_internal_cmd      = ata_bmdma_post_internal_cmd,
+       .cable_detect           = ata_cable_40wire,
 
        .bmdma_setup            = ata_bmdma_setup,
        .bmdma_start            = ata_bmdma_start,