cs5530/sc1200: add PIO autotune fallback to ->ide_dma_check
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tue, 16 Oct 2007 20:29:54 +0000 (22:29 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tue, 16 Oct 2007 20:29:54 +0000 (22:29 +0200)
* Add PIO autotune fallback to ->ide_dma_check.

  Since cs5530/sc1200 allow separate PIO and DMA timings, and cs5530/sc1200
  always set ->autotune this change shouldn't have any other effect than
  bringing these drivers in-line with other host drivers wrt ->ide_dma_check
  implementations.

* Fix ->ide_dma_check to return "-1" if DMA cannot be set.

* Bump driver version.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/pci/cs5530.c
drivers/ide/pci/sc1200.c

index c972eb9bd4570221682ead55219db2da5474f593..1c82cd51f6d583584bde53c45244dd0cf9a71888 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/ide/pci/cs5530.c              Version 0.75    Aug 2 2007
+ * linux/drivers/ide/pci/cs5530.c              Version 0.76    Aug 3 2007
  *
  * Copyright (C) 2000                  Andre Hedrick <andre@linux-ide.org>
  * Copyright (C) 2000                  Mark Lord <mlord@pobox.com>
@@ -117,7 +117,9 @@ static int cs5530_config_dma(ide_drive_t *drive)
        if (ide_tune_dma(drive))
                return 0;
 
-       return 1;
+       ide_set_max_pio(drive);
+
+       return -1;
 }
 
 static void cs5530_set_dma_mode(ide_drive_t *drive, const u8 mode)
index 0a5669adaf5148e886880096e2125bab9e9d6af1..184249ed125bd773b14601b8535078a28925103a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/ide/pci/sc1200.c              Version 0.96    Aug 2 2007
+ * linux/drivers/ide/pci/sc1200.c              Version 0.97    Aug 3 2007
  *
  * Copyright (C) 2000-2002             Mark Lord <mlord@pobox.com>
  * Copyright (C)      2007             Bartlomiej Zolnierkiewicz
@@ -208,7 +208,9 @@ static int sc1200_config_dma (ide_drive_t *drive)
        if (ide_tune_dma(drive))
                return 0;
 
-       return 1;
+       ide_set_max_pio(drive);
+
+       return -1;
 }
 
 
This page took 0.036275 seconds and 5 git commands to generate.