linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Lord <liml@rtr.ca>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: IDE/ATA development list <linux-ide@vger.kernel.org>
Subject: Re: [PATCH 02/03] sata_mv: PHY_MODEx errata fixes
Date: Fri, 30 May 2008 19:20:51 -0400	[thread overview]
Message-ID: <48408BD3.5070006@rtr.ca> (raw)
In-Reply-To: <48407B79.4090303@pobox.com>

Jeff Garzik wrote:
> Mark Lord wrote:
>> Fix and update the errata handling for the PHY_MODEx registers.
>> This improves receiver noise tolerance, among other things.
..
>> +        /* enforce bit restrictions on GenIIe devices */
>> +        if (IS_GEN_IIE(hpriv))
>> +            m4 = (m4 & ~0x5DE3FFFC) | (1 << 2);
> 
> can this magic number become a named constant?  do we know the bits, can 
> they be broken out and enumerated?
..

Heh..

I simply copied it over from the Marvell driver,
and the folks at Marvell ack'd it without responding
to my request for a pointer to an errata doc somewhere.

But as it turns out, I do have something here that describes it.
The code seems to be just masking away all of the reserved bits,
which need to be written as zeros on every access.
Except for reserved bit2, which has to be written as 1 on every write.

I'll break that up into a pair of suitable constants.
So it will look something like this, after passing it by Marvell:

	if (IS_GEN_IIE(hpriv))
		m4 = (m4 & ~PHY_MODE4_RSVD_ZEROS) | PHY_MODE4_RSVD_ONES;

How's that look to you?

Cheers




  reply	other threads:[~2008-05-30 23:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-27 21:54 [PATCH 01/03] sata_mv: move SOC_FLAG to hpriv Mark Lord
2008-05-27 21:56 ` [PATCH 02/03] sata_mv: PHY_MODEx errata fixes Mark Lord
2008-05-27 21:58   ` [PATCH 03/03] sata_mv: nuke unreleased GenIIe revisions Mark Lord
2008-05-28 16:01     ` [PATCH 04/04] sata_mv: workaround for 60x1 errata sata13 Mark Lord
2008-05-28 17:41       ` [PATCH 05/05] sata_mv: implement SoC guideline SATA_S11 Mark Lord
2008-05-30 22:11   ` [PATCH 02/03] sata_mv: PHY_MODEx errata fixes Jeff Garzik
2008-05-30 23:20     ` Mark Lord [this message]
2008-05-31 20:46     ` [PATCH 01/01] sata_mv: PHY_MODE4 cleanups Mark Lord
2008-06-04 10:29       ` Jeff Garzik
2008-05-30 22:10 ` [PATCH 01/03] sata_mv: move SOC_FLAG to hpriv Jeff Garzik

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=48408BD3.5070006@rtr.ca \
    --to=liml@rtr.ca \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    /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).