Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fe36cb53cfd82f3c0796a0826e1c9caf198c8f97
Commit:     fe36cb53cfd82f3c0796a0826e1c9caf198c8f97
Parent:     f3a03b0934fb83a030ccd3e6f1fbe845a9c44d49
Author:     Petr Vandrovec <[EMAIL PROTECTED]>
AuthorDate: Fri Jul 20 07:44:44 2007 -0400
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Jul 20 07:44:44 2007 -0400

    [libata] Fix reported task file values in sense data
    
    ata_tf_read was setting HOB bit when lba48 command was submitted, but
    was not clearing it before reading "normal" data.  As it is only place
    which sets HOB bit in control register, and register reads should not
    be affected by other bits, let's just clear it when we are done with
    reading upper bytes so non-48bit commands do not have to touch ctl
    at all.
    
    pata_scc suffered from same problem...
    
    Signed-off-by: Petr Vandrovec <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/ata/libata-sff.c |    2 ++
 drivers/ata/pata_scc.c   |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 1190c67..6c289c7 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -211,6 +211,8 @@ void ata_tf_read(struct ata_port *ap, struct ata_taskfile 
*tf)
                tf->hob_lbal = ioread8(ioaddr->lbal_addr);
                tf->hob_lbam = ioread8(ioaddr->lbam_addr);
                tf->hob_lbah = ioread8(ioaddr->lbah_addr);
+               iowrite8(tf->ctl, ioaddr->ctl_addr);
+               ap->last_ctl = tf->ctl;
        }
 }
 
diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c
index c0ffbed..36cdbd2 100644
--- a/drivers/ata/pata_scc.c
+++ b/drivers/ata/pata_scc.c
@@ -363,6 +363,8 @@ static void scc_tf_read (struct ata_port *ap, struct 
ata_taskfile *tf)
                tf->hob_lbal = in_be32(ioaddr->lbal_addr);
                tf->hob_lbam = in_be32(ioaddr->lbam_addr);
                tf->hob_lbah = in_be32(ioaddr->lbah_addr);
+               out_be32(ioaddr->ctl_addr, tf->ctl);
+               ap->last_ctl = tf->ctl;
        }
 }
 
-
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