diff options
-rw-r--r-- | drivers/ide/pci/sc1200.c | 39 |
1 files changed, 2 insertions, 37 deletions
diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c index 7dbc44cc722a..9ac8889f8ad3 100644 --- a/drivers/ide/pci/sc1200.c +++ b/drivers/ide/pci/sc1200.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/ide/pci/sc1200.c Version 0.94 Mar 10 2007 | 2 | * linux/drivers/ide/pci/sc1200.c Version 0.95 Jun 16 2007 |
3 | * | 3 | * |
4 | * Copyright (C) 2000-2002 Mark Lord <mlord@pobox.com> | 4 | * Copyright (C) 2000-2002 Mark Lord <mlord@pobox.com> |
5 | * Copyright (C) 2007 Bartlomiej Zolnierkiewicz | 5 | * Copyright (C) 2007 Bartlomiej Zolnierkiewicz |
@@ -390,7 +390,7 @@ static int sc1200_resume (struct pci_dev *dev) | |||
390 | // loop over all interfaces that are part of this pci device: | 390 | // loop over all interfaces that are part of this pci device: |
391 | // | 391 | // |
392 | while ((hwif = lookup_pci_dev(hwif, dev)) != NULL) { | 392 | while ((hwif = lookup_pci_dev(hwif, dev)) != NULL) { |
393 | unsigned int basereg, r, d, format; | 393 | unsigned int basereg, r; |
394 | sc1200_saved_state_t *ss = (sc1200_saved_state_t *)hwif->config_data; | 394 | sc1200_saved_state_t *ss = (sc1200_saved_state_t *)hwif->config_data; |
395 | 395 | ||
396 | // | 396 | // |
@@ -402,41 +402,6 @@ static int sc1200_resume (struct pci_dev *dev) | |||
402 | pci_write_config_dword(hwif->pci_dev, basereg + (r<<2), ss->regs[r]); | 402 | pci_write_config_dword(hwif->pci_dev, basereg + (r<<2), ss->regs[r]); |
403 | } | 403 | } |
404 | } | 404 | } |
405 | // | ||
406 | // Re-program drive PIO modes | ||
407 | // | ||
408 | pci_read_config_dword(hwif->pci_dev, basereg+4, &format); | ||
409 | format = (format >> 31) & 1; | ||
410 | if (format) | ||
411 | format += sc1200_get_pci_clock(); | ||
412 | for (d = 0; d < 2; ++d) { | ||
413 | ide_drive_t *drive = &(hwif->drives[d]); | ||
414 | if (drive->present) { | ||
415 | unsigned int pio, timings; | ||
416 | pci_read_config_dword(hwif->pci_dev, basereg+(drive->select.b.unit << 3), &timings); | ||
417 | for (pio = 0; pio <= 4; ++pio) { | ||
418 | if (sc1200_pio_timings[format][pio] == timings) | ||
419 | break; | ||
420 | } | ||
421 | if (pio > 4) | ||
422 | pio = 255; /* autotune */ | ||
423 | (void)sc1200_tuneproc(drive, pio); | ||
424 | } | ||
425 | } | ||
426 | // | ||
427 | // Re-program drive DMA modes | ||
428 | // | ||
429 | for (d = 0; d < MAX_DRIVES; ++d) { | ||
430 | ide_drive_t *drive = &(hwif->drives[d]); | ||
431 | if (drive->present && !__ide_dma_bad_drive(drive)) { | ||
432 | int enable_dma = drive->using_dma; | ||
433 | hwif->dma_off_quietly(drive); | ||
434 | if (sc1200_config_dma(drive)) | ||
435 | enable_dma = 0; | ||
436 | if (enable_dma) | ||
437 | hwif->dma_host_on(drive); | ||
438 | } | ||
439 | } | ||
440 | } | 405 | } |
441 | return 0; | 406 | return 0; |
442 | } | 407 | } |