diff options
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/cy82c693.c | 6 | ||||
-rw-r--r-- | drivers/ide/icside.c | 2 | ||||
-rw-r--r-- | drivers/ide/piix.c | 18 | ||||
-rw-r--r-- | drivers/ide/triflex.c | 16 |
4 files changed, 29 insertions, 13 deletions
diff --git a/drivers/ide/cy82c693.c b/drivers/ide/cy82c693.c index 67cbcfa35122..847553fd8b96 100644 --- a/drivers/ide/cy82c693.c +++ b/drivers/ide/cy82c693.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 1998-2000 Andreas S. Krebs (akrebs@altavista.net), Maintainer | 2 | * Copyright (C) 1998-2000 Andreas S. Krebs (akrebs@altavista.net), Maintainer |
3 | * Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org>, Integrator | 3 | * Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org>, Integrator |
4 | * Copyright (C) 2007-2010 Bartlomiej Zolnierkiewicz | 4 | * Copyright (C) 2007-2011 Bartlomiej Zolnierkiewicz |
5 | * | 5 | * |
6 | * CYPRESS CY82C693 chipset IDE controller | 6 | * CYPRESS CY82C693 chipset IDE controller |
7 | * | 7 | * |
@@ -90,7 +90,7 @@ static void cy82c693_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) | |||
90 | u8 time_16, time_8; | 90 | u8 time_16, time_8; |
91 | 91 | ||
92 | /* select primary or secondary channel */ | 92 | /* select primary or secondary channel */ |
93 | if (hwif->index > 0) { /* drive is on the secondary channel */ | 93 | if (drive->dn > 1) { /* drive is on the secondary channel */ |
94 | dev = pci_get_slot(dev->bus, dev->devfn+1); | 94 | dev = pci_get_slot(dev->bus, dev->devfn+1); |
95 | if (!dev) { | 95 | if (!dev) { |
96 | printk(KERN_ERR "%s: tune_drive: " | 96 | printk(KERN_ERR "%s: tune_drive: " |
@@ -141,7 +141,7 @@ static void cy82c693_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) | |||
141 | pci_write_config_byte(dev, CY82_IDE_SLAVE_IOW, time_16); | 141 | pci_write_config_byte(dev, CY82_IDE_SLAVE_IOW, time_16); |
142 | pci_write_config_byte(dev, CY82_IDE_SLAVE_8BIT, time_8); | 142 | pci_write_config_byte(dev, CY82_IDE_SLAVE_8BIT, time_8); |
143 | } | 143 | } |
144 | if (hwif->index > 0) | 144 | if (drive->dn > 1) |
145 | pci_dev_put(dev); | 145 | pci_dev_put(dev); |
146 | } | 146 | } |
147 | 147 | ||
diff --git a/drivers/ide/icside.c b/drivers/ide/icside.c index 4a697a238e28..8716066a2f2b 100644 --- a/drivers/ide/icside.c +++ b/drivers/ide/icside.c | |||
@@ -521,8 +521,8 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec) | |||
521 | if (ec->dma != NO_DMA && !request_dma(ec->dma, DRV_NAME)) { | 521 | if (ec->dma != NO_DMA && !request_dma(ec->dma, DRV_NAME)) { |
522 | d.init_dma = icside_dma_init; | 522 | d.init_dma = icside_dma_init; |
523 | d.port_ops = &icside_v6_port_ops; | 523 | d.port_ops = &icside_v6_port_ops; |
524 | } else | ||
524 | d.dma_ops = NULL; | 525 | d.dma_ops = NULL; |
525 | } | ||
526 | 526 | ||
527 | ret = ide_host_register(host, &d, hws); | 527 | ret = ide_host_register(host, &d, hws); |
528 | if (ret) | 528 | if (ret) |
diff --git a/drivers/ide/piix.c b/drivers/ide/piix.c index b59d04c72051..1892e81fb00f 100644 --- a/drivers/ide/piix.c +++ b/drivers/ide/piix.c | |||
@@ -331,7 +331,7 @@ static const struct ide_port_ops ich_port_ops = { | |||
331 | .udma_mask = udma, \ | 331 | .udma_mask = udma, \ |
332 | } | 332 | } |
333 | 333 | ||
334 | #define DECLARE_ICH_DEV(udma) \ | 334 | #define DECLARE_ICH_DEV(mwdma, udma) \ |
335 | { \ | 335 | { \ |
336 | .name = DRV_NAME, \ | 336 | .name = DRV_NAME, \ |
337 | .init_chipset = init_chipset_ich, \ | 337 | .init_chipset = init_chipset_ich, \ |
@@ -340,7 +340,7 @@ static const struct ide_port_ops ich_port_ops = { | |||
340 | .port_ops = &ich_port_ops, \ | 340 | .port_ops = &ich_port_ops, \ |
341 | .pio_mask = ATA_PIO4, \ | 341 | .pio_mask = ATA_PIO4, \ |
342 | .swdma_mask = ATA_SWDMA2_ONLY, \ | 342 | .swdma_mask = ATA_SWDMA2_ONLY, \ |
343 | .mwdma_mask = ATA_MWDMA12_ONLY, \ | 343 | .mwdma_mask = mwdma, \ |
344 | .udma_mask = udma, \ | 344 | .udma_mask = udma, \ |
345 | } | 345 | } |
346 | 346 | ||
@@ -362,13 +362,15 @@ static const struct ide_port_info piix_pci_info[] __devinitdata = { | |||
362 | /* 2: PIIX4 */ | 362 | /* 2: PIIX4 */ |
363 | DECLARE_PIIX_DEV(ATA_UDMA2), | 363 | DECLARE_PIIX_DEV(ATA_UDMA2), |
364 | /* 3: ICH0 */ | 364 | /* 3: ICH0 */ |
365 | DECLARE_ICH_DEV(ATA_UDMA2), | 365 | DECLARE_ICH_DEV(ATA_MWDMA12_ONLY, ATA_UDMA2), |
366 | /* 4: ICH */ | 366 | /* 4: ICH */ |
367 | DECLARE_ICH_DEV(ATA_UDMA4), | 367 | DECLARE_ICH_DEV(ATA_MWDMA12_ONLY, ATA_UDMA4), |
368 | /* 5: PIIX4 */ | 368 | /* 5: PIIX4 */ |
369 | DECLARE_PIIX_DEV(ATA_UDMA4), | 369 | DECLARE_PIIX_DEV(ATA_UDMA4), |
370 | /* 6: ICH[2-7]/ICH[2-3]M/C-ICH/ICH5-SATA/ESB2/ICH8M */ | 370 | /* 6: ICH[2-6]/ICH[2-3]M/C-ICH/ICH5-SATA/ESB2/ICH8M */ |
371 | DECLARE_ICH_DEV(ATA_UDMA5), | 371 | DECLARE_ICH_DEV(ATA_MWDMA12_ONLY, ATA_UDMA5), |
372 | /* 7: ICH7/7-R, no MWDMA1 */ | ||
373 | DECLARE_ICH_DEV(ATA_MWDMA2_ONLY, ATA_UDMA5), | ||
372 | }; | 374 | }; |
373 | 375 | ||
374 | /** | 376 | /** |
@@ -438,9 +440,9 @@ static const struct pci_device_id piix_pci_tbl[] = { | |||
438 | #endif | 440 | #endif |
439 | { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ESB_2), 6 }, | 441 | { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ESB_2), 6 }, |
440 | { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ICH6_19), 6 }, | 442 | { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ICH6_19), 6 }, |
441 | { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ICH7_21), 6 }, | 443 | { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ICH7_21), 7 }, |
442 | { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82801DB_1), 6 }, | 444 | { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82801DB_1), 6 }, |
443 | { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ESB2_18), 6 }, | 445 | { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ESB2_18), 7 }, |
444 | { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ICH8_6), 6 }, | 446 | { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ICH8_6), 6 }, |
445 | { 0, }, | 447 | { 0, }, |
446 | }; | 448 | }; |
diff --git a/drivers/ide/triflex.c b/drivers/ide/triflex.c index e53a1b78378b..281c91426345 100644 --- a/drivers/ide/triflex.c +++ b/drivers/ide/triflex.c | |||
@@ -113,12 +113,26 @@ static const struct pci_device_id triflex_pci_tbl[] = { | |||
113 | }; | 113 | }; |
114 | MODULE_DEVICE_TABLE(pci, triflex_pci_tbl); | 114 | MODULE_DEVICE_TABLE(pci, triflex_pci_tbl); |
115 | 115 | ||
116 | #ifdef CONFIG_PM | ||
117 | static int triflex_ide_pci_suspend(struct pci_dev *dev, pm_message_t state) | ||
118 | { | ||
119 | /* | ||
120 | * We must not disable or powerdown the device. | ||
121 | * APM bios refuses to suspend if IDE is not accessible. | ||
122 | */ | ||
123 | pci_save_state(dev); | ||
124 | return 0; | ||
125 | } | ||
126 | #else | ||
127 | #define triflex_ide_pci_suspend NULL | ||
128 | #endif | ||
129 | |||
116 | static struct pci_driver triflex_pci_driver = { | 130 | static struct pci_driver triflex_pci_driver = { |
117 | .name = "TRIFLEX_IDE", | 131 | .name = "TRIFLEX_IDE", |
118 | .id_table = triflex_pci_tbl, | 132 | .id_table = triflex_pci_tbl, |
119 | .probe = triflex_init_one, | 133 | .probe = triflex_init_one, |
120 | .remove = ide_pci_remove, | 134 | .remove = ide_pci_remove, |
121 | .suspend = ide_pci_suspend, | 135 | .suspend = triflex_ide_pci_suspend, |
122 | .resume = ide_pci_resume, | 136 | .resume = ide_pci_resume, |
123 | }; | 137 | }; |
124 | 138 | ||