aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-02 13:56:28 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-02 13:56:28 -0500
commit36e9dc469b1300d8bec6f2ab48b4556e2c4241ba (patch)
tree66d18834d7021c4dfad22311778c5c87967fd621 /drivers
parentae9458d6a0956aa21cb49e1251e35a8d4dacbe6e (diff)
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 <alan@lxorguk.ukuu.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/ide.c4
-rw-r--r--drivers/ide/legacy/dtc2278.c12
2 files changed, 6 insertions, 10 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index ab9ca2b5b66c..fb0c47c8819d 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)
791 return -EBUSY; 791 return -EBUSY;
792 792
793 drive->io_32bit = arg; 793 drive->io_32bit = arg;
794#ifdef CONFIG_BLK_DEV_DTC2278
795 if (HWIF(drive)->chipset == ide_dtc2278)
796 HWIF(drive)->drives[!drive->select.b.unit].io_32bit = arg;
797#endif /* CONFIG_BLK_DEV_DTC2278 */
798 794
799 spin_unlock_irq(&ide_lock); 795 spin_unlock_irq(&ide_lock);
800 796
diff --git a/drivers/ide/legacy/dtc2278.c b/drivers/ide/legacy/dtc2278.c
index 611c9705a3ae..092c04abbe7a 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)
84 /* Actually we do - there is a data sheet available for the 84 /* Actually we do - there is a data sheet available for the
85 Winbond but does anyone actually care */ 85 Winbond but does anyone actually care */
86 } 86 }
87
88 /*
89 * 32bit I/O has to be enabled for *both* drives at the same time.
90 */
91 drive->io_32bit = 1;
92 HWIF(drive)->drives[!drive->select.b.unit].io_32bit = 1;
93} 87}
94 88
95static int __init dtc2278_probe(void) 89static int __init dtc2278_probe(void)
@@ -123,18 +117,24 @@ static int __init dtc2278_probe(void)
123 local_irq_restore(flags); 117 local_irq_restore(flags);
124 118
125 hwif->serialized = 1; 119 hwif->serialized = 1;
120 hwif->no_io_32bit = 1; /* disallow ->io_32bit changes */
126 hwif->chipset = ide_dtc2278; 121 hwif->chipset = ide_dtc2278;
127 hwif->pio_mask = ATA_PIO4; 122 hwif->pio_mask = ATA_PIO4;
128 hwif->set_pio_mode = &dtc2278_set_pio_mode; 123 hwif->set_pio_mode = &dtc2278_set_pio_mode;
129 hwif->drives[0].no_unmask = 1; 124 hwif->drives[0].no_unmask = 1;
130 hwif->drives[1].no_unmask = 1; 125 hwif->drives[1].no_unmask = 1;
126 hwif->drives[0].io_32bit = 1;
127 hwif->drives[1].io_32bit = 1;
131 hwif->mate = mate; 128 hwif->mate = mate;
132 129
133 mate->serialized = 1; 130 mate->serialized = 1;
131 mate->no_io_32bit = 1;
134 mate->chipset = ide_dtc2278; 132 mate->chipset = ide_dtc2278;
135 mate->pio_mask = ATA_PIO4; 133 mate->pio_mask = ATA_PIO4;
136 mate->drives[0].no_unmask = 1; 134 mate->drives[0].no_unmask = 1;
137 mate->drives[1].no_unmask = 1; 135 mate->drives[1].no_unmask = 1;
136 mate->drives[0].io_32bit = 1;
137 mate->drives[1].io_32bit = 1;
138 mate->mate = hwif; 138 mate->mate = hwif;
139 mate->channel = 1; 139 mate->channel = 1;
140 140