LC17 Ethernet: Ignore 4-bit versin number when checking for PHY ID match

This commit is contained in:
Gregory Nutt 2015-06-03 19:47:10 -06:00
parent 03562269d4
commit e816afe161

View File

@ -2688,12 +2688,18 @@ static inline int lpc17_phyinit(struct lpc17_driver_s *priv)
phyreg = (unsigned int)lpc17_phyread(phyaddr, MII_PHYID1);
nvdbg("Addr: %d PHY ID1: %04x\n", phyaddr, phyreg);
/* Compare OUI bits 3-18 */
if (phyreg == LPC17_PHYID1)
{
phyreg = lpc17_phyread(phyaddr, MII_PHYID2);
nvdbg("Addr: %d PHY ID2: %04x\n", phyaddr, phyreg);
if (phyreg == LPC17_PHYID2)
/* Compare OUI bits 19-24 and the 6-bit model number (ignoring the
* 4-bit revision number).
*/
if ((phyreg & 0xfff0) == LPC17_PHYID2)
{
break;
}