
From: Jens Axboe <axboe@suse.de>

Here's the fix.  Bart, you moved the tcq init to a much earlier phase
(saying ide_init_drive() was too early, well ide_dma_on is much earlier in
the init phase).  ide_init_drive() _is_ the correct location in my
oppinion, drive and queue has been set up at this point.



 25-akpm/drivers/ide/ide-disk.c |    4 ++++
 25-akpm/drivers/ide/ide-dma.c  |    4 ----
 2 files changed, 4 insertions(+), 4 deletions(-)

diff -puN drivers/ide/ide-disk.c~ide-tcq-fix drivers/ide/ide-disk.c
--- 25/drivers/ide/ide-disk.c~ide-tcq-fix	Fri Jul 11 10:50:57 2003
+++ 25-akpm/drivers/ide/ide-disk.c	Fri Jul 11 10:50:57 2003
@@ -1665,6 +1665,10 @@ static void idedisk_setup (ide_drive_t *
 	drive->no_io_32bit = id->dword_io ? 1 : 0;
 	if (drive->id->cfs_enable_2 & 0x3000)
 		write_cache(drive, (id->cfs_enable_2 & 0x3000));
+
+#ifdef CONFIG_BLK_DEV_IDE_TCQ_DEFAULT
+	HWIF(drive)->ide_dma_queued_on(drive);
+#endif
 }
 
 static int idedisk_cleanup (ide_drive_t *drive)
diff -puN drivers/ide/ide-dma.c~ide-tcq-fix drivers/ide/ide-dma.c
--- 25/drivers/ide/ide-dma.c~ide-tcq-fix	Fri Jul 11 10:50:57 2003
+++ 25-akpm/drivers/ide/ide-dma.c	Fri Jul 11 10:50:57 2003
@@ -572,10 +572,6 @@ int __ide_dma_on (ide_drive_t *drive)
 	if (HWIF(drive)->ide_dma_host_on(drive))
 		return 1;
 
-#ifdef CONFIG_BLK_DEV_IDE_TCQ_DEFAULT
-	HWIF(drive)->ide_dma_queued_on(drive);
-#endif
-
 	return 0;
 }
 

_
