Commit db9d2869 authored by Borislav Petkov's avatar Borislav Petkov Committed by Bartlomiej Zolnierkiewicz

ide-scsi: use drive->pc_callback instead of pc->callback

There should be no functionality change resulting from this patch.
Signed-off-by: default avatarBorislav Petkov <petkovbb@gmail.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 776bb027
...@@ -31,10 +31,7 @@ ide_startstop_t ide_pc_intr(ide_drive_t *drive, struct ide_atapi_pc *pc, ...@@ -31,10 +31,7 @@ ide_startstop_t ide_pc_intr(ide_drive_t *drive, struct ide_atapi_pc *pc,
debug_log("Enter %s - interrupt handler\n", __func__); debug_log("Enter %s - interrupt handler\n", __func__);
if (pc->flags & PC_FLAG_TIMEDOUT) { if (pc->flags & PC_FLAG_TIMEDOUT) {
if (drive->media == ide_floppy || drive->media == ide_tape) drive->pc_callback(drive);
drive->pc_callback(drive);
else
pc->callback(drive);
return ide_stopped; return ide_stopped;
} }
...@@ -100,10 +97,7 @@ ide_startstop_t ide_pc_intr(ide_drive_t *drive, struct ide_atapi_pc *pc, ...@@ -100,10 +97,7 @@ ide_startstop_t ide_pc_intr(ide_drive_t *drive, struct ide_atapi_pc *pc,
return ide_stopped; return ide_stopped;
} }
/* Command finished - Call the callback function */ /* Command finished - Call the callback function */
if (drive->media == ide_floppy || drive->media == ide_tape) drive->pc_callback(drive);
drive->pc_callback(drive);
else
pc->callback(drive);
return ide_stopped; return ide_stopped;
} }
......
...@@ -229,7 +229,6 @@ static int idescsi_check_condition(ide_drive_t *drive, ...@@ -229,7 +229,6 @@ static int idescsi_check_condition(ide_drive_t *drive,
rq->cmd_type = REQ_TYPE_SENSE; rq->cmd_type = REQ_TYPE_SENSE;
rq->cmd_flags |= REQ_PREEMPT; rq->cmd_flags |= REQ_PREEMPT;
pc->timeout = jiffies + WAIT_READY; pc->timeout = jiffies + WAIT_READY;
pc->callback = ide_scsi_callback;
/* NOTE! Save the failed packet command in "rq->buffer" */ /* NOTE! Save the failed packet command in "rq->buffer" */
rq->buffer = (void *) failed_cmd->special; rq->buffer = (void *) failed_cmd->special;
pc->scsi_cmd = ((struct ide_atapi_pc *) failed_cmd->special)->scsi_cmd; pc->scsi_cmd = ((struct ide_atapi_pc *) failed_cmd->special)->scsi_cmd;
...@@ -465,6 +464,9 @@ static void idescsi_setup (ide_drive_t *drive, idescsi_scsi_t *scsi) ...@@ -465,6 +464,9 @@ static void idescsi_setup (ide_drive_t *drive, idescsi_scsi_t *scsi)
#if IDESCSI_DEBUG_LOG #if IDESCSI_DEBUG_LOG
set_bit(IDESCSI_LOG_CMD, &scsi->log); set_bit(IDESCSI_LOG_CMD, &scsi->log);
#endif /* IDESCSI_DEBUG_LOG */ #endif /* IDESCSI_DEBUG_LOG */
drive->pc_callback = ide_scsi_callback;
idescsi_add_settings(drive); idescsi_add_settings(drive);
} }
...@@ -616,7 +618,6 @@ static int idescsi_queue (struct scsi_cmnd *cmd, ...@@ -616,7 +618,6 @@ static int idescsi_queue (struct scsi_cmnd *cmd,
pc->scsi_cmd = cmd; pc->scsi_cmd = cmd;
pc->done = done; pc->done = done;
pc->timeout = jiffies + cmd->timeout_per_command; pc->timeout = jiffies + cmd->timeout_per_command;
pc->callback = ide_scsi_callback;
if (test_bit(IDESCSI_LOG_CMD, &scsi->log)) { if (test_bit(IDESCSI_LOG_CMD, &scsi->log)) {
printk ("ide-scsi: %s: que %lu, cmd = ", drive->name, cmd->serial_number); printk ("ide-scsi: %s: que %lu, cmd = ", drive->name, cmd->serial_number);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment