Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a530201afed5074dac69b29c519a1df59da97945
Commit:     a530201afed5074dac69b29c519a1df59da97945
Parent:     aea5d375600f132537adf45942c0fbdcd25eb995
Author:     Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
AuthorDate: Sat Jan 26 20:13:00 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Sat Jan 26 20:13:00 2008 +0100

    cy82c693: correct DMA modes clipping
    
    * Mask device DMA masks by ATA_{S,M}WDMA2 in cy82c693_ide_dma_on().
    
    * Remove clipping of DMA modes by id->tDMA in cy82c693_dma_enable():
      - id->tDMA may not be defined on newer devices
      - id->vendor6/id->tDMA word is in LE endianness
        (cy82c693 seems to be Alpha specific though)
    
    * Bump driver version.
    
    Acked-by: Sergei Shtylyov <[EMAIL PROTECTED]>
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 drivers/ide/pci/cy82c693.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/ide/pci/cy82c693.c b/drivers/ide/pci/cy82c693.c
index 1cd4e9c..e7466f2 100644
--- a/drivers/ide/pci/cy82c693.c
+++ b/drivers/ide/pci/cy82c693.c
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/ide/pci/cy82c693.c            Version 0.42    Oct 23, 2007
+ * linux/drivers/ide/pci/cy82c693.c            Version 0.43    Nov 7, 2007
  *
  *  Copyright (C) 1998-2000 Andreas S. Krebs ([EMAIL PROTECTED]), Maintainer
  *  Copyright (C) 1998-2002 Andre Hedrick <[EMAIL PROTECTED]>, Integrator
@@ -182,10 +182,7 @@ static void cy82c693_dma_enable (ide_drive_t *drive, int 
mode, int single)
 
        if (mode>2)     /* make sure we set a valid mode */
                mode = 2;
-                          
-       if (mode > drive->id->tDMA)  /* to be absolutly sure we have a valid 
mode */
-               mode = drive->id->tDMA;
-       
+
        index = (HWIF(drive)->channel==0) ? CY82_INDEX_CHANNEL0 : 
CY82_INDEX_CHANNEL1;
 
 #if CY82C693_DEBUG_LOGS
@@ -250,7 +247,10 @@ static int cy82c693_ide_dma_on (ide_drive_t *drive)
 
                        mmode = id->dma_mword & (id->dma_mword >> 8);
                        smode = id->dma_1word & (id->dma_1word >> 8);
-                                             
+
+                       mmode &= ATA_MWDMA2;
+                       smode &= ATA_SWDMA2;
+
                        if (mmode != 0) {
                                /* enable multi */
                                cy82c693_dma_enable(drive, (mmode >> 1), 0);
-
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