All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Mark Lord <liml@rtr.ca>
Cc: IDE/ATA development list <linux-ide@vger.kernel.org>,
	Tejun Heo <htejun@gmail.com>, Alan Cox <alan@redhat.com>,
	Ric Wheeler <ric@emc.com>
Subject: Re: [PATCH] 2.6.21 fix lba48 bug in libata fill_result_tf()
Date: Wed, 04 Apr 2007 02:08:31 -0400	[thread overview]
Message-ID: <461340DF.60508@pobox.com> (raw)
In-Reply-To: <46116593.6050609@rtr.ca>

Mark Lord wrote:
> Tejun,
> 
> Current 2.6.21 libata does the following:
> 
> void ata_tf_read(struct ata_port *ap, struct ata_taskfile *tf)
> {
>        struct ata_ioports *ioaddr = &ap->ioaddr;
> 
>        tf->command = ata_check_status(ap);
>     ...
>        if (tf->flags & ATA_TFLAG_LBA48) {
>                iowrite8(tf->ctl | ATA_HOB, ioaddr->ctl_addr);
>                tf->hob_feature = ioread8(ioaddr->error_addr);
>                ...
>        }
> }
> ...
> static void fill_result_tf(struct ata_queued_cmd *qc)
> {
>        struct ata_port *ap = qc->ap;
> 
>        ap->ops->tf_read(ap, &qc->result_tf);
>        qc->result_tf.flags = qc->tf.flags;
> }
> 
> Based on this, those last two statements fill_result_tf()
> appear to me to be in the wrong order, in that the tf->flags
> are uninitialized at the point where tf_read() is invoked.
> So for lba48 commands, tf_read() won't be reading back the
> full lba48 register contents..
> 
> Correct?
> 
> This patch corrects fill_result_tf() so that the flags
> get copied to result_tf before they are used by tf_read().
> 
> Signed-off-by:  Mark Lord <mlord@pobox.com>

applied



      parent reply	other threads:[~2007-04-04  6:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-02 20:20 [PATCH] 2.6.21 fix lba48 bug in libata fill_result_tf() Mark Lord
2007-04-02 21:44 ` Mark Lord
2007-04-03 11:54   ` Tejun Heo
2007-04-03 15:29     ` Mark Lord
2007-04-04  6:08 ` Jeff Garzik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=461340DF.60508@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=alan@redhat.com \
    --cc=htejun@gmail.com \
    --cc=liml@rtr.ca \
    --cc=linux-ide@vger.kernel.org \
    --cc=ric@emc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.