diff options
Diffstat (limited to 'drivers/ide/pci/pdc202xx_old.c')
-rw-r--r-- | drivers/ide/pci/pdc202xx_old.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c index de9a27400462..cb6d2a00c514 100644 --- a/drivers/ide/pci/pdc202xx_old.c +++ b/drivers/ide/pci/pdc202xx_old.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
15 | #include <linux/blkdev.h> | 15 | #include <linux/blkdev.h> |
16 | #include <linux/hdreg.h> | ||
17 | #include <linux/pci.h> | 16 | #include <linux/pci.h> |
18 | #include <linux/init.h> | 17 | #include <linux/init.h> |
19 | #include <linux/ide.h> | 18 | #include <linux/ide.h> |
@@ -86,7 +85,7 @@ static void pdc202xx_set_mode(ide_drive_t *drive, const u8 speed) | |||
86 | * Prefetch_EN / IORDY_EN / PA[3:0] bits of register A | 85 | * Prefetch_EN / IORDY_EN / PA[3:0] bits of register A |
87 | */ | 86 | */ |
88 | AP &= ~0x3f; | 87 | AP &= ~0x3f; |
89 | if (drive->id->capability & 4) | 88 | if (ata_id_iordy_disable(drive->id)) |
90 | AP |= 0x20; /* set IORDY_EN bit */ | 89 | AP |= 0x20; /* set IORDY_EN bit */ |
91 | if (drive->media == ide_disk) | 90 | if (drive->media == ide_disk) |
92 | AP |= 0x10; /* set Prefetch_EN bit */ | 91 | AP |= 0x10; /* set Prefetch_EN bit */ |
@@ -154,10 +153,10 @@ static void pdc_old_disable_66MHz_clock(ide_hwif_t *hwif) | |||
154 | 153 | ||
155 | static void pdc202xx_quirkproc(ide_drive_t *drive) | 154 | static void pdc202xx_quirkproc(ide_drive_t *drive) |
156 | { | 155 | { |
157 | const char **list, *model = drive->id->model; | 156 | const char **list, *m = (char *)&drive->id[ATA_ID_PROD]; |
158 | 157 | ||
159 | for (list = pdc_quirk_drives; *list != NULL; list++) | 158 | for (list = pdc_quirk_drives; *list != NULL; list++) |
160 | if (strstr(model, *list) != NULL) { | 159 | if (strstr(m, *list) != NULL) { |
161 | drive->quirk_list = 2; | 160 | drive->quirk_list = 2; |
162 | return; | 161 | return; |
163 | } | 162 | } |
@@ -265,7 +264,7 @@ static void pdc202xx_dma_timeout(ide_drive_t *drive) | |||
265 | ide_dma_timeout(drive); | 264 | ide_dma_timeout(drive); |
266 | } | 265 | } |
267 | 266 | ||
268 | static unsigned int __devinit init_chipset_pdc202xx(struct pci_dev *dev) | 267 | static unsigned int init_chipset_pdc202xx(struct pci_dev *dev) |
269 | { | 268 | { |
270 | unsigned long dmabase = pci_resource_start(dev, 4); | 269 | unsigned long dmabase = pci_resource_start(dev, 4); |
271 | u8 udma_speed_flag = 0, primary_mode = 0, secondary_mode = 0; | 270 | u8 udma_speed_flag = 0, primary_mode = 0, secondary_mode = 0; |
@@ -432,6 +431,8 @@ static struct pci_driver driver = { | |||
432 | .id_table = pdc202xx_pci_tbl, | 431 | .id_table = pdc202xx_pci_tbl, |
433 | .probe = pdc202xx_init_one, | 432 | .probe = pdc202xx_init_one, |
434 | .remove = ide_pci_remove, | 433 | .remove = ide_pci_remove, |
434 | .suspend = ide_pci_suspend, | ||
435 | .resume = ide_pci_resume, | ||
435 | }; | 436 | }; |
436 | 437 | ||
437 | static int __init pdc202xx_ide_init(void) | 438 | static int __init pdc202xx_ide_init(void) |