[U-Boot] smc911x: problem with if there is ethernet traffic

Raffaele Recalcati lamiaposta71 at gmail.com
Mon Oct 26 16:42:12 CET 2009


2009/10/26 Mike Frysinger <vapier at gentoo.org>:
> On Monday 26 October 2009 07:35:14 Raffaele Recalcati wrote:
>> I've customized the commit f67066b6b0740b826ed862615c5ab022aaf4779a
>> for my pxa255/smx911x (lan9118) board.
>> tftp works nice, also through a switch, but only if I'm not connected
>> to the LAN.
>
> you really need to be careful when throwing around general terms like "LAN"
> but you're really referring to specific things like "your company's internal
> intranet/LAN".  as soon as you connect computers together, you have a "LAN".

Ok, my company internal LAN is a setup very noisy with a lot of
multicast and broadcast messages.
Thanks for your advice anyway.


>
>> If I'm connected to the LAN of my company I have many timeout problems.
>
> which means the board is going to probably see a lot more packets which are
> not destined for it, so some slow down is to be expected
>
>> => tftp a2000000 uImage
>> smc911x: detected LAN9118 controller
>> smc911x: phy initialized .. BSR=0x782D
>> smc911x: phy initialized .. PHY special control status=0x1058
>> smc911x: MAC 00:03:50:00:a7:c5
>> Using smc911x-0 device
>> TFTP from server 10.39.10.114; our IP address is 10.39.10.183
>> Filename 'uImage'.
>> Load address: 0xa2000000
>> Loading: #####################################T
>>  ############################ ##############################T #T
>>  ################################## ###invalid RARP header
>> T ##T ###T ############################################T
> #############
>>          ##################################
>
> the TFTP implementation/protocol isnt perfect -- if one packet is missed
> because the hardware is processing unrelated ones, you're going to get a "T".
> that just means it was retransmitted.
>
> as for how much noise there actually is and whether there's anything the
> driver can do to negate it, that's something you'll have to investigate with
> wireshark (or similar network util).
>
> no idea about the RARP header.
> -mike
>

The workaround is to set
#define CONFIG_NET_RETRY_COUNT  100
I have download many times more than 1MB with a correct crc32.

Another important info is that in the same setup with u-boot 1.3.3 and
another smc911x.c driver
(C) Copyright 2005: Andy Sturges, STMicrolectronics <andy.sturges at st.com>
the tftp works well.
I have tried to make a diff, but the two drivers are too much different.

Than I have tried to investigate with wireshark with the actual
version and I have seen that, if server is 10.39.10.114 and u-boot is
10.39.10.183,  happen as below.
As can be seen 10.39.10.183 sends "Acknowledgement, Block: 19" twice.
So I have printed TftpBlock variable, but I dind't understand the reason.


No.     Time        Source                Destination           Protocol Info
    686 43.645131   10.39.10.114          10.39.10.183          TFTP
  Data Packet, Block: 19

Frame 686 (558 bytes on wire, 558 bytes captured)
Ethernet II, Src: Sony_7f:62:63 (00:1d:ba:7f:62:63), Dst:
BticinoS_00:a7:c5 (00:03:50:00:a7:c5)
Internet Protocol, Src: 10.39.10.114 (10.39.10.114), Dst: 10.39.10.183
(10.39.10.183)
User Datagram Protocol, Src Port: 35107 (35107), Dst Port: fotogcad (3878)
Trivial File Transfer Protocol
    Opcode: Data Packet (3)
    Block: 19
    Data (512 bytes)

No.     Time        Source                Destination           Protocol Info
    687 43.645943   10.39.13.9            10.39.15.255          NBNS
  Name query NB OGKW|{3NSKT.COM<00>

Frame 687 (92 bytes on wire, 92 bytes captured)
Ethernet II, Src: Dell_51:b6:d4 (00:14:22:51:b6:d4), Dst: Broadcast
(ff:ff:ff:ff:ff:ff)
Internet Protocol, Src: 10.39.13.9 (10.39.13.9), Dst: 10.39.15.255
(10.39.15.255)
User Datagram Protocol, Src Port: netbios-ns (137), Dst Port: netbios-ns (137)
NetBIOS Name Service

No.     Time        Source                Destination           Protocol Info
    688 43.646332   10.39.10.183          10.39.10.114          TFTP
  Acknowledgement, Block: 19

Frame 688 (60 bytes on wire, 60 bytes captured)
Ethernet II, Src: BticinoS_00:a7:c5 (00:03:50:00:a7:c5), Dst:
Sony_7f:62:63 (00:1d:ba:7f:62:63)
Internet Protocol, Src: 10.39.10.183 (10.39.10.183), Dst: 10.39.10.114
(10.39.10.114)
User Datagram Protocol, Src Port: fotogcad (3878), Dst Port: 35107 (35107)
Trivial File Transfer Protocol
    Opcode: Acknowledgement (4)
    Block: 19

No.     Time        Source                Destination           Protocol Info
    689 43.646373   10.39.10.114          10.39.10.183          TFTP
  Data Packet, Block: 20

Frame 689 (558 bytes on wire, 558 bytes captured)
Ethernet II, Src: Sony_7f:62:63 (00:1d:ba:7f:62:63), Dst:
BticinoS_00:a7:c5 (00:03:50:00:a7:c5)
Internet Protocol, Src: 10.39.10.114 (10.39.10.114), Dst: 10.39.10.183
(10.39.10.183)
User Datagram Protocol, Src Port: 35107 (35107), Dst Port: fotogcad (3878)
Trivial File Transfer Protocol
    Opcode: Data Packet (3)
    Block: 20
    Data (512 bytes)

No.     Time        Source                Destination           Protocol Info
    690 43.656930   Cisco_b1:cb:96        CDP/VTP/DTP/PAgP/UDLD DTP
  Dynamic Trunking Protocol

Frame 690 (60 bytes on wire, 60 bytes captured)
IEEE 802.3 Ethernet
Logical-Link Control
Dynamic Trunking Protocol

No.     Time        Source                Destination           Protocol Info
    691 43.656937   Cisco_b1:cb:96        CDP/VTP/DTP/PAgP/UDLD DTP
  Dynamic Trunking Protocol

Frame 691 (90 bytes on wire, 90 bytes captured)
ISL
IEEE 802.3 Ethernet
Logical-Link Control
Dynamic Trunking Protocol

No.     Time        Source                Destination           Protocol Info
    692 43.690282   Dell_75:49:0c         Broadcast             ARP
  Who has 10.39.13.254?  Tell 10.39.9.48

Frame 692 (60 bytes on wire, 60 bytes captured)
Ethernet II, Src: Dell_75:49:0c (00:14:22:75:49:0c), Dst: Broadcast
(ff:ff:ff:ff:ff:ff)
Address Resolution Protocol (request)

No.     Time        Source                Destination           Protocol Info
    693 43.782191   10.39.10.183          10.39.10.114          TFTP
  Acknowledgement, Block: 19

Frame 693 (60 bytes on wire, 60 bytes captured)
Ethernet II, Src: BticinoS_00:a7:c5 (00:03:50:00:a7:c5), Dst:
Sony_7f:62:63 (00:1d:ba:7f:62:63)
Internet Protocol, Src: 10.39.10.183 (10.39.10.183), Dst: 10.39.10.114
(10.39.10.114)
User Datagram Protocol, Src Port: fotogcad (3878), Dst Port: 35107 (35107)
Trivial File Transfer Protocol
    Opcode: Acknowledgement (4)
    Block: 19

No.     Time        Source                Destination           Protocol Info
    694 43.782219   10.39.10.114          10.39.10.183          TFTP
  Data Packet, Block: 20

Frame 694 (558 bytes on wire, 558 bytes captured)
Ethernet II, Src: Sony_7f:62:63 (00:1d:ba:7f:62:63), Dst:
BticinoS_00:a7:c5 (00:03:50:00:a7:c5)
Internet Protocol, Src: 10.39.10.114 (10.39.10.114), Dst: 10.39.10.183
(10.39.10.183)
User Datagram Protocol, Src Port: 35107 (35107), Dst Port: fotogcad (3878)
Trivial File Transfer Protocol
    Opcode: Data Packet (3)
    Block: 20
    Data (512 bytes)


More information about the U-Boot mailing list