Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=59785c8fe23ca2f432bc41ef473a8933ab435812
Commit:     59785c8fe23ca2f432bc41ef473a8933ab435812
Parent:     1116fae5fdfa80c6744a9b5d75fb3ef687a69b19
Author:     Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
AuthorDate: Mon Aug 20 22:42:55 2007 +0200
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Mon Aug 20 22:42:55 2007 +0200

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 drivers/ide/ppc/pmac.c |   14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index 33630ad..4b13cd9 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -604,6 +604,9 @@ out:
                                drive->id->dma_1word |= 0x0101; break;
                        default: break;
                }
+               if (!drive->init_speed)
+                       drive->init_speed = command;
+               drive->current_speed = command;
        }
        enable_irq(hwif->irq);
        return result;
@@ -986,7 +989,6 @@ pmac_ide_tune_chipset (ide_drive_t *drive, byte speed)
                return ret;
                
        pmac_ide_do_update_timings(drive);      
-       drive->current_speed = speed;
 
        return 0;
 }
@@ -1737,11 +1739,6 @@ pmac_ide_mdma_enable(ide_drive_t *drive, u16 mode)
        /* Apply timings to controller */
        *timings = timing_local[0];
        *timings2 = timing_local[1];
-       
-       /* Set speed info in drive */
-       drive->current_speed = mode;    
-       if (!drive->init_speed)
-               drive->init_speed = mode;
 
        return 1;
 }
@@ -1793,11 +1790,6 @@ pmac_ide_udma_enable(ide_drive_t *drive, u16 mode)
        *timings = timing_local[0];
        *timings2 = timing_local[1];
 
-       /* Set speed info in drive */
-       drive->current_speed = mode;    
-       if (!drive->init_speed)
-               drive->init_speed = mode;
-
        return 1;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to