summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ide-scsi.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-15 21:22:02 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-15 21:22:02 +0200
commitcdca5c1f3b769eb2cdfc9cadc254cb74ba73c7d6 (patch)
tree3fb425069ab22632d5497e558d2864e444a2fa0d /drivers/scsi/ide-scsi.c
parentc6b2d260b5a7a5ed32aa2ce370d81183fc37eeb1 (diff)
ide-scsi: add more debugging to idescsi_pc_intr()
Add more debugging to idescsi_pc_intr() to match ide-tape's idetape_pc_intr(). While at it: * Correct the first debug 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>
Diffstat (limited to 'drivers/scsi/ide-scsi.c')
-rw-r--r--drivers/scsi/ide-scsi.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index c0b39b9e5c1..ec9a5de2e75 100644
--- a/drivers/scsi/ide-scsi.c
+++ b/drivers/scsi/ide-scsi.c
@@ -364,7 +364,7 @@ static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive)
u16 bcount;
u8 stat, ireason;
- debug_log("Reached %s interrupt handler\n", __func__);
+ debug_log("Enter %s - interrupt handler\n", __func__);
if (pc->flags & PC_FLAG_TIMEDOUT) {
pc->callback(drive);
@@ -383,10 +383,16 @@ static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive)
if ((stat & DRQ_STAT) == 0) {
/* No more interrupts */
+ debug_log("Packet command completed, %d bytes transferred\n",
+ pc->xferred);
pc->flags &= ~PC_FLAG_DMA_IN_PROGRESS;
local_irq_enable_in_hardirq();
- if ((stat & ERR_STAT) || (pc->flags & PC_FLAG_DMA_ERROR))
+ if ((stat & ERR_STAT) || (pc->flags & PC_FLAG_DMA_ERROR)) {
+ /* Error detected */
+ debug_log("%s: I/O error\n", drive->name);
+
rq->errors++;
+ }
pc->callback(drive);
return ide_stopped;
}
@@ -457,6 +463,9 @@ static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive)
pc->xferred += 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 */
ide_set_handler(drive, &idescsi_pc_intr, get_timeout(pc), idescsi_expiry);
return ide_started;