diff options
Diffstat (limited to 'drivers/ata/pata_hpt366.c')
-rw-r--r-- | drivers/ata/pata_hpt366.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/drivers/ata/pata_hpt366.c b/drivers/ata/pata_hpt366.c index 0bd48e8f21bd..af49bfb57247 100644 --- a/drivers/ata/pata_hpt366.c +++ b/drivers/ata/pata_hpt366.c | |||
@@ -11,9 +11,7 @@ | |||
11 | * | 11 | * |
12 | * | 12 | * |
13 | * TODO | 13 | * TODO |
14 | * Maybe PLL mode | 14 | * Look into engine reset on timeout errors. Should not be required. |
15 | * Look into engine reset on timeout errors. Should not be | ||
16 | * required. | ||
17 | */ | 15 | */ |
18 | 16 | ||
19 | 17 | ||
@@ -27,7 +25,7 @@ | |||
27 | #include <linux/libata.h> | 25 | #include <linux/libata.h> |
28 | 26 | ||
29 | #define DRV_NAME "pata_hpt366" | 27 | #define DRV_NAME "pata_hpt366" |
30 | #define DRV_VERSION "0.6.7" | 28 | #define DRV_VERSION "0.6.8" |
31 | 29 | ||
32 | struct hpt_clock { | 30 | struct hpt_clock { |
33 | u8 xfer_mode; | 31 | u8 xfer_mode; |
@@ -207,17 +205,8 @@ static void hpt366_set_mode(struct ata_port *ap, struct ata_device *adev, | |||
207 | { | 205 | { |
208 | struct hpt_clock *clocks = ap->host->private_data; | 206 | struct hpt_clock *clocks = ap->host->private_data; |
209 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); | 207 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); |
210 | u32 addr1 = 0x40 + 4 * (adev->devno + 2 * ap->port_no); | 208 | u32 addr = 0x40 + 4 * adev->devno; |
211 | u32 addr2 = 0x51 + 4 * ap->port_no; | ||
212 | u32 mask, reg; | 209 | 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 | 210 | ||
222 | /* determine timing mask and find matching clock entry */ | 211 | /* determine timing mask and find matching clock entry */ |
223 | if (mode < XFER_MW_DMA_0) | 212 | if (mode < XFER_MW_DMA_0) |
@@ -240,9 +229,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 | 229 | * on-chip PIO FIFO/buffer (and PIO MST mode as well) to avoid |
241 | * problems handling I/O errors later. | 230 | * problems handling I/O errors later. |
242 | */ | 231 | */ |
243 | pci_read_config_dword(pdev, addr1, ®); | 232 | pci_read_config_dword(pdev, addr, ®); |
244 | reg = ((reg & ~mask) | (clocks->timing & mask)) & ~0xc0000000; | 233 | reg = ((reg & ~mask) | (clocks->timing & mask)) & ~0xc0000000; |
245 | pci_write_config_dword(pdev, addr1, reg); | 234 | pci_write_config_dword(pdev, addr, reg); |
246 | } | 235 | } |
247 | 236 | ||
248 | /** | 237 | /** |
@@ -372,7 +361,7 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
372 | break; | 361 | break; |
373 | } | 362 | } |
374 | /* Now kick off ATA set up */ | 363 | /* Now kick off ATA set up */ |
375 | return ata_pci_sff_init_one(dev, ppi, &hpt36x_sht, hpriv); | 364 | return ata_pci_sff_init_one(dev, ppi, &hpt36x_sht, hpriv, 0); |
376 | } | 365 | } |
377 | 366 | ||
378 | #ifdef CONFIG_PM | 367 | #ifdef CONFIG_PM |