aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-08-20 16:42:55 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-08-20 16:42:55 -0400
commit59785c8fe23ca2f432bc41ef473a8933ab435812 (patch)
tree99ac4bce8a4583dab32e248a61c2778ba7ea6dc4 /drivers/ide
parent1116fae5fdfa80c6744a9b5d75fb3ef687a69b19 (diff)
ide-pmac: fix drive->init_speed reporting
pmac_ide_tune_chipset() don't set drive->init_speed. Fix it by setting drive->{current,init}_speed in pmac_ide_do_setfeature() and clean up pmac_ide_{tune_chipset,mdma_enable,udma_enable}(). Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ppc/pmac.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index 33630ad3e79..4b13cd9a027 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -604,6 +604,9 @@ out:
604 drive->id->dma_1word |= 0x0101; break; 604 drive->id->dma_1word |= 0x0101; break;
605 default: break; 605 default: break;
606 } 606 }
607 if (!drive->init_speed)
608 drive->init_speed = command;
609 drive->current_speed = command;
607 } 610 }
608 enable_irq(hwif->irq); 611 enable_irq(hwif->irq);
609 return result; 612 return result;
@@ -986,7 +989,6 @@ pmac_ide_tune_chipset (ide_drive_t *drive, byte speed)
986 return ret; 989 return ret;
987 990
988 pmac_ide_do_update_timings(drive); 991 pmac_ide_do_update_timings(drive);
989 drive->current_speed = speed;
990 992
991 return 0; 993 return 0;
992} 994}
@@ -1737,11 +1739,6 @@ pmac_ide_mdma_enable(ide_drive_t *drive, u16 mode)
1737 /* Apply timings to controller */ 1739 /* Apply timings to controller */
1738 *timings = timing_local[0]; 1740 *timings = timing_local[0];
1739 *timings2 = timing_local[1]; 1741 *timings2 = timing_local[1];
1740
1741 /* Set speed info in drive */
1742 drive->current_speed = mode;
1743 if (!drive->init_speed)
1744 drive->init_speed = mode;
1745 1742
1746 return 1; 1743 return 1;
1747} 1744}
@@ -1793,11 +1790,6 @@ pmac_ide_udma_enable(ide_drive_t *drive, u16 mode)
1793 *timings = timing_local[0]; 1790 *timings = timing_local[0];
1794 *timings2 = timing_local[1]; 1791 *timings2 = timing_local[1];
1795 1792
1796 /* Set speed info in drive */
1797 drive->current_speed = mode;
1798 if (!drive->init_speed)
1799 drive->init_speed = mode;
1800
1801 return 1; 1793 return 1;
1802} 1794}
1803 1795