Re: [PATCH 02/03] sata_mv: PHY_MODEx errata fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux