2010-05-25 18:28:17     Very strange networking issue on BF537

Document created by Aaronwu Employee on Aug 21, 2013
Version 1Show Document
  • View in full screen mode

2010-05-25 18:28:17     Very strange networking issue on BF537

Christiaan Brand (SOUTH AFRICA)

Message: 89848   

 

Hi,

 

I have a custom BF537 board designed from using the BF537-STAMP as reference design. The only real difference between the two is that my board only as 32MBs of SRAM (and the STAMP has 64MB).

 

Initially I tried compiling with an older kernel, when running make menuconfig I had (under board customizations) the option to manually specify the amount of RAM on the board. With the newest release (uClinux-dist-2009R1.1-RC4) that option seemed to have disappeard, so I built the BF537 BlueTechnix board which also has 32MBs of RAM.

 

I also use the BlueTechnix version of uBoot.

 

Now, my problem: Booting uBoot off the flash works just fine (I've loaded it on here after doing a UART Boot) - I can download a uClinux kernel using tftp and boot the linux kernel without any issues.

 

I can even run dhcpcd& and obtain an IP address for eth0 once uClinux is booted up. But this is where the fun stops: I can't get anything else network related to work on the board. Not even simple pings. If I run arp on the board, it just shows you that it hasn't even resolved the IP to a MAC yet.

 

Also, the TX packets on an "ifconfig" printout under ETH0 never increases. It just stays on the same value since doing the DHCP lease command. If I boot the board up and configure the IP address statically, the TX just stays 0, but the RX keeps climbing as random packets are received by the board from my network.

 

If I try to ping the board from a Windows XP host while the board is in uBoot still, I can see my PC gets an ARP response from the board, but as soon as uClinux is booted NO arp responses comes back.

 

Can this be a hardware issue? uBoot seems to work perfectly fine, and even in uClinux I can successfully lease an IP address from my DHCP server. But after this no communication seems possible.

 

Any ideas?

 

Thanks,

 

Christiaan

QuoteReplyEditDelete

 

 

2010-05-25 18:51:18     Re: Very strange networking issue on BF537

Mike Frysinger (UNITED STATES)

Message: 89849   

 

u-boot polls the MAC.  Linux uses interrupts.  check your phy<->mac interrupt lines.

 

if dhcpcd& is working, then how is your TX counts still 0 ?  dhcpcd sends out packets in order to work.  if you packet sniff with wireshark, do you see those packets going out ?

QuoteReplyEditDelete

 

 

2010-05-26 03:47:49     Re: Very strange networking issue on BF537

Christiaan Brand (SOUTH AFRICA)

Message: 89874   

 

Hi Mike,

 

If I use dhcpcd then TX count stays goes to 4 and stays there.

 

If I configure IP statically TX count stays on zero. With Wireshark there's also absolutely NO packets coming out of the board (apart from dhcpcd's packets which seems to work fine).

 

Is there a fundamentally different way in which dhcpcd handles the phy? I know it doesn't have to do ARP's since it broadcast the request out in FF:FF:FF:FF:FF:FF - maybe it's an issue with ARP on my board (due to an hardware issue perhaps)?

 

Can it still be the interrupt lines if packets are RECEIVED correctly by the board (I can see the RX counter increase if I broadcast packets on the subnet) and dhcpcd works correctly?

 

Regards,

 

Christiaan

QuoteReplyEditDelete

 

 

2010-05-26 04:07:56     Re: Very strange networking issue on BF537

Mike Frysinger (UNITED STATES)

Message: 89875   

 

only semi-uncommon thing dhcpcd would do is send broadcast packets.  all the rest should be pretty straight forward.

 

what is your MAC address currently ?  `ifconfig` should show it.

 

you can also try reading some of the bfin_mac MMRs directly via debugfs: /sys/kernel/debug/blackfin/

 

might be useful to run tcpdump on the blackfin board and make sure you can promiscuously dump all the incoming packets.  that'd further give pretty good confidence in the hw being OK.  then again, presumably the dhcp reply was processed correctly, so that should mean things are working there.

QuoteReplyEditDelete

 

 

2010-05-26 10:14:11     Re: Very strange networking issue on BF537

Christiaan Brand (SOUTH AFRICA)

Message: 89877   

 

Hi,

 

 

 

Here's the relevant output from ifconfig:

 

root:/> ifconfig

eth0      Link encap:Ethernet  HWaddr 00:AB:11:01:01:02

          inet addr:192.168.4.160  Bcast:192.168.4.255  Mask:255.255.255.0

          UP BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:1755 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:108778 (106.2 KiB)  TX bytes:0 (0.0 B)

 

I've set the MAC to this myself (through uBoot) - do you think this could be an issue? The uBoot I'm using is also a bit old. Could that be an issue?

 

 

 

Regards,

 

Christiaan

QuoteReplyEditDelete

 

 

2010-05-26 11:10:08     Re: Very strange networking issue on BF537

Christiaan Brand (SOUTH AFRICA)

Message: 89878   

 

This is the output from uBoot (before I download the kernel with TFTP) just for completeness:

 

 

 

U-Boot 2009.06-svn1987 (ADI-2009R2-pre) (Aug 13 2009 - 14:58:14)

 

CPU:   ADSP bf537-0.3 (Detected Rev: 0.2) (bypass boot)

Board: Bluetechnix CM-BF537E board

       Support:   www.bluetechnix.at/

Clock: VCO: 500 MHz, Core: 500 MHz, System: 125 MHz

RAM:   32 MB

Flash: ERROR: too many flash sectors // I don't think this is an issue. //

4 MB

In:    serial

Out:   serial

Err:   serial

Net:   Blackfin EMAC

MAC:   00:ab:11:01:01:02

Hit any key to stop autoboot:  0

bfin>

QuoteReplyEditDelete

 

 

2010-05-27 18:52:37     Re: Very strange networking issue on BF537

Mike Frysinger (UNITED STATES)

Message: 89929   

 

once linux has started, u-boot shouldnt matter.  your MAC does look sane.

 

there are some debug statements in the bfin_mac.c driver.  try adding #define DEBUG to the top of the file in the kernel and see what comes out when you try each networking step.

QuoteReplyEditDelete

 

 

2010-05-27 18:53:13     Re: Very strange networking issue on BF537

Mike Frysinger (UNITED STATES)

Message: 89930   

 

that flash error shouldnt matter, but it should be trivial to fix.  simply increase the flash sector define in your board config to however many sectors your flash has.

Attachments

    Outcomes