diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2010-08-01 15:44:45 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2010-08-01 15:44:45 +0200 |
commit | ae34e897a3dc935b2c5995b573acb254224c065c (patch) | |
tree | 5f71ad6a94771180ff91fc3faefd20d22c7633a7 /linux/src | |
parent | 282889dddc41a6f47100d34cf8518775ca46c98f (diff) |
Fix unexpected irq + irq timeout on write
* linux/src/drivers/block/ide.c (do_rw_disk): Set IRQ handler before
issuing write command.
Diffstat (limited to 'linux/src')
-rw-r--r-- | linux/src/drivers/block/ide.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/linux/src/drivers/block/ide.c b/linux/src/drivers/block/ide.c index e52cbed..18f2e76 100644 --- a/linux/src/drivers/block/ide.c +++ b/linux/src/drivers/block/ide.c @@ -1495,6 +1495,10 @@ static inline void do_rw_disk (ide_drive_t *drive, struct request *rq, unsigned if (drive->using_dma && !(HWIF(drive)->dmaproc(ide_dma_write, drive))) return; #endif /* CONFIG_BLK_DEV_TRITON */ + if (drive->mult_count) + ide_set_handler (drive, &multwrite_intr, WAIT_CMD); + else + ide_set_handler (drive, &write_intr, WAIT_CMD); OUT_BYTE(drive->mult_count ? WIN_MULTWRITE : WIN_WRITE, io_base+IDE_COMMAND_OFFSET); if (ide_wait_stat(drive, DATA_READY, drive->bad_wstat, WAIT_DRQ)) { printk("%s: no DRQ after issuing %s\n", drive->name, @@ -1505,10 +1509,8 @@ static inline void do_rw_disk (ide_drive_t *drive, struct request *rq, unsigned cli(); if (drive->mult_count) { HWGROUP(drive)->wrq = *rq; /* scratchpad */ - ide_set_handler (drive, &multwrite_intr, WAIT_CMD); ide_multwrite(drive, drive->mult_count); } else { - ide_set_handler (drive, &write_intr, WAIT_CMD); ide_output_data(drive, rq->buffer, SECTOR_WORDS); } return; |