From: Xie Shaohui-B21989 <B21989@freescale.com>
To: Sergei Shtylyov <sshtylyov@mvista.com>
Cc: "jgarzik@pobox.com" <jgarzik@pobox.com>,
"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"David.Laight@ACULAB.COM" <David.Laight@ACULAB.COM>,
Bhartiya Anju-B07263 <B07263@freescale.com>
Subject: RE: [PATCH] [v2] sata_fsl: add workaround for data length mismatch on freescale V2 controller
Date: Thu, 6 Sep 2012 11:57:37 +0000 [thread overview]
Message-ID: <ED492CCEAF882048BC2237DE806547C9079D3C6C@039-SN2MPN1-012.039d.mgd.msft.net> (raw)
In-Reply-To: <504888F8.5060907@mvista.com>
> >
> > hstatus = ioread32(hcr_base + HSTATUS);
> >
> > sata_fsl_scr_read(&ap->link, SCR_ERROR, &SError);
> >
> > + /* Read command completed register */
> > + done_mask = ioread32(hcr_base + CC);
> > +
> > + /* Workaround for data length mismatch errata */
> > + if (unlikely(hstatus & INT_ON_DATA_LENGTH_MISMATCH)) {
> > + for (tag = 0; tag < ATA_MAX_QUEUE; tag++) {
> > + qc = ata_qc_from_tag(ap, tag);
> > + if (qc && ata_is_atapi(qc->tf.protocol)) {
> > + u32 Hcontrol;
>
> No uppercase in variable names please.
[S.H] OK.
Besides, you have 'hstatus'
> variable already and that would be inconsistent.
[S.H] Yes, but I ignored fatal error and device error, so this won't be an issue.
>
> > +#define HCONTROL_CLEAR_ERROR (1 << 27)
> > + /* Set HControl[27] to clear error registers */
> > + Hcontrol = ioread32(hcr_base + HCONTROL);
> > + iowrite32(Hcontrol | HCONTROL_CLEAR_ERROR,
> > + hcr_base + HCONTROL);
> > +
> > + /* Clear HControl[27] */
> > + iowrite32(Hcontrol & (~HCONTROL_CLEAR_ERROR),
>
> Parens not needed around ~HCONTROL_CLEAR_ERROR.
[S.H] OK.
Best Regards,
Shaohui Xie
prev parent reply other threads:[~2012-09-06 11:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-06 4:28 [PATCH] [v2] sata_fsl: add workaround for data length mismatch on freescale V2 controller Shaohui Xie
2012-09-06 11:28 ` Sergei Shtylyov
2012-09-06 11:57 ` Xie Shaohui-B21989 [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=ED492CCEAF882048BC2237DE806547C9079D3C6C@039-SN2MPN1-012.039d.mgd.msft.net \
--to=b21989@freescale.com \
--cc=B07263@freescale.com \
--cc=David.Laight@ACULAB.COM \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=sshtylyov@mvista.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).