diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-12-01 21:47:01 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-12-04 14:11:36 -0500 |
commit | 943547abdfe9b4e27e36a25987909619908dffbf (patch) | |
tree | 34cebd48e3b4e90fe3e6a6c6c03154ae1ed0c827 /drivers | |
parent | 6ba8695870a5a2ebf6f3d1ee3ac1e4d96d667cf6 (diff) |
pata_amd/pata_via: de-couple programming of PIO/MWDMA and UDMA timings
* Don't program UDMA timings when programming PIO or MWDMA modes.
This has also a nice side-effect of fixing regression added by commit
681c80b5d96076f447e8101ac4325c82d8dce508 ("libata: correct handling of
SRST reset sequences") (->set_piomode method for PIO0 is called before
->cable_detect method which checks UDMA timings to get the cable type).
* Bump driver version.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tested-by: "Thomas Lindroth" <thomas.lindroth@gmail.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ata/pata_amd.c | 5 | ||||
-rw-r--r-- | drivers/ata/pata_via.c | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c index c5779ad4abca..3cc27b514654 100644 --- a/drivers/ata/pata_amd.c +++ b/drivers/ata/pata_amd.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/libata.h> | 25 | #include <linux/libata.h> |
26 | 26 | ||
27 | #define DRV_NAME "pata_amd" | 27 | #define DRV_NAME "pata_amd" |
28 | #define DRV_VERSION "0.3.9" | 28 | #define DRV_VERSION "0.3.10" |
29 | 29 | ||
30 | /** | 30 | /** |
31 | * timing_setup - shared timing computation and load | 31 | * timing_setup - shared timing computation and load |
@@ -115,7 +115,8 @@ static void timing_setup(struct ata_port *ap, struct ata_device *adev, int offse | |||
115 | } | 115 | } |
116 | 116 | ||
117 | /* UDMA timing */ | 117 | /* UDMA timing */ |
118 | pci_write_config_byte(pdev, offset + 0x10 + (3 - dn), t); | 118 | if (at.udma) |
119 | pci_write_config_byte(pdev, offset + 0x10 + (3 - dn), t); | ||
119 | } | 120 | } |
120 | 121 | ||
121 | /** | 122 | /** |
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index a4175fbdd170..453d72bf2598 100644 --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c | |||
@@ -63,7 +63,7 @@ | |||
63 | #include <linux/dmi.h> | 63 | #include <linux/dmi.h> |
64 | 64 | ||
65 | #define DRV_NAME "pata_via" | 65 | #define DRV_NAME "pata_via" |
66 | #define DRV_VERSION "0.3.2" | 66 | #define DRV_VERSION "0.3.3" |
67 | 67 | ||
68 | /* | 68 | /* |
69 | * The following comes directly from Vojtech Pavlik's ide/pci/via82cxxx | 69 | * The following comes directly from Vojtech Pavlik's ide/pci/via82cxxx |
@@ -296,7 +296,7 @@ static void via_do_set_mode(struct ata_port *ap, struct ata_device *adev, int mo | |||
296 | } | 296 | } |
297 | 297 | ||
298 | /* Set UDMA unless device is not UDMA capable */ | 298 | /* Set UDMA unless device is not UDMA capable */ |
299 | if (udma_type) { | 299 | if (udma_type && t.udma) { |
300 | u8 cable80_status; | 300 | u8 cable80_status; |
301 | 301 | ||
302 | /* Get 80-wire cable detection bit */ | 302 | /* Get 80-wire cable detection bit */ |