diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2009-06-01 15:42:10 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2009-06-05 14:40:52 -0400 |
commit | 5f33b3bcd7aac66a51e6bfaf35e8cff4eabafb06 (patch) | |
tree | e7fb3ad1f7b3b185d48fb153df44806e6c637cb2 | |
parent | 45bc955bb1324a46c9539550cc615994e6d0a43d (diff) |
pata_efar: fix PIO2 underclocking
Fix the PIO mode 2 using mode 0 timings -- this driver should enable the
fast timing bank starting with PIO2, just like the PIIX/ICH drivers do.
Also, fix/rephrase some comments while at it.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
-rw-r--r-- | drivers/ata/pata_efar.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/ata/pata_efar.c b/drivers/ata/pata_efar.c index 2085e0a3a05a..2a6412f5d117 100644 --- a/drivers/ata/pata_efar.c +++ b/drivers/ata/pata_efar.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <linux/ata.h> | 22 | #include <linux/ata.h> |
23 | 23 | ||
24 | #define DRV_NAME "pata_efar" | 24 | #define DRV_NAME "pata_efar" |
25 | #define DRV_VERSION "0.4.4" | 25 | #define DRV_VERSION "0.4.5" |
26 | 26 | ||
27 | /** | 27 | /** |
28 | * efar_pre_reset - Enable bits | 28 | * efar_pre_reset - Enable bits |
@@ -98,18 +98,17 @@ static void efar_set_piomode (struct ata_port *ap, struct ata_device *adev) | |||
98 | { 2, 1 }, | 98 | { 2, 1 }, |
99 | { 2, 3 }, }; | 99 | { 2, 3 }, }; |
100 | 100 | ||
101 | if (pio > 2) | 101 | if (pio > 1) |
102 | control |= 1; /* TIME1 enable */ | 102 | control |= 1; /* TIME */ |
103 | if (ata_pio_need_iordy(adev)) /* PIO 3/4 require IORDY */ | 103 | if (ata_pio_need_iordy(adev)) /* PIO 3/4 require IORDY */ |
104 | control |= 2; /* IE enable */ | 104 | control |= 2; /* IE */ |
105 | /* Intel specifies that the PPE functionality is for disk only */ | 105 | /* Intel specifies that the prefetch/posting is for disk only */ |
106 | if (adev->class == ATA_DEV_ATA) | 106 | if (adev->class == ATA_DEV_ATA) |
107 | control |= 4; /* PPE enable */ | 107 | control |= 4; /* PPE */ |
108 | 108 | ||
109 | pci_read_config_word(dev, idetm_port, &idetm_data); | 109 | pci_read_config_word(dev, idetm_port, &idetm_data); |
110 | 110 | ||
111 | /* Enable PPE, IE and TIME as appropriate */ | 111 | /* Set PPE, IE, and TIME as appropriate */ |
112 | |||
113 | if (adev->devno == 0) { | 112 | if (adev->devno == 0) { |
114 | idetm_data &= 0xCCF0; | 113 | idetm_data &= 0xCCF0; |
115 | idetm_data |= control; | 114 | idetm_data |= control; |
@@ -129,7 +128,7 @@ static void efar_set_piomode (struct ata_port *ap, struct ata_device *adev) | |||
129 | pci_write_config_byte(dev, 0x44, slave_data); | 128 | pci_write_config_byte(dev, 0x44, slave_data); |
130 | } | 129 | } |
131 | 130 | ||
132 | idetm_data |= 0x4000; /* Ensure SITRE is enabled */ | 131 | idetm_data |= 0x4000; /* Ensure SITRE is set */ |
133 | pci_write_config_word(dev, idetm_port, idetm_data); | 132 | pci_write_config_word(dev, idetm_port, idetm_data); |
134 | } | 133 | } |
135 | 134 | ||