Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=36e9dc469b1300d8bec6f2ab48b4556e2c4241ba
Commit:     36e9dc469b1300d8bec6f2ab48b4556e2c4241ba
Parent:     ae9458d6a0956aa21cb49e1251e35a8d4dacbe6e
Author:     Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
AuthorDate: Sat Feb 2 19:56:28 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Sat Feb 2 19:56:28 2008 +0100

    dtc2278: fix ->io_32bit handling
    
    On DTC2278 32-bit I/O has to be enabled for both devices on the port
    so always enable it during init time and disallow further changes.
    
    Cc: Alan Cox <[EMAIL PROTECTED]>
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 drivers/ide/ide.c            |    4 ----
 drivers/ide/legacy/dtc2278.c |   12 ++++++------
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index ab9ca2b..fb0c47c 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -791,10 +791,6 @@ int set_io_32bit(ide_drive_t *drive, int arg)
                return -EBUSY;
 
        drive->io_32bit = arg;
-#ifdef CONFIG_BLK_DEV_DTC2278
-       if (HWIF(drive)->chipset == ide_dtc2278)
-               HWIF(drive)->drives[!drive->select.b.unit].io_32bit = arg;
-#endif /* CONFIG_BLK_DEV_DTC2278 */
 
        spin_unlock_irq(&ide_lock);
 
diff --git a/drivers/ide/legacy/dtc2278.c b/drivers/ide/legacy/dtc2278.c
index 611c970..092c04a 100644
--- a/drivers/ide/legacy/dtc2278.c
+++ b/drivers/ide/legacy/dtc2278.c
@@ -84,12 +84,6 @@ static void dtc2278_set_pio_mode(ide_drive_t *drive, const 
u8 pio)
                /* Actually we do - there is a data sheet available for the
                   Winbond but does anyone actually care */
        }
-
-       /*
-        * 32bit I/O has to be enabled for *both* drives at the same time.
-        */
-       drive->io_32bit = 1;
-       HWIF(drive)->drives[!drive->select.b.unit].io_32bit = 1;
 }
 
 static int __init dtc2278_probe(void)
@@ -123,18 +117,24 @@ static int __init dtc2278_probe(void)
        local_irq_restore(flags);
 
        hwif->serialized = 1;
+       hwif->no_io_32bit = 1;  /* disallow ->io_32bit changes */
        hwif->chipset = ide_dtc2278;
        hwif->pio_mask = ATA_PIO4;
        hwif->set_pio_mode = &dtc2278_set_pio_mode;
        hwif->drives[0].no_unmask = 1;
        hwif->drives[1].no_unmask = 1;
+       hwif->drives[0].io_32bit = 1;
+       hwif->drives[1].io_32bit = 1;
        hwif->mate = mate;
 
        mate->serialized = 1;
+       mate->no_io_32bit = 1;
        mate->chipset = ide_dtc2278;
        mate->pio_mask = ATA_PIO4;
        mate->drives[0].no_unmask = 1;
        mate->drives[1].no_unmask = 1;
+       mate->drives[0].io_32bit = 1;
+       mate->drives[1].io_32bit = 1;
        mate->mate = hwif;
        mate->channel = 1;
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to