[PATCH 7/11] cs5530/sc1200: add PIO autotune fallback to ->ide_dma_check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* 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@xxxxxxxxx>
---
 drivers/ide/pci/cs5530.c |    6 ++++--
 drivers/ide/pci/sc1200.c |    6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

Index: b/drivers/ide/pci/cs5530.c
===================================================================
--- a/drivers/ide/pci/cs5530.c
+++ b/drivers/ide/pci/cs5530.c
@@ -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@xxxxxxxxxxxxx>
  * Copyright (C) 2000			Mark Lord <mlord@xxxxxxxxx>
@@ -117,7 +117,9 @@ static int cs5530_config_dma(ide_drive_t
 	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: b/drivers/ide/pci/sc1200.c
===================================================================
--- a/drivers/ide/pci/sc1200.c
+++ b/drivers/ide/pci/sc1200.c
@@ -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@xxxxxxxxx>
  * Copyright (C)      2007		Bartlomiej Zolnierkiewicz
@@ -208,7 +208,9 @@ static int sc1200_config_dma (ide_drive_
 	if (ide_tune_dma(drive))
 		return 0;
 
-	return 1;
+	ide_set_max_pio(drive);
+
+	return -1;
 }
 
 
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux