Work around below if anyone is interested
>>On Fri, Aug 05, 2011 at 11:22:28AM +1000, Greg Ungerer wrote: >> The FEC driver is now also used by some of the ARM based Freescale iMX >> parts. So some changes have been required over the last couple of >> years :-) >> >> It also now uses phylib, and doesn't have its own phy specific support >> code in the driver. That caused me to have to fix things for some >> boards, like a 5272 board that had a switch connected - sort of like >> what you have. In that case I had to select and setup to use a fixed >> phy. >> >> I don't recall off hand which kernel switched the FEC driver to using >> phylib, so you may wan to check that first. But from the messages you >> report above I am pretty sure that is what 2.6.37-uc0 is using. >The change was from 2.6.29 to 2.6.30. Which is why we are still running >2.6.29. Just haven't got around to porting our FEC hacks to the new driver >yet. > >-- >Len Sorensen Thank you Len and Greg, I don't have solid understanding of what is happening in the fec driver and therefore don't really know the proper way to change the behavior so I won't submit a patch, but if anyone runs into a similar situation here is a possible workaround (maybe save someone else some head scratching if they search the thread): In "static int fec_enet_mii_probe(struct net_device *dev)" in fec.c ... /* check for attached phy */ for (phy_id = 0; (phy_id < PHY_MAX_ADDR); phy_id++) { if ((fep->mii_bus->phy_mask & (1 << phy_id))) continue; if (fep->mii_bus->phy_map[phy_id] == NULL) continue; if (fep->mii_bus->phy_map[phy_id]->phy_id == 0) continue; strncpy(mdio_bus_id, fep->mii_bus->id, MII_BUS_ID_SIZE); break; } if (phy_id >= PHY_MAX_ADDR) { printk(KERN_INFO "%s: no PHY, assuming direct connection " "to switch\n", dev->name); strncpy(mdio_bus_id, "0", MII_BUS_ID_SIZE); // first part of 1:xx phy_id = 0; // second part of x:01,x:02..etc } // HACK Start HERE // phy_id = 0; // Doesn't exist // phy_id = 1; // "Right" port of Micrel KSZ8873MLL // phy_id = 2; // "Left" port of Micrel KSZ8873MLL // phy_id = 3; // Both ports of Micrel KSZ8873MLL // fep->mii_bus->phy_map[1] = 81D8FA00 //? // fep->mii_bus->phy_map[2] = 81D8FC00 //? // fep->mii_bus->phy_map[3] = 81D8FE00 //? // However the // fep->mii_bus->phy_map[1,2,OR3]->phy_id= 0x00221430 // This is the actual phy ID of the Micrel KSZ8873MLL // THUS the hack "work around": if(fep->mii_bus->phy_map[phy_id]->phy_id==0x00221430) // This is the Micrel KSZ8873MLL phy_id=3; // Hack to use both of the ports on this Micrel KSZ8873MLL // End of hack snprintf(phy_name, MII_BUS_ID_SIZE, PHY_ID_FMT, mdio_bus_id, phy_id); ... Ugly I know but maybe useful to someone. Regards, IMPORTANT NOTICE: This communication, including any attachments, is the property of FreeWave Technologies, Inc. and may contain proprietary, confidential, or privileged information. Unauthorized use or disclosure of this communication is strictly prohibited and may be unlawful. Information contained herein may be subject to a Proprietary Information / Non-Disclosure Agreement and shall be maintained in confidence and not disclosed to third parties without the written consent of FreeWave Technologies, Inc. If you have received this communication in error, please immediately notify the sender and destroy all copies of the communication and any attachments. _______________________________________________ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev