linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 13/20] ide: initialize rq->cmd_type in ide_init_drive_cmd() callers
@ 2007-12-09 21:16 Bartlomiej Zolnierkiewicz
  2007-12-10 13:03 ` Sergei Shtylyov
  0 siblings, 1 reply; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-12-09 21:16 UTC (permalink / raw)
  To: linux-ide


* Initialize rq->cmd_type in ide_wait_cmd(), ide_cmd_ioctl() and
  set_pio_mode() (other callers were aleady over-riding rq->cmd_type).

* Remove no longer needed rq->cmd_type setup from ide_init_drive_cmd().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/ide-io.c       |    1 -
 drivers/ide/ide-taskfile.c |    4 ++++
 drivers/ide/ide.c          |    3 +++
 3 files changed, 7 insertions(+), 1 deletion(-)

Index: b/drivers/ide/ide-io.c
===================================================================
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -1671,7 +1671,6 @@ irqreturn_t ide_intr (int irq, void *dev
 void ide_init_drive_cmd (struct request *rq)
 {
 	memset(rq, 0, sizeof(*rq));
-	rq->cmd_type = REQ_TYPE_ATA_CMD;
 	rq->ref_count = 1;
 }
 
Index: b/drivers/ide/ide-taskfile.c
===================================================================
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -760,6 +760,7 @@ int ide_wait_cmd (ide_drive_t *drive, u8
 		buf = buffer;
 	memset(buf, 0, 4 + SECTOR_WORDS * 4 * sectors);
 	ide_init_drive_cmd(&rq);
+	rq.cmd_type = REQ_TYPE_ATA_CMD;
 	rq.buffer = buf;
 	*buf++ = cmd;
 	*buf++ = nsect;
@@ -779,7 +780,10 @@ int ide_cmd_ioctl (ide_drive_t *drive, u
 
 	if (NULL == (void *) arg) {
 		struct request rq;
+
 		ide_init_drive_cmd(&rq);
+		rq.cmd_type = REQ_TYPE_ATA_CMD;
+
 		return ide_do_drive_cmd(drive, &rq, ide_wait);
 	}
 
Index: b/drivers/ide/ide.c
===================================================================
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -874,7 +874,10 @@ int set_pio_mode(ide_drive_t *drive, int
 
 	if (drive->special.b.set_tune)
 		return -EBUSY;
+
 	ide_init_drive_cmd(&rq);
+	rq.cmd_type = REQ_TYPE_ATA_CMD;
+
 	drive->tune_req = (u8) arg;
 	drive->special.b.set_tune = 1;
 	(void) ide_do_drive_cmd(drive, &rq, ide_wait);

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 13/20] ide: initialize rq->cmd_type in ide_init_drive_cmd() callers
  2007-12-09 21:16 [PATCH 13/20] ide: initialize rq->cmd_type in ide_init_drive_cmd() callers Bartlomiej Zolnierkiewicz
@ 2007-12-10 13:03 ` Sergei Shtylyov
  0 siblings, 0 replies; 2+ messages in thread
From: Sergei Shtylyov @ 2007-12-10 13:03 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide

Bartlomiej Zolnierkiewicz wrote:

> * Initialize rq->cmd_type in ide_wait_cmd(), ide_cmd_ioctl() and
>   set_pio_mode() (other callers were aleady over-riding rq->cmd_type).

> * Remove no longer needed rq->cmd_type setup from ide_init_drive_cmd().

> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

    Despite the patch hardly seems necessary to me

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

MBR, Sergei

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-12-10 13:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-09 21:16 [PATCH 13/20] ide: initialize rq->cmd_type in ide_init_drive_cmd() callers Bartlomiej Zolnierkiewicz
2007-12-10 13:03 ` Sergei Shtylyov

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).