diff options
Diffstat (limited to 'drivers/ide/pmac.c')
-rw-r--r-- | drivers/ide/pmac.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/ide/pmac.c b/drivers/ide/pmac.c index 5643a8b957bf..1df7b7636453 100644 --- a/drivers/ide/pmac.c +++ b/drivers/ide/pmac.c | |||
@@ -1455,7 +1455,7 @@ static int pmac_ide_build_dmatable(ide_drive_t *drive, struct ide_cmd *cmd) | |||
1455 | "switching to PIO on Ohare chipset\n", drive->name); | 1455 | "switching to PIO on Ohare chipset\n", drive->name); |
1456 | pmif->broken_dma_warn = 1; | 1456 | pmif->broken_dma_warn = 1; |
1457 | } | 1457 | } |
1458 | goto use_pio_instead; | 1458 | return 0; |
1459 | } | 1459 | } |
1460 | while (cur_len) { | 1460 | while (cur_len) { |
1461 | unsigned int tc = (cur_len < 0xfe00)? cur_len: 0xfe00; | 1461 | unsigned int tc = (cur_len < 0xfe00)? cur_len: 0xfe00; |
@@ -1463,7 +1463,7 @@ static int pmac_ide_build_dmatable(ide_drive_t *drive, struct ide_cmd *cmd) | |||
1463 | if (count++ >= MAX_DCMDS) { | 1463 | if (count++ >= MAX_DCMDS) { |
1464 | printk(KERN_WARNING "%s: DMA table too small\n", | 1464 | printk(KERN_WARNING "%s: DMA table too small\n", |
1465 | drive->name); | 1465 | drive->name); |
1466 | goto use_pio_instead; | 1466 | return 0; |
1467 | } | 1467 | } |
1468 | st_le16(&table->command, wr? OUTPUT_MORE: INPUT_MORE); | 1468 | st_le16(&table->command, wr? OUTPUT_MORE: INPUT_MORE); |
1469 | st_le16(&table->req_count, tc); | 1469 | st_le16(&table->req_count, tc); |
@@ -1492,9 +1492,6 @@ static int pmac_ide_build_dmatable(ide_drive_t *drive, struct ide_cmd *cmd) | |||
1492 | 1492 | ||
1493 | printk(KERN_DEBUG "%s: empty DMA table?\n", drive->name); | 1493 | printk(KERN_DEBUG "%s: empty DMA table?\n", drive->name); |
1494 | 1494 | ||
1495 | use_pio_instead: | ||
1496 | ide_destroy_dmatable(drive); | ||
1497 | |||
1498 | return 0; /* revert to PIO for this request */ | 1495 | return 0; /* revert to PIO for this request */ |
1499 | } | 1496 | } |
1500 | 1497 | ||
@@ -1510,10 +1507,8 @@ static int pmac_ide_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd) | |||
1510 | u8 unit = drive->dn & 1, ata4 = (pmif->kind == controller_kl_ata4); | 1507 | u8 unit = drive->dn & 1, ata4 = (pmif->kind == controller_kl_ata4); |
1511 | u8 write = !!(cmd->tf_flags & IDE_TFLAG_WRITE); | 1508 | u8 write = !!(cmd->tf_flags & IDE_TFLAG_WRITE); |
1512 | 1509 | ||
1513 | if (pmac_ide_build_dmatable(drive, cmd) == 0) { | 1510 | if (pmac_ide_build_dmatable(drive, cmd) == 0) |
1514 | ide_map_sg(drive, cmd); | ||
1515 | return 1; | 1511 | return 1; |
1516 | } | ||
1517 | 1512 | ||
1518 | /* Apple adds 60ns to wrDataSetup on reads */ | 1513 | /* Apple adds 60ns to wrDataSetup on reads */ |
1519 | if (ata4 && (pmif->timings[unit] & TR_66_UDMA_EN)) { | 1514 | if (ata4 && (pmif->timings[unit] & TR_66_UDMA_EN)) { |