diff options
Diffstat (limited to 'drivers/ide/icside.c')
-rw-r--r-- | drivers/ide/icside.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/ide/icside.c b/drivers/ide/icside.c index 8716066a2f2b..bcb507b0cfd4 100644 --- a/drivers/ide/icside.c +++ b/drivers/ide/icside.c | |||
@@ -236,7 +236,7 @@ static const struct ide_port_ops icside_v6_no_dma_port_ops = { | |||
236 | */ | 236 | */ |
237 | static void icside_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) | 237 | static void icside_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) |
238 | { | 238 | { |
239 | unsigned long cycle_time; | 239 | unsigned long cycle_time = 0; |
240 | int use_dma_info = 0; | 240 | int use_dma_info = 0; |
241 | const u8 xfer_mode = drive->dma_mode; | 241 | const u8 xfer_mode = drive->dma_mode; |
242 | 242 | ||
@@ -271,9 +271,9 @@ static void icside_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) | |||
271 | 271 | ||
272 | ide_set_drivedata(drive, (void *)cycle_time); | 272 | ide_set_drivedata(drive, (void *)cycle_time); |
273 | 273 | ||
274 | printk("%s: %s selected (peak %dMB/s)\n", drive->name, | 274 | printk(KERN_INFO "%s: %s selected (peak %luMB/s)\n", |
275 | ide_xfer_verbose(xfer_mode), | 275 | drive->name, ide_xfer_verbose(xfer_mode), |
276 | 2000 / (unsigned long)ide_get_drivedata(drive)); | 276 | 2000 / (cycle_time ? cycle_time : (unsigned long) -1)); |
277 | } | 277 | } |
278 | 278 | ||
279 | static const struct ide_port_ops icside_v6_port_ops = { | 279 | static const struct ide_port_ops icside_v6_port_ops = { |
@@ -375,8 +375,6 @@ static const struct ide_dma_ops icside_v6_dma_ops = { | |||
375 | .dma_test_irq = icside_dma_test_irq, | 375 | .dma_test_irq = icside_dma_test_irq, |
376 | .dma_lost_irq = ide_dma_lost_irq, | 376 | .dma_lost_irq = ide_dma_lost_irq, |
377 | }; | 377 | }; |
378 | #else | ||
379 | #define icside_v6_dma_ops NULL | ||
380 | #endif | 378 | #endif |
381 | 379 | ||
382 | static int icside_dma_off_init(ide_hwif_t *hwif, const struct ide_port_info *d) | 380 | static int icside_dma_off_init(ide_hwif_t *hwif, const struct ide_port_info *d) |
@@ -456,7 +454,6 @@ err_free: | |||
456 | static const struct ide_port_info icside_v6_port_info __initdata = { | 454 | static const struct ide_port_info icside_v6_port_info __initdata = { |
457 | .init_dma = icside_dma_off_init, | 455 | .init_dma = icside_dma_off_init, |
458 | .port_ops = &icside_v6_no_dma_port_ops, | 456 | .port_ops = &icside_v6_no_dma_port_ops, |
459 | .dma_ops = &icside_v6_dma_ops, | ||
460 | .host_flags = IDE_HFLAG_SERIALIZE | IDE_HFLAG_MMIO, | 457 | .host_flags = IDE_HFLAG_SERIALIZE | IDE_HFLAG_MMIO, |
461 | .mwdma_mask = ATA_MWDMA2, | 458 | .mwdma_mask = ATA_MWDMA2, |
462 | .swdma_mask = ATA_SWDMA2, | 459 | .swdma_mask = ATA_SWDMA2, |
@@ -518,11 +515,13 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec) | |||
518 | 515 | ||
519 | ecard_set_drvdata(ec, state); | 516 | ecard_set_drvdata(ec, state); |
520 | 517 | ||
518 | #ifdef CONFIG_BLK_DEV_IDEDMA_ICS | ||
521 | if (ec->dma != NO_DMA && !request_dma(ec->dma, DRV_NAME)) { | 519 | if (ec->dma != NO_DMA && !request_dma(ec->dma, DRV_NAME)) { |
522 | d.init_dma = icside_dma_init; | 520 | d.init_dma = icside_dma_init; |
523 | d.port_ops = &icside_v6_port_ops; | 521 | d.port_ops = &icside_v6_port_ops; |
524 | } else | 522 | d.dma_ops = &icside_v6_dma_ops; |
525 | d.dma_ops = NULL; | 523 | } |
524 | #endif | ||
526 | 525 | ||
527 | ret = ide_host_register(host, &d, hws); | 526 | ret = ide_host_register(host, &d, hws); |
528 | if (ret) | 527 | if (ret) |