linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Borislav Petkov <petkovbb@googlemail.com>
To: bzolnier@gmail.com
Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
	Borislav Petkov <petkovbb@gmail.com>
Subject: [PATCH 04/16] ide-scsi: use drive->pc_callback instead of pc->callback
Date: Sun, 29 Jun 2008 12:59:07 +0200	[thread overview]
Message-ID: <1214737159-1078-5-git-send-email-petkovbb@gmail.com> (raw)
In-Reply-To: <1214737159-1078-1-git-send-email-petkovbb@gmail.com>

There should be no functionality change resulting from this patch.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
---
 drivers/ide/ide-atapi.c |   10 ++--------
 drivers/scsi/ide-scsi.c |    5 +++--
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
index c3c161a..0e8b6f5 100644
--- a/drivers/ide/ide-atapi.c
+++ b/drivers/ide/ide-atapi.c
@@ -30,10 +30,7 @@ ide_startstop_t ide_pc_intr(ide_drive_t *drive, struct ide_atapi_pc *pc,
 	debug_log("Enter %s - interrupt handler\n", __func__);
 
 	if (pc->flags & PC_FLAG_TIMEDOUT) {
-		if (drive->media == ide_floppy || drive->media == ide_tape)
-			drive->pc_callback(drive);
-		else
-			pc->callback(drive);
+		drive->pc_callback(drive);
 		return ide_stopped;
 	}
 
@@ -99,10 +96,7 @@ cmd_finished:
 			return ide_stopped;
 		}
 		/* Command finished - Call the callback function */
-		if (drive->media == ide_floppy || drive->media == ide_tape)
-			drive->pc_callback(drive);
-		else
-			pc->callback(drive);
+		drive->pc_callback(drive);
 		return ide_stopped;
 	}
 
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index 683bce3..a6c2c5f 100644
--- a/drivers/scsi/ide-scsi.c
+++ b/drivers/scsi/ide-scsi.c
@@ -228,7 +228,6 @@ static int idescsi_check_condition(ide_drive_t *drive,
 	rq->cmd_type = REQ_TYPE_SENSE;
 	rq->cmd_flags |= REQ_PREEMPT;
 	pc->timeout = jiffies + WAIT_READY;
-	pc->callback = ide_scsi_callback;
 	/* NOTE! Save the failed packet command in "rq->buffer" */
 	rq->buffer = (void *) failed_cmd->special;
 	pc->scsi_cmd = ((struct ide_atapi_pc *) failed_cmd->special)->scsi_cmd;
@@ -478,6 +477,9 @@ static void idescsi_setup (ide_drive_t *drive, idescsi_scsi_t *scsi)
 #if IDESCSI_DEBUG_LOG
 	set_bit(IDESCSI_LOG_CMD, &scsi->log);
 #endif /* IDESCSI_DEBUG_LOG */
+
+	drive->pc_callback = ide_scsi_callback;
+
 	idescsi_add_settings(drive);
 }
 
@@ -630,7 +632,6 @@ static int idescsi_queue (struct scsi_cmnd *cmd,
 	pc->scsi_cmd = cmd;
 	pc->done = done;
 	pc->timeout = jiffies + cmd->timeout_per_command;
-	pc->callback = ide_scsi_callback;
 
 	if (test_bit(IDESCSI_LOG_CMD, &scsi->log)) {
 		printk ("ide-scsi: %s: que %lu, cmd = ", drive->name, cmd->serial_number);
-- 
1.5.5.4


  parent reply	other threads:[~2008-06-29 10:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-29 10:59 [PATCH 00/16] Generic ide device flags Borislav Petkov
2008-06-29 10:59 ` [PATCH 01/16] ide: push pc callback pointer into the ide_drive_t structure Borislav Petkov
2008-06-29 10:59 ` [PATCH 02/16] ide-floppy: use drive->pc_callback instead of pc->callback Borislav Petkov
2008-06-29 10:59 ` [PATCH 03/16] ide-tape: " Borislav Petkov
2008-06-29 10:59 ` Borislav Petkov [this message]
2008-06-29 10:59 ` [PATCH 05/16] ide: remove pc->callback member from ide_atapi_pc Borislav Petkov
2008-06-29 10:59 ` [PATCH 06/16] ide-floppy: pass packet command in rq->cmd Borislav Petkov
2008-06-29 10:59 ` [PATCH 07/16] ide-tape: make room for packet command ids " Borislav Petkov
2008-06-29 10:59 ` [PATCH 08/16] ide-tape: pass packet command " Borislav Petkov
2008-06-29 10:59 ` [PATCH 09/16] ide-scsi: " Borislav Petkov
2008-06-29 10:59 ` [PATCH 10/16] ide: use rq->cmd instead of pc->c in atapi common code Borislav Petkov
2008-06-29 10:59 ` [PATCH 11/16] ide: add per-device flags Borislav Petkov
2008-06-29 10:59 ` [PATCH 12/16] ide-floppy: convert to using the new dev_flags Borislav Petkov
2008-06-29 10:59 ` [PATCH 13/16] ide-tape: " Borislav Petkov
2008-06-29 10:59 ` [PATCH 14/16] ide-scsi: " Borislav Petkov
2008-06-29 10:59 ` [PATCH 15/16] ide: remove unused PC_FLAG_DRQ_INTERRUPT Borislav Petkov
2008-06-29 10:59 ` [PATCH 16/16] ide-cd: convert to using the new dev_flags Borislav Petkov
2008-06-30 20:44 ` [PATCH 00/16] Generic ide device flags Bartlomiej Zolnierkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1214737159-1078-5-git-send-email-petkovbb@gmail.com \
    --to=petkovbb@googlemail.com \
    --cc=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=petkovbb@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).