ide: fix IDE_DFLAG_NO_IO_32BIT handling

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Thursday, March 26, 2009 - 12:23 pm

Gitweb:     http://git.kernel.org/linus/7610c4f5efc495d8e15ef608c4a66932f895379a
Commit:     7610c4f5efc495d8e15ef608c4a66932f895379a
Parent:     8e0ee43bc2c3e19db56a4adaa9a9b04ce885cd84
Author:     Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
AuthorDate: Tue Mar 24 23:22:38 2009 +0100
Committer:  Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
CommitDate: Tue Mar 24 23:22:38 2009 +0100

    ide: fix IDE_DFLAG_NO_IO_32BIT handling
    
    * IDE_DFLAG_NO_IO_32BIT may be set by cmd640's ->init_dev method
      so don't clear it in ide_port_tune_devices() (+ no need to do it).
    
    * Move IDE_DFLAG_NO_IO_32BIT handling to ide_port_init_devices().
    
    Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/ide-probe.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index ee8e3e7..97ea532 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -848,13 +848,6 @@ static void ide_port_tune_devices(ide_hwif_t *hwif)
 				ide_set_dma(drive);
 		}
 	}
-
-	ide_port_for_each_dev(i, drive, hwif) {
-		if (hwif->host_flags & IDE_HFLAG_NO_IO_32BIT)
-			drive->dev_flags |= IDE_DFLAG_NO_IO_32BIT;
-		else
-			drive->dev_flags &= ~IDE_DFLAG_NO_IO_32BIT;
-	}
 }
 
 /*
@@ -1192,6 +1185,8 @@ static void ide_port_init_devices(ide_hwif_t *hwif)
 
 		if (hwif->host_flags & IDE_HFLAG_IO_32BIT)
 			drive->io_32bit = 1;
+		if (hwif->host_flags & IDE_HFLAG_NO_IO_32BIT)
+			drive->dev_flags |= IDE_DFLAG_NO_IO_32BIT;
 		if (hwif->host_flags & IDE_HFLAG_UNMASK_IRQS)
 			drive->dev_flags |= IDE_DFLAG_UNMASK;
 		if (hwif->host_flags & IDE_HFLAG_NO_UNMASK_IRQS)
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
ide: fix IDE_DFLAG_NO_IO_32BIT handling, Linux Kernel Mailing ..., (Thu Mar 26, 12:23 pm)