Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5c9a76118d24f044b8d8ee721dbbf4e5c7db3dbb
Commit:     5c9a76118d24f044b8d8ee721dbbf4e5c7db3dbb
Parent:     2bfc3611bd91986ed2b979a7f536c52751c8ac8f
Author:     Alan <[EMAIL PROTECTED]>
AuthorDate: Sat Dec 16 14:32:21 2006 +0000
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Sat Dec 16 10:46:21 2006 -0500

    [PATCH] pata_via: Cable detect error
    
    The UDMA66 VIA hardware has no controller side cable detect bits we can
    use. This patch minimally fixes the problem by reporting unknown in this
    case and using drive side detection.
    
    The old drivers/ide code does some additional tricks but those aren't
    appropriate now we are in -rc.
    
    Without this update UDMA66 via controllers run slowly. They don't fail so
    it's a borderline call whether this is -rc material or not.
    
    Signed-off-by: Alan Cox <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/ata/pata_via.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
index cc09d47..ff93e8f 100644
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -161,10 +161,15 @@ static int via_pre_reset(struct ata_port *ap)
                        return -ENOENT;
        }
 
-       if ((config->flags & VIA_UDMA) >= VIA_UDMA_66)
+       if ((config->flags & VIA_UDMA) >= VIA_UDMA_100)
                ap->cbl = via_cable_detect(ap);
-       else
+       /* The UDMA66 series has no cable detect so do drive side detect */
+       else if ((config->flags & VIA_UDMA) < VIA_UDMA_66)
                ap->cbl = ATA_CBL_PATA40;
+       else
+               ap->cbl = ATA_CBL_PATA_UNK;
+               
+
        return ata_std_prereset(ap);
 }
 
-
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