linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 9/15] ide-{floppy,tape,scsi}: fix register loading order when issuing packet command
@ 2007-10-30 23:29 Bartlomiej Zolnierkiewicz
  2007-11-04 13:09 ` Sergei Shtylyov
  0 siblings, 1 reply; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-10-30 23:29 UTC (permalink / raw)
  To: linux-ide


Load IDE_BCOUNTL_REG before IDE_BCOUNTH_REG when issuing packet command.

It shouldn't affect anything (just a usual paranoia to separate changes
which change the way in which hardware is accessed from code cleanups).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/ide-floppy.c |    2 +-
 drivers/ide/ide-tape.c   |    2 +-
 drivers/scsi/ide-scsi.c  |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Index: b/drivers/ide/ide-floppy.c
===================================================================
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -1071,8 +1071,8 @@ static ide_startstop_t idefloppy_issue_p
 		HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG);
 	/* Use PIO/DMA */
 	hwif->OUTB(dma, IDE_FEATURE_REG);
-	hwif->OUTB((bcount >> 8) & 0xff, IDE_BCOUNTH_REG);
 	hwif->OUTB(bcount & 0xff, IDE_BCOUNTL_REG);
+	hwif->OUTB((bcount >> 8) & 0xff, IDE_BCOUNTH_REG);
 	HWIF(drive)->OUTB(drive->select.all, IDE_SELECT_REG);
 
 	if (dma) {	/* Begin DMA, if necessary */
Index: b/drivers/ide/ide-tape.c
===================================================================
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -2174,8 +2174,8 @@ static ide_startstop_t idetape_issue_pac
 	if (IDE_CONTROL_REG)
 		hwif->OUTB(drive->ctl, IDE_CONTROL_REG);
 	hwif->OUTB(dma_ok ? 1 : 0, IDE_FEATURE_REG);	/* Use PIO/DMA */
-	hwif->OUTB((bcount >> 8) & 0xff, IDE_BCOUNTH_REG);
 	hwif->OUTB(bcount & 0xff, IDE_BCOUNTL_REG);
+	hwif->OUTB((bcount >> 8) & 0xff, IDE_BCOUNTH_REG);
 	hwif->OUTB(drive->select.all, IDE_SELECT_REG);
 	if (dma_ok)			/* Will begin DMA later */
 		set_bit(PC_DMA_IN_PROGRESS, &pc->flags);
Index: b/drivers/scsi/ide-scsi.c
===================================================================
--- a/drivers/scsi/ide-scsi.c
+++ b/drivers/scsi/ide-scsi.c
@@ -599,8 +599,8 @@ static ide_startstop_t idescsi_issue_pc 
 		HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG);
 
 	hwif->OUTB(dma, IDE_FEATURE_REG);
-	hwif->OUTB((bcount >> 8) & 0xff, IDE_BCOUNTH_REG);
 	hwif->OUTB(bcount & 0xff, IDE_BCOUNTL_REG);
+	hwif->OUTB((bcount >> 8) & 0xff, IDE_BCOUNTH_REG);
 
 	if (dma)
 		set_bit(PC_DMA_OK, &pc->flags);

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

end of thread, other threads:[~2007-11-04 13:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-30 23:29 [PATCH 9/15] ide-{floppy,tape,scsi}: fix register loading order when issuing packet command Bartlomiej Zolnierkiewicz
2007-11-04 13:09 ` 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).