diff options
| author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-26 16:25:22 -0400 |
|---|---|---|
| committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-26 16:25:22 -0400 |
| commit | f629b38beddf2ff8bc3fda1754bbd6cc7d3acc03 (patch) | |
| tree | 0e5c4b222c2df6aa4fab5dd1bf5bc2e936a47979 /drivers/ide/mips | |
| parent | 63158d5c217e2e62665ae9b10d203bd7da817108 (diff) | |
au1xxx-ide: fix MWDMA support
Always use "fast" MWDMA support and remove dma_{black,white}_list
(they were based on completely bogus ->ide_dma_check implementation
which didn't set neither the host controller timings nor the device
for the desired transfer mode).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/mips')
| -rw-r--r-- | drivers/ide/mips/au1xxx-ide.c | 49 |
1 files changed, 2 insertions, 47 deletions
diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c index 7179d4953211..d2e926efd3cc 100644 --- a/drivers/ide/mips/au1xxx-ide.c +++ b/drivers/ide/mips/au1xxx-ide.c | |||
| @@ -47,7 +47,6 @@ | |||
| 47 | #define IDE_AU1XXX_BURSTMODE 1 | 47 | #define IDE_AU1XXX_BURSTMODE 1 |
| 48 | 48 | ||
| 49 | static _auide_hwif auide_hwif; | 49 | static _auide_hwif auide_hwif; |
| 50 | static int dbdma_init_done; | ||
| 51 | 50 | ||
| 52 | static int auide_ddma_init(_auide_hwif *auide); | 51 | static int auide_ddma_init(_auide_hwif *auide); |
| 53 | 52 | ||
| @@ -315,35 +314,6 @@ static int auide_dma_setup(ide_drive_t *drive) | |||
| 315 | return 0; | 314 | return 0; |
| 316 | } | 315 | } |
| 317 | 316 | ||
| 318 | static u8 auide_mdma_filter(ide_drive_t *drive) | ||
| 319 | { | ||
| 320 | /* | ||
| 321 | * FIXME: ->white_list and ->black_list are based on completely bogus | ||
| 322 | * ->ide_dma_check implementation which didn't set neither the host | ||
| 323 | * controller timings nor the device for the desired transfer mode. | ||
| 324 | * | ||
| 325 | * They should be either removed or 0x00 MWDMA mask should be | ||
| 326 | * returned for devices on the ->black_list. | ||
| 327 | */ | ||
| 328 | |||
| 329 | if (dbdma_init_done == 0) { | ||
| 330 | auide_hwif.white_list = ide_in_drive_list(drive->id, | ||
| 331 | dma_white_list); | ||
| 332 | auide_hwif.black_list = ide_in_drive_list(drive->id, | ||
| 333 | dma_black_list); | ||
| 334 | auide_hwif.drive = drive; | ||
| 335 | auide_ddma_init(&auide_hwif); | ||
| 336 | dbdma_init_done = 1; | ||
| 337 | } | ||
| 338 | |||
| 339 | /* Is the drive in our DMA black list? */ | ||
| 340 | if (auide_hwif.black_list) | ||
| 341 | printk(KERN_WARNING "%s: Disabling DMA for %s (blacklisted)\n", | ||
| 342 | drive->name, drive->id->model); | ||
| 343 | |||
| 344 | return drive->hwif->mwdma_mask; | ||
| 345 | } | ||
| 346 | |||
| 347 | static int auide_dma_test_irq(ide_drive_t *drive) | 317 | static int auide_dma_test_irq(ide_drive_t *drive) |
| 348 | { | 318 | { |
| 349 | if (drive->waiting_for_dma == 0) | 319 | if (drive->waiting_for_dma == 0) |
| @@ -420,17 +390,8 @@ static int auide_ddma_init(_auide_hwif *auide) { | |||
| 420 | 390 | ||
| 421 | dev_id = AU1XXX_ATA_DDMA_REQ; | 391 | dev_id = AU1XXX_ATA_DDMA_REQ; |
| 422 | 392 | ||
| 423 | if (auide->white_list || auide->black_list) { | 393 | tsize = 8; /* 1 */ |
| 424 | tsize = 8; | 394 | devwidth = 32; /* 16 */ |
| 425 | devwidth = 32; | ||
| 426 | } | ||
| 427 | else { | ||
| 428 | tsize = 1; | ||
| 429 | devwidth = 16; | ||
| 430 | |||
| 431 | printk(KERN_ERR "au1xxx-ide: %s is not on ide driver whitelist.\n",auide_hwif.drive->id->model); | ||
| 432 | printk(KERN_ERR " please read 'Documentation/mips/AU1xxx_IDE.README'"); | ||
| 433 | } | ||
| 434 | 395 | ||
| 435 | #ifdef IDE_AU1XXX_BURSTMODE | 396 | #ifdef IDE_AU1XXX_BURSTMODE |
| 436 | flags = DEV_FLAGS_SYNC | DEV_FLAGS_BURSTABLE; | 397 | flags = DEV_FLAGS_SYNC | DEV_FLAGS_BURSTABLE; |
| @@ -546,9 +507,6 @@ static void auide_setup_ports(hw_regs_t *hw, _auide_hwif *ahwif) | |||
| 546 | static const struct ide_port_ops au1xxx_port_ops = { | 507 | static const struct ide_port_ops au1xxx_port_ops = { |
| 547 | .set_pio_mode = au1xxx_set_pio_mode, | 508 | .set_pio_mode = au1xxx_set_pio_mode, |
| 548 | .set_dma_mode = auide_set_dma_mode, | 509 | .set_dma_mode = auide_set_dma_mode, |
| 549 | #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA | ||
| 550 | .mdma_filter = auide_mdma_filter, | ||
| 551 | #endif | ||
| 552 | }; | 510 | }; |
| 553 | 511 | ||
| 554 | static const struct ide_port_info au1xxx_port_info = { | 512 | static const struct ide_port_info au1xxx_port_info = { |
| @@ -648,10 +606,7 @@ static int au_ide_probe(struct device *dev) | |||
| 648 | auide_hwif.hwif = hwif; | 606 | auide_hwif.hwif = hwif; |
| 649 | hwif->hwif_data = &auide_hwif; | 607 | hwif->hwif_data = &auide_hwif; |
| 650 | 608 | ||
| 651 | #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA | ||
| 652 | auide_ddma_init(&auide_hwif); | 609 | auide_ddma_init(&auide_hwif); |
| 653 | dbdma_init_done = 1; | ||
| 654 | #endif | ||
| 655 | 610 | ||
| 656 | idx[0] = hwif->index; | 611 | idx[0] = hwif->index; |
| 657 | 612 | ||
