diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-13 17:15:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-13 17:15:06 -0400 |
commit | 7591103c08abade60aeddb432ed0686ddd0de1c6 (patch) | |
tree | 523343b43b0c420666da18c64e1e9f21ff63dea5 /drivers/ide/pci/sc1200.c | |
parent | 2be4ff2f084842839b041b793ed6237e8d1d315a (diff) | |
parent | 9c6102d446985bca9c426cb2d9b478ed21d2b024 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (66 commits)
ata: Add documentation for hard disk shock protection interface (v3)
ide: Implement disk shock protection support (v4)
ide-cd: fix printk format warning
piix: add Hercules EC-900 mini-notebook to ich_laptop short cable list
ide-atapi: assign taskfile flags per device type
ide-cd: move cdrom_info.dma to ide_drive_t.dma
ide: add ide_drive_t.dma flag
ide-cd: add a debug_mask module parameter
ide-cd: convert driver to new ide debugging macro (v3)
ide: move SFF DMA code to ide-dma-sff.c
ide: cleanup ide-dma.c
ide: cleanup ide_build_dmatable()
ide: remove needless includes from ide-dma.c
ide: switch to DMA-mapping API part #2
ide: make ide_dma_timeout() available also for CONFIG_BLK_DEV_IDEDMA_SFF=n
ide: make ide_dma_lost_irq() available also for CONFIG_BLK_DEV_IDEDMA_SFF=n
ide: __ide_dma_end() -> ide_dma_end()
pmac: remove needless pmac_ide_destroy_dmatable() wrapper
pmac: remove superfluous pmif == NULL checks
ide: Two fixes regarding memory allocation
...
Diffstat (limited to 'drivers/ide/pci/sc1200.c')
-rw-r--r-- | drivers/ide/pci/sc1200.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c index bdc1fed41260..f1a8758e3a99 100644 --- a/drivers/ide/pci/sc1200.c +++ b/drivers/ide/pci/sc1200.c | |||
@@ -126,7 +126,6 @@ static void sc1200_set_dma_mode(ide_drive_t *drive, const u8 mode) | |||
126 | { | 126 | { |
127 | ide_hwif_t *hwif = HWIF(drive); | 127 | ide_hwif_t *hwif = HWIF(drive); |
128 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 128 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
129 | int unit = drive->select.b.unit; | ||
130 | unsigned int reg, timings; | 129 | unsigned int reg, timings; |
131 | unsigned short pci_clock; | 130 | unsigned short pci_clock; |
132 | unsigned int basereg = hwif->channel ? 0x50 : 0x40; | 131 | unsigned int basereg = hwif->channel ? 0x50 : 0x40; |
@@ -155,7 +154,7 @@ static void sc1200_set_dma_mode(ide_drive_t *drive, const u8 mode) | |||
155 | else | 154 | else |
156 | timings = mwdma_timing[pci_clock][mode - XFER_MW_DMA_0]; | 155 | timings = mwdma_timing[pci_clock][mode - XFER_MW_DMA_0]; |
157 | 156 | ||
158 | if (unit == 0) { /* are we configuring drive0? */ | 157 | if ((drive->dn & 1) == 0) { |
159 | pci_read_config_dword(dev, basereg + 4, ®); | 158 | pci_read_config_dword(dev, basereg + 4, ®); |
160 | timings |= reg & 0x80000000; /* preserve PIO format bit */ | 159 | timings |= reg & 0x80000000; /* preserve PIO format bit */ |
161 | pci_write_config_dword(dev, basereg + 4, timings); | 160 | pci_write_config_dword(dev, basereg + 4, timings); |
@@ -216,7 +215,8 @@ static void sc1200_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
216 | if (mode != -1) { | 215 | if (mode != -1) { |
217 | printk("SC1200: %s: changing (U)DMA mode\n", drive->name); | 216 | printk("SC1200: %s: changing (U)DMA mode\n", drive->name); |
218 | ide_dma_off_quietly(drive); | 217 | ide_dma_off_quietly(drive); |
219 | if (ide_set_dma_mode(drive, mode) == 0 && drive->using_dma) | 218 | if (ide_set_dma_mode(drive, mode) == 0 && |
219 | (drive->dev_flags & IDE_DFLAG_USING_DMA)) | ||
220 | hwif->dma_ops->dma_host_set(drive, 1); | 220 | hwif->dma_ops->dma_host_set(drive, 1); |
221 | return; | 221 | return; |
222 | } | 222 | } |
@@ -328,7 +328,7 @@ static const struct pci_device_id sc1200_pci_tbl[] = { | |||
328 | }; | 328 | }; |
329 | MODULE_DEVICE_TABLE(pci, sc1200_pci_tbl); | 329 | MODULE_DEVICE_TABLE(pci, sc1200_pci_tbl); |
330 | 330 | ||
331 | static struct pci_driver driver = { | 331 | static struct pci_driver sc1200_pci_driver = { |
332 | .name = "SC1200_IDE", | 332 | .name = "SC1200_IDE", |
333 | .id_table = sc1200_pci_tbl, | 333 | .id_table = sc1200_pci_tbl, |
334 | .probe = sc1200_init_one, | 334 | .probe = sc1200_init_one, |
@@ -341,12 +341,12 @@ static struct pci_driver driver = { | |||
341 | 341 | ||
342 | static int __init sc1200_ide_init(void) | 342 | static int __init sc1200_ide_init(void) |
343 | { | 343 | { |
344 | return ide_pci_register_driver(&driver); | 344 | return ide_pci_register_driver(&sc1200_pci_driver); |
345 | } | 345 | } |
346 | 346 | ||
347 | static void __exit sc1200_ide_exit(void) | 347 | static void __exit sc1200_ide_exit(void) |
348 | { | 348 | { |
349 | pci_unregister_driver(&driver); | 349 | pci_unregister_driver(&sc1200_pci_driver); |
350 | } | 350 | } |
351 | 351 | ||
352 | module_init(sc1200_ide_init); | 352 | module_init(sc1200_ide_init); |