Problems with PHY on STK5200
Hi, I'm trying to compile a recent kernel from DENX "linuxppc_2_4_devel" for my STK5200 using ELDK 3.1.1. It seems that the current kernel there is not configuring the PHY. It looks like the link is configured for full-duplex (although it should be configured half-duplex). There is no informative output about the PHY after the line eth0: Phy @ 0x0, type LXT971 (0x001378e2) --- I have traced this change of behaviour back to a commit on 2005-09-04 22:41:06. This is a major restructuring/rework of the file "arch/ppc/5xxx_io/fec.c". BTW: What is the normal way to reference a commit in a git-repository? I haven't seen any revision numbers. The versions also show different program flow (with MPC5xxx_FEC_DEBUG set to 2). The old version goes: - mpc5xxx_fec_init() - mpc5xxx_fec_restart() - PHY gets identified here - mpc5xxx_fec_open() - autonegotiation here - mpc5xxx_fec_restart() The new one goes - mpc5xxx_fec_init() - mpc5xxx_fec_open() - mpc5xxx_fec_restart() - PHY gets identified here The new version has some bad (or at least dead) code in the funtion mpc5xxx_fec_setup(). However, I don't understand enough of the drivers design to see how to fix this. Can anybody explain what the driver should to? Or even better has some patch to make it work? Thanks in advance /Jan-Hinnerk Dumjahn ___ Linuxppc-embedded mailing list Linuxppc-embedded@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Re: Problems with PHY on STK5200
In message <[EMAIL PROTECTED]> you wrote: > > I'm trying to compile a recent kernel from DENX "linuxppc_2_4_devel" for my > STK5200 using ELDK 3.1.1. It should compile and run fine. > It seems that the current kernel there is not configuring the PHY. It looks > like the link is configured for full-duplex (although it should be configured > half-duplex). What makes you think it should be half duplex only? > BTW: What is the normal way to reference a commit in a git-repository? I > haven't seen any revision numbers. You specify the git commit ID. > Can anybody explain what the driver should to? Or even better has some patch > to make it work? The driver should work :-) And it certainly does for me. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk Office: Kirchenstr. 5, D-82194 Groebenzell,Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED] Is not that the nature of men and women -- that the pleasure is in the learning of each other? -- Natira, the High Priestess of Yonada, "For the World is Hollow and I Have Touched the Sky", stardate 5476.3. ___ Linuxppc-embedded mailing list Linuxppc-embedded@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Re: Problems with PHY on STK5200
On Thursday 01 March 2007 19:57, Wolfgang Denk wrote: > In message <[EMAIL PROTECTED]> you wrote: > > I'm trying to compile a recent kernel from DENX "linuxppc_2_4_devel" for > > my STK5200 using ELDK 3.1.1. > > It should compile and run fine. It is compiling fine and it is basically working, but I get lot of receive errors on the link, making it (almost) unusable for NFS root file system. If I connect the STK5200 directly to my workstation using a crossover cable, everything works fine. > > It seems that the current kernel there is not configuring the PHY. It > > looks like the link is configured for full-duplex (although it should be > > configured half-duplex). > > What makes you think it should be half duplex only? The old version (up to and including cc891b92c2540487be1eeba4b5d38c913570d339) is negotiating half duplex. My linux workstation is also using half duplex if plugged into the same hub (a D-Link DFE-905DX). However, I'm not 100% sure that the PHY on STK5200 is operating with full-duplex, because the link status is not reported by the kernel. > > BTW: What is the normal way to reference a commit in a git-repository? I > > haven't seen any revision numbers. > > You specify the git commit ID. I hope the number above is a commit-ID... > > Can anybody explain what the driver should to? Or even better has some > > patch to make it work? > > The driver should work :-) And it certainly does for me. It certainly doesn't work for me ;-( All least newer versions of the kernel don't register "mdio_timer_callback()". So, link up report isn't working. This is caused by two occurences of the following code in mpc5xxx_fec_setup(). if(!reinit) { ... if(reinit) { ... } ... } Nevertheless, the MDIO-code is doing something useful. Without CONFIG_USE_MDIO I don't get a single packet through the network interface (using either hub or crossover-cable). I'm willing to do further tests and provide more information. However, I need some advice on the direction, because I don't understand enough of the code, yet. Best regards, Jan-Hinnerk Dumjahn ___ Linuxppc-embedded mailing list Linuxppc-embedded@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Re: Problems with PHY on STK5200
On Monday 05 March 2007 17:12, Jan-Hinnerk Dumjahn wrote: > On Thursday 01 March 2007 19:57, Wolfgang Denk wrote: > > In message <[EMAIL PROTECTED]> you wrote: [...] > > > Can anybody explain what the driver should to? Or even better has some > > > patch to make it work? > > > > The driver should work :-) And it certainly does for me. > > It certainly doesn't work for me ;-( > > All least newer versions of the kernel don't register > "mdio_timer_callback()". So, link up report isn't working. > This is caused by two occurences of the following code in > mpc5xxx_fec_setup(). > > if(!reinit) { > ... > if(reinit) { > ... > } > ... > } I've done some more analysis: the following is a list of code/data in "fec.c" that is never used: - lines 936-950 (if-clause) - lines 1035-1069 (if-clause) - mdio_timer_callback() - mpc5xxx_fec_link_up() - mii_display_status() - phy_cmd_config - mii_queue_config() - mii_display_config() - mii_do_cmd() BTW: What is the status of the code guarded by CONFIG_USE_MDIO_NOT_YET? Best regards Jan-Hinnerk Dumjahn ___ Linuxppc-embedded mailing list Linuxppc-embedded@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-embedded