ide-floppy: add more debugging to idefloppy_pc_intr()
Add more debugging to idefloppy_pc_intr() to match ide-tape's idetape_pc_intr(). While at it: * Correct the first debug message. * Log device name with "DMA finished" message. This is a preparation for adding generic ide_pc_intr() helper. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
@@ -397,7 +397,7 @@ static ide_startstop_t idefloppy_pc_intr(ide_drive_t *drive)
|
|||||||
u16 bcount;
|
u16 bcount;
|
||||||
u8 stat, ireason;
|
u8 stat, ireason;
|
||||||
|
|
||||||
debug_log("Reached %s interrupt handler\n", __func__);
|
debug_log("Enter %s - interrupt handler\n", __func__);
|
||||||
|
|
||||||
if (pc->flags & PC_FLAG_DMA_IN_PROGRESS) {
|
if (pc->flags & PC_FLAG_DMA_IN_PROGRESS) {
|
||||||
dma_error = hwif->dma_ops->dma_end(drive);
|
dma_error = hwif->dma_ops->dma_end(drive);
|
||||||
@@ -409,7 +409,7 @@ static ide_startstop_t idefloppy_pc_intr(ide_drive_t *drive)
|
|||||||
pc->xferred = pc->req_xfer;
|
pc->xferred = pc->req_xfer;
|
||||||
idefloppy_update_buffers(drive, pc);
|
idefloppy_update_buffers(drive, pc);
|
||||||
}
|
}
|
||||||
debug_log("DMA finished\n");
|
debug_log("%s: DMA finished\n", drive->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Clear the interrupt */
|
/* Clear the interrupt */
|
||||||
@@ -432,6 +432,9 @@ static ide_startstop_t idefloppy_pc_intr(ide_drive_t *drive)
|
|||||||
" command\n", drive->name);
|
" command\n", drive->name);
|
||||||
return ide_do_reset(drive);
|
return ide_do_reset(drive);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
debug_log("[cmd %x]: check condition\n", pc->c[0]);
|
||||||
|
|
||||||
/* Retry operation */
|
/* Retry operation */
|
||||||
idefloppy_retry_pc(drive);
|
idefloppy_retry_pc(drive);
|
||||||
/* queued, but not started */
|
/* queued, but not started */
|
||||||
@@ -505,6 +508,9 @@ static ide_startstop_t idefloppy_pc_intr(ide_drive_t *drive)
|
|||||||
pc->xferred += bcount;
|
pc->xferred += bcount;
|
||||||
pc->cur_pos += bcount;
|
pc->cur_pos += bcount;
|
||||||
|
|
||||||
|
debug_log("[cmd %x] transferred %d bytes on that intr.\n",
|
||||||
|
pc->c[0], bcount);
|
||||||
|
|
||||||
/* And set the interrupt handler again */
|
/* And set the interrupt handler again */
|
||||||
ide_set_handler(drive, &idefloppy_pc_intr, IDEFLOPPY_WAIT_CMD, NULL);
|
ide_set_handler(drive, &idefloppy_pc_intr, IDEFLOPPY_WAIT_CMD, NULL);
|
||||||
return ide_started;
|
return ide_started;
|
||||||
|
Reference in New Issue
Block a user