ethernet doesn't work out of the box

Bug #1097265 reported by Fathi Boudra
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Arndale
Fix Released
Medium
Tushar Behera
Linaro Image Tools
Fix Released
Undecided
Fathi Boudra
Linaro Ubuntu
Fix Released
Undecided
Fathi Boudra
linaro-landing-team-samsung
Fix Released
Medium
Tushar Behera

Bug Description

at the moment, ethernet doesn't work out of the box. we need to set up MAC address.
It's a blocker for LAVA.

Related branches

Revision history for this message
Rony Nandy (rony-nandy) wrote :

To enable networking in the current scenatio:the user needs to type
 ifconfig eth0 hw ether 00:40:5c:26:0a:5b
ifconfig eth0 192.168.0.30 up
route add default gw 192.168.0.10 eth0

in the command prompt.

Now,these commands can also be put in bashrc so that they get executed during booting or have them in /etc/networking/interfaces. We can give appropriate commands for DHCP also.

This anyway has nothing to do with the kernel.We will have to resolve it in the filesystem.
Is it possible to have the above commands in the filesystem which is on a daily build?

Revision history for this message
Fathi Boudra (fboudra) wrote :

adding a random ethernet MAC address isn't a common practice so ethernet doesn't work out of the box.
the workaround in the filesystem isn't an option, they should be board agnostic.

Fathi Boudra (fboudra)
Changed in u-boot-linaro:
assignee: nobody → John Rigby (jcrigby)
milestone: none → 13.01
Fathi Boudra (fboudra)
Changed in u-boot-linaro:
status: New → Triaged
Changed in arndale:
status: New → Confirmed
Revision history for this message
Fathi Boudra (fboudra) wrote :

I've added ethact/ethaddr to U-Boot env in Arndale hardware pack.

Changed in linaro-image-tools:
assignee: nobody → Fathi Boudra (fboudra)
milestone: none → 2013.01
status: New → In Progress
Fathi Boudra (fboudra)
Changed in linaro-image-tools:
status: In Progress → Fix Committed
Fathi Boudra (fboudra)
no longer affects: u-boot-linaro
Changed in arndale:
status: Confirmed → Fix Released
Changed in linaro-image-tools:
status: Fix Committed → Fix Released
Revision history for this message
Rony Nandy (rony-nandy) wrote :

Setting MAC address

MAC address can be set in sromc-bus node of the smdk5250 device tree file.

Add the directive local-mac-address to the sromc-bus node in the file arch/arm/boot/dts/exynos5250-smdk5250.dts

 sromc-bus {
           lan9215@1,0 {
                 compatible = "smsc,lan9215", "smsc,lan9115";
                 reg = <1 0 0x20000>;
                 interrupts = <5 0>;
                 interrupt-parent = <&wakeup_eint>;
                 phy-mode = "mii";
                 smsc,irq-push-pull;
                 smsc,force-internal-phy;
                 local-mac-address = [ mac address ];
          };
  };

Please try this method to fix the mac address for the kernel. Some of the numbers might be different though as this is used for the Exynos5 board.

Revision history for this message
Rony Nandy (rony-nandy) wrote :

the above method is for fixing mac for the kernel

Revision history for this message
Fathi Boudra (fboudra) wrote :

Just for the record:

U-boot always set the same mac address so that's fine and get the ethernet to work out of the box.
But then kernel boots and asix driver is loaded.
The driver tries to read the mac address but fails:
asix 1-3.2.4:1.0 (unregistered net_device): invalid hw address, using random

the driver fallback is to assign a random mac address.
after several reboots, my dhcpd lease was full...

As suggested by Rony on comment #4, I'm going to try the local-mac-address directive.

Changed in linaro-linux-baseline:
milestone: none → 13.02
Revision history for this message
Fathi Boudra (fboudra) wrote :

Fixed with an udev rule:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0b95", ATTRS{idProduct}=="772a", ATTRS{serial}=="000001", ATTRS{product}=="AX88772 ", RUN+="/sbin/ifconfig %k hw ether 00:40:5c:26:0a:5b"

no longer affects: linaro-landing-team-samsung
no longer affects: linaro-linux-baseline
Revision history for this message
warmcat (andy-warmcat) wrote :

That approach won fly with Lava deployment... do we know if there is a GUID in the SoC somewhere, as there was with OMAP?

Fathi Boudra (fboudra)
Changed in arndale:
status: Fix Released → In Progress
Changed in linaro-image-tools:
status: Fix Released → In Progress
milestone: 2013.01 → 2013.02
Changed in linaro-ubuntu:
assignee: nobody → Fathi Boudra (fboudra)
Changed in linaro-image-tools:
status: In Progress → Fix Released
Changed in linaro-ubuntu:
status: New → Triaged
milestone: none → 13.02
Changed in linaro-image-tools:
milestone: 2013.02 → 2013.01
Revision history for this message
Tushar Behera (tusharbehera) wrote :

There is no GUID on EXYNOS5250 that can store an unique ID for each SoC.

Since the MAC address is hardcoded in the u-boot, how about appending the MAC address to bootargs during booting and parsing that in the ASIX driver.

A solution regarding the same has been pushed into linux-linaro (kernel) and u-boot-linaro-stable (u-boot) trees.

Verified this to be working with hwpack and pxeboot. Would appreciate if someone else can test and confirm whether that works.

Changed in arndale:
assignee: nobody → Tushar Behera (tusharbehera)
importance: Undecided → Medium
Changed in linaro-landing-team-samsung:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Tushar Behera (tusharbehera)
milestone: none → 2013.02
Revision history for this message
Tushar Behera (tusharbehera) wrote :

I was wrong in quoting that there is no GUID register for EXYNOS5250. There are a couple of registers for that purpose.

I will add code to read those registers and update MAC address. The MAC address then would be passed to the kernel using a command line parameter 'mac=' and would be parsed in ASIX driver.

Revision history for this message
warmcat (andy-warmcat) wrote :

Cool... that'll save a lot of headaches. FYI there's a MAC space that is "locally administered", you just make sure one bit is set and the generated address can't conflict with registered ones

http://en.wikipedia.org/wiki/MAC_address#Address_details

it's the MAC address equivalent of 10.x.x.x IP address range

Revision history for this message
Tushar Behera (tusharbehera) wrote :

Thanks for the information. Then setting 'mac[0] |= 0x2' should just force it to a 'locally administered' address.

Revision history for this message
warmcat (andy-warmcat) wrote :

Right... you also have to make sure it's not marked up as multicast

        /* mark it as not multicast and outside official 80211 MAC namespace */

        mac[0] = (mac[0] & ~1) | 2;

Changed in linaro-landing-team-samsung:
status: In Progress → Fix Released
Changed in arndale:
status: In Progress → Fix Released
Fathi Boudra (fboudra)
Changed in linaro-ubuntu:
milestone: 13.02 → 13.04
Fathi Boudra (fboudra)
Changed in linaro-ubuntu:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.