aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_hpt366.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/pata_hpt366.c')
-rw-r--r--drivers/ata/pata_hpt366.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/ata/pata_hpt366.c b/drivers/ata/pata_hpt366.c
index 0bd48e8f21bd..f6b285890ae9 100644
--- a/drivers/ata/pata_hpt366.c
+++ b/drivers/ata/pata_hpt366.c
@@ -27,7 +27,7 @@
27#include <linux/libata.h> 27#include <linux/libata.h>
28 28
29#define DRV_NAME "pata_hpt366" 29#define DRV_NAME "pata_hpt366"
30#define DRV_VERSION "0.6.7" 30#define DRV_VERSION "0.6.8"
31 31
32struct hpt_clock { 32struct hpt_clock {
33 u8 xfer_mode; 33 u8 xfer_mode;
@@ -207,17 +207,8 @@ static void hpt366_set_mode(struct ata_port *ap, struct ata_device *adev,
207{ 207{
208 struct hpt_clock *clocks = ap->host->private_data; 208 struct hpt_clock *clocks = ap->host->private_data;
209 struct pci_dev *pdev = to_pci_dev(ap->host->dev); 209 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
210 u32 addr1 = 0x40 + 4 * (adev->devno + 2 * ap->port_no); 210 u32 addr = 0x40 + 4 * adev->devno;
211 u32 addr2 = 0x51 + 4 * ap->port_no;
212 u32 mask, reg; 211 u32 mask, reg;
213 u8 fast;
214
215 /* Fast interrupt prediction disable, hold off interrupt disable */
216 pci_read_config_byte(pdev, addr2, &fast);
217 if (fast & 0x80) {
218 fast &= ~0x80;
219 pci_write_config_byte(pdev, addr2, fast);
220 }
221 212
222 /* determine timing mask and find matching clock entry */ 213 /* determine timing mask and find matching clock entry */
223 if (mode < XFER_MW_DMA_0) 214 if (mode < XFER_MW_DMA_0)
@@ -240,9 +231,9 @@ static void hpt366_set_mode(struct ata_port *ap, struct ata_device *adev,
240 * on-chip PIO FIFO/buffer (and PIO MST mode as well) to avoid 231 * on-chip PIO FIFO/buffer (and PIO MST mode as well) to avoid
241 * problems handling I/O errors later. 232 * problems handling I/O errors later.
242 */ 233 */
243 pci_read_config_dword(pdev, addr1, &reg); 234 pci_read_config_dword(pdev, addr, &reg);
244 reg = ((reg & ~mask) | (clocks->timing & mask)) & ~0xc0000000; 235 reg = ((reg & ~mask) | (clocks->timing & mask)) & ~0xc0000000;
245 pci_write_config_dword(pdev, addr1, reg); 236 pci_write_config_dword(pdev, addr, reg);
246} 237}
247 238
248/** 239/**