Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 61896
b: refs/heads/master
c: 31c4df4
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Jul 19, 2007
1 parent 9ee8ada commit bd255a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 38 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8987d21ba6a426b0685257866ce366055930b57f
refs/heads/master: 31c4df441cce6b9ec541e7f722f50bfbc617dd76
39 changes: 2 additions & 37 deletions trunk/drivers/ide/pci/sc1200.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* linux/drivers/ide/pci/sc1200.c Version 0.94 Mar 10 2007
* linux/drivers/ide/pci/sc1200.c Version 0.95 Jun 16 2007
*
* Copyright (C) 2000-2002 Mark Lord <mlord@pobox.com>
* Copyright (C) 2007 Bartlomiej Zolnierkiewicz
Expand Down Expand Up @@ -390,7 +390,7 @@ static int sc1200_resume (struct pci_dev *dev)
// loop over all interfaces that are part of this pci device:
//
while ((hwif = lookup_pci_dev(hwif, dev)) != NULL) {
unsigned int basereg, r, d, format;
unsigned int basereg, r;
sc1200_saved_state_t *ss = (sc1200_saved_state_t *)hwif->config_data;

//
Expand All @@ -402,41 +402,6 @@ static int sc1200_resume (struct pci_dev *dev)
pci_write_config_dword(hwif->pci_dev, basereg + (r<<2), ss->regs[r]);
}
}
//
// Re-program drive PIO modes
//
pci_read_config_dword(hwif->pci_dev, basereg+4, &format);
format = (format >> 31) & 1;
if (format)
format += sc1200_get_pci_clock();
for (d = 0; d < 2; ++d) {
ide_drive_t *drive = &(hwif->drives[d]);
if (drive->present) {
unsigned int pio, timings;
pci_read_config_dword(hwif->pci_dev, basereg+(drive->select.b.unit << 3), &timings);
for (pio = 0; pio <= 4; ++pio) {
if (sc1200_pio_timings[format][pio] == timings)
break;
}
if (pio > 4)
pio = 255; /* autotune */
(void)sc1200_tuneproc(drive, pio);
}
}
//
// Re-program drive DMA modes
//
for (d = 0; d < MAX_DRIVES; ++d) {
ide_drive_t *drive = &(hwif->drives[d]);
if (drive->present && !__ide_dma_bad_drive(drive)) {
int enable_dma = drive->using_dma;
hwif->dma_off_quietly(drive);
if (sc1200_config_dma(drive))
enable_dma = 0;
if (enable_dma)
hwif->dma_host_on(drive);
}
}
}
return 0;
}
Expand Down

0 comments on commit bd255a5

Please sign in to comment.