Re: Fwd: Ehernet FEC problem in Coldfire M5272C3
Ashish Phogat <[email protected]>
| Newsgroups | gmane.linux.uclinux.devel |
|---|---|
| Message-ID | <CANNeobYq7b+9mvqfVY7Wi+XrqAgZ7cdiX=0vbkrLtfb3yT3M5w@mail.gmail.com> |
Hi greg,
I debug fec.c file in linux 2.4.x/drivers/net......................Here are
my observations:
When uclinux boots:
dhcp daemon is intiated from rc file:
"*dhcpcd -p -a eth0 &*"
which tries to open the ethernet port by calling:
*"fec_enet_open*" function.
In that function I found that
*"fep->link*" variable is never initiated to *1*
Based on my PHY as "*AM79C874" *and config options shown below:
#if defined(CONFIG_M5272)
#define M5272_PHY_STAT_INT
# if defined(CONFIG_BOARD_UC5272)
#define PHY_INT MCF_INT_INT6
#define PHY_START_ADDR 1
#define ICR_PHY_REG (MCF_MBAR + MCFSIM_ICR4)
#define ICR_PHY_MASK_IPL 0x77777777
# if defined(CONFIG_UC5272_PHY_INT)
#define ICR_PHY_MASK 0xFF0FFFFF
#define ICR_PHY_SETUP 0x00d00000
#define ICR_MASK_IP 0x00800000
# else /* CONFIG_UC5272_PHY_INT */
#undef M5272_PHY_STAT_INT
#define ICR_PHY_MASK 0xFFFFFFFF
#define ICR_PHY_SETUP 0x00000000
#define ICR_MASK_IP 0x00000000
# endif /* CONFIG_UC5272_PHY_INT */
# else /* CONFIG_BOARD_UC5272 */
# if defined(CONFIG_FEC_KS8995M)
#undef M5272_PHY_STAT_INT
#define PHY_START_ADDR 5
#define ICR_PHY_MASK 0xFFFFFFFF
#define ICR_PHY_SETUP 0x00000000
#define ICR_MASK_IP 0x00000000
# else /*CONFIG_FEC_KS8995M */
// These are values for ColdFire 5272 SIM
#define PHY_INT MCF_INT_INT2
#define PHY_START_ADDR 0
#define ICR_PHY_REG (MCF_MBAR + MCFSIM_ICR1)
#define ICR_PHY_MASK_IPL 0x77777777
#define ICR_PHY_MASK 0x70777777
#define ICR_MASK_IP 0x08000000
#define ICR_PHY_SETUP 0x0d000000
# endif /* CONFIG_FEC_KS8995M */
# endif /* CONFIG_BOARD_UC5272 */
#endif /* CONFIG_M5272 */
*
fep->link *is blocked by *
*
#if !defined( M5272_PHY_STAT_INT)
fep->link = 1; /* Always assume we are connected (no interrupt
to turn on/off link) */
#endif
It seems my link is never up.
Next Step I rebuild uclinux by initializing fep->link to 1 always
irrespective of any configuration.
But this time uclinux keep on starting transimission forever by calling
*"fec_enet_start_xmit" *function*
*
So I simply kill my "*dhcpcd -p -a eth0 &*" process
and up my ethernet connection by calling
*ifconfig eth0 192.168.0.5 netmask 255.255.255.0 up*
after that everything works fine.
I am able to ping my Linux machine.
I don't know whether some configuration is missed for AM79C874. I am not
sure how link is supposed to be up. Whether
I should assume to be up always or I have to wait for some interrupt/event
which will make my link up.
If you have anything on your side please let me know.
Thanks
Ashish Phogat
On Thu, Mar 28, 2013 at 1:15 PM, Ashish Phogat <[email protected]>wrote:
> Hi Greg,
> I am sorry I am new to linux...I donot know how to add traces. Could you
> please help me with that?
>
> Meanwhile I am trying to add few utilities in my uclinux such as
> mii-tool-fec, traceroute or ethtool.
>
> Lets see how much I am able to debug or get more information.
>
> Thanks for your help.
>
> Thanks
> Ashish Phogat
>
>
> On Thu, Mar 28, 2013 at 8:22 AM, Greg Ungerer <[email protected]>wrote:
>
>> Hi Ashish,
>>
>> On 28/03/13 21:57, Ashish Phogat wrote:
>> > I had a look at all the patches made for M5272C3 in cvs.org
>> > <http://cvs.org> for kernel 2.4.x in last couple of years. It seems all
>> > patches are included in my distribution (uClinux-dist-20120401.tar.bz2).
>> > I don't have idea why this error NETDEV WATCHDOG is still coming. I am
>> > running at 50Mhz clock frequency. Is there any problem with frequency?
>>
>> No, I don't think that will cause you any problems.
>>
>> From the interrupt count it doesn't look like you are getting any TX
>> interrupts from the FEC. This will cause the NETDEV WATCHDOG to
>> eventually timeout and you get the kernel trace you see.
>>
>> You are getting "other" interrupts from the FEC - I think you should
>> add some trace and see what those are. Maybe they will give some
>> clues.
>>
>> Regards
>> Greg
>>
>>
>> > On Wed, Mar 27, 2013 at 6:24 PM, Ashish Phogat
>> > <[email protected] <mailto:[email protected]>> wrote:
>> >
>> > Hi Greg,
>> > When I did cat proc/interrupts:
>> >
>> > /> cat /proc/interrupts
>> > 66: 0 fec(MII)
>> > 72: 3393 ColdFire Timer
>> > 73: 1084 ColdFire UART
>> > 74: 0 ColdFire UART
>> > 77: 0 ColdFire USB (EP0)
>> > 78: 0 ColdFire USB (EP1)
>> > 79: 0 ColdFire USB (EP2)
>> > 80: 0 ColdFire USB (EP3)
>> > 81: 0 ColdFire USB (EP4)
>> > 82: 0 ColdFire USB (EP5)
>> > 83: 0 ColdFire USB (EP6)
>> > 84: 0 ColdFire USB (EP7)
>> > 86: 0 fec(RX)
>> > 87: 0 fec(TX)
>> > 88: 13 fec(OTHER)
>> > 89: 0 ColdFire QSPI
>> >
>> > Thanks
>> > Ashish phogat
>> >
>> > On Wed, Mar 27, 2013 at 7:55 AM, Greg Ungerer
>> > <[email protected] <mailto:[email protected]>>
>> wrote:
>> >
>> > Hi Ashish,
>> >
>> > On 27/03/13 06:12, Ashish Phogat wrote:
>> > > My Kernel is 2.4.34.5 and uClinux-dist is
>> > uClinux-dist-20120401.tar.bz2.
>> >
>> > Ok. I haven't run 2.4 kernels for a long time... but some
>> > comments
>> > below.
>> >
>> >
>> > > > /> NETDEV WATCHDOG: eth0: transmit timed out
>> > > > eth0: transmit timed out.
>> > > > Ring data dump: cur_tx 321100, dirty_tx 321100
>> > cur_rx: 321000
>> > > > tx: 16 buffers
>> > > > 00321100: 0000 0012 00000000
>> > > > 00321108: 0000 0816 00000000
>> > > > 00321110: 0000 001a 00000000
>> > > > 00321118: 0000 0c1e 00000000
>> > > > 00321120: 0000 0432 00000000
>> > > > 00321128: 0000 40a6 00000000
>> > > > 00321130: 0000 002a 00000000
>> > > > 00321138: 0000 002e 00000000
>> > > > 00321140: 0000 0032 00000000
>> > > > 00321148: 0000 0036 00000000
>> > > > 00321150: 0000 003a 00000000
>> > > >
>> > > > rx: 32 buffers
>> > > > 00321000: 8000 0440 00320000
>> > > > 00321008: 8000 0c70 00320800
>> > > > 00321010: 8000 092b 0037f000
>> > > > 00321018: 8000 ff9a 0037f800
>> > > > 00321020: 8000 7fa2 0037e000
>> > > > 00321028: 8000 eda6 0037e800
>> > > > 00321030: 8000 ffa2 0037d000
>> > > > 00321038: 8000 ffa6 0037d800
>> > > > 00321040: 8000 ffb2 0037c000
>> > > > 00321048: 8000 ffb6 0037c800
>> > > > 0032
>> > > >
>> > > > Spurious interrupt 1
>> >
>> > Together this looks like an interrupt issue. What do you see
>> > if you "cat /proc/interrupts"?
>> >
>> > Regards
>> > Greg
>> >
>> >
>> > > >
>> > > > uclinux simply hangs there. I found that there is a
>> > large amount
>> > > of people who are getting the same problem in past
>> > couple of years.
>> > > But I did not get any solution for the problem.
>> > > >
>> > > > Please let me know whether this problem still exists
>> > in uclinux
>> > > source code for M5272C3. where I will find the
>> > solution for that?
>> > > >
>> > > > My Ethernet Hardware Info:
>> > > > fec.c: Probe number 1 with 0x0000
>> > > > eth0: FEC ENET Version 0.2, 00:e0:0c:bc:e5:60
>> > > > fec: PHY @ 0x1, ID 0x0022561b -- AM79C874
>> > > >
>> > > > Thanks and Appreciated for your help.
>> > > >
>> > > > Thanks
>> > > > Ashish Phogat
>> > > >
>> > > >
>> > > > _______________________________________________
>> > > > uClinux-dev mailing list
>> > > > [email protected]
>> > <mailto:[email protected]>
>> > <mailto:[email protected]
>> > <mailto:[email protected]>>
>> > > >
>> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
>> > > > This message was resent by [email protected]
>> > <mailto:[email protected]>
>> > > <mailto:[email protected]
>> > <mailto:[email protected]>>
>> > > > To unsubscribe see:
>> > > >
>> http://mailman.uclinux.org/mailman/options/uclinux-dev
>> > > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > > _______________________________________________
>> > > uClinux-dev mailing list
>> > > [email protected] <mailto:[email protected]>
>> > > http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
>> > > This message was resent by [email protected]
>> > <mailto:[email protected]>
>> > > To unsubscribe see:
>> > > http://mailman.uclinux.org/mailman/options/uclinux-dev
>> > >
>> >
>> >
>> >
>> > _______________________________________________
>> > uClinux-dev mailing list
>> > [email protected] <mailto:[email protected]>
>> > http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
>> > This message was resent by [email protected]
>> > <mailto:[email protected]>
>> > To unsubscribe see:
>> > http://mailman.uclinux.org/mailman/options/uclinux-dev
>> >
>> >
>> >
>> >
>> > --
>> > N Natarajan
>> > http://science-of-good-living.blogspot.com/
>> > http://science-of-spirituality.blogspot.com/
>> >
>> http://sprituality-is-knowledge.blogspot.in/2011/09/stories-that-explain-knowledge.html
>> >
>> >
>> > _______________________________________________
>> > uClinux-dev mailing list
>> > [email protected] <mailto:[email protected]>
>> > http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
>> > This message was resent by [email protected]
>> > <mailto:[email protected]>
>> > To unsubscribe see:
>> > http://mailman.uclinux.org/mailman/options/uclinux-dev
>> >
>> >
>> >
>> >
>> > _______________________________________________
>> > uClinux-dev mailing list
>> > [email protected]
>> > http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
>> > This message was resent by [email protected]
>> > To unsubscribe see:
>> > http://mailman.uclinux.org/mailman/options/uclinux-dev
>> >
>>
>>
>
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev