[Bug 1940] ibook doesn't "wake up"
bugzilla-daemon at bugzilla.ubuntu.com
bugzilla-daemon at bugzilla.ubuntu.com
Thu Jul 28 20:56:32 UTC 2005
Please do not reply to this email. You can add comments at
http://bugzilla.ubuntu.com/show_bug.cgi?id=1940
Ubuntu | linux
------- Additional Comments From daniel at gimpelevich.san-francisco.ca.us 2005-07-28 21:56 UTC -------
This is in ide-cd.c:
3275 case ide_pm_state_start_resume: /* Resume step 1 (restore DMA) */
3276 /*
3277 * Right now, all we do is call hwif->ide_dma_check(drive),
3278 * we could be smarter and check for current xfer_speed
3279 * in struct drive etc...
3280 * Also, this step could be implemented as a generic helper
3281 * as most subdrivers will use it.
3282 */
3283 if ((drive->id->capability & 1) == 0)
3284 break;
3285 if (HWIF(drive)->ide_dma_check == NULL)
3286 break;
3287 HWIF(drive)->ide_dma_check(drive);
3288 break;
This is in ide-dma.c:
524 /**
525 * __ide_dma_check - check DMA setup
526 * @drive: drive to check
527 *
528 * Don't use - due for extermination
529 */
530
531 int __ide_dma_check (ide_drive_t *drive)
532 {
533 return config_drive_for_dma(drive);
534 }
Earlier in the same file:
339 /**
340 * config_drive_for_dma - attempt to activate IDE DMA
341 * @drive: the drive to place in DMA mode
342 *
343 * If the drive supports at least mode 2 DMA or UDMA of any kind
344 * then attempt to place it into DMA mode. Drives that are known to
345 * support DMA but predate the DMA properties or that are known
346 * to have DMA handling bugs are also set up appropriately based
347 * on the good/bad drive lists.
348 */
349
350 static int config_drive_for_dma (ide_drive_t *drive)
351 {
352 struct hd_driveid *id = drive->id;
353 ide_hwif_t *hwif = HWIF(drive);
354
355 if ((id->capability & 1) && hwif->autodma) {
356 /*
357 * Enable DMA on any drive that has
358 * UltraDMA (mode 0/1/2/3/4/5/6) enabled
359 */
360 if ((id->field_valid & 4) && ((id->dma_ultra >> 8) & 0x7f))
361 return hwif->ide_dma_on(drive);
362 /*
363 * Enable DMA on any drive that has mode2 DMA
364 * (multi or single) enabled
365 */
366 if (id->field_valid & 2) /* regular DMA */
367 if ((id->dma_mword & 0x404) == 0x404 ||
368 (id->dma_1word & 0x404) == 0x404)
369 return hwif->ide_dma_on(drive);
370
371 /* Consult the list of known "good" drives */
372 if (__ide_dma_good_drive(drive))
373 return hwif->ide_dma_on(drive);
374 }
375 // if (hwif->tuneproc != NULL) hwif->tuneproc(drive, 255);
376 return hwif->ide_dma_off_quietly(drive);
377 }
--
Configure bugmail: http://bugzilla.ubuntu.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
More information about the kernel-bugs
mailing list