aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/legacy
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-13 17:15:06 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-13 17:15:06 -0400
commit7591103c08abade60aeddb432ed0686ddd0de1c6 (patch)
tree523343b43b0c420666da18c64e1e9f21ff63dea5 /drivers/ide/legacy
parent2be4ff2f084842839b041b793ed6237e8d1d315a (diff)
parent9c6102d446985bca9c426cb2d9b478ed21d2b024 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (66 commits) ata: Add documentation for hard disk shock protection interface (v3) ide: Implement disk shock protection support (v4) ide-cd: fix printk format warning piix: add Hercules EC-900 mini-notebook to ich_laptop short cable list ide-atapi: assign taskfile flags per device type ide-cd: move cdrom_info.dma to ide_drive_t.dma ide: add ide_drive_t.dma flag ide-cd: add a debug_mask module parameter ide-cd: convert driver to new ide debugging macro (v3) ide: move SFF DMA code to ide-dma-sff.c ide: cleanup ide-dma.c ide: cleanup ide_build_dmatable() ide: remove needless includes from ide-dma.c ide: switch to DMA-mapping API part #2 ide: make ide_dma_timeout() available also for CONFIG_BLK_DEV_IDEDMA_SFF=n ide: make ide_dma_lost_irq() available also for CONFIG_BLK_DEV_IDEDMA_SFF=n ide: __ide_dma_end() -> ide_dma_end() pmac: remove needless pmac_ide_destroy_dmatable() wrapper pmac: remove superfluous pmif == NULL checks ide: Two fixes regarding memory allocation ...
Diffstat (limited to 'drivers/ide/legacy')
-rw-r--r--drivers/ide/legacy/ali14xx.c2
-rw-r--r--drivers/ide/legacy/ht6560b.c9
-rw-r--r--drivers/ide/legacy/ide-4drives.c2
-rw-r--r--drivers/ide/legacy/qd65xx.c2
4 files changed, 8 insertions, 7 deletions
diff --git a/drivers/ide/legacy/ali14xx.c b/drivers/ide/legacy/ali14xx.c
index 7276c96aaa2a..90da1f953ed0 100644
--- a/drivers/ide/legacy/ali14xx.c
+++ b/drivers/ide/legacy/ali14xx.c
@@ -131,7 +131,7 @@ static void ali14xx_set_pio_mode(ide_drive_t *drive, const u8 pio)
131 drive->name, pio, time1, time2, param1, param2, param3, param4); 131 drive->name, pio, time1, time2, param1, param2, param3, param4);
132 132
133 /* stuff timing parameters into controller registers */ 133 /* stuff timing parameters into controller registers */
134 driveNum = (HWIF(drive)->index << 1) + drive->select.b.unit; 134 driveNum = (drive->hwif->index << 1) + (drive->dn & 1);
135 spin_lock_irqsave(&ali14xx_lock, flags); 135 spin_lock_irqsave(&ali14xx_lock, flags);
136 outb_p(regOn, basePort); 136 outb_p(regOn, basePort);
137 outReg(param1, regTab[driveNum].reg1); 137 outReg(param1, regTab[driveNum].reg1);
diff --git a/drivers/ide/legacy/ht6560b.c b/drivers/ide/legacy/ht6560b.c
index 5123ea291d07..c7e5c2246b79 100644
--- a/drivers/ide/legacy/ht6560b.c
+++ b/drivers/ide/legacy/ht6560b.c
@@ -120,7 +120,8 @@ static void ht6560b_selectproc (ide_drive_t *drive)
120 * Need to enforce prefetch sometimes because otherwise 120 * Need to enforce prefetch sometimes because otherwise
121 * it'll hang (hard). 121 * it'll hang (hard).
122 */ 122 */
123 if (drive->media != ide_disk || !drive->present) 123 if (drive->media != ide_disk ||
124 (drive->dev_flags & IDE_DFLAG_PRESENT) == 0)
124 select |= HT_PREFETCH_MODE; 125 select |= HT_PREFETCH_MODE;
125 126
126 if (select != current_select || timing != current_timing) { 127 if (select != current_select || timing != current_timing) {
@@ -249,11 +250,11 @@ static void ht_set_prefetch(ide_drive_t *drive, u8 state)
249 */ 250 */
250 if (state) { 251 if (state) {
251 drive->drive_data |= t; /* enable prefetch mode */ 252 drive->drive_data |= t; /* enable prefetch mode */
252 drive->no_unmask = 1; 253 drive->dev_flags |= IDE_DFLAG_NO_UNMASK;
253 drive->unmask = 0; 254 drive->dev_flags &= ~IDE_DFLAG_UNMASK;
254 } else { 255 } else {
255 drive->drive_data &= ~t; /* disable prefetch mode */ 256 drive->drive_data &= ~t; /* disable prefetch mode */
256 drive->no_unmask = 0; 257 drive->dev_flags &= ~IDE_DFLAG_NO_UNMASK;
257 } 258 }
258 259
259 spin_unlock_irqrestore(&ht6560b_lock, flags); 260 spin_unlock_irqrestore(&ht6560b_lock, flags);
diff --git a/drivers/ide/legacy/ide-4drives.c b/drivers/ide/legacy/ide-4drives.c
index c76d55de6996..9e85b1ec9607 100644
--- a/drivers/ide/legacy/ide-4drives.c
+++ b/drivers/ide/legacy/ide-4drives.c
@@ -14,7 +14,7 @@ MODULE_PARM_DESC(probe, "probe for generic IDE chipset with 4 drives/port");
14static void ide_4drives_init_dev(ide_drive_t *drive) 14static void ide_4drives_init_dev(ide_drive_t *drive)
15{ 15{
16 if (drive->hwif->channel) 16 if (drive->hwif->channel)
17 drive->select.all ^= 0x20; 17 drive->select ^= 0x20;
18} 18}
19 19
20static const struct ide_port_ops ide_4drives_port_ops = { 20static const struct ide_port_ops ide_4drives_port_ops = {
diff --git a/drivers/ide/legacy/qd65xx.c b/drivers/ide/legacy/qd65xx.c
index ec408b3a7100..bc27c7aba936 100644
--- a/drivers/ide/legacy/qd65xx.c
+++ b/drivers/ide/legacy/qd65xx.c
@@ -305,7 +305,7 @@ static void __init qd6580_init_dev(ide_drive_t *drive)
305 } else 305 } else
306 t2 = t1 = hwif->channel ? QD6580_DEF_DATA2 : QD6580_DEF_DATA; 306 t2 = t1 = hwif->channel ? QD6580_DEF_DATA2 : QD6580_DEF_DATA;
307 307
308 drive->drive_data = drive->select.b.unit ? t2 : t1; 308 drive->drive_data = (drive->dn & 1) ? t2 : t1;
309} 309}
310 310
311static const struct ide_port_ops qd6500_port_ops = { 311static const struct ide_port_ops qd6500_port_ops = {