diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-19 19:31:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-19 19:31:22 -0400 |
commit | 64fb98fc40738ae1a98bcea9ca3145b89fb71524 (patch) | |
tree | 24130f9c56b04638e91969d216db199652470a17 /drivers/ide/legacy | |
parent | 5f47c7eac65a45e33d7fe390effe75ec5c74f8bf (diff) | |
parent | 89636af25d75d8672aea05d258be357d0dc4bd70 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6: (23 commits)
ide: add support for SCSI ioctls to ide-floppy
ide: remove stale changelog from setup-pci.c
ide: remove stale changelog/comments/TODO from ide.c
ide-cris: handle PIO auto-tuning in tune_cris_ide()
ide: add PIO masks
ide: remove ide_find_best_pio_mode()
ide: drop "PIO data" argument from ide_get_best_pio_mode()
ide: ide_find_best_pio_mode() fixes (take 2)
ide: add ide_pio_cycle_time() helper (take 2)
sc1200: remove stale Power Management code
ide: ide_start_power_step() fix WRT disabling DMA
serverworks: fix DMA
serverworks: always tune PIO
ide: add ide_pci_device_t.host_flags (take 2)
ide: add ide_dev_has_iordy() helper (take 4)
ide: make ide_get_best_pio_mode() print info if overriding PIO mode
siimage: PIO mode setup fixes (take 2)
atiixp: PIO mode setup fixes
ide: Stop mapping ROMs
IDE: Remove references to dead ETRAX-related variables.
...
Diffstat (limited to 'drivers/ide/legacy')
-rw-r--r-- | drivers/ide/legacy/ali14xx.c | 7 | ||||
-rw-r--r-- | drivers/ide/legacy/dtc2278.c | 3 | ||||
-rw-r--r-- | drivers/ide/legacy/ht6560b.c | 12 | ||||
-rw-r--r-- | drivers/ide/legacy/ide-cs.c | 1 | ||||
-rw-r--r-- | drivers/ide/legacy/qd65xx.c | 21 | ||||
-rw-r--r-- | drivers/ide/legacy/umc8672.c | 4 |
6 files changed, 29 insertions, 19 deletions
diff --git a/drivers/ide/legacy/ali14xx.c b/drivers/ide/legacy/ali14xx.c index df17ed68c0bc..9b9c4761cb7d 100644 --- a/drivers/ide/legacy/ali14xx.c +++ b/drivers/ide/legacy/ali14xx.c | |||
@@ -115,13 +115,12 @@ static void ali14xx_tune_drive (ide_drive_t *drive, u8 pio) | |||
115 | int time1, time2; | 115 | int time1, time2; |
116 | u8 param1, param2, param3, param4; | 116 | u8 param1, param2, param3, param4; |
117 | unsigned long flags; | 117 | unsigned long flags; |
118 | ide_pio_data_t d; | ||
119 | int bus_speed = system_bus_clock(); | 118 | int bus_speed = system_bus_clock(); |
120 | 119 | ||
121 | pio = ide_get_best_pio_mode(drive, pio, ALI_MAX_PIO, &d); | 120 | pio = ide_get_best_pio_mode(drive, pio, ALI_MAX_PIO); |
122 | 121 | ||
123 | /* calculate timing, according to PIO mode */ | 122 | /* calculate timing, according to PIO mode */ |
124 | time1 = d.cycle_time; | 123 | time1 = ide_pio_cycle_time(drive, pio); |
125 | time2 = ide_pio_timings[pio].active_time; | 124 | time2 = ide_pio_timings[pio].active_time; |
126 | param3 = param1 = (time2 * bus_speed + 999) / 1000; | 125 | param3 = param1 = (time2 * bus_speed + 999) / 1000; |
127 | param4 = param2 = (time1 * bus_speed + 999) / 1000 - param1; | 126 | param4 = param2 = (time1 * bus_speed + 999) / 1000 - param1; |
@@ -212,10 +211,12 @@ static int __init ali14xx_probe(void) | |||
212 | mate = &ide_hwifs[1]; | 211 | mate = &ide_hwifs[1]; |
213 | 212 | ||
214 | hwif->chipset = ide_ali14xx; | 213 | hwif->chipset = ide_ali14xx; |
214 | hwif->pio_mask = ATA_PIO4; | ||
215 | hwif->tuneproc = &ali14xx_tune_drive; | 215 | hwif->tuneproc = &ali14xx_tune_drive; |
216 | hwif->mate = mate; | 216 | hwif->mate = mate; |
217 | 217 | ||
218 | mate->chipset = ide_ali14xx; | 218 | mate->chipset = ide_ali14xx; |
219 | mate->pio_mask = ATA_PIO4; | ||
219 | mate->tuneproc = &ali14xx_tune_drive; | 220 | mate->tuneproc = &ali14xx_tune_drive; |
220 | mate->mate = hwif; | 221 | mate->mate = hwif; |
221 | mate->channel = 1; | 222 | mate->channel = 1; |
diff --git a/drivers/ide/legacy/dtc2278.c b/drivers/ide/legacy/dtc2278.c index 36a3f0ac6162..6c01d951d074 100644 --- a/drivers/ide/legacy/dtc2278.c +++ b/drivers/ide/legacy/dtc2278.c | |||
@@ -71,7 +71,7 @@ static void tune_dtc2278 (ide_drive_t *drive, u8 pio) | |||
71 | { | 71 | { |
72 | unsigned long flags; | 72 | unsigned long flags; |
73 | 73 | ||
74 | pio = ide_get_best_pio_mode(drive, pio, 4, NULL); | 74 | pio = ide_get_best_pio_mode(drive, pio, 4); |
75 | 75 | ||
76 | if (pio >= 3) { | 76 | if (pio >= 3) { |
77 | spin_lock_irqsave(&ide_lock, flags); | 77 | spin_lock_irqsave(&ide_lock, flags); |
@@ -123,6 +123,7 @@ static int __init dtc2278_probe(void) | |||
123 | 123 | ||
124 | hwif->serialized = 1; | 124 | hwif->serialized = 1; |
125 | hwif->chipset = ide_dtc2278; | 125 | hwif->chipset = ide_dtc2278; |
126 | hwif->pio_mask = ATA_PIO4; | ||
126 | hwif->tuneproc = &tune_dtc2278; | 127 | hwif->tuneproc = &tune_dtc2278; |
127 | hwif->drives[0].no_unmask = 1; | 128 | hwif->drives[0].no_unmask = 1; |
128 | hwif->drives[1].no_unmask = 1; | 129 | hwif->drives[1].no_unmask = 1; |
diff --git a/drivers/ide/legacy/ht6560b.c b/drivers/ide/legacy/ht6560b.c index c8f353b1296f..bfaa2025173b 100644 --- a/drivers/ide/legacy/ht6560b.c +++ b/drivers/ide/legacy/ht6560b.c | |||
@@ -203,19 +203,21 @@ static u8 ht_pio2timings(ide_drive_t *drive, u8 pio) | |||
203 | { | 203 | { |
204 | int active_time, recovery_time; | 204 | int active_time, recovery_time; |
205 | int active_cycles, recovery_cycles; | 205 | int active_cycles, recovery_cycles; |
206 | ide_pio_data_t d; | ||
207 | int bus_speed = system_bus_clock(); | 206 | int bus_speed = system_bus_clock(); |
208 | 207 | ||
209 | if (pio) { | 208 | if (pio) { |
210 | pio = ide_get_best_pio_mode(drive, pio, 5, &d); | 209 | unsigned int cycle_time; |
211 | 210 | ||
211 | pio = ide_get_best_pio_mode(drive, pio, 5); | ||
212 | cycle_time = ide_pio_cycle_time(drive, pio); | ||
213 | |||
212 | /* | 214 | /* |
213 | * Just like opti621.c we try to calculate the | 215 | * Just like opti621.c we try to calculate the |
214 | * actual cycle time for recovery and activity | 216 | * actual cycle time for recovery and activity |
215 | * according system bus speed. | 217 | * according system bus speed. |
216 | */ | 218 | */ |
217 | active_time = ide_pio_timings[pio].active_time; | 219 | active_time = ide_pio_timings[pio].active_time; |
218 | recovery_time = d.cycle_time | 220 | recovery_time = cycle_time |
219 | - active_time | 221 | - active_time |
220 | - ide_pio_timings[pio].setup_time; | 222 | - ide_pio_timings[pio].setup_time; |
221 | /* | 223 | /* |
@@ -331,12 +333,14 @@ int __init ht6560b_init(void) | |||
331 | 333 | ||
332 | hwif->chipset = ide_ht6560b; | 334 | hwif->chipset = ide_ht6560b; |
333 | hwif->selectproc = &ht6560b_selectproc; | 335 | hwif->selectproc = &ht6560b_selectproc; |
336 | hwif->pio_mask = ATA_PIO5; | ||
334 | hwif->tuneproc = &tune_ht6560b; | 337 | hwif->tuneproc = &tune_ht6560b; |
335 | hwif->serialized = 1; /* is this needed? */ | 338 | hwif->serialized = 1; /* is this needed? */ |
336 | hwif->mate = mate; | 339 | hwif->mate = mate; |
337 | 340 | ||
338 | mate->chipset = ide_ht6560b; | 341 | mate->chipset = ide_ht6560b; |
339 | mate->selectproc = &ht6560b_selectproc; | 342 | mate->selectproc = &ht6560b_selectproc; |
343 | mate->pio_mask = ATA_PIO5; | ||
340 | mate->tuneproc = &tune_ht6560b; | 344 | mate->tuneproc = &tune_ht6560b; |
341 | mate->serialized = 1; /* is this needed? */ | 345 | mate->serialized = 1; /* is this needed? */ |
342 | mate->mate = hwif; | 346 | mate->mate = hwif; |
diff --git a/drivers/ide/legacy/ide-cs.c b/drivers/ide/legacy/ide-cs.c index 2f3977f195b7..4cdb519f9832 100644 --- a/drivers/ide/legacy/ide-cs.c +++ b/drivers/ide/legacy/ide-cs.c | |||
@@ -386,6 +386,7 @@ static struct pcmcia_device_id ide_ids[] = { | |||
386 | PCMCIA_DEVICE_PROD_ID12("HITACHI", "microdrive", 0xf4f43949, 0xa6d76178), | 386 | PCMCIA_DEVICE_PROD_ID12("HITACHI", "microdrive", 0xf4f43949, 0xa6d76178), |
387 | PCMCIA_DEVICE_PROD_ID12("IBM", "microdrive", 0xb569a6e5, 0xa6d76178), | 387 | PCMCIA_DEVICE_PROD_ID12("IBM", "microdrive", 0xb569a6e5, 0xa6d76178), |
388 | PCMCIA_DEVICE_PROD_ID12("IBM", "IBM17JSSFP20", 0xb569a6e5, 0xf2508753), | 388 | PCMCIA_DEVICE_PROD_ID12("IBM", "IBM17JSSFP20", 0xb569a6e5, 0xf2508753), |
389 | PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF8GB", 0x2e6d1829, 0xacbe682e), | ||
389 | PCMCIA_DEVICE_PROD_ID12("IO DATA", "CBIDE2 ", 0x547e66dc, 0x8671043b), | 390 | PCMCIA_DEVICE_PROD_ID12("IO DATA", "CBIDE2 ", 0x547e66dc, 0x8671043b), |
390 | PCMCIA_DEVICE_PROD_ID12("IO DATA", "PCIDE", 0x547e66dc, 0x5c5ab149), | 391 | PCMCIA_DEVICE_PROD_ID12("IO DATA", "PCIDE", 0x547e66dc, 0x5c5ab149), |
391 | PCMCIA_DEVICE_PROD_ID12("IO DATA", "PCIDEII", 0x547e66dc, 0xb3662674), | 392 | PCMCIA_DEVICE_PROD_ID12("IO DATA", "PCIDEII", 0x547e66dc, 0xb3662674), |
diff --git a/drivers/ide/legacy/qd65xx.c b/drivers/ide/legacy/qd65xx.c index 7783745dd167..8b87a424094a 100644 --- a/drivers/ide/legacy/qd65xx.c +++ b/drivers/ide/legacy/qd65xx.c | |||
@@ -252,38 +252,38 @@ static void qd6500_tune_drive (ide_drive_t *drive, u8 pio) | |||
252 | 252 | ||
253 | static void qd6580_tune_drive (ide_drive_t *drive, u8 pio) | 253 | static void qd6580_tune_drive (ide_drive_t *drive, u8 pio) |
254 | { | 254 | { |
255 | ide_pio_data_t d; | ||
256 | int base = HWIF(drive)->select_data; | 255 | int base = HWIF(drive)->select_data; |
256 | unsigned int cycle_time; | ||
257 | int active_time = 175; | 257 | int active_time = 175; |
258 | int recovery_time = 415; /* worst case values from the dos driver */ | 258 | int recovery_time = 415; /* worst case values from the dos driver */ |
259 | 259 | ||
260 | if (drive->id && !qd_find_disk_type(drive, &active_time, &recovery_time)) { | 260 | if (drive->id && !qd_find_disk_type(drive, &active_time, &recovery_time)) { |
261 | pio = ide_get_best_pio_mode(drive, pio, 4, &d); | 261 | pio = ide_get_best_pio_mode(drive, pio, 4); |
262 | cycle_time = ide_pio_cycle_time(drive, pio); | ||
262 | 263 | ||
263 | switch (pio) { | 264 | switch (pio) { |
264 | case 0: break; | 265 | case 0: break; |
265 | case 3: | 266 | case 3: |
266 | if (d.cycle_time >= 110) { | 267 | if (cycle_time >= 110) { |
267 | active_time = 86; | 268 | active_time = 86; |
268 | recovery_time = d.cycle_time - 102; | 269 | recovery_time = cycle_time - 102; |
269 | } else | 270 | } else |
270 | printk(KERN_WARNING "%s: Strange recovery time !\n",drive->name); | 271 | printk(KERN_WARNING "%s: Strange recovery time !\n",drive->name); |
271 | break; | 272 | break; |
272 | case 4: | 273 | case 4: |
273 | if (d.cycle_time >= 69) { | 274 | if (cycle_time >= 69) { |
274 | active_time = 70; | 275 | active_time = 70; |
275 | recovery_time = d.cycle_time - 61; | 276 | recovery_time = cycle_time - 61; |
276 | } else | 277 | } else |
277 | printk(KERN_WARNING "%s: Strange recovery time !\n",drive->name); | 278 | printk(KERN_WARNING "%s: Strange recovery time !\n",drive->name); |
278 | break; | 279 | break; |
279 | default: | 280 | default: |
280 | if (d.cycle_time >= 180) { | 281 | if (cycle_time >= 180) { |
281 | active_time = 110; | 282 | active_time = 110; |
282 | recovery_time = d.cycle_time - 120; | 283 | recovery_time = cycle_time - 120; |
283 | } else { | 284 | } else { |
284 | active_time = ide_pio_timings[pio].active_time; | 285 | active_time = ide_pio_timings[pio].active_time; |
285 | recovery_time = d.cycle_time | 286 | recovery_time = cycle_time - active_time; |
286 | -active_time; | ||
287 | } | 287 | } |
288 | } | 288 | } |
289 | printk(KERN_INFO "%s: PIO mode%d\n", drive->name,pio); | 289 | printk(KERN_INFO "%s: PIO mode%d\n", drive->name,pio); |
@@ -346,6 +346,7 @@ static void __init qd_setup(ide_hwif_t *hwif, int base, int config, | |||
346 | hwif->drives[1].drive_data = data1; | 346 | hwif->drives[1].drive_data = data1; |
347 | hwif->drives[0].io_32bit = | 347 | hwif->drives[0].io_32bit = |
348 | hwif->drives[1].io_32bit = 1; | 348 | hwif->drives[1].io_32bit = 1; |
349 | hwif->pio_mask = ATA_PIO4; | ||
349 | hwif->tuneproc = tuneproc; | 350 | hwif->tuneproc = tuneproc; |
350 | probe_hwif_init(hwif); | 351 | probe_hwif_init(hwif); |
351 | } | 352 | } |
diff --git a/drivers/ide/legacy/umc8672.c b/drivers/ide/legacy/umc8672.c index ddc403a0bd82..d2862e638bc5 100644 --- a/drivers/ide/legacy/umc8672.c +++ b/drivers/ide/legacy/umc8672.c | |||
@@ -110,7 +110,7 @@ static void tune_umc (ide_drive_t *drive, u8 pio) | |||
110 | unsigned long flags; | 110 | unsigned long flags; |
111 | ide_hwgroup_t *hwgroup = ide_hwifs[HWIF(drive)->index^1].hwgroup; | 111 | ide_hwgroup_t *hwgroup = ide_hwifs[HWIF(drive)->index^1].hwgroup; |
112 | 112 | ||
113 | pio = ide_get_best_pio_mode(drive, pio, 4, NULL); | 113 | pio = ide_get_best_pio_mode(drive, pio, 4); |
114 | printk("%s: setting umc8672 to PIO mode%d (speed %d)\n", | 114 | printk("%s: setting umc8672 to PIO mode%d (speed %d)\n", |
115 | drive->name, pio, pio_to_umc[pio]); | 115 | drive->name, pio, pio_to_umc[pio]); |
116 | spin_lock_irqsave(&ide_lock, flags); | 116 | spin_lock_irqsave(&ide_lock, flags); |
@@ -149,10 +149,12 @@ static int __init umc8672_probe(void) | |||
149 | mate = &ide_hwifs[1]; | 149 | mate = &ide_hwifs[1]; |
150 | 150 | ||
151 | hwif->chipset = ide_umc8672; | 151 | hwif->chipset = ide_umc8672; |
152 | hwif->pio_mask = ATA_PIO4; | ||
152 | hwif->tuneproc = &tune_umc; | 153 | hwif->tuneproc = &tune_umc; |
153 | hwif->mate = mate; | 154 | hwif->mate = mate; |
154 | 155 | ||
155 | mate->chipset = ide_umc8672; | 156 | mate->chipset = ide_umc8672; |
157 | mate->pio_mask = ATA_PIO4; | ||
156 | mate->tuneproc = &tune_umc; | 158 | mate->tuneproc = &tune_umc; |
157 | mate->mate = hwif; | 159 | mate->mate = hwif; |
158 | mate->channel = 1; | 160 | mate->channel = 1; |